@ojiepermana/angular 22.2.3 → 22.2.5
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/fesm2022/{ojiepermana-angular-navigation-navigation-badge-count.component-4RIokl1C.mjs → ojiepermana-angular-navigation-navigation-badge-count.component-BYN_Vxm3.mjs} +36 -5
- package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-I-ln7fOq.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-Dlyt6eZr.mjs} +47 -34
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-meQb_EWZ.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-DeF_s1vE.mjs} +35 -20
- package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-DRdw2G-c.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-BOGL8MY0.mjs} +23 -4
- package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-Bx1NcrWO.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-Cb4bHM58.mjs} +29 -4
- package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs → ojiepermana-angular-navigation-navigation-item.component-DLgcJQOC.mjs} +351 -108
- package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-DfG6_3eF.mjs → ojiepermana-angular-navigation-navigation-list.component-BYc3WCt8.mjs} +23 -3
- package/fesm2022/ojiepermana-angular-navigation.mjs +67 -17
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +152 -109
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +216 -79
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +4 -0
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +4 -0
- package/navigation/README.md +92 -3
- package/package.json +2 -2
- package/theme/component/settings/README.md +19 -0
- package/theme/layout/README.md +67 -0
- package/theme/styles/css/base/components.css +20 -0
- package/theme/styles/css/base/tokens.css +6 -0
- package/types/ojiepermana-angular-navigation-types.d.ts +3 -3
- package/types/ojiepermana-angular-navigation.d.ts +16 -0
- package/types/ojiepermana-angular-theme-component-settings.d.ts +18 -1
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +125 -14
|
@@ -3,7 +3,32 @@ import { Component, computed, input, isSignal } from "@angular/core";
|
|
|
3
3
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
4
4
|
import { formatNavigationBadgeCount } from "@ojiepermana/angular/navigation/types";
|
|
5
5
|
import { toObservable, toSignal } from "@angular/core/rxjs-interop";
|
|
6
|
-
import { catchError, isObservable, of, switchMap } from "rxjs";
|
|
6
|
+
import { catchError, isObservable, map, of, switchMap } from "rxjs";
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __exportAll = (all, no_symbols) => {
|
|
12
|
+
let target = {};
|
|
13
|
+
for (var name in all) __defProp(target, name, {
|
|
14
|
+
get: all[name],
|
|
15
|
+
enumerable: true
|
|
16
|
+
});
|
|
17
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
22
|
+
key = keys[i];
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
24
|
+
get: ((k) => from[k]).bind(null, key),
|
|
25
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return to;
|
|
29
|
+
};
|
|
30
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
31
|
+
var navigation_badge_count_component_exports = /* @__PURE__ */ __exportAll({ NavigationBadgeCountComponent: () => NavigationBadgeCountComponent });
|
|
7
32
|
var NavigationBadgeCountComponent = class NavigationBadgeCountComponent {
|
|
8
33
|
badge = input(null, ...ngDevMode ? [{ debugName: "badge" }] : /* istanbul ignore next */ []);
|
|
9
34
|
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
@@ -11,10 +36,16 @@ var NavigationBadgeCountComponent = class NavigationBadgeCountComponent {
|
|
|
11
36
|
const value = this.badge()?.value;
|
|
12
37
|
return isObservable(value) ? value : of(null);
|
|
13
38
|
}, ...ngDevMode ? [{ debugName: "observableSource" }] : /* istanbul ignore next */ []);
|
|
14
|
-
observableValue = toSignal(toObservable(this.observableSource).pipe(switchMap((source) => source.pipe(catchError(() => of(null))
|
|
39
|
+
observableValue = toSignal(toObservable(this.observableSource).pipe(switchMap((source) => source.pipe(catchError(() => of(null)), map((value) => ({
|
|
40
|
+
source,
|
|
41
|
+
value
|
|
42
|
+
}))))), { initialValue: null });
|
|
15
43
|
rawValue() {
|
|
16
44
|
const value = this.badge()?.value;
|
|
17
|
-
if (isObservable(value))
|
|
45
|
+
if (isObservable(value)) {
|
|
46
|
+
const snapshot = this.observableValue();
|
|
47
|
+
return snapshot?.source === value ? snapshot.value : null;
|
|
48
|
+
}
|
|
18
49
|
if (isSignal(value)) return value();
|
|
19
50
|
if (typeof value === "function") return value();
|
|
20
51
|
return value;
|
|
@@ -31,7 +62,7 @@ var NavigationBadgeCountComponent = class NavigationBadgeCountComponent {
|
|
|
31
62
|
accessibleLabel: (typeof label === "function" ? label(count) : label)?.trim() || `${count} items`
|
|
32
63
|
};
|
|
33
64
|
}
|
|
34
|
-
badgeClasses = computed(() => cn("nav-
|
|
65
|
+
badgeClasses = computed(() => cn("nav-count pointer-events-none ml-auto inline-flex shrink-0 items-center justify-center self-center rounded-full bg-destructive text-destructive-foreground", this.badge()?.classes, this.class()), ...ngDevMode ? [{ debugName: "badgeClasses" }] : /* istanbul ignore next */ []);
|
|
35
66
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
36
67
|
minVersion: "12.0.0",
|
|
37
68
|
version: "22.2.3",
|
|
@@ -126,4 +157,4 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
126
157
|
}]
|
|
127
158
|
}
|
|
128
159
|
});
|
|
129
|
-
export { NavigationBadgeCountComponent };
|
|
160
|
+
export { __reExport as i, navigation_badge_count_component_exports as n, __exportAll as r, NavigationBadgeCountComponent as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { NavigationBadgeCountComponent } from "./ojiepermana-angular-navigation-navigation-badge-count.component-4RIokl1C.mjs";
|
|
1
|
+
import { n as NAVIGATION_SHELL, t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-BYc3WCt8.mjs";
|
|
2
|
+
import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DLgcJQOC.mjs";
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
import { Component, ElementRef, Injector, afterNextRender, computed, inject, input, output, signal } from "@angular/core";
|
|
6
5
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
@@ -14,6 +13,8 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
14
13
|
nav = inject(NAVIGATION_ADAPTER);
|
|
15
14
|
host = inject(ElementRef);
|
|
16
15
|
injector = inject(Injector);
|
|
16
|
+
shell = inject(NAVIGATION_SHELL, { optional: true });
|
|
17
|
+
asideFooterInjector = this.createAsideFooterInjector();
|
|
17
18
|
navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
|
|
18
19
|
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
19
20
|
railItems = input(null, ...ngDevMode ? [{ debugName: "railItems" }] : /* istanbul ignore next */ []);
|
|
@@ -123,14 +124,6 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
123
124
|
this.focusFirstAsideItem();
|
|
124
125
|
});
|
|
125
126
|
}
|
|
126
|
-
badgeFor(entry) {
|
|
127
|
-
const sourceKey = entry.badge?.source;
|
|
128
|
-
if (!sourceKey) return null;
|
|
129
|
-
return this.badgeContext()[sourceKey] ?? null;
|
|
130
|
-
}
|
|
131
|
-
badgeClassesFor(entry) {
|
|
132
|
-
return cn("absolute -right-1 -top-1", entry.badge?.classes);
|
|
133
|
-
}
|
|
134
127
|
closeAside() {
|
|
135
128
|
const openKey = this.openGroup()?.key ?? null;
|
|
136
129
|
this.nav.closePanel(this.navId());
|
|
@@ -154,6 +147,26 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
154
147
|
safeId(value) {
|
|
155
148
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-") || "default";
|
|
156
149
|
}
|
|
150
|
+
createAsideFooterInjector() {
|
|
151
|
+
const shell = this.shell;
|
|
152
|
+
if (!shell) return this.injector;
|
|
153
|
+
const expanded = {
|
|
154
|
+
state: shell.state,
|
|
155
|
+
displayState: computed(() => ({
|
|
156
|
+
...shell.displayState(),
|
|
157
|
+
collapsed: false
|
|
158
|
+
})),
|
|
159
|
+
collapseEnabled: shell.collapseEnabled,
|
|
160
|
+
toggleCollapsed: () => shell.toggleCollapsed()
|
|
161
|
+
};
|
|
162
|
+
return Injector.create({
|
|
163
|
+
providers: [{
|
|
164
|
+
provide: NAVIGATION_SHELL,
|
|
165
|
+
useValue: expanded
|
|
166
|
+
}],
|
|
167
|
+
parent: this.injector
|
|
168
|
+
});
|
|
169
|
+
}
|
|
157
170
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
158
171
|
minVersion: "12.0.0",
|
|
159
172
|
version: "22.2.3",
|
|
@@ -298,7 +311,9 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
298
311
|
[class]="triggerClasses(entry)"
|
|
299
312
|
[attr.aria-expanded]="isGroupOpen(entry)"
|
|
300
313
|
[attr.aria-controls]="asideId()"
|
|
301
|
-
[attr.aria-label]="
|
|
314
|
+
[attr.aria-label]="
|
|
315
|
+
entry.badge?.source ? null : (entry.tooltip ?? entry.title ?? null)
|
|
316
|
+
"
|
|
302
317
|
[attr.title]="isGroupOpen(entry) ? null : (entry.tooltip ?? entry.title ?? null)"
|
|
303
318
|
[Tooltip]="entry.tooltip ?? entry.title ?? ''"
|
|
304
319
|
[TooltipPosition]="tooltipPosition()"
|
|
@@ -307,20 +322,15 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
307
322
|
[disabled]="entry.disabled || null"
|
|
308
323
|
(click)="toggleGroup(entry)"
|
|
309
324
|
>
|
|
310
|
-
@if (badgeFor(entry)) {
|
|
311
|
-
<span class="sr-only">{{ entry.tooltip ?? entry.title }}</span>
|
|
312
|
-
}
|
|
313
325
|
<NavigationItemContent
|
|
314
326
|
[item]="entry"
|
|
315
327
|
[active]="isGroupActive(entry)"
|
|
316
328
|
[compact]="true"
|
|
317
329
|
orientation="vertical"
|
|
318
330
|
[level]="0"
|
|
331
|
+
[badgeContext]="badgeContext()"
|
|
319
332
|
[iconTemplate]="iconTemplate()"
|
|
320
333
|
/>
|
|
321
|
-
@if (badgeFor(entry); as badge) {
|
|
322
|
-
<NavigationBadgeCount [badge]="badge" [class]="badgeClassesFor(entry)" />
|
|
323
|
-
}
|
|
324
334
|
</button>
|
|
325
335
|
</li>
|
|
326
336
|
} @else {
|
|
@@ -334,6 +344,7 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
334
344
|
[itemClass]="itemClass()"
|
|
335
345
|
[activeIds]="activeIds()"
|
|
336
346
|
[activeUrl]="activeUrl()"
|
|
347
|
+
[badgeContext]="badgeContext()"
|
|
337
348
|
[iconTemplate]="iconTemplate()"
|
|
338
349
|
[tooltip-position]="tooltipPosition()"
|
|
339
350
|
[collapseTree]="collapseTree()"
|
|
@@ -404,6 +415,7 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
404
415
|
[itemClass]="itemClass()"
|
|
405
416
|
[activeIds]="activeIds()"
|
|
406
417
|
[activeUrl]="activeUrl()"
|
|
418
|
+
[badgeContext]="badgeContext()"
|
|
407
419
|
[iconTemplate]="iconTemplate()"
|
|
408
420
|
[collapseTree]="collapseTree()"
|
|
409
421
|
[openedIds]="openedIds()"
|
|
@@ -417,7 +429,10 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
417
429
|
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-3 border-t border-[hsl(var(--border)/var(--section-border-opacity))] px-3"
|
|
418
430
|
data-navigation-dockbar-aside-footer="true"
|
|
419
431
|
>
|
|
420
|
-
<ng-container
|
|
432
|
+
<ng-container
|
|
433
|
+
[ngTemplateOutlet]="asideFooter"
|
|
434
|
+
[ngTemplateOutletInjector]="asideFooterInjector"
|
|
435
|
+
/>
|
|
421
436
|
</footer>
|
|
422
437
|
}
|
|
423
438
|
</aside>
|
|
@@ -437,17 +452,12 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
437
452
|
"label"
|
|
438
453
|
]
|
|
439
454
|
},
|
|
440
|
-
{
|
|
441
|
-
kind: "component",
|
|
442
|
-
type: NavigationBadgeCountComponent,
|
|
443
|
-
selector: "NavigationBadgeCount",
|
|
444
|
-
inputs: ["badge", "class"]
|
|
445
|
-
},
|
|
446
455
|
{
|
|
447
456
|
kind: "component",
|
|
448
457
|
type: NavigationItemComponent,
|
|
449
458
|
selector: "li[NavigationItem]",
|
|
450
459
|
inputs: [
|
|
460
|
+
"badgeContext",
|
|
451
461
|
"navId",
|
|
452
462
|
"item",
|
|
453
463
|
"level",
|
|
@@ -473,6 +483,7 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
473
483
|
type: NavigationItemContentComponent,
|
|
474
484
|
selector: "NavigationItemContent",
|
|
475
485
|
inputs: [
|
|
486
|
+
"badgeContext",
|
|
476
487
|
"item",
|
|
477
488
|
"active",
|
|
478
489
|
"compact",
|
|
@@ -486,6 +497,7 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
486
497
|
type: NavigationListComponent,
|
|
487
498
|
selector: "NavigationList",
|
|
488
499
|
inputs: [
|
|
500
|
+
"badgeContext",
|
|
489
501
|
"navId",
|
|
490
502
|
"items",
|
|
491
503
|
"collapsed",
|
|
@@ -538,7 +550,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
538
550
|
selector: "NavigationDockbarMenu",
|
|
539
551
|
imports: [
|
|
540
552
|
IconComponent,
|
|
541
|
-
NavigationBadgeCountComponent,
|
|
542
553
|
NavigationItemComponent,
|
|
543
554
|
NavigationItemContentComponent,
|
|
544
555
|
NavigationListComponent,
|
|
@@ -566,7 +577,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
566
577
|
[class]="triggerClasses(entry)"
|
|
567
578
|
[attr.aria-expanded]="isGroupOpen(entry)"
|
|
568
579
|
[attr.aria-controls]="asideId()"
|
|
569
|
-
[attr.aria-label]="
|
|
580
|
+
[attr.aria-label]="
|
|
581
|
+
entry.badge?.source ? null : (entry.tooltip ?? entry.title ?? null)
|
|
582
|
+
"
|
|
570
583
|
[attr.title]="isGroupOpen(entry) ? null : (entry.tooltip ?? entry.title ?? null)"
|
|
571
584
|
[Tooltip]="entry.tooltip ?? entry.title ?? ''"
|
|
572
585
|
[TooltipPosition]="tooltipPosition()"
|
|
@@ -575,20 +588,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
575
588
|
[disabled]="entry.disabled || null"
|
|
576
589
|
(click)="toggleGroup(entry)"
|
|
577
590
|
>
|
|
578
|
-
@if (badgeFor(entry)) {
|
|
579
|
-
<span class="sr-only">{{ entry.tooltip ?? entry.title }}</span>
|
|
580
|
-
}
|
|
581
591
|
<NavigationItemContent
|
|
582
592
|
[item]="entry"
|
|
583
593
|
[active]="isGroupActive(entry)"
|
|
584
594
|
[compact]="true"
|
|
585
595
|
orientation="vertical"
|
|
586
596
|
[level]="0"
|
|
597
|
+
[badgeContext]="badgeContext()"
|
|
587
598
|
[iconTemplate]="iconTemplate()"
|
|
588
599
|
/>
|
|
589
|
-
@if (badgeFor(entry); as badge) {
|
|
590
|
-
<NavigationBadgeCount [badge]="badge" [class]="badgeClassesFor(entry)" />
|
|
591
|
-
}
|
|
592
600
|
</button>
|
|
593
601
|
</li>
|
|
594
602
|
} @else {
|
|
@@ -602,6 +610,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
602
610
|
[itemClass]="itemClass()"
|
|
603
611
|
[activeIds]="activeIds()"
|
|
604
612
|
[activeUrl]="activeUrl()"
|
|
613
|
+
[badgeContext]="badgeContext()"
|
|
605
614
|
[iconTemplate]="iconTemplate()"
|
|
606
615
|
[tooltip-position]="tooltipPosition()"
|
|
607
616
|
[collapseTree]="collapseTree()"
|
|
@@ -672,6 +681,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
672
681
|
[itemClass]="itemClass()"
|
|
673
682
|
[activeIds]="activeIds()"
|
|
674
683
|
[activeUrl]="activeUrl()"
|
|
684
|
+
[badgeContext]="badgeContext()"
|
|
675
685
|
[iconTemplate]="iconTemplate()"
|
|
676
686
|
[collapseTree]="collapseTree()"
|
|
677
687
|
[openedIds]="openedIds()"
|
|
@@ -685,7 +695,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
685
695
|
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-3 border-t border-[hsl(var(--border)/var(--section-border-opacity))] px-3"
|
|
686
696
|
data-navigation-dockbar-aside-footer="true"
|
|
687
697
|
>
|
|
688
|
-
<ng-container
|
|
698
|
+
<ng-container
|
|
699
|
+
[ngTemplateOutlet]="asideFooter"
|
|
700
|
+
[ngTemplateOutletInjector]="asideFooterInjector"
|
|
701
|
+
/>
|
|
689
702
|
</footer>
|
|
690
703
|
}
|
|
691
704
|
</aside>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as navigationPanelId, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-
|
|
1
|
+
import { i as NavigationItemBadgeComponent, n as navigationPanelId, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DLgcJQOC.mjs";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { Component, computed, inject, input, output, signal } from "@angular/core";
|
|
4
4
|
import { ActivatedRoute, Router, RouterLink } from "@angular/router";
|
|
@@ -12,6 +12,7 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
12
12
|
routeContext = inject(NAVIGATION_ROUTE_CONTEXT_ADAPTER);
|
|
13
13
|
router = inject(Router, { optional: true });
|
|
14
14
|
activatedRoute = inject(ActivatedRoute, { optional: true });
|
|
15
|
+
badgeContext = input({}, ...ngDevMode ? [{ debugName: "badgeContext" }] : /* istanbul ignore next */ []);
|
|
15
16
|
navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
|
|
16
17
|
branch = input.required(...ngDevMode ? [{ debugName: "branch" }] : /* istanbul ignore next */ []);
|
|
17
18
|
typeStyle = input("flat", ...ngDevMode ? [{ debugName: "typeStyle" }] : /* istanbul ignore next */ []);
|
|
@@ -132,6 +133,13 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
132
133
|
isStandalone: true,
|
|
133
134
|
selector: "NavigationEntryGrid",
|
|
134
135
|
inputs: {
|
|
136
|
+
badgeContext: {
|
|
137
|
+
classPropertyName: "badgeContext",
|
|
138
|
+
publicName: "badgeContext",
|
|
139
|
+
isSignal: true,
|
|
140
|
+
isRequired: false,
|
|
141
|
+
transformFunction: null
|
|
142
|
+
},
|
|
135
143
|
navId: {
|
|
136
144
|
classPropertyName: "navId",
|
|
137
145
|
publicName: "navId",
|
|
@@ -261,6 +269,7 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
261
269
|
[itemClass]="navItemClass()"
|
|
262
270
|
[activeIds]="activeIds()"
|
|
263
271
|
[activeUrl]="activeUrl()"
|
|
272
|
+
[badgeContext]="badgeContext()"
|
|
264
273
|
[iconTemplate]="iconTemplate()"
|
|
265
274
|
[collapseTree]="collapseTree()"
|
|
266
275
|
[openedIds]="openedIds()"
|
|
@@ -402,15 +411,7 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
402
411
|
}
|
|
403
412
|
</span>
|
|
404
413
|
|
|
405
|
-
|
|
406
|
-
<span
|
|
407
|
-
[class]="
|
|
408
|
-
child.badge?.classes ??
|
|
409
|
-
'nav-badge inline-flex h-5 shrink-0 items-center self-center rounded-full bg-muted px-2 text-muted-foreground'
|
|
410
|
-
"
|
|
411
|
-
>{{ badgeTitle }}</span
|
|
412
|
-
>
|
|
413
|
-
}
|
|
414
|
+
<NavigationItemBadge [itemBadge]="child.badge" [badgeContext]="badgeContext()" />
|
|
414
415
|
</ng-template>
|
|
415
416
|
`,
|
|
416
417
|
isInline: true,
|
|
@@ -461,6 +462,7 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
461
462
|
type: NavigationItemComponent,
|
|
462
463
|
selector: "li[NavigationItem]",
|
|
463
464
|
inputs: [
|
|
465
|
+
"badgeContext",
|
|
464
466
|
"navId",
|
|
465
467
|
"item",
|
|
466
468
|
"level",
|
|
@@ -480,6 +482,17 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
480
482
|
"openedIds"
|
|
481
483
|
],
|
|
482
484
|
outputs: ["openedIdsChange", "itemSelected"]
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
kind: "component",
|
|
488
|
+
type: NavigationItemBadgeComponent,
|
|
489
|
+
selector: "NavigationItemBadge",
|
|
490
|
+
inputs: [
|
|
491
|
+
"staticClass",
|
|
492
|
+
"compact",
|
|
493
|
+
"itemBadge",
|
|
494
|
+
"badgeContext"
|
|
495
|
+
]
|
|
483
496
|
}
|
|
484
497
|
]
|
|
485
498
|
});
|
|
@@ -497,7 +510,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
497
510
|
NgTemplateOutlet,
|
|
498
511
|
RouterLink,
|
|
499
512
|
IconComponent,
|
|
500
|
-
NavigationItemComponent
|
|
513
|
+
NavigationItemComponent,
|
|
514
|
+
NavigationItemBadgeComponent
|
|
501
515
|
],
|
|
502
516
|
providers: [provideIcons(LucideChevronRight)],
|
|
503
517
|
host: { class: "contents" },
|
|
@@ -559,6 +573,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
559
573
|
[itemClass]="navItemClass()"
|
|
560
574
|
[activeIds]="activeIds()"
|
|
561
575
|
[activeUrl]="activeUrl()"
|
|
576
|
+
[badgeContext]="badgeContext()"
|
|
562
577
|
[iconTemplate]="iconTemplate()"
|
|
563
578
|
[collapseTree]="collapseTree()"
|
|
564
579
|
[openedIds]="openedIds()"
|
|
@@ -700,20 +715,20 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
700
715
|
}
|
|
701
716
|
</span>
|
|
702
717
|
|
|
703
|
-
|
|
704
|
-
<span
|
|
705
|
-
[class]="
|
|
706
|
-
child.badge?.classes ??
|
|
707
|
-
'nav-badge inline-flex h-5 shrink-0 items-center self-center rounded-full bg-muted px-2 text-muted-foreground'
|
|
708
|
-
"
|
|
709
|
-
>{{ badgeTitle }}</span
|
|
710
|
-
>
|
|
711
|
-
}
|
|
718
|
+
<NavigationItemBadge [itemBadge]="child.badge" [badgeContext]="badgeContext()" />
|
|
712
719
|
</ng-template>
|
|
713
720
|
`
|
|
714
721
|
}]
|
|
715
722
|
}],
|
|
716
723
|
propDecorators: {
|
|
724
|
+
badgeContext: [{
|
|
725
|
+
type: i0.Input,
|
|
726
|
+
args: [{
|
|
727
|
+
isSignal: true,
|
|
728
|
+
alias: "badgeContext",
|
|
729
|
+
required: false
|
|
730
|
+
}]
|
|
731
|
+
}],
|
|
717
732
|
navId: [{
|
|
718
733
|
type: i0.Input,
|
|
719
734
|
args: [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-
|
|
2
|
-
import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-
|
|
1
|
+
import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DLgcJQOC.mjs";
|
|
2
|
+
import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-DeF_s1vE.mjs";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import { Component, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal } from "@angular/core";
|
|
5
5
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
@@ -12,6 +12,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
12
12
|
host = inject(ElementRef);
|
|
13
13
|
injector = inject(Injector);
|
|
14
14
|
document = inject(DOCUMENT);
|
|
15
|
+
badgeContext = input({}, ...ngDevMode ? [{ debugName: "badgeContext" }] : /* istanbul ignore next */ []);
|
|
15
16
|
navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
|
|
16
17
|
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
17
18
|
label = input("Menu", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
@@ -213,6 +214,13 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
213
214
|
isStandalone: true,
|
|
214
215
|
selector: "NavigationFlyoutMenu",
|
|
215
216
|
inputs: {
|
|
217
|
+
badgeContext: {
|
|
218
|
+
classPropertyName: "badgeContext",
|
|
219
|
+
publicName: "badgeContext",
|
|
220
|
+
isSignal: true,
|
|
221
|
+
isRequired: false,
|
|
222
|
+
transformFunction: null
|
|
223
|
+
},
|
|
216
224
|
navId: {
|
|
217
225
|
classPropertyName: "navId",
|
|
218
226
|
publicName: "navId",
|
|
@@ -371,7 +379,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
371
379
|
},
|
|
372
380
|
providers: [provideIcons(LucideChevronRight, LucideMenu)],
|
|
373
381
|
ngImport: i0,
|
|
374
|
-
template: "<button\n type=\"button\"\n data-navigation-flyout-trigger=\"true\"\n [class]=\"triggerClasses()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId() : null\"\n [attr.aria-label]=\"showIconOnly() ? label() : null\"\n [attr.title]=\"showIconOnly() ? label() : null\"\n (click)=\"toggleFlyout()\"\n>\n @if (showIconOnly()) {\n <Icon\n [name]=\"triggerIcon() ?? 'menu'\"\n size=\"inherit\"\n class=\"text-(length:--nav-icon-size) text-current\"\n />\n } @else {\n @if (iconPosition() === 'start' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n\n <span class=\"truncate\">{{ label() }}</span>\n\n @if (iconPosition() === 'end' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n }\n</button>\n\n@if (isOpen()) {\n <div\n [id]=\"panelId()\"\n data-navigation-flyout-panel=\"true\"\n [attr.data-navigation-flyout-floating]=\"floating() ? 'true' : null\"\n [class]=\"panelWrapperClasses()\"\n [style.left.px]=\"floating() ? null : panelPlacement()?.left\"\n [style.top.px]=\"floating() || isBottom() ? null : panelPlacement()?.top\"\n [style.bottom.px]=\"!floating() && isBottom() ? panelPlacement()?.bottom : null\"\n [style.width.px]=\"floating() ? null : panelPlacement()?.width\"\n >\n <div\n [attr.data-navigation-flyout-floating-card]=\"floating() ? 'true' : null\"\n [class]=\"panelCardClasses()\"\n >\n <div data-navigation-flyout-menu-layout=\"true\" [class]=\"menuClasses()\">\n <!-- ROW 1 = bar (sticky, menutup bar trigger), struktur seperti bar navbar:\n Header (kiri) | menu item (tengah) | Footer (kanan). Hanya ROW 2 (grid child)\n di bawah bar yang ikut scroll. -->\n <div data-navigation-flyout-bar=\"true\" [class]=\"barRowClasses()\">\n <ng-content select=\"NavigationHeader\" />\n\n <ul\n role=\"menu\"\n tabindex=\"-1\"\n data-navigation-flyout-row=\"true\"\n [class]=\"rowClasses()\"\n [attr.aria-label]=\"label()\"\n (keydown)=\"onRowKeydown($event)\"\n >\n @for (item of items(); track item.key) {\n @switch (item.type) {\n @case ('divider') {\n <li role=\"separator\" class=\"mx-1 h-5 w-px bg-border\"></li>\n }\n @case ('spacer') {\n <li role=\"none\" aria-hidden=\"true\" class=\"flex-1\"></li>\n }\n @default {\n @if (item.children.length > 0) {\n <li\n role=\"none\"\n [class]=\"groupContainerClasses(item)\"\n [attr.data-navigation-item-key]=\"item.key\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n data-navigation-flyout-tab=\"true\"\n [class]=\"tabClasses(item)\"\n [attr.aria-expanded]=\"isBranchOpen(item)\"\n [attr.aria-controls]=\"isBranchOpen(item) ? panelContentId() : null\"\n [disabled]=\"item.disabled || null\"\n (click)=\"openBranch(item)\"\n >\n <NavigationItemContent\n [item]=\"item\"\n [active]=\"isItemActive(item)\"\n [compact]=\"false\"\n [orientation]=\"'horizontal'\"\n [level]=\"0\"\n [iconTemplate]=\"iconTemplate()\"\n />\n <Icon\n name=\"chevron-right\"\n size=\"inherit\"\n [class]=\"tabChevronClasses(item)\"\n />\n </button>\n </li>\n } @else {\n <li\n NavigationItem\n [navId]=\"navId()\"\n [item]=\"item\"\n [level]=\"0\"\n [orientation]=\"'horizontal'\"\n [compact]=\"false\"\n [itemClass]=\"navItemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n ></li>\n }\n }\n }\n }\n </ul>\n\n <ng-content select=\"NavigationFooter\" />\n </div>\n\n <!-- ROW 2 = child dari menu item aktif; HANYA area ini yang men-scroll. -->\n <div\n [id]=\"panelContentId()\"\n data-navigation-flyout-scroll=\"true\"\n [attr.role]=\"activeBranch() ? 'menu' : null\"\n [attr.aria-label]=\"activeBranch()?.title || null\"\n [class]=\"scrollRegionClasses()\"\n >\n @if (activeBranch(); as branch) {\n <NavigationEntryGrid\n [navId]=\"navId()\"\n [branch]=\"branch\"\n [typeStyle]=\"typeStyle()\"\n [itemClass]=\"itemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n />\n }\n </div>\n </div>\n </div>\n </div>\n}\n",
|
|
382
|
+
template: "<button\n type=\"button\"\n data-navigation-flyout-trigger=\"true\"\n [class]=\"triggerClasses()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId() : null\"\n [attr.aria-label]=\"showIconOnly() ? label() : null\"\n [attr.title]=\"showIconOnly() ? label() : null\"\n (click)=\"toggleFlyout()\"\n>\n @if (showIconOnly()) {\n <Icon\n [name]=\"triggerIcon() ?? 'menu'\"\n size=\"inherit\"\n class=\"text-(length:--nav-icon-size) text-current\"\n />\n } @else {\n @if (iconPosition() === 'start' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n\n <span class=\"truncate\">{{ label() }}</span>\n\n @if (iconPosition() === 'end' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n }\n</button>\n\n@if (isOpen()) {\n <div\n [id]=\"panelId()\"\n data-navigation-flyout-panel=\"true\"\n [attr.data-navigation-flyout-floating]=\"floating() ? 'true' : null\"\n [class]=\"panelWrapperClasses()\"\n [style.left.px]=\"floating() ? null : panelPlacement()?.left\"\n [style.top.px]=\"floating() || isBottom() ? null : panelPlacement()?.top\"\n [style.bottom.px]=\"!floating() && isBottom() ? panelPlacement()?.bottom : null\"\n [style.width.px]=\"floating() ? null : panelPlacement()?.width\"\n >\n <div\n [attr.data-navigation-flyout-floating-card]=\"floating() ? 'true' : null\"\n [class]=\"panelCardClasses()\"\n >\n <div data-navigation-flyout-menu-layout=\"true\" [class]=\"menuClasses()\">\n <!-- ROW 1 = bar (sticky, menutup bar trigger), struktur seperti bar navbar:\n Header (kiri) | menu item (tengah) | Footer (kanan). Hanya ROW 2 (grid child)\n di bawah bar yang ikut scroll. -->\n <div data-navigation-flyout-bar=\"true\" [class]=\"barRowClasses()\">\n <ng-content select=\"NavigationHeader\" />\n\n <ul\n role=\"menu\"\n tabindex=\"-1\"\n data-navigation-flyout-row=\"true\"\n [class]=\"rowClasses()\"\n [attr.aria-label]=\"label()\"\n (keydown)=\"onRowKeydown($event)\"\n >\n @for (item of items(); track item.key) {\n @switch (item.type) {\n @case ('divider') {\n <li role=\"separator\" class=\"mx-1 h-5 w-px bg-border\"></li>\n }\n @case ('spacer') {\n <li role=\"none\" aria-hidden=\"true\" class=\"flex-1\"></li>\n }\n @default {\n @if (item.children.length > 0) {\n <li\n role=\"none\"\n [class]=\"groupContainerClasses(item)\"\n [attr.data-navigation-item-key]=\"item.key\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n data-navigation-flyout-tab=\"true\"\n [class]=\"tabClasses(item)\"\n [attr.aria-expanded]=\"isBranchOpen(item)\"\n [attr.aria-controls]=\"isBranchOpen(item) ? panelContentId() : null\"\n [disabled]=\"item.disabled || null\"\n (click)=\"openBranch(item)\"\n >\n <NavigationItemContent\n [item]=\"item\"\n [active]=\"isItemActive(item)\"\n [compact]=\"false\"\n [orientation]=\"'horizontal'\"\n [level]=\"0\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n />\n <Icon\n name=\"chevron-right\"\n size=\"inherit\"\n [class]=\"tabChevronClasses(item)\"\n />\n </button>\n </li>\n } @else {\n <li\n NavigationItem\n [navId]=\"navId()\"\n [item]=\"item\"\n [level]=\"0\"\n [orientation]=\"'horizontal'\"\n [compact]=\"false\"\n [itemClass]=\"navItemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n ></li>\n }\n }\n }\n }\n </ul>\n\n <ng-content select=\"NavigationFooter\" />\n </div>\n\n <!-- ROW 2 = child dari menu item aktif; HANYA area ini yang men-scroll. -->\n <div\n [id]=\"panelContentId()\"\n data-navigation-flyout-scroll=\"true\"\n [attr.role]=\"activeBranch() ? 'menu' : null\"\n [attr.aria-label]=\"activeBranch()?.title || null\"\n [class]=\"scrollRegionClasses()\"\n >\n @if (activeBranch(); as branch) {\n <NavigationEntryGrid\n [navId]=\"navId()\"\n [branch]=\"branch\"\n [typeStyle]=\"typeStyle()\"\n [itemClass]=\"itemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n />\n }\n </div>\n </div>\n </div>\n </div>\n}\n",
|
|
375
383
|
styles: ["[data-navigation-flyout-floating=true]{width:var(--nav-flyout-floating-width, min(22rem, 85vw));max-width:var(--nav-flyout-floating-max-width, 85vw)}[data-navigation-flyout-floating-card=true]{border-radius:var(--nav-flyout-floating-radius, var(--radius-xl))}[data-navigation-flyout-panel=true]{-webkit-app-region:no-drag;app-region:no-drag}\n"],
|
|
376
384
|
dependencies: [
|
|
377
385
|
{
|
|
@@ -391,6 +399,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
391
399
|
type: NavigationEntryGridComponent,
|
|
392
400
|
selector: "NavigationEntryGrid",
|
|
393
401
|
inputs: [
|
|
402
|
+
"badgeContext",
|
|
394
403
|
"navId",
|
|
395
404
|
"branch",
|
|
396
405
|
"typeStyle",
|
|
@@ -408,6 +417,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
408
417
|
type: NavigationItemComponent,
|
|
409
418
|
selector: "li[NavigationItem]",
|
|
410
419
|
inputs: [
|
|
420
|
+
"badgeContext",
|
|
411
421
|
"navId",
|
|
412
422
|
"item",
|
|
413
423
|
"level",
|
|
@@ -433,6 +443,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
433
443
|
type: NavigationItemContentComponent,
|
|
434
444
|
selector: "NavigationItemContent",
|
|
435
445
|
inputs: [
|
|
446
|
+
"badgeContext",
|
|
436
447
|
"item",
|
|
437
448
|
"active",
|
|
438
449
|
"compact",
|
|
@@ -464,12 +475,20 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
464
475
|
"[class]": "hostClasses()",
|
|
465
476
|
"(keydown.escape)": "onEscape($event)"
|
|
466
477
|
},
|
|
467
|
-
template: "<button\n type=\"button\"\n data-navigation-flyout-trigger=\"true\"\n [class]=\"triggerClasses()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId() : null\"\n [attr.aria-label]=\"showIconOnly() ? label() : null\"\n [attr.title]=\"showIconOnly() ? label() : null\"\n (click)=\"toggleFlyout()\"\n>\n @if (showIconOnly()) {\n <Icon\n [name]=\"triggerIcon() ?? 'menu'\"\n size=\"inherit\"\n class=\"text-(length:--nav-icon-size) text-current\"\n />\n } @else {\n @if (iconPosition() === 'start' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n\n <span class=\"truncate\">{{ label() }}</span>\n\n @if (iconPosition() === 'end' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n }\n</button>\n\n@if (isOpen()) {\n <div\n [id]=\"panelId()\"\n data-navigation-flyout-panel=\"true\"\n [attr.data-navigation-flyout-floating]=\"floating() ? 'true' : null\"\n [class]=\"panelWrapperClasses()\"\n [style.left.px]=\"floating() ? null : panelPlacement()?.left\"\n [style.top.px]=\"floating() || isBottom() ? null : panelPlacement()?.top\"\n [style.bottom.px]=\"!floating() && isBottom() ? panelPlacement()?.bottom : null\"\n [style.width.px]=\"floating() ? null : panelPlacement()?.width\"\n >\n <div\n [attr.data-navigation-flyout-floating-card]=\"floating() ? 'true' : null\"\n [class]=\"panelCardClasses()\"\n >\n <div data-navigation-flyout-menu-layout=\"true\" [class]=\"menuClasses()\">\n <!-- ROW 1 = bar (sticky, menutup bar trigger), struktur seperti bar navbar:\n Header (kiri) | menu item (tengah) | Footer (kanan). Hanya ROW 2 (grid child)\n di bawah bar yang ikut scroll. -->\n <div data-navigation-flyout-bar=\"true\" [class]=\"barRowClasses()\">\n <ng-content select=\"NavigationHeader\" />\n\n <ul\n role=\"menu\"\n tabindex=\"-1\"\n data-navigation-flyout-row=\"true\"\n [class]=\"rowClasses()\"\n [attr.aria-label]=\"label()\"\n (keydown)=\"onRowKeydown($event)\"\n >\n @for (item of items(); track item.key) {\n @switch (item.type) {\n @case ('divider') {\n <li role=\"separator\" class=\"mx-1 h-5 w-px bg-border\"></li>\n }\n @case ('spacer') {\n <li role=\"none\" aria-hidden=\"true\" class=\"flex-1\"></li>\n }\n @default {\n @if (item.children.length > 0) {\n <li\n role=\"none\"\n [class]=\"groupContainerClasses(item)\"\n [attr.data-navigation-item-key]=\"item.key\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n data-navigation-flyout-tab=\"true\"\n [class]=\"tabClasses(item)\"\n [attr.aria-expanded]=\"isBranchOpen(item)\"\n [attr.aria-controls]=\"isBranchOpen(item) ? panelContentId() : null\"\n [disabled]=\"item.disabled || null\"\n (click)=\"openBranch(item)\"\n >\n <NavigationItemContent\n [item]=\"item\"\n [active]=\"isItemActive(item)\"\n [compact]=\"false\"\n [orientation]=\"'horizontal'\"\n [level]=\"0\"\n [iconTemplate]=\"iconTemplate()\"\n />\n <Icon\n name=\"chevron-right\"\n size=\"inherit\"\n [class]=\"tabChevronClasses(item)\"\n />\n </button>\n </li>\n } @else {\n <li\n NavigationItem\n [navId]=\"navId()\"\n [item]=\"item\"\n [level]=\"0\"\n [orientation]=\"'horizontal'\"\n [compact]=\"false\"\n [itemClass]=\"navItemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n ></li>\n }\n }\n }\n }\n </ul>\n\n <ng-content select=\"NavigationFooter\" />\n </div>\n\n <!-- ROW 2 = child dari menu item aktif; HANYA area ini yang men-scroll. -->\n <div\n [id]=\"panelContentId()\"\n data-navigation-flyout-scroll=\"true\"\n [attr.role]=\"activeBranch() ? 'menu' : null\"\n [attr.aria-label]=\"activeBranch()?.title || null\"\n [class]=\"scrollRegionClasses()\"\n >\n @if (activeBranch(); as branch) {\n <NavigationEntryGrid\n [navId]=\"navId()\"\n [branch]=\"branch\"\n [typeStyle]=\"typeStyle()\"\n [itemClass]=\"itemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n />\n }\n </div>\n </div>\n </div>\n </div>\n}\n",
|
|
478
|
+
template: "<button\n type=\"button\"\n data-navigation-flyout-trigger=\"true\"\n [class]=\"triggerClasses()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId() : null\"\n [attr.aria-label]=\"showIconOnly() ? label() : null\"\n [attr.title]=\"showIconOnly() ? label() : null\"\n (click)=\"toggleFlyout()\"\n>\n @if (showIconOnly()) {\n <Icon\n [name]=\"triggerIcon() ?? 'menu'\"\n size=\"inherit\"\n class=\"text-(length:--nav-icon-size) text-current\"\n />\n } @else {\n @if (iconPosition() === 'start' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n\n <span class=\"truncate\">{{ label() }}</span>\n\n @if (iconPosition() === 'end' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n }\n</button>\n\n@if (isOpen()) {\n <div\n [id]=\"panelId()\"\n data-navigation-flyout-panel=\"true\"\n [attr.data-navigation-flyout-floating]=\"floating() ? 'true' : null\"\n [class]=\"panelWrapperClasses()\"\n [style.left.px]=\"floating() ? null : panelPlacement()?.left\"\n [style.top.px]=\"floating() || isBottom() ? null : panelPlacement()?.top\"\n [style.bottom.px]=\"!floating() && isBottom() ? panelPlacement()?.bottom : null\"\n [style.width.px]=\"floating() ? null : panelPlacement()?.width\"\n >\n <div\n [attr.data-navigation-flyout-floating-card]=\"floating() ? 'true' : null\"\n [class]=\"panelCardClasses()\"\n >\n <div data-navigation-flyout-menu-layout=\"true\" [class]=\"menuClasses()\">\n <!-- ROW 1 = bar (sticky, menutup bar trigger), struktur seperti bar navbar:\n Header (kiri) | menu item (tengah) | Footer (kanan). Hanya ROW 2 (grid child)\n di bawah bar yang ikut scroll. -->\n <div data-navigation-flyout-bar=\"true\" [class]=\"barRowClasses()\">\n <ng-content select=\"NavigationHeader\" />\n\n <ul\n role=\"menu\"\n tabindex=\"-1\"\n data-navigation-flyout-row=\"true\"\n [class]=\"rowClasses()\"\n [attr.aria-label]=\"label()\"\n (keydown)=\"onRowKeydown($event)\"\n >\n @for (item of items(); track item.key) {\n @switch (item.type) {\n @case ('divider') {\n <li role=\"separator\" class=\"mx-1 h-5 w-px bg-border\"></li>\n }\n @case ('spacer') {\n <li role=\"none\" aria-hidden=\"true\" class=\"flex-1\"></li>\n }\n @default {\n @if (item.children.length > 0) {\n <li\n role=\"none\"\n [class]=\"groupContainerClasses(item)\"\n [attr.data-navigation-item-key]=\"item.key\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n data-navigation-flyout-tab=\"true\"\n [class]=\"tabClasses(item)\"\n [attr.aria-expanded]=\"isBranchOpen(item)\"\n [attr.aria-controls]=\"isBranchOpen(item) ? panelContentId() : null\"\n [disabled]=\"item.disabled || null\"\n (click)=\"openBranch(item)\"\n >\n <NavigationItemContent\n [item]=\"item\"\n [active]=\"isItemActive(item)\"\n [compact]=\"false\"\n [orientation]=\"'horizontal'\"\n [level]=\"0\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n />\n <Icon\n name=\"chevron-right\"\n size=\"inherit\"\n [class]=\"tabChevronClasses(item)\"\n />\n </button>\n </li>\n } @else {\n <li\n NavigationItem\n [navId]=\"navId()\"\n [item]=\"item\"\n [level]=\"0\"\n [orientation]=\"'horizontal'\"\n [compact]=\"false\"\n [itemClass]=\"navItemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n ></li>\n }\n }\n }\n }\n </ul>\n\n <ng-content select=\"NavigationFooter\" />\n </div>\n\n <!-- ROW 2 = child dari menu item aktif; HANYA area ini yang men-scroll. -->\n <div\n [id]=\"panelContentId()\"\n data-navigation-flyout-scroll=\"true\"\n [attr.role]=\"activeBranch() ? 'menu' : null\"\n [attr.aria-label]=\"activeBranch()?.title || null\"\n [class]=\"scrollRegionClasses()\"\n >\n @if (activeBranch(); as branch) {\n <NavigationEntryGrid\n [navId]=\"navId()\"\n [branch]=\"branch\"\n [typeStyle]=\"typeStyle()\"\n [itemClass]=\"itemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n />\n }\n </div>\n </div>\n </div>\n </div>\n}\n",
|
|
468
479
|
styles: ["[data-navigation-flyout-floating=true]{width:var(--nav-flyout-floating-width, min(22rem, 85vw));max-width:var(--nav-flyout-floating-max-width, 85vw)}[data-navigation-flyout-floating-card=true]{border-radius:var(--nav-flyout-floating-radius, var(--radius-xl))}[data-navigation-flyout-panel=true]{-webkit-app-region:no-drag;app-region:no-drag}\n"]
|
|
469
480
|
}]
|
|
470
481
|
}],
|
|
471
482
|
ctorParameters: () => [],
|
|
472
483
|
propDecorators: {
|
|
484
|
+
badgeContext: [{
|
|
485
|
+
type: i0.Input,
|
|
486
|
+
args: [{
|
|
487
|
+
isSignal: true,
|
|
488
|
+
alias: "badgeContext",
|
|
489
|
+
required: false
|
|
490
|
+
}]
|
|
491
|
+
}],
|
|
473
492
|
navId: [{
|
|
474
493
|
type: i0.Input,
|
|
475
494
|
args: [{
|