@egose/shadcn-theme-ng 0.0.28 → 0.1.0
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/README.md +130 -13
- package/accordion/README.md +2 -63
- package/accordion/fesm2022/accordion.mjs +27 -39
- package/alert/README.md +2 -63
- package/alert/fesm2022/alert.mjs +47 -47
- package/alert-dialog/fesm2022/alert-dialog.mjs +47 -47
- package/aspect-ratio/fesm2022/aspect-ratio.mjs +9 -9
- package/autocomplete/README.md +2 -63
- package/autocomplete/fesm2022/autocomplete.mjs +53 -71
- package/avatar/fesm2022/avatar.mjs +32 -32
- package/badge/README.md +2 -63
- package/badge/fesm2022/badge.mjs +57 -57
- package/basic-alert/README.md +2 -63
- package/basic-alert/fesm2022/basic-alert.mjs +6 -18
- package/breadcrumb/fesm2022/breadcrumb.mjs +33 -39
- package/button/README.md +2 -63
- package/button/fesm2022/button.mjs +126 -176
- package/button/types/button.d.ts +2 -2
- package/button-group/fesm2022/button-group.mjs +20 -20
- package/calendar/README.md +2 -63
- package/calendar/fesm2022/calendar.mjs +29 -743
- package/card/fesm2022/card.mjs +33 -33
- package/carousel/fesm2022/carousel.mjs +36 -78
- package/checkbox/README.md +2 -63
- package/checkbox/fesm2022/checkbox.mjs +20 -58
- package/checkbox/types/checkbox.d.ts +5 -4
- package/collapsible/fesm2022/collapsible.mjs +15 -15
- package/combobox/fesm2022/combobox.mjs +88 -224
- package/command/fesm2022/command.mjs +49 -109
- package/confirmation-dialog/README.md +2 -63
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +15 -40
- package/confirmation-dialog/types/confirmation-dialog.d.ts +8 -4
- package/context-menu/fesm2022/context-menu.mjs +9 -9
- package/date-picker/README.md +2 -63
- package/date-picker/fesm2022/date-picker.mjs +63 -266
- package/date-picker/types/date-picker.d.ts +7 -3
- package/dialog/README.md +2 -63
- package/dialog/fesm2022/dialog.mjs +45 -71
- package/drawer/fesm2022/drawer.mjs +44 -54
- package/dropdown-menu/fesm2022/dropdown-menu.mjs +82 -70
- package/dropdown-menu/types/dropdown-menu.d.ts +4 -0
- package/empty/fesm2022/empty.mjs +30 -30
- package/field/fesm2022/field.mjs +56 -72
- package/form-checkbox/README.md +2 -63
- package/form-checkbox/fesm2022/form-checkbox.mjs +25 -85
- package/form-checkbox/types/form-checkbox.d.ts +7 -1
- package/form-date-picker/README.md +2 -63
- package/form-date-picker/fesm2022/form-date-picker.mjs +31 -84
- package/form-date-picker/types/form-date-picker.d.ts +7 -1
- package/form-field/README.md +2 -63
- package/form-field/fesm2022/form-field.mjs +33 -19
- package/form-field/types/form-field.d.ts +28 -20
- package/form-field-simple/README.md +2 -63
- package/form-field-simple/fesm2022/form-field-simple.mjs +4 -4
- package/form-searchable-multiselect/README.md +2 -63
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +31 -91
- package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +7 -1
- package/form-select/README.md +2 -63
- package/form-select/fesm2022/form-select.mjs +32 -149
- package/form-select/types/form-select.d.ts +7 -1
- package/form-text-input/README.md +2 -63
- package/form-text-input/fesm2022/form-text-input.mjs +35 -149
- package/form-text-input/types/form-text-input.d.ts +9 -12
- package/form-textarea/README.md +2 -63
- package/form-textarea/fesm2022/form-textarea.mjs +34 -109
- package/form-textarea/types/form-textarea.d.ts +8 -1
- package/hover-card/fesm2022/hover-card.mjs +19 -19
- package/icon/README.md +2 -63
- package/icon/fesm2022/icon.mjs +8 -8
- package/input/README.md +2 -63
- package/input/fesm2022/input.mjs +17 -12
- package/input/types/input.d.ts +2 -1
- package/input-group/fesm2022/input-group.mjs +33 -33
- package/input-otp/fesm2022/input-otp.mjs +26 -26
- package/item/fesm2022/item.mjs +53 -53
- package/kbd/fesm2022/kbd.mjs +12 -12
- package/label/README.md +2 -63
- package/label/fesm2022/label.mjs +10 -10
- package/label/types/label.d.ts +1 -1
- package/layout-simple/README.md +2 -63
- package/layout-simple/fesm2022/layout-simple.mjs +98 -429
- package/layout-simple/types/layout-simple.d.ts +25 -11
- package/menu/README.md +3 -0
- package/menu/fesm2022/menu.mjs +455 -0
- package/menu/package.json +24 -0
- package/menu/types/menu.d.ts +137 -0
- package/menubar/fesm2022/menubar.mjs +13 -13
- package/native-select/fesm2022/native-select.mjs +19 -19
- package/navigation-menu/fesm2022/navigation-menu.mjs +35 -47
- package/package.json +183 -154
- package/pagination/fesm2022/pagination.mjs +45 -331
- package/popover/README.md +2 -63
- package/popover/fesm2022/popover.mjs +30 -30
- package/progress/fesm2022/progress.mjs +13 -13
- package/radio-group/README.md +2 -63
- package/radio-group/fesm2022/radio-group.mjs +22 -19
- package/resizable/fesm2022/resizable.mjs +18 -26
- package/scroll-area/fesm2022/scroll-area.mjs +9 -9
- package/searchable-multiselect/README.md +2 -63
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +28 -117
- package/searchable-multiselect/types/searchable-multiselect.d.ts +8 -2
- package/select/README.md +2 -63
- package/select/fesm2022/select.mjs +71 -111
- package/select/types/select.d.ts +3 -1
- package/separator/README.md +2 -63
- package/separator/fesm2022/separator.mjs +9 -9
- package/separator/types/separator.d.ts +1 -1
- package/sheet/README.md +2 -63
- package/sheet/fesm2022/sheet.mjs +41 -53
- package/sidebar/fesm2022/sidebar.mjs +125 -227
- package/skeleton/fesm2022/skeleton.mjs +9 -9
- package/slider/fesm2022/slider.mjs +10 -80
- package/sonner/README.md +2 -63
- package/sonner/fesm2022/sonner.mjs +13 -13
- package/spinner/README.md +2 -63
- package/spinner/fesm2022/spinner.mjs +11 -11
- package/switch/README.md +2 -63
- package/switch/fesm2022/switch.mjs +13 -15
- package/table/fesm2022/table.mjs +41 -41
- package/tabs/README.md +2 -63
- package/tabs/fesm2022/tabs.mjs +35 -111
- package/textarea/fesm2022/textarea.mjs +9 -9
- package/toggle/fesm2022/toggle.mjs +13 -13
- package/toggle-group/fesm2022/toggle-group.mjs +13 -13
- package/toggle-group/types/toggle-group.d.ts +13 -7
- package/tooltip/README.md +2 -63
- package/tooltip/fesm2022/tooltip.mjs +14 -14
- package/typography/fesm2022/typography.mjs +53 -53
- package/typography/types/typography.d.ts +12 -12
- package/utils/README.md +2 -63
- package/utils/fesm2022/utils.mjs +68 -44
- package/accordion/fesm2022/accordion.mjs.map +0 -1
- package/alert/fesm2022/alert.mjs.map +0 -1
- package/alert-dialog/fesm2022/alert-dialog.mjs.map +0 -1
- package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +0 -1
- package/autocomplete/fesm2022/autocomplete.mjs.map +0 -1
- package/avatar/fesm2022/avatar.mjs.map +0 -1
- package/badge/fesm2022/badge.mjs.map +0 -1
- package/basic-alert/fesm2022/basic-alert.mjs.map +0 -1
- package/breadcrumb/fesm2022/breadcrumb.mjs.map +0 -1
- package/button/fesm2022/button.mjs.map +0 -1
- package/button-group/fesm2022/button-group.mjs.map +0 -1
- package/calendar/fesm2022/calendar.mjs.map +0 -1
- package/card/fesm2022/card.mjs.map +0 -1
- package/carousel/fesm2022/carousel.mjs.map +0 -1
- package/checkbox/fesm2022/checkbox.mjs.map +0 -1
- package/collapsible/fesm2022/collapsible.mjs.map +0 -1
- package/combobox/fesm2022/combobox.mjs.map +0 -1
- package/command/fesm2022/command.mjs.map +0 -1
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +0 -1
- package/context-menu/fesm2022/context-menu.mjs.map +0 -1
- package/date-picker/fesm2022/date-picker.mjs.map +0 -1
- package/dialog/fesm2022/dialog.mjs.map +0 -1
- package/drawer/fesm2022/drawer.mjs.map +0 -1
- package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +0 -1
- package/empty/fesm2022/empty.mjs.map +0 -1
- package/field/fesm2022/field.mjs.map +0 -1
- package/form-checkbox/fesm2022/form-checkbox.mjs.map +0 -1
- package/form-date-picker/fesm2022/form-date-picker.mjs.map +0 -1
- package/form-field/fesm2022/form-field.mjs.map +0 -1
- package/form-field-simple/fesm2022/form-field-simple.mjs.map +0 -1
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +0 -1
- package/form-select/fesm2022/form-select.mjs.map +0 -1
- package/form-text-input/fesm2022/form-text-input.mjs.map +0 -1
- package/form-textarea/fesm2022/form-textarea.mjs.map +0 -1
- package/hover-card/fesm2022/hover-card.mjs.map +0 -1
- package/icon/fesm2022/icon.mjs.map +0 -1
- package/input/fesm2022/input.mjs.map +0 -1
- package/input-group/fesm2022/input-group.mjs.map +0 -1
- package/input-otp/fesm2022/input-otp.mjs.map +0 -1
- package/item/fesm2022/item.mjs.map +0 -1
- package/kbd/fesm2022/kbd.mjs.map +0 -1
- package/label/fesm2022/label.mjs.map +0 -1
- package/layout-simple/fesm2022/layout-simple.mjs.map +0 -1
- package/menubar/fesm2022/menubar.mjs.map +0 -1
- package/native-select/fesm2022/native-select.mjs.map +0 -1
- package/navigation-menu/fesm2022/navigation-menu.mjs.map +0 -1
- package/pagination/fesm2022/pagination.mjs.map +0 -1
- package/popover/fesm2022/popover.mjs.map +0 -1
- package/progress/fesm2022/progress.mjs.map +0 -1
- package/radio-group/fesm2022/radio-group.mjs.map +0 -1
- package/resizable/fesm2022/resizable.mjs.map +0 -1
- package/scroll-area/fesm2022/scroll-area.mjs.map +0 -1
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +0 -1
- package/select/fesm2022/select.mjs.map +0 -1
- package/separator/fesm2022/separator.mjs.map +0 -1
- package/sheet/fesm2022/sheet.mjs.map +0 -1
- package/sidebar/fesm2022/sidebar.mjs.map +0 -1
- package/skeleton/fesm2022/skeleton.mjs.map +0 -1
- package/slider/fesm2022/slider.mjs.map +0 -1
- package/sonner/fesm2022/sonner.mjs.map +0 -1
- package/spinner/fesm2022/spinner.mjs.map +0 -1
- package/switch/fesm2022/switch.mjs.map +0 -1
- package/table/fesm2022/table.mjs.map +0 -1
- package/tabs/fesm2022/tabs.mjs.map +0 -1
- package/textarea/fesm2022/textarea.mjs.map +0 -1
- package/toggle/fesm2022/toggle.mjs.map +0 -1
- package/toggle-group/fesm2022/toggle-group.mjs.map +0 -1
- package/tooltip/fesm2022/tooltip.mjs.map +0 -1
- package/typography/fesm2022/typography.mjs.map +0 -1
- package/utils/fesm2022/utils.mjs.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Component, signal, computed, output, ChangeDetectionStrategy, viewChild, effect } from '@angular/core';
|
|
2
|
+
import { input, Component, signal, computed, output, ChangeDetectionStrategy, viewChild, effect, inject, DestroyRef } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
4
|
import { RouterLink, RouterModule } from '@angular/router';
|
|
4
|
-
import * as i1$2 from '@angular/cdk/layout';
|
|
5
|
-
import { Breakpoints } from '@angular/cdk/layout';
|
|
6
5
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
7
6
|
import { lucideUser, lucideSearch, lucideMenu } from '@ng-icons/lucide';
|
|
8
7
|
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
@@ -13,13 +12,14 @@ import { CommonModule } from '@angular/common';
|
|
|
13
12
|
import { HlmDropdownMenu, HlmDropdownMenuTrigger, HlmDropdownMenuItem, HlmDropdownMenuLabel, HlmDropdownMenuSeparator, HlmDropdownMenuGroup } from '@egose/shadcn-theme-ng/dropdown-menu';
|
|
14
13
|
import * as i1$1 from '@angular/forms';
|
|
15
14
|
import { FormsModule } from '@angular/forms';
|
|
16
|
-
import { HlmPopover, HlmPopoverTrigger, HlmPopoverContent } from '@egose/shadcn-theme-ng/popover';
|
|
15
|
+
import { HlmPopover, HlmPopoverTrigger, HlmPopoverContent, HlmPopoverPortal } from '@egose/shadcn-theme-ng/popover';
|
|
17
16
|
import { HlmInput } from '@egose/shadcn-theme-ng/input';
|
|
18
17
|
import * as i2 from '@spartan-ng/brain/sheet';
|
|
19
18
|
import { BrnSheet, BrnSheetImports } from '@spartan-ng/brain/sheet';
|
|
20
19
|
import { HlmLabelImports } from '@egose/shadcn-theme-ng/label';
|
|
21
20
|
import * as i3 from '@egose/shadcn-theme-ng/sheet';
|
|
22
21
|
import { HlmSheetImports } from '@egose/shadcn-theme-ng/sheet';
|
|
22
|
+
import * as i1$2 from '@angular/cdk/layout';
|
|
23
23
|
|
|
24
24
|
class EgLayoutSimpleUserMenu {
|
|
25
25
|
hlm = hlm;
|
|
@@ -28,101 +28,14 @@ class EgLayoutSimpleUserMenu {
|
|
|
28
28
|
...(ngDevMode ? [{ debugName: "menus" }] : /* istanbul ignore next */ []));
|
|
29
29
|
menuTrigger = input(/* @ts-ignore */
|
|
30
30
|
...(ngDevMode ? [undefined, { debugName: "menuTrigger" }] : /* istanbul ignore next */ []));
|
|
31
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
32
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleUserMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgLayoutSimpleUserMenu, isStandalone: true, selector: "eg-layout-simple-user-menu", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, menuTrigger: { classPropertyName: "menuTrigger", publicName: "menuTrigger", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
33
33
|
provideIcons({
|
|
34
34
|
lucideUser,
|
|
35
35
|
}),
|
|
36
|
-
], ngImport: i0, template:
|
|
37
|
-
<ng-template #iconTemplate>
|
|
38
|
-
<ng-icon [svg]="lucideUser" size="1.5rem" class="[&_svg]:w-[inherit]! [&_svg]:h-[inherit]!" />
|
|
39
|
-
</ng-template>
|
|
40
|
-
|
|
41
|
-
@let _menuTrigger = menuTrigger();
|
|
42
|
-
|
|
43
|
-
<div class="flex w-full items-center justify-center">
|
|
44
|
-
@if (_menuTrigger) {
|
|
45
|
-
<button
|
|
46
|
-
type="button"
|
|
47
|
-
[hlmDropdownMenuTrigger]="menu"
|
|
48
|
-
class="cursor-pointer bg-transparent border-0 p-0"
|
|
49
|
-
>
|
|
50
|
-
<ng-container *ngTemplateOutlet="_menuTrigger" />
|
|
51
|
-
</button>
|
|
52
|
-
} @else {
|
|
53
|
-
<button
|
|
54
|
-
hlmButton
|
|
55
|
-
variant="primary"
|
|
56
|
-
size="icon"
|
|
57
|
-
[hlmDropdownMenuTrigger]="menu"
|
|
58
|
-
[icon]="iconTemplate"
|
|
59
|
-
class="rounded-full border border-gray-400"
|
|
60
|
-
></button>
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
<ng-template #menu>
|
|
64
|
-
<div hlmDropdownMenu class="w-56">
|
|
65
|
-
@for (section of menus(); track section) {
|
|
66
|
-
@if (section.label) {
|
|
67
|
-
<div hlmDropdownMenuLabel>{{ section.label }}</div>
|
|
68
|
-
}
|
|
69
|
-
@if (section.items?.length) {
|
|
70
|
-
<div hlmDropdownMenuGroup>
|
|
71
|
-
@for (item of section.items; track item) {
|
|
72
|
-
@if (item.link) {
|
|
73
|
-
<a
|
|
74
|
-
hlmDropdownMenuItem
|
|
75
|
-
[routerLink]="item.link"
|
|
76
|
-
[class]="hlm('cursor-pointer no-underline', item.class)"
|
|
77
|
-
>
|
|
78
|
-
@if (item.icon) {
|
|
79
|
-
<ng-icon
|
|
80
|
-
[svg]="item.icon"
|
|
81
|
-
size="1rem"
|
|
82
|
-
[class]="
|
|
83
|
-
hlm(
|
|
84
|
-
'[_svg]:text-[inherit]! [_svg]:bg-[inherit]! cursor-pointer mr-2',
|
|
85
|
-
item.class
|
|
86
|
-
)
|
|
87
|
-
"
|
|
88
|
-
/>
|
|
89
|
-
}
|
|
90
|
-
<span>{{ item.label }}</span>
|
|
91
|
-
</a>
|
|
92
|
-
} @else {
|
|
93
|
-
<button
|
|
94
|
-
hlmDropdownMenuItem
|
|
95
|
-
(click)="item.action?.()"
|
|
96
|
-
[class]="hlm('cursor-pointer no-underline', item.class)"
|
|
97
|
-
>
|
|
98
|
-
@if (item.icon) {
|
|
99
|
-
<ng-icon
|
|
100
|
-
[svg]="item.icon"
|
|
101
|
-
size="1rem"
|
|
102
|
-
[class]="
|
|
103
|
-
hlm(
|
|
104
|
-
'[_svg]:text-[inherit]! [_svg]:bg-[inherit]! cursor-pointer mr-2',
|
|
105
|
-
item.class
|
|
106
|
-
)
|
|
107
|
-
"
|
|
108
|
-
/>
|
|
109
|
-
}
|
|
110
|
-
<span>{{ item.label }}</span>
|
|
111
|
-
</button>
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
</div>
|
|
115
|
-
}
|
|
116
|
-
@if (section.separator) {
|
|
117
|
-
<div hlmDropdownMenuSeparator></div>
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
</div>
|
|
121
|
-
</ng-template>
|
|
122
|
-
</div>
|
|
123
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: HlmDropdownMenu, selector: "[hlmDropdownMenu],hlm-dropdown-menu", inputs: ["sideOffset"] }, { kind: "directive", type: HlmDropdownMenuTrigger, selector: "[hlmDropdownMenuTrigger]", inputs: ["align", "side"] }, { kind: "directive", type: HlmDropdownMenuItem, selector: "[hlmDropdownMenuItem],hlm-dropdown-menu-item", inputs: ["disabled", "variant", "inset"] }, { kind: "directive", type: HlmDropdownMenuLabel, selector: "[hlmDropdownMenuLabel],hlm-dropdown-menu-label", inputs: ["inset"] }, { kind: "directive", type: HlmDropdownMenuSeparator, selector: "[hlmDropdownMenuSeparator],hlm-dropdown-menu-separator" }, { kind: "directive", type: HlmDropdownMenuGroup, selector: "[hlmDropdownMenuGroup],hlm-dropdown-menu-group" }, { kind: "component", type: HlmButton, selector: "button[hlmButton], a[hlmButton]", inputs: ["variant", "size", "appearance", "loading", "icon", "iconPosition", "class", "spinnerUserClass", "disabled", "type"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
|
|
36
|
+
], ngImport: i0, template: "\n <ng-template #iconTemplate>\n <ng-icon [svg]=\"lucideUser\" size=\"1.5rem\" class=\"[&_svg]:w-[inherit]! [&_svg]:h-[inherit]!\" />\n </ng-template>\n\n @let _menuTrigger = menuTrigger();\n\n <div class=\"flex w-full items-center justify-center\">\n @if (_menuTrigger) {\n <button\n type=\"button\"\n [hlmDropdownMenuTrigger]=\"menu\"\n class=\"cursor-pointer bg-transparent border-0 p-0\"\n >\n <ng-container *ngTemplateOutlet=\"_menuTrigger\" />\n </button>\n } @else {\n <button\n hlmButton\n variant=\"primary\"\n size=\"icon\"\n [hlmDropdownMenuTrigger]=\"menu\"\n [icon]=\"iconTemplate\"\n class=\"rounded-full border border-gray-400\"\n ></button>\n }\n\n <ng-template #menu>\n <div hlmDropdownMenu class=\"w-56\">\n @for (section of menus(); track section) {\n @if (section.label) {\n <div hlmDropdownMenuLabel>{{ section.label }}</div>\n }\n @if (section.items?.length) {\n <div hlmDropdownMenuGroup>\n @for (item of section.items; track item) {\n @if (item.link) {\n <a\n hlmDropdownMenuItem\n [routerLink]=\"item.link\"\n [class]=\"hlm('tw:cursor-pointer tw:no-underline', item.class)\"\n >\n @if (item.icon) {\n <ng-icon\n [svg]=\"item.icon\"\n size=\"1rem\"\n [class]=\"\n hlm(\n 'tw:[_svg]:text-[inherit]! tw:[_svg]:bg-[inherit]! tw:cursor-pointer tw:mr-2',\n item.class\n )\n \"\n />\n }\n <span>{{ item.label }}</span>\n </a>\n } @else {\n <button\n hlmDropdownMenuItem\n (click)=\"item.action?.()\"\n [class]=\"hlm('tw:cursor-pointer tw:no-underline', item.class)\"\n >\n @if (item.icon) {\n <ng-icon\n [svg]=\"item.icon\"\n size=\"1rem\"\n [class]=\"\n hlm(\n 'tw:[_svg]:text-[inherit]! tw:[_svg]:bg-[inherit]! tw:cursor-pointer tw:mr-2',\n item.class\n )\n \"\n />\n }\n <span>{{ item.label }}</span>\n </button>\n }\n }\n </div>\n }\n @if (section.separator) {\n <div hlmDropdownMenuSeparator></div>\n }\n }\n </div>\n </ng-template>\n </div>\n ", isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: HlmDropdownMenu, selector: "[hlmDropdownMenu],hlm-dropdown-menu", inputs: ["sideOffset"] }, { kind: "directive", type: HlmDropdownMenuTrigger, selector: "[hlmDropdownMenuTrigger]", inputs: ["align", "side"] }, { kind: "directive", type: HlmDropdownMenuItem, selector: "[hlmDropdownMenuItem],hlm-dropdown-menu-item", inputs: ["disabled", "variant", "inset"] }, { kind: "directive", type: HlmDropdownMenuLabel, selector: "[hlmDropdownMenuLabel],hlm-dropdown-menu-label", inputs: ["inset"] }, { kind: "directive", type: HlmDropdownMenuSeparator, selector: "[hlmDropdownMenuSeparator],hlm-dropdown-menu-separator" }, { kind: "directive", type: HlmDropdownMenuGroup, selector: "[hlmDropdownMenuGroup],hlm-dropdown-menu-group" }, { kind: "component", type: HlmButton, selector: "button[hlmButton], a[hlmButton]", inputs: ["variant", "size", "appearance", "loading", "icon", "iconPosition", "class", "spinnerUserClass", "disabled", "type"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
|
|
124
37
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleUserMenu, decorators: [{
|
|
126
39
|
type: Component,
|
|
127
40
|
args: [{
|
|
128
41
|
selector: 'eg-layout-simple-user-menu',
|
|
@@ -143,94 +56,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
143
56
|
lucideUser,
|
|
144
57
|
}),
|
|
145
58
|
],
|
|
146
|
-
template:
|
|
147
|
-
<ng-template #iconTemplate>
|
|
148
|
-
<ng-icon [svg]="lucideUser" size="1.5rem" class="[&_svg]:w-[inherit]! [&_svg]:h-[inherit]!" />
|
|
149
|
-
</ng-template>
|
|
150
|
-
|
|
151
|
-
@let _menuTrigger = menuTrigger();
|
|
152
|
-
|
|
153
|
-
<div class="flex w-full items-center justify-center">
|
|
154
|
-
@if (_menuTrigger) {
|
|
155
|
-
<button
|
|
156
|
-
type="button"
|
|
157
|
-
[hlmDropdownMenuTrigger]="menu"
|
|
158
|
-
class="cursor-pointer bg-transparent border-0 p-0"
|
|
159
|
-
>
|
|
160
|
-
<ng-container *ngTemplateOutlet="_menuTrigger" />
|
|
161
|
-
</button>
|
|
162
|
-
} @else {
|
|
163
|
-
<button
|
|
164
|
-
hlmButton
|
|
165
|
-
variant="primary"
|
|
166
|
-
size="icon"
|
|
167
|
-
[hlmDropdownMenuTrigger]="menu"
|
|
168
|
-
[icon]="iconTemplate"
|
|
169
|
-
class="rounded-full border border-gray-400"
|
|
170
|
-
></button>
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
<ng-template #menu>
|
|
174
|
-
<div hlmDropdownMenu class="w-56">
|
|
175
|
-
@for (section of menus(); track section) {
|
|
176
|
-
@if (section.label) {
|
|
177
|
-
<div hlmDropdownMenuLabel>{{ section.label }}</div>
|
|
178
|
-
}
|
|
179
|
-
@if (section.items?.length) {
|
|
180
|
-
<div hlmDropdownMenuGroup>
|
|
181
|
-
@for (item of section.items; track item) {
|
|
182
|
-
@if (item.link) {
|
|
183
|
-
<a
|
|
184
|
-
hlmDropdownMenuItem
|
|
185
|
-
[routerLink]="item.link"
|
|
186
|
-
[class]="hlm('cursor-pointer no-underline', item.class)"
|
|
187
|
-
>
|
|
188
|
-
@if (item.icon) {
|
|
189
|
-
<ng-icon
|
|
190
|
-
[svg]="item.icon"
|
|
191
|
-
size="1rem"
|
|
192
|
-
[class]="
|
|
193
|
-
hlm(
|
|
194
|
-
'[_svg]:text-[inherit]! [_svg]:bg-[inherit]! cursor-pointer mr-2',
|
|
195
|
-
item.class
|
|
196
|
-
)
|
|
197
|
-
"
|
|
198
|
-
/>
|
|
199
|
-
}
|
|
200
|
-
<span>{{ item.label }}</span>
|
|
201
|
-
</a>
|
|
202
|
-
} @else {
|
|
203
|
-
<button
|
|
204
|
-
hlmDropdownMenuItem
|
|
205
|
-
(click)="item.action?.()"
|
|
206
|
-
[class]="hlm('cursor-pointer no-underline', item.class)"
|
|
207
|
-
>
|
|
208
|
-
@if (item.icon) {
|
|
209
|
-
<ng-icon
|
|
210
|
-
[svg]="item.icon"
|
|
211
|
-
size="1rem"
|
|
212
|
-
[class]="
|
|
213
|
-
hlm(
|
|
214
|
-
'[_svg]:text-[inherit]! [_svg]:bg-[inherit]! cursor-pointer mr-2',
|
|
215
|
-
item.class
|
|
216
|
-
)
|
|
217
|
-
"
|
|
218
|
-
/>
|
|
219
|
-
}
|
|
220
|
-
<span>{{ item.label }}</span>
|
|
221
|
-
</button>
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
</div>
|
|
225
|
-
}
|
|
226
|
-
@if (section.separator) {
|
|
227
|
-
<div hlmDropdownMenuSeparator></div>
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
</div>
|
|
231
|
-
</ng-template>
|
|
232
|
-
</div>
|
|
233
|
-
`,
|
|
59
|
+
template: "\n <ng-template #iconTemplate>\n <ng-icon [svg]=\"lucideUser\" size=\"1.5rem\" class=\"[&_svg]:w-[inherit]! [&_svg]:h-[inherit]!\" />\n </ng-template>\n\n @let _menuTrigger = menuTrigger();\n\n <div class=\"flex w-full items-center justify-center\">\n @if (_menuTrigger) {\n <button\n type=\"button\"\n [hlmDropdownMenuTrigger]=\"menu\"\n class=\"cursor-pointer bg-transparent border-0 p-0\"\n >\n <ng-container *ngTemplateOutlet=\"_menuTrigger\" />\n </button>\n } @else {\n <button\n hlmButton\n variant=\"primary\"\n size=\"icon\"\n [hlmDropdownMenuTrigger]=\"menu\"\n [icon]=\"iconTemplate\"\n class=\"rounded-full border border-gray-400\"\n ></button>\n }\n\n <ng-template #menu>\n <div hlmDropdownMenu class=\"w-56\">\n @for (section of menus(); track section) {\n @if (section.label) {\n <div hlmDropdownMenuLabel>{{ section.label }}</div>\n }\n @if (section.items?.length) {\n <div hlmDropdownMenuGroup>\n @for (item of section.items; track item) {\n @if (item.link) {\n <a\n hlmDropdownMenuItem\n [routerLink]=\"item.link\"\n [class]=\"hlm('tw:cursor-pointer tw:no-underline', item.class)\"\n >\n @if (item.icon) {\n <ng-icon\n [svg]=\"item.icon\"\n size=\"1rem\"\n [class]=\"\n hlm(\n 'tw:[_svg]:text-[inherit]! tw:[_svg]:bg-[inherit]! tw:cursor-pointer tw:mr-2',\n item.class\n )\n \"\n />\n }\n <span>{{ item.label }}</span>\n </a>\n } @else {\n <button\n hlmDropdownMenuItem\n (click)=\"item.action?.()\"\n [class]=\"hlm('tw:cursor-pointer tw:no-underline', item.class)\"\n >\n @if (item.icon) {\n <ng-icon\n [svg]=\"item.icon\"\n size=\"1rem\"\n [class]=\"\n hlm(\n 'tw:[_svg]:text-[inherit]! tw:[_svg]:bg-[inherit]! tw:cursor-pointer tw:mr-2',\n item.class\n )\n \"\n />\n }\n <span>{{ item.label }}</span>\n </button>\n }\n }\n </div>\n }\n @if (section.separator) {\n <div hlmDropdownMenuSeparator></div>\n }\n }\n </div>\n </ng-template>\n </div>\n ",
|
|
234
60
|
}]
|
|
235
61
|
}], propDecorators: { menus: [{ type: i0.Input, args: [{ isSignal: true, alias: "menus", required: false }] }], menuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuTrigger", required: false }] }] } });
|
|
236
62
|
|
|
@@ -282,94 +108,25 @@ class EgGenericAutocomplete {
|
|
|
282
108
|
this.optionChange.emit(opt.value);
|
|
283
109
|
this.search.set('');
|
|
284
110
|
}
|
|
285
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
286
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
287
|
-
<hlm-popover>
|
|
288
|
-
<button
|
|
289
|
-
hlmPopoverTrigger
|
|
290
|
-
hlmButton
|
|
291
|
-
variant="secondary"
|
|
292
|
-
appearance="outline"
|
|
293
|
-
type="button"
|
|
294
|
-
class="w-64 justify-start gap-2 text-muted-foreground"
|
|
295
|
-
>
|
|
296
|
-
<ng-icon name="lucideSearch" size="14px" />
|
|
297
|
-
<span class="truncate">{{ placeholderText() }}</span>
|
|
298
|
-
</button>
|
|
299
|
-
|
|
300
|
-
<hlm-popover-content class="w-64 p-2">
|
|
301
|
-
<input
|
|
302
|
-
hlmInput
|
|
303
|
-
[ngModel]="search()"
|
|
304
|
-
(ngModelChange)="search.set($event)"
|
|
305
|
-
[placeholder]="placeholderText()"
|
|
306
|
-
class="mb-2"
|
|
307
|
-
/>
|
|
308
|
-
<div class="max-h-60 overflow-auto flex flex-col">
|
|
309
|
-
@if (filtered().length === 0) {
|
|
310
|
-
<span class="text-xs text-muted-foreground px-2 py-2">{{ emptyText() }}</span>
|
|
311
|
-
} @else {
|
|
312
|
-
@for (opt of filtered(); track opt.label) {
|
|
313
|
-
<button
|
|
314
|
-
type="button"
|
|
315
|
-
(click)="select(opt)"
|
|
316
|
-
class="text-left px-2 py-1.5 text-sm rounded-sm hover:bg-secondary cursor-pointer"
|
|
317
|
-
>
|
|
318
|
-
{{ opt.label }}
|
|
319
|
-
</button>
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
</div>
|
|
323
|
-
</hlm-popover-content>
|
|
324
|
-
</hlm-popover>
|
|
325
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: HlmPopover, selector: "[hlmPopover],hlm-popover" }, { kind: "directive", type: HlmPopoverTrigger, selector: "button[hlmPopoverTrigger],button[hlmPopoverTriggerFor]" }, { kind: "directive", type: HlmPopoverContent, selector: "[hlmPopoverContent],hlm-popover-content" }, { kind: "directive", type: HlmInput, selector: "[hlmInput]" }, { kind: "component", type: HlmButton, selector: "button[hlmButton], a[hlmButton]", inputs: ["variant", "size", "appearance", "loading", "icon", "iconPosition", "class", "spinnerUserClass", "disabled", "type"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgGenericAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
112
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgGenericAutocomplete, isStandalone: true, selector: "eg-generic-autocomplete", inputs: { placeholderText: { classPropertyName: "placeholderText", publicName: "placeholderText", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, loaderFn: { classPropertyName: "loaderFn", publicName: "loaderFn", isSignal: true, isRequired: false, transformFunction: null }, transformValueToSearch: { classPropertyName: "transformValueToSearch", publicName: "transformValueToSearch", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { optionChange: "optionChange" }, providers: [provideIcons({ lucideSearch })], ngImport: i0, template: "\n <hlm-popover>\n <button\n hlmPopoverTrigger\n hlmButton\n variant=\"secondary\"\n appearance=\"outline\"\n type=\"button\"\n class=\"w-64 justify-start gap-2 text-muted-foreground\"\n >\n <ng-icon name=\"lucideSearch\" size=\"14px\" />\n <span class=\"truncate\">{{ placeholderText() }}</span>\n </button>\n\n <hlm-popover-content *hlmPopoverPortal class=\"w-64 p-2\">\n <input\n hlmInput\n [ngModel]=\"search()\"\n (ngModelChange)=\"search.set($event)\"\n [placeholder]=\"placeholderText()\"\n class=\"mb-2\"\n />\n <div class=\"max-h-60 overflow-auto flex flex-col\">\n @if (filtered().length === 0) {\n <span class=\"text-xs text-muted-foreground px-2 py-2\">{{ emptyText() }}</span>\n } @else {\n @for (opt of filtered(); track opt.label) {\n <button\n type=\"button\"\n (click)=\"select(opt)\"\n class=\"text-left px-2 py-1.5 text-sm rounded-sm hover:bg-secondary cursor-pointer\"\n >\n {{ opt.label }}\n </button>\n }\n }\n </div>\n </hlm-popover-content>\n </hlm-popover>\n ", isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: HlmPopover, selector: "[hlmPopover],hlm-popover" }, { kind: "directive", type: HlmPopoverTrigger, selector: "button[hlmPopoverTrigger],button[hlmPopoverTriggerFor]" }, { kind: "directive", type: HlmPopoverContent, selector: "[hlmPopoverContent],hlm-popover-content" }, { kind: "directive", type: HlmPopoverPortal, selector: "[hlmPopoverPortal]" }, { kind: "directive", type: HlmInput, selector: "[hlmInput]", inputs: ["ariaDescribedby"] }, { kind: "component", type: HlmButton, selector: "button[hlmButton], a[hlmButton]", inputs: ["variant", "size", "appearance", "loading", "icon", "iconPosition", "class", "spinnerUserClass", "disabled", "type"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
326
113
|
}
|
|
327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgGenericAutocomplete, decorators: [{
|
|
328
115
|
type: Component,
|
|
329
116
|
args: [{
|
|
330
117
|
selector: 'eg-generic-autocomplete',
|
|
331
|
-
imports: [
|
|
118
|
+
imports: [
|
|
119
|
+
FormsModule,
|
|
120
|
+
HlmPopover,
|
|
121
|
+
HlmPopoverTrigger,
|
|
122
|
+
HlmPopoverContent,
|
|
123
|
+
HlmPopoverPortal,
|
|
124
|
+
HlmInput,
|
|
125
|
+
HlmButton,
|
|
126
|
+
NgIcon,
|
|
127
|
+
],
|
|
332
128
|
providers: [provideIcons({ lucideSearch })],
|
|
333
|
-
template:
|
|
334
|
-
<hlm-popover>
|
|
335
|
-
<button
|
|
336
|
-
hlmPopoverTrigger
|
|
337
|
-
hlmButton
|
|
338
|
-
variant="secondary"
|
|
339
|
-
appearance="outline"
|
|
340
|
-
type="button"
|
|
341
|
-
class="w-64 justify-start gap-2 text-muted-foreground"
|
|
342
|
-
>
|
|
343
|
-
<ng-icon name="lucideSearch" size="14px" />
|
|
344
|
-
<span class="truncate">{{ placeholderText() }}</span>
|
|
345
|
-
</button>
|
|
346
|
-
|
|
347
|
-
<hlm-popover-content class="w-64 p-2">
|
|
348
|
-
<input
|
|
349
|
-
hlmInput
|
|
350
|
-
[ngModel]="search()"
|
|
351
|
-
(ngModelChange)="search.set($event)"
|
|
352
|
-
[placeholder]="placeholderText()"
|
|
353
|
-
class="mb-2"
|
|
354
|
-
/>
|
|
355
|
-
<div class="max-h-60 overflow-auto flex flex-col">
|
|
356
|
-
@if (filtered().length === 0) {
|
|
357
|
-
<span class="text-xs text-muted-foreground px-2 py-2">{{ emptyText() }}</span>
|
|
358
|
-
} @else {
|
|
359
|
-
@for (opt of filtered(); track opt.label) {
|
|
360
|
-
<button
|
|
361
|
-
type="button"
|
|
362
|
-
(click)="select(opt)"
|
|
363
|
-
class="text-left px-2 py-1.5 text-sm rounded-sm hover:bg-secondary cursor-pointer"
|
|
364
|
-
>
|
|
365
|
-
{{ opt.label }}
|
|
366
|
-
</button>
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
</div>
|
|
370
|
-
</hlm-popover-content>
|
|
371
|
-
</hlm-popover>
|
|
372
|
-
`,
|
|
129
|
+
template: "\n <hlm-popover>\n <button\n hlmPopoverTrigger\n hlmButton\n variant=\"secondary\"\n appearance=\"outline\"\n type=\"button\"\n class=\"w-64 justify-start gap-2 text-muted-foreground\"\n >\n <ng-icon name=\"lucideSearch\" size=\"14px\" />\n <span class=\"truncate\">{{ placeholderText() }}</span>\n </button>\n\n <hlm-popover-content *hlmPopoverPortal class=\"w-64 p-2\">\n <input\n hlmInput\n [ngModel]=\"search()\"\n (ngModelChange)=\"search.set($event)\"\n [placeholder]=\"placeholderText()\"\n class=\"mb-2\"\n />\n <div class=\"max-h-60 overflow-auto flex flex-col\">\n @if (filtered().length === 0) {\n <span class=\"text-xs text-muted-foreground px-2 py-2\">{{ emptyText() }}</span>\n } @else {\n @for (opt of filtered(); track opt.label) {\n <button\n type=\"button\"\n (click)=\"select(opt)\"\n class=\"text-left px-2 py-1.5 text-sm rounded-sm hover:bg-secondary cursor-pointer\"\n >\n {{ opt.label }}\n </button>\n }\n }\n </div>\n </hlm-popover-content>\n </hlm-popover>\n ",
|
|
373
130
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
374
131
|
}]
|
|
375
132
|
}], ctorParameters: () => [], propDecorators: { placeholderText: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholderText", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], loaderFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "loaderFn", required: false }] }], transformValueToSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "transformValueToSearch", required: false }] }], optionChange: [{ type: i0.Output, args: ["optionChange"] }] } });
|
|
@@ -383,8 +140,8 @@ class EgLayoutSimpleSidebar {
|
|
|
383
140
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
384
141
|
content = input(/* @ts-ignore */
|
|
385
142
|
...(ngDevMode ? [undefined, { debugName: "content" }] : /* istanbul ignore next */ []));
|
|
386
|
-
contentContext = input(/* @ts-ignore */
|
|
387
|
-
...(ngDevMode ? [
|
|
143
|
+
contentContext = input(null, /* @ts-ignore */
|
|
144
|
+
...(ngDevMode ? [{ debugName: "contentContext" }] : /* istanbul ignore next */ []));
|
|
388
145
|
constructor() {
|
|
389
146
|
effect(() => { });
|
|
390
147
|
}
|
|
@@ -394,58 +151,16 @@ class EgLayoutSimpleSidebar {
|
|
|
394
151
|
closeSheet() {
|
|
395
152
|
this.viewchildSheetRef()?.close();
|
|
396
153
|
}
|
|
397
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
398
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
399
|
-
@let _title = title();
|
|
400
|
-
@let _content = content();
|
|
401
|
-
|
|
402
|
-
<hlm-sheet [side]="side() ?? 'left'">
|
|
403
|
-
<hlm-sheet-content *brnSheetContent="let ctx" class="gap-0">
|
|
404
|
-
@if (_title) {
|
|
405
|
-
<hlm-sheet-header>
|
|
406
|
-
<h3 hlmSheetTitle>{{ _title }}</h3>
|
|
407
|
-
</hlm-sheet-header>
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
@if (_content) {
|
|
411
|
-
<ng-container *ngTemplateOutlet="_content; context: contentContext()"></ng-container>
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
<hlm-sheet-footer>
|
|
415
|
-
<button brnSheetClose hlmButton variant="secondary" appearance="outline-filled">Close</button>
|
|
416
|
-
</hlm-sheet-footer>
|
|
417
|
-
</hlm-sheet-content>
|
|
418
|
-
</hlm-sheet>
|
|
419
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2.BrnSheetClose, selector: "button[brnSheetClose]" }, { kind: "directive", type: i2.BrnSheetContent, selector: "[brnSheetContent]" }, { kind: "component", type: i3.HlmSheet, selector: "hlm-sheet", exportAs: ["hlmSheet"] }, { kind: "component", type: i3.HlmSheetContent, selector: "hlm-sheet-content", inputs: ["class"] }, { kind: "component", type: i3.HlmSheetFooter, selector: "hlm-sheet-footer", inputs: ["class"] }, { kind: "component", type: i3.HlmSheetHeader, selector: "hlm-sheet-header", inputs: ["class"] }, { kind: "directive", type: i3.HlmSheetTitle, selector: "[hlmSheetTitle]", inputs: ["class"] }, { kind: "component", type: i4.HlmButton, selector: "button[hlmButton], a[hlmButton]", inputs: ["variant", "size", "appearance", "loading", "icon", "iconPosition", "class", "spinnerUserClass", "disabled", "type"] }] });
|
|
154
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleSidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
155
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgLayoutSimpleSidebar, isStandalone: true, selector: "eg-layout-simple-sidebar", inputs: { side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, contentContext: { classPropertyName: "contentContext", publicName: "contentContext", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "viewchildSheetRef", first: true, predicate: BrnSheet, descendants: true, isSignal: true }], ngImport: i0, template: "\n @let _title = title();\n @let _content = content();\n\n <hlm-sheet id=\"eg-layout-simple-sidebar\" [side]=\"side() ?? 'left'\">\n <hlm-sheet-content *brnSheetContent=\"let ctx\" class=\"gap-0\">\n @if (_title) {\n <hlm-sheet-header>\n <h3 hlmSheetTitle>{{ _title }}</h3>\n </hlm-sheet-header>\n }\n\n @if (_content) {\n <ng-container *ngTemplateOutlet=\"_content; context: contentContext()\"></ng-container>\n }\n\n <hlm-sheet-footer>\n <button brnSheetClose hlmButton variant=\"secondary\" appearance=\"outline-filled\">Close</button>\n </hlm-sheet-footer>\n </hlm-sheet-content>\n </hlm-sheet>\n ", isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2.BrnSheetClose, selector: "button[brnSheetClose]" }, { kind: "directive", type: i2.BrnSheetContent, selector: "[brnSheetContent]" }, { kind: "component", type: i3.HlmSheet, selector: "hlm-sheet", exportAs: ["hlmSheet"] }, { kind: "component", type: i3.HlmSheetContent, selector: "hlm-sheet-content", inputs: ["class"] }, { kind: "component", type: i3.HlmSheetFooter, selector: "hlm-sheet-footer", inputs: ["class"] }, { kind: "component", type: i3.HlmSheetHeader, selector: "hlm-sheet-header", inputs: ["class"] }, { kind: "directive", type: i3.HlmSheetTitle, selector: "[hlmSheetTitle]", inputs: ["class"] }, { kind: "component", type: i4.HlmButton, selector: "button[hlmButton], a[hlmButton]", inputs: ["variant", "size", "appearance", "loading", "icon", "iconPosition", "class", "spinnerUserClass", "disabled", "type"] }] });
|
|
420
156
|
}
|
|
421
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleSidebar, decorators: [{
|
|
422
158
|
type: Component,
|
|
423
159
|
args: [{
|
|
424
160
|
selector: 'eg-layout-simple-sidebar',
|
|
425
161
|
standalone: true,
|
|
426
162
|
imports: [CommonModule, RouterModule, BrnSheetImports, HlmSheetImports, HlmButtonImports, HlmLabelImports],
|
|
427
|
-
template:
|
|
428
|
-
@let _title = title();
|
|
429
|
-
@let _content = content();
|
|
430
|
-
|
|
431
|
-
<hlm-sheet [side]="side() ?? 'left'">
|
|
432
|
-
<hlm-sheet-content *brnSheetContent="let ctx" class="gap-0">
|
|
433
|
-
@if (_title) {
|
|
434
|
-
<hlm-sheet-header>
|
|
435
|
-
<h3 hlmSheetTitle>{{ _title }}</h3>
|
|
436
|
-
</hlm-sheet-header>
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
@if (_content) {
|
|
440
|
-
<ng-container *ngTemplateOutlet="_content; context: contentContext()"></ng-container>
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
<hlm-sheet-footer>
|
|
444
|
-
<button brnSheetClose hlmButton variant="secondary" appearance="outline-filled">Close</button>
|
|
445
|
-
</hlm-sheet-footer>
|
|
446
|
-
</hlm-sheet-content>
|
|
447
|
-
</hlm-sheet>
|
|
448
|
-
`,
|
|
163
|
+
template: "\n @let _title = title();\n @let _content = content();\n\n <hlm-sheet id=\"eg-layout-simple-sidebar\" [side]=\"side() ?? 'left'\">\n <hlm-sheet-content *brnSheetContent=\"let ctx\" class=\"gap-0\">\n @if (_title) {\n <hlm-sheet-header>\n <h3 hlmSheetTitle>{{ _title }}</h3>\n </hlm-sheet-header>\n }\n\n @if (_content) {\n <ng-container *ngTemplateOutlet=\"_content; context: contentContext()\"></ng-container>\n }\n\n <hlm-sheet-footer>\n <button brnSheetClose hlmButton variant=\"secondary\" appearance=\"outline-filled\">Close</button>\n </hlm-sheet-footer>\n </hlm-sheet-content>\n </hlm-sheet>\n ",
|
|
449
164
|
}]
|
|
450
165
|
}], ctorParameters: () => [], propDecorators: { viewchildSheetRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => BrnSheet), { isSignal: true }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], contentContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentContext", required: false }] }] } });
|
|
451
166
|
|
|
@@ -460,111 +175,30 @@ class EgLayoutSimpleMobileMenuGroup {
|
|
|
460
175
|
item.action?.();
|
|
461
176
|
this.itemClick.emit(item);
|
|
462
177
|
}
|
|
463
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
464
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
465
|
-
@let _label = label();
|
|
466
|
-
@let _items = items();
|
|
467
|
-
|
|
468
|
-
@if (_items && _items.length > 0) {
|
|
469
|
-
@if (_label) {
|
|
470
|
-
<div class="px-3 py-1 text-xs font-semibold text-muted-foreground">{{ _label }}</div>
|
|
471
|
-
}
|
|
472
|
-
<div class="flex flex-col">
|
|
473
|
-
@for (item of _items; track item.label) {
|
|
474
|
-
@if (item.link) {
|
|
475
|
-
<a
|
|
476
|
-
[routerLink]="item.link"
|
|
477
|
-
[class]="
|
|
478
|
-
hlm(
|
|
479
|
-
'cursor-pointer no-underline px-3 py-2 text-sm hover:bg-secondary rounded-sm flex items-center gap-2'
|
|
480
|
-
)
|
|
481
|
-
"
|
|
482
|
-
(click)="handleClick(item)"
|
|
483
|
-
>
|
|
484
|
-
@if (item.icon) {
|
|
485
|
-
<ng-icon [svg]="item.icon" size="1rem" [class]="hlm('cursor-pointer mr-2')"> </ng-icon>
|
|
486
|
-
}
|
|
487
|
-
<span>{{ item.label }}</span>
|
|
488
|
-
</a>
|
|
489
|
-
} @else {
|
|
490
|
-
<button
|
|
491
|
-
type="button"
|
|
492
|
-
(click)="handleClick(item)"
|
|
493
|
-
[class]="
|
|
494
|
-
hlm(
|
|
495
|
-
'cursor-pointer no-underline px-3 py-2 text-sm hover:bg-secondary rounded-sm flex items-center gap-2 bg-transparent border-0 text-left w-full'
|
|
496
|
-
)
|
|
497
|
-
"
|
|
498
|
-
>
|
|
499
|
-
@if (item.icon) {
|
|
500
|
-
<ng-icon [svg]="item.icon" size="1rem" [class]="hlm('cursor-pointer mr-2')"> </ng-icon>
|
|
501
|
-
}
|
|
502
|
-
<span>{{ item.label }}</span>
|
|
503
|
-
</button>
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
</div>
|
|
507
|
-
}
|
|
508
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
|
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleMobileMenuGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
179
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgLayoutSimpleMobileMenuGroup, isStandalone: true, selector: "eg-layout-simple-mobile-menu-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, providers: [], ngImport: i0, template: "\n @let _label = label();\n @let _items = items();\n\n @if (_items && _items.length > 0) {\n @if (_label) {\n <div class=\"px-3 py-1 text-xs font-semibold text-muted-foreground\">{{ _label }}</div>\n }\n <div class=\"flex flex-col\">\n @for (item of _items; track item.label) {\n @if (item.link) {\n <a\n [routerLink]=\"item.link\"\n [class]=\"\n hlm(\n 'tw:cursor-pointer tw:no-underline tw:px-3 tw:py-2 tw:text-sm tw:hover:bg-secondary tw:rounded-sm tw:flex tw:items-center tw:gap-2'\n )\n \"\n (click)=\"handleClick(item)\"\n >\n @if (item.icon) {\n <ng-icon [svg]=\"item.icon\" size=\"1rem\" [class]=\"hlm('tw:cursor-pointer tw:mr-2')\"> </ng-icon>\n }\n <span>{{ item.label }}</span>\n </a>\n } @else {\n <button\n type=\"button\"\n (click)=\"handleClick(item)\"\n [class]=\"\n hlm(\n 'tw:cursor-pointer tw:no-underline tw:px-3 tw:py-2 tw:text-sm tw:hover:bg-secondary tw:rounded-sm tw:flex tw:items-center tw:gap-2 tw:bg-transparent tw:border-0 tw:text-left tw:w-full'\n )\n \"\n >\n @if (item.icon) {\n <ng-icon [svg]=\"item.icon\" size=\"1rem\" [class]=\"hlm('tw:cursor-pointer tw:mr-2')\"> </ng-icon>\n }\n <span>{{ item.label }}</span>\n </button>\n }\n }\n </div>\n }\n ", isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
|
|
509
180
|
}
|
|
510
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleMobileMenuGroup, decorators: [{
|
|
511
182
|
type: Component,
|
|
512
183
|
args: [{
|
|
513
184
|
selector: 'eg-layout-simple-mobile-menu-group',
|
|
514
185
|
imports: [NgIcon, RouterLink],
|
|
515
186
|
providers: [],
|
|
516
|
-
template:
|
|
517
|
-
@let _label = label();
|
|
518
|
-
@let _items = items();
|
|
519
|
-
|
|
520
|
-
@if (_items && _items.length > 0) {
|
|
521
|
-
@if (_label) {
|
|
522
|
-
<div class="px-3 py-1 text-xs font-semibold text-muted-foreground">{{ _label }}</div>
|
|
523
|
-
}
|
|
524
|
-
<div class="flex flex-col">
|
|
525
|
-
@for (item of _items; track item.label) {
|
|
526
|
-
@if (item.link) {
|
|
527
|
-
<a
|
|
528
|
-
[routerLink]="item.link"
|
|
529
|
-
[class]="
|
|
530
|
-
hlm(
|
|
531
|
-
'cursor-pointer no-underline px-3 py-2 text-sm hover:bg-secondary rounded-sm flex items-center gap-2'
|
|
532
|
-
)
|
|
533
|
-
"
|
|
534
|
-
(click)="handleClick(item)"
|
|
535
|
-
>
|
|
536
|
-
@if (item.icon) {
|
|
537
|
-
<ng-icon [svg]="item.icon" size="1rem" [class]="hlm('cursor-pointer mr-2')"> </ng-icon>
|
|
538
|
-
}
|
|
539
|
-
<span>{{ item.label }}</span>
|
|
540
|
-
</a>
|
|
541
|
-
} @else {
|
|
542
|
-
<button
|
|
543
|
-
type="button"
|
|
544
|
-
(click)="handleClick(item)"
|
|
545
|
-
[class]="
|
|
546
|
-
hlm(
|
|
547
|
-
'cursor-pointer no-underline px-3 py-2 text-sm hover:bg-secondary rounded-sm flex items-center gap-2 bg-transparent border-0 text-left w-full'
|
|
548
|
-
)
|
|
549
|
-
"
|
|
550
|
-
>
|
|
551
|
-
@if (item.icon) {
|
|
552
|
-
<ng-icon [svg]="item.icon" size="1rem" [class]="hlm('cursor-pointer mr-2')"> </ng-icon>
|
|
553
|
-
}
|
|
554
|
-
<span>{{ item.label }}</span>
|
|
555
|
-
</button>
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
</div>
|
|
559
|
-
}
|
|
560
|
-
`,
|
|
187
|
+
template: "\n @let _label = label();\n @let _items = items();\n\n @if (_items && _items.length > 0) {\n @if (_label) {\n <div class=\"px-3 py-1 text-xs font-semibold text-muted-foreground\">{{ _label }}</div>\n }\n <div class=\"flex flex-col\">\n @for (item of _items; track item.label) {\n @if (item.link) {\n <a\n [routerLink]=\"item.link\"\n [class]=\"\n hlm(\n 'tw:cursor-pointer tw:no-underline tw:px-3 tw:py-2 tw:text-sm tw:hover:bg-secondary tw:rounded-sm tw:flex tw:items-center tw:gap-2'\n )\n \"\n (click)=\"handleClick(item)\"\n >\n @if (item.icon) {\n <ng-icon [svg]=\"item.icon\" size=\"1rem\" [class]=\"hlm('tw:cursor-pointer tw:mr-2')\"> </ng-icon>\n }\n <span>{{ item.label }}</span>\n </a>\n } @else {\n <button\n type=\"button\"\n (click)=\"handleClick(item)\"\n [class]=\"\n hlm(\n 'tw:cursor-pointer tw:no-underline tw:px-3 tw:py-2 tw:text-sm tw:hover:bg-secondary tw:rounded-sm tw:flex tw:items-center tw:gap-2 tw:bg-transparent tw:border-0 tw:text-left tw:w-full'\n )\n \"\n >\n @if (item.icon) {\n <ng-icon [svg]=\"item.icon\" size=\"1rem\" [class]=\"hlm('tw:cursor-pointer tw:mr-2')\"> </ng-icon>\n }\n <span>{{ item.label }}</span>\n </button>\n }\n }\n </div>\n }\n ",
|
|
561
188
|
}]
|
|
562
189
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
|
|
563
190
|
|
|
564
|
-
|
|
565
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Single viewport contract for the shell: below Tailwind's `md` (768px) breakpoint the
|
|
193
|
+
* mobile menu trigger replaces all desktop navigation rows. CSS (`tw:hidden tw:md:flex`)
|
|
194
|
+
* and runtime rendering both derive from this one boundary.
|
|
195
|
+
*/
|
|
196
|
+
const EG_LAYOUT_SIMPLE_MOBILE_BREAKPOINT = '(max-width: 767.98px)';
|
|
197
|
+
const commonLinkGroupClasses = "hidden md:flex space-x-4 items-center";
|
|
198
|
+
const commonLinkClasses = "text-left text-secondary visited:text-secondary hover:text-primary cursor-pointer no-underline";
|
|
566
199
|
class EgLayoutSimple {
|
|
567
200
|
breakpointObserver;
|
|
201
|
+
destroyRef = inject(DestroyRef);
|
|
568
202
|
hlm = hlm;
|
|
569
203
|
menuIcon = lucideMenu;
|
|
570
204
|
sidebarEnabled = input(false, /* @ts-ignore */
|
|
@@ -573,6 +207,12 @@ class EgLayoutSimple {
|
|
|
573
207
|
...(ngDevMode ? [{ debugName: "sidebarTitle" }] : /* istanbul ignore next */ []));
|
|
574
208
|
sidebarContent = input(/* @ts-ignore */
|
|
575
209
|
...(ngDevMode ? [undefined, { debugName: "sidebarContent" }] : /* istanbul ignore next */ []));
|
|
210
|
+
/** Accessible name for the icon-only sidebar trigger. */
|
|
211
|
+
sidebarToggleLabel = input('Open navigation sidebar', /* @ts-ignore */
|
|
212
|
+
...(ngDevMode ? [{ debugName: "sidebarToggleLabel" }] : /* istanbul ignore next */ []));
|
|
213
|
+
/** Accessible name for the icon-only mobile menu trigger. */
|
|
214
|
+
mobileMenuLabel = input('Open navigation menu', /* @ts-ignore */
|
|
215
|
+
...(ngDevMode ? [{ debugName: "mobileMenuLabel" }] : /* istanbul ignore next */ []));
|
|
576
216
|
userMenuTrigger = input(/* @ts-ignore */
|
|
577
217
|
...(ngDevMode ? [undefined, { debugName: "userMenuTrigger" }] : /* istanbul ignore next */ []));
|
|
578
218
|
/** Menu data inputs */
|
|
@@ -619,29 +259,29 @@ class EgLayoutSimple {
|
|
|
619
259
|
searchTransformValueToSearch = input(/* @ts-ignore */
|
|
620
260
|
...(ngDevMode ? [undefined, { debugName: "searchTransformValueToSearch" }] : /* istanbul ignore next */ []));
|
|
621
261
|
searchOptionChange = output();
|
|
622
|
-
_logoClass = computed(() => hlm(
|
|
262
|
+
_logoClass = computed(() => hlm("h-10", this.logoClass()), /* @ts-ignore */
|
|
623
263
|
...(ngDevMode ? [{ debugName: "_logoClass" }] : /* istanbul ignore next */ []));
|
|
624
|
-
_headerClass = computed(() => hlm(
|
|
264
|
+
_headerClass = computed(() => hlm("px-4 py-2 flex items-center justify-between bg-gray-100 border-b border-gray-300", this.headerClass()), /* @ts-ignore */
|
|
625
265
|
...(ngDevMode ? [{ debugName: "_headerClass" }] : /* istanbul ignore next */ []));
|
|
626
|
-
_contentClass = computed(() => hlm(
|
|
266
|
+
_contentClass = computed(() => hlm("p-4 flex flex-col flex-1", this.contentClass()), /* @ts-ignore */
|
|
627
267
|
...(ngDevMode ? [{ debugName: "_contentClass" }] : /* istanbul ignore next */ []));
|
|
628
|
-
_contentBottomClass = computed(() => hlm(
|
|
268
|
+
_contentBottomClass = computed(() => hlm("flex-1", this.contentBottomClass()), /* @ts-ignore */
|
|
629
269
|
...(ngDevMode ? [{ debugName: "_contentBottomClass" }] : /* istanbul ignore next */ []));
|
|
630
270
|
/** Computed merged classes for containers */
|
|
631
271
|
_computedLeftClass = computed(() => hlm(commonLinkGroupClasses, this.leftMenuClass()), /* @ts-ignore */
|
|
632
272
|
...(ngDevMode ? [{ debugName: "_computedLeftClass" }] : /* istanbul ignore next */ []));
|
|
633
273
|
_computedRightClass = computed(() => hlm(commonLinkGroupClasses, this.rightMenuClass()), /* @ts-ignore */
|
|
634
274
|
...(ngDevMode ? [{ debugName: "_computedRightClass" }] : /* istanbul ignore next */ []));
|
|
635
|
-
_computedTopClass = computed(() => hlm(
|
|
275
|
+
_computedTopClass = computed(() => hlm("hidden md:flex flex-wrap items-center gap-x-4 gap-y-1 px-4 py-2 bg-gray-50 border-b border-gray-200", this.topMenuClass()), /* @ts-ignore */
|
|
636
276
|
...(ngDevMode ? [{ debugName: "_computedTopClass" }] : /* istanbul ignore next */ []));
|
|
637
|
-
_computedTopSecondaryClass = computed(() => hlm(
|
|
277
|
+
_computedTopSecondaryClass = computed(() => hlm("hidden md:flex flex-wrap items-center gap-x-4 gap-y-1 px-4 py-1.5 bg-gray-100/60 border-b border-gray-200", this.topMenuClass()), /* @ts-ignore */
|
|
638
278
|
...(ngDevMode ? [{ debugName: "_computedTopSecondaryClass" }] : /* istanbul ignore next */ []));
|
|
639
279
|
/** Computed merged classes for link/button elements */
|
|
640
280
|
_computedLeftLinkClass = computed(() => hlm(commonLinkClasses, this.leftLinkClass()), /* @ts-ignore */
|
|
641
281
|
...(ngDevMode ? [{ debugName: "_computedLeftLinkClass" }] : /* istanbul ignore next */ []));
|
|
642
282
|
_computedRightLinkClass = computed(() => hlm(commonLinkClasses, this.rightLinkClass()), /* @ts-ignore */
|
|
643
283
|
...(ngDevMode ? [{ debugName: "_computedRightLinkClass" }] : /* istanbul ignore next */ []));
|
|
644
|
-
_computedTopLinkClass = computed(() => hlm(
|
|
284
|
+
_computedTopLinkClass = computed(() => hlm("text-secondary visited:text-secondary hover:text-primary cursor-pointer no-underline text-sm", this.topLinkClass()), /* @ts-ignore */
|
|
645
285
|
...(ngDevMode ? [{ debugName: "_computedTopLinkClass" }] : /* istanbul ignore next */ []));
|
|
646
286
|
mobileMenuItemClass = commonLinkClasses;
|
|
647
287
|
footerEnabled = input(false, /* @ts-ignore */
|
|
@@ -653,24 +293,53 @@ class EgLayoutSimple {
|
|
|
653
293
|
footerContent = input('© 2024 My Company', /* @ts-ignore */
|
|
654
294
|
...(ngDevMode ? [{ debugName: "footerContent" }] : /* istanbul ignore next */ []));
|
|
655
295
|
footerClass = input('', { ...(ngDevMode ? { debugName: "footerClass" } : /* istanbul ignore next */ {}), alias: 'footerClass' });
|
|
656
|
-
_footerClass = computed(() => hlm(
|
|
296
|
+
_footerClass = computed(() => hlm("px-4 py-4 bg-gray-100 border-t border-gray-300 text-sm text-gray-600", this.footerClass()), /* @ts-ignore */
|
|
657
297
|
...(ngDevMode ? [{ debugName: "_footerClass" }] : /* istanbul ignore next */ []));
|
|
658
|
-
_computedFooterMenuClass = computed(() => hlm(
|
|
298
|
+
_computedFooterMenuClass = computed(() => hlm("flex flex-wrap justify-center space-x-4", this.footerMenuClass()), /* @ts-ignore */
|
|
659
299
|
...(ngDevMode ? [{ debugName: "_computedFooterMenuClass" }] : /* istanbul ignore next */ []));
|
|
660
|
-
_computedFooterLinkClass = computed(() => hlm(
|
|
300
|
+
_computedFooterLinkClass = computed(() => hlm("text-secondary hover:text-primary cursor-pointer no-underline", this.footerLinkClass()), /* @ts-ignore */
|
|
661
301
|
...(ngDevMode ? [{ debugName: "_computedFooterLinkClass" }] : /* istanbul ignore next */ []));
|
|
662
302
|
/** Mobile menu state */
|
|
663
|
-
mobileMenuOpen = false
|
|
303
|
+
mobileMenuOpen = signal(false, /* @ts-ignore */
|
|
304
|
+
...(ngDevMode ? [{ debugName: "mobileMenuOpen" }] : /* istanbul ignore next */ []));
|
|
664
305
|
isMobile = signal(false, /* @ts-ignore */
|
|
665
306
|
...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
|
|
307
|
+
/** Expanded state of the sidebar sheet, kept in sync with BrnSheet state changes. */
|
|
308
|
+
sidebarOpen = signal(false, /* @ts-ignore */
|
|
309
|
+
...(ngDevMode ? [{ debugName: "sidebarOpen" }] : /* istanbul ignore next */ []));
|
|
666
310
|
constructor(breakpointObserver) {
|
|
667
311
|
this.breakpointObserver = breakpointObserver;
|
|
668
|
-
this.breakpointObserver
|
|
312
|
+
this.breakpointObserver
|
|
313
|
+
.observe([EG_LAYOUT_SIMPLE_MOBILE_BREAKPOINT])
|
|
314
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
315
|
+
.subscribe((result) => {
|
|
669
316
|
this.isMobile.set(result.matches);
|
|
670
317
|
});
|
|
318
|
+
effect(() => {
|
|
319
|
+
// Desktop navigation replaces the mobile menu above the breakpoint, so an
|
|
320
|
+
// open mobile menu must not cross the boundary into desktop layout.
|
|
321
|
+
if (!this.isMobile() && this.mobileMenuOpen()) {
|
|
322
|
+
this.mobileMenuOpen.set(false);
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
effect((onCleanup) => {
|
|
326
|
+
const sheet = this.viewchildSheetRef()?.viewchildSheetRef();
|
|
327
|
+
if (!sheet)
|
|
328
|
+
return;
|
|
329
|
+
this.sidebarOpen.set(sheet.stateComputed() === 'open');
|
|
330
|
+
const subscriptions = [
|
|
331
|
+
sheet.stateChanged.subscribe((state) => this.sidebarOpen.set(state === 'open')),
|
|
332
|
+
// Escape/backdrop closes complete the dialog without a 'closed' state emission.
|
|
333
|
+
sheet.closed.subscribe(() => this.sidebarOpen.set(false)),
|
|
334
|
+
];
|
|
335
|
+
onCleanup(() => subscriptions.forEach((subscription) => subscription.unsubscribe()));
|
|
336
|
+
});
|
|
671
337
|
}
|
|
672
338
|
toggleMobileMenu() {
|
|
673
|
-
this.mobileMenuOpen
|
|
339
|
+
this.mobileMenuOpen.update((open) => !open);
|
|
340
|
+
}
|
|
341
|
+
closeMobileMenu() {
|
|
342
|
+
this.mobileMenuOpen.set(false);
|
|
674
343
|
}
|
|
675
344
|
onSearchOptionChange(value) {
|
|
676
345
|
this.searchOptionChange.emit(value);
|
|
@@ -683,14 +352,14 @@ class EgLayoutSimple {
|
|
|
683
352
|
closeSidebar() {
|
|
684
353
|
this.viewchildSheetRef()?.closeSheet();
|
|
685
354
|
}
|
|
686
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
687
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
355
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimple, deps: [{ token: i1$2.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component });
|
|
356
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgLayoutSimple, isStandalone: true, selector: "eg-layout-simple", inputs: { sidebarEnabled: { classPropertyName: "sidebarEnabled", publicName: "sidebarEnabled", isSignal: true, isRequired: false, transformFunction: null }, sidebarTitle: { classPropertyName: "sidebarTitle", publicName: "sidebarTitle", isSignal: true, isRequired: false, transformFunction: null }, sidebarContent: { classPropertyName: "sidebarContent", publicName: "sidebarContent", isSignal: true, isRequired: false, transformFunction: null }, sidebarToggleLabel: { classPropertyName: "sidebarToggleLabel", publicName: "sidebarToggleLabel", isSignal: true, isRequired: false, transformFunction: null }, mobileMenuLabel: { classPropertyName: "mobileMenuLabel", publicName: "mobileMenuLabel", isSignal: true, isRequired: false, transformFunction: null }, userMenuTrigger: { classPropertyName: "userMenuTrigger", publicName: "userMenuTrigger", isSignal: true, isRequired: false, transformFunction: null }, leftMenus: { classPropertyName: "leftMenus", publicName: "leftMenus", isSignal: true, isRequired: false, transformFunction: null }, leftMenuGroups: { classPropertyName: "leftMenuGroups", publicName: "leftMenuGroups", isSignal: true, isRequired: false, transformFunction: null }, rightMenus: { classPropertyName: "rightMenus", publicName: "rightMenus", isSignal: true, isRequired: false, transformFunction: null }, topMenus: { classPropertyName: "topMenus", publicName: "topMenus", isSignal: true, isRequired: false, transformFunction: null }, topSecondaryMenus: { classPropertyName: "topSecondaryMenus", publicName: "topSecondaryMenus", isSignal: true, isRequired: false, transformFunction: null }, userMenus: { classPropertyName: "userMenus", publicName: "userMenus", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, logoLink: { classPropertyName: "logoLink", publicName: "logoLink", isSignal: true, isRequired: false, transformFunction: null }, logoClass: { classPropertyName: "logoClass", publicName: "logoClass", isSignal: true, isRequired: false, transformFunction: null }, headerClass: { classPropertyName: "headerClass", publicName: "headerClass", isSignal: true, isRequired: false, transformFunction: null }, contentClass: { classPropertyName: "contentClass", publicName: "contentClass", isSignal: true, isRequired: false, transformFunction: null }, contentBottomClass: { classPropertyName: "contentBottomClass", publicName: "contentBottomClass", isSignal: true, isRequired: false, transformFunction: null }, leftMenuClass: { classPropertyName: "leftMenuClass", publicName: "leftClass", isSignal: true, isRequired: false, transformFunction: null }, rightMenuClass: { classPropertyName: "rightMenuClass", publicName: "rightClass", isSignal: true, isRequired: false, transformFunction: null }, topMenuClass: { classPropertyName: "topMenuClass", publicName: "topClass", isSignal: true, isRequired: false, transformFunction: null }, leftLinkClass: { classPropertyName: "leftLinkClass", publicName: "leftLinkClass", isSignal: true, isRequired: false, transformFunction: null }, rightLinkClass: { classPropertyName: "rightLinkClass", publicName: "rightLinkClass", isSignal: true, isRequired: false, transformFunction: null }, topLinkClass: { classPropertyName: "topLinkClass", publicName: "topLinkClass", isSignal: true, isRequired: false, transformFunction: null }, searchEnabled: { classPropertyName: "searchEnabled", publicName: "searchEnabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholderText: { classPropertyName: "searchPlaceholderText", publicName: "searchPlaceholderText", isSignal: true, isRequired: false, transformFunction: null }, searchEmptyText: { classPropertyName: "searchEmptyText", publicName: "searchEmptyText", isSignal: true, isRequired: false, transformFunction: null }, searchOptionTemplate: { classPropertyName: "searchOptionTemplate", publicName: "searchOptionTemplate", isSignal: true, isRequired: false, transformFunction: null }, searchLoaderFn: { classPropertyName: "searchLoaderFn", publicName: "searchLoaderFn", isSignal: true, isRequired: false, transformFunction: null }, searchTransformValueToSearch: { classPropertyName: "searchTransformValueToSearch", publicName: "searchTransformValueToSearch", isSignal: true, isRequired: false, transformFunction: null }, footerEnabled: { classPropertyName: "footerEnabled", publicName: "footerEnabled", isSignal: true, isRequired: false, transformFunction: null }, footerMenus: { classPropertyName: "footerMenus", publicName: "footerMenus", isSignal: true, isRequired: false, transformFunction: null }, footerMenuClass: { classPropertyName: "footerMenuClass", publicName: "footerMenuClass", isSignal: true, isRequired: false, transformFunction: null }, footerLinkClass: { classPropertyName: "footerLinkClass", publicName: "footerLinkClass", isSignal: true, isRequired: false, transformFunction: null }, footerContent: { classPropertyName: "footerContent", publicName: "footerContent", isSignal: true, isRequired: false, transformFunction: null }, footerClass: { classPropertyName: "footerClass", publicName: "footerClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchOptionChange: "searchOptionChange" }, providers: [
|
|
688
357
|
provideIcons({
|
|
689
358
|
lucideMenu,
|
|
690
359
|
}),
|
|
691
|
-
], viewQueries: [{ propertyName: "viewchildSheetRef", first: true, predicate: EgLayoutSimpleSidebar, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #menuIconTemplate>\n <ng-icon [svg]=\"menuIcon\" size=\"20px\" class=\"[&_svg]:w-[inherit]! [&_svg]:h-[inherit]!\" />\n</ng-template>\n\n<eg-layout-simple-sidebar\n [title]=\"sidebarTitle()\"\n [content]=\"sidebarContent()\"\n [contentContext]=\"{ close: closeSidebar.bind(this) }\"\n/>\n\n<div class=\"flex flex-col min-h-screen\">\n <!-- Header -->\n <header [class]=\"_headerClass()\">\n <div class=\"flex items-center space-x-4\">\n @if (sidebarEnabled()) {\n <button\n hlmButton\n variant=\"secondary\"\n appearance=\"outline\"\n size=\"icon\"\n [icon]=\"menuIconTemplate\"\n iconPosition=\"left\"\n class=\"bg-transparent! border-gray-400! hover:border-gray-500!\"\n (click)=\"openSidebar()\"\n ></button>\n }\n\n <div class=\"logo\">\n <a [routerLink]=\"logoLink()\">\n <img [src]=\"logo()\" alt=\"Logo\" [class]=\"_logoClass()\" />\n </a>\n </div>\n <!-- Left menus (desktop) -->\n <nav [class]=\"_computedLeftClass()\">\n @for (item of leftMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedLeftLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedLeftLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } } @for (group of leftMenuGroups(); track $index) {\n <div class=\"relative group\">\n <button\n type=\"button\"\n class=\"text-left text-secondary hover:text-primary cursor-pointer no-underline py-1 flex items-center gap-1\"\n >\n {{ group.label ?? 'Menu' }}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-3 w-3\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M19 9l-7 7-7-7\" />\n </svg>\n </button>\n <div\n class=\"absolute left-0 top-full mt-1 hidden group-hover:flex flex-col min-w-[12rem] bg-popover text-popover-foreground border border-gray-200 rounded-md shadow-md py-1 z-50\"\n >\n @if (group.label) {\n <div class=\"px-3 py-1 text-xs font-semibold text-muted-foreground\">{{ group.label }}</div>\n } @for (item of group.items; track item.label) { @if (item.link) {\n <a\n [routerLink]=\"item.link\"\n [class]=\"hlm('px-3 py-1.5 text-sm no-underline hover:bg-secondary cursor-pointer', item.class || '')\"\n >\n {{ item.label }}\n </a>\n } @else {\n <button\n type=\"button\"\n (click)=\"item.action?.()\"\n [class]=\"hlm('px-3 py-1.5 text-sm text-left hover:bg-secondary cursor-pointer bg-transparent border-0 w-full', item.class || '')\"\n >\n {{ item.label }}\n </button>\n } }\n </div>\n </div>\n }\n </nav>\n </div>\n\n <!-- Right menus (desktop) -->\n <nav [class]=\"_computedRightClass()\">\n @if (searchEnabled()) {\n <eg-generic-autocomplete\n [loaderFn]=\"searchLoaderFn()\"\n [transformValueToSearch]=\"searchTransformValueToSearch()\"\n [placeholderText]=\"searchPlaceholderText()\"\n [emptyText]=\"searchEmptyText()\"\n (optionChange)=\"onSearchOptionChange($event)\"\n ></eg-generic-autocomplete>\n } @for (item of rightMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedRightLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedRightLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } } @let uMenus = userMenus(); @if (uMenus && uMenus.length > 0) {\n <eg-layout-simple-user-menu [menus]=\"uMenus\" [menuTrigger]=\"userMenuTrigger()\" />\n }\n </nav>\n\n <!-- Mobile menu button -->\n <button\n (click)=\"toggleMobileMenu()\"\n class=\"md:hidden p-2 text-gray-700 hover:text-primary focus:outline-none cursor-pointer\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-6 w-6\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 6h16M4 12h16M4 18h16\" />\n </svg>\n </button>\n </header>\n\n @let _topMenus = leftMenus().concat(rightMenus()); @let _userMenus = userMenus(); @let _leftMenuGroups =\n leftMenuGroups(); @let _topMenuItems = topMenus(); @let _topSecondaryGroups = topSecondaryMenus();\n\n <!-- Top menus (desktop) -->\n @if (_topMenuItems.length > 0) {\n <nav [class]=\"_computedTopClass()\">\n @for (item of _topMenuItems; track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedTopLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <span [class]=\"hlm(_computedTopLinkClass(), item.class || '')\">{{ item.label }}</span>\n } }\n </nav>\n }\n\n <!-- Top secondary menus (desktop) \u2014 second row showing items grouped by parent label -->\n @if (_topSecondaryGroups.length > 0) {\n <nav [class]=\"_computedTopSecondaryClass()\">\n @for (group of _topSecondaryGroups; track group.label) {\n <span class=\"flex flex-wrap items-center gap-x-3\">\n @if (group.label) {\n <span class=\"text-xs font-semibold uppercase text-muted-foreground\">{{ group.label }}</span>\n } @for (item of group.items; track item.label) { @if (item.link) {\n <a\n [routerLink]=\"item.link\"\n [class]=\"hlm(_computedTopLinkClass(), 'text-xs hover:underline', item.class || '')\"\n >\n {{ item.label }}\n </a>\n } @else {\n <button\n type=\"button\"\n (click)=\"item.action?.()\"\n [class]=\"hlm(_computedTopLinkClass(), 'text-xs hover:underline', item.class || '')\"\n >\n {{ item.label }}\n </button>\n } }\n </span>\n }\n </nav>\n }\n\n <!-- Mobile menu -->\n @if (isMobile() && mobileMenuOpen) {\n <div class=\"w-full border-none\">\n @if (_topMenuItems.length > 0) {\n <eg-layout-simple-mobile-menu-group [items]=\"_topMenuItems\" (itemClick)=\"toggleMobileMenu()\" />\n }\n\n @for (group of _topSecondaryGroups; track group.label) { @if (group.items && group.items.length > 0) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"group.items\"\n [label]=\"group.label\"\n (itemClick)=\"toggleMobileMenu()\"\n ></eg-layout-simple-mobile-menu-group>\n } }\n\n <eg-layout-simple-mobile-menu-group [items]=\"_topMenus\" (itemClick)=\"toggleMobileMenu()\" />\n\n @for (group of _leftMenuGroups; track $index) { @if (group.items && group.items.length > 0) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"group.items\"\n [label]=\"group.label\"\n (itemClick)=\"toggleMobileMenu()\"\n ></eg-layout-simple-mobile-menu-group>\n } } @if ((_topMenus.length > 0 || _leftMenuGroups.length > 0) && _userMenus.length > 0) {\n <hr class=\"border-gray-300 my-2\" />\n } @for (section of userMenus(); track section.label) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"section.items\"\n [label]=\"section.label\"\n (itemClick)=\"toggleMobileMenu()\"\n ></eg-layout-simple-mobile-menu-group>\n\n @if (section.separator) {\n <hr class=\"border-gray-300 my-2\" />\n } }\n </div>\n }\n\n <!-- Main content -->\n <main [class]=\"_contentClass()\">\n @if (!loading()) {\n <div class=\"flex items-center justify-center h-full\">\n <ng-content />\n </div>\n }\n <div [class]=\"_contentBottomClass()\"></div>\n </main>\n\n @if (footerEnabled()) {\n <footer [class]=\"_footerClass()\">\n <nav [class]=\"_computedFooterMenuClass()\">\n @for (item of footerMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedFooterLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedFooterLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } }\n </nav>\n\n <div class=\"mt-2 text-center\">{{ footerContent() }}</div>\n </footer>\n }\n</div>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: EgLayoutSimpleUserMenu, selector: "eg-layout-simple-user-menu", inputs: ["menus", "menuTrigger"] }, { kind: "component", type: EgLayoutSimpleSidebar, selector: "eg-layout-simple-sidebar", inputs: ["side", "title", "content", "contentContext"] }, { kind: "component", type: EgLayoutSimpleMobileMenuGroup, selector: "eg-layout-simple-mobile-menu-group", inputs: ["label", "items"], outputs: ["itemClick"] }, { kind: "component", type: EgGenericAutocomplete, selector: "eg-generic-autocomplete", inputs: ["placeholderText", "emptyText", "loaderFn", "transformValueToSearch"], outputs: ["optionChange"] }, { kind: "component", type: HlmButton, selector: "button[hlmButton], a[hlmButton]", inputs: ["variant", "size", "appearance", "loading", "icon", "iconPosition", "class", "spinnerUserClass", "disabled", "type"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }] });
|
|
360
|
+
], viewQueries: [{ propertyName: "viewchildSheetRef", first: true, predicate: EgLayoutSimpleSidebar, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #menuIconTemplate>\n <ng-icon [svg]=\"menuIcon\" size=\"20px\" class=\"[&_svg]:w-[inherit]! [&_svg]:h-[inherit]!\" />\n</ng-template>\n\n<eg-layout-simple-sidebar\n [title]=\"sidebarTitle()\"\n [content]=\"sidebarContent()\"\n [contentContext]=\"{ close: closeSidebar.bind(this) }\"\n/>\n\n<div class=\"flex flex-col min-h-screen\">\n <!-- Header -->\n <header [class]=\"_headerClass()\">\n <div class=\"flex items-center space-x-4\">\n @if (sidebarEnabled()) {\n <button\n hlmButton\n variant=\"secondary\"\n appearance=\"outline\"\n size=\"icon\"\n [icon]=\"menuIconTemplate\"\n iconPosition=\"left\"\n class=\"bg-transparent! border-gray-400! hover:border-gray-500!\"\n [attr.aria-label]=\"sidebarToggleLabel()\"\n [attr.aria-expanded]=\"sidebarOpen()\"\n aria-controls=\"eg-layout-simple-sidebar\"\n (click)=\"openSidebar()\"\n ></button>\n }\n\n <div class=\"logo\">\n <a [routerLink]=\"logoLink()\">\n <img [src]=\"logo()\" alt=\"Logo\" [class]=\"_logoClass()\" />\n </a>\n </div>\n <!-- Left menus (desktop) -->\n <nav [class]=\"_computedLeftClass()\">\n @for (item of leftMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedLeftLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedLeftLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } } @for (group of leftMenuGroups(); track $index) {\n <div class=\"relative group\">\n <button\n type=\"button\"\n class=\"text-left text-secondary hover:text-primary cursor-pointer no-underline py-1 flex items-center gap-1\"\n >\n {{ group.label ?? 'Menu' }}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-3 w-3\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M19 9l-7 7-7-7\" />\n </svg>\n </button>\n <div\n class=\"absolute left-0 top-full mt-1 hidden group-hover:flex flex-col min-w-[12rem] bg-popover text-popover-foreground border border-gray-200 rounded-md shadow-md py-1 z-50\"\n >\n @if (group.label) {\n <div class=\"px-3 py-1 text-xs font-semibold text-muted-foreground\">{{ group.label }}</div>\n } @for (item of group.items; track item.label) { @if (item.link) {\n <a\n [routerLink]=\"item.link\"\n [class]=\"hlm('tw:px-3 tw:py-1.5 tw:text-sm tw:no-underline tw:hover:bg-secondary tw:cursor-pointer', item.class || '')\"\n >\n {{ item.label }}\n </a>\n } @else {\n <button\n type=\"button\"\n (click)=\"item.action?.()\"\n [class]=\"hlm('tw:px-3 tw:py-1.5 tw:text-sm tw:text-left tw:hover:bg-secondary tw:cursor-pointer tw:bg-transparent tw:border-0 tw:w-full', item.class || '')\"\n >\n {{ item.label }}\n </button>\n } }\n </div>\n </div>\n }\n </nav>\n </div>\n\n <!-- Right menus (desktop) -->\n <nav [class]=\"_computedRightClass()\">\n @if (searchEnabled()) {\n <eg-generic-autocomplete\n [loaderFn]=\"searchLoaderFn()\"\n [transformValueToSearch]=\"searchTransformValueToSearch()\"\n [placeholderText]=\"searchPlaceholderText()\"\n [emptyText]=\"searchEmptyText()\"\n (optionChange)=\"onSearchOptionChange($event)\"\n ></eg-generic-autocomplete>\n } @for (item of rightMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedRightLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedRightLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } } @let uMenus = userMenus(); @if (uMenus && uMenus.length > 0) {\n <eg-layout-simple-user-menu [menus]=\"uMenus\" [menuTrigger]=\"userMenuTrigger()\" />\n }\n </nav>\n\n <!-- Mobile menu button -->\n <button\n (click)=\"toggleMobileMenu()\"\n class=\"md:hidden p-2 text-gray-700 hover:text-primary focus:outline-none cursor-pointer\"\n [attr.aria-label]=\"mobileMenuLabel()\"\n [attr.aria-expanded]=\"mobileMenuOpen()\"\n aria-controls=\"eg-layout-simple-mobile-menu\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-6 w-6\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 6h16M4 12h16M4 18h16\" />\n </svg>\n </button>\n </header>\n\n @let _topMenus = leftMenus().concat(rightMenus()); @let _userMenus = userMenus(); @let _leftMenuGroups =\n leftMenuGroups(); @let _topMenuItems = topMenus(); @let _topSecondaryGroups = topSecondaryMenus();\n\n <!-- Top menus (desktop) -->\n @if (_topMenuItems.length > 0) {\n <nav [class]=\"_computedTopClass()\">\n @for (item of _topMenuItems; track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedTopLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <span [class]=\"hlm(_computedTopLinkClass(), item.class || '')\">{{ item.label }}</span>\n } }\n </nav>\n }\n\n <!-- Top secondary menus (desktop) — second row showing items grouped by parent label -->\n @if (_topSecondaryGroups.length > 0) {\n <nav [class]=\"_computedTopSecondaryClass()\">\n @for (group of _topSecondaryGroups; track group.label) {\n <span class=\"flex flex-wrap items-center gap-x-3\">\n @if (group.label) {\n <span class=\"text-xs font-semibold uppercase text-muted-foreground\">{{ group.label }}</span>\n } @for (item of group.items; track item.label) { @if (item.link) {\n <a\n [routerLink]=\"item.link\"\n [class]=\"hlm(_computedTopLinkClass(), 'tw:text-xs tw:hover:underline', item.class || '')\"\n >\n {{ item.label }}\n </a>\n } @else {\n <button\n type=\"button\"\n (click)=\"item.action?.()\"\n [class]=\"hlm(_computedTopLinkClass(), 'tw:text-xs tw:hover:underline', item.class || '')\"\n >\n {{ item.label }}\n </button>\n } }\n </span>\n }\n </nav>\n }\n\n <!-- Mobile menu -->\n @if (isMobile() && mobileMenuOpen()) {\n <div id=\"eg-layout-simple-mobile-menu\" class=\"w-full border-none\" (keydown.escape)=\"closeMobileMenu()\">\n @if (_topMenuItems.length > 0) {\n <eg-layout-simple-mobile-menu-group [items]=\"_topMenuItems\" (itemClick)=\"closeMobileMenu()\" />\n } @for (group of _topSecondaryGroups; track group.label) { @if (group.items && group.items.length > 0) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"group.items\"\n [label]=\"group.label\"\n (itemClick)=\"closeMobileMenu()\"\n ></eg-layout-simple-mobile-menu-group>\n } }\n\n <eg-layout-simple-mobile-menu-group [items]=\"_topMenus\" (itemClick)=\"closeMobileMenu()\" />\n\n @for (group of _leftMenuGroups; track $index) { @if (group.items && group.items.length > 0) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"group.items\"\n [label]=\"group.label\"\n (itemClick)=\"closeMobileMenu()\"\n ></eg-layout-simple-mobile-menu-group>\n } } @if ((_topMenus.length > 0 || _leftMenuGroups.length > 0) && _userMenus.length > 0) {\n <hr class=\"border-gray-300 my-2\" />\n } @for (section of userMenus(); track section.label) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"section.items\"\n [label]=\"section.label\"\n (itemClick)=\"closeMobileMenu()\"\n ></eg-layout-simple-mobile-menu-group>\n\n @if (section.separator) {\n <hr class=\"border-gray-300 my-2\" />\n } }\n </div>\n }\n\n <!-- Main content -->\n <main [class]=\"_contentClass()\">\n @if (!loading()) {\n <div class=\"flex items-center justify-center h-full eg-layout-simple-main-content\">\n <ng-content />\n </div>\n }\n <div [class]=\"_contentBottomClass()\"></div>\n </main>\n\n @if (footerEnabled()) {\n <footer [class]=\"_footerClass()\">\n <nav [class]=\"_computedFooterMenuClass()\">\n @for (item of footerMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedFooterLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedFooterLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } }\n </nav>\n\n <div class=\"mt-2 text-center\">{{ footerContent() }}</div>\n </footer>\n }\n</div>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: EgLayoutSimpleUserMenu, selector: "eg-layout-simple-user-menu", inputs: ["menus", "menuTrigger"] }, { kind: "component", type: EgLayoutSimpleSidebar, selector: "eg-layout-simple-sidebar", inputs: ["side", "title", "content", "contentContext"] }, { kind: "component", type: EgLayoutSimpleMobileMenuGroup, selector: "eg-layout-simple-mobile-menu-group", inputs: ["label", "items"], outputs: ["itemClick"] }, { kind: "component", type: EgGenericAutocomplete, selector: "eg-generic-autocomplete", inputs: ["placeholderText", "emptyText", "loaderFn", "transformValueToSearch"], outputs: ["optionChange"] }, { kind: "component", type: HlmButton, selector: "button[hlmButton], a[hlmButton]", inputs: ["variant", "size", "appearance", "loading", "icon", "iconPosition", "class", "spinnerUserClass", "disabled", "type"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }] });
|
|
692
361
|
}
|
|
693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimple, decorators: [{
|
|
694
363
|
type: Component,
|
|
695
364
|
args: [{ selector: 'eg-layout-simple', standalone: true, imports: [
|
|
696
365
|
RouterLink,
|
|
@@ -704,8 +373,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
704
373
|
provideIcons({
|
|
705
374
|
lucideMenu,
|
|
706
375
|
}),
|
|
707
|
-
], template: "<ng-template #menuIconTemplate>\n <ng-icon [svg]=\"menuIcon\" size=\"20px\" class=\"[&_svg]:w-[inherit]! [&_svg]:h-[inherit]!\" />\n</ng-template>\n\n<eg-layout-simple-sidebar\n [title]=\"sidebarTitle()\"\n [content]=\"sidebarContent()\"\n [contentContext]=\"{ close: closeSidebar.bind(this) }\"\n/>\n\n<div class=\"flex flex-col min-h-screen\">\n <!-- Header -->\n <header [class]=\"_headerClass()\">\n <div class=\"flex items-center space-x-4\">\n @if (sidebarEnabled()) {\n <button\n hlmButton\n variant=\"secondary\"\n appearance=\"outline\"\n size=\"icon\"\n [icon]=\"menuIconTemplate\"\n iconPosition=\"left\"\n class=\"bg-transparent! border-gray-400! hover:border-gray-500!\"\n (click)=\"openSidebar()\"\n ></button>\n }\n\n <div class=\"logo\">\n <a [routerLink]=\"logoLink()\">\n <img [src]=\"logo()\" alt=\"Logo\" [class]=\"_logoClass()\" />\n </a>\n </div>\n <!-- Left menus (desktop) -->\n <nav [class]=\"_computedLeftClass()\">\n @for (item of leftMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedLeftLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedLeftLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } } @for (group of leftMenuGroups(); track $index) {\n <div class=\"relative group\">\n <button\n type=\"button\"\n class=\"text-left text-secondary hover:text-primary cursor-pointer no-underline py-1 flex items-center gap-1\"\n >\n {{ group.label ?? 'Menu' }}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-3 w-3\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M19 9l-7 7-7-7\" />\n </svg>\n </button>\n <div\n class=\"absolute left-0 top-full mt-1 hidden group-hover:flex flex-col min-w-[12rem] bg-popover text-popover-foreground border border-gray-200 rounded-md shadow-md py-1 z-50\"\n >\n @if (group.label) {\n <div class=\"px-3 py-1 text-xs font-semibold text-muted-foreground\">{{ group.label }}</div>\n } @for (item of group.items; track item.label) { @if (item.link) {\n <a\n [routerLink]=\"item.link\"\n [class]=\"hlm('px-3 py-1.5 text-sm no-underline hover:bg-secondary cursor-pointer', item.class || '')\"\n >\n {{ item.label }}\n </a>\n } @else {\n <button\n type=\"button\"\n (click)=\"item.action?.()\"\n [class]=\"hlm('px-3 py-1.5 text-sm text-left hover:bg-secondary cursor-pointer bg-transparent border-0 w-full', item.class || '')\"\n >\n {{ item.label }}\n </button>\n } }\n </div>\n </div>\n }\n </nav>\n </div>\n\n <!-- Right menus (desktop) -->\n <nav [class]=\"_computedRightClass()\">\n @if (searchEnabled()) {\n <eg-generic-autocomplete\n [loaderFn]=\"searchLoaderFn()\"\n [transformValueToSearch]=\"searchTransformValueToSearch()\"\n [placeholderText]=\"searchPlaceholderText()\"\n [emptyText]=\"searchEmptyText()\"\n (optionChange)=\"onSearchOptionChange($event)\"\n ></eg-generic-autocomplete>\n } @for (item of rightMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedRightLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedRightLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } } @let uMenus = userMenus(); @if (uMenus && uMenus.length > 0) {\n <eg-layout-simple-user-menu [menus]=\"uMenus\" [menuTrigger]=\"userMenuTrigger()\" />\n }\n </nav>\n\n <!-- Mobile menu button -->\n <button\n (click)=\"toggleMobileMenu()\"\n class=\"md:hidden p-2 text-gray-700 hover:text-primary focus:outline-none cursor-pointer\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-6 w-6\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 6h16M4 12h16M4 18h16\" />\n </svg>\n </button>\n </header>\n\n @let _topMenus = leftMenus().concat(rightMenus()); @let _userMenus = userMenus(); @let _leftMenuGroups =\n leftMenuGroups(); @let _topMenuItems = topMenus(); @let _topSecondaryGroups = topSecondaryMenus();\n\n <!-- Top menus (desktop) -->\n @if (_topMenuItems.length > 0) {\n <nav [class]=\"_computedTopClass()\">\n @for (item of _topMenuItems; track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedTopLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <span [class]=\"hlm(_computedTopLinkClass(), item.class || '')\">{{ item.label }}</span>\n } }\n </nav>\n }\n\n <!-- Top secondary menus (desktop)
|
|
708
|
-
}], ctorParameters: () => [{ type: i1$2.BreakpointObserver }], propDecorators: { sidebarEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarEnabled", required: false }] }], sidebarTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarTitle", required: false }] }], sidebarContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarContent", required: false }] }], userMenuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "userMenuTrigger", required: false }] }], leftMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "leftMenus", required: false }] }], leftMenuGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "leftMenuGroups", required: false }] }], rightMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "rightMenus", required: false }] }], topMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "topMenus", required: false }] }], topSecondaryMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "topSecondaryMenus", required: false }] }], userMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "userMenus", required: false }] }], logo: [{ type: i0.Input, args: [{ isSignal: true, alias: "logo", required: false }] }], logoLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoLink", required: false }] }], logoClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoClass", required: false }] }], headerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerClass", required: false }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }], contentBottomClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentBottomClass", required: false }] }], leftMenuClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "leftClass", required: false }] }], rightMenuClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rightClass", required: false }] }], topMenuClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "topClass", required: false }] }], leftLinkClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "leftLinkClass", required: false }] }], rightLinkClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rightLinkClass", required: false }] }], topLinkClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "topLinkClass", required: false }] }], searchEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchEnabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], searchPlaceholderText: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholderText", required: false }] }], searchEmptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchEmptyText", required: false }] }], searchOptionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchOptionTemplate", required: false }] }], searchLoaderFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLoaderFn", required: false }] }], searchTransformValueToSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchTransformValueToSearch", required: false }] }], searchOptionChange: [{ type: i0.Output, args: ["searchOptionChange"] }], footerEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerEnabled", required: false }] }], footerMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerMenus", required: false }] }], footerMenuClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerMenuClass", required: false }] }], footerLinkClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerLinkClass", required: false }] }], footerContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerContent", required: false }] }], footerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerClass", required: false }] }], viewchildSheetRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => EgLayoutSimpleSidebar), { isSignal: true }] }] } });
|
|
376
|
+
], template: "<ng-template #menuIconTemplate>\n <ng-icon [svg]=\"menuIcon\" size=\"20px\" class=\"[&_svg]:w-[inherit]! [&_svg]:h-[inherit]!\" />\n</ng-template>\n\n<eg-layout-simple-sidebar\n [title]=\"sidebarTitle()\"\n [content]=\"sidebarContent()\"\n [contentContext]=\"{ close: closeSidebar.bind(this) }\"\n/>\n\n<div class=\"flex flex-col min-h-screen\">\n <!-- Header -->\n <header [class]=\"_headerClass()\">\n <div class=\"flex items-center space-x-4\">\n @if (sidebarEnabled()) {\n <button\n hlmButton\n variant=\"secondary\"\n appearance=\"outline\"\n size=\"icon\"\n [icon]=\"menuIconTemplate\"\n iconPosition=\"left\"\n class=\"bg-transparent! border-gray-400! hover:border-gray-500!\"\n [attr.aria-label]=\"sidebarToggleLabel()\"\n [attr.aria-expanded]=\"sidebarOpen()\"\n aria-controls=\"eg-layout-simple-sidebar\"\n (click)=\"openSidebar()\"\n ></button>\n }\n\n <div class=\"logo\">\n <a [routerLink]=\"logoLink()\">\n <img [src]=\"logo()\" alt=\"Logo\" [class]=\"_logoClass()\" />\n </a>\n </div>\n <!-- Left menus (desktop) -->\n <nav [class]=\"_computedLeftClass()\">\n @for (item of leftMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedLeftLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedLeftLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } } @for (group of leftMenuGroups(); track $index) {\n <div class=\"relative group\">\n <button\n type=\"button\"\n class=\"text-left text-secondary hover:text-primary cursor-pointer no-underline py-1 flex items-center gap-1\"\n >\n {{ group.label ?? 'Menu' }}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-3 w-3\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M19 9l-7 7-7-7\" />\n </svg>\n </button>\n <div\n class=\"absolute left-0 top-full mt-1 hidden group-hover:flex flex-col min-w-[12rem] bg-popover text-popover-foreground border border-gray-200 rounded-md shadow-md py-1 z-50\"\n >\n @if (group.label) {\n <div class=\"px-3 py-1 text-xs font-semibold text-muted-foreground\">{{ group.label }}</div>\n } @for (item of group.items; track item.label) { @if (item.link) {\n <a\n [routerLink]=\"item.link\"\n [class]=\"hlm('tw:px-3 tw:py-1.5 tw:text-sm tw:no-underline tw:hover:bg-secondary tw:cursor-pointer', item.class || '')\"\n >\n {{ item.label }}\n </a>\n } @else {\n <button\n type=\"button\"\n (click)=\"item.action?.()\"\n [class]=\"hlm('tw:px-3 tw:py-1.5 tw:text-sm tw:text-left tw:hover:bg-secondary tw:cursor-pointer tw:bg-transparent tw:border-0 tw:w-full', item.class || '')\"\n >\n {{ item.label }}\n </button>\n } }\n </div>\n </div>\n }\n </nav>\n </div>\n\n <!-- Right menus (desktop) -->\n <nav [class]=\"_computedRightClass()\">\n @if (searchEnabled()) {\n <eg-generic-autocomplete\n [loaderFn]=\"searchLoaderFn()\"\n [transformValueToSearch]=\"searchTransformValueToSearch()\"\n [placeholderText]=\"searchPlaceholderText()\"\n [emptyText]=\"searchEmptyText()\"\n (optionChange)=\"onSearchOptionChange($event)\"\n ></eg-generic-autocomplete>\n } @for (item of rightMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedRightLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedRightLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } } @let uMenus = userMenus(); @if (uMenus && uMenus.length > 0) {\n <eg-layout-simple-user-menu [menus]=\"uMenus\" [menuTrigger]=\"userMenuTrigger()\" />\n }\n </nav>\n\n <!-- Mobile menu button -->\n <button\n (click)=\"toggleMobileMenu()\"\n class=\"md:hidden p-2 text-gray-700 hover:text-primary focus:outline-none cursor-pointer\"\n [attr.aria-label]=\"mobileMenuLabel()\"\n [attr.aria-expanded]=\"mobileMenuOpen()\"\n aria-controls=\"eg-layout-simple-mobile-menu\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-6 w-6\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 6h16M4 12h16M4 18h16\" />\n </svg>\n </button>\n </header>\n\n @let _topMenus = leftMenus().concat(rightMenus()); @let _userMenus = userMenus(); @let _leftMenuGroups =\n leftMenuGroups(); @let _topMenuItems = topMenus(); @let _topSecondaryGroups = topSecondaryMenus();\n\n <!-- Top menus (desktop) -->\n @if (_topMenuItems.length > 0) {\n <nav [class]=\"_computedTopClass()\">\n @for (item of _topMenuItems; track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedTopLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <span [class]=\"hlm(_computedTopLinkClass(), item.class || '')\">{{ item.label }}</span>\n } }\n </nav>\n }\n\n <!-- Top secondary menus (desktop) — second row showing items grouped by parent label -->\n @if (_topSecondaryGroups.length > 0) {\n <nav [class]=\"_computedTopSecondaryClass()\">\n @for (group of _topSecondaryGroups; track group.label) {\n <span class=\"flex flex-wrap items-center gap-x-3\">\n @if (group.label) {\n <span class=\"text-xs font-semibold uppercase text-muted-foreground\">{{ group.label }}</span>\n } @for (item of group.items; track item.label) { @if (item.link) {\n <a\n [routerLink]=\"item.link\"\n [class]=\"hlm(_computedTopLinkClass(), 'tw:text-xs tw:hover:underline', item.class || '')\"\n >\n {{ item.label }}\n </a>\n } @else {\n <button\n type=\"button\"\n (click)=\"item.action?.()\"\n [class]=\"hlm(_computedTopLinkClass(), 'tw:text-xs tw:hover:underline', item.class || '')\"\n >\n {{ item.label }}\n </button>\n } }\n </span>\n }\n </nav>\n }\n\n <!-- Mobile menu -->\n @if (isMobile() && mobileMenuOpen()) {\n <div id=\"eg-layout-simple-mobile-menu\" class=\"w-full border-none\" (keydown.escape)=\"closeMobileMenu()\">\n @if (_topMenuItems.length > 0) {\n <eg-layout-simple-mobile-menu-group [items]=\"_topMenuItems\" (itemClick)=\"closeMobileMenu()\" />\n } @for (group of _topSecondaryGroups; track group.label) { @if (group.items && group.items.length > 0) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"group.items\"\n [label]=\"group.label\"\n (itemClick)=\"closeMobileMenu()\"\n ></eg-layout-simple-mobile-menu-group>\n } }\n\n <eg-layout-simple-mobile-menu-group [items]=\"_topMenus\" (itemClick)=\"closeMobileMenu()\" />\n\n @for (group of _leftMenuGroups; track $index) { @if (group.items && group.items.length > 0) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"group.items\"\n [label]=\"group.label\"\n (itemClick)=\"closeMobileMenu()\"\n ></eg-layout-simple-mobile-menu-group>\n } } @if ((_topMenus.length > 0 || _leftMenuGroups.length > 0) && _userMenus.length > 0) {\n <hr class=\"border-gray-300 my-2\" />\n } @for (section of userMenus(); track section.label) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"section.items\"\n [label]=\"section.label\"\n (itemClick)=\"closeMobileMenu()\"\n ></eg-layout-simple-mobile-menu-group>\n\n @if (section.separator) {\n <hr class=\"border-gray-300 my-2\" />\n } }\n </div>\n }\n\n <!-- Main content -->\n <main [class]=\"_contentClass()\">\n @if (!loading()) {\n <div class=\"flex items-center justify-center h-full eg-layout-simple-main-content\">\n <ng-content />\n </div>\n }\n <div [class]=\"_contentBottomClass()\"></div>\n </main>\n\n @if (footerEnabled()) {\n <footer [class]=\"_footerClass()\">\n <nav [class]=\"_computedFooterMenuClass()\">\n @for (item of footerMenus(); track item.label) { @if (item.link) {\n <a [routerLink]=\"item.link\" [class]=\"hlm(_computedFooterLinkClass(), item.class || '')\"> {{ item.label }} </a>\n } @else {\n <button type=\"button\" (click)=\"item.action?.()\" [class]=\"hlm(_computedFooterLinkClass(), item.class || '')\">\n {{ item.label }}\n </button>\n } }\n </nav>\n\n <div class=\"mt-2 text-center\">{{ footerContent() }}</div>\n </footer>\n }\n</div>\n" }]
|
|
377
|
+
}], ctorParameters: () => [{ type: i1$2.BreakpointObserver }], propDecorators: { sidebarEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarEnabled", required: false }] }], sidebarTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarTitle", required: false }] }], sidebarContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarContent", required: false }] }], sidebarToggleLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarToggleLabel", required: false }] }], mobileMenuLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileMenuLabel", required: false }] }], userMenuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "userMenuTrigger", required: false }] }], leftMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "leftMenus", required: false }] }], leftMenuGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "leftMenuGroups", required: false }] }], rightMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "rightMenus", required: false }] }], topMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "topMenus", required: false }] }], topSecondaryMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "topSecondaryMenus", required: false }] }], userMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "userMenus", required: false }] }], logo: [{ type: i0.Input, args: [{ isSignal: true, alias: "logo", required: false }] }], logoLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoLink", required: false }] }], logoClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoClass", required: false }] }], headerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerClass", required: false }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }], contentBottomClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentBottomClass", required: false }] }], leftMenuClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "leftClass", required: false }] }], rightMenuClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rightClass", required: false }] }], topMenuClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "topClass", required: false }] }], leftLinkClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "leftLinkClass", required: false }] }], rightLinkClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rightLinkClass", required: false }] }], topLinkClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "topLinkClass", required: false }] }], searchEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchEnabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], searchPlaceholderText: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholderText", required: false }] }], searchEmptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchEmptyText", required: false }] }], searchOptionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchOptionTemplate", required: false }] }], searchLoaderFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLoaderFn", required: false }] }], searchTransformValueToSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchTransformValueToSearch", required: false }] }], searchOptionChange: [{ type: i0.Output, args: ["searchOptionChange"] }], footerEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerEnabled", required: false }] }], footerMenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerMenus", required: false }] }], footerMenuClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerMenuClass", required: false }] }], footerLinkClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerLinkClass", required: false }] }], footerContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerContent", required: false }] }], footerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerClass", required: false }] }], viewchildSheetRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => EgLayoutSimpleSidebar), { isSignal: true }] }] } });
|
|
709
378
|
|
|
710
379
|
/*
|
|
711
380
|
* Public API Surface of layout-simple
|
|
@@ -715,5 +384,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
715
384
|
* Generated bundle index. Do not edit.
|
|
716
385
|
*/
|
|
717
386
|
|
|
718
|
-
export { EgGenericAutocomplete, EgLayoutSimple, EgLayoutSimpleUserMenu };
|
|
719
|
-
|
|
387
|
+
export { EG_LAYOUT_SIMPLE_MOBILE_BREAKPOINT, EgGenericAutocomplete, EgLayoutSimple, EgLayoutSimpleUserMenu };
|
|
388
|
+
|