@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,38 +1,34 @@
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
  var _a;
25
25
  return !!((_a = this.disabledController) === null || _a === void 0 ? void 0 : _a.disabled);
26
26
  }
27
27
  constructor() {
28
+ super();
28
29
  this.disabledController = DisabledController.inject();
29
- this.takeUntilDestroyed = untilDestroyed();
30
- this.cdr = inject(ChangeDetectorRef);
31
30
  this.selectControl = inject(SELECT_CONTROL);
32
- this.isActive = false;
33
- this.element = injectElement();
34
31
  this.isSelected = false;
35
- this.value = null;
36
32
  this.notFoundMessage = false;
37
33
  if (!this.selectControl.multiple) {
38
34
  detectControllerChanges(this.selectControl)
@@ -45,10 +41,6 @@ let OptionComponent = class OptionComponent {
45
41
  ngOnInit() {
46
42
  this.isSelected = this.selectControl.isOptionSelected(this);
47
43
  }
48
- getLabel() {
49
- var _a;
50
- return (_a = this.element.nativeElement.textContent) !== null && _a !== void 0 ? _a : '';
51
- }
52
44
  setActiveStyles() {
53
45
  if (this.disabled)
54
46
  return;
@@ -60,70 +52,48 @@ let OptionComponent = class OptionComponent {
60
52
  this.selectControl.selectOption(this);
61
53
  }
62
54
  }
63
- setInactiveStyles() {
64
- this.isActive = false;
65
- }
66
55
  switchCheckbox() {
67
56
  if (this.selectControl.multiple) {
68
57
  this.isSelected = !this.isSelected;
69
58
  this.cdr.markForCheck();
70
59
  }
71
60
  }
72
- select(event) {
73
- event.stopPropagation();
74
- event.preventDefault();
61
+ selectOption() {
75
62
  this.selectControl.selectOption(this);
76
63
  }
77
64
  };
78
- OptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
79
- 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 });
65
+ SelectOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
66
+ 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 });
80
67
  __decorate([
81
68
  Transform(coerceBooleanProperty),
82
69
  __metadata("design:type", Object)
83
- ], OptionComponent.prototype, "notFoundMessage", void 0);
84
- OptionComponent = __decorate([
85
- CSSComponent('option'),
70
+ ], SelectOptionComponent.prototype, "notFoundMessage", void 0);
71
+ SelectOptionComponent = __decorate([
72
+ CSSComponent('select-option'),
86
73
  __metadata("design:paramtypes", [])
87
- ], OptionComponent);
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OptionComponent, decorators: [{
74
+ ], SelectOptionComponent);
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectOptionComponent, decorators: [{
89
76
  type: Component,
90
- args: [{ standalone: true, selector: 'odx-option', imports: [CoreModule, DynamicViewDirective, CheckboxComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DisabledController.connect()], host: {
91
- '[attr.aria-selected]': 'isSelected',
77
+ args: [{ standalone: true, selector: 'odx-select-option, odx-option', imports: [CoreModule, DynamicViewDirective, CheckboxComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DisabledController.connect()], host: {
92
78
  '[attr.aria-disabled]': 'disabled || null',
93
79
  '[class.is-disabled]': 'disabled',
94
- '[class.is-selected]': 'isSelected',
95
- '[class.is-active]': 'isActive',
96
- role: 'option',
97
80
  }, 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" }]
98
- }], ctorParameters: function () { return []; }, propDecorators: { value: [{
99
- type: Input
100
- }], notFoundMessage: [{
81
+ }], ctorParameters: function () { return []; }, propDecorators: { notFoundMessage: [{
101
82
  type: Input
102
- }], select: [{
103
- type: HostListener,
104
- args: ['click', ['$event']]
105
83
  }] } });
106
84
 
107
- let SelectSearchFieldDirective = class SelectSearchFieldDirective {
85
+ let SelectSearchFieldDirective = class SelectSearchFieldDirective extends BaseSearchFieldDirective {
108
86
  constructor() {
109
- this.takeUntilDestroyed = untilDestroyed();
110
- this.element = injectElement();
87
+ super(...arguments);
111
88
  // eslint-disable-next-line @angular-eslint/no-input-rename
112
89
  this.notFoundContent = null;
113
- this.valueChange$ = fromEvent(this.element.nativeElement, 'input').pipe(map(() => this.getValue()), distinctUntilChanged(), this.takeUntilDestroyed());
114
- }
115
- reset() {
116
- this.element.nativeElement.value = '';
117
- }
118
- focus() {
119
- this.element.nativeElement.focus();
120
90
  }
121
- getValue() {
122
- return this.element.nativeElement.value;
91
+ handleDelete() {
92
+ this.reset();
123
93
  }
124
94
  };
125
- SelectSearchFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
126
- 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 });
95
+ SelectSearchFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
96
+ 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 });
127
97
  SelectSearchFieldDirective = __decorate([
128
98
  CSSComponent('select__search')
129
99
  ], SelectSearchFieldDirective);
@@ -132,56 +102,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
132
102
  args: [{
133
103
  standalone: true,
134
104
  selector: 'input[odxSelectSearchField]',
135
- host: {
136
- '[class.odx-form-field-control]': 'true',
137
- },
138
105
  }]
139
106
  }], propDecorators: { notFoundContent: [{
140
107
  type: Input,
141
108
  args: ['odxSelectSearchField']
142
- }], reset: [{
109
+ }], handleDelete: [{
143
110
  type: HostListener,
144
111
  args: ['keydown.delete']
145
112
  }] } });
