@koobiq/components 18.2.0 → 18.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/core/common-behaviors/error-state.d.ts +1 -1
  2. package/core/error/error-state-matcher.d.ts +26 -0
  3. package/core/form-field/form-field-ref.d.ts +7 -0
  4. package/core/forms/index.d.ts +1 -0
  5. package/core/forms/validators.d.ts +86 -0
  6. package/core/locales/locale-service.d.ts +11 -0
  7. package/core/option/action.d.ts +1 -1
  8. package/core/pop-up/pop-up-trigger.d.ts +3 -3
  9. package/core/public-api.d.ts +1 -2
  10. package/core/validation/validation.d.ts +1 -0
  11. package/esm2022/core/common-behaviors/error-state.mjs +1 -1
  12. package/esm2022/core/error/error-state-matcher.mjs +43 -0
  13. package/esm2022/core/form-field/form-field-ref.mjs +4 -1
  14. package/esm2022/core/forms/index.mjs +2 -1
  15. package/esm2022/core/forms/validators.mjs +132 -0
  16. package/esm2022/core/locales/locale-service.mjs +30 -1
  17. package/esm2022/core/option/action.mjs +5 -8
  18. package/esm2022/core/pop-up/pop-up-trigger.mjs +12 -12
  19. package/esm2022/core/public-api.mjs +2 -3
  20. package/esm2022/core/validation/validation.mjs +2 -1
  21. package/esm2022/core/version.mjs +2 -2
  22. package/esm2022/datepicker/calendar-header.component.mjs +5 -6
  23. package/esm2022/file-upload/single-file-upload.component.mjs +3 -3
  24. package/esm2022/form-field/form-field-control.mjs +1 -1
  25. package/esm2022/form-field/form-field.mjs +7 -8
  26. package/esm2022/icon/icon.component.mjs +2 -2
  27. package/esm2022/icon/icon.module.mjs +1 -1
  28. package/esm2022/input/input-number.mjs +74 -80
  29. package/esm2022/list/list-selection.component.mjs +8 -12
  30. package/esm2022/navbar/navbar-item.component.mjs +6 -9
  31. package/esm2022/navbar/navbar.component.mjs +12 -13
  32. package/esm2022/popover/popover-confirm.component.mjs +3 -3
  33. package/esm2022/select/select.component.mjs +15 -14
  34. package/esm2022/select/select.module.mjs +3 -7
  35. package/esm2022/tabs/paginated-tab-header.mjs +10 -12
  36. package/esm2022/tags/tag-list.component.mjs +9 -11
  37. package/esm2022/toast/toast.component.mjs +5 -6
  38. package/esm2022/tree/padding.directive.mjs +3 -9
  39. package/esm2022/tree/tree-base.mjs +5 -8
  40. package/esm2022/tree/tree-selection.component.mjs +10 -13
  41. package/esm2022/tree-select/tree-select.component.mjs +13 -13
  42. package/fesm2022/koobiq-components-core.mjs +205 -27
  43. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  44. package/fesm2022/koobiq-components-datepicker.mjs +8 -9
  45. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  46. package/fesm2022/koobiq-components-file-upload.mjs +2 -2
  47. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  48. package/fesm2022/koobiq-components-form-field.mjs +6 -7
  49. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  50. package/fesm2022/koobiq-components-icon.mjs +1 -1
  51. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  52. package/fesm2022/koobiq-components-input.mjs +74 -80
  53. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  54. package/fesm2022/koobiq-components-list.mjs +7 -11
  55. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  56. package/fesm2022/koobiq-components-navbar.mjs +13 -18
  57. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  58. package/fesm2022/koobiq-components-popover.mjs +3 -3
  59. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  60. package/fesm2022/koobiq-components-select.mjs +18 -20
  61. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  62. package/fesm2022/koobiq-components-tabs.mjs +9 -11
  63. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  64. package/fesm2022/koobiq-components-tags.mjs +7 -9
  65. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  66. package/fesm2022/koobiq-components-toast.mjs +4 -5
  67. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  68. package/fesm2022/koobiq-components-tree-select.mjs +12 -12
  69. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  70. package/fesm2022/koobiq-components-tree.mjs +13 -24
  71. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  72. package/form-field/form-field-control.d.ts +3 -2
  73. package/form-field/form-field.d.ts +1 -1
  74. package/form-field/hint.scss +0 -3
  75. package/input/input-number.d.ts +24 -14
  76. package/list/list-selection.component.d.ts +2 -4
  77. package/navbar/navbar-item.component.d.ts +2 -3
  78. package/navbar/navbar.component.d.ts +7 -5
  79. package/package.json +6 -5
  80. package/schematics/ng-add/index.js +4 -4
  81. package/select/select.component.d.ts +1 -2
  82. package/select/select.module.d.ts +1 -2
  83. package/tabs/paginated-tab-header.d.ts +1 -3
  84. package/tags/tag-list.component.d.ts +1 -2
  85. package/toast/toast.component.d.ts +0 -1
  86. package/tree/padding.directive.d.ts +2 -4
  87. package/tree/tree-base.d.ts +2 -3
  88. package/tree/tree-selection.component.d.ts +2 -4
  89. package/tree-select/tree-select.component.d.ts +1 -2
  90. package/core/error/error-options.d.ts +0 -14
  91. package/core/label/label-options.d.ts +0 -13
  92. package/esm2022/core/error/error-options.mjs +0 -26
  93. package/esm2022/core/label/label-options.mjs +0 -4
