@acorex/components 22.0.0-next.9 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/combo-box/README.md +35 -0
- package/fesm2022/acorex-components-accordion.mjs +2 -2
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +1 -0
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +2 -2
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +4 -4
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +10 -12
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +2 -2
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-combo-box.mjs +783 -0
- package/fesm2022/acorex-components-combo-box.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs +50 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs.map +1 -0
- package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs → acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs} +7 -20
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation.mjs +9946 -17396
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +188 -64
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +14 -16
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +61 -32
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +21 -5
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +7 -4
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +2 -2
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +4 -4
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-fab.mjs +5 -5
- package/fesm2022/acorex-components-fab.mjs.map +1 -1
- package/fesm2022/acorex-components-file-viewer.mjs +27 -27
- package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +21 -5
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +238 -36
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +2 -2
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +2 -2
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +59 -42
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-lookup.mjs +2897 -0
- package/fesm2022/acorex-components-lookup.mjs.map +1 -0
- package/fesm2022/acorex-components-map.mjs +2 -2
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +238 -75
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +13 -6
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +30 -29
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +3 -3
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +29 -6
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +4 -2
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +2 -2
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +2 -2
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +12 -22
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +55 -18
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +2 -2
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +2 -2
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +2 -2
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +2 -2
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +2 -2
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +9 -2
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +2 -2
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +40 -3
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/lookup/README.md +74 -0
- package/package.json +12 -7
- package/select-box/README.md +5 -0
- package/types/acorex-components-action-sheet.d.ts +9 -1
- package/types/acorex-components-combo-box.d.ts +280 -0
- package/types/acorex-components-conversation.d.ts +947 -1354
- package/types/acorex-components-data-table.d.ts +47 -5
- package/types/acorex-components-datetime-box.d.ts +2 -0
- package/types/acorex-components-datetime-input.d.ts +24 -5
- package/types/acorex-components-decorators.d.ts +1 -0
- package/types/acorex-components-dialog.d.ts +9 -0
- package/types/acorex-components-grid-layout-builder.d.ts +34 -2
- package/types/acorex-components-loading-dialog.d.ts +12 -4
- package/types/acorex-components-lookup.d.ts +831 -0
- package/types/acorex-components-menu.d.ts +28 -4
- package/types/acorex-components-notification.d.ts +11 -1
- package/types/acorex-components-number-box.d.ts +3 -1
- package/types/acorex-components-popover.d.ts +10 -1
- package/types/acorex-components-popup.d.ts +9 -1
- package/types/acorex-components-scheduler.d.ts +2 -4
- package/types/acorex-components-select-box.d.ts +21 -4
- package/types/acorex-components-toast.d.ts +10 -1
- package/types/acorex-components-tree-view.d.ts +9 -1
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs +0 -106
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs.map +0 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +0 -168
- package/fesm2022/acorex-components-selection-list-2.mjs.map +0 -1
- package/selection-list-2/README.md +0 -3
- package/types/acorex-components-selection-list-2.d.ts +0 -52
|
@@ -0,0 +1,831 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, ElementRef } from '@angular/core';
|
|
3
|
+
import { AXEvent, AXDataSource, AXListDataSource, AXHtmlEvent, NXValueComponent, AXStyleLookType, AXValueChangedEvent, AXFocusEvent, AXItemClickEvent, AXItemSelectedEvent } from '@acorex/cdk/common';
|
|
4
|
+
import { AXPopoverComponent } from '@acorex/components/popover';
|
|
5
|
+
import { AXSearchBoxComponent } from '@acorex/components/search-box';
|
|
6
|
+
import { AXTreeViewDataSource, AXTreeViewItemTemplateContext, AXTreeViewSelectionChangeEvent, AXTreeViewSelectionBehavior, AXTreeViewNode } from '@acorex/components/tree-view';
|
|
7
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
8
|
+
import { AXListNavigationDirective, AXListNavigationItemDirective } from '@acorex/cdk/list-navigation';
|
|
9
|
+
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
10
|
+
import { AXDataTableComponent, AXDataTableRowClick } from '@acorex/components/data-table';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The lookup rendering mode. Each mode is rendered by its own internal mini component:
|
|
14
|
+
*
|
|
15
|
+
* - `drop-down-list` — a predefined list of options for picking single values.
|
|
16
|
+
* - `multi-select` — a predefined list of options for multiple item selection.
|
|
17
|
+
* - `drop-down-tree` — a tree-like structure for single item selection.
|
|
18
|
+
* - `multi-select-tree` — a tree-like structure for multiple item selection.
|
|
19
|
+
* - `multi-column` — a table-structured list for single selection.
|
|
20
|
+
* - `multi-column-tree` — a multi-column table with a drop-down tree inside it (expandable rows).
|
|
21
|
+
*/
|
|
22
|
+
type AXLookupMode = 'drop-down-list' | 'multi-select' | 'drop-down-tree' | 'multi-select-tree' | 'multi-column' | 'multi-column-tree';
|
|
23
|
+
/**
|
|
24
|
+
* A column definition for the `multi-column` and `multi-column-tree` lookup modes
|
|
25
|
+
* (rendered via `ax-data-table`).
|
|
26
|
+
*
|
|
27
|
+
* - `field` — the item property rendered in this column (`ax-text-column` `dataField`).
|
|
28
|
+
* - `title` — the header text of the column (`ax-text-column` `caption`).
|
|
29
|
+
* - `width` — optional column width (`120px`, `20%`, or `auto`). Defaults to `auto`.
|
|
30
|
+
* - `expandHandler` — when `true`, this column shows the tree expand/collapse control
|
|
31
|
+
* (`multi-column-tree` only). If omitted, the column matching `textField` (or the first
|
|
32
|
+
* column) is used.
|
|
33
|
+
*/
|
|
34
|
+
interface AXLookupColumn {
|
|
35
|
+
field: string;
|
|
36
|
+
title: string;
|
|
37
|
+
width?: string;
|
|
38
|
+
expandHandler?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A lookup item. Items are plain records; the lookup reads them through
|
|
42
|
+
* `valueField` / `textField` / `disabledField` mappings.
|
|
43
|
+
*/
|
|
44
|
+
type AXLookupItem = Record<string, unknown>;
|
|
45
|
+
/**
|
|
46
|
+
* Internal event emitted by the mini view components when the user picks or toggles an item.
|
|
47
|
+
*/
|
|
48
|
+
interface AXLookupItemClickEvent {
|
|
49
|
+
item: AXLookupItem;
|
|
50
|
+
value: unknown;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Emitted by `ax-lookup` when the selection changes, carrying the resolved selected items.
|
|
54
|
+
*/
|
|
55
|
+
interface AXLookupSelectionChangedEvent extends AXEvent {
|
|
56
|
+
items: AXLookupItem[];
|
|
57
|
+
value: unknown | unknown[] | null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Internal mini component for the `drop-down-tree` lookup mode:
|
|
62
|
+
* a predefined list rendered in a tree-like structure for single item selection.
|
|
63
|
+
*
|
|
64
|
+
* @category Components
|
|
65
|
+
*/
|
|
66
|
+
declare class AXLookupDropDownTreeComponent {
|
|
67
|
+
/**
|
|
68
|
+
* The tree datasource: an array of nodes or a lazy children callback.
|
|
69
|
+
*/
|
|
70
|
+
dataSource: _angular_core.InputSignal<AXTreeViewDataSource>;
|
|
71
|
+
/**
|
|
72
|
+
* The node property used as the selection value (tree `idField`).
|
|
73
|
+
*/
|
|
74
|
+
valueField: _angular_core.InputSignal<string>;
|
|
75
|
+
/**
|
|
76
|
+
* The node property used as the display text (tree `titleField`).
|
|
77
|
+
*/
|
|
78
|
+
textField: _angular_core.InputSignal<string>;
|
|
79
|
+
/**
|
|
80
|
+
* The node property marking a node as disabled.
|
|
81
|
+
*/
|
|
82
|
+
disabledField: _angular_core.InputSignal<string>;
|
|
83
|
+
/**
|
|
84
|
+
* Currently selected values (at most one for single selection).
|
|
85
|
+
*/
|
|
86
|
+
selectedValues: _angular_core.InputSignal<unknown[]>;
|
|
87
|
+
/**
|
|
88
|
+
* Custom template rendered for each tree node.
|
|
89
|
+
*/
|
|
90
|
+
nodeTemplate: _angular_core.InputSignal<TemplateRef<AXTreeViewItemTemplateContext>>;
|
|
91
|
+
/**
|
|
92
|
+
* Custom template rendered when the filtered tree has no nodes.
|
|
93
|
+
*/
|
|
94
|
+
emptyTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
95
|
+
/**
|
|
96
|
+
* When `true`, visible tree nodes use alternating background colors.
|
|
97
|
+
*/
|
|
98
|
+
alternate: _angular_core.InputSignal<boolean>;
|
|
99
|
+
/**
|
|
100
|
+
* Unique id that changes on every search apply so a new tree instance is created.
|
|
101
|
+
*/
|
|
102
|
+
filterKey: _angular_core.InputSignal<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Emitted when the user selects a node.
|
|
105
|
+
*/
|
|
106
|
+
itemClick: _angular_core.OutputEmitterRef<AXLookupItemClickEvent>;
|
|
107
|
+
protected selectedIds: _angular_core.Signal<string[]>;
|
|
108
|
+
protected isEmpty: _angular_core.Signal<boolean>;
|
|
109
|
+
protected treeInstances: _angular_core.Signal<{
|
|
110
|
+
id: string;
|
|
111
|
+
source: AXTreeViewDataSource;
|
|
112
|
+
}[]>;
|
|
113
|
+
/** Whether the filtered tree currently has no nodes. */
|
|
114
|
+
hasNoMatches(): boolean;
|
|
115
|
+
protected handleSelectionChange(e: AXTreeViewSelectionChangeEvent): void;
|
|
116
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXLookupDropDownTreeComponent, never>;
|
|
117
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXLookupDropDownTreeComponent, "ax-lookup-drop-down-tree", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "selectedValues": { "alias": "selectedValues"; "required": false; "isSignal": true; }; "nodeTemplate": { "alias": "nodeTemplate"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; "alternate": { "alias": "alternate"; "required": false; "isSignal": true; }; "filterKey": { "alias": "filterKey"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; }, never, never, true, never>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Shared `AXDataSource` + CDK virtual scroll plumbing for the list-based lookup views
|
|
122
|
+
* (`ax-lookup-drop-down-list`, `ax-lookup-multi-select`).
|
|
123
|
+
*/
|
|
124
|
+
declare abstract class AXLookupListViewBase {
|
|
125
|
+
#private;
|
|
126
|
+
/**
|
|
127
|
+
* The datasource providing the items (paged, remote-capable).
|
|
128
|
+
*/
|
|
129
|
+
dataSource: _angular_core.InputSignal<AXDataSource<AXLookupItem>>;
|
|
130
|
+
/**
|
|
131
|
+
* The item property used as the selection value.
|
|
132
|
+
*/
|
|
133
|
+
valueField: _angular_core.InputSignal<string>;
|
|
134
|
+
/**
|
|
135
|
+
* The item property used as the display text.
|
|
136
|
+
*/
|
|
137
|
+
textField: _angular_core.InputSignal<string>;
|
|
138
|
+
/**
|
|
139
|
+
* The item property marking an item as disabled.
|
|
140
|
+
*/
|
|
141
|
+
disabledField: _angular_core.InputSignal<string>;
|
|
142
|
+
/**
|
|
143
|
+
* Currently selected values (always an array, even for single selection).
|
|
144
|
+
*/
|
|
145
|
+
selectedValues: _angular_core.InputSignal<unknown[]>;
|
|
146
|
+
/**
|
|
147
|
+
* The fixed row height in pixels used by the virtual scroll viewport.
|
|
148
|
+
*/
|
|
149
|
+
itemHeight: _angular_core.InputSignal<number>;
|
|
150
|
+
/**
|
|
151
|
+
* The maximum number of rows visible before the popup scrolls.
|
|
152
|
+
*/
|
|
153
|
+
maxVisibleItems: _angular_core.InputSignal<number>;
|
|
154
|
+
/**
|
|
155
|
+
* Custom template rendered for each item. Context: `$implicit` is the item.
|
|
156
|
+
* Default option chrome is not applied on top of the template.
|
|
157
|
+
*/
|
|
158
|
+
itemTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
159
|
+
/**
|
|
160
|
+
* Custom template rendered when the datasource has no items.
|
|
161
|
+
*/
|
|
162
|
+
emptyTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
163
|
+
/**
|
|
164
|
+
* Custom template rendered for rows whose page is still loading.
|
|
165
|
+
*/
|
|
166
|
+
loadingTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
167
|
+
/**
|
|
168
|
+
* When `true`, list rows use alternating background colors for easier scanning.
|
|
169
|
+
*/
|
|
170
|
+
alternate: _angular_core.InputSignal<boolean>;
|
|
171
|
+
/**
|
|
172
|
+
* Emitted when the user picks (or toggles) an item.
|
|
173
|
+
*/
|
|
174
|
+
itemClick: _angular_core.OutputEmitterRef<AXLookupItemClickEvent>;
|
|
175
|
+
/**
|
|
176
|
+
* Emitted when keyboard navigation should leave the list (e.g. ArrowUp on the first
|
|
177
|
+
* item, or a printable key that should return focus to the trigger search input).
|
|
178
|
+
*/
|
|
179
|
+
navigateOut: _angular_core.OutputEmitterRef<"up" | "typeahead">;
|
|
180
|
+
/** CDK virtual scroll adapter over the datasource. */
|
|
181
|
+
protected listDataSource: _angular_core.WritableSignal<AXListDataSource<AXLookupItem>>;
|
|
182
|
+
protected totalCount: _angular_core.WritableSignal<number>;
|
|
183
|
+
protected isLoading: _angular_core.WritableSignal<boolean>;
|
|
184
|
+
protected isEmpty: _angular_core.Signal<boolean>;
|
|
185
|
+
/** Whether the filtered datasource currently has no items. */
|
|
186
|
+
hasNoMatches(): boolean;
|
|
187
|
+
/** Number of items in the current filtered result set. */
|
|
188
|
+
matchCount(): number;
|
|
189
|
+
/** Viewport height so the popup grows with the items up to `maxVisibleItems`. */
|
|
190
|
+
protected viewportHeight: _angular_core.Signal<number>;
|
|
191
|
+
protected viewportRef: _angular_core.Signal<CdkVirtualScrollViewport>;
|
|
192
|
+
protected listNavigation: _angular_core.Signal<AXListNavigationDirective>;
|
|
193
|
+
protected navItems: _angular_core.Signal<readonly AXListNavigationItemDirective[]>;
|
|
194
|
+
constructor();
|
|
195
|
+
/** Moves keyboard focus to the first rendered list option. */
|
|
196
|
+
focusFirst(): void;
|
|
197
|
+
protected getValue(item: AXLookupItem): unknown;
|
|
198
|
+
protected getText(item: AXLookupItem): string;
|
|
199
|
+
protected isSelected(item: AXLookupItem): boolean;
|
|
200
|
+
protected isDisabled(item: AXLookupItem): boolean;
|
|
201
|
+
protected handleItemClick(item: AXLookupItem | null | undefined): void;
|
|
202
|
+
/**
|
|
203
|
+
* Commit on mousedown (not click) so a searchable trigger blur cannot destroy the
|
|
204
|
+
* list before the pick is applied.
|
|
205
|
+
*/
|
|
206
|
+
protected handleItemMouseDown(event: Event, item: AXLookupItem | null | undefined): void;
|
|
207
|
+
protected handleItemKeypress(e: AXHtmlEvent<KeyboardEvent>, item: AXLookupItem | null | undefined): void;
|
|
208
|
+
protected handleListKeypress(e: AXHtmlEvent<KeyboardEvent>): void;
|
|
209
|
+
protected activateNavItem(nav: AXListNavigationDirective, item: AXListNavigationItemDirective): void;
|
|
210
|
+
protected trackByIndex: (index: number) => number;
|
|
211
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXLookupListViewBase, never>;
|
|
212
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXLookupListViewBase, never, never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "selectedValues": { "alias": "selectedValues"; "required": false; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "maxVisibleItems": { "alias": "maxVisibleItems"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; "loadingTemplate": { "alias": "loadingTemplate"; "required": false; "isSignal": true; }; "alternate": { "alias": "alternate"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; "navigateOut": "navigateOut"; }, never, never, true, never>;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Selection payload of the multi-select tree view.
|
|
217
|
+
*/
|
|
218
|
+
interface AXLookupTreeSelectionEvent {
|
|
219
|
+
ids: string[];
|
|
220
|
+
nodes: AXTreeViewNode[];
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Internal mini component for the `multi-select-tree` lookup mode:
|
|
224
|
+
* a predefined list rendered in a tree-like structure for multiple item selection.
|
|
225
|
+
*
|
|
226
|
+
* @category Components
|
|
227
|
+
*/
|
|
228
|
+
declare class AXLookupMultiSelectTreeComponent {
|
|
229
|
+
/**
|
|
230
|
+
* The tree datasource: an array of nodes or a lazy children callback.
|
|
231
|
+
*/
|
|
232
|
+
dataSource: _angular_core.InputSignal<AXTreeViewDataSource>;
|
|
233
|
+
/**
|
|
234
|
+
* The node property used as the selection value (tree `idField`).
|
|
235
|
+
*/
|
|
236
|
+
valueField: _angular_core.InputSignal<string>;
|
|
237
|
+
/**
|
|
238
|
+
* The node property used as the display text (tree `titleField`).
|
|
239
|
+
*/
|
|
240
|
+
textField: _angular_core.InputSignal<string>;
|
|
241
|
+
/**
|
|
242
|
+
* The node property marking a node as disabled.
|
|
243
|
+
*/
|
|
244
|
+
disabledField: _angular_core.InputSignal<string>;
|
|
245
|
+
/**
|
|
246
|
+
* Currently selected values.
|
|
247
|
+
*/
|
|
248
|
+
selectedValues: _angular_core.InputSignal<unknown[]>;
|
|
249
|
+
/**
|
|
250
|
+
* How selecting parent/child nodes affects each other. Passed through to the tree-view.
|
|
251
|
+
*/
|
|
252
|
+
selectionBehavior: _angular_core.InputSignal<AXTreeViewSelectionBehavior>;
|
|
253
|
+
/**
|
|
254
|
+
* Custom template rendered for each tree node.
|
|
255
|
+
*/
|
|
256
|
+
nodeTemplate: _angular_core.InputSignal<TemplateRef<AXTreeViewItemTemplateContext>>;
|
|
257
|
+
/**
|
|
258
|
+
* Custom template rendered when the filtered tree has no nodes.
|
|
259
|
+
*/
|
|
260
|
+
emptyTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
261
|
+
/**
|
|
262
|
+
* When `true`, visible tree nodes use alternating background colors.
|
|
263
|
+
*/
|
|
264
|
+
alternate: _angular_core.InputSignal<boolean>;
|
|
265
|
+
/**
|
|
266
|
+
* Unique id that changes on every search apply so a new tree instance is created.
|
|
267
|
+
*/
|
|
268
|
+
filterKey: _angular_core.InputSignal<string>;
|
|
269
|
+
/**
|
|
270
|
+
* Emitted when the user changes the tree selection.
|
|
271
|
+
*/
|
|
272
|
+
selectionChange: _angular_core.OutputEmitterRef<AXLookupTreeSelectionEvent>;
|
|
273
|
+
protected selectedIds: _angular_core.Signal<string[]>;
|
|
274
|
+
protected isEmpty: _angular_core.Signal<boolean>;
|
|
275
|
+
protected treeInstances: _angular_core.Signal<{
|
|
276
|
+
id: string;
|
|
277
|
+
source: AXTreeViewDataSource;
|
|
278
|
+
}[]>;
|
|
279
|
+
/** Whether the filtered tree currently has no nodes. */
|
|
280
|
+
hasNoMatches(): boolean;
|
|
281
|
+
protected handleSelectionChange(e: AXTreeViewSelectionChangeEvent): void;
|
|
282
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXLookupMultiSelectTreeComponent, never>;
|
|
283
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXLookupMultiSelectTreeComponent, "ax-lookup-multi-select-tree", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "selectedValues": { "alias": "selectedValues"; "required": false; "isSignal": true; }; "selectionBehavior": { "alias": "selectionBehavior"; "required": false; "isSignal": true; }; "nodeTemplate": { "alias": "nodeTemplate"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; "alternate": { "alias": "alternate"; "required": false; "isSignal": true; }; "filterKey": { "alias": "filterKey"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* An advanced drop-down (lookup) editor with six modes, `AXDataSource` support, and virtual scrolling.
|
|
288
|
+
*
|
|
289
|
+
* Modes (each rendered by its own internal mini component):
|
|
290
|
+
* - `drop-down-list` — a predefined list of options for picking single values.
|
|
291
|
+
* - `multi-select` — a predefined list of options for multiple item selection (chips in the trigger).
|
|
292
|
+
* - `drop-down-tree` — a tree-like structure for single item selection; when searchable, the trigger
|
|
293
|
+
* input filters nested nodes as you type (on small screens the search field is inside the actionsheet).
|
|
294
|
+
* - `multi-select-tree` — a tree-like structure for multiple item selection; searchable the same way.
|
|
295
|
+
* - `multi-column` — an `ax-data-table` grid; when searchable, the trigger input filters as you type
|
|
296
|
+
* (on small screens the search field is inside the actionsheet).
|
|
297
|
+
* - `multi-column-tree` — a multi-column `ax-data-table` with a drop-down tree inside it
|
|
298
|
+
* (expandable hierarchical rows). Uses `treeDataSource` + `columns`, or a hierarchical `dataSource`.
|
|
299
|
+
*
|
|
300
|
+
* With `adaptivityEnabled` (default `true`), the list opens as a bottom actionsheet on small
|
|
301
|
+
* screens instead of an anchored dropdown — the same alternate presentation as `ax-select-box`.
|
|
302
|
+
*
|
|
303
|
+
* Implements {@link FormValueControl} so `[(ngModel)]` / signal forms work via the `value` model
|
|
304
|
+
* (no `ControlValueAccessor`).
|
|
305
|
+
*
|
|
306
|
+
* @category Components
|
|
307
|
+
*/
|
|
308
|
+
declare class AXLookupComponent extends NXValueComponent implements FormValueControl<unknown | unknown[] | null> {
|
|
309
|
+
#private;
|
|
310
|
+
/**
|
|
311
|
+
* The name of the form field, used by validation rules and `ax-form.validate(names)`.
|
|
312
|
+
*/
|
|
313
|
+
name: _angular_core.InputSignal<string>;
|
|
314
|
+
/**
|
|
315
|
+
* The lookup rendering mode. Selects which mini component renders in the popup.
|
|
316
|
+
*/
|
|
317
|
+
mode: _angular_core.InputSignal<AXLookupMode>;
|
|
318
|
+
/**
|
|
319
|
+
* The items source for list-based modes (`drop-down-list`, `multi-select`, `multi-column`)
|
|
320
|
+
* and for `multi-column-tree` when `treeDataSource` is not set.
|
|
321
|
+
* Accepts an `AXDataSource` (remote paging, `byKey`, server-side filter) or a plain array.
|
|
322
|
+
*/
|
|
323
|
+
dataSource: _angular_core.InputSignal<AXLookupItem[] | AXDataSource<AXLookupItem>>;
|
|
324
|
+
/**
|
|
325
|
+
* The nodes source for tree modes (`drop-down-tree`, `multi-select-tree`, `multi-column-tree`):
|
|
326
|
+
* an array of nodes or a lazy children callback.
|
|
327
|
+
*/
|
|
328
|
+
treeDataSource: _angular_core.InputSignal<AXTreeViewDataSource>;
|
|
329
|
+
/**
|
|
330
|
+
* The item property used as the selection value. Maps to the tree `idField` in tree modes.
|
|
331
|
+
*/
|
|
332
|
+
valueField: _angular_core.InputSignal<string>;
|
|
333
|
+
/**
|
|
334
|
+
* The item property used as the display text. Maps to the tree `titleField` in tree modes
|
|
335
|
+
* (set it to `title` when your nodes use the default tree shape).
|
|
336
|
+
*/
|
|
337
|
+
textField: _angular_core.InputSignal<string>;
|
|
338
|
+
/**
|
|
339
|
+
* The item property marking an item as disabled.
|
|
340
|
+
*/
|
|
341
|
+
disabledField: _angular_core.InputSignal<string>;
|
|
342
|
+
/**
|
|
343
|
+
* Column definitions for the `multi-column` and `multi-column-tree` modes
|
|
344
|
+
* (rendered as `ax-text-column` in `ax-data-table`).
|
|
345
|
+
*/
|
|
346
|
+
columns: _angular_core.InputSignal<AXLookupColumn[]>;
|
|
347
|
+
/**
|
|
348
|
+
* Field used by `multi-column-tree` to fetch children when a row is expanded
|
|
349
|
+
* (`AXDataSource` filter). Defaults to `parentId`. Nested `children` arrays are also supported.
|
|
350
|
+
*/
|
|
351
|
+
treeParentField: _angular_core.InputSignal<string>;
|
|
352
|
+
/**
|
|
353
|
+
* Field used by `multi-column-tree` to decide whether a row shows an expand control.
|
|
354
|
+
* Defaults to `hasChild`. Nodes with `children` / `childrenCount` are mapped automatically
|
|
355
|
+
* when using `treeDataSource`.
|
|
356
|
+
*/
|
|
357
|
+
hasChildrenField: _angular_core.InputSignal<string>;
|
|
358
|
+
/**
|
|
359
|
+
* Whether the trigger accepts typing and filters the datasource (`true`),
|
|
360
|
+
* or is select-only with no writable input (`false`).
|
|
361
|
+
* Applies to all modes, including `drop-down-tree` and `multi-select-tree`.
|
|
362
|
+
* On small screens with `adaptivityEnabled`, search is typed in the actionsheet instead of the trigger.
|
|
363
|
+
*/
|
|
364
|
+
searchable: _angular_core.InputSignal<boolean>;
|
|
365
|
+
/**
|
|
366
|
+
* When `true` (default), the popup list uses the alternate actionsheet presentation on small
|
|
367
|
+
* screens (`SM`). Searchable list modes then show a search field inside the sheet. When `false`,
|
|
368
|
+
* the list always opens as an anchored dropdown.
|
|
369
|
+
*/
|
|
370
|
+
adaptivityEnabled: _angular_core.InputSignal<boolean>;
|
|
371
|
+
/**
|
|
372
|
+
* Title shown in the actionsheet header on small screens. Falls back to `placeholder`.
|
|
373
|
+
*/
|
|
374
|
+
caption: _angular_core.InputSignal<string>;
|
|
375
|
+
/**
|
|
376
|
+
* When `true`, list rows use alternating background colors for easier scanning
|
|
377
|
+
* (all lookup modes, including drop-down-tree and multi-select-tree).
|
|
378
|
+
*/
|
|
379
|
+
alternate: _angular_core.InputSignal<boolean>;
|
|
380
|
+
/**
|
|
381
|
+
* Placeholder for the trigger search input when items are already selected
|
|
382
|
+
* (mainly useful in `multi-select` / `multi-select-tree`), and for the in-sheet search field on small screens.
|
|
383
|
+
* Falls back to `placeholder` when the selection is empty on desktop.
|
|
384
|
+
*/
|
|
385
|
+
searchPlaceholder: _angular_core.InputSignal<string>;
|
|
386
|
+
/**
|
|
387
|
+
* The placeholder text shown when no value is selected.
|
|
388
|
+
*/
|
|
389
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
390
|
+
/**
|
|
391
|
+
* Whether the lookup is disabled.
|
|
392
|
+
*/
|
|
393
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
394
|
+
/**
|
|
395
|
+
* Whether the lookup is readonly.
|
|
396
|
+
*/
|
|
397
|
+
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
398
|
+
/**
|
|
399
|
+
* Predefined look scheme of the editor container. Same looks as other editor components like ax-text-box.
|
|
400
|
+
*/
|
|
401
|
+
look: _angular_core.ModelSignal<AXStyleLookType>;
|
|
402
|
+
/**
|
|
403
|
+
* The fixed row height in pixels used by the virtual scroll viewport (list-based modes).
|
|
404
|
+
*/
|
|
405
|
+
itemHeight: _angular_core.InputSignal<number>;
|
|
406
|
+
/**
|
|
407
|
+
* The maximum number of rows visible before the popup scrolls (list-based modes).
|
|
408
|
+
*/
|
|
409
|
+
maxVisibleItems: _angular_core.InputSignal<number>;
|
|
410
|
+
/**
|
|
411
|
+
* How selecting parent/child nodes affects each other in `multi-select-tree` mode.
|
|
412
|
+
*/
|
|
413
|
+
treeSelectionBehavior: _angular_core.InputSignal<AXTreeViewSelectionBehavior>;
|
|
414
|
+
/**
|
|
415
|
+
* Custom template rendered for each item/node. Context: `$implicit` is the item.
|
|
416
|
+
* Default option chrome (padding, typography, check icon) is not applied; only the
|
|
417
|
+
* template's styles are used. Selection and hover backgrounds remain on the row.
|
|
418
|
+
*/
|
|
419
|
+
itemTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
420
|
+
/**
|
|
421
|
+
* Custom template for the selected item display (trigger text / chips). Context: `$implicit` is the item.
|
|
422
|
+
*/
|
|
423
|
+
selectedTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
424
|
+
/**
|
|
425
|
+
* Custom template rendered when the datasource has no items.
|
|
426
|
+
*/
|
|
427
|
+
emptyTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
428
|
+
/**
|
|
429
|
+
* Custom template rendered for rows whose page is still loading.
|
|
430
|
+
*/
|
|
431
|
+
loadingTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
432
|
+
/**
|
|
433
|
+
* The selected value(s): a scalar in single modes, an array in
|
|
434
|
+
* `multi-select` / `multi-select-tree`. Supports `[(value)]`, `[(ngModel)]`, and signal forms
|
|
435
|
+
* via {@link FormValueControl}.
|
|
436
|
+
*/
|
|
437
|
+
readonly value: _angular_core.ModelSignal<unknown>;
|
|
438
|
+
/**
|
|
439
|
+
* Full items that resolve the current `value` key(s) without calling datasource `byKey`.
|
|
440
|
+
* Use when the parent already has the selected entity (e.g. edit forms). Seeds the internal
|
|
441
|
+
* item cache; missing keys still fall through to `find` / `byKey`.
|
|
442
|
+
*/
|
|
443
|
+
valueItems: _angular_core.InputSignal<AXLookupItem[]>;
|
|
444
|
+
/**
|
|
445
|
+
* Emitted when the selected value changes.
|
|
446
|
+
*/
|
|
447
|
+
onValueChanged: _angular_core.OutputEmitterRef<AXValueChangedEvent<unknown>>;
|
|
448
|
+
/**
|
|
449
|
+
* Emitted when the selection changes, carrying the resolved selected items.
|
|
450
|
+
*/
|
|
451
|
+
onSelectionChanged: _angular_core.OutputEmitterRef<AXLookupSelectionChangedEvent>;
|
|
452
|
+
/**
|
|
453
|
+
* Emitted when the trigger receives focus.
|
|
454
|
+
*/
|
|
455
|
+
onFocus: _angular_core.OutputEmitterRef<AXFocusEvent>;
|
|
456
|
+
/**
|
|
457
|
+
* Emitted when the trigger loses focus.
|
|
458
|
+
*/
|
|
459
|
+
onBlur: _angular_core.OutputEmitterRef<AXFocusEvent>;
|
|
460
|
+
/**
|
|
461
|
+
* Emitted when a list/tree item is clicked.
|
|
462
|
+
*/
|
|
463
|
+
onItemClick: _angular_core.OutputEmitterRef<AXItemClickEvent<AXLookupItem>>;
|
|
464
|
+
/**
|
|
465
|
+
* Emitted when an item is selected (click or keyboard).
|
|
466
|
+
*/
|
|
467
|
+
onItemSelected: _angular_core.OutputEmitterRef<AXItemSelectedEvent<AXLookupItem>>;
|
|
468
|
+
/**
|
|
469
|
+
* Emitted when the popup opens.
|
|
470
|
+
*/
|
|
471
|
+
onOpened: _angular_core.OutputEmitterRef<AXEvent>;
|
|
472
|
+
/**
|
|
473
|
+
* Emitted when the popup closes.
|
|
474
|
+
*/
|
|
475
|
+
onClosed: _angular_core.OutputEmitterRef<AXEvent>;
|
|
476
|
+
/** Whether the popup is expanded. */
|
|
477
|
+
protected expanded: _angular_core.WritableSignal<boolean>;
|
|
478
|
+
/** Whether the list is currently shown as a bottom actionsheet (small screens + adaptivity). */
|
|
479
|
+
protected isActionsheetStyle: _angular_core.WritableSignal<boolean>;
|
|
480
|
+
/** Whether the current mode selects multiple values. */
|
|
481
|
+
protected isMultiple: _angular_core.Signal<boolean>;
|
|
482
|
+
/** Whether the current mode renders a tree. */
|
|
483
|
+
protected isTreeMode: _angular_core.Signal<boolean>;
|
|
484
|
+
/** Whether the current mode can filter as you type (list, table, or tree). */
|
|
485
|
+
protected isListSearchMode: _angular_core.Signal<boolean>;
|
|
486
|
+
/** Whether the trigger input is writable and filters as you type (desktop only). */
|
|
487
|
+
protected isEditableTrigger: _angular_core.Signal<boolean>;
|
|
488
|
+
/** Whether search is typed in the actionsheet instead of the trigger. */
|
|
489
|
+
protected isSheetSearchEnabled: _angular_core.Signal<boolean>;
|
|
490
|
+
/** Query typed in the actionsheet search field (independent of the trigger display text). */
|
|
491
|
+
protected sheetSearchText: _angular_core.WritableSignal<string>;
|
|
492
|
+
/** Increments on every tree filter apply so the tree view remounts with a new instance. */
|
|
493
|
+
protected treeFilterKey: _angular_core.Signal<string>;
|
|
494
|
+
/** The datasource for list-based modes; plain arrays are converted. */
|
|
495
|
+
protected resolvedDataSource: _angular_core.Signal<AXDataSource<AXLookupItem>>;
|
|
496
|
+
protected resolvedTreeDataSource: _angular_core.Signal<AXTreeViewDataSource>;
|
|
497
|
+
/** The current selection normalized to an array. */
|
|
498
|
+
protected selectedValues: _angular_core.Signal<unknown[]>;
|
|
499
|
+
/** The resolved selected items (via cache, datasource `find`/`byKey`, or tree node lookup). */
|
|
500
|
+
protected selectedItems: _angular_core.WritableSignal<AXLookupItem[]>;
|
|
501
|
+
/** Display text shown in the trigger for single modes. */
|
|
502
|
+
protected displayText: _angular_core.Signal<string>;
|
|
503
|
+
/**
|
|
504
|
+
* Text typed in the editable trigger input.
|
|
505
|
+
* Multi-select starts empty; single modes sync from the selected display text.
|
|
506
|
+
*/
|
|
507
|
+
protected searchText: _angular_core.WritableSignal<string>;
|
|
508
|
+
/**
|
|
509
|
+
* Whether the trigger should render `selectedTemplate` instead of the plain input text.
|
|
510
|
+
* Searchable mode shows the template while the popup is closed and the input still matches
|
|
511
|
+
* the selected display text (same pattern as combo-box).
|
|
512
|
+
*/
|
|
513
|
+
protected showSelectedTemplate: _angular_core.Signal<boolean>;
|
|
514
|
+
/** Placeholder for the editable trigger search input. */
|
|
515
|
+
protected triggerSearchPlaceholder: _angular_core.Signal<string>;
|
|
516
|
+
protected popoverRef: _angular_core.Signal<AXPopoverComponent>;
|
|
517
|
+
protected originRef: _angular_core.Signal<ElementRef<HTMLElement>>;
|
|
518
|
+
protected popupRef: _angular_core.Signal<ElementRef<HTMLElement>>;
|
|
519
|
+
protected triggerSearchInput: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
520
|
+
protected listView: _angular_core.Signal<AXLookupListViewBase>;
|
|
521
|
+
protected dropDownTreeView: _angular_core.Signal<AXLookupDropDownTreeComponent>;
|
|
522
|
+
protected multiSelectTreeView: _angular_core.Signal<AXLookupMultiSelectTreeComponent>;
|
|
523
|
+
protected sheetSearchRef: _angular_core.Signal<AXSearchBoxComponent>;
|
|
524
|
+
constructor();
|
|
525
|
+
/** Returns the display text of an item using the `textField` mapping. */
|
|
526
|
+
protected getItemText(item: AXLookupItem): string;
|
|
527
|
+
/** Stable unique key for selected chips — avoids NG0955 and remounts on reorder/remove. */
|
|
528
|
+
protected trackSelectedKey(item: AXLookupItem): unknown;
|
|
529
|
+
/**
|
|
530
|
+
* Opens (editable trigger) or toggles the popup on trigger click.
|
|
531
|
+
*/
|
|
532
|
+
protected onTriggerClick(): void;
|
|
533
|
+
/**
|
|
534
|
+
* Focuses the lookup trigger input.
|
|
535
|
+
*/
|
|
536
|
+
focus(options?: FocusOptions): void;
|
|
537
|
+
/**
|
|
538
|
+
* Handles keyboard interaction on the trigger input.
|
|
539
|
+
*/
|
|
540
|
+
protected onTriggerKeydown(e: KeyboardEvent): void;
|
|
541
|
+
/** Filters the datasource from the actionsheet search field and handles Enter with no matches. */
|
|
542
|
+
protected onSheetSearchKeydown(e: AXHtmlEvent<KeyboardEvent>): void;
|
|
543
|
+
/** Blocks typing when the trigger is not editable (keeps Tab / keyboard open working). */
|
|
544
|
+
protected onBeforeInput(event: Event): void;
|
|
545
|
+
/**
|
|
546
|
+
* Returns focus to the search field when list navigation requests it.
|
|
547
|
+
*/
|
|
548
|
+
protected onListNavigateOut(_reason: 'up' | 'typeahead'): void;
|
|
549
|
+
protected focusListFirst(): void;
|
|
550
|
+
/**
|
|
551
|
+
* Keeps the expanded state in sync when the popover closes (e.g. click outside),
|
|
552
|
+
* and clears any applied search filter.
|
|
553
|
+
*/
|
|
554
|
+
protected onPopoverClosed(): void;
|
|
555
|
+
/**
|
|
556
|
+
* Closes the popup.
|
|
557
|
+
*/
|
|
558
|
+
close(): void;
|
|
559
|
+
/**
|
|
560
|
+
* Closes the popup (alias for {@link close}, required by `AXClosableComponent`).
|
|
561
|
+
*/
|
|
562
|
+
closeAll(): void;
|
|
563
|
+
/**
|
|
564
|
+
* Opens the popup.
|
|
565
|
+
*/
|
|
566
|
+
open(): void;
|
|
567
|
+
/**
|
|
568
|
+
* Handles typing in the editable trigger input.
|
|
569
|
+
*/
|
|
570
|
+
protected onTriggerSearchInput(text: string): void;
|
|
571
|
+
/** Filters the datasource from the actionsheet search field (reads the input so delayed ngModel cannot block typing). */
|
|
572
|
+
protected onSheetSearchInput(): void;
|
|
573
|
+
/**
|
|
574
|
+
* Commits a single pick (drop-down-list, drop-down-tree, multi-column, multi-column-tree) and closes the popup.
|
|
575
|
+
*/
|
|
576
|
+
protected handleSinglePick(e: AXLookupItemClickEvent): void;
|
|
577
|
+
/**
|
|
578
|
+
* Toggles an item in the multi-select list; the popup stays open.
|
|
579
|
+
* Clears the trigger search so the full list returns (select-box-like).
|
|
580
|
+
*/
|
|
581
|
+
protected handleMultiToggle(e: AXLookupItemClickEvent): void;
|
|
582
|
+
/**
|
|
583
|
+
* Applies the multi-select-tree selection to the value; the popup stays open.
|
|
584
|
+
*/
|
|
585
|
+
protected handleTreeSelectionChange(e: AXLookupTreeSelectionEvent): void;
|
|
586
|
+
/** Forwards native focus from the trigger input. */
|
|
587
|
+
protected emitOnFocus(e: FocusEvent): void;
|
|
588
|
+
/** Forwards native blur from the trigger input. */
|
|
589
|
+
protected emitOnBlur(e: FocusEvent): void;
|
|
590
|
+
/**
|
|
591
|
+
* Removes a single chip from the multi selection.
|
|
592
|
+
*/
|
|
593
|
+
protected removeChip(event: Event, item: AXLookupItem): void;
|
|
594
|
+
/**
|
|
595
|
+
* Seeds the item cache with known items so matching `value` keys resolve without `byKey`.
|
|
596
|
+
* Useful after an async parent-entity load when `valueItems` is not bound.
|
|
597
|
+
*
|
|
598
|
+
* @param items - Full items that include `valueField` (and ideally `textField`) properties.
|
|
599
|
+
*/
|
|
600
|
+
seedItems(items: AXLookupItem[]): void;
|
|
601
|
+
/**
|
|
602
|
+
* Clears the whole selection.
|
|
603
|
+
* Sets `null` in single modes and `[]` in multi modes. Used by projected `ax-clear-button`.
|
|
604
|
+
*
|
|
605
|
+
* @param isUserInteraction - Whether the clear was triggered by the user.
|
|
606
|
+
*/
|
|
607
|
+
reset(isUserInteraction?: boolean): void;
|
|
608
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXLookupComponent, never>;
|
|
609
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXLookupComponent, "ax-lookup", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "treeDataSource": { "alias": "treeDataSource"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "treeParentField": { "alias": "treeParentField"; "required": false; "isSignal": true; }; "hasChildrenField": { "alias": "hasChildrenField"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "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; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "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; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "maxVisibleItems": { "alias": "maxVisibleItems"; "required": false; "isSignal": true; }; "treeSelectionBehavior": { "alias": "treeSelectionBehavior"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "selectedTemplate": { "alias": "selectedTemplate"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; "loadingTemplate": { "alias": "loadingTemplate"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "valueItems": { "alias": "valueItems"; "required": false; "isSignal": true; }; }, { "look": "lookChange"; "value": "valueChange"; "onValueChanged": "onValueChanged"; "onSelectionChanged": "onSelectionChanged"; "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>;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Internal mini component for the `drop-down-list` lookup mode:
|
|
614
|
+
* a predefined, virtualized list of options for picking single values.
|
|
615
|
+
*
|
|
616
|
+
* @category Components
|
|
617
|
+
*/
|
|
618
|
+
declare class AXLookupDropDownListComponent extends AXLookupListViewBase {
|
|
619
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXLookupDropDownListComponent, never>;
|
|
620
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXLookupDropDownListComponent, "ax-lookup-drop-down-list", never, {}, {}, never, never, true, never>;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Internal mini component for the `multi-select` lookup mode:
|
|
625
|
+
* a predefined, virtualized list of options with checkboxes for multiple item selection.
|
|
626
|
+
*
|
|
627
|
+
* @category Components
|
|
628
|
+
*/
|
|
629
|
+
declare class AXLookupMultiSelectComponent extends AXLookupListViewBase {
|
|
630
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXLookupMultiSelectComponent, never>;
|
|
631
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXLookupMultiSelectComponent, "ax-lookup-multi-select", never, {}, {}, never, never, true, never>;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Internal mini component for the `multi-column` lookup mode:
|
|
636
|
+
* renders selectable rows in an `ax-data-table` grid and loads further
|
|
637
|
+
* pages as the user scrolls (no pager UI).
|
|
638
|
+
*
|
|
639
|
+
* @category Components
|
|
640
|
+
*/
|
|
641
|
+
declare class AXLookupMultiColumnComponent {
|
|
642
|
+
#private;
|
|
643
|
+
/**
|
|
644
|
+
* The datasource providing the grid rows (paged, remote-capable).
|
|
645
|
+
* Pages are fetched on demand as the user scrolls the table body.
|
|
646
|
+
*/
|
|
647
|
+
dataSource: _angular_core.InputSignal<AXDataSource<AXLookupItem>>;
|
|
648
|
+
/**
|
|
649
|
+
* The item property used as the selection value.
|
|
650
|
+
*/
|
|
651
|
+
valueField: _angular_core.InputSignal<string>;
|
|
652
|
+
/**
|
|
653
|
+
* The item property used as the display text.
|
|
654
|
+
*/
|
|
655
|
+
textField: _angular_core.InputSignal<string>;
|
|
656
|
+
/**
|
|
657
|
+
* The item property marking an item as disabled.
|
|
658
|
+
*/
|
|
659
|
+
disabledField: _angular_core.InputSignal<string>;
|
|
660
|
+
/**
|
|
661
|
+
* Currently selected values (always an array, even for single selection).
|
|
662
|
+
*/
|
|
663
|
+
selectedValues: _angular_core.InputSignal<unknown[]>;
|
|
664
|
+
/**
|
|
665
|
+
* The fixed row height in pixels passed to the data table.
|
|
666
|
+
*/
|
|
667
|
+
itemHeight: _angular_core.InputSignal<number>;
|
|
668
|
+
/**
|
|
669
|
+
* The maximum number of body rows visible before the table scrolls.
|
|
670
|
+
*/
|
|
671
|
+
maxVisibleItems: _angular_core.InputSignal<number>;
|
|
672
|
+
/**
|
|
673
|
+
* Column definitions rendered as `ax-text-column` instances.
|
|
674
|
+
*/
|
|
675
|
+
columns: _angular_core.InputSignal<AXLookupColumn[]>;
|
|
676
|
+
/**
|
|
677
|
+
* Optional custom row content. Context: `$implicit` is the row item.
|
|
678
|
+
* When set, replaces the default multi-column cell layout.
|
|
679
|
+
*/
|
|
680
|
+
itemTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
681
|
+
/**
|
|
682
|
+
* Custom template rendered when the datasource has no items.
|
|
683
|
+
*/
|
|
684
|
+
emptyTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
685
|
+
/**
|
|
686
|
+
* Custom template rendered while the table is loading.
|
|
687
|
+
*/
|
|
688
|
+
loadingTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
689
|
+
/**
|
|
690
|
+
* When `true`, table rows use alternating background colors for easier scanning.
|
|
691
|
+
*/
|
|
692
|
+
alternate: _angular_core.InputSignal<boolean>;
|
|
693
|
+
/**
|
|
694
|
+
* Emitted when the user picks a row.
|
|
695
|
+
*/
|
|
696
|
+
itemClick: _angular_core.OutputEmitterRef<AXLookupItemClickEvent>;
|
|
697
|
+
protected tableRef: _angular_core.Signal<AXDataTableComponent>;
|
|
698
|
+
/**
|
|
699
|
+
* Local table source: one page of whatever has been scrolled in so far.
|
|
700
|
+
* Kept as a stable instance so the table host is not recreated on each page load.
|
|
701
|
+
* `pageSize` grows with `#loadedItems` — never seed with a huge empty array (data-table
|
|
702
|
+
* initializes `displayedRows` as `new Array(pageSize)`, which caused NG0955-level jank).
|
|
703
|
+
*/
|
|
704
|
+
protected readonly tableDataSource: AXDataSource<AXLookupItem>;
|
|
705
|
+
/**
|
|
706
|
+
* Header (~40px) + body rows. Grows with results up to `maxVisibleItems`,
|
|
707
|
+
* then the table body scrolls for the rest.
|
|
708
|
+
*/
|
|
709
|
+
protected tableHeight: _angular_core.Signal<number>;
|
|
710
|
+
protected loadingConfig: _angular_core.Signal<{
|
|
711
|
+
enabled: boolean;
|
|
712
|
+
animation: boolean;
|
|
713
|
+
loadingTemplate: TemplateRef<unknown>;
|
|
714
|
+
}>;
|
|
715
|
+
constructor();
|
|
716
|
+
/** Stable unique key for `@for` — avoids NG0955 when `field` is missing or duplicated. */
|
|
717
|
+
protected trackColumnKey(index: number, column: AXLookupColumn): string;
|
|
718
|
+
protected resolveColumnWidth(column: AXLookupColumn): string | number | 'auto';
|
|
719
|
+
protected resolveRowCssClass: (row: unknown) => string;
|
|
720
|
+
protected handleRowClick(event: AXDataTableRowClick): void;
|
|
721
|
+
protected handleItemClick(item: AXLookupItem | null | undefined): void;
|
|
722
|
+
protected handleItemMouseDown(event: Event, item: AXLookupItem | null | undefined): void;
|
|
723
|
+
protected isSelected(item: AXLookupItem): boolean;
|
|
724
|
+
protected isDisabled(item: AXLookupItem): boolean;
|
|
725
|
+
private getValue;
|
|
726
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXLookupMultiColumnComponent, never>;
|
|
727
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXLookupMultiColumnComponent, "ax-lookup-multi-column", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "selectedValues": { "alias": "selectedValues"; "required": false; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "maxVisibleItems": { "alias": "maxVisibleItems"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; "loadingTemplate": { "alias": "loadingTemplate"; "required": false; "isSignal": true; }; "alternate": { "alias": "alternate"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; }, never, never, true, never>;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Internal mini component for the `multi-column-tree` lookup mode:
|
|
732
|
+
* a multi-column `ax-data-table` with a drop-down tree inside it.
|
|
733
|
+
* Rows expand/collapse via the data-table hierarchy (`parentField` / nested `children`).
|
|
734
|
+
*
|
|
735
|
+
* @category Components
|
|
736
|
+
*/
|
|
737
|
+
declare class AXLookupMultiColumnTreeComponent {
|
|
738
|
+
/**
|
|
739
|
+
* The datasource providing hierarchical rows (roots on load, children via `parentField`).
|
|
740
|
+
*/
|
|
741
|
+
dataSource: _angular_core.InputSignal<AXDataSource<AXLookupItem>>;
|
|
742
|
+
/**
|
|
743
|
+
* The item property used as the selection value (also the data-table row key).
|
|
744
|
+
*/
|
|
745
|
+
valueField: _angular_core.InputSignal<string>;
|
|
746
|
+
/**
|
|
747
|
+
* The item property used as the display text. The matching column shows the expand control
|
|
748
|
+
* unless another column sets `expandHandler`.
|
|
749
|
+
*/
|
|
750
|
+
textField: _angular_core.InputSignal<string>;
|
|
751
|
+
/**
|
|
752
|
+
* The item property marking an item as disabled.
|
|
753
|
+
*/
|
|
754
|
+
disabledField: _angular_core.InputSignal<string>;
|
|
755
|
+
/**
|
|
756
|
+
* Field used by the data table to fetch children (`AXDataSource` filter on expand).
|
|
757
|
+
*/
|
|
758
|
+
parentField: _angular_core.InputSignal<string>;
|
|
759
|
+
/**
|
|
760
|
+
* Field used by the data table to decide whether a row can expand.
|
|
761
|
+
*/
|
|
762
|
+
hasChildrenField: _angular_core.InputSignal<string>;
|
|
763
|
+
/**
|
|
764
|
+
* Currently selected values (always an array, even for single selection).
|
|
765
|
+
*/
|
|
766
|
+
selectedValues: _angular_core.InputSignal<unknown[]>;
|
|
767
|
+
/**
|
|
768
|
+
* The fixed row height in pixels passed to the data table.
|
|
769
|
+
*/
|
|
770
|
+
itemHeight: _angular_core.InputSignal<number>;
|
|
771
|
+
/**
|
|
772
|
+
* The maximum number of body rows visible before the table scrolls.
|
|
773
|
+
*/
|
|
774
|
+
maxVisibleItems: _angular_core.InputSignal<number>;
|
|
775
|
+
/**
|
|
776
|
+
* Column definitions rendered as `ax-text-column` instances.
|
|
777
|
+
*/
|
|
778
|
+
columns: _angular_core.InputSignal<AXLookupColumn[]>;
|
|
779
|
+
/**
|
|
780
|
+
* Optional custom row content. Context: `$implicit` is the row item.
|
|
781
|
+
* When set, replaces the default multi-column cell layout.
|
|
782
|
+
*/
|
|
783
|
+
itemTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
784
|
+
/**
|
|
785
|
+
* Custom template rendered when the datasource has no items.
|
|
786
|
+
*/
|
|
787
|
+
emptyTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
788
|
+
/**
|
|
789
|
+
* Custom template rendered while the table is loading.
|
|
790
|
+
*/
|
|
791
|
+
loadingTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
792
|
+
/**
|
|
793
|
+
* When `true`, table rows use alternating background colors for easier scanning.
|
|
794
|
+
*/
|
|
795
|
+
alternate: _angular_core.InputSignal<boolean>;
|
|
796
|
+
/**
|
|
797
|
+
* Emitted when the user picks a row (not when expanding/collapsing).
|
|
798
|
+
*/
|
|
799
|
+
itemClick: _angular_core.OutputEmitterRef<AXLookupItemClickEvent>;
|
|
800
|
+
/**
|
|
801
|
+
* Header (~40px) + up to `maxVisibleItems` body rows. Expanded children scroll inside.
|
|
802
|
+
*/
|
|
803
|
+
protected tableHeight: _angular_core.Signal<number>;
|
|
804
|
+
protected loadingConfig: _angular_core.Signal<{
|
|
805
|
+
enabled: boolean;
|
|
806
|
+
animation: boolean;
|
|
807
|
+
loadingTemplate: TemplateRef<unknown>;
|
|
808
|
+
}>;
|
|
809
|
+
/** Stable unique key for `@for` — avoids NG0955 when `field` is missing or duplicated. */
|
|
810
|
+
protected trackColumnKey(index: number, column: AXLookupColumn): string;
|
|
811
|
+
protected resolveColumnWidth(column: AXLookupColumn): string | number | 'auto';
|
|
812
|
+
protected isExpandColumn(index: number, column: AXLookupColumn): boolean;
|
|
813
|
+
protected resolveRowCssClass: (row: unknown) => string;
|
|
814
|
+
protected handleRowClick(event: AXDataTableRowClick): void;
|
|
815
|
+
protected handleItemClick(item: AXLookupItem | null | undefined): void;
|
|
816
|
+
protected handleItemMouseDown(event: Event, item: AXLookupItem | null | undefined): void;
|
|
817
|
+
protected isSelected(item: AXLookupItem): boolean;
|
|
818
|
+
protected isDisabled(item: AXLookupItem): boolean;
|
|
819
|
+
private getValue;
|
|
820
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXLookupMultiColumnTreeComponent, never>;
|
|
821
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXLookupMultiColumnTreeComponent, "ax-lookup-multi-column-tree", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "parentField": { "alias": "parentField"; "required": false; "isSignal": true; }; "hasChildrenField": { "alias": "hasChildrenField"; "required": false; "isSignal": true; }; "selectedValues": { "alias": "selectedValues"; "required": false; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "maxVisibleItems": { "alias": "maxVisibleItems"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; "loadingTemplate": { "alias": "loadingTemplate"; "required": false; "isSignal": true; }; "alternate": { "alias": "alternate"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; }, never, never, true, never>;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
declare class AXLookupModule {
|
|
825
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXLookupModule, never>;
|
|
826
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXLookupModule, never, [typeof AXLookupComponent, typeof AXLookupDropDownListComponent, typeof AXLookupMultiSelectComponent, typeof AXLookupDropDownTreeComponent, typeof AXLookupMultiSelectTreeComponent, typeof AXLookupMultiColumnComponent, typeof AXLookupMultiColumnTreeComponent], [typeof AXLookupComponent, typeof AXLookupDropDownListComponent, typeof AXLookupMultiSelectComponent, typeof AXLookupDropDownTreeComponent, typeof AXLookupMultiSelectTreeComponent, typeof AXLookupMultiColumnComponent, typeof AXLookupMultiColumnTreeComponent]>;
|
|
827
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXLookupModule>;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export { AXLookupComponent, AXLookupDropDownListComponent, AXLookupDropDownTreeComponent, AXLookupModule, AXLookupMultiColumnComponent, AXLookupMultiColumnTreeComponent, AXLookupMultiSelectComponent, AXLookupMultiSelectTreeComponent };
|
|
831
|
+
export type { AXLookupColumn, AXLookupItem, AXLookupItemClickEvent, AXLookupMode, AXLookupSelectionChangedEvent, AXLookupTreeSelectionEvent };
|