@memberjunction/ng-trees 6.1.4 → 6.2.0-edge.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/dist/lib/models/tree-types.d.ts +6 -0
- package/dist/lib/models/tree-types.d.ts.map +1 -1
- package/dist/lib/models/tree-types.js +15 -3
- package/dist/lib/models/tree-types.js.map +1 -1
- package/dist/lib/tree/tree.component.d.ts +16 -0
- package/dist/lib/tree/tree.component.d.ts.map +1 -1
- package/dist/lib/tree/tree.component.js +46 -14
- package/dist/lib/tree/tree.component.js.map +1 -1
- package/dist/lib/tree-dropdown/tree-dropdown.component.d.ts +54 -4
- package/dist/lib/tree-dropdown/tree-dropdown.component.d.ts.map +1 -1
- package/dist/lib/tree-dropdown/tree-dropdown.component.js +169 -69
- package/dist/lib/tree-dropdown/tree-dropdown.component.js.map +1 -1
- package/package.json +7 -7
|
@@ -242,13 +242,19 @@ export interface TreeSearchConfig {
|
|
|
242
242
|
/**
|
|
243
243
|
* Create a default TreeNode
|
|
244
244
|
*/
|
|
245
|
+
export declare function CreateDefaultTreeNode(partial?: Partial<TreeNode>): TreeNode;
|
|
246
|
+
/** @deprecated Use {@link CreateDefaultTreeNode}. */
|
|
245
247
|
export declare function createDefaultTreeNode(partial?: Partial<TreeNode>): TreeNode;
|
|
246
248
|
/**
|
|
247
249
|
* Create default branch config with sensible defaults
|
|
248
250
|
*/
|
|
251
|
+
export declare function CreateDefaultBranchConfig(partial?: Partial<TreeBranchConfig>): TreeBranchConfig;
|
|
252
|
+
/** @deprecated Use {@link CreateDefaultBranchConfig}. */
|
|
249
253
|
export declare function createDefaultBranchConfig(partial?: Partial<TreeBranchConfig>): TreeBranchConfig;
|
|
250
254
|
/**
|
|
251
255
|
* Create default leaf config with sensible defaults
|
|
252
256
|
*/
|
|
257
|
+
export declare function CreateDefaultLeafConfig(partial?: Partial<TreeLeafConfig>): TreeLeafConfig;
|
|
258
|
+
/** @deprecated Use {@link CreateDefaultLeafConfig}. */
|
|
253
259
|
export declare function createDefaultLeafConfig(partial?: Partial<TreeLeafConfig>): TreeLeafConfig;
|
|
254
260
|
//# sourceMappingURL=tree-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-types.d.ts","sourceRoot":"","sources":["../../../src/lib/models/tree-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IAEnB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAC/B,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;IAEnB,oFAAoF;IACpF,cAAc,EAAE,MAAM,CAAC;IAEvB,iFAAiF;IACjF,gBAAgB,EAAE,MAAM,CAAC;IAEzB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,gEAAgE;IAChE,UAAU,CAAC,EAAE,O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;AACvD,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,OAAO,CAAC,cAAc,CAAM,GAAG,cAAc,CAE7F"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* Create a default TreeNode
|
|
9
9
|
*/
|
|
10
|
-
export function
|
|
10
|
+
export function CreateDefaultTreeNode(partial = {}) {
|
|
11
11
|
return {
|
|
12
12
|
ID: '',
|
|
13
13
|
Label: '',
|
|
@@ -26,10 +26,14 @@ export function createDefaultTreeNode(partial = {}) {
|
|
|
26
26
|
...partial
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
+
/** @deprecated Use {@link CreateDefaultTreeNode}. */
|
|
30
|
+
export function createDefaultTreeNode(partial = {}) {
|
|
31
|
+
return CreateDefaultTreeNode(partial);
|
|
32
|
+
}
|
|
29
33
|
/**
|
|
30
34
|
* Create default branch config with sensible defaults
|
|
31
35
|
*/
|
|
32
|
-
export function
|
|
36
|
+
export function CreateDefaultBranchConfig(partial = {}) {
|
|
33
37
|
return {
|
|
34
38
|
EntityName: '',
|
|
35
39
|
DisplayField: 'Name',
|
|
@@ -40,10 +44,14 @@ export function createDefaultBranchConfig(partial = {}) {
|
|
|
40
44
|
...partial
|
|
41
45
|
};
|
|
42
46
|
}
|
|
47
|
+
/** @deprecated Use {@link CreateDefaultBranchConfig}. */
|
|
48
|
+
export function createDefaultBranchConfig(partial = {}) {
|
|
49
|
+
return CreateDefaultBranchConfig(partial);
|
|
50
|
+
}
|
|
43
51
|
/**
|
|
44
52
|
* Create default leaf config with sensible defaults
|
|
45
53
|
*/
|
|
46
|
-
export function
|
|
54
|
+
export function CreateDefaultLeafConfig(partial = {}) {
|
|
47
55
|
return {
|
|
48
56
|
EntityName: '',
|
|
49
57
|
ParentField: '',
|
|
@@ -54,4 +62,8 @@ export function createDefaultLeafConfig(partial = {}) {
|
|
|
54
62
|
...partial
|
|
55
63
|
};
|
|
56
64
|
}
|
|
65
|
+
/** @deprecated Use {@link CreateDefaultLeafConfig}. */
|
|
66
|
+
export function createDefaultLeafConfig(partial = {}) {
|
|
67
|
+
return CreateDefaultLeafConfig(partial);
|
|
68
|
+
}
|
|
57
69
|
//# sourceMappingURL=tree-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-types.js","sourceRoot":"","sources":["../../../src/lib/models/tree-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AA+VH,2CAA2C;AAC3C,mBAAmB;AACnB,2CAA2C;AAE3C;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAA6B,EAAE;IACjE,OAAO;QACH,EAAE,EAAE,EAAE;QACN,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,IAAI;QACb,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,EAAE;QACd,GAAG,OAAO;KACb,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,UAAqC,EAAE;IAC7E,OAAO;QACH,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,MAAM;QACpB,OAAO,EAAE,IAAI;QACb,aAAa,EAAE,UAAU;QACzB,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE,UAAU;QACnB,GAAG,OAAO;KACb,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAmC,EAAE;IACzE,OAAO;QACH,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,MAAM;QACpB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,kBAAkB;QAC/B,OAAO,EAAE,UAAU;QACnB,GAAG,OAAO;KACb,CAAC;AACN,CAAC","sourcesContent":["/**\n * Tree Types and Interfaces for @memberjunction/ng-trees\n */\n\n// ========================================\n// Entity Configuration Types\n// ========================================\n\n/**\n * Configuration for the tree's branch (category/folder) entity.\n * Branches can contain other branches and/or leaf nodes.\n */\nexport interface TreeBranchConfig {\n /** Entity name for branch nodes (e.g., 'MJ: Query Categories') */\n EntityName: string;\n\n /** Field to display as node label (default: 'Name') */\n DisplayField?: string;\n\n /** Primary key field (default: 'ID') */\n IDField?: string;\n\n /** Parent ID field for hierarchy (default: 'ParentID') */\n ParentIDField?: string;\n\n /** Field name for node icon (dynamic per-node) */\n IconField?: string;\n\n /** Static icon if IconField not provided (default: 'fa-solid fa-folder') */\n DefaultIcon?: string;\n\n /** Field name for icon/folder color */\n ColorField?: string;\n\n /** Default color if ColorField not provided */\n DefaultColor?: string;\n\n /** Optional extra filter for RunView */\n ExtraFilter?: string;\n\n /** Optional order by clause (default: 'Name ASC') */\n OrderBy?: string;\n\n /** Optional field to show as secondary text/description */\n DescriptionField?: string;\n\n /** Optional field for badge/count display */\n BadgeField?: string;\n\n /** Whether to cache results locally (default: true) */\n CacheLocal?: boolean;\n}\n\n/**\n * Configuration for M2M junction table relationships.\n * Used when leaves relate to branches through an intermediate junction table.\n */\nexport interface TreeJunctionConfig {\n /** Junction entity name (e.g., 'MJ: Collection Artifacts') */\n EntityName: string;\n\n /** Field in junction that references the leaf entity (e.g., 'ArtifactVersionID') */\n LeafForeignKey: string;\n\n /** Field in junction that references the branch entity (e.g., 'CollectionID') */\n BranchForeignKey: string;\n\n /** Optional extra filter for the junction query */\n ExtraFilter?: string;\n\n /** Whether to cache junction results locally (default: true) */\n CacheLocal?: boolean;\n\n /**\n * Optional indirect mapping when junction references an intermediate entity.\n * Example: CollectionArtifact.ArtifactVersionID -> ArtifactVersion.ArtifactID -> Artifact.ID\n */\n IndirectLeafMapping?: {\n /** Intermediate entity name (e.g., 'MJ: Artifact Versions') */\n IntermediateEntity: string;\n\n /** ID field in intermediate entity that junction references (e.g., 'ID') */\n IntermediateIDField: string;\n\n /** Field in intermediate entity that points to the actual leaf (e.g., 'ArtifactID') */\n LeafIDField: string;\n\n /** Optional extra filter for the intermediate entity query */\n ExtraFilter?: string;\n\n /** Whether to cache intermediate results locally (default: true) */\n CacheLocal?: boolean;\n };\n}\n\n/**\n * Configuration for the tree's leaf entity (optional).\n * Leaf nodes are the selectable items within branch nodes.\n */\nexport interface TreeLeafConfig {\n /** Entity name for leaf nodes (e.g., 'Queries') */\n EntityName: string;\n\n /**\n * Field that links to parent branch (e.g., 'CategoryID').\n * Leave empty string if using JunctionConfig for M2M relationships.\n */\n ParentField: string;\n\n /** Field to display as node label (default: 'Name') */\n DisplayField?: string;\n\n /** Primary key field (default: 'ID') */\n IDField?: string;\n\n /** Field name for node icon (dynamic per-node) */\n IconField?: string;\n\n /** Static icon for all leaves (default: 'fa-solid fa-file') */\n DefaultIcon?: string;\n\n /** Optional extra filter for RunView */\n ExtraFilter?: string;\n\n /** Optional order by clause (default: 'Name ASC') */\n OrderBy?: string;\n\n /** Optional field to show as secondary text/description */\n DescriptionField?: string;\n\n /** Optional field for badge/count display */\n BadgeField?: string;\n\n /**\n * Optional M2M junction configuration for indirect parent relationships.\n * When specified, leaves are parented to branches based on junction table lookups\n * instead of using the direct ParentField.\n */\n JunctionConfig?: TreeJunctionConfig;\n\n /** Whether to cache results locally (default: true) */\n CacheLocal?: boolean;\n}\n\n// ========================================\n// Tree Node Types\n// ========================================\n\n/**\n * Node type identifier\n */\nexport type TreeNodeType = 'branch' | 'leaf';\n\n/**\n * Internal tree node representation\n */\nexport interface TreeNode {\n /** Unique identifier */\n ID: string;\n\n /** Display text (from DisplayField) */\n Label: string;\n\n /** Node type: branch (folder) or leaf (item) */\n Type: TreeNodeType;\n\n /** Parent node ID (null for root nodes) */\n ParentID: string | null;\n\n /** Icon class (Font Awesome or similar) */\n Icon: string;\n\n /** Icon color (CSS color value) */\n Color?: string;\n\n /** Original entity data for custom access */\n Data: Record<string, unknown>;\n\n /** Child nodes (branches and/or leaves) */\n Children: TreeNode[];\n\n /** UI state: is node expanded */\n Expanded: boolean;\n\n /** UI state: is node selected */\n Selected: boolean;\n\n /** Depth level (0 = root) */\n Level: number;\n\n /** Is this node currently loading children */\n Loading: boolean;\n\n /** Secondary description text */\n Description?: string;\n\n /** Badge text (e.g., count) */\n Badge?: string;\n\n /** Is this node visible (for filtering) */\n Visible: boolean;\n\n /** Does this node match the current search */\n MatchesSearch: boolean;\n\n /** Entity name this node came from */\n EntityName: string;\n}\n\n// ========================================\n// Selection Types\n// ========================================\n\n/**\n * Selection mode for the tree\n */\nexport type TreeSelectionMode = 'single' | 'multiple' | 'none';\n\n/**\n * What node types can be selected\n */\nexport type TreeSelectableTypes = 'branch' | 'leaf' | 'both';\n\n// ========================================\n// Component Configuration Types\n// ========================================\n\n/**\n * CSS class overrides for tree styling\n */\nexport interface TreeStyleConfig {\n /** Class for the tree container */\n ContainerClass?: string;\n\n /** Class for tree nodes */\n NodeClass?: string;\n\n /** Class for selected nodes */\n SelectedClass?: string;\n\n /** Class for hovered nodes */\n HoverClass?: string;\n\n /** Class for branch nodes */\n BranchClass?: string;\n\n /** Class for leaf nodes */\n LeafClass?: string;\n\n /** Class for expanded branches */\n ExpandedClass?: string;\n\n /** Class for the dropdown container */\n DropdownClass?: string;\n\n /** Class for the search input */\n SearchInputClass?: string;\n}\n\n/**\n * Keyboard navigation configuration\n */\nexport interface TreeKeyboardConfig {\n /** Enable keyboard navigation (default: true) */\n Enabled?: boolean;\n\n /** Enable type-ahead search (default: true) */\n TypeAhead?: boolean;\n\n /** Key to expand node (default: 'ArrowRight') */\n ExpandKey?: string;\n\n /** Key to collapse node (default: 'ArrowLeft') */\n CollapseKey?: string;\n\n /** Key to select node (default: 'Enter' or 'Space') */\n SelectKey?: string;\n}\n\n// ========================================\n// Dropdown Configuration Types\n// ========================================\n\n/**\n * Dropdown positioning preference\n */\nexport type DropdownPosition = 'auto' | 'below' | 'above';\n\n/**\n * Configuration for dropdown behavior\n */\nexport interface TreeDropdownConfig {\n /** Preferred position (default: 'auto') */\n Position?: DropdownPosition;\n\n /** Max height of dropdown (default: '300px') */\n MaxHeight?: string;\n\n /** Min width of dropdown (default: match input) */\n MinWidth?: string;\n\n /** Close on outside click (default: true) */\n CloseOnOutsideClick?: boolean;\n\n /** Close on selection (single mode only, default: true) */\n CloseOnSelect?: boolean;\n\n /** Close on escape key (default: true) */\n CloseOnEscape?: boolean;\n\n /** Animation duration in ms (default: 150) */\n AnimationDuration?: number;\n}\n\n// ========================================\n// Search Configuration Types\n// ========================================\n\n/**\n * Configuration for search behavior\n */\nexport interface TreeSearchConfig {\n /** Enable search (default: true for dropdown) */\n Enabled?: boolean;\n\n /** Placeholder text */\n Placeholder?: string;\n\n /** Minimum characters to trigger search (default: 1) */\n MinLength?: number;\n\n /** Debounce time in ms (default: 200) */\n DebounceMs?: number;\n\n /** Search branches (default: true) */\n SearchBranches?: boolean;\n\n /** Search leaves (default: true) */\n SearchLeaves?: boolean;\n\n /** Case sensitive search (default: false) */\n CaseSensitive?: boolean;\n\n /** Search in description field too (default: false) */\n SearchDescription?: boolean;\n\n /** Highlight matching text (default: true) */\n HighlightMatches?: boolean;\n\n /** Auto-expand to show matches (default: true) */\n AutoExpandMatches?: boolean;\n}\n\n// ========================================\n// Helper Functions\n// ========================================\n\n/**\n * Create a default TreeNode\n */\nexport function createDefaultTreeNode(partial: Partial<TreeNode> = {}): TreeNode {\n return {\n ID: '',\n Label: '',\n Type: 'branch',\n ParentID: null,\n Icon: 'fa-solid fa-folder',\n Data: {},\n Children: [],\n Expanded: false,\n Selected: false,\n Level: 0,\n Loading: false,\n Visible: true,\n MatchesSearch: false,\n EntityName: '',\n ...partial\n };\n}\n\n/**\n * Create default branch config with sensible defaults\n */\nexport function createDefaultBranchConfig(partial: Partial<TreeBranchConfig> = {}): TreeBranchConfig {\n return {\n EntityName: '',\n DisplayField: 'Name',\n IDField: 'ID',\n ParentIDField: 'ParentID',\n DefaultIcon: 'fa-solid fa-folder',\n OrderBy: 'Name ASC',\n ...partial\n };\n}\n\n/**\n * Create default leaf config with sensible defaults\n */\nexport function createDefaultLeafConfig(partial: Partial<TreeLeafConfig> = {}): TreeLeafConfig {\n return {\n EntityName: '',\n ParentField: '',\n DisplayField: 'Name',\n IDField: 'ID',\n DefaultIcon: 'fa-solid fa-file',\n OrderBy: 'Name ASC',\n ...partial\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tree-types.js","sourceRoot":"","sources":["../../../src/lib/models/tree-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AA+VH,2CAA2C;AAC3C,mBAAmB;AACnB,2CAA2C;AAE3C;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAA6B,EAAE;IACjE,OAAO;QACH,EAAE,EAAE,EAAE;QACN,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,IAAI;QACb,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,EAAE;QACd,GAAG,OAAO;KACb,CAAC;AACN,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,qBAAqB,CAAC,UAA6B,EAAE;IACjE,OAAO,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,UAAqC,EAAE;IAC7E,OAAO;QACH,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,MAAM;QACpB,OAAO,EAAE,IAAI;QACb,aAAa,EAAE,UAAU;QACzB,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE,UAAU;QACnB,GAAG,OAAO;KACb,CAAC;AACN,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,yBAAyB,CAAC,UAAqC,EAAE;IAC7E,OAAO,yBAAyB,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAmC,EAAE;IACzE,OAAO;QACH,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,MAAM;QACpB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,kBAAkB;QAC/B,OAAO,EAAE,UAAU;QACnB,GAAG,OAAO;KACb,CAAC;AACN,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,uBAAuB,CAAC,UAAmC,EAAE;IACzE,OAAO,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["/**\n * Tree Types and Interfaces for @memberjunction/ng-trees\n */\n\n// ========================================\n// Entity Configuration Types\n// ========================================\n\n/**\n * Configuration for the tree's branch (category/folder) entity.\n * Branches can contain other branches and/or leaf nodes.\n */\nexport interface TreeBranchConfig {\n /** Entity name for branch nodes (e.g., 'MJ: Query Categories') */\n EntityName: string;\n\n /** Field to display as node label (default: 'Name') */\n DisplayField?: string;\n\n /** Primary key field (default: 'ID') */\n IDField?: string;\n\n /** Parent ID field for hierarchy (default: 'ParentID') */\n ParentIDField?: string;\n\n /** Field name for node icon (dynamic per-node) */\n IconField?: string;\n\n /** Static icon if IconField not provided (default: 'fa-solid fa-folder') */\n DefaultIcon?: string;\n\n /** Field name for icon/folder color */\n ColorField?: string;\n\n /** Default color if ColorField not provided */\n DefaultColor?: string;\n\n /** Optional extra filter for RunView */\n ExtraFilter?: string;\n\n /** Optional order by clause (default: 'Name ASC') */\n OrderBy?: string;\n\n /** Optional field to show as secondary text/description */\n DescriptionField?: string;\n\n /** Optional field for badge/count display */\n BadgeField?: string;\n\n /** Whether to cache results locally (default: true) */\n CacheLocal?: boolean;\n}\n\n/**\n * Configuration for M2M junction table relationships.\n * Used when leaves relate to branches through an intermediate junction table.\n */\nexport interface TreeJunctionConfig {\n /** Junction entity name (e.g., 'MJ: Collection Artifacts') */\n EntityName: string;\n\n /** Field in junction that references the leaf entity (e.g., 'ArtifactVersionID') */\n LeafForeignKey: string;\n\n /** Field in junction that references the branch entity (e.g., 'CollectionID') */\n BranchForeignKey: string;\n\n /** Optional extra filter for the junction query */\n ExtraFilter?: string;\n\n /** Whether to cache junction results locally (default: true) */\n CacheLocal?: boolean;\n\n /**\n * Optional indirect mapping when junction references an intermediate entity.\n * Example: CollectionArtifact.ArtifactVersionID -> ArtifactVersion.ArtifactID -> Artifact.ID\n */\n IndirectLeafMapping?: {\n /** Intermediate entity name (e.g., 'MJ: Artifact Versions') */\n IntermediateEntity: string;\n\n /** ID field in intermediate entity that junction references (e.g., 'ID') */\n IntermediateIDField: string;\n\n /** Field in intermediate entity that points to the actual leaf (e.g., 'ArtifactID') */\n LeafIDField: string;\n\n /** Optional extra filter for the intermediate entity query */\n ExtraFilter?: string;\n\n /** Whether to cache intermediate results locally (default: true) */\n CacheLocal?: boolean;\n };\n}\n\n/**\n * Configuration for the tree's leaf entity (optional).\n * Leaf nodes are the selectable items within branch nodes.\n */\nexport interface TreeLeafConfig {\n /** Entity name for leaf nodes (e.g., 'Queries') */\n EntityName: string;\n\n /**\n * Field that links to parent branch (e.g., 'CategoryID').\n * Leave empty string if using JunctionConfig for M2M relationships.\n */\n ParentField: string;\n\n /** Field to display as node label (default: 'Name') */\n DisplayField?: string;\n\n /** Primary key field (default: 'ID') */\n IDField?: string;\n\n /** Field name for node icon (dynamic per-node) */\n IconField?: string;\n\n /** Static icon for all leaves (default: 'fa-solid fa-file') */\n DefaultIcon?: string;\n\n /** Optional extra filter for RunView */\n ExtraFilter?: string;\n\n /** Optional order by clause (default: 'Name ASC') */\n OrderBy?: string;\n\n /** Optional field to show as secondary text/description */\n DescriptionField?: string;\n\n /** Optional field for badge/count display */\n BadgeField?: string;\n\n /**\n * Optional M2M junction configuration for indirect parent relationships.\n * When specified, leaves are parented to branches based on junction table lookups\n * instead of using the direct ParentField.\n */\n JunctionConfig?: TreeJunctionConfig;\n\n /** Whether to cache results locally (default: true) */\n CacheLocal?: boolean;\n}\n\n// ========================================\n// Tree Node Types\n// ========================================\n\n/**\n * Node type identifier\n */\nexport type TreeNodeType = 'branch' | 'leaf';\n\n/**\n * Internal tree node representation\n */\nexport interface TreeNode {\n /** Unique identifier */\n ID: string;\n\n /** Display text (from DisplayField) */\n Label: string;\n\n /** Node type: branch (folder) or leaf (item) */\n Type: TreeNodeType;\n\n /** Parent node ID (null for root nodes) */\n ParentID: string | null;\n\n /** Icon class (Font Awesome or similar) */\n Icon: string;\n\n /** Icon color (CSS color value) */\n Color?: string;\n\n /** Original entity data for custom access */\n Data: Record<string, unknown>;\n\n /** Child nodes (branches and/or leaves) */\n Children: TreeNode[];\n\n /** UI state: is node expanded */\n Expanded: boolean;\n\n /** UI state: is node selected */\n Selected: boolean;\n\n /** Depth level (0 = root) */\n Level: number;\n\n /** Is this node currently loading children */\n Loading: boolean;\n\n /** Secondary description text */\n Description?: string;\n\n /** Badge text (e.g., count) */\n Badge?: string;\n\n /** Is this node visible (for filtering) */\n Visible: boolean;\n\n /** Does this node match the current search */\n MatchesSearch: boolean;\n\n /** Entity name this node came from */\n EntityName: string;\n}\n\n// ========================================\n// Selection Types\n// ========================================\n\n/**\n * Selection mode for the tree\n */\nexport type TreeSelectionMode = 'single' | 'multiple' | 'none';\n\n/**\n * What node types can be selected\n */\nexport type TreeSelectableTypes = 'branch' | 'leaf' | 'both';\n\n// ========================================\n// Component Configuration Types\n// ========================================\n\n/**\n * CSS class overrides for tree styling\n */\nexport interface TreeStyleConfig {\n /** Class for the tree container */\n ContainerClass?: string;\n\n /** Class for tree nodes */\n NodeClass?: string;\n\n /** Class for selected nodes */\n SelectedClass?: string;\n\n /** Class for hovered nodes */\n HoverClass?: string;\n\n /** Class for branch nodes */\n BranchClass?: string;\n\n /** Class for leaf nodes */\n LeafClass?: string;\n\n /** Class for expanded branches */\n ExpandedClass?: string;\n\n /** Class for the dropdown container */\n DropdownClass?: string;\n\n /** Class for the search input */\n SearchInputClass?: string;\n}\n\n/**\n * Keyboard navigation configuration\n */\nexport interface TreeKeyboardConfig {\n /** Enable keyboard navigation (default: true) */\n Enabled?: boolean;\n\n /** Enable type-ahead search (default: true) */\n TypeAhead?: boolean;\n\n /** Key to expand node (default: 'ArrowRight') */\n ExpandKey?: string;\n\n /** Key to collapse node (default: 'ArrowLeft') */\n CollapseKey?: string;\n\n /** Key to select node (default: 'Enter' or 'Space') */\n SelectKey?: string;\n}\n\n// ========================================\n// Dropdown Configuration Types\n// ========================================\n\n/**\n * Dropdown positioning preference\n */\nexport type DropdownPosition = 'auto' | 'below' | 'above';\n\n/**\n * Configuration for dropdown behavior\n */\nexport interface TreeDropdownConfig {\n /** Preferred position (default: 'auto') */\n Position?: DropdownPosition;\n\n /** Max height of dropdown (default: '300px') */\n MaxHeight?: string;\n\n /** Min width of dropdown (default: match input) */\n MinWidth?: string;\n\n /** Close on outside click (default: true) */\n CloseOnOutsideClick?: boolean;\n\n /** Close on selection (single mode only, default: true) */\n CloseOnSelect?: boolean;\n\n /** Close on escape key (default: true) */\n CloseOnEscape?: boolean;\n\n /** Animation duration in ms (default: 150) */\n AnimationDuration?: number;\n}\n\n// ========================================\n// Search Configuration Types\n// ========================================\n\n/**\n * Configuration for search behavior\n */\nexport interface TreeSearchConfig {\n /** Enable search (default: true for dropdown) */\n Enabled?: boolean;\n\n /** Placeholder text */\n Placeholder?: string;\n\n /** Minimum characters to trigger search (default: 1) */\n MinLength?: number;\n\n /** Debounce time in ms (default: 200) */\n DebounceMs?: number;\n\n /** Search branches (default: true) */\n SearchBranches?: boolean;\n\n /** Search leaves (default: true) */\n SearchLeaves?: boolean;\n\n /** Case sensitive search (default: false) */\n CaseSensitive?: boolean;\n\n /** Search in description field too (default: false) */\n SearchDescription?: boolean;\n\n /** Highlight matching text (default: true) */\n HighlightMatches?: boolean;\n\n /** Auto-expand to show matches (default: true) */\n AutoExpandMatches?: boolean;\n}\n\n// ========================================\n// Helper Functions\n// ========================================\n\n/**\n * Create a default TreeNode\n */\nexport function CreateDefaultTreeNode(partial: Partial<TreeNode> = {}): TreeNode {\n return {\n ID: '',\n Label: '',\n Type: 'branch',\n ParentID: null,\n Icon: 'fa-solid fa-folder',\n Data: {},\n Children: [],\n Expanded: false,\n Selected: false,\n Level: 0,\n Loading: false,\n Visible: true,\n MatchesSearch: false,\n EntityName: '',\n ...partial\n };\n}\n\n/** @deprecated Use {@link CreateDefaultTreeNode}. */\nexport function createDefaultTreeNode(partial: Partial<TreeNode> = {}): TreeNode {\n return CreateDefaultTreeNode(partial);\n}\n\n/**\n * Create default branch config with sensible defaults\n */\nexport function CreateDefaultBranchConfig(partial: Partial<TreeBranchConfig> = {}): TreeBranchConfig {\n return {\n EntityName: '',\n DisplayField: 'Name',\n IDField: 'ID',\n ParentIDField: 'ParentID',\n DefaultIcon: 'fa-solid fa-folder',\n OrderBy: 'Name ASC',\n ...partial\n };\n}\n\n/** @deprecated Use {@link CreateDefaultBranchConfig}. */\nexport function createDefaultBranchConfig(partial: Partial<TreeBranchConfig> = {}): TreeBranchConfig {\n return CreateDefaultBranchConfig(partial);\n}\n\n/**\n * Create default leaf config with sensible defaults\n */\nexport function CreateDefaultLeafConfig(partial: Partial<TreeLeafConfig> = {}): TreeLeafConfig {\n return {\n EntityName: '',\n ParentField: '',\n DisplayField: 'Name',\n IDField: 'ID',\n DefaultIcon: 'fa-solid fa-file',\n OrderBy: 'Name ASC',\n ...partial\n };\n}\n\n/** @deprecated Use {@link CreateDefaultLeafConfig}. */\nexport function createDefaultLeafConfig(partial: Partial<TreeLeafConfig> = {}): TreeLeafConfig {\n return CreateDefaultLeafConfig(partial);\n}\n"]}
|
|
@@ -198,14 +198,20 @@ export declare class TreeComponent extends BaseAngularComponent implements OnIni
|
|
|
198
198
|
/**
|
|
199
199
|
* Handle node click
|
|
200
200
|
*/
|
|
201
|
+
OnNodeClick(node: TreeNode, event: MouseEvent): void;
|
|
202
|
+
/** @deprecated Use {@link OnNodeClick}. */
|
|
201
203
|
onNodeClick(node: TreeNode, event: MouseEvent): void;
|
|
202
204
|
/**
|
|
203
205
|
* Handle node double-click
|
|
204
206
|
*/
|
|
207
|
+
OnNodeDoubleClick(node: TreeNode, event: MouseEvent): void;
|
|
208
|
+
/** @deprecated Use {@link OnNodeDoubleClick}. */
|
|
205
209
|
onNodeDoubleClick(node: TreeNode, event: MouseEvent): void;
|
|
206
210
|
/**
|
|
207
211
|
* Handle toggle click
|
|
208
212
|
*/
|
|
213
|
+
OnToggleClick(node: TreeNode, event: MouseEvent): void;
|
|
214
|
+
/** @deprecated Use {@link OnToggleClick}. */
|
|
209
215
|
onToggleClick(node: TreeNode, event: MouseEvent): void;
|
|
210
216
|
onKeyDown(event: KeyboardEvent): void;
|
|
211
217
|
/**
|
|
@@ -342,22 +348,32 @@ export declare class TreeComponent extends BaseAngularComponent implements OnIni
|
|
|
342
348
|
/**
|
|
343
349
|
* Get the padding for a node based on its level
|
|
344
350
|
*/
|
|
351
|
+
GetNodePadding(node: TreeNode): string;
|
|
352
|
+
/** @deprecated Use {@link GetNodePadding}. */
|
|
345
353
|
getNodePadding(node: TreeNode): string;
|
|
346
354
|
/**
|
|
347
355
|
* Get CSS classes for a node
|
|
348
356
|
*/
|
|
357
|
+
GetNodeClasses(node: TreeNode): Record<string, boolean>;
|
|
358
|
+
/** @deprecated Use {@link GetNodeClasses}. */
|
|
349
359
|
getNodeClasses(node: TreeNode): Record<string, boolean>;
|
|
350
360
|
/**
|
|
351
361
|
* Get container classes
|
|
352
362
|
*/
|
|
363
|
+
GetContainerClasses(): Record<string, boolean>;
|
|
364
|
+
/** @deprecated Use {@link GetContainerClasses}. */
|
|
353
365
|
getContainerClasses(): Record<string, boolean>;
|
|
354
366
|
/**
|
|
355
367
|
* Track nodes for ngFor
|
|
356
368
|
*/
|
|
369
|
+
TrackNode(index: number, node: TreeNode): string;
|
|
370
|
+
/** @deprecated Use {@link TrackNode}. */
|
|
357
371
|
trackNode(index: number, node: TreeNode): string;
|
|
358
372
|
/**
|
|
359
373
|
* Get label HTML with search text highlighted
|
|
360
374
|
*/
|
|
375
|
+
GetHighlightedLabel(node: TreeNode): string;
|
|
376
|
+
/** @deprecated Use {@link GetHighlightedLabel}. */
|
|
361
377
|
getHighlightedLabel(node: TreeNode): string;
|
|
362
378
|
/**
|
|
363
379
|
* Escape HTML special characters to prevent XSS
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.component.d.ts","sourceRoot":"","sources":["../../../src/lib/tree/tree.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAIH,YAAY,EACZ,iBAAiB,EACjB,MAAM,EACN,SAAS,EACT,UAAU,EAEb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EACH,QAAQ,EACR,gBAAgB,EAChB,cAAc,EAEd,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAErB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACH,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,EACtB,+BAA+B,EAC/B,8BAA8B,EACjC,MAAM,uBAAuB,CAAC;;AAE/B,qBAMa,aAAc,SAAQ,oBAAqB,YAAW,MAAM,EAAE,SAAS;IAyS5E,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,UAAU;IArS/B,wDAAwD;IACxD,OAAO,CAAC,aAAa,CAAiC;IACtD,IACI,YAAY,CAAC,KAAK,EAAE,gBAAgB,EAUvC;IAC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OAEG;IACI,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAmB9D,8CAA8C;IACvC,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI9D;;OAEG;IACI,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IASrD,mDAAmD;IAC5C,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIrD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM;IAIvD,yCAAyC;IAClC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM;IAIvD;;OAEG;IACI,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM;IAyBlD,mDAAmD;IAC5C,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM;IAIlD;;OAEG;IACH,OAAO,CAAC,UAAU;yCAvxDT,aAAa;2CAAb,aAAa;CA4xDzB"}
|
|
@@ -7,7 +7,7 @@ import { Component, Input, Output, EventEmitter, HostListener } from '@angular/c
|
|
|
7
7
|
import { RunView } from '@memberjunction/core';
|
|
8
8
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
9
9
|
import { UUIDsEqual, NormalizeUUID } from '@memberjunction/global';
|
|
10
|
-
import {
|
|
10
|
+
import { CreateDefaultTreeNode } from '../models/tree-types';
|
|
11
11
|
import { BeforeNodeSelectEventArgs, AfterNodeSelectEventArgs, BeforeNodeDeselectEventArgs, AfterNodeDeselectEventArgs, BeforeNodeExpandEventArgs, AfterNodeExpandEventArgs, BeforeNodeCollapseEventArgs, AfterNodeCollapseEventArgs, BeforeNodeClickEventArgs, AfterNodeClickEventArgs, BeforeNodeDoubleClickEventArgs, AfterNodeDoubleClickEventArgs, BeforeDataLoadEventArgs, AfterDataLoadEventArgs, BeforeKeyboardNavigateEventArgs, AfterKeyboardNavigateEventArgs } from '../events/tree-events';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
import * as i1 from "@angular/common";
|
|
@@ -614,7 +614,7 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
614
614
|
/**
|
|
615
615
|
* Handle node click
|
|
616
616
|
*/
|
|
617
|
-
|
|
617
|
+
OnNodeClick(node, event) {
|
|
618
618
|
// Fire before click event
|
|
619
619
|
const beforeClickEvent = new BeforeNodeClickEventArgs(this, node, event);
|
|
620
620
|
this.BeforeNodeClick.emit(beforeClickEvent);
|
|
@@ -640,10 +640,14 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
640
640
|
const afterClickEvent = new AfterNodeClickEventArgs(this, node, event);
|
|
641
641
|
this.AfterNodeClick.emit(afterClickEvent);
|
|
642
642
|
}
|
|
643
|
+
/** @deprecated Use {@link OnNodeClick}. */
|
|
644
|
+
onNodeClick(node, event) {
|
|
645
|
+
return this.OnNodeClick(node, event);
|
|
646
|
+
}
|
|
643
647
|
/**
|
|
644
648
|
* Handle node double-click
|
|
645
649
|
*/
|
|
646
|
-
|
|
650
|
+
OnNodeDoubleClick(node, event) {
|
|
647
651
|
// Fire before event
|
|
648
652
|
const beforeEvent = new BeforeNodeDoubleClickEventArgs(this, node, event);
|
|
649
653
|
this.BeforeNodeDoubleClick.emit(beforeEvent);
|
|
@@ -658,13 +662,21 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
658
662
|
const afterEvent = new AfterNodeDoubleClickEventArgs(this, node, event);
|
|
659
663
|
this.AfterNodeDoubleClick.emit(afterEvent);
|
|
660
664
|
}
|
|
665
|
+
/** @deprecated Use {@link OnNodeDoubleClick}. */
|
|
666
|
+
onNodeDoubleClick(node, event) {
|
|
667
|
+
return this.OnNodeDoubleClick(node, event);
|
|
668
|
+
}
|
|
661
669
|
/**
|
|
662
670
|
* Handle toggle click
|
|
663
671
|
*/
|
|
664
|
-
|
|
672
|
+
OnToggleClick(node, event) {
|
|
665
673
|
event.stopPropagation();
|
|
666
674
|
this.toggleNodeExpansion(node);
|
|
667
675
|
}
|
|
676
|
+
/** @deprecated Use {@link OnToggleClick}. */
|
|
677
|
+
onToggleClick(node, event) {
|
|
678
|
+
return this.OnToggleClick(node, event);
|
|
679
|
+
}
|
|
668
680
|
// ========================================
|
|
669
681
|
// Keyboard Navigation
|
|
670
682
|
// ========================================
|
|
@@ -1017,9 +1029,9 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
1017
1029
|
for (const data of branchData) {
|
|
1018
1030
|
const id = String(data[idField] || '');
|
|
1019
1031
|
const parentId = data[parentIdField] ? String(data[parentIdField]) : null;
|
|
1020
|
-
const node =
|
|
1032
|
+
const node = CreateDefaultTreeNode({
|
|
1021
1033
|
ID: id,
|
|
1022
|
-
Label: String(data[displayField] || ''),
|
|
1034
|
+
Label: String(data[displayField] || data['Name'] || ''),
|
|
1023
1035
|
Type: 'branch',
|
|
1024
1036
|
ParentID: parentId,
|
|
1025
1037
|
Icon: this.getNodeIcon(data, config.IconField, config.DefaultIcon || 'fa-solid fa-folder'),
|
|
@@ -1094,9 +1106,9 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
1094
1106
|
console.debug(`[TreeComponent] Skipping leaf ${id} (${data[displayField]}) - not in junction mappings`);
|
|
1095
1107
|
continue; // Skip leaves not in any branch via junction
|
|
1096
1108
|
}
|
|
1097
|
-
const leaf =
|
|
1109
|
+
const leaf = CreateDefaultTreeNode({
|
|
1098
1110
|
ID: id,
|
|
1099
|
-
Label: String(data[displayField] || ''),
|
|
1111
|
+
Label: String(data[displayField] || data['Name'] || ''),
|
|
1100
1112
|
Type: 'leaf',
|
|
1101
1113
|
ParentID: null, // Will be set based on attachment
|
|
1102
1114
|
Icon: this.getNodeIcon(data, config.IconField, config.DefaultIcon || 'fa-solid fa-file'),
|
|
@@ -1126,7 +1138,7 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
1126
1138
|
else {
|
|
1127
1139
|
// Additional attachments: create a clone of the leaf
|
|
1128
1140
|
// This allows the same artifact to appear under multiple collections
|
|
1129
|
-
const leafClone =
|
|
1141
|
+
const leafClone = CreateDefaultTreeNode({
|
|
1130
1142
|
...leaf,
|
|
1131
1143
|
ParentID: branchId,
|
|
1132
1144
|
Level: parent.Level + 1,
|
|
@@ -1557,7 +1569,7 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
1557
1569
|
/**
|
|
1558
1570
|
* Get the padding for a node based on its level
|
|
1559
1571
|
*/
|
|
1560
|
-
|
|
1572
|
+
GetNodePadding(node) {
|
|
1561
1573
|
const basePadding = node.Level * this._indentSize;
|
|
1562
1574
|
// Root-level leaves need a small indent since they have no toggle button
|
|
1563
1575
|
// to align them with nested items
|
|
@@ -1566,10 +1578,14 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
1566
1578
|
}
|
|
1567
1579
|
return `${basePadding}px`;
|
|
1568
1580
|
}
|
|
1581
|
+
/** @deprecated Use {@link GetNodePadding}. */
|
|
1582
|
+
getNodePadding(node) {
|
|
1583
|
+
return this.GetNodePadding(node);
|
|
1584
|
+
}
|
|
1569
1585
|
/**
|
|
1570
1586
|
* Get CSS classes for a node
|
|
1571
1587
|
*/
|
|
1572
|
-
|
|
1588
|
+
GetNodeClasses(node) {
|
|
1573
1589
|
return {
|
|
1574
1590
|
'tree-node': true,
|
|
1575
1591
|
'tree-node--branch': node.Type === 'branch',
|
|
@@ -1587,10 +1603,14 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
1587
1603
|
[this._styleConfig.ExpandedClass || '']: node.Expanded && !!this._styleConfig.ExpandedClass
|
|
1588
1604
|
};
|
|
1589
1605
|
}
|
|
1606
|
+
/** @deprecated Use {@link GetNodeClasses}. */
|
|
1607
|
+
getNodeClasses(node) {
|
|
1608
|
+
return this.GetNodeClasses(node);
|
|
1609
|
+
}
|
|
1590
1610
|
/**
|
|
1591
1611
|
* Get container classes
|
|
1592
1612
|
*/
|
|
1593
|
-
|
|
1613
|
+
GetContainerClasses() {
|
|
1594
1614
|
return {
|
|
1595
1615
|
'tree-container': true,
|
|
1596
1616
|
'tree-container--loading': this.IsLoading,
|
|
@@ -1598,16 +1618,24 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
1598
1618
|
[this._styleConfig.ContainerClass || '']: !!this._styleConfig.ContainerClass
|
|
1599
1619
|
};
|
|
1600
1620
|
}
|
|
1621
|
+
/** @deprecated Use {@link GetContainerClasses}. */
|
|
1622
|
+
getContainerClasses() {
|
|
1623
|
+
return this.GetContainerClasses();
|
|
1624
|
+
}
|
|
1601
1625
|
/**
|
|
1602
1626
|
* Track nodes for ngFor
|
|
1603
1627
|
*/
|
|
1604
|
-
|
|
1628
|
+
TrackNode(index, node) {
|
|
1605
1629
|
return node.ID;
|
|
1606
1630
|
}
|
|
1631
|
+
/** @deprecated Use {@link TrackNode}. */
|
|
1632
|
+
trackNode(index, node) {
|
|
1633
|
+
return this.TrackNode(index, node);
|
|
1634
|
+
}
|
|
1607
1635
|
/**
|
|
1608
1636
|
* Get label HTML with search text highlighted
|
|
1609
1637
|
*/
|
|
1610
|
-
|
|
1638
|
+
GetHighlightedLabel(node) {
|
|
1611
1639
|
const label = node.Label;
|
|
1612
1640
|
// No search text or node doesn't match - return plain label (escaped)
|
|
1613
1641
|
if (!this.CurrentSearchText || !node.MatchesSearch) {
|
|
@@ -1626,6 +1654,10 @@ export class TreeComponent extends BaseAngularComponent {
|
|
|
1626
1654
|
const after = label.substring(matchIndex + this.CurrentSearchText.length);
|
|
1627
1655
|
return `${this.escapeHtml(before)}<mark class="tree-search-highlight">${this.escapeHtml(match)}</mark>${this.escapeHtml(after)}`;
|
|
1628
1656
|
}
|
|
1657
|
+
/** @deprecated Use {@link GetHighlightedLabel}. */
|
|
1658
|
+
getHighlightedLabel(node) {
|
|
1659
|
+
return this.GetHighlightedLabel(node);
|
|
1660
|
+
}
|
|
1629
1661
|
/**
|
|
1630
1662
|
* Escape HTML special characters to prevent XSS
|
|
1631
1663
|
*/
|