146
113
 
147
- class SelectSearchFilterPipe {
114
+ class SelectSearchFilterPipe extends BaseSearchFilterPipe {
148
115
  constructor() {
149
- this.searchController = inject(SELECT_CONTROL, { optional: true });
150
- this.stringify = inject(ODX_STRINGIFY);
151
- this.stringSearchHandler = inject(ODX_STRING_SEARCH_HANDLER);
116
+ super(...arguments);
117
+ this.hostController = inject(SELECT_CONTROL, { optional: true });
152
118
  }
153
119
  get searchField() {
154
120
  var _a;
155
- return (_a = this.searchController) === null || _a === void 0 ? void 0 : _a.searchField;
121
+ return (_a = this.hostController) === null || _a === void 0 ? void 0 : _a.searchField;
156
122
  }
157
- transform(items, searchHandler) {
158
- if (this.searchField) {
159
- return this.filter(items, this.searchField.getValue(), searchHandler);
160
- }
161
- return items;
123
+ queryHandler(query) {
124
+ return query === null || query === void 0 ? void 0 : query.trim();
162
125
  }
163
- filter(items, query, searchHandler) {
126
+ get searchBy() {
164
127
  var _a, _b;
165
- if (!items) {
166
- return null;
167
- }
168
- query = query.trim();
169
- if (query === '') {
170
- return items;
171
- }
172
- const search = searchHandler !== null && searchHandler !== void 0 ? searchHandler : this.stringSearchHandler;
173
- const stringify = (_b = (_a = this.searchController) === null || _a === void 0 ? void 0 : _a.stringify) !== null && _b !== void 0 ? _b : this.stringify;
174
- return items.filter((item) => search(stringify(item), query));
128
+ return (_b = (_a = this.hostController) === null || _a === void 0 ? void 0 : _a.stringify) !== null && _b !== void 0 ? _b : this.stringify;
175
129
  }
176
130
  }
177
- SelectSearchFilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
131
+ SelectSearchFilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFilterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe });
178
132
  SelectSearchFilterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFilterPipe, isStandalone: true, name: "odxSelectSearchFilter", pure: false });
179
- __decorate([
180
- Pure,
181
- __metadata("design:type", Function),
182
- __metadata("design:paramtypes", [Object, String, Function]),
183
- __metadata("design:returntype", Object)
184
- ], SelectSearchFilterPipe.prototype, "filter", null);
185
133
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFilterPipe, decorators: [{
186
134
  type: Pipe,
187
135
  args: [{
@@ -189,49 +137,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
189
137
  name: 'odxSelectSearchFilter',
190
138
  standalone: true,
191
139
  }]
192
- }], propDecorators: { filter: [] } });
140
+ }] });
193
141
 
194
142
  var SelectComponent_1;
