@acorex/components 22.4.30 → 22.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lookup/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @acorex/components/lookup
|
|
2
2
|
|
|
3
|
-
An advanced drop-down (lookup) component with six modes, `AXDataSource` support, and
|
|
3
|
+
An advanced drop-down (lookup) component with six modes, `AXDataSource` support, virtual scrolling, and sequential infinite scroll for remote lists.
|
|
4
4
|
|
|
5
5
|
## Modes
|
|
6
6
|
|
|
@@ -56,7 +56,7 @@ import { AXDataSource } from '@acorex/cdk/common';
|
|
|
56
56
|
|
|
57
57
|
Value binding uses the signal `value` model (`FormValueControl`) — prefer `[(ngModel)]` (or `[(value)]` / signal forms). No `ControlValueAccessor`.
|
|
58
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`).
|
|
59
|
+
- `dataSource`: `AXDataSource` or a plain array (list and multi-column modes). Supports remote paging, `byKey` value resolution, and server-side filtering. In `drop-down-list`, `multi-select`, and `multi-column`, additional pages load on scroll one request at a time: while a page is loading, further scroll events do not start another request; when the request completes, the scroll position is checked again and the next page loads if you are still near the end (or the first page does not fill the viewport). Also used by `multi-column-tree` when `treeDataSource` is not set (hierarchical load via `treeParentField`).
|
|
60
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
61
|
- `treeDataSource`: node array or lazy children callback (tree modes, including `multi-column-tree`).
|
|
62
62
|
- `valueField` / `textField` / `disabledField`: field mappings. For tree modes these map to the tree `idField` / `titleField`.
|
|
@@ -67,7 +67,7 @@ Value binding uses the signal `value` model (`FormValueControl`) — prefer `[(n
|
|
|
67
67
|
- `caption`: title shown in the actionsheet header (falls back to `placeholder`).
|
|
68
68
|
- `alternate`: when `true`, list rows use alternating background colors for easier scanning (all modes, including tree).
|
|
69
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 (
|
|
70
|
+
- `itemHeight` / `maxVisibleItems`: list virtual-scroll sizing (only loaded rows plus an optional loading row are rendered), and multi-column table viewport height (same sequential scroll loading as list modes, not via a pager).
|
|
71
71
|
- `look`: the same editor-container look schemes as other editors like `ax-text-box`.
|
|
72
72
|
- `ax-prefix` / `ax-suffix`: project decorators into the editor container.
|
|
73
73
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/components",
|
|
3
|
-
"version": "22.4.
|
|
3
|
+
"version": "22.4.31",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@acorex/core": "22.4.
|
|
6
|
-
"@acorex/cdk": "22.4.
|
|
5
|
+
"@acorex/core": "22.4.31",
|
|
6
|
+
"@acorex/cdk": "22.4.31",
|
|
7
7
|
"@angular/aria": ">=22.1.0",
|
|
8
8
|
"polytype": ">=0.17.0",
|
|
9
9
|
"hammerjs": ">=2.0.8",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { TemplateRef, InjectionToken, ElementRef } from '@angular/core';
|
|
3
|
-
import { AXEvent, AXDataSource,
|
|
3
|
+
import { AXEvent, AXDataSource, AXHtmlEvent, NXValueComponent, AXStyleLookType, AXValueChangedEvent, AXFocusEvent, AXItemClickEvent, AXItemSelectedEvent } from '@acorex/cdk/common';
|
|
4
4
|
import { AXPopoverComponent } from '@acorex/components/popover';
|
|
5
5
|
import { AXSearchBoxComponent } from '@acorex/components/search-box';
|
|
6
6
|
import { AXTreeViewDataSource, AXTreeViewSelectionBehavior, AXTreeViewItemTemplateContext, AXTreeViewNode, AXTreeViewSelectionChangeEvent } from '@acorex/components/tree-view';
|
|
@@ -71,6 +71,10 @@ interface AXLookupSelectionChangedEvent<TItem = any> extends AXEvent {
|
|
|
71
71
|
/**
|
|
72
72
|
* Shared `AXDataSource` + CDK virtual scroll plumbing for the list-based lookup views
|
|
73
73
|
* (`ax-lookup-drop-down-list`, `ax-lookup-multi-select`).
|
|
74
|
+
*
|
|
75
|
+
* Loads pages sequentially on scroll: only one API request at a time; further scroll
|
|
76
|
+
* events are ignored until the current request resolves, then the scroll position is
|
|
77
|
+
* re-checked for the next page.
|
|
74
78
|
*/
|
|
75
79
|
declare abstract class AXLookupListViewBase {
|
|
76
80
|
#private;
|
|
@@ -141,8 +145,12 @@ declare abstract class AXLookupListViewBase {
|
|
|
141
145
|
* item, or a printable key that should return focus to the trigger search input).
|
|
142
146
|
*/
|
|
143
147
|
navigateOut: _angular_core.OutputEmitterRef<"up" | "typeahead">;
|
|
144
|
-
/**
|
|
145
|
-
protected
|
|
148
|
+
/** Rows loaded so far (contiguous from the start of the result set). */
|
|
149
|
+
protected loadedItems: _angular_core.WritableSignal<AXLookupItem[]>;
|
|
150
|
+
/** When true, more pages exist and a trailing loading row is shown. */
|
|
151
|
+
protected hasMore: _angular_core.WritableSignal<boolean>;
|
|
152
|
+
/** Virtual-scroll data: loaded rows plus an optional `null` loading sentinel. */
|
|
153
|
+
protected renderedItems: _angular_core.Signal<AXLookupItem[]>;
|
|
146
154
|
protected totalCount: _angular_core.WritableSignal<number>;
|
|
147
155
|
protected isLoading: _angular_core.WritableSignal<boolean>;
|
|
148
156
|
protected isEmpty: _angular_core.Signal<boolean>;
|