@ngneers/controls 0.0.1-next.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 (186) hide show
  1. package/fesm2022/ngneers-controls-accordion.mjs +234 -0
  2. package/fesm2022/ngneers-controls-accordion.mjs.map +1 -0
  3. package/fesm2022/ngneers-controls-api-ng.mjs +959 -0
  4. package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -0
  5. package/fesm2022/ngneers-controls-api-resize.mjs +712 -0
  6. package/fesm2022/ngneers-controls-api-resize.mjs.map +1 -0
  7. package/fesm2022/ngneers-controls-api.mjs +347 -0
  8. package/fesm2022/ngneers-controls-api.mjs.map +1 -0
  9. package/fesm2022/ngneers-controls-avatar.mjs +77 -0
  10. package/fesm2022/ngneers-controls-avatar.mjs.map +1 -0
  11. package/fesm2022/ngneers-controls-base.mjs +620 -0
  12. package/fesm2022/ngneers-controls-base.mjs.map +1 -0
  13. package/fesm2022/ngneers-controls-breadcrumb.mjs +100 -0
  14. package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -0
  15. package/fesm2022/ngneers-controls-button-group.mjs +110 -0
  16. package/fesm2022/ngneers-controls-button-group.mjs.map +1 -0
  17. package/fesm2022/ngneers-controls-button.mjs +83 -0
  18. package/fesm2022/ngneers-controls-button.mjs.map +1 -0
  19. package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs +74 -0
  20. package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs.map +1 -0
  21. package/fesm2022/ngneers-controls-calendar.mjs +801 -0
  22. package/fesm2022/ngneers-controls-calendar.mjs.map +1 -0
  23. package/fesm2022/ngneers-controls-checkbox.mjs +63 -0
  24. package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -0
  25. package/fesm2022/ngneers-controls-chip.mjs +55 -0
  26. package/fesm2022/ngneers-controls-chip.mjs.map +1 -0
  27. package/fesm2022/ngneers-controls-default-icons.mjs +82 -0
  28. package/fesm2022/ngneers-controls-default-icons.mjs.map +1 -0
  29. package/fesm2022/ngneers-controls-defer.mjs +72 -0
  30. package/fesm2022/ngneers-controls-defer.mjs.map +1 -0
  31. package/fesm2022/ngneers-controls-dialog.mjs +407 -0
  32. package/fesm2022/ngneers-controls-dialog.mjs.map +1 -0
  33. package/fesm2022/ngneers-controls-directives.mjs +498 -0
  34. package/fesm2022/ngneers-controls-directives.mjs.map +1 -0
  35. package/fesm2022/ngneers-controls-drawer.mjs +271 -0
  36. package/fesm2022/ngneers-controls-drawer.mjs.map +1 -0
  37. package/fesm2022/ngneers-controls-edit-inplace.mjs +127 -0
  38. package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -0
  39. package/fesm2022/ngneers-controls-errors.mjs +329 -0
  40. package/fesm2022/ngneers-controls-errors.mjs.map +1 -0
  41. package/fesm2022/ngneers-controls-filter.mjs +708 -0
  42. package/fesm2022/ngneers-controls-filter.mjs.map +1 -0
  43. package/fesm2022/ngneers-controls-hint.mjs +153 -0
  44. package/fesm2022/ngneers-controls-hint.mjs.map +1 -0
  45. package/fesm2022/ngneers-controls-i18n-translations-de.mjs +170 -0
  46. package/fesm2022/ngneers-controls-i18n-translations-de.mjs.map +1 -0
  47. package/fesm2022/ngneers-controls-i18n-translations-en.mjs +170 -0
  48. package/fesm2022/ngneers-controls-i18n-translations-en.mjs.map +1 -0
  49. package/fesm2022/ngneers-controls-i18n.mjs +57 -0
  50. package/fesm2022/ngneers-controls-i18n.mjs.map +1 -0
  51. package/fesm2022/ngneers-controls-icon.mjs +195 -0
  52. package/fesm2022/ngneers-controls-icon.mjs.map +1 -0
  53. package/fesm2022/ngneers-controls-inplace.mjs +150 -0
  54. package/fesm2022/ngneers-controls-inplace.mjs.map +1 -0
  55. package/fesm2022/ngneers-controls-input-field.mjs +165 -0
  56. package/fesm2022/ngneers-controls-input-field.mjs.map +1 -0
  57. package/fesm2022/ngneers-controls-input.mjs +72 -0
  58. package/fesm2022/ngneers-controls-input.mjs.map +1 -0
  59. package/fesm2022/ngneers-controls-item-view.mjs +473 -0
  60. package/fesm2022/ngneers-controls-item-view.mjs.map +1 -0
  61. package/fesm2022/ngneers-controls-list-box.mjs +281 -0
  62. package/fesm2022/ngneers-controls-list-box.mjs.map +1 -0
  63. package/fesm2022/ngneers-controls-mask-input.mjs +888 -0
  64. package/fesm2022/ngneers-controls-mask-input.mjs.map +1 -0
  65. package/fesm2022/ngneers-controls-menu.mjs +371 -0
  66. package/fesm2022/ngneers-controls-menu.mjs.map +1 -0
  67. package/fesm2022/ngneers-controls-message.mjs +30 -0
  68. package/fesm2022/ngneers-controls-message.mjs.map +1 -0
  69. package/fesm2022/ngneers-controls-number-input.mjs +366 -0
  70. package/fesm2022/ngneers-controls-number-input.mjs.map +1 -0
  71. package/fesm2022/ngneers-controls-paginator.mjs +129 -0
  72. package/fesm2022/ngneers-controls-paginator.mjs.map +1 -0
  73. package/fesm2022/ngneers-controls-popover.mjs +215 -0
  74. package/fesm2022/ngneers-controls-popover.mjs.map +1 -0
  75. package/fesm2022/ngneers-controls-progress.mjs +98 -0
  76. package/fesm2022/ngneers-controls-progress.mjs.map +1 -0
  77. package/fesm2022/ngneers-controls-radio.mjs +152 -0
  78. package/fesm2022/ngneers-controls-radio.mjs.map +1 -0
  79. package/fesm2022/ngneers-controls-roving-focus.mjs +323 -0
  80. package/fesm2022/ngneers-controls-roving-focus.mjs.map +1 -0
  81. package/fesm2022/ngneers-controls-scroll-shadow.mjs +65 -0
  82. package/fesm2022/ngneers-controls-scroll-shadow.mjs.map +1 -0
  83. package/fesm2022/ngneers-controls-scroller.mjs +308 -0
  84. package/fesm2022/ngneers-controls-scroller.mjs.map +1 -0
  85. package/fesm2022/ngneers-controls-select-button.mjs +58 -0
  86. package/fesm2022/ngneers-controls-select-button.mjs.map +1 -0
  87. package/fesm2022/ngneers-controls-select.mjs +417 -0
  88. package/fesm2022/ngneers-controls-select.mjs.map +1 -0
  89. package/fesm2022/ngneers-controls-slider.mjs +167 -0
  90. package/fesm2022/ngneers-controls-slider.mjs.map +1 -0
  91. package/fesm2022/ngneers-controls-snackbar.mjs +414 -0
  92. package/fesm2022/ngneers-controls-snackbar.mjs.map +1 -0
  93. package/fesm2022/ngneers-controls-spin-buttons.mjs +126 -0
  94. package/fesm2022/ngneers-controls-spin-buttons.mjs.map +1 -0
  95. package/fesm2022/ngneers-controls-spinner.mjs +184 -0
  96. package/fesm2022/ngneers-controls-spinner.mjs.map +1 -0
  97. package/fesm2022/ngneers-controls-splitter.mjs +604 -0
  98. package/fesm2022/ngneers-controls-splitter.mjs.map +1 -0
  99. package/fesm2022/ngneers-controls-state.mjs +185 -0
  100. package/fesm2022/ngneers-controls-state.mjs.map +1 -0
  101. package/fesm2022/ngneers-controls-switch.mjs +39 -0
  102. package/fesm2022/ngneers-controls-switch.mjs.map +1 -0
  103. package/fesm2022/ngneers-controls-table.mjs +2634 -0
  104. package/fesm2022/ngneers-controls-table.mjs.map +1 -0
  105. package/fesm2022/ngneers-controls-tabs.mjs +336 -0
  106. package/fesm2022/ngneers-controls-tabs.mjs.map +1 -0
  107. package/fesm2022/ngneers-controls-tag.mjs +30 -0
  108. package/fesm2022/ngneers-controls-tag.mjs.map +1 -0
  109. package/fesm2022/ngneers-controls-toast.mjs +350 -0
  110. package/fesm2022/ngneers-controls-toast.mjs.map +1 -0
  111. package/fesm2022/ngneers-controls-toggle-button.mjs +70 -0
  112. package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -0
  113. package/fesm2022/ngneers-controls-tooltip.mjs +506 -0
  114. package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -0
  115. package/fesm2022/ngneers-controls-tree.mjs +599 -0
  116. package/fesm2022/ngneers-controls-tree.mjs.map +1 -0
  117. package/fesm2022/ngneers-controls-upload.mjs +377 -0
  118. package/fesm2022/ngneers-controls-upload.mjs.map +1 -0
  119. package/fesm2022/ngneers-controls-utils-ng.mjs +411 -0
  120. package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -0
  121. package/fesm2022/ngneers-controls-utils.mjs +261 -0
  122. package/fesm2022/ngneers-controls-utils.mjs.map +1 -0
  123. package/fesm2022/ngneers-controls.mjs +6 -0
  124. package/fesm2022/ngneers-controls.mjs.map +1 -0
  125. package/package.json +302 -0
  126. package/types/ngneers-controls-accordion.d.ts +139 -0
  127. package/types/ngneers-controls-api-ng.d.ts +364 -0
  128. package/types/ngneers-controls-api-resize.d.ts +318 -0
  129. package/types/ngneers-controls-api.d.ts +145 -0
  130. package/types/ngneers-controls-avatar.d.ts +54 -0
  131. package/types/ngneers-controls-base.d.ts +277 -0
  132. package/types/ngneers-controls-breadcrumb.d.ts +272 -0
  133. package/types/ngneers-controls-button-group.d.ts +46 -0
  134. package/types/ngneers-controls-button.d.ts +48 -0
  135. package/types/ngneers-controls-calendar.d.ts +466 -0
  136. package/types/ngneers-controls-checkbox.d.ts +40 -0
  137. package/types/ngneers-controls-chip.d.ts +202 -0
  138. package/types/ngneers-controls-default-icons.d.ts +5 -0
  139. package/types/ngneers-controls-defer.d.ts +48 -0
  140. package/types/ngneers-controls-dialog.d.ts +399 -0
  141. package/types/ngneers-controls-directives.d.ts +171 -0
  142. package/types/ngneers-controls-drawer.d.ts +308 -0
  143. package/types/ngneers-controls-edit-inplace.d.ts +263 -0
  144. package/types/ngneers-controls-errors.d.ts +155 -0
  145. package/types/ngneers-controls-filter.d.ts +609 -0
  146. package/types/ngneers-controls-hint.d.ts +88 -0
  147. package/types/ngneers-controls-i18n-translations-de.d.ts +164 -0
  148. package/types/ngneers-controls-i18n-translations-en.d.ts +164 -0
  149. package/types/ngneers-controls-i18n.d.ts +186 -0
  150. package/types/ngneers-controls-icon.d.ts +68 -0
  151. package/types/ngneers-controls-inplace.d.ts +98 -0
  152. package/types/ngneers-controls-input-field.d.ts +248 -0
  153. package/types/ngneers-controls-input.d.ts +30 -0
  154. package/types/ngneers-controls-item-view.d.ts +215 -0
  155. package/types/ngneers-controls-list-box.d.ts +334 -0
  156. package/types/ngneers-controls-mask-input.d.ts +434 -0
  157. package/types/ngneers-controls-menu.d.ts +192 -0
  158. package/types/ngneers-controls-message.d.ts +21 -0
  159. package/types/ngneers-controls-number-input.d.ts +146 -0
  160. package/types/ngneers-controls-paginator.d.ts +255 -0
  161. package/types/ngneers-controls-popover.d.ts +116 -0
  162. package/types/ngneers-controls-progress.d.ts +49 -0
  163. package/types/ngneers-controls-radio.d.ts +91 -0
  164. package/types/ngneers-controls-roving-focus.d.ts +107 -0
  165. package/types/ngneers-controls-scroll-shadow.d.ts +25 -0
  166. package/types/ngneers-controls-scroller.d.ts +151 -0
  167. package/types/ngneers-controls-select-button.d.ts +51 -0
  168. package/types/ngneers-controls-select.d.ts +409 -0
  169. package/types/ngneers-controls-slider.d.ts +57 -0
  170. package/types/ngneers-controls-snackbar.d.ts +330 -0
  171. package/types/ngneers-controls-spin-buttons.d.ts +69 -0
  172. package/types/ngneers-controls-spinner.d.ts +117 -0
  173. package/types/ngneers-controls-splitter.d.ts +465 -0
  174. package/types/ngneers-controls-state.d.ts +102 -0
  175. package/types/ngneers-controls-switch.d.ts +18 -0
  176. package/types/ngneers-controls-table.d.ts +3127 -0
  177. package/types/ngneers-controls-tabs.d.ts +118 -0
  178. package/types/ngneers-controls-tag.d.ts +21 -0
  179. package/types/ngneers-controls-toast.d.ts +298 -0
  180. package/types/ngneers-controls-toggle-button.d.ts +48 -0
  181. package/types/ngneers-controls-tooltip.d.ts +189 -0
  182. package/types/ngneers-controls-tree.d.ts +409 -0
  183. package/types/ngneers-controls-upload.d.ts +347 -0
  184. package/types/ngneers-controls-utils-ng.d.ts +129 -0
  185. package/types/ngneers-controls-utils.d.ts +130 -0
  186. package/types/ngneers-controls.d.ts +2 -0
