@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.
@@ -7993,6 +7993,12 @@
7993
7993
  this._id = '';
7994
7994
  /** The tree's title displayed in the header */
7995
7995
  this.treeTitle = '';
7996
+ /** Used when the tree is in menu mode to tell the menu if it should maintain the selected item
7997
+ * Useful in side nav components where this tree component may exist alongside other trees or menus
7998
+ * used for navigation. If this tree is in menu mode you would want this set to false so when you select an item
7999
+ * from a sibling navigation element the selection will not be maintained.
8000
+ */
8001
+ this.treeMenuMaintainSelectedItem = true;
7996
8002
  /** Tree overlay */
7997
8003
  this.status = new Overlay('hasData');
7998
8004
  /** Display the tree items with a MenuComponent or a HierarchyTreeComponent */
@@ -8045,7 +8051,7 @@
8045
8051
  TreeComponent.decorators = [
8046
8052
  { type: i0.Component, args: [{
8047
8053
  selector: 'ec-tree',
8048
- 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]=\"false\"\r\n [truncateItems]=\"true\"\r\n (selectedChanged)=\"onItemSelected($event)\"\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>",
8054
+ 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>",
8049
8055
  styles: [":host{display:flex;flex-direction:column}header{height:3rem}ec-dropdown.fill{height:3rem;width:3rem}"]
8050
8056
  },] }
8051
8057
  ];
@@ -8057,6 +8063,8 @@
8057
8063
  treeItems: [{ type: i0.Input }],
8058
8064
  treeHierarchyHideRootNode: [{ type: i0.Input }],
8059
8065
  treeHierarchy: [{ type: i0.Input }],
8066
+ treeMenuMaintainSelectedItem: [{ type: i0.Input }],
8067
+ customTreeMenuTemplate: [{ type: i0.Input }],
8060
8068
  status: [{ type: i0.Input }],
8061
8069
  type: [{ type: i0.Input }],
8062
8070
  menuItems: [{ type: i0.Input }],