@tilde-nlp/ngx-menu 6.1.29 → 6.1.30
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 +3 -3
- package/esm2022/lib/components/menu-item-list/menu-item-list.component.mjs +66 -151
- package/esm2022/lib/components/side-nav-menu/side-nav-menu.component.mjs +2 -2
- package/esm2022/lib/constants/user-menu-options.const.mjs +13 -5
- package/esm2022/lib/menu.module.mjs +3 -6
- package/esm2022/lib/models/custom-menu-item.model.mjs +1 -1
- package/esm2022/lib/models/menu-item-group.model.mjs +1 -1
- package/fesm2022/tilde-nlp-ngx-menu.mjs +89 -231
- package/fesm2022/tilde-nlp-ngx-menu.mjs.map +1 -1
- package/lib/constants/user-menu-options.const.d.ts +2 -1
- package/lib/menu.module.d.ts +12 -13
- package/lib/models/custom-menu-item.model.d.ts +0 -7
- package/lib/models/menu-item-group.model.d.ts +0 -5
- package/package.json +1 -1
- package/esm2022/lib/components/menu-item-btn/menu-item-btn.component.mjs +0 -73
- package/lib/components/menu-item-btn/menu-item-btn.component.d.ts +0 -9
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@ngbracket/ngx-layout/flex";
|
|
4
|
-
import * as i2 from "@ngbracket/ngx-layout/extended";
|
|
5
|
-
import * as i3 from "@angular/common";
|
|
6
|
-
import * as i4 from "@angular/material/icon";
|
|
7
|
-
import * as i5 from "@angular/material/button";
|
|
8
|
-
import * as i6 from "@angular/material/menu";
|
|
9
|
-
import * as i7 from "@ngx-translate/core";
|
|
10
|
-
function MenuItemBtnComponent_ng_container_4_button_6_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
-
const _r2 = i0.ɵɵgetCurrentView();
|
|
12
|
-
i0.ɵɵelementStart(0, "button", 6);
|
|
13
|
-
i0.ɵɵlistener("click", function MenuItemBtnComponent_ng_container_4_button_6_Template_button_click_0_listener() { const item_r3 = i0.ɵɵrestoreView(_r2).$implicit; return i0.ɵɵresetView(item_r3.onOptionClick()); });
|
|
14
|
-
i0.ɵɵtext(1);
|
|
15
|
-
i0.ɵɵpipe(2, "translate");
|
|
16
|
-
i0.ɵɵelementEnd();
|
|
17
|
-
} if (rf & 2) {
|
|
18
|
-
const item_r3 = ctx.$implicit;
|
|
19
|
-
i0.ɵɵadvance();
|
|
20
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, item_r3.title), " ");
|
|
21
|
-
} }
|
|
22
|
-
function MenuItemBtnComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
24
|
-
i0.ɵɵelementContainerStart(0);
|
|
25
|
-
i0.ɵɵelementStart(1, "button", 4);
|
|
26
|
-
i0.ɵɵlistener("click", function MenuItemBtnComponent_ng_container_4_Template_button_click_1_listener($event) { i0.ɵɵrestoreView(_r1); $event.preventDefault(); return i0.ɵɵresetView($event.stopImmediatePropagation()); });
|
|
27
|
-
i0.ɵɵelementStart(2, "mat-icon");
|
|
28
|
-
i0.ɵɵtext(3, "more_vert");
|
|
29
|
-
i0.ɵɵelementEnd()();
|
|
30
|
-
i0.ɵɵelementStart(4, "mat-menu", null, 0);
|
|
31
|
-
i0.ɵɵtemplate(6, MenuItemBtnComponent_ng_container_4_button_6_Template, 3, 3, "button", 5);
|
|
32
|
-
i0.ɵɵelementEnd();
|
|
33
|
-
i0.ɵɵelementContainerEnd();
|
|
34
|
-
} if (rf & 2) {
|
|
35
|
-
const menu_r4 = i0.ɵɵreference(5);
|
|
36
|
-
const ctx_r4 = i0.ɵɵnextContext();
|
|
37
|
-
i0.ɵɵadvance();
|
|
38
|
-
i0.ɵɵproperty("matMenuTriggerFor", menu_r4);
|
|
39
|
-
i0.ɵɵadvance(5);
|
|
40
|
-
i0.ɵɵproperty("ngForOf", ctx_r4.menuItem.subMenu);
|
|
41
|
-
} }
|
|
42
|
-
export class MenuItemBtnComponent {
|
|
43
|
-
static { this.ɵfac = function MenuItemBtnComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MenuItemBtnComponent)(); }; }
|
|
44
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MenuItemBtnComponent, selectors: [["lib-menu-item-btn"]], inputs: { direction: "direction", activeItem: "activeItem", menuItem: "menuItem" }, decls: 5, vars: 7, consts: [["menu", "matMenu"], ["fxLayoutAlign", "space-between start", 1, "menu-item", "w-full", "flex", "justify-center", "items-center", 3, "click", "ngClass.lt-md"], [1, "btn-label"], [4, "ngIf"], ["mat-icon-button", "", 3, "click", "matMenuTriggerFor"], ["mat-menu-item", "", 3, "click", 4, "ngFor", "ngForOf"], ["mat-menu-item", "", 3, "click"]], template: function MenuItemBtnComponent_Template(rf, ctx) { if (rf & 1) {
|
|
45
|
-
i0.ɵɵelementStart(0, "button", 1);
|
|
46
|
-
i0.ɵɵlistener("click", function MenuItemBtnComponent_Template_button_click_0_listener() { return ctx.menuItem.clickAction && ctx.menuItem.clickAction(); });
|
|
47
|
-
i0.ɵɵelementStart(1, "span", 2);
|
|
48
|
-
i0.ɵɵtext(2);
|
|
49
|
-
i0.ɵɵpipe(3, "translate");
|
|
50
|
-
i0.ɵɵelementEnd();
|
|
51
|
-
i0.ɵɵtemplate(4, MenuItemBtnComponent_ng_container_4_Template, 7, 2, "ng-container", 3);
|
|
52
|
-
i0.ɵɵelementEnd();
|
|
53
|
-
} if (rf & 2) {
|
|
54
|
-
i0.ɵɵclassProp("active-menu-item", ctx.menuItem === ctx.activeItem);
|
|
55
|
-
i0.ɵɵproperty("ngClass.lt-md", "mobile");
|
|
56
|
-
i0.ɵɵadvance(2);
|
|
57
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 5, ctx.menuItem.title), " ");
|
|
58
|
-
i0.ɵɵadvance(2);
|
|
59
|
-
i0.ɵɵproperty("ngIf", ctx.menuItem.subMenu == null ? null : ctx.menuItem.subMenu.length);
|
|
60
|
-
} }, dependencies: [i1.DefaultLayoutAlignDirective, i2.DefaultClassDirective, i3.NgForOf, i3.NgIf, i4.MatIcon, i5.MatIconButton, i6.MatMenu, i6.MatMenuItem, i6.MatMenuTrigger, i7.TranslatePipe], styles: ["[_nghost-%COMP%]{width:100%}.mobile[_ngcontent-%COMP%] .btn-label[_ngcontent-%COMP%]{margin-left:5px}.btn-label[_ngcontent-%COMP%]{font-size:14px;font-weight:500;line-height:20px;letter-spacing:.1px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"] }); }
|
|
61
|
-
}
|
|
62
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MenuItemBtnComponent, [{
|
|
63
|
-
type: Component,
|
|
64
|
-
args: [{ selector: 'lib-menu-item-btn', standalone: false, template: "<button\r\n [ngClass.lt-md]=\"'mobile'\"\r\n class=\"menu-item w-full flex justify-center items-center\"\r\n fxLayoutAlign=\"space-between start\"\r\n [class.active-menu-item]=\"menuItem === activeItem\"\r\n (click)=\"menuItem.clickAction && menuItem.clickAction()\"\r\n>\r\n <span class=\"btn-label\">\r\n {{ menuItem.title | translate }}\r\n </span>\r\n <ng-container *ngIf=\"menuItem.subMenu?.length\">\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.preventDefault(); $event.stopImmediatePropagation()\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n *ngFor=\"let item of menuItem.subMenu\"\r\n mat-menu-item\r\n (click)=\"item.onOptionClick()\"\r\n >\r\n {{ item.title | translate }}\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n</button>\r\n", styles: [":host{width:100%}.mobile .btn-label{margin-left:5px}.btn-label{font-size:14px;font-weight:500;line-height:20px;letter-spacing:.1px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
65
|
-
}], null, { direction: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}], activeItem: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], menuItem: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}] }); })();
|
|
72
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MenuItemBtnComponent, { className: "MenuItemBtnComponent", filePath: "lib\\components\\menu-item-btn\\menu-item-btn.component.ts", lineNumber: 10 }); })();
|
|
73
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS1pdGVtLWJ0bi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbWVudS9zcmMvbGliL2NvbXBvbmVudHMvbWVudS1pdGVtLWJ0bi9tZW51LWl0ZW0tYnRuLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1tZW51L3NyYy9saWIvY29tcG9uZW50cy9tZW51LWl0ZW0tYnRuL21lbnUtaXRlbS1idG4uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7Ozs7O0lDbUIzQyxpQ0FJQztJQURDLHlMQUFTLHVCQUFvQixLQUFDO0lBRTlCLFlBQ0Y7O0lBQUEsaUJBQVM7OztJQURQLGNBQ0Y7SUFERSxvRUFDRjs7OztJQWZKLDZCQUErQztJQUM3QyxpQ0FJQztJQURDLHNJQUFTLHVCQUF1Qix3QkFBRSxpQ0FBaUMsS0FBQztJQUVwRSxnQ0FBVTtJQUFBLHlCQUFTO0lBQ3JCLEFBRHFCLGlCQUF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YnV0dG9uPlxyXG4gICAgPG1hdC1tZW51ICNtZW51PVwibWF0TWVudVwiPlxyXG4gICAgICA8YnV0dG9uXHJcbiAgICAgICAgKm5nRm9yPVwibGV0IGl0ZW0gb2YgbWVudUl0ZW0uc3ViTWVudVwiXHJcbiAgICAgICAgbWF0LW1lbnUtaXRlbVxyXG4gICAgICAgIChjbGljayk9XCJpdGVtLm9uT3B0aW9uQ2xpY2soKVwiXHJcbiAgICAgID5cclxuICAgICAgICB7eyBpdGVtLnRpdGxlIHwgdHJhbnNsYXRlIH19XHJcbiAgICAgIDwvYnV0dG9uPlxyXG4gICAgPC9tYXQtbWVudT5cclxuICA8L25nLWNvbnRhaW5lcj5cclxuPC9idXR0b24+XHJcbiJdfQ==
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CustomMenuItem, MenuLayoutDirection } from '../../models';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class MenuItemBtnComponent {
|
|
4
|
-
direction: MenuLayoutDirection;
|
|
5
|
-
activeItem: CustomMenuItem | undefined;
|
|
6
|
-
menuItem: CustomMenuItem;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemBtnComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemBtnComponent, "lib-menu-item-btn", never, { "direction": { "alias": "direction"; "required": false; }; "activeItem": { "alias": "activeItem"; "required": false; }; "menuItem": { "alias": "menuItem"; "required": false; }; }, {}, never, never, false, never>;
|
|
9
|
-
}
|