@skyux/phone-field 5.7.2 → 6.0.0-beta.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.
Files changed (53) hide show
  1. package/esm2020/index.mjs +8 -0
  2. package/esm2020/lib/modules/phone-field/phone-field-adapter.service.mjs +64 -0
  3. package/esm2020/lib/modules/phone-field/phone-field-input.directive.mjs +280 -0
  4. package/esm2020/lib/modules/phone-field/phone-field.component.mjs +332 -0
  5. package/esm2020/lib/modules/phone-field/phone-field.module.mjs +50 -0
  6. package/esm2020/lib/modules/phone-field/types/country.mjs +2 -0
  7. package/esm2020/lib/modules/phone-field/types/number-return-format.mjs +2 -0
  8. package/esm2020/lib/modules/shared/sky-phone-field-resources.module.mjs +60 -0
  9. package/esm2020/skyux-phone-field.mjs +5 -0
  10. package/esm2020/testing/phonefield/phone-field-fixture.mjs +160 -0
  11. package/esm2020/testing/phonefield/phone-field-testing.module.mjs +27 -0
  12. package/esm2020/testing/public-api.mjs +3 -0
  13. package/esm2020/testing/skyux-phone-field-testing.mjs +5 -0
  14. package/fesm2015/{skyux-phone-field-testing.js → skyux-phone-field-testing.mjs} +5 -5
  15. package/fesm2015/skyux-phone-field-testing.mjs.map +1 -0
  16. package/fesm2015/skyux-phone-field.mjs +771 -0
  17. package/fesm2015/skyux-phone-field.mjs.map +1 -0
  18. package/fesm2020/skyux-phone-field-testing.mjs +194 -0
  19. package/fesm2020/skyux-phone-field-testing.mjs.map +1 -0
  20. package/{fesm2015/skyux-phone-field.js → fesm2020/skyux-phone-field.mjs} +22 -30
  21. package/fesm2020/skyux-phone-field.mjs.map +1 -0
  22. package/package.json +42 -18
  23. package/testing/package.json +5 -5
  24. package/bundles/skyux-phone-field-testing.umd.js +0 -658
  25. package/bundles/skyux-phone-field.umd.js +0 -1162
  26. package/esm2015/index.js +0 -8
  27. package/esm2015/index.js.map +0 -1
  28. package/esm2015/lib/modules/phone-field/phone-field-adapter.service.js +0 -64
  29. package/esm2015/lib/modules/phone-field/phone-field-adapter.service.js.map +0 -1
  30. package/esm2015/lib/modules/phone-field/phone-field-input.directive.js +0 -280
  31. package/esm2015/lib/modules/phone-field/phone-field-input.directive.js.map +0 -1
  32. package/esm2015/lib/modules/phone-field/phone-field.component.js +0 -340
  33. package/esm2015/lib/modules/phone-field/phone-field.component.js.map +0 -1
  34. package/esm2015/lib/modules/phone-field/phone-field.module.js +0 -50
  35. package/esm2015/lib/modules/phone-field/phone-field.module.js.map +0 -1
  36. package/esm2015/lib/modules/phone-field/types/country.js +0 -2
  37. package/esm2015/lib/modules/phone-field/types/country.js.map +0 -1
  38. package/esm2015/lib/modules/phone-field/types/number-return-format.js +0 -2
  39. package/esm2015/lib/modules/phone-field/types/number-return-format.js.map +0 -1
  40. package/esm2015/lib/modules/shared/sky-phone-field-resources.module.js +0 -60
  41. package/esm2015/lib/modules/shared/sky-phone-field-resources.module.js.map +0 -1
  42. package/esm2015/skyux-phone-field.js +0 -5
  43. package/esm2015/skyux-phone-field.js.map +0 -1
  44. package/esm2015/testing/phonefield/phone-field-fixture.js +0 -185
  45. package/esm2015/testing/phonefield/phone-field-fixture.js.map +0 -1
  46. package/esm2015/testing/phonefield/phone-field-testing.module.js +0 -27
  47. package/esm2015/testing/phonefield/phone-field-testing.module.js.map +0 -1
  48. package/esm2015/testing/public-api.js +0 -3
  49. package/esm2015/testing/public-api.js.map +0 -1
  50. package/esm2015/testing/skyux-phone-field-testing.js +0 -5
  51. package/esm2015/testing/skyux-phone-field-testing.js.map +0 -1
  52. package/fesm2015/skyux-phone-field-testing.js.map +0 -1
  53. package/fesm2015/skyux-phone-field.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"phone-field.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/phone-field/src/lib/modules/phone-field/phone-field.component.ts","../../../../../../../../libs/components/phone-field/src/lib/modules/phone-field/phone-field.component.html"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,EACP,KAAK,EACL,U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ACH,CAAC;qBACH;iBACF;;0BAkII,QAAQ;;0BACR,QAAQ;;0BAAI,QAAQ;4CA5HhB,eAAe;sBADrB,KAAK;gBAWK,cAAc;sBADxB,KAAK;gBAqBC,YAAY;sBADlB,KAAK;gBAQC,oBAAoB;sBAD1B,KAAK;gBASC,qBAAqB;sBAD3B,MAAM;gBAiBI,eAAe;sBADzB,KAAK;gBAiCE,gBAAgB;sBAJvB,SAAS;uBAAC,kBAAkB,EAAE;wBAC7B,IAAI,EAAE,WAAW;wBACjB,MAAM,EAAE,IAAI;qBACb;gBAOO,qBAAqB;sBAJ5B,SAAS;uBAAC,uBAAuB,EAAE;wBAClC,IAAI,EAAE,WAAW;wBACjB,MAAM,EAAE,IAAI;qBACb;gBAOO,uBAAuB;sBAJ9B,SAAS;uBAAC,yBAAyB,EAAE;wBACpC,IAAI,EAAE,WAAW;wBACjB,MAAM,EAAE,IAAI;qBACb","sourcesContent":["import {\n AnimationEvent,\n animate,\n style,\n transition,\n trigger,\n} from '@angular/animations';\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';\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\nimport { SkyInputBoxHostService } from '@skyux/forms';\nimport { SkyCountryFieldCountry } from '@skyux/lookup';\nimport { SkyThemeService } from '@skyux/theme';\n\nimport {\n PhoneNumberFormat,\n PhoneNumberType,\n PhoneNumberUtil,\n} from 'google-libphonenumber';\nimport 'intl-tel-input';\n\nimport { SkyPhoneFieldAdapterService } from './phone-field-adapter.service';\nimport { SkyPhoneFieldCountry } from './types/country';\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 = 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 * Options include: `\"default\"`, `\"international\"`, and `\"national\"`.\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 (const 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 initialization 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 const 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"]}