@@ -1,6 +1,6 @@
1
1
  import { trigger, state, style, transition, animate, group } from '@angular/animations';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, isDevMode, NgModule, Optional, Inject, inject, LOCALE_ID, Injectable, Pipe, Directive, ContentChildren, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChild, Input, EventEmitter, ViewChild, Output, Renderer2, ChangeDetectorRef, TemplateRef, ElementRef, NgZone, ViewContainerRef, Version } from '@angular/core';
3
+ import { InjectionToken, isDevMode, NgModule, Optional, Inject, inject, LOCALE_ID, Injectable, Pipe, Directive, ContentChildren, DestroyRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChild, Input, EventEmitter, ViewChild, Output, Renderer2, ChangeDetectorRef, TemplateRef, ElementRef, NgZone, ViewContainerRef, Version } from '@angular/core';
4
4
  import { BidiModule, Directionality } from '@angular/cdk/bidi';
5
5
  import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
6
6
  import * as i1 from '@koobiq/date-adapter';
@@ -9,10 +9,11 @@ import { DateFormatter as DateFormatter$1 } from '@koobiq/date-formatter';
9
9
  import { DOCUMENT, CommonModule } from '@angular/common';
10
10
  import { BehaviorSubject, Subject, Subscription, pairwise } from 'rxjs';
11
11
  import * as i1$1 from '@angular/cdk/a11y';
12
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
12
13
  import { SPACE, ENTER, TAB, ESCAPE, HOME, END } from '@koobiq/cdk/keycodes';
13
- import { takeUntil, distinctUntilChanged, delay } from 'rxjs/operators';
14
14
  import { Overlay, ScrollDispatcher } from '@angular/cdk/overlay';
15
15
  import { ComponentPortal } from '@angular/cdk/portal';
16
+ import { distinctUntilChanged, delay } from 'rxjs/operators';
16
17
 
17
18
  var AnimationCurves;
18
19
  (function (AnimationCurves) {
@@ -268,21 +269,38 @@ class DateAdapter extends DateAdapter$1 {
268
269
 
269
270
  const KBQ_DATE_FORMATS = new InjectionToken('kbq-date-formats');
270
271
 
271
- /** Error state matcher that matches when a control is invalid and dirty. */
272
- class ShowOnDirtyErrorStateMatcher {
272
+ /**
273
+ * Error state matcher that matches when a control is invalid and form is submitted.
274
+ * Requires use FormGroupDirective or NgForm.
275
+ */
276
+ class ShowOnFormSubmitErrorStateMatcher {
273
277
  isErrorState(control, form) {
274
- return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
278
+ return !!(control?.invalid && form?.submitted);
275
279
  }
276
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
277
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ShowOnDirtyErrorStateMatcher }); }
280
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ShowOnFormSubmitErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
281
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ShowOnFormSubmitErrorStateMatcher }); }
278
282
  }
279
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, decorators: [{
283
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ShowOnFormSubmitErrorStateMatcher, decorators: [{
280
284
  type: Injectable
281
285
  }] });
282
- /** Provider that defines how form controls behave with regards to displaying error messages. */
286
+ /** Error state matcher that matches when a control is invalid and dirty or form is submitted. */
287
+ class ShowOnControlDirtyErrorStateMatcher {
288
+ isErrorState(control, form) {
289
+ return !!(control?.invalid && (control.dirty || form?.submitted));
290
+ }
291
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ShowOnControlDirtyErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
292
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ShowOnControlDirtyErrorStateMatcher }); }
293
+ }
294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ShowOnControlDirtyErrorStateMatcher, decorators: [{
295
+ type: Injectable
296
+ }] });
297
+ /**
298
+ * Provider that defines how form controls behave with regards to displaying error messages.
299
+ * Error state matcher that matches when a control is invalid and touched or form is submitted.
300
+ */
283
301
  class ErrorStateMatcher {
284
302
  isErrorState(control, form) {
285
- return !!(control && control.invalid && (control.touched || (form && form.submitted)));
303
+ return !!(control?.invalid && (control.touched || form?.submitted));
286
304
  }
287
305
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
288
306
  /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ErrorStateMatcher, providedIn: 'root' }); }
@@ -292,6 +310,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
292
310
  args: [{ providedIn: 'root' }]
293
311
  }] });
294
312
 
313
+ /**
314
+ * @TODO move into form-field.ts, add correct type for `InjectionToken<KbqFormField>` (#DS-2915)
315
+ */
295
316
  /**
296
317
  * Injection token that can be used to inject an instances of `KbqFormField`. It serves
297
318
  * as alternative token to the actual `KbqFormField` class which would cause unnecessary
@@ -995,6 +1016,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
995
1016
  type: Inject,
996
1017
  args: [KBQ_LOCALE_DATA]
997
1018
  }] }] });
1019
+ /**
1020
+ * Function that returns a string representation of a number without localized separators
1021
+ */
1022
+ function normalizeNumber(value, customConfig) {
1023
+ if (value === null || value === undefined)
1024
+ return '';
1025
+ const { groupSeparator, fractionSeparator } = customConfig;
1026
+ const groupSeparatorRegexp = new RegExp(`[${groupSeparator.join('')}]`, 'g');
1027
+ const fractionSeparatorRegexp = new RegExp(`\\${fractionSeparator}`, 'g');
1028
+ return value.toString().replace(groupSeparatorRegexp, '').replace(fractionSeparatorRegexp, '.');
1029
+ }
1030
+ /**
1031
+ * Function that parse string and return a number. The string can be in any locale.
1032
+ */
1033
+ function checkAndNormalizeLocalizedNumber(num) {
1034
+ if (num === null || num === undefined)
1035
+ return null;
1036
+ /* if some locale input config satisfies pasted number, try to normalise with selected locale config */
1037
+ let numberOutput = null;
1038
+ const locales = KBQ_DEFAULT_LOCALE_DATA_FACTORY();
1039
+ for (const config of locales.items.map(({ id }) => locales[id].input.number)) {
1040
+ const normalized = +normalizeNumber(num, config);
1041
+ if (!Number.isNaN(normalized)) {
1042
+ numberOutput = normalized;
1043
+ break;
1044
+ }
1045
+ }
1046
+ return numberOutput;
1047
+ }
998
1048
 
999
1049
  class KbqLocaleServiceModule {
1000
1050
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqLocaleServiceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -1516,6 +1566,138 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
1516
1566
  }]
1517
1567
  }] });
1518
1568
 
