@tilde-nlp/ngx-menu 6.1.8 → 6.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/menu-columns/menu-columns.component.mjs +1 -1
- package/esm2022/lib/components/menu-item-list/menu-item-list.component.mjs +1 -1
- package/esm2022/lib/components/side-nav-menu/models/index.mjs +2 -1
- package/esm2022/lib/components/side-nav-menu/models/side-nav-settings.model.mjs +1 -1
- package/esm2022/lib/components/side-nav-menu/models/user-menu-option-button.model.mjs +2 -0
- package/esm2022/lib/components/side-nav-menu/models/user-menu-option-icon.model.mjs +2 -0
- package/esm2022/lib/components/side-nav-menu/models/user-menu-option-link.model.mjs +2 -0
- package/esm2022/lib/components/side-nav-menu/models/user-menu-option.model.mjs +2 -0
- package/esm2022/lib/components/side-nav-menu/side-nav-menu.component.mjs +24 -26
- package/esm2022/lib/constants/index.mjs +2 -0
- package/esm2022/lib/constants/user-menu-options.const.mjs +36 -0
- package/esm2022/lib/models/active-menu-items.model.mjs +1 -1
- package/esm2022/lib/models/custom-menu-item.model.mjs +2 -0
- package/esm2022/lib/models/index.mjs +2 -2
- package/esm2022/lib/models/menu-item-group.model.mjs +1 -1
- package/esm2022/lib/services/menu-items.service.mjs +1 -1
- package/esm2022/lib/services/strapi.service.mjs +1 -1
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/tilde-nlp-ngx-menu.mjs +60 -26
- package/fesm2022/tilde-nlp-ngx-menu.mjs.map +1 -1
- package/lib/components/menu-columns/menu-columns.component.d.ts +1 -1
- package/lib/components/menu-item-list/menu-item-list.component.d.ts +1 -1
- package/lib/components/side-nav-menu/models/index.d.ts +1 -0
- package/lib/components/side-nav-menu/models/side-nav-settings.model.d.ts +2 -2
- package/lib/components/side-nav-menu/models/user-menu-option-button.model.d.ts +3 -0
- package/lib/components/side-nav-menu/models/user-menu-option-icon.model.d.ts +5 -0
- package/lib/components/side-nav-menu/models/user-menu-option-link.model.d.ts +4 -0
- package/lib/components/side-nav-menu/models/user-menu-option.model.d.ts +9 -0
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/user-menu-options.const.d.ts +12 -0
- package/lib/models/active-menu-items.model.d.ts +1 -1
- package/lib/models/index.d.ts +1 -1
- package/lib/models/menu-item-group.model.d.ts +1 -1
- package/lib/services/menu-items.service.d.ts +1 -1
- package/lib/services/strapi.service.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/esm2022/lib/components/side-nav-menu/models/user-options.model.mjs +0 -2
- package/esm2022/lib/models/custom-menu-item.mjs +0 -2
- package/lib/components/side-nav-menu/models/user-options.model.d.ts +0 -10
- /package/lib/models/{custom-menu-item.d.ts → custom-menu-item.model.d.ts} +0 -0
package/esm2022/public-api.mjs
CHANGED
|
@@ -10,4 +10,5 @@ export * from './lib/components/menu-columns/menu-columns.component';
|
|
|
10
10
|
export * from './lib/components/nav-base/nav-base.component';
|
|
11
11
|
export * from './lib/components/nav-base/models';
|
|
12
12
|
export * from "./lib/services";
|
|
13
|
-
|
|
13
|
+
export * from "./lib/constants";
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1tZW51L3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBR0gsY0FBYyxnQ0FBZ0MsQ0FBQztBQUMvQyxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyx3REFBd0QsQ0FBQztBQUN2RSxjQUFjLHNEQUFzRCxDQUFDO0FBQ3JFLGNBQWMsOENBQThDLENBQUM7QUFDN0QsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxjQUFjLGdCQUFnQixDQUFDO0FBQy9CLGNBQWMsaUJBQWlCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbmd4LW1lbnVcclxuICovXHJcblxyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9zaWRlLW5hdi1tZW51JztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvaW5qZWN0aW9uLXRva2Vucyc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL21vZGVscyc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL21lbnUubW9kdWxlJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9zaWRlLW5hdi1tZW51L3NpZGUtbmF2LW1lbnUuY29tcG9uZW50JztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9tZW51LWNvbHVtbnMvbWVudS1jb2x1bW5zLmNvbXBvbmVudCc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvbmF2LWJhc2UvbmF2LWJhc2UuY29tcG9uZW50JztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9uYXYtYmFzZS9tb2RlbHMnO1xyXG5leHBvcnQgKiBmcm9tIFwiLi9saWIvc2VydmljZXNcIjtcclxuZXhwb3J0ICogZnJvbSBcIi4vbGliL2NvbnN0YW50c1wiO1xyXG4iXX0=
|
|
@@ -672,7 +672,7 @@ class MenuColumnsComponent {
|
|
|
672
672
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MenuColumnsComponent, { className: "MenuColumnsComponent", filePath: "lib\\components\\menu-columns\\menu-columns.component.ts", lineNumber: 16 }); })();
|
|
673
673
|
|
|
674
674
|
const _forTrack0 = ($index, $item) => $item.label;
|
|
675
|
-
const _c0 = (a0, a1
|
|
675
|
+
const _c0 = (a0, a1) => ({ icon: a0, label: a1 });
|
|
676
676
|
function SideNavMenuComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
677
677
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
678
678
|
i0.ɵɵelementStart(0, "div", 14)(1, "a", 15);
|
|
@@ -793,9 +793,9 @@ function SideNavMenuComponent_For_15_Conditional_0_Conditional_0_Template(rf, ct
|
|
|
793
793
|
const item_r8 = i0.ɵɵnextContext(2).$implicit;
|
|
794
794
|
i0.ɵɵnextContext();
|
|
795
795
|
const profileMenuItem_r9 = i0.ɵɵreference(17);
|
|
796
|
-
i0.ɵɵproperty("href", item_r8.href, i0.ɵɵsanitizeUrl);
|
|
796
|
+
i0.ɵɵproperty("href", item_r8.link.href, i0.ɵɵsanitizeUrl);
|
|
797
797
|
i0.ɵɵadvance();
|
|
798
|
-
i0.ɵɵproperty("ngTemplateOutlet", profileMenuItem_r9)("ngTemplateOutletContext", i0.ɵɵ
|
|
798
|
+
i0.ɵɵproperty("ngTemplateOutlet", profileMenuItem_r9)("ngTemplateOutletContext", i0.ɵɵpureFunction2(3, _c0, item_r8.icon, item_r8.label));
|
|
799
799
|
} }
|
|
800
800
|
function SideNavMenuComponent_For_15_Conditional_0_Conditional_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
801
801
|
i0.ɵɵelementContainer(0);
|
|
@@ -808,15 +808,15 @@ function SideNavMenuComponent_For_15_Conditional_0_Conditional_1_Template(rf, ct
|
|
|
808
808
|
const item_r8 = i0.ɵɵnextContext(2).$implicit;
|
|
809
809
|
i0.ɵɵnextContext();
|
|
810
810
|
const profileMenuItem_r9 = i0.ɵɵreference(17);
|
|
811
|
-
i0.ɵɵproperty("routerLink", item_r8.href);
|
|
811
|
+
i0.ɵɵproperty("routerLink", item_r8.link.href);
|
|
812
812
|
i0.ɵɵadvance();
|
|
813
|
-
i0.ɵɵproperty("ngTemplateOutlet", profileMenuItem_r9)("ngTemplateOutletContext", i0.ɵɵ
|
|
813
|
+
i0.ɵɵproperty("ngTemplateOutlet", profileMenuItem_r9)("ngTemplateOutletContext", i0.ɵɵpureFunction2(3, _c0, item_r8.icon, item_r8.label));
|
|
814
814
|
} }
|
|
815
815
|
function SideNavMenuComponent_For_15_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
816
|
-
i0.ɵɵtemplate(0, SideNavMenuComponent_For_15_Conditional_0_Conditional_0_Template, 2,
|
|
816
|
+
i0.ɵɵtemplate(0, SideNavMenuComponent_For_15_Conditional_0_Conditional_0_Template, 2, 6, "a", 25)(1, SideNavMenuComponent_For_15_Conditional_0_Conditional_1_Template, 2, 6, "a", 26);
|
|
817
817
|
} if (rf & 2) {
|
|
818
818
|
const item_r8 = i0.ɵɵnextContext().$implicit;
|
|
819
|
-
i0.ɵɵconditional(item_r8.
|
|
819
|
+
i0.ɵɵconditional(item_r8.link.isExternal ? 0 : 1);
|
|
820
820
|
} }
|
|
821
821
|
function SideNavMenuComponent_For_15_Conditional_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
822
822
|
i0.ɵɵelementContainer(0);
|
|
@@ -824,7 +824,7 @@ function SideNavMenuComponent_For_15_Conditional_1_ng_container_1_Template(rf, c
|
|
|
824
824
|
function SideNavMenuComponent_For_15_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
825
825
|
const _r10 = i0.ɵɵgetCurrentView();
|
|
826
826
|
i0.ɵɵelementStart(0, "button", 28);
|
|
827
|
-
i0.ɵɵlistener("click", function SideNavMenuComponent_For_15_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const item_r8 = i0.ɵɵnextContext().$implicit; return i0.ɵɵresetView(item_r8 == null ? null : item_r8.callback()); });
|
|
827
|
+
i0.ɵɵlistener("click", function SideNavMenuComponent_For_15_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const item_r8 = i0.ɵɵnextContext().$implicit; return i0.ɵɵresetView(item_r8.button == null ? null : item_r8.button.callback()); });
|
|
828
828
|
i0.ɵɵtemplate(1, SideNavMenuComponent_For_15_Conditional_1_ng_container_1_Template, 1, 0, "ng-container", 27);
|
|
829
829
|
i0.ɵɵelementEnd();
|
|
830
830
|
} if (rf & 2) {
|
|
@@ -832,48 +832,46 @@ function SideNavMenuComponent_For_15_Conditional_1_Template(rf, ctx) { if (rf &
|
|
|
832
832
|
i0.ɵɵnextContext();
|
|
833
833
|
const profileMenuItem_r9 = i0.ɵɵreference(17);
|
|
834
834
|
i0.ɵɵadvance();
|
|
835
|
-
i0.ɵɵproperty("ngTemplateOutlet", profileMenuItem_r9)("ngTemplateOutletContext", i0.ɵɵ
|
|
835
|
+
i0.ɵɵproperty("ngTemplateOutlet", profileMenuItem_r9)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c0, item_r8.icon, item_r8.label));
|
|
836
836
|
} }
|
|
837
837
|
function SideNavMenuComponent_For_15_Template(rf, ctx) { if (rf & 1) {
|
|
838
|
-
i0.ɵɵtemplate(0, SideNavMenuComponent_For_15_Conditional_0_Template, 2, 1)(1, SideNavMenuComponent_For_15_Conditional_1_Template, 2,
|
|
838
|
+
i0.ɵɵtemplate(0, SideNavMenuComponent_For_15_Conditional_0_Template, 2, 1)(1, SideNavMenuComponent_For_15_Conditional_1_Template, 2, 5, "button", 24);
|
|
839
839
|
} if (rf & 2) {
|
|
840
840
|
const item_r8 = ctx.$implicit;
|
|
841
|
-
i0.ɵɵconditional(item_r8.
|
|
841
|
+
i0.ɵɵconditional(item_r8.link ? 0 : 1);
|
|
842
842
|
} }
|
|
843
843
|
function SideNavMenuComponent_ng_template_16_Conditional_0_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
844
844
|
i0.ɵɵelementStart(0, "span", 31);
|
|
845
845
|
i0.ɵɵtext(1);
|
|
846
846
|
i0.ɵɵelementEnd();
|
|
847
847
|
} if (rf & 2) {
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
const isIconOutlined_r13 = ctx_r10.isIconOutlined;
|
|
851
|
-
i0.ɵɵclassProp("material-icons-outlined", isIconOutlined_r13);
|
|
848
|
+
const icon_r11 = i0.ɵɵnextContext(2).icon;
|
|
849
|
+
i0.ɵɵclassProp("material-icons-outlined", icon_r11 == null ? null : icon_r11.isOutlined);
|
|
852
850
|
i0.ɵɵadvance();
|
|
853
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
851
|
+
i0.ɵɵtextInterpolate1(" ", icon_r11 == null ? null : icon_r11.name, " ");
|
|
854
852
|
} }
|
|
855
853
|
function SideNavMenuComponent_ng_template_16_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
856
854
|
i0.ɵɵelement(0, "mat-icon", 30);
|
|
857
855
|
} if (rf & 2) {
|
|
858
|
-
const
|
|
859
|
-
i0.ɵɵproperty("svgIcon",
|
|
856
|
+
const icon_r11 = i0.ɵɵnextContext(2).icon;
|
|
857
|
+
i0.ɵɵproperty("svgIcon", icon_r11 == null ? null : icon_r11.name);
|
|
860
858
|
} }
|
|
861
859
|
function SideNavMenuComponent_ng_template_16_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
862
860
|
i0.ɵɵtemplate(0, SideNavMenuComponent_ng_template_16_Conditional_0_Conditional_0_Template, 2, 3, "span", 29)(1, SideNavMenuComponent_ng_template_16_Conditional_0_Conditional_1_Template, 1, 1, "mat-icon", 30);
|
|
863
861
|
} if (rf & 2) {
|
|
864
|
-
const
|
|
865
|
-
i0.ɵɵconditional(!
|
|
862
|
+
const icon_r11 = i0.ɵɵnextContext().icon;
|
|
863
|
+
i0.ɵɵconditional(!(icon_r11 == null ? null : icon_r11.isCustom) ? 0 : 1);
|
|
866
864
|
} }
|
|
867
865
|
function SideNavMenuComponent_ng_template_16_Template(rf, ctx) { if (rf & 1) {
|
|
868
866
|
i0.ɵɵtemplate(0, SideNavMenuComponent_ng_template_16_Conditional_0_Template, 2, 1);
|
|
869
867
|
i0.ɵɵtext(1);
|
|
870
868
|
i0.ɵɵpipe(2, "translate");
|
|
871
869
|
} if (rf & 2) {
|
|
872
|
-
const
|
|
873
|
-
const
|
|
874
|
-
i0.ɵɵconditional(
|
|
870
|
+
const icon_r11 = ctx.icon;
|
|
871
|
+
const label_r12 = ctx.label;
|
|
872
|
+
i0.ɵɵconditional(icon_r11 ? 0 : -1);
|
|
875
873
|
i0.ɵɵadvance();
|
|
876
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2,
|
|
874
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, label_r12), "\n");
|
|
877
875
|
} }
|
|
878
876
|
class SideNavMenuComponent extends NavBaseComponent {
|
|
879
877
|
#username;
|
|
@@ -1006,7 +1004,7 @@ class SideNavMenuComponent extends NavBaseComponent {
|
|
|
1006
1004
|
}
|
|
1007
1005
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SideNavMenuComponent, [{
|
|
1008
1006
|
type: Component,
|
|
1009
|
-
args: [{ selector: 'lib-side-nav-menu', template: "<div *ngIf=\"isMobile\" [fxHide]=\"!collapsed\" class=\"mobile-header\">\r\n <a [libPlausibleEvent]=\"LOGOCLICK_PLAUSIBLE_EVENT\" fxFlex=\"3.125em\" [href]=\"baseUrl\"\r\n [attr.aria-label]=\"'MENU.ARIA_LABELS.LOGO' | translate\" (click)=\"logoClick($event)\" fxLayoutAlign=\"start center\"\r\n >\r\n <img height=\"40\" width=\"40\" class=\"menu-logo\" [src]=\"menuLogoImage\" alt=\"logo\" />\r\n <span class=\"menu-product-name\">\r\n {{ productName }}\r\n </span>\r\n </a>\r\n \r\n <button\r\n mat-icon-button\r\n class=\"toggler\"\r\n [attr.aria-label]=\"'ARIA_LABELS.MENU_TOGGLER' | translate\"\r\n [libPlausibleEvent]=\"collapsed ? EXPAND_PLAUSIBLE_EVENT : COLLAPSE_PLAUSIBLE_EVENT\"\r\n (click)=\"toggleCollapse()\"\r\n >\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n</div>\r\n\r\n<div [ngClass.lt-sm]=\"'mobile'\" class=\"menu-container\" [style.width]=\"sideNavWidth\" fxLayout=\"column\" [class.collapsed]=\"collapsed\">\r\n <div class=\"content\" fxLayout=\"column\" fxFlexFill>\r\n <div class=\"menu-container-header\" fxLayout=\"row\" [fxLayoutAlign]=\"collapsed ? 'center center' : 'space-between center'\">\r\n <a *ngIf=\"!collapsed\" [libPlausibleEvent]=\"LOGOCLICK_PLAUSIBLE_EVENT\" fxFlex=\"3.125em\" [href]=\"baseUrl\"\r\n [attr.aria-label]=\"'MENU.ARIA_LABELS.LOGO' | translate\" (click)=\"logoClick($event)\" fxLayoutAlign=\"start center\"\r\n >\r\n <img height=\"40\" width=\"40\" class=\"menu-logo\" [src]=\"menuLogoImage\" alt=\"logo\" />\r\n <span class=\"menu-product-name\">\r\n {{ productName }}\r\n </span>\r\n </a>\r\n \r\n <button\r\n mat-icon-button\r\n class=\"toggler\"\r\n [attr.aria-label]=\"'ARIA_LABELS.MENU_TOGGLER' | translate\"\r\n [libPlausibleEvent]=\"collapsed ? EXPAND_PLAUSIBLE_EVENT : COLLAPSE_PLAUSIBLE_EVENT\"\r\n (click)=\"toggleCollapse()\"\r\n >\r\n @if (isMobile) {\r\n <mat-icon>close</mat-icon>\r\n } @else {\r\n <mat-icon>{{ collapsed ? 'keyboard_double_arrow_right' : 'keyboard_double_arrow_left' }}</mat-icon>\r\n }\r\n </button>\r\n </div>\r\n \r\n <div class=\"menu-wrapper\" fxLayout=\"column\" fxFlex>\r\n <menu-columns (toggleCollapseEvent)=\"toggleCollapse()\" [direction]=\"direction\" role=\"navigation\" fxFlex [isOpen]=\"!collapsed\"\r\n [active]=\"active\"></menu-columns>\r\n </div>\r\n\r\n\r\n <button *ngIf=\"userInitials\" #state=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu\" class=\"profile-wrapper\">\r\n <div class=\"profile-icon\">\r\n {{userInitials}}\r\n </div>\r\n\r\n <ng-container *ngIf=\"!collapsed\">\r\n <span class=\"profile-name\">\r\n {{ username }}\r\n </span>\r\n \r\n <mat-icon *ngIf=\"state.menuOpen; else iconDown\" class=\"spin\">{{\"keyboard_arrow_down\"}}</mat-icon>\r\n\r\n <ng-template #iconDown>\r\n <mat-icon class=\"spin\">{{\"keyboard_arrow_up\" }}</mat-icon>\r\n </ng-template>\r\n </ng-container>\r\n </button>\r\n\r\n <mat-menu #menu=\"matMenu\" class=\"profile-menu\">\r\n @for (item of menuSettings.userOptions; track item.label) {\r\n @if (item.
|
|
1007
|
+
args: [{ selector: 'lib-side-nav-menu', template: "<div *ngIf=\"isMobile\" [fxHide]=\"!collapsed\" class=\"mobile-header\">\r\n <a [libPlausibleEvent]=\"LOGOCLICK_PLAUSIBLE_EVENT\" fxFlex=\"3.125em\" [href]=\"baseUrl\"\r\n [attr.aria-label]=\"'MENU.ARIA_LABELS.LOGO' | translate\" (click)=\"logoClick($event)\" fxLayoutAlign=\"start center\"\r\n >\r\n <img height=\"40\" width=\"40\" class=\"menu-logo\" [src]=\"menuLogoImage\" alt=\"logo\" />\r\n <span class=\"menu-product-name\">\r\n {{ productName }}\r\n </span>\r\n </a>\r\n \r\n <button\r\n mat-icon-button\r\n class=\"toggler\"\r\n [attr.aria-label]=\"'ARIA_LABELS.MENU_TOGGLER' | translate\"\r\n [libPlausibleEvent]=\"collapsed ? EXPAND_PLAUSIBLE_EVENT : COLLAPSE_PLAUSIBLE_EVENT\"\r\n (click)=\"toggleCollapse()\"\r\n >\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n</div>\r\n\r\n<div [ngClass.lt-sm]=\"'mobile'\" class=\"menu-container\" [style.width]=\"sideNavWidth\" fxLayout=\"column\" [class.collapsed]=\"collapsed\">\r\n <div class=\"content\" fxLayout=\"column\" fxFlexFill>\r\n <div class=\"menu-container-header\" fxLayout=\"row\" [fxLayoutAlign]=\"collapsed ? 'center center' : 'space-between center'\">\r\n <a *ngIf=\"!collapsed\" [libPlausibleEvent]=\"LOGOCLICK_PLAUSIBLE_EVENT\" fxFlex=\"3.125em\" [href]=\"baseUrl\"\r\n [attr.aria-label]=\"'MENU.ARIA_LABELS.LOGO' | translate\" (click)=\"logoClick($event)\" fxLayoutAlign=\"start center\"\r\n >\r\n <img height=\"40\" width=\"40\" class=\"menu-logo\" [src]=\"menuLogoImage\" alt=\"logo\" />\r\n <span class=\"menu-product-name\">\r\n {{ productName }}\r\n </span>\r\n </a>\r\n \r\n <button\r\n mat-icon-button\r\n class=\"toggler\"\r\n [attr.aria-label]=\"'ARIA_LABELS.MENU_TOGGLER' | translate\"\r\n [libPlausibleEvent]=\"collapsed ? EXPAND_PLAUSIBLE_EVENT : COLLAPSE_PLAUSIBLE_EVENT\"\r\n (click)=\"toggleCollapse()\"\r\n >\r\n @if (isMobile) {\r\n <mat-icon>close</mat-icon>\r\n } @else {\r\n <mat-icon>{{ collapsed ? 'keyboard_double_arrow_right' : 'keyboard_double_arrow_left' }}</mat-icon>\r\n }\r\n </button>\r\n </div>\r\n \r\n <div class=\"menu-wrapper\" fxLayout=\"column\" fxFlex>\r\n <menu-columns (toggleCollapseEvent)=\"toggleCollapse()\" [direction]=\"direction\" role=\"navigation\" fxFlex [isOpen]=\"!collapsed\"\r\n [active]=\"active\"></menu-columns>\r\n </div>\r\n\r\n\r\n <button *ngIf=\"userInitials\" #state=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu\" class=\"profile-wrapper\">\r\n <div class=\"profile-icon\">\r\n {{userInitials}}\r\n </div>\r\n\r\n <ng-container *ngIf=\"!collapsed\">\r\n <span class=\"profile-name\">\r\n {{ username }}\r\n </span>\r\n \r\n <mat-icon *ngIf=\"state.menuOpen; else iconDown\" class=\"spin\">{{\"keyboard_arrow_down\"}}</mat-icon>\r\n\r\n <ng-template #iconDown>\r\n <mat-icon class=\"spin\">{{\"keyboard_arrow_up\" }}</mat-icon>\r\n </ng-template>\r\n </ng-container>\r\n </button>\r\n\r\n <mat-menu #menu=\"matMenu\" class=\"profile-menu\">\r\n @for (item of menuSettings.userOptions; track item.label) {\r\n @if (item.link) {\r\n @if (item.link.isExternal) {\r\n <a class=\"mat-mdc-menu-item\" [href]=\"item.link.href\" target=\"_blank\">\r\n <ng-container\r\n *ngTemplateOutlet=\"profileMenuItem; context: { icon: item.icon, label: item.label }\">\r\n </ng-container>\r\n </a>\r\n } @else {\r\n <a class=\"mat-mdc-menu-item\" [routerLink]=\"item.link.href\">\r\n <ng-container\r\n *ngTemplateOutlet=\"profileMenuItem; context: { icon: item.icon, label: item.label }\">\r\n </ng-container>\r\n </a>\r\n }\r\n } @else {\r\n <button\r\n mat-menu-item\r\n class=\"profile-option\"\r\n (click)=\"item.button?.callback()\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"profileMenuItem; context: { icon: item.icon, label: item.label }\">\r\n </ng-container>\r\n </button>\r\n }\r\n }\r\n </mat-menu>\r\n </div>\r\n\r\n<ng-template #profileMenuItem let-icon=\"icon\" let-label=\"label\">\r\n @if (icon) {\r\n @if (!icon?.isCustom) {\r\n <span class=\"material-icons profile-option-icon\" [class.material-icons-outlined]=\"icon?.isOutlined\">\r\n {{icon?.name}}\r\n </span>\r\n } @else {\r\n <mat-icon class=\"profile-option-icon\" [svgIcon]=\"icon?.name\"></mat-icon>\r\n }\r\n }\r\n {{ label | translate }}\r\n</ng-template>", styles: ["a{text-decoration:none}.mobile-header{display:flex;justify-content:space-between;padding:23px 27px;background-color:#fcfcfc;border:1px solid var(--base-70)}.mobile.menu-container.collapsed{display:none!important}.mobile.menu-container:not(.collapsed){display:block!important;position:absolute;min-width:100vw;min-height:100vh;z-index:1000}.mobile .profile-wrapper{position:relative}.mobile .profile-wrapper mat-icon{position:absolute!important;right:0}.menu-product-name{white-space:nowrap;margin-left:12px;font-weight:600;color:var(--primary-accent-darker)}.menu-container{max-height:100vh;white-space:nowrap;height:100%;transition:width .2s ease;min-height:100vh;overflow:auto;background:var(--base-100);border-right:2px solid var(--base-95)}.menu-container .menu-container-header{margin:24px 0;max-height:40px}.menu-container.collapsed .menu-container-header{margin:24px 0 32px!important}.menu-container .content:not(.collapsed){overflow-x:hidden;padding:0 12px}.menu-container .content:not(.collapsed) .menu-logo{margin-left:16px;max-width:100%}.menu-container .divider{width:100%}.menu-container .profile-wrapper{background:none;color:var(--base-30);display:flex;align-items:center;justify-content:start;margin:32px 16px}.menu-container .profile-icon{display:flex;justify-content:center;align-items:center;min-width:40px;height:40px;border-radius:100%;color:var(--base-0);background-color:var(--base-70);font-size:16px;font-weight:600}.menu-container .profile-name{max-width:145px;overflow:hidden;margin-left:12px}.profile-option-icon{vertical-align:middle;margin:0 5px 5px 0}:host ::ng-deep .collapsed .profile-wrapper{left:8px!important}:host ::ng-deep .menu-item{display:flex;padding:16px!important;border-radius:4px!important}:host ::ng-deep .child-list .menu-item{padding:8px 46px!important}:host ::ng-deep .collapsed .menu-item{padding:0!important;width:40px;height:40px;border-radius:50%!important}:host ::ng-deep .active-menu-item{background-color:var(--base-95)!important}:host ::ng-deep .menu-item-title{margin-left:12px}tld-menu-icon{margin-right:10px}.spin{animation:spinArrow .3s forwards}:host::ng-deep button.collapse-btn .mat-mdc-button-persistent-ripple,:host::ng-deep button.toggler .mat-mdc-button-persistent-ripple{display:none}:host ::ng-deep .mobile .child-list .menu-item{padding:8px 54px!important}::ng-deep .cdk-overlay-container .profile-menu{margin:10px 0!important}::ng-deep .mat-mdc-menu-item .mat-icon{margin-right:5px!important}::ng-deep .collapsed .profile-wrapper{justify-content:center!important}::ng-deep .profile-menu a{font-weight:400!important;display:flex;align-items:center;gap:5px}::ng-deep .profile-menu a:hover{color:var(--mat-menu-item-label-text-color, var(--mat-app-on-surface))!important;text-decoration:inherit}@keyframes spinArrow{to{transform:rotate(180deg)}}\n"] }]
|
|
1010
1008
|
}], () => [{ type: i1.StrapiLinkService }, { type: i2.DOMService }, { type: MenuItemsService }, { type: undefined, decorators: [{
|
|
1011
1009
|
type: Optional
|
|
1012
1010
|
}, {
|
|
@@ -1094,6 +1092,42 @@ class MenuModule {
|
|
|
1094
1092
|
PlausibleModule], exports: [SideNavMenuComponent,
|
|
1095
1093
|
MenuColumnsComponent] }); })();
|
|
1096
1094
|
|
|
1095
|
+
/**
|
|
1096
|
+
* Prefefined user menu options, so that same style of items are used across all products. Use this by passing necessary configuration.
|
|
1097
|
+
*/
|
|
1098
|
+
const USER_MENU_OPTIONS = {
|
|
1099
|
+
subscription: (href) => ({
|
|
1100
|
+
icon: { name: "credit_card" },
|
|
1101
|
+
label: 'menu.subscription',
|
|
1102
|
+
link: { href: href }
|
|
1103
|
+
}),
|
|
1104
|
+
termsOfUse: (href) => ({
|
|
1105
|
+
icon: { name: "text_snippet" },
|
|
1106
|
+
label: 'menu.termsOfUse',
|
|
1107
|
+
link: { href, isExternal: true }
|
|
1108
|
+
}),
|
|
1109
|
+
privacy: (href) => ({
|
|
1110
|
+
icon: { name: "gpp_maybe" },
|
|
1111
|
+
label: 'menu.privacy',
|
|
1112
|
+
link: { href, isExternal: true },
|
|
1113
|
+
}),
|
|
1114
|
+
help: (href) => ({
|
|
1115
|
+
label: 'menu.helpCenter',
|
|
1116
|
+
icon: { name: `help` },
|
|
1117
|
+
link: { href, isExternal: true }
|
|
1118
|
+
}),
|
|
1119
|
+
contactUs: (href) => ({
|
|
1120
|
+
label: 'menu.contactUs',
|
|
1121
|
+
icon: { name: `mail` },
|
|
1122
|
+
link: { href, isExternal: true }
|
|
1123
|
+
}),
|
|
1124
|
+
logout: (callback) => ({
|
|
1125
|
+
icon: { name: "logout" },
|
|
1126
|
+
label: 'menu.logout',
|
|
1127
|
+
button: { callback: () => callback() }
|
|
1128
|
+
})
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1097
1131
|
/*
|
|
1098
1132
|
* Public API Surface of ngx-menu
|
|
1099
1133
|
*/
|
|
@@ -1102,5 +1136,5 @@ class MenuModule {
|
|
|
1102
1136
|
* Generated bundle index. Do not edit.
|
|
1103
1137
|
*/
|
|
1104
1138
|
|
|
1105
|
-
export { MENU_ICON_STRAPI_EXTENSION, MENU_SHARED_CONFIG, MenuColumnsComponent, MenuItemsService, MenuLayoutDirection, MenuModule, NavBaseComponent, SideNavMenuComponent, StarpiMenuService, StrapiDataLocation };
|
|
1139
|
+
export { MENU_ICON_STRAPI_EXTENSION, MENU_SHARED_CONFIG, MenuColumnsComponent, MenuItemsService, MenuLayoutDirection, MenuModule, NavBaseComponent, SideNavMenuComponent, StarpiMenuService, StrapiDataLocation, USER_MENU_OPTIONS };
|
|
1106
1140
|
//# sourceMappingURL=tilde-nlp-ngx-menu.mjs.map
|