@theseam/ui-common 1.0.0-beta.0 → 1.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/breadcrumbs/index.d.ts +1 -2
  2. package/buttons/index.d.ts +20 -13
  3. package/datatable/index.d.ts +77 -39
  4. package/dynamic/index.d.ts +5 -5
  5. package/fesm2022/theseam-ui-common-asset-reader.mjs +28 -29
  6. package/fesm2022/theseam-ui-common-asset-reader.mjs.map +1 -1
  7. package/fesm2022/theseam-ui-common-breadcrumbs.mjs +25 -31
  8. package/fesm2022/theseam-ui-common-breadcrumbs.mjs.map +1 -1
  9. package/fesm2022/theseam-ui-common-buttons.mjs +108 -66
  10. package/fesm2022/theseam-ui-common-buttons.mjs.map +1 -1
  11. package/fesm2022/theseam-ui-common-card.mjs +21 -21
  12. package/fesm2022/theseam-ui-common-card.mjs.map +1 -1
  13. package/fesm2022/theseam-ui-common-carousel.mjs +28 -30
  14. package/fesm2022/theseam-ui-common-carousel.mjs.map +1 -1
  15. package/fesm2022/theseam-ui-common-checkbox.mjs +27 -27
  16. package/fesm2022/theseam-ui-common-checkbox.mjs.map +1 -1
  17. package/fesm2022/theseam-ui-common-confirm-dialog.mjs +23 -27
  18. package/fesm2022/theseam-ui-common-confirm-dialog.mjs.map +1 -1
  19. package/fesm2022/theseam-ui-common-core.mjs +31 -11
  20. package/fesm2022/theseam-ui-common-core.mjs.map +1 -1
  21. package/fesm2022/theseam-ui-common-data-exporter.mjs +18 -19
  22. package/fesm2022/theseam-ui-common-data-exporter.mjs.map +1 -1
  23. package/fesm2022/theseam-ui-common-data-filters.mjs +80 -64
  24. package/fesm2022/theseam-ui-common-data-filters.mjs.map +1 -1
  25. package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs +51 -49
  26. package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs.map +1 -1
  27. package/fesm2022/theseam-ui-common-datatable-dynamic.mjs +145 -112
  28. package/fesm2022/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
  29. package/fesm2022/theseam-ui-common-datatable.mjs +727 -420
  30. package/fesm2022/theseam-ui-common-datatable.mjs.map +1 -1
  31. package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs +12 -14
  32. package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs.map +1 -1
  33. package/fesm2022/theseam-ui-common-dynamic.mjs +60 -48
  34. package/fesm2022/theseam-ui-common-dynamic.mjs.map +1 -1
  35. package/fesm2022/theseam-ui-common-footer-bar.mjs +9 -15
  36. package/fesm2022/theseam-ui-common-footer-bar.mjs.map +1 -1
  37. package/fesm2022/theseam-ui-common-form-field-error.mjs +60 -43
  38. package/fesm2022/theseam-ui-common-form-field-error.mjs.map +1 -1
  39. package/fesm2022/theseam-ui-common-form-field.mjs +129 -76
  40. package/fesm2022/theseam-ui-common-form-field.mjs.map +1 -1
  41. package/fesm2022/theseam-ui-common-framework.mjs +669 -543
  42. package/fesm2022/theseam-ui-common-framework.mjs.map +1 -1
  43. package/fesm2022/theseam-ui-common-google-maps.mjs +206 -149
  44. package/fesm2022/theseam-ui-common-google-maps.mjs.map +1 -1
  45. package/fesm2022/theseam-ui-common-graphql.mjs +311 -254
  46. package/fesm2022/theseam-ui-common-graphql.mjs.map +1 -1
  47. package/fesm2022/theseam-ui-common-icon.mjs +125 -89
  48. package/fesm2022/theseam-ui-common-icon.mjs.map +1 -1
  49. package/fesm2022/theseam-ui-common-layout.mjs +18 -26
  50. package/fesm2022/theseam-ui-common-layout.mjs.map +1 -1
  51. package/fesm2022/theseam-ui-common-loading.mjs +19 -28
  52. package/fesm2022/theseam-ui-common-loading.mjs.map +1 -1
  53. package/fesm2022/theseam-ui-common-menu.mjs +124 -95
  54. package/fesm2022/theseam-ui-common-menu.mjs.map +1 -1
  55. package/fesm2022/theseam-ui-common-modal.mjs +178 -129
  56. package/fesm2022/theseam-ui-common-modal.mjs.map +1 -1
  57. package/fesm2022/theseam-ui-common-models.mjs +3 -3
  58. package/fesm2022/theseam-ui-common-models.mjs.map +1 -1
  59. package/fesm2022/theseam-ui-common-navigation-reload.mjs +13 -11
  60. package/fesm2022/theseam-ui-common-navigation-reload.mjs.map +1 -1
  61. package/fesm2022/theseam-ui-common-popover.mjs +81 -88
  62. package/fesm2022/theseam-ui-common-popover.mjs.map +1 -1
  63. package/fesm2022/theseam-ui-common-progress.mjs +15 -19
  64. package/fesm2022/theseam-ui-common-progress.mjs.map +1 -1
  65. package/fesm2022/theseam-ui-common-rich-text.mjs +65 -52
  66. package/fesm2022/theseam-ui-common-rich-text.mjs.map +1 -1
  67. package/fesm2022/theseam-ui-common-scrollbar.mjs +12 -9
  68. package/fesm2022/theseam-ui-common-scrollbar.mjs.map +1 -1
  69. package/fesm2022/theseam-ui-common-services.mjs +41 -26
  70. package/fesm2022/theseam-ui-common-services.mjs.map +1 -1
  71. package/fesm2022/theseam-ui-common-shared.mjs +149 -159
  72. package/fesm2022/theseam-ui-common-shared.mjs.map +1 -1
  73. package/fesm2022/theseam-ui-common-storage.mjs +9 -6
  74. package/fesm2022/theseam-ui-common-storage.mjs.map +1 -1
  75. package/fesm2022/theseam-ui-common-story-helpers.mjs +148 -86
  76. package/fesm2022/theseam-ui-common-story-helpers.mjs.map +1 -1
  77. package/fesm2022/theseam-ui-common-tabbed.mjs +43 -39
  78. package/fesm2022/theseam-ui-common-tabbed.mjs.map +1 -1
  79. package/fesm2022/theseam-ui-common-table-cell-type.mjs +63 -39
  80. package/fesm2022/theseam-ui-common-table-cell-type.mjs.map +1 -1
  81. package/fesm2022/theseam-ui-common-table-cell-types.mjs +182 -144
  82. package/fesm2022/theseam-ui-common-table-cell-types.mjs.map +1 -1
  83. package/fesm2022/theseam-ui-common-table.mjs +62 -41
  84. package/fesm2022/theseam-ui-common-table.mjs.map +1 -1
  85. package/fesm2022/theseam-ui-common-tel-input.mjs +98 -63
  86. package/fesm2022/theseam-ui-common-tel-input.mjs.map +1 -1
  87. package/fesm2022/theseam-ui-common-testing.mjs +13 -10
  88. package/fesm2022/theseam-ui-common-testing.mjs.map +1 -1
  89. package/fesm2022/theseam-ui-common-tiled-select.mjs +54 -50
  90. package/fesm2022/theseam-ui-common-tiled-select.mjs.map +1 -1
  91. package/fesm2022/theseam-ui-common-toggle-edit.mjs +41 -37
  92. package/fesm2022/theseam-ui-common-toggle-edit.mjs.map +1 -1
  93. package/fesm2022/theseam-ui-common-toggle-group.mjs +30 -31
  94. package/fesm2022/theseam-ui-common-toggle-group.mjs.map +1 -1
  95. package/fesm2022/theseam-ui-common-tooltip.mjs +225 -66
  96. package/fesm2022/theseam-ui-common-tooltip.mjs.map +1 -1
  97. package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs +14 -12
  98. package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs.map +1 -1
  99. package/fesm2022/theseam-ui-common-utils.mjs +113 -77
  100. package/fesm2022/theseam-ui-common-utils.mjs.map +1 -1
  101. package/fesm2022/theseam-ui-common-validators.mjs +10 -9
  102. package/fesm2022/theseam-ui-common-validators.mjs.map +1 -1
  103. package/fesm2022/theseam-ui-common-vertical-list-filter.mjs +39 -17
  104. package/fesm2022/theseam-ui-common-vertical-list-filter.mjs.map +1 -1
  105. package/fesm2022/theseam-ui-common-viewers.mjs +80 -53
  106. package/fesm2022/theseam-ui-common-viewers.mjs.map +1 -1
  107. package/fesm2022/theseam-ui-common-widget.mjs +288 -314
  108. package/fesm2022/theseam-ui-common-widget.mjs.map +1 -1
  109. package/form-field/index.d.ts +1 -1
  110. package/framework/base-layout/base-layout.component.scss +9 -4
  111. package/framework/base-layout/styles/_variables.scss +4 -9
  112. package/framework/dashboard/dashboard-widgets/dashboard-widgets.component.scss +6 -4
  113. package/framework/index.d.ts +6 -6
  114. package/framework/nav/nav-item/nav-item.component.scss +7 -6
  115. package/framework/nav/styles/_themes/light/_variables.scss +21 -5
  116. package/framework/nav/styles/_themes/primary/_variables.scss +21 -5
  117. package/framework/side-nav/side-nav-item/side-nav-item.component.scss +5 -2
  118. package/framework/side-nav/styles/_themes/light/_variables.scss +5 -1
  119. package/framework/side-nav/styles/_themes/primary/_variables.scss +25 -5
  120. package/graphql/index.d.ts +49 -7
  121. package/modal/README.md +5 -5
  122. package/modal/index.d.ts +1 -1
  123. package/models/index.d.ts +1 -1
  124. package/package.json +59 -60
  125. package/popover/index.d.ts +0 -2
  126. package/progress/progress-circle/styles/_variables.scss +15 -3
  127. package/shared/index.d.ts +0 -13
  128. package/story-helpers/index.d.ts +11 -1
  129. package/styles/bootstrap/_bootstrap.scss +34 -34
  130. package/styles/bootstrap/_bs-styles.scss +4 -8
  131. package/styles/bootstrap/_bs-utilities.scss +4 -4
  132. package/styles/bootstrap/_bs-variables.scss +65 -70
  133. package/styles/common/_forms.scss +9 -10
  134. package/styles/common/_global.scss +0 -1
  135. package/styles/common/_hacks.scss +1 -1
  136. package/styles/common/_table.scss +0 -1
  137. package/styles/common/_text.scss +3 -1
  138. package/styles/theme.scss +1 -1
  139. package/styles/vendor/ng-select/_ng-select-bs4.scss +292 -294
  140. package/styles/vendor/ngx-datatable/_ngx-datatable.scss +63 -32
  141. package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +37 -10
  142. package/styles/vendor/ngx-datatable/_themes/material/_variables.scss +3 -1
  143. package/styles/vendor/quill/_quill.scss +15 -9
  144. package/table/index.d.ts +4 -1
  145. package/table-cell-type/index.d.ts +27 -2
  146. package/tel-input/README.md +27 -27
  147. package/utils/index.d.ts +3 -3
  148. package/viewers/index.d.ts +9 -2
  149. package/widget/_widget-theme.scss +1 -1
  150. package/widget/styles/_variables.scss +2 -2
  151. package/widget/widget/widget.component.scss +0 -2
  152. package/widget/widget-content-components/widget-tile/widget-tile.component.scss +1 -3
  153. package/widget/widget-footer/widget-footer.component.scss +0 -1
