@acorex/components 22.2.1 → 22.2.3
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/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/components",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@acorex/core": "22.2.
|
|
6
|
-
"@acorex/cdk": "22.2.
|
|
5
|
+
"@acorex/core": "22.2.3",
|
|
6
|
+
"@acorex/cdk": "22.2.3",
|
|
7
7
|
"@angular/aria": ">=22.1.0",
|
|
8
8
|
"polytype": ">=0.17.0",
|
|
9
9
|
"hammerjs": ">=2.0.8",
|
|
@@ -895,5 +895,65 @@ declare class AXLookupModule {
|
|
|
895
895
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXLookupModule>;
|
|
896
896
|
}
|
|
897
897
|
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
/** Whether a tree node may have descendants (embedded children or lazy metadata). */
|
|
899
|
+
declare function lookupTreeNodeMayHaveChildren(node: AXTreeViewNode): boolean;
|
|
900
|
+
interface HydrateLookupTreeOptions {
|
|
901
|
+
valueField: string;
|
|
902
|
+
maxConcurrent?: number;
|
|
903
|
+
maxNodes?: number;
|
|
904
|
+
isCancelled?: () => boolean;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Loads a lazy tree into a nested in-memory snapshot using bounded-concurrency BFS.
|
|
908
|
+
* Returns new node objects and never mutates the input nodes.
|
|
909
|
+
*/
|
|
910
|
+
declare function hydrateLookupTree(roots: AXTreeViewNode[], loadChildren: (nodeId: string) => Promise<AXTreeViewNode[]>, options: HydrateLookupTreeOptions): Promise<AXTreeViewNode[]>;
|
|
911
|
+
|
|
912
|
+
interface AXLookupArrayDataSourceOptions {
|
|
913
|
+
key: string;
|
|
914
|
+
pageSize: number;
|
|
915
|
+
textField: string;
|
|
916
|
+
translateText?: (text: string) => string;
|
|
917
|
+
}
|
|
918
|
+
/** Whether an item label matches a search query (raw or translated). */
|
|
919
|
+
declare function matchesLookupText(text: string, query: string, translateText?: (text: string) => string): boolean;
|
|
920
|
+
/**
|
|
921
|
+
* Array-backed datasource with optional i18n-aware text filtering.
|
|
922
|
+
*/
|
|
923
|
+
declare function convertLookupArrayToDataSource<T extends AXLookupItem>(items: T[], options: AXLookupArrayDataSourceOptions): AXDataSource<T>;
|
|
924
|
+
/**
|
|
925
|
+
* Options used when adapting a lookup `treeDataSource` into an `AXDataSource`
|
|
926
|
+
* that `ax-data-table` can expand via `parentField`.
|
|
927
|
+
*/
|
|
928
|
+
interface AXLookupTreeTableDataSourceOptions {
|
|
929
|
+
valueField: string;
|
|
930
|
+
textField: string;
|
|
931
|
+
parentField: string;
|
|
932
|
+
hasChildrenField: string;
|
|
933
|
+
/** When set, used for text search instead of loading roots only (whole-tree lazy search). */
|
|
934
|
+
loadSearchRoots?: () => Promise<AXTreeViewNode[]>;
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Converts a drop-down-tree datasource (nested array or lazy callback) into an
|
|
938
|
+
* `AXDataSource` that a multi-column data table can load and expand.
|
|
939
|
+
*/
|
|
940
|
+
declare function createLookupTreeTableDataSource(source: AXTreeViewDataSource, options: AXLookupTreeTableDataSourceOptions): AXDataSource<AXLookupItem>;
|
|
941
|
+
/**
|
|
942
|
+
* Recursively filters a nested tree by `textField` (case-insensitive contains).
|
|
943
|
+
* A node is kept if it matches or any descendant matches. Matching parents keep
|
|
944
|
+
* all children. Every kept ancestor is a new object with `expanded: true` so
|
|
945
|
+
* nested hits are visible without mutating the original tree.
|
|
946
|
+
*/
|
|
947
|
+
declare function filterTreeNodes(nodes: AXLookupItem[], textField: string, query: string, translateText?: (text: string) => string): AXLookupItem[];
|
|
948
|
+
/**
|
|
949
|
+
* Maps `filterTreeNodes` output to data-table row metadata so matching branches
|
|
950
|
+
* are expanded and nested rows are visible for search highlighting.
|
|
951
|
+
*/
|
|
952
|
+
declare function prepareFilteredTreeTableRows(nodes: AXLookupItem[]): AXLookupItem[];
|
|
953
|
+
/** Immutable copy of a nested tree so tree-view mutations cannot poison the source. */
|
|
954
|
+
declare function cloneLookupTreeNodes(nodes: AXLookupItem[]): AXLookupItem[];
|
|
955
|
+
/** Depth-first flattening of nested `children` arrays. */
|
|
956
|
+
declare function flattenTreeNodes(nodes: AXLookupItem[]): AXLookupItem[];
|
|
957
|
+
|
|
958
|
+
export { AXLookupComponent, AXLookupDropDownListComponent, AXLookupDropDownTreeComponent, AXLookupModule, AXLookupMultiColumnComponent, AXLookupMultiColumnTreeComponent, AXLookupMultiSelectComponent, AXLookupMultiSelectTreeComponent, cloneLookupTreeNodes, convertLookupArrayToDataSource, createLookupTreeTableDataSource, filterTreeNodes, flattenTreeNodes, hydrateLookupTree, lookupTreeNodeMayHaveChildren, matchesLookupText, prepareFilteredTreeTableRows };
|
|
959
|
+
export type { AXLookupArrayDataSourceOptions, AXLookupColumn, AXLookupItem, AXLookupItemClickEvent, AXLookupMode, AXLookupSelectionChangedEvent, AXLookupTreeSelectionEvent, AXLookupTreeTableDataSourceOptions, HydrateLookupTreeOptions };
|