Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(intl-phone-input): ability to overwrite country-data #1562

Merged
merged 3 commits into from
Feb 4, 2025

Conversation

mikhail-yurin
Copy link
Contributor

Опишите проблему

Требование от НСПК: возможная длина номера тлф до 15 цифр

Добавил пропс для переопределения дефолтного массива countriesData, чтобы по месту использования компонента можно было передать массив в котором уже будет нужная длина номеров телефонов

Copy link

changeset-bot bot commented Feb 3, 2025

🦋 Changeset detected

Latest commit: 0eeb397

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@alfalab/core-components-international-phone-input Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coveralls
Copy link

coveralls commented Feb 3, 2025

Pull Request Test Coverage Report for Build 13135311953

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.004%) to 82.339%

Totals Coverage Status
Change from base Build 13108226569: -0.004%
Covered Lines: 10798
Relevant Lines: 11967

💛 - Coveralls

/**
*
* Список правил парсинга номеров телефонов по странам (для переопределения дефолтного)
* @type {CountriesData[]}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пожалуй это лишнее (@type {CountriesData[]}), ведь мы находимся в парадигме ts и переданный тип для пропса говорит сам за себя.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это описание (вместе с типом) нужно для сторибука, благодаря этому doc отображается параметр с его описанием

Copy link
Collaborator

@fulcanellee fulcanellee Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я имел ввиду только строчку 50, где указан @type. описание трогать не нужно

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрал @type {CountriesData[]}

@fulcanellee
Copy link
Collaborator

fulcanellee commented Feb 3, 2025

  1. Нужен changeset
  2. Я бы назвал пропс initCountriesList с использованием слова custom, так как по сути то что заложено в компонент и есть init(ial)

@core-ds-bot
Copy link
Collaborator

Собрана новая демка.

@mikhail-yurin
Copy link
Contributor Author

  1. Нужен changeset
  2. Я бы назвал пропс initCountriesList с использованием слова custom, так как по сути то что заложено в компонент и есть init(ial)
  • Добавил changeset
  • Переименовал пропс в customCountriesList

@core-ds-bot
Copy link
Collaborator

Собрана новая демка.

'@alfalab/core-components-international-phone-input': minor
---

optional prop customCountriesList was added to be able to overwrite default country-data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Напиши на русском, пожалуйста, это описание попадает в ченджлог

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

поправил

@core-ds-bot
Copy link
Collaborator

Собрана новая демка.

@fulcanellee fulcanellee merged commit 0e8f85b into master Feb 4, 2025
7 checks passed
@fulcanellee fulcanellee deleted the fix/AMPAY-7072 branch February 4, 2025 13:31
fulcanellee pushed a commit that referenced this pull request Feb 7, 2025
* fix(intl-phone-input): ability to overwrite country-data

* fix(intl-phone-input): changes after review

* fix(intl-phone-input): fix after review

---------

Co-authored-by: Юрин Михаил Михайлович <[email protected]>
(cherry picked from commit 0e8f85b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants