@odx/angular 1.0.3 → 2.0.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 (198) hide show
  1. package/cdk/autocomplete-control/README.md +3 -0
  2. package/cdk/autocomplete-control/index.d.ts +3 -0
  3. package/cdk/autocomplete-control/lib/abstract/base-search-field.directive.d.ts +13 -0
  4. package/cdk/autocomplete-control/lib/abstract/index.d.ts +1 -0
  5. package/cdk/autocomplete-control/lib/autocomplete-control.d.ts +39 -0
  6. package/cdk/autocomplete-control/lib/pipes/base-search-filter-pipe.d.ts +11 -0
  7. package/cdk/autocomplete-control/lib/pipes/index.d.ts +1 -0
  8. package/cdk/option-control/README.md +3 -0
  9. package/cdk/option-control/index.d.ts +1 -0
  10. package/cdk/option-control/lib/option-control.d.ts +17 -0
  11. package/components/autocomplete/README.md +3 -0
  12. package/components/autocomplete/index.d.ts +6 -0
  13. package/components/autocomplete/lib/autocomplete.component.d.ts +30 -0
  14. package/components/autocomplete/lib/autocomplete.module.d.ts +11 -0
  15. package/components/autocomplete/lib/autocomplete.tokens.d.ts +3 -0
  16. package/components/autocomplete/lib/components/index.d.ts +1 -0
  17. package/components/autocomplete/lib/components/option/autocomplete-option.component.d.ts +9 -0
  18. package/components/autocomplete/lib/directives/autocomplete-search-field.directive.d.ts +9 -0
  19. package/components/autocomplete/lib/directives/index.d.ts +1 -0
  20. package/components/autocomplete/lib/pipes/autocomplete-search-filter.pipe.d.ts +12 -0
  21. package/components/autocomplete/lib/pipes/index.d.ts +1 -0
  22. package/components/button/lib/button.component.d.ts +1 -1
  23. package/components/chip/index.d.ts +1 -1
  24. package/components/chip/lib/{chip.component.d.ts → components/chip/chip.component.d.ts} +1 -1
  25. package/components/chip/lib/components/chip-list/chip-list.component.d.ts +6 -0
  26. package/components/chip/lib/components/chip-list-row/chip-list-row.component.d.ts +6 -0
  27. package/components/chip/lib/components/index.d.ts +3 -0
  28. package/components/dropdown/lib/dropdown.directive.d.ts +2 -1
  29. package/components/form-field/lib/models/form-field-variant.d.ts +1 -0
  30. package/components/main-menu/lib/directives/index.d.ts +1 -0
  31. package/components/main-menu/lib/directives/main-menu-close.directive.d.ts +7 -0
  32. package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +3 -4
  33. package/components/main-menu/lib/main-menu.module.d.ts +3 -2
  34. package/components/menu/lib/directives/menu-item.directive.d.ts +1 -1
  35. package/components/select/index.d.ts +0 -1
  36. package/components/select/lib/components/index.d.ts +1 -1
  37. package/components/select/lib/components/select-option/select-option.component.d.ts +19 -0
  38. package/components/select/lib/directives/select-search-field.directive.d.ts +3 -7
  39. package/components/select/lib/pipes/select-search-filter.pipe.d.ts +8 -8
  40. package/components/select/lib/select.component.d.ts +15 -30
  41. package/components/select/lib/select.module.d.ts +2 -2
  42. package/components/select/lib/select.tokens.d.ts +2 -2
  43. package/components/table/README.md +3 -0
  44. package/components/table/index.d.ts +5 -0
  45. package/components/table/lib/components/check-cell/check-cell.component.d.ts +11 -0
  46. package/components/table/lib/components/header-title/header-title.component.d.ts +28 -0
  47. package/components/table/lib/components/index.d.ts +2 -0
  48. package/components/table/lib/directives/index.d.ts +2 -0
  49. package/components/table/lib/directives/table-cell.directive.d.ts +6 -0
  50. package/components/table/lib/directives/table-row.directive.d.ts +6 -0
  51. package/components/table/lib/interfaces/index.d.ts +3 -0
  52. package/components/table/lib/models/index.d.ts +2 -0
  53. package/components/table/lib/models/sort-variant.d.ts +6 -0
  54. package/components/table/lib/models/table-variant.d.ts +5 -0
  55. package/components/table/lib/table.component.d.ts +29 -0
  56. package/components/table/lib/table.config.d.ts +4 -0
  57. package/components/table/lib/table.module.d.ts +11 -0
  58. package/components/wizard/README.md +3 -0
  59. package/components/wizard/index.d.ts +3 -0
  60. package/components/wizard/lib/components/index.d.ts +1 -0
  61. package/components/wizard/lib/components/wizard-step/wizard-step.component.d.ts +17 -0
  62. package/components/wizard/lib/wizard.component.d.ts +31 -0
  63. package/components/wizard/lib/wizard.module.d.ts +9 -0
  64. package/esm2020/cdk/autocomplete-control/index.mjs +4 -0
  65. package/esm2020/cdk/autocomplete-control/lib/abstract/base-search-field.directive.mjs +38 -0
  66. package/esm2020/cdk/autocomplete-control/lib/abstract/index.mjs +2 -0
  67. package/esm2020/cdk/autocomplete-control/lib/autocomplete-control.mjs +90 -0
  68. package/esm2020/cdk/autocomplete-control/lib/pipes/base-search-filter-pipe.mjs +32 -0
  69. package/esm2020/cdk/autocomplete-control/lib/pipes/index.mjs +2 -0
  70. package/esm2020/cdk/autocomplete-control/odx-angular-cdk-autocomplete-control.mjs +5 -0
  71. package/esm2020/cdk/option-control/index.mjs +2 -0
  72. package/esm2020/cdk/option-control/lib/option-control.mjs +47 -0
  73. package/esm2020/cdk/option-control/odx-angular-cdk-option-control.mjs +5 -0
  74. package/esm2020/components/autocomplete/index.mjs +7 -0
  75. package/esm2020/components/autocomplete/lib/autocomplete.component.mjs +162 -0
  76. package/esm2020/components/autocomplete/lib/autocomplete.module.mjs +21 -0
  77. package/esm2020/components/autocomplete/lib/autocomplete.tokens.mjs +3 -0
  78. package/esm2020/components/autocomplete/lib/components/index.mjs +2 -0
  79. package/esm2020/components/autocomplete/lib/components/option/autocomplete-option.component.mjs +33 -0
  80. package/esm2020/components/autocomplete/lib/directives/autocomplete-search-field.directive.mjs +26 -0
  81. package/esm2020/components/autocomplete/lib/directives/index.mjs +2 -0
  82. package/esm2020/components/autocomplete/lib/pipes/autocomplete-search-filter.pipe.mjs +30 -0
  83. package/esm2020/components/autocomplete/lib/pipes/index.mjs +2 -0
  84. package/esm2020/components/autocomplete/odx-angular-components-autocomplete.mjs +5 -0
  85. package/esm2020/components/button/lib/button.component.mjs +3 -3
  86. package/esm2020/components/card/lib/card.component.mjs +2 -2
  87. package/esm2020/components/chip/index.mjs +2 -2
  88. package/esm2020/components/chip/lib/{chip.component.mjs → components/chip/chip.component.mjs} +2 -2
  89. package/esm2020/components/chip/lib/components/chip-list/chip-list.component.mjs +21 -0
  90. package/esm2020/components/chip/lib/components/chip-list-row/chip-list-row.component.mjs +21 -0
  91. package/esm2020/components/chip/lib/components/index.mjs +4 -0
  92. package/esm2020/components/dropdown/lib/dropdown.component.mjs +3 -3
  93. package/esm2020/components/dropdown/lib/dropdown.directive.mjs +10 -2
  94. package/esm2020/components/form-field/lib/components/form-group/form-group.component.mjs +3 -3
  95. package/esm2020/components/form-field/lib/form-field.component.mjs +3 -3
  96. package/esm2020/components/form-field/lib/form-field.service.mjs +2 -2
  97. package/esm2020/components/form-field/lib/models/form-field-variant.mjs +2 -1
  98. package/esm2020/components/main-menu/lib/directives/index.mjs +2 -1
  99. package/esm2020/components/main-menu/lib/directives/main-menu-close.directive.mjs +24 -0
  100. package/esm2020/components/main-menu/lib/directives/main-menu-item.directive.mjs +6 -12
  101. package/esm2020/components/main-menu/lib/main-menu.module.mjs +4 -4
  102. package/esm2020/components/menu/lib/directives/menu-item.directive.mjs +3 -3
  103. package/esm2020/components/select/index.mjs +1 -2
  104. package/esm2020/components/select/lib/components/index.mjs +2 -2
  105. package/esm2020/components/select/lib/components/select-option/select-option.component.mjs +75 -0
  106. package/esm2020/components/select/lib/directives/select-search-field.directive.mjs +9 -21
  107. package/esm2020/components/select/lib/pipes/select-search-filter.pipe.mjs +12 -33
  108. package/esm2020/components/select/lib/select.component.mjs +44 -86
  109. package/esm2020/components/select/lib/select.module.mjs +5 -5
  110. package/esm2020/components/select/lib/select.tokens.mjs +2 -2
  111. package/esm2020/components/table/index.mjs +6 -0
  112. package/esm2020/components/table/lib/components/check-cell/check-cell.component.mjs +29 -0
  113. package/esm2020/components/table/lib/components/header-title/header-title.component.mjs +86 -0
  114. package/esm2020/components/table/lib/components/index.mjs +3 -0
  115. package/esm2020/components/table/lib/directives/index.mjs +3 -0
  116. package/esm2020/components/table/lib/directives/table-cell.directive.mjs +27 -0
  117. package/esm2020/components/table/lib/directives/table-row.directive.mjs +28 -0
  118. package/esm2020/components/table/lib/interfaces/index.mjs +4 -0
  119. package/esm2020/components/table/lib/models/index.mjs +3 -0
  120. package/esm2020/components/table/lib/models/sort-variant.mjs +6 -0
  121. package/esm2020/components/table/lib/models/table-variant.mjs +5 -0
  122. package/esm2020/components/table/lib/table.component.mjs +86 -0
  123. package/esm2020/components/table/lib/table.config.mjs +3 -0
  124. package/esm2020/components/table/lib/table.module.mjs +21 -0
  125. package/esm2020/components/table/odx-angular-components-table.mjs +5 -0
  126. package/esm2020/components/wizard/index.mjs +4 -0
  127. package/esm2020/components/wizard/lib/components/index.mjs +2 -0
  128. package/esm2020/components/wizard/lib/components/wizard-step/wizard-step.component.mjs +73 -0
  129. package/esm2020/components/wizard/lib/wizard.component.mjs +155 -0
  130. package/esm2020/components/wizard/lib/wizard.module.mjs +19 -0
  131. package/esm2020/components/wizard/odx-angular-components-wizard.mjs +5 -0
  132. package/esm2020/lib/services/window-ref.mjs +4 -1
  133. package/fesm2015/odx-angular-cdk-autocomplete-control.mjs +164 -0
  134. package/fesm2015/odx-angular-cdk-autocomplete-control.mjs.map +1 -0
  135. package/fesm2015/odx-angular-cdk-option-control.mjs +55 -0
  136. package/fesm2015/odx-angular-cdk-option-control.mjs.map +1 -0
  137. package/fesm2015/odx-angular-components-autocomplete.mjs +263 -0
  138. package/fesm2015/odx-angular-components-autocomplete.mjs.map +1 -0
  139. package/fesm2015/odx-angular-components-button.mjs +2 -2
  140. package/fesm2015/odx-angular-components-button.mjs.map +1 -1
  141. package/fesm2015/odx-angular-components-card.mjs +1 -1
  142. package/fesm2015/odx-angular-components-card.mjs.map +1 -1
  143. package/fesm2015/odx-angular-components-chip.mjs +35 -5
  144. package/fesm2015/odx-angular-components-chip.mjs.map +1 -1
  145. package/fesm2015/odx-angular-components-dropdown.mjs +11 -3
  146. package/fesm2015/odx-angular-components-dropdown.mjs.map +1 -1
  147. package/fesm2015/odx-angular-components-form-field.mjs +5 -4
  148. package/fesm2015/odx-angular-components-form-field.mjs.map +1 -1
  149. package/fesm2015/odx-angular-components-main-menu.mjs +28 -14
  150. package/fesm2015/odx-angular-components-main-menu.mjs.map +1 -1
  151. package/fesm2015/odx-angular-components-menu.mjs +2 -2
  152. package/fesm2015/odx-angular-components-menu.mjs.map +1 -1
  153. package/fesm2015/odx-angular-components-select.mjs +80 -175
  154. package/fesm2015/odx-angular-components-select.mjs.map +1 -1
  155. package/fesm2015/odx-angular-components-table.mjs +264 -0
  156. package/fesm2015/odx-angular-components-table.mjs.map +1 -0
  157. package/fesm2015/odx-angular-components-wizard.mjs +242 -0
  158. package/fesm2015/odx-angular-components-wizard.mjs.map +1 -0
  159. package/fesm2015/odx-angular.mjs +3 -0
  160. package/fesm2015/odx-angular.mjs.map +1 -1
  161. package/fesm2020/odx-angular-cdk-autocomplete-control.mjs +160 -0
  162. package/fesm2020/odx-angular-cdk-autocomplete-control.mjs.map +1 -0
  163. package/fesm2020/odx-angular-cdk-option-control.mjs +54 -0
  164. package/fesm2020/odx-angular-cdk-option-control.mjs.map +1 -0
  165. package/fesm2020/odx-angular-components-autocomplete.mjs +254 -0
  166. package/fesm2020/odx-angular-components-autocomplete.mjs.map +1 -0
  167. package/fesm2020/odx-angular-components-button.mjs +2 -2
  168. package/fesm2020/odx-angular-components-button.mjs.map +1 -1
  169. package/fesm2020/odx-angular-components-card.mjs +1 -1
  170. package/fesm2020/odx-angular-components-card.mjs.map +1 -1
  171. package/fesm2020/odx-angular-components-chip.mjs +35 -5
  172. package/fesm2020/odx-angular-components-chip.mjs.map +1 -1
  173. package/fesm2020/odx-angular-components-dropdown.mjs +11 -3
  174. package/fesm2020/odx-angular-components-dropdown.mjs.map +1 -1
  175. package/fesm2020/odx-angular-components-form-field.mjs +5 -4
  176. package/fesm2020/odx-angular-components-form-field.mjs.map +1 -1
  177. package/fesm2020/odx-angular-components-main-menu.mjs +28 -14
  178. package/fesm2020/odx-angular-components-main-menu.mjs.map +1 -1
  179. package/fesm2020/odx-angular-components-menu.mjs +2 -2
  180. package/fesm2020/odx-angular-components-menu.mjs.map +1 -1
  181. package/fesm2020/odx-angular-components-select.mjs +77 -170
  182. package/fesm2020/odx-angular-components-select.mjs.map +1 -1
  183. package/fesm2020/odx-angular-components-table.mjs +259 -0
  184. package/fesm2020/odx-angular-components-table.mjs.map +1 -0
  185. package/fesm2020/odx-angular-components-wizard.mjs +239 -0
  186. package/fesm2020/odx-angular-components-wizard.mjs.map +1 -0
  187. package/fesm2020/odx-angular.mjs +3 -0
  188. package/fesm2020/odx-angular.mjs.map +1 -1
  189. package/lib/services/window-ref.d.ts +1 -0
  190. package/package.json +48 -8
  191. package/components/select/lib/abstract/index.d.ts +0 -2
  192. package/components/select/lib/abstract/select-control-option.d.ts +0 -9
  193. package/components/select/lib/abstract/select-control.d.ts +0 -12
  194. package/components/select/lib/components/option/option.component.d.ts +0 -26
  195. package/esm2020/components/select/lib/abstract/index.mjs +0 -3
  196. package/esm2020/components/select/lib/abstract/select-control-option.mjs +0 -2
  197. package/esm2020/components/select/lib/abstract/select-control.mjs +0 -2
  198. package/esm2020/components/select/lib/components/option/option.component.mjs +0 -95