1569
+ /** Provides a set of validators for password form controls. */
1570
+ class PasswordValidators {
1571
+ /**
1572
+ * Validator that requires the control's value length to be at least `min` characters.
1573
+ *
1574
+ * `min` - number of characters.
1575
+ *
1576
+ * ## Usage:
1577
+ *
1578
+ * ```typescript
1579
+ * const control = new FormControl('password', PasswordValidators.minLength(10));
1580
+ * console.log(control.errors); // {minLength: {min: 10, actual: 8}}
1581
+ * ```
1582
+ */
1583
+ static minLength(min) {
1584
+ return ({ value }) => {
1585
+ if (typeof value !== 'string') {
1586
+ return null;
1587
+ }
1588
+ return value.length >= min ? null : { minLength: { min, actual: value.length } };
1589
+ };
1590
+ }
1591
+ /**
1592
+ * Validator that requires the control's value length to be at most `max` characters.
1593
+ *
1594
+ * `max` - number of characters.
1595
+ *
1596
+ * ## Usage:
1597
+ * ```typescript
1598
+ * const control = new FormControl('password', PasswordValidators.maxLength(6));
1599
+ * console.log(control.errors); // {maxLength: {max: 6, actual: 8}}
1600
+ * ```
1601
+ */
1602
+ static maxLength(max) {
1603
+ return ({ value }) => {
1604
+ if (typeof value !== 'string') {
1605
+ return null;
1606
+ }
1607
+ return value.length <= max ? null : { maxLength: { max, actual: value.length } };
1608
+ };
1609
+ }
1610
+ /**
1611
+ * Validator that requires the control's value to be at least `min` uppercase characters.
1612
+ *
1613
+ * `min` - number of uppercase characters.
1614
+ *
1615
+ * ### Usage:
1616
+ *
1617
+ * ```typescript
1618
+ * const control = new FormControl('Password', PasswordValidators.minUppercase(2));
1619
+ * console.log(control.errors); // {minUppercase: {min: 2, actual: 1}}
1620
+ * ```
1621
+ */
1622
+ static minUppercase(min) {
1623
+ return ({ value }) => {
1624
+ if (typeof value !== 'string') {
1625
+ return null;
1626
+ }
1627
+ const matches = (value.match(/[A-Z]/g) || []).length;
1628
+ return matches >= min ? null : { minUppercase: { min, actual: matches } };
1629
+ };
1630
+ }
1631
+ /**
1632
+ * Validator that requires the control's value to be at least `min` lowercase characters.
1633
+ *
1634
+ * `min` - number of lowercase characters.
1635
+ *
1636
+ * ### Usage:
1637
+ *
1638
+ * ```typescript
1639
+ * const control = new FormControl('PASSWORD', PasswordValidators.minLowercase());
1640
+ * console.log(control.errors); // {minLowercase: {min: 1, actual: 0}}
1641
+ * ```
1642
+ */
1643
+ static minLowercase(min) {
1644
+ return ({ value }) => {
1645
+ if (typeof value !== 'string') {
1646
+ return null;
1647
+ }
1648
+ const matches = (value.match(/[a-z]/g) || []).length;
1649
+ return matches >= min ? null : { minLowercase: { min, actual: matches } };
1650
+ };
1651
+ }
1652
+ /**
1653
+ * Validator that requires the control's value to be at least `min` number characters.
1654
+ *
1655
+ * `min` - number of number characters.
1656
+ *
1657
+ * ### Usage:
1658
+ *
1659
+ * ```typescript
1660
+ * const control = new FormControl('passw0rd', PasswordValidators.minNumber(2));
1661
+ * console.log(control.errors); // {minNumber: {min: 2, actual: 1}}
1662
+ * ```
1663
+ */
1664
+ static minNumber(min) {
1665
+ return ({ value }) => {
1666
+ if (typeof value !== 'string') {
1667
+ return null;
1668
+ }
1669
+ const matches = (value.match(/[\d]/g) || []).length;
1670
+ return matches >= min ? null : { minNumber: { min, actual: matches } };
1671
+ };
1672
+ }
1673
+ /**
1674
+ * Validator that requires the control's value to be at least `min` special characters.
1675
+ *
1676
+ * `min` - number of special characters.
1677
+ *
1678
+ * ### Special characters:
1679
+ * ```js
1680
+ * ['!','@','#','$','%','^','&','*']
1681
+ * ```
1682
+ *
1683
+ * ### Usage:
1684
+ *
1685
+ * ```typescript
1686
+ * const control = new FormControl('pa$sword', PasswordValidators.minSpecial(2));
1687
+ * console.log(control.errors); // {minSpecial: {min: 2, actual: 1}}
1688
+ * ```
1689
+ */
1690
+ static minSpecial(min) {
1691
+ return ({ value }) => {
1692
+ if (typeof value !== 'string') {
1693
+ return null;
1694
+ }
1695
+ const matches = (value.match(/[!@#$%^&*]/g) || []).length;
1696
+ return matches >= min ? null : { minSpecial: { min, actual: matches } };
1697
+ };
1698
+ }
1699
+ }
1700
+
1519
1701
  function escapeRegExp(value) {
1520
1702
  if (value) {
1521
1703
  return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
@@ -1551,9 +1733,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
1551
1733
  }]
1552
1734
  }] });
