@skyux/phone-field 5.0.0-beta.0 → 5.0.2
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.
- package/LICENSE +21 -0
- package/bundles/skyux-phone-field-testing.umd.js +630 -495
- package/bundles/skyux-phone-field.umd.js +669 -442
- package/documentation.json +2159 -0
- package/esm2015/modules/phone-field/phone-field-adapter.service.js +15 -15
- package/esm2015/modules/phone-field/phone-field-input.directive.js +57 -53
- package/esm2015/modules/phone-field/phone-field.component.js +174 -128
- package/esm2015/modules/phone-field/phone-field.module.js +34 -21
- package/esm2015/modules/phone-field/types/country.js +2 -1
- package/esm2015/modules/phone-field/types/number-return-format.js +2 -1
- package/esm2015/modules/shared/sky-phone-field-resources.module.js +60 -0
- package/esm2015/public-api.js +8 -0
- package/esm2015/skyux-phone-field.js +2 -7
- package/esm2015/testing/phonefield/phone-field-fixture.js +8 -6
- package/esm2015/testing/phonefield/phone-field-testing.module.js +24 -15
- package/esm2015/testing/public-api.js +3 -0
- package/esm2015/testing/skyux-phone-field-testing.js +2 -2
- package/fesm2015/skyux-phone-field-testing.js +31 -18
- package/fesm2015/skyux-phone-field-testing.js.map +1 -1
- package/fesm2015/skyux-phone-field.js +320 -219
- package/fesm2015/skyux-phone-field.js.map +1 -1
- package/modules/phone-field/phone-field-adapter.service.d.ts +3 -0
- package/modules/phone-field/phone-field-input.directive.d.ts +3 -0
- package/modules/phone-field/phone-field.component.d.ts +3 -0
- package/modules/phone-field/phone-field.module.d.ts +13 -0
- package/modules/shared/sky-phone-field-resources.module.d.ts +14 -0
- package/package.json +13 -29
- package/public-api.d.ts +5 -0
- package/skyux-phone-field.d.ts +2 -6
- package/testing/package.json +2 -5
- package/testing/phonefield/phone-field-testing.module.d.ts +6 -0
- package/testing/{public_api.d.ts → public-api.d.ts} +0 -0
- package/testing/skyux-phone-field-testing.d.ts +2 -1
- package/CHANGELOG.md +0 -110
- package/bundles/skyux-phone-field-testing.umd.js.map +0 -1
- package/bundles/skyux-phone-field-testing.umd.min.js +0 -16
- package/bundles/skyux-phone-field-testing.umd.min.js.map +0 -1
- package/bundles/skyux-phone-field.umd.js.map +0 -1
- package/bundles/skyux-phone-field.umd.min.js +0 -16
- package/bundles/skyux-phone-field.umd.min.js.map +0 -1
- package/esm2015/modules/shared/phone-field-resources.module.js +0 -17
- package/esm2015/plugin-resources/phone-field-resources-provider.js +0 -16
- package/esm2015/public_api.js +0 -2
- package/esm2015/testing/public_api.js +0 -3
- package/esm5/modules/phone-field/phone-field-adapter.service.js +0 -65
- package/esm5/modules/phone-field/phone-field-input.directive.js +0 -284
- package/esm5/modules/phone-field/phone-field.component.js +0 -318
- package/esm5/modules/phone-field/phone-field.module.js +0 -40
- package/esm5/modules/phone-field/types/country.js +0 -1
- package/esm5/modules/phone-field/types/number-return-format.js +0 -1
- package/esm5/modules/shared/phone-field-resources.module.js +0 -20
- package/esm5/plugin-resources/phone-field-resources-provider.js +0 -17
- package/esm5/public_api.js +0 -2
- package/esm5/skyux-phone-field.js +0 -10
- package/esm5/testing/phonefield/phone-field-fixture.js +0 -280
- package/esm5/testing/phonefield/phone-field-testing.module.js +0 -21
- package/esm5/testing/public_api.js +0 -3
- package/esm5/testing/skyux-phone-field-testing.js +0 -5
- package/fesm5/skyux-phone-field-testing.js +0 -305
- package/fesm5/skyux-phone-field-testing.js.map +0 -1
- package/fesm5/skyux-phone-field.js +0 -718
- package/fesm5/skyux-phone-field.js.map +0 -1
- package/modules/shared/phone-field-resources.module.d.ts +0 -2
- package/plugin-resources/phone-field-resources-provider.d.ts +0 -5
- package/public_api.d.ts +0 -3
- package/skyux-phone-field.metadata.json +0 -1
- package/src/assets/img/guidelines/anatomy.png +0 -0
- package/src/assets/img/guidelines/phone-country-input.png +0 -0
- package/src/assets/img/guidelines/phone-country-picker.png +0 -0
- package/src/assets/img/guidelines/phone-input-base.png +0 -0
- package/src/assets/img/guidelines/phone-input-error-no-message.png +0 -0
- package/src/assets/img/guidelines/phone-input-error.png +0 -0
- package/src/assets/img/guidelines/phone-input-focused.png +0 -0
- package/src/assets/img/guidelines/phone-input-form.png +0 -0
- package/src/assets/locales/resources_en_US.json +0 -26
- package/testing/skyux-phone-field-testing.metadata.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-phone-field.js","sources":["ng://@skyux/phone-field/plugin-resources/phone-field-resources-provider.ts","ng://@skyux/phone-field/modules/shared/phone-field-resources.module.ts","ng://@skyux/phone-field/modules/phone-field/phone-field-adapter.service.ts","ng://@skyux/phone-field/modules/phone-field/phone-field.component.ts","ng://@skyux/phone-field/modules/phone-field/phone-field-input.directive.ts","ng://@skyux/phone-field/modules/phone-field/phone-field.module.ts","ng://@skyux/phone-field/skyux-phone-field.ts"],"sourcesContent":["\nimport {\n Injectable\n} from '@angular/core';\n\nimport {\n getStringForLocale,\n SkyAppLocaleInfo,\n SkyLibResourcesProvider\n} from '@skyux/i18n';\n\n@Injectable()\nexport class SkyPhoneFieldResourcesProvider implements SkyLibResourcesProvider {\n private resources: any = {\"EN-US\":{\"skyux_phone_field_default_label\":\"Phone number\",\"skyux_phone_field_country_search_dismiss\":\"Dismiss country search\",\"skyux_phone_field_country_search_label\":\"Dismiss country search\",\"skyux_phone_field_country_search_placeholder\":\"Search for a country\",\"skyux_phone_field_country_select_label\":\"Choose country.\",\"skyux_phone_field_country_selected_label\":\"{0} is currently selected.\"}};\n\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getStringForLocale(this.resources, localeInfo.locale, name);\n }\n}\n","import {\n NgModule\n} from '@angular/core';\n\nimport {\n SKY_LIB_RESOURCES_PROVIDERS\n} from '@skyux/i18n';\n\nimport {\n SkyPhoneFieldResourcesProvider\n} from '../../plugin-resources/phone-field-resources-provider';\n\n@NgModule({\n providers: [{\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyPhoneFieldResourcesProvider,\n multi: true\n }]\n})\nexport class SkyPhoneFieldResourcesModule { }\n","import {\n Injectable,\n OnDestroy,\n Renderer2,\n ElementRef\n} from '@angular/core';\n\nimport {\n SkyLibResourcesService\n} from '@skyux/i18n';\n\nimport {\n Subject\n} from 'rxjs';\n\nimport {\n takeUntil\n} from 'rxjs/operators';\n\n/**\n * Service for interacting with the DOM elements of the phone field.\n * @internal\n */\n@Injectable()\nexport class SkyPhoneFieldAdapterService implements OnDestroy {\n\n private ngUnsubscribe = new Subject();\n\n constructor(\n private renderer: Renderer2,\n private resourcesService: SkyLibResourcesService\n ) { }\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n public addElementClass(elementRef: ElementRef, className: string): void {\n this.renderer.addClass(elementRef.nativeElement, className);\n }\n\n public setElementDisabledState(elementRef: ElementRef, disabled: boolean): void {\n this.renderer.setProperty(\n elementRef.nativeElement,\n 'disabled',\n disabled\n );\n }\n\n public setElementPlaceholder(elementRef: ElementRef, placeholder: string): void {\n this.renderer.setAttribute(elementRef.nativeElement, 'placeholder', placeholder);\n }\n\n public setElementType(elementRef: ElementRef): void {\n this.renderer.setAttribute(elementRef.nativeElement, 'type', 'tel');\n }\n\n public setElementValue(elementRef: ElementRef, value: string): void {\n if (value) {\n this.renderer.setProperty(\n elementRef.nativeElement,\n 'value',\n value\n );\n }\n }\n\n public setAriaLabel(element: ElementRef): void {\n if (!element.nativeElement.getAttribute('aria-label')) {\n this.resourcesService.getString('skyux_phone_field_default_label')\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((value: string) => {\n this.renderer.setAttribute(\n element.nativeElement,\n 'aria-label',\n value\n );\n });\n }\n }\n\n public focusCountrySearchElement(el: Element): void {\n const input: HTMLElement = el.querySelector('textarea');\n input.focus();\n }\n\n public focusPhoneInput(el: Element): void {\n const input: HTMLElement = el.querySelector('.sky-phone-field-container input');\n input.focus();\n }\n\n}\n","import {\n animate,\n AnimationEvent,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n SkipSelf,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\n\nimport {\n FormBuilder,\n FormControl,\n FormGroup\n} from '@angular/forms';\n\nimport {\n SkyInputBoxHostService\n} from '@skyux/forms';\n\nimport {\n SkyCountryFieldCountry\n} from '@skyux/lookup';\n\nimport {\n SkyThemeService\n} from '@skyux/theme';\n\nimport {\n PhoneNumberFormat,\n PhoneNumberType,\n PhoneNumberUtil\n} from 'google-libphonenumber';\n\nimport 'intl-tel-input';\n\nimport {\n SkyPhoneFieldAdapterService\n} from './phone-field-adapter.service';\n\nimport {\n SkyPhoneFieldCountry\n} from './types/country';\n\nimport {\n SkyPhoneFieldNumberReturnFormat\n} from './types/number-return-format';\n\n// NOTE: The no-op animation is here in order to block the input's \"fade in\" animation\n// from firing on initial load. For more information on this technique you can see\n// https://www.bennadel.com/blog/3417-using-no-op-transitions-to-prevent-animation-during-the-initial-render-of-ngfor-in-angular-5-2-6.htm\n@Component({\n selector: 'sky-phone-field',\n templateUrl: './phone-field.component.html',\n styleUrls: ['./phone-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n SkyPhoneFieldAdapterService,\n // Prevents the embedded country field component from changing its behavior based on\n // being inside an input box. The phone field itself will handle the required changes\n // for input box.\n {\n provide: SkyInputBoxHostService,\n useValue: undefined\n }\n ],\n animations: [\n trigger('blockAnimationOnLoad', [\n transition(':enter', [])\n ]),\n trigger(\n 'countrySearchAnimation', [\n transition(':enter', [\n style({\n opacity: 0,\n width: 0\n }),\n animate('200ms ease-in', style({\n opacity: 1,\n width: '*'\n }))\n ]),\n transition(':leave', [\n animate('200ms ease-in', style({\n opacity: 0,\n width: 0\n }))\n ])\n ]\n ),\n trigger(\n 'phoneInputAnimation', [\n transition(':enter', [\n style({\n opacity: 0\n }),\n animate('150ms ease-in', style({\n opacity: 1\n }))\n ]),\n transition(':leave', [\n animate('150ms ease-in', style({\n opacity: 0\n }))\n ])\n ]\n )\n ]\n})\nexport class SkyPhoneFieldComponent implements OnDestroy, OnInit {\n\n /**\n * Indicates whether or not phone number extensions are allowed.\n * @default true\n */\n @Input()\n public allowExtensions: boolean = true;\n\n /**\n * Specifies the\n * [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)\n * country code for the default country. The country selector button displays a flag\n * icon for this default country until users select a different country.\n * @default us\n */\n @Input()\n public set defaultCountry(value: string) {\n if (value && value !== this._defaultCountry) {\n this._defaultCountry = value.toLowerCase();\n\n this.defaultCountryData = this.countries\n .find(country => country.iso2 === this._defaultCountry);\n }\n }\n\n public get defaultCountry(): string {\n return this._defaultCountry;\n }\n\n /**\n * Specifies the format for validated phone numbers.\n * @default 'default'\n */\n @Input()\n public returnFormat: SkyPhoneFieldNumberReturnFormat = 'default';\n\n /**\n * Specifies the [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)\n * country codes for the countries that users can select. By default, all countries are available.\n */\n @Input()\n public supportedCountryISOs: string[];\n\n /**\n * Emits a `SkyPhoneFieldCountry` object when the selected country in the country search\n * input changes.\n */\n\n @Output()\n public selectedCountryChange = new EventEmitter<SkyPhoneFieldCountry>();\n\n public countries: SkyPhoneFieldCountry[];\n\n public countrySelectDisabled = false;\n\n public countrySearchShown = false;\n\n public phoneInputShown = true;\n\n public countrySearchForm: FormGroup;\n\n /**\n * Specifies the currently selected country to validate against.\n */\n @Input()\n public set selectedCountry(newCountry: SkyPhoneFieldCountry) {\n if (newCountry && (!this._selectedCountry || this._selectedCountry.iso2 !== newCountry.iso2)) {\n this._selectedCountry = newCountry ? this.countries.find(country => country.iso2 === newCountry.iso2) : undefined;\n\n if (!this._selectedCountry.exampleNumber) {\n const numberObj = this.phoneUtils.getExampleNumberForType(newCountry.iso2,\n PhoneNumberType.FIXED_LINE);\n this._selectedCountry.exampleNumber = this.phoneUtils.format(numberObj,\n PhoneNumberFormat.NATIONAL);\n }\n\n this.selectedCountryChange.emit(this._selectedCountry);\n }\n }\n\n public get selectedCountry(): SkyPhoneFieldCountry {\n return this._selectedCountry;\n }\n\n @ViewChild('inputTemplateRef', {\n read: TemplateRef,\n static: true\n })\n private inputTemplateRef: TemplateRef<any>;\n\n @ViewChild('countryBtnTemplateRef', {\n read: TemplateRef,\n static: true\n })\n private countryBtnTemplateRef: TemplateRef<any>;\n\n @ViewChild('buttonsInsetTemplateRef', {\n read: TemplateRef,\n static: true\n })\n private buttonsInsetTemplateRef: TemplateRef<any>;\n\n private defaultCountryData: SkyPhoneFieldCountry;\n\n private phoneInputAnimationTriggered = false;\n\n private phoneUtils = PhoneNumberUtil.getInstance();\n\n private longestDialCodeLength = 0;\n\n private _defaultCountry: string;\n\n private _selectedCountry: SkyPhoneFieldCountry;\n\n constructor(\n private formBuilder: FormBuilder,\n private adapterService: SkyPhoneFieldAdapterService,\n private changeDetector: ChangeDetectorRef,\n @Optional() public themeSvc?: SkyThemeService,\n @Optional() @SkipSelf() public inputBoxHostSvc?: SkyInputBoxHostService\n ) {\n /**\n * The json functions here ensures that we get a copy of the array and not the global original.\n * This ensures that multiple instances of the component don't overwrite the original data.\n *\n * We must type the window object as any here as the intl-tel-input library adds its object\n * to the main window object.\n */\n this.countries = JSON.parse(JSON.stringify((window as any)\n .intlTelInputGlobals.getCountryData()));\n for (let country of this.countries) {\n country.dialCode = '+' + country.dialCode;\n\n if (country.dialCode.length > this.longestDialCodeLength) {\n this.longestDialCodeLength = country.dialCode.length;\n }\n }\n\n this.countrySearchForm = this.formBuilder.group({\n countrySearch: new FormControl()\n });\n }\n\n public ngOnInit(): void {\n // The timeout here is needed to avoid a change before checked error when a user specifies\n // a selected country on intialization of the component.\n setTimeout(() => {\n if (this.inputBoxHostSvc) {\n this.inputBoxHostSvc.populate(\n {\n inputTemplate: this.inputTemplateRef,\n buttonsInsetTemplate: this.buttonsInsetTemplateRef,\n buttonsLeftTemplate: this.countryBtnTemplateRef\n }\n );\n }\n\n if (!this.defaultCountry) {\n this.defaultCountry = 'us';\n }\n\n if (!this.selectedCountry) {\n this.selectedCountry = this.defaultCountryData;\n }\n this.changeDetector.markForCheck();\n }, 0);\n\n this.countrySearchForm.get('countrySearch').valueChanges.subscribe((newValue: SkyCountryFieldCountry) => {\n if (newValue && newValue.iso2 !== this.selectedCountry.iso2) {\n this.selectedCountry = newValue;\n }\n });\n }\n\n public ngOnDestroy(): void {\n this.selectedCountryChange.complete();\n }\n\n /**\n * Sets the country to validate against based on the county's iso2 code.\n * @param countryCode The International Organization for Standardization's two-letter code\n * for the default country.\n * @internal\n */\n public onCountrySelected(newCountry: SkyCountryFieldCountry): void {\n if (newCountry) {\n this.selectedCountry = this.countries.find(countryInfo => countryInfo.iso2 ===\n newCountry.iso2);\n this.toggleCountrySearch(false);\n }\n }\n\n public toggleCountrySearch(showSearch: boolean): void {\n this.phoneInputAnimationTriggered = true;\n\n if (showSearch) {\n this.phoneInputShown = false;\n } else {\n this.countrySearchShown = false;\n\n this.countrySearchForm.get('countrySearch').setValue(undefined);\n }\n\n this.changeDetector.markForCheck();\n }\n\n public countrySearchAnimationEnd(e: AnimationEvent) {\n if (!this.countrySearchShown) {\n this.phoneInputShown = true;\n } else {\n this.adapterService.focusCountrySearchElement(e.element);\n }\n\n this.changeDetector.markForCheck();\n }\n\n public phoneInputAnimationEnd(e: AnimationEvent) {\n if (!this.phoneInputShown) {\n this.countrySearchShown = true;\n } else {\n if (this.phoneInputAnimationTriggered) {\n this.adapterService.focusPhoneInput(e.element);\n this.phoneInputAnimationTriggered = false;\n }\n }\n\n this.changeDetector.markForCheck();\n }\n\n public setCountryByDialCode(phoneNumber: string): boolean {\n if (!phoneNumber || !phoneNumber.startsWith('+')) {\n return false;\n }\n\n let newCountry: SkyPhoneFieldCountry;\n\n for (let i = 1; i < (this.longestDialCodeLength + 1); i++) {\n let dialCode = phoneNumber.substring(0, i);\n\n let foundCountry = this.countries\n .find(country => country.dialCode === dialCode && country.priority === 0);\n\n if (foundCountry && foundCountry !== this.selectedCountry) {\n newCountry = foundCountry;\n }\n }\n\n if (newCountry) {\n this.selectedCountry = newCountry;\n this.changeDetector.markForCheck();\n return true;\n }\n\n return false;\n }\n\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n forwardRef,\n HostListener,\n Input,\n OnDestroy,\n OnInit,\n Optional\n} from '@angular/core';\n\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NG_VALIDATORS,\n ValidationErrors,\n Validator\n} from '@angular/forms';\n\nimport {\n BehaviorSubject,\n Subject\n} from 'rxjs';\n\nimport {\n debounceTime,\n takeUntil\n} from 'rxjs/operators';\n\nimport {\n PhoneNumberFormat,\n PhoneNumberUtil\n} from 'google-libphonenumber';\n\nimport {\n SkyPhoneFieldComponent\n} from './phone-field.component';\n\nimport {\n SkyPhoneFieldAdapterService\n} from './phone-field-adapter.service';\n\nimport {\n SkyPhoneFieldCountry\n} from './types/country';\n\n// tslint:disable:no-forward-ref no-use-before-declare\nconst SKY_PHONE_FIELD_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SkyPhoneFieldInputDirective),\n multi: true\n};\n\nconst SKY_PHONE_FIELD_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SkyPhoneFieldInputDirective),\n multi: true\n};\n// tslint:enable\n\n/**\n * Creates a button, search input, and text input for entering and validating\n * international phone numbers. Place this attribute on an `input` element, and wrap\n * that element in a `sky-phone-field` component. By default, the country selector\n * button displays a flag icon for the default country, and the phone number input\n * displays a sample of the correct phone number format. When users select the country\n * selector button, they expose the country search input, which is\n * [an autocomplete input](https://developer.blackbaud.com/skyux/components/autocomplete)\n * that allows them to select different countries. When users enter `+` followed by an\n * international dial code in the phone number input, the country automatically switches\n * to the country associated with the dial code.\n * @required\n */\n@Directive({\n selector: '[skyPhoneFieldInput]',\n providers: [\n SKY_PHONE_FIELD_VALUE_ACCESSOR,\n SKY_PHONE_FIELD_VALIDATOR\n ]\n})\nexport class SkyPhoneFieldInputDirective implements OnInit, OnDestroy, AfterViewInit,\n ControlValueAccessor, Validator {\n\n /**\n * Indicates whether to disable the phone field.\n * @default false\n */\n @Input()\n public set disabled(value: boolean) {\n this.phoneFieldComponent.countrySelectDisabled = value;\n this.adapterService.setElementDisabledState(this.elRef, value);\n this._disabled = value;\n }\n\n public get disabled(): boolean {\n return this._disabled || false;\n }\n\n /**\n * Indicates whether to prevent validation on the phone number input. For validation,\n * phone numbers are driven through the `ngModel` attribute that you specify on an\n * `input` element or on a `FormControl` in a reactive form. To prevent validation,\n * set this property to `true`.\n * @default false\n */\n @Input()\n public skyPhoneFieldNoValidate: boolean = false;\n\n private set modelValue(value: string) {\n this._modelValue = value;\n\n this.adapterService.setElementValue(this.elRef, value);\n\n if (value) {\n let formattedValue = this.formatNumber(value.toString());\n\n this.onChange(formattedValue);\n } else {\n this.onChange(value);\n }\n this.validatorChange();\n }\n\n private get modelValue(): string {\n return this._modelValue;\n }\n\n private control: AbstractControl;\n\n private textChanges: BehaviorSubject<string>;\n\n private ngUnsubscribe = new Subject();\n\n private phoneUtils = PhoneNumberUtil.getInstance();\n\n private _disabled: boolean;\n\n private _modelValue: string;\n\n public constructor(\n private changeDetector: ChangeDetectorRef,\n private elRef: ElementRef,\n @Optional() private adapterService: SkyPhoneFieldAdapterService,\n @Optional() private phoneFieldComponent: SkyPhoneFieldComponent\n ) { }\n\n public ngOnInit(): void {\n if (!this.phoneFieldComponent) {\n throw new Error(\n 'You must wrap the `skyPhoneFieldInput` directive within a ' +\n '`<sky-phone-field>` component!'\n );\n }\n\n this.adapterService.setElementType(this.elRef);\n this.adapterService.addElementClass(this.elRef, 'sky-form-control');\n if (this.phoneFieldComponent.selectedCountry) {\n this.adapterService.setElementPlaceholder(this.elRef,\n this.phoneFieldComponent.selectedCountry.exampleNumber);\n }\n\n this.adapterService.setAriaLabel(this.elRef);\n }\n\n public ngAfterViewInit(): void {\n this.phoneFieldComponent.selectedCountryChange\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((country: SkyPhoneFieldCountry) => {\n this.modelValue = this.elRef.nativeElement.value;\n this.adapterService.setElementPlaceholder(this.elRef, country.exampleNumber);\n });\n\n // This is needed to address a bug in Angular 4, where the value is not changed on the view.\n // See: https://github.com/angular/angular/issues/13792\n /* istanbul ignore else */\n if (this.control && this.modelValue) {\n this.control.setValue(this.modelValue, { emitEvent: false });\n this.changeDetector.detectChanges();\n }\n }\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n /**\n * Writes the new value for reactive forms on change events on the input element\n * @param event The change event that was received\n */\n @HostListener('change', ['$event'])\n public onInputChange(event: any): void {\n if (!this.textChanges) {\n this.setupTextChangeSubscription(event.target.value);\n } else {\n this.textChanges.next(event.target.value);\n }\n }\n\n /**\n * Marks reactive form controls as touched on input blur events\n */\n @HostListener('blur')\n public onInputBlur(): void {\n this.onTouched();\n }\n\n @HostListener('input', ['$event'])\n public onInputTyping(event: any): void {\n if (!this.textChanges) {\n this.setupTextChangeSubscription(event.target.value);\n } else {\n this.textChanges.next(event.target.value);\n }\n }\n\n /**\n * Writes the new value for reactive forms\n * @param value The new value for the input\n */\n public writeValue(value: string): void {\n this.phoneFieldComponent.setCountryByDialCode(value);\n\n this.modelValue = value;\n }\n\n public registerOnChange(fn: (value: any) => any): void { this.onChange = fn; }\n\n public registerOnTouched(fn: () => any): void { this.onTouched = fn; }\n\n public registerOnValidatorChange(fn: () => void): void { this.validatorChange = fn; }\n\n /**\n * Sets the disabled state on the input\n * @param isDisabled the new value of the input's disabled state\n */\n public setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * Validate's the form control's current value\n * @param control the form control for the input\n */\n public validate(control: AbstractControl): ValidationErrors {\n\n if (!this.control) {\n this.control = control;\n }\n\n if (this.skyPhoneFieldNoValidate) {\n return;\n }\n\n const value = control.value;\n\n if (!value) {\n return;\n }\n\n if (this.phoneFieldComponent.selectedCountry && !this.validateNumber(value)) {\n\n if (!this.textChanges) {\n // Mark the invalid control as touched so that the input's invalid CSS styles appear.\n // (This is only required when the invalid value is set by the FormControl constructor.)\n // We don't do this if the input is the active element so that we don't show validation\n // errors unless it is invalid on initialization or the input has been blurred.\n control.markAsTouched();\n }\n\n return {\n 'skyPhoneField': {\n invalid: value\n }\n };\n }\n }\n\n private setupTextChangeSubscription(text: string) {\n this.textChanges = new BehaviorSubject(text);\n\n this.textChanges.pipe(\n debounceTime(500),\n takeUntil(this.ngUnsubscribe)\n )\n .subscribe((newValue) => {\n this.writeValue(newValue);\n });\n }\n\n private validateNumber(phoneNumber: string): boolean {\n try {\n const numberObj = this.phoneUtils.parseAndKeepRawInput(phoneNumber,\n this.phoneFieldComponent.selectedCountry.iso2);\n\n if (!this.phoneFieldComponent.allowExtensions && numberObj.getExtension()) {\n return false;\n }\n\n return this.phoneUtils.isValidNumber(numberObj);\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Format's the given phone number based on the currently selected country.\n * @param phoneNumber The number to format\n */\n private formatNumber(phoneNumber: string): string {\n try {\n const numberObj = this.phoneUtils.parseAndKeepRawInput(phoneNumber,\n this.phoneFieldComponent.selectedCountry.iso2);\n if (this.phoneUtils.isPossibleNumber(numberObj)) {\n switch (this.phoneFieldComponent.returnFormat) {\n case 'international':\n return this.phoneUtils.format(numberObj, PhoneNumberFormat.INTERNATIONAL);\n case 'national':\n return this.phoneUtils.format(numberObj, PhoneNumberFormat.NATIONAL);\n case 'default':\n default:\n if (this.phoneFieldComponent.selectedCountry.iso2 !== this.phoneFieldComponent.defaultCountry) {\n return this.phoneUtils.format(numberObj, PhoneNumberFormat.INTERNATIONAL);\n } else {\n return this.phoneUtils.format(numberObj, PhoneNumberFormat.NATIONAL);\n }\n }\n\n } else {\n return phoneNumber;\n }\n } catch (e) {\n /* sanity check */\n /* istanbul ignore next */\n return phoneNumber;\n }\n }\n\n private onChange = (_: any) => { };\n\n /* istanbul ignore next */\n private onTouched = () => { };\n\n private validatorChange = () => { };\n}\n","import {\n NgModule\n} from '@angular/core';\n\nimport {\n CommonModule\n} from '@angular/common';\n\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\n\nimport {\n SkyIconModule\n} from '@skyux/indicators';\n\nimport {\n SkyI18nModule\n} from '@skyux/i18n';\n\nimport {\n SkyCountryFieldModule\n} from '@skyux/lookup';\n\nimport {\n SkyThemeModule\n} from '@skyux/theme';\n\nimport {\n SkyPhoneFieldResourcesModule\n} from '../shared/phone-field-resources.module';\n\nimport {\n SkyPhoneFieldComponent\n} from './phone-field.component';\n\nimport {\n SkyPhoneFieldInputDirective\n} from './phone-field-input.directive';\n\n@NgModule({\n declarations: [\n SkyPhoneFieldComponent,\n SkyPhoneFieldInputDirective\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SkyCountryFieldModule,\n SkyI18nModule,\n SkyIconModule,\n SkyPhoneFieldResourcesModule,\n SkyThemeModule\n ],\n exports: [\n SkyPhoneFieldComponent,\n SkyPhoneFieldInputDirective\n ]\n})\nexport class SkyPhoneFieldModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {SkyPhoneFieldAdapterService as ɵb} from './modules/phone-field/phone-field-adapter.service';\nexport {SkyPhoneFieldInputDirective as ɵc} from './modules/phone-field/phone-field-input.directive';\nexport {SkyPhoneFieldComponent as ɵa} from './modules/phone-field/phone-field.component';\nexport {SkyPhoneFieldResourcesModule as ɵd} from './modules/shared/phone-field-resources.module';\nexport {SkyPhoneFieldResourcesProvider as ɵe} from './plugin-resources/phone-field-resources-provider';"],"names":[],"mappings":";;;;;;;;;;;;;;;IAYa,8BAA8B,GAA3C,MAAa,8BAA8B;IAA3C;QACU,cAAS,GAAQ,EAAC,OAAO,EAAC,EAAC,iCAAiC,EAA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,sBAAsB;QAChC,SAAS,EAAE;YACT,8BAA8B;YAC9B,yBAAyB;SAC1B;KACF,CAAC;IA+DG,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,QAAQ,EAAE,CAAA;GA/DF,2BAA2B,CAwQvC;;IC9RY,mBAAmB,GAAhC,MAAa,mBAAmB;EAAI;AAAvB,mBAAmB;IApB/B,QAAQ,CAAC;QACR,YAAY,EAAE;YACZ,sBAAsB;YACtB,2BAA2B;SAC5B;QACD,OAAO,EAAE;YACP,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,qBAAqB;YACrB,aAAa;YACb,aAAa;YACb,4BAA4B;YAC5B,cAAc;SACf;QACD,OAAO,EAAE;YACP,sBAAsB;YACtB,2BAA2B;SAC5B;KACF,CAAC;GACW,mBAAmB,CAAI;;AC7DpC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"skyux-phone-field.js","sources":["../../../projects/phone-field/src/modules/shared/sky-phone-field-resources.module.ts","../../../projects/phone-field/src/modules/phone-field/phone-field-adapter.service.ts","../../../projects/phone-field/src/modules/phone-field/phone-field.component.ts","../../../projects/phone-field/src/modules/phone-field/phone-field.component.html","../../../projects/phone-field/src/modules/phone-field/phone-field-input.directive.ts","../../../projects/phone-field/src/modules/phone-field/phone-field.module.ts","../../../projects/phone-field/src/skyux-phone-field.ts"],"sourcesContent":["/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-phone-field' schematic.\n * To update this file, simply rerun the command.\n */\n\nimport { NgModule } from '@angular/core';\nimport {\n getLibStringForLocale,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n SKY_LIB_RESOURCES_PROVIDERS,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_phone_field_default_label: { message: 'Phone number' },\n skyux_phone_field_country_search_dismiss: {\n message: 'Dismiss country search',\n },\n skyux_phone_field_country_search_label: {\n message: 'Dismiss country search',\n },\n skyux_phone_field_country_search_placeholder: {\n message: 'Search for a country',\n },\n skyux_phone_field_country_select_label: { message: 'Choose country.' },\n skyux_phone_field_country_selected_label: {\n message: '{0} is currently selected.',\n },\n },\n};\n\nexport class SkyPhoneFieldResourcesProvider implements SkyLibResourcesProvider {\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyPhoneFieldResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyPhoneFieldResourcesModule {}\n","import { Injectable, OnDestroy, Renderer2, ElementRef } from '@angular/core';\n\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { Subject } from 'rxjs';\n\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * Service for interacting with the DOM elements of the phone field.\n * @internal\n */\n@Injectable()\nexport class SkyPhoneFieldAdapterService implements OnDestroy {\n private ngUnsubscribe = new Subject();\n\n constructor(\n private renderer: Renderer2,\n private resourcesService: SkyLibResourcesService\n ) {}\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n public addElementClass(elementRef: ElementRef, className: string): void {\n this.renderer.addClass(elementRef.nativeElement, className);\n }\n\n public setElementDisabledState(\n elementRef: ElementRef,\n disabled: boolean\n ): void {\n this.renderer.setProperty(elementRef.nativeElement, 'disabled', disabled);\n }\n\n public setElementPlaceholder(\n elementRef: ElementRef,\n placeholder: string\n ): void {\n this.renderer.setAttribute(\n elementRef.nativeElement,\n 'placeholder',\n placeholder\n );\n }\n\n public setElementType(elementRef: ElementRef): void {\n this.renderer.setAttribute(elementRef.nativeElement, 'type', 'tel');\n }\n\n public setElementValue(elementRef: ElementRef, value: string): void {\n if (value) {\n this.renderer.setProperty(elementRef.nativeElement, 'value', value);\n }\n }\n\n public setAriaLabel(element: ElementRef): void {\n /* Sanity check */\n /* istanbul ignore else */\n if (!element.nativeElement.getAttribute('aria-label')) {\n this.resourcesService\n .getString('skyux_phone_field_default_label')\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((value: string) => {\n this.renderer.setAttribute(\n element.nativeElement,\n 'aria-label',\n value\n );\n });\n }\n }\n\n public focusCountrySearchElement(el: Element): void {\n const input: HTMLElement = el.querySelector('textarea');\n input.focus();\n }\n\n public focusPhoneInput(el: Element): void {\n const input: HTMLElement = el.querySelector(\n '.sky-phone-field-container input'\n );\n input.focus();\n }\n}\n","import {\n animate,\n AnimationEvent,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n SkipSelf,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\n\nimport { SkyInputBoxHostService } from '@skyux/forms';\n\nimport { SkyCountryFieldCountry } from '@skyux/lookup';\n\nimport { SkyThemeService } from '@skyux/theme';\n\nimport {\n PhoneNumberFormat,\n PhoneNumberType,\n PhoneNumberUtil,\n} from 'google-libphonenumber';\n\nimport 'intl-tel-input';\n\nimport { SkyPhoneFieldAdapterService } from './phone-field-adapter.service';\n\nimport { SkyPhoneFieldCountry } from './types/country';\n\nimport { SkyPhoneFieldNumberReturnFormat } from './types/number-return-format';\n\n// NOTE: The no-op animation is here in order to block the input's \"fade in\" animation\n// from firing on initial load. For more information on this technique you can see\n// https://www.bennadel.com/blog/3417-using-no-op-transitions-to-prevent-animation-during-the-initial-render-of-ngfor-in-angular-5-2-6.htm\n@Component({\n selector: 'sky-phone-field',\n templateUrl: './phone-field.component.html',\n styleUrls: ['./phone-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n SkyPhoneFieldAdapterService,\n // Prevents the embedded country field component from changing its behavior based on\n // being inside an input box. The phone field itself will handle the required changes\n // for input box.\n {\n provide: SkyInputBoxHostService,\n useValue: undefined,\n },\n ],\n animations: [\n trigger('blockAnimationOnLoad', [transition(':enter', [])]),\n trigger('countrySearchAnimation', [\n transition(':enter', [\n style({\n opacity: 0,\n width: 0,\n }),\n animate(\n '200ms ease-in',\n style({\n opacity: 1,\n width: '*',\n })\n ),\n ]),\n transition(':leave', [\n animate(\n '200ms ease-in',\n style({\n opacity: 0,\n width: 0,\n })\n ),\n ]),\n ]),\n trigger('phoneInputAnimation', [\n transition(':enter', [\n style({\n opacity: 0,\n }),\n animate(\n '150ms ease-in',\n style({\n opacity: 1,\n })\n ),\n ]),\n transition(':leave', [\n animate(\n '150ms ease-in',\n style({\n opacity: 0,\n })\n ),\n ]),\n ]),\n ],\n})\nexport class SkyPhoneFieldComponent implements OnDestroy, OnInit {\n /**\n * Indicates whether or not phone number extensions are allowed.\n * @default true\n */\n @Input()\n public allowExtensions: boolean = true;\n\n /**\n * Specifies the\n * [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)\n * country code for the default country. The country selector button displays a flag\n * icon for this default country until users select a different country.\n * @default us\n */\n @Input()\n public set defaultCountry(value: string) {\n if (value && value !== this._defaultCountry) {\n this._defaultCountry = value.toLowerCase();\n\n this.defaultCountryData = this.countries.find(\n (country) => country.iso2 === this._defaultCountry\n );\n }\n }\n\n public get defaultCountry(): string {\n return this._defaultCountry;\n }\n\n /**\n * Specifies the format for validated phone numbers.\n * @default 'default'\n */\n @Input()\n public returnFormat: SkyPhoneFieldNumberReturnFormat = 'default';\n\n /**\n * Specifies the [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)\n * country codes for the countries that users can select. By default, all countries are available.\n */\n @Input()\n public supportedCountryISOs: string[];\n\n /**\n * Emits a `SkyPhoneFieldCountry` object when the selected country in the country search\n * input changes.\n */\n\n @Output()\n public selectedCountryChange = new EventEmitter<SkyPhoneFieldCountry>();\n\n public countries: SkyPhoneFieldCountry[];\n\n public countrySelectDisabled = false;\n\n public countrySearchShown = false;\n\n public phoneInputShown = true;\n\n public countrySearchForm: FormGroup;\n\n /**\n * Specifies the currently selected country to validate against.\n */\n @Input()\n public set selectedCountry(newCountry: SkyPhoneFieldCountry) {\n if (\n newCountry &&\n (!this._selectedCountry || this._selectedCountry.iso2 !== newCountry.iso2)\n ) {\n this._selectedCountry = this.countries.find(\n (country) => country.iso2 === newCountry.iso2\n );\n\n if (!this._selectedCountry.exampleNumber) {\n const numberObj = this.phoneUtils.getExampleNumberForType(\n newCountry.iso2,\n PhoneNumberType.FIXED_LINE\n );\n this._selectedCountry.exampleNumber = this.phoneUtils.format(\n numberObj,\n PhoneNumberFormat.NATIONAL\n );\n }\n\n this.selectedCountryChange.emit(this._selectedCountry);\n }\n }\n\n public get selectedCountry(): SkyPhoneFieldCountry {\n return this._selectedCountry;\n }\n\n @ViewChild('inputTemplateRef', {\n read: TemplateRef,\n static: true,\n })\n private inputTemplateRef: TemplateRef<any>;\n\n @ViewChild('countryBtnTemplateRef', {\n read: TemplateRef,\n static: true,\n })\n private countryBtnTemplateRef: TemplateRef<any>;\n\n @ViewChild('buttonsInsetTemplateRef', {\n read: TemplateRef,\n static: true,\n })\n private buttonsInsetTemplateRef: TemplateRef<any>;\n\n private defaultCountryData: SkyPhoneFieldCountry;\n\n private phoneInputAnimationTriggered = false;\n\n private phoneUtils = PhoneNumberUtil.getInstance();\n\n private longestDialCodeLength = 0;\n\n private _defaultCountry: string;\n\n private _selectedCountry: SkyPhoneFieldCountry;\n\n constructor(\n private formBuilder: FormBuilder,\n private adapterService: SkyPhoneFieldAdapterService,\n private changeDetector: ChangeDetectorRef,\n @Optional() public themeSvc?: SkyThemeService,\n @Optional() @SkipSelf() public inputBoxHostSvc?: SkyInputBoxHostService\n ) {\n /**\n * The json functions here ensures that we get a copy of the array and not the global original.\n * This ensures that multiple instances of the component don't overwrite the original data.\n *\n * We must type the window object as any here as the intl-tel-input library adds its object\n * to the main window object.\n */\n this.countries = JSON.parse(\n JSON.stringify((window as any).intlTelInputGlobals.getCountryData())\n );\n for (let country of this.countries) {\n country.dialCode = '+' + country.dialCode;\n\n if (country.dialCode.length > this.longestDialCodeLength) {\n this.longestDialCodeLength = country.dialCode.length;\n }\n }\n\n this.countrySearchForm = this.formBuilder.group({\n countrySearch: new FormControl(),\n });\n }\n\n public ngOnInit(): void {\n // The timeout here is needed to avoid a change before checked error when a user specifies\n // a selected country on intialization of the component.\n setTimeout(() => {\n if (this.inputBoxHostSvc) {\n this.inputBoxHostSvc.populate({\n inputTemplate: this.inputTemplateRef,\n buttonsInsetTemplate: this.buttonsInsetTemplateRef,\n buttonsLeftTemplate: this.countryBtnTemplateRef,\n });\n }\n\n if (!this.defaultCountry) {\n this.defaultCountry = 'us';\n }\n\n if (!this.selectedCountry) {\n this.selectedCountry = this.defaultCountryData;\n }\n this.changeDetector.markForCheck();\n }, 0);\n\n this.countrySearchForm\n .get('countrySearch')\n .valueChanges.subscribe((newValue: SkyCountryFieldCountry) => {\n if (newValue && newValue.iso2 !== this.selectedCountry.iso2) {\n this.selectedCountry = newValue;\n }\n });\n }\n\n public ngOnDestroy(): void {\n this.selectedCountryChange.complete();\n }\n\n /**\n * Sets the country to validate against based on the county's iso2 code.\n * @param countryCode The International Organization for Standardization's two-letter code\n * for the default country.\n * @internal\n */\n public onCountrySelected(newCountry: SkyCountryFieldCountry): void {\n if (newCountry) {\n this.selectedCountry = this.countries.find(\n (countryInfo) => countryInfo.iso2 === newCountry.iso2\n );\n this.toggleCountrySearch(false);\n }\n }\n\n public toggleCountrySearch(showSearch: boolean): void {\n this.phoneInputAnimationTriggered = true;\n\n if (showSearch) {\n this.phoneInputShown = false;\n } else {\n this.countrySearchShown = false;\n\n this.countrySearchForm.get('countrySearch').setValue(undefined);\n }\n\n this.changeDetector.markForCheck();\n }\n\n public countrySearchAnimationEnd(e: AnimationEvent) {\n if (!this.countrySearchShown) {\n this.phoneInputShown = true;\n } else {\n this.adapterService.focusCountrySearchElement(e.element);\n }\n\n this.changeDetector.markForCheck();\n }\n\n public phoneInputAnimationEnd(e: AnimationEvent) {\n if (!this.phoneInputShown) {\n this.countrySearchShown = true;\n } else {\n if (this.phoneInputAnimationTriggered) {\n this.adapterService.focusPhoneInput(e.element);\n this.phoneInputAnimationTriggered = false;\n }\n }\n\n this.changeDetector.markForCheck();\n }\n\n public setCountryByDialCode(phoneNumber: string): boolean {\n if (!phoneNumber || !phoneNumber.startsWith('+')) {\n return false;\n }\n\n let newCountry: SkyPhoneFieldCountry;\n\n for (let i = 1; i < this.longestDialCodeLength + 1; i++) {\n let dialCode = phoneNumber.substring(0, i);\n\n let foundCountry = this.countries.find(\n (country) => country.dialCode === dialCode && country.priority === 0\n );\n\n if (foundCountry) {\n // Ensure that the country that was found is one of the supported countries\n if (\n this.supportedCountryISOs &&\n this.supportedCountryISOs.findIndex(\n (isoCode) =>\n isoCode.toUpperCase() === foundCountry.iso2.toUpperCase()\n ) < 0\n ) {\n foundCountry = undefined;\n }\n\n if (foundCountry !== this.selectedCountry) {\n newCountry = foundCountry;\n }\n }\n }\n\n if (newCountry) {\n this.selectedCountry = newCountry;\n this.changeDetector.markForCheck();\n return true;\n }\n\n return false;\n }\n}\n","<ng-container *ngIf=\"!inputBoxHostSvc\">\n <div class=\"sky-input-group sky-phone-field\" [@blockAnimationOnLoad]>\n <ng-container *ngTemplateOutlet=\"countryBtnTemplateRef\"></ng-container>\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplateRef\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #countryBtnTemplateRef>\n <div\n class=\"sky-input-group-btn sky-phone-field-country-btn\"\n [attr.data-sky-test-iso2]=\"selectedCountry?.iso2\"\n [attr.data-sky-test-name]=\"selectedCountry?.name\"\n >\n <button\n aria-live=\"polite\"\n class=\"sky-btn sky-btn-default\"\n type=\"button\"\n [attr.title]=\"\n ('skyux_phone_field_country_select_label' | skyLibResources) +\n ' ' +\n ('skyux_phone_field_country_selected_label'\n | skyLibResources: selectedCountry?.name)\n \"\n [attr.aria-label]=\"\n ('skyux_phone_field_country_select_label' | skyLibResources) +\n ' ' +\n ('skyux_phone_field_country_selected_label'\n | skyLibResources: selectedCountry?.name)\n \"\n [disabled]=\"countrySelectDisabled\"\n (click)=\"toggleCountrySearch(true)\"\n >\n <div\n class=\"sky-phone-field-flag iti-flag\"\n [ngClass]=\"selectedCountry?.iso2\"\n ></div>\n </button>\n </div>\n</ng-template>\n\n<ng-template #inputTemplateRef>\n <span\n *ngIf=\"phoneInputShown\"\n class=\"sky-phone-field-container\"\n [@.disabled]=\"\n inputBoxHostSvc &&\n (themeSvc?.settingsChange | async)?.currentSettings?.theme?.name ===\n 'modern'\n \"\n [@phoneInputAnimation]=\"phoneInputShown ? 'open' : 'closed'\"\n (@phoneInputAnimation.done)=\"phoneInputAnimationEnd($event)\"\n >\n <ng-content></ng-content>\n </span>\n <span\n *ngIf=\"countrySearchShown\"\n class=\"sky-phone-field-container\"\n [@.disabled]=\"\n inputBoxHostSvc &&\n (themeSvc?.settingsChange | async)?.currentSettings?.theme?.name ===\n 'modern'\n \"\n [@countrySearchAnimation]=\"countrySearchShown ? 'open' : 'closed'\"\n (@countrySearchAnimation.done)=\"countrySearchAnimationEnd($event)\"\n >\n <div class=\"sky-phone-field-country-search\" [formGroup]=\"countrySearchForm\">\n <sky-country-field\n formControlName=\"countrySearch\"\n [defaultCountry]=\"defaultCountry\"\n [hideSelectedCountryFlag]=\"true\"\n [includePhoneInfo]=\"true\"\n [supportedCountryISOs]=\"supportedCountryISOs\"\n (selectedCountryChange)=\"onCountrySelected($event)\"\n >\n </sky-country-field>\n </div>\n </span>\n</ng-template>\n\n<ng-template #buttonsInsetTemplateRef>\n <div\n *ngIf=\"countrySearchShown\"\n class=\"sky-input-group-btn sky-input-box-btn-inset sky-search-item-dismiss\"\n >\n <button\n class=\"sky-btn sky-phone-field-search-btn-dismiss\"\n type=\"button\"\n [attr.title]=\"\n 'skyux_phone_field_country_search_dismiss' | skyLibResources\n \"\n [ngClass]=\"{\n 'sky-btn-default':\n (themeSvc?.settingsChange | async)?.currentSettings?.theme?.name ===\n 'modern'\n }\"\n (click)=\"toggleCountrySearch(false)\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"chevron-circle-left\" size=\"lg\">\n </sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"double-chevron-left\"\n iconType=\"skyux\"\n size=\"2x\"\n >\n </sky-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template let-item=\"item\" #countrySearchResultTemplate>\n <div class=\"sky-phone-field-search-result\">\n <i\n aria-hidden=\"true\"\n [className]=\"'sky-phone-field-flag iti-flag ' + item.iso2\"\n ></i>\n {{ item.name }}\n <span class=\"sky-deemphasized\">{{ item.dialCode }}</span>\n </div>\n</ng-template>\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n forwardRef,\n HostListener,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n} from '@angular/core';\n\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\n\nimport { BehaviorSubject, Subject } from 'rxjs';\n\nimport { debounceTime, takeUntil } from 'rxjs/operators';\n\nimport { PhoneNumberFormat, PhoneNumberUtil } from 'google-libphonenumber';\n\nimport { SkyPhoneFieldComponent } from './phone-field.component';\n\nimport { SkyPhoneFieldAdapterService } from './phone-field-adapter.service';\n\nimport { SkyPhoneFieldCountry } from './types/country';\n\n// tslint:disable:no-forward-ref no-use-before-declare\nconst SKY_PHONE_FIELD_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SkyPhoneFieldInputDirective),\n multi: true,\n};\n\nconst SKY_PHONE_FIELD_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SkyPhoneFieldInputDirective),\n multi: true,\n};\n// tslint:enable\n\n/**\n * Creates a button, search input, and text input for entering and validating\n * international phone numbers. Place this attribute on an `input` element, and wrap\n * that element in a `sky-phone-field` component. By default, the country selector\n * button displays a flag icon for the default country, and the phone number input\n * displays a sample of the correct phone number format. When users select the country\n * selector button, they expose the country search input, which is\n * [an autocomplete input](https://developer.blackbaud.com/skyux/components/autocomplete)\n * that allows them to select different countries. When users enter `+` followed by an\n * international dial code in the phone number input, the country automatically switches\n * to the country associated with the dial code.\n * @required\n */\n@Directive({\n selector: '[skyPhoneFieldInput]',\n providers: [SKY_PHONE_FIELD_VALUE_ACCESSOR, SKY_PHONE_FIELD_VALIDATOR],\n})\nexport class SkyPhoneFieldInputDirective\n implements OnInit, OnDestroy, AfterViewInit, ControlValueAccessor, Validator\n{\n /**\n * Indicates whether to disable the phone field.\n * @default false\n */\n @Input()\n public set disabled(value: boolean) {\n this.phoneFieldComponent.countrySelectDisabled = value;\n this.adapterService.setElementDisabledState(this.elRef, value);\n this._disabled = value;\n }\n\n public get disabled(): boolean {\n return this._disabled || false;\n }\n\n /**\n * Indicates whether to prevent validation on the phone number input. For validation,\n * phone numbers are driven through the `ngModel` attribute that you specify on an\n * `input` element or on a `FormControl` in a reactive form. To prevent validation,\n * set this property to `true`.\n * @default false\n */\n @Input()\n public skyPhoneFieldNoValidate: boolean = false;\n\n private set modelValue(value: string) {\n this._modelValue = value;\n\n this.adapterService.setElementValue(this.elRef, value);\n\n if (value) {\n let formattedValue = this.formatNumber(value.toString());\n\n this.onChange(formattedValue);\n } else {\n this.onChange(value);\n }\n this.validatorChange();\n }\n\n private get modelValue(): string {\n return this._modelValue;\n }\n\n private control: AbstractControl;\n\n private textChanges: BehaviorSubject<string>;\n\n private ngUnsubscribe = new Subject();\n\n private phoneUtils = PhoneNumberUtil.getInstance();\n\n private _disabled: boolean;\n\n private _modelValue: string;\n\n public constructor(\n private changeDetector: ChangeDetectorRef,\n private elRef: ElementRef,\n @Optional() private adapterService: SkyPhoneFieldAdapterService,\n @Optional() private phoneFieldComponent: SkyPhoneFieldComponent\n ) {}\n\n public ngOnInit(): void {\n if (!this.phoneFieldComponent) {\n throw new Error(\n 'You must wrap the `skyPhoneFieldInput` directive within a ' +\n '`<sky-phone-field>` component!'\n );\n }\n\n this.adapterService.setElementType(this.elRef);\n this.adapterService.addElementClass(this.elRef, 'sky-form-control');\n if (this.phoneFieldComponent.selectedCountry) {\n this.adapterService.setElementPlaceholder(\n this.elRef,\n this.phoneFieldComponent.selectedCountry.exampleNumber\n );\n }\n\n this.adapterService.setAriaLabel(this.elRef);\n }\n\n public ngAfterViewInit(): void {\n this.phoneFieldComponent.selectedCountryChange\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((country: SkyPhoneFieldCountry) => {\n this.modelValue = this.elRef.nativeElement.value;\n this.adapterService.setElementPlaceholder(\n this.elRef,\n country.exampleNumber\n );\n });\n\n // This is needed to address a bug in Angular 4, where the value is not changed on the view.\n // See: https://github.com/angular/angular/issues/13792\n /* istanbul ignore else */\n if (this.control && this.modelValue) {\n this.control.setValue(this.modelValue, { emitEvent: false });\n this.changeDetector.detectChanges();\n }\n }\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n /**\n * Writes the new value for reactive forms on change events on the input element\n * @param event The change event that was received\n */\n @HostListener('change', ['$event'])\n public onInputChange(event: any): void {\n if (!this.textChanges) {\n this.setupTextChangeSubscription(event.target.value);\n } else {\n this.textChanges.next(event.target.value);\n }\n }\n\n /**\n * Marks reactive form controls as touched on input blur events\n */\n @HostListener('blur')\n public onInputBlur(): void {\n this.onTouched();\n }\n\n @HostListener('input', ['$event'])\n public onInputTyping(event: any): void {\n if (!this.textChanges) {\n this.setupTextChangeSubscription(event.target.value);\n } else {\n this.textChanges.next(event.target.value);\n }\n }\n\n /**\n * Writes the new value for reactive forms\n * @param value The new value for the input\n */\n public writeValue(value: string): void {\n this.phoneFieldComponent.setCountryByDialCode(value);\n\n this.modelValue = value;\n }\n\n public registerOnChange(fn: (value: any) => any): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: () => any): void {\n this.onTouched = fn;\n }\n\n public registerOnValidatorChange(fn: () => void): void {\n this.validatorChange = fn;\n }\n\n /**\n * Sets the disabled state on the input\n * @param isDisabled the new value of the input's disabled state\n */\n public setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * Validate's the form control's current value\n * @param control the form control for the input\n */\n public validate(control: AbstractControl): ValidationErrors {\n if (!this.control) {\n this.control = control;\n }\n\n if (this.skyPhoneFieldNoValidate) {\n return;\n }\n\n const value = control.value;\n\n if (!value) {\n return;\n }\n\n if (\n this.phoneFieldComponent.selectedCountry &&\n !this.validateNumber(value)\n ) {\n if (!this.textChanges) {\n // Mark the invalid control as touched so that the input's invalid CSS styles appear.\n // (This is only required when the invalid value is set by the FormControl constructor.)\n // We don't do this if the input is the active element so that we don't show validation\n // errors unless it is invalid on initialization or the input has been blurred.\n control.markAsTouched();\n }\n\n return {\n skyPhoneField: {\n invalid: value,\n },\n };\n }\n }\n\n private setupTextChangeSubscription(text: string) {\n this.textChanges = new BehaviorSubject(text);\n\n this.textChanges\n .pipe(debounceTime(500), takeUntil(this.ngUnsubscribe))\n .subscribe((newValue) => {\n this.writeValue(newValue);\n });\n }\n\n private validateNumber(phoneNumber: string): boolean {\n try {\n const numberObj = this.phoneUtils.parseAndKeepRawInput(\n phoneNumber,\n this.phoneFieldComponent.selectedCountry.iso2\n );\n\n if (\n !this.phoneFieldComponent.allowExtensions &&\n numberObj.getExtension()\n ) {\n return false;\n }\n\n return this.phoneUtils.isValidNumber(numberObj);\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Format's the given phone number based on the currently selected country.\n * @param phoneNumber The number to format\n */\n private formatNumber(phoneNumber: string): string {\n try {\n const numberObj = this.phoneUtils.parseAndKeepRawInput(\n phoneNumber,\n this.phoneFieldComponent.selectedCountry.iso2\n );\n if (this.phoneUtils.isPossibleNumber(numberObj)) {\n switch (this.phoneFieldComponent.returnFormat) {\n case 'international':\n return this.phoneUtils.format(\n numberObj,\n PhoneNumberFormat.INTERNATIONAL\n );\n case 'national':\n return this.phoneUtils.format(\n numberObj,\n PhoneNumberFormat.NATIONAL\n );\n case 'default':\n default:\n if (\n this.phoneFieldComponent.selectedCountry.iso2 !==\n this.phoneFieldComponent.defaultCountry\n ) {\n return this.phoneUtils.format(\n numberObj,\n PhoneNumberFormat.INTERNATIONAL\n );\n } else {\n return this.phoneUtils.format(\n numberObj,\n PhoneNumberFormat.NATIONAL\n );\n }\n }\n } else {\n return phoneNumber;\n }\n } catch (e) {\n /* sanity check */\n /* istanbul ignore next */\n return phoneNumber;\n }\n }\n\n private onChange = (_: any) => {};\n\n /* istanbul ignore next */\n private onTouched = () => {};\n\n /* istanbul ignore next */\n private validatorChange = () => {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { SkyIconModule } from '@skyux/indicators';\n\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyCountryFieldModule } from '@skyux/lookup';\n\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkyPhoneFieldResourcesModule } from '../shared/sky-phone-field-resources.module';\n\nimport { SkyPhoneFieldComponent } from './phone-field.component';\n\nimport { SkyPhoneFieldInputDirective } from './phone-field-input.directive';\n\n@NgModule({\n declarations: [SkyPhoneFieldComponent, SkyPhoneFieldInputDirective],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SkyCountryFieldModule,\n SkyI18nModule,\n SkyIconModule,\n SkyPhoneFieldResourcesModule,\n SkyThemeModule,\n ],\n exports: [SkyPhoneFieldComponent, SkyPhoneFieldInputDirective],\n})\nexport class SkyPhoneFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAiBA,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE;QACP,+BAA+B,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;QAC5D,wCAAwC,EAAE;YACxC,OAAO,EAAE,wBAAwB;SAClC;QACD,sCAAsC,EAAE;YACtC,OAAO,EAAE,wBAAwB;SAClC;QACD,4CAA4C,EAAE;YAC5C,OAAO,EAAE,sBAAsB;SAChC;QACD,sCAAsC,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE;QACtE,wCAAwC,EAAE;YACxC,OAAO,EAAE,4BAA4B;SACtC;KACF;CACF,CAAC;MAEW,8BAA8B;IAClC,SAAS,CAAC,UAA4B,EAAE,IAAY;QACzD,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KAClE;CACF;AAED;;;MAaa,4BAA4B;;0HAA5B,4BAA4B;2HAA5B,4BAA4B,YAT7B,aAAa;2HASZ,4BAA4B,aAR5B;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,8BAA8B;YACxC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,4BAA4B;kBAVxC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,8BAA8B;4BACxC,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF;;;AC9CD;;;;MAKa,2BAA2B;IAGtC,YACU,QAAmB,EACnB,gBAAwC;QADxC,aAAQ,GAAR,QAAQ,CAAW;QACnB,qBAAgB,GAAhB,gBAAgB,CAAwB;QAJ1C,kBAAa,GAAG,IAAI,OAAO,EAAE,CAAC;K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sB;oBAChC,SAAS,EAAE,CAAC,8BAA8B,EAAE,yBAAyB,CAAC;iBACvE;;0BA+DI,QAAQ;;0BACR,QAAQ;4CAvDA,QAAQ;sBADlB,KAAK;gBAmBC,uBAAuB;sBAD7B,KAAK;gBA2FC,aAAa;sBADnB,YAAY;uBAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBAa3B,WAAW;sBADjB,YAAY;uBAAC,MAAM;gBAMb,aAAa;sBADnB,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;MCnKtB,mBAAmB;;iHAAnB,mBAAmB;kHAAnB,mBAAmB,iBAbf,sBAAsB,EAAE,2BAA2B,aAEhE,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,qBAAqB;QACrB,aAAa;QACb,aAAa;QACb,4BAA4B;QAC5B,cAAc,aAEN,sBAAsB,EAAE,2BAA2B;kHAElD,mBAAmB,YAZrB;YACP,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,qBAAqB;YACrB,aAAa;YACb,aAAa;YACb,4BAA4B;YAC5B,cAAc;SACf;4FAGU,mBAAmB;kBAd/B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,sBAAsB,EAAE,2BAA2B,CAAC;oBACnE,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,qBAAqB;wBACrB,aAAa;wBACb,aAAa;wBACb,4BAA4B;wBAC5B,cAAc;qBACf;oBACD,OAAO,EAAE,CAAC,sBAAsB,EAAE,2BAA2B,CAAC;iBAC/D;;;ACjCD;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OnDestroy, Renderer2, ElementRef } from '@angular/core';
|
|
2
2
|
import { SkyLibResourcesService } from '@skyux/i18n';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* Service for interacting with the DOM elements of the phone field.
|
|
5
6
|
* @internal
|
|
@@ -18,4 +19,6 @@ export declare class SkyPhoneFieldAdapterService implements OnDestroy {
|
|
|
18
19
|
setAriaLabel(element: ElementRef): void;
|
|
19
20
|
focusCountrySearchElement(el: Element): void;
|
|
20
21
|
focusPhoneInput(el: Element): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyPhoneFieldAdapterService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyPhoneFieldAdapterService>;
|
|
21
24
|
}
|
|
@@ -2,6 +2,7 @@ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from
|
|
|
2
2
|
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
|
|
3
3
|
import { SkyPhoneFieldComponent } from './phone-field.component';
|
|
4
4
|
import { SkyPhoneFieldAdapterService } from './phone-field-adapter.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* Creates a button, search input, and text input for entering and validating
|
|
7
8
|
* international phone numbers. Place this attribute on an `input` element, and wrap
|
|
@@ -84,4 +85,6 @@ export declare class SkyPhoneFieldInputDirective implements OnInit, OnDestroy, A
|
|
|
84
85
|
private onChange;
|
|
85
86
|
private onTouched;
|
|
86
87
|
private validatorChange;
|
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyPhoneFieldInputDirective, [null, null, { optional: true; }, { optional: true; }]>;
|
|
89
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SkyPhoneFieldInputDirective, "[skyPhoneFieldInput]", never, { "disabled": "disabled"; "skyPhoneFieldNoValidate": "skyPhoneFieldNoValidate"; }, {}, never>;
|
|
87
90
|
}
|
|
@@ -8,6 +8,7 @@ import 'intl-tel-input';
|
|
|
8
8
|
import { SkyPhoneFieldAdapterService } from './phone-field-adapter.service';
|
|
9
9
|
import { SkyPhoneFieldCountry } from './types/country';
|
|
10
10
|
import { SkyPhoneFieldNumberReturnFormat } from './types/number-return-format';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
11
12
|
export declare class SkyPhoneFieldComponent implements OnDestroy, OnInit {
|
|
12
13
|
private formBuilder;
|
|
13
14
|
private adapterService;
|
|
@@ -76,4 +77,6 @@ export declare class SkyPhoneFieldComponent implements OnDestroy, OnInit {
|
|
|
76
77
|
countrySearchAnimationEnd(e: AnimationEvent): void;
|
|
77
78
|
phoneInputAnimationEnd(e: AnimationEvent): void;
|
|
78
79
|
setCountryByDialCode(phoneNumber: string): boolean;
|
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyPhoneFieldComponent, [null, null, null, { optional: true; }, { optional: true; skipSelf: true; }]>;
|
|
81
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyPhoneFieldComponent, "sky-phone-field", never, { "allowExtensions": "allowExtensions"; "defaultCountry": "defaultCountry"; "returnFormat": "returnFormat"; "supportedCountryISOs": "supportedCountryISOs"; "selectedCountry": "selectedCountry"; }, { "selectedCountryChange": "selectedCountryChange"; }, never, ["*"]>;
|
|
79
82
|
}
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./phone-field.component";
|
|
3
|
+
import * as i2 from "./phone-field-input.directive";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/forms";
|
|
6
|
+
import * as i5 from "@skyux/lookup";
|
|
7
|
+
import * as i6 from "@skyux/i18n";
|
|
8
|
+
import * as i7 from "@skyux/indicators";
|
|
9
|
+
import * as i8 from "../shared/sky-phone-field-resources.module";
|
|
10
|
+
import * as i9 from "@skyux/theme";
|
|
1
11
|
export declare class SkyPhoneFieldModule {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyPhoneFieldModule, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyPhoneFieldModule, [typeof i1.SkyPhoneFieldComponent, typeof i2.SkyPhoneFieldInputDirective], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.SkyCountryFieldModule, typeof i6.SkyI18nModule, typeof i7.SkyIconModule, typeof i8.SkyPhoneFieldResourcesModule, typeof i9.SkyThemeModule], [typeof i1.SkyPhoneFieldComponent, typeof i2.SkyPhoneFieldInputDirective]>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SkyPhoneFieldModule>;
|
|
2
15
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SkyAppLocaleInfo, SkyLibResourcesProvider } from '@skyux/i18n';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@skyux/i18n";
|
|
4
|
+
export declare class SkyPhoneFieldResourcesProvider implements SkyLibResourcesProvider {
|
|
5
|
+
getString(localeInfo: SkyAppLocaleInfo, name: string): string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Import into any component library module that needs to use resource strings.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SkyPhoneFieldResourcesModule {
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyPhoneFieldResourcesModule, never>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyPhoneFieldResourcesModule, never, never, [typeof i1.SkyI18nModule]>;
|
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SkyPhoneFieldResourcesModule>;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,43 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/phone-field",
|
|
3
|
-
"version": "5.0.
|
|
4
|
-
"description": "SKY UX Phone Field",
|
|
5
|
-
"keywords": [],
|
|
6
|
-
"author": "Blackbaud",
|
|
7
|
-
"license": "ISC",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/blackbaud/skyux-phone-field.git"
|
|
11
|
-
},
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/blackbaud/skyux-phone-field/issues"
|
|
14
|
-
},
|
|
15
|
-
"homepage": "https://github.com/blackbaud/skyux-phone-field#readme",
|
|
3
|
+
"version": "5.0.2",
|
|
16
4
|
"peerDependencies": {
|
|
17
|
-
"@angular/animations": "^
|
|
18
|
-
"@angular/common": "^
|
|
19
|
-
"@angular/core": "^
|
|
20
|
-
"@angular/forms": "^
|
|
21
|
-
"@skyux/forms": "^5.0.
|
|
22
|
-
"@skyux/i18n": "^5.0.
|
|
23
|
-
"@skyux/indicators": "^5.
|
|
24
|
-
"@skyux/lookup": "^5.
|
|
25
|
-
"@skyux/theme": "^5.0.
|
|
5
|
+
"@angular/animations": "^12.2.15",
|
|
6
|
+
"@angular/common": "^12.2.15",
|
|
7
|
+
"@angular/core": "^12.2.15",
|
|
8
|
+
"@angular/forms": "^12.2.15",
|
|
9
|
+
"@skyux/forms": "^5.0.2",
|
|
10
|
+
"@skyux/i18n": "^5.0.1",
|
|
11
|
+
"@skyux/indicators": "^5.1.2",
|
|
12
|
+
"@skyux/lookup": "^5.1.0",
|
|
13
|
+
"@skyux/theme": "^5.0.4"
|
|
26
14
|
},
|
|
27
15
|
"dependencies": {
|
|
28
|
-
"@types/google-libphonenumber": "7.4.21",
|
|
29
16
|
"google-libphonenumber": "3.2.21",
|
|
30
17
|
"intl-tel-input": "14.1.0",
|
|
31
|
-
"tslib": "^
|
|
18
|
+
"tslib": "^2.3.1"
|
|
32
19
|
},
|
|
33
20
|
"main": "bundles/skyux-phone-field.umd.js",
|
|
34
|
-
"module": "
|
|
21
|
+
"module": "fesm2015/skyux-phone-field.js",
|
|
35
22
|
"es2015": "fesm2015/skyux-phone-field.js",
|
|
36
|
-
"esm5": "esm5/skyux-phone-field.js",
|
|
37
23
|
"esm2015": "esm2015/skyux-phone-field.js",
|
|
38
|
-
"fesm5": "fesm5/skyux-phone-field.js",
|
|
39
24
|
"fesm2015": "fesm2015/skyux-phone-field.js",
|
|
40
25
|
"typings": "skyux-phone-field.d.ts",
|
|
41
|
-
"metadata": "skyux-phone-field.metadata.json",
|
|
42
26
|
"sideEffects": false
|
|
43
|
-
}
|
|
27
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './modules/phone-field/phone-field.module';
|
|
2
|
+
export * from './modules/phone-field/types/country';
|
|
3
|
+
export * from './modules/phone-field/types/number-return-format';
|
|
4
|
+
export { SkyPhoneFieldComponent as λ1 } from './modules/phone-field/phone-field.component';
|
|
5
|
+
export { SkyPhoneFieldInputDirective as λ2 } from './modules/phone-field/phone-field-input.directive';
|
package/skyux-phone-field.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export { SkyPhoneFieldInputDirective as ɵc } from './modules/phone-field/phone-field-input.directive';
|
|
7
|
-
export { SkyPhoneFieldComponent as ɵa } from './modules/phone-field/phone-field.component';
|
|
8
|
-
export { SkyPhoneFieldResourcesModule as ɵd } from './modules/shared/phone-field-resources.module';
|
|
9
|
-
export { SkyPhoneFieldResourcesProvider as ɵe } from './plugin-resources/phone-field-resources-provider';
|
|
4
|
+
/// <amd-module name="@skyux/phone-field" />
|
|
5
|
+
export * from './public-api';
|
package/testing/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": "../bundles/skyux-phone-field-testing.umd.js",
|
|
3
|
-
"module": "../
|
|
3
|
+
"module": "../fesm2015/skyux-phone-field-testing.js",
|
|
4
4
|
"es2015": "../fesm2015/skyux-phone-field-testing.js",
|
|
5
|
-
"esm5": "../esm5/testing/skyux-phone-field-testing.js",
|
|
6
5
|
"esm2015": "../esm2015/testing/skyux-phone-field-testing.js",
|
|
7
|
-
"fesm5": "../fesm5/skyux-phone-field-testing.js",
|
|
8
6
|
"fesm2015": "../fesm2015/skyux-phone-field-testing.js",
|
|
9
7
|
"typings": "skyux-phone-field-testing.d.ts",
|
|
10
|
-
"metadata": "skyux-phone-field-testing.metadata.json",
|
|
11
8
|
"sideEffects": false,
|
|
12
9
|
"name": "@skyux/phone-field/testing"
|
|
13
|
-
}
|
|
10
|
+
}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@skyux/phone-field";
|
|
3
|
+
import * as i2 from "@angular/platform-browser/animations";
|
|
1
4
|
export declare class SkyPhoneFieldTestingModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyPhoneFieldTestingModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyPhoneFieldTestingModule, never, never, [typeof i1.SkyPhoneFieldModule, typeof i2.NoopAnimationsModule]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SkyPhoneFieldTestingModule>;
|
|
2
8
|
}
|
|
File without changes
|
package/CHANGELOG.md
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# 5.0.0-beta.0 (2021-07-16)
|
|
2
|
-
|
|
3
|
-
- Initial beta release.
|
|
4
|
-
- Added support for `5.0.0-beta.*` versions of SKY UX component libraries. [#96](https://github.com/blackbaud/skyux-phone-field/pull/96)
|
|
5
|
-
|
|
6
|
-
# 4.6.1 (2021-06-03)
|
|
7
|
-
|
|
8
|
-
- Fixed the phone field component to display the correct "close" icon when searching for a country in modern theme. [#92](https://github.com/blackbaud/skyux-phone-field/pull/92)
|
|
9
|
-
|
|
10
|
-
# 5.0.0-alpha.0 (2021-05-24)
|
|
11
|
-
|
|
12
|
-
- Added support for `@angular/core@^12`. [#91](https://github.com/blackbaud/skyux-phone-field/pull/91)
|
|
13
|
-
- Removed `BrowserAnimationsModule` from the `imports` section of `SkyPhoneFieldModule` to support lazy-loading. Consumers of `SkyPhoneFieldModule` must now import `BrowserAnimationsModule` into their application's root module. [#91](https://github.com/blackbaud/skyux-phone-field/pull/91)
|
|
14
|
-
|
|
15
|
-
# 4.6.0 (2021-05-03)
|
|
16
|
-
|
|
17
|
-
- Added methods to the phone field testing fixture. [#88](https://github.com/blackbaud/skyux-phone-field/pull/88)
|
|
18
|
-
|
|
19
|
-
# 4.5.1 (2021-01-20)
|
|
20
|
-
|
|
21
|
-
- Fixed the phone field input directive to automatically set the input's type to `tel`. [#83](https://github.com/blackbaud/skyux-phone-field/pull/83) (Thanks [@dougdomeny](https://github.com/dougdomeny)!)
|
|
22
|
-
|
|
23
|
-
# 4.5.0 (2020-11-11)
|
|
24
|
-
|
|
25
|
-
- Added a phone field testing fixture. [#77](https://github.com/blackbaud/skyux-phone-field/pull/77)
|
|
26
|
-
|
|
27
|
-
# 4.4.1 (2020-10-26)
|
|
28
|
-
|
|
29
|
-
- Fixed the phone field component to not indicate that the field is invalid while the user is still interacting with the component for the first time. [#74](https://github.com/blackbaud/skyux-phone-field/pull/74)
|
|
30
|
-
|
|
31
|
-
# 4.4.0 (2020-10-05)
|
|
32
|
-
|
|
33
|
-
- Added support to the phone field component for specifying whether to allow phone number extensions. [#71](https://github.com/blackbaud/skyux-phone-field/pull/71)
|
|
34
|
-
|
|
35
|
-
# 4.3.0 (2020-10-05)
|
|
36
|
-
|
|
37
|
-
- Added input box support to the phone field component. [#69](https://github.com/blackbaud/skyux-phone-field/pull/69)
|
|
38
|
-
|
|
39
|
-
# 4.2.0 (2020-09-25)
|
|
40
|
-
|
|
41
|
-
- Added the ability to limit the countries available for selection in the phone field component. [#68](https://github.com/blackbaud/skyux-phone-field/pull/68)
|
|
42
|
-
- Added the ability to specify the returned phone number format from the phone field component. [#66](https://github.com/blackbaud/skyux-phone-field/pull/66)
|
|
43
|
-
|
|
44
|
-
# 4.1.1 (2020-08-21)
|
|
45
|
-
|
|
46
|
-
- Added support for `google-libphonenumber@3.2.12`. [#62](https://github.com/blackbaud/skyux-phone-field/pull/62)
|
|
47
|
-
|
|
48
|
-
# 4.1.0 (2020-08-10)
|
|
49
|
-
|
|
50
|
-
- Added the ability to programatically set the phone field component's country value. [#51](https://github.com/blackbaud/skyux-phone-field/pull/51)
|
|
51
|
-
|
|
52
|
-
# 4.0.2 (2020-08-07)
|
|
53
|
-
|
|
54
|
-
- Added support for `@skyux/theme@4.8.0` and `@skyux-sdk/builder@4.3.0`. [#58](https://github.com/blackbaud/skyux-phone-field/pull/58)
|
|
55
|
-
|
|
56
|
-
# 4.0.1 (2020-06-11)
|
|
57
|
-
|
|
58
|
-
- Updated the default `aria-label` property for the phone field component to improve the experience when using assistive technology [#42](https://github.com/blackbaud/skyux-phone-field/pull/42)
|
|
59
|
-
|
|
60
|
-
# 4.0.0 (2020-05-21)
|
|
61
|
-
|
|
62
|
-
### New features
|
|
63
|
-
|
|
64
|
-
- Updated the pipeline to transpile to the [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview). [#37](https://github.com/blackbaud/skyux-phone-field/pull/37)
|
|
65
|
-
|
|
66
|
-
### Breaking changes
|
|
67
|
-
|
|
68
|
-
- Dropped support for `rxjs@5`. Consumers can install `rxjs-compat@^6` to support older versions of `rxjs`. [#37](https://github.com/blackbaud/skyux-phone-field/pull/37)
|
|
69
|
-
|
|
70
|
-
# 4.0.0-rc.0 (2020-04-20)
|
|
71
|
-
|
|
72
|
-
### New features
|
|
73
|
-
|
|
74
|
-
- Updated the pipeline to transpile to the [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview). [#37](https://github.com/blackbaud/skyux-phone-field/pull/37)
|
|
75
|
-
|
|
76
|
-
### Breaking changes
|
|
77
|
-
|
|
78
|
-
- Dropped support for `rxjs@5`. Consumers can install `rxjs-compat@^6` to support older versions of `rxjs`. [#37](https://github.com/blackbaud/skyux-phone-field/pull/37)
|
|
79
|
-
|
|
80
|
-
# 3.1.2 (2020-02-06)
|
|
81
|
-
|
|
82
|
-
- Fixed the phone field component so that focus is not automatically applied to the phone field input when it is added back to a page after previously being hidden. [#32](https://github.com/blackbaud/skyux-phone-field/pull/32)
|
|
83
|
-
|
|
84
|
-
# 3.1.1 (2019-10-07)
|
|
85
|
-
|
|
86
|
-
- Fixed the phone field component to prevent `ngSubmit` events when users select the country selector button. [#26](https://github.com/blackbaud/skyux-phone-field/pull/26)
|
|
87
|
-
|
|
88
|
-
# 3.1.0 (2019-07-24)
|
|
89
|
-
|
|
90
|
-
- Added the ability for the phone field component to automatically switch countries based on a given dial code. [#16](https://github.com/blackbaud/skyux-phone-field/pull/16)
|
|
91
|
-
|
|
92
|
-
# 3.0.2 (2019-07-09)
|
|
93
|
-
|
|
94
|
-
- Fixed the phone field component to properly localize text. [#19](https://github.com/blackbaud/skyux-phone-field/pull/19)
|
|
95
|
-
|
|
96
|
-
# 3.0.1 (2019-06-12)
|
|
97
|
-
|
|
98
|
-
- Fixed the phone field component to import animations from the correct location. [#14](https://github.com/blackbaud/skyux-phone-field/pull/14)
|
|
99
|
-
|
|
100
|
-
# 3.0.0 (2019-06-12)
|
|
101
|
-
|
|
102
|
-
- Major version release.
|
|
103
|
-
|
|
104
|
-
# 3.0.0-rc.1 (2019-05-15)
|
|
105
|
-
|
|
106
|
-
- Fixed dependencies to correctly bundle when distributed to consuming applications. [#7](https://github.com/blackbaud/skyux-phone-field/pull/7)
|
|
107
|
-
|
|
108
|
-
# 3.0.0-rc.0 (2019-04-19)
|
|
109
|
-
|
|
110
|
-
- Initial release candidate.
|