@skyux/phone-field 5.0.2 → 5.5.0
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/README.md +6 -4
- package/bundles/skyux-phone-field-testing.umd.js +4 -4
- package/bundles/skyux-phone-field.umd.js +21 -20
- package/documentation.json +107 -28
- package/esm2015/index.js +8 -0
- package/esm2015/index.js.map +1 -0
- package/esm2015/lib/modules/phone-field/phone-field-adapter.service.js +64 -0
- package/esm2015/lib/modules/phone-field/phone-field-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/phone-field/phone-field-input.directive.js +279 -0
- package/esm2015/lib/modules/phone-field/phone-field-input.directive.js.map +1 -0
- package/esm2015/{modules → lib/modules}/phone-field/phone-field.component.js +11 -9
- package/esm2015/lib/modules/phone-field/phone-field.component.js.map +1 -0
- package/esm2015/lib/modules/phone-field/phone-field.module.js +50 -0
- package/esm2015/lib/modules/phone-field/phone-field.module.js.map +1 -0
- package/esm2015/lib/modules/phone-field/types/country.js +2 -0
- package/esm2015/lib/modules/phone-field/types/country.js.map +1 -0
- package/esm2015/lib/modules/phone-field/types/number-return-format.js +2 -0
- package/esm2015/lib/modules/phone-field/types/number-return-format.js.map +1 -0
- package/esm2015/lib/modules/shared/sky-phone-field-resources.module.js +60 -0
- package/esm2015/lib/modules/shared/sky-phone-field-resources.module.js.map +1 -0
- package/esm2015/skyux-phone-field.js +2 -2
- package/esm2015/skyux-phone-field.js.map +1 -0
- package/esm2015/testing/phonefield/phone-field-fixture.js +1 -1
- package/esm2015/testing/phonefield/phone-field-fixture.js.map +1 -0
- package/esm2015/testing/phonefield/phone-field-testing.module.js +5 -5
- package/esm2015/testing/phonefield/phone-field-testing.module.js.map +1 -0
- package/esm2015/testing/public-api.js +1 -1
- package/esm2015/testing/public-api.js.map +1 -0
- package/esm2015/testing/skyux-phone-field-testing.js +1 -1
- package/esm2015/testing/skyux-phone-field-testing.js.map +1 -0
- package/fesm2015/skyux-phone-field-testing.js +4 -4
- package/fesm2015/skyux-phone-field-testing.js.map +1 -1
- package/fesm2015/skyux-phone-field.js +21 -20
- package/fesm2015/skyux-phone-field.js.map +1 -1
- package/index.d.ts +5 -0
- package/{modules → lib/modules}/phone-field/phone-field-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/phone-field/phone-field-input.directive.d.ts +0 -0
- package/{modules → lib/modules}/phone-field/phone-field.component.d.ts +3 -2
- package/{modules → lib/modules}/phone-field/phone-field.module.d.ts +0 -0
- package/{modules → lib/modules}/phone-field/types/country.d.ts +0 -0
- package/{modules → lib/modules}/phone-field/types/number-return-format.d.ts +0 -0
- package/{modules → lib/modules}/shared/sky-phone-field-resources.module.d.ts +0 -0
- package/package.json +24 -10
- package/skyux-phone-field.d.ts +1 -1
- package/LICENSE +0 -21
- package/esm2015/modules/phone-field/phone-field-adapter.service.js +0 -63
- package/esm2015/modules/phone-field/phone-field-input.directive.js +0 -277
- package/esm2015/modules/phone-field/phone-field.module.js +0 -50
- package/esm2015/modules/phone-field/types/country.js +0 -2
- package/esm2015/modules/phone-field/types/number-return-format.js +0 -2
- package/esm2015/modules/shared/sky-phone-field-resources.module.js +0 -60
- package/esm2015/public-api.js +0 -8
- package/public-api.d.ts +0 -5
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# phone-field
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
4
|
+
|
|
5
|
+
## Running unit tests
|
|
6
|
+
|
|
7
|
+
Run `nx test phone-field` to execute the unit tests.
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
}
|
|
30
30
|
return SkyPhoneFieldTestingModule;
|
|
31
31
|
}());
|
|
32
|
-
SkyPhoneFieldTestingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
33
|
-
SkyPhoneFieldTestingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
32
|
+
SkyPhoneFieldTestingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldTestingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
33
|
+
SkyPhoneFieldTestingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldTestingModule, exports: [phoneField.SkyPhoneFieldModule,
|
|
34
34
|
// The noop animations module needs to be loaded last to avoid
|
|
35
35
|
// subsequent modules adding animations and overriding this.
|
|
36
36
|
animations.NoopAnimationsModule] });
|
|
37
|
-
SkyPhoneFieldTestingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
37
|
+
SkyPhoneFieldTestingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldTestingModule, imports: [phoneField.SkyPhoneFieldModule,
|
|
38
38
|
// The noop animations module needs to be loaded last to avoid
|
|
39
39
|
// subsequent modules adding animations and overriding this.
|
|
40
40
|
animations.NoopAnimationsModule] });
|
|
41
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
41
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldTestingModule, decorators: [{
|
|
42
42
|
type: i0.NgModule,
|
|
43
43
|
args: [{
|
|
44
44
|
exports: [
|
|
@@ -71,16 +71,16 @@
|
|
|
71
71
|
}
|
|
72
72
|
return SkyPhoneFieldResourcesModule;
|
|
73
73
|
}());
|
|
74
|
-
SkyPhoneFieldResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
75
|
-
SkyPhoneFieldResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
76
|
-
SkyPhoneFieldResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
74
|
+
SkyPhoneFieldResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
75
|
+
SkyPhoneFieldResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldResourcesModule, exports: [i1.SkyI18nModule] });
|
|
76
|
+
SkyPhoneFieldResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldResourcesModule, providers: [
|
|
77
77
|
{
|
|
78
78
|
provide: i1.SKY_LIB_RESOURCES_PROVIDERS,
|
|
79
79
|
useClass: SkyPhoneFieldResourcesProvider,
|
|
80
80
|
multi: true,
|
|
81
81
|
},
|
|
82
82
|
], imports: [i1.SkyI18nModule] });
|
|
83
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
83
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldResourcesModule, decorators: [{
|
|
84
84
|
type: i0.NgModule,
|
|
85
85
|
args: [{
|
|
86
86
|
exports: [i1.SkyI18nModule],
|
|
@@ -466,9 +466,9 @@
|
|
|
466
466
|
};
|
|
467
467
|
return SkyPhoneFieldAdapterService;
|
|
468
468
|
}());
|
|
469
|
-
SkyPhoneFieldAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
470
|
-
SkyPhoneFieldAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
471
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
469
|
+
SkyPhoneFieldAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldAdapterService, deps: [{ token: i0__namespace.Renderer2 }, { token: i1__namespace.SkyLibResourcesService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
470
|
+
SkyPhoneFieldAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldAdapterService });
|
|
471
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldAdapterService, decorators: [{
|
|
472
472
|
type: i0.Injectable
|
|
473
473
|
}], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i1__namespace.SkyLibResourcesService }]; } });
|
|
474
474
|
|
|
@@ -490,7 +490,8 @@
|
|
|
490
490
|
this.allowExtensions = true;
|
|
491
491
|
/**
|
|
492
492
|
* Specifies the format for validated phone numbers.
|
|
493
|
-
*
|
|
493
|
+
* Options include: `"default"`, `"international"`, and `"national"`.
|
|
494
|
+
* @default "default"
|
|
494
495
|
*/
|
|
495
496
|
this.returnFormat = 'default';
|
|
496
497
|
/**
|
|
@@ -541,7 +542,7 @@
|
|
|
541
542
|
* [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)
|
|
542
543
|
* country code for the default country. The country selector button displays a flag
|
|
543
544
|
* icon for this default country until users select a different country.
|
|
544
|
-
* @default us
|
|
545
|
+
* @default "us"
|
|
545
546
|
*/
|
|
546
547
|
set: function (value) {
|
|
547
548
|
var _this = this;
|
|
@@ -577,7 +578,7 @@
|
|
|
577
578
|
SkyPhoneFieldComponent.prototype.ngOnInit = function () {
|
|
578
579
|
var _this = this;
|
|
579
580
|
// The timeout here is needed to avoid a change before checked error when a user specifies
|
|
580
|
-
// a selected country on
|
|
581
|
+
// a selected country on initialization of the component.
|
|
581
582
|
setTimeout(function () {
|
|
582
583
|
if (_this.inputBoxHostSvc) {
|
|
583
584
|
_this.inputBoxHostSvc.populate({
|
|
@@ -681,8 +682,8 @@
|
|
|
681
682
|
};
|
|
682
683
|
return SkyPhoneFieldComponent;
|
|
683
684
|
}());
|
|
684
|
-
SkyPhoneFieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
685
|
-
SkyPhoneFieldComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
685
|
+
SkyPhoneFieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldComponent, deps: [{ token: i1__namespace$1.FormBuilder }, { token: SkyPhoneFieldAdapterService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace.SkyThemeService, optional: true }, { token: i4__namespace.SkyInputBoxHostService, optional: true, skipSelf: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
686
|
+
SkyPhoneFieldComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyPhoneFieldComponent, selector: "sky-phone-field", inputs: { allowExtensions: "allowExtensions", defaultCountry: "defaultCountry", returnFormat: "returnFormat", supportedCountryISOs: "supportedCountryISOs", selectedCountry: "selectedCountry" }, outputs: { selectedCountryChange: "selectedCountryChange" }, providers: [
|
|
686
687
|
SkyPhoneFieldAdapterService,
|
|
687
688
|
// Prevents the embedded country field component from changing its behavior based on
|
|
688
689
|
// being inside an input box. The phone field itself will handle the required changes
|
|
@@ -727,7 +728,7 @@
|
|
|
727
728
|
]),
|
|
728
729
|
]),
|
|
729
730
|
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
730
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
731
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldComponent, decorators: [{
|
|
731
732
|
type: i0.Component,
|
|
732
733
|
args: [{
|
|
733
734
|
selector: 'sky-phone-field',
|
|
@@ -1075,9 +1076,9 @@
|
|
|
1075
1076
|
};
|
|
1076
1077
|
return SkyPhoneFieldInputDirective;
|
|
1077
1078
|
}());
|
|
1078
|
-
SkyPhoneFieldInputDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1079
|
-
SkyPhoneFieldInputDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
1080
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1079
|
+
SkyPhoneFieldInputDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldInputDirective, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ElementRef }, { token: SkyPhoneFieldAdapterService, optional: true }, { token: SkyPhoneFieldComponent, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1080
|
+
SkyPhoneFieldInputDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyPhoneFieldInputDirective, selector: "[skyPhoneFieldInput]", inputs: { disabled: "disabled", skyPhoneFieldNoValidate: "skyPhoneFieldNoValidate" }, host: { listeners: { "change": "onInputChange($event)", "blur": "onInputBlur()", "input": "onInputTyping($event)" } }, providers: [SKY_PHONE_FIELD_VALUE_ACCESSOR, SKY_PHONE_FIELD_VALIDATOR], ngImport: i0__namespace });
|
|
1081
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldInputDirective, decorators: [{
|
|
1081
1082
|
type: i0.Directive,
|
|
1082
1083
|
args: [{
|
|
1083
1084
|
selector: '[skyPhoneFieldInput]',
|
|
@@ -1109,8 +1110,8 @@
|
|
|
1109
1110
|
}
|
|
1110
1111
|
return SkyPhoneFieldModule;
|
|
1111
1112
|
}());
|
|
1112
|
-
SkyPhoneFieldModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1113
|
-
SkyPhoneFieldModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1113
|
+
SkyPhoneFieldModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1114
|
+
SkyPhoneFieldModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldModule, declarations: [SkyPhoneFieldComponent, SkyPhoneFieldInputDirective], imports: [i7.CommonModule,
|
|
1114
1115
|
i1$1.FormsModule,
|
|
1115
1116
|
i1$1.ReactiveFormsModule,
|
|
1116
1117
|
i5.SkyCountryFieldModule,
|
|
@@ -1118,7 +1119,7 @@
|
|
|
1118
1119
|
i6.SkyIconModule,
|
|
1119
1120
|
SkyPhoneFieldResourcesModule,
|
|
1120
1121
|
i3.SkyThemeModule], exports: [SkyPhoneFieldComponent, SkyPhoneFieldInputDirective] });
|
|
1121
|
-
SkyPhoneFieldModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1122
|
+
SkyPhoneFieldModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldModule, imports: [[
|
|
1122
1123
|
i7.CommonModule,
|
|
1123
1124
|
i1$1.FormsModule,
|
|
1124
1125
|
i1$1.ReactiveFormsModule,
|
|
@@ -1128,7 +1129,7 @@
|
|
|
1128
1129
|
SkyPhoneFieldResourcesModule,
|
|
1129
1130
|
i3.SkyThemeModule,
|
|
1130
1131
|
]] });
|
|
1131
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1132
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPhoneFieldModule, decorators: [{
|
|
1132
1133
|
type: i0.NgModule,
|
|
1133
1134
|
args: [{
|
|
1134
1135
|
declarations: [SkyPhoneFieldComponent, SkyPhoneFieldInputDirective],
|