@energycap/components 0.28.4-ECAP-11928-All-Entity-Shell.20220407-1459 → 0.28.4-ECAP-11928-All-Entity-Shell.20220412-0821
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/bundles/energycap-components.umd.js +9 -1
- package/bundles/energycap-components.umd.js.map +1 -1
- package/bundles/energycap-components.umd.min.js +1 -1
- package/bundles/energycap-components.umd.min.js.map +1 -1
- package/energycap-components.metadata.json +1 -1
- package/esm2015/lib/display/tree/tree.component.js +11 -3
- package/fesm2015/energycap-components.js +9 -1
- package/fesm2015/energycap-components.js.map +1 -1
- package/lib/display/tree/tree.component.d.ts +9 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Input, HostBinding, Output, EventEmitter, ViewChild } from '@angular/core';
|
|
1
|
+
import { Component, Input, HostBinding, Output, EventEmitter, ViewChild, TemplateRef } from '@angular/core';
|
|
2
2
|
import { MenuComponent } from '../../controls/menu/menu.component';
|
|
3
3
|
import { HierarchyItem } from '../hierarchy/hierarchy-base';
|
|
4
4
|
import { HierarchyTreeComponent } from '../hierarchy/hierarchy-tree/hierarchy-tree.component';
|
|
@@ -10,6 +10,12 @@ export class TreeComponent {
|
|
|
10
10
|
this._id = '';
|
|
11
11
|
/** The tree's title displayed in the header */
|
|
12
12
|
this.treeTitle = '';
|
|
13
|
+
/** Used when the tree is in menu mode to tell the menu if it should maintain the selected item
|
|
14
|
+
* Useful in side nav components where this tree component may exist alongside other trees or menus
|
|
15
|
+
* used for navigation. If this tree is in menu mode you would want this set to false so when you select an item
|
|
16
|
+
* from a sibling navigation element the selection will not be maintained.
|
|
17
|
+
*/
|
|
18
|
+
this.treeMenuMaintainSelectedItem = true;
|
|
13
19
|
/** Tree overlay */
|
|
14
20
|
this.status = new Overlay('hasData');
|
|
15
21
|
/** Display the tree items with a MenuComponent or a HierarchyTreeComponent */
|
|
@@ -57,7 +63,7 @@ export class TreeComponent {
|
|
|
57
63
|
TreeComponent.decorators = [
|
|
58
64
|
{ type: Component, args: [{
|
|
59
65
|
selector: 'ec-tree',
|
|
60
|
-
template: "<header class=\"flex-shrink d-flex align-items-center border-bottom bg-content pl-2 pr-1\">\r\n <h2 id=\"{{id}}_title\"\r\n class=\"flex-grow mr-2 text-heading-1\">{{treeTitle | translate}}</h2>\r\n <ec-dropdown *ngIf=\"menuItems?.length\"\r\n id=\"{{id}}_dropdown\"\r\n class=\"flex-shrink\"\r\n icon=\"icon-menu\"\r\n [menuTemplateType]=\"menuTemplateType\"\r\n menuPosition=\"left\"\r\n [status]=\"menuStatus\"\r\n [popupFixed]=\"true\"\r\n [showArrow]=\"false\"\r\n [menuMinWidth]=\"240\"\r\n [items]=\"menuItems\">\r\n </ec-dropdown>\r\n</header>\r\n\r\n<div class=\"flex-grow d-flex\"\r\n ecOverlay\r\n [status]=\"status?.status\"\r\n [displayAsMask]=\"true\">\r\n <ng-container *ngIf=\"type === 'menu'\">\r\n <ec-menu [id]=\"id\"\r\n [items]=\"treeItems\"\r\n [templateType]=\"templateType\"\r\n [maintainSelectedItem]=\"
|
|
66
|
+
template: "<header class=\"flex-shrink d-flex align-items-center border-bottom bg-content pl-2 pr-1\">\r\n <h2 id=\"{{id}}_title\"\r\n class=\"flex-grow mr-2 text-heading-1\">{{treeTitle | translate}}</h2>\r\n <ec-dropdown *ngIf=\"menuItems?.length\"\r\n id=\"{{id}}_dropdown\"\r\n class=\"flex-shrink\"\r\n icon=\"icon-menu\"\r\n [menuTemplateType]=\"menuTemplateType\"\r\n menuPosition=\"left\"\r\n [status]=\"menuStatus\"\r\n [popupFixed]=\"true\"\r\n [showArrow]=\"false\"\r\n [menuMinWidth]=\"240\"\r\n [items]=\"menuItems\">\r\n </ec-dropdown>\r\n</header>\r\n\r\n<div class=\"flex-grow d-flex\"\r\n ecOverlay\r\n [status]=\"status?.status\"\r\n [displayAsMask]=\"true\">\r\n <ng-container *ngIf=\"type === 'menu'\">\r\n <ec-menu [id]=\"id\"\r\n [items]=\"treeItems\"\r\n [templateType]=\"templateType\"\r\n [maintainSelectedItem]=\"treeMenuMaintainSelectedItem\"\r\n [truncateItems]=\"true\"\r\n (selectedChanged)=\"onItemSelected($event)\"\r\n [customMenuTemplate]=\"customTreeMenuTemplate ? customTreeMenuTemplate : undefined\"\r\n class=\"flex-grow\">\r\n </ec-menu>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"type === 'hierarchy'\">\r\n <ec-hierarchy-tree [id]=\"id\"\r\n [rootNode]=\"treeHierarchy\"\r\n [hideRootNode]=\"treeHierarchyHideRootNode\"\r\n (getItemChildren)=\"onHierarchyGetItemChildren($event)\"\r\n (itemSelected)=\"onItemSelected($event)\"\r\n class=\"flex-grow d-flex\">\r\n </ec-hierarchy-tree>\r\n </ng-container>\r\n</div>",
|
|
61
67
|
styles: [":host{display:flex;flex-direction:column}header{height:3rem}ec-dropdown.fill{height:3rem;width:3rem}"]
|
|
62
68
|
},] }
|
|
63
69
|
];
|
|
@@ -69,6 +75,8 @@ TreeComponent.propDecorators = {
|
|
|
69
75
|
treeItems: [{ type: Input }],
|
|
70
76
|
treeHierarchyHideRootNode: [{ type: Input }],
|
|
71
77
|
treeHierarchy: [{ type: Input }],
|
|
78
|
+
treeMenuMaintainSelectedItem: [{ type: Input }],
|
|
79
|
+
customTreeMenuTemplate: [{ type: Input }],
|
|
72
80
|
status: [{ type: Input }],
|
|
73
81
|
type: [{ type: Input }],
|
|
74
82
|
menuItems: [{ type: Input }],
|
|
@@ -80,4 +88,4 @@ TreeComponent.propDecorators = {
|
|
|
80
88
|
hierarchyTreeComponent: [{ type: ViewChild, args: [HierarchyTreeComponent,] }],
|
|
81
89
|
templateType: [{ type: Input }]
|
|
82
90
|
};
|
|
83
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
91
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJlZS5jb21wb25lbnQuanMiLCJzb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MgY2hpbGRyZW4gKi9cclxuICBwdWJsaWMgb25IaWVyYXJjaHlHZXRJdGVtQ2hpbGRyZW4oaXRlbTogSGllcmFyY2h5SXRlbSkge1xyXG4gICAgdGhpcy5nZXRUcmVlSXRlbUNoaWxkcmVuLmVtaXQoaXRlbSk7XHJcbiAgfVxyXG5cclxuICAvKiogU2Nyb2xsIHRvIHRoZSB0cmVlIGl0ZW0gdGhhdCBpcyBjdXJyZW50bHkgc2VsZWN0ZWQuICovXHJcbiAgcHVibGljIHNjcm9sbFRvU2VsZWN0ZWRJdGVtKCkge1xyXG4gICAgaWYgKHRoaXMubWVudUNvbXBvbmVudCkge1xyXG4gICAgICB0aGlzLm1lbnVDb21wb25lbnQuc2Nyb2xsVG9TZWxlY3RlZEl0ZW0oKTtcclxuICAgIH1cclxuXHJcbiAgICBpZiAodGhpcy5oaWVyYXJjaHlUcmVlQ29tcG9uZW50KSB7XHJcbiAgICAgIHRoaXMuaGllcmFyY2h5VHJlZUNvbXBvbmVudC5zY3JvbGxUb1NlbGVjdGVkSXRlbSgpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -7352,6 +7352,12 @@ class TreeComponent {
|
|
|
7352
7352
|
this._id = '';
|
|
7353
7353
|
/** The tree's title displayed in the header */
|
|
7354
7354
|
this.treeTitle = '';
|
|
7355
|
+
/** Used when the tree is in menu mode to tell the menu if it should maintain the selected item
|
|
7356
|
+
* Useful in side nav components where this tree component may exist alongside other trees or menus
|
|
7357
|
+
* used for navigation. If this tree is in menu mode you would want this set to false so when you select an item
|
|
7358
|
+
* from a sibling navigation element the selection will not be maintained.
|
|
7359
|
+
*/
|
|
7360
|
+
this.treeMenuMaintainSelectedItem = true;
|
|
7355
7361
|
/** Tree overlay */
|
|
7356
7362
|
this.status = new Overlay('hasData');
|
|
7357
7363
|
/** Display the tree items with a MenuComponent or a HierarchyTreeComponent */
|
|
@@ -7399,7 +7405,7 @@ class TreeComponent {
|
|
|
7399
7405
|
TreeComponent.decorators = [
|
|
7400
7406
|
{ type: Component, args: [{
|
|
7401
7407
|
selector: 'ec-tree',
|
|
7402
|
-
template: "<header class=\"flex-shrink d-flex align-items-center border-bottom bg-content pl-2 pr-1\">\r\n <h2 id=\"{{id}}_title\"\r\n class=\"flex-grow mr-2 text-heading-1\">{{treeTitle | translate}}</h2>\r\n <ec-dropdown *ngIf=\"menuItems?.length\"\r\n id=\"{{id}}_dropdown\"\r\n class=\"flex-shrink\"\r\n icon=\"icon-menu\"\r\n [menuTemplateType]=\"menuTemplateType\"\r\n menuPosition=\"left\"\r\n [status]=\"menuStatus\"\r\n [popupFixed]=\"true\"\r\n [showArrow]=\"false\"\r\n [menuMinWidth]=\"240\"\r\n [items]=\"menuItems\">\r\n </ec-dropdown>\r\n</header>\r\n\r\n<div class=\"flex-grow d-flex\"\r\n ecOverlay\r\n [status]=\"status?.status\"\r\n [displayAsMask]=\"true\">\r\n <ng-container *ngIf=\"type === 'menu'\">\r\n <ec-menu [id]=\"id\"\r\n [items]=\"treeItems\"\r\n [templateType]=\"templateType\"\r\n [maintainSelectedItem]=\"
|
|
7408
|
+
template: "<header class=\"flex-shrink d-flex align-items-center border-bottom bg-content pl-2 pr-1\">\r\n <h2 id=\"{{id}}_title\"\r\n class=\"flex-grow mr-2 text-heading-1\">{{treeTitle | translate}}</h2>\r\n <ec-dropdown *ngIf=\"menuItems?.length\"\r\n id=\"{{id}}_dropdown\"\r\n class=\"flex-shrink\"\r\n icon=\"icon-menu\"\r\n [menuTemplateType]=\"menuTemplateType\"\r\n menuPosition=\"left\"\r\n [status]=\"menuStatus\"\r\n [popupFixed]=\"true\"\r\n [showArrow]=\"false\"\r\n [menuMinWidth]=\"240\"\r\n [items]=\"menuItems\">\r\n </ec-dropdown>\r\n</header>\r\n\r\n<div class=\"flex-grow d-flex\"\r\n ecOverlay\r\n [status]=\"status?.status\"\r\n [displayAsMask]=\"true\">\r\n <ng-container *ngIf=\"type === 'menu'\">\r\n <ec-menu [id]=\"id\"\r\n [items]=\"treeItems\"\r\n [templateType]=\"templateType\"\r\n [maintainSelectedItem]=\"treeMenuMaintainSelectedItem\"\r\n [truncateItems]=\"true\"\r\n (selectedChanged)=\"onItemSelected($event)\"\r\n [customMenuTemplate]=\"customTreeMenuTemplate ? customTreeMenuTemplate : undefined\"\r\n class=\"flex-grow\">\r\n </ec-menu>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"type === 'hierarchy'\">\r\n <ec-hierarchy-tree [id]=\"id\"\r\n [rootNode]=\"treeHierarchy\"\r\n [hideRootNode]=\"treeHierarchyHideRootNode\"\r\n (getItemChildren)=\"onHierarchyGetItemChildren($event)\"\r\n (itemSelected)=\"onItemSelected($event)\"\r\n class=\"flex-grow d-flex\">\r\n </ec-hierarchy-tree>\r\n </ng-container>\r\n</div>",
|
|
7403
7409
|
styles: [":host{display:flex;flex-direction:column}header{height:3rem}ec-dropdown.fill{height:3rem;width:3rem}"]
|
|
7404
7410
|
},] }
|
|
7405
7411
|
];
|
|
@@ -7411,6 +7417,8 @@ TreeComponent.propDecorators = {
|
|
|
7411
7417
|
treeItems: [{ type: Input }],
|
|
7412
7418
|
treeHierarchyHideRootNode: [{ type: Input }],
|
|
7413
7419
|
treeHierarchy: [{ type: Input }],
|
|
7420
|
+
treeMenuMaintainSelectedItem: [{ type: Input }],
|
|
7421
|
+
customTreeMenuTemplate: [{ type: Input }],
|
|
7414
7422
|
status: [{ type: Input }],
|
|
7415
7423
|
type: [{ type: Input }],
|
|
7416
7424
|
menuItems: [{ type: Input }],
|