@acorex/components 22.1.0-next.10 → 22.1.0-next.11

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.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@acorex/components",
3
- "version": "22.1.0-next.10",
3
+ "version": "22.1.0-next.11",
4
4
  "peerDependencies": {
5
- "@acorex/core": "22.1.0-next.10",
6
- "@acorex/cdk": "22.1.0-next.10",
5
+ "@acorex/core": "22.1.0-next.11",
6
+ "@acorex/cdk": "22.1.0-next.11",
7
7
  "@angular/aria": ">=22.1.0",
8
8
  "polytype": ">=0.17.0",
9
9
  "angular-imask": ">=7.6.1",
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { TemplateRef } from '@angular/core';
3
3
  import { NXValueComponent, AXStyleLookType, AXValueChangedEvent, AXFocusEvent, AXItemClickEvent, AXItemSelectedEvent, AXEvent } from '@acorex/cdk/common';
4
4
  import { AXPopoverComponent } from '@acorex/components/popover';
5
+ import { AXSearchBoxComponent } from '@acorex/components/search-box';
5
6
  import { Combobox } from '@angular/aria/combobox';
6
7
  import { Listbox } from '@angular/aria/listbox';
7
8
  import { FormValueControl } from '@angular/forms/signals';
@@ -28,7 +29,8 @@ type AXComboBoxValue = string | number | (string | number)[] | null;
28
29
  * A minimal combo box for selecting one or more values from a list of items.
29
30
  *
30
31
  * Built on top of the `@angular/aria/combobox` directives, it supports two behaviors:
31
- * - `searchable="true"` (default): an input with typeahead filtering (matches `id`).
32
+ * - `searchable="true"` (default): an input with typeahead filtering (matches `id`). On small
33
+ * screens with `adaptivityEnabled`, the trigger is select-like and search moves into the actionsheet.
32
34
  * - `searchable="false"`: a select-like, non-editable trigger (same input; typing blocked without
33
35
  * Combobox `readonly`, so Tab focus and keyboard open/select keep working).
34
36
  *
@@ -58,6 +60,7 @@ declare class AXComboBoxComponent extends NXValueComponent implements FormValueC
58
60
  /**
59
61
  * Whether the combo box accepts typing and filters the list (`true`),
60
62
  * or is a select-like, non-editable trigger (`false`).
63
+ * On small screens with `adaptivityEnabled`, search is typed in the actionsheet instead of the trigger.
61
64
  */
62
65
  searchable: _angular_core.InputSignal<boolean>;
63
66
  /**
@@ -67,7 +70,8 @@ declare class AXComboBoxComponent extends NXValueComponent implements FormValueC
67
70
  multiple: _angular_core.InputSignal<boolean>;
68
71
  /**
69
72
  * When `true` (default), the popup list uses the alternate actionsheet presentation on small
70
- * screens (`SM`). When `false`, the list always opens as an anchored dropdown.
73
+ * screens (`SM`). Searchable mode then shows a search field inside the sheet. When `false`,
74
+ * the list always opens as an anchored dropdown.
71
75
  */
72
76
  adaptivityEnabled: _angular_core.InputSignal<boolean>;
73
77
  /**
@@ -83,8 +87,9 @@ declare class AXComboBoxComponent extends NXValueComponent implements FormValueC
83
87
  */
84
88
  placeholder: _angular_core.InputSignal<string>;
85
89
  /**
86
- * Placeholder for the trigger search input when items are already selected (multi-select).
87
- * Falls back to `placeholder` when the selection is empty.
90
+ * Placeholder for the trigger search input when items are already selected (multi-select),
91
+ * and for the in-sheet search field on small screens. Falls back to `placeholder` when the
92
+ * selection is empty on desktop.
88
93
  */
89
94
  searchPlaceholder: _angular_core.InputSignal<string>;
90
95
  /**
@@ -154,6 +159,12 @@ declare class AXComboBoxComponent extends NXValueComponent implements FormValueC
154
159
  protected expanded: _angular_core.WritableSignal<boolean>;
155
160
  /** Whether the list is currently shown as a bottom actionsheet (small screens + adaptivity). */
156
161
  protected isActionsheetStyle: _angular_core.WritableSignal<boolean>;
162
+ /** Whether the trigger input is writable and filters as you type (desktop searchable only). */
163
+ protected isEditableTrigger: _angular_core.Signal<boolean>;
164
+ /** Whether search is typed in the actionsheet instead of the trigger. */
165
+ protected isSheetSearchEnabled: _angular_core.Signal<boolean>;
166
+ /** Query typed in the actionsheet search field (independent of the trigger display text). */
167
+ protected sheetSearchText: _angular_core.WritableSignal<string>;
157
168
  /** The current selection normalized to an array of submitted values. */
158
169
  protected selectedValues: _angular_core.Signal<(string | number)[]>;
159
170
  /** Whether there is at least one selected value. */
@@ -177,9 +188,12 @@ declare class AXComboBoxComponent extends NXValueComponent implements FormValueC
177
188
  protected selection: _angular_core.WritableSignal<string[]>;
178
189
  /** Items filtered by typed query against `id` when the combo box is searchable. */
179
190
  protected filteredItems: _angular_core.Signal<AXComboBoxItem[]>;
191
+ /** Whether the filtered list is empty (empty-state vs hidden listbox). */
192
+ protected hasNoMatches: _angular_core.Signal<boolean>;
180
193
  protected comboboxRef: _angular_core.Signal<Combobox>;
181
194
  protected listboxRef: _angular_core.Signal<Listbox<any>>;
182
195
  protected popoverRef: _angular_core.Signal<AXPopoverComponent>;
196
+ protected sheetSearchRef: _angular_core.Signal<AXSearchBoxComponent>;
183
197
  constructor();
184
198
  /** Stable unique key for `@for` — avoids NG0955 when `id` is missing or duplicated. */
185
199
  protected trackItemKey(index: number, item: AXComboBoxItem): string;
@@ -195,8 +209,16 @@ declare class AXComboBoxComponent extends NXValueComponent implements FormValueC
195
209
  * - Multi-select: Backspace removes the last chip when the search input is empty.
196
210
  */
197
211
  protected onTriggerKeydown(event: KeyboardEvent): void;
198
- /** Blocks typing in non-searchable mode without Combobox `readonly` (keeps Tab/keyboard working). */
212
+ /** Blocks typing when the trigger is not editable (keeps Tab / keyboard open working). */
199
213
  protected onBeforeInput(event: Event): void;
214
+ /**
215
+ * Combobox `expanded` two-way binding. On actionsheet with in-sheet search, ignore collapse
216
+ * so focusing the search field (Aria combobox blur) does not close the popup. Dismiss is owned
217
+ * by the popover (`clickOut`, close button), `commit()`, and Escape.
218
+ */
219
+ protected onExpandedChange(open: boolean): void;
220
+ /** Filters the list from the actionsheet search field (reads the input so delayed ngModel cannot block typing). */
221
+ protected onSheetSearchInput(): void;
200
222
  /**
201
223
  * Keeps the combobox expanded state in sync when the popover closes (e.g. click outside).
202
224
  */
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { TemplateRef, ElementRef } from '@angular/core';
3
3
  import { AXEvent, AXDataSource, AXListDataSource, AXHtmlEvent, NXValueComponent, AXStyleLookType, AXValueChangedEvent, AXFocusEvent, AXItemClickEvent, AXItemSelectedEvent } from '@acorex/cdk/common';
4
4
  import { AXPopoverComponent } from '@acorex/components/popover';
5
+ import { AXSearchBoxComponent } from '@acorex/components/search-box';
5
6
  import { AXTreeViewNode, AXTreeViewDataSource, AXTreeViewSelectionBehavior, AXTreeViewItemTemplateContext, AXTreeViewSelectionChangeEvent } from '@acorex/components/tree-view';
6
7
  import { FormValueControl } from '@angular/forms/signals';
7
8
  import { AXListNavigationDirective, AXListNavigationItemDirective } from '@acorex/cdk/list-navigation';
@@ -200,7 +201,8 @@ declare class AXLookupMultiSelectTreeComponent {
200
201
  * - `multi-select` — a predefined list of options for multiple item selection (chips in the trigger).
201
202
  * - `drop-down-tree` — a predefined list rendered in a tree-like structure for single item selection.
202
203
  * - `multi-select-tree` — a tree-like structure for multiple item selection.
203
- * - `multi-column` — an `ax-data-table` grid; when searchable, the trigger input filters as you type.
204
+ * - `multi-column` — an `ax-data-table` grid; when searchable, the trigger input filters as you type
205
+ * (on small screens the search field is inside the actionsheet).
204
206
  *
205
207
  * With `adaptivityEnabled` (default `true`), the list opens as a bottom actionsheet on small
206
208
  * screens instead of an anchored dropdown — the same alternate presentation as `ax-select-box`.
@@ -251,11 +253,13 @@ declare class AXLookupComponent extends NXValueComponent implements FormValueCon
251
253
  * Whether the trigger accepts typing and filters the datasource (`true`),
252
254
  * or is select-only with no writable input (`false`).
253
255
  * Applies to `drop-down-list`, `multi-select`, and `multi-column`. Tree modes ignore this.
256
+ * On small screens with `adaptivityEnabled`, search is typed in the actionsheet instead of the trigger.
254
257
  */
255
258
  searchable: _angular_core.InputSignal<boolean>;
256
259
  /**
257
260
  * When `true` (default), the popup list uses the alternate actionsheet presentation on small
258
- * screens (`SM`). When `false`, the list always opens as an anchored dropdown.
261
+ * screens (`SM`). Searchable list modes then show a search field inside the sheet. When `false`,
262
+ * the list always opens as an anchored dropdown.
259
263
  */
260
264
  adaptivityEnabled: _angular_core.InputSignal<boolean>;
261
265
  /**
@@ -269,7 +273,8 @@ declare class AXLookupComponent extends NXValueComponent implements FormValueCon
269
273
  alternate: _angular_core.InputSignal<boolean>;
270
274
  /**
271
275
  * Placeholder for the trigger search input when items are already selected
272
- * (mainly useful in `multi-select`). Falls back to `placeholder` when the selection is empty.
276
+ * (mainly useful in `multi-select`), and for the in-sheet search field on small screens.
277
+ * Falls back to `placeholder` when the selection is empty on desktop.
273
278
  */
274
279
  searchPlaceholder: _angular_core.InputSignal<string>;
275
280
  /**
@@ -368,8 +373,14 @@ declare class AXLookupComponent extends NXValueComponent implements FormValueCon
368
373
  protected isMultiple: _angular_core.Signal<boolean>;
369
374
  /** Whether the current mode renders a tree. */
370
375
  protected isTreeMode: _angular_core.Signal<boolean>;
371
- /** Whether the trigger input is writable and filters as you type. */
376
+ /** Whether the current mode can filter a flat list as you type. */
377
+ protected isListSearchMode: _angular_core.Signal<boolean>;
378
+ /** Whether the trigger input is writable and filters as you type (desktop only). */
372
379
  protected isEditableTrigger: _angular_core.Signal<boolean>;
380
+ /** Whether search is typed in the actionsheet instead of the trigger. */
381
+ protected isSheetSearchEnabled: _angular_core.Signal<boolean>;
382
+ /** Query typed in the actionsheet search field (independent of the trigger display text). */
383
+ protected sheetSearchText: _angular_core.WritableSignal<string>;
373
384
  /** The datasource for list-based modes; plain arrays are converted. */
374
385
  protected resolvedDataSource: _angular_core.Signal<AXDataSource<AXLookupItem>>;
375
386
  /** The current selection normalized to an array. */
@@ -389,9 +400,12 @@ declare class AXLookupComponent extends NXValueComponent implements FormValueCon
389
400
  * the selected display text (same pattern as combo-box).
390
401
  */
391
402
  protected showSelectedTemplate: _angular_core.Signal<boolean>;
403
+ /** Placeholder for the editable trigger search input. */
404
+ protected triggerSearchPlaceholder: _angular_core.Signal<string>;
392
405
  protected popoverRef: _angular_core.Signal<AXPopoverComponent>;
393
406
  protected triggerSearchInput: _angular_core.Signal<ElementRef<HTMLInputElement>>;
394
407
  protected listView: _angular_core.Signal<AXLookupListViewBase>;
408
+ protected sheetSearchRef: _angular_core.Signal<AXSearchBoxComponent>;
395
409
  constructor();
396
410
  /** Returns the display text of an item using the `textField` mapping. */
397
411
  protected getItemText(item: AXLookupItem): string;
@@ -412,7 +426,7 @@ declare class AXLookupComponent extends NXValueComponent implements FormValueCon
412
426
  /** Blocks typing when the trigger is not editable (keeps Tab / keyboard open working). */
413
427
  protected onBeforeInput(event: Event): void;
414
428
  /**
415
- * Returns focus to the trigger input when list navigation requests it.
429
+ * Returns focus to the search field when list navigation requests it.
416
430
  */
417
431
  protected onListNavigateOut(_reason: 'up' | 'typeahead'): void;
418
432
  protected focusListFirst(): void;
@@ -437,8 +451,8 @@ declare class AXLookupComponent extends NXValueComponent implements FormValueCon
437
451
  * Handles typing in the editable trigger input.
438
452
  */
439
453
  protected onTriggerSearchInput(text: string): void;
440
- /** Placeholder for the editable trigger search input. */
441
- protected triggerSearchPlaceholder: _angular_core.Signal<string>;
454
+ /** Filters the datasource from the actionsheet search field (reads the input so delayed ngModel cannot block typing). */
455
+ protected onSheetSearchInput(): void;
442
456
  /**
443
457
  * Commits a single pick (drop-down-list, drop-down-tree, multi-column) and closes the popup.
444
458
  */