@acorex/components 22.1.0-next.3 → 22.1.0-next.31

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 (53) hide show
  1. package/fesm2022/acorex-components-alert.mjs +2 -2
  2. package/fesm2022/acorex-components-alert.mjs.map +1 -1
  3. package/fesm2022/acorex-components-combo-box.mjs +229 -25
  4. package/fesm2022/acorex-components-combo-box.mjs.map +1 -1
  5. package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs → acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs} +6 -19
  6. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs.map +1 -0
  7. package/fesm2022/acorex-components-conversation.mjs +7568 -9585
  8. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  9. package/fesm2022/acorex-components-data-table.mjs +57 -23
  10. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  11. package/fesm2022/acorex-components-decorators.mjs +2 -2
  12. package/fesm2022/acorex-components-decorators.mjs.map +1 -1
  13. package/fesm2022/acorex-components-dropdown.mjs +2 -2
  14. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  15. package/fesm2022/acorex-components-fab.mjs +5 -5
  16. package/fesm2022/acorex-components-fab.mjs.map +1 -1
  17. package/fesm2022/acorex-components-form.mjs +21 -5
  18. package/fesm2022/acorex-components-form.mjs.map +1 -1
  19. package/fesm2022/acorex-components-label.mjs +2 -2
  20. package/fesm2022/acorex-components-label.mjs.map +1 -1
  21. package/fesm2022/acorex-components-loading-dialog.mjs +59 -42
  22. package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
  23. package/fesm2022/acorex-components-lookup.mjs +1191 -171
  24. package/fesm2022/acorex-components-lookup.mjs.map +1 -1
  25. package/fesm2022/acorex-components-menu.mjs +11 -5
  26. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  27. package/fesm2022/acorex-components-notification.mjs +6 -6
  28. package/fesm2022/acorex-components-notification.mjs.map +1 -1
  29. package/fesm2022/acorex-components-popover.mjs +22 -0
  30. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  31. package/fesm2022/acorex-components-select-box.mjs +38 -11
  32. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  33. package/fesm2022/acorex-components-tabs.mjs +2 -2
  34. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  35. package/fesm2022/acorex-components-tag-box.mjs +2 -2
  36. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  37. package/fesm2022/acorex-components-tree-view.mjs +40 -3
  38. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  39. package/lookup/README.md +19 -8
  40. package/package.json +4 -7
  41. package/types/acorex-components-combo-box.d.ts +46 -9
  42. package/types/acorex-components-conversation.d.ts +663 -1293
  43. package/types/acorex-components-data-table.d.ts +12 -2
  44. package/types/acorex-components-loading-dialog.d.ts +12 -4
  45. package/types/acorex-components-lookup.d.ts +258 -64
  46. package/types/acorex-components-popover.d.ts +6 -0
  47. package/types/acorex-components-select-box.d.ts +11 -0
  48. package/types/acorex-components-tree-view.d.ts +9 -1
  49. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs.map +0 -1
  50. package/fesm2022/acorex-components-selection-list-2.mjs +0 -168
  51. package/fesm2022/acorex-components-selection-list-2.mjs.map +0 -1
  52. package/selection-list-2/README.md +0 -3
  53. package/types/acorex-components-selection-list-2.d.ts +0 -52
package/lookup/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @acorex/components/lookup
2
2
 
3
- An advanced drop-down (lookup) component with five modes, `AXDataSource` support, and virtual scrolling.
3
+ An advanced drop-down (lookup) component with six modes, `AXDataSource` support, and virtual scrolling.
4
4
 
5
5
  ## Modes
6
6
 
@@ -11,6 +11,7 @@ An advanced drop-down (lookup) component with five modes, `AXDataSource` support
11
11
  | `drop-down-tree` | A tree-like structure for single item selection. |
12
12
  | `multi-select-tree` | A tree-like structure for multiple item selection. |
13
13
  | `multi-column` | An `ax-data-table` grid; further pages load on scroll. |
14
+ | `multi-column-tree` | A multi-column table with a drop-down tree inside it (expandable rows). |
14
15
 
15
16
  ## Usage
16
17
 
@@ -42,22 +43,32 @@ import { AXDataSource } from '@acorex/cdk/common';
42
43
 
43
44
  <!-- MultiColumnComboBox -->
44
45
  <ax-lookup mode="multi-column" [dataSource]="items" [columns]="columns" [(ngModel)]="selected"></ax-lookup>
