@egose/shadcn-theme-ng-tw 0.0.28 → 0.2.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 +376 -34
- package/accordion/fesm2022/accordion.mjs +20 -20
- package/alert/README.md +343 -34
- package/alert/fesm2022/alert.mjs +18 -18
- package/alert-dialog/README.md +471 -5
- package/alert-dialog/fesm2022/alert-dialog.mjs +48 -48
- package/alert-dialog/types/alert-dialog.d.ts +1 -1
- package/aspect-ratio/README.md +272 -5
- package/aspect-ratio/fesm2022/aspect-ratio.mjs +9 -9
- package/autocomplete/README.md +473 -34
- package/autocomplete/fesm2022/autocomplete.mjs +54 -54
- package/autocomplete/types/autocomplete.d.ts +1 -1
- package/avatar/README.md +357 -5
- package/avatar/fesm2022/avatar.mjs +32 -32
- package/badge/README.md +289 -34
- package/badge/fesm2022/badge.mjs +4 -4
- package/basic-alert/README.md +324 -34
- package/basic-alert/fesm2022/basic-alert.mjs +4 -4
- package/basic-alert/types/basic-alert.d.ts +1 -1
- package/breadcrumb/README.md +406 -5
- package/breadcrumb/fesm2022/breadcrumb.mjs +34 -34
- package/button/README.md +453 -34
- package/button/fesm2022/button.mjs +96 -118
- package/button/types/button.d.ts +7 -10
- package/button-group/README.md +318 -5
- package/button-group/fesm2022/button-group.mjs +20 -20
- package/calendar/README.md +328 -34
- package/calendar/fesm2022/calendar.mjs +154 -154
- package/card/README.md +331 -5
- package/card/fesm2022/card.mjs +33 -33
- package/carousel/README.md +333 -5
- package/carousel/fesm2022/carousel.mjs +47 -44
- package/carousel/types/carousel.d.ts +1 -1
- package/checkbox/README.md +291 -34
- package/checkbox/fesm2022/checkbox.mjs +22 -20
- package/checkbox/types/checkbox.d.ts +5 -4
- package/collapsible/README.md +332 -5
- package/collapsible/fesm2022/collapsible.mjs +15 -15
- package/combobox/README.md +507 -5
- package/combobox/fesm2022/combobox.mjs +95 -92
- package/combobox/types/combobox.d.ts +1 -1
- package/command/README.md +435 -5
- package/command/fesm2022/command.mjs +56 -56
- package/confirmation-dialog/README.md +272 -34
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +13 -12
- package/confirmation-dialog/types/confirmation-dialog.d.ts +9 -5
- package/context-menu/README.md +366 -5
- package/context-menu/fesm2022/context-menu.mjs +9 -9
- package/date-picker/README.md +436 -34
- package/date-picker/fesm2022/date-picker.mjs +79 -68
- package/date-picker/types/date-picker.d.ts +8 -4
- package/dialog/README.md +419 -34
- package/dialog/fesm2022/dialog.mjs +48 -48
- package/drawer/README.md +395 -5
- package/drawer/fesm2022/drawer.mjs +45 -45
- package/dropdown-menu/README.md +417 -5
- package/dropdown-menu/fesm2022/dropdown-menu.mjs +85 -73
- package/dropdown-menu/types/dropdown-menu.d.ts +4 -0
- package/empty/README.md +329 -5
- package/empty/fesm2022/empty.mjs +31 -31
- package/field/README.md +385 -5
- package/field/fesm2022/field.mjs +59 -59
- package/field/types/field.d.ts +1 -1
- package/form-checkbox/README.md +283 -34
- package/form-checkbox/fesm2022/form-checkbox.mjs +37 -19
- package/form-checkbox/types/form-checkbox.d.ts +7 -1
- package/form-date-picker/README.md +293 -34
- package/form-date-picker/fesm2022/form-date-picker.mjs +59 -24
- package/form-date-picker/types/form-date-picker.d.ts +7 -1
- package/form-field/README.md +327 -34
- package/form-field/fesm2022/form-field.mjs +30 -16
- package/form-field/types/form-field.d.ts +28 -20
- package/form-field-simple/README.md +311 -34
- package/form-field-simple/fesm2022/form-field-simple.mjs +4 -4
- package/form-searchable-multiselect/README.md +332 -34
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +41 -21
- package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +8 -2
- package/form-select/README.md +321 -34
- package/form-select/fesm2022/form-select.mjs +62 -29
- package/form-select/types/form-select.d.ts +7 -1
- package/form-text-input/README.md +342 -34
- package/form-text-input/fesm2022/form-text-input.mjs +43 -55
- package/form-text-input/types/form-text-input.d.ts +9 -12
- package/form-textarea/README.md +318 -34
- package/form-textarea/fesm2022/form-textarea.mjs +42 -23
- package/form-textarea/types/form-textarea.d.ts +8 -1
- package/hover-card/README.md +256 -5
- package/hover-card/fesm2022/hover-card.mjs +19 -19
- package/icon/README.md +210 -34
- package/icon/fesm2022/icon.mjs +8 -8
- package/input/README.md +240 -34
- package/input/fesm2022/input.mjs +17 -12
- package/input/types/input.d.ts +2 -1
- package/input-group/README.md +335 -5
- package/input-group/fesm2022/input-group.mjs +37 -37
- package/input-group/types/input-group.d.ts +3 -3
- package/input-otp/README.md +375 -5
- package/input-otp/fesm2022/input-otp.mjs +27 -27
- package/item/README.md +385 -5
- package/item/fesm2022/item.mjs +54 -54
- package/kbd/README.md +291 -5
- package/kbd/fesm2022/kbd.mjs +13 -13
- package/label/README.md +243 -34
- package/label/fesm2022/label.mjs +9 -9
- package/label/types/label.d.ts +1 -1
- package/layout-simple/README.md +174 -44
- package/layout-simple/fesm2022/layout-simple.mjs +917 -398
- package/layout-simple/types/layout-simple.d.ts +180 -129
- package/menu/README.md +418 -0
- package/menu/fesm2022/menu.mjs +461 -0
- package/menu/package.json +24 -0
- package/menu/types/menu.d.ts +137 -0
- package/menubar/README.md +343 -5
- package/menubar/fesm2022/menubar.mjs +13 -13
- package/native-select/README.md +323 -5
- package/native-select/fesm2022/native-select.mjs +19 -19
- package/navigation-menu/README.md +369 -5
- package/navigation-menu/fesm2022/navigation-menu.mjs +37 -37
- package/package.json +183 -154
- package/pagination/README.md +388 -5
- package/pagination/fesm2022/pagination.mjs +63 -63
- package/popover/README.md +302 -34
- package/popover/fesm2022/popover.mjs +30 -30
- package/progress/README.md +311 -5
- package/progress/fesm2022/progress.mjs +13 -13
- package/radio-group/README.md +335 -34
- package/radio-group/fesm2022/radio-group.mjs +26 -19
- package/resizable/README.md +269 -5
- package/resizable/fesm2022/resizable.mjs +19 -19
- package/scroll-area/README.md +233 -5
- package/scroll-area/fesm2022/scroll-area.mjs +9 -9
- package/searchable-multiselect/README.md +294 -34
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +63 -16
- package/searchable-multiselect/types/searchable-multiselect.d.ts +8 -2
- package/select/README.md +408 -34
- package/select/fesm2022/select.mjs +80 -72
- package/select/types/select.d.ts +3 -1
- package/separator/README.md +193 -34
- package/separator/fesm2022/separator.mjs +9 -9
- package/separator/types/separator.d.ts +1 -1
- package/sheet/README.md +282 -34
- package/sheet/fesm2022/sheet.mjs +30 -30
- package/sidebar/README.md +457 -5
- package/sidebar/fesm2022/sidebar.mjs +136 -134
- package/sidebar/types/sidebar.d.ts +3 -3
- package/skeleton/README.md +217 -5
- package/skeleton/fesm2022/skeleton.mjs +9 -9
- package/slider/README.md +273 -5
- package/slider/fesm2022/slider.mjs +29 -25
- package/sonner/README.md +317 -34
- package/sonner/fesm2022/sonner.mjs +9 -9
- package/spinner/README.md +255 -34
- package/spinner/fesm2022/spinner.mjs +8 -8
- package/switch/README.md +281 -34
- package/switch/fesm2022/switch.mjs +12 -14
- package/table/README.md +423 -5
- package/table/fesm2022/table.mjs +41 -41
- package/tabs/README.md +382 -34
- package/tabs/fesm2022/tabs.mjs +48 -38
- package/textarea/README.md +282 -5
- package/textarea/fesm2022/textarea.mjs +9 -9
- package/toggle/README.md +270 -5
- package/toggle/fesm2022/toggle.mjs +14 -14
- package/toggle-group/README.md +340 -5
- package/toggle-group/fesm2022/toggle-group.mjs +13 -13
- package/toggle-group/types/toggle-group.d.ts +13 -7
- package/tooltip/README.md +240 -34
- package/tooltip/fesm2022/tooltip.mjs +14 -14
- package/typography/README.md +271 -5
- package/typography/fesm2022/typography.mjs +53 -53
- package/typography/types/typography.d.ts +12 -12
- package/utils/README.md +274 -34
- 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,83 +1,102 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Component, signal, computed,
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
2
|
+
import { input, ChangeDetectionStrategy, Component, output, signal, viewChild, viewChildren, effect, computed, inject, ElementRef, Injector, afterNextRender, DestroyRef } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule, NgTemplateOutlet } from '@angular/common';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { RouterLink, RouterLinkActive, Router, NavigationEnd } from '@angular/router';
|
|
7
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
8
|
+
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
6
9
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
7
|
-
import { lucideUser, lucideSearch, lucideMenu } from '@ng-icons/lucide';
|
|
10
|
+
import { lucideUser, lucideSearch, lucideChevronDown, lucideX, lucideMenu, lucidePanelLeft } from '@ng-icons/lucide';
|
|
8
11
|
import { hlm } from '@egose/shadcn-theme-ng-tw/utils';
|
|
9
|
-
import * as i4 from '@egose/shadcn-theme-ng-tw/button';
|
|
10
|
-
import { HlmButton, HlmButtonImports } from '@egose/shadcn-theme-ng-tw/button';
|
|
11
|
-
import * as i1 from '@angular/common';
|
|
12
|
-
import { CommonModule } from '@angular/common';
|
|
13
12
|
import { HlmDropdownMenu, HlmDropdownMenuTrigger, HlmDropdownMenuItem, HlmDropdownMenuLabel, HlmDropdownMenuSeparator, HlmDropdownMenuGroup } from '@egose/shadcn-theme-ng-tw/dropdown-menu';
|
|
14
|
-
import * as
|
|
15
|
-
import {
|
|
16
|
-
import { HlmPopover, HlmPopoverTrigger, HlmPopoverContent } from '@egose/shadcn-theme-ng-tw/popover';
|
|
13
|
+
import * as i3 from '@egose/shadcn-theme-ng-tw/button';
|
|
14
|
+
import { HlmButton, HlmButtonImports } from '@egose/shadcn-theme-ng-tw/button';
|
|
15
|
+
import { HlmPopover, HlmPopoverTrigger, HlmPopoverContent, HlmPopoverPortal } from '@egose/shadcn-theme-ng-tw/popover';
|
|
17
16
|
import { HlmInput } from '@egose/shadcn-theme-ng-tw/input';
|
|
18
|
-
import * as
|
|
17
|
+
import * as i1$1 from '@spartan-ng/brain/sheet';
|
|
19
18
|
import { BrnSheet, BrnSheetImports } from '@spartan-ng/brain/sheet';
|
|
20
|
-
import
|
|
21
|
-
import * as i3 from '@egose/shadcn-theme-ng-tw/sheet';
|
|
19
|
+
import * as i2 from '@egose/shadcn-theme-ng-tw/sheet';
|
|
22
20
|
import { HlmSheetImports } from '@egose/shadcn-theme-ng-tw/sheet';
|
|
23
21
|
|
|
22
|
+
/** Internal matching contract shared by links and dropdown destinations. */
|
|
23
|
+
function navigationMatchOptions(item) {
|
|
24
|
+
return {
|
|
25
|
+
paths: item.activeMatch === 'prefix' ? 'subset' : 'exact',
|
|
26
|
+
queryParams: 'ignored',
|
|
27
|
+
fragment: 'ignored',
|
|
28
|
+
matrixParams: 'ignored',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
class EgLayoutSimpleUserMenu {
|
|
25
33
|
hlm = hlm;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
navigationMatchOptions = navigationMatchOptions;
|
|
35
|
+
userIcon = lucideUser;
|
|
36
|
+
sections = input([], /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []));
|
|
38
|
+
triggerTemplate = input(/* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [undefined, { debugName: "triggerTemplate" }] : /* istanbul ignore next */ []));
|
|
40
|
+
triggerLabel = input('Open account menu', /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleUserMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgLayoutSimpleUserMenu, isStandalone: true, selector: "eg-layout-simple-user-menu", inputs: { sections: { classPropertyName: "sections", publicName: "sections", isSignal: true, isRequired: false, transformFunction: null }, triggerTemplate: { classPropertyName: "triggerTemplate", publicName: "triggerTemplate", isSignal: true, isRequired: false, transformFunction: null }, triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
33
44
|
provideIcons({
|
|
34
45
|
lucideUser,
|
|
35
46
|
}),
|
|
36
47
|
], ngImport: i0, template: `
|
|
37
48
|
<ng-template #iconTemplate>
|
|
38
|
-
<ng-icon [svg]="
|
|
49
|
+
<ng-icon [svg]="userIcon" size="1.25rem" aria-hidden="true" />
|
|
39
50
|
</ng-template>
|
|
40
51
|
|
|
41
|
-
@let
|
|
52
|
+
@let customTrigger = triggerTemplate();
|
|
42
53
|
|
|
43
54
|
<div class="tw:flex tw:w-full tw:items-center tw:justify-center">
|
|
44
|
-
@if (
|
|
55
|
+
@if (customTrigger) {
|
|
45
56
|
<button
|
|
46
57
|
type="button"
|
|
47
58
|
[hlmDropdownMenuTrigger]="menu"
|
|
48
|
-
|
|
59
|
+
[attr.aria-label]="triggerLabel()"
|
|
60
|
+
class="tw:min-h-11 tw:min-w-11 tw:rounded-full tw:cursor-pointer tw:bg-transparent tw:border-0 tw:p-0 tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:focus-visible:outline-ring"
|
|
49
61
|
>
|
|
50
|
-
<ng-container *ngTemplateOutlet="
|
|
62
|
+
<ng-container *ngTemplateOutlet="customTrigger" />
|
|
51
63
|
</button>
|
|
52
64
|
} @else {
|
|
53
65
|
<button
|
|
54
66
|
hlmButton
|
|
55
|
-
|
|
67
|
+
type="button"
|
|
68
|
+
variant="secondary"
|
|
69
|
+
appearance="outline"
|
|
56
70
|
size="icon"
|
|
57
71
|
[hlmDropdownMenuTrigger]="menu"
|
|
58
72
|
[icon]="iconTemplate"
|
|
59
|
-
|
|
73
|
+
[attr.aria-label]="triggerLabel()"
|
|
74
|
+
class="tw:size-11 tw:rounded-full tw:border tw:border-border tw:text-foreground"
|
|
60
75
|
></button>
|
|
61
76
|
}
|
|
62
77
|
|
|
63
78
|
<ng-template #menu>
|
|
64
79
|
<div hlmDropdownMenu class="tw:w-56">
|
|
65
|
-
@for (section of
|
|
80
|
+
@for (section of sections(); track $index) {
|
|
66
81
|
@if (section.label) {
|
|
67
82
|
<div hlmDropdownMenuLabel>{{ section.label }}</div>
|
|
68
83
|
}
|
|
69
84
|
@if (section.items?.length) {
|
|
70
85
|
<div hlmDropdownMenuGroup>
|
|
71
86
|
@for (item of section.items; track item) {
|
|
72
|
-
@if (item.link) {
|
|
87
|
+
@if (item.link && !item.disabled) {
|
|
73
88
|
<a
|
|
74
89
|
hlmDropdownMenuItem
|
|
75
90
|
[routerLink]="item.link"
|
|
76
|
-
|
|
91
|
+
routerLinkActive="tw:bg-foreground/10 tw:font-semibold"
|
|
92
|
+
[routerLinkActiveOptions]="navigationMatchOptions(item)"
|
|
93
|
+
ariaCurrentWhenActive="page"
|
|
94
|
+
[class]="hlm('tw:min-h-11 tw:cursor-pointer tw:no-underline', item.class)"
|
|
77
95
|
>
|
|
78
96
|
@if (item.icon) {
|
|
79
97
|
<ng-icon
|
|
80
98
|
[svg]="item.icon"
|
|
99
|
+
aria-hidden="true"
|
|
81
100
|
size="1rem"
|
|
82
101
|
[class]="
|
|
83
102
|
hlm(
|
|
@@ -92,12 +111,15 @@ class EgLayoutSimpleUserMenu {
|
|
|
92
111
|
} @else {
|
|
93
112
|
<button
|
|
94
113
|
hlmDropdownMenuItem
|
|
114
|
+
type="button"
|
|
115
|
+
[disabled]="item.disabled || !item.action"
|
|
95
116
|
(click)="item.action?.()"
|
|
96
|
-
[class]="hlm('tw:cursor-pointer tw:no-underline', item.class)"
|
|
117
|
+
[class]="hlm('tw:min-h-11 tw:cursor-pointer tw:no-underline', item.class)"
|
|
97
118
|
>
|
|
98
119
|
@if (item.icon) {
|
|
99
120
|
<ng-icon
|
|
100
121
|
[svg]="item.icon"
|
|
122
|
+
aria-hidden="true"
|
|
101
123
|
size="1rem"
|
|
102
124
|
[class]="
|
|
103
125
|
hlm(
|
|
@@ -120,12 +142,13 @@ class EgLayoutSimpleUserMenu {
|
|
|
120
142
|
</div>
|
|
121
143
|
</ng-template>
|
|
122
144
|
</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"] }] });
|
|
145
|
+
`, 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"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
124
146
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleUserMenu, decorators: [{
|
|
126
148
|
type: Component,
|
|
127
149
|
args: [{
|
|
128
150
|
selector: 'eg-layout-simple-user-menu',
|
|
151
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
129
152
|
imports: [
|
|
130
153
|
CommonModule,
|
|
131
154
|
HlmDropdownMenu,
|
|
@@ -137,6 +160,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
137
160
|
HlmButton,
|
|
138
161
|
NgIcon,
|
|
139
162
|
RouterLink,
|
|
163
|
+
RouterLinkActive,
|
|
140
164
|
],
|
|
141
165
|
providers: [
|
|
142
166
|
provideIcons({
|
|
@@ -145,49 +169,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
145
169
|
],
|
|
146
170
|
template: `
|
|
147
171
|
<ng-template #iconTemplate>
|
|
148
|
-
<ng-icon [svg]="
|
|
172
|
+
<ng-icon [svg]="userIcon" size="1.25rem" aria-hidden="true" />
|
|
149
173
|
</ng-template>
|
|
150
174
|
|
|
151
|
-
@let
|
|
175
|
+
@let customTrigger = triggerTemplate();
|
|
152
176
|
|
|
153
177
|
<div class="tw:flex tw:w-full tw:items-center tw:justify-center">
|
|
154
|
-
@if (
|
|
178
|
+
@if (customTrigger) {
|
|
155
179
|
<button
|
|
156
180
|
type="button"
|
|
157
181
|
[hlmDropdownMenuTrigger]="menu"
|
|
158
|
-
|
|
182
|
+
[attr.aria-label]="triggerLabel()"
|
|
183
|
+
class="tw:min-h-11 tw:min-w-11 tw:rounded-full tw:cursor-pointer tw:bg-transparent tw:border-0 tw:p-0 tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:focus-visible:outline-ring"
|
|
159
184
|
>
|
|
160
|
-
<ng-container *ngTemplateOutlet="
|
|
185
|
+
<ng-container *ngTemplateOutlet="customTrigger" />
|
|
161
186
|
</button>
|
|
162
187
|
} @else {
|
|
163
188
|
<button
|
|
164
189
|
hlmButton
|
|
165
|
-
|
|
190
|
+
type="button"
|
|
191
|
+
variant="secondary"
|
|
192
|
+
appearance="outline"
|
|
166
193
|
size="icon"
|
|
167
194
|
[hlmDropdownMenuTrigger]="menu"
|
|
168
195
|
[icon]="iconTemplate"
|
|
169
|
-
|
|
196
|
+
[attr.aria-label]="triggerLabel()"
|
|
197
|
+
class="tw:size-11 tw:rounded-full tw:border tw:border-border tw:text-foreground"
|
|
170
198
|
></button>
|
|
171
199
|
}
|
|
172
200
|
|
|
173
201
|
<ng-template #menu>
|
|
174
202
|
<div hlmDropdownMenu class="tw:w-56">
|
|
175
|
-
@for (section of
|
|
203
|
+
@for (section of sections(); track $index) {
|
|
176
204
|
@if (section.label) {
|
|
177
205
|
<div hlmDropdownMenuLabel>{{ section.label }}</div>
|
|
178
206
|
}
|
|
179
207
|
@if (section.items?.length) {
|
|
180
208
|
<div hlmDropdownMenuGroup>
|
|
181
209
|
@for (item of section.items; track item) {
|
|
182
|
-
@if (item.link) {
|
|
210
|
+
@if (item.link && !item.disabled) {
|
|
183
211
|
<a
|
|
184
212
|
hlmDropdownMenuItem
|
|
185
213
|
[routerLink]="item.link"
|
|
186
|
-
|
|
214
|
+
routerLinkActive="tw:bg-foreground/10 tw:font-semibold"
|
|
215
|
+
[routerLinkActiveOptions]="navigationMatchOptions(item)"
|
|
216
|
+
ariaCurrentWhenActive="page"
|
|
217
|
+
[class]="hlm('tw:min-h-11 tw:cursor-pointer tw:no-underline', item.class)"
|
|
187
218
|
>
|
|
188
219
|
@if (item.icon) {
|
|
189
220
|
<ng-icon
|
|
190
221
|
[svg]="item.icon"
|
|
222
|
+
aria-hidden="true"
|
|
191
223
|
size="1rem"
|
|
192
224
|
[class]="
|
|
193
225
|
hlm(
|
|
@@ -202,12 +234,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
202
234
|
} @else {
|
|
203
235
|
<button
|
|
204
236
|
hlmDropdownMenuItem
|
|
237
|
+
type="button"
|
|
238
|
+
[disabled]="item.disabled || !item.action"
|
|
205
239
|
(click)="item.action?.()"
|
|
206
|
-
[class]="hlm('tw:cursor-pointer tw:no-underline', item.class)"
|
|
240
|
+
[class]="hlm('tw:min-h-11 tw:cursor-pointer tw:no-underline', item.class)"
|
|
207
241
|
>
|
|
208
242
|
@if (item.icon) {
|
|
209
243
|
<ng-icon
|
|
210
244
|
[svg]="item.icon"
|
|
245
|
+
aria-hidden="true"
|
|
211
246
|
size="1rem"
|
|
212
247
|
[class]="
|
|
213
248
|
hlm(
|
|
@@ -232,137 +267,246 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
232
267
|
</div>
|
|
233
268
|
`,
|
|
234
269
|
}]
|
|
235
|
-
}], propDecorators: {
|
|
270
|
+
}], propDecorators: { sections: [{ type: i0.Input, args: [{ isSignal: true, alias: "sections", required: false }] }], triggerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerTemplate", required: false }] }], triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }] } });
|
|
236
271
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
272
|
+
/** Async page search with debouncing, stale-response protection, and keyboard navigation. */
|
|
273
|
+
class EgLayoutSearch {
|
|
274
|
+
placeholder = input('Search pages…', /* @ts-ignore */
|
|
275
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
276
|
+
emptyText = input('No matching pages found.', /* @ts-ignore */
|
|
241
277
|
...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
|
|
278
|
+
errorText = input('Search is unavailable. Please try again.', /* @ts-ignore */
|
|
279
|
+
...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
280
|
+
loadingText = input('Searching…', /* @ts-ignore */
|
|
281
|
+
...(ngDevMode ? [{ debugName: "loadingText" }] : /* istanbul ignore next */ []));
|
|
282
|
+
retryText = input('Try again', /* @ts-ignore */
|
|
283
|
+
...(ngDevMode ? [{ debugName: "retryText" }] : /* istanbul ignore next */ []));
|
|
284
|
+
loader = input(/* @ts-ignore */
|
|
285
|
+
...(ngDevMode ? [undefined, { debugName: "loader" }] : /* istanbul ignore next */ []));
|
|
286
|
+
resultLabel = input(/* @ts-ignore */
|
|
287
|
+
...(ngDevMode ? [undefined, { debugName: "resultLabel" }] : /* istanbul ignore next */ []));
|
|
288
|
+
resultTemplate = input(/* @ts-ignore */
|
|
289
|
+
...(ngDevMode ? [undefined, { debugName: "resultTemplate" }] : /* istanbul ignore next */ []));
|
|
290
|
+
resultSelected = output();
|
|
291
|
+
searchIcon = lucideSearch;
|
|
292
|
+
query = signal('', /* @ts-ignore */
|
|
293
|
+
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
294
|
+
results = signal([], /* @ts-ignore */
|
|
295
|
+
...(ngDevMode ? [{ debugName: "results" }] : /* istanbul ignore next */ []));
|
|
296
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
297
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
298
|
+
isLoading = signal(false, /* @ts-ignore */
|
|
299
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
300
|
+
hasError = signal(false, /* @ts-ignore */
|
|
301
|
+
...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
302
|
+
retryVersion = signal(0, /* @ts-ignore */
|
|
303
|
+
...(ngDevMode ? [{ debugName: "retryVersion" }] : /* istanbul ignore next */ []));
|
|
304
|
+
searchInput = viewChild('searchInput', /* @ts-ignore */
|
|
305
|
+
...(ngDevMode ? [{ debugName: "searchInput" }] : /* istanbul ignore next */ []));
|
|
306
|
+
resultButtons = viewChildren('resultButton', /* @ts-ignore */
|
|
307
|
+
...(ngDevMode ? [{ debugName: "resultButtons" }] : /* istanbul ignore next */ []));
|
|
262
308
|
constructor() {
|
|
263
|
-
|
|
264
|
-
|
|
309
|
+
effect((onCleanup) => {
|
|
310
|
+
const open = this.isOpen();
|
|
311
|
+
const search = this.query().trim();
|
|
312
|
+
const loader = this.loader();
|
|
313
|
+
this.retryVersion();
|
|
314
|
+
this.results.set([]);
|
|
315
|
+
this.hasError.set(false);
|
|
316
|
+
this.isLoading.set(open && !!loader);
|
|
317
|
+
if (!open || !loader)
|
|
318
|
+
return;
|
|
319
|
+
// Cleanup also invalidates an in-flight request when the component is destroyed.
|
|
320
|
+
let cancelled = false;
|
|
321
|
+
const timeout = setTimeout(async () => {
|
|
322
|
+
try {
|
|
323
|
+
const results = await loader({ search });
|
|
324
|
+
if (!cancelled)
|
|
325
|
+
this.results.set(results);
|
|
326
|
+
}
|
|
327
|
+
catch {
|
|
328
|
+
if (!cancelled)
|
|
329
|
+
this.hasError.set(true);
|
|
330
|
+
}
|
|
331
|
+
finally {
|
|
332
|
+
if (!cancelled)
|
|
333
|
+
this.isLoading.set(false);
|
|
334
|
+
}
|
|
335
|
+
}, search ? 180 : 0);
|
|
336
|
+
onCleanup(() => {
|
|
337
|
+
cancelled = true;
|
|
338
|
+
clearTimeout(timeout);
|
|
339
|
+
});
|
|
340
|
+
});
|
|
265
341
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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
|
-
}
|
|
342
|
+
labelFor(item) {
|
|
343
|
+
return this.resultLabel()?.(item) ?? String(item);
|
|
344
|
+
}
|
|
345
|
+
setOpen(open) {
|
|
346
|
+
this.isOpen.set(open);
|
|
347
|
+
if (!open)
|
|
348
|
+
this.query.set('');
|
|
280
349
|
}
|
|
281
|
-
|
|
282
|
-
this.
|
|
283
|
-
this.search.set('');
|
|
350
|
+
retry() {
|
|
351
|
+
this.retryVersion.update((version) => version + 1);
|
|
284
352
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
353
|
+
selectResult(item) {
|
|
354
|
+
this.setOpen(false);
|
|
355
|
+
this.resultSelected.emit(item);
|
|
356
|
+
}
|
|
357
|
+
focusResult(index, event) {
|
|
358
|
+
const buttons = this.resultButtons();
|
|
359
|
+
if (!buttons.length)
|
|
360
|
+
return;
|
|
361
|
+
event.preventDefault();
|
|
362
|
+
if (index < 0)
|
|
363
|
+
this.searchInput()?.nativeElement.focus();
|
|
364
|
+
else
|
|
365
|
+
buttons[Math.min(index, buttons.length - 1)]?.nativeElement.focus();
|
|
366
|
+
}
|
|
367
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSearch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
368
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgLayoutSearch, isStandalone: true, selector: "eg-layout-search", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, retryText: { classPropertyName: "retryText", publicName: "retryText", isSignal: true, isRequired: false, transformFunction: null }, loader: { classPropertyName: "loader", publicName: "loader", isSignal: true, isRequired: false, transformFunction: null }, resultLabel: { classPropertyName: "resultLabel", publicName: "resultLabel", isSignal: true, isRequired: false, transformFunction: null }, resultTemplate: { classPropertyName: "resultTemplate", publicName: "resultTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resultSelected: "resultSelected" }, host: { classAttribute: "tw:block tw:min-w-0" }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "resultButtons", predicate: ["resultButton"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
369
|
+
<hlm-popover
|
|
370
|
+
[state]="isOpen() ? 'open' : 'closed'"
|
|
371
|
+
(stateChanged)="setOpen($event === 'open')"
|
|
372
|
+
(closed)="setOpen(false)"
|
|
373
|
+
>
|
|
288
374
|
<button
|
|
289
375
|
hlmPopoverTrigger
|
|
290
|
-
hlmButton
|
|
291
|
-
variant="secondary"
|
|
292
|
-
appearance="outline"
|
|
293
376
|
type="button"
|
|
294
|
-
class="tw:w-
|
|
377
|
+
class="tw:flex tw:min-h-11 tw:w-full tw:items-center tw:gap-2 tw:rounded-lg tw:border tw:border-border tw:bg-foreground/3 tw:px-3 tw:text-left tw:text-sm tw:text-foreground/75 tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:focus-visible:outline-ring tw:md:w-56"
|
|
295
378
|
>
|
|
296
|
-
<ng-icon
|
|
297
|
-
<span class="tw:truncate">{{
|
|
379
|
+
<ng-icon [svg]="searchIcon" size="16px" aria-hidden="true" class="tw:shrink-0" />
|
|
380
|
+
<span class="tw:truncate">{{ placeholder() }}</span>
|
|
298
381
|
</button>
|
|
299
|
-
|
|
300
|
-
<hlm-popover-content class="tw:w-64 tw:p-2">
|
|
382
|
+
<hlm-popover-content *hlmPopoverPortal class="tw:w-80 tw:max-w-[calc(100vw-2rem)] tw:p-2">
|
|
301
383
|
<input
|
|
384
|
+
#searchInput
|
|
302
385
|
hlmInput
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
[
|
|
306
|
-
|
|
386
|
+
type="search"
|
|
387
|
+
autocomplete="off"
|
|
388
|
+
[value]="query()"
|
|
389
|
+
(input)="query.set($any($event.target).value)"
|
|
390
|
+
[placeholder]="placeholder()"
|
|
391
|
+
[attr.aria-label]="placeholder()"
|
|
392
|
+
(keydown.arrowdown)="focusResult(0, $event)"
|
|
393
|
+
class="tw:mb-2 tw:min-h-11"
|
|
307
394
|
/>
|
|
308
|
-
<div class="tw:max-h-
|
|
309
|
-
@if (
|
|
310
|
-
<
|
|
395
|
+
<div [attr.aria-busy]="isLoading()" class="tw:max-h-72 tw:overflow-y-auto tw:overscroll-contain">
|
|
396
|
+
@if (isLoading()) {
|
|
397
|
+
<p role="status" class="tw:px-3 tw:py-6 tw:text-center tw:text-sm tw:text-foreground/75">
|
|
398
|
+
{{ loadingText() }}
|
|
399
|
+
</p>
|
|
400
|
+
} @else if (hasError()) {
|
|
401
|
+
<div role="status" class="tw:space-y-3 tw:px-3 tw:py-4 tw:text-sm">
|
|
402
|
+
<p>{{ errorText() }}</p>
|
|
403
|
+
<button
|
|
404
|
+
type="button"
|
|
405
|
+
(click)="retry()"
|
|
406
|
+
class="tw:min-h-11 tw:rounded-md tw:border tw:border-border tw:px-3 tw:font-medium tw:cursor-pointer tw:focus-visible:outline-2 tw:focus-visible:outline-ring"
|
|
407
|
+
>
|
|
408
|
+
{{ retryText() }}
|
|
409
|
+
</button>
|
|
410
|
+
</div>
|
|
411
|
+
} @else if (!results().length) {
|
|
412
|
+
<p role="status" class="tw:px-3 tw:py-6 tw:text-center tw:text-sm tw:text-foreground/75">
|
|
413
|
+
{{ emptyText() }}
|
|
414
|
+
</p>
|
|
311
415
|
} @else {
|
|
312
|
-
@for (
|
|
416
|
+
@for (result of results(); track $index; let index = $index) {
|
|
313
417
|
<button
|
|
418
|
+
#resultButton
|
|
314
419
|
type="button"
|
|
315
|
-
(click)="
|
|
316
|
-
|
|
420
|
+
(click)="selectResult(result)"
|
|
421
|
+
(keydown.arrowdown)="focusResult(index + 1, $event)"
|
|
422
|
+
(keydown.arrowup)="focusResult(index - 1, $event)"
|
|
423
|
+
(keydown.home)="focusResult(0, $event)"
|
|
424
|
+
(keydown.end)="focusResult(results().length - 1, $event)"
|
|
425
|
+
class="tw:flex tw:min-h-11 tw:w-full tw:items-center tw:rounded-md tw:px-3 tw:py-2 tw:text-left tw:text-sm tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:bg-foreground/10 tw:focus-visible:outline-2 tw:focus-visible:-outline-offset-2 tw:focus-visible:outline-ring"
|
|
317
426
|
>
|
|
318
|
-
|
|
427
|
+
@if (resultTemplate(); as template) {
|
|
428
|
+
<ng-container [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ $implicit: result }" />
|
|
429
|
+
} @else {
|
|
430
|
+
{{ labelFor(result) }}
|
|
431
|
+
}
|
|
319
432
|
</button>
|
|
320
433
|
}
|
|
321
434
|
}
|
|
322
435
|
</div>
|
|
323
436
|
</hlm-popover-content>
|
|
324
437
|
</hlm-popover>
|
|
325
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
438
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
326
439
|
}
|
|
327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSearch, decorators: [{
|
|
328
441
|
type: Component,
|
|
329
442
|
args: [{
|
|
330
|
-
selector: 'eg-
|
|
331
|
-
imports: [
|
|
332
|
-
|
|
443
|
+
selector: 'eg-layout-search',
|
|
444
|
+
imports: [NgTemplateOutlet, HlmPopover, HlmPopoverTrigger, HlmPopoverContent, HlmPopoverPortal, HlmInput, NgIcon],
|
|
445
|
+
host: { class: 'tw:block tw:min-w-0' },
|
|
333
446
|
template: `
|
|
334
|
-
<hlm-popover
|
|
447
|
+
<hlm-popover
|
|
448
|
+
[state]="isOpen() ? 'open' : 'closed'"
|
|
449
|
+
(stateChanged)="setOpen($event === 'open')"
|
|
450
|
+
(closed)="setOpen(false)"
|
|
451
|
+
>
|
|
335
452
|
<button
|
|
336
453
|
hlmPopoverTrigger
|
|
337
|
-
hlmButton
|
|
338
|
-
variant="secondary"
|
|
339
|
-
appearance="outline"
|
|
340
454
|
type="button"
|
|
341
|
-
class="tw:w-
|
|
455
|
+
class="tw:flex tw:min-h-11 tw:w-full tw:items-center tw:gap-2 tw:rounded-lg tw:border tw:border-border tw:bg-foreground/3 tw:px-3 tw:text-left tw:text-sm tw:text-foreground/75 tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:focus-visible:outline-ring tw:md:w-56"
|
|
342
456
|
>
|
|
343
|
-
<ng-icon
|
|
344
|
-
<span class="tw:truncate">{{
|
|
457
|
+
<ng-icon [svg]="searchIcon" size="16px" aria-hidden="true" class="tw:shrink-0" />
|
|
458
|
+
<span class="tw:truncate">{{ placeholder() }}</span>
|
|
345
459
|
</button>
|
|
346
|
-
|
|
347
|
-
<hlm-popover-content class="tw:w-64 tw:p-2">
|
|
460
|
+
<hlm-popover-content *hlmPopoverPortal class="tw:w-80 tw:max-w-[calc(100vw-2rem)] tw:p-2">
|
|
348
461
|
<input
|
|
462
|
+
#searchInput
|
|
349
463
|
hlmInput
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
[
|
|
353
|
-
|
|
464
|
+
type="search"
|
|
465
|
+
autocomplete="off"
|
|
466
|
+
[value]="query()"
|
|
467
|
+
(input)="query.set($any($event.target).value)"
|
|
468
|
+
[placeholder]="placeholder()"
|
|
469
|
+
[attr.aria-label]="placeholder()"
|
|
470
|
+
(keydown.arrowdown)="focusResult(0, $event)"
|
|
471
|
+
class="tw:mb-2 tw:min-h-11"
|
|
354
472
|
/>
|
|
355
|
-
<div class="tw:max-h-
|
|
356
|
-
@if (
|
|
357
|
-
<
|
|
473
|
+
<div [attr.aria-busy]="isLoading()" class="tw:max-h-72 tw:overflow-y-auto tw:overscroll-contain">
|
|
474
|
+
@if (isLoading()) {
|
|
475
|
+
<p role="status" class="tw:px-3 tw:py-6 tw:text-center tw:text-sm tw:text-foreground/75">
|
|
476
|
+
{{ loadingText() }}
|
|
477
|
+
</p>
|
|
478
|
+
} @else if (hasError()) {
|
|
479
|
+
<div role="status" class="tw:space-y-3 tw:px-3 tw:py-4 tw:text-sm">
|
|
480
|
+
<p>{{ errorText() }}</p>
|
|
481
|
+
<button
|
|
482
|
+
type="button"
|
|
483
|
+
(click)="retry()"
|
|
484
|
+
class="tw:min-h-11 tw:rounded-md tw:border tw:border-border tw:px-3 tw:font-medium tw:cursor-pointer tw:focus-visible:outline-2 tw:focus-visible:outline-ring"
|
|
485
|
+
>
|
|
486
|
+
{{ retryText() }}
|
|
487
|
+
</button>
|
|
488
|
+
</div>
|
|
489
|
+
} @else if (!results().length) {
|
|
490
|
+
<p role="status" class="tw:px-3 tw:py-6 tw:text-center tw:text-sm tw:text-foreground/75">
|
|
491
|
+
{{ emptyText() }}
|
|
492
|
+
</p>
|
|
358
493
|
} @else {
|
|
359
|
-
@for (
|
|
494
|
+
@for (result of results(); track $index; let index = $index) {
|
|
360
495
|
<button
|
|
496
|
+
#resultButton
|
|
361
497
|
type="button"
|
|
362
|
-
(click)="
|
|
363
|
-
|
|
498
|
+
(click)="selectResult(result)"
|
|
499
|
+
(keydown.arrowdown)="focusResult(index + 1, $event)"
|
|
500
|
+
(keydown.arrowup)="focusResult(index - 1, $event)"
|
|
501
|
+
(keydown.home)="focusResult(0, $event)"
|
|
502
|
+
(keydown.end)="focusResult(results().length - 1, $event)"
|
|
503
|
+
class="tw:flex tw:min-h-11 tw:w-full tw:items-center tw:rounded-md tw:px-3 tw:py-2 tw:text-left tw:text-sm tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:bg-foreground/10 tw:focus-visible:outline-2 tw:focus-visible:-outline-offset-2 tw:focus-visible:outline-ring"
|
|
364
504
|
>
|
|
365
|
-
|
|
505
|
+
@if (resultTemplate(); as template) {
|
|
506
|
+
<ng-container [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ $implicit: result }" />
|
|
507
|
+
} @else {
|
|
508
|
+
{{ labelFor(result) }}
|
|
509
|
+
}
|
|
366
510
|
</button>
|
|
367
511
|
}
|
|
368
512
|
}
|
|
@@ -372,340 +516,715 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
372
516
|
`,
|
|
373
517
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
374
518
|
}]
|
|
375
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
519
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], retryText: [{ type: i0.Input, args: [{ isSignal: true, alias: "retryText", required: false }] }], loader: [{ type: i0.Input, args: [{ isSignal: true, alias: "loader", required: false }] }], resultLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resultLabel", required: false }] }], resultTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "resultTemplate", required: false }] }], resultSelected: [{ type: i0.Output, args: ["resultSelected"] }], searchInput: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }], resultButtons: [{ type: i0.ViewChildren, args: ['resultButton', { isSignal: true }] }] } });
|
|
376
520
|
|
|
377
521
|
class EgLayoutSimpleSidebar {
|
|
378
|
-
|
|
379
|
-
...(ngDevMode ? [{ debugName: "
|
|
380
|
-
|
|
381
|
-
...(ngDevMode ? [{ debugName: "
|
|
382
|
-
title = input('', /* @ts-ignore */
|
|
522
|
+
sheet = viewChild(BrnSheet, /* @ts-ignore */
|
|
523
|
+
...(ngDevMode ? [{ debugName: "sheet" }] : /* istanbul ignore next */ []));
|
|
524
|
+
panelId = input.required(/* @ts-ignore */
|
|
525
|
+
...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
|
|
526
|
+
title = input('Navigation', /* @ts-ignore */
|
|
383
527
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
384
528
|
content = input(/* @ts-ignore */
|
|
385
529
|
...(ngDevMode ? [undefined, { debugName: "content" }] : /* istanbul ignore next */ []));
|
|
386
|
-
contentContext = input(/* @ts-ignore */
|
|
387
|
-
...(ngDevMode ? [
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
openSheet() {
|
|
392
|
-
this.viewchildSheetRef()?.open();
|
|
530
|
+
contentContext = input(null, /* @ts-ignore */
|
|
531
|
+
...(ngDevMode ? [{ debugName: "contentContext" }] : /* istanbul ignore next */ []));
|
|
532
|
+
open() {
|
|
533
|
+
this.sheet()?.open();
|
|
393
534
|
}
|
|
394
|
-
|
|
395
|
-
this.
|
|
535
|
+
close() {
|
|
536
|
+
this.sheet()?.close();
|
|
396
537
|
}
|
|
397
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
398
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
<
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
<
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
<hlm-sheet-footer>
|
|
415
|
-
<button brnSheetClose hlmButton variant="secondary" appearance="outline-filled">Close</button>
|
|
538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleSidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
539
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.3", type: EgLayoutSimpleSidebar, isStandalone: true, selector: "eg-layout-simple-sidebar", inputs: { panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal: true, isRequired: true, 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: "sheet", first: true, predicate: BrnSheet, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
540
|
+
<hlm-sheet [id]="panelId()" side="left">
|
|
541
|
+
<hlm-sheet-content
|
|
542
|
+
*brnSheetContent="let context"
|
|
543
|
+
class="tw:flex tw:h-full tw:max-w-[calc(100vw-2rem)] tw:flex-col tw:gap-0"
|
|
544
|
+
>
|
|
545
|
+
<hlm-sheet-header class="tw:shrink-0 tw:border-b tw:border-border tw:pr-12">
|
|
546
|
+
<h2 hlmSheetTitle>{{ title() }}</h2>
|
|
547
|
+
</hlm-sheet-header>
|
|
548
|
+
<div class="tw:min-h-0 tw:flex-1 tw:overflow-y-auto tw:overscroll-contain tw:p-4">
|
|
549
|
+
<ng-container [ngTemplateOutlet]="content() ?? null" [ngTemplateOutletContext]="contentContext()" />
|
|
550
|
+
</div>
|
|
551
|
+
<hlm-sheet-footer class="tw:shrink-0 tw:border-t tw:border-border">
|
|
552
|
+
<button type="button" brnSheetClose hlmButton variant="secondary" appearance="outline">
|
|
553
|
+
Close navigation
|
|
554
|
+
</button>
|
|
416
555
|
</hlm-sheet-footer>
|
|
417
556
|
</hlm-sheet-content>
|
|
418
557
|
</hlm-sheet>
|
|
419
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
558
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.BrnSheetClose, selector: "button[brnSheetClose]" }, { kind: "directive", type: i1$1.BrnSheetContent, selector: "[brnSheetContent]" }, { kind: "component", type: i2.HlmSheet, selector: "hlm-sheet", exportAs: ["hlmSheet"] }, { kind: "component", type: i2.HlmSheetContent, selector: "hlm-sheet-content", inputs: ["class"] }, { kind: "component", type: i2.HlmSheetFooter, selector: "hlm-sheet-footer", inputs: ["class"] }, { kind: "component", type: i2.HlmSheetHeader, selector: "hlm-sheet-header", inputs: ["class"] }, { kind: "directive", type: i2.HlmSheetTitle, selector: "[hlmSheetTitle]", inputs: ["class"] }, { kind: "component", type: i3.HlmButton, selector: "button[hlmButton], a[hlmButton]", inputs: ["variant", "size", "appearance", "loading", "icon", "iconPosition", "class", "spinnerUserClass", "disabled", "type"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
420
559
|
}
|
|
421
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleSidebar, decorators: [{
|
|
422
561
|
type: Component,
|
|
423
562
|
args: [{
|
|
424
563
|
selector: 'eg-layout-simple-sidebar',
|
|
425
|
-
|
|
426
|
-
|
|
564
|
+
imports: [NgTemplateOutlet, BrnSheetImports, HlmSheetImports, HlmButtonImports],
|
|
565
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
427
566
|
template: `
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
<
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
<
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
<hlm-sheet-footer>
|
|
444
|
-
<button brnSheetClose hlmButton variant="secondary" appearance="outline-filled">Close</button>
|
|
567
|
+
<hlm-sheet [id]="panelId()" side="left">
|
|
568
|
+
<hlm-sheet-content
|
|
569
|
+
*brnSheetContent="let context"
|
|
570
|
+
class="tw:flex tw:h-full tw:max-w-[calc(100vw-2rem)] tw:flex-col tw:gap-0"
|
|
571
|
+
>
|
|
572
|
+
<hlm-sheet-header class="tw:shrink-0 tw:border-b tw:border-border tw:pr-12">
|
|
573
|
+
<h2 hlmSheetTitle>{{ title() }}</h2>
|
|
574
|
+
</hlm-sheet-header>
|
|
575
|
+
<div class="tw:min-h-0 tw:flex-1 tw:overflow-y-auto tw:overscroll-contain tw:p-4">
|
|
576
|
+
<ng-container [ngTemplateOutlet]="content() ?? null" [ngTemplateOutletContext]="contentContext()" />
|
|
577
|
+
</div>
|
|
578
|
+
<hlm-sheet-footer class="tw:shrink-0 tw:border-t tw:border-border">
|
|
579
|
+
<button type="button" brnSheetClose hlmButton variant="secondary" appearance="outline">
|
|
580
|
+
Close navigation
|
|
581
|
+
</button>
|
|
445
582
|
</hlm-sheet-footer>
|
|
446
583
|
</hlm-sheet-content>
|
|
447
584
|
</hlm-sheet>
|
|
448
585
|
`,
|
|
449
586
|
}]
|
|
450
|
-
}],
|
|
587
|
+
}], propDecorators: { sheet: [{ type: i0.ViewChild, args: [i0.forwardRef(() => BrnSheet), { isSignal: true }] }], panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: true }] }], 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 }] }] } });
|
|
588
|
+
|
|
589
|
+
/** Internal shared renderer keeps desktop, mobile, and footer navigation consistent. */
|
|
590
|
+
class EgLayoutNavigationItem {
|
|
591
|
+
item = input.required(/* @ts-ignore */
|
|
592
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
593
|
+
itemClass = input('', /* @ts-ignore */
|
|
594
|
+
...(ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []));
|
|
595
|
+
appearance = input('link', /* @ts-ignore */
|
|
596
|
+
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
597
|
+
selected = output();
|
|
598
|
+
activeClasses = 'tw:bg-foreground/10 tw:font-semibold tw:underline tw:decoration-2 tw:underline-offset-4';
|
|
599
|
+
classes = computed(() => hlm('tw:flex tw:min-h-11 tw:w-full tw:items-center tw:gap-2 tw:rounded-lg tw:px-3 tw:py-2 tw:text-left tw:text-sm tw:font-medium tw:text-foreground tw:no-underline tw:cursor-pointer tw:motion-safe:transition-colors tw:hover:bg-foreground/5 tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:focus-visible:outline-ring tw:disabled:cursor-not-allowed tw:disabled:opacity-50', this.appearance() === 'card' &&
|
|
600
|
+
'tw:h-full tw:min-h-11 tw:md:min-h-24 tw:flex-col tw:items-start tw:justify-between tw:gap-5 tw:rounded-xl tw:border tw:border-transparent tw:bg-foreground/3 tw:p-4 tw:font-semibold tw:break-words tw:hover:border-border tw:hover:bg-foreground/7', this.itemClass(), this.item().class), /* @ts-ignore */
|
|
601
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
602
|
+
matchOptions = computed(() => navigationMatchOptions(this.item()), /* @ts-ignore */
|
|
603
|
+
...(ngDevMode ? [{ debugName: "matchOptions" }] : /* istanbul ignore next */ []));
|
|
604
|
+
activate() {
|
|
605
|
+
const item = this.item();
|
|
606
|
+
if (item.disabled || !item.action)
|
|
607
|
+
return;
|
|
608
|
+
item.action();
|
|
609
|
+
this.selected.emit(item);
|
|
610
|
+
}
|
|
611
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutNavigationItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
612
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgLayoutNavigationItem, isStandalone: true, selector: "eg-layout-navigation-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, itemClass: { classPropertyName: "itemClass", publicName: "itemClass", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { classAttribute: "tw:block tw:min-w-0 tw:shrink-0" }, ngImport: i0, template: `
|
|
613
|
+
@let entry = item();
|
|
614
|
+
@if (entry.link && !entry.disabled) {
|
|
615
|
+
<a
|
|
616
|
+
[routerLink]="entry.link"
|
|
617
|
+
[routerLinkActive]="activeClasses"
|
|
618
|
+
[routerLinkActiveOptions]="matchOptions()"
|
|
619
|
+
ariaCurrentWhenActive="page"
|
|
620
|
+
[class]="classes()"
|
|
621
|
+
(click)="selected.emit(entry)"
|
|
622
|
+
>
|
|
623
|
+
<ng-container [ngTemplateOutlet]="content" />
|
|
624
|
+
</a>
|
|
625
|
+
} @else {
|
|
626
|
+
<button type="button" [class]="classes()" [disabled]="entry.disabled || !entry.action" (click)="activate()">
|
|
627
|
+
<ng-container [ngTemplateOutlet]="content" />
|
|
628
|
+
</button>
|
|
629
|
+
}
|
|
630
|
+
<ng-template #content>
|
|
631
|
+
@if (entry.icon) {
|
|
632
|
+
<ng-icon
|
|
633
|
+
[svg]="entry.icon"
|
|
634
|
+
[size]="appearance() === 'card' ? '1.25rem' : '1rem'"
|
|
635
|
+
aria-hidden="true"
|
|
636
|
+
class="tw:shrink-0"
|
|
637
|
+
/>
|
|
638
|
+
}
|
|
639
|
+
<span class="tw:min-w-0">
|
|
640
|
+
<span class="tw:block">{{ entry.label }}</span>
|
|
641
|
+
@if (appearance() === 'card' && entry.description) {
|
|
642
|
+
<span class="tw:mt-1.5 tw:block tw:text-sm tw:font-normal tw:leading-relaxed tw:text-foreground/75">{{
|
|
643
|
+
entry.description
|
|
644
|
+
}}</span>
|
|
645
|
+
}
|
|
646
|
+
</span>
|
|
647
|
+
</ng-template>
|
|
648
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
649
|
+
}
|
|
650
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutNavigationItem, decorators: [{
|
|
651
|
+
type: Component,
|
|
652
|
+
args: [{
|
|
653
|
+
selector: 'eg-layout-navigation-item',
|
|
654
|
+
imports: [RouterLink, RouterLinkActive, NgIcon, NgTemplateOutlet],
|
|
655
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
656
|
+
host: { class: 'tw:block tw:min-w-0 tw:shrink-0' },
|
|
657
|
+
template: `
|
|
658
|
+
@let entry = item();
|
|
659
|
+
@if (entry.link && !entry.disabled) {
|
|
660
|
+
<a
|
|
661
|
+
[routerLink]="entry.link"
|
|
662
|
+
[routerLinkActive]="activeClasses"
|
|
663
|
+
[routerLinkActiveOptions]="matchOptions()"
|
|
664
|
+
ariaCurrentWhenActive="page"
|
|
665
|
+
[class]="classes()"
|
|
666
|
+
(click)="selected.emit(entry)"
|
|
667
|
+
>
|
|
668
|
+
<ng-container [ngTemplateOutlet]="content" />
|
|
669
|
+
</a>
|
|
670
|
+
} @else {
|
|
671
|
+
<button type="button" [class]="classes()" [disabled]="entry.disabled || !entry.action" (click)="activate()">
|
|
672
|
+
<ng-container [ngTemplateOutlet]="content" />
|
|
673
|
+
</button>
|
|
674
|
+
}
|
|
675
|
+
<ng-template #content>
|
|
676
|
+
@if (entry.icon) {
|
|
677
|
+
<ng-icon
|
|
678
|
+
[svg]="entry.icon"
|
|
679
|
+
[size]="appearance() === 'card' ? '1.25rem' : '1rem'"
|
|
680
|
+
aria-hidden="true"
|
|
681
|
+
class="tw:shrink-0"
|
|
682
|
+
/>
|
|
683
|
+
}
|
|
684
|
+
<span class="tw:min-w-0">
|
|
685
|
+
<span class="tw:block">{{ entry.label }}</span>
|
|
686
|
+
@if (appearance() === 'card' && entry.description) {
|
|
687
|
+
<span class="tw:mt-1.5 tw:block tw:text-sm tw:font-normal tw:leading-relaxed tw:text-foreground/75">{{
|
|
688
|
+
entry.description
|
|
689
|
+
}}</span>
|
|
690
|
+
}
|
|
691
|
+
</span>
|
|
692
|
+
</ng-template>
|
|
693
|
+
`,
|
|
694
|
+
}]
|
|
695
|
+
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], itemClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemClass", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
451
696
|
|
|
452
697
|
class EgLayoutSimpleMobileMenuGroup {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
698
|
+
label = input(/* @ts-ignore */
|
|
699
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
456
700
|
items = input(/* @ts-ignore */
|
|
457
701
|
...(ngDevMode ? [undefined, { debugName: "items" }] : /* istanbul ignore next */ []));
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
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="tw:px-3 tw:py-1 tw:text-xs tw:font-semibold tw:text-muted-foreground">{{ _label }}</div>
|
|
702
|
+
itemSelected = output();
|
|
703
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleMobileMenuGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
704
|
+
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: { itemSelected: "itemSelected" }, host: { classAttribute: "tw:block tw:empty:hidden" }, ngImport: i0, template: `
|
|
705
|
+
@if (items()?.length) {
|
|
706
|
+
@if (label()) {
|
|
707
|
+
<div class="tw:px-3 tw:pb-2 tw:text-xs tw:font-semibold tw:text-foreground/75">{{ label() }}</div>
|
|
471
708
|
}
|
|
472
|
-
<div class="tw:
|
|
473
|
-
@for (item of
|
|
474
|
-
|
|
475
|
-
<a
|
|
476
|
-
[routerLink]="item.link"
|
|
477
|
-
[class]="
|
|
478
|
-
hlm(
|
|
479
|
-
'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'
|
|
480
|
-
)
|
|
481
|
-
"
|
|
482
|
-
(click)="handleClick(item)"
|
|
483
|
-
>
|
|
484
|
-
@if (item.icon) {
|
|
485
|
-
<ng-icon [svg]="item.icon" size="1rem" [class]="hlm('tw:cursor-pointer tw: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
|
-
'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'
|
|
496
|
-
)
|
|
497
|
-
"
|
|
498
|
-
>
|
|
499
|
-
@if (item.icon) {
|
|
500
|
-
<ng-icon [svg]="item.icon" size="1rem" [class]="hlm('tw:cursor-pointer tw:mr-2')"> </ng-icon>
|
|
501
|
-
}
|
|
502
|
-
<span>{{ item.label }}</span>
|
|
503
|
-
</button>
|
|
504
|
-
}
|
|
709
|
+
<div class="tw:grid tw:gap-1">
|
|
710
|
+
@for (item of items(); track $index) {
|
|
711
|
+
<eg-layout-navigation-item [item]="item" (selected)="itemSelected.emit($event)" />
|
|
505
712
|
}
|
|
506
713
|
</div>
|
|
507
714
|
}
|
|
508
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
715
|
+
`, isInline: true, dependencies: [{ kind: "component", type: EgLayoutNavigationItem, selector: "eg-layout-navigation-item", inputs: ["item", "itemClass", "appearance"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
509
716
|
}
|
|
510
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimpleMobileMenuGroup, decorators: [{
|
|
511
718
|
type: Component,
|
|
512
719
|
args: [{
|
|
513
720
|
selector: 'eg-layout-simple-mobile-menu-group',
|
|
514
|
-
imports: [
|
|
515
|
-
|
|
721
|
+
imports: [EgLayoutNavigationItem],
|
|
722
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
723
|
+
host: { class: 'tw:block tw:empty:hidden' },
|
|
516
724
|
template: `
|
|
517
|
-
@
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
@if (_items && _items.length > 0) {
|
|
521
|
-
@if (_label) {
|
|
522
|
-
<div class="tw:px-3 tw:py-1 tw:text-xs tw:font-semibold tw:text-muted-foreground">{{ _label }}</div>
|
|
725
|
+
@if (items()?.length) {
|
|
726
|
+
@if (label()) {
|
|
727
|
+
<div class="tw:px-3 tw:pb-2 tw:text-xs tw:font-semibold tw:text-foreground/75">{{ label() }}</div>
|
|
523
728
|
}
|
|
524
|
-
<div class="tw:
|
|
525
|
-
@for (item of
|
|
526
|
-
|
|
527
|
-
<a
|
|
528
|
-
[routerLink]="item.link"
|
|
529
|
-
[class]="
|
|
530
|
-
hlm(
|
|
531
|
-
'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'
|
|
532
|
-
)
|
|
533
|
-
"
|
|
534
|
-
(click)="handleClick(item)"
|
|
535
|
-
>
|
|
536
|
-
@if (item.icon) {
|
|
537
|
-
<ng-icon [svg]="item.icon" size="1rem" [class]="hlm('tw:cursor-pointer tw: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
|
-
'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'
|
|
548
|
-
)
|
|
549
|
-
"
|
|
550
|
-
>
|
|
551
|
-
@if (item.icon) {
|
|
552
|
-
<ng-icon [svg]="item.icon" size="1rem" [class]="hlm('tw:cursor-pointer tw:mr-2')"> </ng-icon>
|
|
553
|
-
}
|
|
554
|
-
<span>{{ item.label }}</span>
|
|
555
|
-
</button>
|
|
556
|
-
}
|
|
729
|
+
<div class="tw:grid tw:gap-1">
|
|
730
|
+
@for (item of items(); track $index) {
|
|
731
|
+
<eg-layout-navigation-item [item]="item" (selected)="itemSelected.emit($event)" />
|
|
557
732
|
}
|
|
558
733
|
</div>
|
|
559
734
|
}
|
|
560
735
|
`,
|
|
561
736
|
}]
|
|
562
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }],
|
|
737
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }] } });
|
|
738
|
+
|
|
739
|
+
/** Internal disclosure navigation: native links, normal Tab order, no application-menu roles. */
|
|
740
|
+
class EgLayoutFlyoutNavbar {
|
|
741
|
+
groups = input.required(/* @ts-ignore */
|
|
742
|
+
...(ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []));
|
|
743
|
+
label = input('Fly-out navigation', /* @ts-ignore */
|
|
744
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
745
|
+
closeLabel = input('Close navigation panel', /* @ts-ignore */
|
|
746
|
+
...(ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []));
|
|
747
|
+
navbarClass = input('', /* @ts-ignore */
|
|
748
|
+
...(ngDevMode ? [{ debugName: "navbarClass" }] : /* istanbul ignore next */ []));
|
|
749
|
+
panelClass = input('', /* @ts-ignore */
|
|
750
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
751
|
+
itemClass = input('', /* @ts-ignore */
|
|
752
|
+
...(ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []));
|
|
753
|
+
host = inject(ElementRef);
|
|
754
|
+
injector = inject(Injector);
|
|
755
|
+
router = inject(Router);
|
|
756
|
+
currentUrl = signal(this.router.url, /* @ts-ignore */
|
|
757
|
+
...(ngDevMode ? [{ debugName: "currentUrl" }] : /* istanbul ignore next */ []));
|
|
758
|
+
triggers = viewChildren('trigger', /* @ts-ignore */
|
|
759
|
+
...(ngDevMode ? [{ debugName: "triggers" }] : /* istanbul ignore next */ []));
|
|
760
|
+
panel = viewChild('panel', /* @ts-ignore */
|
|
761
|
+
...(ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []));
|
|
762
|
+
id = inject(_IdGenerator).getId('eg-layout-flyout-');
|
|
763
|
+
hlm = hlm;
|
|
764
|
+
chevronIcon = lucideChevronDown;
|
|
765
|
+
closeIcon = lucideX;
|
|
766
|
+
openIndex = signal(null, /* @ts-ignore */
|
|
767
|
+
...(ngDevMode ? [{ debugName: "openIndex" }] : /* istanbul ignore next */ []));
|
|
768
|
+
navbarClasses = computed(() => hlm('tw:flex tw:flex-wrap tw:items-center tw:gap-1 tw:border-b tw:border-border tw:bg-background tw:px-4 tw:py-2 tw:sm:px-6', this.navbarClass()), /* @ts-ignore */
|
|
769
|
+
...(ngDevMode ? [{ debugName: "navbarClasses" }] : /* istanbul ignore next */ []));
|
|
770
|
+
panelClasses = computed(() => hlm('tw:absolute tw:inset-x-0 tw:top-full tw:max-h-[min(70dvh,36rem)] tw:overflow-y-auto tw:overscroll-contain tw:rounded-b-2xl tw:border tw:border-t-0 tw:border-border tw:bg-background tw:p-5 tw:text-foreground tw:shadow-xl tw:sm:p-6', this.panelClass()), /* @ts-ignore */
|
|
771
|
+
...(ngDevMode ? [{ debugName: "panelClasses" }] : /* istanbul ignore next */ []));
|
|
772
|
+
activeGroups = computed(() => {
|
|
773
|
+
this.currentUrl();
|
|
774
|
+
return this.groups().map((group) => group.items.some((item) => item.link && !item.disabled && this.router.isActive(item.link, navigationMatchOptions(item))));
|
|
775
|
+
}, /* @ts-ignore */
|
|
776
|
+
...(ngDevMode ? [{ debugName: "activeGroups" }] : /* istanbul ignore next */ []));
|
|
777
|
+
constructor() {
|
|
778
|
+
this.router.events.pipe(takeUntilDestroyed()).subscribe((event) => {
|
|
779
|
+
if (event instanceof NavigationEnd) {
|
|
780
|
+
this.currentUrl.set(event.urlAfterRedirects);
|
|
781
|
+
this.close();
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
effect(() => {
|
|
785
|
+
this.groups();
|
|
786
|
+
this.close();
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
toggle(index) {
|
|
790
|
+
this.openIndex.update((open) => (open === index ? null : index));
|
|
791
|
+
}
|
|
792
|
+
close(restoreFocus = false) {
|
|
793
|
+
const index = restoreFocus ? this.openIndex() : null;
|
|
794
|
+
this.openIndex.set(null);
|
|
795
|
+
if (restoreFocus && index !== null)
|
|
796
|
+
this.triggers()[index]?.nativeElement.focus();
|
|
797
|
+
}
|
|
798
|
+
closeOnOutsidePointer(event) {
|
|
799
|
+
if (!this.host.nativeElement.contains(event.target))
|
|
800
|
+
this.close();
|
|
801
|
+
}
|
|
802
|
+
closeOnFocusOut(event) {
|
|
803
|
+
if (!this.host.nativeElement.contains(event.relatedTarget))
|
|
804
|
+
this.close();
|
|
805
|
+
}
|
|
806
|
+
onEscape(event) {
|
|
807
|
+
if (this.openIndex() === null)
|
|
808
|
+
return;
|
|
809
|
+
event.preventDefault();
|
|
810
|
+
event.stopPropagation();
|
|
811
|
+
this.close(true);
|
|
812
|
+
}
|
|
813
|
+
onTriggerKeydown(event, index) {
|
|
814
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
815
|
+
event.preventDefault();
|
|
816
|
+
this.openIndex.set(index);
|
|
817
|
+
afterNextRender(() => {
|
|
818
|
+
const items = this.panel()?.nativeElement.querySelectorAll('eg-layout-navigation-item a, eg-layout-navigation-item button:not(:disabled)');
|
|
819
|
+
const position = event.key === 'ArrowUp' ? (items?.length ?? 0) - 1 : 0;
|
|
820
|
+
items?.[position]?.focus();
|
|
821
|
+
}, { injector: this.injector });
|
|
822
|
+
return;
|
|
823
|
+
}
|
|
824
|
+
const triggers = this.triggers()
|
|
825
|
+
.map((trigger) => trigger.nativeElement)
|
|
826
|
+
.filter((trigger) => !trigger.disabled);
|
|
827
|
+
const current = triggers.indexOf(event.currentTarget);
|
|
828
|
+
let next;
|
|
829
|
+
switch (event.key) {
|
|
830
|
+
case 'ArrowRight':
|
|
831
|
+
next = (current + 1) % triggers.length;
|
|
832
|
+
break;
|
|
833
|
+
case 'ArrowLeft':
|
|
834
|
+
next = (current - 1 + triggers.length) % triggers.length;
|
|
835
|
+
break;
|
|
836
|
+
case 'Home':
|
|
837
|
+
next = 0;
|
|
838
|
+
break;
|
|
839
|
+
case 'End':
|
|
840
|
+
next = triggers.length - 1;
|
|
841
|
+
break;
|
|
842
|
+
default:
|
|
843
|
+
return;
|
|
844
|
+
}
|
|
845
|
+
event.preventDefault();
|
|
846
|
+
this.close();
|
|
847
|
+
triggers[next]?.focus();
|
|
848
|
+
}
|
|
849
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutFlyoutNavbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
850
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgLayoutFlyoutNavbar, isStandalone: true, selector: "eg-layout-flyout-navbar", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, navbarClass: { classPropertyName: "navbarClass", publicName: "navbarClass", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, itemClass: { classPropertyName: "itemClass", publicName: "itemClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:pointerdown": "closeOnOutsidePointer($event)", "focusout": "closeOnFocusOut($event)", "keydown.escape": "onEscape($event)" }, classAttribute: "tw:relative tw:z-20 tw:block tw:min-w-0" }, viewQueries: [{ propertyName: "triggers", predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
851
|
+
<nav [attr.aria-label]="label()" [class]="navbarClasses()">
|
|
852
|
+
@for (group of groups(); track $index; let index = $index) {
|
|
853
|
+
<button
|
|
854
|
+
#trigger
|
|
855
|
+
type="button"
|
|
856
|
+
[id]="id + '-trigger-' + index"
|
|
857
|
+
[attr.aria-controls]="id + '-panel-' + index"
|
|
858
|
+
[attr.aria-expanded]="openIndex() === index"
|
|
859
|
+
[disabled]="!group.items.length"
|
|
860
|
+
(click)="toggle(index)"
|
|
861
|
+
(keydown)="onTriggerKeydown($event, index)"
|
|
862
|
+
[attr.data-active]="activeGroups()[index] ? '' : null"
|
|
863
|
+
[class]="
|
|
864
|
+
hlm(
|
|
865
|
+
'tw:flex tw:min-h-11 tw:items-center tw:gap-2 tw:rounded-lg tw:px-3 tw:py-2 tw:text-left tw:text-sm tw:font-medium tw:text-foreground tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:focus-visible:outline-ring tw:disabled:cursor-not-allowed tw:disabled:opacity-50',
|
|
866
|
+
(openIndex() === index || activeGroups()[index]) && 'tw:bg-foreground/7 tw:font-semibold'
|
|
867
|
+
)
|
|
868
|
+
"
|
|
869
|
+
>
|
|
870
|
+
@if (group.icon) {
|
|
871
|
+
<ng-icon [svg]="group.icon" size="1rem" aria-hidden="true" />
|
|
872
|
+
}
|
|
873
|
+
{{ group.label }}
|
|
874
|
+
<ng-icon
|
|
875
|
+
[svg]="chevronIcon"
|
|
876
|
+
size="14px"
|
|
877
|
+
aria-hidden="true"
|
|
878
|
+
[class]="hlm('tw:shrink-0 tw:motion-safe:transition-transform', openIndex() === index && 'tw:rotate-180')"
|
|
879
|
+
/>
|
|
880
|
+
</button>
|
|
881
|
+
@if (openIndex() === index) {
|
|
882
|
+
<section
|
|
883
|
+
#panel
|
|
884
|
+
[id]="id + '-panel-' + index"
|
|
885
|
+
[attr.aria-labelledby]="id + '-trigger-' + index"
|
|
886
|
+
data-slot="flyout-panel"
|
|
887
|
+
[class]="panelClasses()"
|
|
888
|
+
>
|
|
889
|
+
<div class="tw:mb-4 tw:flex tw:items-start tw:justify-between tw:gap-4">
|
|
890
|
+
<div class="tw:space-y-1">
|
|
891
|
+
<p class="tw:text-xs tw:font-semibold tw:uppercase tw:tracking-wider tw:text-foreground/75">
|
|
892
|
+
{{ group.label }}
|
|
893
|
+
</p>
|
|
894
|
+
@if (group.description) {
|
|
895
|
+
<p class="tw:max-w-2xl tw:text-sm tw:leading-relaxed tw:text-foreground/75">
|
|
896
|
+
{{ group.description }}
|
|
897
|
+
</p>
|
|
898
|
+
}
|
|
899
|
+
</div>
|
|
900
|
+
<button
|
|
901
|
+
type="button"
|
|
902
|
+
[attr.aria-label]="closeLabel()"
|
|
903
|
+
(click)="close(true)"
|
|
904
|
+
class="tw:inline-flex tw:size-11 tw:shrink-0 tw:items-center tw:justify-center tw:rounded-lg tw:text-foreground/75 tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:outline-2 tw:focus-visible:outline-ring"
|
|
905
|
+
>
|
|
906
|
+
<ng-icon [svg]="closeIcon" size="18px" aria-hidden="true" />
|
|
907
|
+
</button>
|
|
908
|
+
</div>
|
|
909
|
+
<div class="tw:grid tw:grid-cols-2 tw:gap-3 tw:lg:grid-cols-3">
|
|
910
|
+
@for (item of group.items; track $index) {
|
|
911
|
+
<eg-layout-navigation-item
|
|
912
|
+
[item]="item"
|
|
913
|
+
appearance="card"
|
|
914
|
+
[itemClass]="itemClass()"
|
|
915
|
+
(selected)="close(true)"
|
|
916
|
+
/>
|
|
917
|
+
}
|
|
918
|
+
</div>
|
|
919
|
+
</section>
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
</nav>
|
|
923
|
+
`, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: EgLayoutNavigationItem, selector: "eg-layout-navigation-item", inputs: ["item", "itemClass", "appearance"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
924
|
+
}
|
|
925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutFlyoutNavbar, decorators: [{
|
|
926
|
+
type: Component,
|
|
927
|
+
args: [{
|
|
928
|
+
selector: 'eg-layout-flyout-navbar',
|
|
929
|
+
imports: [NgIcon, EgLayoutNavigationItem],
|
|
930
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
931
|
+
host: {
|
|
932
|
+
class: 'tw:relative tw:z-20 tw:block tw:min-w-0',
|
|
933
|
+
'(document:pointerdown)': 'closeOnOutsidePointer($event)',
|
|
934
|
+
'(focusout)': 'closeOnFocusOut($event)',
|
|
935
|
+
'(keydown.escape)': 'onEscape($event)',
|
|
936
|
+
},
|
|
937
|
+
template: `
|
|
938
|
+
<nav [attr.aria-label]="label()" [class]="navbarClasses()">
|
|
939
|
+
@for (group of groups(); track $index; let index = $index) {
|
|
940
|
+
<button
|
|
941
|
+
#trigger
|
|
942
|
+
type="button"
|
|
943
|
+
[id]="id + '-trigger-' + index"
|
|
944
|
+
[attr.aria-controls]="id + '-panel-' + index"
|
|
945
|
+
[attr.aria-expanded]="openIndex() === index"
|
|
946
|
+
[disabled]="!group.items.length"
|
|
947
|
+
(click)="toggle(index)"
|
|
948
|
+
(keydown)="onTriggerKeydown($event, index)"
|
|
949
|
+
[attr.data-active]="activeGroups()[index] ? '' : null"
|
|
950
|
+
[class]="
|
|
951
|
+
hlm(
|
|
952
|
+
'tw:flex tw:min-h-11 tw:items-center tw:gap-2 tw:rounded-lg tw:px-3 tw:py-2 tw:text-left tw:text-sm tw:font-medium tw:text-foreground tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:focus-visible:outline-ring tw:disabled:cursor-not-allowed tw:disabled:opacity-50',
|
|
953
|
+
(openIndex() === index || activeGroups()[index]) && 'tw:bg-foreground/7 tw:font-semibold'
|
|
954
|
+
)
|
|
955
|
+
"
|
|
956
|
+
>
|
|
957
|
+
@if (group.icon) {
|
|
958
|
+
<ng-icon [svg]="group.icon" size="1rem" aria-hidden="true" />
|
|
959
|
+
}
|
|
960
|
+
{{ group.label }}
|
|
961
|
+
<ng-icon
|
|
962
|
+
[svg]="chevronIcon"
|
|
963
|
+
size="14px"
|
|
964
|
+
aria-hidden="true"
|
|
965
|
+
[class]="hlm('tw:shrink-0 tw:motion-safe:transition-transform', openIndex() === index && 'tw:rotate-180')"
|
|
966
|
+
/>
|
|
967
|
+
</button>
|
|
968
|
+
@if (openIndex() === index) {
|
|
969
|
+
<section
|
|
970
|
+
#panel
|
|
971
|
+
[id]="id + '-panel-' + index"
|
|
972
|
+
[attr.aria-labelledby]="id + '-trigger-' + index"
|
|
973
|
+
data-slot="flyout-panel"
|
|
974
|
+
[class]="panelClasses()"
|
|
975
|
+
>
|
|
976
|
+
<div class="tw:mb-4 tw:flex tw:items-start tw:justify-between tw:gap-4">
|
|
977
|
+
<div class="tw:space-y-1">
|
|
978
|
+
<p class="tw:text-xs tw:font-semibold tw:uppercase tw:tracking-wider tw:text-foreground/75">
|
|
979
|
+
{{ group.label }}
|
|
980
|
+
</p>
|
|
981
|
+
@if (group.description) {
|
|
982
|
+
<p class="tw:max-w-2xl tw:text-sm tw:leading-relaxed tw:text-foreground/75">
|
|
983
|
+
{{ group.description }}
|
|
984
|
+
</p>
|
|
985
|
+
}
|
|
986
|
+
</div>
|
|
987
|
+
<button
|
|
988
|
+
type="button"
|
|
989
|
+
[attr.aria-label]="closeLabel()"
|
|
990
|
+
(click)="close(true)"
|
|
991
|
+
class="tw:inline-flex tw:size-11 tw:shrink-0 tw:items-center tw:justify-center tw:rounded-lg tw:text-foreground/75 tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:outline-2 tw:focus-visible:outline-ring"
|
|
992
|
+
>
|
|
993
|
+
<ng-icon [svg]="closeIcon" size="18px" aria-hidden="true" />
|
|
994
|
+
</button>
|
|
995
|
+
</div>
|
|
996
|
+
<div class="tw:grid tw:grid-cols-2 tw:gap-3 tw:lg:grid-cols-3">
|
|
997
|
+
@for (item of group.items; track $index) {
|
|
998
|
+
<eg-layout-navigation-item
|
|
999
|
+
[item]="item"
|
|
1000
|
+
appearance="card"
|
|
1001
|
+
[itemClass]="itemClass()"
|
|
1002
|
+
(selected)="close(true)"
|
|
1003
|
+
/>
|
|
1004
|
+
}
|
|
1005
|
+
</div>
|
|
1006
|
+
</section>
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
</nav>
|
|
1010
|
+
`,
|
|
1011
|
+
}]
|
|
1012
|
+
}], ctorParameters: () => [], propDecorators: { groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], navbarClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "navbarClass", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], itemClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemClass", required: false }] }], triggers: [{ type: i0.ViewChildren, args: ['trigger', { isSignal: true }] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
563
1013
|
|
|
564
|
-
|
|
565
|
-
const
|
|
1014
|
+
/** Matches Tailwind's default `md` breakpoint. */
|
|
1015
|
+
const EG_LAYOUT_SIMPLE_MOBILE_BREAKPOINT = '(max-width: 767.98px)';
|
|
1016
|
+
/** Responsive application shell. All navigation surfaces share the same item model. */
|
|
566
1017
|
class EgLayoutSimple {
|
|
567
|
-
|
|
1018
|
+
destroyRef = inject(DestroyRef);
|
|
1019
|
+
breakpointObserver = inject(BreakpointObserver);
|
|
1020
|
+
router = inject(Router);
|
|
1021
|
+
instanceId = inject(_IdGenerator).getId('eg-layout-simple-');
|
|
1022
|
+
mainId = `${this.instanceId}-main`;
|
|
1023
|
+
mobileMenuId = `${this.instanceId}-mobile-menu`;
|
|
1024
|
+
sidebarId = `${this.instanceId}-sidebar`;
|
|
568
1025
|
hlm = hlm;
|
|
1026
|
+
navigationMatchOptions = navigationMatchOptions;
|
|
569
1027
|
menuIcon = lucideMenu;
|
|
1028
|
+
sidebarIcon = lucidePanelLeft;
|
|
1029
|
+
closeIcon = lucideX;
|
|
1030
|
+
chevronIcon = lucideChevronDown;
|
|
1031
|
+
mobileMenuTrigger = viewChild('mobileMenuTrigger', /* @ts-ignore */
|
|
1032
|
+
...(ngDevMode ? [{ debugName: "mobileMenuTrigger" }] : /* istanbul ignore next */ []));
|
|
1033
|
+
mainContent = viewChild('mainContent', /* @ts-ignore */
|
|
1034
|
+
...(ngDevMode ? [{ debugName: "mainContent" }] : /* istanbul ignore next */ []));
|
|
1035
|
+
sidebar = viewChild(EgLayoutSimpleSidebar, /* @ts-ignore */
|
|
1036
|
+
...(ngDevMode ? [{ debugName: "sidebar" }] : /* istanbul ignore next */ []));
|
|
570
1037
|
sidebarEnabled = input(false, /* @ts-ignore */
|
|
571
1038
|
...(ngDevMode ? [{ debugName: "sidebarEnabled" }] : /* istanbul ignore next */ []));
|
|
572
|
-
sidebarTitle = input('
|
|
1039
|
+
sidebarTitle = input('Navigation', /* @ts-ignore */
|
|
573
1040
|
...(ngDevMode ? [{ debugName: "sidebarTitle" }] : /* istanbul ignore next */ []));
|
|
574
1041
|
sidebarContent = input(/* @ts-ignore */
|
|
575
1042
|
...(ngDevMode ? [undefined, { debugName: "sidebarContent" }] : /* istanbul ignore next */ []));
|
|
1043
|
+
sidebarToggleLabel = input('Open navigation sidebar', /* @ts-ignore */
|
|
1044
|
+
...(ngDevMode ? [{ debugName: "sidebarToggleLabel" }] : /* istanbul ignore next */ []));
|
|
1045
|
+
mobileMenuLabel = input('Open navigation menu', /* @ts-ignore */
|
|
1046
|
+
...(ngDevMode ? [{ debugName: "mobileMenuLabel" }] : /* istanbul ignore next */ []));
|
|
1047
|
+
mobileMenuCloseLabel = input('Close navigation menu', /* @ts-ignore */
|
|
1048
|
+
...(ngDevMode ? [{ debugName: "mobileMenuCloseLabel" }] : /* istanbul ignore next */ []));
|
|
576
1049
|
userMenuTrigger = input(/* @ts-ignore */
|
|
577
1050
|
...(ngDevMode ? [undefined, { debugName: "userMenuTrigger" }] : /* istanbul ignore next */ []));
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
...(ngDevMode ? [{ debugName: "
|
|
583
|
-
|
|
584
|
-
...(ngDevMode ? [{ debugName: "
|
|
585
|
-
|
|
586
|
-
...(ngDevMode ? [{ debugName: "
|
|
587
|
-
|
|
588
|
-
...(ngDevMode ? [{ debugName: "
|
|
589
|
-
|
|
590
|
-
...(ngDevMode ? [{ debugName: "
|
|
591
|
-
|
|
1051
|
+
userMenuLabel = input('Open account menu', /* @ts-ignore */
|
|
1052
|
+
...(ngDevMode ? [{ debugName: "userMenuLabel" }] : /* istanbul ignore next */ []));
|
|
1053
|
+
/** Main header destinations; use `activeMatch: 'prefix'` for whole sections. */
|
|
1054
|
+
primaryNavigation = input([], /* @ts-ignore */
|
|
1055
|
+
...(ngDevMode ? [{ debugName: "primaryNavigation" }] : /* istanbul ignore next */ []));
|
|
1056
|
+
navigationGroups = input([], /* @ts-ignore */
|
|
1057
|
+
...(ngDevMode ? [{ debugName: "navigationGroups" }] : /* istanbul ignore next */ []));
|
|
1058
|
+
utilityNavigation = input([], /* @ts-ignore */
|
|
1059
|
+
...(ngDevMode ? [{ debugName: "utilityNavigation" }] : /* istanbul ignore next */ []));
|
|
1060
|
+
sectionNavigation = input([], /* @ts-ignore */
|
|
1061
|
+
...(ngDevMode ? [{ debugName: "sectionNavigation" }] : /* istanbul ignore next */ []));
|
|
1062
|
+
secondaryNavigationGroups = input([], /* @ts-ignore */
|
|
1063
|
+
...(ngDevMode ? [{ debugName: "secondaryNavigationGroups" }] : /* istanbul ignore next */ []));
|
|
1064
|
+
/** Category navbar with wide card panels; mobile renders expandable groups. */
|
|
1065
|
+
flyoutNavigationGroups = input([], /* @ts-ignore */
|
|
1066
|
+
...(ngDevMode ? [{ debugName: "flyoutNavigationGroups" }] : /* istanbul ignore next */ []));
|
|
1067
|
+
flyoutNavigationLabel = input('Fly-out navigation', /* @ts-ignore */
|
|
1068
|
+
...(ngDevMode ? [{ debugName: "flyoutNavigationLabel" }] : /* istanbul ignore next */ []));
|
|
1069
|
+
flyoutCloseLabel = input('Close navigation panel', /* @ts-ignore */
|
|
1070
|
+
...(ngDevMode ? [{ debugName: "flyoutCloseLabel" }] : /* istanbul ignore next */ []));
|
|
1071
|
+
userMenuSections = input([], /* @ts-ignore */
|
|
1072
|
+
...(ngDevMode ? [{ debugName: "userMenuSections" }] : /* istanbul ignore next */ []));
|
|
1073
|
+
/** Optional image. Without it, the brand name is shown instead of a broken image. */
|
|
1074
|
+
logo = input('', /* @ts-ignore */
|
|
592
1075
|
...(ngDevMode ? [{ debugName: "logo" }] : /* istanbul ignore next */ []));
|
|
1076
|
+
brandName = input('Workspace', /* @ts-ignore */
|
|
1077
|
+
...(ngDevMode ? [{ debugName: "brandName" }] : /* istanbul ignore next */ []));
|
|
593
1078
|
logoLink = input('/', /* @ts-ignore */
|
|
594
1079
|
...(ngDevMode ? [{ debugName: "logoLink" }] : /* istanbul ignore next */ []));
|
|
595
|
-
logoClass = input('',
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
1080
|
+
logoClass = input('', /* @ts-ignore */
|
|
1081
|
+
...(ngDevMode ? [{ debugName: "logoClass" }] : /* istanbul ignore next */ []));
|
|
1082
|
+
/** Disable for a shell preview embedded inside another page. */
|
|
1083
|
+
fullHeight = input(true, /* @ts-ignore */
|
|
1084
|
+
...(ngDevMode ? [{ debugName: "fullHeight" }] : /* istanbul ignore next */ []));
|
|
1085
|
+
headerClass = input('', /* @ts-ignore */
|
|
1086
|
+
...(ngDevMode ? [{ debugName: "headerClass" }] : /* istanbul ignore next */ []));
|
|
1087
|
+
contentClass = input('', /* @ts-ignore */
|
|
1088
|
+
...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
|
|
1089
|
+
primaryNavigationClass = input('', /* @ts-ignore */
|
|
1090
|
+
...(ngDevMode ? [{ debugName: "primaryNavigationClass" }] : /* istanbul ignore next */ []));
|
|
1091
|
+
utilityNavigationClass = input('', /* @ts-ignore */
|
|
1092
|
+
...(ngDevMode ? [{ debugName: "utilityNavigationClass" }] : /* istanbul ignore next */ []));
|
|
1093
|
+
sectionNavigationClass = input('', /* @ts-ignore */
|
|
1094
|
+
...(ngDevMode ? [{ debugName: "sectionNavigationClass" }] : /* istanbul ignore next */ []));
|
|
1095
|
+
secondaryNavigationClass = input('', /* @ts-ignore */
|
|
1096
|
+
...(ngDevMode ? [{ debugName: "secondaryNavigationClass" }] : /* istanbul ignore next */ []));
|
|
1097
|
+
flyoutNavigationClass = input('', /* @ts-ignore */
|
|
1098
|
+
...(ngDevMode ? [{ debugName: "flyoutNavigationClass" }] : /* istanbul ignore next */ []));
|
|
1099
|
+
flyoutPanelClass = input('', /* @ts-ignore */
|
|
1100
|
+
...(ngDevMode ? [{ debugName: "flyoutPanelClass" }] : /* istanbul ignore next */ []));
|
|
1101
|
+
navigationItemClass = input('', /* @ts-ignore */
|
|
1102
|
+
...(ngDevMode ? [{ debugName: "navigationItemClass" }] : /* istanbul ignore next */ []));
|
|
609
1103
|
loading = input(false, /* @ts-ignore */
|
|
610
1104
|
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
611
|
-
|
|
612
|
-
...(ngDevMode ? [{ debugName: "
|
|
613
|
-
|
|
1105
|
+
loadingText = input('Loading content…', /* @ts-ignore */
|
|
1106
|
+
...(ngDevMode ? [{ debugName: "loadingText" }] : /* istanbul ignore next */ []));
|
|
1107
|
+
skipLinkText = input('Skip to content', /* @ts-ignore */
|
|
1108
|
+
...(ngDevMode ? [{ debugName: "skipLinkText" }] : /* istanbul ignore next */ []));
|
|
1109
|
+
searchEnabled = input(false, /* @ts-ignore */
|
|
1110
|
+
...(ngDevMode ? [{ debugName: "searchEnabled" }] : /* istanbul ignore next */ []));
|
|
1111
|
+
searchPlaceholder = input('Search pages…', /* @ts-ignore */
|
|
1112
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1113
|
+
searchEmptyText = input('No matching pages found.', /* @ts-ignore */
|
|
614
1114
|
...(ngDevMode ? [{ debugName: "searchEmptyText" }] : /* istanbul ignore next */ []));
|
|
615
|
-
|
|
616
|
-
...(ngDevMode ? [
|
|
617
|
-
|
|
618
|
-
...(ngDevMode ? [undefined, { debugName: "
|
|
619
|
-
|
|
620
|
-
...(ngDevMode ? [undefined, { debugName: "
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
_headerClass = computed(() => hlm('tw:px-4 tw:py-2 tw:flex tw:items-center tw:justify-between tw:bg-gray-100 tw:border-b tw:border-gray-300', this.headerClass()), /* @ts-ignore */
|
|
625
|
-
...(ngDevMode ? [{ debugName: "_headerClass" }] : /* istanbul ignore next */ []));
|
|
626
|
-
_contentClass = computed(() => hlm('tw:p-4 tw:flex tw:flex-col tw:flex-1', this.contentClass()), /* @ts-ignore */
|
|
627
|
-
...(ngDevMode ? [{ debugName: "_contentClass" }] : /* istanbul ignore next */ []));
|
|
628
|
-
_contentBottomClass = computed(() => hlm('tw: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('tw:flex tw:flex-wrap tw:items-center tw:gap-x-4 tw:gap-y-1 tw:px-4 tw:py-2 tw:bg-gray-50 tw:border-b tw:border-gray-200', this.topMenuClass()), /* @ts-ignore */
|
|
636
|
-
...(ngDevMode ? [{ debugName: "_computedTopClass" }] : /* istanbul ignore next */ []));
|
|
637
|
-
_computedTopSecondaryClass = computed(() => hlm('tw:flex tw:flex-wrap tw:items-center tw:gap-x-4 tw:gap-y-1 tw:px-4 tw:py-1.5 tw:bg-gray-100/60 tw:border-b tw: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('tw:text-secondary tw:visited:text-secondary tw:hover:text-primary tw:cursor-pointer tw:no-underline tw:text-sm', this.topLinkClass()), /* @ts-ignore */
|
|
645
|
-
...(ngDevMode ? [{ debugName: "_computedTopLinkClass" }] : /* istanbul ignore next */ []));
|
|
646
|
-
mobileMenuItemClass = commonLinkClasses;
|
|
1115
|
+
searchErrorText = input('Search is unavailable. Please try again.', /* @ts-ignore */
|
|
1116
|
+
...(ngDevMode ? [{ debugName: "searchErrorText" }] : /* istanbul ignore next */ []));
|
|
1117
|
+
searchResultTemplate = input(/* @ts-ignore */
|
|
1118
|
+
...(ngDevMode ? [undefined, { debugName: "searchResultTemplate" }] : /* istanbul ignore next */ []));
|
|
1119
|
+
searchLoader = input(/* @ts-ignore */
|
|
1120
|
+
...(ngDevMode ? [undefined, { debugName: "searchLoader" }] : /* istanbul ignore next */ []));
|
|
1121
|
+
searchResultLabel = input(/* @ts-ignore */
|
|
1122
|
+
...(ngDevMode ? [undefined, { debugName: "searchResultLabel" }] : /* istanbul ignore next */ []));
|
|
1123
|
+
searchResultSelected = output();
|
|
647
1124
|
footerEnabled = input(false, /* @ts-ignore */
|
|
648
1125
|
...(ngDevMode ? [{ debugName: "footerEnabled" }] : /* istanbul ignore next */ []));
|
|
649
|
-
|
|
650
|
-
...(ngDevMode ? [{ debugName: "
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
...(ngDevMode ? [{ debugName: "
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
1126
|
+
footerNavigation = input([], /* @ts-ignore */
|
|
1127
|
+
...(ngDevMode ? [{ debugName: "footerNavigation" }] : /* istanbul ignore next */ []));
|
|
1128
|
+
footerText = input('', /* @ts-ignore */
|
|
1129
|
+
...(ngDevMode ? [{ debugName: "footerText" }] : /* istanbul ignore next */ []));
|
|
1130
|
+
footerClass = input('', /* @ts-ignore */
|
|
1131
|
+
...(ngDevMode ? [{ debugName: "footerClass" }] : /* istanbul ignore next */ []));
|
|
1132
|
+
logoClasses = computed(() => hlm('tw:h-8 tw:w-auto tw:max-w-40 tw:object-contain', this.logoClass()), /* @ts-ignore */
|
|
1133
|
+
...(ngDevMode ? [{ debugName: "logoClasses" }] : /* istanbul ignore next */ []));
|
|
1134
|
+
headerClasses = computed(() => hlm('tw:flex tw:min-h-16 tw:flex-wrap tw:items-center tw:justify-between tw:gap-3 tw:border-b tw:border-border tw:bg-background tw:px-4 tw:py-3 tw:sm:px-6', this.headerClass()), /* @ts-ignore */
|
|
1135
|
+
...(ngDevMode ? [{ debugName: "headerClasses" }] : /* istanbul ignore next */ []));
|
|
1136
|
+
contentClasses = computed(() => hlm('tw:flex tw:min-w-0 tw:flex-1 tw:flex-col tw:p-4 tw:outline-none tw:sm:p-6', this.contentClass()), /* @ts-ignore */
|
|
1137
|
+
...(ngDevMode ? [{ debugName: "contentClasses" }] : /* istanbul ignore next */ []));
|
|
1138
|
+
primaryNavigationClasses = computed(() => hlm('tw:hidden tw:md:flex tw:flex-wrap tw:items-center tw:gap-1', this.primaryNavigationClass()), /* @ts-ignore */
|
|
1139
|
+
...(ngDevMode ? [{ debugName: "primaryNavigationClasses" }] : /* istanbul ignore next */ []));
|
|
1140
|
+
utilityNavigationClasses = computed(() => hlm('tw:hidden tw:md:flex tw:flex-wrap tw:items-center tw:gap-1', this.utilityNavigationClass()), /* @ts-ignore */
|
|
1141
|
+
...(ngDevMode ? [{ debugName: "utilityNavigationClasses" }] : /* istanbul ignore next */ []));
|
|
1142
|
+
sectionNavigationClasses = computed(() => hlm('tw:hidden tw:md:flex tw:items-center tw:gap-1 tw:overflow-x-auto tw:border-b tw:border-border tw:bg-background tw:px-4 tw:py-2 tw:sm:px-6', this.sectionNavigationClass()), /* @ts-ignore */
|
|
1143
|
+
...(ngDevMode ? [{ debugName: "sectionNavigationClasses" }] : /* istanbul ignore next */ []));
|
|
1144
|
+
secondaryNavigationClasses = computed(() => hlm('tw:hidden tw:md:flex tw:items-center tw:gap-5 tw:overflow-x-auto tw:border-b tw:border-border tw:bg-foreground/3 tw:px-4 tw:py-2 tw:sm:px-6', this.secondaryNavigationClass()), /* @ts-ignore */
|
|
1145
|
+
...(ngDevMode ? [{ debugName: "secondaryNavigationClasses" }] : /* istanbul ignore next */ []));
|
|
1146
|
+
footerClasses = computed(() => hlm('tw:flex tw:flex-wrap tw:items-center tw:justify-between tw:gap-x-6 tw:gap-y-2 tw:border-t tw:border-border tw:bg-background tw:px-4 tw:py-4 tw:text-sm tw:text-foreground/75 tw:sm:px-6', this.footerClass()), /* @ts-ignore */
|
|
1147
|
+
...(ngDevMode ? [{ debugName: "footerClasses" }] : /* istanbul ignore next */ []));
|
|
1148
|
+
iconButtonClasses = 'tw:inline-flex tw:size-11 tw:shrink-0 tw:items-center tw:justify-center tw:rounded-lg tw:border tw:border-border tw:bg-background tw:text-foreground tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:focus-visible:outline-ring';
|
|
1149
|
+
mobileMenuOpen = signal(false, /* @ts-ignore */
|
|
1150
|
+
...(ngDevMode ? [{ debugName: "mobileMenuOpen" }] : /* istanbul ignore next */ []));
|
|
664
1151
|
isMobile = signal(false, /* @ts-ignore */
|
|
665
1152
|
...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
1153
|
+
sidebarOpen = signal(false, /* @ts-ignore */
|
|
1154
|
+
...(ngDevMode ? [{ debugName: "sidebarOpen" }] : /* istanbul ignore next */ []));
|
|
1155
|
+
sidebarContext = { close: () => this.closeSidebar() };
|
|
1156
|
+
constructor() {
|
|
1157
|
+
this.breakpointObserver
|
|
1158
|
+
.observe([EG_LAYOUT_SIMPLE_MOBILE_BREAKPOINT])
|
|
1159
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1160
|
+
.subscribe(({ matches }) => {
|
|
1161
|
+
this.isMobile.set(matches);
|
|
1162
|
+
if (!matches)
|
|
1163
|
+
this.mobileMenuOpen.set(false);
|
|
1164
|
+
});
|
|
1165
|
+
this.router.events.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
|
|
1166
|
+
if (event instanceof NavigationEnd) {
|
|
1167
|
+
if (this.mobileMenuOpen())
|
|
1168
|
+
this.closeMobileMenu(true);
|
|
1169
|
+
this.closeSidebar();
|
|
1170
|
+
}
|
|
1171
|
+
});
|
|
1172
|
+
effect((onCleanup) => {
|
|
1173
|
+
const sheet = this.sidebar()?.sheet();
|
|
1174
|
+
if (!sheet)
|
|
1175
|
+
return;
|
|
1176
|
+
this.sidebarOpen.set(sheet.stateComputed() === 'open');
|
|
1177
|
+
const subscriptions = [
|
|
1178
|
+
sheet.stateChanged.subscribe((state) => this.sidebarOpen.set(state === 'open')),
|
|
1179
|
+
sheet.closed.subscribe(() => this.sidebarOpen.set(false)),
|
|
1180
|
+
];
|
|
1181
|
+
onCleanup(() => subscriptions.forEach((subscription) => subscription.unsubscribe()));
|
|
670
1182
|
});
|
|
671
1183
|
}
|
|
672
1184
|
toggleMobileMenu() {
|
|
673
|
-
this.mobileMenuOpen
|
|
1185
|
+
this.mobileMenuOpen.update((open) => !open);
|
|
1186
|
+
}
|
|
1187
|
+
closeMobileMenu(restoreFocus = false) {
|
|
1188
|
+
this.mobileMenuOpen.set(false);
|
|
1189
|
+
if (restoreFocus)
|
|
1190
|
+
this.mobileMenuTrigger()?.nativeElement.focus();
|
|
674
1191
|
}
|
|
675
|
-
|
|
676
|
-
this.
|
|
1192
|
+
selectSearchResult(item) {
|
|
1193
|
+
this.closeMobileMenu(true);
|
|
1194
|
+
this.searchResultSelected.emit(item);
|
|
1195
|
+
}
|
|
1196
|
+
focusContent(event) {
|
|
1197
|
+
event.preventDefault();
|
|
1198
|
+
this.mainContent()?.nativeElement.focus();
|
|
677
1199
|
}
|
|
678
|
-
viewchildSheetRef = viewChild(EgLayoutSimpleSidebar, /* @ts-ignore */
|
|
679
|
-
...(ngDevMode ? [{ debugName: "viewchildSheetRef" }] : /* istanbul ignore next */ []));
|
|
680
1200
|
openSidebar() {
|
|
681
|
-
this.
|
|
1201
|
+
this.closeMobileMenu();
|
|
1202
|
+
this.sidebar()?.open();
|
|
682
1203
|
}
|
|
683
1204
|
closeSidebar() {
|
|
684
|
-
this.
|
|
1205
|
+
this.sidebar()?.close();
|
|
685
1206
|
}
|
|
686
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
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=\"tw:[&_svg]:w-[inherit]! tw:[&_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=\"tw:flex tw:flex-col tw:min-h-screen\">\n <!-- Header -->\n <header [class]=\"_headerClass()\">\n <div class=\"tw:flex tw:items-center tw: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=\"tw:bg-transparent! tw:border-gray-400! tw: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=\"tw:relative tw:group\">\n <button\n type=\"button\"\n class=\"tw:text-left tw:text-secondary tw:hover:text-primary tw:cursor-pointer tw:no-underline tw:py-1 tw:flex tw:items-center tw:gap-1\"\n >\n {{ group.label ?? 'Menu' }}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"tw:h-3 tw: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=\"tw:absolute tw:left-0 tw:top-full tw:mt-1 tw:hidden tw:group-hover:flex tw:flex-col tw:min-w-[12rem] tw:bg-popover tw:text-popover-foreground tw:border tw:border-gray-200 tw:rounded-md tw:shadow-md tw:py-1 tw:z-50\"\n >\n @if (group.label) {\n <div class=\"tw:px-3 tw:py-1 tw:text-xs tw:font-semibold tw: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=\"tw:md:hidden tw:p-2 tw:text-gray-700 tw:hover:text-primary tw:focus:outline-none tw:cursor-pointer\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"tw:h-6 tw: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=\"tw:flex tw:flex-wrap tw:items-center tw:gap-x-3\">\n @if (group.label) {\n <span class=\"tw:text-xs tw:font-semibold tw:uppercase tw: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 class=\"tw:w-full tw: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=\"tw:border-gray-300 tw: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=\"tw:border-gray-300 tw:my-2\" />\n } }\n </div>\n }\n\n <!-- Main content -->\n <main [class]=\"_contentClass()\">\n @if (!loading()) {\n <div class=\"tw:flex tw:items-center tw:justify-center tw: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=\"tw:mt-2 tw: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"] }] });
|
|
1207
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimple, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1208
|
+
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 }, mobileMenuCloseLabel: { classPropertyName: "mobileMenuCloseLabel", publicName: "mobileMenuCloseLabel", isSignal: true, isRequired: false, transformFunction: null }, userMenuTrigger: { classPropertyName: "userMenuTrigger", publicName: "userMenuTrigger", isSignal: true, isRequired: false, transformFunction: null }, userMenuLabel: { classPropertyName: "userMenuLabel", publicName: "userMenuLabel", isSignal: true, isRequired: false, transformFunction: null }, primaryNavigation: { classPropertyName: "primaryNavigation", publicName: "primaryNavigation", isSignal: true, isRequired: false, transformFunction: null }, navigationGroups: { classPropertyName: "navigationGroups", publicName: "navigationGroups", isSignal: true, isRequired: false, transformFunction: null }, utilityNavigation: { classPropertyName: "utilityNavigation", publicName: "utilityNavigation", isSignal: true, isRequired: false, transformFunction: null }, sectionNavigation: { classPropertyName: "sectionNavigation", publicName: "sectionNavigation", isSignal: true, isRequired: false, transformFunction: null }, secondaryNavigationGroups: { classPropertyName: "secondaryNavigationGroups", publicName: "secondaryNavigationGroups", isSignal: true, isRequired: false, transformFunction: null }, flyoutNavigationGroups: { classPropertyName: "flyoutNavigationGroups", publicName: "flyoutNavigationGroups", isSignal: true, isRequired: false, transformFunction: null }, flyoutNavigationLabel: { classPropertyName: "flyoutNavigationLabel", publicName: "flyoutNavigationLabel", isSignal: true, isRequired: false, transformFunction: null }, flyoutCloseLabel: { classPropertyName: "flyoutCloseLabel", publicName: "flyoutCloseLabel", isSignal: true, isRequired: false, transformFunction: null }, userMenuSections: { classPropertyName: "userMenuSections", publicName: "userMenuSections", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, brandName: { classPropertyName: "brandName", publicName: "brandName", 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 }, fullHeight: { classPropertyName: "fullHeight", publicName: "fullHeight", 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 }, primaryNavigationClass: { classPropertyName: "primaryNavigationClass", publicName: "primaryNavigationClass", isSignal: true, isRequired: false, transformFunction: null }, utilityNavigationClass: { classPropertyName: "utilityNavigationClass", publicName: "utilityNavigationClass", isSignal: true, isRequired: false, transformFunction: null }, sectionNavigationClass: { classPropertyName: "sectionNavigationClass", publicName: "sectionNavigationClass", isSignal: true, isRequired: false, transformFunction: null }, secondaryNavigationClass: { classPropertyName: "secondaryNavigationClass", publicName: "secondaryNavigationClass", isSignal: true, isRequired: false, transformFunction: null }, flyoutNavigationClass: { classPropertyName: "flyoutNavigationClass", publicName: "flyoutNavigationClass", isSignal: true, isRequired: false, transformFunction: null }, flyoutPanelClass: { classPropertyName: "flyoutPanelClass", publicName: "flyoutPanelClass", isSignal: true, isRequired: false, transformFunction: null }, navigationItemClass: { classPropertyName: "navigationItemClass", publicName: "navigationItemClass", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, skipLinkText: { classPropertyName: "skipLinkText", publicName: "skipLinkText", isSignal: true, isRequired: false, transformFunction: null }, searchEnabled: { classPropertyName: "searchEnabled", publicName: "searchEnabled", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, searchEmptyText: { classPropertyName: "searchEmptyText", publicName: "searchEmptyText", isSignal: true, isRequired: false, transformFunction: null }, searchErrorText: { classPropertyName: "searchErrorText", publicName: "searchErrorText", isSignal: true, isRequired: false, transformFunction: null }, searchResultTemplate: { classPropertyName: "searchResultTemplate", publicName: "searchResultTemplate", isSignal: true, isRequired: false, transformFunction: null }, searchLoader: { classPropertyName: "searchLoader", publicName: "searchLoader", isSignal: true, isRequired: false, transformFunction: null }, searchResultLabel: { classPropertyName: "searchResultLabel", publicName: "searchResultLabel", isSignal: true, isRequired: false, transformFunction: null }, footerEnabled: { classPropertyName: "footerEnabled", publicName: "footerEnabled", isSignal: true, isRequired: false, transformFunction: null }, footerNavigation: { classPropertyName: "footerNavigation", publicName: "footerNavigation", isSignal: true, isRequired: false, transformFunction: null }, footerText: { classPropertyName: "footerText", publicName: "footerText", isSignal: true, isRequired: false, transformFunction: null }, footerClass: { classPropertyName: "footerClass", publicName: "footerClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchResultSelected: "searchResultSelected" }, host: { classAttribute: "tw:block tw:min-w-0" }, viewQueries: [{ propertyName: "mobileMenuTrigger", first: true, predicate: ["mobileMenuTrigger"], descendants: true, isSignal: true }, { propertyName: "mainContent", first: true, predicate: ["mainContent"], descendants: true, isSignal: true }, { propertyName: "sidebar", first: true, predicate: EgLayoutSimpleSidebar, descendants: true, isSignal: true }], ngImport: i0, template: "@if (sidebarEnabled()) {\n<eg-layout-simple-sidebar\n [panelId]=\"sidebarId\"\n [title]=\"sidebarTitle()\"\n [content]=\"sidebarContent()\"\n [contentContext]=\"sidebarContext\"\n/>\n}\n\n<div\n [class]=\"hlm('tw:relative tw:isolate tw:flex tw:min-w-0 tw:flex-col tw:bg-background tw:text-foreground', fullHeight() && 'tw:min-h-dvh')\"\n>\n <a\n [href]=\"'#' + mainId\"\n (click)=\"focusContent($event)\"\n class=\"tw:sr-only tw:focus:not-sr-only tw:focus:absolute tw:focus:left-4 tw:focus:top-2 tw:focus:z-50 tw:focus:rounded-lg tw:focus:bg-background tw:focus:px-4 tw:focus:py-3 tw:focus:text-foreground tw:focus:outline-2 tw:focus:outline-ring\"\n >{{ skipLinkText() }}</a\n >\n\n <header [class]=\"headerClasses()\">\n <div class=\"tw:flex tw:min-w-0 tw:flex-1 tw:items-center tw:gap-3 tw:md:flex-none tw:md:flex-wrap\">\n @if (sidebarEnabled()) {\n <button\n type=\"button\"\n [class]=\"iconButtonClasses\"\n [attr.aria-label]=\"sidebarToggleLabel()\"\n [attr.aria-expanded]=\"sidebarOpen()\"\n [attr.aria-controls]=\"sidebarId\"\n (click)=\"openSidebar()\"\n >\n <ng-icon [svg]=\"sidebarIcon\" size=\"20px\" aria-hidden=\"true\" />\n </button>\n }\n <a\n [routerLink]=\"logoLink()\"\n [attr.aria-label]=\"brandName() + ' home'\"\n class=\"tw:flex tw:min-h-11 tw:min-w-0 tw:items-center tw:gap-2.5 tw:rounded-lg tw:pr-2 tw:text-foreground tw:no-underline tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:focus-visible:outline-ring\"\n >\n @if (logo()) { <img [src]=\"logo()\" alt=\"\" [class]=\"logoClasses()\" /> }\n <span class=\"tw:truncate tw:text-base tw:font-semibold tw:tracking-tight\">{{ brandName() }}</span>\n </a>\n <nav aria-label=\"Primary navigation\" [class]=\"primaryNavigationClasses()\">\n @for (item of primaryNavigation(); track $index) {\n <eg-layout-navigation-item [item]=\"item\" [itemClass]=\"navigationItemClass()\" />\n } @for (group of navigationGroups(); track $index) {\n <button\n type=\"button\"\n [hlmDropdownMenuTrigger]=\"groupMenu\"\n class=\"tw:flex tw:min-h-11 tw:items-center tw:gap-2 tw:rounded-lg tw:px-3 tw:text-sm tw:font-medium tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:outline-2 tw:focus-visible:outline-ring\"\n >\n {{ group.label || 'More' }} <ng-icon [svg]=\"chevronIcon\" size=\"14px\" aria-hidden=\"true\" />\n </button>\n <ng-template #groupMenu>\n <div hlmDropdownMenu class=\"tw:w-60\">\n @for (item of group.items; track $index) { @if (item.link && !item.disabled) {\n <a\n hlmDropdownMenuItem\n [routerLink]=\"item.link\"\n routerLinkActive=\"tw:bg-foreground/10 tw:font-semibold\"\n [routerLinkActiveOptions]=\"navigationMatchOptions(item)\"\n ariaCurrentWhenActive=\"page\"\n [class]=\"hlm('tw:min-h-11 tw:gap-2 tw:no-underline', item.class)\"\n >\n @if (item.icon) { <ng-icon [svg]=\"item.icon\" size=\"1rem\" aria-hidden=\"true\" /> } {{ item.label }}\n </a>\n } @else {\n <button\n type=\"button\"\n hlmDropdownMenuItem\n [disabled]=\"item.disabled || !item.action\"\n [class]=\"hlm('tw:min-h-11 tw:gap-2', item.class)\"\n (click)=\"item.action?.()\"\n >\n @if (item.icon) { <ng-icon [svg]=\"item.icon\" size=\"1rem\" aria-hidden=\"true\" /> } {{ item.label }}\n </button>\n } }\n </div>\n </ng-template>\n }\n </nav>\n </div>\n\n <div class=\"tw:hidden tw:md:flex tw:flex-wrap tw:items-center tw:gap-3\">\n @if (searchEnabled() && !isMobile()) { <ng-container [ngTemplateOutlet]=\"searchTemplate\" /> } @if\n (utilityNavigation().length) {\n <nav aria-label=\"Utility navigation\" [class]=\"utilityNavigationClasses()\">\n @for (item of utilityNavigation(); track $index) {\n <eg-layout-navigation-item [item]=\"item\" [itemClass]=\"navigationItemClass()\" />\n }\n </nav>\n } @if (userMenuSections().length) {\n <eg-layout-simple-user-menu\n [sections]=\"userMenuSections()\"\n [triggerTemplate]=\"userMenuTrigger()\"\n [triggerLabel]=\"userMenuLabel()\"\n />\n }\n </div>\n\n <button\n #mobileMenuTrigger\n type=\"button\"\n (click)=\"toggleMobileMenu()\"\n [class]=\"hlm(iconButtonClasses, 'tw:md:hidden')\"\n [attr.aria-label]=\"mobileMenuOpen() ? mobileMenuCloseLabel() : mobileMenuLabel()\"\n [attr.aria-expanded]=\"mobileMenuOpen()\"\n [attr.aria-controls]=\"mobileMenuId\"\n >\n <ng-icon [svg]=\"mobileMenuOpen() ? closeIcon : menuIcon\" size=\"20px\" aria-hidden=\"true\" />\n </button>\n </header>\n\n @if (sectionNavigation().length) {\n <nav aria-label=\"Section navigation\" [class]=\"sectionNavigationClasses()\">\n @for (item of sectionNavigation(); track $index) {\n <eg-layout-navigation-item [item]=\"item\" [itemClass]=\"navigationItemClass()\" />\n }\n </nav>\n } @if (flyoutNavigationGroups().length && !isMobile()) {\n <eg-layout-flyout-navbar\n class=\"tw:hidden tw:md:block\"\n [groups]=\"flyoutNavigationGroups()\"\n [label]=\"flyoutNavigationLabel()\"\n [closeLabel]=\"flyoutCloseLabel()\"\n [navbarClass]=\"flyoutNavigationClass()\"\n [panelClass]=\"flyoutPanelClass()\"\n [itemClass]=\"navigationItemClass()\"\n />\n } @if (secondaryNavigationGroups().length) {\n <nav aria-label=\"Secondary navigation\" [class]=\"secondaryNavigationClasses()\" tabindex=\"0\">\n @for (group of secondaryNavigationGroups(); track $index; let first = $first) {\n <div\n [class]=\"hlm('tw:flex tw:shrink-0 tw:items-center tw:gap-1', !first && 'tw:border-l tw:border-border tw:pl-5')\"\n >\n @if (group.label) {\n <span class=\"tw:mr-2 tw:text-xs tw:font-semibold tw:text-foreground/75 tw:whitespace-nowrap\"\n >{{ group.label }}</span\n >\n } @for (item of group.items; track $index) {\n <eg-layout-navigation-item\n [item]=\"item\"\n [itemClass]=\"hlm('tw:rounded-full tw:whitespace-nowrap', navigationItemClass())\"\n />\n }\n </div>\n }\n </nav>\n } @if (isMobile() && mobileMenuOpen()) {\n <nav\n [id]=\"mobileMenuId\"\n aria-label=\"Mobile navigation\"\n (keydown.escape)=\"closeMobileMenu(true); $event.stopPropagation()\"\n class=\"tw:md:hidden tw:max-h-[70dvh] tw:overflow-y-auto tw:overscroll-contain tw:space-y-4 tw:border-b tw:border-border tw:bg-background tw:p-4\"\n >\n @if (searchEnabled()) { <ng-container [ngTemplateOutlet]=\"searchTemplate\" /> }\n <eg-layout-simple-mobile-menu-group [items]=\"primaryNavigation()\" (itemSelected)=\"closeMobileMenu(true)\" />\n @for (group of navigationGroups(); track $index) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"group.items\"\n [label]=\"group.label\"\n (itemSelected)=\"closeMobileMenu(true)\"\n />\n }\n <eg-layout-simple-mobile-menu-group [items]=\"sectionNavigation()\" (itemSelected)=\"closeMobileMenu(true)\" />\n @for (group of flyoutNavigationGroups(); track $index) {\n <details class=\"tw:group/flyout tw:rounded-xl tw:border tw:border-border tw:bg-foreground/3\">\n <summary\n class=\"tw:flex tw:min-h-11 tw:list-none tw:items-center tw:justify-between tw:gap-2 tw:rounded-xl tw:px-3 tw:py-3 tw:text-sm tw:font-semibold tw:cursor-pointer tw:focus-visible:outline-2 tw:focus-visible:outline-ring tw:[&::-webkit-details-marker]:hidden\"\n >\n <span class=\"tw:flex tw:items-center tw:gap-2\">\n @if (group.icon) { <ng-icon [svg]=\"group.icon\" size=\"1rem\" aria-hidden=\"true\" /> } {{ group.label }}\n </span>\n <ng-icon\n [svg]=\"chevronIcon\"\n size=\"14px\"\n aria-hidden=\"true\"\n class=\"tw:shrink-0 tw:group-open/flyout:rotate-180\"\n />\n </summary>\n <div class=\"tw:space-y-2 tw:border-t tw:border-border tw:p-2\">\n @if (group.description) {\n <p class=\"tw:px-3 tw:py-2 tw:text-sm tw:text-foreground/75\">{{ group.description }}</p>\n } @for (item of group.items; track $index) {\n <eg-layout-navigation-item\n [item]=\"item\"\n appearance=\"card\"\n [itemClass]=\"navigationItemClass()\"\n (selected)=\"closeMobileMenu(true)\"\n />\n }\n </div>\n </details>\n } @for (group of secondaryNavigationGroups(); track $index) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"group.items\"\n [label]=\"group.label\"\n (itemSelected)=\"closeMobileMenu(true)\"\n />\n }\n <eg-layout-simple-mobile-menu-group [items]=\"utilityNavigation()\" (itemSelected)=\"closeMobileMenu(true)\" />\n @if (userMenuSections().length) {\n <div class=\"tw:space-y-4 tw:border-t tw:border-border tw:pt-4\">\n @for (section of userMenuSections(); track $index) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"section.items\"\n [label]=\"section.label\"\n (itemSelected)=\"closeMobileMenu(true)\"\n />\n }\n </div>\n }\n </nav>\n }\n\n <main #mainContent [id]=\"mainId\" tabindex=\"-1\" [attr.aria-busy]=\"loading()\" [class]=\"contentClasses()\">\n @if (loading()) {\n <div\n role=\"status\"\n class=\"tw:flex tw:min-h-48 tw:flex-1 tw:items-center tw:justify-center tw:gap-3 tw:text-sm tw:text-foreground/75\"\n >\n <span\n aria-hidden=\"true\"\n class=\"tw:size-5 tw:rounded-full tw:border-2 tw:border-border tw:border-t-foreground tw:motion-safe:animate-spin\"\n ></span>\n {{ loadingText() }}\n </div>\n }\n <div\n [hidden]=\"loading()\"\n [style.display]=\"loading() ? 'none' : null\"\n class=\"tw:w-full tw:min-w-0 eg-layout-simple-main-content\"\n >\n <ng-content />\n </div>\n </main>\n\n @if (footerEnabled()) {\n <footer [class]=\"footerClasses()\">\n @if (footerText()) {\n <p>{{ footerText() }}</p>\n } @if (footerNavigation().length) {\n <nav aria-label=\"Footer navigation\" class=\"tw:flex tw:flex-wrap tw:items-center tw:gap-1\">\n @for (item of footerNavigation(); track $index) { <eg-layout-navigation-item [item]=\"item\" /> }\n </nav>\n }\n </footer>\n }\n</div>\n\n<ng-template #searchTemplate>\n <eg-layout-search\n [loader]=\"searchLoader()\"\n [resultLabel]=\"searchResultLabel()\"\n [placeholder]=\"searchPlaceholder()\"\n [emptyText]=\"searchEmptyText()\"\n [errorText]=\"searchErrorText()\"\n [resultTemplate]=\"searchResultTemplate()\"\n (resultSelected)=\"selectSearchResult($event)\"\n />\n</ng-template>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: EgLayoutSimpleUserMenu, selector: "eg-layout-simple-user-menu", inputs: ["sections", "triggerTemplate", "triggerLabel"] }, { kind: "component", type: EgLayoutSimpleSidebar, selector: "eg-layout-simple-sidebar", inputs: ["panelId", "title", "content", "contentContext"] }, { kind: "component", type: EgLayoutSimpleMobileMenuGroup, selector: "eg-layout-simple-mobile-menu-group", inputs: ["label", "items"], outputs: ["itemSelected"] }, { kind: "component", type: EgLayoutSearch, selector: "eg-layout-search", inputs: ["placeholder", "emptyText", "errorText", "loadingText", "retryText", "loader", "resultLabel", "resultTemplate"], outputs: ["resultSelected"] }, { kind: "component", type: EgLayoutNavigationItem, selector: "eg-layout-navigation-item", inputs: ["item", "itemClass", "appearance"], outputs: ["selected"] }, { kind: "component", type: EgLayoutFlyoutNavbar, selector: "eg-layout-flyout-navbar", inputs: ["groups", "label", "closeLabel", "navbarClass", "panelClass", "itemClass"] }, { kind: "directive", type: HlmDropdownMenu, selector: "[hlmDropdownMenu],hlm-dropdown-menu", inputs: ["sideOffset"] }, { kind: "directive", type: HlmDropdownMenuItem, selector: "[hlmDropdownMenuItem],hlm-dropdown-menu-item", inputs: ["disabled", "variant", "inset"] }, { kind: "directive", type: HlmDropdownMenuTrigger, selector: "[hlmDropdownMenuTrigger]", inputs: ["align", "side"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
692
1209
|
}
|
|
693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgLayoutSimple, decorators: [{
|
|
694
1211
|
type: Component,
|
|
695
|
-
args: [{ selector: 'eg-layout-simple',
|
|
1212
|
+
args: [{ selector: 'eg-layout-simple', imports: [
|
|
696
1213
|
RouterLink,
|
|
1214
|
+
RouterLinkActive,
|
|
1215
|
+
NgTemplateOutlet,
|
|
1216
|
+
NgIcon,
|
|
697
1217
|
EgLayoutSimpleUserMenu,
|
|
698
1218
|
EgLayoutSimpleSidebar,
|
|
699
1219
|
EgLayoutSimpleMobileMenuGroup,
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
}),
|
|
707
|
-
|
|
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 }] }] } });
|
|
1220
|
+
EgLayoutSearch,
|
|
1221
|
+
EgLayoutNavigationItem,
|
|
1222
|
+
EgLayoutFlyoutNavbar,
|
|
1223
|
+
HlmDropdownMenu,
|
|
1224
|
+
HlmDropdownMenuItem,
|
|
1225
|
+
HlmDropdownMenuTrigger,
|
|
1226
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tw:block tw:min-w-0' }, template: "@if (sidebarEnabled()) {\n<eg-layout-simple-sidebar\n [panelId]=\"sidebarId\"\n [title]=\"sidebarTitle()\"\n [content]=\"sidebarContent()\"\n [contentContext]=\"sidebarContext\"\n/>\n}\n\n<div\n [class]=\"hlm('tw:relative tw:isolate tw:flex tw:min-w-0 tw:flex-col tw:bg-background tw:text-foreground', fullHeight() && 'tw:min-h-dvh')\"\n>\n <a\n [href]=\"'#' + mainId\"\n (click)=\"focusContent($event)\"\n class=\"tw:sr-only tw:focus:not-sr-only tw:focus:absolute tw:focus:left-4 tw:focus:top-2 tw:focus:z-50 tw:focus:rounded-lg tw:focus:bg-background tw:focus:px-4 tw:focus:py-3 tw:focus:text-foreground tw:focus:outline-2 tw:focus:outline-ring\"\n >{{ skipLinkText() }}</a\n >\n\n <header [class]=\"headerClasses()\">\n <div class=\"tw:flex tw:min-w-0 tw:flex-1 tw:items-center tw:gap-3 tw:md:flex-none tw:md:flex-wrap\">\n @if (sidebarEnabled()) {\n <button\n type=\"button\"\n [class]=\"iconButtonClasses\"\n [attr.aria-label]=\"sidebarToggleLabel()\"\n [attr.aria-expanded]=\"sidebarOpen()\"\n [attr.aria-controls]=\"sidebarId\"\n (click)=\"openSidebar()\"\n >\n <ng-icon [svg]=\"sidebarIcon\" size=\"20px\" aria-hidden=\"true\" />\n </button>\n }\n <a\n [routerLink]=\"logoLink()\"\n [attr.aria-label]=\"brandName() + ' home'\"\n class=\"tw:flex tw:min-h-11 tw:min-w-0 tw:items-center tw:gap-2.5 tw:rounded-lg tw:pr-2 tw:text-foreground tw:no-underline tw:focus-visible:outline-2 tw:focus-visible:outline-offset-2 tw:focus-visible:outline-ring\"\n >\n @if (logo()) { <img [src]=\"logo()\" alt=\"\" [class]=\"logoClasses()\" /> }\n <span class=\"tw:truncate tw:text-base tw:font-semibold tw:tracking-tight\">{{ brandName() }}</span>\n </a>\n <nav aria-label=\"Primary navigation\" [class]=\"primaryNavigationClasses()\">\n @for (item of primaryNavigation(); track $index) {\n <eg-layout-navigation-item [item]=\"item\" [itemClass]=\"navigationItemClass()\" />\n } @for (group of navigationGroups(); track $index) {\n <button\n type=\"button\"\n [hlmDropdownMenuTrigger]=\"groupMenu\"\n class=\"tw:flex tw:min-h-11 tw:items-center tw:gap-2 tw:rounded-lg tw:px-3 tw:text-sm tw:font-medium tw:cursor-pointer tw:hover:bg-foreground/5 tw:focus-visible:outline-2 tw:focus-visible:outline-ring\"\n >\n {{ group.label || 'More' }} <ng-icon [svg]=\"chevronIcon\" size=\"14px\" aria-hidden=\"true\" />\n </button>\n <ng-template #groupMenu>\n <div hlmDropdownMenu class=\"tw:w-60\">\n @for (item of group.items; track $index) { @if (item.link && !item.disabled) {\n <a\n hlmDropdownMenuItem\n [routerLink]=\"item.link\"\n routerLinkActive=\"tw:bg-foreground/10 tw:font-semibold\"\n [routerLinkActiveOptions]=\"navigationMatchOptions(item)\"\n ariaCurrentWhenActive=\"page\"\n [class]=\"hlm('tw:min-h-11 tw:gap-2 tw:no-underline', item.class)\"\n >\n @if (item.icon) { <ng-icon [svg]=\"item.icon\" size=\"1rem\" aria-hidden=\"true\" /> } {{ item.label }}\n </a>\n } @else {\n <button\n type=\"button\"\n hlmDropdownMenuItem\n [disabled]=\"item.disabled || !item.action\"\n [class]=\"hlm('tw:min-h-11 tw:gap-2', item.class)\"\n (click)=\"item.action?.()\"\n >\n @if (item.icon) { <ng-icon [svg]=\"item.icon\" size=\"1rem\" aria-hidden=\"true\" /> } {{ item.label }}\n </button>\n } }\n </div>\n </ng-template>\n }\n </nav>\n </div>\n\n <div class=\"tw:hidden tw:md:flex tw:flex-wrap tw:items-center tw:gap-3\">\n @if (searchEnabled() && !isMobile()) { <ng-container [ngTemplateOutlet]=\"searchTemplate\" /> } @if\n (utilityNavigation().length) {\n <nav aria-label=\"Utility navigation\" [class]=\"utilityNavigationClasses()\">\n @for (item of utilityNavigation(); track $index) {\n <eg-layout-navigation-item [item]=\"item\" [itemClass]=\"navigationItemClass()\" />\n }\n </nav>\n } @if (userMenuSections().length) {\n <eg-layout-simple-user-menu\n [sections]=\"userMenuSections()\"\n [triggerTemplate]=\"userMenuTrigger()\"\n [triggerLabel]=\"userMenuLabel()\"\n />\n }\n </div>\n\n <button\n #mobileMenuTrigger\n type=\"button\"\n (click)=\"toggleMobileMenu()\"\n [class]=\"hlm(iconButtonClasses, 'tw:md:hidden')\"\n [attr.aria-label]=\"mobileMenuOpen() ? mobileMenuCloseLabel() : mobileMenuLabel()\"\n [attr.aria-expanded]=\"mobileMenuOpen()\"\n [attr.aria-controls]=\"mobileMenuId\"\n >\n <ng-icon [svg]=\"mobileMenuOpen() ? closeIcon : menuIcon\" size=\"20px\" aria-hidden=\"true\" />\n </button>\n </header>\n\n @if (sectionNavigation().length) {\n <nav aria-label=\"Section navigation\" [class]=\"sectionNavigationClasses()\">\n @for (item of sectionNavigation(); track $index) {\n <eg-layout-navigation-item [item]=\"item\" [itemClass]=\"navigationItemClass()\" />\n }\n </nav>\n } @if (flyoutNavigationGroups().length && !isMobile()) {\n <eg-layout-flyout-navbar\n class=\"tw:hidden tw:md:block\"\n [groups]=\"flyoutNavigationGroups()\"\n [label]=\"flyoutNavigationLabel()\"\n [closeLabel]=\"flyoutCloseLabel()\"\n [navbarClass]=\"flyoutNavigationClass()\"\n [panelClass]=\"flyoutPanelClass()\"\n [itemClass]=\"navigationItemClass()\"\n />\n } @if (secondaryNavigationGroups().length) {\n <nav aria-label=\"Secondary navigation\" [class]=\"secondaryNavigationClasses()\" tabindex=\"0\">\n @for (group of secondaryNavigationGroups(); track $index; let first = $first) {\n <div\n [class]=\"hlm('tw:flex tw:shrink-0 tw:items-center tw:gap-1', !first && 'tw:border-l tw:border-border tw:pl-5')\"\n >\n @if (group.label) {\n <span class=\"tw:mr-2 tw:text-xs tw:font-semibold tw:text-foreground/75 tw:whitespace-nowrap\"\n >{{ group.label }}</span\n >\n } @for (item of group.items; track $index) {\n <eg-layout-navigation-item\n [item]=\"item\"\n [itemClass]=\"hlm('tw:rounded-full tw:whitespace-nowrap', navigationItemClass())\"\n />\n }\n </div>\n }\n </nav>\n } @if (isMobile() && mobileMenuOpen()) {\n <nav\n [id]=\"mobileMenuId\"\n aria-label=\"Mobile navigation\"\n (keydown.escape)=\"closeMobileMenu(true); $event.stopPropagation()\"\n class=\"tw:md:hidden tw:max-h-[70dvh] tw:overflow-y-auto tw:overscroll-contain tw:space-y-4 tw:border-b tw:border-border tw:bg-background tw:p-4\"\n >\n @if (searchEnabled()) { <ng-container [ngTemplateOutlet]=\"searchTemplate\" /> }\n <eg-layout-simple-mobile-menu-group [items]=\"primaryNavigation()\" (itemSelected)=\"closeMobileMenu(true)\" />\n @for (group of navigationGroups(); track $index) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"group.items\"\n [label]=\"group.label\"\n (itemSelected)=\"closeMobileMenu(true)\"\n />\n }\n <eg-layout-simple-mobile-menu-group [items]=\"sectionNavigation()\" (itemSelected)=\"closeMobileMenu(true)\" />\n @for (group of flyoutNavigationGroups(); track $index) {\n <details class=\"tw:group/flyout tw:rounded-xl tw:border tw:border-border tw:bg-foreground/3\">\n <summary\n class=\"tw:flex tw:min-h-11 tw:list-none tw:items-center tw:justify-between tw:gap-2 tw:rounded-xl tw:px-3 tw:py-3 tw:text-sm tw:font-semibold tw:cursor-pointer tw:focus-visible:outline-2 tw:focus-visible:outline-ring tw:[&::-webkit-details-marker]:hidden\"\n >\n <span class=\"tw:flex tw:items-center tw:gap-2\">\n @if (group.icon) { <ng-icon [svg]=\"group.icon\" size=\"1rem\" aria-hidden=\"true\" /> } {{ group.label }}\n </span>\n <ng-icon\n [svg]=\"chevronIcon\"\n size=\"14px\"\n aria-hidden=\"true\"\n class=\"tw:shrink-0 tw:group-open/flyout:rotate-180\"\n />\n </summary>\n <div class=\"tw:space-y-2 tw:border-t tw:border-border tw:p-2\">\n @if (group.description) {\n <p class=\"tw:px-3 tw:py-2 tw:text-sm tw:text-foreground/75\">{{ group.description }}</p>\n } @for (item of group.items; track $index) {\n <eg-layout-navigation-item\n [item]=\"item\"\n appearance=\"card\"\n [itemClass]=\"navigationItemClass()\"\n (selected)=\"closeMobileMenu(true)\"\n />\n }\n </div>\n </details>\n } @for (group of secondaryNavigationGroups(); track $index) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"group.items\"\n [label]=\"group.label\"\n (itemSelected)=\"closeMobileMenu(true)\"\n />\n }\n <eg-layout-simple-mobile-menu-group [items]=\"utilityNavigation()\" (itemSelected)=\"closeMobileMenu(true)\" />\n @if (userMenuSections().length) {\n <div class=\"tw:space-y-4 tw:border-t tw:border-border tw:pt-4\">\n @for (section of userMenuSections(); track $index) {\n <eg-layout-simple-mobile-menu-group\n [items]=\"section.items\"\n [label]=\"section.label\"\n (itemSelected)=\"closeMobileMenu(true)\"\n />\n }\n </div>\n }\n </nav>\n }\n\n <main #mainContent [id]=\"mainId\" tabindex=\"-1\" [attr.aria-busy]=\"loading()\" [class]=\"contentClasses()\">\n @if (loading()) {\n <div\n role=\"status\"\n class=\"tw:flex tw:min-h-48 tw:flex-1 tw:items-center tw:justify-center tw:gap-3 tw:text-sm tw:text-foreground/75\"\n >\n <span\n aria-hidden=\"true\"\n class=\"tw:size-5 tw:rounded-full tw:border-2 tw:border-border tw:border-t-foreground tw:motion-safe:animate-spin\"\n ></span>\n {{ loadingText() }}\n </div>\n }\n <div\n [hidden]=\"loading()\"\n [style.display]=\"loading() ? 'none' : null\"\n class=\"tw:w-full tw:min-w-0 eg-layout-simple-main-content\"\n >\n <ng-content />\n </div>\n </main>\n\n @if (footerEnabled()) {\n <footer [class]=\"footerClasses()\">\n @if (footerText()) {\n <p>{{ footerText() }}</p>\n } @if (footerNavigation().length) {\n <nav aria-label=\"Footer navigation\" class=\"tw:flex tw:flex-wrap tw:items-center tw:gap-1\">\n @for (item of footerNavigation(); track $index) { <eg-layout-navigation-item [item]=\"item\" /> }\n </nav>\n }\n </footer>\n }\n</div>\n\n<ng-template #searchTemplate>\n <eg-layout-search\n [loader]=\"searchLoader()\"\n [resultLabel]=\"searchResultLabel()\"\n [placeholder]=\"searchPlaceholder()\"\n [emptyText]=\"searchEmptyText()\"\n [errorText]=\"searchErrorText()\"\n [resultTemplate]=\"searchResultTemplate()\"\n (resultSelected)=\"selectSearchResult($event)\"\n />\n</ng-template>\n" }]
|
|
1227
|
+
}], ctorParameters: () => [], propDecorators: { mobileMenuTrigger: [{ type: i0.ViewChild, args: ['mobileMenuTrigger', { isSignal: true }] }], mainContent: [{ type: i0.ViewChild, args: ['mainContent', { isSignal: true }] }], sidebar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => EgLayoutSimpleSidebar), { isSignal: true }] }], 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 }] }], mobileMenuCloseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileMenuCloseLabel", required: false }] }], userMenuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "userMenuTrigger", required: false }] }], userMenuLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "userMenuLabel", required: false }] }], primaryNavigation: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryNavigation", required: false }] }], navigationGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigationGroups", required: false }] }], utilityNavigation: [{ type: i0.Input, args: [{ isSignal: true, alias: "utilityNavigation", required: false }] }], sectionNavigation: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionNavigation", required: false }] }], secondaryNavigationGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryNavigationGroups", required: false }] }], flyoutNavigationGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "flyoutNavigationGroups", required: false }] }], flyoutNavigationLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "flyoutNavigationLabel", required: false }] }], flyoutCloseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "flyoutCloseLabel", required: false }] }], userMenuSections: [{ type: i0.Input, args: [{ isSignal: true, alias: "userMenuSections", required: false }] }], logo: [{ type: i0.Input, args: [{ isSignal: true, alias: "logo", required: false }] }], brandName: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandName", required: false }] }], logoLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoLink", required: false }] }], logoClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoClass", required: false }] }], fullHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullHeight", required: false }] }], headerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerClass", required: false }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }], primaryNavigationClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryNavigationClass", required: false }] }], utilityNavigationClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "utilityNavigationClass", required: false }] }], sectionNavigationClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionNavigationClass", required: false }] }], secondaryNavigationClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryNavigationClass", required: false }] }], flyoutNavigationClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "flyoutNavigationClass", required: false }] }], flyoutPanelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "flyoutPanelClass", required: false }] }], navigationItemClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigationItemClass", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], skipLinkText: [{ type: i0.Input, args: [{ isSignal: true, alias: "skipLinkText", required: false }] }], searchEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchEnabled", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], searchEmptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchEmptyText", required: false }] }], searchErrorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchErrorText", required: false }] }], searchResultTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchResultTemplate", required: false }] }], searchLoader: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLoader", required: false }] }], searchResultLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchResultLabel", required: false }] }], searchResultSelected: [{ type: i0.Output, args: ["searchResultSelected"] }], footerEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerEnabled", required: false }] }], footerNavigation: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerNavigation", required: false }] }], footerText: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerText", required: false }] }], footerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerClass", required: false }] }] } });
|
|
709
1228
|
|
|
710
1229
|
/*
|
|
711
1230
|
* Public API Surface of layout-simple
|
|
@@ -715,5 +1234,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
715
1234
|
* Generated bundle index. Do not edit.
|
|
716
1235
|
*/
|
|
717
1236
|
|
|
718
|
-
export {
|
|
719
|
-
|
|
1237
|
+
export { EG_LAYOUT_SIMPLE_MOBILE_BREAKPOINT, EgLayoutSearch, EgLayoutSimple, EgLayoutSimpleUserMenu };
|
|
1238
|
+
|