@ngneers/controls 0.0.1-pre4 → 0.0.1-pre6

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 (122) hide show
  1. package/fesm2022/ngneers-controls-accordion.mjs +32 -32
  2. package/fesm2022/ngneers-controls-accordion.mjs.map +1 -1
  3. package/fesm2022/ngneers-controls-api-ng.mjs +19 -19
  4. package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -1
  5. package/fesm2022/ngneers-controls-api-resize.mjs +706 -0
  6. package/fesm2022/ngneers-controls-api-resize.mjs.map +1 -0
  7. package/fesm2022/ngneers-controls-avatar.mjs +13 -13
  8. package/fesm2022/ngneers-controls-avatar.mjs.map +1 -1
  9. package/fesm2022/ngneers-controls-base.mjs +89 -64
  10. package/fesm2022/ngneers-controls-base.mjs.map +1 -1
  11. package/fesm2022/ngneers-controls-breadcrumb.mjs +18 -18
  12. package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -1
  13. package/fesm2022/ngneers-controls-button-group.mjs +8 -8
  14. package/fesm2022/ngneers-controls-button-group.mjs.map +1 -1
  15. package/fesm2022/ngneers-controls-button.mjs +16 -10
  16. package/fesm2022/ngneers-controls-button.mjs.map +1 -1
  17. package/fesm2022/{ngneers-controls-calendar-time-C7UnIFzU.mjs → ngneers-controls-calendar-time-Bzlv9Vkn.mjs} +9 -9
  18. package/fesm2022/{ngneers-controls-calendar-time-C7UnIFzU.mjs.map → ngneers-controls-calendar-time-Bzlv9Vkn.mjs.map} +1 -1
  19. package/fesm2022/ngneers-controls-calendar.mjs +54 -54
  20. package/fesm2022/ngneers-controls-calendar.mjs.map +1 -1
  21. package/fesm2022/ngneers-controls-checkbox.mjs +9 -9
  22. package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -1
  23. package/fesm2022/ngneers-controls-chip.mjs +6 -6
  24. package/fesm2022/ngneers-controls-chip.mjs.map +1 -1
  25. package/fesm2022/ngneers-controls-defer.mjs +10 -10
  26. package/fesm2022/ngneers-controls-defer.mjs.map +1 -1
  27. package/fesm2022/ngneers-controls-dialog.mjs +37 -39
  28. package/fesm2022/ngneers-controls-dialog.mjs.map +1 -1
  29. package/fesm2022/ngneers-controls-directives.mjs +45 -39
  30. package/fesm2022/ngneers-controls-directives.mjs.map +1 -1
  31. package/fesm2022/ngneers-controls-drawer.mjs +28 -28
  32. package/fesm2022/ngneers-controls-drawer.mjs.map +1 -1
  33. package/fesm2022/ngneers-controls-edit-inplace.mjs +15 -15
  34. package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -1
  35. package/fesm2022/ngneers-controls-filter.mjs +192 -44
  36. package/fesm2022/ngneers-controls-filter.mjs.map +1 -1
  37. package/fesm2022/{ngneers-controls-i18n-de-CdTPeBiR.mjs → ngneers-controls-i18n-de-CF0xTWEX.mjs} +9 -5
  38. package/fesm2022/ngneers-controls-i18n-de-CF0xTWEX.mjs.map +1 -0
  39. package/fesm2022/{ngneers-controls-i18n-en-Cfp2pOLY.mjs → ngneers-controls-i18n-en-8B7xAjH2.mjs} +9 -5
  40. package/fesm2022/ngneers-controls-i18n-en-8B7xAjH2.mjs.map +1 -0
  41. package/fesm2022/ngneers-controls-i18n.mjs +5 -5
  42. package/fesm2022/ngneers-controls-i18n.mjs.map +1 -1
  43. package/fesm2022/ngneers-controls-icon.mjs +10 -10
  44. package/fesm2022/ngneers-controls-icon.mjs.map +1 -1
  45. package/fesm2022/ngneers-controls-inplace.mjs +18 -18
  46. package/fesm2022/ngneers-controls-inplace.mjs.map +1 -1
  47. package/fesm2022/ngneers-controls-input-field.mjs +15 -15
  48. package/fesm2022/ngneers-controls-input-field.mjs.map +1 -1
  49. package/fesm2022/ngneers-controls-input-mask.mjs +8 -8
  50. package/fesm2022/ngneers-controls-input-mask.mjs.map +1 -1
  51. package/fesm2022/ngneers-controls-input.mjs +7 -6
  52. package/fesm2022/ngneers-controls-input.mjs.map +1 -1
  53. package/fesm2022/ngneers-controls-item-view.mjs +33 -33
  54. package/fesm2022/ngneers-controls-item-view.mjs.map +1 -1
  55. package/fesm2022/ngneers-controls-list-box.mjs +31 -31
  56. package/fesm2022/ngneers-controls-list-box.mjs.map +1 -1
  57. package/fesm2022/ngneers-controls-menu.mjs +32 -32
  58. package/fesm2022/ngneers-controls-menu.mjs.map +1 -1
  59. package/fesm2022/ngneers-controls-message.mjs +4 -4
  60. package/fesm2022/ngneers-controls-message.mjs.map +1 -1
  61. package/fesm2022/ngneers-controls-paginator.mjs +12 -12
  62. package/fesm2022/ngneers-controls-paginator.mjs.map +1 -1
  63. package/fesm2022/ngneers-controls-popover.mjs +13 -13
  64. package/fesm2022/ngneers-controls-popover.mjs.map +1 -1
  65. package/fesm2022/ngneers-controls-progress.mjs +16 -16
  66. package/fesm2022/ngneers-controls-progress.mjs.map +1 -1
  67. package/fesm2022/ngneers-controls-scroller.mjs +74 -39
  68. package/fesm2022/ngneers-controls-scroller.mjs.map +1 -1
  69. package/fesm2022/ngneers-controls-select-button.mjs +6 -6
  70. package/fesm2022/ngneers-controls-select-button.mjs.map +1 -1
  71. package/fesm2022/ngneers-controls-select.mjs +46 -46
  72. package/fesm2022/ngneers-controls-select.mjs.map +1 -1
  73. package/fesm2022/ngneers-controls-slider.mjs +12 -12
  74. package/fesm2022/ngneers-controls-slider.mjs.map +1 -1
  75. package/fesm2022/ngneers-controls-spinner.mjs +7 -7
  76. package/fesm2022/ngneers-controls-spinner.mjs.map +1 -1
  77. package/fesm2022/ngneers-controls-splitter.mjs +141 -328
  78. package/fesm2022/ngneers-controls-splitter.mjs.map +1 -1
  79. package/fesm2022/ngneers-controls-switch.mjs +3 -3
  80. package/fesm2022/ngneers-controls-table.mjs +1520 -80
  81. package/fesm2022/ngneers-controls-table.mjs.map +1 -1
  82. package/fesm2022/ngneers-controls-tabs.mjs +40 -39
  83. package/fesm2022/ngneers-controls-tabs.mjs.map +1 -1
  84. package/fesm2022/ngneers-controls-tag.mjs +4 -4
  85. package/fesm2022/ngneers-controls-tag.mjs.map +1 -1
  86. package/fesm2022/ngneers-controls-toast.mjs +18 -18
  87. package/fesm2022/ngneers-controls-toast.mjs.map +1 -1
  88. package/fesm2022/ngneers-controls-toggle-button.mjs +9 -9
  89. package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -1
  90. package/fesm2022/ngneers-controls-tooltip.mjs +37 -45
  91. package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -1
  92. package/fesm2022/ngneers-controls-utils-ng.mjs +9 -9
  93. package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -1
  94. package/package.json +14 -10
  95. package/types/ngneers-controls-api-ng.d.ts +2 -2
  96. package/types/ngneers-controls-api-resize.d.ts +318 -0
  97. package/types/ngneers-controls-base.d.ts +8 -0
  98. package/types/ngneers-controls-breadcrumb.d.ts +1 -1
  99. package/types/ngneers-controls-button.d.ts +13 -8
  100. package/types/ngneers-controls-calendar.d.ts +5 -1
  101. package/types/ngneers-controls-checkbox.d.ts +1 -1
  102. package/types/ngneers-controls-directives.d.ts +7 -1
  103. package/types/ngneers-controls-drawer.d.ts +4 -0
  104. package/types/ngneers-controls-edit-inplace.d.ts +4 -0
  105. package/types/ngneers-controls-filter.d.ts +53 -4
  106. package/types/ngneers-controls-i18n.d.ts +4 -0
  107. package/types/ngneers-controls-icon.d.ts +1 -1
  108. package/types/ngneers-controls-input-field.d.ts +4 -0
  109. package/types/ngneers-controls-input.d.ts +1 -1
  110. package/types/ngneers-controls-list-box.d.ts +5 -1
  111. package/types/ngneers-controls-menu.d.ts +1 -1
  112. package/types/ngneers-controls-paginator.d.ts +4 -0
  113. package/types/ngneers-controls-popover.d.ts +1 -1
  114. package/types/ngneers-controls-scroller.d.ts +12 -2
  115. package/types/ngneers-controls-select.d.ts +6 -2
  116. package/types/ngneers-controls-spinner.d.ts +1 -1
  117. package/types/ngneers-controls-splitter.d.ts +29 -59
  118. package/types/ngneers-controls-table.d.ts +392 -24
  119. package/types/ngneers-controls-toast.d.ts +1 -1
  120. package/types/ngneers-controls-tooltip.d.ts +1 -7
  121. package/fesm2022/ngneers-controls-i18n-de-CdTPeBiR.mjs.map +0 -1
  122. package/fesm2022/ngneers-controls-i18n-en-Cfp2pOLY.mjs.map +0 -1
@@ -196,38 +196,38 @@ class ItemViewTemplates extends NgnBase {
196
196
  * The template to be used for rendering each item in the item view.
197
197
  * Can also be set using the `item` content child.
198
198
  */
199
- templateItem = input(null, ...(ngDevMode ? [{ debugName: "templateItem" }] : []));
200
- _userItemTemplate = contentChild('item', ...(ngDevMode ? [{ debugName: "_userItemTemplate" }] : []));
201
- itemTemplate = computed(() => this._userItemTemplate() ?? this.templateItem(), ...(ngDevMode ? [{ debugName: "itemTemplate" }] : []));
199
+ templateItem = input(null, ...(ngDevMode ? [{ debugName: "templateItem" }] : /* istanbul ignore next */ []));
200
+ _userItemTemplate = contentChild('item', ...(ngDevMode ? [{ debugName: "_userItemTemplate" }] : /* istanbul ignore next */ []));
201
+ itemTemplate = computed(() => this._userItemTemplate() ?? this.templateItem(), ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
202
202
  // Separator template
203
203
  _defaultSeparatorTemplate = viewChild.required('defaultSeparatorTemplate');
204
- _userSeparatorTemplate = contentChild('separator', ...(ngDevMode ? [{ debugName: "_userSeparatorTemplate" }] : []));
204
+ _userSeparatorTemplate = contentChild('separator', ...(ngDevMode ? [{ debugName: "_userSeparatorTemplate" }] : /* istanbul ignore next */ []));
205
205
  /**
206
206
  * Set a custom template for the separators of the breadcrumb.
207
207
  * Can also be set using an `<ng-template>` element with `#separator` template reference variable.
208
208
  */
209
- templateSeparator = input(null, ...(ngDevMode ? [{ debugName: "templateSeparator" }] : []));
210
- separatorTemplate = computed(() => this._userSeparatorTemplate() ?? this.templateSeparator() ?? this._defaultSeparatorTemplate(), ...(ngDevMode ? [{ debugName: "separatorTemplate" }] : []));
209
+ templateSeparator = input(null, ...(ngDevMode ? [{ debugName: "templateSeparator" }] : /* istanbul ignore next */ []));
210
+ separatorTemplate = computed(() => this._userSeparatorTemplate() ?? this.templateSeparator() ?? this._defaultSeparatorTemplate(), ...(ngDevMode ? [{ debugName: "separatorTemplate" }] : /* istanbul ignore next */ []));
211
211
  // Overflow item template
212
212
  _defaultOverflowItemTemplate = viewChild.required('defaultOverflowItemTemplate');
213
- _userOverflowItemTemplate = contentChild('overflow', ...(ngDevMode ? [{ debugName: "_userOverflowItemTemplate" }] : []));
213
+ _userOverflowItemTemplate = contentChild('overflow', ...(ngDevMode ? [{ debugName: "_userOverflowItemTemplate" }] : /* istanbul ignore next */ []));
214
214
  /**
215
215
  * Set a custom template for the overflow item.
216
216
  * Can also be set using an `<ng-template>` element with `#overflow` template reference variable.
217
217
  */
218
- templateOverflow = input(null, ...(ngDevMode ? [{ debugName: "templateOverflow" }] : []));
218
+ templateOverflow = input(null, ...(ngDevMode ? [{ debugName: "templateOverflow" }] : /* istanbul ignore next */ []));
219
219
  overflowTemplate = computed(() => this._userOverflowItemTemplate() ??
220
220
  this.templateOverflow() ??
221
- this._defaultOverflowItemTemplate(), ...(ngDevMode ? [{ debugName: "overflowTemplate" }] : []));
221
+ this._defaultOverflowItemTemplate(), ...(ngDevMode ? [{ debugName: "overflowTemplate" }] : /* istanbul ignore next */ []));
222
222
  /**
223
223
  * Template types for the item-view.
224
224
  * Can be used with the {@link NgnTemplate} directive for type safe ng-templates.
225
225
  */
226
226
  templateTypes = templateTypesFn();
227
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ItemViewTemplates, deps: null, target: i0.ɵɵFactoryTarget.Directive });
228
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.0", type: ItemViewTemplates, isStandalone: true, inputs: { templateItem: { classPropertyName: "templateItem", publicName: "templateItem", isSignal: true, isRequired: false, transformFunction: null }, templateSeparator: { classPropertyName: "templateSeparator", publicName: "templateSeparator", isSignal: true, isRequired: false, transformFunction: null }, templateOverflow: { classPropertyName: "templateOverflow", publicName: "templateOverflow", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_userItemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "_userSeparatorTemplate", first: true, predicate: ["separator"], descendants: true, isSignal: true }, { propertyName: "_userOverflowItemTemplate", first: true, predicate: ["overflow"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_defaultSeparatorTemplate", first: true, predicate: ["defaultSeparatorTemplate"], descendants: true, isSignal: true }, { propertyName: "_defaultOverflowItemTemplate", first: true, predicate: ["defaultOverflowItemTemplate"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
227
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ItemViewTemplates, deps: null, target: i0.ɵɵFactoryTarget.Directive });
228
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.2", type: ItemViewTemplates, isStandalone: true, inputs: { templateItem: { classPropertyName: "templateItem", publicName: "templateItem", isSignal: true, isRequired: false, transformFunction: null }, templateSeparator: { classPropertyName: "templateSeparator", publicName: "templateSeparator", isSignal: true, isRequired: false, transformFunction: null }, templateOverflow: { classPropertyName: "templateOverflow", publicName: "templateOverflow", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_userItemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "_userSeparatorTemplate", first: true, predicate: ["separator"], descendants: true, isSignal: true }, { propertyName: "_userOverflowItemTemplate", first: true, predicate: ["overflow"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_defaultSeparatorTemplate", first: true, predicate: ["defaultSeparatorTemplate"], descendants: true, isSignal: true }, { propertyName: "_defaultOverflowItemTemplate", first: true, predicate: ["defaultOverflowItemTemplate"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
229
229
  }
230
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ItemViewTemplates, decorators: [{
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ItemViewTemplates, decorators: [{
231
231
  type: Directive
232
232
  }], propDecorators: { templateItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateItem", required: false }] }], _userItemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], _defaultSeparatorTemplate: [{ type: i0.ViewChild, args: ['defaultSeparatorTemplate', { isSignal: true }] }], _userSeparatorTemplate: [{ type: i0.ContentChild, args: ['separator', { isSignal: true }] }], templateSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateSeparator", required: false }] }], _defaultOverflowItemTemplate: [{ type: i0.ViewChild, args: ['defaultOverflowItemTemplate', { isSignal: true }] }], _userOverflowItemTemplate: [{ type: i0.ContentChild, args: ['overflow', { isSignal: true }] }], templateOverflow: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateOverflow", required: false }] }] } });