@@ -0,0 +1,417 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { viewChild, contentChild, input, computed, Directive, inject, booleanAttribute, linkedSignal, signal, effect, Component } from '@angular/core';
4
+ import { mapToItems } from '@ngneers/controls/api';
5
+ import { templateTypesFn, NgnTemplate } from '@ngneers/controls/api/ng';
6
+ import { ValueControlBase, NgnPt, provideSelf } from '@ngneers/controls/base';
7
+ import { I18n } from '@ngneers/controls/i18n';
8
+ import { NgnIcon } from '@ngneers/controls/icon';
9
+ import { NgnInput } from '@ngneers/controls/input';
10
+ import { NgnInputField } from '@ngneers/controls/input-field';
11
+ import { NgnItemView } from '@ngneers/controls/item-view';
12
+ import { NgnListBox } from '@ngneers/controls/list-box';
13
+ import { NgnPopover } from '@ngneers/controls/popover';
14
+ import { deepMerge, maybeCallback, NgnError } from '@ngneers/controls/utils';
15
+ import { selectControlTemplate } from '@ngneers/controls-themes/templates/select';
16
+
17
+ class SelectTemplates extends ValueControlBase {
18
+ // Item template
19
+ _defaultItemTemplate = viewChild.required('defaultItemTemplate');
20
+ _userItemTemplate = contentChild('item', /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "_userItemTemplate" }] : /* istanbul ignore next */ []));
22
+ /**
23
+ * Set a custom template for an item of the select control.
24
+ * Can also be set using an `<ng-template>` element with `#item` template reference variable.
25
+ */
26
+ templateItem = input(null, /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "templateItem" }] : /* istanbul ignore next */ []));
28
+ itemTemplate = computed(() => this._userItemTemplate() ?? this.templateItem() ?? this._defaultItemTemplate(), /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
30
+ // Selected item template
31
+ _defaultSelectedItemTemplate = viewChild.required('defaultSelectedItemTemplate');
32
+ _userSelectedItemTemplate = contentChild('selectedItem', /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "_userSelectedItemTemplate" }] : /* istanbul ignore next */ []));
34
+ /**
35
+ * Set a custom template for the selected item of the select control.
36
+ * Can also be set using an `<ng-template>` element with `#selectedItem` template reference variable.
37
+ */
38
+ templateSelectedItem = input(null, /* @ts-ignore */
39
+ ...(ngDevMode ? [{ debugName: "templateSelectedItem" }] : /* istanbul ignore next */ []));
40
+ selectedItemTemplate = computed(() => this._userSelectedItemTemplate() ??
41
+ this.templateSelectedItem() ??
42
+ this._defaultSelectedItemTemplate(), /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "selectedItemTemplate" }] : /* istanbul ignore next */ []));
44
+ // Selected items template
45
+ _defaultSelectedItemsTemplate = viewChild.required('defaultSelectedItemsTemplate');
46
+ _userSelectedItemsTemplate = contentChild('selectedItems', /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "_userSelectedItemsTemplate" }] : /* istanbul ignore next */ []));
48
+ /**
49
+ * Set a custom template for the selected items of the select control if {@link multiple} is `true`.
50
+ * Can also be set using an `<ng-template>` element with `#selectedItems` template reference variable.
51
+ */
52
+ templateSelectedItems = input(null, /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "templateSelectedItems" }] : /* istanbul ignore next */ []));
54
+ selectedItemsTemplate = computed(() => this._userSelectedItemsTemplate() ??
55
+ this.templateSelectedItems() ??
56
+ this._defaultSelectedItemsTemplate(), /* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "selectedItemsTemplate" }] : /* istanbul ignore next */ []));
58
+ // Group template
59
+ _defaultGroupTemplate = viewChild.required('defaultGroupTemplate');
60
+ _userGroupTemplate = contentChild('group', /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "_userGroupTemplate" }] : /* istanbul ignore next */ []));
62
+ /**
63
+ * Set a custom template for a group in the select control.
64
+ * Can also be set using an `<ng-template>` element with `#group` template reference variable.
65
+ */
66
+ templateGroup = input(null, /* @ts-ignore */
67
+ ...(ngDevMode ? [{ debugName: "templateGroup" }] : /* istanbul ignore next */ []));
68
+ groupTemplate = computed(() => this._userGroupTemplate() ?? this.templateGroup() ?? this._defaultGroupTemplate(), /* @ts-ignore */
69
+ ...(ngDevMode ? [{ debugName: "groupTemplate" }] : /* istanbul ignore next */ []));
70
+ // No items template
71
+ _userNoItemsTemplate = contentChild('noItems', /* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "_userNoItemsTemplate" }] : /* istanbul ignore next */ []));
73
+ /**
74
+ * Set a custom template for the no items state of the select control.
75
+ * Can also be set using an `<ng-template>` element with `#noItems` template reference variable.
76
+ */
77
+ templateNoItems = input(null, /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "templateNoItems" }] : /* istanbul ignore next */ []));
79
+ noItemsTemplate = computed(() => this._userNoItemsTemplate() ?? this.templateNoItems(), /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "noItemsTemplate" }] : /* istanbul ignore next */ []));
81
+ /**
82
+ * Types for the dialog templates.
83
+ */
84
+ templateTypes = templateTypesFn();
85
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SelectTemplates, deps: null, target: i0.ɵɵFactoryTarget.Directive });
86
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.5", type: SelectTemplates, isStandalone: true, inputs: { templateItem: { classPropertyName: "templateItem", publicName: "templateItem", isSignal: true, isRequired: false, transformFunction: null }, templateSelectedItem: { classPropertyName: "templateSelectedItem", publicName: "templateSelectedItem", isSignal: true, isRequired: false, transformFunction: null }, templateSelectedItems: { classPropertyName: "templateSelectedItems", publicName: "templateSelectedItems", isSignal: true, isRequired: false, transformFunction: null }, templateGroup: { classPropertyName: "templateGroup", publicName: "templateGroup", isSignal: true, isRequired: false, transformFunction: null }, templateNoItems: { classPropertyName: "templateNoItems", publicName: "templateNoItems", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_userItemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "_userSelectedItemTemplate", first: true, predicate: ["selectedItem"], descendants: true, isSignal: true }, { propertyName: "_userSelectedItemsTemplate", first: true, predicate: ["selectedItems"], descendants: true, isSignal: true }, { propertyName: "_userGroupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "_userNoItemsTemplate", first: true, predicate: ["noItems"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_defaultItemTemplate", first: true, predicate: ["defaultItemTemplate"], descendants: true, isSignal: true }, { propertyName: "_defaultSelectedItemTemplate", first: true, predicate: ["defaultSelectedItemTemplate"], descendants: true, isSignal: true }, { propertyName: "_defaultSelectedItemsTemplate", first: true, predicate: ["defaultSelectedItemsTemplate"], descendants: true, isSignal: true }, { propertyName: "_defaultGroupTemplate", first: true, predicate: ["defaultGroupTemplate"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
87
+ }
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SelectTemplates, decorators: [{
89
+ type: Directive
90
+ }], propDecorators: { _defaultItemTemplate: [{ type: i0.ViewChild, args: ['defaultItemTemplate', { isSignal: true }] }], _userItemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], templateItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateItem", required: false }] }], _defaultSelectedItemTemplate: [{ type: i0.ViewChild, args: ['defaultSelectedItemTemplate', { isSignal: true }] }], _userSelectedItemTemplate: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], templateSelectedItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateSelectedItem", required: false }] }], _defaultSelectedItemsTemplate: [{ type: i0.ViewChild, args: ['defaultSelectedItemsTemplate', { isSignal: true }] }], _userSelectedItemsTemplate: [{ type: i0.ContentChild, args: ['selectedItems', { isSignal: true }] }], templateSelectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateSelectedItems", required: false }] }], _defaultGroupTemplate: [{ type: i0.ViewChild, args: ['defaultGroupTemplate', { isSignal: true }] }], _userGroupTemplate: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], templateGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateGroup", required: false }] }], _userNoItemsTemplate: [{ type: i0.ContentChild, args: ['noItems', { isSignal: true }] }], templateNoItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateNoItems", required: false }] }] } });
91
+
92
+ /**
93
+ * @category control
94
+ */
95
+ class NgnSelect extends SelectTemplates {
96
+ isFieldControl = true;
97
+ theme = this.injectThemeTemplate(selectControlTemplate, 'root');
98
+ i18n = inject(I18n).translations;
99
+ _popover = viewChild.required(NgnPopover);
100
+ _field = viewChild.required('field');
101
+ _customEditableInput = contentChild(NgnInput, /* @ts-ignore */
102
+ ...(ngDevMode ? [{ debugName: "_customEditableInput" }] : /* istanbul ignore next */ []));
103
+ _customEditableSub;
104
+ /**
105
+ * Options for the popover.
106
+ */
107
+ popoverOptions = input({}, /* @ts-ignore */
108
+ ...(ngDevMode ? [{ debugName: "popoverOptions" }] : /* istanbul ignore next */ []));
109
+ appliedPopoverOptions = computed(() => deepMerge({
110
+ sizeConstraints: {
111
+ width: 1,
112
+ maxWidth: 1,
113
+ minHeight: '250px',
114
+ maxHeight: '700px',
115
+ },
116
+ cache: true,
117
+ }, this.popoverOptions()), /* @ts-ignore */
118
+ ...(ngDevMode ? [{ debugName: "appliedPopoverOptions" }] : /* istanbul ignore next */ []));
119
+ /**
120
+ * The available options to choose from. They can either be
121
+ * * A list of {@link NgnItem} objects
122
+ * * A list of plain objects. You'll have to provide a {@link fields} input to specify how to map the plain objects to {@link NgnItem} objects.
123
+ */
124
+ options = input([], /* @ts-ignore */
125
+ ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
126
+ /**
127
+ * Accepts a boolean value that determines whether the filter is enabled.
128
+ * Alternatively, you can provide `SelectFilterOptions` to customize the filter behavior.
129
+ * @default `false`
130
+ */
131
+ filter = input(false, /* @ts-ignore */
132
+ ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
133
+ /**
134
+ * Manually set the filter text.
135
+ */
136
+ filterText = input(null, /* @ts-ignore */
137
+ ...(ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []));
138
+ /**
139
+ * The icon to display in the filter input.
140
+ */
141
+ iconFilter = input(/* @ts-ignore */
142
+ ...(ngDevMode ? [undefined, { debugName: "iconFilter" }] : /* istanbul ignore next */ []));
143
+ /**
144
+ * The icon to display in the dropdown.
145
+ */
146
+ iconDropdown = input(/* @ts-ignore */
147
+ ...(ngDevMode ? [undefined, { debugName: "iconDropdown" }] : /* istanbul ignore next */ []));
148
+ /**
149
+ * Whether the select is virtualized.
150
+ * @default `false`
151
+ */
152
+ virtual = input(false, { ...(ngDevMode ? { debugName: "virtual" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
153
+ /**
154
+ * When {@link virtual} is enabled, this property defines the height of each item in the list.
155
+ */
156
+ itemHeight = input(/* @ts-ignore */
157
+ ...(ngDevMode ? [undefined, { debugName: "itemHeight" }] : /* istanbul ignore next */ []));
158
+ /**
159
+ * Enable this to allow the user to type in a value that is not in the list.
160
+ * When enabled, the value of the control becomes the label of a selected item or the typed value.
161
+ *
162
+ * Cannot be used with
163
+ * * {@link multiple} selection
164
+ * * {@link filter} without also setting {@link editableAutoFilter} to `false`
165
+ *
166
+ * @default `false`
167
+ */
168
+ editable = input(/* @ts-ignore */
169
+ ...(ngDevMode ? [undefined, { debugName: "editable" }] : /* istanbul ignore next */ []));
170
+ /**
171
+ * Whether to automatically filter the options based on the user's input in the {@link editable} input.
172
+ * @default `true`
173
+ */
174
+ editableAutoFilter = input(true, { ...(ngDevMode ? { debugName: "editableAutoFilter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
175
+ /**
176
+ * Enable this to allow the user to select multiple values.
177
+ * When enabled, the value of the control becomes an array of selected items.
178
+ *
179
+ * This is only applicable when {@link editable} is `false`.
180
+ * @default `false`
181
+ */
182
+ multiple = input(/* @ts-ignore */
183
+ ...(ngDevMode ? [undefined, { debugName: "multiple" }] : /* istanbul ignore next */ []));
184
+ /**
185
+ * Whether to scroll to the selected item when the dropdown is opened.
186
+ * @default `true`
187
+ */
188
+ scrollToSelectedItemOnOpen = input(true, /* @ts-ignore */
189
+ ...(ngDevMode ? [{ debugName: "scrollToSelectedItemOnOpen" }] : /* istanbul ignore next */ []));
190
+ /**
191
+ * Tabindex for the select control.
192
+ * @default `0`
193
+ */
194
+ tabindex = input(0, /* @ts-ignore */
195
+ ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
196
+ /**
197
+ * Whether to use a checkbox to indicate selection state.
198
+ *
199
+ * This option is true per default when {@link multiple} is `true`.
200
+ * @default multiple()
201
+ */
202
+ checkbox = input(/* @ts-ignore */
203
+ ...(ngDevMode ? [undefined, { debugName: "checkbox" }] : /* istanbul ignore next */ []));
204
+ maybeCallback = maybeCallback;
205
+ _listbox = viewChild(NgnListBox, /* @ts-ignore */
206
+ ...(ngDevMode ? [{ debugName: "_listbox" }] : /* istanbul ignore next */ []));
207
+ _userChangedEditableInput = false;
208
+ get anchorElement() {
209
+ return (this.element.nativeElement.closest('ngn-input-field') ??
210
+ this.element.nativeElement);
211
+ }
212
+ filterTextInternal = linkedSignal(this.filterText, /* @ts-ignore */
213
+ ...(ngDevMode ? [{ debugName: "filterTextInternal" }] : /* istanbul ignore next */ []));
214
+ currentHighlightedValue = signal(null, /* @ts-ignore */
215
+ ...(ngDevMode ? [{ debugName: "currentHighlightedValue" }] : /* istanbul ignore next */ []));
216
+ valueStr = computed(() => {
217
+ const v = this.value();
218
+ return typeof v === 'string' ? v : null;
219
+ }, /* @ts-ignore */
220
+ ...(ngDevMode ? [{ debugName: "valueStr" }] : /* istanbul ignore next */ []));
221
+ valueArray = computed(() => {
222
+ const v = this.value();
223
+ return Array.isArray(v) ? v : v ? [v] : [];
224
+ }, /* @ts-ignore */
225
+ ...(ngDevMode ? [{ debugName: "valueArray" }] : /* istanbul ignore next */ []));
226
+ appliedFilter = computed(() => this.filter() || this.editable() || false, /* @ts-ignore */
227
+ ...(ngDevMode ? [{ debugName: "appliedFilter" }] : /* istanbul ignore next */ []));
228
+ _flatOptions = computed(() => mapToItems(this.options()), /* @ts-ignore */
229
+ ...(ngDevMode ? [{ debugName: "_flatOptions" }] : /* istanbul ignore next */ []));
230
+ selectedItems = computed(() => {
231
+ if (this.editable()) {
232
+ return [this._flatOptions().find(option => option.label === this.value())];
233
+ }
234
+ else {
235
+ return this.valueArray().map(value => this._flatOptions().find(option => option.value === value));
236
+ }
237
+ }, /* @ts-ignore */
238
+ ...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
239
+ selectedItemsValues = computed(() => this.selectedItems().map(item => item?.value), /* @ts-ignore */
240
+ ...(ngDevMode ? [{ debugName: "selectedItemsValues" }] : /* istanbul ignore next */ []));
241
+ constructor() {
242
+ super();
243
+ effect(() => {
244
+ if (this.editable() && this.multiple()) {
245
+ throw new NgnError('select', 'Editable and multiple selection cannot be used together');
246
+ }
247
+ if (this.editable() && this.filter()) {
248
+ throw new NgnError('select', 'Editable and filtering cannot be used together');
249
+ }
250
+ });
251
+ effect(() => {
252
+ this._customEditableSub?.unsubscribe();
253
+ const editable = this.editable();
254
+ const customEditableInput = this._customEditableInput();
255
+ if (!editable || !customEditableInput) {
256
+ return;
257
+ }
258
+ this._customEditableSub = customEditableInput.value.subscribe(value => {
259
+ this.onEditableChange(value);
260
+ });
261
+ // Set ARIA attributes for accessibility. `role="combobox"` is required so
262
+ // the combobox attributes below are allowed even when the projected input
263
+ // has an implicit role that forbids them (e.g. `<input type="number">` →
264
+ // `spinbutton`, which disallows `aria-autocomplete`). See calendar year field.
265
+ customEditableInput.element.nativeElement.setAttribute('role', 'combobox');
266
+ customEditableInput.element.nativeElement.setAttribute('aria-autocomplete', 'list');
267
+ customEditableInput.element.nativeElement.setAttribute('aria-expanded', `${this._popover().open()}`);
268
+ customEditableInput.element.nativeElement.setAttribute('aria-haspopup', 'listbox');
269
+ customEditableInput.element.nativeElement.setAttribute('aria-controls', `${this.inputId()}_listbox`);
270
+ });
271
+ effect(() => {
272
+ if (!this.editable()) {
273
+ return;
274
+ }
275
+ const valueSig = this._customEditableInput()?.value;
276
+ if (valueSig) {
277
+ valueSig.set(this.value() || '');
278
+ }
279
+ });
280
+ effect(() => {
281
+ if (!this.editable()) {
282
+ return;
283
+ }
284
+ const hasOptions = !!this._listbox()?.displayedItems().length;
285
+ if (!this._userChangedEditableInput) {
286
+ return;
287
+ }
288
+ this._userChangedEditableInput = false;
289
+ if (hasOptions) {
290
+ this.show();
291
+ }
292
+ else {
293
+ this.hide();
294
+ }
295
+ });
296
+ }
297
+ onKeyDown(event) {
298
+ if (this._popover().open()) {
299
+ this._listbox()?.onKeyDown(event);
300
+ }
301
+ // if event is not handled by the listbox, we can handle it here
302
+ if (!event.defaultPrevented) {
303
+ if (event.key === 'Enter') {
304
+ if (this.readonly() || this.disabled()) {
305
+ return;
306
+ }
307
+ this._popover().toggle();
308
+ event.stopPropagation();
309
+ event.preventDefault();
310
+ }
311
+ if (this._popover().open() && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {
312
+ if (this.readonly() || this.disabled()) {
313
+ return;
314
+ }
315
+ const currentIndex = this.options().findIndex(option => option.value === this.value());
316
+ let newIndex = event.key === 'ArrowDown' ? currentIndex + 1 : currentIndex - 1;
317
+ if (newIndex < 0) {
318
+ newIndex = 0;
319
+ }
320
+ if (newIndex >= this.options().length) {
321
+ newIndex = this.options().length - 1;
322
+ }
323
+ const newValue = this.options()[newIndex]?.value;
324
+ if (newValue !== undefined) {
325
+ this.onSelect(newValue);
326
+ }
327
+ }
328
+ }
329
+ }
330
+ onPopoverClosed() {
331
+ this._listbox()?.currentHighlightedValue.set(null);
332
+ this.potentiallyBlurred();
333
+ this.currentHighlightedValue.set(null);
334
+ const filter = this.filter();
335
+ if (filter === true || (typeof filter === 'object' && filter.clearFilterOnClose)) {
336
+ if (!this.editable()) {
337
+ this.filterTextInternal.set('');
338
+ }
339
+ }
340
+ }
341
+ onSelect(value) {
342
+ if (this.editable()) {
343
+ const item = this._flatOptions().find(option => option.value === value);
344
+ if (item) {
345
+ this.value.set(maybeCallback(item.label));
346
+ }
347
+ }
348
+ else {
349
+ const v = value;
350
+ if (this.value() !== v) {
351
+ this.value.set(v);
352
+ }
353
+ }
354
+ }
355
+ onItemClicked() {
356
+ if (!this.multiple()) {
357
+ this.hide();
358
+ }
359
+ }
360
+ /**
361
+ * Shows the select dropdown.
362
+ */
363
+ show() {
364
+ if (this.disabled() || this.readonly()) {
365
+ return;
366
+ }
367
+ this._popover().show();
368
+ }
369
+ /**
370
+ * Hides the select dropdown.
371
+ */
372
+ hide() {
373
+ this._popover().hide();
374
+ }
375
+ onEditableChange(value) {
376
+ if (this.editable()) {
377
+ this.value.set(maybeCallback(value));
378
+ this._userChangedEditableInput = true;
379
+ if (this.editableAutoFilter()) {
380
+ this.filterTextInternal.set(value);
381
+ }
382
+ }
383
+ }
384
+ potentiallyBlurred() {
385
+ setTimeout(() => {
386
+ if (this.element.nativeElement.contains(document.activeElement) || this._popover().open()) {
387
+ return;
388
+ }
389
+ this.touched.set(true);
390
+ });
391
+ }
392
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
393
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: NgnSelect, isStandalone: true, selector: "ngn-select", inputs: { popoverOptions: { classPropertyName: "popoverOptions", publicName: "popoverOptions", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterText: { classPropertyName: "filterText", publicName: "filterText", isSignal: true, isRequired: false, transformFunction: null }, iconFilter: { classPropertyName: "iconFilter", publicName: "iconFilter", isSignal: true, isRequired: false, transformFunction: null }, iconDropdown: { classPropertyName: "iconDropdown", publicName: "iconDropdown", isSignal: true, isRequired: false, transformFunction: null }, virtual: { classPropertyName: "virtual", publicName: "virtual", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, editableAutoFilter: { classPropertyName: "editableAutoFilter", publicName: "editableAutoFilter", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, scrollToSelectedItemOnOpen: { classPropertyName: "scrollToSelectedItemOnOpen", publicName: "scrollToSelectedItemOnOpen", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, checkbox: { classPropertyName: "checkbox", publicName: "checkbox", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: block;" }, providers: [provideSelf(NgnSelect)], queries: [{ propertyName: "_customEditableInput", first: true, predicate: NgnInput, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_popover", first: true, predicate: NgnPopover, descendants: true, isSignal: true }, { propertyName: "_field", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "_listbox", first: true, predicate: NgnListBox, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n [ptInt]=\"this\"\n [ptClass]=\"{\n input: true,\n 'input-editable': editable(),\n }\"\n (click)=\"show()\"\n (keydown)=\"onKeyDown($event)\"\n #field\n [tabindex]=\"editable() || disabled() ? -1 : tabindex()\"\n (focusout)=\"potentiallyBlurred()\"\n>\n @if (editable()) {\n <ng-content select=\"[ngnInput]\">\n <input\n ngnInput\n autocomplete=\"list\"\n [aria-expanded]=\"popover.open()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"inputId() + '_listbox'\"\n [id]=\"inputId()\"\n [value]=\"valueStr() || ''\"\n (valueChange)=\"onEditableChange($event)\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n />\n </ng-content>\n } @else {\n <div\n role=\"combobox\"\n [ptInt]=\"this\"\n [ptClass]=\"'combobox'\"\n [aria-expanded]=\"popover.open()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"inputId() + '_listbox'\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-label]=\"label()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [id]=\"inputId()\"\n >\n @if (multiple()) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemsTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedItems(),\n }\"\n />\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedItems()[0],\n }\"\n />\n }\n </div>\n }\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"'icon'\"\n [icon]=\"iconDropdown()\"\n defaultIcon=\"dropdown-toggle\"\n />\n</div>\n<ngn-popover\n #popover\n [ptInt]=\"this\"\n [ptDep]=\"'popover'\"\n [options]=\"appliedPopoverOptions()\"\n [anchor]=\"anchorElement\"\n (keydown)=\"onKeyDown($event)\"\n (closed)=\"onPopoverClosed()\"\n [id]=\"inputId() + '_popover'\"\n [hasShrinkableContent]=\"true\"\n>\n <ng-template #lazy>\n <div [ptInt]=\"this\" [ptClass]=\"'popover-content'\">\n @if (filter()) {\n <ngn-input-field [ptInt]=\"this\" [ptDep]=\"'filter'\">\n <input\n ngnInput\n [value]=\"filterTextInternal()\"\n (valueChange)=\"filterTextInternal.set($event)\"\n [attr.aria-label]=\"i18n['select_filterOptions']()\"\n />\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"'filter-icon'\"\n defaultIcon=\"search\"\n [icon]=\"iconFilter()\"\n />\n </ngn-input-field>\n }\n <ngn-list-box\n [ptInt]=\"this\"\n [ptDep]=\"'list-box'\"\n style=\"height: 100%; min-height: 0\"\n [focussable]=\"false\"\n [selectable]=\"true\"\n [filter]=\"appliedFilter()\"\n [filterText]=\"filterTextInternal()\"\n [items]=\"options()\"\n [itemHeight]=\"itemHeight()\"\n [virtual]=\"virtual()\"\n [templateItem]=\"itemTemplate()\"\n [templateGroup]=\"groupTemplate()\"\n [multiple]=\"multiple()\"\n [value]=\"multiple() ? selectedItemsValues() : selectedItemsValues()[0]\"\n [scrollToSelectedItemOnInit]=\"scrollToSelectedItemOnOpen()\"\n (valueChange)=\"onSelect($event)\"\n (itemClicked)=\"onItemClicked()\"\n [inputId]=\"inputId() + '_listbox'\"\n [templateEmpty]=\"noItemsTemplate()\"\n [checkbox]=\"checkbox()\"\n />\n </div>\n </ng-template>\n</ngn-popover>\n\n<ng-template #defaultItemTemplate [ngnTemplate]=\"templateTypes.item\" let-item>\n <span [attr.data-testid]=\"item?.testId\">\n @let label = item?.label;\n @if (label) {\n <span [attr.data-testid]=\"item?.testId\">{{ maybeCallback(label) }}</span>\n }\n </span>\n</ng-template>\n\n<ng-template #defaultGroupTemplate [ngnTemplate]=\"templateTypes.item\" let-group>\n <span [attr.data-testid]=\"group?.testId\">\n @let label = group?.label;\n @if (label) {\n <span [attr.data-testid]=\"group?.testId\">{{ maybeCallback(label) }}</span>\n }\n </span>\n</ng-template>\n\n<ng-template #defaultSelectedItemTemplate [ngnTemplate]=\"templateTypes.item\" let-item>\n @let label = item?.label;\n @if (label) {\n <span [attr.data-testid]=\"item?.testId\">{{ maybeCallback(label) }}</span>\n } @else {\n <span [attr.data-testid]=\"item?.testId\">&ZeroWidthSpace;</span>\n }\n</ng-template>\n\n<ng-template #defaultSelectedItemsTemplate [ngnTemplate]=\"templateTypes.selectedItems\" let-items>\n <ngn-item-view\n #itemView\n [items]=\"items\"\n [idField]=\"'value'\"\n [separator]=\"true\"\n style=\"margin-right: 8px\"\n >\n <ng-template #item let-item [ngnTemplate]=\"itemView.templateTypes.item\">\n <ng-container\n *ngTemplateOutlet=\"selectedItemTemplate(); context: { $implicit: item }\"\n ></ng-container>\n </ng-template>\n </ngn-item-view>\n @if (items.length < 1) {\n &ZeroWidthSpace;\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass", "ptDep"] }, { kind: "component", type: NgnListBox, selector: "ngn-list-box", inputs: ["items", "scrollToSelectedItemOnInit", "selectable", "selectOnHover", "focussable", "virtual", "itemHeight", "multiple", "checkbox", "filter", "filterText"], outputs: ["itemClicked"] }, { kind: "component", type: NgnPopover, selector: "ngn-popover", inputs: ["open", "anchor", "options", "hasShrinkableContent", "closeBy"], outputs: ["closed", "closing", "openChange"] }, { kind: "directive", type: NgnInput, selector: "input[ngnInput], textarea[ngnInput]", inputs: ["invalid", "value"], outputs: ["valueChange"], exportAs: ["ngnInput"] }, { kind: "component", type: NgnInputField, selector: "ngn-input-field", inputs: ["label", "labelledBy", "labelKind", "inputId", "showClearButton", "iconClearButton", "tabindex", "invalid", "readonly", "disabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgnTemplate, selector: "ng-template[ngnTemplate]", inputs: ["ngnTemplate"] }, { kind: "component", type: NgnItemView, selector: "ngn-item-view", inputs: ["idField", "items", "separator", "iconItemSeparator", "overflowStrategy", "overflowStrategyFreezeCount", "overflowStrategyIndex", "sameWidthItems"] }, { kind: "component", type: NgnIcon, selector: "ngn-icon", inputs: ["defaultIcon", "icon"] }] });
394
+ }
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnSelect, decorators: [{
396
+ type: Component,
397
+ args: [{ selector: 'ngn-select', imports: [
398
+ NgnPt,
399
+ NgnListBox,
400
+ NgnPopover,
401
+ NgnInput,
402
+ NgnInputField,
403
+ NgTemplateOutlet,
404
+ NgnTemplate,
405
+ NgnItemView,
406
+ NgnIcon,
407
+ ], providers: [provideSelf(NgnSelect)], host: {
408
+ style: 'display: block;',
409
+ }, template: "<div\n [ptInt]=\"this\"\n [ptClass]=\"{\n input: true,\n 'input-editable': editable(),\n }\"\n (click)=\"show()\"\n (keydown)=\"onKeyDown($event)\"\n #field\n [tabindex]=\"editable() || disabled() ? -1 : tabindex()\"\n (focusout)=\"potentiallyBlurred()\"\n>\n @if (editable()) {\n <ng-content select=\"[ngnInput]\">\n <input\n ngnInput\n autocomplete=\"list\"\n [aria-expanded]=\"popover.open()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"inputId() + '_listbox'\"\n [id]=\"inputId()\"\n [value]=\"valueStr() || ''\"\n (valueChange)=\"onEditableChange($event)\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n />\n </ng-content>\n } @else {\n <div\n role=\"combobox\"\n [ptInt]=\"this\"\n [ptClass]=\"'combobox'\"\n [aria-expanded]=\"popover.open()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"inputId() + '_listbox'\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-label]=\"label()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [id]=\"inputId()\"\n >\n @if (multiple()) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemsTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedItems(),\n }\"\n />\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedItems()[0],\n }\"\n />\n }\n </div>\n }\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"'icon'\"\n [icon]=\"iconDropdown()\"\n defaultIcon=\"dropdown-toggle\"\n />\n</div>\n<ngn-popover\n #popover\n [ptInt]=\"this\"\n [ptDep]=\"'popover'\"\n [options]=\"appliedPopoverOptions()\"\n [anchor]=\"anchorElement\"\n (keydown)=\"onKeyDown($event)\"\n (closed)=\"onPopoverClosed()\"\n [id]=\"inputId() + '_popover'\"\n [hasShrinkableContent]=\"true\"\n>\n <ng-template #lazy>\n <div [ptInt]=\"this\" [ptClass]=\"'popover-content'\">\n @if (filter()) {\n <ngn-input-field [ptInt]=\"this\" [ptDep]=\"'filter'\">\n <input\n ngnInput\n [value]=\"filterTextInternal()\"\n (valueChange)=\"filterTextInternal.set($event)\"\n [attr.aria-label]=\"i18n['select_filterOptions']()\"\n />\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"'filter-icon'\"\n defaultIcon=\"search\"\n [icon]=\"iconFilter()\"\n />\n </ngn-input-field>\n }\n <ngn-list-box\n [ptInt]=\"this\"\n [ptDep]=\"'list-box'\"\n style=\"height: 100%; min-height: 0\"\n [focussable]=\"false\"\n [selectable]=\"true\"\n [filter]=\"appliedFilter()\"\n [filterText]=\"filterTextInternal()\"\n [items]=\"options()\"\n [itemHeight]=\"itemHeight()\"\n [virtual]=\"virtual()\"\n [templateItem]=\"itemTemplate()\"\n [templateGroup]=\"groupTemplate()\"\n [multiple]=\"multiple()\"\n [value]=\"multiple() ? selectedItemsValues() : selectedItemsValues()[0]\"\n [scrollToSelectedItemOnInit]=\"scrollToSelectedItemOnOpen()\"\n (valueChange)=\"onSelect($event)\"\n (itemClicked)=\"onItemClicked()\"\n [inputId]=\"inputId() + '_listbox'\"\n [templateEmpty]=\"noItemsTemplate()\"\n [checkbox]=\"checkbox()\"\n />\n </div>\n </ng-template>\n</ngn-popover>\n\n<ng-template #defaultItemTemplate [ngnTemplate]=\"templateTypes.item\" let-item>\n <span [attr.data-testid]=\"item?.testId\">\n @let label = item?.label;\n @if (label) {\n <span [attr.data-testid]=\"item?.testId\">{{ maybeCallback(label) }}</span>\n }\n </span>\n</ng-template>\n\n<ng-template #defaultGroupTemplate [ngnTemplate]=\"templateTypes.item\" let-group>\n <span [attr.data-testid]=\"group?.testId\">\n @let label = group?.label;\n @if (label) {\n <span [attr.data-testid]=\"group?.testId\">{{ maybeCallback(label) }}</span>\n }\n </span>\n</ng-template>\n\n<ng-template #defaultSelectedItemTemplate [ngnTemplate]=\"templateTypes.item\" let-item>\n @let label = item?.label;\n @if (label) {\n <span [attr.data-testid]=\"item?.testId\">{{ maybeCallback(label) }}</span>\n } @else {\n <span [attr.data-testid]=\"item?.testId\">&ZeroWidthSpace;</span>\n }\n</ng-template>\n\n<ng-template #defaultSelectedItemsTemplate [ngnTemplate]=\"templateTypes.selectedItems\" let-items>\n <ngn-item-view\n #itemView\n [items]=\"items\"\n [idField]=\"'value'\"\n [separator]=\"true\"\n style=\"margin-right: 8px\"\n >\n <ng-template #item let-item [ngnTemplate]=\"itemView.templateTypes.item\">\n <ng-container\n *ngTemplateOutlet=\"selectedItemTemplate(); context: { $implicit: item }\"\n ></ng-container>\n </ng-template>\n </ngn-item-view>\n @if (items.length < 1) {\n &ZeroWidthSpace;\n }\n</ng-template>\n" }]
410
+ }], ctorParameters: () => [], propDecorators: { _popover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NgnPopover), { isSignal: true }] }], _field: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], _customEditableInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgnInput), { isSignal: true }] }], popoverOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "popoverOptions", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterText: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterText", required: false }] }], iconFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconFilter", required: false }] }], iconDropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconDropdown", required: false }] }], virtual: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtual", required: false }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], editableAutoFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "editableAutoFilter", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], scrollToSelectedItemOnOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollToSelectedItemOnOpen", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], checkbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkbox", required: false }] }], _listbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NgnListBox), { isSignal: true }] }] } });
411
+
412
+ /**
413
+ * Generated bundle index. Do not edit.
414
+ */
415
+
416
+ export { NgnSelect };
417
+ //# sourceMappingURL=ngneers-controls-select.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngneers-controls-select.mjs","sources":["../../src/select/select-templates.ts","../../src/select/select.ts","../../src/select/select.html","../../src/select/ngneers-controls-select.ts"],"sourcesContent":["import { computed, contentChild, Directive, input, TemplateRef, viewChild } from '@angular/core';\nimport { templateTypesFn } from '@ngneers/controls/api/ng';\nimport { ValueControlBase } from '@ngneers/controls/base';\n\nimport type { NgnItem } from '@ngneers/controls/api';\nimport type { InputGeneric } from '@ngneers/controls/utils';\n\n/**\n * This type determines the value type for the select control.\n * * If `multiple` is true, the value is an array of items: `T[K][]`.\n * * If `editable` is true, the value is a `string`.\n * * If neither is true, the value is the item's value type `T[K]`.\n */\nexport type ValueType<V, Editable extends boolean, Multiple extends boolean> =\n InputGeneric<Multiple, false> extends true\n ? V[]\n : InputGeneric<Editable, false> extends true\n ? string\n : V;\n\n@Directive()\nexport abstract class SelectTemplates<\n V,\n Editable extends boolean,\n Multiple extends boolean,\n> extends ValueControlBase<'select', ValueType<V, Editable, Multiple> | null> {\n // Item template\n private readonly _defaultItemTemplate =\n viewChild.required<TemplateRef<typeof this.templateTypes.item>>('defaultItemTemplate');\n private readonly _userItemTemplate =\n contentChild<TemplateRef<typeof this.templateTypes.item>>('item');\n /**\n * Set a custom template for an item of the select control.\n * Can also be set using an `<ng-template>` element with `#item` template reference variable.\n */\n public readonly templateItem = input<TemplateRef<typeof this.templateTypes.item> | null>(null);\n protected readonly itemTemplate = computed(\n () => this._userItemTemplate() ?? this.templateItem() ?? this._defaultItemTemplate()\n );\n\n // Selected item template\n private readonly _defaultSelectedItemTemplate = viewChild.required<\n TemplateRef<typeof this.templateTypes.item>\n >('defaultSelectedItemTemplate');\n private readonly _userSelectedItemTemplate =\n contentChild<TemplateRef<typeof this.templateTypes.item>>('selectedItem');\n /**\n * Set a custom template for the selected item of the select control.\n * Can also be set using an `<ng-template>` element with `#selectedItem` template reference variable.\n */\n public readonly templateSelectedItem = input<TemplateRef<typeof this.templateTypes.item> | null>(\n null\n );\n protected readonly selectedItemTemplate = computed(\n () =>\n this._userSelectedItemTemplate() ??\n this.templateSelectedItem() ??\n this._defaultSelectedItemTemplate()\n );\n\n // Selected items template\n private readonly _defaultSelectedItemsTemplate = viewChild.required<\n TemplateRef<typeof this.templateTypes.selectedItems>\n >('defaultSelectedItemsTemplate');\n private readonly _userSelectedItemsTemplate =\n contentChild<TemplateRef<typeof this.templateTypes.selectedItems>>('selectedItems');\n /**\n * Set a custom template for the selected items of the select control if {@link multiple} is `true`.\n * Can also be set using an `<ng-template>` element with `#selectedItems` template reference variable.\n */\n public readonly templateSelectedItems = input<TemplateRef<\n typeof this.templateTypes.selectedItems\n > | null>(null);\n protected readonly selectedItemsTemplate = computed(\n () =>\n this._userSelectedItemsTemplate() ??\n this.templateSelectedItems() ??\n this._defaultSelectedItemsTemplate()\n );\n\n // Group template\n private readonly _defaultGroupTemplate =\n viewChild.required<TemplateRef<typeof this.templateTypes.item>>('defaultGroupTemplate');\n private readonly _userGroupTemplate =\n contentChild<TemplateRef<typeof this.templateTypes.item>>('group');\n /**\n * Set a custom template for a group in the select control.\n * Can also be set using an `<ng-template>` element with `#group` template reference variable.\n */\n public readonly templateGroup = input<TemplateRef<typeof this.templateTypes.item> | null>(null);\n protected readonly groupTemplate = computed(\n () => this._userGroupTemplate() ?? this.templateGroup() ?? this._defaultGroupTemplate()\n );\n\n // No items template\n private readonly _userNoItemsTemplate = contentChild<TemplateRef<unknown>>('noItems');\n /**\n * Set a custom template for the no items state of the select control.\n * Can also be set using an `<ng-template>` element with `#noItems` template reference variable.\n */\n public readonly templateNoItems = input<TemplateRef<unknown> | null>(null);\n protected readonly noItemsTemplate = computed(\n () => this._userNoItemsTemplate() ?? this.templateNoItems()\n );\n\n /**\n * Types for the dialog templates.\n */\n public readonly templateTypes = templateTypesFn<{\n item: {\n $implicit: NgnItem<unknown, V> | undefined;\n };\n selectedItems: {\n $implicit: NgnItem<unknown, V>[];\n };\n }>();\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n Component,\n computed,\n contentChild,\n effect,\n ElementRef,\n input,\n linkedSignal,\n type OutputRefSubscription,\n type Signal,\n signal,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FilterConfig, mapToItems, type NgnItem } from '@ngneers/controls/api';\nimport { NgnTemplate } from '@ngneers/controls/api/ng';\nimport { NgnPt, provideSelf } from '@ngneers/controls/base';\nimport { I18n } from '@ngneers/controls/i18n';\nimport { NgnIcon } from '@ngneers/controls/icon';\nimport { NgnInput } from '@ngneers/controls/input';\nimport { NgnInputField } from '@ngneers/controls/input-field';\nimport { NgnItemView } from '@ngneers/controls/item-view';\nimport { NgnListBox } from '@ngneers/controls/list-box';\nimport { NgnPopover, type PopoverOptions } from '@ngneers/controls/popover';\nimport { deepMerge, maybeCallback, NgnError } from '@ngneers/controls/utils';\nimport { selectControlTemplate } from '@ngneers/controls-themes/templates/select';\n\nimport { SelectTemplates, type ValueType } from './select-templates';\n\nimport type { SelectFilterOptions } from './types';\nimport type { IconType } from '@ngneers/controls-custom-types';\n\n/**\n * @category control\n */\n@Component({\n selector: 'ngn-select',\n templateUrl: './select.html',\n imports: [\n NgnPt,\n NgnListBox,\n NgnPopover,\n NgnInput,\n NgnInputField,\n NgTemplateOutlet,\n NgnTemplate,\n NgnItemView,\n NgnIcon,\n ],\n providers: [provideSelf(NgnSelect)],\n host: {\n style: 'display: block;',\n },\n})\nexport class NgnSelect<\n V,\n Editable extends boolean = false,\n Multiple extends boolean = false,\n> extends SelectTemplates<V, Editable, Multiple> {\n public override readonly isFieldControl = true;\n protected readonly theme = this.injectThemeTemplate(selectControlTemplate, 'root');\n protected readonly i18n = inject(I18n).translations;\n private readonly _popover = viewChild.required<NgnPopover>(NgnPopover);\n private readonly _field = viewChild.required<ElementRef<HTMLElement>>('field');\n private readonly _customEditableInput = contentChild(NgnInput);\n private _customEditableSub?: OutputRefSubscription;\n\n /**\n * Options for the popover.\n */\n public readonly popoverOptions = input<PopoverOptions>({});\n protected readonly appliedPopoverOptions = computed<PopoverOptions>(() =>\n deepMerge<PopoverOptions, PopoverOptions>(\n {\n sizeConstraints: {\n width: 1,\n maxWidth: 1,\n minHeight: '250px',\n maxHeight: '700px',\n },\n cache: true,\n },\n this.popoverOptions()\n )\n );\n /**\n * The available options to choose from. They can either be\n * * A list of {@link NgnItem} objects\n * * A list of plain objects. You'll have to provide a {@link fields} input to specify how to map the plain objects to {@link NgnItem} objects.\n */\n public readonly options = input<readonly NgnItem<unknown, V>[]>([]);\n /**\n * Accepts a boolean value that determines whether the filter is enabled.\n * Alternatively, you can provide `SelectFilterOptions` to customize the filter behavior.\n * @default `false`\n */\n public readonly filter = input<SelectFilterOptions<NgnItem<unknown, V>> | boolean>(false);\n /**\n * Manually set the filter text.\n */\n public readonly filterText = input<string | null>(null);\n /**\n * The icon to display in the filter input.\n */\n public readonly iconFilter = input<IconType>();\n /**\n * The icon to display in the dropdown.\n */\n public readonly iconDropdown = input<IconType>();\n /**\n * Whether the select is virtualized.\n * @default `false`\n */\n public readonly virtual = input(false, { transform: booleanAttribute });\n /**\n * When {@link virtual} is enabled, this property defines the height of each item in the list.\n */\n public readonly itemHeight = input<number>();\n /**\n * Enable this to allow the user to type in a value that is not in the list.\n * When enabled, the value of the control becomes the label of a selected item or the typed value.\n *\n * Cannot be used with\n * * {@link multiple} selection\n * * {@link filter} without also setting {@link editableAutoFilter} to `false`\n *\n * @default `false`\n */\n public readonly editable = input<Editable>();\n /**\n * Whether to automatically filter the options based on the user's input in the {@link editable} input.\n * @default `true`\n */\n public readonly editableAutoFilter = input(true, { transform: booleanAttribute });\n /**\n * Enable this to allow the user to select multiple values.\n * When enabled, the value of the control becomes an array of selected items.\n *\n * This is only applicable when {@link editable} is `false`.\n * @default `false`\n */\n public readonly multiple = input<Multiple>();\n /**\n * Whether to scroll to the selected item when the dropdown is opened.\n * @default `true`\n */\n public readonly scrollToSelectedItemOnOpen = input<boolean | ScrollLogicalPosition>(true);\n /**\n * Tabindex for the select control.\n * @default `0`\n */\n public readonly tabindex = input<number>(0);\n /**\n * Whether to use a checkbox to indicate selection state.\n *\n * This option is true per default when {@link multiple} is `true`.\n * @default multiple()\n */\n public readonly checkbox = input<boolean>();\n\n protected readonly maybeCallback = maybeCallback;\n\n private readonly _listbox = viewChild(NgnListBox);\n private _userChangedEditableInput = false;\n protected get anchorElement(): HTMLElement {\n return (\n (this.element.nativeElement.closest('ngn-input-field') as HTMLElement | null) ??\n this.element.nativeElement\n );\n }\n\n protected readonly filterTextInternal = linkedSignal(this.filterText);\n protected readonly currentHighlightedValue = signal<V | null>(null);\n protected readonly valueStr = computed(() => {\n const v = this.value();\n return typeof v === 'string' ? v : null;\n });\n protected readonly valueArray = computed(() => {\n const v = this.value();\n return Array.isArray(v) ? v : v ? [v] : [];\n });\n\n protected readonly appliedFilter: Signal<FilterConfig<NgnItem> | boolean> = computed(\n () => this.filter() || this.editable() || false\n );\n\n private readonly _flatOptions = computed(() => mapToItems(this.options()));\n\n protected readonly selectedItems = computed(() => {\n if (this.editable()) {\n return [this._flatOptions().find(option => option.label === this.value())];\n } else {\n return this.valueArray().map(value =>\n this._flatOptions().find(option => option.value === value)\n );\n }\n });\n protected readonly selectedItemsValues = computed(() =>\n this.selectedItems().map(item => item?.value)\n );\n\n constructor() {\n super();\n effect(() => {\n if (this.editable() && this.multiple()) {\n throw new NgnError('select', 'Editable and multiple selection cannot be used together');\n }\n if (this.editable() && this.filter()) {\n throw new NgnError('select', 'Editable and filtering cannot be used together');\n }\n });\n effect(() => {\n this._customEditableSub?.unsubscribe();\n const editable = this.editable();\n const customEditableInput = this._customEditableInput();\n if (!editable || !customEditableInput) {\n return;\n }\n\n this._customEditableSub = customEditableInput.value.subscribe(value => {\n this.onEditableChange(value);\n });\n // Set ARIA attributes for accessibility. `role=\"combobox\"` is required so\n // the combobox attributes below are allowed even when the projected input\n // has an implicit role that forbids them (e.g. `<input type=\"number\">` →\n // `spinbutton`, which disallows `aria-autocomplete`). See calendar year field.\n customEditableInput.element.nativeElement.setAttribute('role', 'combobox');\n customEditableInput.element.nativeElement.setAttribute('aria-autocomplete', 'list');\n customEditableInput.element.nativeElement.setAttribute(\n 'aria-expanded',\n `${this._popover().open()}`\n );\n customEditableInput.element.nativeElement.setAttribute('aria-haspopup', 'listbox');\n customEditableInput.element.nativeElement.setAttribute(\n 'aria-controls',\n `${this.inputId()}_listbox`\n );\n });\n effect(() => {\n if (!this.editable()) {\n return;\n }\n const valueSig = this._customEditableInput()?.value;\n if (valueSig) {\n valueSig.set((this.value() as string) || '');\n }\n });\n effect(() => {\n if (!this.editable()) {\n return;\n }\n const hasOptions = !!this._listbox()?.displayedItems().length;\n if (!this._userChangedEditableInput) {\n return;\n }\n this._userChangedEditableInput = false;\n if (hasOptions) {\n this.show();\n } else {\n this.hide();\n }\n });\n }\n\n protected onKeyDown(event: KeyboardEvent) {\n if (this._popover().open()) {\n this._listbox()?.onKeyDown(event);\n }\n // if event is not handled by the listbox, we can handle it here\n if (!event.defaultPrevented) {\n if (event.key === 'Enter') {\n if (this.readonly() || this.disabled()) {\n return;\n }\n this._popover().toggle();\n event.stopPropagation();\n event.preventDefault();\n }\n if (this._popover().open() && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {\n if (this.readonly() || this.disabled()) {\n return;\n }\n const currentIndex = this.options().findIndex(option => option.value === this.value());\n let newIndex = event.key === 'ArrowDown' ? currentIndex + 1 : currentIndex - 1;\n if (newIndex < 0) {\n newIndex = 0;\n }\n if (newIndex >= this.options().length) {\n newIndex = this.options().length - 1;\n }\n const newValue = this.options()[newIndex]?.value;\n if (newValue !== undefined) {\n this.onSelect(newValue as ValueType<V, false, Multiple>);\n }\n }\n }\n }\n\n protected onPopoverClosed() {\n this._listbox()?.currentHighlightedValue.set(null);\n this.potentiallyBlurred();\n this.currentHighlightedValue.set(null);\n const filter = this.filter();\n if (filter === true || (typeof filter === 'object' && filter.clearFilterOnClose)) {\n if (!this.editable()) {\n this.filterTextInternal.set('');\n }\n }\n }\n\n protected onSelect(value: ValueType<V, false, Multiple> | null) {\n if (this.editable()) {\n const item = this._flatOptions().find(option => option.value === value);\n if (item) {\n this.value.set(maybeCallback(item.label) as ValueType<V, Editable, Multiple>);\n }\n } else {\n const v = value as ValueType<V, Editable, Multiple>;\n if (this.value() !== v) {\n this.value.set(v);\n }\n }\n }\n\n protected onItemClicked() {\n if (!this.multiple()) {\n this.hide();\n }\n }\n\n /**\n * Shows the select dropdown.\n */\n public show() {\n if (this.disabled() || this.readonly()) {\n return;\n }\n this._popover().show();\n }\n\n /**\n * Hides the select dropdown.\n */\n public hide() {\n this._popover().hide();\n }\n\n protected onEditableChange(value: string | null) {\n if (this.editable()) {\n this.value.set(maybeCallback(value) as ValueType<V, Editable, Multiple>);\n this._userChangedEditableInput = true;\n if (this.editableAutoFilter()) {\n this.filterTextInternal.set(value);\n }\n }\n }\n\n protected potentiallyBlurred() {\n setTimeout(() => {\n if (this.element.nativeElement.contains(document.activeElement) || this._popover().open()) {\n return;\n }\n this.touched.set(true);\n });\n }\n}\n","<div\n [ptInt]=\"this\"\n [ptClass]=\"{\n input: true,\n 'input-editable': editable(),\n }\"\n (click)=\"show()\"\n (keydown)=\"onKeyDown($event)\"\n #field\n [tabindex]=\"editable() || disabled() ? -1 : tabindex()\"\n (focusout)=\"potentiallyBlurred()\"\n>\n @if (editable()) {\n <ng-content select=\"[ngnInput]\">\n <input\n ngnInput\n autocomplete=\"list\"\n [aria-expanded]=\"popover.open()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"inputId() + '_listbox'\"\n [id]=\"inputId()\"\n [value]=\"valueStr() || ''\"\n (valueChange)=\"onEditableChange($event)\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n />\n </ng-content>\n } @else {\n <div\n role=\"combobox\"\n [ptInt]=\"this\"\n [ptClass]=\"'combobox'\"\n [aria-expanded]=\"popover.open()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"inputId() + '_listbox'\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-label]=\"label()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [id]=\"inputId()\"\n >\n @if (multiple()) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemsTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedItems(),\n }\"\n />\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedItems()[0],\n }\"\n />\n }\n </div>\n }\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"'icon'\"\n [icon]=\"iconDropdown()\"\n defaultIcon=\"dropdown-toggle\"\n />\n</div>\n<ngn-popover\n #popover\n [ptInt]=\"this\"\n [ptDep]=\"'popover'\"\n [options]=\"appliedPopoverOptions()\"\n [anchor]=\"anchorElement\"\n (keydown)=\"onKeyDown($event)\"\n (closed)=\"onPopoverClosed()\"\n [id]=\"inputId() + '_popover'\"\n [hasShrinkableContent]=\"true\"\n>\n <ng-template #lazy>\n <div [ptInt]=\"this\" [ptClass]=\"'popover-content'\">\n @if (filter()) {\n <ngn-input-field [ptInt]=\"this\" [ptDep]=\"'filter'\">\n <input\n ngnInput\n [value]=\"filterTextInternal()\"\n (valueChange)=\"filterTextInternal.set($event)\"\n [attr.aria-label]=\"i18n['select_filterOptions']()\"\n />\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"'filter-icon'\"\n defaultIcon=\"search\"\n [icon]=\"iconFilter()\"\n />\n </ngn-input-field>\n }\n <ngn-list-box\n [ptInt]=\"this\"\n [ptDep]=\"'list-box'\"\n style=\"height: 100%; min-height: 0\"\n [focussable]=\"false\"\n [selectable]=\"true\"\n [filter]=\"appliedFilter()\"\n [filterText]=\"filterTextInternal()\"\n [items]=\"options()\"\n [itemHeight]=\"itemHeight()\"\n [virtual]=\"virtual()\"\n [templateItem]=\"itemTemplate()\"\n [templateGroup]=\"groupTemplate()\"\n [multiple]=\"multiple()\"\n [value]=\"multiple() ? selectedItemsValues() : selectedItemsValues()[0]\"\n [scrollToSelectedItemOnInit]=\"scrollToSelectedItemOnOpen()\"\n (valueChange)=\"onSelect($event)\"\n (itemClicked)=\"onItemClicked()\"\n [inputId]=\"inputId() + '_listbox'\"\n [templateEmpty]=\"noItemsTemplate()\"\n [checkbox]=\"checkbox()\"\n />\n </div>\n </ng-template>\n</ngn-popover>\n\n<ng-template #defaultItemTemplate [ngnTemplate]=\"templateTypes.item\" let-item>\n <span [attr.data-testid]=\"item?.testId\">\n @let label = item?.label;\n @if (label) {\n <span [attr.data-testid]=\"item?.testId\">{{ maybeCallback(label) }}</span>\n }\n </span>\n</ng-template>\n\n<ng-template #defaultGroupTemplate [ngnTemplate]=\"templateTypes.item\" let-group>\n <span [attr.data-testid]=\"group?.testId\">\n @let label = group?.label;\n @if (label) {\n <span [attr.data-testid]=\"group?.testId\">{{ maybeCallback(label) }}</span>\n }\n </span>\n</ng-template>\n\n<ng-template #defaultSelectedItemTemplate [ngnTemplate]=\"templateTypes.item\" let-item>\n @let label = item?.label;\n @if (label) {\n <span [attr.data-testid]=\"item?.testId\">{{ maybeCallback(label) }}</span>\n } @else {\n <span [attr.data-testid]=\"item?.testId\">&ZeroWidthSpace;</span>\n }\n</ng-template>\n\n<ng-template #defaultSelectedItemsTemplate [ngnTemplate]=\"templateTypes.selectedItems\" let-items>\n <ngn-item-view\n #itemView\n [items]=\"items\"\n [idField]=\"'value'\"\n [separator]=\"true\"\n style=\"margin-right: 8px\"\n >\n <ng-template #item let-item [ngnTemplate]=\"itemView.templateTypes.item\">\n <ng-container\n *ngTemplateOutlet=\"selectedItemTemplate(); context: { $implicit: item }\"\n ></ng-container>\n </ng-template>\n </ngn-item-view>\n @if (items.length < 1) {\n &ZeroWidthSpace;\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqBM,MAAgB,eAIpB,SAAQ,gBAAmE,CAAA;;AAE1D,IAAA,oBAAoB,GACnC,SAAS,CAAC,QAAQ,CAA8C,qBAAqB,CAAC;IACvE,iBAAiB,GAChC,YAAY,CAA8C,MAAM;0FAAC;AACnE;;;AAGG;IACa,YAAY,GAAG,KAAK,CAAqD,IAAI;qFAAC;AAC3E,IAAA,YAAY,GAAG,QAAQ,CACxC,MAAM,IAAI,CAAC,iBAAiB,EAAE,IAAI,IAAI,CAAC,YAAY,EAAE,IAAI,IAAI,CAAC,oBAAoB,EAAE;qFACrF;;AAGgB,IAAA,4BAA4B,GAAG,SAAS,CAAC,QAAQ,CAEhE,6BAA6B,CAAC;IACf,yBAAyB,GACxC,YAAY,CAA8C,cAAc;kGAAC;AAC3E;;;AAGG;IACa,oBAAoB,GAAG,KAAK,CAC1C,IAAI;6FACL;IACkB,oBAAoB,GAAG,QAAQ,CAChD,MACE,IAAI,CAAC,yBAAyB,EAAE;QAChC,IAAI,CAAC,oBAAoB,EAAE;QAC3B,IAAI,CAAC,4BAA4B,EAAE;6FACtC;;AAGgB,IAAA,6BAA6B,G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