@ojiepermana/angular 22.2.6 → 22.2.7

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.
@@ -1,6 +1,6 @@
1
1
  import { i as hasNavigationCountBadge } 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";
3
- import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-6mJbQ94G.mjs";
2
+ import { a as NAVIGATION_SHELL, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-2R9tPqQK.mjs";
3
+ import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-DO_eoMWG.mjs";
4
4
  import * as i0 from "@angular/core";
5
5
  import { Component, ElementRef, Injector, afterNextRender, computed, inject, input, output, signal } from "@angular/core";
6
6
  import { cn } from "@ojiepermana/angular/component/utils/core";
@@ -1,4 +1,4 @@
1
- import { i as NavigationItemBadgeComponent, n as navigationPanelId, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-6mJbQ94G.mjs";
1
+ import { i as NavigationItemBadgeComponent, n as navigationPanelId, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-2R9tPqQK.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";
@@ -1,5 +1,5 @@
1
- import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-6mJbQ94G.mjs";
2
- import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-1WiRlut1.mjs";
1
+ import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-2R9tPqQK.mjs";
2
+ import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-nge3WGLa.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";
@@ -1,6 +1,6 @@
1
1
  import { i as hasNavigationCountBadge } from "./ojiepermana-angular-navigation-navigation-badge-count.component-D-WgBF6d.mjs";
2
- import { n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-6mJbQ94G.mjs";
3
- import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-1WiRlut1.mjs";
2
+ import { n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-2R9tPqQK.mjs";
3
+ import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-nge3WGLa.mjs";
4
4
  import * as i0 from "@angular/core";
5
5
  import { Component, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal } from "@angular/core";
6
6
  import { cn } from "@ojiepermana/angular/component/utils/core";
@@ -1,6 +1,6 @@
1
1
  import { i as hasNavigationCountBadge, s as navigationDescendantBadgeSources, t as NavigationBadgeCountComponent } from "./ojiepermana-angular-navigation-navigation-badge-count.component-D-WgBF6d.mjs";
2
2
  import * as i0 from "@angular/core";
3
- import { Component, computed, inject, input, output, signal } from "@angular/core";
3
+ import { Component, InjectionToken, computed, inject, input, output, signal } from "@angular/core";
4
4
  import { ActivatedRoute, Router, RouterLink } from "@angular/router";
5
5
  import { cn } from "@ojiepermana/angular/component/utils/core";
6
6
  import { NAVIGATION_ADAPTER, NAVIGATION_ROUTE_CONTEXT_ADAPTER } from "@ojiepermana/angular/navigation/core";
@@ -8,6 +8,7 @@ import { NgTemplateOutlet } from "@angular/common";
8
8
  import { LucideChevronRight } from "@lucide/angular";
9
9
  import { IconComponent, provideIcons } from "@ojiepermana/angular/component/icon";
10
10
  import { TooltipDirective } from "@ojiepermana/angular/component/tooltip";
11
+ const NAVIGATION_SHELL = new InjectionToken("NAVIGATION_SHELL");
11
12
  var NavigationItemBadgeComponent = class NavigationItemBadgeComponent {
12
13
  staticClass = input("nav-badge ml-auto inline-flex h-5 shrink-0 items-center self-center rounded-full bg-muted px-2 text-muted-foreground", ...ngDevMode ? [{ debugName: "staticClass" }] : /* istanbul ignore next */ []);
13
14
  compact = input(false, ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
@@ -472,6 +473,7 @@ function safeNavId(value) {
472
473
  var NavigationItemComponent = class NavigationItemComponent {
473
474
  hasCountBadge = hasNavigationCountBadge;
474
475
  nav = inject(NAVIGATION_ADAPTER);
476
+ shell = inject(NAVIGATION_SHELL, { optional: true });
475
477
  routeContext = inject(NAVIGATION_ROUTE_CONTEXT_ADAPTER);
476
478
  router = inject(Router, { optional: true });
477
479
  activatedRoute = inject(ActivatedRoute, { optional: true });
@@ -498,6 +500,10 @@ var NavigationItemComponent = class NavigationItemComponent {
498
500
  openedIds = input([], ...ngDevMode ? [{ debugName: "openedIds" }] : /* istanbul ignore next */ []);
499
501
  openedIdsChange = output();
500
502
  itemSelected = output();
503
+ showGroupBadge = computed(() => {
504
+ const badge = this.item().badge;
505
+ return this.shell?.displayState().type !== "sidebar" || !badge?.source && !!badge?.title;
506
+ }, ...ngDevMode ? [{ debugName: "showGroupBadge" }] : /* istanbul ignore next */ []);
501
507
  openedIdSet = computed(() => new Set(this.openedIds()), ...ngDevMode ? [{ debugName: "openedIdSet" }] : /* istanbul ignore next */ []);
502
508
  listedAsOpen = computed(() => this.openedIdSet().has(this.item().stateId) || this.openedIdSet().has(this.item().key), ...ngDevMode ? [{ debugName: "listedAsOpen" }] : /* istanbul ignore next */ []);
503
509
  userToggled = signal(false, ...ngDevMode ? [{ debugName: "userToggled" }] : /* istanbul ignore next */ []);
@@ -796,11 +802,13 @@ var NavigationItemComponent = class NavigationItemComponent {
796
802
  </span>
797
803
  }
798
804
  </span>
799
- <NavigationItemBadge
800
- [children]="item().children"
801
- [itemBadge]="item().badge"
802
- [badgeContext]="badgeContext()"
803
- />
805
+ @if (showGroupBadge()) {
806
+ <NavigationItemBadge
807
+ [children]="item().children"
808
+ [itemBadge]="item().badge"
809
+ [badgeContext]="badgeContext()"
810
+ />
811
+ }
804
812
  </div>
805
813
  }
806
814
 
@@ -1153,11 +1161,13 @@ i0.ɵɵngDeclareClassMetadata({
1153
1161
  </span>
1154
1162
  }
1155
1163
  </span>
1156
- <NavigationItemBadge
1157
- [children]="item().children"
1158
- [itemBadge]="item().badge"
1159
- [badgeContext]="badgeContext()"
1160
- />
1164
+ @if (showGroupBadge()) {
1165
+ <NavigationItemBadge
1166
+ [children]="item().children"
1167
+ [itemBadge]="item().badge"
1168
+ [badgeContext]="badgeContext()"
1169
+ />
1170
+ }
1161
1171
  </div>
1162
1172
  }
1163
1173
 
@@ -1509,4 +1519,4 @@ i0.ɵɵngDeclareClassMetadata({
1509
1519
  }]
1510
1520
  }
1511
1521
  });
1512
- export { NavigationItemBadgeComponent as i, navigationPanelId as n, NavigationItemContentComponent as r, NavigationItemComponent as t };
1522
+ export { NAVIGATION_SHELL as a, NavigationItemBadgeComponent as i, navigationPanelId as n, NavigationItemContentComponent as r, NavigationItemComponent as t };
@@ -1,8 +1,7 @@
1
- import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-6mJbQ94G.mjs";
1
+ import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-2R9tPqQK.mjs";
2
2
  import * as i0 from "@angular/core";
3
- import { Component, InjectionToken, computed, input, output } from "@angular/core";
3
+ import { Component, computed, input, output } from "@angular/core";
4
4
  import { cn } from "@ojiepermana/angular/component/utils/core";
5
- const NAVIGATION_SHELL = new InjectionToken("NAVIGATION_SHELL");
6
5
  var NavigationListComponent = class NavigationListComponent {
7
6
  badgeContext = input({}, ...ngDevMode ? [{ debugName: "badgeContext" }] : /* istanbul ignore next */ []);
8
7
  navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
@@ -344,4 +343,4 @@ i0.ɵɵngDeclareClassMetadata({
344
343
  }]
345
344
  }
346
345
  });
347
- export { NAVIGATION_SHELL as n, NavigationListComponent as t };
346
+ export { NavigationListComponent as t };
@@ -1,5 +1,6 @@
1
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
+ import { a as NAVIGATION_SHELL } from "./ojiepermana-angular-navigation-navigation-item.component-2R9tPqQK.mjs";
3
+ import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-DO_eoMWG.mjs";
3
4
  import * as i0 from "@angular/core";
4
5
  import { Component, DestroyRef, Directive, ElementRef, Injector, TemplateRef, ViewContainerRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, isDevMode, model, output, signal } from "@angular/core";
5
6
  import { ActivatedRoute } from "@angular/router";
@@ -800,9 +801,9 @@ var NavigationContentComponent = class NavigationContentComponent {
800
801
  outputs: ["openedIdsChange", "itemSelected"]
801
802
  }],
802
803
  deferBlockDependencies: [
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)]
804
+ () => [import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-CeoyWTbP.mjs").then((m) => m.NavigationFlyoutMenuComponent)],
805
+ () => [import("./ojiepermana-angular-navigation-navigation-horizontal.component-BhE_XVog.mjs").then((m) => m.NavigationHorizontalComponent)],
806
+ () => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-DqomVKM3.mjs").then((m) => m.NavigationDockbarMenuComponent)]
806
807
  ]
807
808
  });