1553
1735
 
1554
- /** InjectionToken that can be used to specify the global label options. */
1555
- const KBQ_LABEL_GLOBAL_OPTIONS = new InjectionToken('kbq-label-global-options');
1556
-
1557
1736
  /**
1558
1737
  * Shared directive to count lines inside a text area, such as a list item.
1559
1738
  * Line elements can be extracted with a @ContentChildren(KbqLine) query, then
@@ -1638,7 +1817,7 @@ class KbqOptionActionComponent extends KbqOptionActionMixinBase {
1638
1817
  this.focusMonitor = focusMonitor;
1639
1818
  this.option = option;
1640
1819
  this.hasFocus = false;
1641
- this.destroy = new Subject();
1820
+ this.destroyRef = inject(DestroyRef);
1642
1821
  this.focusMonitor.monitor(this.elementRef.nativeElement);
1643
1822
  }
1644
1823
  ngAfterViewInit() {
@@ -1646,15 +1825,13 @@ class KbqOptionActionComponent extends KbqOptionActionMixinBase {
1646
1825
  return;
1647
1826
  }
1648
1827
  this.option.dropdownTrigger.restoreFocus = false;
1649
- this.option.dropdownTrigger.dropdownClosed.pipe(takeUntil(this.destroy)).subscribe(() => {
1828
+ this.option.dropdownTrigger.dropdownClosed.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
1650
1829
  this.preventShowingTooltip();
1651
1830
  const destroyReason = this.option.dropdownTrigger.lastDestroyReason === 'keydown' ? 'keyboard' : 'program';
1652
1831
  this.focus(destroyReason);
1653
1832
  });
1654
1833
  }
1655
1834
  ngOnDestroy() {
1656
- this.destroy.next();
1657
- this.destroy.complete();
1658
1835
  this.focusMonitor.stopMonitoring(this.elementRef.nativeElement);
1659
1836
  }
1660
1837
  focus(origin, options) {
@@ -2554,6 +2731,7 @@ class KbqPopUpTrigger {
2554
2731
  this.scrollDispatcher = inject(ScrollDispatcher);
2555
2732
  this.hostView = inject(ViewContainerRef);
2556
2733
  this.direction = inject(Directionality, { optional: true });
2734
+ this.destroyRef = inject(DestroyRef);
2557
2735
  this.isOpen = false;
2558
2736
  this.enterDelay = 0;
2559
2737
  this.leaveDelay = 0;
@@ -2562,7 +2740,6 @@ class KbqPopUpTrigger {
2562
2740
  this.visible = false;
2563
2741
  this.listeners = new Map();
2564
2742
  this.availablePositions = POSITION_MAP;
2565
- this.destroyed = new Subject();
2566
2743
  this.detach = () => {
2567
2744
  if (this.overlayRef?.hasAttached()) {
2568
2745
  this.overlayRef.detach();
@@ -2603,8 +2780,6 @@ class KbqPopUpTrigger {
2603
2780
  this.overlayRef?.dispose();
2604
2781
  this.listeners.forEach(this.removeEventListener);
2605
2782
  this.listeners.clear();
2606
- this.destroyed.next();
2607
- this.destroyed.complete();
2608
2783
  }
2609
2784
  updatePlacement(value) {
2610
2785
  if (POSITION_TO_CSS_MAP[value]) {
@@ -2656,10 +2831,12 @@ class KbqPopUpTrigger {
2656
2831
  this.detach();
2657
2832
  this.portal = this.portal || new ComponentPortal(this.getOverlayHandleComponentType(), this.hostView);
2658
2833
  this.instance = this.overlayRef.attach(this.portal).instance;
2659
- this.instance.afterHidden().pipe(takeUntil(this.destroyed)).subscribe(this.detach);
2834
+ this.instance.afterHidden().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.detach);
2660
2835
  this.updateClassMap();
2661
2836
  this.updateData();
2662
- this.instance.visibleChange.pipe(takeUntil(this.destroyed), distinctUntilChanged()).subscribe((value) => {
2837
+ this.instance.visibleChange
2838
+ .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
2839
+ .subscribe((value) => {
2663
2840
  this.visible = value;
2664
2841
  this.visibleChange.emit(value);
2665
2842
  this.isOpen = value;
@@ -2686,7 +2863,7 @@ class KbqPopUpTrigger {
2686
2863
  .withPositions([...EXTENDED_OVERLAY_POSITIONS])
2687
2864
  .withLockedPosition()
2688
2865
  .withScrollableContainers(this.scrollDispatcher.getAncestorScrollContainers(this.elementRef));
2689
- this.strategy.positionChanges.pipe(takeUntil(this.destroyed)).subscribe(this.onPositionChange);
2866
+ this.strategy.positionChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.onPositionChange);
2690
2867
  this.overlayRef = this.overlay.create({
2691
2868
  ...this.overlayConfig,
2692
2869
  direction: this.direction || undefined,
@@ -2694,7 +2871,7 @@ class KbqPopUpTrigger {
2694
2871
  scrollStrategy: this.scrollStrategy()
2695
2872
  });
2696
2873
  this.subscribeOnClosingActions();
2697
- this.overlayRef.detachments().pipe(takeUntil(this.destroyed)).subscribe(this.detach);
2874
+ this.overlayRef.detachments().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.detach);
2698
2875
  return this.overlayRef;
2699
2876
  }
2700
2877
  resetOrigin() {
@@ -2778,7 +2955,7 @@ class KbqPopUpTrigger {
2778
2955
  subscribeOnClosingActions() {
2779
2956
  this.closingActionsSubscription?.unsubscribe();
2780
2957
  this.closingActionsSubscription = this.closingActions()
2781
- .pipe(takeUntil(this.destroyed))
2958
+ .pipe(takeUntilDestroyed(this.destroyRef))
2782
2959
  .pipe(delay(0))
2783
2960
  .subscribe((event) => {
2784
2961
  if (event?.type === 'click' && event.kbqPopoverPreventHide) {
@@ -3181,15 +3358,16 @@ function toBoolean(value) {
3181
3358
 
3182
3359
  const validationTooltipShowDelay = 10;
3183
3360
  const validationTooltipHideDelay = 3000;
3361
+ /** @deprecated Will be removed in next major release (#DS-2838) */
3184
3362
  const KBQ_VALIDATION = new InjectionToken('KbqUseValidation', {
3185
3363
  factory: () => ({ useValidation: true })
3186
3364
  });