@@ -1,50 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { NgModule } from '@angular/core';
3
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4
- import { SkyI18nModule } from '@skyux/i18n';
5
- import { SkyIconModule } from '@skyux/indicators';
6
- import { SkyCountryFieldModule } from '@skyux/lookup';
7
- import { SkyThemeModule } from '@skyux/theme';
8
- import { SkyPhoneFieldResourcesModule } from '../shared/sky-phone-field-resources.module';
9
- import { SkyPhoneFieldInputDirective } from './phone-field-input.directive';
10
- import { SkyPhoneFieldComponent } from './phone-field.component';
11
- import * as i0 from "@angular/core";
12
- export class SkyPhoneFieldModule {
13
- }
14
- SkyPhoneFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15
- SkyPhoneFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldModule, declarations: [SkyPhoneFieldComponent, SkyPhoneFieldInputDirective], imports: [CommonModule,
16
- FormsModule,
17
- ReactiveFormsModule,
18
- SkyCountryFieldModule,
19
- SkyI18nModule,
20
- SkyIconModule,
21
- SkyPhoneFieldResourcesModule,
22
- SkyThemeModule], exports: [SkyPhoneFieldComponent, SkyPhoneFieldInputDirective] });
23
- SkyPhoneFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldModule, imports: [[
24
- CommonModule,
25
- FormsModule,
26
- ReactiveFormsModule,
27
- SkyCountryFieldModule,
28
- SkyI18nModule,
29
- SkyIconModule,
30
- SkyPhoneFieldResourcesModule,
31
- SkyThemeModule,
32
- ]] });
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldModule, decorators: [{
34
- type: NgModule,
35
- args: [{
36
- declarations: [SkyPhoneFieldComponent, SkyPhoneFieldInputDirective],
37
- imports: [
38
- CommonModule,
39
- FormsModule,
40
- ReactiveFormsModule,
41
- SkyCountryFieldModule,
42
- SkyI18nModule,
43
- SkyIconModule,
44
- SkyPhoneFieldResourcesModule,
45
- SkyThemeModule,
46
- ],
47
- exports: [SkyPhoneFieldComponent, SkyPhoneFieldInputDirective],
48
- }]
49
- }] });
50
- //# sourceMappingURL=phone-field.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"phone-field.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/phone-field/src/lib/modules/phone-field/phone-field.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@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SkyI18nModule } from '@skyux/i18n';\nimport { SkyIconModule } from '@skyux/indicators';\nimport { SkyCountryFieldModule } from '@skyux/lookup';\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkyPhoneFieldResourcesModule } from '../shared/sky-phone-field-resources.module';\n\nimport { SkyPhoneFieldInputDirective } from './phone-field-input.directive';\nimport { SkyPhoneFieldComponent } from './phone-field.component';\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"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=country.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"country.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/phone-field/src/lib/modules/phone-field/types/country.ts"],"names":[],"mappings":"","sourcesContent":["export interface SkyPhoneFieldCountry {\n /**\n * Specifies the country's\n * [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)\n * country code.\n * @required\n */\n iso2: string;\n /**\n * Specifies the country's international dial code.\n */\n dialCode?: string;\n /**\n * Specifies a placeholder value to demonstrate the country's number format. This\n * value is `undefined` until a country is selected to validate against.\n */\n exampleNumber?: string;\n /**\n * Specifies the name of the country.\n */\n name?: string;\n // NOTE: We intentionally don't document these properties as they are internal use properties\n /**\n * @internal\n */\n priority?: number;\n /**\n * @internal\n */\n areaCodes?: string[];\n}\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=number-return-format.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"number-return-format.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/phone-field/src/lib/modules/phone-field/types/number-return-format.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents the format for validated phone numbers. `default` returns the national format for the\n * default country, `national` returns the national format for all countries, and `international`\n * returns the international format for all countries.\n */\nexport type SkyPhoneFieldNumberReturnFormat =\n | 'default'\n | 'international'\n | 'national';\n"]}
@@ -1,60 +0,0 @@
1
- /**
2
- * NOTICE: DO NOT MODIFY THIS FILE!
3
- * The contents of this file were automatically generated by
4
- * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-phone-field' schematic.
5
- * To update this file, simply rerun the command.
6
- */
7
- import { NgModule } from '@angular/core';
8
- import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } from '@skyux/i18n';
9
- import * as i0 from "@angular/core";
10
- const RESOURCES = {
11
- 'EN-US': {
12
- skyux_phone_field_default_label: { message: 'Phone number' },
13
- skyux_phone_field_country_search_dismiss: {
14
- message: 'Dismiss country search',
15
- },
16
- skyux_phone_field_country_search_label: {
17
- message: 'Dismiss country search',
18
- },
19
- skyux_phone_field_country_search_placeholder: {
20
- message: 'Search for a country',
21
- },
22
- skyux_phone_field_country_select_label: { message: 'Choose country.' },
23
- skyux_phone_field_country_selected_label: {
24
- message: '{0} is currently selected.',
25
- },
26
- },
27
- };
28
- export class SkyPhoneFieldResourcesProvider {
29
- getString(localeInfo, name) {
30
- return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
31
- }
32
- }
33
- /**
34
- * Import into any component library module that needs to use resource strings.
35
- */
36
- export class SkyPhoneFieldResourcesModule {
37
- }
38
- SkyPhoneFieldResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
39
- SkyPhoneFieldResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldResourcesModule, exports: [SkyI18nModule] });
40
- SkyPhoneFieldResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldResourcesModule, providers: [
41
- {
42
- provide: SKY_LIB_RESOURCES_PROVIDERS,
43
- useClass: SkyPhoneFieldResourcesProvider,
44
- multi: true,
45
- },
46
- ], imports: [SkyI18nModule] });
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldResourcesModule, decorators: [{
48
- type: NgModule,
49
- args: [{
50
- exports: [SkyI18nModule],
51
- providers: [
52
- {
53
- provide: SKY_LIB_RESOURCES_PROVIDERS,
54
- useClass: SkyPhoneFieldResourcesProvider,
55
- multi: true,
56
- },
57
- ],
58
- }]
59
- }] });
60
- //# sourceMappingURL=sky-phone-field-resources.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sky-phone-field-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/phone-field/src/lib/modules/shared/sky-phone-field-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,2BAA2B,EAE3B,aAAa,EAGb,qBAAqB,GACtB,MAAM,aAAa,CAAC;;AAErB,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;AAEF,MAAM,OAAO,8BAA8B;IAClC,SAAS,CACd,UAA4B,EAC5B,IAAY;QAEZ,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;CACF;AAED;;GAEG;AAWH,MAAM,OAAO,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","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 lib/modules/shared/sky-phone-field' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\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(\n localeInfo: SkyAppLocaleInfo,\n name: string\n ): string | undefined {\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"]}
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './index';
5
- //# sourceMappingURL=skyux-phone-field.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skyux-phone-field.js","sourceRoot":"","sources":["../../../../../libs/components/phone-field/src/skyux-phone-field.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
@@ -1,185 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { By } from '@angular/platform-browser';
3
- import { SkyAppTestUtility } from '@skyux-sdk/testing';
4
- import { SkyCountryFieldFixture } from '@skyux/lookup/testing';
5
- /**
6
- * Provides information for and interaction with a SKY UX phone field component.
7
- * By using the fixture API, a test insulates itself against updates to the internals
8
- * of a component, such as changing its DOM structure.
9
- */
10
- export class SkyPhoneFieldFixture {
11
- constructor(fixture, skyTestId) {
12
- this.fixture = fixture;
13
- this.skyTestId = skyTestId;
14
- this._debugEl = SkyAppTestUtility.getDebugElementByTestId(fixture, skyTestId, 'sky-phone-field');
15
- // The country selector needs extra time to initialize.
16
- // Consumers shouldn't need to work around this so we do an extra detect here
17
- fixture.detectChanges();
18
- }
19
- /**
20
- * The value of the input field for the phone field.
21
- */
22
- get inputText() {
23
- return this.phoneFieldInput.value;
24
- }
25
- /**
26
- * Blurs the phone field input and returns a promise that indicates when the action is complete.
27
- */
28
- blur() {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- SkyAppTestUtility.fireDomEvent(this.phoneFieldInput, 'blur');
31
- this.fixture.detectChanges();
32
- return this.fixture.whenStable();
33
- });
34
- }
35
- /**
36
- * Returns the selected country iso2 code.
37
- */
38
- getSelectedCountryIso2() {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- // Wait for the country field to initialize.
41
- yield this.fixture.whenStable();
42
- return this.countryFlagButtonContainer.getAttribute('data-sky-test-iso2');
43
- });
44
- }
45
- /**
46
- * Returns the selected country name.
47
- */
48
- getSelectedCountryName() {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- // Wait for the country field to initialize.
51
- yield this.fixture.whenStable();
52
- return this.countryFlagButtonContainer.getAttribute('data-sky-test-name');
53
- });
54
- }
55
- /**
56
- * Sets the value of the input field for the phone field.
57
- */
58
- setInputText(inputText) {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- const inputEl = this.phoneFieldInput;
61
- inputEl.value = inputText;
62
- SkyAppTestUtility.fireDomEvent(inputEl, 'input');
63
- this.fixture.detectChanges();
64
- SkyAppTestUtility.fireDomEvent(inputEl, 'change');
65
- this.fixture.detectChanges();
66
- return this.fixture.whenStable();
67
- });
68
- }
69
- /**
70
- * Opens the country selector, peforms a search, but makes no selection.
71
- * @param searchText The name of the country to select.
72
- * @returns The list of country names matching the search text.
73
- */
74
- searchCountry(searchText) {
75
- return __awaiter(this, void 0, void 0, function* () {
76
- yield this.openCountrySelection();
77
- const countryFixture = yield this.getCountryFixture();
78
- const results = yield countryFixture.search(searchText);
79
- yield this.waitForCountrySelection();
80
- return results;
81
- });
82
- }
83
- /**
84
- * Opens the country selector, performs a search, and selects the first result (if any).
85
- * @param searchText The name of the country to select.
86
- */
87
- selectCountry(searchText) {
88
- return __awaiter(this, void 0, void 0, function* () {
89
- yield this.openCountrySelection();
90
- const countryFixture = yield this.getCountryFixture();
91
- yield countryFixture.searchAndSelectFirstResult(searchText);
92
- return this.waitForCountrySelection();
93
- });
94
- }
95
- /**
96
- * Gets a boolean promise indicating if the phone field is disabled.
97
- */
98
- isDisabled() {
99
- return __awaiter(this, void 0, void 0, function* () {
100
- const disabled = this.phoneFieldInput.getAttribute('disabled');
101
- return this.coerceBooleanProperty(yield disabled);
102
- });
103
- }
104
- /**
105
- * Gets a boolean promise indicating if the phone field is valid.
106
- */
107
- isValid() {
108
- return __awaiter(this, void 0, void 0, function* () {
109
- if (!(yield this.hasFormControl())) {
110
- throw new Error(`Form control not found.`);
111
- }
112
- return this.phoneFieldInput.classList.contains('ng-valid');
113
- });
114
- }
115
- get countryElement() {
116
- return this._debugEl.query(By.css('sky-country-field')).nativeElement;
117
- }
118
- get countryFlagButtonContainer() {
119
- return this._debugEl.query(By.css('.sky-phone-field-country-btn'))
120
- .nativeElement;
121
- }
122
- get countryFlagButton() {
123
- return this._debugEl.query(By.css('.sky-phone-field-country-btn .sky-btn'))
124
- .nativeElement;
125
- }
126
- get phoneFieldInput() {
127
- return this._debugEl.query(By.css('input[skyPhoneFieldInput]'))
128
- .nativeElement;
129
- }
130
- /**
131
- * The country-field can take a really long time to initialize. Since we can't perform an await
132
- * in our constructor, it's safest to do a lazy load of the country field to avoid any race
133
- * conditions where a test tries to access the sky-country-field element too quickly.
134
- */
135
- getCountryFixture() {
136
- return __awaiter(this, void 0, void 0, function* () {
137
- if (this._countryFixture === undefined) {
138
- // tag the country field with a sky test id
139
- const countrySkyTestId = `${this.skyTestId}-country`;
140
- this.setSkyTestId(this.countryElement, countrySkyTestId);
141
- // initialize the country fixture
142
- this._countryFixture = new SkyCountryFieldFixture(this.fixture, countrySkyTestId);
143
- this.fixture.detectChanges();
144
- yield this.fixture.whenStable();
145
- }
146
- return this._countryFixture;
147
- });
148
- }
149
- openCountrySelection() {
150
- return __awaiter(this, void 0, void 0, function* () {
151
- this.countryFlagButton.click();
152
- return this.waitForCountrySelection();
153
- });
154
- }
155
- setSkyTestId(element, skyTestId) {
156
- element.setAttribute('data-sky-id', skyTestId);
157
- }
158
- waitForCountrySelection() {
159
- return __awaiter(this, void 0, void 0, function* () {
160
- // any country selection needs extra time to complete
161
- this.fixture.detectChanges();
162
- yield this.fixture.whenStable();
163
- this.fixture.detectChanges();
164
- return this.fixture.whenStable();
165
- });
166
- }
167
- /**
168
- * Checks whether the form-field control has set up a form control.
169
- */
170
- hasFormControl() {
171
- return __awaiter(this, void 0, void 0, function* () {
172
- // If no form "NgControl" is bound to the form-field control, the form-field
173
- // is not able to forward any control status classes. Therefore if either the
174
- // "ng-touched" or "ng-untouched" class is set, we know that it has a form control.
175
- const isTouched = this.phoneFieldInput.classList.contains('ng-touched');
176
- const isUntouched = this.phoneFieldInput.classList.contains('ng-untouched');
177
- return isTouched || isUntouched;
178
- });
179
- }
180
- coerceBooleanProperty(value) {
181
- // tslint:disable-next-line: no-null-keyword
182
- return value != null && `${value}` !== 'false';
183
- }
184
- }
185
- //# sourceMappingURL=phone-field-fixture.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"phone-field-fixture.js","sourceRoot":"","sources":["../../../../../../../libs/components/phone-field/testing/src/phonefield/phone-field-fixture.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAe/B,YACU,OAA8B,EAC9B,SAAiB;QADjB,YAAO,GAAP,OAAO,CAAuB;QAC9B,cAAS,GAAT,SAAS,CAAQ;QAEzB,IAAI,CAAC,QAAQ,GAAG,iBAAiB,CAAC,uBAAuB,CACvD,OAAO,EACP,SAAS,EACT,iBAAiB,CAClB,CAAC;QAEF,uDAAuD;QACvD,6EAA6E;QAC7E,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC;IA3BD;;OAEG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;IACpC,CAAC;IAwBD;;OAEG;IACU,IAAI;;YACf,iBAAiB,CAAC,Y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,QAAQ,CAAC,YAAY,CAAC,CAAC;YACxE,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;YAC5E,OAAO,SAAS,IAAI,WAAW,CAAC;QAClC,CAAC;KAAA;IAEO,qBAAqB,CAAC,KAAU;QACtC,4CAA4C;QAC5C,OAAO,KAAK,IAAI,IAAI,IAAI,GAAG,KAAK,EAAE,KAAK,OAAO,CAAC;IACjD,CAAC;CACF","sourcesContent":["import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\nimport { SkyCountryFieldFixture } from '@skyux/lookup/testing';\n\n/**\n * Provides information for and interaction with a SKY UX phone field component.\n * By using the fixture API, a test insulates itself against updates to the internals\n * of a component, such as changing its DOM structure.\n */\nexport class SkyPhoneFieldFixture {\n /**\n * The value of the input field for the phone field.\n */\n public get inputText(): string {\n return this.phoneFieldInput.value;\n }\n\n /**\n * This property is lazy loaded and should be accessed via the private countryFixture property.\n */\n private _countryFixture: SkyCountryFieldFixture;\n\n private _debugEl: DebugElement;\n\n constructor(\n private fixture: ComponentFixture<any>,\n private skyTestId: string\n ) {\n this._debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-phone-field'\n );\n\n // The country selector needs extra time to initialize.\n // Consumers shouldn't need to work around this so we do an extra detect here\n fixture.detectChanges();\n }\n\n /**\n * Blurs the phone field input and returns a promise that indicates when the action is complete.\n */\n public async blur(): Promise<void> {\n SkyAppTestUtility.fireDomEvent(this.phoneFieldInput, 'blur');\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Returns the selected country iso2 code.\n */\n public async getSelectedCountryIso2(): Promise<string> {\n // Wait for the country field to initialize.\n await this.fixture.whenStable();\n return this.countryFlagButtonContainer.getAttribute('data-sky-test-iso2');\n }\n\n /**\n * Returns the selected country name.\n */\n public async getSelectedCountryName(): Promise<string> {\n // Wait for the country field to initialize.\n await this.fixture.whenStable();\n return this.countryFlagButtonContainer.getAttribute('data-sky-test-name');\n }\n\n /**\n * Sets the value of the input field for the phone field.\n */\n public async setInputText(inputText: string): Promise<void> {\n const inputEl = this.phoneFieldInput;\n inputEl.value = inputText;\n\n SkyAppTestUtility.fireDomEvent(inputEl, 'input');\n this.fixture.detectChanges();\n\n SkyAppTestUtility.fireDomEvent(inputEl, 'change');\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Opens the country selector, peforms a search, but makes no selection.\n * @param searchText The name of the country to select.\n * @returns The list of country names matching the search text.\n */\n public async searchCountry(searchText: string): Promise<string[]> {\n await this.openCountrySelection();\n\n const countryFixture = await this.getCountryFixture();\n const results = await countryFixture.search(searchText);\n\n await this.waitForCountrySelection();\n return results;\n }\n\n /**\n * Opens the country selector, performs a search, and selects the first result (if any).\n * @param searchText The name of the country to select.\n */\n public async selectCountry(searchText: string): Promise<void> {\n await this.openCountrySelection();\n\n const countryFixture = await this.getCountryFixture();\n await countryFixture.searchAndSelectFirstResult(searchText);\n\n return this.waitForCountrySelection();\n }\n\n /**\n * Gets a boolean promise indicating if the phone field is disabled.\n */\n public async isDisabled(): Promise<boolean> {\n const disabled = this.phoneFieldInput.getAttribute('disabled');\n return this.coerceBooleanProperty(await disabled);\n }\n\n /**\n * Gets a boolean promise indicating if the phone field is valid.\n */\n public async isValid(): Promise<boolean> {\n if (!(await this.hasFormControl())) {\n throw new Error(`Form control not found.`);\n }\n return this.phoneFieldInput.classList.contains('ng-valid');\n }\n\n private get countryElement(): HTMLInputElement {\n return this._debugEl.query(By.css('sky-country-field')).nativeElement;\n }\n\n private get countryFlagButtonContainer(): HTMLInputElement {\n return this._debugEl.query(By.css('.sky-phone-field-country-btn'))\n .nativeElement;\n }\n\n private get countryFlagButton(): HTMLInputElement {\n return this._debugEl.query(By.css('.sky-phone-field-country-btn .sky-btn'))\n .nativeElement;\n }\n\n private get phoneFieldInput(): HTMLInputElement {\n return this._debugEl.query(By.css('input[skyPhoneFieldInput]'))\n .nativeElement;\n }\n\n /**\n * The country-field can take a really long time to initialize. Since we can't perform an await\n * in our constructor, it's safest to do a lazy load of the country field to avoid any race\n * conditions where a test tries to access the sky-country-field element too quickly.\n */\n private async getCountryFixture(): Promise<SkyCountryFieldFixture> {\n if (this._countryFixture === undefined) {\n // tag the country field with a sky test id\n const countrySkyTestId = `${this.skyTestId}-country`;\n this.setSkyTestId(this.countryElement, countrySkyTestId);\n\n // initialize the country fixture\n this._countryFixture = new SkyCountryFieldFixture(\n this.fixture,\n countrySkyTestId\n );\n\n this.fixture.detectChanges();\n await this.fixture.whenStable();\n }\n\n return this._countryFixture;\n }\n\n private async openCountrySelection(): Promise<void> {\n this.countryFlagButton.click();\n return this.waitForCountrySelection();\n }\n\n private setSkyTestId(element: HTMLElement, skyTestId: string): void {\n element.setAttribute('data-sky-id', skyTestId);\n }\n\n private async waitForCountrySelection(): Promise<void> {\n // any country selection needs extra time to complete\n this.fixture.detectChanges();\n await this.fixture.whenStable();\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Checks whether the form-field control has set up a form control.\n */\n private async hasFormControl(): Promise<boolean> {\n // If no form \"NgControl\" is bound to the form-field control, the form-field\n // is not able to forward any control status classes. Therefore if either the\n // \"ng-touched\" or \"ng-untouched\" class is set, we know that it has a form control.\n const isTouched = this.phoneFieldInput.classList.contains('ng-touched');\n const isUntouched = this.phoneFieldInput.classList.contains('ng-untouched');\n return isTouched || isUntouched;\n }\n\n private coerceBooleanProperty(value: any): boolean {\n // tslint:disable-next-line: no-null-keyword\n return value != null && `${value}` !== 'false';\n }\n}\n"]}
@@ -1,27 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { NoopAnimationsModule } from '@angular/platform-browser/animations';
3
- import { SkyPhoneFieldModule } from '@skyux/phone-field';
4
- import * as i0 from "@angular/core";
5
- export class SkyPhoneFieldTestingModule {
6
- }
7
- SkyPhoneFieldTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8
- SkyPhoneFieldTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldTestingModule, exports: [SkyPhoneFieldModule,
9
- // The noop animations module needs to be loaded last to avoid
10
- // subsequent modules adding animations and overriding this.
11
- NoopAnimationsModule] });
12
- SkyPhoneFieldTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldTestingModule, imports: [SkyPhoneFieldModule,
13
- // The noop animations module needs to be loaded last to avoid
14
- // subsequent modules adding animations and overriding this.
15
- NoopAnimationsModule] });
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPhoneFieldTestingModule, decorators: [{
17
- type: NgModule,
18
- args: [{
19
- exports: [
20
- SkyPhoneFieldModule,
21
- // The noop animations module needs to be loaded last to avoid
22
- // subsequent modules adding animations and overriding this.
23
- NoopAnimationsModule,
24
- ],
25
- }]
26
- }] });
27
- //# sourceMappingURL=phone-field-testing.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"phone-field-testing.module.js","sourceRoot":"","sources":["../../../../../../../libs/components/phone-field/testing/src/phonefield/phone-field-testing.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;;AAWzD,MAAM,OAAO,0BAA0B;;wHAA1B,0BAA0B;yHAA1B,0BAA0B,YAPnC,mBAAmB;QAEnB,8DAA8D;QAC9D,4DAA4D;QAC5D,oBAAoB;yHAGX,0BAA0B,YAPnC,mBAAmB;QAEnB,8DAA8D;QAC9D,4DAA4D;QAC5D,oBAAoB;4FAGX,0BAA0B;kBATtC,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,mBAAmB;wBAEnB,8DAA8D;wBAC9D,4DAA4D;wBAC5D,oBAAoB;qBACrB;iBACF","sourcesContent":["import { NgModule } from '@angular/core';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { SkyPhoneFieldModule } from '@skyux/phone-field';\n\n@NgModule({\n exports: [\n SkyPhoneFieldModule,\n\n // The noop animations module needs to be loaded last to avoid\n // subsequent modules adding animations and overriding this.\n NoopAnimationsModule,\n ],\n})\nexport class SkyPhoneFieldTestingModule {}\n"]}
@@ -1,3 +0,0 @@
1
- export * from './phonefield/phone-field-testing.module';
2
- export * from './phonefield/phone-field-fixture';
3
- //# sourceMappingURL=public-api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../../../../../../libs/components/phone-field/testing/src/public-api.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC;AACxD,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './phonefield/phone-field-testing.module';\nexport * from './phonefield/phone-field-fixture';\n"]}
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
5
- //# sourceMappingURL=skyux-phone-field-testing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skyux-phone-field-testing.js","sourceRoot":"","sources":["../../../../../../libs/components/phone-field/testing/src/skyux-phone-field-testing.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"skyux-phone-field-testing.js","sources":["../../../../../libs/components/phone-field/testing/src/phonefield/phone-field-testing.module.ts","../../../../../libs/components/phone-field/testing/src/phonefield/phone-field-fixture.ts","../../../../../libs/components/phone-field/testing/src/skyux-phone-field-testing.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { SkyPhoneFieldModule } from '@skyux/phone-field';\n\n@NgModule({\n exports: [\n SkyPhoneFieldModule,\n\n // The noop animations module needs to be loaded last to avoid\n // subsequent modules adding animations and overriding this.\n NoopAnimationsModule,\n ],\n})\nexport class SkyPhoneFieldTestingModule {}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\nimport { SkyCountryFieldFixture } from '@skyux/lookup/testing';\n\n/**\n * Provides information for and interaction with a SKY UX phone field component.\n * By using the fixture API, a test insulates itself against updates to the internals\n * of a component, such as changing its DOM structure.\n */\nexport class SkyPhoneFieldFixture {\n /**\n * The value of the input field for the phone field.\n */\n public get inputText(): string {\n return this.phoneFieldInput.value;\n }\n\n /**\n * This property is lazy loaded and should be accessed via the private countryFixture property.\n */\n private _countryFixture: SkyCountryFieldFixture;\n\n private _debugEl: DebugElement;\n\n constructor(\n private fixture: ComponentFixture<any>,\n private skyTestId: string\n ) {\n this._debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-phone-field'\n );\n\n // The country selector needs extra time to initialize.\n // Consumers shouldn't need to work around this so we do an extra detect here\n fixture.detectChanges();\n }\n\n /**\n * Blurs the phone field input and returns a promise that indicates when the action is complete.\n */\n public async blur(): Promise<void> {\n SkyAppTestUtility.fireDomEvent(this.phoneFieldInput, 'blur');\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Returns the selected country iso2 code.\n */\n public async getSelectedCountryIso2(): Promise<string> {\n // Wait for the country field to initialize.\n await this.fixture.whenStable();\n return this.countryFlagButtonContainer.getAttribute('data-sky-test-iso2');\n }\n\n /**\n * Returns the selected country name.\n */\n public async getSelectedCountryName(): Promise<string> {\n // Wait for the country field to initialize.\n await this.fixture.whenStable();\n return this.countryFlagButtonContainer.getAttribute('data-sky-test-name');\n }\n\n /**\n * Sets the value of the input field for the phone field.\n */\n public async setInputText(inputText: string): Promise<void> {\n const inputEl = this.phoneFieldInput;\n inputEl.value = inputText;\n\n SkyAppTestUtility.fireDomEvent(inputEl, 'input');\n this.fixture.detectChanges();\n\n SkyAppTestUtility.fireDomEvent(inputEl, 'change');\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Opens the country selector, peforms a search, but makes no selection.\n * @param searchText The name of the country to select.\n * @returns The list of country names matching the search text.\n */\n public async searchCountry(searchText: string): Promise<string[]> {\n await this.openCountrySelection();\n\n const countryFixture = await this.getCountryFixture();\n const results = await countryFixture.search(searchText);\n\n await this.waitForCountrySelection();\n return results;\n }\n\n /**\n * Opens the country selector, performs a search, and selects the first result (if any).\n * @param searchText The name of the country to select.\n */\n public async selectCountry(searchText: string): Promise<void> {\n await this.openCountrySelection();\n\n const countryFixture = await this.getCountryFixture();\n await countryFixture.searchAndSelectFirstResult(searchText);\n\n return this.waitForCountrySelection();\n }\n\n /**\n * Gets a boolean promise indicating if the phone field is disabled.\n */\n public async isDisabled(): Promise<boolean> {\n const disabled = this.phoneFieldInput.getAttribute('disabled');\n return this.coerceBooleanProperty(await disabled);\n }\n\n /**\n * Gets a boolean promise indicating if the phone field is valid.\n */\n public async isValid(): Promise<boolean> {\n if (!(await this.hasFormControl())) {\n throw new Error(`Form control not found.`);\n }\n return this.phoneFieldInput.classList.contains('ng-valid');\n }\n\n private get countryElement(): HTMLInputElement {\n return this._debugEl.query(By.css('sky-country-field')).nativeElement;\n }\n\n private get countryFlagButtonContainer(): HTMLInputElement {\n return this._debugEl.query(By.css('.sky-phone-field-country-btn'))\n .nativeElement;\n }\n\n private get countryFlagButton(): HTMLInputElement {\n return this._debugEl.query(By.css('.sky-phone-field-country-btn .sky-btn'))\n .nativeElement;\n }\n\n private get phoneFieldInput(): HTMLInputElement {\n return this._debugEl.query(By.css('input[skyPhoneFieldInput]'))\n .nativeElement;\n }\n\n /**\n * The country-field can take a really long time to initialize. Since we can't perform an await\n * in our constructor, it's safest to do a lazy load of the country field to avoid any race\n * conditions where a test tries to access the sky-country-field element too quickly.\n */\n private async getCountryFixture(): Promise<SkyCountryFieldFixture> {\n if (this._countryFixture === undefined) {\n // tag the country field with a sky test id\n const countrySkyTestId = `${this.skyTestId}-country`;\n this.setSkyTestId(this.countryElement, countrySkyTestId);\n\n // initialize the country fixture\n this._countryFixture = new SkyCountryFieldFixture(\n this.fixture,\n countrySkyTestId\n );\n\n this.fixture.detectChanges();\n await this.fixture.whenStable();\n }\n\n return this._countryFixture;\n }\n\n private async openCountrySelection(): Promise<void> {\n this.countryFlagButton.click();\n return this.waitForCountrySelection();\n }\n\n private setSkyTestId(element: HTMLElement, skyTestId: string): void {\n element.setAttribute('data-sky-id', skyTestId);\n }\n\n private async waitForCountrySelection(): Promise<void> {\n // any country selection needs extra time to complete\n this.fixture.detectChanges();\n await this.fixture.whenStable();\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Checks whether the form-field control has set up a form control.\n */\n private async hasFormControl(): Promise<boolean> {\n // If no form \"NgControl\" is bound to the form-field control, the form-field\n // is not able to forward any control status classes. Therefore if either the\n // \"ng-touched\" or \"ng-untouched\" class is set, we know that it has a form control.\n const isTouched = this.phoneFieldInput.classList.contains('ng-touched');\n const isUntouched = this.phoneFieldInput.classList.contains('ng-untouched');\n return isTouched || isUntouched;\n }\n\n private coerceBooleanProperty(value: any): boolean {\n // tslint:disable-next-line: no-null-keyword\n return value != null && `${value}` !== 'false';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAaa,0BAA0B;;wHAA1B,0BAA0B;yHAA1B,0BAA0B,YAPnC,mBAAmB;;;QAInB,oBAAoB;yHAGX,0BAA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