@energycap/components 0.28.5 → 0.28.6

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.
@@ -7999,6 +7999,14 @@
7999
7999
  this._id = '';
8000
8000
  /** The tree's title displayed in the header */
8001
8001
  this.treeTitle = '';
8002
+ /** Hides the tree header when set to true */
8003
+ this.hideTreeHeader = false;
8004
+ /** Used when the tree is in menu mode to tell the menu if it should maintain the selected item
8005
+ * Useful in side nav components where this tree component may exist alongside other trees or menus
8006
+ * used for navigation. If this tree is in menu mode you would want this set to false so when you select an item
8007
+ * from a sibling navigation element the selection will not be maintained.
8008
+ */
8009
+ this.treeMenuMaintainSelectedItem = true;
8002
8010
  /** Tree overlay */
8003
8011
  this.status = new Overlay('hasData');
8004
8012
  /** Display the tree items with a MenuComponent or a HierarchyTreeComponent */
@@ -8051,7 +8059,7 @@
8051
8059
  TreeComponent.decorators = [
8052
8060
  { type: i0.Component, args: [{
8053
8061
  selector: 'ec-tree',
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 [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>",
8062
+ template: "<header *ngIf=\"!hideTreeHeader\"\r\n 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>",
8055
8063
  styles: [":host{display:flex;flex-direction:column}header{height:3rem}ec-dropdown.fill{height:3rem;width:3rem}"]
8056
8064
  },] }
8057
8065
  ];
@@ -8060,9 +8068,12 @@
8060
8068
  attrId: [{ type: i0.HostBinding, args: ['attr.id',] }],
8061
8069
  id: [{ type: i0.Input }],
8062
8070
  treeTitle: [{ type: i0.Input }],
8071
+ hideTreeHeader: [{ type: i0.Input }],
8063
8072
  treeItems: [{ type: i0.Input }],
8064
8073
  treeHierarchyHideRootNode: [{ type: i0.Input }],
8065
8074
  treeHierarchy: [{ type: i0.Input }],
8075
+ treeMenuMaintainSelectedItem: [{ type: i0.Input }],
8076
+ customTreeMenuTemplate: [{ type: i0.Input }],
8066
8077
  status: [{ type: i0.Input }],
8067
8078
  type: [{ type: i0.Input }],
8068
8079
  menuItems: [{ type: i0.Input }],
@@ -8398,11 +8409,11 @@
8398
8409
  PageViewComponent.decorators = [
8399
8410
  { type: i0.Component, args: [{
8400
8411
  selector: 'ec-page-view',
8401
- template: "<div ecOverlay\r\n [status]=\"status?.status\"\r\n [message]=\"status?.message\"\r\n [displayAsMask]=\"true\"\r\n class=\"bg-body flex-grow d-flex\">\r\n <div id=\"PageViewScrollContainer\" \r\n class=\"d-flex flex-column flex-grow scroll-y\" \r\n [class.is-dialog]=\"isDialog\"\r\n [class.fit-content]=\"fitContent\"\r\n [class.sticky-footer]=\"stickyFooter && !!footerTemplate\"\r\n [class.overlay-visible]=\"status?.status !== 'hasData'\">\r\n <section>\r\n <ng-content></ng-content> \r\n </section>\r\n \r\n <footer>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n </footer>\r\n\r\n <header *ngIf=\"showHeader\">\r\n \r\n <ol id=\"breadcrumbs\"\r\n *ngIf=\"breadcrumbs?.length && !isDialog\">\r\n <li *ngFor=\"let crumb of breadcrumbs; last as isLast\">\r\n <a *ngIf=\"crumb.url; else label\"\r\n [routerLink]=\"crumb.url\">\r\n <ng-container *ngTemplateOutlet=\"label\"></ng-container>\r\n </a>\r\n <ng-template #label>{{crumb.label}}</ng-template>\r\n </li>\r\n </ol>\r\n \r\n <div *ngIf=\"!customHeaderTemplate; else customHeaderOutlet\" class=\"titlebar\">\r\n <app-page-title *ngIf=\"!customTitleTemplate; else customTitle\" \r\n [title]=\"title\"\r\n [subTitle]=\"subTitle\"\r\n [subTitleUrl]=\"subTitleUrl\"\r\n [titleIcon]=\"titleIcon\"\r\n class=\"title text-truncate\">\r\n </app-page-title>\r\n \r\n <ng-template #customTitle>\r\n <div class=\"title\">\r\n <ng-container *ngTemplateOutlet=\"customTitleTemplate\"></ng-container>\r\n </div>\r\n </ng-template>\r\n \r\n <div class=\"actions\">\r\n <ec-button id=\"primaryAction\"\r\n class=\"ml-2\"\r\n *ngIf=\"!hidePrimaryAction && onPrimaryAction.observers?.length\"\r\n [disabled]=\"status?.status === 'pending'\"\r\n type=\"primary\"\r\n [label]=\"primaryActionLabel\"\r\n (clicked)=\"primaryAction($event)\">\r\n </ec-button>\r\n <ec-button id=\"secondaryAction\"\r\n class=\"ml-2\"\r\n *ngIf=\"!hideSecondaryAction && onSecondaryAction.observers?.length\"\r\n type=\"secondary\"\r\n [label]=\"secondaryActionLabel\"\r\n (clicked)=\"secondaryAction($event)\">\r\n </ec-button>\r\n <ec-dropdown id=\"moreActions\"\r\n *ngIf=\"moreActions?.length\"\r\n [disabled]=\"status?.status === 'pending'\"\r\n class=\"ml-2\"\r\n buttonType=\"secondary\"\r\n [label]=\"moreActionsLabel\"\r\n [items]=\"moreActions\">\r\n </ec-dropdown>\r\n <ng-container *ngTemplateOutlet=\"customActionsTemplate\"></ng-container>\r\n </div>\r\n </div>\r\n \r\n <ng-template #customHeaderOutlet> \r\n <div class=\"page-header\">\r\n <ng-container *ngTemplateOutlet=\"customHeaderTemplate\"></ng-container>\r\n </div>\r\n </ng-template>\r\n \r\n <ec-banner *ngIf=\"errors\"\r\n id=\"pageViewErrors\"\r\n [class.border-bottom-0]=\"!isDialog\">\r\n <div [innerHtml]=\"errors\"></div>\r\n </ec-banner>\r\n </header>\r\n </div>\r\n</div>\r\n\r\n",
8412
+ template: "<div ecOverlay\r\n [status]=\"status?.status\"\r\n [message]=\"status?.message\"\r\n [displayAsMask]=\"true\"\r\n class=\"bg-body flex-grow d-flex\">\r\n <div id=\"PageViewScrollContainer\" \r\n class=\"d-flex flex-column flex-grow scroll-y\" \r\n [class.is-dialog]=\"isDialog\"\r\n [class.fit-content]=\"fitContent\"\r\n [class.sticky-footer]=\"stickyFooter && !!footerTemplate\"\r\n [class.overlay-visible]=\"status?.status !== 'hasData'\"\r\n [class.footer-visible]=\"!!footerTemplate\">\r\n <section>\r\n <ng-content></ng-content> \r\n </section>\r\n \r\n <footer *ngIf=\"footerTemplate\">\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n </footer>\r\n\r\n <header *ngIf=\"showHeader\">\r\n \r\n <ol id=\"breadcrumbs\"\r\n *ngIf=\"breadcrumbs?.length && !isDialog\">\r\n <li *ngFor=\"let crumb of breadcrumbs; last as isLast\">\r\n <a *ngIf=\"crumb.url; else label\"\r\n [routerLink]=\"crumb.url\">\r\n <ng-container *ngTemplateOutlet=\"label\"></ng-container>\r\n </a>\r\n <ng-template #label>{{crumb.label}}</ng-template>\r\n </li>\r\n </ol>\r\n \r\n <div *ngIf=\"!customHeaderTemplate; else customHeaderOutlet\" class=\"titlebar\">\r\n <app-page-title *ngIf=\"!customTitleTemplate; else customTitle\" \r\n [title]=\"title\"\r\n [subTitle]=\"subTitle\"\r\n [subTitleUrl]=\"subTitleUrl\"\r\n [titleIcon]=\"titleIcon\"\r\n class=\"title text-truncate\">\r\n </app-page-title>\r\n \r\n <ng-template #customTitle>\r\n <div class=\"title\">\r\n <ng-container *ngTemplateOutlet=\"customTitleTemplate\"></ng-container>\r\n </div>\r\n </ng-template>\r\n \r\n <div class=\"actions\">\r\n <ec-button id=\"primaryAction\"\r\n class=\"ml-2\"\r\n *ngIf=\"!hidePrimaryAction && onPrimaryAction.observers?.length\"\r\n [disabled]=\"status?.status === 'pending'\"\r\n type=\"primary\"\r\n [label]=\"primaryActionLabel\"\r\n (clicked)=\"primaryAction($event)\">\r\n </ec-button>\r\n <ec-button id=\"secondaryAction\"\r\n class=\"ml-2\"\r\n *ngIf=\"!hideSecondaryAction && onSecondaryAction.observers?.length\"\r\n type=\"secondary\"\r\n [label]=\"secondaryActionLabel\"\r\n (clicked)=\"secondaryAction($event)\">\r\n </ec-button>\r\n <ec-dropdown id=\"moreActions\"\r\n *ngIf=\"moreActions?.length\"\r\n [disabled]=\"status?.status === 'pending'\"\r\n class=\"ml-2\"\r\n buttonType=\"secondary\"\r\n [label]=\"moreActionsLabel\"\r\n [items]=\"moreActions\">\r\n </ec-dropdown>\r\n <ng-container *ngTemplateOutlet=\"customActionsTemplate\"></ng-container>\r\n </div>\r\n </div>\r\n \r\n <ng-template #customHeaderOutlet> \r\n <div class=\"page-header\">\r\n <ng-container *ngTemplateOutlet=\"customHeaderTemplate\"></ng-container>\r\n </div>\r\n </ng-template>\r\n \r\n <ec-banner *ngIf=\"errors\"\r\n id=\"pageViewErrors\"\r\n [class.border-bottom-0]=\"!isDialog\">\r\n <div [innerHtml]=\"errors\"></div>\r\n </ec-banner>\r\n </header>\r\n </div>\r\n</div>\r\n\r\n",
8402
8413
  host: {
8403
8414
  class: "flex-grow"
8404
8415
  },
8405
- styles: [":host{display:flex;flex:1 1;min-height:0}header{background-color:#f1f3f4;flex:none;order:1;padding:1rem 1.5rem .5rem;position:sticky;top:0}ol{-ms-grid-column:1;-ms-grid-column-span:2;-ms-grid-row:1;-ms-grid-row-span:1;font-size:.75rem;grid-column:1/3;grid-row:1/2;line-height:1rem;list-style:none;margin:0 0 .25rem;padding:0}ol li{display:inline}ol li:not(:last-child):after{color:rgba(26,26,35,.66);content:\" / \";display:inline}.titlebar{-ms-grid-columns:auto -webkit-max-content;-ms-grid-columns:auto max-content;-ms-grid-rows:-webkit-max-content -webkit-max-content;-ms-grid-rows:max-content max-content;display:-ms-grid;display:grid;gap:0 1rem;grid-template-columns:auto -webkit-max-content;grid-template-columns:auto max-content;grid-template-rows:-webkit-max-content -webkit-max-content;grid-template-rows:max-content max-content}.title{-ms-grid-column:1;-ms-grid-column-span:1;-ms-grid-row:2;-ms-grid-row-align:center;-ms-grid-row-span:1;align-self:center;grid-column:1/2;grid-row:2/3}.actions{-ms-grid-column:2;-ms-grid-column-span:1;-ms-grid-row:2;-ms-grid-row-span:1;direction:rtl;grid-column:2/3;grid-row:2/3}ec-banner{margin-top:1rem}section{flex:1 0 auto;min-height:0;order:2;padding:.5rem 1.5rem 0}footer{align-items:center;background-color:#f1f3f4;display:flex;flex:none;height:4.5rem;order:3;padding:0 1.5rem}.is-dialog header{padding:0}.is-dialog .titlebar{background-color:#fff;border-bottom:1px solid rgba(26,26,35,.18);padding:1rem}.is-dialog ec-banner{margin:0}.is-dialog section{padding:1rem 1rem 0}.sticky-footer section{padding-bottom:4.5rem}.sticky-footer footer{bottom:0;position:sticky}.fit-content section{display:flex;flex:1 1;padding-bottom:0}.overlay-visible header{z-index:21}.overlay-visible ec-banner{display:none}"]
8416
+ styles: [":host{display:flex;flex:1 1;min-height:0}header{background-color:#f1f3f4;flex:none;order:1;padding:1rem 1.5rem .5rem;position:sticky;top:0;z-index:1}ol{-ms-grid-column:1;-ms-grid-column-span:2;-ms-grid-row:1;-ms-grid-row-span:1;font-size:.75rem;grid-column:1/3;grid-row:1/2;line-height:1rem;list-style:none;margin:0 0 .25rem;padding:0}ol li{display:inline}ol li:not(:last-child):after{color:rgba(26,26,35,.66);content:\" / \";display:inline}.titlebar{-ms-grid-columns:auto -webkit-max-content;-ms-grid-columns:auto max-content;-ms-grid-rows:-webkit-max-content -webkit-max-content;-ms-grid-rows:max-content max-content;display:-ms-grid;display:grid;gap:0 1rem;grid-template-columns:auto -webkit-max-content;grid-template-columns:auto max-content;grid-template-rows:-webkit-max-content -webkit-max-content;grid-template-rows:max-content max-content}.title{-ms-grid-column:1;-ms-grid-column-span:1;-ms-grid-row:2;-ms-grid-row-align:center;-ms-grid-row-span:1;align-self:center;grid-column:1/2;grid-row:2/3}.actions{-ms-grid-column:2;-ms-grid-column-span:1;-ms-grid-row:2;-ms-grid-row-span:1;direction:rtl;grid-column:2/3;grid-row:2/3}ec-banner{margin-top:1rem}section{flex:1 0 auto;min-height:0;order:2;padding:var(--ec-padding-page-view-section,.5rem 1.5rem 2rem)}footer{align-items:center;background-color:#f1f3f4;display:flex;flex:none;height:4.5rem;order:3;padding:0 1.5rem}.is-dialog header{padding:0}.is-dialog .titlebar{background-color:#fff;border-bottom:1px solid rgba(26,26,35,.18);padding:1rem}.is-dialog ec-banner{margin:0}.is-dialog section{padding:var(--ec-padding-page-view-section,1rem 1rem 1.5rem)}.sticky-footer section{padding-bottom:4.5rem}.sticky-footer footer{bottom:0;position:sticky}.fit-content section{display:flex;flex:1 1}.footer-visible section{padding-bottom:0}.overlay-visible header{z-index:21}.overlay-visible ec-banner{display:none}"]
8406
8417
  },] }
8407
8418
  ];
8408
8419
  PageViewComponent.ctorParameters = function () { return []; };