@ojiepermana/angular 22.1.13 → 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-Cd-jh6tg.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 -491
- 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 -112
- 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-CDBxQ8rk.mjs +0 -91
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +0 -512
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +0 -404
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +0 -466
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +0 -2642
package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DFEJK2jD.mjs
ADDED
|
@@ -0,0 +1,811 @@
|
|
|
1
|
+
import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs";
|
|
2
|
+
import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-YUzHI9Pj.mjs";
|
|
3
|
+
import { NavigationBadgeCountComponent } from "./ojiepermana-angular-navigation-navigation-badge-count.component-BKCeWzml.mjs";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { Component, ElementRef, Injector, afterNextRender, computed, inject, input, output, signal } from "@angular/core";
|
|
6
|
+
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
7
|
+
import { NAVIGATION_ADAPTER } from "@ojiepermana/angular/navigation/core";
|
|
8
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
9
|
+
import { IconComponent } from "@ojiepermana/angular/component/icon";
|
|
10
|
+
import { TooltipDirective } from "@ojiepermana/angular/component/tooltip";
|
|
11
|
+
const EMPTY_NAVIGATION_BADGE_CONTEXT = Object.freeze({});
|
|
12
|
+
var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
13
|
+
nav = inject(NAVIGATION_ADAPTER);
|
|
14
|
+
host = inject(ElementRef);
|
|
15
|
+
injector = inject(Injector);
|
|
16
|
+
navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
|
|
17
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
18
|
+
railItems = input(null, ...ngDevMode ? [{ debugName: "railItems" }] : /* istanbul ignore next */ []);
|
|
19
|
+
badgeContext = input(EMPTY_NAVIGATION_BADGE_CONTEXT, ...ngDevMode ? [{ debugName: "badgeContext" }] : /* istanbul ignore next */ []);
|
|
20
|
+
mode = input("sticky", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
|
|
21
|
+
position = input("left", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
22
|
+
itemClass = input("", ...ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []);
|
|
23
|
+
activeIds = input(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "activeIds" }] : /* istanbul ignore next */ []);
|
|
24
|
+
activeUrl = input(null, ...ngDevMode ? [{ debugName: "activeUrl" }] : /* istanbul ignore next */ []);
|
|
25
|
+
resolvedGroup = input(void 0, ...ngDevMode ? [{ debugName: "resolvedGroup" }] : /* istanbul ignore next */ []);
|
|
26
|
+
iconTemplate = input(void 0, ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
|
|
27
|
+
collapseTree = input("stairs", ...ngDevMode ? [{ debugName: "collapseTree" }] : /* istanbul ignore next */ []);
|
|
28
|
+
openedIds = input([], ...ngDevMode ? [{ debugName: "openedIds" }] : /* istanbul ignore next */ []);
|
|
29
|
+
asideFooterTemplate = input(null, ...ngDevMode ? [{ debugName: "asideFooterTemplate" }] : /* istanbul ignore next */ []);
|
|
30
|
+
openedIdsChange = output();
|
|
31
|
+
itemSelected = output();
|
|
32
|
+
isDrawerMode = computed(() => this.mode() === "drawer", ...ngDevMode ? [{ debugName: "isDrawerMode" }] : /* istanbul ignore next */ []);
|
|
33
|
+
tooltipPosition = computed(() => this.position() === "right" ? "left" : "right", ...ngDevMode ? [{ debugName: "tooltipPosition" }] : /* istanbul ignore next */ []);
|
|
34
|
+
renderedRailItems = computed(() => this.railItems() ?? this.items(), ...ngDevMode ? [{ debugName: "renderedRailItems" }] : /* istanbul ignore next */ []);
|
|
35
|
+
asideId = computed(() => `nav-dockbar-${this.safeId(this.navId())}`, ...ngDevMode ? [{ debugName: "asideId" }] : /* istanbul ignore next */ []);
|
|
36
|
+
asideHeadingId = computed(() => `${this.asideId()}-heading`, ...ngDevMode ? [{ debugName: "asideHeadingId" }] : /* istanbul ignore next */ []);
|
|
37
|
+
openGroup = computed(() => {
|
|
38
|
+
const resolved = this.resolvedGroup();
|
|
39
|
+
return resolved !== void 0 ? resolved : this.nav.resolveDockbarGroup(this.navId(), this.items(), this.mode(), this.activeIds(), this.activeUrl());
|
|
40
|
+
}, ...ngDevMode ? [{ debugName: "openGroup" }] : /* istanbul ignore next */ []);
|
|
41
|
+
hostClasses = computed(() => cn("block w-(--layout-sidebar-collapsed-width)"), ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
|
|
42
|
+
railClasses = computed(() => cn("flex w-full list-none flex-col items-center gap-0.5 p-2", this.isDrawerMode() && this.openGroup() !== null && "relative z-50"), ...ngDevMode ? [{ debugName: "railClasses" }] : /* istanbul ignore next */ []);
|
|
43
|
+
asideClasses = computed(() => cn("absolute inset-y-0 flex w-(--layout-aside-width) flex-col bg-background", this.position() === "right" ? "right-(--layout-sidebar-collapsed-width) border-l border-border" : "left-(--layout-sidebar-collapsed-width) border-r border-border", this.isDrawerMode() && "z-50 shadow-xl"), ...ngDevMode ? [{ debugName: "asideClasses" }] : /* istanbul ignore next */ []);
|
|
44
|
+
backdropInset = signal({
|
|
45
|
+
left: null,
|
|
46
|
+
right: null
|
|
47
|
+
}, ...ngDevMode ? [{ debugName: "backdropInset" }] : /* istanbul ignore next */ []);
|
|
48
|
+
onWindowResize() {
|
|
49
|
+
if (this.isDrawerMode() && this.openGroup() !== null) this.measureBackdropInset();
|
|
50
|
+
}
|
|
51
|
+
measureBackdropInset() {
|
|
52
|
+
const rect = (this.host.nativeElement.closest("[data-navigation-id]") ?? this.host.nativeElement).getBoundingClientRect();
|
|
53
|
+
const viewportWidth = this.host.nativeElement.ownerDocument?.defaultView?.innerWidth ?? 0;
|
|
54
|
+
if (rect.width <= 0 || viewportWidth <= 0) {
|
|
55
|
+
this.backdropInset.set({
|
|
56
|
+
left: null,
|
|
57
|
+
right: null
|
|
58
|
+
});
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const backdrop = this.host.nativeElement.querySelector("[data-navigation-dockbar-backdrop=\"true\"]");
|
|
62
|
+
const backdropRect = backdrop?.getBoundingClientRect() ?? null;
|
|
63
|
+
let originLeft = 0;
|
|
64
|
+
let originRight = viewportWidth;
|
|
65
|
+
if (backdrop && backdropRect && backdropRect.width > 0) {
|
|
66
|
+
originLeft = backdropRect.left - this.parsePx(backdrop.style.left);
|
|
67
|
+
originRight = backdropRect.right + this.parsePx(backdrop.style.right);
|
|
68
|
+
}
|
|
69
|
+
if (this.position() === "right") {
|
|
70
|
+
this.backdropInset.set({
|
|
71
|
+
left: null,
|
|
72
|
+
right: Math.max(originRight - rect.left, 0)
|
|
73
|
+
});
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.backdropInset.set({
|
|
77
|
+
left: Math.max(rect.right - originLeft, 0),
|
|
78
|
+
right: null
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
parsePx(value) {
|
|
82
|
+
const parsed = Number.parseFloat(value);
|
|
83
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
84
|
+
}
|
|
85
|
+
entryState = computed(() => {
|
|
86
|
+
const activeIds = this.activeIds();
|
|
87
|
+
const activeUrl = this.activeUrl();
|
|
88
|
+
const openKey = this.openGroup()?.key ?? null;
|
|
89
|
+
return new Map(this.renderedRailItems().map((entry) => {
|
|
90
|
+
const active = this.nav.isItemActive(entry, activeIds, activeUrl);
|
|
91
|
+
const open = openKey === entry.key;
|
|
92
|
+
return [entry, {
|
|
93
|
+
active,
|
|
94
|
+
open,
|
|
95
|
+
triggerClasses: this.computeTriggerClasses(entry, active, open)
|
|
96
|
+
}];
|
|
97
|
+
}));
|
|
98
|
+
}, ...ngDevMode ? [{ debugName: "entryState" }] : /* istanbul ignore next */ []);
|
|
99
|
+
isGroupOpen(entry) {
|
|
100
|
+
return this.entryState().get(entry)?.open ?? false;
|
|
101
|
+
}
|
|
102
|
+
isGroupActive(entry) {
|
|
103
|
+
return this.entryState().get(entry)?.active ?? false;
|
|
104
|
+
}
|
|
105
|
+
triggerClasses(entry) {
|
|
106
|
+
return this.entryState().get(entry)?.triggerClasses ?? "";
|
|
107
|
+
}
|
|
108
|
+
computeTriggerClasses(entry, active, open) {
|
|
109
|
+
return cn("nav-text group/nav inline-flex size-(--nav-rail-item-size) items-center justify-center rounded-md transition-colors", "relative", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", open || active ? "bg-accent text-foreground" : "text-muted-foreground hover:bg-accent/60 hover:text-foreground", entry.classes?.wrapper, this.itemClass());
|
|
110
|
+
}
|
|
111
|
+
toggleGroup(entry) {
|
|
112
|
+
const wasOpen = this.isGroupOpen(entry);
|
|
113
|
+
if (!wasOpen && this.isDrawerMode()) this.measureBackdropInset();
|
|
114
|
+
this.nav.togglePanel(this.navId(), entry);
|
|
115
|
+
if (!this.isDrawerMode()) return;
|
|
116
|
+
if (wasOpen) {
|
|
117
|
+
this.afterRender(() => this.focusTrigger(entry.key));
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this.afterRender(() => {
|
|
121
|
+
this.measureBackdropInset();
|
|
122
|
+
this.focusFirstAsideItem();
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
badgeFor(entry) {
|
|
126
|
+
const sourceKey = entry.badge?.source;
|
|
127
|
+
if (!sourceKey) return null;
|
|
128
|
+
return this.badgeContext()[sourceKey] ?? null;
|
|
129
|
+
}
|
|
130
|
+
badgeClassesFor(entry) {
|
|
131
|
+
return cn("absolute -right-1 -top-1", entry.badge?.classes);
|
|
132
|
+
}
|
|
133
|
+
closeAside() {
|
|
134
|
+
const openKey = this.openGroup()?.key ?? null;
|
|
135
|
+
this.nav.closePanel(this.navId());
|
|
136
|
+
if (openKey !== null) this.afterRender(() => this.focusTrigger(openKey));
|
|
137
|
+
}
|
|
138
|
+
onEscape(event) {
|
|
139
|
+
if (!this.isDrawerMode() || this.openGroup() === null) return;
|
|
140
|
+
event.preventDefault();
|
|
141
|
+
this.closeAside();
|
|
142
|
+
}
|
|
143
|
+
afterRender(callback) {
|
|
144
|
+
afterNextRender({ read: callback }, { injector: this.injector });
|
|
145
|
+
}
|
|
146
|
+
focusFirstAsideItem() {
|
|
147
|
+
(this.host.nativeElement.querySelector(`#${this.asideId()}`)?.querySelector("a[href], button:not([disabled]), [tabindex]:not([tabindex=\"-1\"])"))?.focus();
|
|
148
|
+
}
|
|
149
|
+
focusTrigger(key) {
|
|
150
|
+
const navigationRoot = this.host.nativeElement.closest("[data-navigation-id]") ?? this.host.nativeElement;
|
|
151
|
+
Array.from(navigationRoot.querySelectorAll("[data-navigation-item-key]")).find((candidate) => candidate.getAttribute("data-navigation-item-key") === key && (candidate.hasAttribute("data-navigation-dockbar-trigger") || candidate.hasAttribute("data-navigation-dockbar-route-trigger")))?.focus();
|
|
152
|
+
}
|
|
153
|
+
safeId(value) {
|
|
154
|
+
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-") || "default";
|
|
155
|
+
}
|
|
156
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
157
|
+
minVersion: "12.0.0",
|
|
158
|
+
version: "22.2.0",
|
|
159
|
+
ngImport: i0,
|
|
160
|
+
type: NavigationDockbarMenuComponent,
|
|
161
|
+
deps: [],
|
|
162
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
163
|
+
});
|
|
164
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
165
|
+
minVersion: "17.0.0",
|
|
166
|
+
version: "22.2.0",
|
|
167
|
+
type: NavigationDockbarMenuComponent,
|
|
168
|
+
isStandalone: true,
|
|
169
|
+
selector: "NavigationDockbarMenu",
|
|
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
|
+
railItems: {
|
|
186
|
+
classPropertyName: "railItems",
|
|
187
|
+
publicName: "railItems",
|
|
188
|
+
isSignal: true,
|
|
189
|
+
isRequired: false,
|
|
190
|
+
transformFunction: null
|
|
191
|
+
},
|
|
192
|
+
badgeContext: {
|
|
193
|
+
classPropertyName: "badgeContext",
|
|
194
|
+
publicName: "badgeContext",
|
|
195
|
+
isSignal: true,
|
|
196
|
+
isRequired: false,
|
|
197
|
+
transformFunction: null
|
|
198
|
+
},
|
|
199
|
+
mode: {
|
|
200
|
+
classPropertyName: "mode",
|
|
201
|
+
publicName: "mode",
|
|
202
|
+
isSignal: true,
|
|
203
|
+
isRequired: false,
|
|
204
|
+
transformFunction: null
|
|
205
|
+
},
|
|
206
|
+
position: {
|
|
207
|
+
classPropertyName: "position",
|
|
208
|
+
publicName: "position",
|
|
209
|
+
isSignal: true,
|
|
210
|
+
isRequired: false,
|
|
211
|
+
transformFunction: null
|
|
212
|
+
},
|
|
213
|
+
itemClass: {
|
|
214
|
+
classPropertyName: "itemClass",
|
|
215
|
+
publicName: "itemClass",
|
|
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
|
+
resolvedGroup: {
|
|
235
|
+
classPropertyName: "resolvedGroup",
|
|
236
|
+
publicName: "resolvedGroup",
|
|
237
|
+
isSignal: true,
|
|
238
|
+
isRequired: false,
|
|
239
|
+
transformFunction: null
|
|
240
|
+
},
|
|
241
|
+
iconTemplate: {
|
|
242
|
+
classPropertyName: "iconTemplate",
|
|
243
|
+
publicName: "iconTemplate",
|
|
244
|
+
isSignal: true,
|
|
245
|
+
isRequired: false,
|
|
246
|
+
transformFunction: null
|
|
247
|
+
},
|
|
248
|
+
collapseTree: {
|
|
249
|
+
classPropertyName: "collapseTree",
|
|
250
|
+
publicName: "collapseTree",
|
|
251
|
+
isSignal: true,
|
|
252
|
+
isRequired: false,
|
|
253
|
+
transformFunction: null
|
|
254
|
+
},
|
|
255
|
+
openedIds: {
|
|
256
|
+
classPropertyName: "openedIds",
|
|
257
|
+
publicName: "openedIds",
|
|
258
|
+
isSignal: true,
|
|
259
|
+
isRequired: false,
|
|
260
|
+
transformFunction: null
|
|
261
|
+
},
|
|
262
|
+
asideFooterTemplate: {
|
|
263
|
+
classPropertyName: "asideFooterTemplate",
|
|
264
|
+
publicName: "asideFooterTemplate",
|
|
265
|
+
isSignal: true,
|
|
266
|
+
isRequired: false,
|
|
267
|
+
transformFunction: null
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
outputs: {
|
|
271
|
+
openedIdsChange: "openedIdsChange",
|
|
272
|
+
itemSelected: "itemSelected"
|
|
273
|
+
},
|
|
274
|
+
host: {
|
|
275
|
+
listeners: {
|
|
276
|
+
"keydown.escape": "onEscape($event)",
|
|
277
|
+
"window:resize": "onWindowResize()"
|
|
278
|
+
},
|
|
279
|
+
properties: {
|
|
280
|
+
"class": "hostClasses()",
|
|
281
|
+
"attr.data-mode": "mode()",
|
|
282
|
+
"attr.data-position": "position()"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
ngImport: i0,
|
|
286
|
+
template: `
|
|
287
|
+
<ul [class]="railClasses()" role="list">
|
|
288
|
+
@for (entry of renderedRailItems(); track entry.key) {
|
|
289
|
+
@if (entry.children.length > 0) {
|
|
290
|
+
<li class="flex w-full justify-center">
|
|
291
|
+
<button
|
|
292
|
+
type="button"
|
|
293
|
+
data-navigation-dockbar-trigger="true"
|
|
294
|
+
[class]="triggerClasses(entry)"
|
|
295
|
+
[attr.aria-expanded]="isGroupOpen(entry)"
|
|
296
|
+
[attr.aria-controls]="asideId()"
|
|
297
|
+
[attr.aria-label]="badgeFor(entry) ? null : (entry.tooltip ?? entry.title ?? null)"
|
|
298
|
+
[attr.title]="entry.tooltip ?? entry.title ?? null"
|
|
299
|
+
[Tooltip]="entry.tooltip ?? entry.title ?? ''"
|
|
300
|
+
[TooltipPosition]="tooltipPosition()"
|
|
301
|
+
[attr.data-navigation-item-key]="entry.key"
|
|
302
|
+
[disabled]="entry.disabled || null"
|
|
303
|
+
(click)="toggleGroup(entry)"
|
|
304
|
+
>
|
|
305
|
+
@if (badgeFor(entry)) {
|
|
306
|
+
<span class="sr-only">{{ entry.tooltip ?? entry.title }}</span>
|
|
307
|
+
}
|
|
308
|
+
<NavigationItemContent
|
|
309
|
+
[item]="entry"
|
|
310
|
+
[active]="isGroupActive(entry)"
|
|
311
|
+
[compact]="true"
|
|
312
|
+
orientation="vertical"
|
|
313
|
+
[level]="0"
|
|
314
|
+
[iconTemplate]="iconTemplate()"
|
|
315
|
+
/>
|
|
316
|
+
@if (badgeFor(entry); as badge) {
|
|
317
|
+
<NavigationBadgeCount [badge]="badge" [class]="badgeClassesFor(entry)" />
|
|
318
|
+
}
|
|
319
|
+
</button>
|
|
320
|
+
</li>
|
|
321
|
+
} @else {
|
|
322
|
+
<li
|
|
323
|
+
NavigationItem
|
|
324
|
+
[navId]="navId()"
|
|
325
|
+
[item]="entry"
|
|
326
|
+
[level]="0"
|
|
327
|
+
orientation="vertical"
|
|
328
|
+
[compact]="true"
|
|
329
|
+
[itemClass]="itemClass()"
|
|
330
|
+
[activeIds]="activeIds()"
|
|
331
|
+
[activeUrl]="activeUrl()"
|
|
332
|
+
[iconTemplate]="iconTemplate()"
|
|
333
|
+
[tooltip-position]="tooltipPosition()"
|
|
334
|
+
[collapseTree]="collapseTree()"
|
|
335
|
+
[openedIds]="openedIds()"
|
|
336
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
337
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
338
|
+
></li>
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
</ul>
|
|
342
|
+
|
|
343
|
+
@if (openGroup(); as group) {
|
|
344
|
+
@if (isDrawerMode()) {
|
|
345
|
+
<div
|
|
346
|
+
class="fixed inset-0 z-40 bg-[hsl(var(--overlay-backdrop-strong))]"
|
|
347
|
+
data-navigation-dockbar-backdrop="true"
|
|
348
|
+
aria-hidden="true"
|
|
349
|
+
[style.left.px]="backdropInset().left"
|
|
350
|
+
[style.right.px]="backdropInset().right"
|
|
351
|
+
(click)="closeAside()"
|
|
352
|
+
></div>
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
<!-- Drawer non-modal: rail tetap interaktif di atas backdrop, jadi tanpa aria-modal. -->
|
|
356
|
+
<aside
|
|
357
|
+
[id]="asideId()"
|
|
358
|
+
[class]="asideClasses()"
|
|
359
|
+
data-navigation-dockbar-aside="true"
|
|
360
|
+
[attr.role]="isDrawerMode() ? 'dialog' : null"
|
|
361
|
+
[attr.aria-labelledby]="asideHeadingId()"
|
|
362
|
+
>
|
|
363
|
+
<header
|
|
364
|
+
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-2 border-b border-[hsl(var(--border)/var(--section-border-opacity))] px-4"
|
|
365
|
+
>
|
|
366
|
+
<div class="min-w-0 flex-1">
|
|
367
|
+
<h2 [id]="asideHeadingId()" class="nav-text truncate text-foreground">
|
|
368
|
+
{{ group.title }}
|
|
369
|
+
</h2>
|
|
370
|
+
@if (group.subtitle) {
|
|
371
|
+
<p class="nav-subtitle -mt-0.5 truncate text-muted-foreground">
|
|
372
|
+
{{ group.subtitle }}
|
|
373
|
+
</p>
|
|
374
|
+
}
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
@if (isDrawerMode()) {
|
|
378
|
+
<button
|
|
379
|
+
type="button"
|
|
380
|
+
class="inline-flex size-8 shrink-0 items-center justify-center rounded-md text-foreground/80 transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
381
|
+
data-navigation-dockbar-close="true"
|
|
382
|
+
aria-label="Close navigation panel"
|
|
383
|
+
(click)="closeAside()"
|
|
384
|
+
>
|
|
385
|
+
<Icon name="close" size="inherit" class="text-(length:--nav-icon-size-sub)" />
|
|
386
|
+
</button>
|
|
387
|
+
}
|
|
388
|
+
</header>
|
|
389
|
+
|
|
390
|
+
<div
|
|
391
|
+
class="min-h-0 flex-1 overflow-y-auto px-2 py-3"
|
|
392
|
+
data-navigation-dockbar-aside-scroll="true"
|
|
393
|
+
>
|
|
394
|
+
<NavigationList
|
|
395
|
+
[navId]="navId()"
|
|
396
|
+
[items]="group.children"
|
|
397
|
+
[collapsed]="false"
|
|
398
|
+
position="left"
|
|
399
|
+
[itemClass]="itemClass()"
|
|
400
|
+
[activeIds]="activeIds()"
|
|
401
|
+
[activeUrl]="activeUrl()"
|
|
402
|
+
[iconTemplate]="iconTemplate()"
|
|
403
|
+
[collapseTree]="collapseTree()"
|
|
404
|
+
[openedIds]="openedIds()"
|
|
405
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
406
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
407
|
+
/>
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
@if (asideFooterTemplate(); as asideFooter) {
|
|
411
|
+
<footer
|
|
412
|
+
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-3 border-t border-[hsl(var(--border)/var(--section-border-opacity))] px-3"
|
|
413
|
+
data-navigation-dockbar-aside-footer="true"
|
|
414
|
+
>
|
|
415
|
+
<ng-container [ngTemplateOutlet]="asideFooter" />
|
|
416
|
+
</footer>
|
|
417
|
+
}
|
|
418
|
+
</aside>
|
|
419
|
+
}
|
|
420
|
+
`,
|
|
421
|
+
isInline: true,
|
|
422
|
+
dependencies: [
|
|
423
|
+
{
|
|
424
|
+
kind: "component",
|
|
425
|
+
type: IconComponent,
|
|
426
|
+
selector: "Icon",
|
|
427
|
+
inputs: [
|
|
428
|
+
"name",
|
|
429
|
+
"class",
|
|
430
|
+
"size",
|
|
431
|
+
"fill",
|
|
432
|
+
"weight",
|
|
433
|
+
"grade",
|
|
434
|
+
"opticalSize"
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
kind: "component",
|
|
439
|
+
type: NavigationBadgeCountComponent,
|
|
440
|
+
selector: "NavigationBadgeCount",
|
|
441
|
+
inputs: ["badge", "class"]
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
kind: "component",
|
|
445
|
+
type: NavigationItemComponent,
|
|
446
|
+
selector: "li[NavigationItem]",
|
|
447
|
+
inputs: [
|
|
448
|
+
"navId",
|
|
449
|
+
"item",
|
|
450
|
+
"level",
|
|
451
|
+
"orientation",
|
|
452
|
+
"compact",
|
|
453
|
+
"itemClass",
|
|
454
|
+
"activeIds",
|
|
455
|
+
"activeUrl",
|
|
456
|
+
"iconTemplate",
|
|
457
|
+
"tooltip-position",
|
|
458
|
+
"collapseTree",
|
|
459
|
+
"straightRail",
|
|
460
|
+
"stairsRail",
|
|
461
|
+
"straightRailActive",
|
|
462
|
+
"firstInBranch",
|
|
463
|
+
"lastInBranch",
|
|
464
|
+
"openedIds"
|
|
465
|
+
],
|
|
466
|
+
outputs: ["openedIdsChange", "itemSelected"]
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
kind: "component",
|
|
470
|
+
type: NavigationItemContentComponent,
|
|
471
|
+
selector: "NavigationItemContent",
|
|
472
|
+
inputs: [
|
|
473
|
+
"item",
|
|
474
|
+
"active",
|
|
475
|
+
"compact",
|
|
476
|
+
"orientation",
|
|
477
|
+
"level",
|
|
478
|
+
"iconTemplate"
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
kind: "component",
|
|
483
|
+
type: NavigationListComponent,
|
|
484
|
+
selector: "NavigationList",
|
|
485
|
+
inputs: [
|
|
486
|
+
"navId",
|
|
487
|
+
"items",
|
|
488
|
+
"collapsed",
|
|
489
|
+
"compact",
|
|
490
|
+
"position",
|
|
491
|
+
"itemClass",
|
|
492
|
+
"activeIds",
|
|
493
|
+
"activeUrl",
|
|
494
|
+
"iconTemplate",
|
|
495
|
+
"collapseTree",
|
|
496
|
+
"openedIds"
|
|
497
|
+
],
|
|
498
|
+
outputs: ["openedIdsChange", "itemSelected"]
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
kind: "directive",
|
|
502
|
+
type: NgTemplateOutlet,
|
|
503
|
+
selector: "[ngTemplateOutlet]",
|
|
504
|
+
inputs: [
|
|
505
|
+
"ngTemplateOutletContext",
|
|
506
|
+
"ngTemplateOutlet",
|
|
507
|
+
"ngTemplateOutletInjector"
|
|
508
|
+
]
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
kind: "directive",
|
|
512
|
+
type: TooltipDirective,
|
|
513
|
+
selector: "[Tooltip]",
|
|
514
|
+
inputs: [
|
|
515
|
+
"Tooltip",
|
|
516
|
+
"TooltipPosition",
|
|
517
|
+
"TooltipDisabled",
|
|
518
|
+
"TooltipShowDelay",
|
|
519
|
+
"TooltipHideDelay"
|
|
520
|
+
],
|
|
521
|
+
exportAs: ["Tooltip"]
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
});
|
|
525
|
+
};
|
|
526
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
527
|
+
minVersion: "12.0.0",
|
|
528
|
+
version: "22.2.0",
|
|
529
|
+
ngImport: i0,
|
|
530
|
+
type: NavigationDockbarMenuComponent,
|
|
531
|
+
decorators: [{
|
|
532
|
+
type: Component,
|
|
533
|
+
args: [{
|
|
534
|
+
selector: "NavigationDockbarMenu",
|
|
535
|
+
imports: [
|
|
536
|
+
IconComponent,
|
|
537
|
+
NavigationBadgeCountComponent,
|
|
538
|
+
NavigationItemComponent,
|
|
539
|
+
NavigationItemContentComponent,
|
|
540
|
+
NavigationListComponent,
|
|
541
|
+
NgTemplateOutlet,
|
|
542
|
+
TooltipDirective
|
|
543
|
+
],
|
|
544
|
+
host: {
|
|
545
|
+
"[class]": "hostClasses()",
|
|
546
|
+
"[attr.data-mode]": "mode()",
|
|
547
|
+
"[attr.data-position]": "position()",
|
|
548
|
+
"(keydown.escape)": "onEscape($event)",
|
|
549
|
+
"(window:resize)": "onWindowResize()"
|
|
550
|
+
},
|
|
551
|
+
template: `
|
|
552
|
+
<ul [class]="railClasses()" role="list">
|
|
553
|
+
@for (entry of renderedRailItems(); track entry.key) {
|
|
554
|
+
@if (entry.children.length > 0) {
|
|
555
|
+
<li class="flex w-full justify-center">
|
|
556
|
+
<button
|
|
557
|
+
type="button"
|
|
558
|
+
data-navigation-dockbar-trigger="true"
|
|
559
|
+
[class]="triggerClasses(entry)"
|
|
560
|
+
[attr.aria-expanded]="isGroupOpen(entry)"
|
|
561
|
+
[attr.aria-controls]="asideId()"
|
|
562
|
+
[attr.aria-label]="badgeFor(entry) ? null : (entry.tooltip ?? entry.title ?? null)"
|
|
563
|
+
[attr.title]="entry.tooltip ?? entry.title ?? null"
|
|
564
|
+
[Tooltip]="entry.tooltip ?? entry.title ?? ''"
|
|
565
|
+
[TooltipPosition]="tooltipPosition()"
|
|
566
|
+
[attr.data-navigation-item-key]="entry.key"
|
|
567
|
+
[disabled]="entry.disabled || null"
|
|
568
|
+
(click)="toggleGroup(entry)"
|
|
569
|
+
>
|
|
570
|
+
@if (badgeFor(entry)) {
|
|
571
|
+
<span class="sr-only">{{ entry.tooltip ?? entry.title }}</span>
|
|
572
|
+
}
|
|
573
|
+
<NavigationItemContent
|
|
574
|
+
[item]="entry"
|
|
575
|
+
[active]="isGroupActive(entry)"
|
|
576
|
+
[compact]="true"
|
|
577
|
+
orientation="vertical"
|
|
578
|
+
[level]="0"
|
|
579
|
+
[iconTemplate]="iconTemplate()"
|
|
580
|
+
/>
|
|
581
|
+
@if (badgeFor(entry); as badge) {
|
|
582
|
+
<NavigationBadgeCount [badge]="badge" [class]="badgeClassesFor(entry)" />
|
|
583
|
+
}
|
|
584
|
+
</button>
|
|
585
|
+
</li>
|
|
586
|
+
} @else {
|
|
587
|
+
<li
|
|
588
|
+
NavigationItem
|
|
589
|
+
[navId]="navId()"
|
|
590
|
+
[item]="entry"
|
|
591
|
+
[level]="0"
|
|
592
|
+
orientation="vertical"
|
|
593
|
+
[compact]="true"
|
|
594
|
+
[itemClass]="itemClass()"
|
|
595
|
+
[activeIds]="activeIds()"
|
|
596
|
+
[activeUrl]="activeUrl()"
|
|
597
|
+
[iconTemplate]="iconTemplate()"
|
|
598
|
+
[tooltip-position]="tooltipPosition()"
|
|
599
|
+
[collapseTree]="collapseTree()"
|
|
600
|
+
[openedIds]="openedIds()"
|
|
601
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
602
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
603
|
+
></li>
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
</ul>
|
|
607
|
+
|
|
608
|
+
@if (openGroup(); as group) {
|
|
609
|
+
@if (isDrawerMode()) {
|
|
610
|
+
<div
|
|
611
|
+
class="fixed inset-0 z-40 bg-[hsl(var(--overlay-backdrop-strong))]"
|
|
612
|
+
data-navigation-dockbar-backdrop="true"
|
|
613
|
+
aria-hidden="true"
|
|
614
|
+
[style.left.px]="backdropInset().left"
|
|
615
|
+
[style.right.px]="backdropInset().right"
|
|
616
|
+
(click)="closeAside()"
|
|
617
|
+
></div>
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
<!-- Drawer non-modal: rail tetap interaktif di atas backdrop, jadi tanpa aria-modal. -->
|
|
621
|
+
<aside
|
|
622
|
+
[id]="asideId()"
|
|
623
|
+
[class]="asideClasses()"
|
|
624
|
+
data-navigation-dockbar-aside="true"
|
|
625
|
+
[attr.role]="isDrawerMode() ? 'dialog' : null"
|
|
626
|
+
[attr.aria-labelledby]="asideHeadingId()"
|
|
627
|
+
>
|
|
628
|
+
<header
|
|
629
|
+
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-2 border-b border-[hsl(var(--border)/var(--section-border-opacity))] px-4"
|
|
630
|
+
>
|
|
631
|
+
<div class="min-w-0 flex-1">
|
|
632
|
+
<h2 [id]="asideHeadingId()" class="nav-text truncate text-foreground">
|
|
633
|
+
{{ group.title }}
|
|
634
|
+
</h2>
|
|
635
|
+
@if (group.subtitle) {
|
|
636
|
+
<p class="nav-subtitle -mt-0.5 truncate text-muted-foreground">
|
|
637
|
+
{{ group.subtitle }}
|
|
638
|
+
</p>
|
|
639
|
+
}
|
|
640
|
+
</div>
|
|
641
|
+
|
|
642
|
+
@if (isDrawerMode()) {
|
|
643
|
+
<button
|
|
644
|
+
type="button"
|
|
645
|
+
class="inline-flex size-8 shrink-0 items-center justify-center rounded-md text-foreground/80 transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
646
|
+
data-navigation-dockbar-close="true"
|
|
647
|
+
aria-label="Close navigation panel"
|
|
648
|
+
(click)="closeAside()"
|
|
649
|
+
>
|
|
650
|
+
<Icon name="close" size="inherit" class="text-(length:--nav-icon-size-sub)" />
|
|
651
|
+
</button>
|
|
652
|
+
}
|
|
653
|
+
</header>
|
|
654
|
+
|
|
655
|
+
<div
|
|
656
|
+
class="min-h-0 flex-1 overflow-y-auto px-2 py-3"
|
|
657
|
+
data-navigation-dockbar-aside-scroll="true"
|
|
658
|
+
>
|
|
659
|
+
<NavigationList
|
|
660
|
+
[navId]="navId()"
|
|
661
|
+
[items]="group.children"
|
|
662
|
+
[collapsed]="false"
|
|
663
|
+
position="left"
|
|
664
|
+
[itemClass]="itemClass()"
|
|
665
|
+
[activeIds]="activeIds()"
|
|
666
|
+
[activeUrl]="activeUrl()"
|
|
667
|
+
[iconTemplate]="iconTemplate()"
|
|
668
|
+
[collapseTree]="collapseTree()"
|
|
669
|
+
[openedIds]="openedIds()"
|
|
670
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
671
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
672
|
+
/>
|
|
673
|
+
</div>
|
|
674
|
+
|
|
675
|
+
@if (asideFooterTemplate(); as asideFooter) {
|
|
676
|
+
<footer
|
|
677
|
+
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-3 border-t border-[hsl(var(--border)/var(--section-border-opacity))] px-3"
|
|
678
|
+
data-navigation-dockbar-aside-footer="true"
|
|
679
|
+
>
|
|
680
|
+
<ng-container [ngTemplateOutlet]="asideFooter" />
|
|
681
|
+
</footer>
|
|
682
|
+
}
|
|
683
|
+
</aside>
|
|
684
|
+
}
|
|
685
|
+
`
|
|
686
|
+
}]
|
|
687
|
+
}],
|
|
688
|
+
propDecorators: {
|
|
689
|
+
navId: [{
|
|
690
|
+
type: i0.Input,
|
|
691
|
+
args: [{
|
|
692
|
+
isSignal: true,
|
|
693
|
+
alias: "navId",
|
|
694
|
+
required: false
|
|
695
|
+
}]
|
|
696
|
+
}],
|
|
697
|
+
items: [{
|
|
698
|
+
type: i0.Input,
|
|
699
|
+
args: [{
|
|
700
|
+
isSignal: true,
|
|
701
|
+
alias: "items",
|
|
702
|
+
required: false
|
|
703
|
+
}]
|
|
704
|
+
}],
|
|
705
|
+
railItems: [{
|
|
706
|
+
type: i0.Input,
|
|
707
|
+
args: [{
|
|
708
|
+
isSignal: true,
|
|
709
|
+
alias: "railItems",
|
|
710
|
+
required: false
|
|
711
|
+
}]
|
|
712
|
+
}],
|
|
713
|
+
badgeContext: [{
|
|
714
|
+
type: i0.Input,
|
|
715
|
+
args: [{
|
|
716
|
+
isSignal: true,
|
|
717
|
+
alias: "badgeContext",
|
|
718
|
+
required: false
|
|
719
|
+
}]
|
|
720
|
+
}],
|
|
721
|
+
mode: [{
|
|
722
|
+
type: i0.Input,
|
|
723
|
+
args: [{
|
|
724
|
+
isSignal: true,
|
|
725
|
+
alias: "mode",
|
|
726
|
+
required: false
|
|
727
|
+
}]
|
|
728
|
+
}],
|
|
729
|
+
position: [{
|
|
730
|
+
type: i0.Input,
|
|
731
|
+
args: [{
|
|
732
|
+
isSignal: true,
|
|
733
|
+
alias: "position",
|
|
734
|
+
required: false
|
|
735
|
+
}]
|
|
736
|
+
}],
|
|
737
|
+
itemClass: [{
|
|
738
|
+
type: i0.Input,
|
|
739
|
+
args: [{
|
|
740
|
+
isSignal: true,
|
|
741
|
+
alias: "itemClass",
|
|
742
|
+
required: false
|
|
743
|
+
}]
|
|
744
|
+
}],
|
|
745
|
+
activeIds: [{
|
|
746
|
+
type: i0.Input,
|
|
747
|
+
args: [{
|
|
748
|
+
isSignal: true,
|
|
749
|
+
alias: "activeIds",
|
|
750
|
+
required: false
|
|
751
|
+
}]
|
|
752
|
+
}],
|
|
753
|
+
activeUrl: [{
|
|
754
|
+
type: i0.Input,
|
|
755
|
+
args: [{
|
|
756
|
+
isSignal: true,
|
|
757
|
+
alias: "activeUrl",
|
|
758
|
+
required: false
|
|
759
|
+
}]
|
|
760
|
+
}],
|
|
761
|
+
resolvedGroup: [{
|
|
762
|
+
type: i0.Input,
|
|
763
|
+
args: [{
|
|
764
|
+
isSignal: true,
|
|
765
|
+
alias: "resolvedGroup",
|
|
766
|
+
required: false
|
|
767
|
+
}]
|
|
768
|
+
}],
|
|
769
|
+
iconTemplate: [{
|
|
770
|
+
type: i0.Input,
|
|
771
|
+
args: [{
|
|
772
|
+
isSignal: true,
|
|
773
|
+
alias: "iconTemplate",
|
|
774
|
+
required: false
|
|
775
|
+
}]
|
|
776
|
+
}],
|
|
777
|
+
collapseTree: [{
|
|
778
|
+
type: i0.Input,
|
|
779
|
+
args: [{
|
|
780
|
+
isSignal: true,
|
|
781
|
+
alias: "collapseTree",
|
|
782
|
+
required: false
|
|
783
|
+
}]
|
|
784
|
+
}],
|
|
785
|
+
openedIds: [{
|
|
786
|
+
type: i0.Input,
|
|
787
|
+
args: [{
|
|
788
|
+
isSignal: true,
|
|
789
|
+
alias: "openedIds",
|
|
790
|
+
required: false
|
|
791
|
+
}]
|
|
792
|
+
}],
|
|
793
|
+
asideFooterTemplate: [{
|
|
794
|
+
type: i0.Input,
|
|
795
|
+
args: [{
|
|
796
|
+
isSignal: true,
|
|
797
|
+
alias: "asideFooterTemplate",
|
|
798
|
+
required: false
|
|
799
|
+
}]
|
|
800
|
+
}],
|
|
801
|
+
openedIdsChange: [{
|
|
802
|
+
type: i0.Output,
|
|
803
|
+
args: ["openedIdsChange"]
|
|
804
|
+
}],
|
|
805
|
+
itemSelected: [{
|
|
806
|
+
type: i0.Output,
|
|
807
|
+
args: ["itemSelected"]
|
|
808
|
+
}]
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
export { NavigationDockbarMenuComponent };
|