@egose/shadcn-theme-ng 0.0.27 → 0.0.28
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/accordion/README.md +64 -0
- package/accordion/fesm2022/accordion.mjs +160 -0
- package/accordion/fesm2022/accordion.mjs.map +1 -0
- package/accordion/package.json +25 -0
- package/accordion/types/accordion.d.ts +49 -0
- package/alert/fesm2022/alert.mjs +29 -24
- package/alert/fesm2022/alert.mjs.map +1 -1
- package/alert/package.json +25 -0
- package/alert-dialog/README.md +11 -0
- package/alert-dialog/fesm2022/alert-dialog.mjs +287 -0
- package/alert-dialog/fesm2022/alert-dialog.mjs.map +1 -0
- package/alert-dialog/package.json +25 -0
- package/alert-dialog/types/alert-dialog.d.ts +90 -0
- package/aspect-ratio/README.md +11 -0
- package/aspect-ratio/fesm2022/aspect-ratio.mjs +62 -0
- package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +1 -0
- package/aspect-ratio/package.json +25 -0
- package/aspect-ratio/types/aspect-ratio.d.ts +21 -0
- package/autocomplete/README.md +64 -0
- package/autocomplete/fesm2022/autocomplete.mjs +409 -0
- package/autocomplete/fesm2022/autocomplete.mjs.map +1 -0
- package/autocomplete/package.json +24 -0
- package/autocomplete/types/autocomplete.d.ts +96 -0
- package/avatar/README.md +11 -0
- package/avatar/fesm2022/avatar.mjs +178 -0
- package/avatar/fesm2022/avatar.mjs.map +1 -0
- package/avatar/package.json +25 -0
- package/avatar/types/avatar.d.ts +50 -0
- package/badge/fesm2022/badge.mjs +15 -9
- package/badge/fesm2022/badge.mjs.map +1 -1
- package/badge/package.json +25 -0
- package/basic-alert/fesm2022/basic-alert.mjs +11 -7
- package/basic-alert/fesm2022/basic-alert.mjs.map +1 -1
- package/basic-alert/package.json +24 -0
- package/breadcrumb/README.md +11 -0
- package/breadcrumb/fesm2022/breadcrumb.mjs +224 -0
- package/breadcrumb/fesm2022/breadcrumb.mjs.map +1 -0
- package/breadcrumb/package.json +25 -0
- package/breadcrumb/types/breadcrumb.d.ts +57 -0
- package/button/fesm2022/button.mjs +99 -25
- package/button/fesm2022/button.mjs.map +1 -1
- package/button/package.json +25 -0
- package/button/{index.d.ts → types/button.d.ts} +30 -9
- package/button-group/README.md +11 -0
- package/button-group/fesm2022/button-group.mjs +102 -0
- package/button-group/fesm2022/button-group.mjs.map +1 -0
- package/button-group/package.json +25 -0
- package/button-group/types/button-group.d.ts +30 -0
- package/calendar/fesm2022/calendar.mjs +868 -546
- package/calendar/fesm2022/calendar.mjs.map +1 -1
- package/calendar/package.json +24 -0
- package/calendar/types/calendar.d.ts +94 -0
- package/card/README.md +11 -0
- package/card/fesm2022/card.mjs +169 -0
- package/card/fesm2022/card.mjs.map +1 -0
- package/card/package.json +25 -0
- package/card/types/card.d.ts +54 -0
- package/carousel/README.md +11 -0
- package/carousel/fesm2022/carousel.mjs +309 -0
- package/carousel/fesm2022/carousel.mjs.map +1 -0
- package/carousel/package.json +25 -0
- package/carousel/types/carousel.d.ts +84 -0
- package/checkbox/README.md +64 -0
- package/checkbox/fesm2022/checkbox.mjs +151 -0
- package/checkbox/fesm2022/checkbox.mjs.map +1 -0
- package/checkbox/package.json +24 -0
- package/checkbox/types/checkbox.d.ts +55 -0
- package/collapsible/README.md +11 -0
- package/collapsible/fesm2022/collapsible.mjs +77 -0
- package/collapsible/fesm2022/collapsible.mjs.map +1 -0
- package/collapsible/package.json +25 -0
- package/collapsible/types/collapsible.d.ts +27 -0
- package/combobox/README.md +11 -0
- package/combobox/fesm2022/combobox.mjs +683 -0
- package/combobox/fesm2022/combobox.mjs.map +1 -0
- package/combobox/package.json +25 -0
- package/combobox/types/combobox.d.ts +151 -0
- package/command/README.md +11 -0
- package/command/fesm2022/command.mjs +361 -0
- package/command/fesm2022/command.mjs.map +1 -0
- package/command/package.json +25 -0
- package/command/types/command.d.ts +89 -0
- package/confirmation-dialog/README.md +64 -0
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +104 -0
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +1 -0
- package/confirmation-dialog/package.json +24 -0
- package/confirmation-dialog/types/confirmation-dialog.d.ts +24 -0
- package/context-menu/README.md +11 -0
- package/context-menu/fesm2022/context-menu.mjs +89 -0
- package/context-menu/fesm2022/context-menu.mjs.map +1 -0
- package/context-menu/package.json +25 -0
- package/context-menu/types/context-menu.d.ts +34 -0
- package/date-picker/fesm2022/date-picker.mjs +1262 -307
- package/date-picker/fesm2022/date-picker.mjs.map +1 -1
- package/date-picker/package.json +24 -0
- package/date-picker/types/date-picker.d.ts +551 -0
- package/dialog/README.md +64 -0
- package/dialog/fesm2022/dialog.mjs +307 -0
- package/dialog/fesm2022/dialog.mjs.map +1 -0
- package/dialog/package.json +24 -0
- package/dialog/types/dialog.d.ts +95 -0
- package/drawer/README.md +11 -0
- package/drawer/fesm2022/drawer.mjs +271 -0
- package/drawer/fesm2022/drawer.mjs.map +1 -0
- package/drawer/package.json +25 -0
- package/drawer/types/drawer.d.ts +76 -0
- package/dropdown-menu/README.md +11 -0
- package/dropdown-menu/fesm2022/dropdown-menu.mjs +542 -0
- package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +1 -0
- package/dropdown-menu/package.json +25 -0
- package/dropdown-menu/types/dropdown-menu.d.ts +176 -0
- package/empty/README.md +11 -0
- package/empty/fesm2022/empty.mjs +151 -0
- package/empty/fesm2022/empty.mjs.map +1 -0
- package/empty/package.json +25 -0
- package/empty/types/empty.d.ts +54 -0
- package/field/README.md +11 -0
- package/field/fesm2022/field.mjs +367 -0
- package/field/fesm2022/field.mjs.map +1 -0
- package/field/package.json +25 -0
- package/field/types/field.d.ts +107 -0
- package/form-checkbox/README.md +64 -0
- package/form-checkbox/fesm2022/form-checkbox.mjs +154 -0
- package/form-checkbox/fesm2022/form-checkbox.mjs.map +1 -0
- package/form-checkbox/package.json +24 -0
- package/form-checkbox/types/form-checkbox.d.ts +27 -0
- package/form-date-picker/fesm2022/form-date-picker.mjs +57 -50
- package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -1
- package/form-date-picker/package.json +24 -0
- package/form-field/fesm2022/form-field.mjs +37 -25
- package/form-field/fesm2022/form-field.mjs.map +1 -1
- package/form-field/package.json +25 -0
- package/form-field/{index.d.ts → types/form-field.d.ts} +4 -3
- package/form-field-simple/fesm2022/form-field-simple.mjs +14 -9
- package/form-field-simple/fesm2022/form-field-simple.mjs.map +1 -1
- package/form-field-simple/package.json +24 -0
- package/form-searchable-multiselect/README.md +64 -0
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +158 -0
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +1 -0
- package/form-searchable-multiselect/package.json +24 -0
- package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +30 -0
- package/form-select/fesm2022/form-select.mjs +131 -70
- package/form-select/fesm2022/form-select.mjs.map +1 -1
- package/form-select/package.json +24 -0
- package/form-text-input/fesm2022/form-text-input.mjs +66 -37
- package/form-text-input/fesm2022/form-text-input.mjs.map +1 -1
- package/form-text-input/package.json +24 -0
- package/form-textarea/fesm2022/form-textarea.mjs +53 -29
- package/form-textarea/fesm2022/form-textarea.mjs.map +1 -1
- package/form-textarea/package.json +24 -0
- package/hover-card/README.md +11 -0
- package/hover-card/fesm2022/hover-card.mjs +123 -0
- package/hover-card/fesm2022/hover-card.mjs.map +1 -0
- package/hover-card/package.json +25 -0
- package/hover-card/types/hover-card.d.ts +36 -0
- package/icon/fesm2022/icon.mjs +11 -9
- package/icon/fesm2022/icon.mjs.map +1 -1
- package/icon/package.json +25 -0
- package/input/fesm2022/input.mjs +21 -71
- package/input/fesm2022/input.mjs.map +1 -1
- package/input/package.json +25 -0
- package/input/types/input.d.ts +18 -0
- package/input-group/README.md +11 -0
- package/input-group/fesm2022/input-group.mjs +199 -0
- package/input-group/fesm2022/input-group.mjs.map +1 -0
- package/input-group/package.json +25 -0
- package/input-group/types/input-group.d.ts +52 -0
- package/input-otp/README.md +11 -0
- package/input-otp/fesm2022/input-otp.mjs +141 -0
- package/input-otp/fesm2022/input-otp.mjs.map +1 -0
- package/input-otp/package.json +25 -0
- package/input-otp/types/input-otp.d.ts +43 -0
- package/item/README.md +11 -0
- package/item/fesm2022/item.mjs +278 -0
- package/item/fesm2022/item.mjs.map +1 -0
- package/item/package.json +25 -0
- package/item/types/item.d.ts +101 -0
- package/kbd/README.md +11 -0
- package/kbd/fesm2022/kbd.mjs +61 -0
- package/kbd/fesm2022/kbd.mjs.map +1 -0
- package/kbd/package.json +25 -0
- package/kbd/types/kbd.d.ts +22 -0
- package/label/fesm2022/label.mjs +10 -9
- package/label/fesm2022/label.mjs.map +1 -1
- package/label/package.json +25 -0
- package/layout-simple/README.md +64 -0
- package/layout-simple/fesm2022/layout-simple.mjs +719 -0
- package/layout-simple/fesm2022/layout-simple.mjs.map +1 -0
- package/layout-simple/package.json +24 -0
- package/layout-simple/types/layout-simple.d.ts +153 -0
- package/menubar/README.md +11 -0
- package/menubar/fesm2022/menubar.mjs +108 -0
- package/menubar/fesm2022/menubar.mjs.map +1 -0
- package/menubar/package.json +25 -0
- package/menubar/types/menubar.d.ts +40 -0
- package/native-select/README.md +11 -0
- package/native-select/fesm2022/native-select.mjs +207 -0
- package/native-select/fesm2022/native-select.mjs.map +1 -0
- package/native-select/package.json +25 -0
- package/native-select/types/native-select.d.ts +70 -0
- package/navigation-menu/README.md +11 -0
- package/navigation-menu/fesm2022/navigation-menu.mjs +206 -0
- package/navigation-menu/fesm2022/navigation-menu.mjs.map +1 -0
- package/navigation-menu/package.json +25 -0
- package/navigation-menu/types/navigation-menu.d.ts +54 -0
- package/package.json +239 -47
- package/pagination/README.md +11 -0
- package/pagination/fesm2022/pagination.mjs +808 -0
- package/pagination/fesm2022/pagination.mjs.map +1 -0
- package/pagination/package.json +25 -0
- package/pagination/types/pagination.d.ts +192 -0
- package/popover/fesm2022/popover.mjs +123 -29
- package/popover/fesm2022/popover.mjs.map +1 -1
- package/popover/package.json +24 -0
- package/popover/types/popover.d.ts +54 -0
- package/progress/README.md +11 -0
- package/progress/fesm2022/progress.mjs +77 -0
- package/progress/fesm2022/progress.mjs.map +1 -0
- package/progress/package.json +25 -0
- package/progress/types/progress.d.ts +27 -0
- package/radio-group/README.md +64 -0
- package/radio-group/fesm2022/radio-group.mjs +204 -0
- package/radio-group/fesm2022/radio-group.mjs.map +1 -0
- package/radio-group/package.json +25 -0
- package/radio-group/types/radio-group.d.ts +71 -0
- package/resizable/README.md +11 -0
- package/resizable/fesm2022/resizable.mjs +111 -0
- package/resizable/fesm2022/resizable.mjs.map +1 -0
- package/resizable/package.json +25 -0
- package/resizable/types/resizable.d.ts +32 -0
- package/scroll-area/README.md +11 -0
- package/scroll-area/fesm2022/scroll-area.mjs +51 -0
- package/scroll-area/fesm2022/scroll-area.mjs.map +1 -0
- package/scroll-area/package.json +25 -0
- package/scroll-area/types/scroll-area.d.ts +16 -0
- package/searchable-multiselect/README.md +64 -0
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +225 -0
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +1 -0
- package/searchable-multiselect/package.json +24 -0
- package/searchable-multiselect/types/searchable-multiselect.d.ts +39 -0
- package/select/fesm2022/select.mjs +373 -191
- package/select/fesm2022/select.mjs.map +1 -1
- package/select/package.json +25 -0
- package/select/types/select.d.ts +119 -0
- package/separator/fesm2022/separator.mjs +16 -14
- package/separator/fesm2022/separator.mjs.map +1 -1
- package/separator/package.json +24 -0
- package/separator/{index.d.ts → types/separator.d.ts} +4 -5
- package/sheet/fesm2022/sheet.mjs +49 -42
- package/sheet/fesm2022/sheet.mjs.map +1 -1
- package/sheet/package.json +24 -0
- package/sidebar/README.md +11 -0
- package/sidebar/fesm2022/sidebar.mjs +948 -0
- package/sidebar/fesm2022/sidebar.mjs.map +1 -0
- package/sidebar/package.json +25 -0
- package/sidebar/types/sidebar.d.ts +237 -0
- package/skeleton/README.md +11 -0
- package/skeleton/fesm2022/skeleton.mjs +44 -0
- package/skeleton/fesm2022/skeleton.mjs.map +1 -0
- package/skeleton/package.json +25 -0
- package/skeleton/types/skeleton.d.ts +16 -0
- package/slider/README.md +11 -0
- package/slider/fesm2022/slider.mjs +144 -0
- package/slider/fesm2022/slider.mjs.map +1 -0
- package/slider/package.json +25 -0
- package/slider/types/slider.d.ts +19 -0
- package/sonner/fesm2022/sonner.mjs +29 -34
- package/sonner/fesm2022/sonner.mjs.map +1 -1
- package/sonner/package.json +25 -0
- package/spinner/fesm2022/spinner.mjs +17 -13
- package/spinner/fesm2022/spinner.mjs.map +1 -1
- package/spinner/package.json +25 -0
- package/switch/fesm2022/switch.mjs +27 -24
- package/switch/fesm2022/switch.mjs.map +1 -1
- package/switch/package.json +25 -0
- package/table/README.md +11 -0
- package/table/fesm2022/table.mjs +211 -0
- package/table/fesm2022/table.mjs.map +1 -0
- package/table/package.json +25 -0
- package/table/types/table.d.ts +87 -0
- package/tabs/README.md +64 -0
- package/tabs/fesm2022/tabs.mjs +286 -0
- package/tabs/fesm2022/tabs.mjs.map +1 -0
- package/tabs/package.json +25 -0
- package/tabs/types/tabs.d.ts +71 -0
- package/textarea/README.md +11 -0
- package/textarea/fesm2022/textarea.mjs +47 -0
- package/textarea/fesm2022/textarea.mjs.map +1 -0
- package/textarea/package.json +25 -0
- package/textarea/types/textarea.d.ts +18 -0
- package/toggle/README.md +11 -0
- package/toggle/fesm2022/toggle.mjs +78 -0
- package/toggle/fesm2022/toggle.mjs.map +1 -0
- package/toggle/package.json +25 -0
- package/toggle/types/toggle.d.ts +27 -0
- package/toggle-group/README.md +11 -0
- package/toggle-group/fesm2022/toggle-group.mjs +117 -0
- package/toggle-group/fesm2022/toggle-group.mjs.map +1 -0
- package/toggle-group/package.json +25 -0
- package/toggle-group/types/toggle-group.d.ts +39 -0
- package/tooltip/README.md +64 -0
- package/tooltip/fesm2022/tooltip.mjs +72 -0
- package/tooltip/fesm2022/tooltip.mjs.map +1 -0
- package/tooltip/package.json +25 -0
- package/tooltip/types/tooltip.d.ts +22 -0
- package/typography/README.md +11 -0
- package/typography/fesm2022/typography.mjs +242 -0
- package/typography/fesm2022/typography.mjs.map +1 -0
- package/typography/package.json +25 -0
- package/typography/types/typography.d.ts +94 -0
- package/utils/fesm2022/utils.mjs +184 -1
- package/utils/fesm2022/utils.mjs.map +1 -1
- package/utils/package.json +25 -0
- package/utils/types/utils.d.ts +13 -0
- package/calendar/index.d.ts +0 -111
- package/date-picker/index.d.ts +0 -227
- package/input/index.d.ts +0 -41
- package/popover/index.d.ts +0 -30
- package/select/index.d.ts +0 -92
- package/utils/index.d.ts +0 -5
- /package/alert/{index.d.ts → types/alert.d.ts} +0 -0
- /package/badge/{index.d.ts → types/badge.d.ts} +0 -0
- /package/basic-alert/{index.d.ts → types/basic-alert.d.ts} +0 -0
- /package/form-date-picker/{index.d.ts → types/form-date-picker.d.ts} +0 -0
- /package/form-field-simple/{index.d.ts → types/form-field-simple.d.ts} +0 -0
- /package/form-select/{index.d.ts → types/form-select.d.ts} +0 -0
- /package/form-text-input/{index.d.ts → types/form-text-input.d.ts} +0 -0
- /package/form-textarea/{index.d.ts → types/form-textarea.d.ts} +0 -0
- /package/icon/{index.d.ts → types/icon.d.ts} +0 -0
- /package/label/{index.d.ts → types/label.d.ts} +0 -0
- /package/sheet/{index.d.ts → types/sheet.d.ts} +0 -0
- /package/sonner/{index.d.ts → types/sonner.d.ts} +0 -0
- /package/spinner/{index.d.ts → types/spinner.d.ts} +0 -0
- /package/switch/{index.d.ts → types/switch.d.ts} +0 -0
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, Component, signal, computed, output, ChangeDetectionStrategy, viewChild, effect } from '@angular/core';
|
|
3
|
+
import { RouterLink, RouterModule } from '@angular/router';
|
|
4
|
+
import * as i1$2 from '@angular/cdk/layout';
|
|
5
|
+
import { Breakpoints } from '@angular/cdk/layout';
|
|
6
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
7
|
+
import { lucideUser, lucideSearch, lucideMenu } from '@ng-icons/lucide';
|
|
8
|
+
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
9
|
+
import * as i4 from '@egose/shadcn-theme-ng/button';
|
|
10
|
+
import { HlmButton, HlmButtonImports } from '@egose/shadcn-theme-ng/button';
|
|
11
|
+
import * as i1 from '@angular/common';
|
|
12
|
+
import { CommonModule } from '@angular/common';
|
|
13
|
+
import { HlmDropdownMenu, HlmDropdownMenuTrigger, HlmDropdownMenuItem, HlmDropdownMenuLabel, HlmDropdownMenuSeparator, HlmDropdownMenuGroup } from '@egose/shadcn-theme-ng/dropdown-menu';
|
|
14
|
+
import * as i1$1 from '@angular/forms';
|
|
15
|
+
import { FormsModule } from '@angular/forms';
|
|
16
|
+
import { HlmPopover, HlmPopoverTrigger, HlmPopoverContent } from '@egose/shadcn-theme-ng/popover';
|
|
17
|
+
import { HlmInput } from '@egose/shadcn-theme-ng/input';
|
|
18
|
+
import * as i2 from '@spartan-ng/brain/sheet';
|
|
19
|
+
import { BrnSheet, BrnSheetImports } from '@spartan-ng/brain/sheet';
|
|
20
|
+
import { HlmLabelImports } from '@egose/shadcn-theme-ng/label';
|
|
21
|
+
import * as i3 from '@egose/shadcn-theme-ng/sheet';
|
|
22
|
+
import { HlmSheetImports } from '@egose/shadcn-theme-ng/sheet';
|
|
23
|
+
|
|
24
|
+
class EgLayoutSimpleUserMenu {
|
|
25
|
+
hlm = hlm;
|
|
26
|
+
lucideUser = lucideUser;
|
|
27
|
+
menus = input([], /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "menus" }] : /* istanbul ignore next */ []));
|
|
29
|
+
menuTrigger = input(/* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [undefined, { debugName: "menuTrigger" }] : /* istanbul ignore next */ []));
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EgLayoutSimpleUserMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", 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
|
+
provideIcons({
|
|
34
|
+
lucideUser,
|
|
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"] }] });
|
|
124
|
+
}
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EgLayoutSimpleUserMenu, decorators: [{
|
|
126
|
+
type: Component,
|
|
127
|
+
args: [{
|
|
128
|
+
selector: 'eg-layout-simple-user-menu',
|
|
129
|
+
imports: [
|
|
130
|
+
CommonModule,
|
|
131
|
+
HlmDropdownMenu,
|
|
132
|
+
HlmDropdownMenuTrigger,
|
|
133
|
+
HlmDropdownMenuItem,
|
|
134
|
+
HlmDropdownMenuLabel,
|
|
135
|
+
HlmDropdownMenuSeparator,
|
|
136
|
+
HlmDropdownMenuGroup,
|
|
137
|
+
HlmButton,
|
|
138
|
+
NgIcon,
|
|
139
|
+
RouterLink,
|
|
140
|
+
],
|
|
141
|
+
providers: [
|
|
142
|
+
provideIcons({
|
|
143
|
+
lucideUser,
|
|
144
|
+
}),
|
|
145
|
+
],
|
|
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
|
+
`,
|
|
234
|
+
}]
|
|
235
|
+
}], propDecorators: { menus: [{ type: i0.Input, args: [{ isSignal: true, alias: "menus", required: false }] }], menuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuTrigger", required: false }] }] } });
|
|
236
|
+
|
|
237
|
+
class EgGenericAutocomplete {
|
|
238
|
+
placeholderText = input('Select an option', /* @ts-ignore */
|
|
239
|
+
...(ngDevMode ? [{ debugName: "placeholderText" }] : /* istanbul ignore next */ []));
|
|
240
|
+
emptyText = input('No options found', /* @ts-ignore */
|
|
241
|
+
...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
|
|
242
|
+
/** Loader function: takes search string, returns options. */
|
|
243
|
+
loaderFn = input(async () => [], /* @ts-ignore */
|
|
244
|
+
...(ngDevMode ? [{ debugName: "loaderFn" }] : /* istanbul ignore next */ []));
|
|
245
|
+
transformValueToSearch = input((value) => String(value), /* @ts-ignore */
|
|
246
|
+
...(ngDevMode ? [{ debugName: "transformValueToSearch" }] : /* istanbul ignore next */ []));
|
|
247
|
+
search = signal('', /* @ts-ignore */
|
|
248
|
+
...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
|
|
249
|
+
options = signal([], /* @ts-ignore */
|
|
250
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
251
|
+
filtered = computed(() => {
|
|
252
|
+
const opts = this.options();
|
|
253
|
+
const search = this.search().toLowerCase();
|
|
254
|
+
const transform = this.transformValueToSearch() ?? ((value) => String(value));
|
|
255
|
+
const mapped = opts.map((o) => ({ label: transform(o), value: o, raw: o }));
|
|
256
|
+
if (!search)
|
|
257
|
+
return mapped;
|
|
258
|
+
return mapped.filter((o) => o.label.toLowerCase().includes(search));
|
|
259
|
+
}, /* @ts-ignore */
|
|
260
|
+
...(ngDevMode ? [{ debugName: "filtered" }] : /* istanbul ignore next */ []));
|
|
261
|
+
optionChange = output();
|
|
262
|
+
constructor() {
|
|
263
|
+
// Trigger initial load
|
|
264
|
+
this.loadOptions();
|
|
265
|
+
}
|
|
266
|
+
async loadOptions() {
|
|
267
|
+
const fn = this.loaderFn();
|
|
268
|
+
if (!fn) {
|
|
269
|
+
this.options.set([]);
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
try {
|
|
273
|
+
const params = { search: this.search() };
|
|
274
|
+
const result = await fn(params);
|
|
275
|
+
this.options.set(result ?? []);
|
|
276
|
+
}
|
|
277
|
+
catch {
|
|
278
|
+
this.options.set([]);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
select(opt) {
|
|
282
|
+
this.optionChange.emit(opt.value);
|
|
283
|
+
this.search.set('');
|
|
284
|
+
}
|
|
285
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EgGenericAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
286
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", 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: `
|
|
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 });
|
|
326
|
+
}
|
|
327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EgGenericAutocomplete, decorators: [{
|
|
328
|
+
type: Component,
|
|
329
|
+
args: [{
|
|
330
|
+
selector: 'eg-generic-autocomplete',
|
|
331
|
+
imports: [FormsModule, HlmPopover, HlmPopoverTrigger, HlmPopoverContent, HlmInput, HlmButton, NgIcon],
|
|
332
|
+
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
|
+
`,
|
|
373
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
374
|
+
}]
|
|
375
|
+
}], 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"] }] } });
|
|
376
|
+
|
|
377
|
+
class EgLayoutSimpleSidebar {
|
|
378
|
+
viewchildSheetRef = viewChild(BrnSheet, /* @ts-ignore */
|
|
379
|
+
...(ngDevMode ? [{ debugName: "viewchildSheetRef" }] : /* istanbul ignore next */ []));
|
|
380
|
+
side = input('left', /* @ts-ignore */
|
|
381
|
+
...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
382
|
+
title = input('', /* @ts-ignore */
|
|
383
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
384
|
+
content = input(/* @ts-ignore */
|
|
385
|
+
...(ngDevMode ? [undefined, { debugName: "content" }] : /* istanbul ignore next */ []));
|
|
386
|
+
contentContext = input(/* @ts-ignore */
|
|
387
|
+
...(ngDevMode ? [undefined, { debugName: "contentContext" }] : /* istanbul ignore next */ []));
|
|
388
|
+
constructor() {
|
|
389
|
+
effect(() => { });
|
|
390
|
+
}
|
|
391
|
+
openSheet() {
|
|
392
|
+
this.viewchildSheetRef()?.open();
|
|
393
|
+
}
|
|
394
|
+
closeSheet() {
|
|
395
|
+
this.viewchildSheetRef()?.close();
|
|
396
|
+
}
|
|
397
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EgLayoutSimpleSidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
398
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", 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: `
|
|
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"] }] });
|
|
420
|
+
}
|
|
421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EgLayoutSimpleSidebar, decorators: [{
|
|
422
|
+
type: Component,
|
|
423
|
+
args: [{
|
|
424
|
+
selector: 'eg-layout-simple-sidebar',
|
|
425
|
+
standalone: true,
|
|
426
|
+
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
|
+
`,
|
|
449
|
+
}]
|
|
450
|
+
}], 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
|
+
|
|
452
|
+
class EgLayoutSimpleMobileMenuGroup {
|
|
453
|
+
hlm = hlm;
|
|
454
|
+
label = input('', /* @ts-ignore */
|
|
455
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
456
|
+
items = input(/* @ts-ignore */
|
|
457
|
+
...(ngDevMode ? [undefined, { debugName: "items" }] : /* istanbul ignore next */ []));
|
|
458
|
+
itemClick = output();
|
|
459
|
+
handleClick(item) {
|
|
460
|
+
item.action?.();
|
|
461
|
+
this.itemClick.emit(item);
|
|
462
|
+
}
|
|
463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EgLayoutSimpleMobileMenuGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
464
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", 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: `
|
|
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"] }] });
|
|
509
|
+
}
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EgLayoutSimpleMobileMenuGroup, decorators: [{
|
|
511
|
+
type: Component,
|
|
512
|
+
args: [{
|
|
513
|
+
selector: 'eg-layout-simple-mobile-menu-group',
|
|
514
|
+
imports: [NgIcon, RouterLink],
|
|
515
|
+
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
|
+
`,
|
|
561
|
+
}]
|
|
562
|
+
}], 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
|
+
|
|
564
|
+
const commonLinkGroupClasses = 'hidden md:flex space-x-4 items-center';
|
|
565
|
+
const commonLinkClasses = 'text-left text-secondary visited:text-secondary hover:text-primary cursor-pointer no-underline';
|
|
566
|
+
class EgLayoutSimple {
|
|
567
|
+
breakpointObserver;
|
|
568
|
+
hlm = hlm;
|
|
569
|
+
menuIcon = lucideMenu;
|
|
570
|
+
sidebarEnabled = input(false, /* @ts-ignore */
|
|
571
|
+
...(ngDevMode ? [{ debugName: "sidebarEnabled" }] : /* istanbul ignore next */ []));
|
|
572
|
+
sidebarTitle = input('Menu', /* @ts-ignore */
|
|
573
|
+
...(ngDevMode ? [{ debugName: "sidebarTitle" }] : /* istanbul ignore next */ []));
|
|
574
|
+
sidebarContent = input(/* @ts-ignore */
|
|
575
|
+
...(ngDevMode ? [undefined, { debugName: "sidebarContent" }] : /* istanbul ignore next */ []));
|
|
576
|
+
userMenuTrigger = input(/* @ts-ignore */
|
|
577
|
+
...(ngDevMode ? [undefined, { debugName: "userMenuTrigger" }] : /* istanbul ignore next */ []));
|
|
578
|
+
/** Menu data inputs */
|
|
579
|
+
leftMenus = input([], /* @ts-ignore */
|
|
580
|
+
...(ngDevMode ? [{ debugName: "leftMenus" }] : /* istanbul ignore next */ []));
|
|
581
|
+
leftMenuGroups = input([], /* @ts-ignore */
|
|
582
|
+
...(ngDevMode ? [{ debugName: "leftMenuGroups" }] : /* istanbul ignore next */ []));
|
|
583
|
+
rightMenus = input([], /* @ts-ignore */
|
|
584
|
+
...(ngDevMode ? [{ debugName: "rightMenus" }] : /* istanbul ignore next */ []));
|
|
585
|
+
topMenus = input([], /* @ts-ignore */
|
|
586
|
+
...(ngDevMode ? [{ debugName: "topMenus" }] : /* istanbul ignore next */ []));
|
|
587
|
+
topSecondaryMenus = input([], /* @ts-ignore */
|
|
588
|
+
...(ngDevMode ? [{ debugName: "topSecondaryMenus" }] : /* istanbul ignore next */ []));
|
|
589
|
+
userMenus = input([], /* @ts-ignore */
|
|
590
|
+
...(ngDevMode ? [{ debugName: "userMenus" }] : /* istanbul ignore next */ []));
|
|
591
|
+
logo = input('assets/logo.png', /* @ts-ignore */
|
|
592
|
+
...(ngDevMode ? [{ debugName: "logo" }] : /* istanbul ignore next */ []));
|
|
593
|
+
logoLink = input('/', /* @ts-ignore */
|
|
594
|
+
...(ngDevMode ? [{ debugName: "logoLink" }] : /* istanbul ignore next */ []));
|
|
595
|
+
logoClass = input('', { ...(ngDevMode ? { debugName: "logoClass" } : /* istanbul ignore next */ {}), alias: 'logoClass' });
|
|
596
|
+
headerClass = input('', { ...(ngDevMode ? { debugName: "headerClass" } : /* istanbul ignore next */ {}), alias: 'headerClass' });
|
|
597
|
+
contentClass = input('', { ...(ngDevMode ? { debugName: "contentClass" } : /* istanbul ignore next */ {}), alias: 'contentClass' });
|
|
598
|
+
contentBottomClass = input('', { ...(ngDevMode ? { debugName: "contentBottomClass" } : /* istanbul ignore next */ {}), alias: 'contentBottomClass' });
|
|
599
|
+
/** Container class inputs */
|
|
600
|
+
leftMenuClass = input('', { ...(ngDevMode ? { debugName: "leftMenuClass" } : /* istanbul ignore next */ {}), alias: 'leftClass' });
|
|
601
|
+
rightMenuClass = input('', { ...(ngDevMode ? { debugName: "rightMenuClass" } : /* istanbul ignore next */ {}), alias: 'rightClass' });
|
|
602
|
+
topMenuClass = input('', { ...(ngDevMode ? { debugName: "topMenuClass" } : /* istanbul ignore next */ {}), alias: 'topClass' });
|
|
603
|
+
/** Link/button base class inputs */
|
|
604
|
+
leftLinkClass = input('', { ...(ngDevMode ? { debugName: "leftLinkClass" } : /* istanbul ignore next */ {}), alias: 'leftLinkClass' });
|
|
605
|
+
rightLinkClass = input('', { ...(ngDevMode ? { debugName: "rightLinkClass" } : /* istanbul ignore next */ {}), alias: 'rightLinkClass' });
|
|
606
|
+
topLinkClass = input('', { ...(ngDevMode ? { debugName: "topLinkClass" } : /* istanbul ignore next */ {}), alias: 'topLinkClass' });
|
|
607
|
+
searchEnabled = input(false, /* @ts-ignore */
|
|
608
|
+
...(ngDevMode ? [{ debugName: "searchEnabled" }] : /* istanbul ignore next */ []));
|
|
609
|
+
loading = input(false, /* @ts-ignore */
|
|
610
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
611
|
+
searchPlaceholderText = input('Select an page', /* @ts-ignore */
|
|
612
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholderText" }] : /* istanbul ignore next */ []));
|
|
613
|
+
searchEmptyText = input('No pages found', /* @ts-ignore */
|
|
614
|
+
...(ngDevMode ? [{ debugName: "searchEmptyText" }] : /* istanbul ignore next */ []));
|
|
615
|
+
searchOptionTemplate = input(/* @ts-ignore */
|
|
616
|
+
...(ngDevMode ? [undefined, { debugName: "searchOptionTemplate" }] : /* istanbul ignore next */ []));
|
|
617
|
+
searchLoaderFn = input(/* @ts-ignore */
|
|
618
|
+
...(ngDevMode ? [undefined, { debugName: "searchLoaderFn" }] : /* istanbul ignore next */ []));
|
|
619
|
+
searchTransformValueToSearch = input(/* @ts-ignore */
|
|
620
|
+
...(ngDevMode ? [undefined, { debugName: "searchTransformValueToSearch" }] : /* istanbul ignore next */ []));
|
|
621
|
+
searchOptionChange = output();
|
|
622
|
+
_logoClass = computed(() => hlm('h-10', this.logoClass()), /* @ts-ignore */
|
|
623
|
+
...(ngDevMode ? [{ debugName: "_logoClass" }] : /* istanbul ignore next */ []));
|
|
624
|
+
_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
|
+
...(ngDevMode ? [{ debugName: "_headerClass" }] : /* istanbul ignore next */ []));
|
|
626
|
+
_contentClass = computed(() => hlm('p-4 flex flex-col flex-1', this.contentClass()), /* @ts-ignore */
|
|
627
|
+
...(ngDevMode ? [{ debugName: "_contentClass" }] : /* istanbul ignore next */ []));
|
|
628
|
+
_contentBottomClass = computed(() => hlm('flex-1', this.contentBottomClass()), /* @ts-ignore */
|
|
629
|
+
...(ngDevMode ? [{ debugName: "_contentBottomClass" }] : /* istanbul ignore next */ []));
|
|
630
|
+
/** Computed merged classes for containers */
|
|
631
|
+
_computedLeftClass = computed(() => hlm(commonLinkGroupClasses, this.leftMenuClass()), /* @ts-ignore */
|
|
632
|
+
...(ngDevMode ? [{ debugName: "_computedLeftClass" }] : /* istanbul ignore next */ []));
|
|
633
|
+
_computedRightClass = computed(() => hlm(commonLinkGroupClasses, this.rightMenuClass()), /* @ts-ignore */
|
|
634
|
+
...(ngDevMode ? [{ debugName: "_computedRightClass" }] : /* istanbul ignore next */ []));
|
|
635
|
+
_computedTopClass = computed(() => hlm('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
|
+
...(ngDevMode ? [{ debugName: "_computedTopClass" }] : /* istanbul ignore next */ []));
|
|
637
|
+
_computedTopSecondaryClass = computed(() => hlm('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
|
+
...(ngDevMode ? [{ debugName: "_computedTopSecondaryClass" }] : /* istanbul ignore next */ []));
|
|
639
|
+
/** Computed merged classes for link/button elements */
|
|
640
|
+
_computedLeftLinkClass = computed(() => hlm(commonLinkClasses, this.leftLinkClass()), /* @ts-ignore */
|
|
641
|
+
...(ngDevMode ? [{ debugName: "_computedLeftLinkClass" }] : /* istanbul ignore next */ []));
|
|
642
|
+
_computedRightLinkClass = computed(() => hlm(commonLinkClasses, this.rightLinkClass()), /* @ts-ignore */
|
|
643
|
+
...(ngDevMode ? [{ debugName: "_computedRightLinkClass" }] : /* istanbul ignore next */ []));
|
|
644
|
+
_computedTopLinkClass = computed(() => hlm('text-secondary visited:text-secondary hover:text-primary cursor-pointer no-underline text-sm', this.topLinkClass()), /* @ts-ignore */
|
|
645
|
+
...(ngDevMode ? [{ debugName: "_computedTopLinkClass" }] : /* istanbul ignore next */ []));
|
|
646
|
+
mobileMenuItemClass = commonLinkClasses;
|
|
647
|
+
footerEnabled = input(false, /* @ts-ignore */
|
|
648
|
+
...(ngDevMode ? [{ debugName: "footerEnabled" }] : /* istanbul ignore next */ []));
|
|
649
|
+
footerMenus = input([], /* @ts-ignore */
|
|
650
|
+
...(ngDevMode ? [{ debugName: "footerMenus" }] : /* istanbul ignore next */ []));
|
|
651
|
+
footerMenuClass = input('', { ...(ngDevMode ? { debugName: "footerMenuClass" } : /* istanbul ignore next */ {}), alias: 'footerMenuClass' });
|
|
652
|
+
footerLinkClass = input('', { ...(ngDevMode ? { debugName: "footerLinkClass" } : /* istanbul ignore next */ {}), alias: 'footerLinkClass' });
|
|
653
|
+
footerContent = input('© 2024 My Company', /* @ts-ignore */
|
|
654
|
+
...(ngDevMode ? [{ debugName: "footerContent" }] : /* istanbul ignore next */ []));
|
|
655
|
+
footerClass = input('', { ...(ngDevMode ? { debugName: "footerClass" } : /* istanbul ignore next */ {}), alias: 'footerClass' });
|
|
656
|
+
_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
|
+
...(ngDevMode ? [{ debugName: "_footerClass" }] : /* istanbul ignore next */ []));
|
|
658
|
+
_computedFooterMenuClass = computed(() => hlm('flex flex-wrap justify-center space-x-4', this.footerMenuClass()), /* @ts-ignore */
|
|
659
|
+
...(ngDevMode ? [{ debugName: "_computedFooterMenuClass" }] : /* istanbul ignore next */ []));
|
|
660
|
+
_computedFooterLinkClass = computed(() => hlm('text-secondary hover:text-primary cursor-pointer no-underline', this.footerLinkClass()), /* @ts-ignore */
|
|
661
|
+
...(ngDevMode ? [{ debugName: "_computedFooterLinkClass" }] : /* istanbul ignore next */ []));
|
|
662
|
+
/** Mobile menu state */
|
|
663
|
+
mobileMenuOpen = false;
|
|
664
|
+
isMobile = signal(false, /* @ts-ignore */
|
|
665
|
+
...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
|
|
666
|
+
constructor(breakpointObserver) {
|
|
667
|
+
this.breakpointObserver = breakpointObserver;
|
|
668
|
+
this.breakpointObserver.observe([Breakpoints.Handset]).subscribe((result) => {
|
|
669
|
+
this.isMobile.set(result.matches);
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
toggleMobileMenu() {
|
|
673
|
+
this.mobileMenuOpen = !this.mobileMenuOpen;
|
|
674
|
+
}
|
|
675
|
+
onSearchOptionChange(value) {
|
|
676
|
+
this.searchOptionChange.emit(value);
|
|
677
|
+
}
|
|
678
|
+
viewchildSheetRef = viewChild(EgLayoutSimpleSidebar, /* @ts-ignore */
|
|
679
|
+
...(ngDevMode ? [{ debugName: "viewchildSheetRef" }] : /* istanbul ignore next */ []));
|
|
680
|
+
openSidebar() {
|
|
681
|
+
this.viewchildSheetRef()?.openSheet();
|
|
682
|
+
}
|
|
683
|
+
closeSidebar() {
|
|
684
|
+
this.viewchildSheetRef()?.closeSheet();
|
|
685
|
+
}
|
|
686
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EgLayoutSimple, deps: [{ token: i1$2.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component });
|
|
687
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", 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 }, 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
|
+
provideIcons({
|
|
689
|
+
lucideMenu,
|
|
690
|
+
}),
|
|
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"] }] });
|
|
692
|
+
}
|
|
693
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EgLayoutSimple, decorators: [{
|
|
694
|
+
type: Component,
|
|
695
|
+
args: [{ selector: 'eg-layout-simple', standalone: true, imports: [
|
|
696
|
+
RouterLink,
|
|
697
|
+
EgLayoutSimpleUserMenu,
|
|
698
|
+
EgLayoutSimpleSidebar,
|
|
699
|
+
EgLayoutSimpleMobileMenuGroup,
|
|
700
|
+
EgGenericAutocomplete,
|
|
701
|
+
HlmButton,
|
|
702
|
+
NgIcon,
|
|
703
|
+
], providers: [
|
|
704
|
+
provideIcons({
|
|
705
|
+
lucideMenu,
|
|
706
|
+
}),
|
|
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) \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" }]
|
|
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 }] }] } });
|
|
709
|
+
|
|
710
|
+
/*
|
|
711
|
+
* Public API Surface of layout-simple
|
|
712
|
+
*/
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Generated bundle index. Do not edit.
|
|
716
|
+
*/
|
|
717
|
+
|
|
718
|
+
export { EgGenericAutocomplete, EgLayoutSimple, EgLayoutSimpleUserMenu };
|
|
719
|
+
//# sourceMappingURL=layout-simple.mjs.map
|