@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.
@@ -1,4 +1,4 @@
1
- const BLOCKS_VERSION = "1.4.16";
1
+ const BLOCKS_VERSION = "1.4.18";
2
2
  export { BLOCKS_VERSION };
3
3
 
4
4
  //# sourceMappingURL=filip.mazev-blocks.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"filip.mazev-blocks.mjs","names":[],"sources":["../../../projects/blocks/src/public-api.ts"],"sourcesContent":["/* * Public API Surface of blocks\n * This file is auto-generated. Do not edit directly.\n */\n\nexport const BLOCKS_VERSION = '1.4.16';\n"],"mappings":"AAIA,MAAa,iBAAiB"}
1
+ {"version":3,"file":"filip.mazev-blocks.mjs","names":[],"sources":["../../../projects/blocks/src/public-api.ts"],"sourcesContent":["/* * Public API Surface of blocks\n * This file is auto-generated. Do not edit directly.\n */\n\nexport const BLOCKS_VERSION = '1.4.18';\n"],"mappings":"AAIA,MAAa,iBAAiB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@filip.mazev/blocks",
3
- "version": "1.4.16",
3
+ "version": "1.4.18",
4
4
  "license": "MIT",
5
5
  "schematics": "./schematics/collection.json",
6
6
  "exports": {
@@ -204,6 +204,7 @@ export declare class BxA11yService {
204
204
  export declare class BxOverlayPositionService {
205
205
  private readonly overlay;
206
206
  getElementStrategy(element: HTMLElement, placement: BxPlacement, offset?: number): FlexibleConnectedPositionStrategy;
207
+ getSubmenuStrategy(element: HTMLElement, side: 'left' | 'right', offset?: number): FlexibleConnectedPositionStrategy;
207
208
  getCoordinateStrategy(x: number, y: number): FlexibleConnectedPositionStrategy;
208
209
  private getPositions;
209
210
  static ɵfac: i0.ɵɵFactoryDeclaration<BxOverlayPositionService, never>;
@@ -371,6 +372,22 @@ export declare function invertPaletteToken(token: Color): Color;
371
372
  export declare function resolveThemeId(value: string | null | undefined): BxThemeId | undefined;
372
373
  export declare function uuidv4(): string;
373
374
  export declare function inheritOverlayTheme(source: HTMLElement, pane: HTMLElement): () => void;
374
- export declare function trackOverlayOrigin(overlay: OverlayRef, origin: HTMLElement): () => void;
375
+ /** Callable tracking teardown with an explicit refresh for coordinated child overlays. */
376
+ export type OverlayOriginTracker = (() => void) & {
377
+ /** Re-measure the source and refresh its native anchor offset or fallback position. */
378
+ reposition: () => void;
379
+ };
380
+ /** Optional coordination for overlays whose origins can move inside other overlays or clipped scrollers. */
381
+ export interface IOverlayOriginOptions {
382
+ /** Allow native CSS anchor tracking. Defaults to true; coordinated cascades use measured positioning. */
383
+ nativeAnchoring?: boolean;
384
+ /** Optional callback after the overlay is positioned. Use it to update dependent child overlays in order. */
385
+ onPosition?: () => void;
386
+ /** Optional callback when the origin leaves the viewport or a clipping ancestor. Defaults to leaving visibility to the owner. */
387
+ onOriginHidden?: () => void;
388
+ }
389
+ export declare function trackOverlayOrigin(overlay: OverlayRef, origin: HTMLElement, options?: IOverlayOriginOptions): OverlayOriginTracker;
375
390
  /** Resolves text and tracks the adapter's language signal in the calling computation. */
376
- export declare function resolveText(text: ResolvableText | undefined, adapter: IBxI18nAdapter | null, params?: Record<string, unknown>): string;
391
+ export declare function resolveText(text: ResolvableText | undefined, adapter: IBxI18nAdapter | null, params?: Record<string, unknown>): string;
392
+ /** Whether an overlay origin still intersects the viewport and every ancestor that clips its contents. */
393
+ export declare function isOverlayOriginVisible(origin: HTMLElement): boolean;
@@ -856,7 +856,7 @@ export declare class SearchInput extends BxValueControl<string> {
856
856
  "retry": "retry";
857
857
  }, never, ["bx-error", "bx-hint"], true, never>;
858
858
  }
859
- export type SelectionChangeSource = 'user' | 'select-all' | 'page';
859
+ export type SelectionChangeSource = 'user' | 'select-all' | 'page' | 'clear';
860
860
  export type SelectionDisplay = 'text' | 'tags';
861
861
  export type LoadMoreSource = 'scroll' | 'button' | 'retry';
862
862
  export type LoadMoreButtonMode = 'auto' | 'always';
@@ -947,6 +947,10 @@ declare abstract class BxSelectBase<TValue, TOption> extends BxValueControl<TVal
947
947
  private readonly debouncing;
948
948
  private readonly searchRequest;
949
949
  private readonly knownOptions;
950
+ protected readonly hasSelection: import("@angular/core").Signal<boolean>;
951
+ protected readonly showClear: import("@angular/core").Signal<boolean>;
952
+ protected readonly resolvedClearLabel: import("@angular/core").Signal<string>;
953
+ protected readonly resolvedClearTooltip: import("@angular/core").Signal<string>;
950
954
  protected readonly panelScrollStrategy: import("@angular/cdk/overlay").NoopScrollStrategy;
951
955
  protected readonly isPanelAttached: import("@angular/core").WritableSignal<boolean>;
952
956
  protected readonly searchTerm: import("@angular/core").Signal<string>;
@@ -967,6 +971,12 @@ declare abstract class BxSelectBase<TValue, TOption> extends BxValueControl<TVal
967
971
  protected readonly overflowTagTooltip: import("@angular/core").Signal<string>;
968
972
  protected readonly resolvedLoadingAriaLabel: import("@angular/core").Signal<string>;
969
973
  protected readonly resolvedLoadingLabel: import("@angular/core").Signal<string>;
974
+ /** Shows a clear action when a value is selected. Defaults to true; hidden while readonly. */
975
+ readonly clearable: import("@angular/core").InputSignal<boolean>;
976
+ /** Accessible name of the clear action. Accepts translation keys; defaults to 'Clear selection'. */
977
+ readonly clearLabel: import("@angular/core").InputSignal<ResolvableText>;
978
+ /** Optional clear-action tooltip. Defaults to clearLabel; an empty string hides it. Accepts translation keys. */
979
+ readonly clearTooltip: import("@angular/core").InputSignal<ResolvableText | undefined>;
970
980
  readonly selectionDisplay: import("@angular/core").InputSignal<SelectionDisplay>;
971
981
  readonly tagConfig: import("@angular/core").InputSignal<ITagConfig>;
972
982
  readonly overflowTagConfig: import("@angular/core").InputSignal<ITagConfig>;
@@ -1020,6 +1030,7 @@ declare abstract class BxSelectBase<TValue, TOption> extends BxValueControl<TVal
1020
1030
  protected onPanelKey(event: KeyboardEvent): void;
1021
1031
  protected onTriggerBlur(): void;
1022
1032
  protected onOutsideClick(event: MouseEvent): void;
1033
+ protected clearSelectedValue(value: TValue | null): boolean;
1023
1034
  protected abstract selectOption(option: IBxSelectOption<TOption>): void;
1024
1035
  protected onSearchChange(value: string): void;
1025
1036
  protected selectionTagConfig(option: IBxSelectOption<TOption>): ITagConfig;
@@ -1028,6 +1039,21 @@ declare abstract class BxSelectBase<TValue, TOption> extends BxValueControl<TVal
1028
1039
  private panelItems;
1029
1040
  static ɵfac: i0.ɵɵFactoryDeclaration<BxSelectBase<any, any>, never>;
1030
1041
  static ɵdir: i0.ɵɵDirectiveDeclaration<BxSelectBase<any, any>, never, never, {
1042
+ "clearable": {
1043
+ "alias": "clearable";
1044
+ "required": false;
1045
+ "isSignal": true;
1046
+ };
1047
+ "clearLabel": {
1048
+ "alias": "clearLabel";
1049
+ "required": false;
1050
+ "isSignal": true;
1051
+ };
1052
+ "clearTooltip": {
1053
+ "alias": "clearTooltip";
1054
+ "required": false;
1055
+ "isSignal": true;
1056
+ };
1031
1057
  "selectionDisplay": {
1032
1058
  "alias": "selectionDisplay";
1033
1059
  "required": false;
@@ -1154,6 +1180,7 @@ export interface ISelectionChange<T> {
1154
1180
  }
1155
1181
  export declare class Select<T> extends BxSelectBase<T, T> {
1156
1182
  readonly selectionChange: import("@angular/core").OutputEmitterRef<ISelectionChange<T | null>>;
1183
+ clearSelection(): void;
1157
1184
  isSelected(value: T): boolean;
1158
1185
  protected selectOption(option: IBxSelectOption<T>): void;
1159
1186
  static ɵfac: i0.ɵɵFactoryDeclaration<Select<any>, never>;
@@ -1324,7 +1351,7 @@ export declare class FormSettingsService {
1324
1351
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1325
1352
  }
1326
1353
  export declare const BX_FORM_FIELD_CONTROL: InjectionToken<IFormFieldControl>;
1327
- export type SelectAllChangeReason = 'toggle' | 'item-deselected' | 'scope-change' | 'reset';
1354
+ export type SelectAllChangeReason = 'toggle' | 'item-deselected' | 'scope-change' | 'reset' | 'clear';
1328
1355
  /** Describes select-all intent independently from the finite loaded selection. */
1329
1356
  export interface ISelectAllChange<T> {
1330
1357
  /** Whether future eligible pages in this scope should be automatically selected. */
@@ -1333,17 +1360,24 @@ export interface ISelectAllChange<T> {
1333
1360
  scope: string;
1334
1361
  /** Loaded selected values; does not claim to enumerate the remote result set. */
1335
1362
  values: readonly T[];
1336
- /** User toggle, individual deselection, scope change, or programmatic reset. */
1363
+ /** User toggle, individual deselection, scope change, clear action, or programmatic reset. */
1337
1364
  reason: SelectAllChangeReason;
1338
1365
  }
1339
1366
  export declare class MultiSelect<T> extends BxSelectBase<T[], T> {
1340
1367
  private readonly summaryOverflow;
1341
1368
  private readonly labelsAdapter;
1369
+ protected readonly hasSelection: import("@angular/core").Signal<boolean>;
1342
1370
  protected readonly resolvedSelectAllLabel: import("@angular/core").Signal<string>;
1371
+ protected readonly selectableOptions: import("@angular/core").Signal<IResolvedSelectOption<T>[]>;
1372
+ protected readonly allLoadedSelected: import("@angular/core").Signal<boolean>;
1373
+ protected readonly selectAllChecked: import("@angular/core").Signal<boolean>;
1343
1374
  protected readonly someSelected: import("@angular/core").Signal<boolean>;
1344
1375
  protected readonly usesSummary: import("@angular/core").Signal<boolean>;
1345
1376
  protected readonly displayedSelection: import("@angular/core").Signal<string>;
1377
+ protected readonly resolvedAllSelectedTooltip: import("@angular/core").Signal<string>;
1346
1378
  protected readonly selectionTooltip: import("@angular/core").Signal<string>;
1379
+ /** Select-all intent tooltip: undefined preserves loaded-label feedback; false or empty text disables it. Accepts translation keys. */
1380
+ readonly allSelectedTooltip: import("@angular/core").InputSignal<false | ResolvableText | undefined>;
1347
1381
  readonly allSelectedText: import("@angular/core").InputSignal<ResolvableText | undefined>;
1348
1382
  readonly selectedCountText: import("@angular/core").InputSignal<ResolvableText>;
1349
1383
  readonly summaryThreshold: import("@angular/core").InputSignalWithTransform<number, string | number>;
@@ -1355,6 +1389,7 @@ export declare class MultiSelect<T> extends BxSelectBase<T[], T> {
1355
1389
  readonly selectAllIntentChange: import("@angular/core").OutputEmitterRef<ISelectAllChange<T>>;
1356
1390
  private scope;
1357
1391
  constructor();
1392
+ clearSelection(): void;
1358
1393
  isSelected(value: T): boolean;
1359
1394
  toggleSelectAll(): void;
1360
1395
  reset(): void;
@@ -1362,6 +1397,11 @@ export declare class MultiSelect<T> extends BxSelectBase<T[], T> {
1362
1397
  private emitIntent;
1363
1398
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelect<any>, never>;
1364
1399
  static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelect<any>, "bx-multi-select", never, {
1400
+ "allSelectedTooltip": {
1401
+ "alias": "allSelectedTooltip";
1402
+ "required": false;
1403
+ "isSignal": true;
1404
+ };
1365
1405
  "allSelectedText": {
1366
1406
  "alias": "allSelectedText";
1367
1407
  "required": false;
@@ -1473,4 +1513,38 @@ export declare class RangeSlider extends BxValueControl<[number, number]> {
1473
1513
  };
1474
1514
  }, {}, never, ["bx-error", "bx-hint"], true, never>;
1475
1515
  }
1516
+ /** Decorative checkbox face; the owning control supplies semantics and interaction. */
1517
+ export declare class CheckboxIndicator {
1518
+ /** Whether the owning control is checked. Defaults to false. */
1519
+ readonly checked: import("@angular/core").InputSignal<boolean>;
1520
+ /** Displays the partial-selection mark in preference to checked. Defaults to false. */
1521
+ readonly indeterminate: import("@angular/core").InputSignal<boolean>;
1522
+ /** Matches the owning control's validation appearance. Defaults to false. */
1523
+ readonly invalid: import("@angular/core").InputSignal<boolean>;
1524
+ /** Suppresses the active surface finish when the owner is disabled. Defaults to false. */
1525
+ readonly disabled: import("@angular/core").InputSignal<boolean>;
1526
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxIndicator, never>;
1527
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxIndicator, "bx-checkbox-indicator", never, {
1528
+ "checked": {
1529
+ "alias": "checked";
1530
+ "required": false;
1531
+ "isSignal": true;
1532
+ };
1533
+ "indeterminate": {
1534
+ "alias": "indeterminate";
1535
+ "required": false;
1536
+ "isSignal": true;
1537
+ };
1538
+ "invalid": {
1539
+ "alias": "invalid";
1540
+ "required": false;
1541
+ "isSignal": true;
1542
+ };
1543
+ "disabled": {
1544
+ "alias": "disabled";
1545
+ "required": false;
1546
+ "isSignal": true;
1547
+ };
1548
+ }, {}, never, never, true, never>;
1549
+ }
1476
1550
  export type { IBxSelectOption as BxSelectOption };
@@ -1,8 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
- import { InjectionToken, Signal } from "@angular/core";
2
+ import { InjectionToken, Signal, TemplateRef } from "@angular/core";
3
3
  import { ActivatedRouteSnapshot, Data, Route } from "@angular/router";
4
4
  import { IconData } from "@filip.mazev/blocks/icons";
5
- import { ResolvableText, Strict } from "@filip.mazev/blocks/core";
5
+ import { ResolvableText, Strict, WindowDimensionsService } from "@filip.mazev/blocks/core";
6
+ import { ITagConfig } from "@filip.mazev/blocks/primitives";
7
+ import { Subject } from "rxjs";
6
8
  export declare class Breadcrumbs {
7
9
  private readonly navigationService;
8
10
  private readonly a11y;
@@ -34,15 +36,42 @@ export interface INavContext {
34
36
  snapshot?: ActivatedRouteSnapshot;
35
37
  }
36
38
  export type NavText = ResolvableText | ((ctx: INavContext) => ResolvableText);
39
+ /** A noninteractive badge displayed beside a navigation label. */
40
+ export interface INavTag {
41
+ /** Optional translated text; number-only tags can omit it. */
42
+ text?: ResolvableText;
43
+ /** Optional Blocks tag appearance. Defaults to a small tonal tag. */
44
+ config?: ITagConfig;
45
+ }
46
+ /** Route UI metadata. TSection restricts section IDs when used with defineNavigation. */
37
47
  export interface INavMeta<TSection extends string = string> {
48
+ /** Optional translated menu label, resolved again when the language changes. */
38
49
  label?: NavText;
50
+ /** Optional breadcrumb label; defaults to label. */
39
51
  breadcrumb?: NavText;
52
+ /** Optional leading icon. */
40
53
  icon?: IconData;
54
+ /** Optional trailing icon, independent of the submenu disclosure. */
55
+ endIcon?: IconData;
56
+ /** Optional noninteractive Blocks tags. Defaults to no tags. */
57
+ tags?: readonly INavTag[];
58
+ /** Optional additional translated terms used by side-nav search. */
59
+ keywords?: readonly NavText[];
60
+ /** Optional disabled state. Prevents navigation and opening descendants. Defaults to false. */
61
+ disabled?: boolean;
62
+ /** Optional breadcrumb inclusion. Defaults to the section setting, then true. */
63
+ showInBreadcrumbs?: boolean;
64
+ /** Optional section ID. Nested entries inherit their parent's section. */
41
65
  section?: TSection;
66
+ /** Whether to render this route in menus. Defaults to true; false promotes visible descendants. */
42
67
  menu?: boolean;
68
+ /** Hides this route and its descendants from menus. Defaults to false. */
43
69
  hidden?: boolean;
70
+ /** Optional ascending display order; unordered items sort by label. */
44
71
  order?: number;
72
+ /** Marks the application's home route. Defaults to false. */
45
73
  root?: boolean;
74
+ /** Optional reactive visibility predicate. False hides this route and its descendants. */
46
75
  visible?: () => boolean;
47
76
  }
48
77
  export interface INavRouteData {
@@ -59,18 +88,94 @@ export interface INavigationItem {
59
88
  icon?: IconData;
60
89
  section?: string;
61
90
  visible: boolean;
91
+ /** Optional breadcrumb inclusion from route metadata. Defaults to the section setting, then true. */
92
+ showInBreadcrumbs?: boolean;
62
93
  children?: INavigationItem[];
63
94
  data?: INavMeta;
64
95
  }
96
+ /** Shared configuration for a named navigation section. */
65
97
  export interface INavigationSectionConfig {
98
+ /** Required unique ID referenced by withNav metadata. */
66
99
  id: string;
67
- title?: string;
100
+ /** Optional translated heading. Defaults to id. */
101
+ title?: ResolvableText;
102
+ /** Optional ascending section order. Defaults to declaration order. */
68
103
  order?: number;
104
+ /** Optional section icon; the side-nav falls back to folder. */
105
+ icon?: IconData;
106
+ /** Whether users may collapse the section. Defaults to false. */
107
+ collapsible?: boolean;
108
+ /** Initial section state when no saved state exists. Defaults to false. */
109
+ collapsed?: boolean;
110
+ /** Default breadcrumb inclusion for this section's routes. Defaults to true. */
111
+ showInBreadcrumbs?: boolean;
112
+ }
113
+ export type SideNavSide = 'left' | 'right';
114
+ /** Short public alias for the fully documented configuration interface. */
115
+ export type SideNavConfig = ISideNavConfig;
116
+ /** NavigationService's resolved route contract. Supply route metadata through withNav. */
117
+ export type NavItem = INavigationItem;
118
+ /** Shared or per-instance side-nav configuration. Instance values override application defaults. */
119
+ export interface ISideNavConfig {
120
+ /** Physical viewport side. Defaults to left, including in RTL. */
121
+ side?: SideNavSide;
122
+ /** Fixed application rail or inline panel. Inline mobile drawers fill their positioned containing shell without locking page scroll. Defaults to fixed. */
123
+ position?: 'fixed' | 'inline';
124
+ /** Expanded width, as a CSS length. Defaults to 17rem; constrained to the viewport. */
125
+ width?: string;
126
+ /** Icon rail width, as a CSS length. Defaults to 4.5rem. */
127
+ collapsedWidth?: string;
128
+ /** Optional search field. Defaults to true; searches all visible loaded descendants. */
129
+ searchable?: boolean;
130
+ /** Show leading icons in expanded item rows. Defaults to true; compact rows always retain an icon. */
131
+ showItemIcons?: boolean;
132
+ /** Show icons beside expanded section headings. Defaults to true; compact section triggers always retain an icon. */
133
+ showSectionIcons?: boolean;
134
+ /** Show the desktop collapse action. Defaults to true. */
135
+ collapsible?: boolean;
136
+ /** Initial desktop collapse state. Defaults to false; saved state wins unless the model is bound. */
137
+ collapsed?: boolean;
138
+ /** Optional localStorage key. Persists panel and section states; mobile openness and search are never saved. */
139
+ persistenceKey?: string;
140
+ /** Automatic mobile breakpoint from Blocks dimensions. Defaults to lg. */
141
+ mobileBreakpoint?: keyof WindowDimensionsService['breakpoints'];
142
+ /** Optional mobile override for embedded layouts and demos. Omit for automatic viewport detection. */
143
+ mobile?: boolean;
144
+ /** Show the built-in mobile hamburger. Defaults to true; false requires an application trigger calling open/toggle. */
145
+ showMobileTrigger?: boolean;
146
+ /** Optional accessible navigation name. Defaults to Main navigation. */
147
+ ariaLabel?: ResolvableText;
148
+ /** Optional search placeholder. Defaults to Search navigation…. */
149
+ searchPlaceholder?: ResolvableText;
150
+ /** Optional accessible search name. Defaults to Search navigation. */
151
+ searchLabel?: ResolvableText;
152
+ /** Optional accessible clear-search action. Defaults to Clear search. */
153
+ clearSearchLabel?: ResolvableText;
154
+ /** Optional no-results message. Defaults to No matching pages. */
155
+ emptyText?: ResolvableText;
156
+ /** Optional mobile open action name. Defaults to Open navigation. */
157
+ openLabel?: ResolvableText;
158
+ /** Optional mobile close/backdrop action name. Defaults to Close navigation. */
159
+ closeLabel?: ResolvableText;
160
+ /** Optional collapse action name. Defaults to Collapse navigation. */
161
+ collapseLabel?: ResolvableText;
162
+ /** Optional expand action name. Defaults to Expand navigation. */
163
+ expandLabel?: ResolvableText;
164
+ /** Optional submenu action prefix. Defaults to Open submenu; the item label is appended. */
165
+ submenuLabel?: ResolvableText;
166
+ /** Optional search target announcement prefix. Defaults to Search result; the target label is appended. */
167
+ resultLabel?: ResolvableText;
69
168
  }
169
+ /** Application-wide navigation defaults supplied with provideNavigation. */
70
170
  export interface INavigationConfig {
171
+ /** Optional ordered sections. Unlisted section IDs are appended automatically. */
71
172
  sections?: readonly INavigationSectionConfig[];
173
+ /** Include hidden routes in breadcrumbs. Defaults to false. */
72
174
  includeHiddenInBreadcrumbs?: boolean;
175
+ /** Optional custom sibling ordering; defaults to metadata order, then label. */
73
176
  sortItems?: (a: INavigationItem, b: INavigationItem) => number;
177
+ /** Optional shared side-nav defaults, overridden by an instance's config. */
178
+ sideNav?: ISideNavConfig;
74
179
  }
75
180
  /** A UI section containing flat, visible menu entries. */
76
181
  export interface INavigationGroup {
@@ -112,6 +217,13 @@ export declare function provideNavigation(config: INavigationConfig): {
112
217
  * This allows you to easily associate navigation information with your routes, which can then be used by navigation components to generate menus, breadcrumbs, etc.
113
218
  */
114
219
  export declare function withNav<T extends INavMeta>(route: Route, nav: Strict<T, INavMeta>): Route;
220
+ /** A resolved section retaining nested items for hierarchical navigation. */
221
+ export interface INavigationTreeGroup extends Omit<INavigationSectionConfig, 'title'> {
222
+ /** Translated heading. */
223
+ title: string;
224
+ /** Visible roots in this section; same-section descendants remain nested. */
225
+ items: INavigationItem[];
226
+ }
115
227
  export declare class NavigationService {
116
228
  private readonly router;
117
229
  private readonly config;
@@ -124,7 +236,11 @@ export declare class NavigationService {
124
236
  readonly baseRoute: Signal<string | undefined>;
125
237
  readonly menu: Signal<INavigationItem[]>;
126
238
  readonly menuGroups: Signal<INavigationGroup[]>;
239
+ /** Hierarchical sections; menuGroups retains its existing flat contract. */
240
+ readonly menuTreeGroups: Signal<INavigationTreeGroup[]>;
127
241
  navigateBack(): void;
242
+ private groupTree;
243
+ private includeBreadcrumb;
128
244
  private extractRoutes;
129
245
  private resolveCurrent;
130
246
  private buildMenu;
@@ -136,4 +252,232 @@ export declare class NavigationService {
136
252
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
137
253
  }
138
254
  export declare const NAVIGATION_ACCESS_ADAPTER: InjectionToken<INavigationAccessAdapter>;
139
- export declare const NAVIGATION_CONFIG: InjectionToken<INavigationConfig>;
255
+ export declare const NAVIGATION_CONFIG: InjectionToken<INavigationConfig>;
256
+ /** Context supplied to header and footer templates. */
257
+ export interface ISideNavSlotContext {
258
+ /** True when presenting the desktop icon rail. Search temporarily expands the rail. */
259
+ $implicit: boolean;
260
+ /** Named equivalent of $implicit. */
261
+ collapsed: boolean;
262
+ /** True while using the mobile drawer. */
263
+ mobile: boolean;
264
+ }
265
+ /** Item presentation context. The surrounding link/button retains routing, semantics and keyboard behavior. */
266
+ export interface ISideNavItemContext {
267
+ /** Resolved navigation item. */
268
+ $implicit: INavigationItem;
269
+ /** Whether this is the active Angular route. */
270
+ active: boolean;
271
+ /** Whether only the item's icon should be displayed. */
272
+ collapsed: boolean;
273
+ }
274
+ /** Resolved layout state for application shells and future top-bar integration. */
275
+ export interface ISideNavLayout {
276
+ /** Physical panel edge. */
277
+ side: SideNavSide;
278
+ /** Space to reserve beside the application content; 0px for a mobile drawer. */
279
+ offset: string;
280
+ /** Whether the desktop panel is currently presented as an icon rail. */
281
+ collapsed: boolean;
282
+ /** Whether responsive drawer behavior is active. */
283
+ mobile: boolean;
284
+ /** Whether the mobile drawer is open. Desktop panels remain visible. */
285
+ open: boolean;
286
+ }
287
+ /** Internal search derivation; all paths contain stable navigation item IDs. */
288
+ interface ISideNavSearchResult {
289
+ groups: readonly INavigationTreeGroup[];
290
+ path: readonly string[];
291
+ target?: string;
292
+ label?: string;
293
+ }
294
+ /** One instance per side-nav; coordinates its recursive branch presentations. */
295
+ declare class SideNavStateService {
296
+ private readonly router;
297
+ private readonly activeRoute;
298
+ private readonly i18n;
299
+ private readonly lastSelected;
300
+ private readonly rememberedPath;
301
+ private readonly searchSelected;
302
+ readonly config: import("@angular/core").WritableSignal<ISideNavConfig>;
303
+ readonly sourceGroups: import("@angular/core").WritableSignal<readonly INavigationTreeGroup[]>;
304
+ readonly query: import("@angular/core").WritableSignal<string>;
305
+ readonly itemTemplate: import("@angular/core").WritableSignal<TemplateRef<ISideNavItemContext> | undefined>;
306
+ readonly activated: Subject<INavigationItem>;
307
+ readonly groups: import("@angular/core").Signal<{
308
+ items: INavigationItem[];
309
+ title: string;
310
+ id: string;
311
+ order?: number | undefined;
312
+ icon?: import("@filip.mazev/blocks/icons").IconData | undefined;
313
+ collapsible?: boolean | undefined;
314
+ collapsed?: boolean | undefined;
315
+ showInBreadcrumbs?: boolean | undefined;
316
+ }[]>;
317
+ /** Select the most specific visible route, rather than every matching URL prefix. */
318
+ readonly activeItem: import("@angular/core").Signal<INavigationItem | undefined>;
319
+ readonly activeIds: import("@angular/core").Signal<Set<string>>;
320
+ readonly searchResult: import("@angular/core").Signal<ISideNavSearchResult>;
321
+ readonly revealPath: import("@angular/core").Signal<readonly string[]>;
322
+ readonly target: import("@angular/core").Signal<string | undefined>;
323
+ readonly text: import("@angular/core").Signal<{
324
+ ariaLabel: string;
325
+ searchPlaceholder: string;
326
+ searchLabel: string;
327
+ clearSearchLabel: string;
328
+ emptyText: string;
329
+ openLabel: string;
330
+ closeLabel: string;
331
+ collapseLabel: string;
332
+ expandLabel: string;
333
+ submenuLabel: string;
334
+ resultLabel: string;
335
+ }>;
336
+ constructor();
337
+ isCurrent(item: INavigationItem): boolean;
338
+ search(query: string): void;
339
+ select(item: INavigationItem): void;
340
+ private findActiveItem;
341
+ private routeSpecificity;
342
+ private resolveNav;
343
+ static ɵfac: i0.ɵɵFactoryDeclaration<SideNavStateService, never>;
344
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
345
+ }
346
+ export declare class SideNav {
347
+ private readonly document;
348
+ private readonly router;
349
+ private readonly destroyRef;
350
+ private readonly dimensions;
351
+ private readonly navigation;
352
+ private readonly defaults;
353
+ private readonly scrollLock;
354
+ private readonly cascade;
355
+ private readonly a11y;
356
+ private readonly injector;
357
+ private readonly focusMonitor;
358
+ private readonly toggleElement;
359
+ private readonly saved;
360
+ private readonly loadedKey;
361
+ private readonly lockId;
362
+ private readonly presentation;
363
+ protected readonly drawerAnimated: import("@angular/core").WritableSignal<boolean>;
364
+ protected readonly state: SideNavStateService;
365
+ protected readonly id: string;
366
+ protected readonly headerTemplate: import("@angular/core").WritableSignal<TemplateRef<ISideNavSlotContext> | null>;
367
+ protected readonly footerTemplate: import("@angular/core").WritableSignal<TemplateRef<ISideNavSlotContext> | null>;
368
+ protected readonly reducedMotion: import("@angular/core").Signal<boolean>;
369
+ protected readonly visibleGroups: import("@angular/core").Signal<readonly INavigationTreeGroup[]>;
370
+ protected readonly slotContext: import("@angular/core").Signal<ISideNavSlotContext>;
371
+ readonly config: import("@angular/core").InputSignal<ISideNavConfig>;
372
+ /** Omit to use NavigationService's hierarchical route sections. */
373
+ readonly groups: import("@angular/core").InputSignal<readonly INavigationTreeGroup[] | undefined>;
374
+ /** Optional presentation template; routing and menu semantics remain on the component's surrounding control. */
375
+ readonly itemTemplate: import("@angular/core").InputSignal<TemplateRef<ISideNavItemContext> | undefined>;
376
+ /** Optional controlled desktop state. Without a binding, persisted state and configuration determine the initial value. */
377
+ readonly collapsed: import("@angular/core").InputSignal<boolean | undefined>;
378
+ readonly collapsedChange: import("@angular/core").OutputEmitterRef<boolean>;
379
+ readonly mobileOpen: import("@angular/core").ModelSignal<boolean>;
380
+ readonly itemSelected: import("@angular/core").OutputEmitterRef<INavigationItem>;
381
+ readonly layoutChange: import("@angular/core").OutputEmitterRef<ISideNavLayout>;
382
+ readonly resolvedConfig: import("@angular/core").Signal<{
383
+ side: import("@filip.mazev/blocks/navigation").SideNavSide;
384
+ position: "fixed" | "inline";
385
+ width: string;
386
+ collapsedWidth: string;
387
+ searchable: boolean;
388
+ showItemIcons: boolean;
389
+ showSectionIcons: boolean;
390
+ collapsible: boolean;
391
+ collapsed: boolean;
392
+ persistenceKey?: string;
393
+ mobileBreakpoint: keyof WindowDimensionsService["breakpoints"];
394
+ mobile?: boolean;
395
+ showMobileTrigger: boolean;
396
+ ariaLabel: import("@filip.mazev/blocks/core").ResolvableText;
397
+ searchPlaceholder: import("@filip.mazev/blocks/core").ResolvableText;
398
+ searchLabel: import("@filip.mazev/blocks/core").ResolvableText;
399
+ clearSearchLabel: import("@filip.mazev/blocks/core").ResolvableText;
400
+ emptyText: import("@filip.mazev/blocks/core").ResolvableText;
401
+ openLabel: import("@filip.mazev/blocks/core").ResolvableText;
402
+ closeLabel: import("@filip.mazev/blocks/core").ResolvableText;
403
+ collapseLabel: import("@filip.mazev/blocks/core").ResolvableText;
404
+ expandLabel: import("@filip.mazev/blocks/core").ResolvableText;
405
+ submenuLabel: import("@filip.mazev/blocks/core").ResolvableText;
406
+ resultLabel: import("@filip.mazev/blocks/core").ResolvableText;
407
+ }>;
408
+ readonly isMobile: import("@angular/core").Signal<boolean>;
409
+ readonly isCollapsed: import("@angular/core").Signal<boolean>;
410
+ readonly query: import("@angular/core").Signal<string>;
411
+ readonly layout: import("@angular/core").Signal<ISideNavLayout>;
412
+ private restoreFocus?;
413
+ private focusReturnOrigin;
414
+ private focusRevision;
415
+ constructor();
416
+ setHeaderTemplate(template: TemplateRef<ISideNavSlotContext> | null): void;
417
+ setFooterTemplate(template: TemplateRef<ISideNavSlotContext> | null): void;
418
+ toggle(origin?: HTMLElement | Event): void;
419
+ open(origin?: HTMLElement | Event): void;
420
+ close(): void;
421
+ toggleCollapsed(): void;
422
+ search(query: string): void;
423
+ protected closeFromControl(event: MouseEvent): void;
424
+ protected sectionActive(group: INavigationTreeGroup): boolean;
425
+ protected sectionHighlighted(group: INavigationTreeGroup): boolean;
426
+ protected sectionCollapsed(group: INavigationTreeGroup): boolean;
427
+ protected toggleSection(group: INavigationTreeGroup): void;
428
+ protected menuKey(event: KeyboardEvent): void;
429
+ protected panelKey(event: KeyboardEvent): void;
430
+ private readSavedState;
431
+ static ɵfac: i0.ɵɵFactoryDeclaration<SideNav, never>;
432
+ static ɵcmp: i0.ɵɵComponentDeclaration<SideNav, "bx-side-nav", ["bxSideNav"], {
433
+ "config": {
434
+ "alias": "config";
435
+ "required": false;
436
+ "isSignal": true;
437
+ };
438
+ "groups": {
439
+ "alias": "groups";
440
+ "required": false;
441
+ "isSignal": true;
442
+ };
443
+ "itemTemplate": {
444
+ "alias": "itemTemplate";
445
+ "required": false;
446
+ "isSignal": true;
447
+ };
448
+ "collapsed": {
449
+ "alias": "collapsed";
450
+ "required": false;
451
+ "isSignal": true;
452
+ };
453
+ "mobileOpen": {
454
+ "alias": "mobileOpen";
455
+ "required": false;
456
+ "isSignal": true;
457
+ };
458
+ }, {
459
+ "collapsedChange": "collapsedChange";
460
+ "mobileOpen": "mobileOpenChange";
461
+ "itemSelected": "itemSelected";
462
+ "layoutChange": "layoutChange";
463
+ }, never, never, true, never>;
464
+ }
465
+ /** Registers an ng-template with the containing side-nav, following the modal slot contract. */
466
+ export declare class SideNavHeaderDirective {
467
+ private readonly template;
468
+ private readonly nav;
469
+ constructor();
470
+ static ngTemplateContextGuard(_directive: SideNavHeaderDirective, _context: unknown): _context is ISideNavSlotContext;
471
+ static ɵfac: i0.ɵɵFactoryDeclaration<SideNavHeaderDirective, never>;
472
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SideNavHeaderDirective, "[bxSideNavHeader]", never, {}, {}, never, never, true, never>;
473
+ }
474
+ /** Registers an ng-template with the containing side-nav, following the modal slot contract. */
475
+ export declare class SideNavFooterDirective {
476
+ private readonly template;
477
+ private readonly nav;
478
+ constructor();
479
+ static ngTemplateContextGuard(_directive: SideNavFooterDirective, _context: unknown): _context is ISideNavSlotContext;
480
+ static ɵfac: i0.ɵɵFactoryDeclaration<SideNavFooterDirective, never>;
481
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SideNavFooterDirective, "[bxSideNavFooter]", never, {}, {}, never, never, true, never>;
482
+ }
483
+ export {};