@hestia-earth/ui-components 0.41.21 → 0.41.23
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.
|
@@ -1876,11 +1876,11 @@ class CollapsibleBoxComponent {
|
|
|
1876
1876
|
this.boxStyle = input(CollapsibleBoxStyle.primary, ...(ngDevMode ? [{ debugName: "boxStyle" }] : []));
|
|
1877
1877
|
}
|
|
1878
1878
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CollapsibleBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1879
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: CollapsibleBoxComponent, isStandalone: true, selector: "he-collapsible-box", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, hasShadow: { classPropertyName: "hasShadow", publicName: "hasShadow", isSignal: true, isRequired: false, transformFunction: null }, hasBorder: { classPropertyName: "hasBorder", publicName: "hasBorder", isSignal: true, isRequired: false, transformFunction: null }, boxStyle: { classPropertyName: "boxStyle", publicName: "boxStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, ngImport: i0, template: "<div\n class=\"is-flex is-flex-direction-column | is-{{ boxStyle() }}\"\n [class.box]=\"hasShadow()\"\n [class.is-gap-24]=\"hasShadow()\"\n [class.has-border]=\"hasBorder()\">\n <div\n class=\"is-flex is-align-items-center is-justify-content-space-between is-gap-8 is-py-2 | collapsible-box--header\"\n [class.is-px-2]=\"!hasShadow()\">\n <ng-content select=\"[box-title]\" />\n\n <a class=\"has-text-secondary\" [class.is-px-3]=\"hasShadow()\" (click)=\"open.set(!open())\">\n <he-svg-icon [name]=\"open() ? 'chevron-up' : 'chevron-down'\" />\n </a>\n </div>\n\n @if (open()) {\n <div class=\"is-p-2 | collapsible-box--content\">\n <ng-content select=\"[box-content]\" />\n </div>\n }\n</div>\n", styles: [":host{--collapsible-box-header-border-color: transparent;--collapsible-box-border-color: transparent}:host .collapsible-box--header{border-bottom:1px solid var(--collapsible-box-header-border-color)}:host .has-border .collapsible-box--header{border-radius:6px 6px 0 0;border:1px solid var(--collapsible-box-border-color)}:host .has-border .collapsible-box--content{border-radius:0 0 6px 6px;border:1px solid var(--collapsible-box-border-color);border-top:0}:host .is-primary{--collapsible-box-header-border-color: #ffc000}:host .is-primary.has-border{--collapsible-box-border-color: #ffc000}:host .is-secondary{--collapsible-box-header-border-color: #193957}:host .is-secondary.has-border{--collapsible-box-border-color: #193957}:host .is-secondary-accent{--collapsible-box-header-border-color: #dbe3ea}:host .is-secondary-accent.has-border{--collapsible-box-border-color: #dbe3ea}\n"], dependencies: [{ kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1879
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: CollapsibleBoxComponent, isStandalone: true, selector: "he-collapsible-box", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, hasShadow: { classPropertyName: "hasShadow", publicName: "hasShadow", isSignal: true, isRequired: false, transformFunction: null }, hasBorder: { classPropertyName: "hasBorder", publicName: "hasBorder", isSignal: true, isRequired: false, transformFunction: null }, boxStyle: { classPropertyName: "boxStyle", publicName: "boxStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, ngImport: i0, template: "<div\n class=\"is-flex is-flex-direction-column | is-{{ boxStyle() }}\"\n [class.box]=\"hasShadow()\"\n [class.is-gap-24]=\"hasShadow()\"\n [class.has-border]=\"hasBorder()\">\n <div\n class=\"is-flex is-align-items-center is-justify-content-space-between is-gap-8 is-py-2 | collapsible-box--header\"\n [class.is-px-2]=\"!hasShadow()\">\n <ng-content select=\"[box-title]\" />\n\n <a class=\"has-text-secondary\" [class.is-px-3]=\"hasShadow()\" (click)=\"open.set(!open())\">\n <he-svg-icon [name]=\"open() ? 'chevron-up' : 'chevron-down'\" size=\"24\" />\n </a>\n </div>\n\n @if (open()) {\n <div class=\"is-p-2 | collapsible-box--content\">\n <ng-content select=\"[box-content]\" />\n </div>\n }\n</div>\n", styles: [":host{--collapsible-box-header-border-color: transparent;--collapsible-box-border-color: transparent}:host .collapsible-box--header{border-bottom:1px solid var(--collapsible-box-header-border-color)}:host .has-border .collapsible-box--header{border-radius:6px 6px 0 0;border:1px solid var(--collapsible-box-border-color)}:host .has-border .collapsible-box--content{border-radius:0 0 6px 6px;border:1px solid var(--collapsible-box-border-color);border-top:0}:host .is-primary{--collapsible-box-header-border-color: #ffc000}:host .is-primary.has-border{--collapsible-box-border-color: #ffc000}:host .is-secondary{--collapsible-box-header-border-color: #193957}:host .is-secondary.has-border{--collapsible-box-border-color: #193957}:host .is-secondary-accent{--collapsible-box-header-border-color: #dbe3ea}:host .is-secondary-accent.has-border{--collapsible-box-border-color: #dbe3ea}\n"], dependencies: [{ kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1880
1880
|
}
|
|
1881
1881
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CollapsibleBoxComponent, decorators: [{
|
|
1882
1882
|
type: Component$1,
|
|
1883
|
-
args: [{ selector: 'he-collapsible-box', imports: [HESvgIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"is-flex is-flex-direction-column | is-{{ boxStyle() }}\"\n [class.box]=\"hasShadow()\"\n [class.is-gap-24]=\"hasShadow()\"\n [class.has-border]=\"hasBorder()\">\n <div\n class=\"is-flex is-align-items-center is-justify-content-space-between is-gap-8 is-py-2 | collapsible-box--header\"\n [class.is-px-2]=\"!hasShadow()\">\n <ng-content select=\"[box-title]\" />\n\n <a class=\"has-text-secondary\" [class.is-px-3]=\"hasShadow()\" (click)=\"open.set(!open())\">\n <he-svg-icon [name]=\"open() ? 'chevron-up' : 'chevron-down'\" />\n </a>\n </div>\n\n @if (open()) {\n <div class=\"is-p-2 | collapsible-box--content\">\n <ng-content select=\"[box-content]\" />\n </div>\n }\n</div>\n", styles: [":host{--collapsible-box-header-border-color: transparent;--collapsible-box-border-color: transparent}:host .collapsible-box--header{border-bottom:1px solid var(--collapsible-box-header-border-color)}:host .has-border .collapsible-box--header{border-radius:6px 6px 0 0;border:1px solid var(--collapsible-box-border-color)}:host .has-border .collapsible-box--content{border-radius:0 0 6px 6px;border:1px solid var(--collapsible-box-border-color);border-top:0}:host .is-primary{--collapsible-box-header-border-color: #ffc000}:host .is-primary.has-border{--collapsible-box-border-color: #ffc000}:host .is-secondary{--collapsible-box-header-border-color: #193957}:host .is-secondary.has-border{--collapsible-box-border-color: #193957}:host .is-secondary-accent{--collapsible-box-header-border-color: #dbe3ea}:host .is-secondary-accent.has-border{--collapsible-box-border-color: #dbe3ea}\n"] }]
|
|
1883
|
+
args: [{ selector: 'he-collapsible-box', imports: [HESvgIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"is-flex is-flex-direction-column | is-{{ boxStyle() }}\"\n [class.box]=\"hasShadow()\"\n [class.is-gap-24]=\"hasShadow()\"\n [class.has-border]=\"hasBorder()\">\n <div\n class=\"is-flex is-align-items-center is-justify-content-space-between is-gap-8 is-py-2 | collapsible-box--header\"\n [class.is-px-2]=\"!hasShadow()\">\n <ng-content select=\"[box-title]\" />\n\n <a class=\"has-text-secondary\" [class.is-px-3]=\"hasShadow()\" (click)=\"open.set(!open())\">\n <he-svg-icon [name]=\"open() ? 'chevron-up' : 'chevron-down'\" size=\"24\" />\n </a>\n </div>\n\n @if (open()) {\n <div class=\"is-p-2 | collapsible-box--content\">\n <ng-content select=\"[box-content]\" />\n </div>\n }\n</div>\n", styles: [":host{--collapsible-box-header-border-color: transparent;--collapsible-box-border-color: transparent}:host .collapsible-box--header{border-bottom:1px solid var(--collapsible-box-header-border-color)}:host .has-border .collapsible-box--header{border-radius:6px 6px 0 0;border:1px solid var(--collapsible-box-border-color)}:host .has-border .collapsible-box--content{border-radius:0 0 6px 6px;border:1px solid var(--collapsible-box-border-color);border-top:0}:host .is-primary{--collapsible-box-header-border-color: #ffc000}:host .is-primary.has-border{--collapsible-box-border-color: #ffc000}:host .is-secondary{--collapsible-box-header-border-color: #193957}:host .is-secondary.has-border{--collapsible-box-border-color: #193957}:host .is-secondary-accent{--collapsible-box-header-border-color: #dbe3ea}:host .is-secondary-accent.has-border{--collapsible-box-border-color: #dbe3ea}\n"] }]
|
|
1884
1884
|
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], hasShadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasShadow", required: false }] }], hasBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBorder", required: false }] }], boxStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "boxStyle", required: false }] }] } });
|
|
1885
1885
|
|
|
1886
1886
|
class DataTableComponent {
|
|
@@ -2026,6 +2026,7 @@ const linksActiveChange = (item, parentItems = []) => [item, ...parentItems].for
|
|
|
2026
2026
|
class NavigationMenuComponent {
|
|
2027
2027
|
constructor() {
|
|
2028
2028
|
this.links = input([], ...(ngDevMode ? [{ debugName: "links" }] : []));
|
|
2029
|
+
this.secondaryLinks = input([], ...(ngDevMode ? [{ debugName: "secondaryLinks" }] : []));
|
|
2029
2030
|
this.sticky = input(false, ...(ngDevMode ? [{ debugName: "sticky" }] : []));
|
|
2030
2031
|
this.collapsible = input(false, ...(ngDevMode ? [{ debugName: "collapsible" }] : []));
|
|
2031
2032
|
this.routerLinkMatchOptions = input({
|
|
@@ -2057,14 +2058,14 @@ class NavigationMenuComponent {
|
|
|
2057
2058
|
return toggleLink($event, link);
|
|
2058
2059
|
}
|
|
2059
2060
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NavigationMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2060
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: NavigationMenuComponent, isStandalone: true, selector: "he-navigation-menu", inputs: { links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: false, transformFunction: null }, sticky: { classPropertyName: "sticky", publicName: "sticky", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, routerLinkMatchOptions: { classPropertyName: "routerLinkMatchOptions", publicName: "routerLinkMatchOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { classAttribute: "no-print navigation-menu" }, ngImport: i0, template: "<aside\n class=\"is-flex is-flex-direction-column is-gap-12 is-overflow-hidden is-py-desktop-3 | menu\"\n [class.sticky]=\"sticky()\">\n <ng-content select=\"[header]\" />\n\n <div class=\"is-flex is-flex-direction-column is-gap-4\">\n @for (link of links(); track trackByLink(link)) {\n <ng-container *ngTemplateOutlet=\"linkItem; context: { link, parentLinks: [], level: 1 }\" />\n }\n </div>\n\n <ng-content select=\"[footer]\" />\n</aside>\n\n<ng-template #linkExpandIcon let-link>\n @if (isCollapsible(link)) {\n <he-svg-icon\n [name]=\"link.expanded ? 'chevron-down' : 'chevron-right'\"\n class=\"is-inline-block is-clickable\"\n size=\"20\"\n (click)=\"toggleLink($event, link)\" />\n }\n</ng-template>\n\n<ng-template #linkContent let-link=\"link\" let-level=\"level\">\n @if (level === 1) {\n @if (link.icon) {\n <he-svg-icon [name]=\"link.icon\" size=\"20\" class=\"is-inline-block has-text-secondary\" />\n } @else if (hasPrimaryIcons()) {\n <span class=\"primary-missing-icon\"> </span>\n }\n }\n <span class=\"is-flex is-flex-grow-1 is-align-self-center\" [innerHTML]=\"link.title\"></span>\n <ng-container *ngTemplateOutlet=\"linkExpandIcon; context: { $implicit: link }\" />\n</ng-template>\n\n<ng-template #linkItemChildren let-link=\"link\" let-parentLinks=\"parentLinks\" let-level=\"level\">\n @let childParents = concatLinks(link, parentLinks);\n @if (isCollapsible(link)) {\n <div\n class=\"is-flex is-flex-direction-column is-align-items-stretch | he-menu-child-items\"\n [class.is-hidden]=\"!link.expanded\">\n @for (childLink of link.links; track trackByLink(childLink)) {\n <ng-container\n *ngTemplateOutlet=\"linkItem; context: { link: childLink, parentLinks: childParents, level: level + 1 }\" />\n }\n </div>\n }\n</ng-template>\n\n<ng-template #linkItem let-link=\"link\" let-parentLinks=\"parentLinks\" let-level=\"level\">\n <div\n class=\"is-flex is-align-items-center is-gap-4 | he-menu-item\"\n [attr.data-menu-level]=\"level\"\n (click)=\"toggleLink($event, link)\"\n [class.with-border-color]=\"!!link.borderColor\">\n @if (link.borderColor) {\n <div class=\"he-menu-border\" [style.background-color]=\"link.borderColor\"></div>\n }\n <a\n class=\"is-flex is-flex-grow-1 is-align-self-stretch is-align-items-center is-gap-8 has-text-secondary | he-menu-label\"\n [class.he-menu-item-selectable]=\"!!link?.url\"\n (click)=\"link.url ? selectLink($event, link) : true\"\n [routerLink]=\"link.url\"\n [queryParams]=\"link.queryParams\"\n [fragment]=\"link.fragment\"\n routerLinkActive=\"link-active\"\n [routerLinkActiveOptions]=\"linkActiveOptions(link, level)\"\n (isActiveChange)=\"$event && linksActiveChange(link, parentLinks)\">\n <ng-container *ngTemplateOutlet=\"linkContent; context: { link, level }\" />\n </a>\n </div>\n <ng-container *ngTemplateOutlet=\"linkItemChildren; context: { link, parentLinks, level }\" />\n</ng-template>\n", styles: [".navigation-menu{width:100%;display:block}.navigation-menu .menu{font-size:.875rem;line-height:16px;color:#193957;font-weight:400;width:100%!important;max-width:100%!important}@media screen and (min-width:1024px){.navigation-menu .menu{width:14rem!important;min-width:14rem!important;max-width:14rem!important;border-style:solid;border-color:#ffc000;border-width:1px 0}}.navigation-menu .menu.fixed-top{transform:translate3d(0,6.75rem,0)}.navigation-menu .menu.sticky{position:sticky;top:6.75rem}.navigation-menu a{text-decoration:none!important}.navigation-menu a:focus,.navigation-menu a:active{outline:0!important}.navigation-menu .cursor-default{cursor:default!important}.navigation-menu .primary-missing-icon{height:20px;width:20px;min-width:20px}.navigation-menu .he-menu-item{padding:1px 0}.navigation-menu .he-menu-item .he-menu-label{min-height:28px;border-radius:3px;padding:4px}.navigation-menu .he-menu-item .he-menu-border{width:8px;height:28px}.navigation-menu .he-menu-item[data-menu-level=\"1\"] span{font-weight:700}.navigation-menu .he-menu-item[data-menu-level=\"1\"]+.he-menu-child-items{padding-left:14px}.navigation-menu .he-menu-item[data-menu-level=\"2\"]{padding-left:14px;border-left:1px solid #ffc000}.navigation-menu .he-menu-item[data-menu-level=\"2\"]+.he-menu-child-items{padding-left:28px}.navigation-menu .he-menu-item-selectable:not(.link-active):hover{background-color:#fefaef}.navigation-menu .he-menu-item.with-border-color .he-menu-label{border-radius:0}.navigation-menu .he-menu-item.with-border-color[data-menu-level=\"1\"]+.he-menu-child-items{padding-left:26px}.navigation-menu .he-menu-child-items{padding-left:14px}.navigation-menu .link-active{background-color:#ffe8a3;color:#193957!important}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2061
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: NavigationMenuComponent, isStandalone: true, selector: "he-navigation-menu", inputs: { links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: false, transformFunction: null }, secondaryLinks: { classPropertyName: "secondaryLinks", publicName: "secondaryLinks", isSignal: true, isRequired: false, transformFunction: null }, sticky: { classPropertyName: "sticky", publicName: "sticky", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, routerLinkMatchOptions: { classPropertyName: "routerLinkMatchOptions", publicName: "routerLinkMatchOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { classAttribute: "no-print navigation-menu" }, ngImport: i0, template: "<aside\n class=\"is-flex is-flex-direction-column is-gap-12 is-overflow-hidden is-py-desktop-3 | menu\"\n [class.sticky]=\"sticky()\">\n <ng-content select=\"[header]\" />\n\n <div class=\"is-flex is-flex-direction-column is-gap-4\">\n @for (link of links(); track trackByLink(link)) {\n <ng-container *ngTemplateOutlet=\"linkItem; context: { link, parentLinks: [], level: 1 }\" />\n }\n\n @if (secondaryLinks().length) {\n <hr class=\"links-divider is-my-2 is-p-0\" />\n\n @for (link of secondaryLinks(); track trackByLink(link)) {\n <ng-container *ngTemplateOutlet=\"linkItem; context: { link, parentLinks: [], level: 1 }\" />\n }\n }\n </div>\n\n <ng-content select=\"[footer]\" />\n</aside>\n\n<ng-template #linkExpandIcon let-link>\n @if (isCollapsible(link)) {\n <he-svg-icon\n [name]=\"link.expanded ? 'chevron-down' : 'chevron-right'\"\n class=\"is-inline-block is-clickable\"\n size=\"20\"\n (click)=\"toggleLink($event, link)\" />\n }\n</ng-template>\n\n<ng-template #linkContent let-link=\"link\" let-level=\"level\">\n @if (level === 1) {\n @if (link.icon) {\n <he-svg-icon [name]=\"link.icon\" size=\"20\" class=\"is-inline-block has-text-secondary\" />\n } @else if (hasPrimaryIcons()) {\n <span class=\"primary-missing-icon\"> </span>\n }\n }\n <span class=\"is-flex is-flex-grow-1 is-align-self-center\" [innerHTML]=\"link.title\"></span>\n <ng-container *ngTemplateOutlet=\"linkExpandIcon; context: { $implicit: link }\" />\n</ng-template>\n\n<ng-template #linkItemChildren let-link=\"link\" let-parentLinks=\"parentLinks\" let-level=\"level\">\n @let childParents = concatLinks(link, parentLinks);\n @if (isCollapsible(link)) {\n <div\n class=\"is-flex is-flex-direction-column is-align-items-stretch | he-menu-child-items\"\n [class.is-hidden]=\"!link.expanded\">\n @for (childLink of link.links; track trackByLink(childLink)) {\n <ng-container\n *ngTemplateOutlet=\"linkItem; context: { link: childLink, parentLinks: childParents, level: level + 1 }\" />\n }\n </div>\n }\n</ng-template>\n\n<ng-template #linkItem let-link=\"link\" let-parentLinks=\"parentLinks\" let-level=\"level\">\n <div\n class=\"is-flex is-align-items-center is-gap-4 | he-menu-item\"\n [attr.data-menu-level]=\"level\"\n (click)=\"toggleLink($event, link)\"\n [class.with-border-color]=\"!!link.borderColor\">\n @if (link.borderColor) {\n <div class=\"he-menu-border\" [style.background-color]=\"link.borderColor\"></div>\n }\n <a\n class=\"is-flex is-flex-grow-1 is-align-self-stretch is-align-items-center is-gap-8 has-text-secondary | he-menu-label\"\n [class.he-menu-item-selectable]=\"!!link?.url\"\n (click)=\"link.url ? selectLink($event, link) : true\"\n [routerLink]=\"link.url\"\n [queryParams]=\"link.queryParams\"\n [fragment]=\"link.fragment\"\n routerLinkActive=\"link-active\"\n [routerLinkActiveOptions]=\"linkActiveOptions(link, level)\"\n (isActiveChange)=\"$event && linksActiveChange(link, parentLinks)\">\n <ng-container *ngTemplateOutlet=\"linkContent; context: { link, level }\" />\n </a>\n </div>\n <ng-container *ngTemplateOutlet=\"linkItemChildren; context: { link, parentLinks, level }\" />\n</ng-template>\n", styles: [".navigation-menu{width:100%;display:block}.navigation-menu .menu{font-size:.875rem;line-height:16px;color:#193957;font-weight:400;width:100%!important;max-width:100%!important}@media screen and (min-width:1024px){.navigation-menu .menu{width:14rem!important;min-width:14rem!important;max-width:14rem!important;border-style:solid;border-color:#ffc000;border-width:1px 0}}.navigation-menu .menu.fixed-top{transform:translate3d(0,6.75rem,0)}.navigation-menu .menu.sticky{position:sticky;top:6.75rem}.navigation-menu a{text-decoration:none!important}.navigation-menu a:focus,.navigation-menu a:active{outline:0!important}.navigation-menu .cursor-default{cursor:default!important}.navigation-menu .primary-missing-icon{height:20px;width:20px;min-width:20px}.navigation-menu .he-menu-item{padding:1px 0}.navigation-menu .he-menu-item .he-menu-label{min-height:28px;border-radius:3px;padding:4px}.navigation-menu .he-menu-item .he-menu-border{width:8px;height:28px}.navigation-menu .he-menu-item[data-menu-level=\"1\"] span{font-weight:700}.navigation-menu .he-menu-item[data-menu-level=\"1\"]+.he-menu-child-items{padding-left:14px}.navigation-menu .he-menu-item[data-menu-level=\"2\"]{padding-left:14px;border-left:1px solid #ffc000}.navigation-menu .he-menu-item[data-menu-level=\"2\"]+.he-menu-child-items{padding-left:28px}.navigation-menu .he-menu-item-selectable:not(.link-active):hover{background-color:#fefaef}.navigation-menu .he-menu-item.with-border-color .he-menu-label{border-radius:0}.navigation-menu .he-menu-item.with-border-color[data-menu-level=\"1\"]+.he-menu-child-items{padding-left:26px}.navigation-menu .he-menu-child-items{padding-left:14px}.navigation-menu .link-active{background-color:#ffe8a3;color:#193957!important}.navigation-menu .links-divider{height:1px;background-color:#dbe3ea}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2061
2062
|
}
|
|
2062
2063
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NavigationMenuComponent, decorators: [{
|
|
2063
2064
|
type: Component$1,
|
|
2064
2065
|
args: [{ selector: 'he-navigation-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet, RouterLinkActive, RouterLink, HESvgIconComponent], host: {
|
|
2065
2066
|
class: 'no-print navigation-menu'
|
|
2066
|
-
}, template: "<aside\n class=\"is-flex is-flex-direction-column is-gap-12 is-overflow-hidden is-py-desktop-3 | menu\"\n [class.sticky]=\"sticky()\">\n <ng-content select=\"[header]\" />\n\n <div class=\"is-flex is-flex-direction-column is-gap-4\">\n @for (link of links(); track trackByLink(link)) {\n <ng-container *ngTemplateOutlet=\"linkItem; context: { link, parentLinks: [], level: 1 }\" />\n }\n </div>\n\n <ng-content select=\"[footer]\" />\n</aside>\n\n<ng-template #linkExpandIcon let-link>\n @if (isCollapsible(link)) {\n <he-svg-icon\n [name]=\"link.expanded ? 'chevron-down' : 'chevron-right'\"\n class=\"is-inline-block is-clickable\"\n size=\"20\"\n (click)=\"toggleLink($event, link)\" />\n }\n</ng-template>\n\n<ng-template #linkContent let-link=\"link\" let-level=\"level\">\n @if (level === 1) {\n @if (link.icon) {\n <he-svg-icon [name]=\"link.icon\" size=\"20\" class=\"is-inline-block has-text-secondary\" />\n } @else if (hasPrimaryIcons()) {\n <span class=\"primary-missing-icon\"> </span>\n }\n }\n <span class=\"is-flex is-flex-grow-1 is-align-self-center\" [innerHTML]=\"link.title\"></span>\n <ng-container *ngTemplateOutlet=\"linkExpandIcon; context: { $implicit: link }\" />\n</ng-template>\n\n<ng-template #linkItemChildren let-link=\"link\" let-parentLinks=\"parentLinks\" let-level=\"level\">\n @let childParents = concatLinks(link, parentLinks);\n @if (isCollapsible(link)) {\n <div\n class=\"is-flex is-flex-direction-column is-align-items-stretch | he-menu-child-items\"\n [class.is-hidden]=\"!link.expanded\">\n @for (childLink of link.links; track trackByLink(childLink)) {\n <ng-container\n *ngTemplateOutlet=\"linkItem; context: { link: childLink, parentLinks: childParents, level: level + 1 }\" />\n }\n </div>\n }\n</ng-template>\n\n<ng-template #linkItem let-link=\"link\" let-parentLinks=\"parentLinks\" let-level=\"level\">\n <div\n class=\"is-flex is-align-items-center is-gap-4 | he-menu-item\"\n [attr.data-menu-level]=\"level\"\n (click)=\"toggleLink($event, link)\"\n [class.with-border-color]=\"!!link.borderColor\">\n @if (link.borderColor) {\n <div class=\"he-menu-border\" [style.background-color]=\"link.borderColor\"></div>\n }\n <a\n class=\"is-flex is-flex-grow-1 is-align-self-stretch is-align-items-center is-gap-8 has-text-secondary | he-menu-label\"\n [class.he-menu-item-selectable]=\"!!link?.url\"\n (click)=\"link.url ? selectLink($event, link) : true\"\n [routerLink]=\"link.url\"\n [queryParams]=\"link.queryParams\"\n [fragment]=\"link.fragment\"\n routerLinkActive=\"link-active\"\n [routerLinkActiveOptions]=\"linkActiveOptions(link, level)\"\n (isActiveChange)=\"$event && linksActiveChange(link, parentLinks)\">\n <ng-container *ngTemplateOutlet=\"linkContent; context: { link, level }\" />\n </a>\n </div>\n <ng-container *ngTemplateOutlet=\"linkItemChildren; context: { link, parentLinks, level }\" />\n</ng-template>\n", styles: [".navigation-menu{width:100%;display:block}.navigation-menu .menu{font-size:.875rem;line-height:16px;color:#193957;font-weight:400;width:100%!important;max-width:100%!important}@media screen and (min-width:1024px){.navigation-menu .menu{width:14rem!important;min-width:14rem!important;max-width:14rem!important;border-style:solid;border-color:#ffc000;border-width:1px 0}}.navigation-menu .menu.fixed-top{transform:translate3d(0,6.75rem,0)}.navigation-menu .menu.sticky{position:sticky;top:6.75rem}.navigation-menu a{text-decoration:none!important}.navigation-menu a:focus,.navigation-menu a:active{outline:0!important}.navigation-menu .cursor-default{cursor:default!important}.navigation-menu .primary-missing-icon{height:20px;width:20px;min-width:20px}.navigation-menu .he-menu-item{padding:1px 0}.navigation-menu .he-menu-item .he-menu-label{min-height:28px;border-radius:3px;padding:4px}.navigation-menu .he-menu-item .he-menu-border{width:8px;height:28px}.navigation-menu .he-menu-item[data-menu-level=\"1\"] span{font-weight:700}.navigation-menu .he-menu-item[data-menu-level=\"1\"]+.he-menu-child-items{padding-left:14px}.navigation-menu .he-menu-item[data-menu-level=\"2\"]{padding-left:14px;border-left:1px solid #ffc000}.navigation-menu .he-menu-item[data-menu-level=\"2\"]+.he-menu-child-items{padding-left:28px}.navigation-menu .he-menu-item-selectable:not(.link-active):hover{background-color:#fefaef}.navigation-menu .he-menu-item.with-border-color .he-menu-label{border-radius:0}.navigation-menu .he-menu-item.with-border-color[data-menu-level=\"1\"]+.he-menu-child-items{padding-left:26px}.navigation-menu .he-menu-child-items{padding-left:14px}.navigation-menu .link-active{background-color:#ffe8a3;color:#193957!important}\n"] }]
|
|
2067
|
-
}], propDecorators: { links: [{ type: i0.Input, args: [{ isSignal: true, alias: "links", required: false }] }], sticky: [{ type: i0.Input, args: [{ isSignal: true, alias: "sticky", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], routerLinkMatchOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkMatchOptions", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
2067
|
+
}, template: "<aside\n class=\"is-flex is-flex-direction-column is-gap-12 is-overflow-hidden is-py-desktop-3 | menu\"\n [class.sticky]=\"sticky()\">\n <ng-content select=\"[header]\" />\n\n <div class=\"is-flex is-flex-direction-column is-gap-4\">\n @for (link of links(); track trackByLink(link)) {\n <ng-container *ngTemplateOutlet=\"linkItem; context: { link, parentLinks: [], level: 1 }\" />\n }\n\n @if (secondaryLinks().length) {\n <hr class=\"links-divider is-my-2 is-p-0\" />\n\n @for (link of secondaryLinks(); track trackByLink(link)) {\n <ng-container *ngTemplateOutlet=\"linkItem; context: { link, parentLinks: [], level: 1 }\" />\n }\n }\n </div>\n\n <ng-content select=\"[footer]\" />\n</aside>\n\n<ng-template #linkExpandIcon let-link>\n @if (isCollapsible(link)) {\n <he-svg-icon\n [name]=\"link.expanded ? 'chevron-down' : 'chevron-right'\"\n class=\"is-inline-block is-clickable\"\n size=\"20\"\n (click)=\"toggleLink($event, link)\" />\n }\n</ng-template>\n\n<ng-template #linkContent let-link=\"link\" let-level=\"level\">\n @if (level === 1) {\n @if (link.icon) {\n <he-svg-icon [name]=\"link.icon\" size=\"20\" class=\"is-inline-block has-text-secondary\" />\n } @else if (hasPrimaryIcons()) {\n <span class=\"primary-missing-icon\"> </span>\n }\n }\n <span class=\"is-flex is-flex-grow-1 is-align-self-center\" [innerHTML]=\"link.title\"></span>\n <ng-container *ngTemplateOutlet=\"linkExpandIcon; context: { $implicit: link }\" />\n</ng-template>\n\n<ng-template #linkItemChildren let-link=\"link\" let-parentLinks=\"parentLinks\" let-level=\"level\">\n @let childParents = concatLinks(link, parentLinks);\n @if (isCollapsible(link)) {\n <div\n class=\"is-flex is-flex-direction-column is-align-items-stretch | he-menu-child-items\"\n [class.is-hidden]=\"!link.expanded\">\n @for (childLink of link.links; track trackByLink(childLink)) {\n <ng-container\n *ngTemplateOutlet=\"linkItem; context: { link: childLink, parentLinks: childParents, level: level + 1 }\" />\n }\n </div>\n }\n</ng-template>\n\n<ng-template #linkItem let-link=\"link\" let-parentLinks=\"parentLinks\" let-level=\"level\">\n <div\n class=\"is-flex is-align-items-center is-gap-4 | he-menu-item\"\n [attr.data-menu-level]=\"level\"\n (click)=\"toggleLink($event, link)\"\n [class.with-border-color]=\"!!link.borderColor\">\n @if (link.borderColor) {\n <div class=\"he-menu-border\" [style.background-color]=\"link.borderColor\"></div>\n }\n <a\n class=\"is-flex is-flex-grow-1 is-align-self-stretch is-align-items-center is-gap-8 has-text-secondary | he-menu-label\"\n [class.he-menu-item-selectable]=\"!!link?.url\"\n (click)=\"link.url ? selectLink($event, link) : true\"\n [routerLink]=\"link.url\"\n [queryParams]=\"link.queryParams\"\n [fragment]=\"link.fragment\"\n routerLinkActive=\"link-active\"\n [routerLinkActiveOptions]=\"linkActiveOptions(link, level)\"\n (isActiveChange)=\"$event && linksActiveChange(link, parentLinks)\">\n <ng-container *ngTemplateOutlet=\"linkContent; context: { link, level }\" />\n </a>\n </div>\n <ng-container *ngTemplateOutlet=\"linkItemChildren; context: { link, parentLinks, level }\" />\n</ng-template>\n", styles: [".navigation-menu{width:100%;display:block}.navigation-menu .menu{font-size:.875rem;line-height:16px;color:#193957;font-weight:400;width:100%!important;max-width:100%!important}@media screen and (min-width:1024px){.navigation-menu .menu{width:14rem!important;min-width:14rem!important;max-width:14rem!important;border-style:solid;border-color:#ffc000;border-width:1px 0}}.navigation-menu .menu.fixed-top{transform:translate3d(0,6.75rem,0)}.navigation-menu .menu.sticky{position:sticky;top:6.75rem}.navigation-menu a{text-decoration:none!important}.navigation-menu a:focus,.navigation-menu a:active{outline:0!important}.navigation-menu .cursor-default{cursor:default!important}.navigation-menu .primary-missing-icon{height:20px;width:20px;min-width:20px}.navigation-menu .he-menu-item{padding:1px 0}.navigation-menu .he-menu-item .he-menu-label{min-height:28px;border-radius:3px;padding:4px}.navigation-menu .he-menu-item .he-menu-border{width:8px;height:28px}.navigation-menu .he-menu-item[data-menu-level=\"1\"] span{font-weight:700}.navigation-menu .he-menu-item[data-menu-level=\"1\"]+.he-menu-child-items{padding-left:14px}.navigation-menu .he-menu-item[data-menu-level=\"2\"]{padding-left:14px;border-left:1px solid #ffc000}.navigation-menu .he-menu-item[data-menu-level=\"2\"]+.he-menu-child-items{padding-left:28px}.navigation-menu .he-menu-item-selectable:not(.link-active):hover{background-color:#fefaef}.navigation-menu .he-menu-item.with-border-color .he-menu-label{border-radius:0}.navigation-menu .he-menu-item.with-border-color[data-menu-level=\"1\"]+.he-menu-child-items{padding-left:26px}.navigation-menu .he-menu-child-items{padding-left:14px}.navigation-menu .link-active{background-color:#ffe8a3;color:#193957!important}.navigation-menu .links-divider{height:1px;background-color:#dbe3ea}\n"] }]
|
|
2068
|
+
}], propDecorators: { links: [{ type: i0.Input, args: [{ isSignal: true, alias: "links", required: false }] }], secondaryLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryLinks", required: false }] }], sticky: [{ type: i0.Input, args: [{ isSignal: true, alias: "sticky", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], routerLinkMatchOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkMatchOptions", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
2068
2069
|
|
|
2069
2070
|
var Breakpoint;
|
|
2070
2071
|
(function (Breakpoint) {
|
|
@@ -2191,6 +2192,7 @@ class DrawerContainerComponent {
|
|
|
2191
2192
|
this.contentPaddingStyles = input(...(ngDevMode ? [undefined, { debugName: "contentPaddingStyles" }] : []));
|
|
2192
2193
|
this.menuOverlap = input(true, ...(ngDevMode ? [{ debugName: "menuOverlap" }] : []));
|
|
2193
2194
|
this.links = input([], ...(ngDevMode ? [{ debugName: "links" }] : []));
|
|
2195
|
+
this.secondaryLinks = input([], ...(ngDevMode ? [{ debugName: "secondaryLinks" }] : []));
|
|
2194
2196
|
this.drawerHeaderTemplate = input(...(ngDevMode ? [undefined, { debugName: "drawerHeaderTemplate" }] : []));
|
|
2195
2197
|
/**
|
|
2196
2198
|
* Drawer content is not visible when the drawer is compacted.
|
|
@@ -2312,7 +2314,7 @@ class DrawerContainerComponent {
|
|
|
2312
2314
|
return parseInt(padding, 10) + parseInt(margin, 10);
|
|
2313
2315
|
}
|
|
2314
2316
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DrawerContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2315
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DrawerContainerComponent, isStandalone: true, selector: "he-drawer-container", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, compactBreakpoint: { classPropertyName: "compactBreakpoint", publicName: "compactBreakpoint", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, contentStyles: { classPropertyName: "contentStyles", publicName: "contentStyles", isSignal: true, isRequired: false, transformFunction: null }, contentPaddingStyles: { classPropertyName: "contentPaddingStyles", publicName: "contentPaddingStyles", isSignal: true, isRequired: false, transformFunction: null }, menuOverlap: { classPropertyName: "menuOverlap", publicName: "menuOverlap", isSignal: true, isRequired: false, transformFunction: null }, links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: false, transformFunction: null }, drawerHeaderTemplate: { classPropertyName: "drawerHeaderTemplate", publicName: "drawerHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, drawerContentTemplate: { classPropertyName: "drawerContentTemplate", publicName: "drawerContentTemplate", isSignal: true, isRequired: false, transformFunction: null }, drawerFooterTemplate: { classPropertyName: "drawerFooterTemplate", publicName: "drawerFooterTemplate", isSignal: true, isRequired: false, transformFunction: null }, drawerMenuHeaderTemplate: { classPropertyName: "drawerMenuHeaderTemplate", publicName: "drawerMenuHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, drawerMenuFooterTemplate: { classPropertyName: "drawerMenuFooterTemplate", publicName: "drawerMenuFooterTemplate", isSignal: true, isRequired: false, transformFunction: null }, compactMenuLabel: { classPropertyName: "compactMenuLabel", publicName: "compactMenuLabel", isSignal: true, isRequired: false, transformFunction: null }, compactHeaderClass: { classPropertyName: "compactHeaderClass", publicName: "compactHeaderClass", isSignal: true, isRequired: false, transformFunction: null }, compactMenuHeaderClass: { classPropertyName: "compactMenuHeaderClass", publicName: "compactMenuHeaderClass", isSignal: true, isRequired: false, transformFunction: null }, minMenuDistance: { classPropertyName: "minMenuDistance", publicName: "minMenuDistance", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange", width: "widthChange", opened: "opened", closed: "closed" }, host: { listeners: { "window:mouseup": "stopResizing()", "window:touchend": "stopResizing()", "window:touchcancel": "stopResizing()" }, properties: { "class": "hostClass()", "attr.drawer-position": "position()", "attr.drawer-state": "menuState()" } }, providers: [sidenavStore], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (visible()) {\n @if (isCompact()) {\n <div class=\"compact-header\">\n <div [ngClass]=\"compactHeaderClass()\">\n <div class=\"is-flex is-align-items-center is-justify-content-space-between is-gap-8 w-100\">\n @if (drawerHeaderTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerHeaderTemplate()\" />\n }\n @if (links()?.length > 0) {\n <div\n ngbDropdown\n #optionDd=\"ngbDropdown\"\n container=\"body\"\n placement=\"bottom-end\"\n [dropdownClass]=\"compactMenuHeaderClass()\">\n <button\n ngbDropdownToggle\n class=\"button is-small is-no-shadow is-block has-text-weight-bold has-text-secondary is-size-6 is-py-1 is-px-2 is-radius-3 is-gap-4 | compact-header--btn\"\n aria-controls=\"drawer-menu\"\n type=\"button\">\n <span>{{ compactMenuLabel() }}</span>\n <he-svg-icon\n class=\"compact-header--btn__icon\"\n [name]=\"optionDd.isOpen() ? 'chevron-up' : 'chevron-down'\"\n aria-hidden=\"true\" />\n </button>\n\n <div ngbDropdownMenu id=\"drawer-menu\">\n <div class=\"dropdown-content navigation-menu-dropdown\">\n <he-navigation-menu (closed)=\"optionDd.close()\" [links]=\"links()\">\n @if (drawerMenuHeaderTemplate()) {\n <ng-container header [ngTemplateOutlet]=\"drawerMenuHeaderTemplate()\" />\n }\n @if (drawerMenuFooterTemplate()) {\n <ng-container footer [ngTemplateOutlet]=\"drawerMenuFooterTemplate()\" />\n }\n </he-navigation-menu>\n </div>\n </div>\n </div>\n }\n @if (drawerFooterTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerFooterTemplate()\" />\n }\n </div>\n </div>\n </div>\n } @else {\n <aside>\n <div\n class=\"is-absolute h-100 shadow-2 has-background-white | shell__menuContent\"\n (@sideMenu.done)=\"animationDone($event)\"\n [@sideMenu]=\"expanded() ? 'full' : 'hidden'\">\n <div\n class=\"h-100 is-overflow-y-auto\"\n [class.is-py-4]=\"!drawerContentTemplate()\"\n [class.is-px-2]=\"!drawerContentTemplate()\">\n @if (drawerHeaderTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerHeaderTemplate()\" />\n }\n @if (drawerContentTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerContentTemplate()\" />\n }\n @if (links()?.length > 0) {\n <he-navigation-menu [links]=\"links()\">\n @if (drawerMenuHeaderTemplate()) {\n <ng-container header [ngTemplateOutlet]=\"drawerMenuHeaderTemplate()\" />\n }\n @if (drawerMenuFooterTemplate()) {\n <ng-container footer [ngTemplateOutlet]=\"drawerMenuFooterTemplate()\" />\n }\n </he-navigation-menu>\n }\n @if (drawerFooterTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerFooterTemplate()\" />\n }\n </div>\n @if (collapsible()) {\n <button\n (click)=\"toggleMenu()\"\n (mousedown)=\"startResizing($event)\"\n (touchstart)=\"startResizing($event)\"\n class=\"is-absolute is-overflow-hidden is-flex is-justify-content-center is-align-items-center | shell__menuContent--toggle\"\n pointer>\n <he-svg-icon [name]=\"resizable() ? 'drag' : toggleIcon()\" size=\"20\" />\n </button>\n }\n </div>\n </aside>\n }\n}\n\n<div [class.is-resizing]=\"isHoldingToggle()\" class=\"shell__content | h-100 w-100 is-flex\">\n <div class=\"shell__content--body | w-100\" [@reduceWidth]=\"reduceAnimation()\">\n <div #contentContainer class=\"w-100 h-100\" [style]=\"contentStyles()\" [className]=\"contentPaddingStyles()\">\n <ng-content select=\"[drawer-content]\" />\n </div>\n </div>\n</div>\n", styles: ["::ng-deep :root{--drawer-toggle-position: -20px;--sidenav-left-width: 256px;--sidenav-right-width: 256px;--content-transition-left-x: 0;--content-transition-right-x: 0}:host-context[drawer-position=left]{--sidenav-side-transform: 1;--sidenav-width: var(--sidenav-left-width);--content-transition-x: var(--content-transition-left-x);--menu-transition-transform: -1}:host-context[drawer-position=left]>aside{left:0}:host-context[drawer-position=left]>aside>.shell__menuContent{left:0}:host-context[drawer-position=left]>aside>.shell__menuContent>.shell__menuContent--toggle{right:var(--drawer-toggle-position);border-radius:0 9px 9px 0}:host-context[drawer-position=right]{--sidenav-side-transform: 0;--sidenav-width: var(--sidenav-right-width);--content-transition-x: var(--content-transition-right-x);--menu-transition-transform: 1}:host-context[drawer-position=right]>aside{right:0;order:1}:host-context[drawer-position=right]>aside>.shell__menuContent{right:0}:host-context[drawer-position=right]>aside>.shell__menuContent>.shell__menuContent--toggle{left:var(--drawer-toggle-position);border-radius:9px 0 0 9px}:host{position:relative;max-height:100%;display:flex;justify-content:space-between}:host aside{position:sticky;top:var(--navbar-height);z-index:10;height:calc(100vh - var(--navbar-height))}:host aside .shell__menuContent{top:0;width:var(--sidenav-width)}:host aside .shell__menuContent--toggle{top:calc(50% - 24px);background:#dbe3ea;border:none;width:20px;height:48px}:host aside ::ng-deep he-collapsible-box{box-shadow:none;padding:4px!important}@media screen and (max-width:1023px){:host aside ::ng-deep he-collapsible-box{background-color:transparent}}:host aside ::ng-deep he-collapsible-box>div{gap:16px!important}:host aside ::ng-deep he-collapsible-box .dropdown-content{box-shadow:none}:host aside ::ng-deep he-collapsible-box .dropdown-item+.dropdown-item{border-top:1px solid #b5b5b5}:host aside ::ng-deep he-collapsible-box .navbar-divider{background-color:#b5b5b5;margin:0}:host.is-resizable .shell__menuContent--toggle:active{cursor:col-resize}.shell__content--body{container-type:inline-size;transition:none}.shell__content:not(.is-resizing) .shell__content--body{transition:transform .3s ease-in-out,width .3s ease-in-out}.navigation-menu-dropdown{padding:.5rem 1rem;width:300px}@media screen and (max-width:767px){.navigation-menu-dropdown{width:calc(100dvw - 3rem)}}.compact-header{position:sticky;top:calc(var(--navbar-height));z-index:10}@media screen and (max-width:767px){.compact-header{top:0}}.compact-header--btn{background:#dbe3ea}he-navigation-menu ::ng-deep .menu{width:100%!important;min-width:100%!important;max-width:100%!important}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "component", type: NavigationMenuComponent, selector: "he-navigation-menu", inputs: ["links", "sticky", "collapsible", "routerLinkMatchOptions"], outputs: ["closed"] }, { kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation"] }], animations: ANIMATIONS, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2317
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DrawerContainerComponent, isStandalone: true, selector: "he-drawer-container", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, compactBreakpoint: { classPropertyName: "compactBreakpoint", publicName: "compactBreakpoint", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, contentStyles: { classPropertyName: "contentStyles", publicName: "contentStyles", isSignal: true, isRequired: false, transformFunction: null }, contentPaddingStyles: { classPropertyName: "contentPaddingStyles", publicName: "contentPaddingStyles", isSignal: true, isRequired: false, transformFunction: null }, menuOverlap: { classPropertyName: "menuOverlap", publicName: "menuOverlap", isSignal: true, isRequired: false, transformFunction: null }, links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: false, transformFunction: null }, secondaryLinks: { classPropertyName: "secondaryLinks", publicName: "secondaryLinks", isSignal: true, isRequired: false, transformFunction: null }, drawerHeaderTemplate: { classPropertyName: "drawerHeaderTemplate", publicName: "drawerHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, drawerContentTemplate: { classPropertyName: "drawerContentTemplate", publicName: "drawerContentTemplate", isSignal: true, isRequired: false, transformFunction: null }, drawerFooterTemplate: { classPropertyName: "drawerFooterTemplate", publicName: "drawerFooterTemplate", isSignal: true, isRequired: false, transformFunction: null }, drawerMenuHeaderTemplate: { classPropertyName: "drawerMenuHeaderTemplate", publicName: "drawerMenuHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, drawerMenuFooterTemplate: { classPropertyName: "drawerMenuFooterTemplate", publicName: "drawerMenuFooterTemplate", isSignal: true, isRequired: false, transformFunction: null }, compactMenuLabel: { classPropertyName: "compactMenuLabel", publicName: "compactMenuLabel", isSignal: true, isRequired: false, transformFunction: null }, compactHeaderClass: { classPropertyName: "compactHeaderClass", publicName: "compactHeaderClass", isSignal: true, isRequired: false, transformFunction: null }, compactMenuHeaderClass: { classPropertyName: "compactMenuHeaderClass", publicName: "compactMenuHeaderClass", isSignal: true, isRequired: false, transformFunction: null }, minMenuDistance: { classPropertyName: "minMenuDistance", publicName: "minMenuDistance", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange", width: "widthChange", opened: "opened", closed: "closed" }, host: { listeners: { "window:mouseup": "stopResizing()", "window:touchend": "stopResizing()", "window:touchcancel": "stopResizing()" }, properties: { "class": "hostClass()", "attr.drawer-position": "position()", "attr.drawer-state": "menuState()" } }, providers: [sidenavStore], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (visible()) {\n @if (isCompact()) {\n <div class=\"compact-header\">\n <div [ngClass]=\"compactHeaderClass()\">\n <div class=\"is-flex is-align-items-center is-justify-content-space-between is-gap-8 w-100\">\n @if (drawerHeaderTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerHeaderTemplate()\" />\n }\n @if (links()?.length > 0) {\n <div\n ngbDropdown\n #optionDd=\"ngbDropdown\"\n container=\"body\"\n placement=\"bottom-end\"\n [dropdownClass]=\"compactMenuHeaderClass()\">\n <button\n ngbDropdownToggle\n class=\"button is-small is-no-shadow is-block has-text-weight-bold has-text-secondary is-size-6 is-py-1 is-px-2 is-radius-3 is-gap-4 | compact-header--btn\"\n aria-controls=\"drawer-menu\"\n type=\"button\">\n <span>{{ compactMenuLabel() }}</span>\n <he-svg-icon\n class=\"compact-header--btn__icon\"\n [name]=\"optionDd.isOpen() ? 'chevron-up' : 'chevron-down'\"\n aria-hidden=\"true\" />\n </button>\n\n <div ngbDropdownMenu id=\"drawer-menu\">\n <div class=\"dropdown-content navigation-menu-dropdown\">\n <he-navigation-menu (closed)=\"optionDd.close()\" [links]=\"links()\" [secondaryLinks]=\"secondaryLinks()\">\n @if (drawerMenuHeaderTemplate()) {\n <ng-container header [ngTemplateOutlet]=\"drawerMenuHeaderTemplate()\" />\n }\n @if (drawerMenuFooterTemplate()) {\n <ng-container footer [ngTemplateOutlet]=\"drawerMenuFooterTemplate()\" />\n }\n </he-navigation-menu>\n </div>\n </div>\n </div>\n }\n @if (drawerFooterTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerFooterTemplate()\" />\n }\n </div>\n </div>\n </div>\n } @else {\n <aside>\n <div\n class=\"is-absolute h-100 shadow-2 has-background-white | shell__menuContent\"\n (@sideMenu.done)=\"animationDone($event)\"\n [@sideMenu]=\"expanded() ? 'full' : 'hidden'\">\n <div\n class=\"h-100 is-overflow-y-auto\"\n [class.is-py-4]=\"!drawerContentTemplate()\"\n [class.is-px-2]=\"!drawerContentTemplate()\">\n @if (drawerHeaderTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerHeaderTemplate()\" />\n }\n @if (drawerContentTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerContentTemplate()\" />\n }\n @if (links()?.length > 0) {\n <he-navigation-menu [links]=\"links()\" [secondaryLinks]=\"secondaryLinks()\">\n @if (drawerMenuHeaderTemplate()) {\n <ng-container header [ngTemplateOutlet]=\"drawerMenuHeaderTemplate()\" />\n }\n @if (drawerMenuFooterTemplate()) {\n <ng-container footer [ngTemplateOutlet]=\"drawerMenuFooterTemplate()\" />\n }\n </he-navigation-menu>\n }\n @if (drawerFooterTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerFooterTemplate()\" />\n }\n </div>\n @if (collapsible()) {\n <button\n (click)=\"toggleMenu()\"\n (mousedown)=\"startResizing($event)\"\n (touchstart)=\"startResizing($event)\"\n class=\"is-absolute is-overflow-hidden is-flex is-justify-content-center is-align-items-center | shell__menuContent--toggle\"\n pointer>\n <he-svg-icon [name]=\"resizable() ? 'drag' : toggleIcon()\" size=\"20\" />\n </button>\n }\n </div>\n </aside>\n }\n}\n\n<div [class.is-resizing]=\"isHoldingToggle()\" class=\"shell__content | h-100 w-100 is-flex\">\n <div class=\"shell__content--body | w-100\" [@reduceWidth]=\"reduceAnimation()\">\n <div #contentContainer class=\"w-100 h-100\" [style]=\"contentStyles()\" [className]=\"contentPaddingStyles()\">\n <ng-content select=\"[drawer-content]\" />\n </div>\n </div>\n</div>\n", styles: ["::ng-deep :root{--drawer-toggle-position: -20px;--sidenav-left-width: 256px;--sidenav-right-width: 256px;--content-transition-left-x: 0;--content-transition-right-x: 0}:host-context[drawer-position=left]{--sidenav-side-transform: 1;--sidenav-width: var(--sidenav-left-width);--content-transition-x: var(--content-transition-left-x);--menu-transition-transform: -1}:host-context[drawer-position=left]>aside{left:0}:host-context[drawer-position=left]>aside>.shell__menuContent{left:0}:host-context[drawer-position=left]>aside>.shell__menuContent>.shell__menuContent--toggle{right:var(--drawer-toggle-position);border-radius:0 9px 9px 0}:host-context[drawer-position=right]{--sidenav-side-transform: 0;--sidenav-width: var(--sidenav-right-width);--content-transition-x: var(--content-transition-right-x);--menu-transition-transform: 1}:host-context[drawer-position=right]>aside{right:0;order:1}:host-context[drawer-position=right]>aside>.shell__menuContent{right:0}:host-context[drawer-position=right]>aside>.shell__menuContent>.shell__menuContent--toggle{left:var(--drawer-toggle-position);border-radius:9px 0 0 9px}:host{position:relative;max-height:100%;display:flex;justify-content:space-between}:host aside{position:sticky;top:var(--navbar-height);z-index:10;height:calc(100vh - var(--navbar-height))}:host aside .shell__menuContent{top:0;width:var(--sidenav-width)}:host aside .shell__menuContent--toggle{top:calc(50% - 24px);background:#dbe3ea;border:none;width:20px;height:48px}:host aside ::ng-deep he-collapsible-box{box-shadow:none;padding:4px!important}@media screen and (max-width:1023px){:host aside ::ng-deep he-collapsible-box{background-color:transparent}}:host aside ::ng-deep he-collapsible-box>div{gap:16px!important}:host aside ::ng-deep he-collapsible-box .dropdown-content{box-shadow:none}:host aside ::ng-deep he-collapsible-box .dropdown-item+.dropdown-item{border-top:1px solid #b5b5b5}:host aside ::ng-deep he-collapsible-box .navbar-divider{background-color:#b5b5b5;margin:0}:host.is-resizable .shell__menuContent--toggle:active{cursor:col-resize}.shell__content--body{container-type:inline-size;transition:none}.shell__content:not(.is-resizing) .shell__content--body{transition:transform .3s ease-in-out,width .3s ease-in-out}.navigation-menu-dropdown{padding:.5rem 1rem;width:300px}@media screen and (max-width:767px){.navigation-menu-dropdown{width:calc(100dvw - 3rem)}}.compact-header{position:sticky;top:calc(var(--navbar-height));z-index:10}@media screen and (max-width:767px){.compact-header{top:0}}.compact-header--btn{background:#dbe3ea}he-navigation-menu ::ng-deep .menu{width:100%!important;min-width:100%!important;max-width:100%!important}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "component", type: NavigationMenuComponent, selector: "he-navigation-menu", inputs: ["links", "secondaryLinks", "sticky", "collapsible", "routerLinkMatchOptions"], outputs: ["closed"] }, { kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation"] }], animations: ANIMATIONS, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2316
2318
|
}
|
|
2317
2319
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DrawerContainerComponent, decorators: [{
|
|
2318
2320
|
type: Component$1,
|
|
@@ -2329,8 +2331,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
2329
2331
|
'[class]': 'hostClass()',
|
|
2330
2332
|
'[attr.drawer-position]': 'position()',
|
|
2331
2333
|
'[attr.drawer-state]': 'menuState()'
|
|
2332
|
-
}, providers: [sidenavStore], template: "@if (visible()) {\n @if (isCompact()) {\n <div class=\"compact-header\">\n <div [ngClass]=\"compactHeaderClass()\">\n <div class=\"is-flex is-align-items-center is-justify-content-space-between is-gap-8 w-100\">\n @if (drawerHeaderTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerHeaderTemplate()\" />\n }\n @if (links()?.length > 0) {\n <div\n ngbDropdown\n #optionDd=\"ngbDropdown\"\n container=\"body\"\n placement=\"bottom-end\"\n [dropdownClass]=\"compactMenuHeaderClass()\">\n <button\n ngbDropdownToggle\n class=\"button is-small is-no-shadow is-block has-text-weight-bold has-text-secondary is-size-6 is-py-1 is-px-2 is-radius-3 is-gap-4 | compact-header--btn\"\n aria-controls=\"drawer-menu\"\n type=\"button\">\n <span>{{ compactMenuLabel() }}</span>\n <he-svg-icon\n class=\"compact-header--btn__icon\"\n [name]=\"optionDd.isOpen() ? 'chevron-up' : 'chevron-down'\"\n aria-hidden=\"true\" />\n </button>\n\n <div ngbDropdownMenu id=\"drawer-menu\">\n <div class=\"dropdown-content navigation-menu-dropdown\">\n <he-navigation-menu (closed)=\"optionDd.close()\" [links]=\"links()\">\n @if (drawerMenuHeaderTemplate()) {\n <ng-container header [ngTemplateOutlet]=\"drawerMenuHeaderTemplate()\" />\n }\n @if (drawerMenuFooterTemplate()) {\n <ng-container footer [ngTemplateOutlet]=\"drawerMenuFooterTemplate()\" />\n }\n </he-navigation-menu>\n </div>\n </div>\n </div>\n }\n @if (drawerFooterTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerFooterTemplate()\" />\n }\n </div>\n </div>\n </div>\n } @else {\n <aside>\n <div\n class=\"is-absolute h-100 shadow-2 has-background-white | shell__menuContent\"\n (@sideMenu.done)=\"animationDone($event)\"\n [@sideMenu]=\"expanded() ? 'full' : 'hidden'\">\n <div\n class=\"h-100 is-overflow-y-auto\"\n [class.is-py-4]=\"!drawerContentTemplate()\"\n [class.is-px-2]=\"!drawerContentTemplate()\">\n @if (drawerHeaderTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerHeaderTemplate()\" />\n }\n @if (drawerContentTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerContentTemplate()\" />\n }\n @if (links()?.length > 0) {\n <he-navigation-menu [links]=\"links()\">\n @if (drawerMenuHeaderTemplate()) {\n <ng-container header [ngTemplateOutlet]=\"drawerMenuHeaderTemplate()\" />\n }\n @if (drawerMenuFooterTemplate()) {\n <ng-container footer [ngTemplateOutlet]=\"drawerMenuFooterTemplate()\" />\n }\n </he-navigation-menu>\n }\n @if (drawerFooterTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerFooterTemplate()\" />\n }\n </div>\n @if (collapsible()) {\n <button\n (click)=\"toggleMenu()\"\n (mousedown)=\"startResizing($event)\"\n (touchstart)=\"startResizing($event)\"\n class=\"is-absolute is-overflow-hidden is-flex is-justify-content-center is-align-items-center | shell__menuContent--toggle\"\n pointer>\n <he-svg-icon [name]=\"resizable() ? 'drag' : toggleIcon()\" size=\"20\" />\n </button>\n }\n </div>\n </aside>\n }\n}\n\n<div [class.is-resizing]=\"isHoldingToggle()\" class=\"shell__content | h-100 w-100 is-flex\">\n <div class=\"shell__content--body | w-100\" [@reduceWidth]=\"reduceAnimation()\">\n <div #contentContainer class=\"w-100 h-100\" [style]=\"contentStyles()\" [className]=\"contentPaddingStyles()\">\n <ng-content select=\"[drawer-content]\" />\n </div>\n </div>\n</div>\n", styles: ["::ng-deep :root{--drawer-toggle-position: -20px;--sidenav-left-width: 256px;--sidenav-right-width: 256px;--content-transition-left-x: 0;--content-transition-right-x: 0}:host-context[drawer-position=left]{--sidenav-side-transform: 1;--sidenav-width: var(--sidenav-left-width);--content-transition-x: var(--content-transition-left-x);--menu-transition-transform: -1}:host-context[drawer-position=left]>aside{left:0}:host-context[drawer-position=left]>aside>.shell__menuContent{left:0}:host-context[drawer-position=left]>aside>.shell__menuContent>.shell__menuContent--toggle{right:var(--drawer-toggle-position);border-radius:0 9px 9px 0}:host-context[drawer-position=right]{--sidenav-side-transform: 0;--sidenav-width: var(--sidenav-right-width);--content-transition-x: var(--content-transition-right-x);--menu-transition-transform: 1}:host-context[drawer-position=right]>aside{right:0;order:1}:host-context[drawer-position=right]>aside>.shell__menuContent{right:0}:host-context[drawer-position=right]>aside>.shell__menuContent>.shell__menuContent--toggle{left:var(--drawer-toggle-position);border-radius:9px 0 0 9px}:host{position:relative;max-height:100%;display:flex;justify-content:space-between}:host aside{position:sticky;top:var(--navbar-height);z-index:10;height:calc(100vh - var(--navbar-height))}:host aside .shell__menuContent{top:0;width:var(--sidenav-width)}:host aside .shell__menuContent--toggle{top:calc(50% - 24px);background:#dbe3ea;border:none;width:20px;height:48px}:host aside ::ng-deep he-collapsible-box{box-shadow:none;padding:4px!important}@media screen and (max-width:1023px){:host aside ::ng-deep he-collapsible-box{background-color:transparent}}:host aside ::ng-deep he-collapsible-box>div{gap:16px!important}:host aside ::ng-deep he-collapsible-box .dropdown-content{box-shadow:none}:host aside ::ng-deep he-collapsible-box .dropdown-item+.dropdown-item{border-top:1px solid #b5b5b5}:host aside ::ng-deep he-collapsible-box .navbar-divider{background-color:#b5b5b5;margin:0}:host.is-resizable .shell__menuContent--toggle:active{cursor:col-resize}.shell__content--body{container-type:inline-size;transition:none}.shell__content:not(.is-resizing) .shell__content--body{transition:transform .3s ease-in-out,width .3s ease-in-out}.navigation-menu-dropdown{padding:.5rem 1rem;width:300px}@media screen and (max-width:767px){.navigation-menu-dropdown{width:calc(100dvw - 3rem)}}.compact-header{position:sticky;top:calc(var(--navbar-height));z-index:10}@media screen and (max-width:767px){.compact-header{top:0}}.compact-header--btn{background:#dbe3ea}he-navigation-menu ::ng-deep .menu{width:100%!important;min-width:100%!important;max-width:100%!important}\n"] }]
|
|
2333
|
-
}], ctorParameters: () => [], propDecorators: { contentContainer: [{ type: i0.ViewChild, args: ['contentContainer', { ...{ read: ElementRef }, isSignal: true }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], compactBreakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactBreakpoint", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }, { type: i0.Output, args: ["widthChange"] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], contentStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentStyles", required: false }] }], contentPaddingStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentPaddingStyles", required: false }] }], menuOverlap: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuOverlap", required: false }] }], links: [{ type: i0.Input, args: [{ isSignal: true, alias: "links", required: false }] }], drawerHeaderTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerHeaderTemplate", required: false }] }], drawerContentTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerContentTemplate", required: false }] }], drawerFooterTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerFooterTemplate", required: false }] }], drawerMenuHeaderTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerMenuHeaderTemplate", required: false }] }], drawerMenuFooterTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerMenuFooterTemplate", required: false }] }], compactMenuLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactMenuLabel", required: false }] }], compactHeaderClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactHeaderClass", required: false }] }], compactMenuHeaderClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactMenuHeaderClass", required: false }] }], minMenuDistance: [{ type: i0.Input, args: [{ isSignal: true, alias: "minMenuDistance", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], stopResizing: [{
|
|
2334
|
+
}, providers: [sidenavStore], template: "@if (visible()) {\n @if (isCompact()) {\n <div class=\"compact-header\">\n <div [ngClass]=\"compactHeaderClass()\">\n <div class=\"is-flex is-align-items-center is-justify-content-space-between is-gap-8 w-100\">\n @if (drawerHeaderTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerHeaderTemplate()\" />\n }\n @if (links()?.length > 0) {\n <div\n ngbDropdown\n #optionDd=\"ngbDropdown\"\n container=\"body\"\n placement=\"bottom-end\"\n [dropdownClass]=\"compactMenuHeaderClass()\">\n <button\n ngbDropdownToggle\n class=\"button is-small is-no-shadow is-block has-text-weight-bold has-text-secondary is-size-6 is-py-1 is-px-2 is-radius-3 is-gap-4 | compact-header--btn\"\n aria-controls=\"drawer-menu\"\n type=\"button\">\n <span>{{ compactMenuLabel() }}</span>\n <he-svg-icon\n class=\"compact-header--btn__icon\"\n [name]=\"optionDd.isOpen() ? 'chevron-up' : 'chevron-down'\"\n aria-hidden=\"true\" />\n </button>\n\n <div ngbDropdownMenu id=\"drawer-menu\">\n <div class=\"dropdown-content navigation-menu-dropdown\">\n <he-navigation-menu (closed)=\"optionDd.close()\" [links]=\"links()\" [secondaryLinks]=\"secondaryLinks()\">\n @if (drawerMenuHeaderTemplate()) {\n <ng-container header [ngTemplateOutlet]=\"drawerMenuHeaderTemplate()\" />\n }\n @if (drawerMenuFooterTemplate()) {\n <ng-container footer [ngTemplateOutlet]=\"drawerMenuFooterTemplate()\" />\n }\n </he-navigation-menu>\n </div>\n </div>\n </div>\n }\n @if (drawerFooterTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerFooterTemplate()\" />\n }\n </div>\n </div>\n </div>\n } @else {\n <aside>\n <div\n class=\"is-absolute h-100 shadow-2 has-background-white | shell__menuContent\"\n (@sideMenu.done)=\"animationDone($event)\"\n [@sideMenu]=\"expanded() ? 'full' : 'hidden'\">\n <div\n class=\"h-100 is-overflow-y-auto\"\n [class.is-py-4]=\"!drawerContentTemplate()\"\n [class.is-px-2]=\"!drawerContentTemplate()\">\n @if (drawerHeaderTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerHeaderTemplate()\" />\n }\n @if (drawerContentTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerContentTemplate()\" />\n }\n @if (links()?.length > 0) {\n <he-navigation-menu [links]=\"links()\" [secondaryLinks]=\"secondaryLinks()\">\n @if (drawerMenuHeaderTemplate()) {\n <ng-container header [ngTemplateOutlet]=\"drawerMenuHeaderTemplate()\" />\n }\n @if (drawerMenuFooterTemplate()) {\n <ng-container footer [ngTemplateOutlet]=\"drawerMenuFooterTemplate()\" />\n }\n </he-navigation-menu>\n }\n @if (drawerFooterTemplate()) {\n <ng-container [ngTemplateOutlet]=\"drawerFooterTemplate()\" />\n }\n </div>\n @if (collapsible()) {\n <button\n (click)=\"toggleMenu()\"\n (mousedown)=\"startResizing($event)\"\n (touchstart)=\"startResizing($event)\"\n class=\"is-absolute is-overflow-hidden is-flex is-justify-content-center is-align-items-center | shell__menuContent--toggle\"\n pointer>\n <he-svg-icon [name]=\"resizable() ? 'drag' : toggleIcon()\" size=\"20\" />\n </button>\n }\n </div>\n </aside>\n }\n}\n\n<div [class.is-resizing]=\"isHoldingToggle()\" class=\"shell__content | h-100 w-100 is-flex\">\n <div class=\"shell__content--body | w-100\" [@reduceWidth]=\"reduceAnimation()\">\n <div #contentContainer class=\"w-100 h-100\" [style]=\"contentStyles()\" [className]=\"contentPaddingStyles()\">\n <ng-content select=\"[drawer-content]\" />\n </div>\n </div>\n</div>\n", styles: ["::ng-deep :root{--drawer-toggle-position: -20px;--sidenav-left-width: 256px;--sidenav-right-width: 256px;--content-transition-left-x: 0;--content-transition-right-x: 0}:host-context[drawer-position=left]{--sidenav-side-transform: 1;--sidenav-width: var(--sidenav-left-width);--content-transition-x: var(--content-transition-left-x);--menu-transition-transform: -1}:host-context[drawer-position=left]>aside{left:0}:host-context[drawer-position=left]>aside>.shell__menuContent{left:0}:host-context[drawer-position=left]>aside>.shell__menuContent>.shell__menuContent--toggle{right:var(--drawer-toggle-position);border-radius:0 9px 9px 0}:host-context[drawer-position=right]{--sidenav-side-transform: 0;--sidenav-width: var(--sidenav-right-width);--content-transition-x: var(--content-transition-right-x);--menu-transition-transform: 1}:host-context[drawer-position=right]>aside{right:0;order:1}:host-context[drawer-position=right]>aside>.shell__menuContent{right:0}:host-context[drawer-position=right]>aside>.shell__menuContent>.shell__menuContent--toggle{left:var(--drawer-toggle-position);border-radius:9px 0 0 9px}:host{position:relative;max-height:100%;display:flex;justify-content:space-between}:host aside{position:sticky;top:var(--navbar-height);z-index:10;height:calc(100vh - var(--navbar-height))}:host aside .shell__menuContent{top:0;width:var(--sidenav-width)}:host aside .shell__menuContent--toggle{top:calc(50% - 24px);background:#dbe3ea;border:none;width:20px;height:48px}:host aside ::ng-deep he-collapsible-box{box-shadow:none;padding:4px!important}@media screen and (max-width:1023px){:host aside ::ng-deep he-collapsible-box{background-color:transparent}}:host aside ::ng-deep he-collapsible-box>div{gap:16px!important}:host aside ::ng-deep he-collapsible-box .dropdown-content{box-shadow:none}:host aside ::ng-deep he-collapsible-box .dropdown-item+.dropdown-item{border-top:1px solid #b5b5b5}:host aside ::ng-deep he-collapsible-box .navbar-divider{background-color:#b5b5b5;margin:0}:host.is-resizable .shell__menuContent--toggle:active{cursor:col-resize}.shell__content--body{container-type:inline-size;transition:none}.shell__content:not(.is-resizing) .shell__content--body{transition:transform .3s ease-in-out,width .3s ease-in-out}.navigation-menu-dropdown{padding:.5rem 1rem;width:300px}@media screen and (max-width:767px){.navigation-menu-dropdown{width:calc(100dvw - 3rem)}}.compact-header{position:sticky;top:calc(var(--navbar-height));z-index:10}@media screen and (max-width:767px){.compact-header{top:0}}.compact-header--btn{background:#dbe3ea}he-navigation-menu ::ng-deep .menu{width:100%!important;min-width:100%!important;max-width:100%!important}\n"] }]
|
|
2335
|
+
}], ctorParameters: () => [], propDecorators: { contentContainer: [{ type: i0.ViewChild, args: ['contentContainer', { ...{ read: ElementRef }, isSignal: true }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], compactBreakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactBreakpoint", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }, { type: i0.Output, args: ["widthChange"] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], contentStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentStyles", required: false }] }], contentPaddingStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentPaddingStyles", required: false }] }], menuOverlap: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuOverlap", required: false }] }], links: [{ type: i0.Input, args: [{ isSignal: true, alias: "links", required: false }] }], secondaryLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryLinks", required: false }] }], drawerHeaderTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerHeaderTemplate", required: false }] }], drawerContentTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerContentTemplate", required: false }] }], drawerFooterTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerFooterTemplate", required: false }] }], drawerMenuHeaderTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerMenuHeaderTemplate", required: false }] }], drawerMenuFooterTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerMenuFooterTemplate", required: false }] }], compactMenuLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactMenuLabel", required: false }] }], compactHeaderClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactHeaderClass", required: false }] }], compactMenuHeaderClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactMenuHeaderClass", required: false }] }], minMenuDistance: [{ type: i0.Input, args: [{ isSignal: true, alias: "minMenuDistance", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], stopResizing: [{
|
|
2334
2336
|
type: HostListener,
|
|
2335
2337
|
args: ['window:mouseup']
|
|
2336
2338
|
}, {
|
|
@@ -6056,10 +6058,12 @@ class ChartTooltipComponent {
|
|
|
6056
6058
|
this.tooltipX = signal(0, ...(ngDevMode ? [{ debugName: "tooltipX" }] : []));
|
|
6057
6059
|
this.tooltipY = signal(0, ...(ngDevMode ? [{ debugName: "tooltipY" }] : []));
|
|
6058
6060
|
}
|
|
6059
|
-
show(data, x, y) {
|
|
6061
|
+
show(data, x, y, options = { placement: 'bottom' }) {
|
|
6060
6062
|
this.tooltipX.set(x);
|
|
6061
6063
|
this.tooltipY.set(y);
|
|
6062
6064
|
const text = this.tooltipFn()(data);
|
|
6065
|
+
this.tooltip().container = options?.container;
|
|
6066
|
+
this.tooltip().placement = options?.placement;
|
|
6063
6067
|
text && setTimeout(() => this.tooltip().open({ data: text }));
|
|
6064
6068
|
}
|
|
6065
6069
|
hide() {
|
|
@@ -6978,7 +6982,9 @@ const nodeTypeIcon = {
|
|
|
6978
6982
|
[NodeType.Organisation]: 'organisation',
|
|
6979
6983
|
[NodeType.Site]: 'pin',
|
|
6980
6984
|
[NodeType.Source]: 'source',
|
|
6981
|
-
[NodeType.Term]: 'term'
|
|
6985
|
+
[NodeType.Term]: 'term',
|
|
6986
|
+
[SchemaType.Property]: 'magnifier',
|
|
6987
|
+
[SchemaType.Transport]: 'truck'
|
|
6982
6988
|
};
|
|
6983
6989
|
|
|
6984
6990
|
class NodeLinkComponent {
|
|
@@ -9370,6 +9376,7 @@ const icons = [
|
|
|
9370
9376
|
'loading-circle-filled',
|
|
9371
9377
|
'loading-circle-filled-withshadow',
|
|
9372
9378
|
'log',
|
|
9379
|
+
'magnifier',
|
|
9373
9380
|
'mail',
|
|
9374
9381
|
'map',
|
|
9375
9382
|
'menu',
|
|
@@ -9432,6 +9439,7 @@ const icons = [
|
|
|
9432
9439
|
'tool',
|
|
9433
9440
|
'trash',
|
|
9434
9441
|
'tree',
|
|
9442
|
+
'truck',
|
|
9435
9443
|
'turn-phone',
|
|
9436
9444
|
'unit',
|
|
9437
9445
|
'upload',
|
|
@@ -12372,11 +12380,11 @@ class FilesUploadErrorsComponent {
|
|
|
12372
12380
|
return value !== firstVal;
|
|
12373
12381
|
}
|
|
12374
12382
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FilesUploadErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12375
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: FilesUploadErrorsComponent, isStandalone: true, selector: "he-files-upload-errors", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: true, transformFunction: null }, file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: false, transformFunction: null }, debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (error()) {\n <div class=\"is-flex is-flex-direction-column is-gap-8 has-text-danger\">\n @switch (message()) {\n @case (ErrorKeys.PrivacyNotAllowed) {\n <div>\n <span>\n Uploading data with\n <code class=\"is-px-1\">dataPrivate={{ error().value }}</code>\n is not allowed.\n </span>\n <span class=\"is-pl-1\">\n Please try uploading with\n <code class=\"is-px-1\">dataPrivate={{ !error().value }}</code>\n instead.\n </span>\n </div>\n }\n @case (ErrorKeys.InvalidJSON) {\n <div>\n <p>The uploaded content does not appear to contain valid JSON data:</p>\n <div class=\"is-my-2\">\n <pre><code>{{error().error}}</code></pre>\n </div>\n <p>\n Please validate your JSON content before uploading it using an\n <a href=\"https://jsoneditoronline.org\" target=\"_blank\">online tool</a>\n for example.\n </p>\n </div>\n }\n @case (ErrorKeys.NoData) {\n <div>\n <p>No Nodes could be found in your Upload. Please verify the column headers match the HESTIA schema.</p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n }\n @case (ErrorKeys.SetValueError) {\n <div class=\"notification is-danger\" role=\"alert\">\n <p>\n <he-svg-icon name=\"exclamation-triangle\" />\n <span>\n We could not convert the data in your Upload. This can be due to setting 2 different formats in the same\n field.\n </span>\n <span class=\"px-1\">Please refer to the</span>\n <a [href]=\"schemaUrl()\" target=\"_blank\">schema</a>\n <span class=\"pl-1\">and then correct the column headers indicated below.</span>\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n <div>\n <pre><code>{{error().key}}</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.PropertyNotFound) {\n <div class=\"notification is-danger\" role=\"alert\">\n <p>\n <he-svg-icon name=\"exclamation-triangle\" />\n <span class=\"is-pl-2\">You have column headers that do not match the HESTIA schema.</span>\n <span class=\"px-1\">Please refer to the</span>\n <a [href]=\"schemaUrl()\" target=\"_blank\">schema</a>\n <span class=\"pl-1\">and then correct the column headers indicated below.</span>\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n <div>\n <pre><code>{{error().key}}</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.PropertyInvalidFormat) {\n <div>\n <div>\n <span>\n The following value in the column\n <i>{{ error().key }}</i>\n is not in the correct format:\n </span>\n <br />\n <pre class=\"is-mt-2\"><code>{{stringify(error().value)}}</code></pre>\n </div>\n @switch (hasNumberWithCommasError()) {\n @case (true) {\n <p class=\"is-mt-2\">\n Please format your numbers to remove commas and use a decimal point to separate the whole part of the\n number from the fractional part of the number.\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>3,510.1</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>3510.1</code></pre>\n }\n @case (false) {\n <ng-container *ngTemplateOutlet=\"schemaError\" />\n <p>The error could either be a value in the column, or an error with the column header.</p>\n <p>\n If you are trying to set no data, we accept either\n <code>-</code>\n or an empty cell.\n </p>\n }\n }\n </div>\n }\n @case (ErrorKeys.PropertyRequired) {\n <div>\n <div>\n <span class=\"pr-1\">The following field is required in the</span>\n @if (error().schema) {\n <a class=\"pr-1\" [href]=\"schemaUrl()\" target=\"_blank\">{{ error().schema }}</a>\n }\n <span>schema:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().property}}</code></pre>\n </div>\n <p>\n @switch (error().property) {\n @case ('id') {\n <span>\n You must assign a unique\n <code>id</code>\n for every record in your data.\n </span>\n }\n @case ('type') {\n <span>\n Every record in your data must contain a\n <code>type</code>\n .\n </span>\n }\n }\n </p>\n </div>\n }\n @case (ErrorKeys.PropertyInternal) {\n <div>\n <div>\n <span class=\"pr-1\">\n The following field is\n <code>internal</code>\n in the\n </span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schema }} schema</a>\n <span>:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().schemaKey || error().key}}</code></pre>\n </div>\n <p>\n You cannot upload\n <code>internal</code>\n fields to HESTIA.\n </p>\n </div>\n }\n @case (SchemaErrorKeys.SchemaNotFound) {\n <div>\n @if (error().key) {\n <div>\n <span>The following Node does not exist in the schema:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().key}}</code></pre>\n </div>\n } @else if (error().schema) {\n <div>\n <span>The following Node Type does not exist in the schema or can not be uploaded directly:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().schema}}</code></pre>\n </div>\n }\n <p>\n <span>The list of accepted values is:</span>\n </p>\n <div class=\"content\">\n <ul>\n @for (type of nodeTypes; track type) {\n <li>\n <i>{{ type }}</i>\n </li>\n }\n </ul>\n </div>\n </div>\n }\n @case (ErrorKeys.InvalidFirstColumn) {\n <div>\n <span>\n No data in the HESTIA format was detected on the first sheet. Either try selecting a different sheet in the\n upload screen, or check the sheet to ensure the headers follow the schema - see examples\n </span>\n <a class=\"pl-1\" href=\"/guide/guide-file-upload-examples\" target=\"_blank\">here</a>\n </div>\n }\n @case (ErrorKeys.InvalidExcelFile) {\n <div>\n This file has been uploaded with a\n <code>{{ fileExt() }}</code>\n extension, but does not appear to be a valid Excel file.\n </div>\n }\n @case (ErrorKeys.NoHeaders) {\n <div>\n <p>\n No headers matching the HESTIA schema were found on the first row. Please remove all empty rows at the\n begining of the file and try uploading again.\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n }\n @case (ErrorKeys.InvalidSheetName) {\n <div>\n <div>\n <span class=\"pr-1\">The Excel sheet</span>\n <code>{{ error().value }}</code>\n <span class=\"pl-1\">does not exist.</span>\n <span class=\"pl-1\">Your Excel file contains the following sheets:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (e of error().error.split(';'); track e) {\n <li>\n <code>{{ e }}</code>\n </li>\n }\n </ul>\n </div>\n <p>\n <span>Please re-upload selecting one of the sheets above.</span>\n </p>\n </div>\n }\n @case (ErrorKeys.DuplicatedHeaders) {\n <div>\n <span>Your upload contains duplicated column headers.</span>\n </div>\n }\n @case (ErrorKeys.DuplicatedIds) {\n <div>\n <div>\n <span class=\"is-pr-1\">You have multiple</span>\n <code>{{ error().schema | pluralize }}</code>\n <span class=\"is-px-1\">with the same</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-px-1\">but different data. The</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-pl-1\">is:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().value}}</code></pre>\n </div>\n <p class=\"is-mt-2 is-italic\">\n <span class=\"is-pr-1\">Please note that ussing different case does not make the</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-pl-1\">unique.</span>\n </p>\n </div>\n }\n @case (SchemaErrorKeys.DuplicatedIdFields) {\n <div>\n <span class=\"is-pr-1\">You have used both the</span>\n <code>@id</code>\n <span class=\"is-px-1\">and</span>\n <code>id</code>\n <span class=\"is-px-1\">fields in the same data. Please use</span>\n <code>@id</code>\n <span class=\"is-px-1\">when linking to existing nodes on the Platform, and</span>\n <code>id</code>\n <span class=\"is-px-1\">when linking to nodes you are uploading in this file using the same</span>\n <code>id</code>\n <span class=\"is-px-1\">field.</span>\n </div>\n }\n @case (ErrorKeys.NestedHeaders) {\n <div>\n <p>\n To link nodes together, you first need to define the node (e.g.,\n <code>source.id</code>\n ,\n <code>source.bibliography.title</code>\n ) and then create the link (e.g.,\n <code>cycle.defaultSource.id</code>\n ). We do not allow nesting (e.g.,\n <code>cycle.defaultSource.bibliography.title</code>\n ).\n </p>\n </div>\n }\n @case (ErrorKeys.NestedNodes) {\n <div>\n <p>To link nodes together, you need to upload each node separately, as we do not allow nesting:</p>\n <pre class=\"is-mt-2\"><code>{{ sampleLinkedNodes | json }}</code></pre>\n </div>\n }\n @case (ErrorKeys.ReferenceExistingHeaders) {\n <div>\n <p>\n You have used the internal\n <code>@id</code>\n field to upload a new Node.\n </p>\n <p>\n The\n <code>@id</code>\n field should only be used to reference existing Node or Terms. Example:\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.@id,cycle.inputs.0.term.@id,source.id</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.id,cycle.inputs.0.term.@id,source.id</code></pre>\n </div>\n }\n @case (ErrorKeys.InvalidBlankNodeHeaders) {\n <div>\n <p>Evry blank node must be followed by a number, e.g.:</p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.term.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.name</code></pre>\n </div>\n }\n @case (ErrorKeys.MultipleNodeTypeCase) {\n <div>\n <p>You are using a combination of mixed cases in your headers:</p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>impactAssessment.id,impactAssessment.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>impactAssessment.id,impactassessment.name</code></pre>\n\n <p>\n Please make sure to always use either\n <code>impactAssessment</code>\n or\n <code>impactassessment</code>\n , but not both.\n </p>\n </div>\n }\n @case (ErrorKeys.MultipleTermHeaders) {\n <div>\n <p>\n You are using both\n <code>@id</code>\n (or\n <code>id</code>\n ) and\n <code>name</code>\n fields to upload an existing Node (e.g., a Term).\n </p>\n <p>\n Using both fields can lead to inconsistencies, if you are not uploading the correct value in either one.\n Instead, you should only use one of them:\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.@id,cycle.inputs.0.term.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.@id</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.ObjectArrayInvalid) {\n <div>\n <p>The column header {{ error().key }} must use the array format. Examples:</p>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.0.term.name' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.0.value' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.1.term.name' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.1.value' }}</code></pre>\n <ng-container *ngTemplateOutlet=\"schemaError\" />\n </div>\n }\n @case (ErrorKeys.MaxSize) {\n <div>\n <span>The maximum file size limit is {{ maxFileSizeMb }}Mb (current file size: {{ error().value }}Mb).</span>\n <span class=\"pl-1\">Please re-upload these data in multiple files.</span>\n </div>\n }\n @case (ErrorKeys.MaxRows) {\n <div>\n <span>\n Your file has {{ error().value | number }} rows. This might be an error caused by adding some data at the\n bottom of a spreadsheet by accident: delete any unused rows and resubmit the file.\n </span>\n </div>\n }\n @case (ErrorKeys.Mendeley) {\n <div>\n <p>An error occured while fetching the bibliographic information. Please try re-uploading the file.</p>\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n @case (ErrorKeys.Timeout) {\n <div>\n <p>Time exceeded for current step.</p>\n\n @if (debug()) {\n <span>You can try to \"Re-index\" or \"Re-upload\" if it still does not work.</span>\n }\n\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n @default {\n <div>\n <p>{{ message() }}</p>\n\n @if (debug()) {\n <pre><code>{{ error() | json }}</code></pre>\n }\n\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n }\n\n @if (hasGeoJSONError()) {\n <div>\n <p>If the GeoJSON is too large, please try to simplify it following these steps:</p>\n <ul class=\"is-my-1 content is-list-style-decimal pl-5\">\n <li>\n <span class=\"is-pr-1\">Go to</span>\n <a href=\"https://mapshaper.org/\" target=\"_blank\">https://mapshaper.org/</a>\n </li>\n <li>\n <span>\n Save the boundary in a valid\n <code>.geojson</code>\n file.\n </span>\n </li>\n <li>\n <span>Import it on mapshaper.</span>\n </li>\n <li>\n <span>Click \"Simplify\" in the top right corner in the menu bar.</span>\n </li>\n <li>\n <span>Adjust the percentage to a lower value, like 50% to start with.</span>\n </li>\n <li>\n <span>\n Export to\n <code>GeoJson</code>\n or\n <code>CSV</code>\n .\n </span>\n </li>\n <li>\n <span>Copy the resulting content into your upload file.</span>\n </li>\n </ul>\n <p>If you encounter the error again, try again using a lower percentage at step 5.</p>\n </div>\n }\n\n @if (columns().length || (error().index && !isSchemaError())) {\n <div>\n <b>Hint:</b>\n <span class=\"pl-1\">the error might be located</span>\n @if (error().index && !isSchemaError()) {\n <span class=\"pl-1\">on row {{ error().index }}</span>\n }\n @if (columns().length) {\n <span class=\"pl-1\">in {{ 'column' | pluralize: columns().length }}:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (column of columns(); track column) {\n <li>\n <b class=\"pr-2\">{{ column.column }}</b>\n <code>{{ column.name }}</code>\n </li>\n }\n </ul>\n }\n </div>\n }\n\n @if (error().suggestions?.length) {\n <div>\n <b>Suggestions:</b>\n <span class=\"pl-1\">did you mean instead:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (suggestion of error().suggestions; track suggestion) {\n <li>\n <code>{{ suggestion }}</code>\n </li>\n }\n </ul>\n </div>\n }\n\n @if (showCsvPreview()) {\n <div>\n <b>\n Preview\n <sup>1</sup>\n :\n </b>\n <div class=\"table-container is-mt-2\">\n <table class=\"table is-bordered is-fullwidth is-hoverable is-narrow mb-0\">\n <thead>\n @if (error().index) {\n <th></th>\n }\n @for (header of headers(); track header) {\n <th>{{ header }}</th>\n }\n </thead>\n <tbody>\n @for (row of rows(); track row) {\n <tr>\n @if (error().index) {\n <td class=\"has-text-danger\">\n <span class=\"is-nowrap\">Row {{ error().index }}</span>\n </td>\n }\n @for (col of row; track col; let colIndex = $index) {\n <td>\n <span\n [class.has-text-danger]=\"\n message() === ErrorKeys.DuplicatedIds && hasDuplicatedError(col, colIndex)\n \">\n {{ col | ellipsis: 50 }}\n </span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n <p class=\"is-size-7\">\n <i>1. The preview does not necessarily reflect the original Upload's order or content.</i>\n </p>\n </div>\n }\n\n @if (showJsonPreview()) {\n <div>\n <b>Preview:</b>\n <pre class=\"is-mt-2\"><code>{{stringify(error().node)}}</code></pre>\n </div>\n }\n </div>\n}\n\n<ng-template #defaultError>\n <p class=\"is-mt-2 has-text-black\">\n <span class=\"is-pr-1\">If you are still stuck, please see</span>\n <a [href]=\"baseUrl + '/guide/guide-file-upload-prepare-file'\" target=\"_blank\">the example uploads and videos</a>\n <span class=\"is-px-1\">\n or try using the Wizard to get the first few rows of data formatted correctly, or use the chat to ask for help.\n </span>\n </p>\n</ng-template>\n\n<ng-template #reportError>\n <p class=\"is-mt-2\">\n To report this error, please\n <a class=\"is-pl-1\" [href]=\"reportErrorUrl()\" target=\"_blank\">click here</a>\n .\n </p>\n</ng-template>\n\n<ng-template #schemaError>\n <p>\n <span class=\"pr-1\">You can see the accepted field type and some examples</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">here</a>\n <span>.</span>\n </p>\n</ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: PluralizePipe, name: "pluralize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12383
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: FilesUploadErrorsComponent, isStandalone: true, selector: "he-files-upload-errors", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: true, transformFunction: null }, file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: false, transformFunction: null }, debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (error()) {\n <div class=\"is-flex is-flex-direction-column is-gap-8 has-text-danger\">\n @switch (message()) {\n @case (ErrorKeys.PrivacyNotAllowed) {\n <div>\n <span>\n Uploading data with\n <code class=\"is-px-1\">dataPrivate={{ error().value }}</code>\n is not allowed.\n </span>\n <span class=\"is-pl-1\">\n Please try uploading with\n <code class=\"is-px-1\">dataPrivate={{ !error().value }}</code>\n instead.\n </span>\n </div>\n }\n @case (ErrorKeys.InvalidJSON) {\n <div>\n <p>The uploaded content does not appear to contain valid JSON data:</p>\n <div class=\"is-my-2\">\n <pre><code>{{error().error}}</code></pre>\n </div>\n <p>\n Please validate your JSON content before uploading it using an\n <a href=\"https://jsoneditoronline.org\" target=\"_blank\">online tool</a>\n for example.\n </p>\n </div>\n }\n @case (ErrorKeys.NoData) {\n <div>\n <p>No Nodes could be found in your Upload. Please verify the column headers match the HESTIA schema.</p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n }\n @case (ErrorKeys.SetValueError) {\n <div class=\"notification is-danger\" role=\"alert\">\n <p>\n <he-svg-icon name=\"exclamation-triangle\" />\n <span class=\"is-pl-3\">\n We could not convert the data in your Upload. This can be due to setting 2 different formats in the same\n field.\n </span>\n <span class=\"px-1\">Please refer to the</span>\n <a [href]=\"schemaUrl()\" target=\"_blank\">schema</a>\n <span class=\"pl-1\">and then correct the column headers indicated below.</span>\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n <div>\n <pre><code>{{error().key}}</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.PropertyNotFound) {\n <div class=\"notification is-danger\" role=\"alert\">\n <p>\n <he-svg-icon name=\"exclamation-triangle\" />\n <span class=\"is-pl-2\">You have column headers that do not match the HESTIA schema.</span>\n <span class=\"px-1\">Please refer to the</span>\n <a [href]=\"schemaUrl()\" target=\"_blank\">schema</a>\n <span class=\"pl-1\">and then correct the column headers indicated below.</span>\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n <div>\n <pre><code>{{error().key}}</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.PropertyInvalidFormat) {\n <div>\n <div>\n <span>\n The following value in the column\n <i>{{ error().key }}</i>\n is not in the correct format:\n </span>\n <br />\n <pre class=\"is-mt-2\"><code>{{stringify(error().value)}}</code></pre>\n </div>\n @switch (hasNumberWithCommasError()) {\n @case (true) {\n <p class=\"is-mt-2\">\n Please format your numbers to remove commas and use a decimal point to separate the whole part of the\n number from the fractional part of the number.\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>3,510.1</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>3510.1</code></pre>\n }\n @case (false) {\n <ng-container *ngTemplateOutlet=\"schemaError\" />\n <p>The error could either be a value in the column, or an error with the column header.</p>\n <p>\n If you are trying to set no data, we accept either\n <code>-</code>\n or an empty cell.\n </p>\n }\n }\n </div>\n }\n @case (ErrorKeys.PropertyRequired) {\n <div>\n <div>\n <span class=\"pr-1\">The following field is required in the</span>\n @if (error().schema) {\n <a class=\"pr-1\" [href]=\"schemaUrl()\" target=\"_blank\">{{ error().schema }}</a>\n }\n <span>schema:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().property}}</code></pre>\n </div>\n <p>\n @switch (error().property) {\n @case ('id') {\n <span>\n You must assign a unique\n <code>id</code>\n for every record in your data.\n </span>\n }\n @case ('type') {\n <span>\n Every record in your data must contain a\n <code>type</code>\n .\n </span>\n }\n }\n </p>\n </div>\n }\n @case (ErrorKeys.PropertyInternal) {\n <div>\n <div>\n <span class=\"pr-1\">\n The following field is\n <code>internal</code>\n in the\n </span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schema }} schema</a>\n <span>:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().schemaKey || error().key}}</code></pre>\n </div>\n <p>\n You cannot upload\n <code>internal</code>\n fields to HESTIA.\n </p>\n </div>\n }\n @case (SchemaErrorKeys.SchemaNotFound) {\n <div>\n @if (error().key) {\n <div>\n <span>The following Node does not exist in the schema:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().key}}</code></pre>\n </div>\n } @else if (error().schema) {\n <div>\n <span>The following Node Type does not exist in the schema or can not be uploaded directly:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().schema}}</code></pre>\n </div>\n }\n <p>\n <span>The list of accepted values is:</span>\n </p>\n <div class=\"content\">\n <ul>\n @for (type of nodeTypes; track type) {\n <li>\n <i>{{ type }}</i>\n </li>\n }\n </ul>\n </div>\n </div>\n }\n @case (ErrorKeys.InvalidFirstColumn) {\n <div>\n <span>\n No data in the HESTIA format was detected on the first sheet. Either try selecting a different sheet in the\n upload screen, or check the sheet to ensure the headers follow the schema - see examples\n </span>\n <a class=\"pl-1\" href=\"/guide/guide-file-upload-examples\" target=\"_blank\">here</a>\n </div>\n }\n @case (ErrorKeys.InvalidExcelFile) {\n <div>\n This file has been uploaded with a\n <code>{{ fileExt() }}</code>\n extension, but does not appear to be a valid Excel file.\n </div>\n }\n @case (ErrorKeys.NoHeaders) {\n <div>\n <p>\n No headers matching the HESTIA schema were found on the first row. Please remove all empty rows at the\n begining of the file and try uploading again.\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n }\n @case (ErrorKeys.InvalidSheetName) {\n <div>\n <div>\n <span class=\"pr-1\">The Excel sheet</span>\n <code>{{ error().value }}</code>\n <span class=\"pl-1\">does not exist.</span>\n <span class=\"pl-1\">Your Excel file contains the following sheets:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (e of error().error.split(';'); track e) {\n <li>\n <code>{{ e }}</code>\n </li>\n }\n </ul>\n </div>\n <p>\n <span>Please re-upload selecting one of the sheets above.</span>\n </p>\n </div>\n }\n @case (ErrorKeys.DuplicatedHeaders) {\n <div>\n <span>Your upload contains duplicated column headers.</span>\n </div>\n }\n @case (ErrorKeys.DuplicatedIds) {\n <div>\n <div>\n <span class=\"is-pr-1\">You have multiple</span>\n <code>{{ error().schema | pluralize }}</code>\n <span class=\"is-px-1\">with the same</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-px-1\">but different data. The</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-pl-1\">is:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().value}}</code></pre>\n </div>\n <p class=\"is-mt-2 is-italic\">\n <span class=\"is-pr-1\">Please note that ussing different case does not make the</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-pl-1\">unique.</span>\n </p>\n </div>\n }\n @case (SchemaErrorKeys.DuplicatedIdFields) {\n <div>\n <span class=\"is-pr-1\">You have used both the</span>\n <code>@id</code>\n <span class=\"is-px-1\">and</span>\n <code>id</code>\n <span class=\"is-px-1\">fields in the same data. Please use</span>\n <code>@id</code>\n <span class=\"is-px-1\">when linking to existing nodes on the Platform, and</span>\n <code>id</code>\n <span class=\"is-px-1\">when linking to nodes you are uploading in this file using the same</span>\n <code>id</code>\n <span class=\"is-px-1\">field.</span>\n </div>\n }\n @case (ErrorKeys.NestedHeaders) {\n <div>\n <p>\n To link nodes together, you first need to define the node (e.g.,\n <code>source.id</code>\n ,\n <code>source.bibliography.title</code>\n ) and then create the link (e.g.,\n <code>cycle.defaultSource.id</code>\n ). We do not allow nesting (e.g.,\n <code>cycle.defaultSource.bibliography.title</code>\n ).\n </p>\n </div>\n }\n @case (ErrorKeys.NestedNodes) {\n <div>\n <p>To link nodes together, you need to upload each node separately, as we do not allow nesting:</p>\n <pre class=\"is-mt-2\"><code>{{ sampleLinkedNodes | json }}</code></pre>\n </div>\n }\n @case (ErrorKeys.ReferenceExistingHeaders) {\n <div>\n <p>\n You have used the internal\n <code>@id</code>\n field to upload a new Node.\n </p>\n <p>\n The\n <code>@id</code>\n field should only be used to reference existing Node or Terms. Example:\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.@id,cycle.inputs.0.term.@id,source.id</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.id,cycle.inputs.0.term.@id,source.id</code></pre>\n </div>\n }\n @case (ErrorKeys.InvalidBlankNodeHeaders) {\n <div>\n <p>Evry blank node must be followed by a number, e.g.:</p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.term.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.name</code></pre>\n </div>\n }\n @case (ErrorKeys.MultipleNodeTypeCase) {\n <div>\n <p>You are using a combination of mixed cases in your headers:</p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>impactAssessment.id,impactAssessment.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>impactAssessment.id,impactassessment.name</code></pre>\n\n <p>\n Please make sure to always use either\n <code>impactAssessment</code>\n or\n <code>impactassessment</code>\n , but not both.\n </p>\n </div>\n }\n @case (ErrorKeys.MultipleTermHeaders) {\n <div>\n <p>\n You are using both\n <code>@id</code>\n (or\n <code>id</code>\n ) and\n <code>name</code>\n fields to upload an existing Node (e.g., a Term).\n </p>\n <p>\n Using both fields can lead to inconsistencies, if you are not uploading the correct value in either one.\n Instead, you should only use one of them:\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.@id,cycle.inputs.0.term.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.@id</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.ObjectArrayInvalid) {\n <div>\n <p>The column header {{ error().key }} must use the array format. Examples:</p>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.0.term.name' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.0.value' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.1.term.name' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.1.value' }}</code></pre>\n <ng-container *ngTemplateOutlet=\"schemaError\" />\n </div>\n }\n @case (ErrorKeys.MaxSize) {\n <div>\n <span>The maximum file size limit is {{ maxFileSizeMb }}Mb (current file size: {{ error().value }}Mb).</span>\n <span class=\"pl-1\">Please re-upload these data in multiple files.</span>\n </div>\n }\n @case (ErrorKeys.MaxRows) {\n <div>\n <span>\n Your file has {{ error().value | number }} rows. This might be an error caused by adding some data at the\n bottom of a spreadsheet by accident: delete any unused rows and resubmit the file.\n </span>\n </div>\n }\n @case (ErrorKeys.Mendeley) {\n <div>\n <p>An error occured while fetching the bibliographic information. Please try re-uploading the file.</p>\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n @case (ErrorKeys.Timeout) {\n <div>\n <p>Time exceeded for current step.</p>\n\n @if (debug()) {\n <span>You can try to \"Re-index\" or \"Re-upload\" if it still does not work.</span>\n }\n\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n @default {\n <div>\n <p>{{ message() }}</p>\n\n @if (debug()) {\n <pre><code>{{ error() | json }}</code></pre>\n }\n\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n }\n\n @if (hasGeoJSONError()) {\n <div>\n <p>If the GeoJSON is too large, please try to simplify it following these steps:</p>\n <ul class=\"is-my-1 content is-list-style-decimal pl-5\">\n <li>\n <span class=\"is-pr-1\">Go to</span>\n <a href=\"https://mapshaper.org/\" target=\"_blank\">https://mapshaper.org/</a>\n </li>\n <li>\n <span>\n Save the boundary in a valid\n <code>.geojson</code>\n file.\n </span>\n </li>\n <li>\n <span>Import it on mapshaper.</span>\n </li>\n <li>\n <span>Click \"Simplify\" in the top right corner in the menu bar.</span>\n </li>\n <li>\n <span>Adjust the percentage to a lower value, like 50% to start with.</span>\n </li>\n <li>\n <span>\n Export to\n <code>GeoJson</code>\n or\n <code>CSV</code>\n .\n </span>\n </li>\n <li>\n <span>Copy the resulting content into your upload file.</span>\n </li>\n </ul>\n <p>If you encounter the error again, try again using a lower percentage at step 5.</p>\n </div>\n }\n\n @if (columns().length || (error().index && !isSchemaError())) {\n <div>\n <b>Hint:</b>\n <span class=\"pl-1\">the error might be located</span>\n @if (error().index && !isSchemaError()) {\n <span class=\"pl-1\">on row {{ error().index }}</span>\n }\n @if (columns().length) {\n <span class=\"pl-1\">in {{ 'column' | pluralize: columns().length }}:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (column of columns(); track column) {\n <li>\n <b class=\"pr-2\">{{ column.column }}</b>\n <code>{{ column.name }}</code>\n </li>\n }\n </ul>\n }\n </div>\n }\n\n @if (error().suggestions?.length) {\n <div>\n <b>Suggestions:</b>\n <span class=\"pl-1\">did you mean instead:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (suggestion of error().suggestions; track suggestion) {\n <li>\n <code>{{ suggestion }}</code>\n </li>\n }\n </ul>\n </div>\n }\n\n @if (showCsvPreview()) {\n <div>\n <b>\n Preview\n <sup>1</sup>\n :\n </b>\n <div class=\"table-container is-mt-2\">\n <table class=\"table is-bordered is-fullwidth is-hoverable is-narrow mb-0\">\n <thead>\n @if (error().index) {\n <th></th>\n }\n @for (header of headers(); track header) {\n <th>{{ header }}</th>\n }\n </thead>\n <tbody>\n @for (row of rows(); track row) {\n <tr>\n @if (error().index) {\n <td class=\"has-text-danger\">\n <span class=\"is-nowrap\">Row {{ error().index }}</span>\n </td>\n }\n @for (col of row; track col; let colIndex = $index) {\n <td>\n <span\n [class.has-text-danger]=\"\n message() === ErrorKeys.DuplicatedIds && hasDuplicatedError(col, colIndex)\n \">\n {{ col | ellipsis: 50 }}\n </span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n <p class=\"is-size-7\">\n <i>1. The preview does not necessarily reflect the original Upload's order or content.</i>\n </p>\n </div>\n }\n\n @if (showJsonPreview()) {\n <div>\n <b>Preview:</b>\n <pre class=\"is-mt-2\"><code>{{stringify(error().node)}}</code></pre>\n </div>\n }\n </div>\n}\n\n<ng-template #defaultError>\n <p class=\"is-mt-2 has-text-black\">\n <span class=\"is-pr-1\">If you are still stuck, please see</span>\n <a [href]=\"baseUrl + '/guide/guide-file-upload-prepare-file'\" target=\"_blank\">the example uploads and videos</a>\n <span class=\"is-px-1\">\n or try using the Wizard to get the first few rows of data formatted correctly, or use the chat to ask for help.\n </span>\n </p>\n</ng-template>\n\n<ng-template #reportError>\n <p class=\"is-mt-2\">\n To report this error, please\n <a class=\"is-pl-1\" [href]=\"reportErrorUrl()\" target=\"_blank\">click here</a>\n .\n </p>\n</ng-template>\n\n<ng-template #schemaError>\n <p>\n <span class=\"pr-1\">You can see the accepted field type and some examples</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">here</a>\n <span>.</span>\n </p>\n</ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: PluralizePipe, name: "pluralize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12376
12384
|
}
|
|
12377
12385
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FilesUploadErrorsComponent, decorators: [{
|
|
12378
12386
|
type: Component$1,
|
|
12379
|
-
args: [{ selector: 'he-files-upload-errors', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, HESvgIconComponent, DecimalPipe, JsonPipe, EllipsisPipe, PluralizePipe], template: "@if (error()) {\n <div class=\"is-flex is-flex-direction-column is-gap-8 has-text-danger\">\n @switch (message()) {\n @case (ErrorKeys.PrivacyNotAllowed) {\n <div>\n <span>\n Uploading data with\n <code class=\"is-px-1\">dataPrivate={{ error().value }}</code>\n is not allowed.\n </span>\n <span class=\"is-pl-1\">\n Please try uploading with\n <code class=\"is-px-1\">dataPrivate={{ !error().value }}</code>\n instead.\n </span>\n </div>\n }\n @case (ErrorKeys.InvalidJSON) {\n <div>\n <p>The uploaded content does not appear to contain valid JSON data:</p>\n <div class=\"is-my-2\">\n <pre><code>{{error().error}}</code></pre>\n </div>\n <p>\n Please validate your JSON content before uploading it using an\n <a href=\"https://jsoneditoronline.org\" target=\"_blank\">online tool</a>\n for example.\n </p>\n </div>\n }\n @case (ErrorKeys.NoData) {\n <div>\n <p>No Nodes could be found in your Upload. Please verify the column headers match the HESTIA schema.</p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n }\n @case (ErrorKeys.SetValueError) {\n <div class=\"notification is-danger\" role=\"alert\">\n <p>\n <he-svg-icon name=\"exclamation-triangle\" />\n <span>\n We could not convert the data in your Upload. This can be due to setting 2 different formats in the same\n field.\n </span>\n <span class=\"px-1\">Please refer to the</span>\n <a [href]=\"schemaUrl()\" target=\"_blank\">schema</a>\n <span class=\"pl-1\">and then correct the column headers indicated below.</span>\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n <div>\n <pre><code>{{error().key}}</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.PropertyNotFound) {\n <div class=\"notification is-danger\" role=\"alert\">\n <p>\n <he-svg-icon name=\"exclamation-triangle\" />\n <span class=\"is-pl-2\">You have column headers that do not match the HESTIA schema.</span>\n <span class=\"px-1\">Please refer to the</span>\n <a [href]=\"schemaUrl()\" target=\"_blank\">schema</a>\n <span class=\"pl-1\">and then correct the column headers indicated below.</span>\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n <div>\n <pre><code>{{error().key}}</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.PropertyInvalidFormat) {\n <div>\n <div>\n <span>\n The following value in the column\n <i>{{ error().key }}</i>\n is not in the correct format:\n </span>\n <br />\n <pre class=\"is-mt-2\"><code>{{stringify(error().value)}}</code></pre>\n </div>\n @switch (hasNumberWithCommasError()) {\n @case (true) {\n <p class=\"is-mt-2\">\n Please format your numbers to remove commas and use a decimal point to separate the whole part of the\n number from the fractional part of the number.\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>3,510.1</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>3510.1</code></pre>\n }\n @case (false) {\n <ng-container *ngTemplateOutlet=\"schemaError\" />\n <p>The error could either be a value in the column, or an error with the column header.</p>\n <p>\n If you are trying to set no data, we accept either\n <code>-</code>\n or an empty cell.\n </p>\n }\n }\n </div>\n }\n @case (ErrorKeys.PropertyRequired) {\n <div>\n <div>\n <span class=\"pr-1\">The following field is required in the</span>\n @if (error().schema) {\n <a class=\"pr-1\" [href]=\"schemaUrl()\" target=\"_blank\">{{ error().schema }}</a>\n }\n <span>schema:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().property}}</code></pre>\n </div>\n <p>\n @switch (error().property) {\n @case ('id') {\n <span>\n You must assign a unique\n <code>id</code>\n for every record in your data.\n </span>\n }\n @case ('type') {\n <span>\n Every record in your data must contain a\n <code>type</code>\n .\n </span>\n }\n }\n </p>\n </div>\n }\n @case (ErrorKeys.PropertyInternal) {\n <div>\n <div>\n <span class=\"pr-1\">\n The following field is\n <code>internal</code>\n in the\n </span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schema }} schema</a>\n <span>:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().schemaKey || error().key}}</code></pre>\n </div>\n <p>\n You cannot upload\n <code>internal</code>\n fields to HESTIA.\n </p>\n </div>\n }\n @case (SchemaErrorKeys.SchemaNotFound) {\n <div>\n @if (error().key) {\n <div>\n <span>The following Node does not exist in the schema:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().key}}</code></pre>\n </div>\n } @else if (error().schema) {\n <div>\n <span>The following Node Type does not exist in the schema or can not be uploaded directly:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().schema}}</code></pre>\n </div>\n }\n <p>\n <span>The list of accepted values is:</span>\n </p>\n <div class=\"content\">\n <ul>\n @for (type of nodeTypes; track type) {\n <li>\n <i>{{ type }}</i>\n </li>\n }\n </ul>\n </div>\n </div>\n }\n @case (ErrorKeys.InvalidFirstColumn) {\n <div>\n <span>\n No data in the HESTIA format was detected on the first sheet. Either try selecting a different sheet in the\n upload screen, or check the sheet to ensure the headers follow the schema - see examples\n </span>\n <a class=\"pl-1\" href=\"/guide/guide-file-upload-examples\" target=\"_blank\">here</a>\n </div>\n }\n @case (ErrorKeys.InvalidExcelFile) {\n <div>\n This file has been uploaded with a\n <code>{{ fileExt() }}</code>\n extension, but does not appear to be a valid Excel file.\n </div>\n }\n @case (ErrorKeys.NoHeaders) {\n <div>\n <p>\n No headers matching the HESTIA schema were found on the first row. Please remove all empty rows at the\n begining of the file and try uploading again.\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n }\n @case (ErrorKeys.InvalidSheetName) {\n <div>\n <div>\n <span class=\"pr-1\">The Excel sheet</span>\n <code>{{ error().value }}</code>\n <span class=\"pl-1\">does not exist.</span>\n <span class=\"pl-1\">Your Excel file contains the following sheets:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (e of error().error.split(';'); track e) {\n <li>\n <code>{{ e }}</code>\n </li>\n }\n </ul>\n </div>\n <p>\n <span>Please re-upload selecting one of the sheets above.</span>\n </p>\n </div>\n }\n @case (ErrorKeys.DuplicatedHeaders) {\n <div>\n <span>Your upload contains duplicated column headers.</span>\n </div>\n }\n @case (ErrorKeys.DuplicatedIds) {\n <div>\n <div>\n <span class=\"is-pr-1\">You have multiple</span>\n <code>{{ error().schema | pluralize }}</code>\n <span class=\"is-px-1\">with the same</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-px-1\">but different data. The</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-pl-1\">is:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().value}}</code></pre>\n </div>\n <p class=\"is-mt-2 is-italic\">\n <span class=\"is-pr-1\">Please note that ussing different case does not make the</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-pl-1\">unique.</span>\n </p>\n </div>\n }\n @case (SchemaErrorKeys.DuplicatedIdFields) {\n <div>\n <span class=\"is-pr-1\">You have used both the</span>\n <code>@id</code>\n <span class=\"is-px-1\">and</span>\n <code>id</code>\n <span class=\"is-px-1\">fields in the same data. Please use</span>\n <code>@id</code>\n <span class=\"is-px-1\">when linking to existing nodes on the Platform, and</span>\n <code>id</code>\n <span class=\"is-px-1\">when linking to nodes you are uploading in this file using the same</span>\n <code>id</code>\n <span class=\"is-px-1\">field.</span>\n </div>\n }\n @case (ErrorKeys.NestedHeaders) {\n <div>\n <p>\n To link nodes together, you first need to define the node (e.g.,\n <code>source.id</code>\n ,\n <code>source.bibliography.title</code>\n ) and then create the link (e.g.,\n <code>cycle.defaultSource.id</code>\n ). We do not allow nesting (e.g.,\n <code>cycle.defaultSource.bibliography.title</code>\n ).\n </p>\n </div>\n }\n @case (ErrorKeys.NestedNodes) {\n <div>\n <p>To link nodes together, you need to upload each node separately, as we do not allow nesting:</p>\n <pre class=\"is-mt-2\"><code>{{ sampleLinkedNodes | json }}</code></pre>\n </div>\n }\n @case (ErrorKeys.ReferenceExistingHeaders) {\n <div>\n <p>\n You have used the internal\n <code>@id</code>\n field to upload a new Node.\n </p>\n <p>\n The\n <code>@id</code>\n field should only be used to reference existing Node or Terms. Example:\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.@id,cycle.inputs.0.term.@id,source.id</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.id,cycle.inputs.0.term.@id,source.id</code></pre>\n </div>\n }\n @case (ErrorKeys.InvalidBlankNodeHeaders) {\n <div>\n <p>Evry blank node must be followed by a number, e.g.:</p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.term.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.name</code></pre>\n </div>\n }\n @case (ErrorKeys.MultipleNodeTypeCase) {\n <div>\n <p>You are using a combination of mixed cases in your headers:</p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>impactAssessment.id,impactAssessment.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>impactAssessment.id,impactassessment.name</code></pre>\n\n <p>\n Please make sure to always use either\n <code>impactAssessment</code>\n or\n <code>impactassessment</code>\n , but not both.\n </p>\n </div>\n }\n @case (ErrorKeys.MultipleTermHeaders) {\n <div>\n <p>\n You are using both\n <code>@id</code>\n (or\n <code>id</code>\n ) and\n <code>name</code>\n fields to upload an existing Node (e.g., a Term).\n </p>\n <p>\n Using both fields can lead to inconsistencies, if you are not uploading the correct value in either one.\n Instead, you should only use one of them:\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.@id,cycle.inputs.0.term.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.@id</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.ObjectArrayInvalid) {\n <div>\n <p>The column header {{ error().key }} must use the array format. Examples:</p>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.0.term.name' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.0.value' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.1.term.name' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.1.value' }}</code></pre>\n <ng-container *ngTemplateOutlet=\"schemaError\" />\n </div>\n }\n @case (ErrorKeys.MaxSize) {\n <div>\n <span>The maximum file size limit is {{ maxFileSizeMb }}Mb (current file size: {{ error().value }}Mb).</span>\n <span class=\"pl-1\">Please re-upload these data in multiple files.</span>\n </div>\n }\n @case (ErrorKeys.MaxRows) {\n <div>\n <span>\n Your file has {{ error().value | number }} rows. This might be an error caused by adding some data at the\n bottom of a spreadsheet by accident: delete any unused rows and resubmit the file.\n </span>\n </div>\n }\n @case (ErrorKeys.Mendeley) {\n <div>\n <p>An error occured while fetching the bibliographic information. Please try re-uploading the file.</p>\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n @case (ErrorKeys.Timeout) {\n <div>\n <p>Time exceeded for current step.</p>\n\n @if (debug()) {\n <span>You can try to \"Re-index\" or \"Re-upload\" if it still does not work.</span>\n }\n\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n @default {\n <div>\n <p>{{ message() }}</p>\n\n @if (debug()) {\n <pre><code>{{ error() | json }}</code></pre>\n }\n\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n }\n\n @if (hasGeoJSONError()) {\n <div>\n <p>If the GeoJSON is too large, please try to simplify it following these steps:</p>\n <ul class=\"is-my-1 content is-list-style-decimal pl-5\">\n <li>\n <span class=\"is-pr-1\">Go to</span>\n <a href=\"https://mapshaper.org/\" target=\"_blank\">https://mapshaper.org/</a>\n </li>\n <li>\n <span>\n Save the boundary in a valid\n <code>.geojson</code>\n file.\n </span>\n </li>\n <li>\n <span>Import it on mapshaper.</span>\n </li>\n <li>\n <span>Click \"Simplify\" in the top right corner in the menu bar.</span>\n </li>\n <li>\n <span>Adjust the percentage to a lower value, like 50% to start with.</span>\n </li>\n <li>\n <span>\n Export to\n <code>GeoJson</code>\n or\n <code>CSV</code>\n .\n </span>\n </li>\n <li>\n <span>Copy the resulting content into your upload file.</span>\n </li>\n </ul>\n <p>If you encounter the error again, try again using a lower percentage at step 5.</p>\n </div>\n }\n\n @if (columns().length || (error().index && !isSchemaError())) {\n <div>\n <b>Hint:</b>\n <span class=\"pl-1\">the error might be located</span>\n @if (error().index && !isSchemaError()) {\n <span class=\"pl-1\">on row {{ error().index }}</span>\n }\n @if (columns().length) {\n <span class=\"pl-1\">in {{ 'column' | pluralize: columns().length }}:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (column of columns(); track column) {\n <li>\n <b class=\"pr-2\">{{ column.column }}</b>\n <code>{{ column.name }}</code>\n </li>\n }\n </ul>\n }\n </div>\n }\n\n @if (error().suggestions?.length) {\n <div>\n <b>Suggestions:</b>\n <span class=\"pl-1\">did you mean instead:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (suggestion of error().suggestions; track suggestion) {\n <li>\n <code>{{ suggestion }}</code>\n </li>\n }\n </ul>\n </div>\n }\n\n @if (showCsvPreview()) {\n <div>\n <b>\n Preview\n <sup>1</sup>\n :\n </b>\n <div class=\"table-container is-mt-2\">\n <table class=\"table is-bordered is-fullwidth is-hoverable is-narrow mb-0\">\n <thead>\n @if (error().index) {\n <th></th>\n }\n @for (header of headers(); track header) {\n <th>{{ header }}</th>\n }\n </thead>\n <tbody>\n @for (row of rows(); track row) {\n <tr>\n @if (error().index) {\n <td class=\"has-text-danger\">\n <span class=\"is-nowrap\">Row {{ error().index }}</span>\n </td>\n }\n @for (col of row; track col; let colIndex = $index) {\n <td>\n <span\n [class.has-text-danger]=\"\n message() === ErrorKeys.DuplicatedIds && hasDuplicatedError(col, colIndex)\n \">\n {{ col | ellipsis: 50 }}\n </span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n <p class=\"is-size-7\">\n <i>1. The preview does not necessarily reflect the original Upload's order or content.</i>\n </p>\n </div>\n }\n\n @if (showJsonPreview()) {\n <div>\n <b>Preview:</b>\n <pre class=\"is-mt-2\"><code>{{stringify(error().node)}}</code></pre>\n </div>\n }\n </div>\n}\n\n<ng-template #defaultError>\n <p class=\"is-mt-2 has-text-black\">\n <span class=\"is-pr-1\">If you are still stuck, please see</span>\n <a [href]=\"baseUrl + '/guide/guide-file-upload-prepare-file'\" target=\"_blank\">the example uploads and videos</a>\n <span class=\"is-px-1\">\n or try using the Wizard to get the first few rows of data formatted correctly, or use the chat to ask for help.\n </span>\n </p>\n</ng-template>\n\n<ng-template #reportError>\n <p class=\"is-mt-2\">\n To report this error, please\n <a class=\"is-pl-1\" [href]=\"reportErrorUrl()\" target=\"_blank\">click here</a>\n .\n </p>\n</ng-template>\n\n<ng-template #schemaError>\n <p>\n <span class=\"pr-1\">You can see the accepted field type and some examples</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">here</a>\n <span>.</span>\n </p>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
|
|
12387
|
+
args: [{ selector: 'he-files-upload-errors', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, HESvgIconComponent, DecimalPipe, JsonPipe, EllipsisPipe, PluralizePipe], template: "@if (error()) {\n <div class=\"is-flex is-flex-direction-column is-gap-8 has-text-danger\">\n @switch (message()) {\n @case (ErrorKeys.PrivacyNotAllowed) {\n <div>\n <span>\n Uploading data with\n <code class=\"is-px-1\">dataPrivate={{ error().value }}</code>\n is not allowed.\n </span>\n <span class=\"is-pl-1\">\n Please try uploading with\n <code class=\"is-px-1\">dataPrivate={{ !error().value }}</code>\n instead.\n </span>\n </div>\n }\n @case (ErrorKeys.InvalidJSON) {\n <div>\n <p>The uploaded content does not appear to contain valid JSON data:</p>\n <div class=\"is-my-2\">\n <pre><code>{{error().error}}</code></pre>\n </div>\n <p>\n Please validate your JSON content before uploading it using an\n <a href=\"https://jsoneditoronline.org\" target=\"_blank\">online tool</a>\n for example.\n </p>\n </div>\n }\n @case (ErrorKeys.NoData) {\n <div>\n <p>No Nodes could be found in your Upload. Please verify the column headers match the HESTIA schema.</p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n }\n @case (ErrorKeys.SetValueError) {\n <div class=\"notification is-danger\" role=\"alert\">\n <p>\n <he-svg-icon name=\"exclamation-triangle\" />\n <span class=\"is-pl-3\">\n We could not convert the data in your Upload. This can be due to setting 2 different formats in the same\n field.\n </span>\n <span class=\"px-1\">Please refer to the</span>\n <a [href]=\"schemaUrl()\" target=\"_blank\">schema</a>\n <span class=\"pl-1\">and then correct the column headers indicated below.</span>\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n <div>\n <pre><code>{{error().key}}</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.PropertyNotFound) {\n <div class=\"notification is-danger\" role=\"alert\">\n <p>\n <he-svg-icon name=\"exclamation-triangle\" />\n <span class=\"is-pl-2\">You have column headers that do not match the HESTIA schema.</span>\n <span class=\"px-1\">Please refer to the</span>\n <a [href]=\"schemaUrl()\" target=\"_blank\">schema</a>\n <span class=\"pl-1\">and then correct the column headers indicated below.</span>\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n <div>\n <pre><code>{{error().key}}</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.PropertyInvalidFormat) {\n <div>\n <div>\n <span>\n The following value in the column\n <i>{{ error().key }}</i>\n is not in the correct format:\n </span>\n <br />\n <pre class=\"is-mt-2\"><code>{{stringify(error().value)}}</code></pre>\n </div>\n @switch (hasNumberWithCommasError()) {\n @case (true) {\n <p class=\"is-mt-2\">\n Please format your numbers to remove commas and use a decimal point to separate the whole part of the\n number from the fractional part of the number.\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>3,510.1</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>3510.1</code></pre>\n }\n @case (false) {\n <ng-container *ngTemplateOutlet=\"schemaError\" />\n <p>The error could either be a value in the column, or an error with the column header.</p>\n <p>\n If you are trying to set no data, we accept either\n <code>-</code>\n or an empty cell.\n </p>\n }\n }\n </div>\n }\n @case (ErrorKeys.PropertyRequired) {\n <div>\n <div>\n <span class=\"pr-1\">The following field is required in the</span>\n @if (error().schema) {\n <a class=\"pr-1\" [href]=\"schemaUrl()\" target=\"_blank\">{{ error().schema }}</a>\n }\n <span>schema:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().property}}</code></pre>\n </div>\n <p>\n @switch (error().property) {\n @case ('id') {\n <span>\n You must assign a unique\n <code>id</code>\n for every record in your data.\n </span>\n }\n @case ('type') {\n <span>\n Every record in your data must contain a\n <code>type</code>\n .\n </span>\n }\n }\n </p>\n </div>\n }\n @case (ErrorKeys.PropertyInternal) {\n <div>\n <div>\n <span class=\"pr-1\">\n The following field is\n <code>internal</code>\n in the\n </span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schema }} schema</a>\n <span>:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().schemaKey || error().key}}</code></pre>\n </div>\n <p>\n You cannot upload\n <code>internal</code>\n fields to HESTIA.\n </p>\n </div>\n }\n @case (SchemaErrorKeys.SchemaNotFound) {\n <div>\n @if (error().key) {\n <div>\n <span>The following Node does not exist in the schema:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().key}}</code></pre>\n </div>\n } @else if (error().schema) {\n <div>\n <span>The following Node Type does not exist in the schema or can not be uploaded directly:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().schema}}</code></pre>\n </div>\n }\n <p>\n <span>The list of accepted values is:</span>\n </p>\n <div class=\"content\">\n <ul>\n @for (type of nodeTypes; track type) {\n <li>\n <i>{{ type }}</i>\n </li>\n }\n </ul>\n </div>\n </div>\n }\n @case (ErrorKeys.InvalidFirstColumn) {\n <div>\n <span>\n No data in the HESTIA format was detected on the first sheet. Either try selecting a different sheet in the\n upload screen, or check the sheet to ensure the headers follow the schema - see examples\n </span>\n <a class=\"pl-1\" href=\"/guide/guide-file-upload-examples\" target=\"_blank\">here</a>\n </div>\n }\n @case (ErrorKeys.InvalidExcelFile) {\n <div>\n This file has been uploaded with a\n <code>{{ fileExt() }}</code>\n extension, but does not appear to be a valid Excel file.\n </div>\n }\n @case (ErrorKeys.NoHeaders) {\n <div>\n <p>\n No headers matching the HESTIA schema were found on the first row. Please remove all empty rows at the\n begining of the file and try uploading again.\n </p>\n <ng-container *ngTemplateOutlet=\"defaultError\" />\n </div>\n }\n @case (ErrorKeys.InvalidSheetName) {\n <div>\n <div>\n <span class=\"pr-1\">The Excel sheet</span>\n <code>{{ error().value }}</code>\n <span class=\"pl-1\">does not exist.</span>\n <span class=\"pl-1\">Your Excel file contains the following sheets:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (e of error().error.split(';'); track e) {\n <li>\n <code>{{ e }}</code>\n </li>\n }\n </ul>\n </div>\n <p>\n <span>Please re-upload selecting one of the sheets above.</span>\n </p>\n </div>\n }\n @case (ErrorKeys.DuplicatedHeaders) {\n <div>\n <span>Your upload contains duplicated column headers.</span>\n </div>\n }\n @case (ErrorKeys.DuplicatedIds) {\n <div>\n <div>\n <span class=\"is-pr-1\">You have multiple</span>\n <code>{{ error().schema | pluralize }}</code>\n <span class=\"is-px-1\">with the same</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-px-1\">but different data. The</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-pl-1\">is:</span>\n <br />\n <pre class=\"is-mt-2\"><code>{{error().value}}</code></pre>\n </div>\n <p class=\"is-mt-2 is-italic\">\n <span class=\"is-pr-1\">Please note that ussing different case does not make the</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">{{ error().schemaKey }}</a>\n <span class=\"is-pl-1\">unique.</span>\n </p>\n </div>\n }\n @case (SchemaErrorKeys.DuplicatedIdFields) {\n <div>\n <span class=\"is-pr-1\">You have used both the</span>\n <code>@id</code>\n <span class=\"is-px-1\">and</span>\n <code>id</code>\n <span class=\"is-px-1\">fields in the same data. Please use</span>\n <code>@id</code>\n <span class=\"is-px-1\">when linking to existing nodes on the Platform, and</span>\n <code>id</code>\n <span class=\"is-px-1\">when linking to nodes you are uploading in this file using the same</span>\n <code>id</code>\n <span class=\"is-px-1\">field.</span>\n </div>\n }\n @case (ErrorKeys.NestedHeaders) {\n <div>\n <p>\n To link nodes together, you first need to define the node (e.g.,\n <code>source.id</code>\n ,\n <code>source.bibliography.title</code>\n ) and then create the link (e.g.,\n <code>cycle.defaultSource.id</code>\n ). We do not allow nesting (e.g.,\n <code>cycle.defaultSource.bibliography.title</code>\n ).\n </p>\n </div>\n }\n @case (ErrorKeys.NestedNodes) {\n <div>\n <p>To link nodes together, you need to upload each node separately, as we do not allow nesting:</p>\n <pre class=\"is-mt-2\"><code>{{ sampleLinkedNodes | json }}</code></pre>\n </div>\n }\n @case (ErrorKeys.ReferenceExistingHeaders) {\n <div>\n <p>\n You have used the internal\n <code>@id</code>\n field to upload a new Node.\n </p>\n <p>\n The\n <code>@id</code>\n field should only be used to reference existing Node or Terms. Example:\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.@id,cycle.inputs.0.term.@id,source.id</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.id,cycle.inputs.0.term.@id,source.id</code></pre>\n </div>\n }\n @case (ErrorKeys.InvalidBlankNodeHeaders) {\n <div>\n <p>Evry blank node must be followed by a number, e.g.:</p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.term.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.name</code></pre>\n </div>\n }\n @case (ErrorKeys.MultipleNodeTypeCase) {\n <div>\n <p>You are using a combination of mixed cases in your headers:</p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>impactAssessment.id,impactAssessment.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>impactAssessment.id,impactassessment.name</code></pre>\n\n <p>\n Please make sure to always use either\n <code>impactAssessment</code>\n or\n <code>impactassessment</code>\n , but not both.\n </p>\n </div>\n }\n @case (ErrorKeys.MultipleTermHeaders) {\n <div>\n <p>\n You are using both\n <code>@id</code>\n (or\n <code>id</code>\n ) and\n <code>name</code>\n fields to upload an existing Node (e.g., a Term).\n </p>\n <p>\n Using both fields can lead to inconsistencies, if you are not uploading the correct value in either one.\n Instead, you should only use one of them:\n </p>\n <p class=\"is-mt-2 has-text-danger has-text-underline\">Incorrect:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.@id,cycle.inputs.0.term.name</code></pre>\n <p class=\"is-mt-2 has-text-success has-text-underline\">Correct:</p>\n <pre class=\"is-mt-2\"><code>cycle.inputs.0.term.@id</code></pre>\n </div>\n }\n @case (SchemaErrorKeys.ObjectArrayInvalid) {\n <div>\n <p>The column header {{ error().key }} must use the array format. Examples:</p>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.0.term.name' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.0.value' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.1.term.name' }}</code></pre>\n <pre class=\"is-mt-2\"><code>{{ error().key + '.1.value' }}</code></pre>\n <ng-container *ngTemplateOutlet=\"schemaError\" />\n </div>\n }\n @case (ErrorKeys.MaxSize) {\n <div>\n <span>The maximum file size limit is {{ maxFileSizeMb }}Mb (current file size: {{ error().value }}Mb).</span>\n <span class=\"pl-1\">Please re-upload these data in multiple files.</span>\n </div>\n }\n @case (ErrorKeys.MaxRows) {\n <div>\n <span>\n Your file has {{ error().value | number }} rows. This might be an error caused by adding some data at the\n bottom of a spreadsheet by accident: delete any unused rows and resubmit the file.\n </span>\n </div>\n }\n @case (ErrorKeys.Mendeley) {\n <div>\n <p>An error occured while fetching the bibliographic information. Please try re-uploading the file.</p>\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n @case (ErrorKeys.Timeout) {\n <div>\n <p>Time exceeded for current step.</p>\n\n @if (debug()) {\n <span>You can try to \"Re-index\" or \"Re-upload\" if it still does not work.</span>\n }\n\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n @default {\n <div>\n <p>{{ message() }}</p>\n\n @if (debug()) {\n <pre><code>{{ error() | json }}</code></pre>\n }\n\n <ng-container *ngTemplateOutlet=\"reportError\" />\n </div>\n }\n }\n\n @if (hasGeoJSONError()) {\n <div>\n <p>If the GeoJSON is too large, please try to simplify it following these steps:</p>\n <ul class=\"is-my-1 content is-list-style-decimal pl-5\">\n <li>\n <span class=\"is-pr-1\">Go to</span>\n <a href=\"https://mapshaper.org/\" target=\"_blank\">https://mapshaper.org/</a>\n </li>\n <li>\n <span>\n Save the boundary in a valid\n <code>.geojson</code>\n file.\n </span>\n </li>\n <li>\n <span>Import it on mapshaper.</span>\n </li>\n <li>\n <span>Click \"Simplify\" in the top right corner in the menu bar.</span>\n </li>\n <li>\n <span>Adjust the percentage to a lower value, like 50% to start with.</span>\n </li>\n <li>\n <span>\n Export to\n <code>GeoJson</code>\n or\n <code>CSV</code>\n .\n </span>\n </li>\n <li>\n <span>Copy the resulting content into your upload file.</span>\n </li>\n </ul>\n <p>If you encounter the error again, try again using a lower percentage at step 5.</p>\n </div>\n }\n\n @if (columns().length || (error().index && !isSchemaError())) {\n <div>\n <b>Hint:</b>\n <span class=\"pl-1\">the error might be located</span>\n @if (error().index && !isSchemaError()) {\n <span class=\"pl-1\">on row {{ error().index }}</span>\n }\n @if (columns().length) {\n <span class=\"pl-1\">in {{ 'column' | pluralize: columns().length }}:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (column of columns(); track column) {\n <li>\n <b class=\"pr-2\">{{ column.column }}</b>\n <code>{{ column.name }}</code>\n </li>\n }\n </ul>\n }\n </div>\n }\n\n @if (error().suggestions?.length) {\n <div>\n <b>Suggestions:</b>\n <span class=\"pl-1\">did you mean instead:</span>\n <ul class=\"mt-1 content is-list-style-disc pl-5\">\n @for (suggestion of error().suggestions; track suggestion) {\n <li>\n <code>{{ suggestion }}</code>\n </li>\n }\n </ul>\n </div>\n }\n\n @if (showCsvPreview()) {\n <div>\n <b>\n Preview\n <sup>1</sup>\n :\n </b>\n <div class=\"table-container is-mt-2\">\n <table class=\"table is-bordered is-fullwidth is-hoverable is-narrow mb-0\">\n <thead>\n @if (error().index) {\n <th></th>\n }\n @for (header of headers(); track header) {\n <th>{{ header }}</th>\n }\n </thead>\n <tbody>\n @for (row of rows(); track row) {\n <tr>\n @if (error().index) {\n <td class=\"has-text-danger\">\n <span class=\"is-nowrap\">Row {{ error().index }}</span>\n </td>\n }\n @for (col of row; track col; let colIndex = $index) {\n <td>\n <span\n [class.has-text-danger]=\"\n message() === ErrorKeys.DuplicatedIds && hasDuplicatedError(col, colIndex)\n \">\n {{ col | ellipsis: 50 }}\n </span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n <p class=\"is-size-7\">\n <i>1. The preview does not necessarily reflect the original Upload's order or content.</i>\n </p>\n </div>\n }\n\n @if (showJsonPreview()) {\n <div>\n <b>Preview:</b>\n <pre class=\"is-mt-2\"><code>{{stringify(error().node)}}</code></pre>\n </div>\n }\n </div>\n}\n\n<ng-template #defaultError>\n <p class=\"is-mt-2 has-text-black\">\n <span class=\"is-pr-1\">If you are still stuck, please see</span>\n <a [href]=\"baseUrl + '/guide/guide-file-upload-prepare-file'\" target=\"_blank\">the example uploads and videos</a>\n <span class=\"is-px-1\">\n or try using the Wizard to get the first few rows of data formatted correctly, or use the chat to ask for help.\n </span>\n </p>\n</ng-template>\n\n<ng-template #reportError>\n <p class=\"is-mt-2\">\n To report this error, please\n <a class=\"is-pl-1\" [href]=\"reportErrorUrl()\" target=\"_blank\">click here</a>\n .\n </p>\n</ng-template>\n\n<ng-template #schemaError>\n <p>\n <span class=\"pr-1\">You can see the accepted field type and some examples</span>\n <a [href]=\"schemaKeyUrl()\" target=\"_blank\">here</a>\n <span>.</span>\n </p>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
|
|
12380
12388
|
}], ctorParameters: () => [], propDecorators: { error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: true }] }], file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: false }] }], debug: [{ type: i0.Input, args: [{ isSignal: true, alias: "debug", required: false }] }] } });
|
|
12381
12389
|
|
|
12382
12390
|
const nodeTerm = (node, key) => {
|