@ojiepermana/angular 22.2.4 → 22.2.6
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-D-WgBF6d.mjs +234 -0
- package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-DC8rfxS5.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-UrcWBqBk.mjs} +25 -38
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-meQb_EWZ.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-1WiRlut1.mjs} +44 -20
- package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-DRdw2G-c.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-dAVUnvwq.mjs} +23 -4
- package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-Bx1NcrWO.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-OD_cAkg8.mjs} +31 -4
- package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs → ojiepermana-angular-navigation-navigation-item.component-6mJbQ94G.mjs} +402 -108
- package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-D-oOKwHg.mjs → ojiepermana-angular-navigation-navigation-list.component-DefF7_rB.mjs} +20 -1
- package/fesm2022/ojiepermana-angular-navigation.mjs +95 -19
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +48 -2
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +1 -0
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +1 -0
- package/navigation/README.md +148 -3
- package/package.json +2 -2
- 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 +17 -0
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +16 -2
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-4RIokl1C.mjs +0 -129
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-
|
|
1
|
+
import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-6mJbQ94G.mjs";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { Component, InjectionToken, computed, input, output } from "@angular/core";
|
|
4
4
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
5
5
|
const NAVIGATION_SHELL = new InjectionToken("NAVIGATION_SHELL");
|
|
6
6
|
var NavigationListComponent = class NavigationListComponent {
|
|
7
|
+
badgeContext = input({}, ...ngDevMode ? [{ debugName: "badgeContext" }] : /* istanbul ignore next */ []);
|
|
7
8
|
navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
|
|
8
9
|
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
9
10
|
collapsed = input(false, ...ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []);
|
|
@@ -36,6 +37,13 @@ var NavigationListComponent = class NavigationListComponent {
|
|
|
36
37
|
isStandalone: true,
|
|
37
38
|
selector: "NavigationList",
|
|
38
39
|
inputs: {
|
|
40
|
+
badgeContext: {
|
|
41
|
+
classPropertyName: "badgeContext",
|
|
42
|
+
publicName: "badgeContext",
|
|
43
|
+
isSignal: true,
|
|
44
|
+
isRequired: false,
|
|
45
|
+
transformFunction: null
|
|
46
|
+
},
|
|
39
47
|
navId: {
|
|
40
48
|
classPropertyName: "navId",
|
|
41
49
|
publicName: "navId",
|
|
@@ -143,6 +151,7 @@ var NavigationListComponent = class NavigationListComponent {
|
|
|
143
151
|
[itemClass]="itemClass()"
|
|
144
152
|
[activeIds]="activeIds()"
|
|
145
153
|
[activeUrl]="activeUrl()"
|
|
154
|
+
[badgeContext]="badgeContext()"
|
|
146
155
|
[iconTemplate]="iconTemplate()"
|
|
147
156
|
[collapseTree]="collapseTree()"
|
|
148
157
|
[openedIds]="openedIds()"
|
|
@@ -158,6 +167,7 @@ var NavigationListComponent = class NavigationListComponent {
|
|
|
158
167
|
type: NavigationItemComponent,
|
|
159
168
|
selector: "li[NavigationItem]",
|
|
160
169
|
inputs: [
|
|
170
|
+
"badgeContext",
|
|
161
171
|
"navId",
|
|
162
172
|
"item",
|
|
163
173
|
"level",
|
|
@@ -207,6 +217,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
207
217
|
[itemClass]="itemClass()"
|
|
208
218
|
[activeIds]="activeIds()"
|
|
209
219
|
[activeUrl]="activeUrl()"
|
|
220
|
+
[badgeContext]="badgeContext()"
|
|
210
221
|
[iconTemplate]="iconTemplate()"
|
|
211
222
|
[collapseTree]="collapseTree()"
|
|
212
223
|
[openedIds]="openedIds()"
|
|
@@ -219,6 +230,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
219
230
|
}]
|
|
220
231
|
}],
|
|
221
232
|
propDecorators: {
|
|
233
|
+
badgeContext: [{
|
|
234
|
+
type: i0.Input,
|
|
235
|
+
args: [{
|
|
236
|
+
isSignal: true,
|
|
237
|
+
alias: "badgeContext",
|
|
238
|
+
required: false
|
|
239
|
+
}]
|
|
240
|
+
}],
|
|
222
241
|
navId: [{
|
|
223
242
|
type: i0.Input,
|
|
224
243
|
args: [{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as injectNavigationBadgeTotal, o as navigationBadgeSourceKeys, r as NAVIGATION_BADGE_STREAMS, s as navigationDescendantBadgeSources } from "./ojiepermana-angular-navigation-navigation-badge-count.component-D-WgBF6d.mjs";
|
|
2
|
+
import { n as NAVIGATION_SHELL, t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-DefF7_rB.mjs";
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
import { Component, DestroyRef, Directive, ElementRef, Injector, TemplateRef, ViewContainerRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, isDevMode, model, output, signal } from "@angular/core";
|
|
4
5
|
import { ActivatedRoute } from "@angular/router";
|
|
@@ -73,6 +74,10 @@ var NavigationContainerComponent = class NavigationContainerComponent {
|
|
|
73
74
|
alias: "data-id"
|
|
74
75
|
});
|
|
75
76
|
data = input([], ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
77
|
+
badgeContext = input(null, {
|
|
78
|
+
...ngDevMode ? { debugName: "badgeContext" } : /* istanbul ignore next */ {},
|
|
79
|
+
alias: "badge-context"
|
|
80
|
+
});
|
|
76
81
|
ariaLabel = input("Primary navigation", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
77
82
|
compact = input(false, ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
|
|
78
83
|
collapseTree = input("stairs", {
|
|
@@ -103,7 +108,8 @@ var NavigationContainerComponent = class NavigationContainerComponent {
|
|
|
103
108
|
collapsedPreference = computed(() => this.typeConfig()?.collapsed?.() ?? null, ...ngDevMode ? [{ debugName: "collapsedPreference" }] : /* istanbul ignore next */ []);
|
|
104
109
|
dockbarModePreference = computed(() => this.typeConfig()?.dockbarMode?.() ?? null, ...ngDevMode ? [{ debugName: "dockbarModePreference" }] : /* istanbul ignore next */ []);
|
|
105
110
|
dockbarRouteContextPreference = computed(() => this.typeConfig()?.dockbarRouteContext?.() ?? null, ...ngDevMode ? [{ debugName: "dockbarRouteContextPreference" }] : /* istanbul ignore next */ []);
|
|
106
|
-
|
|
111
|
+
resolvedBadgeContext = computed(() => this.badgeContext() ?? this.typeConfig()?.dockbarBadgeContext?.() ?? EMPTY_NAVIGATION_BADGE_CONTEXT$1, ...ngDevMode ? [{ debugName: "resolvedBadgeContext" }] : /* istanbul ignore next */ []);
|
|
112
|
+
dockbarBadgeContext = this.resolvedBadgeContext;
|
|
107
113
|
dockbarRouteHeaderVisible = computed(() => this.typeConfig()?.dockbarRouteHeaderVisible?.() ?? false, ...ngDevMode ? [{ debugName: "dockbarRouteHeaderVisible" }] : /* istanbul ignore next */ []);
|
|
108
114
|
dockbarAsideFooter = computed(() => this.typeConfig()?.dockbarAsideFooter?.() ?? null, ...ngDevMode ? [{ debugName: "dockbarAsideFooter" }] : /* istanbul ignore next */ []);
|
|
109
115
|
sidebarCollapse = computed(() => this.typeConfig()?.sidebarCollapse?.() ?? false, ...ngDevMode ? [{ debugName: "sidebarCollapse" }] : /* istanbul ignore next */ []);
|
|
@@ -166,7 +172,8 @@ var NavigationContainerComponent = class NavigationContainerComponent {
|
|
|
166
172
|
const icon = activeEntry ? this.cleanString(activeEntry.icon) ?? fallbackIcon : route.icon ?? fallbackIcon;
|
|
167
173
|
const label = this.cleanString(activeEntry?.title) ?? route.label ?? "Current navigation route";
|
|
168
174
|
const badgeKey = activeEntry?.badge?.source ?? route.badge;
|
|
169
|
-
const
|
|
175
|
+
const badgeContext = this.resolvedBadgeContext();
|
|
176
|
+
const badge = badgeKey && Object.hasOwn(badgeContext, badgeKey) ? badgeContext[badgeKey] : null;
|
|
170
177
|
const item = activeEntry?.source ?? {
|
|
171
178
|
title: label,
|
|
172
179
|
icon
|
|
@@ -177,7 +184,7 @@ var NavigationContainerComponent = class NavigationContainerComponent {
|
|
|
177
184
|
icon,
|
|
178
185
|
label,
|
|
179
186
|
badge,
|
|
180
|
-
badgeClass: cn("
|
|
187
|
+
badgeClass: cn("nav-count-overlay top-0 right-0", activeEntry?.badge?.classes),
|
|
181
188
|
iconContext: {
|
|
182
189
|
$implicit: icon,
|
|
183
190
|
icon,
|
|
@@ -245,6 +252,12 @@ var NavigationContainerComponent = class NavigationContainerComponent {
|
|
|
245
252
|
if (!this.motionArmed()) this.motionArmed.set(true);
|
|
246
253
|
}
|
|
247
254
|
constructor() {
|
|
255
|
+
injectNavigationBadgeTotal(computed(() => {
|
|
256
|
+
const context = this.resolvedBadgeContext();
|
|
257
|
+
const sources = [...navigationBadgeSourceKeys(this.normalizedItems())].filter((key) => Object.hasOwn(context, key) && context[key] != null).map((key) => context[key]);
|
|
258
|
+
const headerBadge = this.dockbarRouteHeaderVisible() ? this.dockbarRouteHeader()?.badge : null;
|
|
259
|
+
return headerBadge ? [...sources, headerBadge] : sources;
|
|
260
|
+
}));
|
|
248
261
|
effect((onCleanup) => {
|
|
249
262
|
const dataId = this.resolvedDataId();
|
|
250
263
|
this.nav.publishData(dataId, this.data(), this.dataOwner);
|
|
@@ -340,6 +353,13 @@ var NavigationContainerComponent = class NavigationContainerComponent {
|
|
|
340
353
|
isRequired: false,
|
|
341
354
|
transformFunction: null
|
|
342
355
|
},
|
|
356
|
+
badgeContext: {
|
|
357
|
+
classPropertyName: "badgeContext",
|
|
358
|
+
publicName: "badge-context",
|
|
359
|
+
isSignal: true,
|
|
360
|
+
isRequired: false,
|
|
361
|
+
transformFunction: null
|
|
362
|
+
},
|
|
343
363
|
ariaLabel: {
|
|
344
364
|
classPropertyName: "ariaLabel",
|
|
345
365
|
publicName: "ariaLabel",
|
|
@@ -433,6 +453,9 @@ var NavigationContainerComponent = class NavigationContainerComponent {
|
|
|
433
453
|
}
|
|
434
454
|
},
|
|
435
455
|
providers: [{
|
|
456
|
+
provide: NAVIGATION_BADGE_STREAMS,
|
|
457
|
+
useFactory: () => /* @__PURE__ */ new WeakMap()
|
|
458
|
+
}, {
|
|
436
459
|
provide: NAVIGATION_SHELL,
|
|
437
460
|
useExisting: forwardRef(() => NavigationContainerComponent)
|
|
438
461
|
}],
|
|
@@ -458,6 +481,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
458
481
|
args: [{
|
|
459
482
|
selector: "Navigation",
|
|
460
483
|
providers: [{
|
|
484
|
+
provide: NAVIGATION_BADGE_STREAMS,
|
|
485
|
+
useFactory: () => /* @__PURE__ */ new WeakMap()
|
|
486
|
+
}, {
|
|
461
487
|
provide: NAVIGATION_SHELL,
|
|
462
488
|
useExisting: forwardRef(() => NavigationContainerComponent)
|
|
463
489
|
}],
|
|
@@ -510,6 +536,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
510
536
|
required: false
|
|
511
537
|
}]
|
|
512
538
|
}],
|
|
539
|
+
badgeContext: [{
|
|
540
|
+
type: i0.Input,
|
|
541
|
+
args: [{
|
|
542
|
+
isSignal: true,
|
|
543
|
+
alias: "badge-context",
|
|
544
|
+
required: false
|
|
545
|
+
}]
|
|
546
|
+
}],
|
|
513
547
|
ariaLabel: [{
|
|
514
548
|
type: i0.Input,
|
|
515
549
|
args: [{
|
|
@@ -650,6 +684,7 @@ var NavigationContentComponent = class NavigationContentComponent {
|
|
|
650
684
|
[groupClass]="container.groupClass()"
|
|
651
685
|
[activeIds]="container.activeIdSet()"
|
|
652
686
|
[activeUrl]="container.activeUrl()"
|
|
687
|
+
[badgeContext]="container.resolvedBadgeContext()"
|
|
653
688
|
[iconTemplate]="container.iconTemplate()"
|
|
654
689
|
[collapseTree]="container.collapseTree()"
|
|
655
690
|
[openedIds]="container.openedIds()"
|
|
@@ -672,6 +707,7 @@ var NavigationContentComponent = class NavigationContentComponent {
|
|
|
672
707
|
[groupClass]="container.groupClass()"
|
|
673
708
|
[activeIds]="container.activeIdSet()"
|
|
674
709
|
[activeUrl]="container.activeUrl()"
|
|
710
|
+
[badgeContext]="container.resolvedBadgeContext()"
|
|
675
711
|
[iconTemplate]="container.iconTemplate()"
|
|
676
712
|
[collapseTree]="container.collapseTree()"
|
|
677
713
|
[openedIds]="container.openedIds()"
|
|
@@ -685,7 +721,6 @@ var NavigationContentComponent = class NavigationContentComponent {
|
|
|
685
721
|
[navId]="navState.id"
|
|
686
722
|
[items]="container.normalizedItems()"
|
|
687
723
|
[railItems]="container.dockbarRailItems()"
|
|
688
|
-
[badgeContext]="container.dockbarBadgeContext()"
|
|
689
724
|
[mode]="navState.dockbarMode"
|
|
690
725
|
[position]="navState.position"
|
|
691
726
|
[asideFooterTemplate]="container.dockbarAsideFooter()"
|
|
@@ -697,6 +732,7 @@ var NavigationContentComponent = class NavigationContentComponent {
|
|
|
697
732
|
? container.dockbarResolvedRouteContext().url
|
|
698
733
|
: container.activeUrl()
|
|
699
734
|
"
|
|
735
|
+
[badgeContext]="container.resolvedBadgeContext()"
|
|
700
736
|
[iconTemplate]="container.iconTemplate()"
|
|
701
737
|
[collapseTree]="container.collapseTree()"
|
|
702
738
|
[openedIds]="container.openedIds()"
|
|
@@ -715,6 +751,7 @@ var NavigationContentComponent = class NavigationContentComponent {
|
|
|
715
751
|
[itemClass]="container.itemClass()"
|
|
716
752
|
[activeIds]="container.activeIdSet()"
|
|
717
753
|
[activeUrl]="container.activeUrl()"
|
|
754
|
+
[badgeContext]="container.resolvedBadgeContext()"
|
|
718
755
|
[iconTemplate]="container.iconTemplate()"
|
|
719
756
|
[collapseTree]="container.collapseTree()"
|
|
720
757
|
[openedIds]="container.openedIds()"
|
|
@@ -731,6 +768,7 @@ var NavigationContentComponent = class NavigationContentComponent {
|
|
|
731
768
|
[itemClass]="container.itemClass()"
|
|
732
769
|
[activeIds]="container.activeIdSet()"
|
|
733
770
|
[activeUrl]="container.activeUrl()"
|
|
771
|
+
[badgeContext]="container.resolvedBadgeContext()"
|
|
734
772
|
[iconTemplate]="container.iconTemplate()"
|
|
735
773
|
[collapseTree]="container.collapseTree()"
|
|
736
774
|
[openedIds]="container.openedIds()"
|
|
@@ -745,6 +783,7 @@ var NavigationContentComponent = class NavigationContentComponent {
|
|
|
745
783
|
type: NavigationListComponent,
|
|
746
784
|
selector: "NavigationList",
|
|
747
785
|
inputs: [
|
|
786
|
+
"badgeContext",
|
|
748
787
|
"navId",
|
|
749
788
|
"items",
|
|
750
789
|
"collapsed",
|
|
@@ -761,9 +800,9 @@ var NavigationContentComponent = class NavigationContentComponent {
|
|
|
761
800
|
outputs: ["openedIdsChange", "itemSelected"]
|
|
762
801
|
}],
|
|
763
802
|
deferBlockDependencies: [
|
|
764
|
-
() => [import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-
|
|
765
|
-
() => [import("./ojiepermana-angular-navigation-navigation-horizontal.component-
|
|
766
|
-
() => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-
|
|
803
|
+
() => [import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-dAVUnvwq.mjs").then((m) => m.NavigationFlyoutMenuComponent)],
|
|
804
|
+
() => [import("./ojiepermana-angular-navigation-navigation-horizontal.component-OD_cAkg8.mjs").then((m) => m.NavigationHorizontalComponent)],
|
|
805
|
+
() => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-UrcWBqBk.mjs").then((m) => m.NavigationDockbarMenuComponent)]
|
|
767
806
|
]
|
|
768
807
|
});
|
|
769
808
|
};
|
|
@@ -773,9 +812,9 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
773
812
|
ngImport: i0,
|
|
774
813
|
type: NavigationContentComponent,
|
|
775
814
|
resolveDeferredDeps: () => [
|
|
776
|
-
import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-
|
|
777
|
-
import("./ojiepermana-angular-navigation-navigation-horizontal.component-
|
|
778
|
-
import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-
|
|
815
|
+
import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-dAVUnvwq.mjs").then((m) => m.NavigationFlyoutMenuComponent),
|
|
816
|
+
import("./ojiepermana-angular-navigation-navigation-horizontal.component-OD_cAkg8.mjs").then((m) => m.NavigationHorizontalComponent),
|
|
817
|
+
import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-UrcWBqBk.mjs").then((m) => m.NavigationDockbarMenuComponent)
|
|
779
818
|
],
|
|
780
819
|
resolveMetadata: (NavigationFlyoutMenuComponent, NavigationHorizontalComponent, NavigationDockbarMenuComponent) => ({
|
|
781
820
|
decorators: [{
|
|
@@ -814,6 +853,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
814
853
|
[groupClass]="container.groupClass()"
|
|
815
854
|
[activeIds]="container.activeIdSet()"
|
|
816
855
|
[activeUrl]="container.activeUrl()"
|
|
856
|
+
[badgeContext]="container.resolvedBadgeContext()"
|
|
817
857
|
[iconTemplate]="container.iconTemplate()"
|
|
818
858
|
[collapseTree]="container.collapseTree()"
|
|
819
859
|
[openedIds]="container.openedIds()"
|
|
@@ -836,6 +876,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
836
876
|
[groupClass]="container.groupClass()"
|
|
837
877
|
[activeIds]="container.activeIdSet()"
|
|
838
878
|
[activeUrl]="container.activeUrl()"
|
|
879
|
+
[badgeContext]="container.resolvedBadgeContext()"
|
|
839
880
|
[iconTemplate]="container.iconTemplate()"
|
|
840
881
|
[collapseTree]="container.collapseTree()"
|
|
841
882
|
[openedIds]="container.openedIds()"
|
|
@@ -849,7 +890,6 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
849
890
|
[navId]="navState.id"
|
|
850
891
|
[items]="container.normalizedItems()"
|
|
851
892
|
[railItems]="container.dockbarRailItems()"
|
|
852
|
-
[badgeContext]="container.dockbarBadgeContext()"
|
|
853
893
|
[mode]="navState.dockbarMode"
|
|
854
894
|
[position]="navState.position"
|
|
855
895
|
[asideFooterTemplate]="container.dockbarAsideFooter()"
|
|
@@ -861,6 +901,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
861
901
|
? container.dockbarResolvedRouteContext().url
|
|
862
902
|
: container.activeUrl()
|
|
863
903
|
"
|
|
904
|
+
[badgeContext]="container.resolvedBadgeContext()"
|
|
864
905
|
[iconTemplate]="container.iconTemplate()"
|
|
865
906
|
[collapseTree]="container.collapseTree()"
|
|
866
907
|
[openedIds]="container.openedIds()"
|
|
@@ -879,6 +920,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
879
920
|
[itemClass]="container.itemClass()"
|
|
880
921
|
[activeIds]="container.activeIdSet()"
|
|
881
922
|
[activeUrl]="container.activeUrl()"
|
|
923
|
+
[badgeContext]="container.resolvedBadgeContext()"
|
|
882
924
|
[iconTemplate]="container.iconTemplate()"
|
|
883
925
|
[collapseTree]="container.collapseTree()"
|
|
884
926
|
[openedIds]="container.openedIds()"
|
|
@@ -895,6 +937,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
895
937
|
[itemClass]="container.itemClass()"
|
|
896
938
|
[activeIds]="container.activeIdSet()"
|
|
897
939
|
[activeUrl]="container.activeUrl()"
|
|
940
|
+
[badgeContext]="container.resolvedBadgeContext()"
|
|
898
941
|
[iconTemplate]="container.iconTemplate()"
|
|
899
942
|
[collapseTree]="container.collapseTree()"
|
|
900
943
|
[openedIds]="container.openedIds()"
|
|
@@ -1410,6 +1453,11 @@ var NavigationDockbarComponent = class NavigationDockbarComponent {
|
|
|
1410
1453
|
...ngDevMode ? { debugName: "badgeContext" } : /* istanbul ignore next */ {},
|
|
1411
1454
|
alias: "dockbar-badge"
|
|
1412
1455
|
});
|
|
1456
|
+
badges = input(null, {
|
|
1457
|
+
...ngDevMode ? { debugName: "badges" } : /* istanbul ignore next */ {},
|
|
1458
|
+
alias: "badge-context"
|
|
1459
|
+
});
|
|
1460
|
+
resolvedBadges = computed(() => this.badges() ?? this.badgeContext(), ...ngDevMode ? [{ debugName: "resolvedBadges" }] : /* istanbul ignore next */ []);
|
|
1413
1461
|
class = input("", {
|
|
1414
1462
|
...ngDevMode ? { debugName: "class" } : /* istanbul ignore next */ {},
|
|
1415
1463
|
alias: "class"
|
|
@@ -1418,6 +1466,11 @@ var NavigationDockbarComponent = class NavigationDockbarComponent {
|
|
|
1418
1466
|
contentSlot = contentChild(NavigationContentComponent, ...ngDevMode ? [{ debugName: "contentSlot" }] : /* istanbul ignore next */ []);
|
|
1419
1467
|
footerSlot = contentChild(NavigationFooterComponent, ...ngDevMode ? [{ debugName: "footerSlot" }] : /* istanbul ignore next */ []);
|
|
1420
1468
|
asideFooterSlot = contentChild(NavigationAsideFooterDirective, ...ngDevMode ? [{ debugName: "asideFooterSlot" }] : /* istanbul ignore next */ []);
|
|
1469
|
+
headerDescendantSources = computed(() => {
|
|
1470
|
+
const entry = this.container.dockbarRouteHeader()?.activeEntry;
|
|
1471
|
+
if (!entry || this.container.dockbarResolvedRouteContext().badge) return [];
|
|
1472
|
+
return navigationDescendantBadgeSources(entry.badge, entry.children, this.container.resolvedBadgeContext());
|
|
1473
|
+
}, ...ngDevMode ? [{ debugName: "headerDescendantSources" }] : /* istanbul ignore next */ []);
|
|
1421
1474
|
routeContextEnabled = computed(() => {
|
|
1422
1475
|
const context = this.routeContext();
|
|
1423
1476
|
return context !== null && context !== false;
|
|
@@ -1430,7 +1483,7 @@ var NavigationDockbarComponent = class NavigationDockbarComponent {
|
|
|
1430
1483
|
position: this.position,
|
|
1431
1484
|
dockbarMode: this.mode,
|
|
1432
1485
|
dockbarRouteContext: this.routeContext,
|
|
1433
|
-
dockbarBadgeContext: this.
|
|
1486
|
+
dockbarBadgeContext: this.resolvedBadges,
|
|
1434
1487
|
dockbarRouteHeaderVisible: computed(() => this.routeContextEnabled() && this.headerSlot() === void 0),
|
|
1435
1488
|
dockbarAsideFooter: computed(() => this.asideFooterSlot()?.templateRef ?? null)
|
|
1436
1489
|
};
|
|
@@ -1500,6 +1553,13 @@ var NavigationDockbarComponent = class NavigationDockbarComponent {
|
|
|
1500
1553
|
isRequired: false,
|
|
1501
1554
|
transformFunction: null
|
|
1502
1555
|
},
|
|
1556
|
+
badges: {
|
|
1557
|
+
classPropertyName: "badges",
|
|
1558
|
+
publicName: "badge-context",
|
|
1559
|
+
isSignal: true,
|
|
1560
|
+
isRequired: false,
|
|
1561
|
+
transformFunction: null
|
|
1562
|
+
},
|
|
1503
1563
|
class: {
|
|
1504
1564
|
classPropertyName: "class",
|
|
1505
1565
|
publicName: "class",
|
|
@@ -1567,9 +1627,13 @@ var NavigationDockbarComponent = class NavigationDockbarComponent {
|
|
|
1567
1627
|
}
|
|
1568
1628
|
</span>
|
|
1569
1629
|
|
|
1570
|
-
@if (routeHeader.badge
|
|
1630
|
+
@if (routeHeader.badge || headerDescendantSources().length) {
|
|
1571
1631
|
@defer (on immediate) {
|
|
1572
|
-
<NavigationBadgeCount
|
|
1632
|
+
<NavigationBadgeCount
|
|
1633
|
+
[badge]="routeHeader.badge"
|
|
1634
|
+
[sources]="routeHeader.badge ? null : headerDescendantSources()"
|
|
1635
|
+
[class]="routeHeader.badgeClass"
|
|
1636
|
+
/>
|
|
1573
1637
|
}
|
|
1574
1638
|
}
|
|
1575
1639
|
</ng-template>
|
|
@@ -1664,7 +1728,7 @@ var NavigationDockbarComponent = class NavigationDockbarComponent {
|
|
|
1664
1728
|
exportAs: ["Tooltip"]
|
|
1665
1729
|
}
|
|
1666
1730
|
],
|
|
1667
|
-
deferBlockDependencies: [() => [import("./ojiepermana-angular-navigation-navigation-badge-count.component-
|
|
1731
|
+
deferBlockDependencies: [() => [import("./ojiepermana-angular-navigation-navigation-badge-count.component-D-WgBF6d.mjs").then((n) => n.n).then((m) => m.NavigationBadgeCountComponent)]]
|
|
1668
1732
|
});
|
|
1669
1733
|
};
|
|
1670
1734
|
i0.ɵɵngDeclareClassMetadataAsync({
|
|
@@ -1672,7 +1736,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
1672
1736
|
version: "22.2.3",
|
|
1673
1737
|
ngImport: i0,
|
|
1674
1738
|
type: NavigationDockbarComponent,
|
|
1675
|
-
resolveDeferredDeps: () => [import("./ojiepermana-angular-navigation-navigation-badge-count.component-
|
|
1739
|
+
resolveDeferredDeps: () => [import("./ojiepermana-angular-navigation-navigation-badge-count.component-D-WgBF6d.mjs").then((n) => n.n).then((m) => m.NavigationBadgeCountComponent)],
|
|
1676
1740
|
resolveMetadata: (NavigationBadgeCountComponent) => ({
|
|
1677
1741
|
decorators: [{
|
|
1678
1742
|
type: Component,
|
|
@@ -1712,9 +1776,13 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
1712
1776
|
}
|
|
1713
1777
|
</span>
|
|
1714
1778
|
|
|
1715
|
-
@if (routeHeader.badge
|
|
1779
|
+
@if (routeHeader.badge || headerDescendantSources().length) {
|
|
1716
1780
|
@defer (on immediate) {
|
|
1717
|
-
<NavigationBadgeCount
|
|
1781
|
+
<NavigationBadgeCount
|
|
1782
|
+
[badge]="routeHeader.badge"
|
|
1783
|
+
[sources]="routeHeader.badge ? null : headerDescendantSources()"
|
|
1784
|
+
[class]="routeHeader.badgeClass"
|
|
1785
|
+
/>
|
|
1718
1786
|
}
|
|
1719
1787
|
}
|
|
1720
1788
|
</ng-template>
|
|
@@ -1795,6 +1863,14 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
1795
1863
|
required: false
|
|
1796
1864
|
}]
|
|
1797
1865
|
}],
|
|
1866
|
+
badges: [{
|
|
1867
|
+
type: i0.Input,
|
|
1868
|
+
args: [{
|
|
1869
|
+
isSignal: true,
|
|
1870
|
+
alias: "badge-context",
|
|
1871
|
+
required: false
|
|
1872
|
+
}]
|
|
1873
|
+
}],
|
|
1798
1874
|
class: [{
|
|
1799
1875
|
type: i0.Input,
|
|
1800
1876
|
args: [{
|
|
@@ -690,6 +690,10 @@ var LayoutNavDockbar = class LayoutNavDockbar {
|
|
|
690
690
|
...ngDevMode ? { debugName: "dockbarRouteContext" } : /* istanbul ignore next */ {},
|
|
691
691
|
alias: "dockbar-route-context"
|
|
692
692
|
});
|
|
693
|
+
badgeContext = input(null, {
|
|
694
|
+
...ngDevMode ? { debugName: "badgeContext" } : /* istanbul ignore next */ {},
|
|
695
|
+
alias: "badge-context"
|
|
696
|
+
});
|
|
693
697
|
dockbarBadgeContext = input(EMPTY_NAVIGATION_BADGE_CONTEXT$1, {
|
|
694
698
|
...ngDevMode ? { debugName: "dockbarBadgeContext" } : /* istanbul ignore next */ {},
|
|
695
699
|
alias: "dockbar-badge"
|
|
@@ -752,6 +756,13 @@ var LayoutNavDockbar = class LayoutNavDockbar {
|
|
|
752
756
|
isRequired: false,
|
|
753
757
|
transformFunction: null
|
|
754
758
|
},
|
|
759
|
+
badgeContext: {
|
|
760
|
+
classPropertyName: "badgeContext",
|
|
761
|
+
publicName: "badge-context",
|
|
762
|
+
isSignal: true,
|
|
763
|
+
isRequired: false,
|
|
764
|
+
transformFunction: null
|
|
765
|
+
},
|
|
755
766
|
dockbarBadgeContext: {
|
|
756
767
|
classPropertyName: "dockbarBadgeContext",
|
|
757
768
|
publicName: "dockbar-badge",
|
|
@@ -767,7 +778,7 @@ var LayoutNavDockbar = class LayoutNavDockbar {
|
|
|
767
778
|
<NavigationDockbar
|
|
768
779
|
[mode]="dockbarMode()"
|
|
769
780
|
[dockbar-route-context]="dockbarRouteContext()"
|
|
770
|
-
[
|
|
781
|
+
[badge-context]="badgeContext() ?? dockbarBadgeContext()"
|
|
771
782
|
[class]="shellClass()"
|
|
772
783
|
>
|
|
773
784
|
@if (!routeContextEnabled()) {
|
|
@@ -800,6 +811,7 @@ var LayoutNavDockbar = class LayoutNavDockbar {
|
|
|
800
811
|
"position",
|
|
801
812
|
"dockbar-route-context",
|
|
802
813
|
"dockbar-badge",
|
|
814
|
+
"badge-context",
|
|
803
815
|
"class"
|
|
804
816
|
]
|
|
805
817
|
},
|
|
@@ -861,7 +873,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
861
873
|
<NavigationDockbar
|
|
862
874
|
[mode]="dockbarMode()"
|
|
863
875
|
[dockbar-route-context]="dockbarRouteContext()"
|
|
864
|
-
[
|
|
876
|
+
[badge-context]="badgeContext() ?? dockbarBadgeContext()"
|
|
865
877
|
[class]="shellClass()"
|
|
866
878
|
>
|
|
867
879
|
@if (!routeContextEnabled()) {
|
|
@@ -921,6 +933,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
921
933
|
required: false
|
|
922
934
|
}]
|
|
923
935
|
}],
|
|
936
|
+
badgeContext: [{
|
|
937
|
+
type: i0.Input,
|
|
938
|
+
args: [{
|
|
939
|
+
isSignal: true,
|
|
940
|
+
alias: "badge-context",
|
|
941
|
+
required: false
|
|
942
|
+
}]
|
|
943
|
+
}],
|
|
924
944
|
dockbarBadgeContext: [{
|
|
925
945
|
type: i0.Input,
|
|
926
946
|
args: [{
|
|
@@ -1563,6 +1583,11 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
|
|
|
1563
1583
|
...ngDevMode ? { debugName: "dockbarRouteContext" } : /* istanbul ignore next */ {},
|
|
1564
1584
|
alias: "dockbar-route-context"
|
|
1565
1585
|
});
|
|
1586
|
+
badgeContext = input(null, {
|
|
1587
|
+
...ngDevMode ? { debugName: "badgeContext" } : /* istanbul ignore next */ {},
|
|
1588
|
+
alias: "badge-context"
|
|
1589
|
+
});
|
|
1590
|
+
resolvedBadgeContext = computed(() => this.badgeContext() ?? this.dockbarBadgeContext(), ...ngDevMode ? [{ debugName: "resolvedBadgeContext" }] : /* istanbul ignore next */ []);
|
|
1566
1591
|
dockbarBadgeContext = input(EMPTY_NAVIGATION_BADGE_CONTEXT, {
|
|
1567
1592
|
...ngDevMode ? { debugName: "dockbarBadgeContext" } : /* istanbul ignore next */ {},
|
|
1568
1593
|
alias: "dockbar-badge"
|
|
@@ -1719,6 +1744,13 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
|
|
|
1719
1744
|
isRequired: false,
|
|
1720
1745
|
transformFunction: null
|
|
1721
1746
|
},
|
|
1747
|
+
badgeContext: {
|
|
1748
|
+
classPropertyName: "badgeContext",
|
|
1749
|
+
publicName: "badge-context",
|
|
1750
|
+
isSignal: true,
|
|
1751
|
+
isRequired: false,
|
|
1752
|
+
transformFunction: null
|
|
1753
|
+
},
|
|
1722
1754
|
dockbarBadgeContext: {
|
|
1723
1755
|
classPropertyName: "dockbarBadgeContext",
|
|
1724
1756
|
publicName: "dockbar-badge",
|
|
@@ -1868,6 +1900,7 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
|
|
|
1868
1900
|
id="main-mobile"
|
|
1869
1901
|
data-id="main"
|
|
1870
1902
|
[data]="data()"
|
|
1903
|
+
[badge-context]="resolvedBadgeContext()"
|
|
1871
1904
|
ariaLabel="Primary navigation"
|
|
1872
1905
|
class="h-full w-full"
|
|
1873
1906
|
(itemSelected)="mobileNavOpen.set(false)"
|
|
@@ -1894,6 +1927,7 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
|
|
|
1894
1927
|
id="main"
|
|
1895
1928
|
[data-id]="desktopDataId()"
|
|
1896
1929
|
[data]="desktopData()"
|
|
1930
|
+
[badge-context]="resolvedBadgeContext()"
|
|
1897
1931
|
[class]="navClass()"
|
|
1898
1932
|
>
|
|
1899
1933
|
@switch (navKind()) {
|
|
@@ -2060,6 +2094,7 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
|
|
|
2060
2094
|
"id",
|
|
2061
2095
|
"data-id",
|
|
2062
2096
|
"data",
|
|
2097
|
+
"badge-context",
|
|
2063
2098
|
"ariaLabel",
|
|
2064
2099
|
"compact",
|
|
2065
2100
|
"collapse-tree",
|
|
@@ -2100,6 +2135,7 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
|
|
|
2100
2135
|
"appearance",
|
|
2101
2136
|
"nav-type-mode",
|
|
2102
2137
|
"dockbar-route-context",
|
|
2138
|
+
"badge-context",
|
|
2103
2139
|
"dockbar-badge"
|
|
2104
2140
|
],
|
|
2105
2141
|
outputs: ["logout"]
|
|
@@ -2242,6 +2278,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
2242
2278
|
id="main-mobile"
|
|
2243
2279
|
data-id="main"
|
|
2244
2280
|
[data]="data()"
|
|
2281
|
+
[badge-context]="resolvedBadgeContext()"
|
|
2245
2282
|
ariaLabel="Primary navigation"
|
|
2246
2283
|
class="h-full w-full"
|
|
2247
2284
|
(itemSelected)="mobileNavOpen.set(false)"
|
|
@@ -2268,6 +2305,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
2268
2305
|
id="main"
|
|
2269
2306
|
[data-id]="desktopDataId()"
|
|
2270
2307
|
[data]="desktopData()"
|
|
2308
|
+
[badge-context]="resolvedBadgeContext()"
|
|
2271
2309
|
[class]="navClass()"
|
|
2272
2310
|
>
|
|
2273
2311
|
@switch (navKind()) {
|
|
@@ -2417,6 +2455,14 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
2417
2455
|
required: false
|
|
2418
2456
|
}]
|
|
2419
2457
|
}],
|
|
2458
|
+
badgeContext: [{
|
|
2459
|
+
type: i0.Input,
|
|
2460
|
+
args: [{
|
|
2461
|
+
isSignal: true,
|
|
2462
|
+
alias: "badge-context",
|
|
2463
|
+
required: false
|
|
2464
|
+
}]
|
|
2465
|
+
}],
|
|
2420
2466
|
dockbarBadgeContext: [{
|
|
2421
2467
|
type: i0.Input,
|
|
2422
2468
|
args: [{
|