@@ -107,15 +107,15 @@ function addCountryCode(data, iso2, countryCode, priority) {
107
107
  }
108
108
  }
109
109
  // check for undefined as 0 is falsy
110
- const index = (priority !== undefined) ? priority : data.countryCodes[countryCode].length;
110
+ const index = priority !== undefined ? priority : data.countryCodes[countryCode].length;
111
111
  data.countryCodes[countryCode][index] = iso2;
112
112
  }
113
113
 
114
114
  const TelInputNumberFormatName = {
115
- 'E164': intlTelInputUtils.numberFormat.E164,
116
- 'INTERNATIONAL': intlTelInputUtils.numberFormat.INTERNATIONAL,
117
- 'NATIONAL': intlTelInputUtils.numberFormat.NATIONAL,
118
- 'RFC3966': intlTelInputUtils.numberFormat.RFC3966
115
+ E164: intlTelInputUtils.numberFormat.E164,
116
+ INTERNATIONAL: intlTelInputUtils.numberFormat.INTERNATIONAL,
117
+ NATIONAL: intlTelInputUtils.numberFormat.NATIONAL,
118
+ RFC3966: intlTelInputUtils.numberFormat.RFC3966,
119
119
  };
120
120
 
121
121
  const THESEAM_DEFAULT_PHONE_NUMBER_FORMAT = intlTelInputUtils.numberFormat.INTERNATIONAL;