@@ -1,37 +1,33 @@
1
1
  import { __decorate, __metadata } from 'tslib';
2
2
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, inject, ChangeDetectorRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, HostListener, Directive, Pipe, EventEmitter, forwardRef, ContentChildren, ViewChild, Output, ContentChild, NgModule } from '@angular/core';
4
+ import { InjectionToken, inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Directive, HostListener, Pipe, forwardRef, ContentChildren, ContentChild, NgModule } from '@angular/core';
5
5
  import * as i2 from '@odx/angular';
6
- import { DisabledController, detectControllerChanges, CoreModule, ODX_STRINGIFY, ODX_STRING_SEARCH_HANDLER, ODX_IDENTITY_MATCHER, ReadonlyController } from '@odx/angular';
6
+ import { DisabledController, detectControllerChanges, CoreModule, ODX_IDENTITY_MATCHER } from '@odx/angular';
7
7
  import { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';
8
+ import { OptionControl } from '@odx/angular/cdk/option-control';
8
9
  import { CheckboxComponent } from '@odx/angular/components/checkbox';
9
10
  import { CSSComponent, CSSModifier } from '@odx/angular/internal';
10
- import { untilDestroyed, injectElement, Transform, Pure, deferFn, isFunction } from '@odx/angular/utils';
11
+ import { Transform, deferFn } from '@odx/angular/utils';
11
12
  import * as i1 from '@angular/common';
12
- import { fromEvent, map, distinctUntilChanged } from 'rxjs';
13
+ import { BaseSearchFieldDirective, BaseSearchFilterPipe, AutocompleteControl } from '@odx/angular/cdk/autocomplete-control';
13
14
  import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
14
- import { CustomFormControl } from '@odx/angular/cdk/custom-form-control';
15
15
  import { DropdownDirective } from '@odx/angular/components/dropdown';
16
16
  import { IconComponent } from '@odx/angular/components/icon';
17
17
  import { LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';
18
18
  import { fromQueryList } from '@odx/angular/rxjs';
19
19
 
20
- const SELECT_CONTROL = new InjectionToken('@odx/angular/components/select::SelectControl');
20
+ const SELECT_CONTROL = new InjectionToken('@odx/angular/components/select::SelectComponent');
21
21
 
22
- let OptionComponent = class OptionComponent {
22
+ let SelectOptionComponent = class SelectOptionComponent extends OptionControl {
23
23
  get disabled() {
24
24
  return !!this.disabledController?.disabled;
25
25
  }
26
26
  constructor() {
27
+ super();
27
28
  this.disabledController = DisabledController.inject();
28
- this.takeUntilDestroyed = untilDestroyed();
29
- this.cdr = inject(ChangeDetectorRef);
30
29
  this.selectControl = inject(SELECT_CONTROL);
31
- this.isActive = false;
32
- this.element = injectElement();
33
30
  this.isSelected = false;
34
- this.value = null;
35
31
  this.notFoundMessage = false;
36
32
  if (!this.selectControl.multiple) {
37
33
  detectControllerChanges(this.selectControl)
@@ -44,9 +40,6 @@ let OptionComponent = class OptionComponent {
44
40
  ngOnInit() {
45
41
  this.isSelected = this.selectControl.isOptionSelected(this);
46
42
  }
47
- getLabel() {
48
- return this.element.nativeElement.textContent ?? '';
49
- }
50
43
  setActiveStyles() {
51
44
  if (this.disabled)
52
45
  return;
@@ -58,70 +51,48 @@ let OptionComponent = class OptionComponent {
58
51
  this.selectControl.selectOption(this);
59
52
  }
60
53
  }
61
- setInactiveStyles() {
62
- this.isActive = false;
63
- }
64
54
  switchCheckbox() {
65
55
  if (this.selectControl.multiple) {
66
56
  this.isSelected = !this.isSelected;
67
57
  this.cdr.markForCheck();
68
58
  }
69
59
  }
70
- select(event) {
71
- event.stopPropagation();
72
- event.preventDefault();
60
+ selectOption() {
73
61
  this.selectControl.selectOption(this);
74
62
  }
75
63
  };
76
- OptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
77
- OptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: OptionComponent, isStandalone: true, selector: "odx-option", inputs: { value: "value", notFoundMessage: "notFoundMessage" }, host: { attributes: { "role": "option" }, listeners: { "click": "select($event)" }, properties: { "attr.aria-selected": "isSelected", "attr.aria-disabled": "disabled || null", "class.is-disabled": "disabled", "class.is-selected": "isSelected", "class.is-active": "isActive" } }, providers: [DisabledController.connect()], ngImport: i0, template: "<odx-checkbox [checked]=\"isSelected\" *ngIf=\"selectControl.multiple && !notFoundMessage; else single\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</odx-checkbox>\n\n<ng-template #single>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</ng-template>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CheckboxComponent, selector: "odx-checkbox", inputs: ["indeterminate"], outputs: ["indeterminateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
64
+ SelectOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
65
+ SelectOptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SelectOptionComponent, isStandalone: true, selector: "odx-select-option, odx-option", inputs: { notFoundMessage: "notFoundMessage" }, host: { properties: { "attr.aria-disabled": "disabled || null", "class.is-disabled": "disabled" } }, providers: [DisabledController.connect()], usesInheritance: true, ngImport: i0, template: "<odx-checkbox [checked]=\"isSelected\" *ngIf=\"selectControl.multiple && !notFoundMessage; else single\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</odx-checkbox>\n\n<ng-template #single>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</ng-template>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CheckboxComponent, selector: "odx-checkbox", inputs: ["indeterminate"], outputs: ["indeterminateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
78
66
  __decorate([
79
67
  Transform(coerceBooleanProperty),
80
68
  __metadata("design:type", Object)
81
- ], OptionComponent.prototype, "notFoundMessage", void 0);
82
- OptionComponent = __decorate([
83
- CSSComponent('option'),
69
+ ], SelectOptionComponent.prototype, "notFoundMessage", void 0);
70
+ SelectOptionComponent = __decorate([
71
+ CSSComponent('select-option'),
84
72
  __metadata("design:paramtypes", [])
85
- ], OptionComponent);
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OptionComponent, decorators: [{
73
+ ], SelectOptionComponent);
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectOptionComponent, decorators: [{
87
75
  type: Component,
88
- args: [{ standalone: true, selector: 'odx-option', imports: [CoreModule, DynamicViewDirective, CheckboxComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DisabledController.connect()], host: {
89
- '[attr.aria-selected]': 'isSelected',
76
+ args: [{ standalone: true, selector: 'odx-select-option, odx-option', imports: [CoreModule, DynamicViewDirective, CheckboxComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DisabledController.connect()], host: {
90
77
  '[attr.aria-disabled]': 'disabled || null',
91
78
  '[class.is-disabled]': 'disabled',
92
- '[class.is-selected]': 'isSelected',
93
- '[class.is-active]': 'isActive',
94
- role: 'option',
95
79
  }, template: "<odx-checkbox [checked]=\"isSelected\" *ngIf=\"selectControl.multiple && !notFoundMessage; else single\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</odx-checkbox>\n\n<ng-template #single>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</ng-template>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n" }]
96
- }], ctorParameters: function () { return []; }, propDecorators: { value: [{
80
+ }], ctorParameters: function () { return []; }, propDecorators: { notFoundMessage: [{
97
81
  type: Input
98
- }], notFoundMessage: [{
99
- type: Input
100
- }], select: [{
101
- type: HostListener,
102
- args: ['click', ['$event']]
103
82
  }] } });
104
83
 
105
- let SelectSearchFieldDirective = class SelectSearchFieldDirective {
84
+ let SelectSearchFieldDirective = class SelectSearchFieldDirective extends BaseSearchFieldDirective {
106
85
  constructor() {
107
- this.takeUntilDestroyed = untilDestroyed();
108
- this.element = injectElement();
86
+ super(...arguments);
109
87
  // eslint-disable-next-line @angular-eslint/no-input-rename
110
88
  this.notFoundContent = null;
111
- this.valueChange$ = fromEvent(this.element.nativeElement, 'input').pipe(map(() => this.getValue()), distinctUntilChanged(), this.takeUntilDestroyed());
112
- }
113
- reset() {
114
- this.element.nativeElement.value = '';
115
- }
116
- focus() {
117
- this.element.nativeElement.focus();
118
89
  }
119
- getValue() {
120
- return this.element.nativeElement.value;
90
+ handleDelete() {
91
+ this.reset();
121
92
  }
122
93
  };
123
- SelectSearchFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
124
- SelectSearchFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SelectSearchFieldDirective, isStandalone: true, selector: "input[odxSelectSearchField]", inputs: { notFoundContent: ["odxSelectSearchField", "notFoundContent"] }, host: { listeners: { "keydown.delete": "reset()" }, properties: { "class.odx-form-field-control": "true" } }, ngImport: i0 });
94
+ SelectSearchFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
95
+ SelectSearchFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SelectSearchFieldDirective, isStandalone: true, selector: "input[odxSelectSearchField]", inputs: { notFoundContent: ["odxSelectSearchField", "notFoundContent"] }, host: { listeners: { "keydown.delete": "handleDelete()" } }, usesInheritance: true, ngImport: i0 });
125
96
  SelectSearchFieldDirective = __decorate([
126
97
  CSSComponent('select__search')
127
98
  ], SelectSearchFieldDirective);
@@ -130,54 +101,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
130
101
  args: [{
131
102
  standalone: true,
132
103
  selector: 'input[odxSelectSearchField]',
133
- host: {
134
- '[class.odx-form-field-control]': 'true',
135
- },
136
104
  }]
137
105
  }], propDecorators: { notFoundContent: [{
138
106
  type: Input,
139
107
  args: ['odxSelectSearchField']
140
- }], reset: [{
108
+ }], handleDelete: [{
141
109
  type: HostListener,
142
110
  args: ['keydown.delete']
143
111
  }] } });
144
112
 
145
- class SelectSearchFilterPipe {
113
+ class SelectSearchFilterPipe extends BaseSearchFilterPipe {
146
114
  constructor() {
147
- this.searchController = inject(SELECT_CONTROL, { optional: true });
148
- this.stringify = inject(ODX_STRINGIFY);
149
- this.stringSearchHandler = inject(ODX_STRING_SEARCH_HANDLER);
115
+ super(...arguments);
116
+ this.hostController = inject(SELECT_CONTROL, { optional: true });
150
117
  }
151
118
  get searchField() {
152
- return this.searchController?.searchField;
119
+ return this.hostController?.searchField;
153
120
  }
154
- transform(items, searchHandler) {
155
- if (this.searchField) {
156
- return this.filter(items, this.searchField.getValue(), searchHandler);
157
- }
158
- return items;
121
+ queryHandler(query) {
122
+ return query?.trim();
159
123
  }
160
- filter(items, query, searchHandler) {
161
- if (!items) {
162
- return null;
163
- }
164
- query = query.trim();
165
- if (query === '') {
166
- return items;
167
- }
168
- const search = searchHandler ?? this.stringSearchHandler;
169
- const stringify = this.searchController?.stringify ?? this.stringify;
170
- return items.filter((item) => search(stringify(item), query));
124
+ get searchBy() {
125
+ return this.hostController?.stringify ?? this.stringify;
171
126
  }
172
127
  }
173
- SelectSearchFilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
128
+ SelectSearchFilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFilterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe });
174
129
  SelectSearchFilterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFilterPipe, isStandalone: true, name: "odxSelectSearchFilter", pure: false });
175
- __decorate([
176
- Pure,
177
- __metadata("design:type", Function),
178
- __metadata("design:paramtypes", [Object, String, Function]),
179
- __metadata("design:returntype", Object)
180
- ], SelectSearchFilterPipe.prototype, "filter", null);
181
130
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFilterPipe, decorators: [{
182
131
  type: Pipe,
183
132
  args: [{
@@ -185,46 +134,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
185
134
  name: 'odxSelectSearchFilter',
186
135
  standalone: true,
187
136
  }]
188
- }], propDecorators: { filter: [] } });
137
+ }] });
189
138
 
