@acorex/components 22.0.0-next.9 → 22.1.0-next.1
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 +31 -0
- package/fesm2022/acorex-components-action-sheet.mjs +1 -0
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +2 -2
- 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-combo-box.mjs +460 -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-BuNEjswI.mjs} +2 -2
- package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs.map → acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs.map} +1 -1
- package/fesm2022/acorex-components-conversation.mjs +2034 -7467
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +135 -45
- 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 +19 -3
- 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 +2 -2
- 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-grid-layout-builder.mjs +238 -36
- package/fesm2022/acorex-components-grid-layout-builder.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-lookup.mjs +1839 -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 +231 -74
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +9 -2
- 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 +1 -1
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +7 -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-scheduler.mjs +12 -22
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +15 -4
- package/fesm2022/acorex-components-select-box.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/lookup/README.md +52 -0
- package/package.json +11 -3
- 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 +204 -0
- package/types/acorex-components-conversation.d.ts +317 -94
- package/types/acorex-components-data-table.d.ts +35 -3
- 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-lookup.d.ts +624 -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 +4 -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 +8 -2
- package/types/acorex-components-toast.d.ts +10 -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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, Type, OnInit, AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { TemplateRef, Type, ElementRef, OnInit, AfterViewInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import { AXStyleColorType, AXComponentCloseEvent, MXBaseComponent } from '@acorex/cdk/common';
|
|
4
4
|
import { AXOverlayRef } from '@acorex/cdk/overlay';
|
|
5
5
|
import { AXComponentInputs, AXComponentType } from '@acorex/core/components';
|
|
@@ -37,6 +37,14 @@ interface AXActionSheetConfig {
|
|
|
37
37
|
content?: AXActionSheetContentType;
|
|
38
38
|
draggable?: boolean;
|
|
39
39
|
dragUp?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Element used to resolve inherited visual context for overlays rendered
|
|
42
|
+
* outside the originating DOM subtree.
|
|
43
|
+
*
|
|
44
|
+
* This affects Appearance, Light/Dark theme, Contrast, Size, and supported
|
|
45
|
+
* Density context. It does not affect overlay positioning.
|
|
46
|
+
*/
|
|
47
|
+
contextElement?: HTMLElement | ElementRef<HTMLElement>;
|
|
40
48
|
}
|
|
41
49
|
/**
|
|
42
50
|
* Reference to an open action sheet, providing methods to interact with it.
|
|
@@ -0,0 +1,204 @@
|
|
|
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';
|
|
4
|
+
import { AXPopoverComponent } from '@acorex/components/popover';
|
|
5
|
+
import { Combobox } from '@angular/aria/combobox';
|
|
6
|
+
import { Listbox } from '@angular/aria/listbox';
|
|
7
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An item in the combo box list.
|
|
11
|
+
*
|
|
12
|
+
* - `id` — unique key used for filtering/search and list identity
|
|
13
|
+
* - `text` — label shown in the list and in the trigger/input
|
|
14
|
+
* - `value` — value written to the component model when the item is selected
|
|
15
|
+
*/
|
|
16
|
+
interface AXComboBoxItem {
|
|
17
|
+
id: string;
|
|
18
|
+
text: string;
|
|
19
|
+
value: string | number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A minimal combo box for selecting a single value from a list of items.
|
|
24
|
+
*
|
|
25
|
+
* Built on top of the `@angular/aria/combobox` directives, it supports two behaviors:
|
|
26
|
+
* - `searchable="true"` (default): an input with typeahead filtering (matches `id`).
|
|
27
|
+
* - `searchable="false"`: a select-like, non-editable trigger (same input; typing blocked without
|
|
28
|
+
* Combobox `readonly`, so Tab focus and keyboard open/select keep working).
|
|
29
|
+
*
|
|
30
|
+
* With `adaptivityEnabled` (default `true`), the list opens as a bottom actionsheet on small
|
|
31
|
+
* screens instead of an anchored dropdown — the same alternate presentation as `ax-select-box`.
|
|
32
|
+
*
|
|
33
|
+
* Items use `text` for display, `id` for search/identity, and `value` as the submitted model value.
|
|
34
|
+
* Implements {@link FormValueControl} so `[(ngModel)]` / signal forms work via the `value` model
|
|
35
|
+
* (no `ControlValueAccessor`).
|
|
36
|
+
*
|
|
37
|
+
* @category Components
|
|
38
|
+
*/
|
|
39
|
+
declare class AXComboBoxComponent extends NXComponent implements FormValueControl<string | number | null> {
|
|
40
|
+
#private;
|
|
41
|
+
/**
|
|
42
|
+
* The list of items the user can select from.
|
|
43
|
+
* Each item has `id` (search/identity), `text` (display), and `value` (submitted).
|
|
44
|
+
*/
|
|
45
|
+
items: _angular_core.InputSignal<AXComboBoxItem[]>;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the combo box accepts typing and filters the list (`true`),
|
|
48
|
+
* or is a select-like, non-editable trigger (`false`).
|
|
49
|
+
*/
|
|
50
|
+
searchable: _angular_core.InputSignal<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* When `true` (default), the popup list uses the alternate actionsheet presentation on small
|
|
53
|
+
* screens (`SM`). When `false`, the list always opens as an anchored dropdown.
|
|
54
|
+
*/
|
|
55
|
+
adaptivityEnabled: _angular_core.InputSignal<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Title shown in the actionsheet header on small screens. Falls back to `placeholder`.
|
|
58
|
+
*/
|
|
59
|
+
caption: _angular_core.InputSignal<string>;
|
|
60
|
+
/**
|
|
61
|
+
* When `true`, list rows use alternating background colors for easier scanning.
|
|
62
|
+
*/
|
|
63
|
+
alternate: _angular_core.InputSignal<boolean>;
|
|
64
|
+
/**
|
|
65
|
+
* The placeholder text shown when no value is selected.
|
|
66
|
+
*/
|
|
67
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
68
|
+
/**
|
|
69
|
+
* Custom template rendered when the filtered list has no items.
|
|
70
|
+
* When omitted, a default "no result found" message is shown.
|
|
71
|
+
*/
|
|
72
|
+
emptyTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
73
|
+
/**
|
|
74
|
+
* Custom template rendered for each item in the popup list.
|
|
75
|
+
* Context: `{ $implicit: AXComboBoxItem }`.
|
|
76
|
+
*/
|
|
77
|
+
itemTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
78
|
+
/**
|
|
79
|
+
* Custom template rendered for the selected value in the trigger.
|
|
80
|
+
* Context: `{ $implicit: AXComboBoxItem }`.
|
|
81
|
+
* When `searchable` is true, the template is shown while the popup is closed and the input
|
|
82
|
+
* still reflects the selected text; typing/opening falls back to the plain input.
|
|
83
|
+
*/
|
|
84
|
+
selectedTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the combo box is disabled.
|
|
87
|
+
*/
|
|
88
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
89
|
+
/**
|
|
90
|
+
* Whether the combo box is readonly.
|
|
91
|
+
*/
|
|
92
|
+
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
93
|
+
/**
|
|
94
|
+
* Predefined look scheme of the editor container. Same looks as other editor components like ax-text-box.
|
|
95
|
+
*/
|
|
96
|
+
look: _angular_core.ModelSignal<AXStyleLookType>;
|
|
97
|
+
/**
|
|
98
|
+
* The selected item's `value`. Supports `[(value)]`, `[(ngModel)]`, and signal forms
|
|
99
|
+
* via {@link FormValueControl}.
|
|
100
|
+
*/
|
|
101
|
+
readonly value: _angular_core.ModelSignal<string | number>;
|
|
102
|
+
/**
|
|
103
|
+
* Emitted when the selected value changes.
|
|
104
|
+
*/
|
|
105
|
+
onValueChanged: _angular_core.OutputEmitterRef<AXValueChangedEvent<string | number>>;
|
|
106
|
+
/**
|
|
107
|
+
* Emitted when the trigger receives focus.
|
|
108
|
+
*/
|
|
109
|
+
onFocus: _angular_core.OutputEmitterRef<AXFocusEvent>;
|
|
110
|
+
/**
|
|
111
|
+
* Emitted when the trigger loses focus.
|
|
112
|
+
*/
|
|
113
|
+
onBlur: _angular_core.OutputEmitterRef<AXFocusEvent>;
|
|
114
|
+
/**
|
|
115
|
+
* Emitted when a list item is clicked.
|
|
116
|
+
*/
|
|
117
|
+
onItemClick: _angular_core.OutputEmitterRef<AXItemClickEvent<AXComboBoxItem>>;
|
|
118
|
+
/**
|
|
119
|
+
* Emitted when a list item is selected (click or keyboard).
|
|
120
|
+
*/
|
|
121
|
+
onItemSelected: _angular_core.OutputEmitterRef<AXItemSelectedEvent<AXComboBoxItem>>;
|
|
122
|
+
/**
|
|
123
|
+
* Emitted when the popup list opens.
|
|
124
|
+
*/
|
|
125
|
+
onOpened: _angular_core.OutputEmitterRef<AXEvent>;
|
|
126
|
+
/**
|
|
127
|
+
* Emitted when the popup list closes.
|
|
128
|
+
*/
|
|
129
|
+
onClosed: _angular_core.OutputEmitterRef<AXEvent>;
|
|
130
|
+
/** Whether the popup is expanded. */
|
|
131
|
+
protected expanded: _angular_core.WritableSignal<boolean>;
|
|
132
|
+
/** Whether the list is currently shown as a bottom actionsheet (small screens + adaptivity). */
|
|
133
|
+
protected isActionsheetStyle: _angular_core.WritableSignal<boolean>;
|
|
134
|
+
/** The item whose `value` matches the current model value. */
|
|
135
|
+
protected selectedItem: _angular_core.Signal<AXComboBoxItem>;
|
|
136
|
+
/** Display text shown in the trigger / used as the searchable input baseline. */
|
|
137
|
+
protected displayText: _angular_core.Signal<string>;
|
|
138
|
+
/** The text typed in the searchable input. Resets to the selected item's text. */
|
|
139
|
+
protected searchText: _angular_core.WritableSignal<string>;
|
|
140
|
+
/** Whether the trigger should render `selectedTemplate` instead of the plain input text. */
|
|
141
|
+
protected showSelectedTemplate: _angular_core.Signal<boolean>;
|
|
142
|
+
/** The listbox selection (item ids), kept in sync with the selected value. */
|
|
143
|
+
protected selection: _angular_core.WritableSignal<string[]>;
|
|
144
|
+
/** Items filtered by typed query against `id` when the combo box is searchable. */
|
|
145
|
+
protected filteredItems: _angular_core.Signal<AXComboBoxItem[]>;
|
|
146
|
+
protected comboboxRef: _angular_core.Signal<Combobox>;
|
|
147
|
+
protected listboxRef: _angular_core.Signal<Listbox<any>>;
|
|
148
|
+
protected popoverRef: _angular_core.Signal<AXPopoverComponent>;
|
|
149
|
+
constructor();
|
|
150
|
+
/** Stable unique key for `@for` — avoids NG0955 when `id` is missing or duplicated. */
|
|
151
|
+
protected trackItemKey(index: number, item: AXComboBoxItem): string;
|
|
152
|
+
/**
|
|
153
|
+
* Opens (searchable) or toggles (non-searchable) the popup on trigger click.
|
|
154
|
+
*/
|
|
155
|
+
protected onTriggerClick(): void;
|
|
156
|
+
/**
|
|
157
|
+
* Non-searchable keyboard: open with Enter/Space when collapsed; commit with Space when expanded.
|
|
158
|
+
* (Aria relays Enter for editable inputs, but not Space.)
|
|
159
|
+
*/
|
|
160
|
+
protected onTriggerKeydown(event: KeyboardEvent): void;
|
|
161
|
+
/** Blocks typing in non-searchable mode without Combobox `readonly` (keeps Tab/keyboard working). */
|
|
162
|
+
protected onBeforeInput(event: Event): void;
|
|
163
|
+
/**
|
|
164
|
+
* Keeps the combobox expanded state in sync when the popover closes (e.g. click outside).
|
|
165
|
+
*/
|
|
166
|
+
protected onPopoverClosed(): void;
|
|
167
|
+
/**
|
|
168
|
+
* Clears the selected value (sets it to `null`) and closes the popup.
|
|
169
|
+
* Used by projected `ax-clear-button`.
|
|
170
|
+
*
|
|
171
|
+
* @param isUserInteraction - Whether the clear was triggered by the user.
|
|
172
|
+
*/
|
|
173
|
+
reset(isUserInteraction?: boolean): void;
|
|
174
|
+
/**
|
|
175
|
+
* Closes the popup list.
|
|
176
|
+
*/
|
|
177
|
+
close(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Closes the popup list (alias for {@link close}, required by `AXClosableComponent`).
|
|
180
|
+
*/
|
|
181
|
+
closeAll(): void;
|
|
182
|
+
/**
|
|
183
|
+
* Commits the highlighted (active) or clicked list item as the component value and closes the popup.
|
|
184
|
+
*
|
|
185
|
+
* With `selectionMode="explicit"`, arrow keys only move the active item; Enter/Space must resolve
|
|
186
|
+
* that option. Clicks resolve from the event target so we do not depend on listener order vs ngListbox.
|
|
187
|
+
*/
|
|
188
|
+
protected commit(event?: Event): void;
|
|
189
|
+
/** Forwards native focus from the trigger input. */
|
|
190
|
+
protected emitOnFocus(e: FocusEvent): void;
|
|
191
|
+
/** Forwards native blur from the trigger input. */
|
|
192
|
+
protected emitOnBlur(e: FocusEvent): void;
|
|
193
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXComboBoxComponent, never>;
|
|
194
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXComboBoxComponent, "ax-combo-box", never, { "items": { "alias": "items"; "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; }; "placeholder": { "alias": "placeholder"; "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>;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
declare class AXComboBoxModule {
|
|
198
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXComboBoxModule, never>;
|
|
199
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXComboBoxModule, never, [typeof AXComboBoxComponent], [typeof AXComboBoxComponent]>;
|
|
200
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXComboBoxModule>;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export { AXComboBoxComponent, AXComboBoxModule };
|
|
204
|
+
export type { AXComboBoxItem };
|