@theseam/ui-common 0.2.16 → 0.3.1
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/breadcrumbs/_breadcrumbs-theme.scss +3 -0
- package/breadcrumbs/breadcrumbs/breadcrumbs.component.scss +10 -0
- package/breadcrumbs/styles/_utilities.scss +3 -0
- package/breadcrumbs/styles/_variables.scss +1 -0
- package/breadcrumbs/theseam-ui-common-breadcrumbs.metadata.json +1 -1
- package/bundles/theseam-ui-common-breadcrumbs.umd.js +2 -1
- package/bundles/theseam-ui-common-breadcrumbs.umd.js.map +1 -1
- package/bundles/theseam-ui-common-datatable.umd.js.map +1 -1
- package/bundles/theseam-ui-common-framework.umd.js +18 -15
- package/bundles/theseam-ui-common-framework.umd.js.map +1 -1
- package/bundles/theseam-ui-common-scrollbar.umd.js +1 -1
- package/bundles/theseam-ui-common-scrollbar.umd.js.map +1 -1
- package/bundles/theseam-ui-common-table-cell-types.umd.js +89 -4
- package/bundles/theseam-ui-common-table-cell-types.umd.js.map +1 -1
- package/bundles/theseam-ui-common-tel-input.umd.js +59 -7
- package/bundles/theseam-ui-common-tel-input.umd.js.map +1 -1
- package/bundles/theseam-ui-common-testing.umd.js.map +1 -1
- package/bundles/theseam-ui-common-utils.umd.js.map +1 -1
- package/bundles/theseam-ui-common-viewers.umd.js +269 -4
- package/bundles/theseam-ui-common-viewers.umd.js.map +1 -1
- package/bundles/theseam-ui-common-widget.umd.js +1 -1
- package/esm2015/breadcrumbs/breadcrumbs/breadcrumbs.component.js +4 -3
- package/esm2015/datatable/models/columns-alteration.js +1 -1
- package/esm2015/datatable/models/columns-alterations/hide-column.columns-alteration.js +1 -1
- package/esm2015/datatable/models/columns-alterations/sort.columns-alteration.js +1 -1
- package/esm2015/datatable/models/columns-alterations/width.columns-alteration.js +1 -1
- package/esm2015/datatable/models/internal-column-props.js +1 -1
- package/esm2015/datatable/services/columns-alterations-manager.service.js +1 -1
- package/esm2015/datatable/utils/map-columns-alterations-states.js +1 -1
- package/esm2015/framework/base-layout/base-layout.component.js +3 -3
- package/esm2015/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.js +5 -5
- package/esm2015/framework/top-bar/top-bar-title/top-bar-title.component.js +4 -3
- package/esm2015/framework/top-bar/top-bar.component.js +10 -8
- package/esm2015/graphql/models/gql-datatable-accessor.js +1 -1
- package/esm2015/scrollbar/overlay-scrollbar.directive.js +2 -2
- package/esm2015/table-cell-types/table-cell-type-currency/table-cell-type-currency-config.js +1 -1
- package/esm2015/table-cell-types/table-cell-type-currency/table-cell-type-currency.component.js +17 -2
- package/esm2015/table-cell-types/table-cell-type-decimal/table-cell-type-decimal-config.js +1 -1
- package/esm2015/table-cell-types/table-cell-type-decimal/table-cell-type-decimal.component.js +16 -2
- package/esm2015/table-cell-types/table-cell-type-integer/table-cell-type-integer-config.js +1 -1
- package/esm2015/table-cell-types/table-cell-type-integer/table-cell-type-integer.component.js +16 -2
- package/esm2015/table-cell-types/table-cell-type-string/table-cell-type-string-config.js +1 -1
- package/esm2015/table-cell-types/table-cell-type-string/table-cell-type-string.component.js +32 -4
- package/esm2015/tel-input/tel-input/tel-input.component.js +10 -2
- package/esm2015/tel-input/tel-input.directive.js +50 -5
- package/esm2015/testing/current-tick-time.js +1 -1
- package/esm2015/utils/array-move.js +1 -1
- package/esm2015/utils/router/is-empty-url-route.js +1 -1
- package/esm2015/viewers/html-template-viewer/html-template-viewer.component.js +219 -0
- package/esm2015/viewers/html-template-viewer/html-template-viewer.module.js +23 -0
- package/esm2015/viewers/html-template-viewer/index.js +3 -0
- package/esm2015/viewers/public-api.js +2 -1
- package/esm2015/widget/widget/widget.component.js +1 -1
- package/fesm2015/theseam-ui-common-breadcrumbs.js +3 -2
- package/fesm2015/theseam-ui-common-breadcrumbs.js.map +1 -1
- package/fesm2015/theseam-ui-common-datatable.js.map +1 -1
- package/fesm2015/theseam-ui-common-framework.js +15 -12
- package/fesm2015/theseam-ui-common-framework.js.map +1 -1
- package/fesm2015/theseam-ui-common-scrollbar.js +1 -1
- package/fesm2015/theseam-ui-common-scrollbar.js.map +1 -1
- package/fesm2015/theseam-ui-common-table-cell-types.js +74 -5
- package/fesm2015/theseam-ui-common-table-cell-types.js.map +1 -1
- package/fesm2015/theseam-ui-common-tel-input.js +58 -6
- package/fesm2015/theseam-ui-common-tel-input.js.map +1 -1
- package/fesm2015/theseam-ui-common-testing.js.map +1 -1
- package/fesm2015/theseam-ui-common-utils.js.map +1 -1
- package/fesm2015/theseam-ui-common-viewers.js +237 -2
- package/fesm2015/theseam-ui-common-viewers.js.map +1 -1
- package/fesm2015/theseam-ui-common-widget.js +1 -1
- package/framework/base-layout/base-layout.component.scss +14 -0
- package/framework/base-layout/styles/_variables.scss +14 -0
- package/framework/theseam-ui-common-framework.metadata.json +1 -1
- package/framework/top-bar/_top-bar-theme.scss +5 -0
- package/framework/top-bar/styles/_utilities.scss +3 -0
- package/framework/top-bar/styles/_variables.scss +18 -0
- package/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.d.ts +3 -1
- package/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.scss +15 -0
- package/framework/top-bar/top-bar-title/top-bar-title.component.scss +6 -0
- package/framework/top-bar/top-bar.component.d.ts +3 -0
- package/framework/top-bar/top-bar.component.scss +39 -0
- package/package.json +1 -1
- package/table-cell-types/table-cell-type-currency/table-cell-type-currency-config.d.ts +5 -0
- package/table-cell-types/table-cell-type-decimal/table-cell-type-decimal-config.d.ts +5 -0
- package/table-cell-types/table-cell-type-integer/table-cell-type-integer-config.d.ts +5 -0
- package/table-cell-types/table-cell-type-string/table-cell-type-string-config.d.ts +8 -0
- package/table-cell-types/table-cell-type-string/table-cell-type-string.component.d.ts +9 -0
- package/table-cell-types/theseam-ui-common-table-cell-types.metadata.json +1 -1
- package/tel-input/tel-input.directive.d.ts +7 -3
- package/tel-input/theseam-ui-common-tel-input.metadata.json +1 -1
- package/viewers/html-template-viewer/html-template-viewer.component.d.ts +67 -0
- package/viewers/html-template-viewer/html-template-viewer.module.d.ts +2 -0
- package/viewers/html-template-viewer/index.d.ts +2 -0
- package/viewers/public-api.d.ts +1 -0
- package/viewers/theseam-ui-common-viewers.metadata.json +1 -1
- package/widget/styles/_variables.scss +2 -0
- package/widget/theseam-ui-common-widget.metadata.json +1 -1
- package/widget/widget/widget.component.scss +2 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __decorate, __awaiter } from 'tslib';
|
|
2
2
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
3
3
|
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
4
|
-
import { Directive, ElementRef, NgZone, Optional, Inject, HostBinding, Input, EventEmitter, InjectFlags, Component, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Injector, Output, ViewChild, HostListener, Pipe, NgModule } from '@angular/core';
|
|
5
|
-
import {
|
|
4
|
+
import { Directive, ElementRef, NgZone, Optional, Inject, Self, HostBinding, Input, EventEmitter, InjectFlags, Component, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Injector, Output, ViewChild, HostListener, Pipe, NgModule } from '@angular/core';
|
|
5
|
+
import { NgControl, FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
|
6
6
|
import { Subject, merge, fromEvent, of, defer } from 'rxjs';
|
|
7
7
|
import { tap, last, switchMap, takeUntil, auditTime, map } from 'rxjs/operators';
|
|
8
8
|
import { InputBoolean } from '@theseam/ui-common/core';
|
|
9
9
|
import { InputDirective, TheSeamFormFieldModule } from '@theseam/ui-common/form-field';
|
|
10
10
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
11
11
|
import { AssetLoaderService } from '@theseam/ui-common/services';
|
|
12
|
-
import { waitOnConditionAsync, notNullOrUndefined } from '@theseam/ui-common/utils';
|
|
12
|
+
import { waitOnConditionAsync, notNullOrUndefined, toggleAttribute, getAttribute, hasAttribute } from '@theseam/ui-common/utils';
|
|
13
13
|
import intlTelInput from 'intl-tel-input';
|
|
14
14
|
|
|
15
15
|
//
|
|
@@ -268,11 +268,12 @@ function processCountryCodes(countries) {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
class TheSeamTelInputDirective {
|
|
271
|
-
constructor(_elementRef, _assetLoader, _ngZone, _document) {
|
|
271
|
+
constructor(_elementRef, _assetLoader, _ngZone, _document, _ngControl) {
|
|
272
272
|
this._elementRef = _elementRef;
|
|
273
273
|
this._assetLoader = _assetLoader;
|
|
274
274
|
this._ngZone = _ngZone;
|
|
275
275
|
this._document = _document;
|
|
276
|
+
this._ngControl = _ngControl;
|
|
276
277
|
this._ngUnsubscribe = new Subject();
|
|
277
278
|
this._loadedAssetRefs = [];
|
|
278
279
|
this._attrType = 'tel';
|
|
@@ -320,6 +321,7 @@ class TheSeamTelInputDirective {
|
|
|
320
321
|
// TODO: Add initialCountry support.
|
|
321
322
|
// initialCountry: 'auto'
|
|
322
323
|
});
|
|
324
|
+
this._tryUpdateDropdownAttributes();
|
|
323
325
|
return this._instance.promise;
|
|
324
326
|
}),
|
|
325
327
|
// tap(() => console.log('%c_instance ready', 'color:green', this._instance, this._elementRef.nativeElement.value)),
|
|
@@ -334,6 +336,30 @@ class TheSeamTelInputDirective {
|
|
|
334
336
|
this._ngUnsubscribe.next();
|
|
335
337
|
this._ngUnsubscribe.complete();
|
|
336
338
|
}
|
|
339
|
+
ngDoCheck() {
|
|
340
|
+
this._tryUpdateDropdownAttributes();
|
|
341
|
+
}
|
|
342
|
+
_tryUpdateDropdownAttributes() {
|
|
343
|
+
var _a, _b, _c;
|
|
344
|
+
const control = this._ngControl;
|
|
345
|
+
if (control) {
|
|
346
|
+
const flagsContainer = (_a = this._instance) === null || _a === void 0 ? void 0 : _a.selectedFlag;
|
|
347
|
+
if (flagsContainer) {
|
|
348
|
+
toggleAttribute(flagsContainer, 'aria-disabled', (_b = control.disabled) !== null && _b !== void 0 ? _b : false);
|
|
349
|
+
const disabled = (_c = control.disabled) !== null && _c !== void 0 ? _c : false;
|
|
350
|
+
if (!disabled) {
|
|
351
|
+
if (getAttribute(flagsContainer, 'tabindex') !== '0') {
|
|
352
|
+
flagsContainer.setAttribute('tabindex', '0');
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
if (hasAttribute(flagsContainer, 'tabindex')) {
|
|
357
|
+
flagsContainer.removeAttribute('tabindex');
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
337
363
|
updateValue() {
|
|
338
364
|
var _a, _b;
|
|
339
365
|
// console.log('%cupdateValue START', 'color:cyan', typeof intlTelInputUtils !== 'undefined')
|
|
@@ -365,6 +391,7 @@ class TheSeamTelInputDirective {
|
|
|
365
391
|
return;
|
|
366
392
|
}
|
|
367
393
|
this._ngZone.runOutsideAngular(() => {
|
|
394
|
+
var _a;
|
|
368
395
|
const openDropdown$ = fromEvent(this._elementRef.nativeElement, 'open:countrydropdown');
|
|
369
396
|
const closeDropdown$ = fromEvent(this._elementRef.nativeElement, 'close:countrydropdown');
|
|
370
397
|
const instance = this._instance;
|
|
@@ -384,6 +411,22 @@ class TheSeamTelInputDirective {
|
|
|
384
411
|
}));
|
|
385
412
|
return merge(pressDown$, flagBtnClick$).pipe(takeUntil(closeDropdown$));
|
|
386
413
|
}), takeUntil(this._ngUnsubscribe)).subscribe();
|
|
414
|
+
const flagsContainer = (_a = this._instance) === null || _a === void 0 ? void 0 : _a.selectedFlag;
|
|
415
|
+
if (flagsContainer) {
|
|
416
|
+
fromEvent(flagsContainer, 'keydown', { capture: true }).pipe(tap((e) => {
|
|
417
|
+
var _a;
|
|
418
|
+
const control = this._ngControl;
|
|
419
|
+
if (control) {
|
|
420
|
+
const disabled = (_a = control.disabled) !== null && _a !== void 0 ? _a : false;
|
|
421
|
+
if (disabled && ['ArrowUp', 'Up', 'ArrowDown', 'Down', ' ', 'Enter'].indexOf(e.key) !== -1) {
|
|
422
|
+
// prevent form from being submitted if "ENTER" was pressed
|
|
423
|
+
e.preventDefault();
|
|
424
|
+
// prevent event from being handled again by document
|
|
425
|
+
e.stopPropagation();
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}), takeUntil(this._ngUnsubscribe)).subscribe();
|
|
429
|
+
}
|
|
387
430
|
});
|
|
388
431
|
}
|
|
389
432
|
isDropdownVisible() {
|
|
@@ -415,7 +458,8 @@ TheSeamTelInputDirective.ctorParameters = () => [
|
|
|
415
458
|
{ type: ElementRef },
|
|
416
459
|
{ type: AssetLoaderService },
|
|
417
460
|
{ type: NgZone },
|
|
418
|
-
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] }
|
|
461
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] },
|
|
462
|
+
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }] }
|
|
419
463
|
];
|
|
420
464
|
TheSeamTelInputDirective.propDecorators = {
|
|
421
465
|
_attrType: [{ type: HostBinding, args: ['attr.type',] }],
|
|
@@ -467,6 +511,14 @@ class TheSeamTelInputComponent {
|
|
|
467
511
|
get disabled() { return this._disabled; }
|
|
468
512
|
set disabled(value) {
|
|
469
513
|
const newValue = coerceBooleanProperty(value);
|
|
514
|
+
if (this._control.disabled !== newValue) {
|
|
515
|
+
if (newValue) {
|
|
516
|
+
this._control.disable();
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
this._control.enable();
|
|
520
|
+
}
|
|
521
|
+
}
|
|
470
522
|
if (newValue !== this.disabled) {
|
|
471
523
|
this._disabled = newValue;
|
|
472
524
|
this._changeDetectorRef.markForCheck();
|
|
@@ -552,7 +604,7 @@ TheSeamTelInputComponent.decorators = [
|
|
|
552
604
|
multi: true
|
|
553
605
|
}],
|
|
554
606
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
555
|
-
styles: [":host{display:block}\n"]
|
|
607
|
+
styles: [":host{display:block}:host[disabled] ::ng-deep .iti--allow-dropdown .iti__flag-container:hover,:host[disabled] ::ng-deep .iti--allow-dropdown .iti__flag-container:hover{cursor:default}:host[disabled] ::ng-deep .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag,:host[disabled] ::ng-deep .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag{background-color:transparent}:host[disabled] ::ng-deep .iti--allow-dropdown .iti__arrow{display:none}\n"]
|
|
556
608
|
},] }
|
|
557
609
|
];
|
|
558
610
|
TheSeamTelInputComponent.ctorParameters = () => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theseam-ui-common-tel-input.js","sources":["../../../projects/ui-common/tel-input/intl-tel-input.ts","../../../projects/ui-common/tel-input/tel-input-constants.ts","../../../projects/ui-common/tel-input/utils/add-country-code.ts","../../../projects/ui-common/tel-input/models/tel-input-number-format-name.ts","../../../projects/ui-common/tel-input/utils/coerce-phone-number-format.ts","../../../projects/ui-common/tel-input/utils/get-country-code.ts","../../../projects/ui-common/tel-input/utils/get-dial-code.ts","../../../projects/ui-common/tel-input/utils/get-global-intl-tel-input-globals.ts","../../../projects/ui-common/tel-input/utils/get-global-intl-tel-input-utils.ts","../../../projects/ui-common/tel-input/utils/get-intl-tel-input-utils.ts","../../../projects/ui-common/tel-input/utils/get-validation-error-message.ts","../../../projects/ui-common/tel-input/utils/process-country-codes.ts","../../../projects/ui-common/tel-input/tel-input.directive.ts","../../../projects/ui-common/tel-input/tel-input/tel-input.component.ts","../../../projects/ui-common/tel-input/tel-input-validator.ts","../../../projects/ui-common/tel-input/phone-number.pipe.ts","../../../projects/ui-common/tel-input/tel-input.module.ts","../../../projects/ui-common/tel-input/theseam-ui-common-tel-input.ts"],"sourcesContent":["import intlTelInput from 'intl-tel-input'\n\n//\n// NOTE: These types are mainly for providing types to 'intl-tel-input', because\n// the only published types I could find were incomplete. Some types are\n// missing, because they were not necessary for this library. I don't indend\n// this to be a perfect types for 'intl-tel-input', so as long as they are\n// compatible they may be slightly altered or extended to fit this library\n// better.\n//\n\n/**\n * Partial types for intl-tel-input-utils\n */\n// tslint:disable-next-line: no-namespace\nexport namespace intlTelInputUtils {\n\n export interface CountryData {\n name: string\n iso2: string\n dialCode: string\n areaCodes: string[] | null\n priority: number\n }\n\n export enum numberFormat {\n E164 = 0,\n INTERNATIONAL = 1,\n NATIONAL = 2,\n RFC3966 = 3\n }\n\n export enum numberType {\n FIXED_LINE = 0,\n MOBILE = 1,\n FIXED_LINE_OR_MOBILE = 2,\n TOLL_FREE = 3,\n PREMIUM_RATE = 4,\n SHARED_COST = 5,\n VOIP = 6,\n PERSONAL_NUMBER = 7,\n PAGER = 8,\n UAN = 9,\n VOICEMAIL = 10,\n UNKNOWN = -1\n }\n\n export enum validationError {\n IS_POSSIBLE = 0,\n INVALID_COUNTRY_CODE = 1,\n TOO_SHORT = 2,\n TOO_LONG = 3,\n NOT_A_NUMBER = 4\n }\n\n export type placeholderNumberType =\n | 'FIXED_LINE_OR_MOBILE'\n | 'FIXED_LINE'\n | 'MOBILE'\n | 'PAGER'\n | 'PERSONAL_NUMBER'\n | 'PREMIUM_RATE'\n | 'SHARED_COST'\n | 'TOLL_FREE'\n | 'UAN'\n | 'UNKNOWN'\n | 'VOICEMAIL'\n | 'VOIP'\n\n}\n\n// NOTE: If one of the functions return -99, then it is most likely from a\n// problem in 'google-libphonenumber' that 'intl-tel-input' swallowed in int\n// wrapper.\n//\n// NOTE: The following functions do not exist until util script has loaded.\nexport interface IntlTelInputUtilsScript {\n numberFormat: intlTelInputUtils.numberFormat\n numberType: intlTelInputUtils.numberType\n validationError: intlTelInputUtils.validationError\n\n /**\n * Format the given number to the given format.\n */\n formatNumber(number: string, countryCode: string, format: intlTelInputUtils.numberFormat): string\n\n /**\n * Get an example number for the given country code.\n */\n getExampleNumber(countryCode: string, national: boolean, numberType: intlTelInputUtils.numberType): string\n\n /**\n * Get the extension from the given number.\n */\n getExtension(number: string, countryCode: string): string\n\n /**\n * Get the type of the given number e.g. fixed-line/mobile.\n */\n getNumberType(number: string, countryCode: string): intlTelInputUtils.numberType\n\n /**\n * Get more info if the validation has failed e.g. too long/too short.\n */\n getValidationError(number: string, countryCode: string): intlTelInputUtils.validationError\n\n /**\n * Check if given number is valid.\n */\n isValidNumber(number: string, countryCode: string): boolean\n}\n\n/**\n * Partial types for intl-tel-input\n */\n// tslint:disable-next-line: no-namespace\nexport namespace IntlTelInput {\n export interface Static {\n /**\n * Default options for all instances\n */\n defaults: Options\n\n /**\n * Get all of the plugin's country data - either to re-use elsewhere\n * e.g. to populate a country dropdown.\n */\n getCountryData(): intlTelInputUtils.CountryData[]\n\n /**\n * Load the utils.js script (included in the lib directory) to enable\n * formatting/validation etc.\n */\n loadUtils(path: string, utilsScriptDeferred?: boolean): Promise<void> /* | null | void */\n }\n\n export interface Plugin {\n promise: Promise<void>\n\n /**\n * Remove the plugin from the input, and unbind any event listeners.\n */\n destroy(): void\n\n /**\n * Get the extension from the current number.\n * Requires the utilsScript option.\n * e.g. if the input value was \"(702) 555-5555 ext. 1234\", this would\n * return \"1234\".\n */\n getExtension(): string\n\n /**\n * Get the current number in the given format (defaults to E.164 standard).\n * The different formats are available in the enum\n * intlTelInputUtils.numberFormat - taken from here.\n * Requires the utilsScript option.\n * Note that even if nationalMode is enabled, this can still return a full\n * international number.\n * @param numberFormat the format in which the number will be returned.\n */\n getNumber(numberFormat?: intlTelInputUtils.numberFormat): string\n\n /**\n * Get the type (fixed-line/mobile/toll-free etc) of the current number.\n * Requires the utilsScript option.\n * Returns an integer, which you can match against the various options in the\n * global enum intlTelInputUtils.numberType.\n * Note that in the US there's no way to differentiate between fixed-line and\n * mobile numbers, so instead it will return FIXED_LINE_OR_MOBILE.\n */\n getNumberType(): intlTelInputUtils.numberType\n\n /**\n * Get the country data for the currently selected flag.\n */\n getSelectedCountryData(): intlTelInputUtils.CountryData\n\n /**\n * Get more information about a validation error.\n * Requires the utilsScript option.\n * Returns an integer, which you can match against the various options in the\n * global enum ValidationError\n */\n getValidationError(): intlTelInputUtils.validationError\n\n /**\n * Validate the current number. Expects an internationally formatted number\n * (unless nationalMode is enabled). If validation fails, you can use\n * getValidationError to get more information.\n * Requires the utilsScript option.\n * Also see getNumberType if you want to make sure the user enters a certain\n * type of number e.g. a mobile number.\n */\n isValidNumber(): boolean\n\n /**\n * Change the country selection (e.g. when the user is entering their address).\n * @param countryCode country code of the country to be set.\n */\n setCountry(countryCode: string): void\n\n /**\n * Insert a number, and update the selected flag accordingly.\n * Note that by default, if nationalMode is enabled it will try to use\n * national formatting.\n * @param aNumber number to be set.\n */\n setNumber(aNumber: string): void\n\n /**\n * Set the type of the placeholder number\n * @param type Placeholder number type to be set\n */\n setPlaceholderNumberType(type: intlTelInputUtils.placeholderNumberType): void\n }\n\n export interface Options {\n /**\n * Whether or not to allow the dropdown. If disabled, there is no dropdown\n * arrow, and the selected flag is not clickable. Also we display the\n * selected flag on the right instead because it is just a marker of state.\n * Default = true\n */\n allowDropdown?: boolean\n\n /**\n * If there is just a dial code in the input: remove it on blur or submit,\n * and re-add it on focus. This is to prevent just a dial code getting\n * submitted with the form. Requires nationalMode to be set to false.\n * Default = true\n */\n autoHideDialCode?: boolean\n\n /**\n * Set the input's placeholder to an example number for the selected country, and update it if the country changes.\n * You can specify the number type using the placeholderNumberType option.\n * By default it is set to \"polite\", which means it will only set the placeholder if the input doesn't already have one.\n * You can also set it to \"aggressive\", which will replace any existing placeholder, or \"off\".\n * Requires the utilsScript option.\n * Default = \"polite\"\n */\n autoPlaceholder?: 'off' | 'polite' | 'aggressive'\n\n /**\n * Change the placeholder generated by autoPlaceholder. Must return a string.\n * Default = null\n */\n customPlaceholder?: (selectedCountryPlaceholder: string, selectedCountryData: intlTelInputUtils.CountryData) => string\n\n /**\n * Expects a node e.g. document.body. Instead of putting the country dropdown next to the input,\n * append it to the specified node, and it will then be positioned absolutely next to the input using JavaScript.\n * This is useful when the input is inside a container with overflow: hidden.\n * Note that the absolute positioning can be broken by scrolling, so it will automatically close on the window scroll event.\n * Default = null\n */\n dropdownContainer?: Node\n\n /**\n * In the dropdown, display all countries except the ones you specify here.\n * Default = null\n */\n excludeCountries?: string[]\n\n /**\n * Format the input value (according to the nationalMode option) during initialisation, and on setNumber.\n * Requires the utilsScript option.\n * Default = true\n */\n formatOnDisplay?: boolean\n\n /**\n * When setting initialCountry to \"auto\", you must use this option to\n * specify a custom function that looks up the user's location,\n * and then calls the success callback with the relevant country code.\n * Also note that when instantiating the plugin, if the Promise object is defined,\n * one of those is returned under the promise instance property, so you can\n * do something like iti.promise.then(callback) to know when initialisation requests like this have completed.\n * Default = null\n */\n geoIpLookup?: (callback: (countryCode: string) => void) => void\n\n /**\n * Add a hidden input with the given name (or if your input name\n * contains square brackets then it will give the hidden input the same\n * name, replacing the contents of the brackets with the given name). On\n * submit, populate it with the full international number (using\n * getNumber). This is a quick way for people using non-ajax forms to\n * get the full international number, even when nationalMode is enabled.\n * Note: requires the input to be inside a form element, as this feature\n * works by listening for the submit event on the closest form element.\n * Also note that since this uses getNumber internally, it expects a\n * valid number, and so should only be used after validation. Default =\n * \"\"\n */\n hiddenInput?: string\n\n /**\n * Set the initial country selection by specifying it's country code.\n * You can also set it to \"auto\", which will lookup the user's country based\n * on their IP address (requires the geoIpLookup option).\n * Note that the \"auto\" option will not update the country selection if the\n * input already contains a number. If you leave initialCountry blank,\n * it will default to the first country in the list.\n */\n initialCountry?: string\n\n /**\n * Allows to translate the countries by its given iso code e.g.: { 'de': 'Deutschland' }\n * Default = {}\n */\n localizedCountries?: object\n\n /**\n * Allow users to enter national numbers (and not have to think about\n * international dial codes). Formatting, validation and placeholders still\n * work. Then you can use getNumber to extract a full international number.\n * This option now defaults to true, and it is recommended that you leave it\n * that way as it provides a better experience for the user.\n * Default = true\n */\n nationalMode?: boolean\n\n /**\n * In the dropdown, display only the countries you specify.\n * Default = undefined\n */\n onlyCountries?: string[]\n\n /**\n * Specify one of the keys from the global enum intlTelInputUtils.numberType\n * e.g. \"FIXED_LINE\" to set the number type to use for the placeholder.\n * Default = MOBILE\n */\n placeholderNumberType?: intlTelInputUtils.placeholderNumberType\n\n /**\n * Specify the countries to appear at the top of the list.\n * Default = [\"us\", \"gb\"]\n */\n preferredCountries?: string[]\n\n /**\n * Display the country dial code next to the selected flag so it's not part\n * of the typed number. Note that this will disable nationalMode because\n * technically we are dealing with international numbers, but with the\n * dial code separated.\n * Default = false\n */\n separateDialCode?: boolean\n\n /**\n * Enable formatting/validation etc. by specifying the URL of the\n * included utils.js script (or alternatively just point it to the file\n * on cdnjs.com). The script is fetched when the page has finished\n * loading (on the window load event) to prevent blocking (the script is\n * ~215KB). When instantiating the plugin, if the Promise object is\n * defined, one of those is returned under the promise instance\n * property, so you can do something like iti.promise.then(callback) to\n * know when initialisation requests like this have finished. Note that\n * if you're lazy loading the plugin script itself (intlTelInput.js)\n * this will not work and you will need to use the loadUtils method\n * instead. Example: \"build/js/utils.js\" Default = \"\"\n */\n utilsScript?: string\n }\n}\n\n/**\n * Initialise the plugin with optional options.\n * @param options options that can be provided during initialization.\n */\nexport function IntlTelInputFn(node: Element, options?: IntlTelInput.Options): IntlTelInput.Plugin {\n return (intlTelInput as any)(node, options)\n}\n\nexport default IntlTelInputFn\n","export const TEL_INPUT_ASSETS_PATH = 'assets/vendor/intl-tel-input'\n\nexport const TEL_INPUT_STYLES = `\n .iti { width: 100%; }\n\n .iti__flag {background-image: url(\"${TEL_INPUT_ASSETS_PATH}/img/flags.png\");}\n\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n .iti__flag {background-image: url(\"${TEL_INPUT_ASSETS_PATH}/img/flags@2x.png\");}\n }\n\n .iti__country-list {\n /* There is a bug that is causing the 'z-index: 2' from ng-select to conflict with this dropdown container. */\n z-index: 3;\n }\n`\n\nexport const TEL_INPUT_STYLESHEET_PATH = `${TEL_INPUT_ASSETS_PATH}/css/intlTelInput.min.css`\n\nexport const TEL_INPUT_UTILS_PATH = `${TEL_INPUT_ASSETS_PATH}/js/utils.js`\n","import type { TelInputCountryData } from '../models/index'\n\n/**\n * Add a country code to this.countryCodes.\n *\n * Based on: https://github.com/jackocnr/intl-tel-input/blob/4fe25fcf142c341a85b7b15cc307d66afb8573a3/src/js/intlTelInput.js#L197\n */\nexport function addCountryCode(data: TelInputCountryData, iso2: string, countryCode: string, priority?: number) {\n if (countryCode.length > data.countryCodeMaxLen) {\n data.countryCodeMaxLen = countryCode.length\n }\n if (!data.countryCodes.hasOwnProperty(countryCode)) {\n data.countryCodes[countryCode] = []\n }\n // bail if we already have this country for this countryCode\n for (let i = 0; i < data.countryCodes[countryCode].length; i++) {\n if (data.countryCodes[countryCode][i] === iso2) { return }\n }\n // check for undefined as 0 is falsy\n const index = (priority !== undefined) ? priority : data.countryCodes[countryCode].length\n data.countryCodes[countryCode][index] = iso2\n}\n","import { intlTelInputUtils } from '../intl-tel-input'\n\nexport const TelInputNumberFormatName: { [name: string]: intlTelInputUtils.numberFormat } = {\n 'E164': intlTelInputUtils.numberFormat.E164,\n 'INTERNATIONAL': intlTelInputUtils.numberFormat.INTERNATIONAL,\n 'NATIONAL': intlTelInputUtils.numberFormat.NATIONAL,\n 'RFC3966': intlTelInputUtils.numberFormat.RFC3966\n}\n","import { intlTelInputUtils } from '../intl-tel-input'\nimport { TelInputNumberFormatName } from '../models/index'\n\nexport const THESEAM_DEFAULT_PHONE_NUMBER_FORMAT = intlTelInputUtils.numberFormat.INTERNATIONAL\n\n/**\n * Types that should be acceptable in a template.\n */\nexport type TheSeamNumberFormatsInput =\n // Enum\n intlTelInputUtils.numberFormat\n // Strings matching enum\n | 'E164'\n | 'INTERNATIONAL'\n | 'NATIONAL'\n | 'RFC3966'\n // Strings matching enum in lower case, since it would be what a user will\n // most likely type if string is necessary.\n | 'e164'\n | 'international'\n | 'national'\n | 'rfc3966'\n\nexport function coercePhoneNumberFormat(\n format: TheSeamNumberFormatsInput,\n defaultFormat = THESEAM_DEFAULT_PHONE_NUMBER_FORMAT\n): intlTelInputUtils.numberFormat {\n let res = defaultFormat\n\n if (typeof format === 'string') {\n const _format = TelInputNumberFormatName[`${format}`.trim().toUpperCase()]\n res = (_format === undefined || _format === null) ? defaultFormat : _format\n } else if (typeof format === 'number') {\n // We could check for a number range, but I think it is safer to assume it's\n // valid if a number was provided. A number most likely means the value came\n // from using the enum and I don't want to accidentaly exclude a format that\n // we don't have documented.\n //\n // NOTE: We may want to limit it to specific numbers though and assume that\n // potentialy excluded formats are not intended to be used by this library.\n res = format\n }\n\n return res\n}\n","import type { TelInputCountryData } from '../models/index'\n\nfunction getNumeric(s: string): string {\n return s.replace(/\\D/g, '')\n}\n\nexport function getCountryCode(data: TelInputCountryData, dialCode: string) {\n const _countryCodes = data.countryCodes[getNumeric(dialCode)]\n // Refer to `_setInitialState` to get libraries default logic\n return (_countryCodes === undefined || _countryCodes === null || _countryCodes.length === 0) ? 'us' : _countryCodes[0]\n}\n","import type { TelInputCountryData } from '../models/index'\n\n/**\n * Try and extract a valid international dial code from a full telephone number.\n *\n * NOTE: returns the raw string inc plus character and any whitespace/dots etc.\n *\n * Based on: https://github.com/jackocnr/intl-tel-input/blob/4fe25fcf142c341a85b7b15cc307d66afb8573a3/src/js/intlTelInput.js#L1161\n */\nexport function getDialCode(data: TelInputCountryData, number: string, includeAreaCode: boolean = false): string {\n // console.log('getDialCode', number, includeAreaCode)\n // const data = processCountryCodes(globalIntlTelInputGlobals().getCountryData() as TelInputCountryData[])\n\n let dialCode = ''\n // only interested in international numbers (starting with a plus)\n if (number.charAt(0) === '+') {\n let numericChars = ''\n // iterate over chars\n for (let i = 0; i < number.length; i++) {\n const c = number.charAt(i)\n // if char is number (https://stackoverflow.com/a/8935649/217866)\n if (!isNaN(parseInt(c, 10))) {\n numericChars += c\n // if current numericChars make a valid dial code\n if (includeAreaCode) {\n if (data.countryCodes[numericChars]) {\n // store the actual raw string (useful for matching later)\n dialCode = number.substr(0, i + 1)\n }\n } else {\n if (data.dialCodes[numericChars]) {\n dialCode = number.substr(0, i + 1)\n // if we're just looking for a dial code, we can break as soon as we find one\n break\n }\n }\n // stop searching as soon as we can - in this case when we hit max len\n if (numericChars.length === data.countryCodeMaxLen) {\n break\n }\n }\n }\n }\n\n // console.log('getDialCode return', dialCode)\n return dialCode\n}\n","import type { IntlTelInput } from '../intl-tel-input'\n\nexport function globalIntlTelInputGlobals(): IntlTelInput.Static {\n return (window as any).intlTelInputGlobals\n}\n","import type { IntlTelInputUtilsScript } from '../intl-tel-input'\n\nexport function globalIntlTelInputUtils(): IntlTelInputUtilsScript {\n return (window as any).intlTelInputUtils\n}\n","import { notNullOrUndefined, waitOnConditionAsync } from '@theseam/ui-common/utils'\n\nimport type { IntlTelInputUtilsScript } from '../intl-tel-input'\nimport { TEL_INPUT_UTILS_PATH } from '../tel-input-constants'\nimport { globalIntlTelInputGlobals } from './get-global-intl-tel-input-globals'\nimport { globalIntlTelInputUtils } from './get-global-intl-tel-input-utils'\n\nexport function getIntlTelInputUtils(): Promise<IntlTelInputUtilsScript> {\n if (globalIntlTelInputUtils()) {\n return Promise.resolve(globalIntlTelInputUtils())\n }\n\n if ((globalIntlTelInputGlobals() as any).startedLoadingUtilsScript) {\n return waitOnConditionAsync(() => notNullOrUndefined(globalIntlTelInputUtils()), 5000)\n .then(() => globalIntlTelInputUtils())\n }\n\n return globalIntlTelInputGlobals().loadUtils(TEL_INPUT_UTILS_PATH)\n .then(() => waitOnConditionAsync(() => notNullOrUndefined(globalIntlTelInputUtils()), 5000))\n .then(() => globalIntlTelInputUtils())\n}\n","import { intlTelInputUtils } from '../intl-tel-input'\n\nexport const VALIDATOR_CODE_MESSAGES: { [key: number]: string } = {\n [intlTelInputUtils.validationError.INVALID_COUNTRY_CODE]: 'Country code is invalid.',\n [intlTelInputUtils.validationError.TOO_SHORT]: 'Number is too short.',\n [intlTelInputUtils.validationError.TOO_LONG]: 'Number is too long.',\n [intlTelInputUtils.validationError.NOT_A_NUMBER]: 'Must be numbers only.'\n}\n\nexport function getValidationErrorMessage(code: intlTelInputUtils.validationError): string {\n const message = VALIDATOR_CODE_MESSAGES[code]\n return message ?? 'Invalid number.'\n}\n","import type { intlTelInputUtils } from '../intl-tel-input'\nimport type { TelInputCountryData } from '../models/index'\nimport { addCountryCode } from './add-country-code'\n\n/**\n * Process the countryCodes map.\n *\n * Based on: https://github.com/jackocnr/intl-tel-input/blob/4fe25fcf142c341a85b7b15cc307d66afb8573a3/src/js/intlTelInput.js#L252\n */\nexport function processCountryCodes(countries: intlTelInputUtils.CountryData[]): TelInputCountryData {\n const data: TelInputCountryData = {\n countryCodeMaxLen: 0,\n // here we store just dial codes\n dialCodes: {},\n // here we store \"country codes\" (both dial codes and their area codes)\n countryCodes: {}\n }\n\n // first: add dial codes\n for (let i = 0; i < countries.length; i++) {\n const c = countries[i]\n if (!data.dialCodes[c.dialCode]) { data.dialCodes[c.dialCode] = true }\n addCountryCode(data, c.iso2, c.dialCode, c.priority)\n }\n\n // next: add area codes\n // this is a second loop over countries, to make sure we have all of the \"root\" countries\n // already in the map, so that we can access them, as each time we add an area code substring\n // to the map, we also need to include the \"root\" country's code, as that also matches\n for (let i = 0; i < countries.length; i++) {\n const c = countries[i]\n // area codes\n if (c.areaCodes) {\n const rootCountryCode = data.countryCodes[c.dialCode][0]\n // for each area code\n for (let j = 0; j < c.areaCodes.length; j++) {\n const areaCode = c.areaCodes[j]\n // for each digit in the area code to add all partial matches as well\n for (let k = 1; k < areaCode.length; k++) {\n const partialDialCode = c.dialCode + areaCode.substr(0, k)\n // start with the root country, as that also matches this dial code\n addCountryCode(data, rootCountryCode, partialDialCode)\n addCountryCode(data, c.iso2, partialDialCode)\n }\n // add the full area code\n addCountryCode(data, c.iso2, c.dialCode + areaCode)\n }\n }\n }\n\n return data\n}\n","import { DOCUMENT } from '@angular/common'\nimport { Directive, ElementRef, HostBinding, Inject, Input, NgZone, OnDestroy, OnInit, Optional } from '@angular/core'\nimport { fromEvent, merge, Subject } from 'rxjs'\nimport { auditTime, last, switchMap, takeUntil, tap } from 'rxjs/operators'\n\nimport { AssetLoaderService, LoadedAssetRef } from '@theseam/ui-common/services'\nimport { notNullOrUndefined } from '@theseam/ui-common/utils'\n\n\nimport { IntlTelInputFn, intlTelInputUtils } from './intl-tel-input'\nimport type { IntlTelInput } from './intl-tel-input'\nimport { TEL_INPUT_STYLES, TEL_INPUT_STYLESHEET_PATH, TEL_INPUT_UTILS_PATH } from './tel-input-constants'\nimport { globalIntlTelInputUtils } from './utils/index'\n\n@Directive({\n selector: 'input[seamTelInput]',\n exportAs: 'seamTelInput'\n})\nexport class TheSeamTelInputDirective implements OnInit, OnDestroy {\n private readonly _ngUnsubscribe = new Subject()\n\n private _instance: IntlTelInput.Plugin | undefined\n private _loadedAssetRefs: LoadedAssetRef<HTMLLinkElement | HTMLStyleElement>[] = []\n\n @HostBinding('attr.type') _attrType = 'tel'\n\n @Input()\n set value(v: string | undefined | null) {\n // console.log('set value', v, this._instance)\n this._value = v\n if (this._instance) {\n this._instance.setNumber(notNullOrUndefined(v) ? v : '')\n this.updateValue()\n }\n }\n get value(): string | undefined | null {\n if (this._instance) {\n return this._instance?.getNumber()\n }\n return this._value\n }\n private _value: string | undefined | null\n\n constructor(\n private readonly _elementRef: ElementRef<HTMLInputElement>,\n private readonly _assetLoader: AssetLoaderService,\n private readonly _ngZone: NgZone,\n @Optional() @Inject(DOCUMENT) private readonly _document?: any\n ) { }\n\n ngOnInit(): void {\n merge(\n this._assetLoader.loadStyleSheet(TEL_INPUT_STYLESHEET_PATH),\n this._assetLoader.loadStyle(TEL_INPUT_STYLES)\n ).pipe(\n // tap(v => console.log('loaded', v)),\n tap(v => this._loadedAssetRefs.push(v)),\n last(),\n // tap(v => console.log('StyleLoadingDone', v)),\n switchMap(() => {\n this._instance = IntlTelInputFn(this._elementRef.nativeElement, {\n utilsScript: TEL_INPUT_UTILS_PATH,\n preferredCountries: [ 'US' ],\n nationalMode: false,\n formatOnDisplay: true,\n autoPlaceholder: 'off',\n separateDialCode: false,\n autoHideDialCode: false,\n // TODO: Add initialCountry support.\n // initialCountry: 'auto'\n })\n\n return this._instance.promise\n }),\n // tap(() => console.log('%c_instance ready', 'color:green', this._instance, this._elementRef.nativeElement.value)),\n tap(() => this._initDropdownListener()),\n tap(() => this.value = this._value),\n tap(this._formatIntlTelInput),\n switchMap(() => merge(\n fromEvent(this._elementRef.nativeElement, 'keyup'),\n fromEvent(this._elementRef.nativeElement, 'change')\n )),\n tap(this._formatIntlTelInput),\n takeUntil(this._ngUnsubscribe)\n ).subscribe()\n }\n\n ngOnDestroy(): void {\n this._instance?.destroy()\n for (const ref of this._loadedAssetRefs) {\n ref.destroy()\n }\n\n this._ngUnsubscribe.next()\n this._ngUnsubscribe.complete()\n }\n\n private _formatIntlTelInput = () => {\n // if (typeof intlTelInputUtils !== 'undefined') {\n // const currentText = this._instance?.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL)\n // console.log('currentText', currentText, this._instance?.getSelectedCountryData())\n // console.log(this._instance?.getValidationError())\n // if (typeof currentText === 'string') {\n // this._instance?.setNumber(currentText)\n // }\n // }\n\n this.updateValue()\n }\n\n public updateValue(): void {\n // console.log('%cupdateValue START', 'color:cyan', typeof intlTelInputUtils !== 'undefined')\n if (typeof globalIntlTelInputUtils() !== 'undefined') {\n const currentText = this._instance?.getNumber(intlTelInputUtils.numberFormat.E164)\n // console.log('currentText', currentText, this._instance?.getSelectedCountryData())\n // console.log('fullNumber', (this._instance as any)._getFullNumber())\n // console.log('E164', this._instance?.getNumber(intlTelInputUtils.numberFormat.E164))\n // console.log('INTERNATIONAL', this._instance?.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL))\n // console.log('NATIONAL', this._instance?.getNumber(intlTelInputUtils.numberFormat.NATIONAL))\n // console.log('RFC3966', this._instance?.getNumber(intlTelInputUtils.numberFormat.RFC3966))\n // console.log('getValidationError', this._instance?.getValidationError())\n if (typeof currentText === 'string') {\n this._instance?.setNumber(currentText)\n }\n }\n // console.log('%cupdateValue END', 'color:cyan')\n }\n\n public getFullNumber(): string | undefined | null {\n if (typeof globalIntlTelInputUtils() !== 'undefined' && this._instance) {\n // return (this._instance as any)._getFullNumber()\n return this._instance.getNumber(intlTelInputUtils.numberFormat.E164)\n }\n return this.value\n }\n\n private _initDropdownListener() {\n const doc = this._document\n if (!doc) {\n return\n }\n\n this._ngZone.runOutsideAngular(() => {\n const openDropdown$ = fromEvent(this._elementRef.nativeElement, 'open:countrydropdown')\n const closeDropdown$ = fromEvent(this._elementRef.nativeElement, 'close:countrydropdown')\n const instance = this._instance as any\n openDropdown$.pipe(\n switchMap(() => {\n const pressDown$ = merge(\n fromEvent(doc, 'touchstart', { capture: true }),\n fromEvent(doc, 'mousedown', { capture: true })\n ).pipe(\n auditTime(0),\n tap((event: any) => {\n if (instance.countryList.contains(event.target) || instance.selectedFlag.contains(event.target)) {\n return\n }\n instance._closeDropdown()\n })\n )\n\n const flagBtnClick$ = fromEvent<MouseEvent>(instance.selectedFlag, 'click').pipe(\n tap((event: MouseEvent) => {\n if (!this.isDropdownVisible()) {\n return\n }\n\n event.preventDefault()\n instance._closeDropdown()\n })\n )\n\n return merge(pressDown$, flagBtnClick$).pipe(takeUntil(closeDropdown$))\n }),\n takeUntil(this._ngUnsubscribe)\n ).subscribe()\n })\n }\n\n public isDropdownVisible() {\n if (!this._instance) {\n return false\n }\n\n const instance = this._instance as any\n return !instance.countryList.classList.contains('iti__hide')\n }\n\n /** Focuses the input. */\n public focus(): void {\n this._elementRef.nativeElement.focus()\n }\n\n /** Unfocuses the input. */\n public blur(): void {\n this._elementRef.nativeElement.blur()\n }\n\n public getHostElement(): HTMLInputElement {\n return this._elementRef.nativeElement\n }\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y'\nimport { BooleanInput, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion'\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n InjectFlags,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core'\nimport { ControlValueAccessor, FormControl, NgControl, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { defer, fromEvent, merge, Observable, of, Subject } from 'rxjs'\nimport { auditTime, map, switchMap, takeUntil } from 'rxjs/operators'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { InputDirective } from '@theseam/ui-common/form-field'\n\nimport { TheSeamTelInputDirective } from '../tel-input.directive'\n\n// TODO: Fix focus\n// TODO: Fix disabled\n\n@Component({\n selector: 'seam-tel-input',\n templateUrl: './tel-input.component.html',\n styleUrls: ['./tel-input.component.scss'],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n // tslint:disable-next-line: no-use-before-declare\n useExisting: forwardRef(() => TheSeamTelInputComponent),\n multi: true\n }],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TheSeamTelInputComponent implements OnInit, OnDestroy, ControlValueAccessor {\n static ngAcceptInputType_required: BooleanInput\n static ngAcceptInputType_disabled: BooleanInput\n\n /** @ignore */\n private readonly _ngUnsubscribe = new Subject()\n\n /** @ignore */\n readonly _control = new FormControl()\n\n private _focusOrigin: FocusOrigin = null\n\n _hasInvalidCss$: Observable<boolean>\n\n @Input() @InputBoolean() required: boolean = false\n\n @Input()\n get disabled(): boolean { return this._disabled }\n set disabled(value: boolean) {\n const newValue = coerceBooleanProperty(value)\n\n if (newValue !== this.disabled) {\n this._disabled = newValue\n this._changeDetectorRef.markForCheck()\n }\n }\n /** @ignore */\n private _disabled = false\n\n /**\n * Set the tab index to `-1` to allow the root element of the\n * component to receive `focus` event from javascript, but not get focused by\n * keyboard navigation.\n */\n @Input()\n set tabIndex(value: number) { this._tabIndex = coerceNumberProperty(value) }\n get tabIndex(): number { return this._tabIndex }\n private _tabIndex = -1\n\n @HostBinding('attr.disabled')\n get _attrDisabled() { return this.disabled || null }\n\n @HostBinding('attr.tabindex')\n get _attrTabIndex() { return this.disabled ? -1 : (this.tabIndex || 0) }\n\n /** Name value will be applied to the input element if present */\n @Input() name: string | undefined | null = null\n\n /** The value attribute of the native input element */\n @Input() value: string | undefined | null\n\n /** Event emitted when the \"tel\" input value changes. */\n @Output() readonly change = new EventEmitter<string>()\n\n /**\n * The telInput directive\n * @ignore\n */\n @ViewChild(TheSeamTelInputDirective, { static: true }) _telInputDirective?: TheSeamTelInputDirective\n\n /**\n * The telInput directive\n * @ignore\n */\n @ViewChild(InputDirective, { static: true }) _inputDirective?: InputDirective\n\n /**\n * The native `<input type=\"tel\">` element\n * @ignore\n */\n @ViewChild('input', { static: true }) _inputElementRef?: ElementRef<HTMLInputElement>\n\n @HostListener('focus', [ '$event' ])\n _onFocus() {\n this._telInputDirective?.focus()\n }\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @ignore\n */\n _onTouched: () => any = () => {}\n\n /** @ignore */\n private _controlValueAccessorChangeFn: (value: any) => void = () => {}\n\n constructor(\n private readonly _changeDetectorRef: ChangeDetectorRef,\n private readonly _injector: Injector,\n private readonly _elementRef: ElementRef,\n private readonly _focusMonitor: FocusMonitor\n ) {\n const telInputBlurEvent$ = this._telInputDirective\n ? fromEvent(this._telInputDirective.getHostElement(), 'blur')\n : of<Event>()\n\n this._hasInvalidCss$ = defer(() => of((this._injector.get(NgControl, null, InjectFlags.Self)?.control) || undefined)).pipe(\n switchMap(control => {\n if (control) {\n return merge(\n control.valueChanges,\n control.statusChanges,\n telInputBlurEvent$\n ).pipe(\n auditTime(0),\n map(() => {\n const inputControl = this._inputDirective?.ngControl\n return control.invalid && (inputControl?.dirty as boolean || inputControl?.touched as boolean)\n })\n )\n }\n return of(false)\n })\n )\n }\n\n /** @ignore */\n ngOnInit(): void {\n this._focusMonitor.monitor(this._elementRef, true).pipe(\n takeUntil(this._ngUnsubscribe)\n ).subscribe(origin => this._focusOrigin = origin)\n\n this._control.valueChanges.pipe(\n takeUntil(this._ngUnsubscribe)\n ).subscribe(v => {\n const value = this._telInputDirective?.getFullNumber()\n this.value = value\n if (this._controlValueAccessorChangeFn) {\n this._controlValueAccessorChangeFn(value)\n }\n })\n }\n\n /** @ignore */\n ngOnDestroy(): void {\n this._focusMonitor.stopMonitoring(this._elementRef)\n\n this._ngUnsubscribe.next()\n this._ngUnsubscribe.complete()\n }\n\n // Implemented as part of ControlValueAccessor.\n /** @ignore */\n writeValue(value: any) {\n this.value = value\n if (this._telInputDirective) {\n this._telInputDirective.value = value\n this._telInputDirective.updateValue()\n }\n }\n\n // Implemented as part of ControlValueAccessor.\n /** @ignore */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn\n }\n\n // Implemented as part of ControlValueAccessor.\n /** @ignore */\n registerOnTouched(fn: any) {\n this._onTouched = fn\n }\n\n // Implemented as part of ControlValueAccessor.\n /** @ignore */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled\n }\n\n /** Focuses the input. */\n public focus(): void {\n this._telInputDirective?.focus()\n }\n\n /** Unfocuses the input. */\n public blur(): void {\n this._telInputDirective?.blur()\n }\n\n public hasFocus(): boolean {\n return this._focusOrigin !== null && this._focusOrigin !== undefined\n }\n\n}\n","import { FormControl } from '@angular/forms'\n\nimport {\n getCountryCode,\n getDialCode,\n getIntlTelInputUtils,\n getValidationErrorMessage,\n globalIntlTelInputGlobals,\n processCountryCodes\n} from './utils'\n\nexport function telInputValidator(control: FormControl) {\n const value = control.value\n\n // This validator doesn't need to do anything if there isn't a value.\n if (typeof value !== 'string' || value.length === 0) {\n return Promise.resolve(null)\n }\n\n return getIntlTelInputUtils().then(utils => {\n const data = processCountryCodes(globalIntlTelInputGlobals().getCountryData())\n const dialCode = getDialCode(data, value)\n const countryCode = getCountryCode(data, dialCode)\n\n let number = value\n if (number.charAt(0) !== '+') {\n if (number.charAt(0) !== '1') { number = `1${number}` }\n number = `+${number}`\n }\n\n if (!utils.isValidNumber(number, countryCode)) {\n const code = utils.getValidationError(number, countryCode)\n const message = getValidationErrorMessage(code)\n return { 'telInput': { code, message } }\n }\n\n return null\n })\n}\n","import { ChangeDetectorRef, Pipe, PipeTransform } from '@angular/core'\n\nimport { intlTelInputUtils } from './intl-tel-input'\nimport { getCountryCode, getDialCode, getIntlTelInputUtils, globalIntlTelInputGlobals, processCountryCodes, TheSeamNumberFormatsInput } from './utils'\nimport { coercePhoneNumberFormat } from './utils'\n\n@Pipe({\n name: 'phoneNumber',\n pure: false\n})\nexport class TheSeamPhoneNumberPipe implements PipeTransform {\n\n private _latestPhoneNumber: string | undefined | null\n private _latestNumberFormat: TheSeamNumberFormatsInput | undefined | null\n private _latestValue: string | undefined | null\n\n constructor(private _cdr: ChangeDetectorRef) { }\n\n transform(\n phoneNumber: string,\n numberFormat: TheSeamNumberFormatsInput = intlTelInputUtils.numberFormat.INTERNATIONAL\n ): any {\n // console.log('transform', phoneNumber, numberFormat)\n if (this._latestPhoneNumber !== phoneNumber || this._latestNumberFormat !== numberFormat) {\n this._transform(phoneNumber, numberFormat)\n }\n this._latestPhoneNumber = phoneNumber\n this._latestNumberFormat = numberFormat\n\n // console.log('return', this._latestValue)\n return this._latestValue\n }\n\n async _transform(phoneNumber: string, numberFormat: TheSeamNumberFormatsInput) {\n // console.log('_transform', phoneNumber, numberFormat)\n const utils = await getIntlTelInputUtils()\n // console.log('utils', utils)\n\n const _format = coercePhoneNumberFormat(numberFormat)\n\n const data = processCountryCodes(globalIntlTelInputGlobals().getCountryData())\n const dialCode = getDialCode(data, phoneNumber)\n const countryCode = getCountryCode(data, dialCode)\n\n const number = phoneNumber\n // if (number.charAt(0) !== '+') {\n // if (number.charAt(0) !== '1') { number = `1${number}` }\n // number = `+${number}`\n // }\n\n const n = utils.formatNumber(number, countryCode, _format)\n // console.log('n', n)\n this._latestValue = n\n // this._cdr.markForCheck()\n this._cdr.detectChanges()\n }\n\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\n\nimport { TheSeamFormFieldModule } from '@theseam/ui-common/form-field'\n\nimport { TheSeamPhoneNumberPipe } from './phone-number.pipe'\nimport { TheSeamTelInputDirective } from './tel-input.directive'\nimport { TheSeamTelInputComponent } from './tel-input/tel-input.component'\n\n@NgModule({\n declarations: [\n TheSeamTelInputDirective,\n TheSeamTelInputComponent,\n TheSeamPhoneNumberPipe\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n TheSeamFormFieldModule\n ],\n exports: [\n TheSeamTelInputDirective,\n TheSeamTelInputComponent,\n TheSeamPhoneNumberPipe\n ]\n})\nexport class TheSeamTelInputModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;AAGA;IACiB,kBAsDhB;AAtDD,WAAiB,iBAAiB;IAUhC,IAAY,YAKX;IALD,WAAY,YAAY;QACtB,+CAAQ,CAAA;QACR,iEAAiB,CAAA;QACjB,uDAAY,CAAA;QACZ,qDAAW,CAAA;KACZ,EALW,YAAY,GAAZ,8BAAY,KAAZ,8BAAY,QAKvB;IAED,IAAY,UAaX;IAbD,WAAY,UAAU;QACpB,uDAAc,CAAA;QACd,+CAAU,CAAA;QACV,2EAAwB,CAAA;QACxB,qDAAa,CAAA;QACb,2DAAgB,CAAA;QAChB,yDAAe,CAAA;QACf,2CAAQ,CAAA;QACR,iEAAmB,CAAA;QACnB,6CAAS,CAAA;QACT,yCAAO,CAAA;QACP,sDAAc,CAAA;QACd,kDAAY,CAAA;KACb,EAbW,UAAU,GAAV,4BAAU,KAAV,4BAAU,QAarB;IAED,IAAY,eAMX;IAND,WAAY,eAAe;QACzB,mEAAe,CAAA;QACf,qFAAwB,CAAA;QACxB,+DAAa,CAAA;QACb,6DAAY,CAAA;QACZ,qEAAgB,CAAA;KACjB,EANW,eAAe,GAAf,iCAAe,KAAf,iCAAe,QAM1B;AAgBH,CAAC,EAtDgB,iBAAiB,KAAjB,iBAAiB,QAsDjC;AA4SD;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IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAA;SAC1B;KAAA;;;YAjDF,IAAI,SAAC;gBACJ,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,KAAK;aACZ;;;YATQ,iBAAiB;;;MC2Bb,qBAAqB;;;YAjBjC,QAAQ,SAAC;gBACR,YAAY,EAAE;oBACZ,wBAAwB;oBACxB,wBAAwB;oBACxB,sBAAsB;iBACvB;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,mBAAmB;oBACnB,sBAAsB;iBACvB;gBACD,OAAO,EAAE;oBACP,wBAAwB;oBACxB,wBAAwB;oBACxB,sBAAsB;iBACvB;aACF;;;AC1BD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"theseam-ui-common-tel-input.js","sources":["../../../projects/ui-common/tel-input/intl-tel-input.ts","../../../projects/ui-common/tel-input/tel-input-constants.ts","../../../projects/ui-common/tel-input/utils/add-country-code.ts","../../../projects/ui-common/tel-input/models/tel-input-number-format-name.ts","../../../projects/ui-common/tel-input/utils/coerce-phone-number-format.ts","../../../projects/ui-common/tel-input/utils/get-country-code.ts","../../../projects/ui-common/tel-input/utils/get-dial-code.ts","../../../projects/ui-common/tel-input/utils/get-global-intl-tel-input-globals.ts","../../../projects/ui-common/tel-input/utils/get-global-intl-tel-input-utils.ts","../../../projects/ui-common/tel-input/utils/get-intl-tel-input-utils.ts","../../../projects/ui-common/tel-input/utils/get-validation-error-message.ts","../../../projects/ui-common/tel-input/utils/process-country-codes.ts","../../../projects/ui-common/tel-input/tel-input.directive.ts","../../../projects/ui-common/tel-input/tel-input/tel-input.component.ts","../../../projects/ui-common/tel-input/tel-input-validator.ts","../../../projects/ui-common/tel-input/phone-number.pipe.ts","../../../projects/ui-common/tel-input/tel-input.module.ts","../../../projects/ui-common/tel-input/theseam-ui-common-tel-input.ts"],"sourcesContent":["import intlTelInput from 'intl-tel-input'\n\n//\n// NOTE: These types are mainly for providing types to 'intl-tel-input', because\n// the only published types I could find were incomplete. Some types are\n// missing, because they were not necessary for this library. I don't indend\n// this to be a perfect types for 'intl-tel-input', so as long as they are\n// compatible they may be slightly altered or extended to fit this library\n// better.\n//\n\n/**\n * Partial types for intl-tel-input-utils\n */\n// tslint:disable-next-line: no-namespace\nexport namespace intlTelInputUtils {\n\n export interface CountryData {\n name: string\n iso2: string\n dialCode: string\n areaCodes: string[] | null\n priority: number\n }\n\n export enum numberFormat {\n E164 = 0,\n INTERNATIONAL = 1,\n NATIONAL = 2,\n RFC3966 = 3\n }\n\n export enum numberType {\n FIXED_LINE = 0,\n MOBILE = 1,\n FIXED_LINE_OR_MOBILE = 2,\n TOLL_FREE = 3,\n PREMIUM_RATE = 4,\n SHARED_COST = 5,\n VOIP = 6,\n PERSONAL_NUMBER = 7,\n PAGER = 8,\n UAN = 9,\n VOICEMAIL = 10,\n UNKNOWN = -1\n }\n\n export enum validationError {\n IS_POSSIBLE = 0,\n INVALID_COUNTRY_CODE = 1,\n TOO_SHORT = 2,\n TOO_LONG = 3,\n NOT_A_NUMBER = 4\n }\n\n export type placeholderNumberType =\n | 'FIXED_LINE_OR_MOBILE'\n | 'FIXED_LINE'\n | 'MOBILE'\n | 'PAGER'\n | 'PERSONAL_NUMBER'\n | 'PREMIUM_RATE'\n | 'SHARED_COST'\n | 'TOLL_FREE'\n | 'UAN'\n | 'UNKNOWN'\n | 'VOICEMAIL'\n | 'VOIP'\n\n}\n\n// NOTE: If one of the functions return -99, then it is most likely from a\n// problem in 'google-libphonenumber' that 'intl-tel-input' swallowed in int\n// wrapper.\n//\n// NOTE: The following functions do not exist until util script has loaded.\nexport interface IntlTelInputUtilsScript {\n numberFormat: intlTelInputUtils.numberFormat\n numberType: intlTelInputUtils.numberType\n validationError: intlTelInputUtils.validationError\n\n /**\n * Format the given number to the given format.\n */\n formatNumber(number: string, countryCode: string, format: intlTelInputUtils.numberFormat): string\n\n /**\n * Get an example number for the given country code.\n */\n getExampleNumber(countryCode: string, national: boolean, numberType: intlTelInputUtils.numberType): string\n\n /**\n * Get the extension from the given number.\n */\n getExtension(number: string, countryCode: string): string\n\n /**\n * Get the type of the given number e.g. fixed-line/mobile.\n */\n getNumberType(number: string, countryCode: string): intlTelInputUtils.numberType\n\n /**\n * Get more info if the validation has failed e.g. too long/too short.\n */\n getValidationError(number: string, countryCode: string): intlTelInputUtils.validationError\n\n /**\n * Check if given number is valid.\n */\n isValidNumber(number: string, countryCode: string): boolean\n}\n\n/**\n * Partial types for intl-tel-input\n */\n// tslint:disable-next-line: no-namespace\nexport namespace IntlTelInput {\n export interface Static {\n /**\n * Default options for all instances\n */\n defaults: Options\n\n /**\n * Get all of the plugin's country data - either to re-use elsewhere\n * e.g. to populate a country dropdown.\n */\n getCountryData(): intlTelInputUtils.CountryData[]\n\n /**\n * Load the utils.js script (included in the lib directory) to enable\n * formatting/validation etc.\n */\n loadUtils(path: string, utilsScriptDeferred?: boolean): Promise<void> /* | null | void */\n }\n\n export interface Plugin {\n promise: Promise<void>\n\n /**\n * Remove the plugin from the input, and unbind any event listeners.\n */\n destroy(): void\n\n /**\n * Get the extension from the current number.\n * Requires the utilsScript option.\n * e.g. if the input value was \"(702) 555-5555 ext. 1234\", this would\n * return \"1234\".\n */\n getExtension(): string\n\n /**\n * Get the current number in the given format (defaults to E.164 standard).\n * The different formats are available in the enum\n * intlTelInputUtils.numberFormat - taken from here.\n * Requires the utilsScript option.\n * Note that even if nationalMode is enabled, this can still return a full\n * international number.\n * @param numberFormat the format in which the number will be returned.\n */\n getNumber(numberFormat?: intlTelInputUtils.numberFormat): string\n\n /**\n * Get the type (fixed-line/mobile/toll-free etc) of the current number.\n * Requires the utilsScript option.\n * Returns an integer, which you can match against the various options in the\n * global enum intlTelInputUtils.numberType.\n * Note that in the US there's no way to differentiate between fixed-line and\n * mobile numbers, so instead it will return FIXED_LINE_OR_MOBILE.\n */\n getNumberType(): intlTelInputUtils.numberType\n\n /**\n * Get the country data for the currently selected flag.\n */\n getSelectedCountryData(): intlTelInputUtils.CountryData\n\n /**\n * Get more information about a validation error.\n * Requires the utilsScript option.\n * Returns an integer, which you can match against the various options in the\n * global enum ValidationError\n */\n getValidationError(): intlTelInputUtils.validationError\n\n /**\n * Validate the current number. Expects an internationally formatted number\n * (unless nationalMode is enabled). If validation fails, you can use\n * getValidationError to get more information.\n * Requires the utilsScript option.\n * Also see getNumberType if you want to make sure the user enters a certain\n * type of number e.g. a mobile number.\n */\n isValidNumber(): boolean\n\n /**\n * Change the country selection (e.g. when the user is entering their address).\n * @param countryCode country code of the country to be set.\n */\n setCountry(countryCode: string): void\n\n /**\n * Insert a number, and update the selected flag accordingly.\n * Note that by default, if nationalMode is enabled it will try to use\n * national formatting.\n * @param aNumber number to be set.\n */\n setNumber(aNumber: string): void\n\n /**\n * Set the type of the placeholder number\n * @param type Placeholder number type to be set\n */\n setPlaceholderNumberType(type: intlTelInputUtils.placeholderNumberType): void\n }\n\n export interface Options {\n /**\n * Whether or not to allow the dropdown. If disabled, there is no dropdown\n * arrow, and the selected flag is not clickable. Also we display the\n * selected flag on the right instead because it is just a marker of state.\n * Default = true\n */\n allowDropdown?: boolean\n\n /**\n * If there is just a dial code in the input: remove it on blur or submit,\n * and re-add it on focus. This is to prevent just a dial code getting\n * submitted with the form. Requires nationalMode to be set to false.\n * Default = true\n */\n autoHideDialCode?: boolean\n\n /**\n * Set the input's placeholder to an example number for the selected country, and update it if the country changes.\n * You can specify the number type using the placeholderNumberType option.\n * By default it is set to \"polite\", which means it will only set the placeholder if the input doesn't already have one.\n * You can also set it to \"aggressive\", which will replace any existing placeholder, or \"off\".\n * Requires the utilsScript option.\n * Default = \"polite\"\n */\n autoPlaceholder?: 'off' | 'polite' | 'aggressive'\n\n /**\n * Change the placeholder generated by autoPlaceholder. Must return a string.\n * Default = null\n */\n customPlaceholder?: (selectedCountryPlaceholder: string, selectedCountryData: intlTelInputUtils.CountryData) => string\n\n /**\n * Expects a node e.g. document.body. Instead of putting the country dropdown next to the input,\n * append it to the specified node, and it will then be positioned absolutely next to the input using JavaScript.\n * This is useful when the input is inside a container with overflow: hidden.\n * Note that the absolute positioning can be broken by scrolling, so it will automatically close on the window scroll event.\n * Default = null\n */\n dropdownContainer?: Node\n\n /**\n * In the dropdown, display all countries except the ones you specify here.\n * Default = null\n */\n excludeCountries?: string[]\n\n /**\n * Format the input value (according to the nationalMode option) during initialisation, and on setNumber.\n * Requires the utilsScript option.\n * Default = true\n */\n formatOnDisplay?: boolean\n\n /**\n * When setting initialCountry to \"auto\", you must use this option to\n * specify a custom function that looks up the user's location,\n * and then calls the success callback with the relevant country code.\n * Also note that when instantiating the plugin, if the Promise object is defined,\n * one of those is returned under the promise instance property, so you can\n * do something like iti.promise.then(callback) to know when initialisation requests like this have completed.\n * Default = null\n */\n geoIpLookup?: (callback: (countryCode: string) => void) => void\n\n /**\n * Add a hidden input with the given name (or if your input name\n * contains square brackets then it will give the hidden input the same\n * name, replacing the contents of the brackets with the given name). On\n * submit, populate it with the full international number (using\n * getNumber). This is a quick way for people using non-ajax forms to\n * get the full international number, even when nationalMode is enabled.\n * Note: requires the input to be inside a form element, as this feature\n * works by listening for the submit event on the closest form element.\n * Also note that since this uses getNumber internally, it expects a\n * valid number, and so should only be used after validation. Default =\n * \"\"\n */\n hiddenInput?: string\n\n /**\n * Set the initial country selection by specifying it's country code.\n * You can also set it to \"auto\", which will lookup the user's country based\n * on their IP address (requires the geoIpLookup option).\n * Note that the \"auto\" option will not update the country selection if the\n * input already contains a number. If you leave initialCountry blank,\n * it will default to the first country in the list.\n */\n initialCountry?: string\n\n /**\n * Allows to translate the countries by its given iso code e.g.: { 'de': 'Deutschland' }\n * Default = {}\n */\n localizedCountries?: object\n\n /**\n * Allow users to enter national numbers (and not have to think about\n * international dial codes). Formatting, validation and placeholders still\n * work. Then you can use getNumber to extract a full international number.\n * This option now defaults to true, and it is recommended that you leave it\n * that way as it provides a better experience for the user.\n * Default = true\n */\n nationalMode?: boolean\n\n /**\n * In the dropdown, display only the countries you specify.\n * Default = undefined\n */\n onlyCountries?: string[]\n\n /**\n * Specify one of the keys from the global enum intlTelInputUtils.numberType\n * e.g. \"FIXED_LINE\" to set the number type to use for the placeholder.\n * Default = MOBILE\n */\n placeholderNumberType?: intlTelInputUtils.placeholderNumberType\n\n /**\n * Specify the countries to appear at the top of the list.\n * Default = [\"us\", \"gb\"]\n */\n preferredCountries?: string[]\n\n /**\n * Display the country dial code next to the selected flag so it's not part\n * of the typed number. Note that this will disable nationalMode because\n * technically we are dealing with international numbers, but with the\n * dial code separated.\n * Default = false\n */\n separateDialCode?: boolean\n\n /**\n * Enable formatting/validation etc. by specifying the URL of the\n * included utils.js script (or alternatively just point it to the file\n * on cdnjs.com). The script is fetched when the page has finished\n * loading (on the window load event) to prevent blocking (the script is\n * ~215KB). When instantiating the plugin, if the Promise object is\n * defined, one of those is returned under the promise instance\n * property, so you can do something like iti.promise.then(callback) to\n * know when initialisation requests like this have finished. Note that\n * if you're lazy loading the plugin script itself (intlTelInput.js)\n * this will not work and you will need to use the loadUtils method\n * instead. Example: \"build/js/utils.js\" Default = \"\"\n */\n utilsScript?: string\n }\n}\n\n/**\n * Initialise the plugin with optional options.\n * @param options options that can be provided during initialization.\n */\nexport function IntlTelInputFn(node: Element, options?: IntlTelInput.Options): IntlTelInput.Plugin {\n return (intlTelInput as any)(node, options)\n}\n\nexport default IntlTelInputFn\n","export const TEL_INPUT_ASSETS_PATH = 'assets/vendor/intl-tel-input'\n\nexport const TEL_INPUT_STYLES = `\n .iti { width: 100%; }\n\n .iti__flag {background-image: url(\"${TEL_INPUT_ASSETS_PATH}/img/flags.png\");}\n\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n .iti__flag {background-image: url(\"${TEL_INPUT_ASSETS_PATH}/img/flags@2x.png\");}\n }\n\n .iti__country-list {\n /* There is a bug that is causing the 'z-index: 2' from ng-select to conflict with this dropdown container. */\n z-index: 3;\n }\n`\n\nexport const TEL_INPUT_STYLESHEET_PATH = `${TEL_INPUT_ASSETS_PATH}/css/intlTelInput.min.css`\n\nexport const TEL_INPUT_UTILS_PATH = `${TEL_INPUT_ASSETS_PATH}/js/utils.js`\n","import type { TelInputCountryData } from '../models/index'\n\n/**\n * Add a country code to this.countryCodes.\n *\n * Based on: https://github.com/jackocnr/intl-tel-input/blob/4fe25fcf142c341a85b7b15cc307d66afb8573a3/src/js/intlTelInput.js#L197\n */\nexport function addCountryCode(data: TelInputCountryData, iso2: string, countryCode: string, priority?: number) {\n if (countryCode.length > data.countryCodeMaxLen) {\n data.countryCodeMaxLen = countryCode.length\n }\n if (!data.countryCodes.hasOwnProperty(countryCode)) {\n data.countryCodes[countryCode] = []\n }\n // bail if we already have this country for this countryCode\n for (let i = 0; i < data.countryCodes[countryCode].length; i++) {\n if (data.countryCodes[countryCode][i] === iso2) { return }\n }\n // check for undefined as 0 is falsy\n const index = (priority !== undefined) ? priority : data.countryCodes[countryCode].length\n data.countryCodes[countryCode][index] = iso2\n}\n","import { intlTelInputUtils } from '../intl-tel-input'\n\nexport const TelInputNumberFormatName: { [name: string]: intlTelInputUtils.numberFormat } = {\n 'E164': intlTelInputUtils.numberFormat.E164,\n 'INTERNATIONAL': intlTelInputUtils.numberFormat.INTERNATIONAL,\n 'NATIONAL': intlTelInputUtils.numberFormat.NATIONAL,\n 'RFC3966': intlTelInputUtils.numberFormat.RFC3966\n}\n","import { intlTelInputUtils } from '../intl-tel-input'\nimport { TelInputNumberFormatName } from '../models/index'\n\nexport const THESEAM_DEFAULT_PHONE_NUMBER_FORMAT = intlTelInputUtils.numberFormat.INTERNATIONAL\n\n/**\n * Types that should be acceptable in a template.\n */\nexport type TheSeamNumberFormatsInput =\n // Enum\n intlTelInputUtils.numberFormat\n // Strings matching enum\n | 'E164'\n | 'INTERNATIONAL'\n | 'NATIONAL'\n | 'RFC3966'\n // Strings matching enum in lower case, since it would be what a user will\n // most likely type if string is necessary.\n | 'e164'\n | 'international'\n | 'national'\n | 'rfc3966'\n\nexport function coercePhoneNumberFormat(\n format: TheSeamNumberFormatsInput,\n defaultFormat = THESEAM_DEFAULT_PHONE_NUMBER_FORMAT\n): intlTelInputUtils.numberFormat {\n let res = defaultFormat\n\n if (typeof format === 'string') {\n const _format = TelInputNumberFormatName[`${format}`.trim().toUpperCase()]\n res = (_format === undefined || _format === null) ? defaultFormat : _format\n } else if (typeof format === 'number') {\n // We could check for a number range, but I think it is safer to assume it's\n // valid if a number was provided. A number most likely means the value came\n // from using the enum and I don't want to accidentaly exclude a format that\n // we don't have documented.\n //\n // NOTE: We may want to limit it to specific numbers though and assume that\n // potentialy excluded formats are not intended to be used by this library.\n res = format\n }\n\n return res\n}\n","import type { TelInputCountryData } from '../models/index'\n\nfunction getNumeric(s: string): string {\n return s.replace(/\\D/g, '')\n}\n\nexport function getCountryCode(data: TelInputCountryData, dialCode: string) {\n const _countryCodes = data.countryCodes[getNumeric(dialCode)]\n // Refer to `_setInitialState` to get libraries default logic\n return (_countryCodes === undefined || _countryCodes === null || _countryCodes.length === 0) ? 'us' : _countryCodes[0]\n}\n","import type { TelInputCountryData } from '../models/index'\n\n/**\n * Try and extract a valid international dial code from a full telephone number.\n *\n * NOTE: returns the raw string inc plus character and any whitespace/dots etc.\n *\n * Based on: https://github.com/jackocnr/intl-tel-input/blob/4fe25fcf142c341a85b7b15cc307d66afb8573a3/src/js/intlTelInput.js#L1161\n */\nexport function getDialCode(data: TelInputCountryData, number: string, includeAreaCode: boolean = false): string {\n // console.log('getDialCode', number, includeAreaCode)\n // const data = processCountryCodes(globalIntlTelInputGlobals().getCountryData() as TelInputCountryData[])\n\n let dialCode = ''\n // only interested in international numbers (starting with a plus)\n if (number.charAt(0) === '+') {\n let numericChars = ''\n // iterate over chars\n for (let i = 0; i < number.length; i++) {\n const c = number.charAt(i)\n // if char is number (https://stackoverflow.com/a/8935649/217866)\n if (!isNaN(parseInt(c, 10))) {\n numericChars += c\n // if current numericChars make a valid dial code\n if (includeAreaCode) {\n if (data.countryCodes[numericChars]) {\n // store the actual raw string (useful for matching later)\n dialCode = number.substr(0, i + 1)\n }\n } else {\n if (data.dialCodes[numericChars]) {\n dialCode = number.substr(0, i + 1)\n // if we're just looking for a dial code, we can break as soon as we find one\n break\n }\n }\n // stop searching as soon as we can - in this case when we hit max len\n if (numericChars.length === data.countryCodeMaxLen) {\n break\n }\n }\n }\n }\n\n // console.log('getDialCode return', dialCode)\n return dialCode\n}\n","import type { IntlTelInput } from '../intl-tel-input'\n\nexport function globalIntlTelInputGlobals(): IntlTelInput.Static {\n return (window as any).intlTelInputGlobals\n}\n","import type { IntlTelInputUtilsScript } from '../intl-tel-input'\n\nexport function globalIntlTelInputUtils(): IntlTelInputUtilsScript {\n return (window as any).intlTelInputUtils\n}\n","import { notNullOrUndefined, waitOnConditionAsync } from '@theseam/ui-common/utils'\n\nimport type { IntlTelInputUtilsScript } from '../intl-tel-input'\nimport { TEL_INPUT_UTILS_PATH } from '../tel-input-constants'\nimport { globalIntlTelInputGlobals } from './get-global-intl-tel-input-globals'\nimport { globalIntlTelInputUtils } from './get-global-intl-tel-input-utils'\n\nexport function getIntlTelInputUtils(): Promise<IntlTelInputUtilsScript> {\n if (globalIntlTelInputUtils()) {\n return Promise.resolve(globalIntlTelInputUtils())\n }\n\n if ((globalIntlTelInputGlobals() as any).startedLoadingUtilsScript) {\n return waitOnConditionAsync(() => notNullOrUndefined(globalIntlTelInputUtils()), 5000)\n .then(() => globalIntlTelInputUtils())\n }\n\n return globalIntlTelInputGlobals().loadUtils(TEL_INPUT_UTILS_PATH)\n .then(() => waitOnConditionAsync(() => notNullOrUndefined(globalIntlTelInputUtils()), 5000))\n .then(() => globalIntlTelInputUtils())\n}\n","import { intlTelInputUtils } from '../intl-tel-input'\n\nexport const VALIDATOR_CODE_MESSAGES: { [key: number]: string } = {\n [intlTelInputUtils.validationError.INVALID_COUNTRY_CODE]: 'Country code is invalid.',\n [intlTelInputUtils.validationError.TOO_SHORT]: 'Number is too short.',\n [intlTelInputUtils.validationError.TOO_LONG]: 'Number is too long.',\n [intlTelInputUtils.validationError.NOT_A_NUMBER]: 'Must be numbers only.'\n}\n\nexport function getValidationErrorMessage(code: intlTelInputUtils.validationError): string {\n const message = VALIDATOR_CODE_MESSAGES[code]\n return message ?? 'Invalid number.'\n}\n","import type { intlTelInputUtils } from '../intl-tel-input'\nimport type { TelInputCountryData } from '../models/index'\nimport { addCountryCode } from './add-country-code'\n\n/**\n * Process the countryCodes map.\n *\n * Based on: https://github.com/jackocnr/intl-tel-input/blob/4fe25fcf142c341a85b7b15cc307d66afb8573a3/src/js/intlTelInput.js#L252\n */\nexport function processCountryCodes(countries: intlTelInputUtils.CountryData[]): TelInputCountryData {\n const data: TelInputCountryData = {\n countryCodeMaxLen: 0,\n // here we store just dial codes\n dialCodes: {},\n // here we store \"country codes\" (both dial codes and their area codes)\n countryCodes: {}\n }\n\n // first: add dial codes\n for (let i = 0; i < countries.length; i++) {\n const c = countries[i]\n if (!data.dialCodes[c.dialCode]) { data.dialCodes[c.dialCode] = true }\n addCountryCode(data, c.iso2, c.dialCode, c.priority)\n }\n\n // next: add area codes\n // this is a second loop over countries, to make sure we have all of the \"root\" countries\n // already in the map, so that we can access them, as each time we add an area code substring\n // to the map, we also need to include the \"root\" country's code, as that also matches\n for (let i = 0; i < countries.length; i++) {\n const c = countries[i]\n // area codes\n if (c.areaCodes) {\n const rootCountryCode = data.countryCodes[c.dialCode][0]\n // for each area code\n for (let j = 0; j < c.areaCodes.length; j++) {\n const areaCode = c.areaCodes[j]\n // for each digit in the area code to add all partial matches as well\n for (let k = 1; k < areaCode.length; k++) {\n const partialDialCode = c.dialCode + areaCode.substr(0, k)\n // start with the root country, as that also matches this dial code\n addCountryCode(data, rootCountryCode, partialDialCode)\n addCountryCode(data, c.iso2, partialDialCode)\n }\n // add the full area code\n addCountryCode(data, c.iso2, c.dialCode + areaCode)\n }\n }\n }\n\n return data\n}\n","import { DOCUMENT } from '@angular/common'\nimport { Directive, DoCheck, ElementRef, Host, HostBinding, Inject, Input, NgZone, OnDestroy, OnInit, Optional, Self } from '@angular/core'\nimport { fromEvent, merge, Subject } from 'rxjs'\nimport { auditTime, last, switchMap, takeUntil, tap } from 'rxjs/operators'\n\nimport { AssetLoaderService, LoadedAssetRef } from '@theseam/ui-common/services'\nimport { getAttribute, hasAttribute, notNullOrUndefined, toggleAttribute } from '@theseam/ui-common/utils'\n\n\nimport { NgControl } from '@angular/forms'\nimport { IntlTelInputFn, intlTelInputUtils } from './intl-tel-input'\nimport type { IntlTelInput } from './intl-tel-input'\nimport { TEL_INPUT_STYLES, TEL_INPUT_STYLESHEET_PATH, TEL_INPUT_UTILS_PATH } from './tel-input-constants'\nimport { globalIntlTelInputUtils } from './utils/index'\n\n@Directive({\n selector: 'input[seamTelInput]',\n exportAs: 'seamTelInput'\n})\nexport class TheSeamTelInputDirective implements OnInit, OnDestroy, DoCheck {\n private readonly _ngUnsubscribe = new Subject()\n\n private _instance: IntlTelInput.Plugin | undefined\n private _loadedAssetRefs: LoadedAssetRef<HTMLLinkElement | HTMLStyleElement>[] = []\n\n @HostBinding('attr.type') _attrType = 'tel'\n\n @Input()\n set value(v: string | undefined | null) {\n // console.log('set value', v, this._instance)\n this._value = v\n if (this._instance) {\n this._instance.setNumber(notNullOrUndefined(v) ? v : '')\n this.updateValue()\n }\n }\n get value(): string | undefined | null {\n if (this._instance) {\n return this._instance?.getNumber()\n }\n return this._value\n }\n private _value: string | undefined | null\n\n constructor(\n private readonly _elementRef: ElementRef<HTMLInputElement>,\n private readonly _assetLoader: AssetLoaderService,\n private readonly _ngZone: NgZone,\n @Optional() @Inject(DOCUMENT) private readonly _document?: any,\n @Optional() @Self() private readonly _ngControl?: NgControl,\n ) { }\n\n ngOnInit(): void {\n merge(\n this._assetLoader.loadStyleSheet(TEL_INPUT_STYLESHEET_PATH),\n this._assetLoader.loadStyle(TEL_INPUT_STYLES)\n ).pipe(\n // tap(v => console.log('loaded', v)),\n tap(v => this._loadedAssetRefs.push(v)),\n last(),\n // tap(v => console.log('StyleLoadingDone', v)),\n switchMap(() => {\n this._instance = IntlTelInputFn(this._elementRef.nativeElement, {\n utilsScript: TEL_INPUT_UTILS_PATH,\n preferredCountries: [ 'US' ],\n nationalMode: false,\n formatOnDisplay: true,\n autoPlaceholder: 'off',\n separateDialCode: false,\n autoHideDialCode: false,\n // TODO: Add initialCountry support.\n // initialCountry: 'auto'\n })\n\n this._tryUpdateDropdownAttributes()\n\n return this._instance.promise\n }),\n // tap(() => console.log('%c_instance ready', 'color:green', this._instance, this._elementRef.nativeElement.value)),\n tap(() => this._initDropdownListener()),\n tap(() => this.value = this._value),\n tap(this._formatIntlTelInput),\n switchMap(() => merge(\n fromEvent(this._elementRef.nativeElement, 'keyup'),\n fromEvent(this._elementRef.nativeElement, 'change')\n )),\n tap(this._formatIntlTelInput),\n takeUntil(this._ngUnsubscribe)\n ).subscribe()\n }\n\n ngOnDestroy(): void {\n this._instance?.destroy()\n for (const ref of this._loadedAssetRefs) {\n ref.destroy()\n }\n\n this._ngUnsubscribe.next()\n this._ngUnsubscribe.complete()\n }\n\n ngDoCheck() {\n this._tryUpdateDropdownAttributes()\n }\n\n private _tryUpdateDropdownAttributes() {\n const control = this._ngControl\n if (control) {\n const flagsContainer: HTMLElement | null | undefined = (this._instance as any)?.selectedFlag\n if (flagsContainer) {\n toggleAttribute(flagsContainer, 'aria-disabled', control.disabled ?? false)\n\n const disabled = control.disabled ?? false\n if (!disabled) {\n if (getAttribute(flagsContainer, 'tabindex') !== '0') {\n flagsContainer.setAttribute('tabindex', '0')\n }\n } else {\n if (hasAttribute(flagsContainer, 'tabindex')) {\n flagsContainer.removeAttribute('tabindex')\n }\n }\n }\n }\n }\n\n private _formatIntlTelInput = () => {\n // if (typeof intlTelInputUtils !== 'undefined') {\n // const currentText = this._instance?.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL)\n // console.log('currentText', currentText, this._instance?.getSelectedCountryData())\n // console.log(this._instance?.getValidationError())\n // if (typeof currentText === 'string') {\n // this._instance?.setNumber(currentText)\n // }\n // }\n\n this.updateValue()\n }\n\n public updateValue(): void {\n // console.log('%cupdateValue START', 'color:cyan', typeof intlTelInputUtils !== 'undefined')\n if (typeof globalIntlTelInputUtils() !== 'undefined') {\n const currentText = this._instance?.getNumber(intlTelInputUtils.numberFormat.E164)\n // console.log('currentText', currentText, this._instance?.getSelectedCountryData())\n // console.log('fullNumber', (this._instance as any)._getFullNumber())\n // console.log('E164', this._instance?.getNumber(intlTelInputUtils.numberFormat.E164))\n // console.log('INTERNATIONAL', this._instance?.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL))\n // console.log('NATIONAL', this._instance?.getNumber(intlTelInputUtils.numberFormat.NATIONAL))\n // console.log('RFC3966', this._instance?.getNumber(intlTelInputUtils.numberFormat.RFC3966))\n // console.log('getValidationError', this._instance?.getValidationError())\n if (typeof currentText === 'string') {\n this._instance?.setNumber(currentText)\n }\n }\n // console.log('%cupdateValue END', 'color:cyan')\n }\n\n public getFullNumber(): string | undefined | null {\n if (typeof globalIntlTelInputUtils() !== 'undefined' && this._instance) {\n // return (this._instance as any)._getFullNumber()\n return this._instance.getNumber(intlTelInputUtils.numberFormat.E164)\n }\n return this.value\n }\n\n private _initDropdownListener() {\n const doc = this._document\n if (!doc) {\n return\n }\n\n this._ngZone.runOutsideAngular(() => {\n const openDropdown$ = fromEvent(this._elementRef.nativeElement, 'open:countrydropdown')\n const closeDropdown$ = fromEvent(this._elementRef.nativeElement, 'close:countrydropdown')\n const instance = this._instance as any\n openDropdown$.pipe(\n switchMap(() => {\n const pressDown$ = merge(\n fromEvent(doc, 'touchstart', { capture: true }),\n fromEvent(doc, 'mousedown', { capture: true })\n ).pipe(\n auditTime(0),\n tap((event: any) => {\n if (instance.countryList.contains(event.target) || instance.selectedFlag.contains(event.target)) {\n return\n }\n instance._closeDropdown()\n })\n )\n\n const flagBtnClick$ = fromEvent<MouseEvent>(instance.selectedFlag, 'click').pipe(\n tap((event: MouseEvent) => {\n if (!this.isDropdownVisible()) {\n return\n }\n\n event.preventDefault()\n instance._closeDropdown()\n })\n )\n\n return merge(pressDown$, flagBtnClick$).pipe(takeUntil(closeDropdown$))\n }),\n takeUntil(this._ngUnsubscribe)\n ).subscribe()\n\n const flagsContainer: HTMLElement | null | undefined = (this._instance as any)?.selectedFlag\n if (flagsContainer) {\n fromEvent(flagsContainer, 'keydown', { capture: true }).pipe(\n tap((e: any) => {\n const control = this._ngControl\n if (control) {\n const disabled = control.disabled ?? false\n if (disabled && ['ArrowUp', 'Up', 'ArrowDown', 'Down', ' ', 'Enter'].indexOf(e.key) !== -1) {\n // prevent form from being submitted if \"ENTER\" was pressed\n e.preventDefault()\n // prevent event from being handled again by document\n e.stopPropagation()\n }\n }\n }),\n takeUntil(this._ngUnsubscribe)\n ).subscribe()\n }\n })\n }\n\n public isDropdownVisible() {\n if (!this._instance) {\n return false\n }\n\n const instance = this._instance as any\n return !instance.countryList.classList.contains('iti__hide')\n }\n\n /** Focuses the input. */\n public focus(): void {\n this._elementRef.nativeElement.focus()\n }\n\n /** Unfocuses the input. */\n public blur(): void {\n this._elementRef.nativeElement.blur()\n }\n\n public getHostElement(): HTMLInputElement {\n return this._elementRef.nativeElement\n }\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y'\nimport { BooleanInput, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion'\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n InjectFlags,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core'\nimport { ControlValueAccessor, FormControl, NgControl, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { defer, fromEvent, merge, Observable, of, Subject } from 'rxjs'\nimport { auditTime, map, switchMap, takeUntil } from 'rxjs/operators'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { InputDirective } from '@theseam/ui-common/form-field'\n\nimport { TheSeamTelInputDirective } from '../tel-input.directive'\n\n// TODO: Fix focus\n// TODO: Fix disabled\n\n@Component({\n selector: 'seam-tel-input',\n templateUrl: './tel-input.component.html',\n styleUrls: ['./tel-input.component.scss'],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n // tslint:disable-next-line: no-use-before-declare\n useExisting: forwardRef(() => TheSeamTelInputComponent),\n multi: true\n }],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TheSeamTelInputComponent implements OnInit, OnDestroy, ControlValueAccessor {\n static ngAcceptInputType_required: BooleanInput\n static ngAcceptInputType_disabled: BooleanInput\n\n /** @ignore */\n private readonly _ngUnsubscribe = new Subject()\n\n /** @ignore */\n readonly _control = new FormControl()\n\n private _focusOrigin: FocusOrigin = null\n\n _hasInvalidCss$: Observable<boolean>\n\n @Input() @InputBoolean() required: boolean = false\n\n @Input()\n get disabled(): boolean { return this._disabled }\n set disabled(value: boolean) {\n const newValue = coerceBooleanProperty(value)\n\n if (this._control.disabled !== newValue) {\n if (newValue) {\n this._control.disable()\n } else {\n this._control.enable()\n }\n }\n\n if (newValue !== this.disabled) {\n this._disabled = newValue\n this._changeDetectorRef.markForCheck()\n }\n }\n /** @ignore */\n private _disabled = false\n\n /**\n * Set the tab index to `-1` to allow the root element of the\n * component to receive `focus` event from javascript, but not get focused by\n * keyboard navigation.\n */\n @Input()\n set tabIndex(value: number) { this._tabIndex = coerceNumberProperty(value) }\n get tabIndex(): number { return this._tabIndex }\n private _tabIndex = -1\n\n @HostBinding('attr.disabled')\n get _attrDisabled() { return this.disabled || null }\n\n @HostBinding('attr.tabindex')\n get _attrTabIndex() { return this.disabled ? -1 : (this.tabIndex || 0) }\n\n /** Name value will be applied to the input element if present */\n @Input() name: string | undefined | null = null\n\n /** The value attribute of the native input element */\n @Input() value: string | undefined | null\n\n /** Event emitted when the \"tel\" input value changes. */\n @Output() readonly change = new EventEmitter<string>()\n\n /**\n * The telInput directive\n * @ignore\n */\n @ViewChild(TheSeamTelInputDirective, { static: true }) _telInputDirective?: TheSeamTelInputDirective\n\n /**\n * The telInput directive\n * @ignore\n */\n @ViewChild(InputDirective, { static: true }) _inputDirective?: InputDirective\n\n /**\n * The native `<input type=\"tel\">` element\n * @ignore\n */\n @ViewChild('input', { static: true }) _inputElementRef?: ElementRef<HTMLInputElement>\n\n @HostListener('focus', [ '$event' ])\n _onFocus() {\n this._telInputDirective?.focus()\n }\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @ignore\n */\n _onTouched: () => any = () => {}\n\n /** @ignore */\n private _controlValueAccessorChangeFn: (value: any) => void = () => {}\n\n constructor(\n private readonly _changeDetectorRef: ChangeDetectorRef,\n private readonly _injector: Injector,\n private readonly _elementRef: ElementRef,\n private readonly _focusMonitor: FocusMonitor\n ) {\n const telInputBlurEvent$ = this._telInputDirective\n ? fromEvent(this._telInputDirective.getHostElement(), 'blur')\n : of<Event>()\n\n this._hasInvalidCss$ = defer(() => of((this._injector.get(NgControl, null, InjectFlags.Self)?.control) || undefined)).pipe(\n switchMap(control => {\n if (control) {\n return merge(\n control.valueChanges,\n control.statusChanges,\n telInputBlurEvent$\n ).pipe(\n auditTime(0),\n map(() => {\n const inputControl = this._inputDirective?.ngControl\n return control.invalid && (inputControl?.dirty as boolean || inputControl?.touched as boolean)\n })\n )\n }\n return of(false)\n })\n )\n }\n\n /** @ignore */\n ngOnInit(): void {\n this._focusMonitor.monitor(this._elementRef, true).pipe(\n takeUntil(this._ngUnsubscribe)\n ).subscribe(origin => this._focusOrigin = origin)\n\n this._control.valueChanges.pipe(\n takeUntil(this._ngUnsubscribe)\n ).subscribe(v => {\n const value = this._telInputDirective?.getFullNumber()\n this.value = value\n if (this._controlValueAccessorChangeFn) {\n this._controlValueAccessorChangeFn(value)\n }\n })\n }\n\n /** @ignore */\n ngOnDestroy(): void {\n this._focusMonitor.stopMonitoring(this._elementRef)\n\n this._ngUnsubscribe.next()\n this._ngUnsubscribe.complete()\n }\n\n // Implemented as part of ControlValueAccessor.\n /** @ignore */\n writeValue(value: any) {\n this.value = value\n if (this._telInputDirective) {\n this._telInputDirective.value = value\n this._telInputDirective.updateValue()\n }\n }\n\n // Implemented as part of ControlValueAccessor.\n /** @ignore */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn\n }\n\n // Implemented as part of ControlValueAccessor.\n /** @ignore */\n registerOnTouched(fn: any) {\n this._onTouched = fn\n }\n\n // Implemented as part of ControlValueAccessor.\n /** @ignore */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled\n }\n\n /** Focuses the input. */\n public focus(): void {\n this._telInputDirective?.focus()\n }\n\n /** Unfocuses the input. */\n public blur(): void {\n this._telInputDirective?.blur()\n }\n\n public hasFocus(): boolean {\n return this._focusOrigin !== null && this._focusOrigin !== undefined\n }\n\n}\n","import { FormControl } from '@angular/forms'\n\nimport {\n getCountryCode,\n getDialCode,\n getIntlTelInputUtils,\n getValidationErrorMessage,\n globalIntlTelInputGlobals,\n processCountryCodes\n} from './utils'\n\nexport function telInputValidator(control: FormControl) {\n const value = control.value\n\n // This validator doesn't need to do anything if there isn't a value.\n if (typeof value !== 'string' || value.length === 0) {\n return Promise.resolve(null)\n }\n\n return getIntlTelInputUtils().then(utils => {\n const data = processCountryCodes(globalIntlTelInputGlobals().getCountryData())\n const dialCode = getDialCode(data, value)\n const countryCode = getCountryCode(data, dialCode)\n\n let number = value\n if (number.charAt(0) !== '+') {\n if (number.charAt(0) !== '1') { number = `1${number}` }\n number = `+${number}`\n }\n\n if (!utils.isValidNumber(number, countryCode)) {\n const code = utils.getValidationError(number, countryCode)\n const message = getValidationErrorMessage(code)\n return { 'telInput': { code, message } }\n }\n\n return null\n })\n}\n","import { ChangeDetectorRef, Pipe, PipeTransform } from '@angular/core'\n\nimport { intlTelInputUtils } from './intl-tel-input'\nimport { getCountryCode, getDialCode, getIntlTelInputUtils, globalIntlTelInputGlobals, processCountryCodes, TheSeamNumberFormatsInput } from './utils'\nimport { coercePhoneNumberFormat } from './utils'\n\n@Pipe({\n name: 'phoneNumber',\n pure: false\n})\nexport class TheSeamPhoneNumberPipe implements PipeTransform {\n\n private _latestPhoneNumber: string | undefined | null\n private _latestNumberFormat: TheSeamNumberFormatsInput | undefined | null\n private _latestValue: string | undefined | null\n\n constructor(private _cdr: ChangeDetectorRef) { }\n\n transform(\n phoneNumber: string,\n numberFormat: TheSeamNumberFormatsInput = intlTelInputUtils.numberFormat.INTERNATIONAL\n ): any {\n // console.log('transform', phoneNumber, numberFormat)\n if (this._latestPhoneNumber !== phoneNumber || this._latestNumberFormat !== numberFormat) {\n this._transform(phoneNumber, numberFormat)\n }\n this._latestPhoneNumber = phoneNumber\n this._latestNumberFormat = numberFormat\n\n // console.log('return', this._latestValue)\n return this._latestValue\n }\n\n async _transform(phoneNumber: string, numberFormat: TheSeamNumberFormatsInput) {\n // console.log('_transform', phoneNumber, numberFormat)\n const utils = await getIntlTelInputUtils()\n // console.log('utils', utils)\n\n const _format = coercePhoneNumberFormat(numberFormat)\n\n const data = processCountryCodes(globalIntlTelInputGlobals().getCountryData())\n const dialCode = getDialCode(data, phoneNumber)\n const countryCode = getCountryCode(data, dialCode)\n\n const number = phoneNumber\n // if (number.charAt(0) !== '+') {\n // if (number.charAt(0) !== '1') { number = `1${number}` }\n // number = `+${number}`\n // }\n\n const n = utils.formatNumber(number, countryCode, _format)\n // console.log('n', n)\n this._latestValue = n\n // this._cdr.markForCheck()\n this._cdr.detectChanges()\n }\n\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\n\nimport { TheSeamFormFieldModule } from '@theseam/ui-common/form-field'\n\nimport { TheSeamPhoneNumberPipe } from './phone-number.pipe'\nimport { TheSeamTelInputDirective } from './tel-input.directive'\nimport { TheSeamTelInputComponent } from './tel-input/tel-input.component'\n\n@NgModule({\n declarations: [\n TheSeamTelInputDirective,\n TheSeamTelInputComponent,\n TheSeamPhoneNumberPipe\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n TheSeamFormFieldModule\n ],\n exports: [\n TheSeamTelInputDirective,\n TheSeamTelInputComponent,\n TheSeamPhoneNumberPipe\n ]\n})\nexport class TheSeamTelInputModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;AAGA;IACiB,kBAsDhB;AAtDD,WAAiB,iBAAiB;IAUhC,IAAY,YAKX;IALD,WAAY,YAAY;QACtB,+CAAQ,CAAA;QACR,iEAAiB,CAAA;QACjB,uDAAY,CAAA;QACZ,qDAAW,CAAA;KACZ,EALW,YAAY,GAAZ,8BAAY,KAAZ,8BAAY,QAKvB;IAED,IAAY,UAaX;IAbD,WAAY,UAAU;QACpB,uDAAc,CAAA;QACd,+CAAU,CAAA;QACV,2EAAwB,CAAA;QACxB,qDAAa,CAAA;QACb,2DAAgB,CAAA;QAChB,yDAAe,CAAA;QACf,2CAAQ,CAAA;QACR,iEAAmB,CAAA;QACnB,6CAAS,CAAA;QACT,yCAAO,CAAA;QACP,sDAAc,CAAA;QACd,kDAAY,CAAA;KACb,EAbW,UAAU,GAAV,4BAAU,KAAV,4BAAU,QAarB;IAED,IAAY,eAMX;IAND,WAAY,eAAe;QACzB,mEAAe,CAAA;QACf,qFAAwB,CAAA;QACxB,+DAAa,CAAA;QACb,6DAAY,CAAA;QACZ,qEAAgB,CAAA;KACjB,EANW,eAAe,GAAf,iCAAe,KAAf,iCAAe,QAM1B;AAgBH,CAAC,EAtDgB,iBAAiB,KAAjB,iBAAiB,QAsDjC;AA4SD;;;;SAIgB,cAAc,CAAC,IAAa,EAAE,OAA8B;IAC1E,OAAQ,YAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AAC7C;;MCvXa,qBAAqB,GAAG,+BAA8B;MAEtD,gBAAgB,GAAG;;;uCAGO,qBAAqB;;;yCAGnB,qBAAqB;;;;;;;EAO7D;MAEY,y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AAA;YAC9E,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;YAC/C,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;YAElD,MAAM,MAAM,GAAG,WAAW,CAAA;;;;;YAM1B,MAAM,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;;YAE1D,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;;YAErB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAA;SAC1B;KAAA;;;YAjDF,IAAI,SAAC;gBACJ,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,KAAK;aACZ;;;YATQ,iBAAiB;;;MC2Bb,qBAAqB;;;YAjBjC,QAAQ,SAAC;gBACR,YAAY,EAAE;oBACZ,wBAAwB;oBACxB,wBAAwB;oBACxB,sBAAsB;iBACvB;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,mBAAmB;oBACnB,sBAAsB;iBACvB;gBACD,OAAO,EAAE;oBACP,wBAAwB;oBACxB,wBAAwB;oBACxB,sBAAsB;iBACvB;aACF;;;AC1BD;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theseam-ui-common-testing.js","sources":["../../../projects/ui-common/testing/fake-toastr.ts","../../../projects/ui-common/testing/render-story.ts","../../../projects/ui-common/testing/tick-helper.ts","../../../projects/ui-common/testing/current-tick-time.ts","../../../projects/ui-common/testing/story-expect.ts","../../../projects/ui-common/testing/get-harness.ts","../../../projects/ui-common/testing/theseam-ui-common-testing.ts"],"sourcesContent":["import { ActiveToast, GlobalConfig, IndividualConfig, ToastContainerDirective } from 'ngx-toastr'\n\nexport class FakeToastrService {\n toastrConfig!: GlobalConfig\n currentlyActive = 0\n toasts: ActiveToast<any>[] = []\n overlayContainer!: ToastContainerDirective\n previousToastMessage: string | undefined\n\n /** show toast */\n show(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {},\n type = ''\n ) { }\n\n /** show successful toast */\n success(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) { }\n\n /** show error toast */\n error(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) { }\n\n /** show info toast */\n info(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) { }\n\n /** show warning toast */\n warning(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) { }\n\n /**\n * Remove all or a single toast by id\n */\n clear(toastId?: number) { }\n\n /**\n * Remove and destroy a single toast by id\n */\n remove(toastId: number) { }\n\n /**\n * Determines if toast message is already shown\n */\n findDuplicate(message: string, resetOnDuplicate: boolean, countDuplicates: boolean) { }\n\n}\n","import { createMountableStoryComponent } from '@storybook/testing-angular'\nimport { render, RenderResult } from '@testing-library/angular'\n\n// NOTE: This is an experimental attempt at removing some of the boilerplate. If\n// this ends up being worth it, then I will add it to `@storybook/testing-angular`.\nexport async function renderStory<ComponentType = any>(story: any): Promise<RenderResult<ComponentType, ComponentType>> {\n const { component, ngModule } = createMountableStoryComponent(\n story({}, {} as any)\n )\n return await render(component, { imports: [ ngModule ] })\n}\n","import { tick } from '@angular/core/testing'\n\n/**\n * Helps advance tests to specific elapsed times.\n *\n * # When to use\n *\n * If a test needs to do something at 100 ticks, but expected values should\n * also be tested at multiple ticks before 100 ticks, then the previous tick\n * sum needs to be counted. If the elapsed can be easily counted by just\n * skimming the code you should just use `tick()`.\n *\n * The following example is simple enough that `tick()` is probably better, but\n * it shows how it is used.\n *\n * ## Example without\n *\n * ```ts\n * const thing = new Thing()\n * thing.dieAfterTicks(100)\n *\n * tick(25)\n * expect(thing.isAlive).toBe(true)\n *\n * tick(25)\n * expect(thing.isAlive).toBe(true)\n *\n * tick(25)\n * expect(thing.isAlive).toBe(true)\n *\n * tick(25)\n * expect(thing.isAlive).toBe(false)\n * ```\n *\n * ## Example with\n *\n * ```ts\n * const t = new TickHelper()\n * const thing = new Thing()\n * thing.dieAfterTicks(100)\n *\n * t.tickTo(25)\n * expect(thing.isAlive).toBe(true)\n *\n * t.tickTo(50)\n * expect(thing.isAlive).toBe(true)\n *\n * t.tickTo(75)\n * expect(thing.isAlive).toBe(true)\n *\n * t.tickTo(100)\n * expect(thing.isAlive).toBe(false)\n * ```\n */\nexport class TickHelper {\n\n private _startTime = Date.now()\n\n /**\n * Returns the number of ticks that have elapsed since this class was\n * initialized.\n */\n public get ticksElapsed() { return Date.now() - this._startTime }\n\n /**\n * Calls `tick()` for the remaining number of ticks to reach elapsed ticks.\n *\n * ```\n * const t = new TickHelper()\n * tick(3)\n * t.tickTo(10) // Equivalent to `tick(7)` in this case to reach 10 ticks.\n * ```\n */\n public tickTo(ticks: number) { tick(ticks - this.ticksElapsed) }\n\n}\n","\
|
|
1
|
+
{"version":3,"file":"theseam-ui-common-testing.js","sources":["../../../projects/ui-common/testing/fake-toastr.ts","../../../projects/ui-common/testing/render-story.ts","../../../projects/ui-common/testing/tick-helper.ts","../../../projects/ui-common/testing/current-tick-time.ts","../../../projects/ui-common/testing/story-expect.ts","../../../projects/ui-common/testing/get-harness.ts","../../../projects/ui-common/testing/theseam-ui-common-testing.ts"],"sourcesContent":["import { ActiveToast, GlobalConfig, IndividualConfig, ToastContainerDirective } from 'ngx-toastr'\n\nexport class FakeToastrService {\n toastrConfig!: GlobalConfig\n currentlyActive = 0\n toasts: ActiveToast<any>[] = []\n overlayContainer!: ToastContainerDirective\n previousToastMessage: string | undefined\n\n /** show toast */\n show(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {},\n type = ''\n ) { }\n\n /** show successful toast */\n success(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) { }\n\n /** show error toast */\n error(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) { }\n\n /** show info toast */\n info(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) { }\n\n /** show warning toast */\n warning(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) { }\n\n /**\n * Remove all or a single toast by id\n */\n clear(toastId?: number) { }\n\n /**\n * Remove and destroy a single toast by id\n */\n remove(toastId: number) { }\n\n /**\n * Determines if toast message is already shown\n */\n findDuplicate(message: string, resetOnDuplicate: boolean, countDuplicates: boolean) { }\n\n}\n","import { createMountableStoryComponent } from '@storybook/testing-angular'\nimport { render, RenderResult } from '@testing-library/angular'\n\n// NOTE: This is an experimental attempt at removing some of the boilerplate. If\n// this ends up being worth it, then I will add it to `@storybook/testing-angular`.\nexport async function renderStory<ComponentType = any>(story: any): Promise<RenderResult<ComponentType, ComponentType>> {\n const { component, ngModule } = createMountableStoryComponent(\n story({}, {} as any)\n )\n return await render(component, { imports: [ ngModule ] })\n}\n","import { tick } from '@angular/core/testing'\n\n/**\n * Helps advance tests to specific elapsed times.\n *\n * # When to use\n *\n * If a test needs to do something at 100 ticks, but expected values should\n * also be tested at multiple ticks before 100 ticks, then the previous tick\n * sum needs to be counted. If the elapsed can be easily counted by just\n * skimming the code you should just use `tick()`.\n *\n * The following example is simple enough that `tick()` is probably better, but\n * it shows how it is used.\n *\n * ## Example without\n *\n * ```ts\n * const thing = new Thing()\n * thing.dieAfterTicks(100)\n *\n * tick(25)\n * expect(thing.isAlive).toBe(true)\n *\n * tick(25)\n * expect(thing.isAlive).toBe(true)\n *\n * tick(25)\n * expect(thing.isAlive).toBe(true)\n *\n * tick(25)\n * expect(thing.isAlive).toBe(false)\n * ```\n *\n * ## Example with\n *\n * ```ts\n * const t = new TickHelper()\n * const thing = new Thing()\n * thing.dieAfterTicks(100)\n *\n * t.tickTo(25)\n * expect(thing.isAlive).toBe(true)\n *\n * t.tickTo(50)\n * expect(thing.isAlive).toBe(true)\n *\n * t.tickTo(75)\n * expect(thing.isAlive).toBe(true)\n *\n * t.tickTo(100)\n * expect(thing.isAlive).toBe(false)\n * ```\n */\nexport class TickHelper {\n\n private _startTime = Date.now()\n\n /**\n * Returns the number of ticks that have elapsed since this class was\n * initialized.\n */\n public get ticksElapsed() { return Date.now() - this._startTime }\n\n /**\n * Calls `tick()` for the remaining number of ticks to reach elapsed ticks.\n *\n * ```\n * const t = new TickHelper()\n * tick(3)\n * t.tickTo(10) // Equivalent to `tick(7)` in this case to reach 10 ticks.\n * ```\n */\n public tickTo(ticks: number) { tick(ticks - this.ticksElapsed) }\n\n}\n","\n/**\n * When using `fakeAsync` this can access the internal currentTickTime of the\n * fake zone's scheduler.\n *\n * NOTE: Do **NOT** rely on this in tests. It is accesses private properties\n * that could break or change at any time, which could cause it to not have the\n * same meaning and be inaccurate in a future version.\n *\n * NOTE: This is accessing private properties, so I don't recommend relying on\n * this in tests. I find it useful to sometimes set this on a global property\n * that I can observe in the debugger's watch variables.\n */\nexport function currentTickTime(documentWindow: any = window): number {\n return documentWindow.Zone.current._properties.FakeAsyncTestZoneSpec._scheduler._currentTickTime\n}\n","import { default as expectPatched } from '@storybook/expect'\nimport { instrument } from '@storybook/instrumenter'\nimport * as mock from 'jest-mock'\n\nexport const { jest } = instrument({ jest: mock })\n\n// const expectJasmineFn = (window as any).expect\nconst expectJestFn = expectPatched\n// const isInJasmine = expectJasmineFn !== undefined && expectJasmineFn !== null\n// const expectFn = expectJasmineFn || exp\nconst isInJasmine = false\n\n// console.log('isInJasmine', isInJasmine)\n\nconst { expect } = instrument(\n // { expect: expectJasmineFn || expectJestFn },\n { expect: expectJestFn },\n // { intercept: (method, path) => path[0] !== 'expect' }\n { intercept: (method, path) => {\n // console.log('intercept', method, path)\n return path[0] !== 'expect'\n } }\n)\n\n\n\n\n\nfunction toBeFn(matcher: any): (value: any) => Promise<void> {\n // if (isInJasmine) {\n // // @ts-ignore\n // const m = matcher as jasmine.Matchers<any>\n // return async (value: any) => m.toBe(value) as any\n // } else {\n // const m = matcher as ReturnType<typeof expectJestFn>\n // return async (value: any) => m.toBe(value) as any\n // }\n const m = matcher as ReturnType<typeof expectJestFn>\n return async (value: any) => m.toBe(value) as any\n}\n\nexport function expectFn(value: any) {\n // const t = isInJasmine ? expectJasmineFn(value) : expect(value)\n const t = expect(value)\n return {\n toBe: toBeFn(t)\n }\n}\n","import { ComponentHarness, ComponentHarnessConstructor } from '@angular/cdk/testing'\nimport { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'\nimport { ComponentFixture } from '@angular/core/testing'\n\nimport { StorybookHarnessEnvironment } from '@marklb/storybook-harness'\n\nexport interface GetHarnessOptions<TComponent = any> {\n canvasElement?: HTMLElement\n fixture?: ComponentFixture<TComponent>\n}\n\nexport async function getHarness<T extends ComponentHarness>(\n harnessType: ComponentHarnessConstructor<T>,\n options: GetHarnessOptions\n): Promise<T> {\n if (options.fixture !== undefined) {\n return TestbedHarnessEnvironment.harnessForFixture(options.fixture, harnessType)\n }\n\n if (options.canvasElement !== undefined) {\n return (new StorybookHarnessEnvironment(options.canvasElement))\n .getHarness(harnessType)\n }\n\n throw Error(`Unable to get harness. fixture or canvasElement must be provided.`)\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAEa,iBAAiB;IAA9B;QAEE,oBAAe,GAAG,CAAC,CAAA;QACnB,WAAM,GAAuB,EAAE,CAAA;KAuDhC;;IAlDC,IAAI,CACF,OAAgB,EAChB,KAAc,EACd,WAAsC,EAAE,EACxC,IAAI,GAAG,EAAE,KACN;;IAGL,OAAO,CACL,OAAgB,EAChB,KAAc,EACd,WAAsC,EAAE,KACrC;;IAGL,KAAK,CACH,OAAgB,EAChB,KAAc,EACd,WAAsC,EAAE,KACrC;;IAGL,IAAI,CACF,OAAgB,EAChB,KAAc,EACd,WAAsC,EAAE,KACrC;;IAGL,OAAO,CACL,OAAgB,EAChB,KAAc,EACd,WAAsC,EAAE,KACrC;;;;IAKL,KAAK,CAAC,OAAgB,KAAK;;;;IAK3B,MAAM,CAAC,OAAe,KAAK;;;;IAK3B,aAAa,CAAC,OAAe,EAAE,gBAAyB,EAAE,eAAwB,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