190
139
  var SelectComponent_1;
191
- let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFormControl {
192
- get hasOptions() {
193
- return !!this.options && this.options.length > 0;
194
- }
195
- get isOpen() {
196
- return !!this.dropdown?.isOpen;
197
- }
198
- get selectedOptionContent() {
199
- return this.selectedOption ? this.selectedOptionTemplate ?? this.selectedOptionText : null;
200
- }
140
+ let SelectComponent = SelectComponent_1 = class SelectComponent extends AutocompleteControl {
201
141
  constructor() {
202
- super(null);
203
- this.changeDetector = inject(ChangeDetectorRef);
142
+ super(...arguments);
204
143
  this.searchFieldEnabled = false;
205
- this.smoothScrollEnabled = false;
206
144
  this.selectedOption = null;
207
145
  this.selectedOptionText = null;
208
- this.element = injectElement();
209
146
  this.placeholder = '';
210
- this.isLoading = false;
211
147
  this.multiple = false;
212
148
  this.selectedOptionTemplate = null;
213
149
  this.identityMatcher = inject(ODX_IDENTITY_MATCHER);
214
- this.change = new EventEmitter();
215
- detectControllerChanges(this).subscribe();
150
+ }
151
+ get selectedOptionContent() {
152
+ return this.selectedOption ? this.selectedOptionTemplate ?? this.selectedOptionText : null;
216
153
  }
217
154
  ngAfterViewInit() {
218
155
  if (!this.options)
219
156
  return;
220
- this.keyManager = new ActiveDescendantKeyManager(this.options).withHomeAndEnd().skipPredicate((item) => item.disabled);
221
- fromQueryList(this.options).subscribe(() => {
222
- this.updateSelectedOption();
223
- if (this.isOpen) {
224
- deferFn(() => this.activateSelectedOption());
225
- }
226
- });
227
- this.searchField?.valueChange$.subscribe(() => this.triggerControllerChange());
157
+ this.initKeyManager(this.options);
158
+ this.handleQueryListOption(this.options);
159
+ this.handleSearchFieldChanges();
228
160
  }
229
161
  registerOnChange(fn) {
230
162
  super.registerOnChange((value) => {
@@ -234,7 +166,7 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
234
166
  }
235
167
  selectOption(option) {
236
168
  if (option && !option.disabled) {
237
- this.change.emit();
169
+ this.optionSelected.emit();
238
170
  option.switchCheckbox();
239
171
  const value = this.multiple
240
172
  ? this.options
@@ -244,7 +176,7 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
244
176
  : option.value;
245
177
  this.updateValue(value ?? null);
246
178
  }
247
- !this.multiple && this.dropdown?.close();
179
+ !this.multiple && this.closeDropdown();
248
180
  }
249
181
  isOptionSelected(option) {
250
182
  if (option && !option.disabled) {
@@ -255,13 +187,23 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
255
187
  }
256
188
  return false;
257
189
  }
258
- scrollOptionIntoView({ element }) {
259
- const behavior = this.smoothScrollEnabled ? 'smooth' : undefined;
260
- if (isFunction(element.nativeElement.scrollIntoView)) {
261
- element.nativeElement.scrollIntoView({ block: 'center', behavior });
262
- }
190
+ initKeyManager(options) {
191
+ this.keyManager = new ActiveDescendantKeyManager(options).withHomeAndEnd().skipPredicate((item) => item.disabled);
192
+ }
193
+ handleQueryListOption(options) {
194
+ fromQueryList(options)
195
+ .pipe(this.takeUntilDestroyed())
196
+ .subscribe(() => {
197
+ this.updateSelectedOption();
198
+ if (this.isOpen) {
199
+ deferFn(() => this.activateSelectedOption());
200
+ }
201
+ });
263
202
  }
264
- openDropdown(event) {
203
+ handleSearchFieldChanges() {
204
+ this.searchField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe(() => this.triggerControllerChange());
205
+ }
206
+ handleControllerEvent(event) {
265
207
  if (this.isLoading || this.readonlyController?.readonly)
266
208
  return;
267
209
  if (this.isOpen && this.hasOptions) {
@@ -274,12 +216,6 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
274
216
  }
275
217
  this.keyManager?.onKeydown(event);
276
218
  }
277
- handleFocusOut(event) {
278
- if (this.isOpen) {
279
- event.stopImmediatePropagation();
280
- }
281
- this.onTouched();
282
- }
283
219
  activateSelectedOption() {
284
220
  let activeIndex = this.options?.toArray().findIndex((option) => option.isSelected && !option.disabled);
285
221
  if (!activeIndex || activeIndex === -1) {
@@ -304,12 +240,6 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
304
240
  onDropdownClosed() {
305
241
  this.searchField?.reset();
306
242
  }
307
- disableSmoothScroll() {
308
- this.smoothScrollEnabled = false;
309
- }
310
- enableSmoothScroll() {
311
- this.smoothScrollEnabled = true;
312
- }
313
243
  updateSelectedOption() {
314
244
  const options = this.options?.toArray();
315
245
  this.selectedOption = options?.find((option) => option.isSelected) ?? null;
@@ -331,83 +261,60 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
331
261
  this.changeDetector.detectChanges();
332
262
  }
333
263
  };
334
- SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
335
- SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SelectComponent, isStandalone: true, selector: "odx-select", inputs: { placeholder: "placeholder", isLoading: "isLoading", multiple: "multiple", selectedOptionTemplate: "selectedOptionTemplate", stringify: "stringify", identityMatcher: "identityMatcher" }, outputs: { change: "change" }, host: { listeners: { "click": "openDropdown($event)", "keydown": "openDropdown($event)", "focusout": "handleFocusOut($event)" }, properties: { "attr.aria-disabled": "isDisabled || null", "class.is-open": "isOpen", "tabindex": "searchFieldEnabled || isDisabled ? -1 : 0", "attr.aria-multiselectable": "multiple" } }, providers: [
336
- DisabledController.connect(),
337
- ReadonlyController.connect(),
264
+ SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
265
+ SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SelectComponent, isStandalone: true, selector: "odx-select", inputs: { placeholder: "placeholder", multiple: "multiple", selectedOptionTemplate: "selectedOptionTemplate", identityMatcher: "identityMatcher" }, host: { listeners: { "click": "handleControllerEvent($event)", "keydown": "handleControllerEvent($event)" }, properties: { "tabindex": "searchFieldEnabled || isDisabled ? -1 : 0", "attr.aria-multiselectable": "multiple" } }, providers: [
338
266
  {
339
267
  provide: SELECT_CONTROL,
340
268
  useExisting: forwardRef(() => SelectComponent_1),
341
269
  },
342
- ], queries: [{ propertyName: "searchField", first: true, predicate: SelectSearchFieldDirective, descendants: true }, { propertyName: "options", predicate: OptionComponent, descendants: true }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: DropdownDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-select__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n (odxDropdownBeforeOpen)=\"onDropdownOpen()\"\n (odxDropdownBeforeClose)=\"onDropdownClose()\"\n (odxDropdownAfterClose)=\"onDropdownClosed()\"\n (odxDropdownAfterOpen)=\"enableSmoothScroll()\"\n>\n <ng-template [ngIf]=\"!searchFieldEnabled\" [ngIfElse]=\"searchFieldTemplate\">\n <div class=\"odx-select__value\" *ngIf=\"selectedOptionContent; else placeholderTemplate\">\n <ng-template [odxDynamicView]=\"selectedOptionContent\" [odxDynamicViewContext]=\"{ $implicit: value }\"></ng-template>\n </div>\n </ng-template>\n <ng-template #placeholderTemplate>\n <div class=\"odx-select__placeholder\">\n {{ placeholder }}\n </div>\n </ng-template>\n <ng-template #searchFieldTemplate>\n <ng-content select=\"[odxSelectSearchField]\"></ng-content>\n </ng-template>\n <odx-icon class=\"odx-select__indicator\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n</div>\n<ng-template #dropdownContent>\n <div class=\"odx-select-dropdown\" role=\"listbox\">\n <ng-template [ngIf]=\"hasOptions\" [ngIfElse]=\"noOptionsTemplate\">\n <ng-content></ng-content>\n </ng-template>\n <ng-template #noOptionsTemplate>\n <odx-option disabled notFoundMessage>\n <ng-template [odxDynamicView]=\"searchField?.notFoundContent\"></ng-template>\n </odx-option>\n </ng-template>\n </div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }, { kind: "component", type: OptionComponent, selector: "odx-option", inputs: ["value", "notFoundMessage"] }, { kind: "ngmodule", type: LoadingSpinnerModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
343
- __decorate([
344
- Transform(coerceBooleanProperty),
345
- __metadata("design:type", Object)
346
- ], SelectComponent.prototype, "isLoading", void 0);
270
+ ], queries: [{ propertyName: "searchField", first: true, predicate: SelectSearchFieldDirective, descendants: true }, { propertyName: "options", predicate: SelectOptionComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-select__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n (odxDropdownBeforeOpen)=\"onDropdownOpen()\"\n (odxDropdownBeforeClose)=\"onDropdownClose()\"\n (odxDropdownAfterClose)=\"onDropdownClosed()\"\n (odxDropdownAfterOpen)=\"enableSmoothScroll()\"\n>\n <ng-template [ngIf]=\"!searchFieldEnabled\" [ngIfElse]=\"searchFieldTemplate\">\n <div class=\"odx-select__value\" *ngIf=\"selectedOptionContent; else placeholderTemplate\">\n <ng-template [odxDynamicView]=\"selectedOptionContent\" [odxDynamicViewContext]=\"{ $implicit: value }\"></ng-template>\n </div>\n </ng-template>\n <ng-template #placeholderTemplate>\n <div class=\"odx-select__placeholder\">\n {{ placeholder }}\n </div>\n </ng-template>\n <ng-template #searchFieldTemplate>\n <ng-content select=\"[odxSelectSearchField]\"></ng-content>\n </ng-template>\n <odx-icon class=\"odx-select__indicator\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n</div>\n<ng-template #dropdownContent>\n <div class=\"odx-dropdown__option-list\" role=\"listbox\">\n <ng-template [ngIf]=\"hasOptions\" [ngIfElse]=\"noOptionsTemplate\">\n <ng-content></ng-content>\n </ng-template>\n <ng-template #noOptionsTemplate>\n <odx-select-option disabled notFoundMessage>\n <ng-template [odxDynamicView]=\"searchField?.notFoundContent\"></ng-template>\n </odx-select-option>\n </ng-template>\n </div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }, { kind: "component", type: SelectOptionComponent, selector: "odx-select-option, odx-option", inputs: ["notFoundMessage"] }, { kind: "ngmodule", type: LoadingSpinnerModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
347
271
  __decorate([
348
272
  CSSModifier(),
349
273
  Transform(coerceBooleanProperty),
350
274
  __metadata("design:type", Object)
351
275
  ], SelectComponent.prototype, "multiple", void 0);
352
276
  SelectComponent = SelectComponent_1 = __decorate([
353
- CSSComponent('select'),
354
- __metadata("design:paramtypes", [])
277
+ CSSComponent('select')
355
278
  ], SelectComponent);
356
279
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectComponent, decorators: [{
357
280
  type: Component,
358
- args: [{ standalone: true, selector: 'odx-select', imports: [CoreModule, DropdownDirective, IconComponent, DynamicViewDirective, OptionComponent, LoadingSpinnerModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
359
- DisabledController.connect(),
360
- ReadonlyController.connect(),
281
+ args: [{ standalone: true, selector: 'odx-select', imports: [CoreModule, DropdownDirective, IconComponent, DynamicViewDirective, SelectOptionComponent, LoadingSpinnerModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
361
282
  {
362
283
  provide: SELECT_CONTROL,
363
284
  useExisting: forwardRef(() => SelectComponent),
364
285
  },
365
286
  ], host: {
366
- '[attr.aria-disabled]': 'isDisabled || null',
367
- '[class.is-open]': 'isOpen',
368
287
  '[tabindex]': 'searchFieldEnabled || isDisabled ? -1 : 0',
369
288
  '[attr.aria-multiselectable]': 'multiple',
370
- }, template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-select__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n (odxDropdownBeforeOpen)=\"onDropdownOpen()\"\n (odxDropdownBeforeClose)=\"onDropdownClose()\"\n (odxDropdownAfterClose)=\"onDropdownClosed()\"\n (odxDropdownAfterOpen)=\"enableSmoothScroll()\"\n>\n <ng-template [ngIf]=\"!searchFieldEnabled\" [ngIfElse]=\"searchFieldTemplate\">\n <div class=\"odx-select__value\" *ngIf=\"selectedOptionContent; else placeholderTemplate\">\n <ng-template [odxDynamicView]=\"selectedOptionContent\" [odxDynamicViewContext]=\"{ $implicit: value }\"></ng-template>\n </div>\n </ng-template>\n <ng-template #placeholderTemplate>\n <div class=\"odx-select__placeholder\">\n {{ placeholder }}\n </div>\n </ng-template>\n <ng-template #searchFieldTemplate>\n <ng-content select=\"[odxSelectSearchField]\"></ng-content>\n </ng-template>\n <odx-icon class=\"odx-select__indicator\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n</div>\n<ng-template #dropdownContent>\n <div class=\"odx-select-dropdown\" role=\"listbox\">\n <ng-template [ngIf]=\"hasOptions\" [ngIfElse]=\"noOptionsTemplate\">\n <ng-content></ng-content>\n </ng-template>\n <ng-template #noOptionsTemplate>\n <odx-option disabled notFoundMessage>\n <ng-template [odxDynamicView]=\"searchField?.notFoundContent\"></ng-template>\n </odx-option>\n </ng-template>\n </div>\n</ng-template>\n" }]
371
- }], ctorParameters: function () { return []; }, propDecorators: { options: [{
289
+ }, template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-select__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n (odxDropdownBeforeOpen)=\"onDropdownOpen()\"\n (odxDropdownBeforeClose)=\"onDropdownClose()\"\n (odxDropdownAfterClose)=\"onDropdownClosed()\"\n (odxDropdownAfterOpen)=\"enableSmoothScroll()\"\n>\n <ng-template [ngIf]=\"!searchFieldEnabled\" [ngIfElse]=\"searchFieldTemplate\">\n <div class=\"odx-select__value\" *ngIf=\"selectedOptionContent; else placeholderTemplate\">\n <ng-template [odxDynamicView]=\"selectedOptionContent\" [odxDynamicViewContext]=\"{ $implicit: value }\"></ng-template>\n </div>\n </ng-template>\n <ng-template #placeholderTemplate>\n <div class=\"odx-select__placeholder\">\n {{ placeholder }}\n </div>\n </ng-template>\n <ng-template #searchFieldTemplate>\n <ng-content select=\"[odxSelectSearchField]\"></ng-content>\n </ng-template>\n <odx-icon class=\"odx-select__indicator\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n</div>\n<ng-template #dropdownContent>\n <div class=\"odx-dropdown__option-list\" role=\"listbox\">\n <ng-template [ngIf]=\"hasOptions\" [ngIfElse]=\"noOptionsTemplate\">\n <ng-content></ng-content>\n </ng-template>\n <ng-template #noOptionsTemplate>\n <odx-select-option disabled notFoundMessage>\n <ng-template [odxDynamicView]=\"searchField?.notFoundContent\"></ng-template>\n </odx-select-option>\n </ng-template>\n </div>\n</ng-template>\n" }]
290
+ }], propDecorators: { options: [{
372
291
  type: ContentChildren,
373
- args: [OptionComponent, { descendants: true, emitDistinctChangesOnly: true }]
374
- }], dropdown: [{
375
- type: ViewChild,
376
- args: [DropdownDirective]
292
+ args: [SelectOptionComponent, { descendants: true, emitDistinctChangesOnly: true }]
293
+ }], searchField: [{
294
+ type: ContentChild,
295
+ args: [SelectSearchFieldDirective]
377
296
  }], placeholder: [{
378
297
  type: Input
379
- }], isLoading: [{
380
- type: Input
381
298
  }], multiple: [{
382
299
  type: Input
383
300
  }], selectedOptionTemplate: [{
384
301
  type: Input
385
- }], stringify: [{
386
- type: Input
387
302
  }], identityMatcher: [{
388
303
  type: Input
389
- }], change: [{
390
- type: Output
391
- }], searchField: [{
392
- type: ContentChild,
393
- args: [SelectSearchFieldDirective]
394
- }], openDropdown: [{
304
+ }], handleControllerEvent: [{
395
305
  type: HostListener,
396
306
  args: ['click', ['$event']]
397
307
  }, {
398
308
  type: HostListener,
399
309
  args: ['keydown', ['$event']]
400
- }], handleFocusOut: [{
401
- type: HostListener,
402
- args: ['focusout', ['$event']]
403
310
  }] } });
404
311
 
405
- const modules = [SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, OptionComponent];
312
+ const modules = [SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, SelectOptionComponent];
406
313
  class SelectModule {
407
314
  }
408
315
  SelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
409
- SelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, imports: [SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, OptionComponent], exports: [CoreModule, SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, OptionComponent] });
410
- SelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, imports: [SelectComponent, OptionComponent, CoreModule] });
316
+ SelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, imports: [SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, SelectOptionComponent], exports: [CoreModule, SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, SelectOptionComponent] });
317
+ SelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, imports: [SelectComponent, SelectOptionComponent, CoreModule] });
411
318
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, decorators: [{
412
319
  type: NgModule,
413
320
  args: [{
@@ -420,5 +327,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
420
327
  * Generated bundle index. Do not edit.
421
328
  */
422
329
 
423
- export { OptionComponent, SELECT_CONTROL, SelectComponent, SelectModule, SelectSearchFieldDirective, SelectSearchFilterPipe };
330
+ export { SELECT_CONTROL, SelectComponent, SelectModule, SelectOptionComponent, SelectSearchFieldDirective, SelectSearchFilterPipe };
424
331
  //# sourceMappingURL=odx-angular-components-select.mjs.map