233
233
 
@@ -239,37 +239,37 @@ class NgnItemView extends ItemViewTemplates {
239
239
  /**
240
240
  * The key of the id property in the item object. This is used to track items in the template.
241
241
  */
242
- idField = input.required(...(ngDevMode ? [{ debugName: "idField" }] : []));
242
+ idField = input.required(...(ngDevMode ? [{ debugName: "idField" }] : /* istanbul ignore next */ []));
243
243
  /**
244
244
  * The items to be displayed in the item view.
245
245
  * This is a required input and should be an array of items of type {@link T}.
246
246
  */
247
- items = input.required(...(ngDevMode ? [{ debugName: "items" }] : []));
247
+ items = input.required(...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
248
248
  /**
249
249
  * A separator string (character) to be displayed between items. Set `true` for `,` or provide a custom string.
250
250
  */
251
- separator = input(...(ngDevMode ? [undefined, { debugName: "separator" }] : []));
251
+ separator = input(...(ngDevMode ? [undefined, { debugName: "separator" }] : /* istanbul ignore next */ []));
252
252
  /**
253
253
  * A separator icon to be displayed between items.
254
254
  */
255
- iconItemSeparator = input(...(ngDevMode ? [undefined, { debugName: "iconItemSeparator" }] : []));
255
+ iconItemSeparator = input(...(ngDevMode ? [undefined, { debugName: "iconItemSeparator" }] : /* istanbul ignore next */ []));
256
256
  /**
257
257
  * Strategy to use when there are more items than can be displayed in the available space.
258
258
  * The value determines where the items should start to overflow.
259
259
  * @default 'end'
260
260
  */
261
- overflowStrategy = input('end', ...(ngDevMode ? [{ debugName: "overflowStrategy" }] : []));
261
+ overflowStrategy = input('end', ...(ngDevMode ? [{ debugName: "overflowStrategy" }] : /* istanbul ignore next */ []));
262
262
  /**
263
263
  * The amount of items to keep visible after or before overflowing, depending on the {@link overflowStrategy}.
264
264
  * @default 0
265
265
  */
266
- overflowStrategyFreezeCount = input(0, ...(ngDevMode ? [{ debugName: "overflowStrategyFreezeCount" }] : []));
266
+ overflowStrategyFreezeCount = input(0, ...(ngDevMode ? [{ debugName: "overflowStrategyFreezeCount" }] : /* istanbul ignore next */ []));
267
267
  /**
268
268
  * Index of the item to be used as the overflow indicator when using the 'aroundIndex' overflow strategy.
269
269
  * This input is only relevant when the {@link overflowStrategy} is set to 'aroundIndex'.
270
270
  * @default 0
271
271
  */
272
- overflowStrategyIndex = input(0, ...(ngDevMode ? [{ debugName: "overflowStrategyIndex" }] : []));
272
+ overflowStrategyIndex = input(0, ...(ngDevMode ? [{ debugName: "overflowStrategyIndex" }] : /* istanbul ignore next */ []));
273
273
  /**
274
274
  * Set this to `true` for greatly improving performance when all items have the same width.
275
275
  * Especially true for large lists of items.
@@ -280,23 +280,23 @@ class NgnItemView extends ItemViewTemplates {
280
280
  * need to access overflowed items directly.
281
281
  * @default false
282
282
  */
283
- sameWidthItems = input(false, ...(ngDevMode ? [{ debugName: "sameWidthItems" }] : []));
284
- _themeGap = signal(0, ...(ngDevMode ? [{ debugName: "_themeGap" }] : []));
283
+ sameWidthItems = input(false, ...(ngDevMode ? [{ debugName: "sameWidthItems" }] : /* istanbul ignore next */ []));
284
+ _themeGap = signal(0, ...(ngDevMode ? [{ debugName: "_themeGap" }] : /* istanbul ignore next */ []));
285
285
  _isBrowser = inject(Platform).isBrowser;
286
286
  separatorChar = computed(() => {
287
287
  const sep = this.separator();
288
288
  return typeof sep === 'boolean' ? (sep ? ', ' : '') : sep;
289
- }, ...(ngDevMode ? [{ debugName: "separatorChar" }] : []));
290
- _enableSizeMeasuring = computed(() => !this.sameWidthItems(), ...(ngDevMode ? [{ debugName: "_enableSizeMeasuring" }] : []));
291
- _renderedItemRefs = viewChildren('itemRef', ...(ngDevMode ? [{ debugName: "_renderedItemRefs" }] : []));
292
- _firstItemRef = viewChild('itemRef', ...(ngDevMode ? [{ debugName: "_firstItemRef" }] : []));
289
+ }, ...(ngDevMode ? [{ debugName: "separatorChar" }] : /* istanbul ignore next */ []));
290
+ _enableSizeMeasuring = computed(() => !this.sameWidthItems(), ...(ngDevMode ? [{ debugName: "_enableSizeMeasuring" }] : /* istanbul ignore next */ []));
291
+ _renderedItemRefs = viewChildren('itemRef', ...(ngDevMode ? [{ debugName: "_renderedItemRefs" }] : /* istanbul ignore next */ []));
292
+ _firstItemRef = viewChild('itemRef', ...(ngDevMode ? [{ debugName: "_firstItemRef" }] : /* istanbul ignore next */ []));
293
293
  _firstItemWidth = elementSizeSignal(this._firstItemRef);
294
294
  _renderedItemSizes = elementsSizesSignal(this._renderedItemRefs, this._enableSizeMeasuring);
295
295
  _renderedItemWidths = computed(() => this.sameWidthItems()
296
296
  ? this.items().map(() => this._firstItemWidth().width || Number.MAX_SAFE_INTEGER)
297
- : this._renderedItemSizes().map(size => size.width), { ...(ngDevMode ? { debugName: "_renderedItemWidths" } : {}), equal: areArraysDeepEqual });
297
+ : this._renderedItemSizes().map(size => size.width), { ...(ngDevMode ? { debugName: "_renderedItemWidths" } : /* istanbul ignore next */ {}), equal: areArraysDeepEqual });
298
298
  _containerSize = elementSizeSignal(this.element.nativeElement);
299
- _overflowItemRef = viewChild('overflowItem', ...(ngDevMode ? [{ debugName: "_overflowItemRef" }] : []));
299
+ _overflowItemRef = viewChild('overflowItem', ...(ngDevMode ? [{ debugName: "_overflowItemRef" }] : /* istanbul ignore next */ []));
300
300
  _overflowItemSize = elementSizeSignal(this._overflowItemRef);
301
301
  itemOverflowCheckOrder = computed(() => {
302
302
  const count = this.items().length;
@@ -307,7 +307,7 @@ class NgnItemView extends ItemViewTemplates {
307
307
  freezeCount,
308
308
  strategyIndex: this.overflowStrategyIndex(),
309
309
  });
310
- }, ...(ngDevMode ? [{ debugName: "itemOverflowCheckOrder" }] : []));
310
+ }, ...(ngDevMode ? [{ debugName: "itemOverflowCheckOrder" }] : /* istanbul ignore next */ []));
311
311
  renderedItems = computed(() => {
312
312
  const containerWidth = this._containerSize().width;
313
313
  const renderedItemWidths = this._renderedItemWidths();
@@ -407,11 +407,11 @@ class NgnItemView extends ItemViewTemplates {
407
407
  res = res.filter((item, index) => item.kind !== 'overflowItem' || index === 0);
408
408
  }
409
409
  return res;
410
- }, ...(ngDevMode ? [{ debugName: "renderedItems" }] : []));
410
+ }, ...(ngDevMode ? [{ debugName: "renderedItems" }] : /* istanbul ignore next */ []));
411
411
  maxWidth = computed(() => {
412
412
  return Math.ceil(this._renderedItemWidths().reduce((sum, w) => sum + w, 0) +
413
413
  this._themeGap() * Math.max(0, this.items().length - 1));
414
- }, ...(ngDevMode ? [{ debugName: "maxWidth" }] : []));
414
+ }, ...(ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []));
415
415
  ngAfterViewInit() {
416
416
  if (!this._isBrowser) {
417
417
  return;
@@ -422,10 +422,10 @@ class NgnItemView extends ItemViewTemplates {
422
422
  this._themeGap.set(gap);
423
423
  });
424
424
  }
