@ojiepermana/angular 22.1.14 → 22.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 +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 +2 -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-BKCeWzml.mjs +129 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DFEJK2jD.mjs +811 -0
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-COQ-60DS.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-mpK9Ar08.mjs} +387 -183
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BPgH7FJk.mjs +650 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-DMpYcD9t.mjs +662 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs +1228 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-YUzHI9Pj.mjs +311 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +542 -724
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +27 -56
- package/fesm2022/ojiepermana-angular-navigation.mjs +3052 -4
- package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1115 -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 +1719 -552
- 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 +1 -1
- 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 +121 -125
- package/types/ojiepermana-angular-navigation.d.ts +663 -374
- package/types/ojiepermana-angular-sdk.d.ts +69 -71
- package/types/ojiepermana-angular-theme-component-settings.d.ts +115 -83
- 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 +399 -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,1228 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, computed, inject, input, output, signal } from "@angular/core";
|
|
3
|
+
import { RouterLink, RouterLinkActive } from "@angular/router";
|
|
4
|
+
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
5
|
+
import { NAVIGATION_ADAPTER } from "@ojiepermana/angular/navigation/core";
|
|
6
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
7
|
+
import { IconComponent } from "@ojiepermana/angular/component/icon";
|
|
8
|
+
import { TooltipDirective } from "@ojiepermana/angular/component/tooltip";
|
|
9
|
+
var NavigationItemContentComponent = class NavigationItemContentComponent {
|
|
10
|
+
nav = inject(NAVIGATION_ADAPTER);
|
|
11
|
+
item = input.required(...ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []);
|
|
12
|
+
active = input(false, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
13
|
+
compact = input(false, ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
|
|
14
|
+
orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
15
|
+
level = input(0, ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
|
|
16
|
+
iconTemplate = input(void 0, ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
|
|
17
|
+
iconSlotClasses = computed(() => cn("relative z-10 inline-flex shrink-0 items-center justify-center transition-colors duration-200", this.compact() && "mx-auto", this.active() ? "text-current" : "text-muted-foreground group-hover/nav:text-current"), ...ngDevMode ? [{ debugName: "iconSlotClasses" }] : /* istanbul ignore next */ []);
|
|
18
|
+
titleClasses = computed(() => cn("block truncate", this.active() && "text-foreground", this.item().classes?.title), ...ngDevMode ? [{ debugName: "titleClasses" }] : /* istanbul ignore next */ []);
|
|
19
|
+
showSubtitle = computed(() => !!this.item().subtitle && !(this.orientation() === "horizontal" && this.level() === 0), ...ngDevMode ? [{ debugName: "showSubtitle" }] : /* istanbul ignore next */ []);
|
|
20
|
+
subtitleClasses = computed(() => cn("nav-subtitle block truncate text-muted-foreground", this.item().classes?.subtitle), ...ngDevMode ? [{ debugName: "subtitleClasses" }] : /* istanbul ignore next */ []);
|
|
21
|
+
compactFallbackClasses = computed(() => cn("inline-flex h-5 min-w-5 items-center justify-center text-(length:--nav-icon-size-sub) font-semibold uppercase"), ...ngDevMode ? [{ debugName: "compactFallbackClasses" }] : /* istanbul ignore next */ []);
|
|
22
|
+
defaultBadgeClasses = computed(() => cn("nav-badge ml-auto inline-flex h-5 shrink-0 items-center rounded-full px-2", this.active() ? "bg-background text-foreground" : "bg-muted text-muted-foreground"), ...ngDevMode ? [{ debugName: "defaultBadgeClasses" }] : /* istanbul ignore next */ []);
|
|
23
|
+
defaultIconClasses = computed(() => cn(this.compact() ? "text-(length:--nav-icon-size-rail)" : "text-(length:--nav-icon-size)", "text-current", this.item().classes?.icon), ...ngDevMode ? [{ debugName: "defaultIconClasses" }] : /* istanbul ignore next */ []);
|
|
24
|
+
iconContext = computed(() => this.nav.iconContext(this.item(), this.active(), this.level(), this.orientation()), ...ngDevMode ? [{ debugName: "iconContext" }] : /* istanbul ignore next */ []);
|
|
25
|
+
compactFallback() {
|
|
26
|
+
return this.nav.compactFallback(this.item());
|
|
27
|
+
}
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
29
|
+
minVersion: "12.0.0",
|
|
30
|
+
version: "22.2.0",
|
|
31
|
+
ngImport: i0,
|
|
32
|
+
type: NavigationItemContentComponent,
|
|
33
|
+
deps: [],
|
|
34
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
35
|
+
});
|
|
36
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
37
|
+
minVersion: "17.0.0",
|
|
38
|
+
version: "22.2.0",
|
|
39
|
+
type: NavigationItemContentComponent,
|
|
40
|
+
isStandalone: true,
|
|
41
|
+
selector: "NavigationItemContent",
|
|
42
|
+
inputs: {
|
|
43
|
+
item: {
|
|
44
|
+
classPropertyName: "item",
|
|
45
|
+
publicName: "item",
|
|
46
|
+
isSignal: true,
|
|
47
|
+
isRequired: true,
|
|
48
|
+
transformFunction: null
|
|
49
|
+
},
|
|
50
|
+
active: {
|
|
51
|
+
classPropertyName: "active",
|
|
52
|
+
publicName: "active",
|
|
53
|
+
isSignal: true,
|
|
54
|
+
isRequired: false,
|
|
55
|
+
transformFunction: null
|
|
56
|
+
},
|
|
57
|
+
compact: {
|
|
58
|
+
classPropertyName: "compact",
|
|
59
|
+
publicName: "compact",
|
|
60
|
+
isSignal: true,
|
|
61
|
+
isRequired: false,
|
|
62
|
+
transformFunction: null
|
|
63
|
+
},
|
|
64
|
+
orientation: {
|
|
65
|
+
classPropertyName: "orientation",
|
|
66
|
+
publicName: "orientation",
|
|
67
|
+
isSignal: true,
|
|
68
|
+
isRequired: false,
|
|
69
|
+
transformFunction: null
|
|
70
|
+
},
|
|
71
|
+
level: {
|
|
72
|
+
classPropertyName: "level",
|
|
73
|
+
publicName: "level",
|
|
74
|
+
isSignal: true,
|
|
75
|
+
isRequired: false,
|
|
76
|
+
transformFunction: null
|
|
77
|
+
},
|
|
78
|
+
iconTemplate: {
|
|
79
|
+
classPropertyName: "iconTemplate",
|
|
80
|
+
publicName: "iconTemplate",
|
|
81
|
+
isSignal: true,
|
|
82
|
+
isRequired: false,
|
|
83
|
+
transformFunction: null
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
host: { classAttribute: "contents" },
|
|
87
|
+
ngImport: i0,
|
|
88
|
+
template: `
|
|
89
|
+
@if (item().icon; as iconName) {
|
|
90
|
+
<span data-navigation-icon-slot="true" [class]="iconSlotClasses()">
|
|
91
|
+
@if (iconTemplate(); as customIcon) {
|
|
92
|
+
<ng-container
|
|
93
|
+
[ngTemplateOutlet]="customIcon.template"
|
|
94
|
+
[ngTemplateOutletContext]="iconContext()"
|
|
95
|
+
/>
|
|
96
|
+
} @else {
|
|
97
|
+
<Icon [name]="iconName" [class]="defaultIconClasses()" size="inherit" [fill]="1" />
|
|
98
|
+
}
|
|
99
|
+
</span>
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@if (!compact()) {
|
|
103
|
+
<span class="min-w-0 flex-1">
|
|
104
|
+
<span [class]="titleClasses()">{{ item().title }}</span>
|
|
105
|
+
@if (showSubtitle()) {
|
|
106
|
+
<span [class]="subtitleClasses()">{{ item().subtitle }}</span>
|
|
107
|
+
}
|
|
108
|
+
</span>
|
|
109
|
+
|
|
110
|
+
@if (item().badge?.title; as badgeTitle) {
|
|
111
|
+
<span [class]="item().badge?.classes ?? defaultBadgeClasses()">{{ badgeTitle }}</span>
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@if (compact() && !item().icon) {
|
|
116
|
+
<span aria-hidden="true" [class]="compactFallbackClasses()">{{ compactFallback() }}</span>
|
|
117
|
+
}
|
|
118
|
+
`,
|
|
119
|
+
isInline: true,
|
|
120
|
+
dependencies: [{
|
|
121
|
+
kind: "directive",
|
|
122
|
+
type: NgTemplateOutlet,
|
|
123
|
+
selector: "[ngTemplateOutlet]",
|
|
124
|
+
inputs: [
|
|
125
|
+
"ngTemplateOutletContext",
|
|
126
|
+
"ngTemplateOutlet",
|
|
127
|
+
"ngTemplateOutletInjector"
|
|
128
|
+
]
|
|
129
|
+
}, {
|
|
130
|
+
kind: "component",
|
|
131
|
+
type: IconComponent,
|
|
132
|
+
selector: "Icon",
|
|
133
|
+
inputs: [
|
|
134
|
+
"name",
|
|
135
|
+
"class",
|
|
136
|
+
"size",
|
|
137
|
+
"fill",
|
|
138
|
+
"weight",
|
|
139
|
+
"grade",
|
|
140
|
+
"opticalSize"
|
|
141
|
+
]
|
|
142
|
+
}]
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
146
|
+
minVersion: "12.0.0",
|
|
147
|
+
version: "22.2.0",
|
|
148
|
+
ngImport: i0,
|
|
149
|
+
type: NavigationItemContentComponent,
|
|
150
|
+
decorators: [{
|
|
151
|
+
type: Component,
|
|
152
|
+
args: [{
|
|
153
|
+
selector: "NavigationItemContent",
|
|
154
|
+
imports: [NgTemplateOutlet, IconComponent],
|
|
155
|
+
host: { class: "contents" },
|
|
156
|
+
template: `
|
|
157
|
+
@if (item().icon; as iconName) {
|
|
158
|
+
<span data-navigation-icon-slot="true" [class]="iconSlotClasses()">
|
|
159
|
+
@if (iconTemplate(); as customIcon) {
|
|
160
|
+
<ng-container
|
|
161
|
+
[ngTemplateOutlet]="customIcon.template"
|
|
162
|
+
[ngTemplateOutletContext]="iconContext()"
|
|
163
|
+
/>
|
|
164
|
+
} @else {
|
|
165
|
+
<Icon [name]="iconName" [class]="defaultIconClasses()" size="inherit" [fill]="1" />
|
|
166
|
+
}
|
|
167
|
+
</span>
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@if (!compact()) {
|
|
171
|
+
<span class="min-w-0 flex-1">
|
|
172
|
+
<span [class]="titleClasses()">{{ item().title }}</span>
|
|
173
|
+
@if (showSubtitle()) {
|
|
174
|
+
<span [class]="subtitleClasses()">{{ item().subtitle }}</span>
|
|
175
|
+
}
|
|
176
|
+
</span>
|
|
177
|
+
|
|
178
|
+
@if (item().badge?.title; as badgeTitle) {
|
|
179
|
+
<span [class]="item().badge?.classes ?? defaultBadgeClasses()">{{ badgeTitle }}</span>
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@if (compact() && !item().icon) {
|
|
184
|
+
<span aria-hidden="true" [class]="compactFallbackClasses()">{{ compactFallback() }}</span>
|
|
185
|
+
}
|
|
186
|
+
`
|
|
187
|
+
}]
|
|
188
|
+
}],
|
|
189
|
+
propDecorators: {
|
|
190
|
+
item: [{
|
|
191
|
+
type: i0.Input,
|
|
192
|
+
args: [{
|
|
193
|
+
isSignal: true,
|
|
194
|
+
alias: "item",
|
|
195
|
+
required: true
|
|
196
|
+
}]
|
|
197
|
+
}],
|
|
198
|
+
active: [{
|
|
199
|
+
type: i0.Input,
|
|
200
|
+
args: [{
|
|
201
|
+
isSignal: true,
|
|
202
|
+
alias: "active",
|
|
203
|
+
required: false
|
|
204
|
+
}]
|
|
205
|
+
}],
|
|
206
|
+
compact: [{
|
|
207
|
+
type: i0.Input,
|
|
208
|
+
args: [{
|
|
209
|
+
isSignal: true,
|
|
210
|
+
alias: "compact",
|
|
211
|
+
required: false
|
|
212
|
+
}]
|
|
213
|
+
}],
|
|
214
|
+
orientation: [{
|
|
215
|
+
type: i0.Input,
|
|
216
|
+
args: [{
|
|
217
|
+
isSignal: true,
|
|
218
|
+
alias: "orientation",
|
|
219
|
+
required: false
|
|
220
|
+
}]
|
|
221
|
+
}],
|
|
222
|
+
level: [{
|
|
223
|
+
type: i0.Input,
|
|
224
|
+
args: [{
|
|
225
|
+
isSignal: true,
|
|
226
|
+
alias: "level",
|
|
227
|
+
required: false
|
|
228
|
+
}]
|
|
229
|
+
}],
|
|
230
|
+
iconTemplate: [{
|
|
231
|
+
type: i0.Input,
|
|
232
|
+
args: [{
|
|
233
|
+
isSignal: true,
|
|
234
|
+
alias: "iconTemplate",
|
|
235
|
+
required: false
|
|
236
|
+
}]
|
|
237
|
+
}]
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
function navigationPanelId(navId, item) {
|
|
241
|
+
return `${safeNavId(navId)}-${item.panelId}`;
|
|
242
|
+
}
|
|
243
|
+
function navigationHeadingId(navId, item) {
|
|
244
|
+
return `${navigationPanelId(navId, item)}-heading`;
|
|
245
|
+
}
|
|
246
|
+
function safeNavId(value) {
|
|
247
|
+
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-") || "default";
|
|
248
|
+
}
|
|
249
|
+
var NavigationItemComponent = class NavigationItemComponent {
|
|
250
|
+
nav = inject(NAVIGATION_ADAPTER);
|
|
251
|
+
navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
|
|
252
|
+
item = input.required(...ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []);
|
|
253
|
+
level = input(0, ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
|
|
254
|
+
orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
255
|
+
compact = input(false, ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
|
|
256
|
+
itemClass = input("", ...ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []);
|
|
257
|
+
activeIds = input(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "activeIds" }] : /* istanbul ignore next */ []);
|
|
258
|
+
activeUrl = input(null, ...ngDevMode ? [{ debugName: "activeUrl" }] : /* istanbul ignore next */ []);
|
|
259
|
+
iconTemplate = input(void 0, ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
|
|
260
|
+
tooltipPosition = input("above", {
|
|
261
|
+
...ngDevMode ? { debugName: "tooltipPosition" } : /* istanbul ignore next */ {},
|
|
262
|
+
alias: "tooltip-position"
|
|
263
|
+
});
|
|
264
|
+
collapseTree = input("stairs", ...ngDevMode ? [{ debugName: "collapseTree" }] : /* istanbul ignore next */ []);
|
|
265
|
+
straightRail = input(false, ...ngDevMode ? [{ debugName: "straightRail" }] : /* istanbul ignore next */ []);
|
|
266
|
+
stairsRail = input(false, ...ngDevMode ? [{ debugName: "stairsRail" }] : /* istanbul ignore next */ []);
|
|
267
|
+
straightRailActive = input(false, ...ngDevMode ? [{ debugName: "straightRailActive" }] : /* istanbul ignore next */ []);
|
|
268
|
+
firstInBranch = input(false, ...ngDevMode ? [{ debugName: "firstInBranch" }] : /* istanbul ignore next */ []);
|
|
269
|
+
lastInBranch = input(false, ...ngDevMode ? [{ debugName: "lastInBranch" }] : /* istanbul ignore next */ []);
|
|
270
|
+
openedIds = input([], ...ngDevMode ? [{ debugName: "openedIds" }] : /* istanbul ignore next */ []);
|
|
271
|
+
openedIdsChange = output();
|
|
272
|
+
itemSelected = output();
|
|
273
|
+
openedIdSet = computed(() => new Set(this.openedIds()), ...ngDevMode ? [{ debugName: "openedIdSet" }] : /* istanbul ignore next */ []);
|
|
274
|
+
listedAsOpen = computed(() => this.openedIdSet().has(this.item().stateId) || this.openedIdSet().has(this.item().key), ...ngDevMode ? [{ debugName: "listedAsOpen" }] : /* istanbul ignore next */ []);
|
|
275
|
+
userToggled = signal(false, ...ngDevMode ? [{ debugName: "userToggled" }] : /* istanbul ignore next */ []);
|
|
276
|
+
isHorizontalRoot = computed(() => this.orientation() === "horizontal" && this.level() === 0, ...ngDevMode ? [{ debugName: "isHorizontalRoot" }] : /* istanbul ignore next */ []);
|
|
277
|
+
isActive = computed(() => this.nav.isItemActive(this.item(), this.activeIds(), this.activeUrl()), ...ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []);
|
|
278
|
+
showChildren = computed(() => !this.compact() && this.isOpen(), ...ngDevMode ? [{ debugName: "showChildren" }] : /* istanbul ignore next */ []);
|
|
279
|
+
hostClasses = computed(() => {
|
|
280
|
+
if (this.item().type === "divider") return this.dividerClasses();
|
|
281
|
+
if (this.item().type === "spacer") return "flex-1";
|
|
282
|
+
if (this.item().type === "group" || this.item().type === "mega") return this.groupContainerClasses();
|
|
283
|
+
return this.itemContainerClasses();
|
|
284
|
+
}, ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
|
|
285
|
+
hostRole = computed(() => {
|
|
286
|
+
return this.orientation() === "horizontal" ? "none" : null;
|
|
287
|
+
}, ...ngDevMode ? [{ debugName: "hostRole" }] : /* istanbul ignore next */ []);
|
|
288
|
+
panelId = computed(() => navigationPanelId(this.navId(), this.item()), ...ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []);
|
|
289
|
+
headingId = computed(() => navigationHeadingId(this.navId(), this.item()), ...ngDevMode ? [{ debugName: "headingId" }] : /* istanbul ignore next */ []);
|
|
290
|
+
isRouterItem() {
|
|
291
|
+
return this.nav.isRouterItem(this.item());
|
|
292
|
+
}
|
|
293
|
+
hrefFor() {
|
|
294
|
+
return this.nav.hrefFor(this.item());
|
|
295
|
+
}
|
|
296
|
+
routerLinkFor() {
|
|
297
|
+
return this.item().disabled ? null : this.item().link ?? null;
|
|
298
|
+
}
|
|
299
|
+
hrefAttribute() {
|
|
300
|
+
return this.item().disabled ? null : this.hrefFor();
|
|
301
|
+
}
|
|
302
|
+
leafTabIndex() {
|
|
303
|
+
return this.item().disabled ? -1 : null;
|
|
304
|
+
}
|
|
305
|
+
relFor() {
|
|
306
|
+
return this.nav.relFor(this.item());
|
|
307
|
+
}
|
|
308
|
+
routerLinkActiveOptions() {
|
|
309
|
+
return this.nav.routerLinkActiveOptions(this.item());
|
|
310
|
+
}
|
|
311
|
+
itemRole() {
|
|
312
|
+
return this.nav.itemRole(this.orientation(), this.level());
|
|
313
|
+
}
|
|
314
|
+
compactLabel() {
|
|
315
|
+
return this.nav.compactLabel(this.item(), this.compact());
|
|
316
|
+
}
|
|
317
|
+
titleFor() {
|
|
318
|
+
return this.nav.titleFor(this.item(), this.compact());
|
|
319
|
+
}
|
|
320
|
+
isOpen() {
|
|
321
|
+
if (this.userToggled()) return this.listedAsOpen();
|
|
322
|
+
return this.listedAsOpen() || this.isActive();
|
|
323
|
+
}
|
|
324
|
+
toggleOpen() {
|
|
325
|
+
if (this.item().disabled) return;
|
|
326
|
+
const open = this.isOpen();
|
|
327
|
+
this.userToggled.set(true);
|
|
328
|
+
const next = new Set(this.openedIds());
|
|
329
|
+
if (open) next.delete(this.item().stateId);
|
|
330
|
+
else next.add(this.item().stateId);
|
|
331
|
+
this.openedIdsChange.emit([...next]);
|
|
332
|
+
}
|
|
333
|
+
selectItem(event) {
|
|
334
|
+
if (this.item().disabled) {
|
|
335
|
+
event.preventDefault();
|
|
336
|
+
event.stopPropagation();
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
this.item().action?.(this.item().source);
|
|
340
|
+
this.itemSelected.emit({
|
|
341
|
+
item: this.item().source,
|
|
342
|
+
key: this.item().key,
|
|
343
|
+
type: this.item().type,
|
|
344
|
+
link: this.item().link,
|
|
345
|
+
external: !!this.hrefFor()
|
|
346
|
+
});
|
|
347
|
+
this.nav.closePanel(this.navId());
|
|
348
|
+
this.nav.closeDrawer(this.navId());
|
|
349
|
+
}
|
|
350
|
+
leafClasses(active) {
|
|
351
|
+
return cn("NavigationItem nav-text group/nav inline-flex min-w-0 items-center rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", this.orientation() === "horizontal" && this.level() === 0 ? "h-(--nav-item-height) px-(--nav-item-padding-x)" : "min-h-(--nav-item-height) w-full px-(--nav-item-padding-x) py-1 text-left", "gap-(--nav-item-gap)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0 py-0 text-center", this.interactiveStateClasses(active), this.item().disabled && "pointer-events-none opacity-50", this.item().classes?.wrapper, this.itemClass());
|
|
352
|
+
}
|
|
353
|
+
triggerClasses(active) {
|
|
354
|
+
return cn("nav-trigger nav-text group/nav inline-flex min-w-0 items-center rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", this.orientation() === "horizontal" && this.level() === 0 ? "h-(--nav-item-height) px-(--nav-item-padding-x)" : "min-h-(--nav-item-height) w-full px-(--nav-item-padding-x) py-1 text-left", "gap-(--nav-item-gap)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0 py-0 text-center", this.interactiveStateClasses(active), this.item().classes?.wrapper, this.itemClass());
|
|
355
|
+
}
|
|
356
|
+
interactiveStateClasses(active) {
|
|
357
|
+
const showsNestedActiveConnector = active && this.orientation() === "vertical" && !this.compact() && this.stairsRail();
|
|
358
|
+
if (this.orientation() === "vertical" && !this.compact()) return cn("relative isolate", "before:pointer-events-none before:absolute before:inset-y-0 before:left-2 before:right-2 before:-z-10 before:rounded-md before:border before:border-transparent before:bg-transparent before:transition-colors before:duration-200 before:content-['']", showsNestedActiveConnector && "after:pointer-events-none after:absolute after:-left-[calc(var(--nav-indent)-var(--nav-rail-offset))] after:top-1/2 after:-z-10 after:h-px after:w-[calc(var(--nav-indent)-var(--nav-rail-offset))] after:-translate-y-1/2 after:rounded-full after:bg-current/25 after:content-['']", active ? "text-foreground before:bg-accent" : "text-foreground/80 hover:text-accent-foreground hover:before:bg-accent");
|
|
359
|
+
return active ? "text-foreground bg-accent" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground";
|
|
360
|
+
}
|
|
361
|
+
chevronClasses() {
|
|
362
|
+
return cn("ml-auto shrink-0 self-center text-(length:--nav-icon-size-sub) text-muted-foreground transition-transform duration-200", this.isOpen() && "rotate-90");
|
|
363
|
+
}
|
|
364
|
+
itemContainerClasses() {
|
|
365
|
+
return cn(this.orientation() === "horizontal" && this.level() === 0 ? "relative" : "w-full", this.compact() && "flex justify-center", this.straightRailClasses());
|
|
366
|
+
}
|
|
367
|
+
groupContainerClasses() {
|
|
368
|
+
return cn("w-full", this.level() > 0 && "pt-2");
|
|
369
|
+
}
|
|
370
|
+
dividerClasses() {
|
|
371
|
+
return cn(this.orientation() === "horizontal" && this.level() === 0 ? "mx-1 h-5 w-px" : "my-2 w-full px-2");
|
|
372
|
+
}
|
|
373
|
+
groupHeadingClasses() {
|
|
374
|
+
return cn("nav-heading px-(--nav-item-padding-x) pt-4 pb-1 text-muted-foreground", this.item().classes?.title);
|
|
375
|
+
}
|
|
376
|
+
childListClasses() {
|
|
377
|
+
const isGroupedBranch = this.item().type === "group" || this.item().type === "mega";
|
|
378
|
+
const usesStairsTree = this.collapseTree() === "stairs";
|
|
379
|
+
return cn("flex list-none flex-col gap-0.5 p-0", !this.compact() && "mt-0.5", this.level() >= 0 && !this.compact() && !isGroupedBranch && usesStairsTree && cn("relative ml-(--nav-rail-offset) pl-[calc(var(--nav-indent)-var(--nav-rail-offset))] before:absolute before:-top-2 before:bottom-0 before:left-0 before:w-px before:-translate-x-1/2 before:rounded-full before:content-['']", this.isActive() ? "before:bg-current/25" : "before:bg-border"));
|
|
380
|
+
}
|
|
381
|
+
showsStairsRailForChildren() {
|
|
382
|
+
return !this.compact() && this.collapseTree() === "stairs" && this.item().type !== "group" && this.item().type !== "mega";
|
|
383
|
+
}
|
|
384
|
+
showStraightRailForChildren() {
|
|
385
|
+
return !this.compact() && this.collapseTree() === "straight" && this.item().type !== "group" && this.item().type !== "mega";
|
|
386
|
+
}
|
|
387
|
+
straightRailClasses() {
|
|
388
|
+
if (!this.straightRail() || this.orientation() !== "vertical" || this.compact()) return "";
|
|
389
|
+
return cn("relative", "before:pointer-events-none before:absolute before:left-(--nav-rail-offset) before:w-0 before:-z-10 before:border-l before:border-dotted before:content-['']", this.straightRailActive() ? "before:border-primary/50" : "before:border-border/50", this.firstInBranch() ? "before:-top-[calc(var(--nav-item-height)/2+var(--spacing-base)*0.5)]" : "before:-top-0.5", this.lastInBranch() ? "before:bottom-[calc(100%-var(--nav-item-height)/2)]" : "before:-bottom-0.5");
|
|
390
|
+
}
|
|
391
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
392
|
+
minVersion: "12.0.0",
|
|
393
|
+
version: "22.2.0",
|
|
394
|
+
ngImport: i0,
|
|
395
|
+
type: NavigationItemComponent,
|
|
396
|
+
deps: [],
|
|
397
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
398
|
+
});
|
|
399
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
400
|
+
minVersion: "17.0.0",
|
|
401
|
+
version: "22.2.0",
|
|
402
|
+
type: NavigationItemComponent,
|
|
403
|
+
isStandalone: true,
|
|
404
|
+
selector: "li[NavigationItem]",
|
|
405
|
+
inputs: {
|
|
406
|
+
navId: {
|
|
407
|
+
classPropertyName: "navId",
|
|
408
|
+
publicName: "navId",
|
|
409
|
+
isSignal: true,
|
|
410
|
+
isRequired: false,
|
|
411
|
+
transformFunction: null
|
|
412
|
+
},
|
|
413
|
+
item: {
|
|
414
|
+
classPropertyName: "item",
|
|
415
|
+
publicName: "item",
|
|
416
|
+
isSignal: true,
|
|
417
|
+
isRequired: true,
|
|
418
|
+
transformFunction: null
|
|
419
|
+
},
|
|
420
|
+
level: {
|
|
421
|
+
classPropertyName: "level",
|
|
422
|
+
publicName: "level",
|
|
423
|
+
isSignal: true,
|
|
424
|
+
isRequired: false,
|
|
425
|
+
transformFunction: null
|
|
426
|
+
},
|
|
427
|
+
orientation: {
|
|
428
|
+
classPropertyName: "orientation",
|
|
429
|
+
publicName: "orientation",
|
|
430
|
+
isSignal: true,
|
|
431
|
+
isRequired: false,
|
|
432
|
+
transformFunction: null
|
|
433
|
+
},
|
|
434
|
+
compact: {
|
|
435
|
+
classPropertyName: "compact",
|
|
436
|
+
publicName: "compact",
|
|
437
|
+
isSignal: true,
|
|
438
|
+
isRequired: false,
|
|
439
|
+
transformFunction: null
|
|
440
|
+
},
|
|
441
|
+
itemClass: {
|
|
442
|
+
classPropertyName: "itemClass",
|
|
443
|
+
publicName: "itemClass",
|
|
444
|
+
isSignal: true,
|
|
445
|
+
isRequired: false,
|
|
446
|
+
transformFunction: null
|
|
447
|
+
},
|
|
448
|
+
activeIds: {
|
|
449
|
+
classPropertyName: "activeIds",
|
|
450
|
+
publicName: "activeIds",
|
|
451
|
+
isSignal: true,
|
|
452
|
+
isRequired: false,
|
|
453
|
+
transformFunction: null
|
|
454
|
+
},
|
|
455
|
+
activeUrl: {
|
|
456
|
+
classPropertyName: "activeUrl",
|
|
457
|
+
publicName: "activeUrl",
|
|
458
|
+
isSignal: true,
|
|
459
|
+
isRequired: false,
|
|
460
|
+
transformFunction: null
|
|
461
|
+
},
|
|
462
|
+
iconTemplate: {
|
|
463
|
+
classPropertyName: "iconTemplate",
|
|
464
|
+
publicName: "iconTemplate",
|
|
465
|
+
isSignal: true,
|
|
466
|
+
isRequired: false,
|
|
467
|
+
transformFunction: null
|
|
468
|
+
},
|
|
469
|
+
tooltipPosition: {
|
|
470
|
+
classPropertyName: "tooltipPosition",
|
|
471
|
+
publicName: "tooltip-position",
|
|
472
|
+
isSignal: true,
|
|
473
|
+
isRequired: false,
|
|
474
|
+
transformFunction: null
|
|
475
|
+
},
|
|
476
|
+
collapseTree: {
|
|
477
|
+
classPropertyName: "collapseTree",
|
|
478
|
+
publicName: "collapseTree",
|
|
479
|
+
isSignal: true,
|
|
480
|
+
isRequired: false,
|
|
481
|
+
transformFunction: null
|
|
482
|
+
},
|
|
483
|
+
straightRail: {
|
|
484
|
+
classPropertyName: "straightRail",
|
|
485
|
+
publicName: "straightRail",
|
|
486
|
+
isSignal: true,
|
|
487
|
+
isRequired: false,
|
|
488
|
+
transformFunction: null
|
|
489
|
+
},
|
|
490
|
+
stairsRail: {
|
|
491
|
+
classPropertyName: "stairsRail",
|
|
492
|
+
publicName: "stairsRail",
|
|
493
|
+
isSignal: true,
|
|
494
|
+
isRequired: false,
|
|
495
|
+
transformFunction: null
|
|
496
|
+
},
|
|
497
|
+
straightRailActive: {
|
|
498
|
+
classPropertyName: "straightRailActive",
|
|
499
|
+
publicName: "straightRailActive",
|
|
500
|
+
isSignal: true,
|
|
501
|
+
isRequired: false,
|
|
502
|
+
transformFunction: null
|
|
503
|
+
},
|
|
504
|
+
firstInBranch: {
|
|
505
|
+
classPropertyName: "firstInBranch",
|
|
506
|
+
publicName: "firstInBranch",
|
|
507
|
+
isSignal: true,
|
|
508
|
+
isRequired: false,
|
|
509
|
+
transformFunction: null
|
|
510
|
+
},
|
|
511
|
+
lastInBranch: {
|
|
512
|
+
classPropertyName: "lastInBranch",
|
|
513
|
+
publicName: "lastInBranch",
|
|
514
|
+
isSignal: true,
|
|
515
|
+
isRequired: false,
|
|
516
|
+
transformFunction: null
|
|
517
|
+
},
|
|
518
|
+
openedIds: {
|
|
519
|
+
classPropertyName: "openedIds",
|
|
520
|
+
publicName: "openedIds",
|
|
521
|
+
isSignal: true,
|
|
522
|
+
isRequired: false,
|
|
523
|
+
transformFunction: null
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
outputs: {
|
|
527
|
+
openedIdsChange: "openedIdsChange",
|
|
528
|
+
itemSelected: "itemSelected"
|
|
529
|
+
},
|
|
530
|
+
host: { properties: {
|
|
531
|
+
"class": "hostClasses()",
|
|
532
|
+
"attr.role": "hostRole()",
|
|
533
|
+
"attr.data-navigation-item-key": "item().key",
|
|
534
|
+
"attr.aria-hidden": "item().type === \"spacer\" || item().type === \"divider\" ? \"true\" : null"
|
|
535
|
+
} },
|
|
536
|
+
ngImport: i0,
|
|
537
|
+
template: `
|
|
538
|
+
@switch (item().type) {
|
|
539
|
+
@case ('divider') {
|
|
540
|
+
<span class="block h-px w-full bg-border"></span>
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
@case ('spacer') {}
|
|
544
|
+
|
|
545
|
+
@case ('group') {
|
|
546
|
+
@if (!compact() && item().title) {
|
|
547
|
+
<div [id]="headingId()" [class]="groupHeadingClasses()">
|
|
548
|
+
<span class="block truncate">{{ item().title }}</span>
|
|
549
|
+
|
|
550
|
+
@if (item().subtitle) {
|
|
551
|
+
<span
|
|
552
|
+
class="nav-subtitle -mt-0.5 block truncate text-2xs normal-case text-muted-foreground"
|
|
553
|
+
data-navigation-group-subtitle
|
|
554
|
+
>
|
|
555
|
+
{{ item().subtitle }}
|
|
556
|
+
</span>
|
|
557
|
+
}
|
|
558
|
+
</div>
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
<ul
|
|
562
|
+
[class]="childListClasses()"
|
|
563
|
+
role="list"
|
|
564
|
+
[attr.aria-labelledby]="item().title ? headingId() : null"
|
|
565
|
+
>
|
|
566
|
+
<ng-container [ngTemplateOutlet]="childItems" />
|
|
567
|
+
</ul>
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
@case ('collapsible') {
|
|
571
|
+
<button
|
|
572
|
+
type="button"
|
|
573
|
+
[class]="triggerClasses(isActive())"
|
|
574
|
+
[attr.aria-expanded]="showChildren()"
|
|
575
|
+
[attr.aria-controls]="showChildren() ? panelId() : null"
|
|
576
|
+
[attr.aria-label]="compactLabel()"
|
|
577
|
+
[attr.title]="titleFor()"
|
|
578
|
+
[Tooltip]="compact() ? (titleFor() ?? '') : ''"
|
|
579
|
+
[TooltipPosition]="tooltipPosition()"
|
|
580
|
+
[disabled]="item().disabled || null"
|
|
581
|
+
(click)="toggleOpen()"
|
|
582
|
+
>
|
|
583
|
+
<NavigationItemContent
|
|
584
|
+
[item]="item()"
|
|
585
|
+
[active]="isActive()"
|
|
586
|
+
[compact]="compact()"
|
|
587
|
+
[orientation]="orientation()"
|
|
588
|
+
[level]="level()"
|
|
589
|
+
[iconTemplate]="iconTemplate()"
|
|
590
|
+
/>
|
|
591
|
+
|
|
592
|
+
@if (!compact()) {
|
|
593
|
+
<Icon name="chevron_right" size="inherit" [class]="chevronClasses()" />
|
|
594
|
+
}
|
|
595
|
+
</button>
|
|
596
|
+
|
|
597
|
+
@if (showChildren()) {
|
|
598
|
+
<ul [id]="panelId()" [class]="childListClasses()" role="list">
|
|
599
|
+
<ng-container [ngTemplateOutlet]="childItems" />
|
|
600
|
+
</ul>
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
@case ('mega') {
|
|
605
|
+
@if (!compact() && item().title) {
|
|
606
|
+
<div [id]="headingId()" [class]="groupHeadingClasses()">{{ item().title }}</div>
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
<ul
|
|
610
|
+
[class]="childListClasses()"
|
|
611
|
+
role="list"
|
|
612
|
+
[attr.aria-labelledby]="item().title ? headingId() : null"
|
|
613
|
+
>
|
|
614
|
+
<ng-container [ngTemplateOutlet]="childItems" />
|
|
615
|
+
</ul>
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
@default {
|
|
619
|
+
@if (isRouterItem()) {
|
|
620
|
+
<a
|
|
621
|
+
[class]="leafClasses(routerActive.isActive || isActive())"
|
|
622
|
+
[routerLink]="routerLinkFor()"
|
|
623
|
+
[queryParams]="item().queryParams ?? null"
|
|
624
|
+
[queryParamsHandling]="item().queryParamsHandling ?? null"
|
|
625
|
+
[fragment]="item().fragment ?? undefined"
|
|
626
|
+
[preserveFragment]="item().preserveFragment ?? false"
|
|
627
|
+
[target]="item().target ?? undefined"
|
|
628
|
+
[attr.rel]="relFor()"
|
|
629
|
+
routerLinkActive
|
|
630
|
+
#routerActive="routerLinkActive"
|
|
631
|
+
[routerLinkActiveOptions]="routerLinkActiveOptions()"
|
|
632
|
+
[attr.aria-current]="routerActive.isActive || isActive() ? 'page' : null"
|
|
633
|
+
[attr.aria-disabled]="item().disabled || null"
|
|
634
|
+
[attr.tabindex]="leafTabIndex()"
|
|
635
|
+
[attr.aria-label]="compactLabel()"
|
|
636
|
+
[attr.title]="titleFor()"
|
|
637
|
+
[Tooltip]="compact() ? (titleFor() ?? '') : ''"
|
|
638
|
+
[TooltipPosition]="tooltipPosition()"
|
|
639
|
+
[attr.role]="itemRole()"
|
|
640
|
+
[attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
|
|
641
|
+
(click)="selectItem($event)"
|
|
642
|
+
>
|
|
643
|
+
<NavigationItemContent
|
|
644
|
+
[item]="item()"
|
|
645
|
+
[active]="routerActive.isActive || isActive()"
|
|
646
|
+
[compact]="compact()"
|
|
647
|
+
[orientation]="orientation()"
|
|
648
|
+
[level]="level()"
|
|
649
|
+
[iconTemplate]="iconTemplate()"
|
|
650
|
+
/>
|
|
651
|
+
</a>
|
|
652
|
+
} @else if (hrefFor()) {
|
|
653
|
+
<a
|
|
654
|
+
[class]="leafClasses(isActive())"
|
|
655
|
+
[attr.href]="hrefAttribute()"
|
|
656
|
+
[attr.target]="item().target ?? (item().externalLink ? '_blank' : null)"
|
|
657
|
+
[attr.rel]="relFor()"
|
|
658
|
+
[attr.aria-current]="isActive() ? 'page' : null"
|
|
659
|
+
[attr.aria-disabled]="item().disabled || null"
|
|
660
|
+
[attr.tabindex]="leafTabIndex()"
|
|
661
|
+
[attr.aria-label]="compactLabel()"
|
|
662
|
+
[attr.title]="titleFor()"
|
|
663
|
+
[Tooltip]="compact() ? (titleFor() ?? '') : ''"
|
|
664
|
+
[TooltipPosition]="tooltipPosition()"
|
|
665
|
+
[attr.role]="itemRole()"
|
|
666
|
+
[attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
|
|
667
|
+
(click)="selectItem($event)"
|
|
668
|
+
>
|
|
669
|
+
<NavigationItemContent
|
|
670
|
+
[item]="item()"
|
|
671
|
+
[active]="isActive()"
|
|
672
|
+
[compact]="compact()"
|
|
673
|
+
[orientation]="orientation()"
|
|
674
|
+
[level]="level()"
|
|
675
|
+
[iconTemplate]="iconTemplate()"
|
|
676
|
+
/>
|
|
677
|
+
</a>
|
|
678
|
+
} @else {
|
|
679
|
+
<button
|
|
680
|
+
type="button"
|
|
681
|
+
[class]="leafClasses(isActive())"
|
|
682
|
+
[disabled]="item().disabled || null"
|
|
683
|
+
[attr.aria-current]="isActive() ? 'page' : null"
|
|
684
|
+
[attr.aria-label]="compactLabel()"
|
|
685
|
+
[attr.title]="titleFor()"
|
|
686
|
+
[attr.role]="itemRole()"
|
|
687
|
+
[attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
|
|
688
|
+
(click)="selectItem($event)"
|
|
689
|
+
>
|
|
690
|
+
<NavigationItemContent
|
|
691
|
+
[item]="item()"
|
|
692
|
+
[active]="isActive()"
|
|
693
|
+
[compact]="compact()"
|
|
694
|
+
[orientation]="orientation()"
|
|
695
|
+
[level]="level()"
|
|
696
|
+
[iconTemplate]="iconTemplate()"
|
|
697
|
+
/>
|
|
698
|
+
</button>
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
<!--
|
|
703
|
+
The recursive child list, defined once.
|
|
704
|
+
|
|
705
|
+
It was written out three times, in the group, collapsible, and mega
|
|
706
|
+
branches, 25 identical lines each. Nothing needs passing in: every binding
|
|
707
|
+
is a member of this component and so is lexically in scope here, and
|
|
708
|
+
isFirst / isLast are @for locals declared inside.
|
|
709
|
+
|
|
710
|
+
The collapsible copy used to hardcode compact="false". That is the same
|
|
711
|
+
value there: its list only renders under showChildren(), which already
|
|
712
|
+
requires compact() to be false.
|
|
713
|
+
-->
|
|
714
|
+
<ng-template #childItems>
|
|
715
|
+
@for (child of item().children; track child.key; let isFirst = $first; let isLast = $last) {
|
|
716
|
+
<li
|
|
717
|
+
NavigationItem
|
|
718
|
+
[navId]="navId()"
|
|
719
|
+
[item]="child"
|
|
720
|
+
[level]="level() + 1"
|
|
721
|
+
[orientation]="orientation()"
|
|
722
|
+
[compact]="compact()"
|
|
723
|
+
[itemClass]="itemClass()"
|
|
724
|
+
[activeIds]="activeIds()"
|
|
725
|
+
[activeUrl]="activeUrl()"
|
|
726
|
+
[iconTemplate]="iconTemplate()"
|
|
727
|
+
[tooltip-position]="tooltipPosition()"
|
|
728
|
+
[collapseTree]="collapseTree()"
|
|
729
|
+
[straightRail]="showStraightRailForChildren()"
|
|
730
|
+
[stairsRail]="showsStairsRailForChildren()"
|
|
731
|
+
[straightRailActive]="isActive()"
|
|
732
|
+
[firstInBranch]="isFirst"
|
|
733
|
+
[lastInBranch]="isLast"
|
|
734
|
+
[openedIds]="openedIds()"
|
|
735
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
736
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
737
|
+
></li>
|
|
738
|
+
}
|
|
739
|
+
</ng-template>
|
|
740
|
+
`,
|
|
741
|
+
isInline: true,
|
|
742
|
+
dependencies: [
|
|
743
|
+
{
|
|
744
|
+
kind: "component",
|
|
745
|
+
type: NavigationItemComponent,
|
|
746
|
+
selector: "li[NavigationItem]",
|
|
747
|
+
inputs: [
|
|
748
|
+
"navId",
|
|
749
|
+
"item",
|
|
750
|
+
"level",
|
|
751
|
+
"orientation",
|
|
752
|
+
"compact",
|
|
753
|
+
"itemClass",
|
|
754
|
+
"activeIds",
|
|
755
|
+
"activeUrl",
|
|
756
|
+
"iconTemplate",
|
|
757
|
+
"tooltip-position",
|
|
758
|
+
"collapseTree",
|
|
759
|
+
"straightRail",
|
|
760
|
+
"stairsRail",
|
|
761
|
+
"straightRailActive",
|
|
762
|
+
"firstInBranch",
|
|
763
|
+
"lastInBranch",
|
|
764
|
+
"openedIds"
|
|
765
|
+
],
|
|
766
|
+
outputs: ["openedIdsChange", "itemSelected"]
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
kind: "component",
|
|
770
|
+
type: IconComponent,
|
|
771
|
+
selector: "Icon",
|
|
772
|
+
inputs: [
|
|
773
|
+
"name",
|
|
774
|
+
"class",
|
|
775
|
+
"size",
|
|
776
|
+
"fill",
|
|
777
|
+
"weight",
|
|
778
|
+
"grade",
|
|
779
|
+
"opticalSize"
|
|
780
|
+
]
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
kind: "component",
|
|
784
|
+
type: NavigationItemContentComponent,
|
|
785
|
+
selector: "NavigationItemContent",
|
|
786
|
+
inputs: [
|
|
787
|
+
"item",
|
|
788
|
+
"active",
|
|
789
|
+
"compact",
|
|
790
|
+
"orientation",
|
|
791
|
+
"level",
|
|
792
|
+
"iconTemplate"
|
|
793
|
+
]
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
kind: "directive",
|
|
797
|
+
type: NgTemplateOutlet,
|
|
798
|
+
selector: "[ngTemplateOutlet]",
|
|
799
|
+
inputs: [
|
|
800
|
+
"ngTemplateOutletContext",
|
|
801
|
+
"ngTemplateOutlet",
|
|
802
|
+
"ngTemplateOutletInjector"
|
|
803
|
+
]
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
kind: "directive",
|
|
807
|
+
type: RouterLink,
|
|
808
|
+
selector: "[routerLink]",
|
|
809
|
+
inputs: [
|
|
810
|
+
"target",
|
|
811
|
+
"queryParams",
|
|
812
|
+
"fragment",
|
|
813
|
+
"queryParamsHandling",
|
|
814
|
+
"state",
|
|
815
|
+
"info",
|
|
816
|
+
"relativeTo",
|
|
817
|
+
"preserveFragment",
|
|
818
|
+
"skipLocationChange",
|
|
819
|
+
"replaceUrl",
|
|
820
|
+
"browserUrl",
|
|
821
|
+
"routerLink"
|
|
822
|
+
]
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
kind: "directive",
|
|
826
|
+
type: RouterLinkActive,
|
|
827
|
+
selector: "[routerLinkActive]",
|
|
828
|
+
inputs: [
|
|
829
|
+
"routerLinkActiveOptions",
|
|
830
|
+
"ariaCurrentWhenActive",
|
|
831
|
+
"routerLinkActive"
|
|
832
|
+
],
|
|
833
|
+
outputs: ["isActiveChange"],
|
|
834
|
+
exportAs: ["routerLinkActive"]
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
kind: "directive",
|
|
838
|
+
type: TooltipDirective,
|
|
839
|
+
selector: "[Tooltip]",
|
|
840
|
+
inputs: [
|
|
841
|
+
"Tooltip",
|
|
842
|
+
"TooltipPosition",
|
|
843
|
+
"TooltipDisabled",
|
|
844
|
+
"TooltipShowDelay",
|
|
845
|
+
"TooltipHideDelay"
|
|
846
|
+
],
|
|
847
|
+
exportAs: ["Tooltip"]
|
|
848
|
+
}
|
|
849
|
+
]
|
|
850
|
+
});
|
|
851
|
+
};
|
|
852
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
853
|
+
minVersion: "12.0.0",
|
|
854
|
+
version: "22.2.0",
|
|
855
|
+
ngImport: i0,
|
|
856
|
+
type: NavigationItemComponent,
|
|
857
|
+
decorators: [{
|
|
858
|
+
type: Component,
|
|
859
|
+
args: [{
|
|
860
|
+
selector: "li[NavigationItem]",
|
|
861
|
+
imports: [
|
|
862
|
+
IconComponent,
|
|
863
|
+
NavigationItemContentComponent,
|
|
864
|
+
NgTemplateOutlet,
|
|
865
|
+
RouterLink,
|
|
866
|
+
RouterLinkActive,
|
|
867
|
+
TooltipDirective
|
|
868
|
+
],
|
|
869
|
+
host: {
|
|
870
|
+
"[class]": "hostClasses()",
|
|
871
|
+
"[attr.role]": "hostRole()",
|
|
872
|
+
"[attr.data-navigation-item-key]": "item().key",
|
|
873
|
+
"[attr.aria-hidden]": "item().type === \"spacer\" || item().type === \"divider\" ? \"true\" : null"
|
|
874
|
+
},
|
|
875
|
+
template: `
|
|
876
|
+
@switch (item().type) {
|
|
877
|
+
@case ('divider') {
|
|
878
|
+
<span class="block h-px w-full bg-border"></span>
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
@case ('spacer') {}
|
|
882
|
+
|
|
883
|
+
@case ('group') {
|
|
884
|
+
@if (!compact() && item().title) {
|
|
885
|
+
<div [id]="headingId()" [class]="groupHeadingClasses()">
|
|
886
|
+
<span class="block truncate">{{ item().title }}</span>
|
|
887
|
+
|
|
888
|
+
@if (item().subtitle) {
|
|
889
|
+
<span
|
|
890
|
+
class="nav-subtitle -mt-0.5 block truncate text-2xs normal-case text-muted-foreground"
|
|
891
|
+
data-navigation-group-subtitle
|
|
892
|
+
>
|
|
893
|
+
{{ item().subtitle }}
|
|
894
|
+
</span>
|
|
895
|
+
}
|
|
896
|
+
</div>
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
<ul
|
|
900
|
+
[class]="childListClasses()"
|
|
901
|
+
role="list"
|
|
902
|
+
[attr.aria-labelledby]="item().title ? headingId() : null"
|
|
903
|
+
>
|
|
904
|
+
<ng-container [ngTemplateOutlet]="childItems" />
|
|
905
|
+
</ul>
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
@case ('collapsible') {
|
|
909
|
+
<button
|
|
910
|
+
type="button"
|
|
911
|
+
[class]="triggerClasses(isActive())"
|
|
912
|
+
[attr.aria-expanded]="showChildren()"
|
|
913
|
+
[attr.aria-controls]="showChildren() ? panelId() : null"
|
|
914
|
+
[attr.aria-label]="compactLabel()"
|
|
915
|
+
[attr.title]="titleFor()"
|
|
916
|
+
[Tooltip]="compact() ? (titleFor() ?? '') : ''"
|
|
917
|
+
[TooltipPosition]="tooltipPosition()"
|
|
918
|
+
[disabled]="item().disabled || null"
|
|
919
|
+
(click)="toggleOpen()"
|
|
920
|
+
>
|
|
921
|
+
<NavigationItemContent
|
|
922
|
+
[item]="item()"
|
|
923
|
+
[active]="isActive()"
|
|
924
|
+
[compact]="compact()"
|
|
925
|
+
[orientation]="orientation()"
|
|
926
|
+
[level]="level()"
|
|
927
|
+
[iconTemplate]="iconTemplate()"
|
|
928
|
+
/>
|
|
929
|
+
|
|
930
|
+
@if (!compact()) {
|
|
931
|
+
<Icon name="chevron_right" size="inherit" [class]="chevronClasses()" />
|
|
932
|
+
}
|
|
933
|
+
</button>
|
|
934
|
+
|
|
935
|
+
@if (showChildren()) {
|
|
936
|
+
<ul [id]="panelId()" [class]="childListClasses()" role="list">
|
|
937
|
+
<ng-container [ngTemplateOutlet]="childItems" />
|
|
938
|
+
</ul>
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
@case ('mega') {
|
|
943
|
+
@if (!compact() && item().title) {
|
|
944
|
+
<div [id]="headingId()" [class]="groupHeadingClasses()">{{ item().title }}</div>
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
<ul
|
|
948
|
+
[class]="childListClasses()"
|
|
949
|
+
role="list"
|
|
950
|
+
[attr.aria-labelledby]="item().title ? headingId() : null"
|
|
951
|
+
>
|
|
952
|
+
<ng-container [ngTemplateOutlet]="childItems" />
|
|
953
|
+
</ul>
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
@default {
|
|
957
|
+
@if (isRouterItem()) {
|
|
958
|
+
<a
|
|
959
|
+
[class]="leafClasses(routerActive.isActive || isActive())"
|
|
960
|
+
[routerLink]="routerLinkFor()"
|
|
961
|
+
[queryParams]="item().queryParams ?? null"
|
|
962
|
+
[queryParamsHandling]="item().queryParamsHandling ?? null"
|
|
963
|
+
[fragment]="item().fragment ?? undefined"
|
|
964
|
+
[preserveFragment]="item().preserveFragment ?? false"
|
|
965
|
+
[target]="item().target ?? undefined"
|
|
966
|
+
[attr.rel]="relFor()"
|
|
967
|
+
routerLinkActive
|
|
968
|
+
#routerActive="routerLinkActive"
|
|
969
|
+
[routerLinkActiveOptions]="routerLinkActiveOptions()"
|
|
970
|
+
[attr.aria-current]="routerActive.isActive || isActive() ? 'page' : null"
|
|
971
|
+
[attr.aria-disabled]="item().disabled || null"
|
|
972
|
+
[attr.tabindex]="leafTabIndex()"
|
|
973
|
+
[attr.aria-label]="compactLabel()"
|
|
974
|
+
[attr.title]="titleFor()"
|
|
975
|
+
[Tooltip]="compact() ? (titleFor() ?? '') : ''"
|
|
976
|
+
[TooltipPosition]="tooltipPosition()"
|
|
977
|
+
[attr.role]="itemRole()"
|
|
978
|
+
[attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
|
|
979
|
+
(click)="selectItem($event)"
|
|
980
|
+
>
|
|
981
|
+
<NavigationItemContent
|
|
982
|
+
[item]="item()"
|
|
983
|
+
[active]="routerActive.isActive || isActive()"
|
|
984
|
+
[compact]="compact()"
|
|
985
|
+
[orientation]="orientation()"
|
|
986
|
+
[level]="level()"
|
|
987
|
+
[iconTemplate]="iconTemplate()"
|
|
988
|
+
/>
|
|
989
|
+
</a>
|
|
990
|
+
} @else if (hrefFor()) {
|
|
991
|
+
<a
|
|
992
|
+
[class]="leafClasses(isActive())"
|
|
993
|
+
[attr.href]="hrefAttribute()"
|
|
994
|
+
[attr.target]="item().target ?? (item().externalLink ? '_blank' : null)"
|
|
995
|
+
[attr.rel]="relFor()"
|
|
996
|
+
[attr.aria-current]="isActive() ? 'page' : null"
|
|
997
|
+
[attr.aria-disabled]="item().disabled || null"
|
|
998
|
+
[attr.tabindex]="leafTabIndex()"
|
|
999
|
+
[attr.aria-label]="compactLabel()"
|
|
1000
|
+
[attr.title]="titleFor()"
|
|
1001
|
+
[Tooltip]="compact() ? (titleFor() ?? '') : ''"
|
|
1002
|
+
[TooltipPosition]="tooltipPosition()"
|
|
1003
|
+
[attr.role]="itemRole()"
|
|
1004
|
+
[attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
|
|
1005
|
+
(click)="selectItem($event)"
|
|
1006
|
+
>
|
|
1007
|
+
<NavigationItemContent
|
|
1008
|
+
[item]="item()"
|
|
1009
|
+
[active]="isActive()"
|
|
1010
|
+
[compact]="compact()"
|
|
1011
|
+
[orientation]="orientation()"
|
|
1012
|
+
[level]="level()"
|
|
1013
|
+
[iconTemplate]="iconTemplate()"
|
|
1014
|
+
/>
|
|
1015
|
+
</a>
|
|
1016
|
+
} @else {
|
|
1017
|
+
<button
|
|
1018
|
+
type="button"
|
|
1019
|
+
[class]="leafClasses(isActive())"
|
|
1020
|
+
[disabled]="item().disabled || null"
|
|
1021
|
+
[attr.aria-current]="isActive() ? 'page' : null"
|
|
1022
|
+
[attr.aria-label]="compactLabel()"
|
|
1023
|
+
[attr.title]="titleFor()"
|
|
1024
|
+
[attr.role]="itemRole()"
|
|
1025
|
+
[attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
|
|
1026
|
+
(click)="selectItem($event)"
|
|
1027
|
+
>
|
|
1028
|
+
<NavigationItemContent
|
|
1029
|
+
[item]="item()"
|
|
1030
|
+
[active]="isActive()"
|
|
1031
|
+
[compact]="compact()"
|
|
1032
|
+
[orientation]="orientation()"
|
|
1033
|
+
[level]="level()"
|
|
1034
|
+
[iconTemplate]="iconTemplate()"
|
|
1035
|
+
/>
|
|
1036
|
+
</button>
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
<!--
|
|
1041
|
+
The recursive child list, defined once.
|
|
1042
|
+
|
|
1043
|
+
It was written out three times, in the group, collapsible, and mega
|
|
1044
|
+
branches, 25 identical lines each. Nothing needs passing in: every binding
|
|
1045
|
+
is a member of this component and so is lexically in scope here, and
|
|
1046
|
+
isFirst / isLast are @for locals declared inside.
|
|
1047
|
+
|
|
1048
|
+
The collapsible copy used to hardcode compact="false". That is the same
|
|
1049
|
+
value there: its list only renders under showChildren(), which already
|
|
1050
|
+
requires compact() to be false.
|
|
1051
|
+
-->
|
|
1052
|
+
<ng-template #childItems>
|
|
1053
|
+
@for (child of item().children; track child.key; let isFirst = $first; let isLast = $last) {
|
|
1054
|
+
<li
|
|
1055
|
+
NavigationItem
|
|
1056
|
+
[navId]="navId()"
|
|
1057
|
+
[item]="child"
|
|
1058
|
+
[level]="level() + 1"
|
|
1059
|
+
[orientation]="orientation()"
|
|
1060
|
+
[compact]="compact()"
|
|
1061
|
+
[itemClass]="itemClass()"
|
|
1062
|
+
[activeIds]="activeIds()"
|
|
1063
|
+
[activeUrl]="activeUrl()"
|
|
1064
|
+
[iconTemplate]="iconTemplate()"
|
|
1065
|
+
[tooltip-position]="tooltipPosition()"
|
|
1066
|
+
[collapseTree]="collapseTree()"
|
|
1067
|
+
[straightRail]="showStraightRailForChildren()"
|
|
1068
|
+
[stairsRail]="showsStairsRailForChildren()"
|
|
1069
|
+
[straightRailActive]="isActive()"
|
|
1070
|
+
[firstInBranch]="isFirst"
|
|
1071
|
+
[lastInBranch]="isLast"
|
|
1072
|
+
[openedIds]="openedIds()"
|
|
1073
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
1074
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
1075
|
+
></li>
|
|
1076
|
+
}
|
|
1077
|
+
</ng-template>
|
|
1078
|
+
`
|
|
1079
|
+
}]
|
|
1080
|
+
}],
|
|
1081
|
+
propDecorators: {
|
|
1082
|
+
navId: [{
|
|
1083
|
+
type: i0.Input,
|
|
1084
|
+
args: [{
|
|
1085
|
+
isSignal: true,
|
|
1086
|
+
alias: "navId",
|
|
1087
|
+
required: false
|
|
1088
|
+
}]
|
|
1089
|
+
}],
|
|
1090
|
+
item: [{
|
|
1091
|
+
type: i0.Input,
|
|
1092
|
+
args: [{
|
|
1093
|
+
isSignal: true,
|
|
1094
|
+
alias: "item",
|
|
1095
|
+
required: true
|
|
1096
|
+
}]
|
|
1097
|
+
}],
|
|
1098
|
+
level: [{
|
|
1099
|
+
type: i0.Input,
|
|
1100
|
+
args: [{
|
|
1101
|
+
isSignal: true,
|
|
1102
|
+
alias: "level",
|
|
1103
|
+
required: false
|
|
1104
|
+
}]
|
|
1105
|
+
}],
|
|
1106
|
+
orientation: [{
|
|
1107
|
+
type: i0.Input,
|
|
1108
|
+
args: [{
|
|
1109
|
+
isSignal: true,
|
|
1110
|
+
alias: "orientation",
|
|
1111
|
+
required: false
|
|
1112
|
+
}]
|
|
1113
|
+
}],
|
|
1114
|
+
compact: [{
|
|
1115
|
+
type: i0.Input,
|
|
1116
|
+
args: [{
|
|
1117
|
+
isSignal: true,
|
|
1118
|
+
alias: "compact",
|
|
1119
|
+
required: false
|
|
1120
|
+
}]
|
|
1121
|
+
}],
|
|
1122
|
+
itemClass: [{
|
|
1123
|
+
type: i0.Input,
|
|
1124
|
+
args: [{
|
|
1125
|
+
isSignal: true,
|
|
1126
|
+
alias: "itemClass",
|
|
1127
|
+
required: false
|
|
1128
|
+
}]
|
|
1129
|
+
}],
|
|
1130
|
+
activeIds: [{
|
|
1131
|
+
type: i0.Input,
|
|
1132
|
+
args: [{
|
|
1133
|
+
isSignal: true,
|
|
1134
|
+
alias: "activeIds",
|
|
1135
|
+
required: false
|
|
1136
|
+
}]
|
|
1137
|
+
}],
|
|
1138
|
+
activeUrl: [{
|
|
1139
|
+
type: i0.Input,
|
|
1140
|
+
args: [{
|
|
1141
|
+
isSignal: true,
|
|
1142
|
+
alias: "activeUrl",
|
|
1143
|
+
required: false
|
|
1144
|
+
}]
|
|
1145
|
+
}],
|
|
1146
|
+
iconTemplate: [{
|
|
1147
|
+
type: i0.Input,
|
|
1148
|
+
args: [{
|
|
1149
|
+
isSignal: true,
|
|
1150
|
+
alias: "iconTemplate",
|
|
1151
|
+
required: false
|
|
1152
|
+
}]
|
|
1153
|
+
}],
|
|
1154
|
+
tooltipPosition: [{
|
|
1155
|
+
type: i0.Input,
|
|
1156
|
+
args: [{
|
|
1157
|
+
isSignal: true,
|
|
1158
|
+
alias: "tooltip-position",
|
|
1159
|
+
required: false
|
|
1160
|
+
}]
|
|
1161
|
+
}],
|
|
1162
|
+
collapseTree: [{
|
|
1163
|
+
type: i0.Input,
|
|
1164
|
+
args: [{
|
|
1165
|
+
isSignal: true,
|
|
1166
|
+
alias: "collapseTree",
|
|
1167
|
+
required: false
|
|
1168
|
+
}]
|
|
1169
|
+
}],
|
|
1170
|
+
straightRail: [{
|
|
1171
|
+
type: i0.Input,
|
|
1172
|
+
args: [{
|
|
1173
|
+
isSignal: true,
|
|
1174
|
+
alias: "straightRail",
|
|
1175
|
+
required: false
|
|
1176
|
+
}]
|
|
1177
|
+
}],
|
|
1178
|
+
stairsRail: [{
|
|
1179
|
+
type: i0.Input,
|
|
1180
|
+
args: [{
|
|
1181
|
+
isSignal: true,
|
|
1182
|
+
alias: "stairsRail",
|
|
1183
|
+
required: false
|
|
1184
|
+
}]
|
|
1185
|
+
}],
|
|
1186
|
+
straightRailActive: [{
|
|
1187
|
+
type: i0.Input,
|
|
1188
|
+
args: [{
|
|
1189
|
+
isSignal: true,
|
|
1190
|
+
alias: "straightRailActive",
|
|
1191
|
+
required: false
|
|
1192
|
+
}]
|
|
1193
|
+
}],
|
|
1194
|
+
firstInBranch: [{
|
|
1195
|
+
type: i0.Input,
|
|
1196
|
+
args: [{
|
|
1197
|
+
isSignal: true,
|
|
1198
|
+
alias: "firstInBranch",
|
|
1199
|
+
required: false
|
|
1200
|
+
}]
|
|
1201
|
+
}],
|
|
1202
|
+
lastInBranch: [{
|
|
1203
|
+
type: i0.Input,
|
|
1204
|
+
args: [{
|
|
1205
|
+
isSignal: true,
|
|
1206
|
+
alias: "lastInBranch",
|
|
1207
|
+
required: false
|
|
1208
|
+
}]
|
|
1209
|
+
}],
|
|
1210
|
+
openedIds: [{
|
|
1211
|
+
type: i0.Input,
|
|
1212
|
+
args: [{
|
|
1213
|
+
isSignal: true,
|
|
1214
|
+
alias: "openedIds",
|
|
1215
|
+
required: false
|
|
1216
|
+
}]
|
|
1217
|
+
}],
|
|
1218
|
+
openedIdsChange: [{
|
|
1219
|
+
type: i0.Output,
|
|
1220
|
+
args: ["openedIdsChange"]
|
|
1221
|
+
}],
|
|
1222
|
+
itemSelected: [{
|
|
1223
|
+
type: i0.Output,
|
|
1224
|
+
args: ["itemSelected"]
|
|
1225
|
+
}]
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
export { navigationPanelId as n, NavigationItemContentComponent as r, NavigationItemComponent as t };
|