808
809
  };
@@ -812,9 +813,9 @@ i0.ɵɵngDeclareClassMetadataAsync({
812
813
  ngImport: i0,
813
814
  type: NavigationContentComponent,
814
815
  resolveDeferredDeps: () => [
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)
816
+ import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-CeoyWTbP.mjs").then((m) => m.NavigationFlyoutMenuComponent),
817
+ import("./ojiepermana-angular-navigation-navigation-horizontal.component-BhE_XVog.mjs").then((m) => m.NavigationHorizontalComponent),
818
+ import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-DqomVKM3.mjs").then((m) => m.NavigationDockbarMenuComponent)
818
819
  ],
819
820
  resolveMetadata: (NavigationFlyoutMenuComponent, NavigationHorizontalComponent, NavigationDockbarMenuComponent) => ({
820
821
  decorators: [{
@@ -552,6 +552,12 @@ total when its icon moves from the rail to the built-in route header. Existing e
552
552
  badge keys keep their fallback priority in that header. Minidock accepts flat items only, so it never renders
553
553
  parent totals. `toMinidockItems()` preserves individual leaf badges without copying parent totals.
554
554
 
555
+ Sidebar items with `type: 'group'` are section headings and never display count badges, including
556
+ their own `badge.source` or an automatic descendant total. Their children keep individual counts,
557
+ and a text-only `badge.title` on the heading still displays. Sidebar collapsible parents and group
558
+ items in dockbar, navbar, and flyout retain the count behavior described above. Toggle **Group heading**
559
+ in the showcase's **Parent totals** example to compare these cases.
560
+
555
561
  ### Migration
556
562
 
557
563
  Existing `<NavigationDockbar [dockbar-badge]="registry" />` continues to work, including its
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ojiepermana/angular",
3
- "version": "22.2.6",
3
+ "version": "22.2.7",
4
4
  "description": "Accessible, tree-shakable Angular 22 design system from ojiepermana: UI components, charts, navigation shells, theme tokens, and an OpenAPI SDK generator.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -503,5 +503,5 @@
503
503
  "module": "fesm2022/ojiepermana-angular.mjs",
504
504
  "typings": "types/ojiepermana-angular.d.ts",
505
505
  "type": "module",
506
- "gitHead": "36761836fcc9ad9cd75bca17dc88834061ea4572"
506
+ "gitHead": "73ac415b1ff31412df76197c72e648694f9c63e8"
507
507
  }