@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
package/lookup/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @acorex/components/lookup
|
|
2
|
+
|
|
3
|
+
An advanced drop-down (lookup) component with six modes, `AXDataSource` support, and virtual scrolling.
|
|
4
|
+
|
|
5
|
+
## Modes
|
|
6
|
+
|
|
7
|
+
| Mode | Description |
|
|
8
|
+
| ------------------- | ------------------------------------------------------------------- |
|
|
9
|
+
| `drop-down-list` | A predefined list of options for picking single values. |
|
|
10
|
+
| `multi-select` | A predefined list of options for multiple item selection. |
|
|
11
|
+
| `drop-down-tree` | A tree-like structure for single item selection. |
|
|
12
|
+
| `multi-select-tree` | A tree-like structure for multiple item selection. |
|
|
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). |
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { AXLookupComponent } from '@acorex/components/lookup';
|
|
20
|
+
import { AXDataSource } from '@acorex/cdk/common';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<!-- DropDownList -->
|
|
25
|
+
<ax-lookup mode="drop-down-list" [dataSource]="items" [(ngModel)]="selected" placeholder="Select..."></ax-lookup>
|
|
26
|
+
|
|
27
|
+
<!-- Skip byKey when the full item is already known (e.g. edit form) -->
|
|
28
|
+
<ax-lookup
|
|
29
|
+
mode="drop-down-list"
|
|
30
|
+
[dataSource]="remoteUsers"
|
|
31
|
+
[valueItems]="[knownUser]"
|
|
32
|
+
valueField="id"
|
|
33
|
+
textField="name"
|
|
34
|
+
[(ngModel)]="userId"
|
|
35
|
+
></ax-lookup>
|
|
36
|
+
|
|
37
|
+
<!-- MultiSelect -->
|
|
38
|
+
<ax-lookup mode="multi-select" [dataSource]="items" [(ngModel)]="selectedValues"></ax-lookup>
|
|
39
|
+
|
|
40
|
+
<!-- DropDownTree / MultiSelectTree -->
|
|
41
|
+
<ax-lookup mode="drop-down-tree" [treeDataSource]="nodes" textField="title" [(ngModel)]="selectedNode"></ax-lookup>
|
|
42
|
+
<ax-lookup mode="multi-select-tree" [treeDataSource]="nodes" textField="title" [(ngModel)]="selectedNodes"></ax-lookup>
|
|
43
|
+
|
|
44
|
+
<!-- MultiColumnComboBox -->
|
|
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>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Value binding uses the signal `value` model (`FormValueControl`) — prefer `[(ngModel)]` (or `[(value)]` / signal forms). No `ControlValueAccessor`.
|
|
58
|
+
|
|
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`).
|
|
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.
|
|
61
|
+
- `treeDataSource`: node array or lazy children callback (tree modes, including `multi-column-tree`).
|
|
62
|
+
- `valueField` / `textField` / `disabledField`: field mappings. For tree modes these map to the tree `idField` / `titleField`.
|
|
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.
|
|
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.
|
|
67
|
+
- `caption`: title shown in the actionsheet header (falls back to `placeholder`).
|
|
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.
|
|
70
|
+
- `itemHeight` / `maxVisibleItems`: list virtual-scroll sizing, and multi-column table viewport height (multi-column loads more pages on scroll, not via a pager).
|
|
71
|
+
- `look`: the same editor-container look schemes as other editors like `ax-text-box`.
|
|
72
|
+
- `ax-prefix` / `ax-suffix`: project decorators into the editor container.
|
|
73
|
+
|
|
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.0.0
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@acorex/core": "22.0.0
|
|
6
|
-
"@acorex/cdk": "22.0.0
|
|
5
|
+
"@acorex/core": "22.0.0",
|
|
6
|
+
"@acorex/cdk": "22.0.0",
|
|
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",
|
|
@@ -134,6 +135,10 @@
|
|
|
134
135
|
"types": "./types/acorex-components-color-palette.d.ts",
|
|
135
136
|
"default": "./fesm2022/acorex-components-color-palette.mjs"
|
|
136
137
|
},
|
|
138
|
+
"./combo-box": {
|
|
139
|
+
"types": "./types/acorex-components-combo-box.d.ts",
|
|
140
|
+
"default": "./fesm2022/acorex-components-combo-box.mjs"
|
|
141
|
+
},
|
|
137
142
|
"./command": {
|
|
138
143
|
"types": "./types/acorex-components-command.d.ts",
|
|
139
144
|
"default": "./fesm2022/acorex-components-command.mjs"
|
|
@@ -254,6 +259,10 @@
|
|
|
254
259
|
"types": "./types/acorex-components-loading-dialog.d.ts",
|
|
255
260
|
"default": "./fesm2022/acorex-components-loading-dialog.mjs"
|
|
256
261
|
},
|
|
262
|
+
"./lookup": {
|
|
263
|
+
"types": "./types/acorex-components-lookup.d.ts",
|
|
264
|
+
"default": "./fesm2022/acorex-components-lookup.mjs"
|
|
265
|
+
},
|
|
257
266
|
"./map": {
|
|
258
267
|
"types": "./types/acorex-components-map.d.ts",
|
|
259
268
|
"default": "./fesm2022/acorex-components-map.mjs"
|
|
@@ -378,10 +387,6 @@
|
|
|
378
387
|
"types": "./types/acorex-components-selection-list.d.ts",
|
|
379
388
|
"default": "./fesm2022/acorex-components-selection-list.mjs"
|
|
380
389
|
},
|
|
381
|
-
"./selection-list-2": {
|
|
382
|
-
"types": "./types/acorex-components-selection-list-2.d.ts",
|
|
383
|
-
"default": "./fesm2022/acorex-components-selection-list-2.mjs"
|
|
384
|
-
},
|
|
385
390
|
"./side-menu": {
|
|
386
391
|
"types": "./types/acorex-components-side-menu.d.ts",
|
|
387
392
|
"default": "./fesm2022/acorex-components-side-menu.mjs"
|
package/select-box/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
# @acorex/components/select-box
|
|
2
2
|
|
|
3
|
+
> **Deprecated.** This component is no longer supported.
|
|
4
|
+
>
|
|
5
|
+
> - Use [`combo-box`](../combo-box) when your data is a simple array.
|
|
6
|
+
> - Use [`lookup`](../lookup) when you need advanced features and `AXDataSource` support.
|
|
7
|
+
|
|
3
8
|
Secondary entry point of `@acorex/components`. It can be used by importing from `@acorex/components/select-box`.
|
|
@@ -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,280 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, ElementRef } from '@angular/core';
|
|
3
|
+
import { NXValueComponent, AXStyleLookType, AXValueChangedEvent, AXFocusEvent, AXItemClickEvent, AXItemSelectedEvent, AXEvent, AXHtmlEvent } from '@acorex/cdk/common';
|
|
4
|
+
import { AXPopoverComponent } from '@acorex/components/popover';
|
|
5
|
+
import { AXSearchBoxComponent } from '@acorex/components/search-box';
|
|
6
|
+
import { Combobox } from '@angular/aria/combobox';
|
|
7
|
+
import { Listbox } from '@angular/aria/listbox';
|
|
8
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An item in the combo box list.
|
|
12
|
+
*
|
|
13
|
+
* - `id` — unique key used for filtering/search and list identity
|
|
14
|
+
* - `text` — label shown in the list and in the trigger/input
|
|
15
|
+
* - `value` — value written to the component model when the item is selected
|
|
16
|
+
*/
|
|
17
|
+
interface AXComboBoxItem {
|
|
18
|
+
id: string;
|
|
19
|
+
text: string;
|
|
20
|
+
value: string | number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The combo box model value: a scalar (or `null`) in single-select mode,
|
|
24
|
+
* or an array of scalars in multi-select mode.
|
|
25
|
+
*/
|
|
26
|
+
type AXComboBoxValue = string | number | (string | number)[] | null;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A minimal combo box for selecting one or more values from a list of items.
|
|
30
|
+
*
|
|
31
|
+
* Built on top of the `@angular/aria/combobox` directives, it supports two behaviors:
|
|
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.
|
|
34
|
+
* - `searchable="false"`: a select-like, non-editable trigger (same input; typing blocked without
|
|
35
|
+
* Combobox `readonly`, so Tab focus and keyboard open/select keep working).
|
|
36
|
+
*
|
|
37
|
+
* With `multiple="true"`, selected values are shown as chips in the trigger and the popup stays
|
|
38
|
+
* open while toggling items (same interaction model as `ax-lookup` multi-select).
|
|
39
|
+
*
|
|
40
|
+
* With `adaptivityEnabled` (default `true`), the list opens as a bottom actionsheet on small
|
|
41
|
+
* screens instead of an anchored dropdown — the same alternate presentation as `ax-select-box`.
|
|
42
|
+
*
|
|
43
|
+
* Items use `text` for display, `id` for search/identity, and `value` as the submitted model value.
|
|
44
|
+
* Implements {@link FormValueControl} so `[(ngModel)]` / signal forms work via the `value` model
|
|
45
|
+
* (no `ControlValueAccessor`).
|
|
46
|
+
*
|
|
47
|
+
* @category Components
|
|
48
|
+
*/
|
|
49
|
+
declare class AXComboBoxComponent extends NXValueComponent implements FormValueControl<AXComboBoxValue> {
|
|
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>;
|
|
55
|
+
/**
|
|
56
|
+
* The list of items the user can select from.
|
|
57
|
+
* Each item has `id` (search/identity), `text` (display), and `value` (submitted).
|
|
58
|
+
*/
|
|
59
|
+
items: _angular_core.InputSignal<AXComboBoxItem[]>;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the combo box accepts typing and filters the list (`true`),
|
|
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.
|
|
64
|
+
*/
|
|
65
|
+
searchable: _angular_core.InputSignal<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
* When `true`, multiple items can be selected. Selected values are shown as chips and the
|
|
68
|
+
* popup stays open while toggling. The model value is an array (`[]` when empty).
|
|
69
|
+
*/
|
|
70
|
+
multiple: _angular_core.InputSignal<boolean>;
|
|
71
|
+
/**
|
|
72
|
+
* When `true` (default), the popup list uses the alternate actionsheet presentation on small
|
|
73
|
+
* screens (`SM`). Searchable mode then shows a search field inside the sheet. When `false`,
|
|
74
|
+
* the list always opens as an anchored dropdown.
|
|
75
|
+
*/
|
|
76
|
+
adaptivityEnabled: _angular_core.InputSignal<boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* Title shown in the actionsheet header on small screens. Falls back to `placeholder`.
|
|
79
|
+
*/
|
|
80
|
+
caption: _angular_core.InputSignal<string>;
|
|
81
|
+
/**
|
|
82
|
+
* When `true`, list rows use alternating background colors for easier scanning.
|
|
83
|
+
*/
|
|
84
|
+
alternate: _angular_core.InputSignal<boolean>;
|
|
85
|
+
/**
|
|
86
|
+
* The placeholder text shown when no value is selected.
|
|
87
|
+
*/
|
|
88
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
89
|
+
/**
|
|
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.
|
|
93
|
+
*/
|
|
94
|
+
searchPlaceholder: _angular_core.InputSignal<string>;
|
|
95
|
+
/**
|
|
96
|
+
* Custom template rendered when the filtered list has no items.
|
|
97
|
+
* When omitted, a default "no result found" message is shown.
|
|
98
|
+
*/
|
|
99
|
+
emptyTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
100
|
+
/**
|
|
101
|
+
* Custom template rendered for each item in the popup list.
|
|
102
|
+
* Context: `{ $implicit: AXComboBoxItem }`.
|
|
103
|
+
*/
|
|
104
|
+
itemTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
105
|
+
/**
|
|
106
|
+
* Custom template rendered for the selected value in the trigger.
|
|
107
|
+
* Context: `{ $implicit: AXComboBoxItem }`.
|
|
108
|
+
* When `searchable` is true, the template is shown while the popup is closed and the input
|
|
109
|
+
* still reflects the selected text; typing/opening falls back to the plain input.
|
|
110
|
+
* In multi-select mode, the template replaces the chip text for each selected item.
|
|
111
|
+
*/
|
|
112
|
+
selectedTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
113
|
+
/**
|
|
114
|
+
* Whether the combo box is disabled.
|
|
115
|
+
*/
|
|
116
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
117
|
+
/**
|
|
118
|
+
* Whether the combo box is readonly.
|
|
119
|
+
*/
|
|
120
|
+
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
121
|
+
/**
|
|
122
|
+
* Predefined look scheme of the editor container. Same looks as other editor components like ax-text-box.
|
|
123
|
+
*/
|
|
124
|
+
look: _angular_core.ModelSignal<AXStyleLookType>;
|
|
125
|
+
/**
|
|
126
|
+
* The selected item `value`(s). Scalar (or `null`) in single mode; an array in multi mode.
|
|
127
|
+
* Supports `[(value)]`, `[(ngModel)]`, and signal forms via {@link FormValueControl}.
|
|
128
|
+
*/
|
|
129
|
+
readonly value: _angular_core.ModelSignal<AXComboBoxValue>;
|
|
130
|
+
/**
|
|
131
|
+
* Emitted when the selected value changes.
|
|
132
|
+
*/
|
|
133
|
+
onValueChanged: _angular_core.OutputEmitterRef<AXValueChangedEvent<AXComboBoxValue>>;
|
|
134
|
+
/**
|
|
135
|
+
* Emitted when the trigger receives focus.
|
|
136
|
+
*/
|
|
137
|
+
onFocus: _angular_core.OutputEmitterRef<AXFocusEvent>;
|
|
138
|
+
/**
|
|
139
|
+
* Emitted when the trigger loses focus.
|
|
140
|
+
*/
|
|
141
|
+
onBlur: _angular_core.OutputEmitterRef<AXFocusEvent>;
|
|
142
|
+
/**
|
|
143
|
+
* Emitted when a list item is clicked.
|
|
144
|
+
*/
|
|
145
|
+
onItemClick: _angular_core.OutputEmitterRef<AXItemClickEvent<AXComboBoxItem>>;
|
|
146
|
+
/**
|
|
147
|
+
* Emitted when a list item is selected (click or keyboard).
|
|
148
|
+
*/
|
|
149
|
+
onItemSelected: _angular_core.OutputEmitterRef<AXItemSelectedEvent<AXComboBoxItem>>;
|
|
150
|
+
/**
|
|
151
|
+
* Emitted when the popup list opens.
|
|
152
|
+
*/
|
|
153
|
+
onOpened: _angular_core.OutputEmitterRef<AXEvent>;
|
|
154
|
+
/**
|
|
155
|
+
* Emitted when the popup list closes.
|
|
156
|
+
*/
|
|
157
|
+
onClosed: _angular_core.OutputEmitterRef<AXEvent>;
|
|
158
|
+
/** Whether the popup is expanded. */
|
|
159
|
+
protected expanded: _angular_core.WritableSignal<boolean>;
|
|
160
|
+
/** Whether the list is currently shown as a bottom actionsheet (small screens + adaptivity). */
|
|
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>;
|
|
168
|
+
/** The current selection normalized to an array of submitted values. */
|
|
169
|
+
protected selectedValues: _angular_core.Signal<(string | number)[]>;
|
|
170
|
+
/** Whether there is at least one selected value. */
|
|
171
|
+
protected hasSelection: _angular_core.Signal<boolean>;
|
|
172
|
+
/** Resolved selected items for the current model value(s). */
|
|
173
|
+
protected selectedItems: _angular_core.Signal<AXComboBoxItem[]>;
|
|
174
|
+
/** The item whose `value` matches the current model value (single-select). */
|
|
175
|
+
protected selectedItem: _angular_core.Signal<AXComboBoxItem>;
|
|
176
|
+
/** Display text shown in the trigger / used as the searchable input baseline (single-select). */
|
|
177
|
+
protected displayText: _angular_core.Signal<string>;
|
|
178
|
+
/**
|
|
179
|
+
* The text typed in the searchable input.
|
|
180
|
+
* Multi-select starts empty; single mode syncs from the selected display text.
|
|
181
|
+
*/
|
|
182
|
+
protected searchText: _angular_core.WritableSignal<string>;
|
|
183
|
+
/** Whether the trigger should render `selectedTemplate` instead of the plain input text. */
|
|
184
|
+
protected showSelectedTemplate: _angular_core.Signal<boolean>;
|
|
185
|
+
/** Placeholder for the editable trigger search input in multi-select. */
|
|
186
|
+
protected triggerSearchPlaceholder: _angular_core.Signal<string>;
|
|
187
|
+
/** The listbox selection (item ids), kept in sync with the selected value(s). */
|
|
188
|
+
protected selection: _angular_core.WritableSignal<string[]>;
|
|
189
|
+
/** Items filtered by typed query against `id` when the combo box is searchable. */
|
|
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>;
|
|
193
|
+
protected comboboxRef: _angular_core.Signal<Combobox>;
|
|
194
|
+
protected listboxRef: _angular_core.Signal<Listbox<any>>;
|
|
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>;
|
|
199
|
+
constructor();
|
|
200
|
+
/** Stable unique key for `@for` — avoids NG0955 when `id` is missing or duplicated. */
|
|
201
|
+
protected trackItemKey(index: number, item: AXComboBoxItem): string;
|
|
202
|
+
/** Whether the given item is currently selected. */
|
|
203
|
+
protected isItemSelected(item: AXComboBoxItem): boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Opens (searchable) or toggles (non-searchable) the popup on trigger click.
|
|
206
|
+
*/
|
|
207
|
+
protected onTriggerClick(): void;
|
|
208
|
+
/**
|
|
209
|
+
* Keyboard handling on the trigger:
|
|
210
|
+
* - Searchable: Enter never submits the form; with no matches the value is cleared (`null`).
|
|
211
|
+
* - Non-searchable: open with Enter/Space when collapsed; commit with Space when expanded.
|
|
212
|
+
* - Multi-select: Backspace removes the last chip when the search input is empty.
|
|
213
|
+
*/
|
|
214
|
+
protected onTriggerKeydown(event: KeyboardEvent): void;
|
|
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). */
|
|
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;
|
|
227
|
+
/**
|
|
228
|
+
* Keeps the combobox expanded state in sync when the popover closes (e.g. click outside).
|
|
229
|
+
*/
|
|
230
|
+
protected onPopoverClosed(): void;
|
|
231
|
+
/**
|
|
232
|
+
* Removes a single chip from the multi selection.
|
|
233
|
+
*/
|
|
234
|
+
protected removeChip(event: Event, item: AXComboBoxItem): void;
|
|
235
|
+
/**
|
|
236
|
+
* Clears the selected value(s) and closes the popup.
|
|
237
|
+
* Sets `null` in single mode and `[]` in multi mode. Used by projected `ax-clear-button`.
|
|
238
|
+
*
|
|
239
|
+
* @param isUserInteraction - Whether the clear was triggered by the user.
|
|
240
|
+
*/
|
|
241
|
+
reset(isUserInteraction?: boolean): void;
|
|
242
|
+
/**
|
|
243
|
+
* Closes the popup list.
|
|
244
|
+
*/
|
|
245
|
+
close(): void;
|
|
246
|
+
/**
|
|
247
|
+
* Closes the popup list (alias for {@link close}, required by `AXClosableComponent`).
|
|
248
|
+
*/
|
|
249
|
+
closeAll(): void;
|
|
250
|
+
/**
|
|
251
|
+
* Commits the highlighted (active) or clicked list item as the component value.
|
|
252
|
+
*
|
|
253
|
+
* With `selectionMode="explicit"`, arrow keys only move the active item; Enter/Space must resolve
|
|
254
|
+
* that option. Clicks resolve from the event target so we do not depend on listener order vs ngListbox.
|
|
255
|
+
*
|
|
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`.
|
|
258
|
+
*/
|
|
259
|
+
protected onListEnter(event: Event): void;
|
|
260
|
+
protected commit(event?: Event): void;
|
|
261
|
+
/**
|
|
262
|
+
* Focuses the combo box trigger input.
|
|
263
|
+
*/
|
|
264
|
+
focus(options?: FocusOptions): void;
|
|
265
|
+
/** Forwards native focus from the trigger input. */
|
|
266
|
+
protected emitOnFocus(e: FocusEvent): void;
|
|
267
|
+
/** Forwards native blur from the trigger input. */
|
|
268
|
+
protected emitOnBlur(e: FocusEvent): void;
|
|
269
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXComboBoxComponent, 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>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare class AXComboBoxModule {
|
|
274
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXComboBoxModule, never>;
|
|
275
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXComboBoxModule, never, [typeof AXComboBoxComponent], [typeof AXComboBoxComponent]>;
|
|
276
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXComboBoxModule>;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export { AXComboBoxComponent, AXComboBoxModule };
|
|
280
|
+
export type { AXComboBoxItem, AXComboBoxValue };
|