@@ -123,7 +123,7 @@ function coercePhoneNumberFormat(format, defaultFormat = THESEAM_DEFAULT_PHONE_N
123
123
  let res = defaultFormat;
124
124
  if (typeof format === 'string') {
125
125
  const _format = TelInputNumberFormatName[`${format}`.trim().toUpperCase()];
126
- res = (_format === undefined || _format === null) ? defaultFormat : _format;
126
+ res = _format === undefined || _format === null ? defaultFormat : _format;
127
127
  }
128
128
  else if (typeof format === 'number') {
129
129
  // We could check for a number range, but I think it is safer to assume it's
@@ -144,7 +144,11 @@ function getNumeric(s) {
144
144
  function getCountryCode(data, dialCode) {
145
145
  const _countryCodes = data.countryCodes[getNumeric(dialCode)];
146
146
  // Refer to `_setInitialState` to get libraries default logic
147
- return (_countryCodes === undefined || _countryCodes === null || _countryCodes.length === 0) ? 'us' : _countryCodes[0];
147
+ return _countryCodes === undefined ||
148
+ _countryCodes === null ||
149
+ _countryCodes.length === 0
150
+ ? 'us'
151
+ : _countryCodes[0];
148
152
  }
149
153
 
150
154
  /**
@@ -205,10 +209,10 @@ function getIntlTelInputUtils() {
205
209
  return Promise.resolve(globalIntlTelInputUtils());
206
210
  }
207
211
  if (globalIntlTelInputGlobals().startedLoadingUtilsScript) {
208
- return waitOnConditionAsync(() => notNullOrUndefined(globalIntlTelInputUtils()), 5000)
209
- .then(() => globalIntlTelInputUtils());
212
+ return waitOnConditionAsync(() => notNullOrUndefined(globalIntlTelInputUtils()), 5000).then(() => globalIntlTelInputUtils());
210
213
  }
211
- return globalIntlTelInputGlobals().loadUtils(TEL_INPUT_UTILS_PATH)
214
+ return globalIntlTelInputGlobals()
215
+ .loadUtils(TEL_INPUT_UTILS_PATH)
212
216
  .then(() => waitOnConditionAsync(() => notNullOrUndefined(globalIntlTelInputUtils()), 5000))
213
217
  .then(() => globalIntlTelInputUtils());
214
218
  }
@@ -217,7 +221,7 @@ const VALIDATOR_CODE_MESSAGES = {
217
221
  [intlTelInputUtils.validationError.INVALID_COUNTRY_CODE]: 'Country code is invalid.',
218
222
  [intlTelInputUtils.validationError.TOO_SHORT]: 'Number is too short.',
219
223
  [intlTelInputUtils.validationError.TOO_LONG]: 'Number is too long.',
220
- [intlTelInputUtils.validationError.NOT_A_NUMBER]: 'Must be numbers only.'
224
+ [intlTelInputUtils.validationError.NOT_A_NUMBER]: 'Must be numbers only.',
221
225
  };
222
226
  function getValidationErrorMessage(code) {
223
227
  const message = VALIDATOR_CODE_MESSAGES[code];
@@ -235,7 +239,7 @@ function processCountryCodes(countries) {
235
239
  // here we store just dial codes
236
240
  dialCodes: {},
237
241
  // here we store "country codes" (both dial codes and their area codes)
238
- countryCodes: {}
242
+ countryCodes: {},
239
243
  };
240
244
  // first: add dial codes
241
245
  for (const c of countries) {
@@ -301,9 +305,12 @@ class TheSeamTelInputDirective {
301
305
  this._ngControl = _ngControl;
302
306
  }
303
307
  ngOnInit() {
304
- this._elementRef.nativeElement.value = this._ngControl ? this._ngControl.value : this.value ?? '';
308
+ this._elementRef.nativeElement.value = this._ngControl
309
+ ? this._ngControl.value
310
+ : (this.value ?? '');
305
311
  this._elementRef.nativeElement.setAttribute('instance-loading', '');
306
- merge(this._assetLoader.loadStyleSheet(TEL_INPUT_STYLESHEET_PATH), this._assetLoader.loadStyle(TEL_INPUT_STYLES)).pipe(tap(v => this._loadedAssetRefs.push(v)), last(), switchMap(() => {
312
+ merge(this._assetLoader.loadStyleSheet(TEL_INPUT_STYLESHEET_PATH), this._assetLoader.loadStyle(TEL_INPUT_STYLES))
313
+ .pipe(tap((v) => this._loadedAssetRefs.push(v)), last(), switchMap(() => {
307
314
  this._instance = IntlTelInputFn(this._elementRef.nativeElement, {
308
315
  utilsScript: TEL_INPUT_UTILS_PATH,
309
316
  preferredCountries: ['US'],
@@ -316,11 +323,12 @@ class TheSeamTelInputDirective {
316
323
  // initialCountry: 'auto'
317
324
  });
318
325
  this._tryUpdateDropdownAttributes();
319
- return this._instance.promise.then(v => {
326
+ return this._instance.promise.then((v) => {
320
327
  this._elementRef.nativeElement.removeAttribute('instance-loading');
321
328
  return v;
322
329
  });
323
- }), tap(() => this._initDropdownListener()), tap(() => this.value = this._value), tap(this._formatIntlTelInput), switchMap(() => merge(fromEvent(this._elementRef.nativeElement, 'keyup'), fromEvent(this._elementRef.nativeElement, 'change'))), tap(this._formatIntlTelInput), takeUntil(this._ngUnsubscribe)).subscribe();
330
+ }), tap(() => this._initDropdownListener()), tap(() => (this.value = this._value)), tap(this._formatIntlTelInput), switchMap(() => merge(fromEvent(this._elementRef.nativeElement, 'keyup'), fromEvent(this._elementRef.nativeElement, 'change'))), tap(this._formatIntlTelInput), takeUntil(this._ngUnsubscribe))
331
+ .subscribe();
324
332
  }
325
333
  ngOnDestroy() {
326
334
  this._instance?.destroy();
@@ -397,9 +405,11 @@ class TheSeamTelInputDirective {
397
405
  const openDropdown$ = fromEvent(this._elementRef.nativeElement, 'open:countrydropdown');
398
406
  const closeDropdown$ = fromEvent(this._elementRef.nativeElement, 'close:countrydropdown');
399
407
  const instance = this._instance;
400
- openDropdown$.pipe(switchMap(() => {
408
+ openDropdown$
409
+ .pipe(switchMap(() => {
401
410
  const pressDown$ = merge(fromEvent(doc, 'touchstart', { capture: true }), fromEvent(doc, 'mousedown', { capture: true })).pipe(auditTime(0), tap((event) => {
402
- if (instance.countryList.contains(event.target) || instance.selectedFlag.contains(event.target)) {
411
+ if (instance.countryList.contains(event.target) ||
412
+ instance.selectedFlag.contains(event.target)) {
403
413
  return;
404
414
  }
405
415
  instance._closeDropdown();
@@ -412,21 +422,25 @@ class TheSeamTelInputDirective {
412
422
  instance._closeDropdown();
413
423
  }));
414
424
  return merge(pressDown$, flagBtnClick$).pipe(takeUntil(closeDropdown$));
415
- }), takeUntil(this._ngUnsubscribe)).subscribe();
425
+ }), takeUntil(this._ngUnsubscribe))
426
+ .subscribe();
416
427
  const flagsContainer = this._instance?.selectedFlag;
417
428
  if (flagsContainer) {
418
- fromEvent(flagsContainer, 'keydown', { capture: true }).pipe(tap((e) => {
429
+ fromEvent(flagsContainer, 'keydown', { capture: true })
430
+ .pipe(tap((e) => {
419
431
  const control = this._ngControl;
420
432
  if (control) {
421
433
  const disabled = control.disabled ?? false;
422
- if (disabled && ['ArrowUp', 'Up', 'ArrowDown', 'Down', ' ', 'Enter'].indexOf(e.key) !== -1) {
434
+ if (disabled &&
435
+ ['ArrowUp', 'Up', 'ArrowDown', 'Down', ' ', 'Enter'].indexOf(e.key) !== -1) {
423
436
  // prevent form from being submitted if "ENTER" was pressed
424
437
  e.preventDefault();
425
438
  // prevent event from being handled again by document
426
439
  e.stopPropagation();
427
440
  }
428
441
  }
429
- }), takeUntil(this._ngUnsubscribe)).subscribe();
442
+ }), takeUntil(this._ngUnsubscribe))
443
+ .subscribe();
430
444
  }
431
445
  });
432
446
  }
@@ -448,10 +462,10 @@ class TheSeamTelInputDirective {
448
462
  getHostElement() {
449
463
  return this._elementRef.nativeElement;
450
464
  }
451
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTelInputDirective, deps: [{ token: i0.ElementRef }, { token: i1.AssetLoaderService }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }, { token: i2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
452
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: TheSeamTelInputDirective, isStandalone: true, selector: "input[seamTelInput]", inputs: { value: "value" }, host: { properties: { "attr.type": "this._attrType" } }, exportAs: ["seamTelInput"], ngImport: i0 });
465
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTelInputDirective, deps: [{ token: i0.ElementRef }, { token: i1.AssetLoaderService }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }, { token: i2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
466
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamTelInputDirective, isStandalone: true, selector: "input[seamTelInput]", inputs: { value: "value" }, host: { properties: { "attr.type": "this._attrType" } }, exportAs: ["seamTelInput"], ngImport: i0 });
453
467
  }
454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTelInputDirective, decorators: [{
468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTelInputDirective, decorators: [{
455
469
  type: Directive,
456
470
  args: [{
457
471
  selector: 'input[seamTelInput]',
@@ -490,7 +504,9 @@ class TheSeamTelInputComponent {
490
504
  _focusOrigin = null;
491
505
  _hasInvalidCss$;
492
506
  required = false;
493
- get disabled() { return this._disabled; }
507
+ get disabled() {
508
+ return this._disabled;
509
+ }
494
510
  set disabled(value) {
495
511
  const newValue = coerceBooleanProperty(value);
496
512
  if (this._control.disabled !== newValue) {
@@ -513,11 +529,19 @@ class TheSeamTelInputComponent {
513
529
  * component to receive `focus` event from javascript, but not get focused by
514
530
  * keyboard navigation.
515
531
  */
516
- set tabIndex(value) { this._tabIndex = coerceNumberProperty(value); }
517
- get tabIndex() { return this._tabIndex; }
532
+ set tabIndex(value) {
533
+ this._tabIndex = coerceNumberProperty(value);
534
+ }
535
+ get tabIndex() {
536
+ return this._tabIndex;
537
+ }
518
538
  _tabIndex = -1;
519
- get _attrDisabled() { return this.disabled || null; }
520
- get _attrTabIndex() { return this.disabled ? -1 : (this.tabIndex || 0); }
539
+ get _attrDisabled() {
540
+ return this.disabled || null;
541
+ }
542
+ get _attrTabIndex() {
543
+ return this.disabled ? -1 : this.tabIndex || 0;
544
+ }
521
545
  /** Name value will be applied to the input element if present */
522
546
  name = null;
523
547
  /** The value attribute of the native input element */
@@ -558,11 +582,14 @@ class TheSeamTelInputComponent {
558
582
  const telInputBlurEvent$ = this._telInputDirective
559
583
  ? fromEvent(this._telInputDirective.getHostElement(), 'blur')
560
584
  : of();
561
- this._hasInvalidCss$ = defer(() => of((this._injector.get(NgControl, null, { self: true })?.control) || undefined)).pipe(switchMap(control => {
585
+ this._hasInvalidCss$ = defer(() => of(this._injector.get(NgControl, null, { self: true })?.control ||
586
+ undefined)).pipe(switchMap((control) => {
562
587
  if (control) {
563
588
  return merge(control.valueChanges, control.statusChanges, telInputBlurEvent$).pipe(auditTime(0), map(() => {
564
589
  const inputControl = this._inputDirective?.ngControl;
565
- return control.invalid && (inputControl?.dirty || inputControl?.touched);
590
+ return (control.invalid &&
591
+ (inputControl?.dirty ||
592
+ inputControl?.touched));
566
593
  }));
567
594
  }
568
595
  return of(false);
@@ -570,8 +597,13 @@ class TheSeamTelInputComponent {
570
597
  }
571
598
  /** @ignore */
572
599
  ngOnInit() {
573
- this._focusMonitor.monitor(this._elementRef, true).pipe(takeUntil(this._ngUnsubscribe)).subscribe(origin => this._focusOrigin = origin);
574
- this._control.valueChanges.pipe(takeUntil(this._ngUnsubscribe)).subscribe(v => {
600
+ this._focusMonitor
601
+ .monitor(this._elementRef, true)
602
+ .pipe(takeUntil(this._ngUnsubscribe))
603
+ .subscribe((origin) => (this._focusOrigin = origin));
604
+ this._control.valueChanges
605
+ .pipe(takeUntil(this._ngUnsubscribe))
606
+ .subscribe((v) => {
575
607
  const value = this._telInputDirective?.getFullNumber();
576
608
  // console.log('valueChanges', v, value)
577
609
  this.value = value;
@@ -627,28 +659,32 @@ class TheSeamTelInputComponent {
627
659
  hasFocus() {
628
660
  return this._focusOrigin !== null && this._focusOrigin !== undefined;
629
661
  }
630
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTelInputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Injector }, { token: i0.ElementRef }, { token: i1$1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
631
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: TheSeamTelInputComponent, isStandalone: true, selector: "seam-tel-input", inputs: { required: "required", disabled: "disabled", tabIndex: "tabIndex", name: "name", value: "value" }, outputs: { change: "change" }, host: { listeners: { "focus": "_onFocus($event)" }, properties: { "attr.disabled": "this._attrDisabled", "attr.tabindex": "this._attrTabIndex" } }, providers: [{
662
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTelInputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Injector }, { token: i0.ElementRef }, { token: i1$1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
663
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamTelInputComponent, isStandalone: true, selector: "seam-tel-input", inputs: { required: "required", disabled: "disabled", tabIndex: "tabIndex", name: "name", value: "value" }, outputs: { change: "change" }, host: { listeners: { "focus": "_onFocus($event)" }, properties: { "attr.disabled": "this._attrDisabled", "attr.tabindex": "this._attrTabIndex" } }, providers: [
664
+ {
632
665
  provide: NG_VALUE_ACCESSOR,
633
666
  useExisting: forwardRef(() => TheSeamTelInputComponent),
634
- multi: true
635
- }], viewQueries: [{ propertyName: "_telInputDirective", first: true, predicate: TheSeamTelInputDirective, descendants: true, static: true }, { propertyName: "_inputDirective", first: true, predicate: InputDirective, descendants: true, static: true }, { propertyName: "_inputElementRef", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<input seamTelInput seamInput\n [formControl]=\"_control\"\n [class.is-invalid]=\"_hasInvalidCss$ | async\"\n [required]=\"required\"/>\n", styles: [":host{display:block}: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{background-color:transparent}:host[disabled] ::ng-deep .iti--allow-dropdown .iti__arrow{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TheSeamFormFieldModule }, { kind: "directive", type: i3.InputDirective, selector: "input[seamInput], textarea[seamInput], ng-select[seamInput], seam-tel-input[seamInput], quill-editor[seamInput], seam-google-maps[seamInput], seam-rich-text[seamInput]", inputs: ["seamInputSize", "id", "type", "placeholder", "required", "disabled", "readonly"], exportAs: ["seamInput"] }, { kind: "directive", type: TheSeamTelInputDirective, selector: "input[seamTelInput]", inputs: ["value"], exportAs: ["seamTelInput"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
667
+ multi: true,
668
+ },
669
+ ], viewQueries: [{ propertyName: "_telInputDirective", first: true, predicate: TheSeamTelInputDirective, descendants: true, static: true }, { propertyName: "_inputDirective", first: true, predicate: InputDirective, descendants: true, static: true }, { propertyName: "_inputElementRef", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<input\n seamTelInput\n seamInput\n [formControl]=\"_control\"\n [class.is-invalid]=\"_hasInvalidCss$ | async\"\n [required]=\"required\"\n/>\n", styles: [":host{display:block}: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{background-color:transparent}:host[disabled] ::ng-deep .iti--allow-dropdown .iti__arrow{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TheSeamFormFieldModule }, { kind: "directive", type: i3.InputDirective, selector: "input[seamInput], textarea[seamInput], ng-select[seamInput], seam-tel-input[seamInput], quill-editor[seamInput], seam-google-maps[seamInput], seam-rich-text[seamInput]", inputs: ["seamInputSize", "id", "type", "placeholder", "required", "disabled", "readonly"], exportAs: ["seamInput"] }, { kind: "directive", type: TheSeamTelInputDirective, selector: "input[seamTelInput]", inputs: ["value"], exportAs: ["seamTelInput"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
636
670
  }
637
671
  __decorate([
638
672
  InputBoolean()
639
673
  ], TheSeamTelInputComponent.prototype, "required", void 0);
640
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTelInputComponent, decorators: [{
674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTelInputComponent, decorators: [{
641
675
  type: Component,
642
- args: [{ selector: 'seam-tel-input', providers: [{
676
+ args: [{ selector: 'seam-tel-input', providers: [
677
+ {
643
678
  provide: NG_VALUE_ACCESSOR,
644
679
  useExisting: forwardRef(() => TheSeamTelInputComponent),
645
- multi: true
646
- }], changeDetection: ChangeDetectionStrategy.OnPush, imports: [
680
+ multi: true,
681
+ },
682
+ ], changeDetection: ChangeDetectionStrategy.OnPush, imports: [
647
683
  CommonModule,
648
684
  ReactiveFormsModule,
649
685
  TheSeamFormFieldModule,
650
686
  TheSeamTelInputDirective,
651
- ], template: "<input seamTelInput seamInput\n [formControl]=\"_control\"\n [class.is-invalid]=\"_hasInvalidCss$ | async\"\n [required]=\"required\"/>\n", styles: [":host{display:block}: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{background-color:transparent}:host[disabled] ::ng-deep .iti--allow-dropdown .iti__arrow{display:none}\n"] }]
687
+ ], template: "<input\n seamTelInput\n seamInput\n [formControl]=\"_control\"\n [class.is-invalid]=\"_hasInvalidCss$ | async\"\n [required]=\"required\"\n/>\n", styles: [":host{display:block}: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{background-color:transparent}:host[disabled] ::ng-deep .iti--allow-dropdown .iti__arrow{display:none}\n"] }]
652
688
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Injector }, { type: i0.ElementRef }, { type: i1$1.FocusMonitor }], propDecorators: { required: [{
653
689
  type: Input
654
690
  }], disabled: [{
@@ -687,7 +723,7 @@ function telInputValidator(control) {
687
723
  if (typeof value !== 'string' || value.length === 0) {
688
724
  return Promise.resolve(null);
689
725
  }
690
- return getIntlTelInputUtils().then(utils => {
726
+ return getIntlTelInputUtils().then((utils) => {
691
727
  const data = processCountryCodes(globalIntlTelInputGlobals().getCountryData());
692
728
  const dialCode = getDialCode(data, value);
693
729
  const countryCode = getCountryCode(data, dialCode);
@@ -701,7 +737,7 @@ function telInputValidator(control) {
701
737
  if (!utils.isValidNumber(number, countryCode)) {
702
738
  const code = utils.getValidationError(number, countryCode);
703
739
  const message = getValidationErrorMessage(code);
704
- return { 'telInput': { code, message } };
740
+ return { telInput: { code, message } };
705
741
  }
706
742
  return null;
707
743
  });
@@ -715,9 +751,11 @@ class TheSeamPhoneNumberPipe {
715
751
  constructor(_cdr) {
716
752
  this._cdr = _cdr;
717
753
  }
718
- transform(phoneNumber, numberFormat = intlTelInputUtils.numberFormat.INTERNATIONAL) {
754
+ transform(phoneNumber, numberFormat = intlTelInputUtils.numberFormat
755
+ .INTERNATIONAL) {
719
756
  // console.log('transform', phoneNumber, numberFormat)
720
- if (this._latestPhoneNumber !== phoneNumber || this._latestNumberFormat !== numberFormat) {
757
+ if (this._latestPhoneNumber !== phoneNumber ||
758
+ this._latestNumberFormat !== numberFormat) {
721
759
  this._transform(phoneNumber, numberFormat);
722
760
  }
723
761
  this._latestPhoneNumber = phoneNumber;
@@ -744,38 +782,36 @@ class TheSeamPhoneNumberPipe {
744
782
  // this._cdr.markForCheck()
745
783
  this._cdr.detectChanges();
746
784
  }
747
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamPhoneNumberPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
748
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: TheSeamPhoneNumberPipe, isStandalone: false, name: "phoneNumber", pure: false });
785
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamPhoneNumberPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
786
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.7", ngImport: i0, type: TheSeamPhoneNumberPipe, isStandalone: false, name: "phoneNumber", pure: false });
749
787
  }
750
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamPhoneNumberPipe, decorators: [{
788
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamPhoneNumberPipe, decorators: [{
751
789
  type: Pipe,
752
790
  args: [{
753
791
  name: 'phoneNumber',
754
792
  pure: false,
755
- standalone: false
793
+ standalone: false,
756
794
  }]
757
795
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
758
796
 
759
797
  class TheSeamTelInputModule {
760
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTelInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
761
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTelInputModule, declarations: [TheSeamPhoneNumberPipe], imports: [CommonModule,
798
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTelInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
799
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTelInputModule, declarations: [TheSeamPhoneNumberPipe], imports: [CommonModule,
762
800
  ReactiveFormsModule,
763
801
  TheSeamFormFieldModule,
764
802
  TheSeamTelInputDirective,
765
803
  TheSeamTelInputComponent], exports: [TheSeamTelInputDirective,
766
804
  TheSeamTelInputComponent,
767
805
  TheSeamPhoneNumberPipe] });
768
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTelInputModule, imports: [CommonModule,
806
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTelInputModule, imports: [CommonModule,
769
807
  ReactiveFormsModule,
770
808
  TheSeamFormFieldModule,
771
809
  TheSeamTelInputComponent] });
772
810
  }
773
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTelInputModule, decorators: [{
811
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTelInputModule, decorators: [{
774
812
  type: NgModule,
775
813
  args: [{
776
- declarations: [
777
- TheSeamPhoneNumberPipe
778
- ],
814
+ declarations: [TheSeamPhoneNumberPipe],
779
815
  imports: [
780
816
  CommonModule,
781
817
  ReactiveFormsModule,
@@ -786,8 +822,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
786
822
  exports: [
787
823
  TheSeamTelInputDirective,
788
824
  TheSeamTelInputComponent,
789
- TheSeamPhoneNumberPipe
790
- ]
825
+ TheSeamPhoneNumberPipe,
826
+ ],
791
827
  }]
792
828
  }] });
793
829
 
@@ -796,8 +832,7 @@ class TheSeamTelInputHarness extends ComponentHarness {
796
832
  _input = this.locatorFor('input');
797
833
  /** Creates a `HarnessPredicate` used to locate a particular `TheSeamTelInputHarness`. */
798
834
  static with(options) {
799
- return new HarnessPredicate(TheSeamTelInputHarness, options)
800
- .addOption('field name', options.name, (harness, name) => HarnessPredicate.stringMatches(harness.getName(), name));
835
+ return new HarnessPredicate(TheSeamTelInputHarness, options).addOption('field name', options.name, (harness, name) => HarnessPredicate.stringMatches(harness.getName(), name));
801
836
  }
802
837
  async getName() {
803
838
  return (await this._input()).getAttribute('name');
@@ -819,7 +854,7 @@ class TheSeamTelInputHarness extends ComponentHarness {
819
854
  // TODO: Find out why setInputValue() doesn't update the FormControl.
820
855
  // return (await this._input()).setInputValue(value)
821
856
  await (await this._input()).click();
822
- await this._input().then(x => x.setInputValue(''));
857
+ await this._input().then((x) => x.setInputValue(''));
823
858
  return (await this._input()).sendKeys(value);
824
859
  }
825
860
  async _waitOnInstance() {