@ojiepermana/angular 22.1.14 → 22.2.1
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 +8 -6
- package/SUPPORT.md +3 -3
- package/chart/README.md +1 -1
- package/component/README.md +2 -2
- package/component/calendar/README.md +3 -15
- package/component/drawer/README.md +1 -2
- package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
- package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
- package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
- package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
- package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
- package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
- package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
- package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
- package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -5
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
- package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
- package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
- package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
- package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
- package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
- package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
- package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
- package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
- package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
- package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
- package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
- package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
- package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
- package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
- package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
- package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
- package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
- package/fesm2022/ojiepermana-angular-component.mjs +0 -10
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-DYuysKVf.mjs +129 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-COiTaw34.mjs +812 -0
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-COQ-60DS.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-YIz0IsIb.mjs} +392 -207
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-D2vwEwBY.mjs +650 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-B5D7yXfb.mjs +662 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-CUb68MZH.mjs +1219 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-CrK16trj.mjs +327 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +544 -724
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +139 -56
- package/fesm2022/ojiepermana-angular-navigation.mjs +3256 -4
- package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1125 -737
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1928 -553
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -496
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
- package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
- package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
- package/fesm2022/ojiepermana-angular.mjs +5 -24
- package/navigation/README.md +69 -18
- package/package.json +16 -12
- package/sdk/README.md +1 -1
- package/sdk/src/writer/index.js +2 -2
- package/theme/README.md +1 -1
- package/theme/layout/README.md +2 -4
- package/theme/page/README.md +50 -0
- package/theme/styles/README.md +10 -10
- package/theme/styles/css/base/prefers-dark.css +1 -1
- package/theme/styles/css/base/status.css +1 -1
- package/theme/styles/css/color/amber.css +1 -1
- package/theme/styles/css/color/blue.css +1 -1
- package/theme/styles/css/color/cyan.css +1 -1
- package/theme/styles/css/color/emerald.css +1 -1
- package/theme/styles/css/color/fuchsia.css +1 -1
- package/theme/styles/css/color/green.css +1 -1
- package/theme/styles/css/color/indigo.css +1 -1
- package/theme/styles/css/color/lime.css +1 -1
- package/theme/styles/css/color/orange.css +1 -1
- package/theme/styles/css/color/pink.css +1 -1
- package/theme/styles/css/color/purple.css +1 -1
- package/theme/styles/css/color/red.css +1 -1
- package/theme/styles/css/color/rose.css +1 -1
- package/theme/styles/css/color/sky.css +1 -1
- package/theme/styles/css/color/teal.css +1 -1
- package/theme/styles/css/color/violet.css +1 -1
- package/theme/styles/css/color/yellow.css +1 -1
- package/theme/styles/css/neutral/gray.css +1 -1
- package/theme/styles/css/neutral/mauve.css +1 -1
- package/theme/styles/css/neutral/mist.css +1 -1
- package/theme/styles/css/neutral/neutral.css +1 -1
- package/theme/styles/css/neutral/olive.css +1 -1
- package/theme/styles/css/neutral/slate.css +1 -1
- package/theme/styles/css/neutral/stone.css +1 -1
- package/theme/styles/css/neutral/taupe.css +1 -1
- package/theme/styles/css/neutral/zinc.css +1 -1
- package/types/ojiepermana-angular-chart-area.d.ts +126 -63
- package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
- package/types/ojiepermana-angular-chart-core.d.ts +409 -398
- package/types/ojiepermana-angular-chart-line.d.ts +141 -68
- package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
- package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
- package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
- package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
- package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
- package/types/ojiepermana-angular-chart.d.ts +3 -2
- package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
- package/types/ojiepermana-angular-component-alert.d.ts +69 -39
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
- package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
- package/types/ojiepermana-angular-component-badge.d.ts +36 -24
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
- package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
- package/types/ojiepermana-angular-component-button.d.ts +44 -27
- package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
- package/types/ojiepermana-angular-component-card.d.ts +112 -63
- package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
- package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
- package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
- package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
- package/types/ojiepermana-angular-component-command.d.ts +206 -121
- package/types/ojiepermana-angular-component-composer.d.ts +184 -84
- package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
- package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
- package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
- package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
- package/types/ojiepermana-angular-component-editor.d.ts +215 -117
- package/types/ojiepermana-angular-component-empty.d.ts +80 -45
- package/types/ojiepermana-angular-component-form.d.ts +185 -121
- package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
- package/types/ojiepermana-angular-component-icon.d.ts +87 -57
- package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
- package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
- package/types/ojiepermana-angular-component-input.d.ts +27 -17
- package/types/ojiepermana-angular-component-item.d.ts +160 -84
- package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
- package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
- package/types/ojiepermana-angular-component-label.d.ts +19 -11
- package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
- package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
- package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
- package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
- package/types/ojiepermana-angular-component-popover.d.ts +94 -64
- package/types/ojiepermana-angular-component-progress.d.ts +45 -17
- package/types/ojiepermana-angular-component-radio.d.ts +129 -53
- package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
- package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
- package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
- package/types/ojiepermana-angular-component-select.d.ts +94 -77
- package/types/ojiepermana-angular-component-separator.d.ts +26 -14
- package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
- package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
- package/types/ojiepermana-angular-component-slider.d.ts +140 -75
- package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
- package/types/ojiepermana-angular-component-switch.d.ts +97 -40
- package/types/ojiepermana-angular-component-table.d.ts +102 -50
- package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
- package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
- package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
- package/types/ojiepermana-angular-component-toast.d.ts +51 -55
- package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
- package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
- package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
- package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
- package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
- package/types/ojiepermana-angular-component-utils.d.ts +2 -2
- package/types/ojiepermana-angular-component.d.ts +1 -2
- package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
- package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
- package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
- package/types/ojiepermana-angular-navigation-types.d.ts +166 -125
- package/types/ojiepermana-angular-navigation.d.ts +708 -375
- package/types/ojiepermana-angular-sdk.d.ts +69 -71
- package/types/ojiepermana-angular-theme-component-settings.d.ts +120 -86
- package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
- package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +446 -187
- package/types/ojiepermana-angular-theme-layout.d.ts +201 -113
- package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
- package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
- package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
- package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
- package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
- package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
- package/types/ojiepermana-angular-theme-page.d.ts +7 -5
- package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
- package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
- package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
- package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
- package/types/ojiepermana-angular-theme.d.ts +1 -2
- package/types/ojiepermana-angular.d.ts +5 -5
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-Be3IqzG4.mjs +0 -91
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-Bc7DWK3R.mjs +0 -522
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-DA8VPEn7.mjs +0 -404
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-U2TJTzlW.mjs +0 -466
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-CIUhmytH.mjs +0 -2668
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
import { n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-CUb68MZH.mjs";
|
|
2
|
+
import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-YIz0IsIb.mjs";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { Component, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal } from "@angular/core";
|
|
5
|
+
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
6
|
+
import { NAVIGATION_ADAPTER } from "@ojiepermana/angular/navigation/core";
|
|
7
|
+
import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
|
|
8
|
+
var NavigationHorizontalComponent = class NavigationHorizontalComponent {
|
|
9
|
+
nav = inject(NAVIGATION_ADAPTER);
|
|
10
|
+
host = inject(ElementRef);
|
|
11
|
+
injector = inject(Injector);
|
|
12
|
+
document = inject(DOCUMENT);
|
|
13
|
+
navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
|
|
14
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
15
|
+
position = input("top", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
16
|
+
typeStyle = input("flat", ...ngDevMode ? [{ debugName: "typeStyle" }] : /* istanbul ignore next */ []);
|
|
17
|
+
compact = input(false, ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
|
|
18
|
+
itemClass = input("", ...ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []);
|
|
19
|
+
groupClass = input("", ...ngDevMode ? [{ debugName: "groupClass" }] : /* istanbul ignore next */ []);
|
|
20
|
+
activeIds = input(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "activeIds" }] : /* istanbul ignore next */ []);
|
|
21
|
+
activeUrl = input(null, ...ngDevMode ? [{ debugName: "activeUrl" }] : /* istanbul ignore next */ []);
|
|
22
|
+
iconTemplate = input(void 0, ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
|
|
23
|
+
collapseTree = input("stairs", ...ngDevMode ? [{ debugName: "collapseTree" }] : /* istanbul ignore next */ []);
|
|
24
|
+
openedIds = input([], ...ngDevMode ? [{ debugName: "openedIds" }] : /* istanbul ignore next */ []);
|
|
25
|
+
openedIdsChange = output();
|
|
26
|
+
itemSelected = output();
|
|
27
|
+
isBorderRail = computed(() => this.typeStyle() === "border-rail", ...ngDevMode ? [{ debugName: "isBorderRail" }] : /* istanbul ignore next */ []);
|
|
28
|
+
isBottom = computed(() => this.position() === "bottom", ...ngDevMode ? [{ debugName: "isBottom" }] : /* istanbul ignore next */ []);
|
|
29
|
+
navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "rounded-none hover:bg-transparent hover:text-primary"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
|
|
30
|
+
listClasses = computed(() => cn("flex h-full min-w-0 items-center justify-center gap-1 list-none p-0"), ...ngDevMode ? [{ debugName: "listClasses" }] : /* istanbul ignore next */ []);
|
|
31
|
+
openPanelKey = computed(() => this.nav.currentPanelKey(this.navId()), ...ngDevMode ? [{ debugName: "openPanelKey" }] : /* istanbul ignore next */ []);
|
|
32
|
+
itemState = computed(() => {
|
|
33
|
+
const activeIds = this.activeIds();
|
|
34
|
+
const activeUrl = this.activeUrl();
|
|
35
|
+
const navId = this.navId();
|
|
36
|
+
const openKey = this.openPanelKey();
|
|
37
|
+
return new Map(this.items().map((item) => {
|
|
38
|
+
const active = this.nav.isItemActive(item, activeIds, activeUrl);
|
|
39
|
+
const open = openKey === item.key;
|
|
40
|
+
return [item, {
|
|
41
|
+
active,
|
|
42
|
+
open,
|
|
43
|
+
panelId: navigationPanelId(navId, item),
|
|
44
|
+
triggerClasses: this.computeTriggerClasses(item, active, open)
|
|
45
|
+
}];
|
|
46
|
+
}));
|
|
47
|
+
}, ...ngDevMode ? [{ debugName: "itemState" }] : /* istanbul ignore next */ []);
|
|
48
|
+
isItemActive(item) {
|
|
49
|
+
return this.itemState().get(item)?.active ?? false;
|
|
50
|
+
}
|
|
51
|
+
isPanelOpen(item) {
|
|
52
|
+
return this.itemState().get(item)?.open ?? false;
|
|
53
|
+
}
|
|
54
|
+
panelIdFor(item) {
|
|
55
|
+
return this.itemState().get(item)?.panelId ?? navigationPanelId(this.navId(), item);
|
|
56
|
+
}
|
|
57
|
+
togglePanel(item) {
|
|
58
|
+
if (!this.isPanelOpen(item)) this.measurePanelPlacement();
|
|
59
|
+
this.nav.togglePanel(this.navId(), item);
|
|
60
|
+
}
|
|
61
|
+
constructor() {
|
|
62
|
+
effect((onCleanup) => {
|
|
63
|
+
if (this.openPanelKey() === null) return;
|
|
64
|
+
const view = this.document.defaultView;
|
|
65
|
+
const onDocumentClick = (event) => this.closeOnOutsideClick(event);
|
|
66
|
+
const onResize = () => this.measurePanelPlacement();
|
|
67
|
+
this.document.addEventListener("click", onDocumentClick);
|
|
68
|
+
view?.addEventListener("resize", onResize);
|
|
69
|
+
onCleanup(() => {
|
|
70
|
+
this.document.removeEventListener("click", onDocumentClick);
|
|
71
|
+
view?.removeEventListener("resize", onResize);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
closeOnOutsideClick(event) {
|
|
76
|
+
const target = event.target;
|
|
77
|
+
if (target && !this.host.nativeElement.contains(target)) this.nav.closePanel(this.navId());
|
|
78
|
+
}
|
|
79
|
+
panelPlacement = signal(null, ...ngDevMode ? [{ debugName: "panelPlacement" }] : /* istanbul ignore next */ []);
|
|
80
|
+
measurePanelPlacement() {
|
|
81
|
+
const hostEl = this.host.nativeElement;
|
|
82
|
+
let container = hostEl.closest("[data-navigation-id]")?.parentElement ?? hostEl.parentElement;
|
|
83
|
+
while (container && container.getBoundingClientRect().width <= 0 && container.parentElement) container = container.parentElement;
|
|
84
|
+
const containerRect = (container ?? hostEl).getBoundingClientRect();
|
|
85
|
+
const hostRect = hostEl.getBoundingClientRect();
|
|
86
|
+
if (containerRect.width <= 0) {
|
|
87
|
+
this.panelPlacement.set(null);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.panelPlacement.set({
|
|
91
|
+
left: containerRect.left - hostRect.left,
|
|
92
|
+
width: containerRect.width
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
compactLabel(item) {
|
|
96
|
+
return this.nav.compactLabel(item, this.compact());
|
|
97
|
+
}
|
|
98
|
+
titleFor(item) {
|
|
99
|
+
return this.nav.titleFor(item, this.compact());
|
|
100
|
+
}
|
|
101
|
+
groupContainerClasses(item) {
|
|
102
|
+
return cn(this.groupClass(), item.classes?.container);
|
|
103
|
+
}
|
|
104
|
+
triggerClasses(item) {
|
|
105
|
+
return this.itemState().get(item)?.triggerClasses ?? "";
|
|
106
|
+
}
|
|
107
|
+
computeTriggerClasses(item, active, open) {
|
|
108
|
+
return cn("nav-trigger nav-text group/nav inline-flex min-w-0 items-center gap-(--nav-item-gap) rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", "h-(--nav-item-height) px-(--nav-item-padding-x)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0", this.isBorderRail() ? open || active ? "rounded-none text-primary" : "rounded-none text-foreground/80 hover:text-primary" : active ? "bg-accent text-foreground" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground", item.classes?.wrapper, this.itemClass());
|
|
109
|
+
}
|
|
110
|
+
panelClasses() {
|
|
111
|
+
return cn("absolute z-50 bg-popover text-popover-foreground shadow-lg", "max-h-[calc(100dvh-5rem)] overflow-x-hidden overflow-y-auto overscroll-contain", this.isBottom() ? "bottom-full" : "top-full", !this.panelPlacement() && "inset-x-0", this.isBorderRail() ? "rounded-none border-y border-border" : cn("rounded-xl border border-[hsl(var(--border)/var(--section-border-opacity))]", this.isBottom() ? "rounded-b-none" : "rounded-t-none"));
|
|
112
|
+
}
|
|
113
|
+
onKeydown(event) {
|
|
114
|
+
if (event.key === "Escape") {
|
|
115
|
+
const panelKey = this.nav.currentPanelKey(this.navId());
|
|
116
|
+
this.nav.closePanel(this.navId());
|
|
117
|
+
this.focusOpenPanelTrigger(panelKey);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const rootItems = this.rootFocusItems();
|
|
121
|
+
if (rootItems.length === 0) return;
|
|
122
|
+
const currentIndex = rootItems.indexOf(document.activeElement);
|
|
123
|
+
if (currentIndex === -1) return;
|
|
124
|
+
if (event.key === (this.isBottom() ? "ArrowUp" : "ArrowDown")) {
|
|
125
|
+
const currentItem = rootItems[currentIndex];
|
|
126
|
+
if (currentItem.getAttribute("aria-haspopup") === "menu") {
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
currentItem.click();
|
|
129
|
+
afterNextRender({ read: () => this.focusFirstPanelItem(this.nav.currentPanelKey(this.navId())) }, { injector: this.injector });
|
|
130
|
+
}
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (event.key === "ArrowRight" || event.key === "ArrowLeft") {
|
|
134
|
+
event.preventDefault();
|
|
135
|
+
rootItems[(currentIndex + (event.key === "ArrowRight" ? 1 : -1) + rootItems.length) % rootItems.length]?.focus();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
onPanelKeydown(event) {
|
|
139
|
+
if (event.key !== "Escape") return;
|
|
140
|
+
event.preventDefault();
|
|
141
|
+
const panelKey = this.nav.currentPanelKey(this.navId());
|
|
142
|
+
this.nav.closePanel(this.navId());
|
|
143
|
+
this.focusOpenPanelTrigger(panelKey);
|
|
144
|
+
}
|
|
145
|
+
rootFocusItems() {
|
|
146
|
+
return Array.from(this.host.nativeElement.querySelectorAll("[data-navigation-root-item=\"true\"]"));
|
|
147
|
+
}
|
|
148
|
+
focusOpenPanelTrigger(panelKey) {
|
|
149
|
+
if (!panelKey) return;
|
|
150
|
+
this.host.nativeElement.querySelector(`[data-navigation-item-key="${panelKey}"] [data-navigation-root-item="true"]`)?.focus();
|
|
151
|
+
}
|
|
152
|
+
focusFirstPanelItem(panelKey) {
|
|
153
|
+
if (!panelKey) return;
|
|
154
|
+
(this.host.nativeElement.querySelector(`[data-navigation-panel="${panelKey}"]`)?.querySelector("a[href], button:not([disabled]), [tabindex]:not([tabindex=\"-1\"])"))?.focus();
|
|
155
|
+
}
|
|
156
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
157
|
+
minVersion: "12.0.0",
|
|
158
|
+
version: "22.2.2",
|
|
159
|
+
ngImport: i0,
|
|
160
|
+
type: NavigationHorizontalComponent,
|
|
161
|
+
deps: [],
|
|
162
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
163
|
+
});
|
|
164
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
165
|
+
minVersion: "17.0.0",
|
|
166
|
+
version: "22.2.2",
|
|
167
|
+
type: NavigationHorizontalComponent,
|
|
168
|
+
isStandalone: true,
|
|
169
|
+
selector: "NavigationHorizontal",
|
|
170
|
+
inputs: {
|
|
171
|
+
navId: {
|
|
172
|
+
classPropertyName: "navId",
|
|
173
|
+
publicName: "navId",
|
|
174
|
+
isSignal: true,
|
|
175
|
+
isRequired: false,
|
|
176
|
+
transformFunction: null
|
|
177
|
+
},
|
|
178
|
+
items: {
|
|
179
|
+
classPropertyName: "items",
|
|
180
|
+
publicName: "items",
|
|
181
|
+
isSignal: true,
|
|
182
|
+
isRequired: false,
|
|
183
|
+
transformFunction: null
|
|
184
|
+
},
|
|
185
|
+
position: {
|
|
186
|
+
classPropertyName: "position",
|
|
187
|
+
publicName: "position",
|
|
188
|
+
isSignal: true,
|
|
189
|
+
isRequired: false,
|
|
190
|
+
transformFunction: null
|
|
191
|
+
},
|
|
192
|
+
typeStyle: {
|
|
193
|
+
classPropertyName: "typeStyle",
|
|
194
|
+
publicName: "typeStyle",
|
|
195
|
+
isSignal: true,
|
|
196
|
+
isRequired: false,
|
|
197
|
+
transformFunction: null
|
|
198
|
+
},
|
|
199
|
+
compact: {
|
|
200
|
+
classPropertyName: "compact",
|
|
201
|
+
publicName: "compact",
|
|
202
|
+
isSignal: true,
|
|
203
|
+
isRequired: false,
|
|
204
|
+
transformFunction: null
|
|
205
|
+
},
|
|
206
|
+
itemClass: {
|
|
207
|
+
classPropertyName: "itemClass",
|
|
208
|
+
publicName: "itemClass",
|
|
209
|
+
isSignal: true,
|
|
210
|
+
isRequired: false,
|
|
211
|
+
transformFunction: null
|
|
212
|
+
},
|
|
213
|
+
groupClass: {
|
|
214
|
+
classPropertyName: "groupClass",
|
|
215
|
+
publicName: "groupClass",
|
|
216
|
+
isSignal: true,
|
|
217
|
+
isRequired: false,
|
|
218
|
+
transformFunction: null
|
|
219
|
+
},
|
|
220
|
+
activeIds: {
|
|
221
|
+
classPropertyName: "activeIds",
|
|
222
|
+
publicName: "activeIds",
|
|
223
|
+
isSignal: true,
|
|
224
|
+
isRequired: false,
|
|
225
|
+
transformFunction: null
|
|
226
|
+
},
|
|
227
|
+
activeUrl: {
|
|
228
|
+
classPropertyName: "activeUrl",
|
|
229
|
+
publicName: "activeUrl",
|
|
230
|
+
isSignal: true,
|
|
231
|
+
isRequired: false,
|
|
232
|
+
transformFunction: null
|
|
233
|
+
},
|
|
234
|
+
iconTemplate: {
|
|
235
|
+
classPropertyName: "iconTemplate",
|
|
236
|
+
publicName: "iconTemplate",
|
|
237
|
+
isSignal: true,
|
|
238
|
+
isRequired: false,
|
|
239
|
+
transformFunction: null
|
|
240
|
+
},
|
|
241
|
+
collapseTree: {
|
|
242
|
+
classPropertyName: "collapseTree",
|
|
243
|
+
publicName: "collapseTree",
|
|
244
|
+
isSignal: true,
|
|
245
|
+
isRequired: false,
|
|
246
|
+
transformFunction: null
|
|
247
|
+
},
|
|
248
|
+
openedIds: {
|
|
249
|
+
classPropertyName: "openedIds",
|
|
250
|
+
publicName: "openedIds",
|
|
251
|
+
isSignal: true,
|
|
252
|
+
isRequired: false,
|
|
253
|
+
transformFunction: null
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
outputs: {
|
|
257
|
+
openedIdsChange: "openedIdsChange",
|
|
258
|
+
itemSelected: "itemSelected"
|
|
259
|
+
},
|
|
260
|
+
host: { classAttribute: "relative block h-full w-full" },
|
|
261
|
+
ngImport: i0,
|
|
262
|
+
template: `
|
|
263
|
+
<ul [class]="listClasses()" role="menubar" tabindex="-1" (keydown)="onKeydown($event)">
|
|
264
|
+
@for (item of items(); track item.key) {
|
|
265
|
+
@switch (item.type) {
|
|
266
|
+
@case ('group') {
|
|
267
|
+
<ng-container
|
|
268
|
+
[ngTemplateOutlet]="branchTemplate"
|
|
269
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
270
|
+
/>
|
|
271
|
+
}
|
|
272
|
+
@case ('collapsible') {
|
|
273
|
+
<ng-container
|
|
274
|
+
[ngTemplateOutlet]="branchTemplate"
|
|
275
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
276
|
+
/>
|
|
277
|
+
}
|
|
278
|
+
@case ('mega') {
|
|
279
|
+
<ng-container
|
|
280
|
+
[ngTemplateOutlet]="branchTemplate"
|
|
281
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
282
|
+
/>
|
|
283
|
+
}
|
|
284
|
+
@default {
|
|
285
|
+
<li
|
|
286
|
+
NavigationItem
|
|
287
|
+
[navId]="navId()"
|
|
288
|
+
[item]="item"
|
|
289
|
+
[level]="0"
|
|
290
|
+
[orientation]="'horizontal'"
|
|
291
|
+
[compact]="compact()"
|
|
292
|
+
[itemClass]="navItemClass()"
|
|
293
|
+
[activeIds]="activeIds()"
|
|
294
|
+
[activeUrl]="activeUrl()"
|
|
295
|
+
[iconTemplate]="iconTemplate()"
|
|
296
|
+
[collapseTree]="collapseTree()"
|
|
297
|
+
[openedIds]="openedIds()"
|
|
298
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
299
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
300
|
+
></li>
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
</ul>
|
|
305
|
+
|
|
306
|
+
<ng-template #branchTemplate let-item>
|
|
307
|
+
<li
|
|
308
|
+
role="none"
|
|
309
|
+
[class]="groupContainerClasses(item)"
|
|
310
|
+
[attr.data-navigation-item-key]="item.key"
|
|
311
|
+
>
|
|
312
|
+
<button
|
|
313
|
+
type="button"
|
|
314
|
+
role="menuitem"
|
|
315
|
+
data-navigation-root-item="true"
|
|
316
|
+
[class]="triggerClasses(item)"
|
|
317
|
+
[attr.aria-expanded]="isPanelOpen(item)"
|
|
318
|
+
[attr.aria-controls]="isPanelOpen(item) ? panelIdFor(item) : null"
|
|
319
|
+
[attr.aria-haspopup]="'menu'"
|
|
320
|
+
[attr.aria-label]="compactLabel(item)"
|
|
321
|
+
[attr.title]="titleFor(item)"
|
|
322
|
+
[disabled]="item.disabled || null"
|
|
323
|
+
(click)="togglePanel(item)"
|
|
324
|
+
>
|
|
325
|
+
<NavigationItemContent
|
|
326
|
+
[item]="item"
|
|
327
|
+
[active]="isItemActive(item)"
|
|
328
|
+
[compact]="compact()"
|
|
329
|
+
[orientation]="'horizontal'"
|
|
330
|
+
[level]="0"
|
|
331
|
+
[iconTemplate]="iconTemplate()"
|
|
332
|
+
/>
|
|
333
|
+
</button>
|
|
334
|
+
|
|
335
|
+
@if (isPanelOpen(item)) {
|
|
336
|
+
<div
|
|
337
|
+
[id]="panelIdFor(item)"
|
|
338
|
+
role="menu"
|
|
339
|
+
tabindex="-1"
|
|
340
|
+
[class]="panelClasses()"
|
|
341
|
+
[style.left.px]="panelPlacement()?.left"
|
|
342
|
+
[style.width.px]="panelPlacement()?.width"
|
|
343
|
+
[attr.data-navigation-panel]="item.key"
|
|
344
|
+
(keydown)="onPanelKeydown($event)"
|
|
345
|
+
>
|
|
346
|
+
<NavigationEntryGrid
|
|
347
|
+
[navId]="navId()"
|
|
348
|
+
[branch]="item"
|
|
349
|
+
[typeStyle]="typeStyle()"
|
|
350
|
+
[itemClass]="itemClass()"
|
|
351
|
+
[activeIds]="activeIds()"
|
|
352
|
+
[activeUrl]="activeUrl()"
|
|
353
|
+
[iconTemplate]="iconTemplate()"
|
|
354
|
+
[collapseTree]="collapseTree()"
|
|
355
|
+
[openedIds]="openedIds()"
|
|
356
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
357
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
358
|
+
/>
|
|
359
|
+
</div>
|
|
360
|
+
}
|
|
361
|
+
</li>
|
|
362
|
+
</ng-template>
|
|
363
|
+
`,
|
|
364
|
+
isInline: true,
|
|
365
|
+
dependencies: [
|
|
366
|
+
{
|
|
367
|
+
kind: "directive",
|
|
368
|
+
type: NgTemplateOutlet,
|
|
369
|
+
selector: "[ngTemplateOutlet]",
|
|
370
|
+
inputs: [
|
|
371
|
+
"ngTemplateOutletContext",
|
|
372
|
+
"ngTemplateOutlet",
|
|
373
|
+
"ngTemplateOutletInjector"
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
kind: "component",
|
|
378
|
+
type: NavigationEntryGridComponent,
|
|
379
|
+
selector: "NavigationEntryGrid",
|
|
380
|
+
inputs: [
|
|
381
|
+
"navId",
|
|
382
|
+
"branch",
|
|
383
|
+
"typeStyle",
|
|
384
|
+
"itemClass",
|
|
385
|
+
"activeIds",
|
|
386
|
+
"activeUrl",
|
|
387
|
+
"iconTemplate",
|
|
388
|
+
"collapseTree",
|
|
389
|
+
"openedIds"
|
|
390
|
+
],
|
|
391
|
+
outputs: ["openedIdsChange", "itemSelected"]
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
kind: "component",
|
|
395
|
+
type: NavigationItemComponent,
|
|
396
|
+
selector: "li[NavigationItem]",
|
|
397
|
+
inputs: [
|
|
398
|
+
"navId",
|
|
399
|
+
"item",
|
|
400
|
+
"level",
|
|
401
|
+
"orientation",
|
|
402
|
+
"compact",
|
|
403
|
+
"itemClass",
|
|
404
|
+
"activeIds",
|
|
405
|
+
"activeUrl",
|
|
406
|
+
"iconTemplate",
|
|
407
|
+
"tooltip-position",
|
|
408
|
+
"collapseTree",
|
|
409
|
+
"straightRail",
|
|
410
|
+
"stairsRail",
|
|
411
|
+
"straightRailActive",
|
|
412
|
+
"firstInBranch",
|
|
413
|
+
"lastInBranch",
|
|
414
|
+
"openedIds"
|
|
415
|
+
],
|
|
416
|
+
outputs: ["openedIdsChange", "itemSelected"]
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
kind: "component",
|
|
420
|
+
type: NavigationItemContentComponent,
|
|
421
|
+
selector: "NavigationItemContent",
|
|
422
|
+
inputs: [
|
|
423
|
+
"item",
|
|
424
|
+
"active",
|
|
425
|
+
"compact",
|
|
426
|
+
"orientation",
|
|
427
|
+
"level",
|
|
428
|
+
"iconTemplate"
|
|
429
|
+
]
|
|
430
|
+
}
|
|
431
|
+
]
|
|
432
|
+
});
|
|
433
|
+
};
|
|
434
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
435
|
+
minVersion: "12.0.0",
|
|
436
|
+
version: "22.2.2",
|
|
437
|
+
ngImport: i0,
|
|
438
|
+
type: NavigationHorizontalComponent,
|
|
439
|
+
decorators: [{
|
|
440
|
+
type: Component,
|
|
441
|
+
args: [{
|
|
442
|
+
selector: "NavigationHorizontal",
|
|
443
|
+
imports: [
|
|
444
|
+
NgTemplateOutlet,
|
|
445
|
+
NavigationEntryGridComponent,
|
|
446
|
+
NavigationItemComponent,
|
|
447
|
+
NavigationItemContentComponent
|
|
448
|
+
],
|
|
449
|
+
host: { class: "relative block h-full w-full" },
|
|
450
|
+
template: `
|
|
451
|
+
<ul [class]="listClasses()" role="menubar" tabindex="-1" (keydown)="onKeydown($event)">
|
|
452
|
+
@for (item of items(); track item.key) {
|
|
453
|
+
@switch (item.type) {
|
|
454
|
+
@case ('group') {
|
|
455
|
+
<ng-container
|
|
456
|
+
[ngTemplateOutlet]="branchTemplate"
|
|
457
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
458
|
+
/>
|
|
459
|
+
}
|
|
460
|
+
@case ('collapsible') {
|
|
461
|
+
<ng-container
|
|
462
|
+
[ngTemplateOutlet]="branchTemplate"
|
|
463
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
464
|
+
/>
|
|
465
|
+
}
|
|
466
|
+
@case ('mega') {
|
|
467
|
+
<ng-container
|
|
468
|
+
[ngTemplateOutlet]="branchTemplate"
|
|
469
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
470
|
+
/>
|
|
471
|
+
}
|
|
472
|
+
@default {
|
|
473
|
+
<li
|
|
474
|
+
NavigationItem
|
|
475
|
+
[navId]="navId()"
|
|
476
|
+
[item]="item"
|
|
477
|
+
[level]="0"
|
|
478
|
+
[orientation]="'horizontal'"
|
|
479
|
+
[compact]="compact()"
|
|
480
|
+
[itemClass]="navItemClass()"
|
|
481
|
+
[activeIds]="activeIds()"
|
|
482
|
+
[activeUrl]="activeUrl()"
|
|
483
|
+
[iconTemplate]="iconTemplate()"
|
|
484
|
+
[collapseTree]="collapseTree()"
|
|
485
|
+
[openedIds]="openedIds()"
|
|
486
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
487
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
488
|
+
></li>
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
</ul>
|
|
493
|
+
|
|
494
|
+
<ng-template #branchTemplate let-item>
|
|
495
|
+
<li
|
|
496
|
+
role="none"
|
|
497
|
+
[class]="groupContainerClasses(item)"
|
|
498
|
+
[attr.data-navigation-item-key]="item.key"
|
|
499
|
+
>
|
|
500
|
+
<button
|
|
501
|
+
type="button"
|
|
502
|
+
role="menuitem"
|
|
503
|
+
data-navigation-root-item="true"
|
|
504
|
+
[class]="triggerClasses(item)"
|
|
505
|
+
[attr.aria-expanded]="isPanelOpen(item)"
|
|
506
|
+
[attr.aria-controls]="isPanelOpen(item) ? panelIdFor(item) : null"
|
|
507
|
+
[attr.aria-haspopup]="'menu'"
|
|
508
|
+
[attr.aria-label]="compactLabel(item)"
|
|
509
|
+
[attr.title]="titleFor(item)"
|
|
510
|
+
[disabled]="item.disabled || null"
|
|
511
|
+
(click)="togglePanel(item)"
|
|
512
|
+
>
|
|
513
|
+
<NavigationItemContent
|
|
514
|
+
[item]="item"
|
|
515
|
+
[active]="isItemActive(item)"
|
|
516
|
+
[compact]="compact()"
|
|
517
|
+
[orientation]="'horizontal'"
|
|
518
|
+
[level]="0"
|
|
519
|
+
[iconTemplate]="iconTemplate()"
|
|
520
|
+
/>
|
|
521
|
+
</button>
|
|
522
|
+
|
|
523
|
+
@if (isPanelOpen(item)) {
|
|
524
|
+
<div
|
|
525
|
+
[id]="panelIdFor(item)"
|
|
526
|
+
role="menu"
|
|
527
|
+
tabindex="-1"
|
|
528
|
+
[class]="panelClasses()"
|
|
529
|
+
[style.left.px]="panelPlacement()?.left"
|
|
530
|
+
[style.width.px]="panelPlacement()?.width"
|
|
531
|
+
[attr.data-navigation-panel]="item.key"
|
|
532
|
+
(keydown)="onPanelKeydown($event)"
|
|
533
|
+
>
|
|
534
|
+
<NavigationEntryGrid
|
|
535
|
+
[navId]="navId()"
|
|
536
|
+
[branch]="item"
|
|
537
|
+
[typeStyle]="typeStyle()"
|
|
538
|
+
[itemClass]="itemClass()"
|
|
539
|
+
[activeIds]="activeIds()"
|
|
540
|
+
[activeUrl]="activeUrl()"
|
|
541
|
+
[iconTemplate]="iconTemplate()"
|
|
542
|
+
[collapseTree]="collapseTree()"
|
|
543
|
+
[openedIds]="openedIds()"
|
|
544
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
545
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
546
|
+
/>
|
|
547
|
+
</div>
|
|
548
|
+
}
|
|
549
|
+
</li>
|
|
550
|
+
</ng-template>
|
|
551
|
+
`
|
|
552
|
+
}]
|
|
553
|
+
}],
|
|
554
|
+
ctorParameters: () => [],
|
|
555
|
+
propDecorators: {
|
|
556
|
+
navId: [{
|
|
557
|
+
type: i0.Input,
|
|
558
|
+
args: [{
|
|
559
|
+
isSignal: true,
|
|
560
|
+
alias: "navId",
|
|
561
|
+
required: false
|
|
562
|
+
}]
|
|
563
|
+
}],
|
|
564
|
+
items: [{
|
|
565
|
+
type: i0.Input,
|
|
566
|
+
args: [{
|
|
567
|
+
isSignal: true,
|
|
568
|
+
alias: "items",
|
|
569
|
+
required: false
|
|
570
|
+
}]
|
|
571
|
+
}],
|
|
572
|
+
position: [{
|
|
573
|
+
type: i0.Input,
|
|
574
|
+
args: [{
|
|
575
|
+
isSignal: true,
|
|
576
|
+
alias: "position",
|
|
577
|
+
required: false
|
|
578
|
+
}]
|
|
579
|
+
}],
|
|
580
|
+
typeStyle: [{
|
|
581
|
+
type: i0.Input,
|
|
582
|
+
args: [{
|
|
583
|
+
isSignal: true,
|
|
584
|
+
alias: "typeStyle",
|
|
585
|
+
required: false
|
|
586
|
+
}]
|
|
587
|
+
}],
|
|
588
|
+
compact: [{
|
|
589
|
+
type: i0.Input,
|
|
590
|
+
args: [{
|
|
591
|
+
isSignal: true,
|
|
592
|
+
alias: "compact",
|
|
593
|
+
required: false
|
|
594
|
+
}]
|
|
595
|
+
}],
|
|
596
|
+
itemClass: [{
|
|
597
|
+
type: i0.Input,
|
|
598
|
+
args: [{
|
|
599
|
+
isSignal: true,
|
|
600
|
+
alias: "itemClass",
|
|
601
|
+
required: false
|
|
602
|
+
}]
|
|
603
|
+
}],
|
|
604
|
+
groupClass: [{
|
|
605
|
+
type: i0.Input,
|
|
606
|
+
args: [{
|
|
607
|
+
isSignal: true,
|
|
608
|
+
alias: "groupClass",
|
|
609
|
+
required: false
|
|
610
|
+
}]
|
|
611
|
+
}],
|
|
612
|
+
activeIds: [{
|
|
613
|
+
type: i0.Input,
|
|
614
|
+
args: [{
|
|
615
|
+
isSignal: true,
|
|
616
|
+
alias: "activeIds",
|
|
617
|
+
required: false
|
|
618
|
+
}]
|
|
619
|
+
}],
|
|
620
|
+
activeUrl: [{
|
|
621
|
+
type: i0.Input,
|
|
622
|
+
args: [{
|
|
623
|
+
isSignal: true,
|
|
624
|
+
alias: "activeUrl",
|
|
625
|
+
required: false
|
|
626
|
+
}]
|
|
627
|
+
}],
|
|
628
|
+
iconTemplate: [{
|
|
629
|
+
type: i0.Input,
|
|
630
|
+
args: [{
|
|
631
|
+
isSignal: true,
|
|
632
|
+
alias: "iconTemplate",
|
|
633
|
+
required: false
|
|
634
|
+
}]
|
|
635
|
+
}],
|
|
636
|
+
collapseTree: [{
|
|
637
|
+
type: i0.Input,
|
|
638
|
+
args: [{
|
|
639
|
+
isSignal: true,
|
|
640
|
+
alias: "collapseTree",
|
|
641
|
+
required: false
|
|
642
|
+
}]
|
|
643
|
+
}],
|
|
644
|
+
openedIds: [{
|
|
645
|
+
type: i0.Input,
|
|
646
|
+
args: [{
|
|
647
|
+
isSignal: true,
|
|
648
|
+
alias: "openedIds",
|
|
649
|
+
required: false
|
|
650
|
+
}]
|
|
651
|
+
}],
|
|
652
|
+
openedIdsChange: [{
|
|
653
|
+
type: i0.Output,
|
|
654
|
+
args: ["openedIdsChange"]
|
|
655
|
+
}],
|
|
656
|
+
itemSelected: [{
|
|
657
|
+
type: i0.Output,
|
|
658
|
+
args: ["itemSelected"]
|
|
659
|
+
}]
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
export { NavigationHorizontalComponent };
|