195
- let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFormControl {
196
- get hasOptions() {
197
- return !!this.options && this.options.length > 0;
198
- }
199
- get isOpen() {
200
- var _a;
201
- return !!((_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.isOpen);
202
- }
203
- get selectedOptionContent() {
204
- var _a;
205
- return this.selectedOption ? (_a = this.selectedOptionTemplate) !== null && _a !== void 0 ? _a : this.selectedOptionText : null;
206
- }
143
+ let SelectComponent = SelectComponent_1 = class SelectComponent extends AutocompleteControl {
207
144
  constructor() {
208
- super(null);
209
- this.changeDetector = inject(ChangeDetectorRef);
145
+ super(...arguments);
210
146
  this.searchFieldEnabled = false;
211
- this.smoothScrollEnabled = false;
212
147
  this.selectedOption = null;
213
148
  this.selectedOptionText = null;
214
- this.element = injectElement();
215
149
  this.placeholder = '';
216
- this.isLoading = false;
217
150
  this.multiple = false;
218
151
  this.selectedOptionTemplate = null;
219
152
  this.identityMatcher = inject(ODX_IDENTITY_MATCHER);
220
- this.change = new EventEmitter();
221
- detectControllerChanges(this).subscribe();
222
153
  }
223
- ngAfterViewInit() {
154
+ get selectedOptionContent() {
224
155
  var _a;
156
+ return this.selectedOption ? (_a = this.selectedOptionTemplate) !== null && _a !== void 0 ? _a : this.selectedOptionText : null;
157
+ }
158
+ ngAfterViewInit() {
225
159
  if (!this.options)
226
160
  return;
227
- this.keyManager = new ActiveDescendantKeyManager(this.options).withHomeAndEnd().skipPredicate((item) => item.disabled);
228
- fromQueryList(this.options).subscribe(() => {
229
- this.updateSelectedOption();
230
- if (this.isOpen) {
231
- deferFn(() => this.activateSelectedOption());
232
- }
233
- });
234
- (_a = this.searchField) === null || _a === void 0 ? void 0 : _a.valueChange$.subscribe(() => this.triggerControllerChange());
161
+ this.initKeyManager(this.options);
162
+ this.handleQueryListOption(this.options);
163
+ this.handleSearchFieldChanges();
235
164
  }
236
165
  registerOnChange(fn) {
237
166
  super.registerOnChange((value) => {
@@ -240,16 +169,16 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
240
169
  });
241
170
  }
242
171
  selectOption(option) {
243
- var _a, _b;
172
+ var _a;
244
173
  if (option && !option.disabled) {
245
- this.change.emit();
174
+ this.optionSelected.emit();
246
175
  option.switchCheckbox();
247
176
  const value = this.multiple
248
177
  ? (_a = this.options) === null || _a === void 0 ? void 0 : _a.toArray().filter(({ isSelected }) => isSelected).map(({ value }) => value)
249
178
  : option.value;
250
179
  this.updateValue(value !== null && value !== void 0 ? value : null);
251
180
  }
252
- !this.multiple && ((_b = this.dropdown) === null || _b === void 0 ? void 0 : _b.close());
181
+ !this.multiple && this.closeDropdown();
253
182
  }
254
183
  isOptionSelected(option) {
255
184
  if (option && !option.disabled) {
@@ -260,13 +189,24 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
260
189
  }
261
190
  return false;
262
191
  }
263
- scrollOptionIntoView({ element }) {
264
- const behavior = this.smoothScrollEnabled ? 'smooth' : undefined;
265
- if (isFunction(element.nativeElement.scrollIntoView)) {
266
- element.nativeElement.scrollIntoView({ block: 'center', behavior });
267
- }
192
+ initKeyManager(options) {
193
+ this.keyManager = new ActiveDescendantKeyManager(options).withHomeAndEnd().skipPredicate((item) => item.disabled);
268
194
  }
269
- openDropdown(event) {
195
+ handleQueryListOption(options) {
196
+ fromQueryList(options)
197
+ .pipe(this.takeUntilDestroyed())
198
+ .subscribe(() => {
199
+ this.updateSelectedOption();
200
+ if (this.isOpen) {
201
+ deferFn(() => this.activateSelectedOption());
202
+ }
203
+ });
204
+ }
205
+ handleSearchFieldChanges() {
206
+ var _a;
207
+ (_a = this.searchField) === null || _a === void 0 ? void 0 : _a.valueChange$.pipe(this.takeUntilDestroyed()).subscribe(() => this.triggerControllerChange());
208
+ }
209
+ handleControllerEvent(event) {
270
210
  var _a, _b, _c;
271
211
  if (this.isLoading || ((_a = this.readonlyController) === null || _a === void 0 ? void 0 : _a.readonly))
272
212
  return;
@@ -280,12 +220,6 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
280
220
  }
281
221
  (_c = this.keyManager) === null || _c === void 0 ? void 0 : _c.onKeydown(event);
282
222
  }
283
- handleFocusOut(event) {
284
- if (this.isOpen) {
285
- event.stopImmediatePropagation();
286
- }
287
- this.onTouched();
288
- }
289
223
  activateSelectedOption() {
290
224
  var _a, _b, _c, _d;
291
225
  let activeIndex = (_a = this.options) === null || _a === void 0 ? void 0 : _a.toArray().findIndex((option) => option.isSelected && !option.disabled);
@@ -313,12 +247,6 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
313
247
  var _a;
314
248
  (_a = this.searchField) === null || _a === void 0 ? void 0 : _a.reset();
315
249
  }
316
- disableSmoothScroll() {
317
- this.smoothScrollEnabled = false;
318
- }
319
- enableSmoothScroll() {
320
- this.smoothScrollEnabled = true;
321
- }
322
250
  updateSelectedOption() {
323
251
  var _a, _b, _c, _d, _e, _f;
324
252
  const options = (_a = this.options) === null || _a === void 0 ? void 0 : _a.toArray();
@@ -338,83 +266,60 @@ let SelectComponent = SelectComponent_1 = class SelectComponent extends CustomFo
338
266
  this.changeDetector.detectChanges();
339
267
  }
340
268
  };
341
- SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
342
- 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: [
343
- DisabledController.connect(),
344
- ReadonlyController.connect(),
269
+ SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
270
+ 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: [
345
271
  {
346
272
  provide: SELECT_CONTROL,
347
273
  useExisting: forwardRef(() => SelectComponent_1),
348
274
  },
349
- ], 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 });
350
- __decorate([
351
- Transform(coerceBooleanProperty),
352
- __metadata("design:type", Object)
353
- ], SelectComponent.prototype, "isLoading", void 0);
275
+ ], 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 });
354
276
  __decorate([
355
277
  CSSModifier(),
356
278
  Transform(coerceBooleanProperty),
357
279
  __metadata("design:type", Object)
358
280
  ], SelectComponent.prototype, "multiple", void 0);
