monkey-style-guide-v2 0.0.42 → 0.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1099,7 +1099,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1099
1099
  ************************* */
1100
1100
  const MECX_I18N_WRAPPER = new InjectionToken('');
1101
1101
  const MECX_POPOVER_OPTIONS = new InjectionToken('MECX_POPOVER_OPTIONS');
1102
- const MECX_COUNTRY_CODE = new InjectionToken('+55');
1102
+ const MECX_COUNTRY_ISO_CODE = new InjectionToken('BR');
1103
1103
 
1104
1104
  /** ************************
1105
1105
  * Copyright Monkey Exchange. All Rights Reserved
@@ -4573,7 +4573,7 @@ class MonkeyInputPhoneComponent {
4573
4573
  this._value = null;
4574
4574
  this.ngControl = inject(NgControl, { self: true, optional: true });
4575
4575
  this.idGenerator = inject(IdGenerator);
4576
- this.countryCode = inject(MECX_COUNTRY_CODE);
4576
+ this.countryIsoCode = inject(MECX_COUNTRY_ISO_CODE);
4577
4577
  this.locale = inject(LOCALE_ID);
4578
4578
  this.id = this.idGenerator.getId('monkey-input-phone-');
4579
4579
  this.inputId = this.idGenerator.getId('monkey-input-phone-input-');
@@ -4583,6 +4583,7 @@ class MonkeyInputPhoneComponent {
4583
4583
  this.countries = getCountries()
4584
4584
  .map((code) => {
4585
4585
  return {
4586
+ iso: code,
4586
4587
  code: `+${getCountryCallingCode(code)}`,
4587
4588
  name: this.getCountryNameFromCode(code),
4588
4589
  flag: `${this.isoToFlagEmoji(code)} `
@@ -4591,7 +4592,7 @@ class MonkeyInputPhoneComponent {
4591
4592
  .sort((a, b) => {
4592
4593
  return a.name.localeCompare(b.name);
4593
4594
  });
4594
- this.selectedCallingCode = this.countryCode.toString();
4595
+ this.selectedCallingCode = this.countryIsoCode.toString();
4595
4596
  this.phoneFormatted = '';
4596
4597
  this.phoneValid = false;
4597
4598
  this._onChange = () => { };
@@ -4627,8 +4628,7 @@ class MonkeyInputPhoneComponent {
4627
4628
  return this.selectedCallingCode;
4628
4629
  }
4629
4630
  const parsed = parsePhoneNumberFromString(input);
4630
- const country = getCountryCallingCode(parsed?.country);
4631
- return `+${country}`;
4631
+ return parsed.country;
4632
4632
  }
4633
4633
  catch (e) {
4634
4634
  // not to do
@@ -4742,7 +4742,7 @@ class MonkeyInputPhoneComponent {
4742
4742
  (onChange)="onCountryChange()"
4743
4743
  >
4744
4744
  @for (item of countries; track $index) {
4745
- <monkey-option [value]="item.code">
4745
+ <monkey-option [value]="item.iso">
4746
4746
  <span class="option-flag">{{ item.flag }}</span>
4747
4747
  <div class="option-name">{{ item.name }} {{ item.code }}</div>
4748
4748
  </monkey-option>
@@ -4782,7 +4782,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4782
4782
  (onChange)="onCountryChange()"
4783
4783
  >
4784
4784
  @for (item of countries; track $index) {
4785
- <monkey-option [value]="item.code">
4785
+ <monkey-option [value]="item.iso">
4786
4786
  <span class="option-flag">{{ item.flag }}</span>
4787
4787
  <div class="option-name">{{ item.name }} {{ item.code }}</div>
4788
4788
  </monkey-option>
@@ -7921,5 +7921,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
7921
7921
  * Generated bundle index. Do not edit.
7922
7922
  */
7923
7923
 
7924
- export { MECX_COUNTRY_CODE, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyErrorDirective, MonkeyFilterBarComponent, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDateRangeComponent, MonkeyInputDirective, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputUploadComponent, MonkeyLabelDirective, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPopoverContentComponent, MonkeyPopoverDirective, MonkeyPrefixDirective, MonkeyRadioButtonComponent, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, MonkeyUserProfileButtonComponent, getCurrencySymbol };
7924
+ export { MECX_COUNTRY_ISO_CODE, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyErrorDirective, MonkeyFilterBarComponent, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDateRangeComponent, MonkeyInputDirective, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputUploadComponent, MonkeyLabelDirective, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPopoverContentComponent, MonkeyPopoverDirective, MonkeyPrefixDirective, MonkeyRadioButtonComponent, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, MonkeyUserProfileButtonComponent, getCurrencySymbol };
7925
7925
  //# sourceMappingURL=monkey-style-guide-v2.mjs.map