425
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: NgnItemView, deps: null, target: i0.ɵɵFactoryTarget.Component });
426
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: NgnItemView, isStandalone: true, selector: "ngn-item-view", inputs: { idField: { classPropertyName: "idField", publicName: "idField", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, iconItemSeparator: { classPropertyName: "iconItemSeparator", publicName: "iconItemSeparator", isSignal: true, isRequired: false, transformFunction: null }, overflowStrategy: { classPropertyName: "overflowStrategy", publicName: "overflowStrategy", isSignal: true, isRequired: false, transformFunction: null }, overflowStrategyFreezeCount: { classPropertyName: "overflowStrategyFreezeCount", publicName: "overflowStrategyFreezeCount", isSignal: true, isRequired: false, transformFunction: null }, overflowStrategyIndex: { classPropertyName: "overflowStrategyIndex", publicName: "overflowStrategyIndex", isSignal: true, isRequired: false, transformFunction: null }, sameWidthItems: { classPropertyName: "sameWidthItems", publicName: "sameWidthItems", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "\"list\"", "style.maxWidth.px": "maxWidth()" } }, providers: [provideSelf(NgnItemView)], viewQueries: [{ propertyName: "_renderedItemRefs", predicate: ["itemRef"], descendants: true, isSignal: true }, { propertyName: "_firstItemRef", first: true, predicate: ["itemRef"], descendants: true, isSignal: true }, { propertyName: "_overflowItemRef", first: true, predicate: ["overflowItem"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@for (item of renderedItems(); track item.id; let i = $index) {\r\n @if (item.kind === 'visibleItem' || item.kind === 'overflowItem') {\r\n <span\r\n role=\"listitem\"\r\n #itemRef\r\n [ptInt]=\"this\"\r\n [ptClass]=\"{\r\n item: true,\r\n 'item-overflowing': item.kind === 'overflowItem',\r\n }\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n itemTemplate();\r\n context: { $implicit: item.item, index: i, last: $last, first: $first }\r\n \"\r\n />\r\n @if (!$last) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n separatorTemplate();\r\n context: { $implicit: { character: separatorChar(), icon: iconItemSeparator() } }\r\n \"\r\n />\r\n }\r\n </span>\r\n } @else if (item.kind === 'overflowIndicator') {\r\n <div\r\n [ptInt]=\"this\"\r\n [ptClass]=\"{ 'more-items': true, 'more-items-hidden': !item.visible }\"\r\n aria-hidden=\"true\"\r\n #overflowItem\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n overflowTemplate();\r\n context: {\r\n $implicit: {\r\n totalCount: items().length,\r\n overflowCount: item.items.length,\r\n overflowItems: item.items,\r\n },\r\n }\r\n \"\r\n />\r\n @if (!$last) {\r\n <span\r\n [style.visibility]=\"item.hasSeparator ? 'visible' : 'hidden'\"\r\n style=\"display: contents\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n separatorTemplate();\r\n context: { $implicit: { character: separatorChar(), icon: iconItemSeparator() } }\r\n \"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n}\r\n\r\n<ng-template #defaultSeparatorTemplate [ngnTemplate]=\"templateTypes.separator\" let-separator>\r\n @if (separator.character) {\r\n <span>{{ separator.character }}</span>\r\n } @else if (separator.icon) {\r\n <ngn-icon [icon]=\"separator.icon\" />\r\n }\r\n</ng-template>\r\n\r\n<ng-template #defaultOverflowItemTemplate [ngnTemplate]=\"templateTypes.overflow\" let-overflow>\r\n <span [ptInt]=\"this\" [ptClass]=\"'more-items-default'\">+{{ overflow.overflowCount }}</span>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgnTemplate, selector: "ng-template[ngnTemplate]", inputs: ["ngnTemplate"] }, { kind: "component", type: NgnIcon, selector: "ngn-icon", inputs: ["defaultIcon", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
425
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnItemView, deps: null, target: i0.ɵɵFactoryTarget.Component });
426
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: NgnItemView, isStandalone: true, selector: "ngn-item-view", inputs: { idField: { classPropertyName: "idField", publicName: "idField", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, iconItemSeparator: { classPropertyName: "iconItemSeparator", publicName: "iconItemSeparator", isSignal: true, isRequired: false, transformFunction: null }, overflowStrategy: { classPropertyName: "overflowStrategy", publicName: "overflowStrategy", isSignal: true, isRequired: false, transformFunction: null }, overflowStrategyFreezeCount: { classPropertyName: "overflowStrategyFreezeCount", publicName: "overflowStrategyFreezeCount", isSignal: true, isRequired: false, transformFunction: null }, overflowStrategyIndex: { classPropertyName: "overflowStrategyIndex", publicName: "overflowStrategyIndex", isSignal: true, isRequired: false, transformFunction: null }, sameWidthItems: { classPropertyName: "sameWidthItems", publicName: "sameWidthItems", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "\"list\"", "style.maxWidth.px": "maxWidth()" } }, providers: [provideSelf(NgnItemView)], viewQueries: [{ propertyName: "_renderedItemRefs", predicate: ["itemRef"], descendants: true, isSignal: true }, { propertyName: "_firstItemRef", first: true, predicate: ["itemRef"], descendants: true, isSignal: true }, { propertyName: "_overflowItemRef", first: true, predicate: ["overflowItem"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@for (item of renderedItems(); track item.id; let i = $index) {\r\n @if (item.kind === 'visibleItem' || item.kind === 'overflowItem') {\r\n <span\r\n role=\"listitem\"\r\n #itemRef\r\n [ptInt]=\"this\"\r\n [ptClass]=\"{\r\n item: true,\r\n 'item-overflowing': item.kind === 'overflowItem',\r\n }\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n itemTemplate();\r\n context: { $implicit: item.item, index: i, last: $last, first: $first }\r\n \"\r\n />\r\n @if (!$last) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n separatorTemplate();\r\n context: { $implicit: { character: separatorChar(), icon: iconItemSeparator() } }\r\n \"\r\n />\r\n }\r\n </span>\r\n } @else if (item.kind === 'overflowIndicator') {\r\n <div\r\n [ptInt]=\"this\"\r\n [ptClass]=\"{ 'more-items': true, 'more-items-hidden': !item.visible }\"\r\n aria-hidden=\"true\"\r\n #overflowItem\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n overflowTemplate();\r\n context: {\r\n $implicit: {\r\n totalCount: items().length,\r\n overflowCount: item.items.length,\r\n overflowItems: item.items,\r\n },\r\n }\r\n \"\r\n />\r\n @if (!$last) {\r\n <span\r\n [style.visibility]=\"item.hasSeparator ? 'visible' : 'hidden'\"\r\n style=\"display: contents\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n separatorTemplate();\r\n context: { $implicit: { character: separatorChar(), icon: iconItemSeparator() } }\r\n \"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n}\r\n\r\n<ng-template #defaultSeparatorTemplate [ngnTemplate]=\"templateTypes.separator\" let-separator>\r\n @if (separator.character) {\r\n <span>{{ separator.character }}</span>\r\n } @else if (separator.icon) {\r\n <ngn-icon [icon]=\"separator.icon\" />\r\n }\r\n</ng-template>\r\n\r\n<ng-template #defaultOverflowItemTemplate [ngnTemplate]=\"templateTypes.overflow\" let-overflow>\r\n <span [ptInt]=\"this\" [ptClass]=\"'more-items-default'\">+{{ overflow.overflowCount }}</span>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgnTemplate, selector: "ng-template[ngnTemplate]", inputs: ["ngnTemplate"] }, { kind: "component", type: NgnIcon, selector: "ngn-icon", inputs: ["defaultIcon", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
427
427
  }
428
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: NgnItemView, decorators: [{
428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnItemView, decorators: [{
429
429
  type: Component,
430
430
  args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ngn-item-view', imports: [NgnPt, NgTemplateOutlet, NgnTemplate, NgnIcon], providers: [provideSelf(NgnItemView)], host: {
431
431
  '[attr.role]': '"list"',
@@ -1 +1 @@
1
- {"version":3,"file":"ngneers-controls-item-view.mjs","sources":["../../src/item-view/item-view-layout.ts","../../src/item-view/item-view-templates.ts","../../src/item-view/item-view.ts","../../src/item-view/item-view.html","../../src/item-view/ngneers-controls-item-view.ts"],"sourcesContent":["import { NgnError } from '@ngneers/controls/utils';\r\n\r\nimport type { OverflowStrategy } from './types';\r\n\r\nexport type ItemOverflowLocation = 'start' | 'end' | 'center';\r\n\r\nexport type OverflowOrderEntry = {\r\n index: number;\r\n location: ItemOverflowLocation;\r\n};\r\n\r\nexport type OverflowOrder = readonly OverflowOrderEntry[];\r\n\r\nexport type ItemViewLayoutInput = {\r\n count: number;\r\n strategy: OverflowStrategy;\r\n freezeCount: number;\r\n strategyIndex: number;\r\n containerWidth: number;\r\n itemWidths: readonly number[];\r\n overflowItemWidth: number;\r\n gap: number;\r\n};\r\n\r\nexport type ItemViewLayoutResult = {\r\n checkOrder: OverflowOrder;\r\n renderedItemOrders: OverflowOrder;\r\n remainingItemOrders: OverflowOrder;\r\n overflowIndicatorCount: number;\r\n overflowIndicatorIndices: readonly (number | null)[];\r\n};\r\n\r\n/**\r\n * Returns the *priority order* in which items are considered for keeping visible.\r\n * The algorithm is greedy: it walks this list until items no longer fit.\r\n * Each entry also carries a `location` which describes which overflow indicator would own the item.\r\n */\r\nexport function getItemOverflowCheckOrder(params: {\r\n count: number;\r\n strategy: OverflowStrategy;\r\n freezeCount: number;\r\n strategyIndex: number;\r\n}): OverflowOrder {\r\n const count = Math.max(0, Math.floor(params.count));\r\n if (count === 0) {\r\n return [];\r\n }\r\n\r\n const freezeCount = Math.min(Math.max(0, Math.floor(params.freezeCount)), count);\r\n\r\n switch (params.strategy) {\r\n case 'end': {\r\n const arr = [...Array.from({ length: count - freezeCount }, (_, i) => i)];\r\n arr.splice(1, 0, ...Array.from({ length: freezeCount }, (_, i) => count - freezeCount + i));\r\n return arr.map(index => ({ index, location: 'end' }));\r\n }\r\n case 'start': {\r\n const arr = [...Array.from({ length: count - freezeCount }, (_, i) => count - i - 1)];\r\n arr.splice(1, 0, ...Array.from({ length: freezeCount }, (_, i) => i));\r\n return arr.map(index => ({ index, location: 'start' }));\r\n }\r\n case 'center': {\r\n // \"Center\" overflows symmetrically: keep alternating left/right items first.\r\n const order: OverflowOrderEntry[] = [];\r\n let leftIndex = 0;\r\n let rightIndex = count - 1;\r\n\r\n for (let i = 0; i < count; i++) {\r\n if (i % 2 === 0) {\r\n order.push({ index: leftIndex++, location: 'center' } as const);\r\n } else {\r\n order.push({ index: rightIndex--, location: 'center' } as const);\r\n }\r\n }\r\n return order;\r\n }\r\n case 'aroundIndex': {\r\n // \"AroundIndex\" keeps the chosen item visible, then expands outward on both sides.\r\n // FreezeCount applies to both ends; we must ensure the chosen index stays in-bounds.\r\n const minIndex = Math.min(freezeCount, count - 1);\r\n const maxIndex = Math.max(minIndex, count - freezeCount - 1);\r\n const index = Math.min(Math.max(minIndex, Math.floor(params.strategyIndex)), maxIndex);\r\n\r\n const targetMiddleCount = Math.max(0, count - freezeCount * 2);\r\n const order: { index: number; location: 'start' | 'end' }[] =\r\n targetMiddleCount > 0 ? [{ index, location: 'start' }] : [];\r\n\r\n let offset = 1;\r\n while (order.length < targetMiddleCount) {\r\n if (index - offset >= freezeCount) {\r\n order.push({ index: index - offset, location: 'start' });\r\n }\r\n if (order.length >= targetMiddleCount) {\r\n break;\r\n }\r\n if (index + offset < count - freezeCount) {\r\n order.push({\r\n index: index + offset,\r\n location: 'end',\r\n });\r\n }\r\n offset++;\r\n }\r\n\r\n // Insert frozen items near the front of the list so they are kept visible.\r\n // Keep the insertion ordering consistent with the component implementation.\r\n order.splice(\r\n 1,\r\n 0,\r\n ...Array.from({ length: freezeCount }, (_, i) => ({ index: i, location: 'start' }) as const)\r\n );\r\n order.splice(\r\n 1,\r\n 0,\r\n ...Array.from(\r\n { length: freezeCount },\r\n (_, i) =>\r\n ({\r\n index: count - freezeCount + i,\r\n location: 'end',\r\n }) as const\r\n )\r\n );\r\n\r\n return order;\r\n }\r\n }\r\n}\r\n\r\nexport function calculateItemViewLayout(params: ItemViewLayoutInput): ItemViewLayoutResult {\r\n const count = Math.max(0, Math.floor(params.count));\r\n const containerWidth = Math.max(0, params.containerWidth);\r\n const overflowItemWidth = Math.max(0, params.overflowItemWidth);\r\n const gap = Math.max(0, params.gap);\r\n const maxOverflowIndicatorCount = params.strategy === 'aroundIndex' ? 2 : 1;\r\n\r\n const overflowCheckOrder = getItemOverflowCheckOrder({\r\n count,\r\n strategy: params.strategy,\r\n freezeCount: params.freezeCount,\r\n strategyIndex: params.strategyIndex,\r\n });\r\n\r\n const getVisibleItemCount = (reservedWidth: number): number => {\r\n let visibleItemCount = 0;\r\n let totalWidth = Math.max(0, reservedWidth);\r\n\r\n for (let i = 0; i < overflowCheckOrder.length; i++) {\r\n const index = overflowCheckOrder[i]?.index;\r\n if (index === undefined) {\r\n throw new NgnError(\r\n 'calculateItemViewLayout',\r\n 'Invalid overflow check order: index is undefined'\r\n );\r\n }\r\n const itemWidth = params.itemWidths[index] ?? 0;\r\n const itemGap = i > 0 ? gap : 0;\r\n const newWidth = totalWidth + itemWidth + itemGap;\r\n\r\n if (newWidth <= containerWidth) {\r\n totalWidth = newWidth;\r\n visibleItemCount++;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return visibleItemCount;\r\n };\r\n\r\n let overflowIndicatorCount = 0;\r\n let previousOverflowIndicatorCount = -1;\r\n let remainingItemOrders: OverflowOrder = overflowCheckOrder;\r\n let renderedItemOrders: OverflowOrderEntry[] = [];\r\n let overflowIndicatorLocations = new Set<ItemOverflowLocation>();\r\n\r\n // Fixed-point iteration:\r\n // 1) We blindly assume that we don't need any overflow indicators for the first pass.\r\n // 2) We see how many items fit with that assumption.\r\n // 3) The remaining items define which overflow locations exist (start/end/center).\r\n // 4) That determines the *actual* number of indicators.\r\n // Repeat until the indicator count stabilizes.\r\n while (overflowIndicatorCount !== previousOverflowIndicatorCount) {\r\n previousOverflowIndicatorCount = overflowIndicatorCount;\r\n\r\n const initialVisibleItemCount = getVisibleItemCount(\r\n overflowIndicatorCount * (overflowItemWidth + gap)\r\n );\r\n\r\n remainingItemOrders = overflowCheckOrder\r\n .slice(initialVisibleItemCount)\r\n .toSorted((a, b) => a.index - b.index);\r\n\r\n overflowIndicatorLocations = new Set(remainingItemOrders.map(i => i.location));\r\n overflowIndicatorCount = overflowIndicatorLocations.size;\r\n const finalVisibleItemCount = getVisibleItemCount(\r\n overflowIndicatorCount * (overflowItemWidth + gap)\r\n );\r\n renderedItemOrders = overflowCheckOrder.slice(0, finalVisibleItemCount);\r\n }\r\n\r\n (['start', 'end'] as const).forEach(location => {\r\n // Optimization: if all overflowed items for a side would fit inside the overflow indicator width,\r\n // we can render them inline and drop that overflow indicator entirely.\r\n // This is only applicable for start/end & the aroundIndex strategy. Center has no \"adjacent\" insertion point.\r\n if (overflowIndicatorLocations.has(location)) {\r\n const itemsWithIndices = remainingItemOrders\r\n .map((x, i) => [i + renderedItemOrders.length, x] as const)\r\n .filter(x => x[1].location === location);\r\n const itemSizes = itemsWithIndices.map(i => params.itemWidths[i[1].index] ?? 0);\r\n const itemsTotalSize = itemSizes.reduce((a, b) => a + b, 0);\r\n if (itemsTotalSize <= overflowItemWidth) {\r\n overflowIndicatorLocations.delete(location);\r\n renderedItemOrders = [...renderedItemOrders, ...itemsWithIndices.map(i => i[1])];\r\n overflowIndicatorCount--;\r\n }\r\n }\r\n });\r\n\r\n // Keep result consistent after the optimization pass.\r\n const renderedIndices = new Set(renderedItemOrders.map(x => x.index));\r\n remainingItemOrders = overflowCheckOrder\r\n .filter(x => !renderedIndices.has(x.index))\r\n .toSorted((a, b) => a.index - b.index);\r\n\r\n // Calculate the insertion indices for the overflow indicators.\r\n const overflowIndicatorIndices = (() => {\r\n if (overflowIndicatorCount === 0) {\r\n return [null];\r\n } else if (maxOverflowIndicatorCount === 1 && overflowIndicatorCount === 1) {\r\n return [remainingItemOrders[0]?.index ?? null];\r\n } else if (maxOverflowIndicatorCount === 2) {\r\n const res: number[] = [];\r\n const firstEndIndex = remainingItemOrders.find(x => x.location === 'end')?.index;\r\n const lastEndIndex = remainingItemOrders.findLast(x => x.location === 'end')?.index;\r\n const firstStartIndex = remainingItemOrders.find(x => x.location === 'start')?.index;\r\n const lastStartIndex = remainingItemOrders.findLast(x => x.location === 'start')?.index;\r\n if (overflowIndicatorLocations.has('start')) {\r\n const startIndex = firstStartIndex ?? firstEndIndex ?? 0;\r\n res.push(startIndex + Math.min(Math.max(0, Math.floor(params.freezeCount)), count));\r\n }\r\n if (overflowIndicatorLocations.has('end')) {\r\n const endIndex = lastEndIndex ? lastEndIndex + 1 : (lastStartIndex ?? 0);\r\n res.push(endIndex);\r\n }\r\n return res;\r\n }\r\n return [];\r\n })();\r\n\r\n return {\r\n checkOrder: overflowCheckOrder,\r\n renderedItemOrders,\r\n remainingItemOrders,\r\n overflowIndicatorCount,\r\n overflowIndicatorIndices,\r\n };\r\n}\r\n","import { computed, contentChild, Directive, input, TemplateRef, viewChild } from '@angular/core';\r\nimport { templateTypesFn } from '@ngneers/controls/api/ng';\r\nimport { NgnBase } from '@ngneers/controls/base';\r\n\r\nimport type { IconType } from '@ngneers/controls-custom-types';\r\n\r\n@Directive()\r\nexport abstract class ItemViewTemplates<T> extends NgnBase<'itemView'> {\r\n /**\r\n * The template to be used for rendering each item in the item view.\r\n * Can also be set using the `item` content child.\r\n */\r\n public readonly templateItem = input<TemplateRef<\r\n typeof this.templateTypes.$implicit.item\r\n > | null>(null);\r\n private readonly _userItemTemplate =\r\n contentChild<TemplateRef<typeof this.templateTypes.item>>('item');\r\n protected readonly itemTemplate = computed(() => this._userItemTemplate() ?? this.templateItem());\r\n\r\n // Separator template\r\n private readonly _defaultSeparatorTemplate = viewChild.required<\r\n TemplateRef<typeof this.templateTypes.separator>\r\n >('defaultSeparatorTemplate');\r\n private readonly _userSeparatorTemplate =\r\n contentChild<TemplateRef<typeof this.templateTypes.separator>>('separator');\r\n /**\r\n * Set a custom template for the separators of the breadcrumb.\r\n * Can also be set using an `<ng-template>` element with `#separator` template reference variable.\r\n */\r\n public readonly templateSeparator = input<TemplateRef<\r\n typeof this.templateTypes.separator\r\n > | null>(null);\r\n protected readonly separatorTemplate = computed(\r\n () =>\r\n this._userSeparatorTemplate() ?? this.templateSeparator() ?? this._defaultSeparatorTemplate()\r\n );\r\n\r\n // Overflow item template\r\n private readonly _defaultOverflowItemTemplate = viewChild.required<\r\n TemplateRef<typeof this.templateTypes.overflow>\r\n >('defaultOverflowItemTemplate');\r\n private readonly _userOverflowItemTemplate =\r\n contentChild<TemplateRef<typeof this.templateTypes.overflow>>('overflow');\r\n /**\r\n * Set a custom template for the overflow item.\r\n * Can also be set using an `<ng-template>` element with `#overflow` template reference variable.\r\n */\r\n public readonly templateOverflow = input<TemplateRef<typeof this.templateTypes.overflow> | null>(\r\n null\r\n );\r\n protected readonly overflowTemplate = computed(\r\n () =>\r\n this._userOverflowItemTemplate() ??\r\n this.templateOverflow() ??\r\n this._defaultOverflowItemTemplate()\r\n );\r\n\r\n /**\r\n * Template types for the item-view.\r\n * Can be used with the {@link NgnTemplate} directive for type safe ng-templates.\r\n */\r\n public readonly templateTypes = templateTypesFn<{\r\n item: {\r\n $implicit: T;\r\n index: number;\r\n last: boolean;\r\n first: boolean;\r\n };\r\n separator: {\r\n $implicit: {\r\n icon?: IconType;\r\n character?: string;\r\n };\r\n };\r\n overflow: {\r\n $implicit: {\r\n totalCount: number;\r\n overflowCount: number;\r\n overflowItems: T[];\r\n };\r\n };\r\n }>();\r\n}\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n type AfterViewInit,\r\n Component,\r\n computed,\r\n ElementRef,\r\n inject,\r\n input,\r\n signal,\r\n viewChild,\r\n viewChildren,\r\n ChangeDetectionStrategy,\r\n} from '@angular/core';\r\nimport {\r\n elementSizeSignal,\r\n elementsSizesSignal,\r\n NgnTemplate,\r\n Platform,\r\n} from '@ngneers/controls/api/ng';\r\nimport { NgnPt, provideSelf } from '@ngneers/controls/base';\r\nimport { NgnIcon } from '@ngneers/controls/icon';\r\nimport { areArraysDeepEqual, throwExp } from '@ngneers/controls/utils';\r\nimport { itemViewControlTemplate } from '@ngneers/controls-themes/templates/item-view';\r\n\r\nimport {\r\n calculateItemViewLayout,\r\n getItemOverflowCheckOrder,\r\n type ItemOverflowLocation,\r\n type OverflowOrder,\r\n} from './item-view-layout';\r\nimport { ItemViewTemplates } from './item-view-templates';\r\n\r\nimport type { OverflowStrategy } from './types';\r\nimport type { IconType } from '@ngneers/controls-custom-types';\r\n\r\ntype RenderItem<T> =\r\n | {\r\n id: string | number;\r\n kind: 'visibleItem';\r\n item: T;\r\n }\r\n | {\r\n id: string | number;\r\n kind: 'overflowItem';\r\n location: ItemOverflowLocation;\r\n item: T;\r\n }\r\n | {\r\n id: string;\r\n kind: 'overflowIndicator';\r\n visible: boolean;\r\n items: T[];\r\n hasSeparator: boolean;\r\n };\r\n\r\n/**\r\n * @category control\r\n */\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n selector: 'ngn-item-view',\r\n templateUrl: './item-view.html',\r\n imports: [NgnPt, NgTemplateOutlet, NgnTemplate, NgnIcon],\r\n providers: [provideSelf(NgnItemView)],\r\n host: {\r\n '[attr.role]': '\"list\"',\r\n '[style.maxWidth.px]': 'maxWidth()',\r\n },\r\n})\r\nexport class NgnItemView<T extends object, IdField extends keyof T>\r\n extends ItemViewTemplates<T>\r\n implements AfterViewInit\r\n{\r\n protected readonly theme = this.injectThemeTemplate(itemViewControlTemplate, 'root');\r\n /**\r\n * The key of the id property in the item object. This is used to track items in the template.\r\n */\r\n public readonly idField = input.required<IdField>();\r\n /**\r\n * The items to be displayed in the item view.\r\n * This is a required input and should be an array of items of type {@link T}.\r\n */\r\n public readonly items = input.required<readonly T[]>();\r\n /**\r\n * A separator string (character) to be displayed between items. Set `true` for `,` or provide a custom string.\r\n */\r\n public readonly separator = input<true | string>();\r\n /**\r\n * A separator icon to be displayed between items.\r\n */\r\n public readonly iconItemSeparator = input<IconType>();\r\n /**\r\n * Strategy to use when there are more items than can be displayed in the available space.\r\n * The value determines where the items should start to overflow.\r\n * @default 'end'\r\n */\r\n public readonly overflowStrategy = input<OverflowStrategy>('end');\r\n /**\r\n * The amount of items to keep visible after or before overflowing, depending on the {@link overflowStrategy}.\r\n * @default 0\r\n */\r\n public readonly overflowStrategyFreezeCount = input<number>(0);\r\n /**\r\n * Index of the item to be used as the overflow indicator when using the 'aroundIndex' overflow strategy.\r\n * This input is only relevant when the {@link overflowStrategy} is set to 'aroundIndex'.\r\n * @default 0\r\n */\r\n public readonly overflowStrategyIndex = input<number>(0);\r\n /**\r\n * Set this to `true` for greatly improving performance when all items have the same width.\r\n * Especially true for large lists of items.\r\n *\r\n * ⚠️ This reduces the accessibility of the control as screen\r\n * readers will not be able to determine the number of hidden items and keyboard users cannot directly\r\n * navigate to them. Use this only for potentially very large lists (with items of identical width) where users will not\r\n * need to access overflowed items directly.\r\n * @default false\r\n */\r\n public readonly sameWidthItems = input<boolean>(false);\r\n\r\n private readonly _themeGap = signal(0);\r\n private readonly _isBrowser = inject(Platform).isBrowser;\r\n\r\n protected readonly separatorChar = computed(() => {\r\n const sep = this.separator();\r\n return typeof sep === 'boolean' ? (sep ? ', ' : '') : sep;\r\n });\r\n\r\n private readonly _enableSizeMeasuring = computed(() => !this.sameWidthItems());\r\n private readonly _renderedItemRefs = viewChildren<ElementRef<HTMLElement>>('itemRef');\r\n private readonly _firstItemRef = viewChild<ElementRef<HTMLElement>>('itemRef');\r\n private readonly _firstItemWidth = elementSizeSignal(this._firstItemRef);\r\n private readonly _renderedItemSizes = elementsSizesSignal(\r\n this._renderedItemRefs,\r\n this._enableSizeMeasuring\r\n );\r\n private readonly _renderedItemWidths = computed(\r\n () =>\r\n this.sameWidthItems()\r\n ? this.items().map(() => this._firstItemWidth().width || Number.MAX_SAFE_INTEGER)\r\n : this._renderedItemSizes().map(size => size.width),\r\n { equal: areArraysDeepEqual }\r\n );\r\n private readonly _containerSize = elementSizeSignal(this.element.nativeElement);\r\n private readonly _overflowItemRef = viewChild<ElementRef<HTMLElement>>('overflowItem');\r\n private readonly _overflowItemSize = elementSizeSignal(this._overflowItemRef);\r\n\r\n protected readonly itemOverflowCheckOrder = computed<OverflowOrder>(() => {\r\n const count = this.items().length;\r\n const freezeCount = Math.min(this.overflowStrategyFreezeCount(), count);\r\n return getItemOverflowCheckOrder({\r\n count,\r\n strategy: this.overflowStrategy(),\r\n freezeCount,\r\n strategyIndex: this.overflowStrategyIndex(),\r\n });\r\n });\r\n\r\n protected readonly renderedItems = computed<RenderItem<T>[]>(() => {\r\n const containerWidth = this._containerSize().width;\r\n const renderedItemWidths = this._renderedItemWidths();\r\n const overflowCheckOrder = this.itemOverflowCheckOrder();\r\n\r\n const count = this.items().length;\r\n const freezeCount = Math.min(this.overflowStrategyFreezeCount(), count);\r\n const layout = calculateItemViewLayout({\r\n count,\r\n strategy: this.overflowStrategy(),\r\n freezeCount,\r\n strategyIndex: this.overflowStrategyIndex(),\r\n containerWidth,\r\n itemWidths: renderedItemWidths,\r\n overflowItemWidth: this._overflowItemSize().width,\r\n gap: this._themeGap(),\r\n });\r\n\r\n const renderedItemOrders = layout.renderedItemOrders;\r\n // Precompute quick lookups for the hot paths below.\r\n // - `renderedIndexSet` allows O(1) visibility checks.\r\n // - `locationByIndex` avoids repeatedly scanning the overflow order to find an item's location.\r\n const renderedIndexSet = new Set<number>(renderedItemOrders.map(x => x.index));\r\n const locationByIndex: Array<ItemOverflowLocation | undefined> = new Array(count);\r\n for (const entry of overflowCheckOrder) {\r\n locationByIndex[entry.index] = entry.location;\r\n }\r\n\r\n // First pass: build the full list with items marked as visible vs overflowed.\r\n // We'll insert overflow indicators afterwards at the computed insertion indices.\r\n let res: RenderItem<T>[] = this.items().map((item, index) => {\r\n if (renderedIndexSet.has(index)) {\r\n return <RenderItem<T>>{\r\n id: item[this.idField()] as string | number,\r\n kind: 'visibleItem',\r\n item,\r\n };\r\n } else {\r\n return <RenderItem<T>>{\r\n id: item[this.idField()] as string | number,\r\n kind: 'overflowItem',\r\n location: locationByIndex[index] ?? 'end',\r\n item,\r\n };\r\n }\r\n });\r\n\r\n const getFallbackOverflowIndicatorIndex = () => {\r\n // When the layout says \"no indicator\" for the only slot (null), we still need a stable\r\n // insertion index so the DOM structure stays consistent for measurement.\r\n if (overflowCheckOrder.length === 0) {\r\n return 0;\r\n }\r\n const lastItem = overflowCheckOrder[overflowCheckOrder.length - 1];\r\n return (lastItem ?? throwExp('NgnItemView', 'Unexpected empty entry in overflowCheckOrder'))\r\n .index;\r\n };\r\n\r\n // Insert overflow indicators at the calculated indices\r\n // Note: inserting into `res` shifts subsequent indices; track that shift explicitly with `insertOffset`.\r\n let insertOffset = 0;\r\n\r\n // Collect overflowed items, both as a single list and grouped by location.\r\n const overflowedItemsAll: T[] = [];\r\n const overflowedItemsByLocation: Record<ItemOverflowLocation, T[]> = {\r\n start: [],\r\n end: [],\r\n center: [],\r\n };\r\n const allItems = this.items();\r\n for (let i = 0; i < count; i++) {\r\n if (renderedIndexSet.has(i)) {\r\n continue;\r\n }\r\n const item = allItems[i];\r\n if (item === undefined) {\r\n continue;\r\n }\r\n overflowedItemsAll.push(item);\r\n const location = locationByIndex[i] ?? 'end';\r\n overflowedItemsByLocation[location].push(item);\r\n }\r\n\r\n layout.overflowIndicatorIndices.forEach((indicatorIndex, iterationIndex) => {\r\n const insertIndex = indicatorIndex ?? getFallbackOverflowIndicatorIndex() + insertOffset;\r\n\r\n // If two overflow indicators are rendered (aroundIndex), we must split overflow items by location\r\n // so each indicator shows its own count/list.\r\n const overflowIndicatorLocation =\r\n layout.overflowIndicatorCount === 1 ? null : iterationIndex === 0 ? 'start' : 'end';\r\n const items = overflowIndicatorLocation\r\n ? overflowedItemsByLocation[overflowIndicatorLocation]\r\n : overflowedItemsAll;\r\n\r\n res.splice(insertIndex, 0, <RenderItem<T>>{\r\n id: `overflow-indicator-${indicatorIndex}`,\r\n kind: 'overflowIndicator',\r\n visible: indicatorIndex !== null,\r\n items,\r\n hasSeparator: renderedItemOrders.some(x => x.index + insertOffset > insertIndex),\r\n });\r\n insertOffset++;\r\n });\r\n\r\n // In fixed width mode, remove all hidden items except for the first one (used for measurement)\r\n if (this.sameWidthItems()) {\r\n res = res.filter((item, index) => item.kind !== 'overflowItem' || index === 0);\r\n }\r\n\r\n return res;\r\n });\r\n\r\n protected readonly maxWidth = computed<number>(() => {\r\n return Math.ceil(\r\n this._renderedItemWidths().reduce((sum, w) => sum + w, 0) +\r\n this._themeGap() * Math.max(0, this.items().length - 1)\r\n );\r\n });\r\n\r\n public ngAfterViewInit(): void {\r\n if (!this._isBrowser) {\r\n return;\r\n }\r\n requestAnimationFrame(() => {\r\n const gapString = getComputedStyle(this.element.nativeElement).getPropertyValue('column-gap');\r\n const gap = parseFloat(gapString) || 0;\r\n this._themeGap.set(gap);\r\n });\r\n }\r\n}\r\n","@for (item of renderedItems(); track item.id; let i = $index) {\r\n @if (item.kind === 'visibleItem' || item.kind === 'overflowItem') {\r\n <span\r\n role=\"listitem\"\r\n #itemRef\r\n [ptInt]=\"this\"\r\n [ptClass]=\"{\r\n item: true,\r\n 'item-overflowing': item.kind === 'overflowItem',\r\n }\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n itemTemplate();\r\n context: { $implicit: item.item, index: i, last: $last, first: $first }\r\n \"\r\n />\r\n @if (!$last) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n separatorTemplate();\r\n context: { $implicit: { character: separatorChar(), icon: iconItemSeparator() } }\r\n \"\r\n />\r\n }\r\n </span>\r\n } @else if (item.kind === 'overflowIndicator') {\r\n <div\r\n [ptInt]=\"this\"\r\n [ptClass]=\"{ 'more-items': true, 'more-items-hidden': !item.visible }\"\r\n aria-hidden=\"true\"\r\n #overflowItem\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n overflowTemplate();\r\n context: {\r\n $implicit: {\r\n totalCount: items().length,\r\n overflowCount: item.items.length,\r\n overflowItems: item.items,\r\n },\r\n }\r\n \"\r\n />\r\n @if (!$last) {\r\n <span\r\n [style.visibility]=\"item.hasSeparator ? 'visible' : 'hidden'\"\r\n style=\"display: contents\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n separatorTemplate();\r\n context: { $implicit: { character: separatorChar(), icon: iconItemSeparator() } }\r\n \"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n}\r\n\r\n<ng-template #defaultSeparatorTemplate [ngnTemplate]=\"templateTypes.separator\" let-separator>\r\n @if (separator.character) {\r\n <span>{{ separator.character }}</span>\r\n } @else if (separator.icon) {\r\n <ngn-icon [icon]=\"separator.icon\" />\r\n }\r\n</ng-template>\r\n\r\n<ng-template #defaultOverflowItemTemplate [ngnTemplate]=\"templateTypes.overflow\" let-overflow>\r\n <span [ptInt]=\"this\" [ptClass]=\"'more-items-default'\">+{{ overflow.overflowCount }}</span>\r\n</ng-template>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAgCA;;;;AAIG;AACG,SAAU,yBAAyB,CAAC,MAKzC,EAAA;AACC,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC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;w7BA8D0E,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAChB,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAcN,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhJvF;;AAEG;;;;"}
1
+ {"version":3,"file":"ngneers-controls-item-view.mjs","sources":["../../src/item-view/item-view-layout.ts","../../src/item-view/item-view-templates.ts","../../src/item-view/item-view.ts","../../src/item-view/item-view.html","../../src/item-view/ngneers-controls-item-view.ts"],"sourcesContent":["import { NgnError } from '@ngneers/controls/utils';\r\n\r\nimport type { OverflowStrategy } from './types';\r\n\r\nexport type ItemOverflowLocation = 'start' | 'end' | 'center';\r\n\r\nexport type OverflowOrderEntry = {\r\n index: number;\r\n location: ItemOverflowLocation;\r\n};\r\n\r\nexport type OverflowOrder = readonly OverflowOrderEntry[];\r\n\r\nexport type ItemViewLayoutInput = {\r\n count: number;\r\n strategy: OverflowStrategy;\r\n freezeCount: number;\r\n strategyIndex: number;\r\n containerWidth: number;\r\n itemWidths: readonly number[];\r\n overflowItemWidth: number;\r\n gap: number;\r\n};\r\n\r\nexport type ItemViewLayoutResult = {\r\n checkOrder: OverflowOrder;\r\n renderedItemOrders: OverflowOrder;\r\n remainingItemOrders: OverflowOrder;\r\n overflowIndicatorCount: number;\r\n overflowIndicatorIndices: readonly (number | null)[];\r\n};\r\n\r\n/**\r\n * Returns the *priority order* in which items are considered for keeping visible.\r\n * The algorithm is greedy: it walks this list until items no longer fit.\r\n * Each entry also carries a `location` which describes which overflow indicator would own the item.\r\n */\r\nexport function getItemOverflowCheckOrder(params: {\r\n count: number;\r\n strategy: OverflowStrategy;\r\n freezeCount: number;\r\n strategyIndex: number;\r\n}): OverflowOrder {\r\n const count = Math.max(0, Math.floor(params.count));\r\n if (count === 0) {\r\n return [];\r\n }\r\n\r\n const freezeCount = Math.min(Math.max(0, Math.floor(params.freezeCount)), count);\r\n\r\n switch (params.strategy) {\r\n case 'end': {\r\n const arr = [...Array.from({ length: count - freezeCount }, (_, i) => i)];\r\n arr.splice(1, 0, ...Array.from({ length: freezeCount }, (_, i) => count - freezeCount + i));\r\n return arr.map(index => ({ index, location: 'end' }));\r\n }\r\n case 'start': {\r\n const arr = [...Array.from({ length: count - freezeCount }, (_, i) => count - i - 1)];\r\n arr.splice(1, 0, ...Array.from({ length: freezeCount }, (_, i) => i));\r\n return arr.map(index => ({ index, location: 'start' }));\r\n }\r\n case 'center': {\r\n // \"Center\" overflows symmetrically: keep alternating left/right items first.\r\n const order: OverflowOrderEntry[] = [];\r\n let leftIndex = 0;\r\n let rightIndex = count - 1;\r\n\r\n for (let i = 0; i < count; i++) {\r\n if (i % 2 === 0) {\r\n order.push({ index: leftIndex++, location: 'center' } as const);\r\n } else {\r\n order.push({ index: rightIndex--, location: 'center' } as const);\r\n }\r\n }\r\n return order;\r\n }\r\n case 'aroundIndex': {\r\n // \"AroundIndex\" keeps the chosen item visible, then expands outward on both sides.\r\n // FreezeCount applies to both ends; we must ensure the chosen index stays in-bounds.\r\n const minIndex = Math.min(freezeCount, count - 1);\r\n const maxIndex = Math.max(minIndex, count - freezeCount - 1);\r\n const index = Math.min(Math.max(minIndex, Math.floor(params.strategyIndex)), maxIndex);\r\n\r\n const targetMiddleCount = Math.max(0, count - freezeCount * 2);\r\n const order: { index: number; location: 'start' | 'end' }[] =\r\n targetMiddleCount > 0 ? [{ index, location: 'start' }] : [];\r\n\r\n let offset = 1;\r\n while (order.length < targetMiddleCount) {\r\n if (index - offset >= freezeCount) {\r\n order.push({ index: index - offset, location: 'start' });\r\n }\r\n if (order.length >= targetMiddleCount) {\r\n break;\r\n }\r\n if (index + offset < count - freezeCount) {\r\n order.push({\r\n index: index + offset,\r\n location: 'end',\r\n });\r\n }\r\n offset++;\r\n }\r\n\r\n // Insert frozen items near the front of the list so they are kept visible.\r\n // Keep the insertion ordering consistent with the component implementation.\r\n order.splice(\r\n 1,\r\n 0,\r\n ...Array.from({ length: freezeCount }, (_, i) => ({ index: i, location: 'start' }) as const)\r\n );\r\n order.splice(\r\n 1,\r\n 0,\r\n ...Array.from(\r\n { length: freezeCount },\r\n (_, i) =>\r\n ({\r\n index: count - freezeCount + i,\r\n location: 'end',\r\n }) as const\r\n )\r\n );\r\n\r\n return order;\r\n }\r\n }\r\n}\r\n\r\nexport function calculateItemViewLayout(params: ItemViewLayoutInput): ItemViewLayoutResult {\r\n const count = Math.max(0, Math.floor(params.count));\r\n const containerWidth = Math.max(0, params.containerWidth);\r\n const overflowItemWidth = Math.max(0, params.overflowItemWidth);\r\n const gap = Math.max(0, params.gap);\r\n const maxOverflowIndicatorCount = params.strategy === 'aroundIndex' ? 2 : 1;\r\n\r\n const overflowCheckOrder = getItemOverflowCheckOrder({\r\n count,\r\n strategy: params.strategy,\r\n freezeCount: params.freezeCount,\r\n strategyIndex: params.strategyIndex,\r\n });\r\n\r\n const getVisibleItemCount = (reservedWidth: number): number => {\r\n let visibleItemCount = 0;\r\n let totalWidth = Math.max(0, reservedWidth);\r\n\r\n for (let i = 0; i < overflowCheckOrder.length; i++) {\r\n const index = overflowCheckOrder[i]?.index;\r\n if (index === undefined) {\r\n throw new NgnError(\r\n 'calculateItemViewLayout',\r\n 'Invalid overflow check order: index is undefined'\r\n );\r\n }\r\n const itemWidth = params.itemWidths[index] ?? 0;\r\n const itemGap = i > 0 ? gap : 0;\r\n const newWidth = totalWidth + itemWidth + itemGap;\r\n\r\n if (newWidth <= containerWidth) {\r\n totalWidth = newWidth;\r\n visibleItemCount++;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return visibleItemCount;\r\n };\r\n\r\n let overflowIndicatorCount = 0;\r\n let previousOverflowIndicatorCount = -1;\r\n let remainingItemOrders: OverflowOrder = overflowCheckOrder;\r\n let renderedItemOrders: OverflowOrderEntry[] = [];\r\n let overflowIndicatorLocations = new Set<ItemOverflowLocation>();\r\n\r\n // Fixed-point iteration:\r\n // 1) We blindly assume that we don't need any overflow indicators for the first pass.\r\n // 2) We see how many items fit with that assumption.\r\n // 3) The remaining items define which overflow locations exist (start/end/center).\r\n // 4) That determines the *actual* number of indicators.\r\n // Repeat until the indicator count stabilizes.\r\n while (overflowIndicatorCount !== previousOverflowIndicatorCount) {\r\n previousOverflowIndicatorCount = overflowIndicatorCount;\r\n\r\n const initialVisibleItemCount = getVisibleItemCount(\r\n overflowIndicatorCount * (overflowItemWidth + gap)\r\n );\r\n\r\n remainingItemOrders = overflowCheckOrder\r\n .slice(initialVisibleItemCount)\r\n .toSorted((a, b) => a.index - b.index);\r\n\r\n overflowIndicatorLocations = new Set(remainingItemOrders.map(i => i.location));\r\n overflowIndicatorCount = overflowIndicatorLocations.size;\r\n const finalVisibleItemCount = getVisibleItemCount(\r\n overflowIndicatorCount * (overflowItemWidth + gap)\r\n );\r\n renderedItemOrders = overflowCheckOrder.slice(0, finalVisibleItemCount);\r\n }\r\n\r\n (['start', 'end'] as const).forEach(location => {\r\n // Optimization: if all overflowed items for a side would fit inside the overflow indicator width,\r\n // we can render them inline and drop that overflow indicator entirely.\r\n // This is only applicable for start/end & the aroundIndex strategy. Center has no \"adjacent\" insertion point.\r\n if (overflowIndicatorLocations.has(location)) {\r\n const itemsWithIndices = remainingItemOrders\r\n .map((x, i) => [i + renderedItemOrders.length, x] as const)\r\n .filter(x => x[1].location === location);\r\n const itemSizes = itemsWithIndices.map(i => params.itemWidths[i[1].index] ?? 0);\r\n const itemsTotalSize = itemSizes.reduce((a, b) => a + b, 0);\r\n if (itemsTotalSize <= overflowItemWidth) {\r\n overflowIndicatorLocations.delete(location);\r\n renderedItemOrders = [...renderedItemOrders, ...itemsWithIndices.map(i => i[1])];\r\n overflowIndicatorCount--;\r\n }\r\n }\r\n });\r\n\r\n // Keep result consistent after the optimization pass.\r\n const renderedIndices = new Set(renderedItemOrders.map(x => x.index));\r\n remainingItemOrders = overflowCheckOrder\r\n .filter(x => !renderedIndices.has(x.index))\r\n .toSorted((a, b) => a.index - b.index);\r\n\r\n // Calculate the insertion indices for the overflow indicators.\r\n const overflowIndicatorIndices = (() => {\r\n if (overflowIndicatorCount === 0) {\r\n return [null];\r\n } else if (maxOverflowIndicatorCount === 1 && overflowIndicatorCount === 1) {\r\n return [remainingItemOrders[0]?.index ?? null];\r\n } else if (maxOverflowIndicatorCount === 2) {\r\n const res: number[] = [];\r\n const firstEndIndex = remainingItemOrders.find(x => x.location === 'end')?.index;\r\n const lastEndIndex = remainingItemOrders.findLast(x => x.location === 'end')?.index;\r\n const firstStartIndex = remainingItemOrders.find(x => x.location === 'start')?.index;\r\n const lastStartIndex = remainingItemOrders.findLast(x => x.location === 'start')?.index;\r\n if (overflowIndicatorLocations.has('start')) {\r\n const startIndex = firstStartIndex ?? firstEndIndex ?? 0;\r\n res.push(startIndex + Math.min(Math.max(0, Math.floor(params.freezeCount)), count));\r\n }\r\n if (overflowIndicatorLocations.has('end')) {\r\n const endIndex = lastEndIndex ? lastEndIndex + 1 : (lastStartIndex ?? 0);\r\n res.push(endIndex);\r\n }\r\n return res;\r\n }\r\n return [];\r\n })();\r\n\r\n return {\r\n checkOrder: overflowCheckOrder,\r\n renderedItemOrders,\r\n remainingItemOrders,\r\n overflowIndicatorCount,\r\n overflowIndicatorIndices,\r\n };\r\n}\r\n","import { computed, contentChild, Directive, input, TemplateRef, viewChild } from '@angular/core';\r\nimport { templateTypesFn } from '@ngneers/controls/api/ng';\r\nimport { NgnBase } from '@ngneers/controls/base';\r\n\r\nimport type { IconType } from '@ngneers/controls-custom-types';\r\n\r\n@Directive()\r\nexport abstract class ItemViewTemplates<T> extends NgnBase<'itemView'> {\r\n /**\r\n * The template to be used for rendering each item in the item view.\r\n * Can also be set using the `item` content child.\r\n */\r\n public readonly templateItem = input<TemplateRef<\r\n typeof this.templateTypes.$implicit.item\r\n > | null>(null);\r\n private readonly _userItemTemplate =\r\n contentChild<TemplateRef<typeof this.templateTypes.item>>('item');\r\n protected readonly itemTemplate = computed(() => this._userItemTemplate() ?? this.templateItem());\r\n\r\n // Separator template\r\n private readonly _defaultSeparatorTemplate = viewChild.required<\r\n TemplateRef<typeof this.templateTypes.separator>\r\n >('defaultSeparatorTemplate');\r\n private readonly _userSeparatorTemplate =\r\n contentChild<TemplateRef<typeof this.templateTypes.separator>>('separator');\r\n /**\r\n * Set a custom template for the separators of the breadcrumb.\r\n * Can also be set using an `<ng-template>` element with `#separator` template reference variable.\r\n */\r\n public readonly templateSeparator = input<TemplateRef<\r\n typeof this.templateTypes.separator\r\n > | null>(null);\r\n protected readonly separatorTemplate = computed(\r\n () =>\r\n this._userSeparatorTemplate() ?? this.templateSeparator() ?? this._defaultSeparatorTemplate()\r\n );\r\n\r\n // Overflow item template\r\n private readonly _defaultOverflowItemTemplate = viewChild.required<\r\n TemplateRef<typeof this.templateTypes.overflow>\r\n >('defaultOverflowItemTemplate');\r\n private readonly _userOverflowItemTemplate =\r\n contentChild<TemplateRef<typeof this.templateTypes.overflow>>('overflow');\r\n /**\r\n * Set a custom template for the overflow item.\r\n * Can also be set using an `<ng-template>` element with `#overflow` template reference variable.\r\n */\r\n public readonly templateOverflow = input<TemplateRef<typeof this.templateTypes.overflow> | null>(\r\n null\r\n );\r\n protected readonly overflowTemplate = computed(\r\n () =>\r\n this._userOverflowItemTemplate() ??\r\n this.templateOverflow() ??\r\n this._defaultOverflowItemTemplate()\r\n );\r\n\r\n /**\r\n * Template types for the item-view.\r\n * Can be used with the {@link NgnTemplate} directive for type safe ng-templates.\r\n */\r\n public readonly templateTypes = templateTypesFn<{\r\n item: {\r\n $implicit: T;\r\n index: number;\r\n last: boolean;\r\n first: boolean;\r\n };\r\n separator: {\r\n $implicit: {\r\n icon?: IconType;\r\n character?: string;\r\n };\r\n };\r\n overflow: {\r\n $implicit: {\r\n totalCount: number;\r\n overflowCount: number;\r\n overflowItems: T[];\r\n };\r\n };\r\n }>();\r\n}\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n type AfterViewInit,\r\n Component,\r\n computed,\r\n ElementRef,\r\n inject,\r\n input,\r\n signal,\r\n viewChild,\r\n viewChildren,\r\n ChangeDetectionStrategy,\r\n} from '@angular/core';\r\nimport {\r\n elementSizeSignal,\r\n elementsSizesSignal,\r\n NgnTemplate,\r\n Platform,\r\n} from '@ngneers/controls/api/ng';\r\nimport { NgnPt, provideSelf } from '@ngneers/controls/base';\r\nimport { NgnIcon } from '@ngneers/controls/icon';\r\nimport { areArraysDeepEqual, throwExp } from '@ngneers/controls/utils';\r\nimport { itemViewControlTemplate } from '@ngneers/controls-themes/templates/item-view';\r\n\r\nimport {\r\n calculateItemViewLayout,\r\n getItemOverflowCheckOrder,\r\n type ItemOverflowLocation,\r\n type OverflowOrder,\r\n} from './item-view-layout';\r\nimport { ItemViewTemplates } from './item-view-templates';\r\n\r\nimport type { OverflowStrategy } from './types';\r\nimport type { IconType } from '@ngneers/controls-custom-types';\r\n\r\ntype RenderItem<T> =\r\n | {\r\n id: string | number;\r\n kind: 'visibleItem';\r\n item: T;\r\n }\r\n | {\r\n id: string | number;\r\n kind: 'overflowItem';\r\n location: ItemOverflowLocation;\r\n item: T;\r\n }\r\n | {\r\n id: string;\r\n kind: 'overflowIndicator';\r\n visible: boolean;\r\n items: T[];\r\n hasSeparator: boolean;\r\n };\r\n\r\n/**\r\n * @category control\r\n */\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n selector: 'ngn-item-view',\r\n templateUrl: './item-view.html',\r\n imports: [NgnPt, NgTemplateOutlet, NgnTemplate, NgnIcon],\r\n providers: [provideSelf(NgnItemView)],\r\n host: {\r\n '[attr.role]': '\"list\"',\r\n '[style.maxWidth.px]': 'maxWidth()',\r\n },\r\n})\r\nexport class NgnItemView<T extends object, IdField extends keyof T>\r\n extends ItemViewTemplates<T>\r\n implements AfterViewInit\r\n{\r\n protected readonly theme = this.injectThemeTemplate(itemViewControlTemplate, 'root');\r\n /**\r\n * The key of the id property in the item object. This is used to track items in the template.\r\n */\r\n public readonly idField = input.required<IdField>();\r\n /**\r\n * The items to be displayed in the item view.\r\n * This is a required input and should be an array of items of type {@link T}.\r\n */\r\n public readonly items = input.required<readonly T[]>();\r\n /**\r\n * A separator string (character) to be displayed between items. Set `true` for `,` or provide a custom string.\r\n */\r\n public readonly separator = input<true | string>();\r\n /**\r\n * A separator icon to be displayed between items.\r\n */\r\n public readonly iconItemSeparator = input<IconType>();\r\n /**\r\n * Strategy to use when there are more items than can be displayed in the available space.\r\n * The value determines where the items should start to overflow.\r\n * @default 'end'\r\n */\r\n public readonly overflowStrategy = input<OverflowStrategy>('end');\r\n /**\r\n * The amount of items to keep visible after or before overflowing, depending on the {@link overflowStrategy}.\r\n * @default 0\r\n */\r\n public readonly overflowStrategyFreezeCount = input<number>(0);\r\n /**\r\n * Index of the item to be used as the overflow indicator when using the 'aroundIndex' overflow strategy.\r\n * This input is only relevant when the {@link overflowStrategy} is set to 'aroundIndex'.\r\n * @default 0\r\n */\r\n public readonly overflowStrategyIndex = input<number>(0);\r\n /**\r\n * Set this to `true` for greatly improving performance when all items have the same width.\r\n * Especially true for large lists of items.\r\n *\r\n * ⚠️ This reduces the accessibility of the control as screen\r\n * readers will not be able to determine the number of hidden items and keyboard users cannot directly\r\n * navigate to them. Use this only for potentially very large lists (with items of identical width) where users will not\r\n * need to access overflowed items directly.\r\n * @default false\r\n */\r\n public readonly sameWidthItems = input<boolean>(false);\r\n\r\n private readonly _themeGap = signal(0);\r\n private readonly _isBrowser = inject(Platform).isBrowser;\r\n\r\n protected readonly separatorChar = computed(() => {\r\n const sep = this.separator();\r\n return typeof sep === 'boolean' ? (sep ? ', ' : '') : sep;\r\n });\r\n\r\n private readonly _enableSizeMeasuring = computed(() => !this.sameWidthItems());\r\n private readonly _renderedItemRefs = viewChildren<ElementRef<HTMLElement>>('itemRef');\r\n private readonly _firstItemRef = viewChild<ElementRef<HTMLElement>>('itemRef');\r\n private readonly _firstItemWidth = elementSizeSignal(this._firstItemRef);\r\n private readonly _renderedItemSizes = elementsSizesSignal(\r\n this._renderedItemRefs,\r\n this._enableSizeMeasuring\r\n );\r\n private readonly _renderedItemWidths = computed(\r\n () =>\r\n this.sameWidthItems()\r\n ? this.items().map(() => this._firstItemWidth().width || Number.MAX_SAFE_INTEGER)\r\n : this._renderedItemSizes().map(size => size.width),\r\n { equal: areArraysDeepEqual }\r\n );\r\n private readonly _containerSize = elementSizeSignal(this.element.nativeElement);\r\n private readonly _overflowItemRef = viewChild<ElementRef<HTMLElement>>('overflowItem');\r\n private readonly _overflowItemSize = elementSizeSignal(this._overflowItemRef);\r\n\r\n protected readonly itemOverflowCheckOrder = computed<OverflowOrder>(() => {\r\n const count = this.items().length;\r\n const freezeCount = Math.min(this.overflowStrategyFreezeCount(), count);\r\n return getItemOverflowCheckOrder({\r\n count,\r\n strategy: this.overflowStrategy(),\r\n freezeCount,\r\n strategyIndex: this.overflowStrategyIndex(),\r\n });\r\n });\r\n\r\n protected readonly renderedItems = computed<RenderItem<T>[]>(() => {\r\n const containerWidth = this._containerSize().width;\r\n const renderedItemWidths = this._renderedItemWidths();\r\n const overflowCheckOrder = this.itemOverflowCheckOrder();\r\n\r\n const count = this.items().length;\r\n const freezeCount = Math.min(this.overflowStrategyFreezeCount(), count);\r\n const layout = calculateItemViewLayout({\r\n count,\r\n strategy: this.overflowStrategy(),\r\n freezeCount,\r\n strategyIndex: this.overflowStrategyIndex(),\r\n containerWidth,\r\n itemWidths: renderedItemWidths,\r\n overflowItemWidth: this._overflowItemSize().width,\r\n gap: this._themeGap(),\r\n });\r\n\r\n const renderedItemOrders = layout.renderedItemOrders;\r\n // Precompute quick lookups for the hot paths below.\r\n // - `renderedIndexSet` allows O(1) visibility checks.\r\n // - `locationByIndex` avoids repeatedly scanning the overflow order to find an item's location.\r\n const renderedIndexSet = new Set<number>(renderedItemOrders.map(x => x.index));\r\n const locationByIndex: Array<ItemOverflowLocation | undefined> = new Array(count);\r\n for (const entry of overflowCheckOrder) {\r\n locationByIndex[entry.index] = entry.location;\r\n }\r\n\r\n // First pass: build the full list with items marked as visible vs overflowed.\r\n // We'll insert overflow indicators afterwards at the computed insertion indices.\r\n let res: RenderItem<T>[] = this.items().map((item, index) => {\r\n if (renderedIndexSet.has(index)) {\r\n return <RenderItem<T>>{\r\n id: item[this.idField()] as string | number,\r\n kind: 'visibleItem',\r\n item,\r\n };\r\n } else {\r\n return <RenderItem<T>>{\r\n id: item[this.idField()] as string | number,\r\n kind: 'overflowItem',\r\n location: locationByIndex[index] ?? 'end',\r\n item,\r\n };\r\n }\r\n });\r\n\r\n const getFallbackOverflowIndicatorIndex = () => {\r\n // When the layout says \"no indicator\" for the only slot (null), we still need a stable\r\n // insertion index so the DOM structure stays consistent for measurement.\r\n if (overflowCheckOrder.length === 0) {\r\n return 0;\r\n }\r\n const lastItem = overflowCheckOrder[overflowCheckOrder.length - 1];\r\n return (lastItem ?? throwExp('NgnItemView', 'Unexpected empty entry in overflowCheckOrder'))\r\n .index;\r\n };\r\n\r\n // Insert overflow indicators at the calculated indices\r\n // Note: inserting into `res` shifts subsequent indices; track that shift explicitly with `insertOffset`.\r\n let insertOffset = 0;\r\n\r\n // Collect overflowed items, both as a single list and grouped by location.\r\n const overflowedItemsAll: T[] = [];\r\n const overflowedItemsByLocation: Record<ItemOverflowLocation, T[]> = {\r\n start: [],\r\n end: [],\r\n center: [],\r\n };\r\n const allItems = this.items();\r\n for (let i = 0; i < count; i++) {\r\n if (renderedIndexSet.has(i)) {\r\n continue;\r\n }\r\n const item = allItems[i];\r\n if (item === undefined) {\r\n continue;\r\n }\r\n overflowedItemsAll.push(item);\r\n const location = locationByIndex[i] ?? 'end';\r\n overflowedItemsByLocation[location].push(item);\r\n }\r\n\r\n layout.overflowIndicatorIndices.forEach((indicatorIndex, iterationIndex) => {\r\n const insertIndex = indicatorIndex ?? getFallbackOverflowIndicatorIndex() + insertOffset;\r\n\r\n // If two overflow indicators are rendered (aroundIndex), we must split overflow items by location\r\n // so each indicator shows its own count/list.\r\n const overflowIndicatorLocation =\r\n layout.overflowIndicatorCount === 1 ? null : iterationIndex === 0 ? 'start' : 'end';\r\n const items = overflowIndicatorLocation\r\n ? overflowedItemsByLocation[overflowIndicatorLocation]\r\n : overflowedItemsAll;\r\n\r\n res.splice(insertIndex, 0, <RenderItem<T>>{\r\n id: `overflow-indicator-${indicatorIndex}`,\r\n kind: 'overflowIndicator',\r\n visible: indicatorIndex !== null,\r\n items,\r\n hasSeparator: renderedItemOrders.some(x => x.index + insertOffset > insertIndex),\r\n });\r\n insertOffset++;\r\n });\r\n\r\n // In fixed width mode, remove all hidden items except for the first one (used for measurement)\r\n if (this.sameWidthItems()) {\r\n res = res.filter((item, index) => item.kind !== 'overflowItem' || index === 0);\r\n }\r\n\r\n return res;\r\n });\r\n\r\n protected readonly maxWidth = computed<number>(() => {\r\n return Math.ceil(\r\n this._renderedItemWidths().reduce((sum, w) => sum + w, 0) +\r\n this._themeGap() * Math.max(0, this.items().length - 1)\r\n );\r\n });\r\n\r\n public ngAfterViewInit(): void {\r\n if (!this._isBrowser) {\r\n return;\r\n }\r\n requestAnimationFrame(() => {\r\n const gapString = getComputedStyle(this.element.nativeElement).getPropertyValue('column-gap');\r\n const gap = parseFloat(gapString) || 0;\r\n this._themeGap.set(gap);\r\n });\r\n }\r\n}\r\n","@for (item of renderedItems(); track item.id; let i = $index) {\r\n @if (item.kind === 'visibleItem' || item.kind === 'overflowItem') {\r\n <span\r\n role=\"listitem\"\r\n #itemRef\r\n [ptInt]=\"this\"\r\n [ptClass]=\"{\r\n item: true,\r\n 'item-overflowing': item.kind === 'overflowItem',\r\n }\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n itemTemplate();\r\n context: { $implicit: item.item, index: i, last: $last, first: $first }\r\n \"\r\n />\r\n @if (!$last) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n separatorTemplate();\r\n context: { $implicit: { character: separatorChar(), icon: iconItemSeparator() } }\r\n \"\r\n />\r\n }\r\n </span>\r\n } @else if (item.kind === 'overflowIndicator') {\r\n <div\r\n [ptInt]=\"this\"\r\n [ptClass]=\"{ 'more-items': true, 'more-items-hidden': !item.visible }\"\r\n aria-hidden=\"true\"\r\n #overflowItem\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n overflowTemplate();\r\n context: {\r\n $implicit: {\r\n totalCount: items().length,\r\n overflowCount: item.items.length,\r\n overflowItems: item.items,\r\n },\r\n }\r\n \"\r\n />\r\n @if (!$last) {\r\n <span\r\n [style.visibility]=\"item.hasSeparator ? 'visible' : 'hidden'\"\r\n style=\"display: contents\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n separatorTemplate();\r\n context: { $implicit: { character: separatorChar(), icon: iconItemSeparator() } }\r\n \"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n}\r\n\r\n<ng-template #defaultSeparatorTemplate [ngnTemplate]=\"templateTypes.separator\" let-separator>\r\n @if (separator.character) {\r\n <span>{{ separator.character }}</span>\r\n } @else if (separator.icon) {\r\n <ngn-icon [icon]=\"separator.icon\" />\r\n }\r\n</ng-template>\r\n\r\n<ng-template #defaultOverflowItemTemplate [ngnTemplate]=\"templateTypes.overflow\" let-overflow>\r\n <span [ptInt]=\"this\" [ptClass]=\"'more-items-default'\">+{{ overflow.overflowCount }}</span>\r\n</ng-template>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAgCA;;;;AAIG;AACG,SAAU,yBAAyB,CAAC,MAKzC,EAAA;AACC,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAA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,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAChB,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAcN,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhJvF;;AAEG;;;;"}
@@ -15,40 +15,40 @@ import { listBoxControlTemplate } from '@ngneers/controls-themes/templates/list-
15
15
  class ListBoxTemplates extends ValueControlBase {
16
16
  // Item template
17
17
  _defaultItemTemplate = viewChild.required('defaultItemTemplate');
18
- _userItemTemplate = contentChild('item', ...(ngDevMode ? [{ debugName: "_userItemTemplate" }] : []));
18
+ _userItemTemplate = contentChild('item', ...(ngDevMode ? [{ debugName: "_userItemTemplate" }] : /* istanbul ignore next */ []));
19
19
  /**
20
20
  * Set a custom template for an item of the list box.
21
21
  * Can also be set using an `<ng-template>` element with `#item` template reference variable.
22
22
  */
23
- templateItem = input(null, ...(ngDevMode ? [{ debugName: "templateItem" }] : []));
24
- itemTemplate = computed(() => this._userItemTemplate() ?? this.templateItem() ?? this._defaultItemTemplate(), ...(ngDevMode ? [{ debugName: "itemTemplate" }] : []));
23
+ templateItem = input(null, ...(ngDevMode ? [{ debugName: "templateItem" }] : /* istanbul ignore next */ []));
24
+ itemTemplate = computed(() => this._userItemTemplate() ?? this.templateItem() ?? this._defaultItemTemplate(), ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
25
25
  // Group template
26
26
  _defaultGroupTemplate = viewChild.required('defaultGroupTemplate');
27
- _userGroupTemplate = contentChild('group', ...(ngDevMode ? [{ debugName: "_userGroupTemplate" }] : []));
27
+ _userGroupTemplate = contentChild('group', ...(ngDevMode ? [{ debugName: "_userGroupTemplate" }] : /* istanbul ignore next */ []));
28
28
  /**
29
29
  * Set a custom template for a group in the list box.
30
30
  * Can also be set using an `<ng-template>` element with `#group` template reference variable.
31
31
  */
32
- templateGroup = input(null, ...(ngDevMode ? [{ debugName: "templateGroup" }] : []));
33
- groupTemplate = computed(() => this._userGroupTemplate() ?? this.templateGroup() ?? this._defaultGroupTemplate(), ...(ngDevMode ? [{ debugName: "groupTemplate" }] : []));
32
+ templateGroup = input(null, ...(ngDevMode ? [{ debugName: "templateGroup" }] : /* istanbul ignore next */ []));
33
+ groupTemplate = computed(() => this._userGroupTemplate() ?? this.templateGroup() ?? this._defaultGroupTemplate(), ...(ngDevMode ? [{ debugName: "groupTemplate" }] : /* istanbul ignore next */ []));
34
34
  // Empty template
35
35
  _defaultEmptyTemplate = viewChild.required('defaultEmptyTemplate');
36
- _userEmptyTemplate = contentChild('empty', ...(ngDevMode ? [{ debugName: "_userEmptyTemplate" }] : []));
36
+ _userEmptyTemplate = contentChild('empty', ...(ngDevMode ? [{ debugName: "_userEmptyTemplate" }] : /* istanbul ignore next */ []));
37
37
  /**
38
38
  * Set a custom template for the empty state in the list box.
39
39
  * Can also be set using an `<ng-template>` element with `#empty` template reference variable.
40
40
  */
41
- templateEmpty = input(null, ...(ngDevMode ? [{ debugName: "templateEmpty" }] : []));
42
- emptyTemplate = computed(() => this._userEmptyTemplate() ?? this.templateEmpty() ?? this._defaultEmptyTemplate(), ...(ngDevMode ? [{ debugName: "emptyTemplate" }] : []));
41
+ templateEmpty = input(null, ...(ngDevMode ? [{ debugName: "templateEmpty" }] : /* istanbul ignore next */ []));
42
+ emptyTemplate = computed(() => this._userEmptyTemplate() ?? this.templateEmpty() ?? this._defaultEmptyTemplate(), ...(ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []));
43
43
  /**
44
44
  * Types for the dialog templates.
45
45
  */
46
46
  templateTypes = templateTypesFn();
47
47
  templateTypesInternal = templateTypesFn();
48
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ListBoxTemplates, deps: null, target: i0.ɵɵFactoryTarget.Directive });
49
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.0", type: ListBoxTemplates, isStandalone: true, inputs: { templateItem: { classPropertyName: "templateItem", publicName: "templateItem", isSignal: true, isRequired: false, transformFunction: null }, templateGroup: { classPropertyName: "templateGroup", publicName: "templateGroup", isSignal: true, isRequired: false, transformFunction: null }, templateEmpty: { classPropertyName: "templateEmpty", publicName: "templateEmpty", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_userItemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "_userGroupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "_userEmptyTemplate", first: true, predicate: ["empty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_defaultItemTemplate", first: true, predicate: ["defaultItemTemplate"], descendants: true, isSignal: true }, { propertyName: "_defaultGroupTemplate", first: true, predicate: ["defaultGroupTemplate"], descendants: true, isSignal: true }, { propertyName: "_defaultEmptyTemplate", first: true, predicate: ["defaultEmptyTemplate"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
48
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ListBoxTemplates, deps: null, target: i0.ɵɵFactoryTarget.Directive });
49
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.2", type: ListBoxTemplates, isStandalone: true, inputs: { templateItem: { classPropertyName: "templateItem", publicName: "templateItem", isSignal: true, isRequired: false, transformFunction: null }, templateGroup: { classPropertyName: "templateGroup", publicName: "templateGroup", isSignal: true, isRequired: false, transformFunction: null }, templateEmpty: { classPropertyName: "templateEmpty", publicName: "templateEmpty", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_userItemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "_userGroupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "_userEmptyTemplate", first: true, predicate: ["empty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_defaultItemTemplate", first: true, predicate: ["defaultItemTemplate"], descendants: true, isSignal: true }, { propertyName: "_defaultGroupTemplate", first: true, predicate: ["defaultGroupTemplate"], descendants: true, isSignal: true }, { propertyName: "_defaultEmptyTemplate", first: true, predicate: ["defaultEmptyTemplate"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
50
50
  }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ListBoxTemplates, decorators: [{
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ListBoxTemplates, decorators: [{
52
52
  type: Directive
53
53
  }], 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 }] }], _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 }] }], _defaultEmptyTemplate: [{ type: i0.ViewChild, args: ['defaultEmptyTemplate', { isSignal: true }] }], _userEmptyTemplate: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], templateEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateEmpty", required: false }] }] } });
54
54
 
@@ -63,39 +63,39 @@ class NgnListBox extends ListBoxTemplates {
63
63
  empty: () => !this.displayedItems().length,
64
64
  });
65
65
  _scroller = viewChild.required(NgnScroller);
66
- items = input.required(...(ngDevMode ? [{ debugName: "items" }] : []));
67
- scrollToSelectedItemOnInit = input(false, ...(ngDevMode ? [{ debugName: "scrollToSelectedItemOnInit" }] : []));
68
- selectable = input(false, { ...(ngDevMode ? { debugName: "selectable" } : {}), transform: booleanAttribute });
69
- selectOnHover = input(false, { ...(ngDevMode ? { debugName: "selectOnHover" } : {}), transform: booleanAttribute });
70
- focussable = input(true, { ...(ngDevMode ? { debugName: "focussable" } : {}), transform: booleanAttribute });
71
- virtual = input(false, { ...(ngDevMode ? { debugName: "virtual" } : {}), transform: booleanAttribute });
72
- itemHeight = input(...(ngDevMode ? [undefined, { debugName: "itemHeight" }] : []));
73
- multiple = input(...(ngDevMode ? [undefined, { debugName: "multiple" }] : []));
66
+ items = input.required(...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
67
+ scrollToSelectedItemOnInit = input(false, ...(ngDevMode ? [{ debugName: "scrollToSelectedItemOnInit" }] : /* istanbul ignore next */ []));
68
+ selectable = input(false, { ...(ngDevMode ? { debugName: "selectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
69
+ selectOnHover = input(false, { ...(ngDevMode ? { debugName: "selectOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
70
+ focussable = input(true, { ...(ngDevMode ? { debugName: "focussable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
71
+ virtual = input(false, { ...(ngDevMode ? { debugName: "virtual" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
72
+ itemHeight = input(...(ngDevMode ? [undefined, { debugName: "itemHeight" }] : /* istanbul ignore next */ []));
73
+ multiple = input(...(ngDevMode ? [undefined, { debugName: "multiple" }] : /* istanbul ignore next */ []));
74
74
  /**
75
75
  * Whether to use a checkbox to indicate selection state.
76
76
  *
77
77
  * This option is true per default when `multiple` is `true`.
78
78
  * @default multiple()
79
79
  */
80
- checkbox = input(...(ngDevMode ? [undefined, { debugName: "checkbox" }] : []));
80
+ checkbox = input(...(ngDevMode ? [undefined, { debugName: "checkbox" }] : /* istanbul ignore next */ []));
81
81
  /**
82
82
  * Accepts a boolean value that determines whether the filter is enabled.
83
83
  * Alternatively, you can provide `FilterConfig` to customize the filter behavior.
84
84
  * @default `false`
85
85
  */
86
- filter = input(false, ...(ngDevMode ? [{ debugName: "filter" }] : []));
86
+ filter = input(false, ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
87
87
  /**
88
88
  * Manually set the filter text.
89
89
  */
90
- filterText = input(null, ...(ngDevMode ? [{ debugName: "filterText" }] : []));
90
+ filterText = input(null, ...(ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []));
91
91
  itemClicked = output();
92
92
  maybeCallback = maybeCallback;
93
- displayedItems = computed(() => flatItems(this.filteredItems()), ...(ngDevMode ? [{ debugName: "displayedItems" }] : []));
93
+ displayedItems = computed(() => flatItems(this.filteredItems()), ...(ngDevMode ? [{ debugName: "displayedItems" }] : /* istanbul ignore next */ []));
94
94
  valueArray = computed(() => {
95
95
  const v = this.value();
96
96
  return (Array.isArray(v) ? v : v ? [v] : []);
97
- }, ...(ngDevMode ? [{ debugName: "valueArray" }] : []));
98
- currentHighlightedValue = signal(null, ...(ngDevMode ? [{ debugName: "currentHighlightedValue" }] : []));
97
+ }, ...(ngDevMode ? [{ debugName: "valueArray" }] : /* istanbul ignore next */ []));
98
+ currentHighlightedValue = signal(null, ...(ngDevMode ? [{ debugName: "currentHighlightedValue" }] : /* istanbul ignore next */ []));
99
99
  filteredItems = asyncComputed(async () => {
100
100
  const filter = !!this.filter();
101
101
  const appliedFilterOptions = this._appliedFilterOptions();
@@ -117,9 +117,9 @@ class NgnListBox extends ListBoxTemplates {
117
117
  ...providedFilterArgs,
118
118
  };
119
119
  return options;
120
- }, ...(ngDevMode ? [{ debugName: "_appliedFilterOptions" }] : []));
120
+ }, ...(ngDevMode ? [{ debugName: "_appliedFilterOptions" }] : /* istanbul ignore next */ []));
121
121
  filterIsExecuting = this.filteredItems.isRunning;
122
- showCheckboxes = computed(() => this.checkbox() ?? this.multiple() ?? false, ...(ngDevMode ? [{ debugName: "showCheckboxes" }] : []));
122
+ showCheckboxes = computed(() => this.checkbox() ?? this.multiple() ?? false, ...(ngDevMode ? [{ debugName: "showCheckboxes" }] : /* istanbul ignore next */ []));
123
123
  constructor() {
124
124
  super();
125
125
  createConditionalSpinner(this.filterIsExecuting);
@@ -199,10 +199,10 @@ class NgnListBox extends ListBoxTemplates {
199
199
  this.itemClicked.emit(value);
200
200
  this.touched.set(true);
201
201
  }
202
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: NgnListBox, deps: [], target: i0.ɵɵFactoryTarget.Component });
203
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: NgnListBox, isStandalone: true, selector: "ngn-list-box", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, scrollToSelectedItemOnInit: { classPropertyName: "scrollToSelectedItemOnInit", publicName: "scrollToSelectedItemOnInit", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selectOnHover: { classPropertyName: "selectOnHover", publicName: "selectOnHover", isSignal: true, isRequired: false, transformFunction: null }, focussable: { classPropertyName: "focussable", publicName: "focussable", 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 }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, checkbox: { classPropertyName: "checkbox", publicName: "checkbox", 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 } }, outputs: { itemClicked: "itemClicked" }, host: { attributes: { "role": "listbox" }, listeners: { "keydown": "onKeyDown($event)", "focusout": "currentHighlightedValue.set(null)" }, properties: { "attr.tabIndex": "focussable() ? 0 : null", "attr.aria-activedescendant": "currentHighlightedValue() ? inputId() + \"_option_\" + currentHighlightedValue() : null", "aria-multiselectable": "!!multiple()", "id": "inputId()" } }, providers: [provideSelf(NgnListBox)], viewQueries: [{ propertyName: "_scroller", first: true, predicate: NgnScroller, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ngn-scroller\r\n [ptInt]=\"this\"\r\n [ptClass]=\"'scroller'\"\r\n [virtual]=\"virtual()\"\r\n [itemHeight]=\"itemHeight()\"\r\n [items]=\"displayedItems()\"\r\n [templateItem]=\"usedItemTemplate\"\r\n [fieldSticky]=\"'items'\"\r\n #scroller\r\n/>\r\n\r\n@if (!displayedItems().length) {\r\n <ng-container\r\n *ngTemplateOutlet=\"emptyTemplate() || defaultEmptyTemplate; context: {}\"\r\n ></ng-container>\r\n}\r\n\r\n<ng-template #usedItemTemplate [ngnTemplate]=\"scroller.templateTypes.item\" let-itemOrGroup>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\r\n <div\r\n [ngnScrollerItem]=\"itemOrGroup\"\r\n [id]=\"inputId() + '_option_' + itemOrGroup.value\"\r\n [attr.role]=\"'option'\"\r\n [aria-selected]=\"selectable() ? valueArray().includes(itemOrGroup.value) : null\"\r\n [ptInt]=\"this\"\r\n [ptClass]=\"{\r\n item: !itemOrGroup.items,\r\n group: !!itemOrGroup.items,\r\n 'item-selected': valueArray().includes(itemOrGroup.value),\r\n 'item-highlighted': itemOrGroup.value === currentHighlightedValue(),\r\n }\"\r\n (click)=\"!itemOrGroup.items && selectable() && onSelect(itemOrGroup.value)\"\r\n (mouseenter)=\"\r\n !itemOrGroup.items && selectable() && selectOnHover() && onSelect(itemOrGroup.value)\r\n \"\r\n >\r\n @if (showCheckboxes() && !itemOrGroup.items) {\r\n <ngn-checkbox\r\n [value]=\"valueArray().includes(itemOrGroup.value)\"\r\n aria-hidden=\"true\"\r\n inert=\"true\"\r\n />\r\n }\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n itemOrGroup.items ? groupTemplate() : itemTemplate();\r\n context: { $implicit: itemOrGroup }\r\n \"\r\n ></ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultItemTemplate [ngnTemplate]=\"templateTypes.item\" let-item>\r\n <span [attr.data-testid]=\"item?.testId\" [ptInt]=\"this\" [ptClass]=\"'default-item'\">\r\n @let label = item?.label;\r\n @if (label) {\r\n <span [attr.data-testid]=\"item?.testId\">{{ maybeCallback(label) }}</span>\r\n } @else {\r\n <span [attr.data-testid]=\"item?.testId\">&ZeroWidthSpace;</span>\r\n }\r\n </span>\r\n</ng-template>\r\n\r\n<ng-template #defaultGroupTemplate [ngnTemplate]=\"templateTypes.item\" let-group>\r\n <span [attr.data-testid]=\"group?.testId\" [ptInt]=\"this\" [ptClass]=\"'default-group'\">\r\n @let label = group?.label;\r\n @if (label) {\r\n <span [attr.data-testid]=\"group?.testId\">{{ maybeCallback(label) }}</span>\r\n } @else {\r\n <span [attr.data-testid]=\"group?.testId\">&ZeroWidthSpace;</span>\r\n }\r\n </span>\r\n</ng-template>\r\n\r\n<ng-template #defaultEmptyTemplate>\r\n <span [ptInt]=\"this\" [ptClass]=\"'empty'\" [attr.data-testid]=\"'empty'\">{{\r\n 'No items found'\r\n }}</span>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgnScroller, selector: "ngn-scroller, [ngn-scroller]", inputs: ["items", "fieldId", "virtual", "itemHeight", "virtualPadding", "focusable", "fieldSticky"] }, { kind: "directive", type: NgnScrollerItem, selector: "[ngnScrollerItem]", inputs: ["ngnScrollerItem"] }, { kind: "component", type: NgnCheckbox, selector: "ngn-checkbox", inputs: ["iconChecked", "iconUnchecked", "iconIndeterminate", "allowIndeterminate"] }, { kind: "directive", type: NgnTemplate, selector: "ng-template[ngnTemplate]", inputs: ["ngnTemplate"] }, { kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
202
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnListBox, deps: [], target: i0.ɵɵFactoryTarget.Component });
203
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: NgnListBox, isStandalone: true, selector: "ngn-list-box", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, scrollToSelectedItemOnInit: { classPropertyName: "scrollToSelectedItemOnInit", publicName: "scrollToSelectedItemOnInit", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selectOnHover: { classPropertyName: "selectOnHover", publicName: "selectOnHover", isSignal: true, isRequired: false, transformFunction: null }, focussable: { classPropertyName: "focussable", publicName: "focussable", 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 }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, checkbox: { classPropertyName: "checkbox", publicName: "checkbox", 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 } }, outputs: { itemClicked: "itemClicked" }, host: { attributes: { "role": "listbox" }, listeners: { "keydown": "onKeyDown($event)", "focusout": "currentHighlightedValue.set(null)" }, properties: { "attr.tabIndex": "focussable() ? 0 : null", "attr.aria-activedescendant": "currentHighlightedValue() ? inputId() + \"_option_\" + currentHighlightedValue() : null", "aria-multiselectable": "!!multiple()", "id": "inputId()" } }, providers: [provideSelf(NgnListBox)], viewQueries: [{ propertyName: "_scroller", first: true, predicate: NgnScroller, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ngn-scroller\r\n [ptInt]=\"this\"\r\n [ptClass]=\"'scroller'\"\r\n [virtual]=\"virtual()\"\r\n [itemHeight]=\"itemHeight()\"\r\n [items]=\"displayedItems()\"\r\n [templateItem]=\"usedItemTemplate\"\r\n [fieldSticky]=\"'items'\"\r\n #scroller\r\n/>\r\n\r\n@if (!displayedItems().length) {\r\n <ng-container\r\n *ngTemplateOutlet=\"emptyTemplate() || defaultEmptyTemplate; context: {}\"\r\n ></ng-container>\r\n}\r\n\r\n<ng-template #usedItemTemplate [ngnTemplate]=\"scroller.templateTypes.item\" let-itemOrGroup>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\r\n <div\r\n [ngnScrollerItem]=\"itemOrGroup\"\r\n [id]=\"inputId() + '_option_' + itemOrGroup.value\"\r\n [attr.role]=\"'option'\"\r\n [aria-selected]=\"selectable() ? valueArray().includes(itemOrGroup.value) : null\"\r\n [ptInt]=\"this\"\r\n [ptClass]=\"{\r\n item: !itemOrGroup.items,\r\n group: !!itemOrGroup.items,\r\n 'item-selected': valueArray().includes(itemOrGroup.value),\r\n 'item-highlighted': itemOrGroup.value === currentHighlightedValue(),\r\n }\"\r\n (click)=\"!itemOrGroup.items && selectable() && onSelect(itemOrGroup.value)\"\r\n (mouseenter)=\"\r\n !itemOrGroup.items && selectable() && selectOnHover() && onSelect(itemOrGroup.value)\r\n \"\r\n >\r\n @if (showCheckboxes() && !itemOrGroup.items) {\r\n <ngn-checkbox\r\n [value]=\"valueArray().includes(itemOrGroup.value)\"\r\n aria-hidden=\"true\"\r\n inert=\"true\"\r\n />\r\n }\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n itemOrGroup.items ? groupTemplate() : itemTemplate();\r\n context: { $implicit: itemOrGroup }\r\n \"\r\n ></ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultItemTemplate [ngnTemplate]=\"templateTypes.item\" let-item>\r\n <span [attr.data-testid]=\"item?.testId\" [ptInt]=\"this\" [ptClass]=\"'default-item'\">\r\n @let label = item?.label;\r\n @if (label) {\r\n <span [attr.data-testid]=\"item?.testId\">{{ maybeCallback(label) }}</span>\r\n } @else {\r\n <span [attr.data-testid]=\"item?.testId\">&ZeroWidthSpace;</span>\r\n }\r\n </span>\r\n</ng-template>\r\n\r\n<ng-template #defaultGroupTemplate [ngnTemplate]=\"templateTypes.item\" let-group>\r\n <span [attr.data-testid]=\"group?.testId\" [ptInt]=\"this\" [ptClass]=\"'default-group'\">\r\n @let label = group?.label;\r\n @if (label) {\r\n <span [attr.data-testid]=\"group?.testId\">{{ maybeCallback(label) }}</span>\r\n } @else {\r\n <span [attr.data-testid]=\"group?.testId\">&ZeroWidthSpace;</span>\r\n }\r\n </span>\r\n</ng-template>\r\n\r\n<ng-template #defaultEmptyTemplate>\r\n <span [ptInt]=\"this\" [ptClass]=\"'empty'\" [attr.data-testid]=\"'empty'\">{{\r\n 'No items found'\r\n }}</span>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgnScroller, selector: "ngn-scroller, [ngn-scroller]", inputs: ["items", "fieldId", "virtual", "itemHeight", "virtualPadding", "focusable", "fieldSticky"] }, { kind: "directive", type: NgnScrollerItem, selector: "[ngnScrollerItem]", inputs: ["ngnScrollerItem"] }, { kind: "component", type: NgnCheckbox, selector: "ngn-checkbox", inputs: ["iconChecked", "iconUnchecked", "iconIndeterminate", "allowIndeterminate"] }, { kind: "directive", type: NgnTemplate, selector: "ng-template[ngnTemplate]", inputs: ["ngnTemplate"] }, { kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
204
204
  }
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: NgnListBox, decorators: [{
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnListBox, decorators: [{
206
206
  type: Component,
207
207
  args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ngn-list-box', imports: [NgTemplateOutlet, NgnScroller, NgnScrollerItem, NgnCheckbox, NgnTemplate, NgnPt], providers: [provideSelf(NgnListBox)], host: {
208
208
  '[attr.tabIndex]': 'focussable() ? 0 : null',