359
281
  SelectComponent = SelectComponent_1 = __decorate([
360
- CSSComponent('select'),
361
- __metadata("design:paramtypes", [])
282
+ CSSComponent('select')
362
283
  ], SelectComponent);
363
284
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectComponent, decorators: [{
364
285
  type: Component,
365
- args: [{ standalone: true, selector: 'odx-select', imports: [CoreModule, DropdownDirective, IconComponent, DynamicViewDirective, OptionComponent, LoadingSpinnerModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
366
- DisabledController.connect(),
367
- ReadonlyController.connect(),
286
+ args: [{ standalone: true, selector: 'odx-select', imports: [CoreModule, DropdownDirective, IconComponent, DynamicViewDirective, SelectOptionComponent, LoadingSpinnerModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
368
287
  {
369
288
  provide: SELECT_CONTROL,
370
289
  useExisting: forwardRef(() => SelectComponent),
371
290
  },
372
291
  ], host: {
373
- '[attr.aria-disabled]': 'isDisabled || null',
374
- '[class.is-open]': 'isOpen',
375
292
  '[tabindex]': 'searchFieldEnabled || isDisabled ? -1 : 0',
376
293
  '[attr.aria-multiselectable]': 'multiple',
377
- }, 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" }]
378
- }], ctorParameters: function () { return []; }, propDecorators: { options: [{
294
+ }, 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" }]
295
+ }], propDecorators: { options: [{
379
296
  type: ContentChildren,
380
- args: [OptionComponent, { descendants: true, emitDistinctChangesOnly: true }]
381
- }], dropdown: [{
382
- type: ViewChild,
383
- args: [DropdownDirective]
297
+ args: [SelectOptionComponent, { descendants: true, emitDistinctChangesOnly: true }]
298
+ }], searchField: [{
299
+ type: ContentChild,
300
+ args: [SelectSearchFieldDirective]
384
301
  }], placeholder: [{
385
302
  type: Input
386
- }], isLoading: [{
387
- type: Input
388
303
  }], multiple: [{
389
304
  type: Input
390
305
  }], selectedOptionTemplate: [{
391
306
  type: Input
392
- }], stringify: [{
393
- type: Input
394
307
  }], identityMatcher: [{
395
308
  type: Input
396
- }], change: [{
397
- type: Output
398
- }], searchField: [{
399
- type: ContentChild,
400
- args: [SelectSearchFieldDirective]
401
- }], openDropdown: [{
309
+ }], handleControllerEvent: [{
402
310
  type: HostListener,
403
311
  args: ['click', ['$event']]
404
312
  }, {
405
313
  type: HostListener,
406
314
  args: ['keydown', ['$event']]
407
- }], handleFocusOut: [{
408
- type: HostListener,
409
- args: ['focusout', ['$event']]
410
315
  }] } });
411
316
 
412
- const modules = [SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, OptionComponent];
317
+ const modules = [SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, SelectOptionComponent];
413
318
  class SelectModule {
414
319
  }
415
320
  SelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
416
- 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] });
417
- SelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, imports: [SelectComponent, OptionComponent, CoreModule] });
321
+ 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] });
322
+ SelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, imports: [SelectComponent, SelectOptionComponent, CoreModule] });
418
323
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, decorators: [{
419
324
  type: NgModule,
420
325
  args: [{
@@ -427,5 +332,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
427
332
  * Generated bundle index. Do not edit.
428
333
  */
429
334
 
430
- export { OptionComponent, SELECT_CONTROL, SelectComponent, SelectModule, SelectSearchFieldDirective, SelectSearchFilterPipe };
335
+ export { SELECT_CONTROL, SelectComponent, SelectModule, SelectOptionComponent, SelectSearchFieldDirective, SelectSearchFilterPipe };
431
336
  //# sourceMappingURL=odx-angular-components-select.mjs.map