@ojiepermana/angular 22.2.0 → 22.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ojiepermana-angular-chart-area.mjs +3 -3
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +3 -3
- package/fesm2022/ojiepermana-angular-chart-core.mjs +33 -33
- package/fesm2022/ojiepermana-angular-chart-line.mjs +3 -3
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +3 -3
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +33 -33
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +3 -3
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +3 -3
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +15 -15
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +27 -27
- package/fesm2022/ojiepermana-angular-component-alert.mjs +12 -12
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +18 -18
- package/fesm2022/ojiepermana-angular-component-badge.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +21 -21
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +9 -9
- package/fesm2022/ojiepermana-angular-component-button.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-card.mjs +21 -21
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +18 -18
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +12 -12
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-command.mjs +27 -27
- package/fesm2022/ojiepermana-angular-component-composer.mjs +21 -21
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +21 -21
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -2
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +39 -39
- package/fesm2022/ojiepermana-angular-component-editor.mjs +18 -18
- package/fesm2022/ojiepermana-angular-component-empty.mjs +18 -18
- package/fesm2022/ojiepermana-angular-component-form.mjs +36 -36
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +9 -9
- package/fesm2022/ojiepermana-angular-component-icon.mjs +6 -6
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +18 -18
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +15 -15
- package/fesm2022/ojiepermana-angular-component-input.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-item.mjs +30 -30
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +27 -27
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +6 -6
- package/fesm2022/ojiepermana-angular-component-label.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +12 -12
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +9 -9
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +21 -21
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +15 -15
- package/fesm2022/ojiepermana-angular-component-popover.mjs +6 -6
- package/fesm2022/ojiepermana-angular-component-progress.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-radio.mjs +6 -6
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +12 -12
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-select.mjs +6 -6
- package/fesm2022/ojiepermana-angular-component-separator.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +21 -21
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-slider.mjs +6 -6
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-switch.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-table.mjs +24 -24
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +18 -18
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +18 -18
- package/fesm2022/ojiepermana-angular-component-toast.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +9 -9
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +15 -15
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +3 -3
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +3 -3
- package/fesm2022/{ojiepermana-angular-navigation-navigation-badge-count.component-BKCeWzml.mjs → ojiepermana-angular-navigation-navigation-badge-count.component-DYuysKVf.mjs} +3 -3
- package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-DFEJK2jD.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-COiTaw34.mjs} +7 -6
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-mpK9Ar08.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-YIz0IsIb.mjs} +27 -46
- package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-BPgH7FJk.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-D2vwEwBY.mjs} +5 -5
- package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-DMpYcD9t.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-B5D7yXfb.mjs} +5 -5
- package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs → ojiepermana-angular-navigation-navigation-item.component-CUb68MZH.mjs} +27 -36
- package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-YUzHI9Pj.mjs → ojiepermana-angular-navigation-navigation-list.component-CrK16trj.mjs} +22 -6
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +6 -4
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +113 -1
- package/fesm2022/ojiepermana-angular-navigation.mjs +271 -67
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +29 -19
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +6 -6
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +239 -31
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +24 -24
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +3 -3
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +6 -6
- package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +3 -3
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +3 -3
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +6 -6
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +12 -12
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +3 -3
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +9 -9
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +15 -15
- package/navigation/README.md +68 -17
- package/package.json +2 -2
- package/types/ojiepermana-angular-component-card.d.ts +1 -1
- package/types/ojiepermana-angular-component-command.d.ts +1 -1
- package/types/ojiepermana-angular-navigation-types.d.ts +47 -2
- package/types/ojiepermana-angular-navigation.d.ts +47 -3
- package/types/ojiepermana-angular-theme-component-settings.d.ts +5 -3
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +48 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Component, computed, inject, input, output, signal } from "@angular/core";
|
|
3
|
-
import {
|
|
3
|
+
import { ActivatedRoute, Router, RouterLink } from "@angular/router";
|
|
4
4
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
5
|
-
import { NAVIGATION_ADAPTER } from "@ojiepermana/angular/navigation/core";
|
|
5
|
+
import { NAVIGATION_ADAPTER, NAVIGATION_ROUTE_CONTEXT_ADAPTER } from "@ojiepermana/angular/navigation/core";
|
|
6
6
|
import { NgTemplateOutlet } from "@angular/common";
|
|
7
7
|
import { IconComponent } from "@ojiepermana/angular/component/icon";
|
|
8
8
|
import { TooltipDirective } from "@ojiepermana/angular/component/tooltip";
|
|
@@ -27,7 +27,7 @@ var NavigationItemContentComponent = class NavigationItemContentComponent {
|
|
|
27
27
|
}
|
|
28
28
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
29
29
|
minVersion: "12.0.0",
|
|
30
|
-
version: "22.2.
|
|
30
|
+
version: "22.2.2",
|
|
31
31
|
ngImport: i0,
|
|
32
32
|
type: NavigationItemContentComponent,
|
|
33
33
|
deps: [],
|
|
@@ -35,7 +35,7 @@ var NavigationItemContentComponent = class NavigationItemContentComponent {
|
|
|
35
35
|
});
|
|
36
36
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
37
37
|
minVersion: "17.0.0",
|
|
38
|
-
version: "22.2.
|
|
38
|
+
version: "22.2.2",
|
|
39
39
|
type: NavigationItemContentComponent,
|
|
40
40
|
isStandalone: true,
|
|
41
41
|
selector: "NavigationItemContent",
|
|
@@ -144,7 +144,7 @@ var NavigationItemContentComponent = class NavigationItemContentComponent {
|
|
|
144
144
|
};
|
|
145
145
|
i0.ɵɵngDeclareClassMetadata({
|
|
146
146
|
minVersion: "12.0.0",
|
|
147
|
-
version: "22.2.
|
|
147
|
+
version: "22.2.2",
|
|
148
148
|
ngImport: i0,
|
|
149
149
|
type: NavigationItemContentComponent,
|
|
150
150
|
decorators: [{
|
|
@@ -248,6 +248,9 @@ function safeNavId(value) {
|
|
|
248
248
|
}
|
|
249
249
|
var NavigationItemComponent = class NavigationItemComponent {
|
|
250
250
|
nav = inject(NAVIGATION_ADAPTER);
|
|
251
|
+
routeContext = inject(NAVIGATION_ROUTE_CONTEXT_ADAPTER);
|
|
252
|
+
router = inject(Router, { optional: true });
|
|
253
|
+
activatedRoute = inject(ActivatedRoute, { optional: true });
|
|
251
254
|
navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
|
|
252
255
|
item = input.required(...ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []);
|
|
253
256
|
level = input(0, ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
|
|
@@ -275,6 +278,12 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
275
278
|
userToggled = signal(false, ...ngDevMode ? [{ debugName: "userToggled" }] : /* istanbul ignore next */ []);
|
|
276
279
|
isHorizontalRoot = computed(() => this.orientation() === "horizontal" && this.level() === 0, ...ngDevMode ? [{ debugName: "isHorizontalRoot" }] : /* istanbul ignore next */ []);
|
|
277
280
|
isActive = computed(() => this.nav.isItemActive(this.item(), this.activeIds(), this.activeUrl()), ...ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []);
|
|
281
|
+
isRouteActive = computed(() => {
|
|
282
|
+
const item = this.item();
|
|
283
|
+
if (item.disabled || !this.router?.lastSuccessfulNavigation()) return false;
|
|
284
|
+
return this.routeContext.isItemRouteActive(item, null, this.activatedRoute);
|
|
285
|
+
}, ...ngDevMode ? [{ debugName: "isRouteActive" }] : /* istanbul ignore next */ []);
|
|
286
|
+
isRouterItemActive = computed(() => this.isRouteActive() || this.isActive(), ...ngDevMode ? [{ debugName: "isRouterItemActive" }] : /* istanbul ignore next */ []);
|
|
278
287
|
showChildren = computed(() => !this.compact() && this.isOpen(), ...ngDevMode ? [{ debugName: "showChildren" }] : /* istanbul ignore next */ []);
|
|
279
288
|
hostClasses = computed(() => {
|
|
280
289
|
if (this.item().type === "divider") return this.dividerClasses();
|
|
@@ -305,9 +314,6 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
305
314
|
relFor() {
|
|
306
315
|
return this.nav.relFor(this.item());
|
|
307
316
|
}
|
|
308
|
-
routerLinkActiveOptions() {
|
|
309
|
-
return this.nav.routerLinkActiveOptions(this.item());
|
|
310
|
-
}
|
|
311
317
|
itemRole() {
|
|
312
318
|
return this.nav.itemRole(this.orientation(), this.level());
|
|
313
319
|
}
|
|
@@ -390,7 +396,7 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
390
396
|
}
|
|
391
397
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
392
398
|
minVersion: "12.0.0",
|
|
393
|
-
version: "22.2.
|
|
399
|
+
version: "22.2.2",
|
|
394
400
|
ngImport: i0,
|
|
395
401
|
type: NavigationItemComponent,
|
|
396
402
|
deps: [],
|
|
@@ -398,7 +404,7 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
398
404
|
});
|
|
399
405
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
400
406
|
minVersion: "17.0.0",
|
|
401
|
-
version: "22.2.
|
|
407
|
+
version: "22.2.2",
|
|
402
408
|
type: NavigationItemComponent,
|
|
403
409
|
isStandalone: true,
|
|
404
410
|
selector: "li[NavigationItem]",
|
|
@@ -618,7 +624,7 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
618
624
|
@default {
|
|
619
625
|
@if (isRouterItem()) {
|
|
620
626
|
<a
|
|
621
|
-
[class]="leafClasses(
|
|
627
|
+
[class]="leafClasses(isRouterItemActive())"
|
|
622
628
|
[routerLink]="routerLinkFor()"
|
|
623
629
|
[queryParams]="item().queryParams ?? null"
|
|
624
630
|
[queryParamsHandling]="item().queryParamsHandling ?? null"
|
|
@@ -626,10 +632,7 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
626
632
|
[preserveFragment]="item().preserveFragment ?? false"
|
|
627
633
|
[target]="item().target ?? undefined"
|
|
628
634
|
[attr.rel]="relFor()"
|
|
629
|
-
|
|
630
|
-
#routerActive="routerLinkActive"
|
|
631
|
-
[routerLinkActiveOptions]="routerLinkActiveOptions()"
|
|
632
|
-
[attr.aria-current]="routerActive.isActive || isActive() ? 'page' : null"
|
|
635
|
+
[attr.aria-current]="isRouterItemActive() ? 'page' : null"
|
|
633
636
|
[attr.aria-disabled]="item().disabled || null"
|
|
634
637
|
[attr.tabindex]="leafTabIndex()"
|
|
635
638
|
[attr.aria-label]="compactLabel()"
|
|
@@ -642,7 +645,7 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
642
645
|
>
|
|
643
646
|
<NavigationItemContent
|
|
644
647
|
[item]="item()"
|
|
645
|
-
[active]="
|
|
648
|
+
[active]="isRouterItemActive()"
|
|
646
649
|
[compact]="compact()"
|
|
647
650
|
[orientation]="orientation()"
|
|
648
651
|
[level]="level()"
|
|
@@ -683,6 +686,8 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
683
686
|
[attr.aria-current]="isActive() ? 'page' : null"
|
|
684
687
|
[attr.aria-label]="compactLabel()"
|
|
685
688
|
[attr.title]="titleFor()"
|
|
689
|
+
[Tooltip]="compact() ? (titleFor() ?? '') : ''"
|
|
690
|
+
[TooltipPosition]="tooltipPosition()"
|
|
686
691
|
[attr.role]="itemRole()"
|
|
687
692
|
[attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
|
|
688
693
|
(click)="selectItem($event)"
|
|
@@ -821,18 +826,6 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
821
826
|
"routerLink"
|
|
822
827
|
]
|
|
823
828
|
},
|
|
824
|
-
{
|
|
825
|
-
kind: "directive",
|
|
826
|
-
type: RouterLinkActive,
|
|
827
|
-
selector: "[routerLinkActive]",
|
|
828
|
-
inputs: [
|
|
829
|
-
"routerLinkActiveOptions",
|
|
830
|
-
"ariaCurrentWhenActive",
|
|
831
|
-
"routerLinkActive"
|
|
832
|
-
],
|
|
833
|
-
outputs: ["isActiveChange"],
|
|
834
|
-
exportAs: ["routerLinkActive"]
|
|
835
|
-
},
|
|
836
829
|
{
|
|
837
830
|
kind: "directive",
|
|
838
831
|
type: TooltipDirective,
|
|
@@ -851,7 +844,7 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
851
844
|
};
|
|
852
845
|
i0.ɵɵngDeclareClassMetadata({
|
|
853
846
|
minVersion: "12.0.0",
|
|
854
|
-
version: "22.2.
|
|
847
|
+
version: "22.2.2",
|
|
855
848
|
ngImport: i0,
|
|
856
849
|
type: NavigationItemComponent,
|
|
857
850
|
decorators: [{
|
|
@@ -863,7 +856,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
863
856
|
NavigationItemContentComponent,
|
|
864
857
|
NgTemplateOutlet,
|
|
865
858
|
RouterLink,
|
|
866
|
-
RouterLinkActive,
|
|
867
859
|
TooltipDirective
|
|
868
860
|
],
|
|
869
861
|
host: {
|
|
@@ -956,7 +948,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
956
948
|
@default {
|
|
957
949
|
@if (isRouterItem()) {
|
|
958
950
|
<a
|
|
959
|
-
[class]="leafClasses(
|
|
951
|
+
[class]="leafClasses(isRouterItemActive())"
|
|
960
952
|
[routerLink]="routerLinkFor()"
|
|
961
953
|
[queryParams]="item().queryParams ?? null"
|
|
962
954
|
[queryParamsHandling]="item().queryParamsHandling ?? null"
|
|
@@ -964,10 +956,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
964
956
|
[preserveFragment]="item().preserveFragment ?? false"
|
|
965
957
|
[target]="item().target ?? undefined"
|
|
966
958
|
[attr.rel]="relFor()"
|
|
967
|
-
|
|
968
|
-
#routerActive="routerLinkActive"
|
|
969
|
-
[routerLinkActiveOptions]="routerLinkActiveOptions()"
|
|
970
|
-
[attr.aria-current]="routerActive.isActive || isActive() ? 'page' : null"
|
|
959
|
+
[attr.aria-current]="isRouterItemActive() ? 'page' : null"
|
|
971
960
|
[attr.aria-disabled]="item().disabled || null"
|
|
972
961
|
[attr.tabindex]="leafTabIndex()"
|
|
973
962
|
[attr.aria-label]="compactLabel()"
|
|
@@ -980,7 +969,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
980
969
|
>
|
|
981
970
|
<NavigationItemContent
|
|
982
971
|
[item]="item()"
|
|
983
|
-
[active]="
|
|
972
|
+
[active]="isRouterItemActive()"
|
|
984
973
|
[compact]="compact()"
|
|
985
974
|
[orientation]="orientation()"
|
|
986
975
|
[level]="level()"
|
|
@@ -1021,6 +1010,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1021
1010
|
[attr.aria-current]="isActive() ? 'page' : null"
|
|
1022
1011
|
[attr.aria-label]="compactLabel()"
|
|
1023
1012
|
[attr.title]="titleFor()"
|
|
1013
|
+
[Tooltip]="compact() ? (titleFor() ?? '') : ''"
|
|
1014
|
+
[TooltipPosition]="tooltipPosition()"
|
|
1024
1015
|
[attr.role]="itemRole()"
|
|
1025
1016
|
[attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
|
|
1026
1017
|
(click)="selectItem($event)"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-
|
|
1
|
+
import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-CUb68MZH.mjs";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { Component, computed, input, output } from "@angular/core";
|
|
4
4
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
@@ -7,6 +7,7 @@ var NavigationListComponent = class NavigationListComponent {
|
|
|
7
7
|
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
8
8
|
collapsed = input(false, ...ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []);
|
|
9
9
|
compact = input(false, ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
|
|
10
|
+
fill = input(false, ...ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []);
|
|
10
11
|
position = input("left", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
11
12
|
itemClass = input("", ...ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []);
|
|
12
13
|
activeIds = input(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "activeIds" }] : /* istanbul ignore next */ []);
|
|
@@ -17,11 +18,11 @@ var NavigationListComponent = class NavigationListComponent {
|
|
|
17
18
|
openedIdsChange = output();
|
|
18
19
|
itemSelected = output();
|
|
19
20
|
isCollapsed = computed(() => this.collapsed() || this.compact(), ...ngDevMode ? [{ debugName: "isCollapsed" }] : /* istanbul ignore next */ []);
|
|
20
|
-
hostClasses = computed(() => cn("block", this.position() === "right" && "items-end text-right"), ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
|
|
21
|
-
listClasses = computed(() => this.isCollapsed() ?
|
|
21
|
+
hostClasses = computed(() => this.fill() ? cn("flex flex-1 flex-col", this.position() === "right" && "text-right") : cn("block", this.position() === "right" && "items-end text-right"), ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
|
|
22
|
+
listClasses = computed(() => cn(this.isCollapsed() ? "flex list-none flex-col items-center gap-0.5 p-0" : cn("flex list-none flex-col gap-0.5 p-0", this.position() === "right" && "items-end"), this.fill() && "flex-1"), ...ngDevMode ? [{ debugName: "listClasses" }] : /* istanbul ignore next */ []);
|
|
22
23
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
24
|
minVersion: "12.0.0",
|
|
24
|
-
version: "22.2.
|
|
25
|
+
version: "22.2.2",
|
|
25
26
|
ngImport: i0,
|
|
26
27
|
type: NavigationListComponent,
|
|
27
28
|
deps: [],
|
|
@@ -29,7 +30,7 @@ var NavigationListComponent = class NavigationListComponent {
|
|
|
29
30
|
});
|
|
30
31
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
31
32
|
minVersion: "17.0.0",
|
|
32
|
-
version: "22.2.
|
|
33
|
+
version: "22.2.2",
|
|
33
34
|
type: NavigationListComponent,
|
|
34
35
|
isStandalone: true,
|
|
35
36
|
selector: "NavigationList",
|
|
@@ -62,6 +63,13 @@ var NavigationListComponent = class NavigationListComponent {
|
|
|
62
63
|
isRequired: false,
|
|
63
64
|
transformFunction: null
|
|
64
65
|
},
|
|
66
|
+
fill: {
|
|
67
|
+
classPropertyName: "fill",
|
|
68
|
+
publicName: "fill",
|
|
69
|
+
isSignal: true,
|
|
70
|
+
isRequired: false,
|
|
71
|
+
transformFunction: null
|
|
72
|
+
},
|
|
65
73
|
position: {
|
|
66
74
|
classPropertyName: "position",
|
|
67
75
|
publicName: "position",
|
|
@@ -173,7 +181,7 @@ var NavigationListComponent = class NavigationListComponent {
|
|
|
173
181
|
};
|
|
174
182
|
i0.ɵɵngDeclareClassMetadata({
|
|
175
183
|
minVersion: "12.0.0",
|
|
176
|
-
version: "22.2.
|
|
184
|
+
version: "22.2.2",
|
|
177
185
|
ngImport: i0,
|
|
178
186
|
type: NavigationListComponent,
|
|
179
187
|
decorators: [{
|
|
@@ -242,6 +250,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
242
250
|
required: false
|
|
243
251
|
}]
|
|
244
252
|
}],
|
|
253
|
+
fill: [{
|
|
254
|
+
type: i0.Input,
|
|
255
|
+
args: [{
|
|
256
|
+
isSignal: true,
|
|
257
|
+
alias: "fill",
|
|
258
|
+
required: false
|
|
259
|
+
}]
|
|
260
|
+
}],
|
|
245
261
|
position: [{
|
|
246
262
|
type: i0.Input,
|
|
247
263
|
args: [{
|
|
@@ -94,13 +94,14 @@ var NavigationPersistence = class {
|
|
|
94
94
|
}
|
|
95
95
|
persistedTypeMode(state) {
|
|
96
96
|
if (state.type === "dockbar") return state.dockbarMode;
|
|
97
|
+
if (state.type === "minidock") return "default";
|
|
97
98
|
return state.collapsed ? "collapsed" : "default";
|
|
98
99
|
}
|
|
99
100
|
isPersistedTypeMode(value) {
|
|
100
101
|
return value === "default" || value === "collapsed" || this.isDockbarMode(value);
|
|
101
102
|
}
|
|
102
103
|
isTypeForOrientation(value, orientation) {
|
|
103
|
-
return orientation === "vertical" ? value === "sidebar" || value === "dockbar" : value === "navbar" || value === "flyout";
|
|
104
|
+
return orientation === "vertical" ? value === "sidebar" || value === "dockbar" || value === "minidock" : value === "navbar" || value === "flyout";
|
|
104
105
|
}
|
|
105
106
|
isPositionForOrientation(value, orientation) {
|
|
106
107
|
return orientation === "vertical" ? value === "left" || value === "right" : value === "top" || value === "bottom";
|
|
@@ -374,6 +375,7 @@ var NavigationService = class NavigationService {
|
|
|
374
375
|
id: navId,
|
|
375
376
|
orientation: "vertical"
|
|
376
377
|
});
|
|
378
|
+
if (current.type === "minidock") return current;
|
|
377
379
|
return this.setCollapsed(navId, !current.collapsed);
|
|
378
380
|
}
|
|
379
381
|
setDockbarMode(id, mode) {
|
|
@@ -523,7 +525,7 @@ var NavigationService = class NavigationService {
|
|
|
523
525
|
}
|
|
524
526
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
525
527
|
minVersion: "12.0.0",
|
|
526
|
-
version: "22.2.
|
|
528
|
+
version: "22.2.2",
|
|
527
529
|
ngImport: i0,
|
|
528
530
|
type: NavigationService,
|
|
529
531
|
deps: [],
|
|
@@ -531,14 +533,14 @@ var NavigationService = class NavigationService {
|
|
|
531
533
|
});
|
|
532
534
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
533
535
|
minVersion: "22.0.0",
|
|
534
|
-
version: "22.2.
|
|
536
|
+
version: "22.2.2",
|
|
535
537
|
ngImport: i0,
|
|
536
538
|
type: NavigationService
|
|
537
539
|
});
|
|
538
540
|
};
|
|
539
541
|
i0.ɵɵngDeclareClassMetadata({
|
|
540
542
|
minVersion: "12.0.0",
|
|
541
|
-
version: "22.2.
|
|
543
|
+
version: "22.2.2",
|
|
542
544
|
ngImport: i0,
|
|
543
545
|
type: NavigationService,
|
|
544
546
|
decorators: [{ type: Service }],
|
|
@@ -36,4 +36,116 @@ function formatNavigationBadgeCount(value) {
|
|
|
36
36
|
if (count <= 0) return null;
|
|
37
37
|
return count > 99 ? "99+" : String(count);
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
const MINIDOCK_REJECTED_TYPES = /* @__PURE__ */ new Set([
|
|
40
|
+
"group",
|
|
41
|
+
"collapsible",
|
|
42
|
+
"collapsable",
|
|
43
|
+
"mega",
|
|
44
|
+
"aside"
|
|
45
|
+
]);
|
|
46
|
+
const MINIDOCK_ERROR_PREFIX = "[Navigation] Minidock hanya menerima item basic, divider, dan spacer.";
|
|
47
|
+
function ɵcompactNavigationDividers(items) {
|
|
48
|
+
const result = [];
|
|
49
|
+
let run = [];
|
|
50
|
+
for (const item of items) {
|
|
51
|
+
if (item.type === "divider") {
|
|
52
|
+
run.push(item);
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (run.length > 0 && result.length > 0) result.push(run.find((divider) => !divider.isHidden) ?? run[0]);
|
|
56
|
+
run = [];
|
|
57
|
+
result.push(item);
|
|
58
|
+
}
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
function ɵassertMinidockItems(items) {
|
|
62
|
+
items.forEach((item, index) => {
|
|
63
|
+
const label = `Item [${index}] "${item.title ?? item.id ?? ""}"`;
|
|
64
|
+
if (item.type && MINIDOCK_REJECTED_TYPES.has(item.type)) throw new Error(`${MINIDOCK_ERROR_PREFIX} ${label} bertipe "${item.type}".`);
|
|
65
|
+
if ((item.children?.length ?? 0) > 0) throw new Error(`${MINIDOCK_ERROR_PREFIX} ${label} punya children.`);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function toMinidockItems(items) {
|
|
69
|
+
const output = [];
|
|
70
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
71
|
+
let boundaryPending = false;
|
|
72
|
+
const visit = (list, ancestors) => {
|
|
73
|
+
const topLevel = ancestors.length === 0;
|
|
74
|
+
for (const item of list) {
|
|
75
|
+
const children = item.children ?? [];
|
|
76
|
+
if (item.type === "divider") {
|
|
77
|
+
output.push(withAncestorVisibility(withoutChildren(item), ancestors));
|
|
78
|
+
boundaryPending = false;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (item.type === "spacer") {
|
|
82
|
+
if (topLevel) {
|
|
83
|
+
output.push(withoutChildren(item));
|
|
84
|
+
boundaryPending = false;
|
|
85
|
+
}
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (item.type === "group" || item.type === "mega") {
|
|
89
|
+
const start = output.length;
|
|
90
|
+
const pendingBefore = boundaryPending;
|
|
91
|
+
const divider = { type: "divider" };
|
|
92
|
+
const isHidden = chainedVisibility([...ancestors, item]);
|
|
93
|
+
output.push(isHidden ? {
|
|
94
|
+
...divider,
|
|
95
|
+
isHidden
|
|
96
|
+
} : divider);
|
|
97
|
+
boundaryPending = false;
|
|
98
|
+
visit(children, [...ancestors, item]);
|
|
99
|
+
if (!output.slice(start + 1).some(isContent)) {
|
|
100
|
+
output.length = start;
|
|
101
|
+
boundaryPending = pendingBefore;
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
boundaryPending = true;
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
if (item.type && MINIDOCK_REJECTED_TYPES.has(item.type)) {
|
|
108
|
+
visit(children, [...ancestors, item]);
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (children.length > 0) {
|
|
112
|
+
visit(children, [...ancestors, item]);
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (item.id !== void 0) {
|
|
116
|
+
if (seenIds.has(item.id)) continue;
|
|
117
|
+
seenIds.add(item.id);
|
|
118
|
+
}
|
|
119
|
+
if (boundaryPending) {
|
|
120
|
+
output.push({ type: "divider" });
|
|
121
|
+
boundaryPending = false;
|
|
122
|
+
}
|
|
123
|
+
output.push(withAncestorVisibility(item, ancestors));
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
visit(items, []);
|
|
127
|
+
return ɵcompactNavigationDividers(output);
|
|
128
|
+
}
|
|
129
|
+
function isContent(item) {
|
|
130
|
+
return item.type !== "divider";
|
|
131
|
+
}
|
|
132
|
+
function withoutChildren(item) {
|
|
133
|
+
if (item.children === void 0) return item;
|
|
134
|
+
const copy = { ...item };
|
|
135
|
+
delete copy.children;
|
|
136
|
+
return copy;
|
|
137
|
+
}
|
|
138
|
+
function chainedVisibility(chain) {
|
|
139
|
+
const hiders = chain.filter((entry) => entry.isHidden !== void 0);
|
|
140
|
+
if (hiders.length === 0) return null;
|
|
141
|
+
return () => hiders.some((entry) => entry.isHidden?.(entry) === true);
|
|
142
|
+
}
|
|
143
|
+
function withAncestorVisibility(leaf, ancestors) {
|
|
144
|
+
const ancestorHidden = chainedVisibility(ancestors);
|
|
145
|
+
if (ancestorHidden === null) return leaf;
|
|
146
|
+
return {
|
|
147
|
+
...leaf,
|
|
148
|
+
isHidden: () => ancestorHidden(leaf) || leaf.isHidden?.(leaf) === true
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export { NAVIGATION_DOCKBAR_FALLBACK_ICON, formatNavigationBadgeCount, normalizeUiNavItems, toMinidockItems, ɵassertMinidockItems, ɵcompactNavigationDividers };
|