@energycap/components 0.38.1 → 0.38.2-ECAP-19116-hierarchy-custom-item-templates.20230927-0954
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/esm2020/lib/display/hierarchy/hierarchy-base.mjs +1 -1
- package/esm2020/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.mjs +5 -3
- package/esm2020/lib/display/tree/tree.component.mjs +5 -3
- package/fesm2015/energycap-components.mjs +8 -4
- package/fesm2015/energycap-components.mjs.map +1 -1
- package/fesm2020/energycap-components.mjs +8 -4
- package/fesm2020/energycap-components.mjs.map +1 -1
- package/lib/display/hierarchy/hierarchy-base.d.ts +2 -0
- package/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.d.ts +4 -2
- package/lib/display/tree/tree.component.d.ts +3 -1
- package/package.json +1 -1
@@ -9,6 +9,8 @@ export declare class HierarchyItem implements LinkItem {
|
|
9
9
|
id: string;
|
10
10
|
/** Label to display for the item */
|
11
11
|
label: string;
|
12
|
+
/** Text to be displayed in the item's tooltip. When not provided, the label will be displayed. */
|
13
|
+
tooltip?: string;
|
12
14
|
/** Indicates how many levels deep the item is in the parent structure */
|
13
15
|
level: number;
|
14
16
|
url?: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Injector, OnInit } from '@angular/core';
|
1
|
+
import { Injector, OnInit, TemplateRef } from '@angular/core';
|
2
2
|
import { Subject } from 'rxjs';
|
3
3
|
import { ScrollService } from '../../../core/scroll.service';
|
4
4
|
import { HierarchyBase, HierarchyItem } from '../hierarchy-base';
|
@@ -9,6 +9,8 @@ export declare class HierarchyTreeComponent extends HierarchyBase implements OnI
|
|
9
9
|
id: string;
|
10
10
|
/** Hide the root node */
|
11
11
|
hideRootNode?: boolean;
|
12
|
+
/** Custom item template to use in place of the default one */
|
13
|
+
customItemTemplate?: TemplateRef<any>;
|
12
14
|
/** Emits a HierarchyItem whenever one is selected by clicking */
|
13
15
|
itemSelected: Subject<HierarchyItem>;
|
14
16
|
/** The width of the spacing before a tree node, multipled by a HierarchyItem's level. Value is in pixels */
|
@@ -28,5 +30,5 @@ export declare class HierarchyTreeComponent extends HierarchyBase implements OnI
|
|
28
30
|
*/
|
29
31
|
selectItem(item: HierarchyItem): void;
|
30
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<HierarchyTreeComponent, never>;
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HierarchyTreeComponent, "ec-hierarchy-tree", never, { "id": "id"; "hideRootNode": "hideRootNode"; }, { "itemSelected": "itemSelected"; }, never, never, false, never>;
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HierarchyTreeComponent, "ec-hierarchy-tree", never, { "id": "id"; "hideRootNode": "hideRootNode"; "customItemTemplate": "customItemTemplate"; }, { "itemSelected": "itemSelected"; }, never, never, false, never>;
|
32
34
|
}
|
@@ -33,6 +33,8 @@ export declare class TreeComponent {
|
|
33
33
|
treeMenuMaintainSelectedItem: boolean;
|
34
34
|
/** Used when a custom template is needed for the menu items when the tree is in menu mode */
|
35
35
|
customTreeMenuTemplate?: TemplateRef<any>;
|
36
|
+
/** Used when a custom template is needed for the hierarchy items when the tree is in hierarchy mode */
|
37
|
+
customHierarchyItemTemplate?: TemplateRef<any>;
|
36
38
|
/** Tree overlay */
|
37
39
|
status?: Overlay;
|
38
40
|
/** Display the tree items with a MenuComponent or a HierarchyTreeComponent */
|
@@ -65,5 +67,5 @@ export declare class TreeComponent {
|
|
65
67
|
/** Scroll to the tree item that is currently selected. */
|
66
68
|
scrollToSelectedItem(): void;
|
67
69
|
static ɵfac: i0.ɵɵFactoryDeclaration<TreeComponent, never>;
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TreeComponent, "ec-tree", never, { "id": "id"; "treeTitle": "treeTitle"; "hideTreeHeader": "hideTreeHeader"; "treeItems": "treeItems"; "treeHierarchyHideRootNode": "treeHierarchyHideRootNode"; "treeHierarchy": "treeHierarchy"; "treeMenuMaintainSelectedItem": "treeMenuMaintainSelectedItem"; "customTreeMenuTemplate": "customTreeMenuTemplate"; "status": "status"; "type": "type"; "menuItems": "menuItems"; "menuStatus": "menuStatus"; "menuTemplateType": "menuTemplateType"; "preserveIconSpace": "preserveIconSpace"; "templateType": "templateType"; }, { "treeSelection": "treeSelection"; "getTreeItemChildren": "getTreeItemChildren"; }, never, never, false, never>;
|
70
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TreeComponent, "ec-tree", never, { "id": "id"; "treeTitle": "treeTitle"; "hideTreeHeader": "hideTreeHeader"; "treeItems": "treeItems"; "treeHierarchyHideRootNode": "treeHierarchyHideRootNode"; "treeHierarchy": "treeHierarchy"; "treeMenuMaintainSelectedItem": "treeMenuMaintainSelectedItem"; "customTreeMenuTemplate": "customTreeMenuTemplate"; "customHierarchyItemTemplate": "customHierarchyItemTemplate"; "status": "status"; "type": "type"; "menuItems": "menuItems"; "menuStatus": "menuStatus"; "menuTemplateType": "menuTemplateType"; "preserveIconSpace": "preserveIconSpace"; "templateType": "templateType"; }, { "treeSelection": "treeSelection"; "getTreeItemChildren": "getTreeItemChildren"; }, never, never, false, never>;
|
69
71
|
}
|