@filip.mazev/blocks 1.4.16 → 1.4.18
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/core/styles/_field-actions.scss +36 -0
- package/core/styles/_helpers.scss +2 -0
- package/core/styles/_slider-rail.scss +11 -0
- package/core/styles/_slider.scss +3 -5
- package/fesm2022/filip.mazev-blocks-core.mjs +56 -9
- package/fesm2022/filip.mazev-blocks-core.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-forms.mjs +342 -77
- package/fesm2022/filip.mazev-blocks-forms.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-navigation.mjs +1176 -11
- package/fesm2022/filip.mazev-blocks-navigation.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-primitives.mjs +441 -7
- package/fesm2022/filip.mazev-blocks-primitives.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks.mjs +1 -1
- package/fesm2022/filip.mazev-blocks.mjs.map +1 -1
- package/package.json +1 -1
- package/types/filip.mazev-blocks-core.d.ts +19 -2
- package/types/filip.mazev-blocks-forms.d.ts +77 -3
- package/types/filip.mazev-blocks-navigation.d.ts +348 -4
- package/types/filip.mazev-blocks-primitives.d.ts +112 -0
- package/types/filip.mazev-blocks.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filip.mazev-blocks-navigation.mjs","names":[],"sources":["../../../projects/blocks/navigation/tokens/navigation-config.token.ts","../../../projects/blocks/navigation/tokens/navigation-access-adapter.token.ts","../../../projects/blocks/navigation/services/navigation.service.ts","../../../projects/blocks/navigation/components/breadcrumbs/breadcrumbs.ts","../../../projects/blocks/navigation/components/breadcrumbs/breadcrumbs.html","../../../projects/blocks/navigation/helpers/navigation-functions.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { INavigationConfig } from '../interfaces/inavigation-config.interface';\n\nexport const NAVIGATION_CONFIG = new InjectionToken<INavigationConfig>('NAVIGATION_CONFIG');\n","import { InjectionToken } from '@angular/core';\nimport { INavigationAccessAdapter } from '../interfaces/inavigation-access-adapter.interface';\n\nexport const NAVIGATION_ACCESS_ADAPTER = new InjectionToken<INavigationAccessAdapter>('NAVIGATION_ACCESS_ADAPTER');\n","import { computed, inject, Injectable, Signal } from '@angular/core';\nimport { ActivatedRouteSnapshot, NavigationEnd, Router, Routes } from '@angular/router';\nimport { NAVIGATION_CONFIG } from '../tokens/navigation-config.token';\nimport { IResolvedNavigation } from '../interfaces/iresolved-navigation.interface';\nimport { filter } from 'rxjs';\nimport { IBreadcrumbItem } from '../interfaces/ibreadcrumb-item.interface';\nimport { INavMeta } from '../interfaces/inav-meta.interface';\nimport { INavigationItem } from '../interfaces/inavigation-item.interface';\nimport { NAVIGATION_ACCESS_ADAPTER } from '../tokens/navigation-access-adapter.token';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { INavContext } from '../interfaces/inav-context.interface';\nimport { BX_I18N, isTextWithKey, ResolvableText } from '@filip.mazev/blocks/core';\nimport { NavText } from '../types/navigation.types';\nimport { INavigationGroup } from '../interfaces/inavigation-group.interface';\n\n@Injectable({ providedIn: 'root' })\nexport class NavigationService {\n private readonly router = inject(Router);\n private readonly config = inject(NAVIGATION_CONFIG, { optional: true });\n private readonly i18n = inject(BX_I18N, { optional: true });\n private readonly accessAdapter = inject(NAVIGATION_ACCESS_ADAPTER, { optional: true });\n\n private readonly navEnd = toSignal(this.router.events.pipe(filter((e): e is NavigationEnd => e instanceof NavigationEnd)));\n\n public readonly current = computed<IResolvedNavigation>(() => {\n this.navEnd();\n this.i18n?.version?.();\n return this.resolveCurrent(this.router.routerState.snapshot.root);\n });\n\n public readonly routeBase = computed<string | undefined>(() => {\n return this.accessAdapter?.resolveBaseRoute();\n });\n\n public readonly routes: Signal<INavigationItem[]> = computed(() => {\n this.i18n?.version?.();\n return this.extractRoutes(this.router.config);\n });\n\n public readonly baseRoute = computed<string | undefined>(() => {\n const viewableRoutes = this.routes();\n\n const primaryPrefix = this.routeBase();\n\n let firstFoundRoot: string | undefined;\n\n const findRootRoute = (items: INavigationItem[]): string | undefined => {\n for (const item of items) {\n if (item.data?.root) {\n if (!firstFoundRoot) {\n firstFoundRoot = item.route;\n }\n\n if (primaryPrefix && item.route.startsWith(primaryPrefix)) {\n return item.route;\n }\n }\n\n if (item.children?.length) {\n const childRoot = findRootRoute(item.children);\n if (childRoot) return childRoot;\n }\n }\n return undefined;\n };\n\n const perfectMatch = findRootRoute(viewableRoutes);\n\n return perfectMatch ?? firstFoundRoot ?? primaryPrefix;\n });\n\n public readonly menu = computed(() => this.buildMenu(this.routes()));\n\n public readonly menuGroups = computed<INavigationGroup[]>(() => {\n const sections = [...(this.config?.sections ?? [])].sort((a, b) => (a.order ?? Number.POSITIVE_INFINITY) - (b.order ?? Number.POSITIVE_INFINITY));\n const groups = new Map<string, INavigationGroup>(\n sections.map((section) => [section.id, { id: section.id, title: section.title ?? section.id, items: [] }])\n );\n\n for (const item of this.flattenRoutes(this.menu())) {\n if (!item.visible || item.data?.menu === false) continue;\n\n const id = item.section ?? '';\n let group = groups.get(id);\n if (!group) {\n group = { id, title: id, items: [] };\n groups.set(id, group);\n }\n group.items.push({ ...item, children: undefined });\n }\n\n return [...groups.values()].filter((group) => group.items.length > 0);\n });\n\n public navigateBack(): void {\n const breadcrumbs = this.current().breadcrumbs;\n\n if (breadcrumbs.length > 1) {\n const previousBreadcrumb = breadcrumbs[breadcrumbs.length - 2];\n this.router.navigateByUrl(previousBreadcrumb.route);\n } else {\n this.router.navigateByUrl(this.routeBase() ?? '/');\n }\n }\n\n //#region Helpers\n\n private extractRoutes(routes: Routes, parentSegment: string[] = []): INavigationItem[] {\n const items: INavigationItem[] = [];\n\n for (const route of routes) {\n if (route.redirectTo) continue;\n\n if (this.accessAdapter && !this.accessAdapter.canAccessMenu(route.data ?? {})) {\n continue;\n }\n\n const ownPath = route.path ?? '';\n\n const fullSegments = ownPath ? [...parentSegment, ownPath] : [...parentSegment];\n\n const fullRoute = '/' + fullSegments.filter(Boolean).join('/');\n\n const children = route.children?.length ? this.extractRoutes(route.children, fullSegments) : [];\n\n const nav = route.data?.['nav'] as INavMeta | undefined;\n\n if (!nav) {\n items.push(...children);\n continue;\n }\n\n const item = {\n id: fullRoute,\n route: fullRoute,\n label: this.resolveNavText(nav.label, { snapshot: undefined }) ?? '',\n icon: nav.icon,\n section: nav.section,\n visible: nav.visible ? nav.visible() : true,\n data: nav,\n children\n };\n\n items.push(item);\n }\n\n return this.sortNavigationItems(items);\n }\n\n private resolveCurrent(root: ActivatedRouteSnapshot): IResolvedNavigation {\n let currentNode: ActivatedRouteSnapshot | null = root;\n let finalSnapshot: ActivatedRouteSnapshot | undefined;\n\n while (currentNode) {\n const next: ActivatedRouteSnapshot | null = currentNode.children.find((child) => child.outlet === 'primary') ?? null;\n if (!next) {\n finalSnapshot = currentNode;\n break;\n }\n currentNode = next;\n }\n\n if (!finalSnapshot) return { breadcrumbs: [] };\n\n const urlSegments = finalSnapshot.pathFromRoot.flatMap((s) => s.url.map((u) => u.path)).filter(Boolean);\n\n const breadcrumbs: IBreadcrumbItem[] = [];\n const allItems = this.flattenRoutes(this.routes());\n let currentUrl = '';\n\n for (const segment of urlSegments) {\n currentUrl += '/' + segment;\n\n const matchingItem = this.matchRouteToUrl(allItems, currentUrl);\n\n if (matchingItem && matchingItem.data && !matchingItem.data.hidden) {\n const ctx: INavContext = { snapshot: finalSnapshot };\n\n const label = this.resolveNavText(matchingItem.data.breadcrumb, ctx) ?? this.resolveNavText(matchingItem.data.label, ctx);\n\n if (label && breadcrumbs[breadcrumbs.length - 1]?.label !== label) {\n breadcrumbs.push({ label, route: currentUrl });\n }\n }\n }\n\n const leafNav = finalSnapshot.routeConfig?.data?.['nav'] as INavMeta | undefined;\n const fullUrl = '/' + urlSegments.join('/');\n\n let current: INavigationItem | undefined;\n\n if (leafNav && !leafNav.hidden) {\n current = {\n id: fullUrl,\n route: fullUrl,\n label: this.resolveNavText(leafNav.label, { snapshot: finalSnapshot }) ?? '',\n icon: leafNav.icon,\n section: leafNav.section,\n visible: leafNav.visible ? leafNav.visible() : true,\n data: leafNav\n };\n }\n\n return { current, breadcrumbs };\n }\n\n private buildMenu(items: INavigationItem[]): INavigationItem[] {\n return items\n .map((item): INavigationItem | null => {\n const children = this.buildMenu(item.children ?? []);\n const includeSelf = item.visible && item.data?.menu !== false;\n\n if (!includeSelf && !children.length) {\n return null;\n }\n\n return {\n ...item,\n children\n };\n })\n .filter((item): item is INavigationItem => item !== null);\n }\n\n private sortNavigationItems(items: INavigationItem[]): INavigationItem[] {\n const customSort = this.config?.sortItems;\n\n return [...items].sort((a, b) => {\n if (customSort) {\n return customSort(a, b);\n }\n\n const orderA = a.data?.order ?? Number.POSITIVE_INFINITY;\n const orderB = b.data?.order ?? Number.POSITIVE_INFINITY;\n\n if (orderA !== orderB) return orderA - orderB;\n return a.label.localeCompare(b.label);\n });\n }\n\n private matchRouteToUrl(items: INavigationItem[], url: string): INavigationItem | undefined {\n const exactMatch = items.find((i) => i.route === url);\n if (exactMatch) return exactMatch;\n\n return items.find((i) => {\n if (!i.route.includes(':')) return false;\n const routeRegex = new RegExp('^' + i.route.replace(/:[^\\s/]+/g, '([^/]+)') + '$');\n return routeRegex.test(url);\n });\n }\n\n private flattenRoutes(items: INavigationItem[]): INavigationItem[] {\n return items.reduce((acc, item) => {\n acc.push(item);\n if (item.children) acc.push(...this.flattenRoutes(item.children));\n return acc;\n }, [] as INavigationItem[]);\n }\n\n private resolveNavText(textDef: NavText | undefined, ctx: INavContext): string | undefined {\n if (!textDef) return undefined;\n\n const text: ResolvableText = typeof textDef === 'function' ? textDef(ctx) : textDef;\n\n if (isTextWithKey(text)) {\n return this.i18n?.translate(text.key, { route: ctx.snapshot });\n }\n\n return text;\n }\n\n //#endregion\n}\n","import { Component, computed, inject, input, ChangeDetectionStrategy } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NavigationService } from '../../services/navigation.service';\nimport { Icon, IconName } from '@filip.mazev/blocks/icons';\nimport { BxA11yService } from '@filip.mazev/blocks/core';\n\n@Component({\n selector: 'bx-breadcrumbs',\n imports: [RouterLink, Icon],\n templateUrl: './breadcrumbs.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: './breadcrumbs.scss'\n})\nexport class Breadcrumbs {\n private readonly navigationService = inject(NavigationService);\n private readonly a11y = inject(BxA11yService);\n\n protected readonly isAnimated = computed(() => {\n return !this.a11y.isReducedMotion();\n });\n\n public readonly minimumBreadcrumbs = input<number>(2);\n public readonly divider = input<IconName>('chevron-right');\n\n protected showBreadcumbs = computed(() => {\n const minimum = Math.max(1, this.minimumBreadcrumbs());\n return this.current().breadcrumbs.length >= minimum;\n });\n\n protected ariaLabel = computed(() => {\n const labels = this.current()\n .breadcrumbs.map((crumb) => crumb.label)\n .join(' > ');\n return `Breadcrumbs: ${labels}`;\n });\n\n protected current = this.navigationService.current;\n}\n","@if(showBreadcumbs()) {\n<nav class=\"breadcrumbs\" [attr.aria-label]=\"ariaLabel()\">\n @for (crumb of current().breadcrumbs; track crumb.route; let last = $last) {\n @if (last) {\n <span class=\"crumb last\" aria-current=\"page\">{{ crumb.label }}</span>\n } @else {\n <a class=\"crumb\" [routerLink]=\"crumb.route\">{{ crumb.label }}</a>\n <bx-icon [name]=\"divider()\" size=\"16\" class=\"breadcrumb-separator\" />\n }\n }\n</nav>\n}\n","import { Strict } from '@filip.mazev/blocks/core';\nimport { INavMeta } from '../interfaces/inav-meta.interface';\nimport { INavigationConfig } from '../interfaces/inavigation-config.interface';\nimport { NAVIGATION_CONFIG } from '../tokens/navigation-config.token';\nimport { Route } from '@angular/router';\nimport { INavigationSectionConfig } from '../interfaces/inavigation-section-config.interface';\n\n/** Declares UI sections and binds route metadata to their literal IDs. */\nexport function defineNavigation<const TSections extends readonly INavigationSectionConfig[]>(\n config: Omit<INavigationConfig, 'sections'> & { sections: TSections }\n) {\n return {\n config,\n withNav<T extends INavMeta<TSections[number]['id']>>(route: Route, nav: Strict<T, INavMeta<TSections[number]['id']>>): Route {\n return withNav(route, nav);\n }\n };\n}\n\n/**\n *\n * @param config\n * This function is a helper to provide the navigation configuration in your Angular application.\n * It takes an `INavigationConfig` object as an argument and returns an array of providers that can be used in the `providers` array of your Angular module.\n * By using this function, you can easily set up the navigation configuration for your application without having to manually create the provider object each time.\n */\nexport function provideNavigation(config: INavigationConfig) {\n return [\n {\n provide: NAVIGATION_CONFIG,\n useValue: config\n }\n ];\n}\n\n/**\n *\n * @param route\n * @param nav\n * This function is a helper to attach navigation metadata to Angular routes. It takes an Angular `Route` object and a navigation metadata object of type `Strict<T, INavMeta>`, where `T`\n * is a generic type that can be used to enforce specific properties on the navigation metadata.\n * The function returns a new `Route` object with the provided navigation metadata merged into the existing route data under the 'nav' property.\n * This allows you to easily associate navigation information with your routes, which can then be used by navigation components to generate menus, breadcrumbs, etc.\n */\nexport function withNav<T extends INavMeta>(route: Route, nav: Strict<T, INavMeta>): Route {\n const existingNav = (route.data?.['nav'] as INavMeta | undefined) ?? {};\n\n return {\n ...route,\n data: {\n ...(route.data ?? {}),\n nav: {\n ...existingNav,\n ...nav\n }\n }\n };\n}\n"],"mappings":";;;;;;;AAGA,MAAa,oBAAoB,IAAI,eAAkC,mBAAmB;ACA1F,MAAa,4BAA4B,IAAI,eAAyC,2BAA2B;ACajH,IAAa,oBAAb,MAAa,kBAAiB;CACX,SAAS,OAAO,MAAM;CACtB,SAAS,OAAO,mBAAmB,EAAE,UAAU,KAAI,CAAE;CACrD,OAAO,OAAO,SAAS,EAAE,UAAU,KAAI,CAAE;CACzC,gBAAgB,OAAO,2BAA2B,EAAE,UAAU,KAAI,CAAE;CAEpE,SAAS,SAAS,KAAK,OAAO,OAAO,KAAK,QAAQ,MAA0B,aAAa,aAAa,CAAC,CAAC;CAEzG,UAAU,eAAmC;EAC3D,KAAK,OAAM;EACX,KAAK,MAAM,UAAS;EACpB,OAAO,KAAK,eAAe,KAAK,OAAO,YAAY,SAAS,IAAI;CAClE,G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AAA;IAAA;GAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAKf,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAW,YAAA,CAAA;EAPvB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,SACjB,CAAC,YAAY,IAAI;GAAC,iBAEV,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,wfAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;AEFjD,SAAgB,iBACd,QAAqE;CAErE,OAAO;EACL;EACA,QAAqD,OAAc,KAAiD;GAClH,OAAO,QAAQ,OAAO,GAAG;EAC3B;CACD;AACH;AASA,SAAgB,kBAAkB,QAAyB;CACzD,OAAO,CACL;EACE,SAAS;EACT,UAAU;CACX,CACF;AACH;AAWA,SAAgB,QAA4B,OAAc,KAAwB;CAChF,MAAM,cAAe,MAAM,OAAO,UAAmC,CAAA;CAErE,OAAO;EACL,GAAG;EACH,MAAM;GACJ,GAAI,MAAM,QAAQ,CAAA;GAClB,KAAK;IACH,GAAG;IACH,GAAG;GACJ;EACF;CACF;AACH"}
|
|
1
|
+
{"version":3,"file":"filip.mazev-blocks-navigation.mjs","names":[],"sources":["../../../projects/blocks/navigation/tokens/navigation-config.token.ts","../../../projects/blocks/navigation/tokens/navigation-access-adapter.token.ts","../../../projects/blocks/navigation/services/navigation.service.ts","../../../projects/blocks/navigation/components/breadcrumbs/breadcrumbs.ts","../../../projects/blocks/navigation/components/breadcrumbs/breadcrumbs.html","../../../projects/blocks/navigation/helpers/navigation-functions.ts","../../../projects/blocks/navigation/components/side-nav/constants/side-nav.constants.ts","../../../projects/blocks/navigation/components/side-nav/helpers/side-nav-search.helpers.ts","../../../projects/blocks/navigation/components/side-nav/services/side-nav-state.service.ts","../../../projects/blocks/navigation/components/side-nav/components/side-nav-branch/side-nav-branch.ts","../../../projects/blocks/navigation/components/side-nav/components/side-nav-branch/side-nav-branch.html","../../../projects/blocks/navigation/components/side-nav/helpers/side-nav-config.helpers.ts","../../../projects/blocks/navigation/components/side-nav/side-nav.ts","../../../projects/blocks/navigation/components/side-nav/side-nav.html","../../../projects/blocks/navigation/components/side-nav/directives/side-nav-header.directive.ts","../../../projects/blocks/navigation/components/side-nav/directives/side-nav-footer.directive.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { INavigationConfig } from '../interfaces/inavigation-config.interface';\n\nexport const NAVIGATION_CONFIG = new InjectionToken<INavigationConfig>('NAVIGATION_CONFIG');\n","import { InjectionToken } from '@angular/core';\nimport { INavigationAccessAdapter } from '../interfaces/inavigation-access-adapter.interface';\n\nexport const NAVIGATION_ACCESS_ADAPTER = new InjectionToken<INavigationAccessAdapter>('NAVIGATION_ACCESS_ADAPTER');\n","import { computed, inject, Injectable, Signal } from '@angular/core';\nimport { ActivatedRouteSnapshot, NavigationEnd, Router, Routes } from '@angular/router';\nimport { NAVIGATION_CONFIG } from '../tokens/navigation-config.token';\nimport { IResolvedNavigation } from '../interfaces/iresolved-navigation.interface';\nimport { filter } from 'rxjs';\nimport { IBreadcrumbItem } from '../interfaces/ibreadcrumb-item.interface';\nimport { INavMeta } from '../interfaces/inav-meta.interface';\nimport { INavigationItem } from '../interfaces/inavigation-item.interface';\nimport { NAVIGATION_ACCESS_ADAPTER } from '../tokens/navigation-access-adapter.token';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { INavContext } from '../interfaces/inav-context.interface';\nimport { BX_I18N, isTextWithKey, ResolvableText, resolveText } from '@filip.mazev/blocks/core';\nimport { NavText } from '../types/navigation.types';\nimport { INavigationGroup } from '../interfaces/inavigation-group.interface';\nimport { INavigationTreeGroup } from '../interfaces/inavigation-tree-group.interface';\n\n@Injectable({ providedIn: 'root' })\nexport class NavigationService {\n private readonly router = inject(Router);\n private readonly config = inject(NAVIGATION_CONFIG, { optional: true });\n private readonly i18n = inject(BX_I18N, { optional: true });\n private readonly accessAdapter = inject(NAVIGATION_ACCESS_ADAPTER, { optional: true });\n\n private readonly navEnd = toSignal(this.router.events.pipe(filter((e): e is NavigationEnd => e instanceof NavigationEnd)));\n\n public readonly current = computed<IResolvedNavigation>(() => {\n this.navEnd();\n this.i18n?.version?.();\n return this.resolveCurrent(this.router.routerState.snapshot.root);\n });\n\n public readonly routeBase = computed<string | undefined>(() => {\n return this.accessAdapter?.resolveBaseRoute();\n });\n\n public readonly routes: Signal<INavigationItem[]> = computed(() => {\n this.navEnd();\n this.i18n?.version?.();\n return this.extractRoutes(this.router.config);\n });\n\n public readonly baseRoute = computed<string | undefined>(() => {\n const viewableRoutes = this.routes();\n\n const primaryPrefix = this.routeBase();\n\n let firstFoundRoot: string | undefined;\n\n const findRootRoute = (items: INavigationItem[]): string | undefined => {\n for (const item of items) {\n if (item.data?.root) {\n if (!firstFoundRoot) {\n firstFoundRoot = item.route;\n }\n\n if (primaryPrefix && item.route.startsWith(primaryPrefix)) {\n return item.route;\n }\n }\n\n if (item.children?.length) {\n const childRoot = findRootRoute(item.children);\n if (childRoot) return childRoot;\n }\n }\n return undefined;\n };\n\n const perfectMatch = findRootRoute(viewableRoutes);\n\n return perfectMatch ?? firstFoundRoot ?? primaryPrefix;\n });\n\n public readonly menu = computed(() => this.buildMenu(this.routes()));\n\n public readonly menuGroups = computed<INavigationGroup[]>(() => {\n const sections = [...(this.config?.sections ?? [])].sort((a, b) => (a.order ?? Number.POSITIVE_INFINITY) - (b.order ?? Number.POSITIVE_INFINITY));\n const groups = new Map<string, INavigationGroup>(\n sections.map((section) => [section.id, { id: section.id, title: resolveText(section.title ?? section.id, this.i18n), items: [] }])\n );\n\n for (const item of this.flattenRoutes(this.menu())) {\n if (!item.visible || item.data?.menu === false) continue;\n\n const id = item.section ?? '';\n let group = groups.get(id);\n if (!group) {\n group = { id, title: id, items: [] };\n groups.set(id, group);\n }\n group.items.push({ ...item, children: undefined });\n }\n\n return [...groups.values()].filter((group) => group.items.length > 0);\n });\n\n /** Hierarchical sections; menuGroups retains its existing flat contract. */\n public readonly menuTreeGroups = computed<INavigationTreeGroup[]>(() => {\n this.i18n?.version?.();\n const sections = [...(this.config?.sections ?? [])].sort((a, b) => (a.order ?? Infinity) - (b.order ?? Infinity));\n const groups = new Map<string, INavigationTreeGroup>(\n sections.map((section) => [\n section.id,\n {\n ...section,\n title: resolveText(section.title ?? section.id, this.i18n),\n items: []\n }\n ])\n );\n\n this.groupTree(this.menu(), groups);\n return [...groups.values()].filter((group) => group.items.length > 0);\n });\n\n public navigateBack(): void {\n const breadcrumbs = this.current().breadcrumbs;\n\n if (breadcrumbs.length > 1) {\n const previousBreadcrumb = breadcrumbs[breadcrumbs.length - 2];\n this.router.navigateByUrl(previousBreadcrumb.route);\n } else {\n this.router.navigateByUrl(this.routeBase() ?? '/');\n }\n }\n\n //#region Helpers\n\n private groupTree(items: INavigationItem[], groups: Map<string, INavigationTreeGroup>, inheritedSection = '', parent?: INavigationItem): void {\n for (const item of items) {\n const section = item.section ?? inheritedSection;\n let group = groups.get(section);\n\n if (!group) {\n group = { id: section, title: section, items: [] };\n groups.set(section, group);\n }\n\n if (!item.visible || item.data?.hidden) continue;\n\n if (item.data?.menu === false) {\n this.groupTree(item.children ?? [], groups, section, section === inheritedSection ? parent : undefined);\n continue;\n }\n\n const entry: INavigationItem = { ...item, section, children: [] };\n const destination = parent && section === inheritedSection ? (parent.children ??= []) : group.items;\n destination.push(entry);\n this.groupTree(item.children ?? [], groups, section, entry);\n }\n }\n\n private includeBreadcrumb(item: INavigationItem): boolean {\n if (item.data?.hidden && !this.config?.includeHiddenInBreadcrumbs) return false;\n\n const section = this.config?.sections?.find((candidate) => candidate.id === item.section);\n return item.showInBreadcrumbs ?? item.data?.showInBreadcrumbs ?? section?.showInBreadcrumbs ?? true;\n }\n\n private extractRoutes(routes: Routes, parentSegment: string[] = [], parentSection?: string): INavigationItem[] {\n const items: INavigationItem[] = [];\n\n for (const route of routes) {\n if (route.redirectTo) continue;\n\n if (this.accessAdapter && !this.accessAdapter.canAccessMenu(route.data ?? {})) {\n continue;\n }\n\n const ownPath = route.path ?? '';\n\n const fullSegments = ownPath ? [...parentSegment, ownPath] : [...parentSegment];\n\n const fullRoute = '/' + fullSegments.filter(Boolean).join('/');\n\n const nav = route.data?.['nav'] as INavMeta | undefined;\n const children = route.children?.length ? this.extractRoutes(route.children, fullSegments, nav?.section ?? parentSection) : [];\n\n if (!nav) {\n items.push(...children);\n continue;\n }\n\n const item = {\n id: fullRoute,\n route: fullRoute,\n label: this.resolveNavText(nav.label, { snapshot: undefined }) ?? '',\n icon: nav.icon,\n showInBreadcrumbs: nav.showInBreadcrumbs,\n section: nav.section ?? parentSection,\n visible: nav.visible ? nav.visible() : true,\n data: nav,\n children\n };\n\n items.push(item);\n }\n\n return this.sortNavigationItems(items);\n }\n\n private resolveCurrent(root: ActivatedRouteSnapshot): IResolvedNavigation {\n let currentNode: ActivatedRouteSnapshot | null = root;\n let finalSnapshot: ActivatedRouteSnapshot | undefined;\n\n while (currentNode) {\n const next: ActivatedRouteSnapshot | null = currentNode.children.find((child) => child.outlet === 'primary') ?? null;\n if (!next) {\n finalSnapshot = currentNode;\n break;\n }\n currentNode = next;\n }\n\n if (!finalSnapshot) return { breadcrumbs: [] };\n\n const urlSegments = finalSnapshot.pathFromRoot.flatMap((s) => s.url.map((u) => u.path)).filter(Boolean);\n\n const breadcrumbs: IBreadcrumbItem[] = [];\n const allItems = this.flattenRoutes(this.routes());\n let currentUrl = '';\n\n for (const segment of urlSegments) {\n currentUrl += '/' + segment;\n\n const matchingItem = this.matchRouteToUrl(allItems, currentUrl);\n\n if (matchingItem?.data && this.includeBreadcrumb(matchingItem)) {\n const ctx: INavContext = { snapshot: finalSnapshot };\n\n const label = this.resolveNavText(matchingItem.data.breadcrumb, ctx) ?? this.resolveNavText(matchingItem.data.label, ctx);\n\n if (label && breadcrumbs[breadcrumbs.length - 1]?.label !== label) {\n breadcrumbs.push({ label, route: currentUrl });\n }\n }\n }\n\n const leafNav = finalSnapshot.routeConfig?.data?.['nav'] as INavMeta | undefined;\n const fullUrl = '/' + urlSegments.join('/');\n\n let current: INavigationItem | undefined;\n\n if (leafNav && !leafNav.hidden) {\n current = {\n id: fullUrl,\n route: fullUrl,\n label: this.resolveNavText(leafNav.label, { snapshot: finalSnapshot }) ?? '',\n icon: leafNav.icon,\n showInBreadcrumbs: leafNav.showInBreadcrumbs,\n section: leafNav.section,\n visible: leafNav.visible ? leafNav.visible() : true,\n data: leafNav\n };\n }\n\n return { current, breadcrumbs };\n }\n\n private buildMenu(items: INavigationItem[]): INavigationItem[] {\n return items\n .map((item): INavigationItem | null => {\n if (!item.visible || item.data?.hidden) return null;\n\n const children = this.buildMenu(item.children ?? []);\n const includeSelf = item.visible && item.data?.menu !== false;\n\n if (!includeSelf && !children.length) {\n return null;\n }\n\n return {\n ...item,\n children\n };\n })\n .filter((item): item is INavigationItem => item !== null);\n }\n\n private sortNavigationItems(items: INavigationItem[]): INavigationItem[] {\n const customSort = this.config?.sortItems;\n\n return [...items].sort((a, b) => {\n if (customSort) {\n return customSort(a, b);\n }\n\n const orderA = a.data?.order ?? Number.POSITIVE_INFINITY;\n const orderB = b.data?.order ?? Number.POSITIVE_INFINITY;\n\n if (orderA !== orderB) return orderA - orderB;\n return a.label.localeCompare(b.label);\n });\n }\n\n private matchRouteToUrl(items: INavigationItem[], url: string): INavigationItem | undefined {\n const exactMatch = items.find((i) => i.route === url);\n if (exactMatch) return exactMatch;\n\n return items.find((i) => {\n if (!i.route.includes(':')) return false;\n const routeRegex = new RegExp('^' + i.route.replace(/:[^\\s/]+/g, '([^/]+)') + '$');\n return routeRegex.test(url);\n });\n }\n\n private flattenRoutes(items: INavigationItem[]): INavigationItem[] {\n return items.reduce((acc, item) => {\n acc.push(item);\n if (item.children) acc.push(...this.flattenRoutes(item.children));\n return acc;\n }, [] as INavigationItem[]);\n }\n\n private resolveNavText(textDef: NavText | undefined, ctx: INavContext): string | undefined {\n if (!textDef) return undefined;\n\n const text: ResolvableText = typeof textDef === 'function' ? textDef(ctx) : textDef;\n\n if (isTextWithKey(text)) {\n return this.i18n?.translate(text.key, { route: ctx.snapshot }) ?? text.key;\n }\n\n return text;\n }\n\n //#endregion\n}\n","import { Component, computed, inject, input, ChangeDetectionStrategy } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NavigationService } from '../../services/navigation.service';\nimport { Icon, IconName } from '@filip.mazev/blocks/icons';\nimport { BxA11yService } from '@filip.mazev/blocks/core';\n\n@Component({\n selector: 'bx-breadcrumbs',\n imports: [RouterLink, Icon],\n templateUrl: './breadcrumbs.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: './breadcrumbs.scss'\n})\nexport class Breadcrumbs {\n private readonly navigationService = inject(NavigationService);\n private readonly a11y = inject(BxA11yService);\n\n protected readonly isAnimated = computed(() => {\n return !this.a11y.isReducedMotion();\n });\n\n public readonly minimumBreadcrumbs = input<number>(2);\n public readonly divider = input<IconName>('chevron-right');\n\n protected showBreadcumbs = computed(() => {\n const minimum = Math.max(1, this.minimumBreadcrumbs());\n return this.current().breadcrumbs.length >= minimum;\n });\n\n protected ariaLabel = computed(() => {\n const labels = this.current()\n .breadcrumbs.map((crumb) => crumb.label)\n .join(' > ');\n return `Breadcrumbs: ${labels}`;\n });\n\n protected current = this.navigationService.current;\n}\n","@if(showBreadcumbs()) {\n<nav class=\"breadcrumbs\" [attr.aria-label]=\"ariaLabel()\">\n @for (crumb of current().breadcrumbs; track crumb.route; let last = $last) {\n @if (last) {\n <span class=\"crumb last\" aria-current=\"page\">{{ crumb.label }}</span>\n } @else {\n <a class=\"crumb\" [routerLink]=\"crumb.route\">{{ crumb.label }}</a>\n <bx-icon [name]=\"divider()\" size=\"16\" class=\"breadcrumb-separator\" />\n }\n }\n</nav>\n}\n","import { Strict } from '@filip.mazev/blocks/core';\nimport { INavMeta } from '../interfaces/inav-meta.interface';\nimport { INavigationConfig } from '../interfaces/inavigation-config.interface';\nimport { NAVIGATION_CONFIG } from '../tokens/navigation-config.token';\nimport { Route } from '@angular/router';\nimport { INavigationSectionConfig } from '../interfaces/inavigation-section-config.interface';\n\n/** Declares UI sections and binds route metadata to their literal IDs. */\nexport function defineNavigation<const TSections extends readonly INavigationSectionConfig[]>(\n config: Omit<INavigationConfig, 'sections'> & { sections: TSections }\n) {\n return {\n config,\n withNav<T extends INavMeta<TSections[number]['id']>>(route: Route, nav: Strict<T, INavMeta<TSections[number]['id']>>): Route {\n return withNav(route, nav);\n }\n };\n}\n\n/**\n *\n * @param config\n * This function is a helper to provide the navigation configuration in your Angular application.\n * It takes an `INavigationConfig` object as an argument and returns an array of providers that can be used in the `providers` array of your Angular module.\n * By using this function, you can easily set up the navigation configuration for your application without having to manually create the provider object each time.\n */\nexport function provideNavigation(config: INavigationConfig) {\n return [\n {\n provide: NAVIGATION_CONFIG,\n useValue: config\n }\n ];\n}\n\n/**\n *\n * @param route\n * @param nav\n * This function is a helper to attach navigation metadata to Angular routes. It takes an Angular `Route` object and a navigation metadata object of type `Strict<T, INavMeta>`, where `T`\n * is a generic type that can be used to enforce specific properties on the navigation metadata.\n * The function returns a new `Route` object with the provided navigation metadata merged into the existing route data under the 'nav' property.\n * This allows you to easily associate navigation information with your routes, which can then be used by navigation components to generate menus, breadcrumbs, etc.\n */\nexport function withNav<T extends INavMeta>(route: Route, nav: Strict<T, INavMeta>): Route {\n const existingNav = (route.data?.['nav'] as INavMeta | undefined) ?? {};\n\n return {\n ...route,\n data: {\n ...(route.data ?? {}),\n nav: {\n ...existingNav,\n ...nav\n }\n }\n };\n}\n","import { IsActiveMatchOptions } from '@angular/router';\nimport { ISideNavConfig } from '../interfaces/iside-nav-config.interface';\n\nexport const SIDE_NAV_DEFAULTS = {\n side: 'left',\n position: 'fixed',\n width: '17rem',\n collapsedWidth: '4.5rem',\n searchable: true,\n showItemIcons: true,\n showSectionIcons: true,\n collapsible: true,\n collapsed: false,\n mobileBreakpoint: 'lg',\n showMobileTrigger: true,\n ariaLabel: 'Main navigation',\n searchPlaceholder: 'Search navigation…',\n searchLabel: 'Search navigation',\n clearSearchLabel: 'Clear search',\n emptyText: 'No matching pages.',\n openLabel: 'Open navigation',\n closeLabel: 'Close navigation',\n collapseLabel: 'Collapse navigation',\n expandLabel: 'Expand navigation',\n submenuLabel: 'Open submenu',\n resultLabel: 'Search result'\n} satisfies ISideNavConfig;\n\nexport const SIDE_NAV_ACTIVE_OPTIONS: IsActiveMatchOptions = {\n paths: 'subset',\n queryParams: 'ignored',\n matrixParams: 'ignored',\n fragment: 'ignored'\n};\n\nexport const SIDE_NAV_CURRENT_OPTIONS: IsActiveMatchOptions = { ...SIDE_NAV_ACTIVE_OPTIONS, paths: 'exact' };\n","import { INavigationTreeGroup } from '../../../interfaces/inavigation-tree-group.interface';\nimport { INavigationItem } from '../../../interfaces/inavigation-item.interface';\nimport { ISideNavSearchResult } from '../interfaces/iside-nav-search-result.interface';\n\n/** Accent-insensitive normalization shared by fuzzy labels and keywords. */\nexport function normalizeNavText(value: string): string {\n return value.normalize('NFD').replace(/\\p{M}/gu, '').toLocaleLowerCase().trim();\n}\n\n/** Substring and subsequence matching with a single-edit fallback for ordinary typing mistakes. */\nexport function navMatchScore(label: string, query: string): number {\n const text = normalizeNavText(label);\n const term = normalizeNavText(query);\n\n if (!term) return 0;\n if (text === term) return 1000;\n if (text.includes(term)) return Math.max(600, 800 - text.indexOf(term) - (text.length - term.length));\n\n let index = 0;\n let gaps = 0;\n\n for (const letter of text) {\n if (letter === term[index]) index++;\n else if (index) gaps++;\n }\n\n if (index === term.length) return Math.max(1, 500 - gaps - text.length);\n if (term.length < 4) return -1;\n\n for (const word of text.split(/\\s+/)) {\n if (Math.abs(word.length - term.length) > 1) continue;\n const previous = Array.from({ length: term.length + 1 }, (_, i) => i);\n\n for (let row = 1; row <= word.length; row++) {\n let diagonal = previous[0];\n previous[0] = row;\n for (let column = 1; column <= term.length; column++) {\n const saved = previous[column];\n previous[column] = Math.min(previous[column] + 1, previous[column - 1] + 1, diagonal + (word[row - 1] === term[column - 1] ? 0 : 1));\n diagonal = saved;\n }\n }\n if (previous[term.length] <= 1) return 250;\n }\n\n return -1;\n}\n\n/** Keeps matching branches and their ancestors, choosing one best target to reveal automatically. */\nexport function searchNavigation(groups: readonly INavigationTreeGroup[], query: string): ISideNavSearchResult {\n if (!query.trim()) return { groups, path: [] };\n let bestScore = -1;\n let bestPath: string[] = [];\n let bestLabel: string | undefined;\n const filter = (items: INavigationItem[], path: string[], sectionTitle: string): INavigationItem[] =>\n items.flatMap((item) => {\n const nextPath = [...path, item.id];\n const children = item.data?.disabled ? [] : filter(item.children ?? [], nextPath, sectionTitle);\n const keywords = item.data?.keywords?.filter((keyword): keyword is string => typeof keyword === 'string') ?? [];\n const score = Math.max(navMatchScore(item.label, query), ...keywords.map((term) => navMatchScore(term, query)), navMatchScore(sectionTitle, query) - 100);\n\n if (score > bestScore && !item.data?.disabled) {\n bestScore = score;\n bestPath = nextPath;\n bestLabel = item.label;\n }\n\n return score >= 0 || children.length ? [{ ...item, children: score >= 0 && !children.length ? item.children : children }] : [];\n });\n const filtered = groups.map((group) => ({ ...group, items: filter(group.items, [], group.title) })).filter((group) => group.items.length);\n return { groups: filtered, path: bestPath, target: bestPath.at(-1), label: bestLabel };\n}\n\n/** Finds an item's ancestors without imposing a maximum menu depth. */\nexport function findNavigationPath(groups: readonly INavigationTreeGroup[], id: string): string[] {\n const visit = (items: INavigationItem[], path: string[]): string[] | undefined => {\n for (const item of items) {\n const next = [...path, item.id];\n\n if (item.id === id) return next;\n const found = visit(item.children ?? [], next);\n\n if (found) return found;\n }\n\n return undefined;\n };\n for (const group of groups) {\n const result = visit(group.items, []);\n\n if (result) return result;\n }\n\n return [];\n}\n","import { computed, DestroyRef, inject, Injectable, signal, TemplateRef } from '@angular/core';\nimport { BX_I18N, resolveText } from '@filip.mazev/blocks/core';\nimport { filter, Subject } from 'rxjs';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { SIDE_NAV_ACTIVE_OPTIONS, SIDE_NAV_CURRENT_OPTIONS, SIDE_NAV_DEFAULTS } from '../constants/side-nav.constants';\nimport { INavigationItem } from '../../../interfaces/inavigation-item.interface';\nimport { INavigationTreeGroup } from '../../../interfaces/inavigation-tree-group.interface';\nimport { ISideNavConfig } from '../interfaces/iside-nav-config.interface';\nimport { ISideNavItemContext } from '../interfaces/iside-nav-item-context.interface';\nimport { findNavigationPath, searchNavigation } from '../helpers/side-nav-search.helpers';\nimport { NavText } from '../../../types/navigation.types';\n\n/** One instance per side-nav; coordinates its recursive branch presentations. */\n@Injectable()\nexport class SideNavStateService {\n private readonly router = inject(Router);\n private readonly activeRoute = toSignal(this.router.events.pipe(filter((event): event is NavigationEnd => event instanceof NavigationEnd)));\n private readonly i18n = inject(BX_I18N, { optional: true });\n private readonly lastSelected = signal<string | undefined>(undefined);\n private readonly rememberedPath = signal<readonly string[]>([]);\n private readonly searchSelected = signal(false);\n public readonly config = signal<ISideNavConfig>({});\n public readonly sourceGroups = signal<readonly INavigationTreeGroup[]>([]);\n public readonly query = signal('');\n public readonly itemTemplate = signal<TemplateRef<ISideNavItemContext> | undefined>(undefined);\n public readonly activated = new Subject<INavigationItem>();\n public readonly groups = computed(() => {\n this.i18n?.version?.();\n const resolveItems = (items: INavigationItem[]): INavigationItem[] =>\n items\n .filter((item) => item.visible && !item.data?.hidden)\n .map((item) => ({\n ...item,\n label: item.data?.label === undefined ? item.label : this.resolveNav(item.data.label),\n data: { ...item.data, keywords: item.data?.keywords?.map((term) => this.resolveNav(term)) },\n children: resolveItems(item.children ?? [])\n }));\n return this.sourceGroups().map((group) => ({ ...group, items: resolveItems(group.items) }));\n });\n\n /** Select the most specific visible route, rather than every matching URL prefix. */\n public readonly activeItem = computed(() => {\n this.activeRoute();\n return this.findActiveItem(this.groups().flatMap((group) => group.items));\n });\n\n public readonly activeIds = computed(() => {\n const item = this.activeItem();\n\n return new Set(item ? findNavigationPath(this.groups(), item.id) : []);\n });\n\n public readonly searchResult = computed(() => searchNavigation(this.groups(), this.query()));\n public readonly revealPath = computed(() => (this.query().trim() ? (this.searchSelected() ? [] : this.searchResult().path) : this.rememberedPath()));\n public readonly target = computed(() => (this.query().trim() && !this.searchSelected() ? this.searchResult().target : undefined));\n public readonly text = computed(() => {\n this.i18n?.version?.();\n const config = this.config();\n return {\n ariaLabel: resolveText(config.ariaLabel ?? SIDE_NAV_DEFAULTS.ariaLabel, this.i18n),\n searchPlaceholder: resolveText(config.searchPlaceholder ?? SIDE_NAV_DEFAULTS.searchPlaceholder, this.i18n),\n searchLabel: resolveText(config.searchLabel ?? SIDE_NAV_DEFAULTS.searchLabel, this.i18n),\n clearSearchLabel: resolveText(config.clearSearchLabel ?? SIDE_NAV_DEFAULTS.clearSearchLabel, this.i18n),\n emptyText: resolveText(config.emptyText ?? SIDE_NAV_DEFAULTS.emptyText, this.i18n),\n openLabel: resolveText(config.openLabel ?? SIDE_NAV_DEFAULTS.openLabel, this.i18n),\n closeLabel: resolveText(config.closeLabel ?? SIDE_NAV_DEFAULTS.closeLabel, this.i18n),\n collapseLabel: resolveText(config.collapseLabel ?? SIDE_NAV_DEFAULTS.collapseLabel, this.i18n),\n expandLabel: resolveText(config.expandLabel ?? SIDE_NAV_DEFAULTS.expandLabel, this.i18n),\n submenuLabel: resolveText(config.submenuLabel ?? SIDE_NAV_DEFAULTS.submenuLabel, this.i18n),\n resultLabel: resolveText(config.resultLabel ?? SIDE_NAV_DEFAULTS.resultLabel, this.i18n)\n };\n });\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.activated.complete());\n }\n\n public isCurrent(item: INavigationItem): boolean {\n this.activeRoute();\n return !item.data?.disabled && this.router.isActive(item.route, SIDE_NAV_CURRENT_OPTIONS);\n }\n\n public search(query: string): void {\n const wasSearching = !!this.query().trim();\n this.searchSelected.set(false);\n this.query.set(query);\n if (wasSearching && !query.trim()) {\n const selected = this.lastSelected();\n this.rememberedPath.set(selected ? findNavigationPath(this.groups(), selected) : []);\n } else this.rememberedPath.set([]);\n }\n\n public select(item: INavigationItem): void {\n if (item.data?.disabled) return;\n this.lastSelected.set(item.id);\n this.searchSelected.set(true);\n this.rememberedPath.set([]);\n this.activated.next(item);\n }\n\n //#region Helpers\n private findActiveItem(items: INavigationItem[]): INavigationItem | undefined {\n let selected: INavigationItem | undefined;\n\n for (const item of items) {\n const child = this.findActiveItem(item.children ?? []);\n const own = !item.data?.disabled && this.router.isActive(item.route, SIDE_NAV_ACTIVE_OPTIONS) ? item : undefined;\n const candidate = child && (!own || this.routeSpecificity(child) >= this.routeSpecificity(own)) ? child : own;\n\n if (candidate && (!selected || this.routeSpecificity(candidate) > this.routeSpecificity(selected))) selected = candidate;\n }\n\n return selected;\n }\n\n private routeSpecificity(item: INavigationItem): number {\n return item.route.split(/[?#]/)[0].length;\n }\n\n private resolveNav(text: NavText): string {\n return resolveText(typeof text === 'function' ? text({ snapshot: undefined }) : text, this.i18n);\n }\n //#endregion\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { afterRenderEffect, ChangeDetectionStrategy, Component, computed, ElementRef, inject, input, untracked, viewChild } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { BxA11yService } from '@filip.mazev/blocks/core';\nimport { Icon } from '@filip.mazev/blocks/icons';\nimport { Menu, Tag, TooltipDirective, MenuTriggerDirective } from '@filip.mazev/blocks/primitives';\nimport { INavigationItem } from '../../../../interfaces/inavigation-item.interface';\nimport { SideNavStateService } from '../../services/side-nav-state.service';\n\n@Component({\n selector: 'bx-side-nav-branch',\n imports: [NgTemplateOutlet, RouterLink, Icon, Menu, Tag, TooltipDirective, MenuTriggerDirective],\n templateUrl: './side-nav-branch.html',\n styleUrl: './side-nav-branch.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { role: 'none' }\n})\nexport class SideNavBranch {\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly a11y = inject(BxA11yService);\n private readonly trigger = viewChild(MenuTriggerDirective);\n protected readonly state = inject(SideNavStateService);\n protected readonly active = computed(() => this.state.activeItem()?.id === this.item().id);\n protected readonly ancestor = computed(() => !this.active() && this.state.activeIds().has(this.item().id));\n protected readonly current = computed(() => this.state.isCurrent(this.item()));\n protected readonly side = computed(() => (this.state.config().side === 'right' ? 'left' : 'right'));\n protected readonly submenuOpen = computed(() => this.trigger()?.isOpen() ?? false);\n protected readonly highlighted = computed(() => this.state.target() === this.item().id);\n protected readonly animated = computed(() => !this.a11y.isReducedMotion());\n public readonly item = input.required<INavigationItem>();\n public readonly compact = input(false);\n public readonly parentTrigger = input<MenuTriggerDirective | undefined>(undefined);\n\n constructor() {\n afterRenderEffect(() => {\n const item = this.item();\n const reveal = this.state.revealPath().includes(item.id);\n const trigger = this.trigger();\n if (!reveal) return;\n\n untracked(() => {\n this.scrollIntoPanel();\n if (item.children?.length) trigger?.open();\n });\n });\n }\n\n protected select(): void {\n this.state.select(this.item());\n }\n\n protected hover(event: PointerEvent): void {\n if (event.pointerType !== 'touch' && !this.item().data?.disabled) this.trigger()?.open();\n }\n\n protected leave(): void {\n this.trigger()?.scheduleClose();\n }\n\n protected openOnArrow(event: KeyboardEvent): void {\n if (event.key !== (this.side() === 'right' ? 'ArrowRight' : 'ArrowLeft') || !this.item().children?.length) return;\n event.preventDefault();\n event.stopPropagation();\n this.trigger()?.open(true);\n }\n\n //#region Helpers\n private scrollIntoPanel(): void {\n const scroller = this.element.closest<HTMLElement>('.bx-side-nav-scroll, .bx-nav-flyout');\n\n if (!scroller) return;\n const row = this.element.getBoundingClientRect();\n const viewport = scroller.getBoundingClientRect();\n\n if (row.top < viewport.top) scroller.scrollTop += row.top - viewport.top;\n else if (row.bottom > viewport.bottom) scroller.scrollTop += row.bottom - viewport.bottom;\n }\n //#endregion\n}\n","<div #row class=\"bx-nav-row\" role=\"none\" [class.is-active]=\"active()\" [class.is-ancestor]=\"ancestor()\" [class.is-open]=\"submenuOpen()\" [class.is-compact]=\"compact()\" [class.is-highlighted]=\"highlighted()\"\n [class.is-animated]=\"animated()\" [class.is-right]=\"state.config().side === 'right'\" [class.is-disabled]=\"item().data?.disabled\"\n [attr.data-nav-id]=\"item().id\" (pointerenter)=\"hover($event)\" (pointerleave)=\"leave()\">\n @if (!(compact() && item().children?.length)) {\n <a class=\"bx-nav-link\" role=\"menuitem\" [routerLink]=\"item().data?.disabled ? null : item().route\"\n [attr.aria-current]=\"current() ? 'page' : null\"\n [attr.aria-disabled]=\"item().data?.disabled || null\" [attr.tabindex]=\"item().data?.disabled ? -1 : 0\"\n [attr.aria-label]=\"compact() ? item().label : null\" [bxTooltip]=\"compact() ? item().label : ''\"\n [placement]=\"side()\" (click)=\"select()\" (keydown)=\"openOnArrow($event)\">\n @if (state.itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item(), active: active(), collapsed: compact() }\" />\n } @else {\n <ng-container [ngTemplateOutlet]=\"label\" />\n }\n </a>\n }\n @if (item().children?.length) {\n <button type=\"button\" role=\"menuitem\" class=\"bx-nav-disclosure\" [class.bx-nav-link]=\"compact()\" [disabled]=\"item().data?.disabled\"\n [attr.aria-label]=\"state.text().submenuLabel + ': ' + item().label\" [bxMenuTrigger]=\"flyout\" #trigger=\"bxMenuTrigger\"\n [menuOrigin]=\"row\" [menuParent]=\"parentTrigger()\" [menuSide]=\"side()\" [menuLabel]=\"item().label\" [menuHover]=\"true\" [menuPinned]=\"state.revealPath().includes(item().id)\">\n @if (compact()) { <ng-container [ngTemplateOutlet]=\"label\" /> }\n @else { <bx-icon [name]=\"side() === 'right' ? 'chevron-right' : 'chevron-left'\" size=\"16\" /> }\n </button>\n <ng-template #flyout>\n <div class=\"bx-nav-flyout\" [class.is-right]=\"state.config().side === 'right'\">\n <bx-menu>\n @if (compact()) {\n <a role=\"menuitem\" class=\"bx-nav-parent-link\" [class.is-active]=\"active()\" [attr.aria-current]=\"current() ? 'page' : null\" [routerLink]=\"item().route\" (click)=\"select()\">{{ item().label }}</a>\n }\n @for (child of item().children; track child.id) {\n <bx-side-nav-branch [item]=\"child\" [parentTrigger]=\"trigger\" />\n }\n </bx-menu>\n </div>\n </ng-template>\n }\n @if (highlighted()) {\n <span class=\"bx-nav-target\" aria-hidden=\"true\"><bx-icon [name]=\"side() === 'right' ? 'arrow-left' : 'arrow-right'\" size=\"20\" /></span>\n }\n</div>\n<ng-template #label>\n @if (compact() || state.config().showItemIcons !== false) {\n <bx-icon class=\"bx-nav-icon\" [name]=\"item().icon?.name ?? item().data?.icon?.name ?? 'circle'\" [size]=\"item().icon?.size ?? item().data?.icon?.size ?? '20'\" [color]=\"item().icon?.color ?? item().data?.icon?.color\"\n [bgColor]=\"item().icon?.bgColor ?? item().data?.icon?.bgColor\" [strokeWidth]=\"item().icon?.strokeWidth ?? item().data?.icon?.strokeWidth\" />\n }\n @if (!compact()) {\n <span class=\"bx-nav-label\">{{ item().label }}</span>\n @for (tag of item().data?.tags; track $index) { <bx-tag [opaque]=\"true\" [text]=\"tag.text\" [config]=\"tag.config ?? {}\" size=\"small\" [focusable]=\"false\" /> }\n @if (item().data?.endIcon; as icon) { <bx-icon [name]=\"icon.name\" [size]=\"icon.size ?? '16'\" [color]=\"icon.color\" [bgColor]=\"icon.bgColor\" [strokeWidth]=\"icon.strokeWidth\" /> }\n }\n</ng-template>\n","import { ISideNavConfig } from '../interfaces/iside-nav-config.interface';\n\n/** Ignore absent properties while preserving meaningful false, empty text and zero-valued CSS lengths. */\nexport function definedSideNavConfig(config: ISideNavConfig | undefined): ISideNavConfig {\n return Object.fromEntries(Object.entries(config ?? {}).filter(([, value]) => value !== undefined));\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { A11yModule, FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { FormsModule } from '@angular/forms';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n DOCUMENT,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n model,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChild\n} from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { BxA11yService, ScrollLockService, uuidv4, WindowDimensionsService } from '@filip.mazev/blocks/core';\nimport { Button, SearchInput } from '@filip.mazev/blocks/forms';\nimport { BxSurfaceDirective } from '@filip.mazev/blocks/effects';\nimport { Icon } from '@filip.mazev/blocks/icons';\nimport { Menu, MenuTriggerDirective, MenuCascadeService, navigateMenuKey } from '@filip.mazev/blocks/primitives';\nimport { INavigationItem } from '../../interfaces/inavigation-item.interface';\nimport { INavigationTreeGroup } from '../../interfaces/inavigation-tree-group.interface';\nimport { NAVIGATION_CONFIG } from '../../tokens/navigation-config.token';\nimport { NavigationService } from '../../services/navigation.service';\nimport { ISideNavConfig } from './interfaces/iside-nav-config.interface';\nimport { ISideNavSlotContext } from './interfaces/iside-nav-slot-context.interface';\nimport { ISideNavItemContext } from './interfaces/iside-nav-item-context.interface';\nimport { ISideNavLayout } from './interfaces/iside-nav-layout.interface';\nimport { ISideNavSavedState } from './interfaces/iside-nav-saved-state.interface';\nimport { SideNavStateService } from './services/side-nav-state.service';\nimport { SideNavBranch } from './components/side-nav-branch/side-nav-branch';\nimport { definedSideNavConfig } from './helpers/side-nav-config.helpers';\nimport { SIDE_NAV_DEFAULTS } from './constants/side-nav.constants';\n\n@Component({\n selector: 'bx-side-nav',\n exportAs: 'bxSideNav',\n imports: [NgTemplateOutlet, A11yModule, FormsModule, SearchInput, Button, BxSurfaceDirective, Icon, SideNavBranch, MenuTriggerDirective, Menu],\n providers: [SideNavStateService],\n templateUrl: './side-nav.html',\n styleUrl: './side-nav.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.is-mobile]': 'isMobile()',\n '[class.is-collapsed]': 'isCollapsed()',\n '[class.is-right]': 'resolvedConfig().side === \"right\"',\n '[class.is-inline]': 'resolvedConfig().position === \"inline\"',\n '[class.is-animated]': '!reducedMotion()',\n '[class.is-drawer-animated]': 'drawerAnimated() && !reducedMotion()',\n '[style.--bx-side-nav-width]': 'resolvedConfig().width',\n '[style.--bx-side-nav-collapsed-width]': 'resolvedConfig().collapsedWidth'\n }\n})\nexport class SideNav {\n private readonly document = inject(DOCUMENT);\n private readonly router = inject(Router);\n private readonly destroyRef = inject(DestroyRef);\n private readonly dimensions = inject(WindowDimensionsService);\n private readonly navigation = inject(NavigationService);\n private readonly defaults = inject(NAVIGATION_CONFIG, { optional: true });\n private readonly scrollLock = inject(ScrollLockService);\n private readonly cascade = inject(MenuCascadeService);\n private readonly a11y = inject(BxA11yService);\n private readonly injector = inject(Injector);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly toggleElement = viewChild('mobileToggle', { read: ElementRef<HTMLButtonElement> });\n private readonly saved = signal<ISideNavSavedState>({ sections: {} });\n private readonly loadedKey = signal<string | undefined>(undefined);\n private readonly lockId = uuidv4();\n private readonly presentation = computed(() => `${this.isMobile()}:${this.resolvedConfig().position}:${this.resolvedConfig().side}`);\n protected readonly drawerAnimated = signal(false);\n protected readonly state = inject(SideNavStateService);\n protected readonly id = `bx-side-nav-${this.lockId}`;\n protected readonly headerTemplate = signal<TemplateRef<ISideNavSlotContext> | null>(null);\n protected readonly footerTemplate = signal<TemplateRef<ISideNavSlotContext> | null>(null);\n protected readonly reducedMotion = this.a11y.isReducedMotion;\n protected readonly visibleGroups = computed(() => this.state.searchResult().groups);\n protected readonly slotContext = computed<ISideNavSlotContext>(() => ({\n $implicit: this.isCollapsed(),\n collapsed: this.isCollapsed(),\n mobile: this.isMobile()\n }));\n\n public readonly config = input<ISideNavConfig>({});\n /** Omit to use NavigationService's hierarchical route sections. */\n public readonly groups = input<readonly INavigationTreeGroup[] | undefined>(undefined);\n /** Optional presentation template; routing and menu semantics remain on the component's surrounding control. */\n public readonly itemTemplate = input<TemplateRef<ISideNavItemContext> | undefined>(undefined);\n /** Optional controlled desktop state. Without a binding, persisted state and configuration determine the initial value. */\n public readonly collapsed = input<boolean | undefined>(undefined);\n public readonly collapsedChange = output<boolean>();\n public readonly mobileOpen = model(false);\n public readonly itemSelected = output<INavigationItem>();\n public readonly layoutChange = output<ISideNavLayout>();\n public readonly resolvedConfig = computed(() => ({\n ...SIDE_NAV_DEFAULTS,\n ...definedSideNavConfig(this.defaults?.sideNav),\n ...definedSideNavConfig(this.config())\n }));\n\n public readonly isMobile = computed(\n () => this.resolvedConfig().mobile ?? this.dimensions.dimensions().width <= this.dimensions.breakpoints[this.resolvedConfig().mobileBreakpoint]\n );\n\n public readonly isCollapsed = computed(\n () => !this.isMobile() && !this.state.query().trim() && (this.collapsed() ?? this.saved().collapsed ?? this.resolvedConfig().collapsed)\n );\n\n public readonly query = this.state.query.asReadonly();\n public readonly layout = computed<ISideNavLayout>(() => ({\n side: this.resolvedConfig().side,\n offset: this.isMobile() ? '0px' : this.isCollapsed() ? this.resolvedConfig().collapsedWidth : this.resolvedConfig().width,\n collapsed: this.isCollapsed(),\n mobile: this.isMobile(),\n open: !this.isMobile() || this.mobileOpen()\n }));\n\n private restoreFocus?: HTMLElement;\n private focusReturnOrigin: FocusOrigin = 'program';\n private focusRevision = 0;\n\n constructor() {\n effect(() => {\n this.state.config.set(this.resolvedConfig());\n this.state.sourceGroups.set(this.groups() ?? this.navigation.menuTreeGroups());\n this.state.itemTemplate.set(this.itemTemplate());\n });\n effect(() => {\n const key = this.resolvedConfig().persistenceKey;\n untracked(() => {\n this.saved.set(this.readSavedState(key));\n this.loadedKey.set(key);\n });\n });\n effect(() => {\n const key = this.resolvedConfig().persistenceKey;\n const loaded = this.loadedKey();\n const saved = this.saved();\n const collapsed = this.collapsed() ?? saved.collapsed ?? this.resolvedConfig().collapsed;\n\n if (!key || loaded !== key || !this.document.defaultView) return;\n try {\n this.document.defaultView.localStorage.setItem(key, JSON.stringify({ collapsed, sections: saved.sections }));\n } catch {\n /* Storage may be unavailable. */\n }\n });\n effect(() => {\n const open = this.isMobile() && this.mobileOpen() && this.resolvedConfig().position !== 'inline';\n\n if (open) this.scrollLock.disableScroll(this.lockId, { handleTouchInput: false });\n else this.scrollLock.enableScroll(this.lockId);\n });\n effect(() => {\n this.presentation();\n\n untracked(() => {\n // Presentation changes establish the closed geometry before an explicit open animates it.\n this.drawerAnimated.set(false);\n this.cascade.closeAll();\n if (this.mobileOpen()) this.close();\n });\n });\n effect(() => this.layoutChange.emit(this.layout()));\n this.state.activated.pipe(takeUntilDestroyed()).subscribe((item) => {\n this.itemSelected.emit(item);\n this.cascade.closeAll();\n if (this.isMobile()) this.close();\n });\n this.router.events.pipe(takeUntilDestroyed()).subscribe((event) => {\n if (event instanceof NavigationEnd) {\n this.cascade.closeAll();\n if (this.mobileOpen()) this.close();\n }\n });\n this.destroyRef.onDestroy(() => {\n this.scrollLock.enableScroll(this.lockId);\n });\n }\n\n public setHeaderTemplate(template: TemplateRef<ISideNavSlotContext> | null): void {\n this.headerTemplate.set(template);\n }\n\n public setFooterTemplate(template: TemplateRef<ISideNavSlotContext> | null): void {\n this.footerTemplate.set(template);\n }\n\n public toggle(origin?: HTMLElement | Event): void {\n if (this.mobileOpen()) this.close();\n else this.open(origin);\n }\n\n public open(origin?: HTMLElement | Event): void {\n const view = this.document.defaultView;\n\n if (!view || !this.isMobile() || this.mobileOpen()) return;\n\n const target = origin && 'currentTarget' in origin ? origin.currentTarget : origin;\n const opener = target instanceof view.HTMLElement ? target : undefined;\n const active = this.document.activeElement;\n const previous = active && active !== this.document.body && active !== this.document.documentElement ? (active as HTMLElement) : undefined;\n this.restoreFocus = opener ?? previous ?? this.toggleElement()?.nativeElement;\n this.focusReturnOrigin = this.restoreFocus?.matches(':focus-visible') ? 'keyboard' : 'program';\n ++this.focusRevision;\n\n // Establish a consistent capture target even when pointer activation does not focus native buttons.\n if (this.restoreFocus) this.focusMonitor.focusVia(this.restoreFocus, this.focusReturnOrigin, { preventScroll: true });\n\n this.drawerAnimated.set(true);\n this.mobileOpen.set(true);\n }\n\n public close(): void {\n if (!this.mobileOpen()) return;\n this.cascade.closeAll();\n const target = this.restoreFocus?.isConnected ? this.restoreFocus : this.toggleElement()?.nativeElement;\n const origin = this.focusReturnOrigin;\n const revision = ++this.focusRevision;\n this.restoreFocus = undefined;\n this.mobileOpen.set(false);\n\n afterNextRender(\n () => {\n if (!this.destroyRef.destroyed && revision === this.focusRevision && !this.mobileOpen() && target?.isConnected) {\n this.focusMonitor.focusVia(target, origin, { preventScroll: true });\n }\n },\n { injector: this.injector }\n );\n }\n\n public toggleCollapsed(): void {\n const next = !(this.collapsed() ?? this.saved().collapsed ?? this.resolvedConfig().collapsed);\n this.saved.update((saved) => ({ ...saved, collapsed: next }));\n this.collapsedChange.emit(next);\n }\n\n public search(query: string): void {\n this.cascade.closeAll();\n this.state.search(query);\n }\n\n protected closeFromControl(event: MouseEvent): void {\n this.focusReturnOrigin = event.detail === 0 ? 'keyboard' : 'program';\n this.close();\n }\n\n protected sectionActive(group: INavigationTreeGroup): boolean {\n return group.items.some((item) => this.state.activeIds().has(item.id));\n }\n\n protected sectionHighlighted(group: INavigationTreeGroup): boolean {\n return group.items.some((item) => this.state.revealPath().includes(item.id));\n }\n\n protected sectionCollapsed(group: INavigationTreeGroup): boolean {\n const revealing = this.state.revealPath();\n\n if (this.query().trim() || group.items.some((item) => revealing.includes(item.id))) return false;\n return !this.isCollapsed() && !!group.collapsible && (this.saved().sections[group.id] ?? group.collapsed ?? false);\n }\n\n protected toggleSection(group: INavigationTreeGroup): void {\n if (!group.collapsible) return;\n const collapsed = !this.sectionCollapsed(group);\n this.saved.update((saved) => ({ ...saved, sections: { ...saved.sections, [group.id]: collapsed } }));\n }\n\n protected menuKey(event: KeyboardEvent): void {\n const menu = (event.target as HTMLElement)?.closest<HTMLElement>('[role=\"menu\"]');\n\n if (menu) navigateMenuKey(event, menu);\n }\n\n protected panelKey(event: KeyboardEvent): void {\n if (event.defaultPrevented || event.key !== 'Escape' || !this.mobileOpen() || this.cascade.hasOpenMenus()) return;\n event.preventDefault();\n event.stopPropagation();\n this.focusReturnOrigin = 'keyboard';\n this.close();\n }\n\n //#region Helpers\n private readSavedState(key: string | undefined): ISideNavSavedState {\n if (!key || !this.document.defaultView) return { sections: {} };\n try {\n const value: unknown = JSON.parse(this.document.defaultView.localStorage.getItem(key) ?? 'null');\n\n if (!value || typeof value !== 'object') return { sections: {} };\n const collapsed = 'collapsed' in value && typeof value.collapsed === 'boolean' ? value.collapsed : undefined;\n const raw = 'sections' in value && value.sections && typeof value.sections === 'object' ? value.sections : {};\n const sections = Object.fromEntries(Object.entries(raw).filter((entry): entry is [string, boolean] => typeof entry[1] === 'boolean'));\n return { collapsed, sections };\n } catch {\n return { sections: {} };\n }\n }\n //#endregion\n}\n","@if (isMobile() && resolvedConfig().showMobileTrigger) {\n <button #mobileToggle bx-button variant=\"tonal\" color=\"grayscale\" class=\"bx-nav-hamburger\" type=\"button\" [class.is-open]=\"mobileOpen()\"\n [attr.aria-label]=\"state.text().openLabel\" [attr.aria-hidden]=\"mobileOpen() ? true : null\" [attr.inert]=\"mobileOpen() ? '' : null\" [attr.aria-expanded]=\"mobileOpen()\" [attr.aria-controls]=\"id\" (click)=\"toggle($event)\">\n <bx-icon name=\"menu\" size=\"20\" />\n </button>\n}\n@if (isMobile() && mobileOpen()) {\n <button class=\"bx-nav-backdrop\" type=\"button\" tabindex=\"-1\" [attr.aria-label]=\"state.text().closeLabel\" (click)=\"closeFromControl($event)\"></button>\n}\n<aside tabindex=\"-1\" bxSurface [bxSurfaceInteractive]=\"false\" class=\"bx-nav-panel\" [id]=\"id\" [class.is-open]=\"!isMobile() || mobileOpen()\"\n [attr.role]=\"isMobile() ? 'dialog' : null\" [attr.aria-modal]=\"isMobile() && mobileOpen() ? true : null\" [attr.aria-label]=\"state.text().ariaLabel\"\n [attr.inert]=\"isMobile() && !mobileOpen() ? '' : null\" [attr.aria-hidden]=\"isMobile() && !mobileOpen() ? true : null\"\n [cdkTrapFocus]=\"isMobile() && mobileOpen()\" [cdkTrapFocusAutoCapture]=\"isMobile() && mobileOpen()\" (keydown)=\"panelKey($event)\">\n <div class=\"bx-nav-header\">\n @if (headerTemplate(); as template) { <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"slotContext()\" /> }\n @else if (!isCollapsed()) { <strong>{{ state.text().ariaLabel }}</strong> }\n @if (isMobile()) {\n <button bx-button variant=\"icon\" color=\"grayscale\" class=\"bx-nav-panel-toggle\" type=\"button\" [attr.aria-label]=\"state.text().closeLabel\" (click)=\"closeFromControl($event)\"><bx-icon name=\"x\" size=\"20\" /></button>\n } @else if (resolvedConfig().collapsible) {\n <button bx-button variant=\"icon\" color=\"grayscale\" class=\"bx-nav-panel-toggle\" type=\"button\" [attr.aria-label]=\"isCollapsed() ? state.text().expandLabel : state.text().collapseLabel\"\n [attr.aria-expanded]=\"!isCollapsed()\" (click)=\"toggleCollapsed()\">\n <bx-icon [name]=\"(resolvedConfig().side === 'left') !== isCollapsed() ? 'panel-left-close' : 'panel-right-close'\" size=\"20\" />\n </button>\n }\n </div>\n @if (resolvedConfig().searchable) {\n @if (isCollapsed()) {\n <button bx-button variant=\"icon\" color=\"grayscale\" type=\"button\" class=\"bx-nav-search-toggle\" [attr.aria-label]=\"state.text().searchLabel\" (click)=\"toggleCollapsed()\"><bx-icon name=\"search\" size=\"20\" /></button>\n } @else {\n <bx-search-input class=\"bx-nav-search\" [placeholder]=\"state.text().searchPlaceholder\" [ariaLabel]=\"state.text().searchLabel\" [clearLabel]=\"state.text().clearSearchLabel\"\n [ngModel]=\"query()\" (ngModelChange)=\"search($event)\" />\n }\n }\n <div class=\"bx-side-nav-scroll\">\n <nav [attr.aria-label]=\"state.text().ariaLabel\">\n @for (group of visibleGroups(); track group.id) {\n <section class=\"bx-nav-section\" [attr.aria-label]=\"group.title || state.text().ariaLabel\">\n @if (group.title) {\n @if (isCollapsed()) {\n <button type=\"button\" class=\"bx-nav-section-toggle is-compact\" [class.is-active]=\"sectionActive(group)\" [class.is-highlighted]=\"sectionHighlighted(group)\" [class.is-open]=\"sectionTrigger.isOpen()\" [attr.aria-label]=\"group.title\" [bxMenuTrigger]=\"sectionMenu\" #sectionTrigger=\"bxMenuTrigger\"\n [menuSide]=\"resolvedConfig().side === 'left' ? 'right' : 'left'\" [menuLabel]=\"group.title\">\n <bx-icon [name]=\"group.icon?.name ?? 'folder'\" size=\"20\" />\n </button>\n <ng-template #sectionMenu>\n <div class=\"bx-nav-section-flyout\">\n <bx-menu>\n @for (item of group.items; track item.id) { <bx-side-nav-branch [item]=\"item\" [parentTrigger]=\"sectionTrigger\" /> }\n </bx-menu>\n </div>\n </ng-template>\n } @else if (group.collapsible) {\n <button type=\"button\" class=\"bx-nav-section-toggle\" [class.is-active]=\"sectionActive(group)\" [class.is-highlighted]=\"sectionHighlighted(group)\" [attr.aria-expanded]=\"!sectionCollapsed(group)\" [attr.aria-controls]=\"id + '-section-' + $index\" (click)=\"toggleSection(group)\">\n @if (resolvedConfig().showSectionIcons) { <bx-icon [name]=\"group.icon?.name ?? 'folder'\" size=\"20\" /> }<span>{{ group.title }}</span><bx-icon [name]=\"sectionCollapsed(group) ? 'chevron-right' : 'chevron-down'\" size=\"16\" />\n </button>\n } @else {\n <h2 class=\"bx-nav-section-heading\" [class.is-active]=\"sectionActive(group)\" [class.is-highlighted]=\"sectionHighlighted(group)\">@if (resolvedConfig().showSectionIcons) { <bx-icon [name]=\"group.icon?.name ?? 'folder'\" size=\"20\" /> }<span>{{ group.title }}</span></h2>\n }\n }\n <div class=\"bx-nav-items\" role=\"menu\" [attr.aria-label]=\"group.title || state.text().ariaLabel\" [id]=\"id + '-section-' + $index\" [hidden]=\"sectionCollapsed(group)\" tabindex=\"-1\" (keydown)=\"menuKey($event)\">\n @for (item of group.items; track item.id) { <bx-side-nav-branch [item]=\"item\" [compact]=\"isCollapsed()\" /> }\n </div>\n </section>\n } @empty { <p class=\"bx-nav-empty\" role=\"status\">{{ state.text().emptyText }}</p> }\n </nav>\n </div>\n @if (footerTemplate(); as template) { <footer class=\"bx-nav-footer\"><ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"slotContext()\" /></footer> }\n <span class=\"cdk-visually-hidden\" role=\"status\" aria-live=\"polite\">@if (state.target()) { {{ state.text().resultLabel }}: {{ state.searchResult().label }} }</span>\n</aside>\n","import { DestroyRef, Directive, inject, TemplateRef } from '@angular/core';\nimport { SideNav } from '../side-nav';\nimport { ISideNavSlotContext } from '../interfaces/iside-nav-slot-context.interface';\n\n/** Registers an ng-template with the containing side-nav, following the modal slot contract. */\n@Directive({ selector: '[bxSideNavHeader]' })\nexport class SideNavHeaderDirective {\n private readonly template = inject<TemplateRef<ISideNavSlotContext>>(TemplateRef);\n private readonly nav = inject(SideNav);\n\n constructor() {\n this.nav.setHeaderTemplate(this.template);\n inject(DestroyRef).onDestroy(() => this.nav.setHeaderTemplate(null));\n }\n\n public static ngTemplateContextGuard(_directive: SideNavHeaderDirective, _context: unknown): _context is ISideNavSlotContext {\n return true;\n }\n}\n","import { DestroyRef, Directive, inject, TemplateRef } from '@angular/core';\nimport { SideNav } from '../side-nav';\nimport { ISideNavSlotContext } from '../interfaces/iside-nav-slot-context.interface';\n\n/** Registers an ng-template with the containing side-nav, following the modal slot contract. */\n@Directive({ selector: '[bxSideNavFooter]' })\nexport class SideNavFooterDirective {\n private readonly template = inject<TemplateRef<ISideNavSlotContext>>(TemplateRef);\n private readonly nav = inject(SideNav);\n\n constructor() {\n this.nav.setFooterTemplate(this.template);\n inject(DestroyRef).onDestroy(() => this.nav.setFooterTemplate(null));\n }\n\n public static ngTemplateContextGuard(_directive: SideNavFooterDirective, _context: unknown): _context is ISideNavSlotContext {\n return true;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,MAAa,oBAAoB,IAAI,eAAkC,mBAAmB;ACA1F,MAAa,4BAA4B,IAAI,eAAyC,2BAA2B;ACcjH,IAAa,oBAAb,MAAa,kBAAiB;CACX,SAAS,OAAO,MAAM;CACtB,SAAS,OAAO,mBAAmB,EAAE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