46
+
47
+ <!-- MultiColumnTree (table + expandable tree) -->
48
+ <ax-lookup
49
+ mode="multi-column-tree"
50
+ [treeDataSource]="nodes"
51
+ [columns]="columns"
52
+ textField="title"
53
+ [(ngModel)]="selectedNode"
54
+ ></ax-lookup>
45
55
  ```
46
56
 
47
57
  Value binding uses the signal `value` model (`FormValueControl`) — prefer `[(ngModel)]` (or `[(value)]` / signal forms). No `ControlValueAccessor`.
48
58
 
49
- - `dataSource`: `AXDataSource` or a plain array (list and multi-column modes). Supports remote paging, `byKey` value resolution, and server-side filtering.
59
+ - `dataSource`: `AXDataSource` or a plain array (list and multi-column modes). Supports remote paging, `byKey` value resolution, and server-side filtering. Also used by `multi-column-tree` when `treeDataSource` is not set (hierarchical load via `treeParentField`).
50
60
  - `valueItems`: full items that resolve the current `value` key(s) without calling `byKey` (useful when the parent already loaded the selected entity). Missing keys still fall through to `find` / `byKey`. You can also call `seedItems(items)` imperatively.
51
- - `treeDataSource`: node array or lazy children callback (tree modes).
61
+ - `treeDataSource`: node array or lazy children callback (tree modes, including `multi-column-tree`).
52
62
  - `valueField` / `textField` / `disabledField`: field mappings. For tree modes these map to the tree `idField` / `titleField`.
53
- - `columns`: column definitions (`{ field, title, width? }`) for `multi-column` mode (mapped to `ax-text-column`).
54
- - `searchable`: when `true` (default), the trigger accepts typing and filters the list (`drop-down-list`, `multi-select`, `multi-column`). When `false`, the trigger is select-only. Tree modes have no search UI.
63
+ - `columns`: column definitions (`{ field, title, width?, expandHandler? }`) for `multi-column` and `multi-column-tree` (mapped to `ax-text-column`).
64
+ - `treeParentField` / `hasChildrenField`: hierarchy fields for `multi-column-tree` (defaults `parentId` / `hasChild`).
65
+ - `searchable`: when `true` (default), the trigger accepts typing and filters the list or tree in every mode. Nested array trees keep matching branches and expand ancestors of hits; lazy callback trees filter each loaded level (unloaded descendants are not searched). When `false`, the trigger is select-only.
55
66
  - `adaptivityEnabled`: when `true` (default), the list opens as a bottom actionsheet on small screens instead of a dropdown; set `false` to always use the anchored dropdown.
56
67
  - `caption`: title shown in the actionsheet header (falls back to `placeholder`).
57
- - `alternate`: when `true`, list rows use alternating background colors for easier scanning (`drop-down-list`, `multi-select`, `multi-column`).
58
- - `searchPlaceholder`: placeholder for the multi-select trigger search input when chips are already selected.
68
+ - `alternate`: when `true`, list rows use alternating background colors for easier scanning (all modes, including tree).
69
+ - `searchPlaceholder`: placeholder for the multi-select / multi-select-tree trigger search input when chips are already selected.
59
70
  - `itemHeight` / `maxVisibleItems`: list virtual-scroll sizing, and multi-column table viewport height (multi-column loads more pages on scroll, not via a pager).
60
71
  - `look`: the same editor-container look schemes as other editors like `ax-text-box`.
61
72
  - `ax-prefix` / `ax-suffix`: project decorators into the editor container.
62
73
 
63
- Each mode is rendered by its own internal mini component (`ax-lookup-drop-down-list`, `ax-lookup-multi-select`, `ax-lookup-drop-down-tree`, `ax-lookup-multi-select-tree`, `ax-lookup-multi-column`), all exported for direct use.
74
+ Each mode is rendered by its own internal mini component (`ax-lookup-drop-down-list`, `ax-lookup-multi-select`, `ax-lookup-drop-down-tree`, `ax-lookup-multi-select-tree`, `ax-lookup-multi-column`, `ax-lookup-multi-column-tree`), all exported for direct use.
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@acorex/components",
3
- "version": "22.1.0-next.3",
3
+ "version": "22.1.0-next.31",
4
4
  "peerDependencies": {
5
- "@acorex/core": "22.1.0-next.3",
6
- "@acorex/cdk": "22.1.0-next.3",
5
+ "@acorex/core": "22.1.0-next.31",
6
+ "@acorex/cdk": "22.1.0-next.31",
7
+ "@angular/aria": ">=22.1.0",
7
8
  "polytype": ">=0.17.0",
8
9
  "angular-imask": ">=7.6.1",
9
10
  "imask": ">=7.6.1",
@@ -386,10 +387,6 @@
386
387
  "types": "./types/acorex-components-selection-list.d.ts",
387
388
  "default": "./fesm2022/acorex-components-selection-list.mjs"
388
389
  },
389
- "./selection-list-2": {
390
- "types": "./types/acorex-components-selection-list-2.d.ts",
391
- "default": "./fesm2022/acorex-components-selection-list-2.mjs"
392
- },
393
390
  "./side-menu": {
394
391
  "types": "./types/acorex-components-side-menu.d.ts",
395
392
  "default": "./fesm2022/acorex-components-side-menu.mjs"
@@ -1,7 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { TemplateRef } from '@angular/core';
3
- import { NXComponent, AXStyleLookType, AXValueChangedEvent, AXFocusEvent, AXItemClickEvent, AXItemSelectedEvent, AXEvent } from '@acorex/cdk/common';
2
+ import { TemplateRef, ElementRef } from '@angular/core';
3
+ import { NXValueComponent, AXStyleLookType, AXValueChangedEvent, AXFocusEvent, AXItemClickEvent, AXItemSelectedEvent, AXEvent, AXHtmlEvent } 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
  *
@@ -44,8 +46,12 @@ type AXComboBoxValue = string | number | (string | number)[] | null;
44
46
  *
45
47
  * @category Components
46
48
  */
47
- declare class AXComboBoxComponent extends NXComponent implements FormValueControl<AXComboBoxValue> {
49
+ declare class AXComboBoxComponent extends NXValueComponent implements FormValueControl<AXComboBoxValue> {
48
50
  #private;
51
+ /**
52
+ * The name of the form field, used by validation rules and `ax-form.validate(names)`.
53
+ */
54
+ name: _angular_core.InputSignal<string>;
49
55
  /**
50
56
  * The list of items the user can select from.
51
57
  * Each item has `id` (search/identity), `text` (display), and `value` (submitted).
@@ -54,6 +60,7 @@ declare class AXComboBoxComponent extends NXComponent implements FormValueContro
54
60
  /**
55
61
  * Whether the combo box accepts typing and filters the list (`true`),
56
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.
57
64
  */
58
65
  searchable: _angular_core.InputSignal<boolean>;
59
66
  /**
@@ -63,7 +70,8 @@ declare class AXComboBoxComponent extends NXComponent implements FormValueContro
63
70
  multiple: _angular_core.InputSignal<boolean>;
64
71
  /**
65
72
  * When `true` (default), the popup list uses the alternate actionsheet presentation on small
66
- * 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.
67
75
  */
68
76
  adaptivityEnabled: _angular_core.InputSignal<boolean>;
69
77
  /**
@@ -79,8 +87,9 @@ declare class AXComboBoxComponent extends NXComponent implements FormValueContro
79
87
  */
80
88
  placeholder: _angular_core.InputSignal<string>;
81
89
  /**
82
- * Placeholder for the trigger search input when items are already selected (multi-select).
83
- * 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.
84
93
  */
85
94
  searchPlaceholder: _angular_core.InputSignal<string>;
86
95
  /**
@@ -150,6 +159,12 @@ declare class AXComboBoxComponent extends NXComponent implements FormValueContro
150
159
  protected expanded: _angular_core.WritableSignal<boolean>;
151
160
  /** Whether the list is currently shown as a bottom actionsheet (small screens + adaptivity). */
152
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>;
153
168
  /** The current selection normalized to an array of submitted values. */
154
169
  protected selectedValues: _angular_core.Signal<(string | number)[]>;
155
170
  /** Whether there is at least one selected value. */
@@ -173,9 +188,14 @@ declare class AXComboBoxComponent extends NXComponent implements FormValueContro
173
188
  protected selection: _angular_core.WritableSignal<string[]>;
174
189
  /** Items filtered by typed query against `id` when the combo box is searchable. */
175
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>;
176
193
  protected comboboxRef: _angular_core.Signal<Combobox>;
177
194
  protected listboxRef: _angular_core.Signal<Listbox<any>>;
178
195
  protected popoverRef: _angular_core.Signal<AXPopoverComponent>;
196
+ protected originRef: _angular_core.Signal<ElementRef<HTMLElement>>;
197
+ protected popupRef: _angular_core.Signal<ElementRef<HTMLElement>>;
198
+ protected sheetSearchRef: _angular_core.Signal<AXSearchBoxComponent>;
179
199
  constructor();
180
200
  /** Stable unique key for `@for` — avoids NG0955 when `id` is missing or duplicated. */
181
201
  protected trackItemKey(index: number, item: AXComboBoxItem): string;
@@ -187,12 +207,23 @@ declare class AXComboBoxComponent extends NXComponent implements FormValueContro
187
207
  protected onTriggerClick(): void;
188
208
  /**
189
209
  * Keyboard handling on the trigger:
210
+ * - Searchable: Enter never submits the form; with no matches the value is cleared (`null`).
190
211
  * - Non-searchable: open with Enter/Space when collapsed; commit with Space when expanded.
191
212
  * - Multi-select: Backspace removes the last chip when the search input is empty.
192
213
  */
193
214
  protected onTriggerKeydown(event: KeyboardEvent): void;
194
- /** Blocks typing in non-searchable mode without Combobox `readonly` (keeps Tab/keyboard working). */
215
+ /** Handles Enter in the actionsheet search field (no form submit; clear on no matches). */
216
+ protected onSheetSearchKeydown(e: AXHtmlEvent<KeyboardEvent>): void;
217
+ /** Blocks typing when the trigger is not editable (keeps Tab / keyboard open working). */
195
218
  protected onBeforeInput(event: Event): void;
219
+ /**
220
+ * Combobox `expanded` two-way binding. On actionsheet with in-sheet search, ignore collapse
221
+ * so focusing the search field (Aria combobox blur) does not close the popup. Dismiss is owned
222
+ * by the header Apply/close button, `commit()`, and Escape. On desktop, outside click also closes.
223
+ */
224
+ protected onExpandedChange(open: boolean): void;
225
+ /** Filters the list from the actionsheet search field (reads the input so delayed ngModel cannot block typing). */
226
+ protected onSheetSearchInput(): void;
196
227
  /**
197
228
  * Keeps the combobox expanded state in sync when the popover closes (e.g. click outside).
198
229
  */
@@ -223,14 +254,20 @@ declare class AXComboBoxComponent extends NXComponent implements FormValueContro
223
254
  * that option. Clicks resolve from the event target so we do not depend on listener order vs ngListbox.
224
255
  *
225
256
  * In multi-select mode the item is toggled and the popup stays open.
257
+ * When the user typed a query with no matches, Enter clears single-select to `null`.
226
258
  */
259
+ protected onListEnter(event: Event): void;
227
260
  protected commit(event?: Event): void;
261
+ /**
262
+ * Focuses the combo box trigger input.
263
+ */
264
+ focus(options?: FocusOptions): void;
228
265
  /** Forwards native focus from the trigger input. */
229
266
  protected emitOnFocus(e: FocusEvent): void;
230
267
  /** Forwards native blur from the trigger input. */
231
268
  protected emitOnBlur(e: FocusEvent): void;
232
269
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXComboBoxComponent, never>;
233
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXComboBoxComponent, "ax-combo-box", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "adaptivityEnabled": { "alias": "adaptivityEnabled"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "alternate": { "alias": "alternate"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "selectedTemplate": { "alias": "selectedTemplate"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "look": "lookChange"; "value": "valueChange"; "onValueChanged": "onValueChanged"; "onFocus": "onFocus"; "onBlur": "onBlur"; "onItemClick": "onItemClick"; "onItemSelected": "onItemSelected"; "onOpened": "onOpened"; "onClosed": "onClosed"; }, never, ["ax-prefix", "ax-clear-button", "ax-suffix", "ax-header", "ax-footer"], true, never>;
270
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXComboBoxComponent, "ax-combo-box", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "adaptivityEnabled": { "alias": "adaptivityEnabled"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "alternate": { "alias": "alternate"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "selectedTemplate": { "alias": "selectedTemplate"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "look": "lookChange"; "value": "valueChange"; "onValueChanged": "onValueChanged"; "onFocus": "onFocus"; "onBlur": "onBlur"; "onItemClick": "onItemClick"; "onItemSelected": "onItemSelected"; "onOpened": "onOpened"; "onClosed": "onClosed"; }, never, ["ax-prefix", "ax-clear-button", "ax-suffix", "ax-header", "ax-footer", "ax-validation-rule"], true, never>;
234
271
  }
235
272
 
236
273
  declare class AXComboBoxModule {