3187
3365
 
3188
- const VERSION = new Version('18.1.0+sha-a864eb67');
3366
+ const VERSION = new Version('18.3.0+sha-4400726');
3189
3367
 
3190
3368
  /**
3191
3369
  * Generated bundle index. Do not edit.
3192
3370
  */
3193
3371
 
3194
- export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER, KBQ_DATE_FORMATS, KBQ_DATE_LOCALE, KBQ_DATE_LOCALE_FACTORY, KBQ_DEFAULT_LOCALE_DATA_FACTORY, KBQ_DEFAULT_LOCALE_ID, KBQ_FORM_FIELD_REF, KBQ_LABEL_GLOBAL_OPTIONS, KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS, KBQ_NUMBER_FORMATTER_OPTIONS, KBQ_OPTION_ACTION_PARENT, KBQ_OPTION_PARENT_COMPONENT, KBQ_PARENT_ANIMATION_COMPONENT, KBQ_SANITY_CHECKS, KBQ_SELECT_SCROLL_STRATEGY, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER, KBQ_SIZE_UNITS_CONFIG, KBQ_SIZE_UNITS_DEFAULT_CONFIG, KBQ_TITLE_TEXT_REF, KBQ_VALIDATION, KbqCommonModule, KbqComponentColors, KbqDataSizePipe, KbqDecimalPipe, KbqDefaultThemes, KbqForm, KbqFormElement, KbqFormattersModule, KbqFormsModule, KbqHighlightModule, KbqHighlightPipe, KbqLine, KbqLineModule, KbqLineSetter, KbqLocaleService, KbqLocaleServiceModule, KbqMeasureScrollbarService, KbqOptgroup, KbqOptgroupBase, KbqOptgroupMixinBase, KbqOption, KbqOptionActionBase, KbqOptionActionComponent, KbqOptionActionMixinBase, KbqOptionBase, KbqOptionModule, KbqOptionSelectionChange, KbqPopUp, KbqPopUpTrigger, KbqPseudoCheckbox, KbqPseudoCheckboxBase, KbqPseudoCheckboxMixinBase, KbqPseudoCheckboxModule, KbqRoundDecimalPipe, KbqSelectFooter, KbqSelectMatcher, KbqSelectSearch, KbqSelectSearchEmptyResult, KbqSelectTrigger, KbqTableNumberPipe, KbqThemeSelector, KbqVirtualOption, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MeasurementSystem, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnDirtyErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, ThemeService, VERSION, applyPopupMargins, countGroupLabelsBeforeOption, enUSFormattersData, enUSLocaleData, esLAFormattersData, esLALocaleData, escapeRegExp, faIRFormattersData, faIRLocaleData, fadeAnimation, formatDataSize, getHumanizedBytes, getKbqSelectDynamicMultipleError, getKbqSelectNonArrayValueError, getKbqSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, isWithin, kbqSelectAnimations, kbqSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, ptBRFormattersData, ptBRLocaleData, ruRUFormattersData, ruRULocaleData, selectEvents, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay, zhCNFormattersData, zhCNLocaleData };
3372
+ export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER, KBQ_DATE_FORMATS, KBQ_DATE_LOCALE, KBQ_DATE_LOCALE_FACTORY, KBQ_DEFAULT_LOCALE_DATA_FACTORY, KBQ_DEFAULT_LOCALE_ID, KBQ_FORM_FIELD_REF, KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS, KBQ_NUMBER_FORMATTER_OPTIONS, KBQ_OPTION_ACTION_PARENT, KBQ_OPTION_PARENT_COMPONENT, KBQ_PARENT_ANIMATION_COMPONENT, KBQ_SANITY_CHECKS, KBQ_SELECT_SCROLL_STRATEGY, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER, KBQ_SIZE_UNITS_CONFIG, KBQ_SIZE_UNITS_DEFAULT_CONFIG, KBQ_TITLE_TEXT_REF, KBQ_VALIDATION, KbqCommonModule, KbqComponentColors, KbqDataSizePipe, KbqDecimalPipe, KbqDefaultThemes, KbqForm, KbqFormElement, KbqFormattersModule, KbqFormsModule, KbqHighlightModule, KbqHighlightPipe, KbqLine, KbqLineModule, KbqLineSetter, KbqLocaleService, KbqLocaleServiceModule, KbqMeasureScrollbarService, KbqOptgroup, KbqOptgroupBase, KbqOptgroupMixinBase, KbqOption, KbqOptionActionBase, KbqOptionActionComponent, KbqOptionActionMixinBase, KbqOptionBase, KbqOptionModule, KbqOptionSelectionChange, KbqPopUp, KbqPopUpTrigger, KbqPseudoCheckbox, KbqPseudoCheckboxBase, KbqPseudoCheckboxMixinBase, KbqPseudoCheckboxModule, KbqRoundDecimalPipe, KbqSelectFooter, KbqSelectMatcher, KbqSelectSearch, KbqSelectSearchEmptyResult, KbqSelectTrigger, KbqTableNumberPipe, KbqThemeSelector, KbqVirtualOption, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MeasurementSystem, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PasswordValidators, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnControlDirtyErrorStateMatcher, ShowOnFormSubmitErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, ThemeService, VERSION, applyPopupMargins, checkAndNormalizeLocalizedNumber, countGroupLabelsBeforeOption, enUSFormattersData, enUSLocaleData, esLAFormattersData, esLALocaleData, escapeRegExp, faIRFormattersData, faIRLocaleData, fadeAnimation, formatDataSize, getHumanizedBytes, getKbqSelectDynamicMultipleError, getKbqSelectNonArrayValueError, getKbqSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, isWithin, kbqSelectAnimations, kbqSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, normalizeNumber, ptBRFormattersData, ptBRLocaleData, ruRUFormattersData, ruRULocaleData, selectEvents, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay, zhCNFormattersData, zhCNLocaleData };
3195
3373
  //# sourceMappingURL=koobiq-components-core.mjs.map