@siemens/element-ng 49.3.0 → 49.5.0

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.
Files changed (43) hide show
  1. package/fesm2022/siemens-element-ng-chat-messages.mjs +4 -4
  2. package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
  3. package/fesm2022/siemens-element-ng-datatable.mjs +1 -1
  4. package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
  5. package/fesm2022/siemens-element-ng-date-range-filter.mjs +13 -18
  6. package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
  7. package/fesm2022/siemens-element-ng-datepicker.mjs +35 -5
  8. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
  9. package/fesm2022/siemens-element-ng-file-uploader.mjs +2 -2
  10. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
  11. package/fesm2022/siemens-element-ng-filtered-search.mjs +123 -91
  12. package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
  13. package/fesm2022/siemens-element-ng-formly.mjs +1 -1
  14. package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
  15. package/fesm2022/siemens-element-ng-list-details.mjs +1 -1
  16. package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
  17. package/fesm2022/siemens-element-ng-loading-spinner.mjs +2 -2
  18. package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
  19. package/fesm2022/siemens-element-ng-markdown-renderer.mjs +2 -2
  20. package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
  21. package/fesm2022/siemens-element-ng-modal.mjs +6 -17
  22. package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
  23. package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +702 -0
  24. package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -0
  25. package/fesm2022/siemens-element-ng-number-input.mjs +2 -2
  26. package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
  27. package/fesm2022/siemens-element-ng-search-bar.mjs +2 -2
  28. package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
  29. package/fesm2022/siemens-element-ng-side-panel.mjs +2 -2
  30. package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
  31. package/fesm2022/siemens-element-ng-threshold.mjs +14 -3
  32. package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
  33. package/fesm2022/siemens-element-ng-tooltip.mjs +2 -2
  34. package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
  35. package/fesm2022/siemens-element-ng-tree-view.mjs +11 -8
  36. package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
  37. package/navbar-vertical-next/package.json +4 -0
  38. package/package.json +7 -3
  39. package/types/siemens-element-ng-filtered-search.d.ts +12 -10
  40. package/types/siemens-element-ng-markdown-renderer.d.ts +1 -1
  41. package/types/siemens-element-ng-navbar-vertical-next.d.ts +264 -0
  42. package/types/siemens-element-ng-threshold.d.ts +16 -6
  43. package/types/siemens-element-ng-tree-view.d.ts +1 -0
@@ -0,0 +1,702 @@
1
+ import { BreakpointObserver } from '@angular/cdk/layout';
2
+ import { NgTemplateOutlet } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Component, InjectionToken, input, model, signal, inject, ViewContainerRef, Injector, computed, HostListener, Directive, ChangeDetectionStrategy, viewChildren, booleanAttribute, output, viewChild, HostBinding, NgModule } from '@angular/core';
5
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
+ import { RouterLinkActive, ActivatedRoute, RouterLink } from '@angular/router';
7
+ import { elementDown2, elementSearch, elementDoubleRight, elementDoubleLeft } from '@siemens/element-icons';
8
+ import { SI_UI_STATE_SERVICE } from '@siemens/element-ng/common';
9
+ import { addIcons, SiIconComponent } from '@siemens/element-ng/icon';
10
+ import { BOOTSTRAP_BREAKPOINTS } from '@siemens/element-ng/resize-observer';
11
+ import { SiSearchBarComponent } from '@siemens/element-ng/search-bar';
12
+ import { SiSkipLinkTargetDirective } from '@siemens/element-ng/skip-links';
13
+ import { SiTooltipDirective } from '@siemens/element-ng/tooltip';
14
+ import { SiTranslatePipe, t } from '@siemens/element-translate-ng/translate';
15
+ import { Overlay } from '@angular/cdk/overlay';
16
+ import { TemplatePortal } from '@angular/cdk/portal';
17
+ import { CdkTrapFocus } from '@angular/cdk/a11y';
18
+ import { SiLinkDirective } from '@siemens/element-ng/link';
19
+
20
+ /**
21
+ * Copyright (c) Siemens 2016 - 2026
22
+ * SPDX-License-Identifier: MIT
23
+ */
24
+ /**
25
+ * @experimental
26
+ * We need a component to attach the stylesheet
27
+ */
28
+ class SiNavbarVerticalNextDividerComponent {
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
30
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.8", type: SiNavbarVerticalNextDividerComponent, isStandalone: true, selector: "si-navbar-vertical-next-divider", ngImport: i0, template: '', isInline: true, styles: [":host{display:block;block-size:1px;background-color:var(--element-ui-4);margin-block:6px;margin-inline:12px}\n"] });
31
+ }
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextDividerComponent, decorators: [{
33
+ type: Component,
34
+ args: [{ selector: 'si-navbar-vertical-next-divider', template: '', styles: [":host{display:block;block-size:1px;background-color:var(--element-ui-4);margin-block:6px;margin-inline:12px}\n"] }]
35
+ }] });
36
+
37
+ /**
38
+ * Copyright (c) Siemens 2016 - 2026
39
+ * SPDX-License-Identifier: MIT
40
+ */
41
+ /** @experimental */
42
+ const SI_NAVBAR_VERTICAL_NEXT = new InjectionToken('SI_NAVBAR_VERTICAL_NEXT');
43
+
44
+ /**
45
+ * Copyright (c) Siemens 2016 - 2026
46
+ * SPDX-License-Identifier: MIT
47
+ */
48
+ /**
49
+ * Using this component, to anchor the flyout inside the navbar within the a11y tree.
50
+ * Otherwise, without aria-owns, screen reader will announce the leaving of the navbar when moving to the flyout.
51
+ * Aria-owns cannot be put directly on the trigger
52
+ * as chrome will include the flyout children in the a11y label of the trigger.
53
+ */
54
+ /** @experimental */
55
+ class SiNavbarFlyoutAnchorComponent {
56
+ groupId = input(...(ngDevMode ? [undefined, { debugName: "groupId" }] : []));
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarFlyoutAnchorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
58
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.8", type: SiNavbarFlyoutAnchorComponent, isStandalone: true, selector: "si-navbar-flyout-anchor", inputs: { groupId: { classPropertyName: "groupId", publicName: "groupId", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-owns": "groupId()" } }, ngImport: i0, template: '', isInline: true });
59
+ }
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarFlyoutAnchorComponent, decorators: [{
61
+ type: Component,
62
+ args: [{
63
+ selector: 'si-navbar-flyout-anchor',
64
+ template: '',
65
+ host: { '[attr.aria-owns]': 'groupId()' }
66
+ }]
67
+ }], propDecorators: { groupId: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupId", required: false }] }] } });
68
+ /** @experimental */
69
+ class SiNavbarVerticalNextGroupTriggerDirective {
70
+ static idCounter = 0;
71
+ /** @internal */
72
+ groupId = `si-navbar-vertical-next-group-${SiNavbarVerticalNextGroupTriggerDirective.idCounter++}`;
73
+ id = `${this.groupId}-trigger`;
74
+ groupTemplate = input.required({ ...(ngDevMode ? { debugName: "groupTemplate" } : {}), alias: 'siNavbarVerticalNextGroupTriggerFor' });
75
+ groupData = input(...(ngDevMode ? [undefined, { debugName: "groupData" }] : []));
76
+ stateId = input(...(ngDevMode ? [undefined, { debugName: "stateId" }] : []));
77
+ expanded = model.required(...(ngDevMode ? [{ debugName: "expanded" }] : []));
78
+ /** @internal */
79
+ flyout = signal(false, ...(ngDevMode ? [{ debugName: "flyout" }] : []));
80
+ /** @internal */
81
+ active = signal(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
82
+ navbar = inject(SI_NAVBAR_VERTICAL_NEXT);
83
+ flyoutOutsideClickSubscription;
84
+ viewContainer = inject(ViewContainerRef);
85
+ overlay = inject(Overlay);
86
+ injector = Injector.create({ parent: inject(Injector), providers: [] });
87
+ overlayRef = this.overlay.create({
88
+ positionStrategy: this.overlay
89
+ .position()
90
+ .flexibleConnectedTo(this.viewContainer.element)
91
+ .withPositions([
92
+ { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },
93
+ { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' }
94
+ ])
95
+ });
96
+ groupView;
97
+ flyoutAnchorComponentRef;
98
+ templatePortal = computed(() => new TemplatePortal(this.groupTemplate(), this.viewContainer, this.groupData(), this.injector), ...(ngDevMode ? [{ debugName: "templatePortal" }] : []));
99
+ ngOnInit() {
100
+ this.attachInline();
101
+ }
102
+ /** @internal */
103
+ hideFlyout() {
104
+ if (this.flyout()) {
105
+ this.flyout.set(false);
106
+ this.active.set(false);
107
+ this.flyoutAnchorComponentRef?.destroy();
108
+ this.flyoutAnchorComponentRef = undefined;
109
+ this.attachInline();
110
+ this.flyoutOutsideClickSubscription?.unsubscribe();
111
+ }
112
+ }
113
+ triggered() {
114
+ if (this.navbar.collapsed()) {
115
+ this.toggleFlyout();
116
+ }
117
+ else {
118
+ this.expanded.set(!this.expanded());
119
+ this.navbar.groupTriggered();
120
+ }
121
+ }
122
+ toggleFlyout() {
123
+ if (this.flyout()) {
124
+ this.hideFlyout();
125
+ }
126
+ else {
127
+ this.flyout.set(true);
128
+ this.attachFlyout();
129
+ }
130
+ }
131
+ attachInline() {
132
+ this.overlayRef.detach();
133
+ this.groupView?.destroy(); // we need ?. for first attachment
134
+ this.groupView = this.viewContainer.createEmbeddedView(this.groupTemplate(), this.groupData(), {
135
+ injector: this.injector
136
+ });
137
+ }
138
+ attachFlyout() {
139
+ this.groupView.destroy();
140
+ this.groupView = this.overlayRef.attach(this.templatePortal());
141
+ this.flyoutAnchorComponentRef = this.viewContainer.createComponent(SiNavbarFlyoutAnchorComponent);
142
+ this.flyoutAnchorComponentRef.setInput('groupId', this.groupId);
143
+ this.flyoutOutsideClickSubscription = this.overlayRef
144
+ .outsidePointerEvents()
145
+ .subscribe(() => this.hideFlyout());
146
+ }
147
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextGroupTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
148
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.8", type: SiNavbarVerticalNextGroupTriggerDirective, isStandalone: true, selector: "button[siNavbarVerticalNextGroupTriggerFor]", inputs: { groupTemplate: { classPropertyName: "groupTemplate", publicName: "siNavbarVerticalNextGroupTriggerFor", isSignal: true, isRequired: true, transformFunction: null }, groupData: { classPropertyName: "groupData", publicName: "groupData", isSignal: true, isRequired: false, transformFunction: null }, stateId: { classPropertyName: "stateId", publicName: "stateId", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { listeners: { "click": "triggered()" }, properties: { "id": "id", "class.show": "expanded()", "attr.aria-controls": "groupId", "attr.aria-expanded": "expanded()" }, classAttribute: "dropdown-toggle" }, ngImport: i0 });
149
+ }
150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextGroupTriggerDirective, decorators: [{
151
+ type: Directive,
152
+ args: [{
153
+ selector: 'button[siNavbarVerticalNextGroupTriggerFor]',
154
+ host: {
155
+ class: 'dropdown-toggle',
156
+ '[id]': 'id',
157
+ '[class.show]': 'expanded()',
158
+ '[attr.aria-controls]': 'groupId',
159
+ '[attr.aria-expanded]': 'expanded()'
160
+ }
161
+ }]
162
+ }], propDecorators: { groupTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "siNavbarVerticalNextGroupTriggerFor", required: true }] }], groupData: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupData", required: false }] }], stateId: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateId", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: true }] }, { type: i0.Output, args: ["expandedChange"] }], triggered: [{
163
+ type: HostListener,
164
+ args: ['click']
165
+ }] } });
166
+
167
+ /**
168
+ * Copyright (c) Siemens 2016 - 2026
169
+ * SPDX-License-Identifier: MIT
170
+ */
171
+ /** @experimental */
172
+ class SiNavbarVerticalNextGroupComponent {
173
+ navbar = inject(SI_NAVBAR_VERTICAL_NEXT);
174
+ groupTrigger = inject(SiNavbarVerticalNextGroupTriggerDirective);
175
+ routerLinkActive = inject(RouterLinkActive, { optional: true });
176
+ // Store initial value, as the mode for an instance never changes.
177
+ flyout = this.groupTrigger.flyout();
178
+ visible = computed(() => {
179
+ return this.flyout || (!this.navbar.collapsed() && this.groupTrigger.expanded());
180
+ }, ...(ngDevMode ? [{ debugName: "visible" }] : []));
181
+ constructor() {
182
+ this.routerLinkActive?.isActiveChange
183
+ .pipe(takeUntilDestroyed())
184
+ .subscribe(active => this.groupTrigger.active.set(active));
185
+ }
186
+ close() {
187
+ this.groupTrigger.hideFlyout();
188
+ }
189
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
190
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiNavbarVerticalNextGroupComponent, isStandalone: true, selector: "si-navbar-vertical-next-group", host: { attributes: { "role": "group", "animate.enter": "component-enter" }, listeners: { "keydown.escape": "close()" }, properties: { "id": "groupTrigger.groupId", "attr.aria-labelledby": "groupTrigger.id" } }, ngImport: i0, template: `@if (visible()) {
191
+ <div
192
+ animate.leave="group-leave"
193
+ [class.inline-group]="!flyout"
194
+ [class.dropdown-menu]="flyout"
195
+ [cdkTrapFocus]="flyout"
196
+ [cdkTrapFocusAutoCapture]="flyout"
197
+ >
198
+ <div [class.overflow-hidden]="!flyout">
199
+ <ng-content />
200
+ </div>
201
+ </div>
202
+ }`, isInline: true, styles: [":host.component-enter .inline-group{transition:none}.inline-group{display:grid;transition-property:grid-template-rows,opacity;transition-duration:calc(.5s * var(--element-animations-enabled, 1));transition-timing-function:ease;opacity:1;grid-template-rows:1fr;overflow:hidden}@starting-style{.inline-group{grid-template-rows:0fr;opacity:0}}.inline-group.group-leave{grid-template-rows:0fr;opacity:0}.dropdown-menu{display:block;position:static}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
203
+ }
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextGroupComponent, decorators: [{
205
+ type: Component,
206
+ args: [{ selector: 'si-navbar-vertical-next-group', imports: [CdkTrapFocus], template: `@if (visible()) {
207
+ <div
208
+ animate.leave="group-leave"
209
+ [class.inline-group]="!flyout"
210
+ [class.dropdown-menu]="flyout"
211
+ [cdkTrapFocus]="flyout"
212
+ [cdkTrapFocusAutoCapture]="flyout"
213
+ >
214
+ <div [class.overflow-hidden]="!flyout">
215
+ <ng-content />
216
+ </div>
217
+ </div>
218
+ }`, host: {
219
+ role: 'group',
220
+ '[id]': 'groupTrigger.groupId',
221
+ '[attr.aria-labelledby]': 'groupTrigger.id',
222
+ 'animate.enter': 'component-enter'
223
+ }, styles: [":host.component-enter .inline-group{transition:none}.inline-group{display:grid;transition-property:grid-template-rows,opacity;transition-duration:calc(.5s * var(--element-animations-enabled, 1));transition-timing-function:ease;opacity:1;grid-template-rows:1fr;overflow:hidden}@starting-style{.inline-group{grid-template-rows:0fr;opacity:0}}.inline-group.group-leave{grid-template-rows:0fr;opacity:0}.dropdown-menu{display:block;position:static}\n"] }]
224
+ }], ctorParameters: () => [], propDecorators: { close: [{
225
+ type: HostListener,
226
+ args: ['keydown.escape']
227
+ }] } });
228
+
229
+ /**
230
+ * Copyright (c) Siemens 2016 - 2026
231
+ * SPDX-License-Identifier: MIT
232
+ */
233
+ /** @experimental */
234
+ class SiNavbarVerticalNextHeaderComponent {
235
+ navbar = inject(SI_NAVBAR_VERTICAL_NEXT);
236
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
237
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiNavbarVerticalNextHeaderComponent, isStandalone: true, selector: "si-navbar-vertical-next-header", host: { attributes: { "animate.enter": "component-enter" }, properties: { "class.collapsed": "navbar.collapsed()" } }, ngImport: i0, template: `
238
+ @if (!navbar.collapsed()) {
239
+ <div class="title si-h5 text-secondary text-truncate p-5" animate.leave="title-leave">
240
+ <ng-content />
241
+ </div>
242
+ } @else {
243
+ <si-navbar-vertical-next-divider class="divider" animate.leave="divider-leave" />
244
+ }
245
+ `, isInline: true, styles: [".divider,.title{opacity:1;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) calc(.25s * var(--element-animations-enabled, 1)) ease-out}@starting-style{.divider,.title{opacity:0}}:host{display:flex;align-items:center;block-size:40px;transition:block-size calc(.5s * var(--element-animations-enabled, 1)) ease-out}:host.collapsed{block-size:13px}:host.component-enter{transition:none}:host.component-enter .title,:host.component-enter .divider{transition:none}.title.title-leave{opacity:0;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) ease-in}.divider{flex:1;margin-block:0}.divider.divider-leave{opacity:0;transition-delay:0s}\n"], dependencies: [{ kind: "component", type: SiNavbarVerticalNextDividerComponent, selector: "si-navbar-vertical-next-divider" }] });
246
+ }
247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextHeaderComponent, decorators: [{
248
+ type: Component,
249
+ args: [{ selector: 'si-navbar-vertical-next-header', imports: [SiNavbarVerticalNextDividerComponent], template: `
250
+ @if (!navbar.collapsed()) {
251
+ <div class="title si-h5 text-secondary text-truncate p-5" animate.leave="title-leave">
252
+ <ng-content />
253
+ </div>
254
+ } @else {
255
+ <si-navbar-vertical-next-divider class="divider" animate.leave="divider-leave" />
256
+ }
257
+ `, host: {
258
+ '[class.collapsed]': 'navbar.collapsed()',
259
+ 'animate.enter': 'component-enter'
260
+ }, styles: [".divider,.title{opacity:1;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) calc(.25s * var(--element-animations-enabled, 1)) ease-out}@starting-style{.divider,.title{opacity:0}}:host{display:flex;align-items:center;block-size:40px;transition:block-size calc(.5s * var(--element-animations-enabled, 1)) ease-out}:host.collapsed{block-size:13px}:host.component-enter{transition:none}:host.component-enter .title,:host.component-enter .divider{transition:none}.title.title-leave{opacity:0;transition:opacity calc(.25s * var(--element-animations-enabled, 1)) ease-in}.divider{flex:1;margin-block:0}.divider.divider-leave{opacity:0;transition-delay:0s}\n"] }]
261
+ }] });
262
+
263
+ /**
264
+ * Copyright (c) Siemens 2016 - 2026
265
+ * SPDX-License-Identifier: MIT
266
+ */
267
+ /** @experimental */
268
+ class SiNavbarVerticalNextItemComponent {
269
+ icons = addIcons({ elementDown2 });
270
+ item = input.required({ ...(ngDevMode ? { debugName: "item" } : {}), alias: 'si-navbar-vertical-next-item' });
271
+ activeOverride = input(...(ngDevMode ? [undefined, { debugName: "activeOverride" }] : []));
272
+ navbar = inject(SI_NAVBAR_VERTICAL_NEXT);
273
+ parent = inject(SiNavbarVerticalNextItemComponent, {
274
+ skipSelf: true,
275
+ optional: true
276
+ });
277
+ group = inject(SiNavbarVerticalNextGroupTriggerDirective, {
278
+ optional: true,
279
+ self: true
280
+ });
281
+ routerLinkActive = inject(RouterLinkActive, { optional: true });
282
+ siLink = inject(SiLinkDirective, { optional: true });
283
+ /**
284
+ * Hides the badge in collapsed state
285
+ */
286
+ hideBadgeCollapsed = computed(() => !!this.item().hideBadgeWhenCollapsed, ...(ngDevMode ? [{ debugName: "hideBadgeCollapsed" }] : []));
287
+ /**
288
+ * Determines if the badge contains text-only content (not numeric)
289
+ */
290
+ textOnlyBadge = computed(() => {
291
+ const badge = this.item().badge;
292
+ return badge ? typeof badge !== 'number' : false;
293
+ }, ...(ngDevMode ? [{ debugName: "textOnlyBadge" }] : []));
294
+ /**
295
+ * Formats badge value to limit display to "+99" for numbers greater than 99
296
+ */
297
+ formattedBadge = computed(() => {
298
+ const badge = this.item().badge;
299
+ if (!badge) {
300
+ return '';
301
+ }
302
+ if (typeof badge === 'number') {
303
+ return badge > 99 ? '+99' : badge.toString();
304
+ }
305
+ return badge.toString();
306
+ }, ...(ngDevMode ? [{ debugName: "formattedBadge" }] : []));
307
+ ngOnInit() {
308
+ if (this.group && this.active) {
309
+ this.group.expanded.set(true);
310
+ }
311
+ }
312
+ triggered() {
313
+ const item = this.item();
314
+ if (item.type === 'action') {
315
+ item.action(item);
316
+ return;
317
+ }
318
+ this.parent?.group?.hideFlyout();
319
+ if (!this.group) {
320
+ this.navbar.itemTriggered();
321
+ }
322
+ }
323
+ get active() {
324
+ return (this.activeOverride() ||
325
+ this.routerLinkActive?.isActive ||
326
+ this.siLink?.active() ||
327
+ ((!this.group?.expanded() || this.navbar.collapsed()) && this.group?.active()) ||
328
+ false);
329
+ /* eslint-disable-enable @typescript-eslint/prefer-nullish-coalescing */
330
+ }
331
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
332
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiNavbarVerticalNextItemComponent, isStandalone: true, selector: "a[si-navbar-vertical-next-item], button[si-navbar-vertical-next-item]", inputs: { item: { classPropertyName: "item", publicName: "si-navbar-vertical-next-item", isSignal: true, isRequired: true, transformFunction: null }, activeOverride: { classPropertyName: "activeOverride", publicName: "activeOverride", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "triggered()" }, properties: { "class.dropdown-item": "this.parent?.group?.flyout()", "class.navbar-vertical-item": "!this.parent?.group?.flyout()", "class.active": "active", "class.hide-badge-collapsed": "hideBadgeCollapsed()" }, classAttribute: "focus-inside" }, ngImport: i0, template: "@let icon = item().icon;\n@if (icon) {\n <si-icon class=\"icon-lg\" [icon]=\"icon\" />\n}\n<div class=\"item-title text-truncate si-h5\">\n <ng-content />\n</div>\n@if (!navbar.textOnly() && formattedBadge()) {\n <span\n [class]=\"[\n 'badge',\n item().badgeColor ? `bg-${item().badgeColor}` : 'bg-default',\n textOnlyBadge() ? 'badge-text-only' : '',\n navbar.collapsed() ? 'badge-collapsed' : ''\n ]\"\n >{{ formattedBadge() }}</span\n >\n}\n@if (group) {\n <si-icon aria-hidden=\"true\" class=\"dropdown-caret me-0 text-body\" [icon]=\"icons.elementDown2\" />\n}\n", styles: [":host(.navbar-vertical-item){display:flex;align-items:center;position:relative;color:var(--element-text-primary);background:none;border:0;font-size:.875rem;padding-block:8px;padding-inline:0 12px;min-inline-size:0;min-block-size:40px;inline-size:100%;border-radius:0}:host(.navbar-vertical-item) .item-title{margin-inline-start:12px}:host(.navbar-vertical-item) .icon-lg{margin-inline-start:12px}:host(.navbar-vertical-item) .icon-lg+.item-title{margin-inline-start:8px}:host(.navbar-vertical-item).show .badge:not(.badge-collapsed){display:none}:host(.navbar-vertical-item):not(.show) .badge+.dropdown-caret{margin-inline:0;padding-inline:0}:host(.navbar-vertical-item).active{color:var(--element-action-primary-hover);background:var(--element-base-1-selected)}:host(.navbar-vertical-item).active:after{content:\"\";position:absolute;inset-block:0;inset-inline-start:0;inline-size:4px;background:var(--element-action-primary-hover)}:host(.navbar-vertical-item):hover{text-decoration:none;background:var(--element-base-1-hover)}:host-context(.nav-scroll > .navbar-vertical-item)+:host(.navbar-vertical-item),:host-context(.nav-scroll > si-navbar-vertical-next-group)+:host(.navbar-vertical-item),:host-context(.nav-scroll > si-navbar-flyout-anchor)+:host(.navbar-vertical-item){margin-block-start:8px}:host-context(.nav-text-only si-navbar-vertical-next-group) .item-title{margin-inline-start:0}:host-context(si-navbar-vertical-next-group) :host(.navbar-vertical-item){padding-inline-start:32px}:host-context(si-navbar-vertical-next-group) :host(.navbar-vertical-item) .item-title{font-weight:400}:host(.dropdown-item) .item-title{font-weight:400}:host-context(.nav-collapsed) .badge{position:absolute;inset-block-start:4px;inset-inline-end:6px;block-size:14px;min-inline-size:14px;border-radius:7px;font-size:.75rem;line-height:14px;padding-block:0;padding-inline:4px;font-weight:600}:host-context(.nav-collapsed) .badge.badge-text-only{color:transparent;font-size:0}:host-context(.nav-collapsed) :is(.item-title,.dropdown-caret){position:absolute!important;inline-size:1px!important;block-size:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}:host-context(.nav-collapsed).hide-badge-collapsed .badge{display:none}:host-context(.link-with-items)>:host(button){padding-inline:12px}:host-context(.link-with-items)>:host(button) .item-title,:host-context(.link-with-items)>:host(button) .icon-lg{display:none}:host-context(.link-with-items)>:host(button) .dropdown-caret{padding-inline:0}:host-context(.link-with-items)>:host(button):after{display:none}:host-context(.nav-collapsed .link-with-items)>:host(button){padding-inline:0}:host-context(.nav-collapsed .link-with-items)>:host(button):after{display:block}:host-context(.nav-collapsed .link-with-items)>:host(button) .icon-lg{display:block}:host-context(.nav-collapsed .link-with-items)>:host(a){display:none}.badge{margin-inline:auto 0}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
333
+ }
334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextItemComponent, decorators: [{
335
+ type: Component,
336
+ args: [{ selector: 'a[si-navbar-vertical-next-item], button[si-navbar-vertical-next-item]', imports: [SiIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
337
+ 'class': 'focus-inside',
338
+ '[class.dropdown-item]': 'this.parent?.group?.flyout()',
339
+ '[class.navbar-vertical-item]': '!this.parent?.group?.flyout()',
340
+ '[class.active]': 'active',
341
+ '[class.hide-badge-collapsed]': 'hideBadgeCollapsed()'
342
+ }, template: "@let icon = item().icon;\n@if (icon) {\n <si-icon class=\"icon-lg\" [icon]=\"icon\" />\n}\n<div class=\"item-title text-truncate si-h5\">\n <ng-content />\n</div>\n@if (!navbar.textOnly() && formattedBadge()) {\n <span\n [class]=\"[\n 'badge',\n item().badgeColor ? `bg-${item().badgeColor}` : 'bg-default',\n textOnlyBadge() ? 'badge-text-only' : '',\n navbar.collapsed() ? 'badge-collapsed' : ''\n ]\"\n >{{ formattedBadge() }}</span\n >\n}\n@if (group) {\n <si-icon aria-hidden=\"true\" class=\"dropdown-caret me-0 text-body\" [icon]=\"icons.elementDown2\" />\n}\n", styles: [":host(.navbar-vertical-item){display:flex;align-items:center;position:relative;color:var(--element-text-primary);background:none;border:0;font-size:.875rem;padding-block:8px;padding-inline:0 12px;min-inline-size:0;min-block-size:40px;inline-size:100%;border-radius:0}:host(.navbar-vertical-item) .item-title{margin-inline-start:12px}:host(.navbar-vertical-item) .icon-lg{margin-inline-start:12px}:host(.navbar-vertical-item) .icon-lg+.item-title{margin-inline-start:8px}:host(.navbar-vertical-item).show .badge:not(.badge-collapsed){display:none}:host(.navbar-vertical-item):not(.show) .badge+.dropdown-caret{margin-inline:0;padding-inline:0}:host(.navbar-vertical-item).active{color:var(--element-action-primary-hover);background:var(--element-base-1-selected)}:host(.navbar-vertical-item).active:after{content:\"\";position:absolute;inset-block:0;inset-inline-start:0;inline-size:4px;background:var(--element-action-primary-hover)}:host(.navbar-vertical-item):hover{text-decoration:none;background:var(--element-base-1-hover)}:host-context(.nav-scroll > .navbar-vertical-item)+:host(.navbar-vertical-item),:host-context(.nav-scroll > si-navbar-vertical-next-group)+:host(.navbar-vertical-item),:host-context(.nav-scroll > si-navbar-flyout-anchor)+:host(.navbar-vertical-item){margin-block-start:8px}:host-context(.nav-text-only si-navbar-vertical-next-group) .item-title{margin-inline-start:0}:host-context(si-navbar-vertical-next-group) :host(.navbar-vertical-item){padding-inline-start:32px}:host-context(si-navbar-vertical-next-group) :host(.navbar-vertical-item) .item-title{font-weight:400}:host(.dropdown-item) .item-title{font-weight:400}:host-context(.nav-collapsed) .badge{position:absolute;inset-block-start:4px;inset-inline-end:6px;block-size:14px;min-inline-size:14px;border-radius:7px;font-size:.75rem;line-height:14px;padding-block:0;padding-inline:4px;font-weight:600}:host-context(.nav-collapsed) .badge.badge-text-only{color:transparent;font-size:0}:host-context(.nav-collapsed) :is(.item-title,.dropdown-caret){position:absolute!important;inline-size:1px!important;block-size:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}:host-context(.nav-collapsed).hide-badge-collapsed .badge{display:none}:host-context(.link-with-items)>:host(button){padding-inline:12px}:host-context(.link-with-items)>:host(button) .item-title,:host-context(.link-with-items)>:host(button) .icon-lg{display:none}:host-context(.link-with-items)>:host(button) .dropdown-caret{padding-inline:0}:host-context(.link-with-items)>:host(button):after{display:none}:host-context(.nav-collapsed .link-with-items)>:host(button){padding-inline:0}:host-context(.nav-collapsed .link-with-items)>:host(button):after{display:block}:host-context(.nav-collapsed .link-with-items)>:host(button) .icon-lg{display:block}:host-context(.nav-collapsed .link-with-items)>:host(a){display:none}.badge{margin-inline:auto 0}\n"] }]
343
+ }], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "si-navbar-vertical-next-item", required: true }] }], activeOverride: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeOverride", required: false }] }], triggered: [{
344
+ type: HostListener,
345
+ args: ['click']
346
+ }] } });
347
+
348
+ /**
349
+ * Copyright (c) Siemens 2016 - 2026
350
+ * SPDX-License-Identifier: MIT
351
+ */
352
+ /** @experimental */
353
+ class SiNavbarVerticalNextItemLegacyComponent {
354
+ item = input.required(...(ngDevMode ? [{ debugName: "item" }] : []));
355
+ navbarExpandButtonText = input.required(...(ngDevMode ? [{ debugName: "navbarExpandButtonText" }] : []));
356
+ navbarCollapseButtonText = input.required(...(ngDevMode ? [{ debugName: "navbarCollapseButtonText" }] : []));
357
+ expanded = model.required(...(ngDevMode ? [{ debugName: "expanded" }] : []));
358
+ flyoutItems = computed(() => {
359
+ if (!this.navbar.collapsed()) {
360
+ return this.item().items;
361
+ }
362
+ else {
363
+ return [
364
+ this.isLink() ? { ...this.item(), items: undefined } : [],
365
+ this.item().items ?? []
366
+ ].flat();
367
+ }
368
+ }, ...(ngDevMode ? [{ debugName: "flyoutItems" }] : []));
369
+ isLink = computed(() => {
370
+ const item = this.item();
371
+ return !!item.action || !!item.link || !!item.href;
372
+ }, ...(ngDevMode ? [{ debugName: "isLink" }] : []));
373
+ toggleButtonLabel = computed(() => this.navbar.collapsed()
374
+ ? this.navbarExpandButtonText()
375
+ : this.expanded()
376
+ ? this.navbarCollapseButtonText()
377
+ : this.navbarExpandButtonText(), ...(ngDevMode ? [{ debugName: "toggleButtonLabel" }] : []));
378
+ siLinks = viewChildren(SiLinkDirective, ...(ngDevMode ? [{ debugName: "siLinks" }] : []));
379
+ itemActive = computed(() => (this.navbar.collapsed() || !this.expanded()) && this.siLinks().some(link => link.active()), ...(ngDevMode ? [{ debugName: "itemActive" }] : []));
380
+ navbar = inject(SI_NAVBAR_VERTICAL_NEXT);
381
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextItemLegacyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
382
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiNavbarVerticalNextItemLegacyComponent, isStandalone: true, selector: "si-navbar-vertical-next-item-legacy", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, navbarExpandButtonText: { classPropertyName: "navbarExpandButtonText", publicName: "navbarExpandButtonText", isSignal: true, isRequired: true, transformFunction: null }, navbarCollapseButtonText: { classPropertyName: "navbarCollapseButtonText", publicName: "navbarCollapseButtonText", isSignal: true, isRequired: true, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { classAttribute: "d-block mb-4" }, viewQueries: [{ propertyName: "siLinks", predicate: SiLinkDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- section header -->\n@if (!isLink() && !item().items) {\n <si-navbar-vertical-next-header>\n {{ item().title | translate }}\n </si-navbar-vertical-next-header>\n} @else if (isLink() && !item().items) {\n <a [si-navbar-vertical-next-item]=\"item()\" [siLink]=\"item()\">\n {{ item().title | translate }}\n </a>\n} @else if (isLink() && item().items) {\n <div class=\"link-with-items\">\n <a\n #mainLink\n [si-navbar-vertical-next-item]=\"item()\"\n [siLink]=\"item()\"\n [activeOverride]=\"itemActive()\"\n >\n {{ item().title | translate }}\n </a>\n <button\n type=\"button\"\n class=\"mt-0\"\n [si-navbar-vertical-next-item]=\"item()\"\n [siNavbarVerticalNextGroupTriggerFor]=\"group\"\n [activeOverride]=\"mainLink.active\"\n [attr.aria-label]=\"toggleButtonLabel() + ' ' + item().title | translate\"\n [(expanded)]=\"expanded\"\n >\n {{ item().title | translate }}\n </button>\n </div>\n} @else if (item().items) {\n <button\n type=\"button\"\n [si-navbar-vertical-next-item]=\"item()\"\n [siNavbarVerticalNextGroupTriggerFor]=\"group\"\n [activeOverride]=\"itemActive()\"\n [(expanded)]=\"expanded\"\n >\n {{ item().title | translate }}\n </button>\n}\n\n<ng-template #group>\n <si-navbar-vertical-next-group>\n @for (subitem of flyoutItems(); track $index) {\n <a activeClass=\"active\" [si-navbar-vertical-next-item]=\"subitem\" [siLink]=\"subitem\">\n {{ subitem.title | translate }}\n </a>\n }\n </si-navbar-vertical-next-group>\n</ng-template>\n", styles: [".link-with-items{display:grid;grid-template-columns:1fr auto;grid-template-areas:\"- -\" \"items items\"}si-navbar-vertical-next-group{grid-area:items}\n"], dependencies: [{ kind: "directive", type: SiLinkDirective, selector: "[siLink]", inputs: ["siLink", "siLinkDefaultTarget", "actionParam", "activeClass", "exactMatch", "ariaCurrent"], outputs: ["activeChange"], exportAs: ["siLink"] }, { kind: "component", type: SiNavbarVerticalNextItemComponent, selector: "a[si-navbar-vertical-next-item], button[si-navbar-vertical-next-item]", inputs: ["si-navbar-vertical-next-item", "activeOverride"] }, { kind: "directive", type: SiNavbarVerticalNextGroupTriggerDirective, selector: "button[siNavbarVerticalNextGroupTriggerFor]", inputs: ["siNavbarVerticalNextGroupTriggerFor", "groupData", "stateId", "expanded"], outputs: ["expandedChange"] }, { kind: "component", type: SiNavbarVerticalNextGroupComponent, selector: "si-navbar-vertical-next-group" }, { kind: "component", type: SiNavbarVerticalNextHeaderComponent, selector: "si-navbar-vertical-next-header" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
383
+ }
384
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextItemLegacyComponent, decorators: [{
385
+ type: Component,
386
+ args: [{ selector: 'si-navbar-vertical-next-item-legacy', imports: [
387
+ SiLinkDirective,
388
+ SiTranslatePipe,
389
+ SiNavbarVerticalNextItemComponent,
390
+ SiNavbarVerticalNextGroupTriggerDirective,
391
+ SiNavbarVerticalNextGroupComponent,
392
+ SiNavbarVerticalNextHeaderComponent
393
+ ], host: {
394
+ 'class': 'd-block mb-4'
395
+ }, template: "<!-- section header -->\n@if (!isLink() && !item().items) {\n <si-navbar-vertical-next-header>\n {{ item().title | translate }}\n </si-navbar-vertical-next-header>\n} @else if (isLink() && !item().items) {\n <a [si-navbar-vertical-next-item]=\"item()\" [siLink]=\"item()\">\n {{ item().title | translate }}\n </a>\n} @else if (isLink() && item().items) {\n <div class=\"link-with-items\">\n <a\n #mainLink\n [si-navbar-vertical-next-item]=\"item()\"\n [siLink]=\"item()\"\n [activeOverride]=\"itemActive()\"\n >\n {{ item().title | translate }}\n </a>\n <button\n type=\"button\"\n class=\"mt-0\"\n [si-navbar-vertical-next-item]=\"item()\"\n [siNavbarVerticalNextGroupTriggerFor]=\"group\"\n [activeOverride]=\"mainLink.active\"\n [attr.aria-label]=\"toggleButtonLabel() + ' ' + item().title | translate\"\n [(expanded)]=\"expanded\"\n >\n {{ item().title | translate }}\n </button>\n </div>\n} @else if (item().items) {\n <button\n type=\"button\"\n [si-navbar-vertical-next-item]=\"item()\"\n [siNavbarVerticalNextGroupTriggerFor]=\"group\"\n [activeOverride]=\"itemActive()\"\n [(expanded)]=\"expanded\"\n >\n {{ item().title | translate }}\n </button>\n}\n\n<ng-template #group>\n <si-navbar-vertical-next-group>\n @for (subitem of flyoutItems(); track $index) {\n <a activeClass=\"active\" [si-navbar-vertical-next-item]=\"subitem\" [siLink]=\"subitem\">\n {{ subitem.title | translate }}\n </a>\n }\n </si-navbar-vertical-next-group>\n</ng-template>\n", styles: [".link-with-items{display:grid;grid-template-columns:1fr auto;grid-template-areas:\"- -\" \"items items\"}si-navbar-vertical-next-group{grid-area:items}\n"] }]
396
+ }], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], navbarExpandButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "navbarExpandButtonText", required: true }] }], navbarCollapseButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "navbarCollapseButtonText", required: true }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: true }] }, { type: i0.Output, args: ["expandedChange"] }], siLinks: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => SiLinkDirective), { isSignal: true }] }] } });
397
+
398
+ /**
399
+ * Copyright (c) Siemens 2016 - 2026
400
+ * SPDX-License-Identifier: MIT
401
+ */
402
+ /**
403
+ * Required to have compiler checks on the factory template
404
+ * @experimental
405
+ */
406
+ class SiNavbarVerticalNextItemGuardDirective {
407
+ static ngTemplateContextGuard(dir, ctx) {
408
+ return true;
409
+ }
410
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextItemGuardDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
411
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: SiNavbarVerticalNextItemGuardDirective, isStandalone: true, selector: "[siNavbarVerticalNextItemGuard]", ngImport: i0 });
412
+ }
413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextItemGuardDirective, decorators: [{
414
+ type: Directive,
415
+ args: [{ selector: '[siNavbarVerticalNextItemGuard]' }]
416
+ }] });
417
+ /** @experimental */
418
+ class SiNavbarVerticalNextComponent {
419
+ icons = addIcons({ elementDoubleLeft, elementDoubleRight, elementSearch });
420
+ /**
421
+ * Whether the navbar-vertical is collapsed.
422
+ *
423
+ * @defaultValue false
424
+ */
425
+ collapsed = model(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
426
+ /**
427
+ * Toggles search bar
428
+ *
429
+ * @defaultValue false
430
+ */
431
+ searchable = input(false, { ...(ngDevMode ? { debugName: "searchable" } : {}), transform: booleanAttribute });
432
+ /**
433
+ * Placeholder text for search
434
+ *
435
+ * @defaultValue
436
+ * ```
437
+ * t(() => $localize`:@@SI_NAVBAR_VERTICAL.SEARCH_PLACEHOLDER:Search ...`)
438
+ * ```
439
+ */
440
+ searchPlaceholder = input(t(() => $localize `:@@SI_NAVBAR_VERTICAL.SEARCH_PLACEHOLDER:Search ...`), ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : []));
441
+ /**
442
+ * List of vertical navigation items
443
+ *
444
+ * @defaultValue []
445
+ */
446
+ items = model([], ...(ngDevMode ? [{ debugName: "items" }] : []));
447
+ /**
448
+ * Set to `true` if there are no icons
449
+ *
450
+ * @defaultValue false
451
+ */
452
+ /**
453
+ * Set to `true` if there are no icons
454
+ *
455
+ * @defaultValue false
456
+ */
457
+ textOnly = input(false, { ...(ngDevMode ? { debugName: "textOnly" } : {}), transform: booleanAttribute });
458
+ /**
459
+ * Set to false to hide the vertical navbar
460
+ *
461
+ * @defaultValue true
462
+ */
463
+ /**
464
+ * Set to false to hide the vertical navbar
465
+ *
466
+ * @defaultValue true
467
+ */
468
+ visible = input(true, { ...(ngDevMode ? { debugName: "visible" } : {}), transform: booleanAttribute });
469
+ /**
470
+ * Text for the navbar expand button. Required for a11y
471
+ *
472
+ * @defaultValue
473
+ * ```
474
+ * t(() => $localize`:@@SI_NAVBAR_VERTICAL.EXPAND:Expand`)
475
+ * ```
476
+ */
477
+ navbarExpandButtonText = input(t(() => $localize `:@@SI_NAVBAR_VERTICAL.EXPAND:Expand`), ...(ngDevMode ? [{ debugName: "navbarExpandButtonText" }] : []));
478
+ /**
479
+ * Text for the navbar collapse button. Required for a11y
480
+ *
481
+ * @defaultValue
482
+ * ```
483
+ * t(() => $localize`:@@SI_NAVBAR_VERTICAL.COLLAPSE:Collapse`)
484
+ * ```
485
+ */
486
+ navbarCollapseButtonText = input(t(() => $localize `:@@SI_NAVBAR_VERTICAL.COLLAPSE:Collapse`), ...(ngDevMode ? [{ debugName: "navbarCollapseButtonText" }] : []));
487
+ /**
488
+ * An optional stateId to uniquely identify a component instance.
489
+ * Required for persistence of ui state.
490
+ */
491
+ stateId = input(...(ngDevMode ? [undefined, { debugName: "stateId" }] : []));
492
+ /**
493
+ * Label for the skip link to the vertical navbar
494
+ *
495
+ * @defaultValue
496
+ * ```
497
+ * t(() => $localize`:@@SI_NAVBAR_VERTICAL.SKIP_LINK.NAVIGATION_LABEL:Navigation`)
498
+ * ```
499
+ */
500
+ skipLinkNavigationLabel = input(t(() => $localize `:@@SI_NAVBAR_VERTICAL.SKIP_LINK.NAVIGATION_LABEL:Navigation`), ...(ngDevMode ? [{ debugName: "skipLinkNavigationLabel" }] : []));
501
+ /**
502
+ * Label for the skip link to main content
503
+ *
504
+ * @defaultValue
505
+ * ```
506
+ * t(() => $localize`:@@SI_NAVBAR_VERTICAL.SKIP_LINK.MAIN_LABEL:Main content`)
507
+ * ```
508
+ */
509
+ skipLinkMainContentLabel = input(t(() => $localize `:@@SI_NAVBAR_VERTICAL.SKIP_LINK.MAIN_LABEL:Main content`), ...(ngDevMode ? [{ debugName: "skipLinkMainContentLabel" }] : []));
510
+ /**
511
+ * Debounce time for the search input
512
+ * @defaultValue 400
513
+ */
514
+ searchDebounceTime = input(400, ...(ngDevMode ? [{ debugName: "searchDebounceTime" }] : []));
515
+ /**
516
+ * Output for search bar input
517
+ */
518
+ searchEvent = output();
519
+ searchBar = viewChild.required(SiSearchBarComponent);
520
+ activatedRoute = inject(ActivatedRoute, { optional: true });
521
+ // Is required to prevent the navbar from running the padding animation on creation.
522
+ ready = true;
523
+ uiStateService = inject(SI_UI_STATE_SERVICE, { optional: true });
524
+ breakpointObserver = inject(BreakpointObserver);
525
+ navbarItems = viewChildren(SiNavbarVerticalNextItemComponent, ...(ngDevMode ? [{ debugName: "navbarItems" }] : []));
526
+ navbarItemsLegacy = viewChildren(SiNavbarVerticalNextItemLegacyComponent, ...(ngDevMode ? [{ debugName: "navbarItemsLegacy" }] : []));
527
+ itemsToComponents = computed(() => new Map([...this.navbarItems(), ...this.navbarItemsLegacy()].map(component => [
528
+ component.item(), // to have a broader key type allowed
529
+ component
530
+ ])), ...(ngDevMode ? [{ debugName: "itemsToComponents" }] : []));
531
+ smallScreen = signal(false, ...(ngDevMode ? [{ debugName: "smallScreen" }] : []));
532
+ uiStateExpandedItems = signal({}, ...(ngDevMode ? [{ debugName: "uiStateExpandedItems" }] : []));
533
+ // Indicates if the user prefers a collapsed navbar. Relevant for resizing.
534
+ preferCollapse = false;
535
+ constructor() {
536
+ this.breakpointObserver
537
+ .observe(`(max-width: ${BOOTSTRAP_BREAKPOINTS.lgMinimum}px)`)
538
+ .pipe(takeUntilDestroyed())
539
+ .subscribe(({ matches }) => {
540
+ this.collapsed.set(matches || this.preferCollapse);
541
+ this.smallScreen.set(matches);
542
+ });
543
+ }
544
+ ngOnChanges(changes) {
545
+ if (changes.collapsed) {
546
+ this.preferCollapse = this.collapsed();
547
+ }
548
+ }
549
+ ngOnInit() {
550
+ const stateId = this.stateId();
551
+ if (this.uiStateService && stateId) {
552
+ this.uiStateService.load(stateId).then(uiState => {
553
+ if (uiState) {
554
+ this.preferCollapse = uiState.preferCollapse;
555
+ this.collapsed.set(this.smallScreen() ? this.collapsed() : this.preferCollapse);
556
+ this.uiStateExpandedItems.set(uiState.expandedItems);
557
+ }
558
+ });
559
+ }
560
+ }
561
+ toggleCollapse() {
562
+ if (this.collapsed()) {
563
+ this.expand();
564
+ }
565
+ else {
566
+ this.collapse();
567
+ }
568
+ }
569
+ /** Expands the vertical navbar. */
570
+ expand() {
571
+ this.collapsed.set(false);
572
+ if (!this.smallScreen()) {
573
+ this.preferCollapse = this.collapsed();
574
+ }
575
+ this.saveUIState();
576
+ }
577
+ /** Collapses the vertical navbar. */
578
+ collapse() {
579
+ this.collapsed.set(true);
580
+ if (!this.smallScreen()) {
581
+ this.preferCollapse = this.collapsed();
582
+ }
583
+ this.saveUIState();
584
+ }
585
+ expandForSearch() {
586
+ this.expand();
587
+ setTimeout(() => this.searchBar().focus());
588
+ }
589
+ doSearch(event) {
590
+ this.searchEvent.emit(event);
591
+ }
592
+ /** @internal */
593
+ groupTriggered() {
594
+ this.saveUIState();
595
+ const itemToComponentMap = this.itemsToComponents();
596
+ this.items.set(this.items().map(item => {
597
+ const component = itemToComponentMap.get(item);
598
+ if (!component) {
599
+ return item;
600
+ }
601
+ if (component instanceof SiNavbarVerticalNextItemLegacyComponent) {
602
+ return {
603
+ ...item,
604
+ expanded: component.expanded()
605
+ };
606
+ }
607
+ if (component.group) {
608
+ return {
609
+ ...item,
610
+ expanded: component.group.expanded()
611
+ };
612
+ }
613
+ return item;
614
+ }));
615
+ this.collapsed.set(false);
616
+ }
617
+ saveUIState() {
618
+ const stateId = this.stateId();
619
+ if (!this.uiStateService || !stateId) {
620
+ return;
621
+ }
622
+ const expandedGroups = this.navbarItems()
623
+ .filter(item => item.item().id && item.group?.expanded())
624
+ .map(item => [item.item().id, true]);
625
+ const expandedGroupsLegacy = this.navbarItemsLegacy()
626
+ .filter(item => item.item().id && item.expanded())
627
+ .map(item => [item.item().id, true]);
628
+ this.uiStateService.save(stateId, {
629
+ preferCollapse: this.preferCollapse,
630
+ expandedItems: Object.fromEntries([...expandedGroups, ...expandedGroupsLegacy])
631
+ });
632
+ }
633
+ /** @internal */
634
+ itemTriggered() {
635
+ if (this.smallScreen()) {
636
+ this.collapsed.set(true);
637
+ }
638
+ }
639
+ isLegacyStyle(item) {
640
+ return !('type' in item && item.type !== 'check' && item.type !== 'radio');
641
+ }
642
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
643
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiNavbarVerticalNextComponent, isStandalone: true, selector: "si-navbar-vertical-next", inputs: { collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, textOnly: { classPropertyName: "textOnly", publicName: "textOnly", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, navbarExpandButtonText: { classPropertyName: "navbarExpandButtonText", publicName: "navbarExpandButtonText", isSignal: true, isRequired: false, transformFunction: null }, navbarCollapseButtonText: { classPropertyName: "navbarCollapseButtonText", publicName: "navbarCollapseButtonText", isSignal: true, isRequired: false, transformFunction: null }, stateId: { classPropertyName: "stateId", publicName: "stateId", isSignal: true, isRequired: false, transformFunction: null }, skipLinkNavigationLabel: { classPropertyName: "skipLinkNavigationLabel", publicName: "skipLinkNavigationLabel", isSignal: true, isRequired: false, transformFunction: null }, skipLinkMainContentLabel: { classPropertyName: "skipLinkMainContentLabel", publicName: "skipLinkMainContentLabel", isSignal: true, isRequired: false, transformFunction: null }, searchDebounceTime: { classPropertyName: "searchDebounceTime", publicName: "searchDebounceTime", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", items: "itemsChange", searchEvent: "searchEvent" }, host: { properties: { "class.nav-collapsed": "collapsed()", "class.nav-text-only": "textOnly()", "class.visible": "visible()", "class.ready": "this.ready" }, classAttribute: "si-layout-inner" }, providers: [{ provide: SI_NAVBAR_VERTICAL_NEXT, useExisting: SiNavbarVerticalNextComponent }], viewQueries: [{ propertyName: "searchBar", first: true, predicate: SiSearchBarComponent, descendants: true, isSignal: true }, { propertyName: "navbarItems", predicate: SiNavbarVerticalNextItemComponent, descendants: true, isSignal: true }, { propertyName: "navbarItemsLegacy", predicate: SiNavbarVerticalNextItemLegacyComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (visible()) {\n @if (smallScreen() && !collapsed()) {\n <div class=\"modal-backdrop\" animate.leave=\"backdrop-leave\" (click)=\"toggleCollapse()\"></div>\n }\n <nav\n tabindex=\"-1\"\n class=\"bg-base-1 focus-sub-inside\"\n [class.expanded]=\"!collapsed()\"\n [siSkipLinkTarget]=\"skipLinkNavigationLabel()\"\n [class.text-only]=\"textOnly()\"\n >\n <div class=\"collapse-toggle ms-auto\">\n <div class=\"mobile-drawer focus-inside navbar-vertical-no-collapse\">\n <button\n type=\"button\"\n class=\"btn btn-icon btn-ghost\"\n [attr.aria-label]=\"\n (collapsed() ? navbarExpandButtonText() : navbarCollapseButtonText()) | translate\n \"\n [attr.aria-expanded]=\"!collapsed()\"\n (click)=\"toggleCollapse()\"\n >\n <si-icon\n class=\"flip-rtl\"\n [icon]=\"collapsed() ? icons.elementDoubleRight : icons.elementDoubleLeft\"\n />\n </button>\n </div>\n </div>\n @if (searchable()) {\n <div class=\"nav-search\">\n <si-search-bar\n class=\"mx-4\"\n colorVariant=\"base-0\"\n prohibitedCharacters=\"*?\"\n [placeholder]=\"searchPlaceholder() | translate\"\n [debounceTime]=\"searchDebounceTime()\"\n [showIcon]=\"true\"\n (searchChange)=\"doSearch($event)\"\n />\n <button\n type=\"button\"\n class=\"btn-search bg-base-0 p-3 mx-4 mobile navbar-vertical-no-collapse text-secondary\"\n [attr.aria-label]=\"searchPlaceholder() | translate\"\n (click)=\"expandForSearch()\"\n >\n <si-icon class=\"icon\" [icon]=\"icons.elementSearch\" />\n </button>\n </div>\n }\n <div class=\"nav-scroll\">\n @for (item of items(); track $index) {\n @if (isLegacyStyle(item)) {\n <si-navbar-vertical-next-item-legacy\n [item]=\"item\"\n [navbarExpandButtonText]=\"navbarExpandButtonText() | translate\"\n [navbarCollapseButtonText]=\"navbarCollapseButtonText() | translate\"\n [expanded]=\"\n (item.id ? uiStateExpandedItems()[item.id] : undefined) ?? item.expanded ?? false\n \"\n />\n } @else {\n <ng-container *ngTemplateOutlet=\"navbarItems; context: { item }\" />\n }\n }\n </div>\n </nav>\n}\n<main\n class=\"si-layout-inner focus-none\"\n tabindex=\"-1\"\n [siSkipLinkTarget]=\"skipLinkMainContentLabel()\"\n>\n <ng-content />\n</main>\n\n<ng-template #navbarItems let-item=\"item\" siNavbarVerticalNextItemGuard>\n @switch (item.type) {\n @case ('group') {\n <button\n type=\"button\"\n placement=\"end\"\n [si-navbar-vertical-next-item]=\"item\"\n [stateId]=\"item.id\"\n [siNavbarVerticalNextGroupTriggerFor]=\"group\"\n [groupData]=\"{ group: item }\"\n [expanded]=\"\n (item.id ? uiStateExpandedItems()[item.id] : undefined) ?? item.expanded ?? false\n \"\n [siTooltip]=\"item.label | translate\"\n [isDisabled]=\"!collapsed()\"\n >\n {{ item.label | translate }}\n </button>\n }\n @case ('action') {\n <button\n type=\"button\"\n placement=\"end\"\n [si-navbar-vertical-next-item]=\"item\"\n [activeOverride]=\"item.active\"\n [siTooltip]=\"item.label | translate\"\n [isDisabled]=\"!collapsed()\"\n >\n {{ item.label | translate }}\n </button>\n }\n @case ('router-link') {\n <a\n routerLinkActive\n placement=\"end\"\n [routerLinkActiveOptions]=\"item.activeMatchOptions ?? { exact: false }\"\n [si-navbar-vertical-next-item]=\"item\"\n [routerLink]=\"item.routerLink\"\n [queryParams]=\"item.extras?.queryParams\"\n [queryParamsHandling]=\"item.extras?.queryParamsHandling\"\n [fragment]=\"item.extras?.fragment\"\n [state]=\"item.extras?.state\"\n [relativeTo]=\"item.extras?.relativeTo ?? this.activatedRoute\"\n [preserveFragment]=\"item.extras?.preserveFragment\"\n [skipLocationChange]=\"item.extras?.skipLocationChange\"\n [replaceUrl]=\"item.extras?.replaceUrl\"\n [siTooltip]=\"item.label | translate\"\n [isDisabled]=\"!collapsed()\"\n >\n {{ item.label | translate }}\n </a>\n }\n @case ('link') {\n <a\n placement=\"end\"\n [si-navbar-vertical-next-item]=\"item\"\n [href]=\"item.href\"\n [target]=\"item.target\"\n [siTooltip]=\"item.label | translate\"\n [isDisabled]=\"!collapsed()\"\n >\n {{ item.label | translate }}\n </a>\n }\n @case ('divider') {\n <si-navbar-vertical-next-divider />\n }\n @case ('header') {\n <si-navbar-vertical-next-header>\n {{ item.label | translate }}\n </si-navbar-vertical-next-header>\n }\n }\n</ng-template>\n\n<ng-template #group let-group=\"group\" siNavbarVerticalNextItemGuard>\n <si-navbar-vertical-next-group routerLinkActive>\n @for (item of group.children; track $index) {\n <!-- a copy from above, but we have to nest the items to make routerLink active work -->\n @switch (item.type) {\n @case ('router-link') {\n <a\n routerLinkActive\n [routerLinkActiveOptions]=\"item.activeMatchOptions ?? { exact: false }\"\n [si-navbar-vertical-next-item]=\"item\"\n [routerLink]=\"item.routerLink\"\n [queryParams]=\"item.extras?.queryParams\"\n [queryParamsHandling]=\"item.extras?.queryParamsHandling\"\n [fragment]=\"item.extras?.fragment\"\n [state]=\"item.extras?.state\"\n [relativeTo]=\"item.extras?.relativeTo ?? this.activatedRoute\"\n [preserveFragment]=\"item.extras?.preserveFragment\"\n [skipLocationChange]=\"item.extras?.skipLocationChange\"\n [replaceUrl]=\"item.extras?.replaceUrl\"\n >\n {{ item.label | translate }}\n </a>\n }\n @case ('action') {\n <button\n type=\"button\"\n [si-navbar-vertical-next-item]=\"item\"\n [activeOverride]=\"item.active\"\n >\n {{ item.label | translate }}\n </button>\n }\n @case ('link') {\n <a [si-navbar-vertical-next-item]=\"item\" [href]=\"item.href\" [target]=\"item.target\">\n {{ item.label | translate }}\n </a>\n }\n }\n }\n </si-navbar-vertical-next-group>\n</ng-template>\n", styles: [":host{display:block;transition:padding-inline-start calc(.5s * var(--element-animations-enabled, 1));--si-layout-header-first-element-offset: 40px}:host.ready:not(.visible){padding-inline-start:0!important}nav{display:flex;flex-direction:column;position:fixed;z-index:1031;inset-block-start:calc(48px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px));inset-block-end:0;inset-inline-start:0;inline-size:0;transition:inline-size calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-collapsed) nav{z-index:1030}nav.expanded{inline-size:240px}.nav-scroll{overflow-x:hidden;min-block-size:0;flex:1 0 0;overflow-y:auto;margin-block-start:8px}:host(.nav-collapsed) .nav-scroll{display:none}.mobile-drawer{display:block;text-align:end;border:0;inline-size:48px;color:var(--element-text-primary);padding-block:4px;padding-inline:8px;margin-block-start:8px;border-start-end-radius:var(--element-radius-2);border-end-end-radius:var(--element-radius-2);transition:inline-size calc(.5s * var(--element-animations-enabled, 1)) ease,background-color calc(.5s * var(--element-animations-enabled, 1)) ease,box-shadow calc(.5s * var(--element-animations-enabled, 1)) ease}:host(:not(.nav-collapsed)) .mobile-drawer{inline-size:240px}.nav-search{display:flex;align-items:center;block-size:40px;margin-block-start:8px;overflow-x:hidden}:host(.nav-collapsed) .nav-search{display:none}si-search-bar{inline-size:100%}.btn-search{display:none;border:0;border-radius:var(--element-radius-2)}:host.nav-collapsed .mobile-drawer{border:0;color:var(--element-text-primary);background:var(--element-base-1);text-align:end;box-shadow:0 0 4px var(--element-box-shadow-color-1),0 4px 4px var(--element-box-shadow-color-2)}:host.nav-collapsed si-search-bar{display:none}.modal-backdrop{z-index:1031;transition:opacity calc(.15s * var(--element-animations-enabled, 1)) linear;opacity:1}@starting-style{.modal-backdrop{opacity:0}}.modal-backdrop.backdrop-leave{opacity:0}@media(min-width:576px){:host:not(.nav-text-only),:host:not(.nav-collapsed){--si-layout-header-first-element-offset: 0}:host:not(.nav-text-only){padding-inline-start:48px}:host:not(.nav-text-only) .mobile-drawer{background:transparent;box-shadow:none}:host:not(.nav-text-only).nav-collapsed .nav-scroll{display:block}:host:not(.nav-text-only).nav-collapsed .nav-search{display:flex}.btn-search{display:none}:host.nav-collapsed .btn-search{display:block}:host:not(.nav-text-only) nav{inline-size:48px}:host:not(.nav-text-only) nav.expanded{inline-size:240px}}@media(min-width:992px){:host:not(.nav-collapsed){padding-inline-start:240px}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiNavbarVerticalNextDividerComponent, selector: "si-navbar-vertical-next-divider" }, { kind: "component", type: SiNavbarVerticalNextGroupComponent, selector: "si-navbar-vertical-next-group" }, { kind: "directive", type: SiNavbarVerticalNextGroupTriggerDirective, selector: "button[siNavbarVerticalNextGroupTriggerFor]", inputs: ["siNavbarVerticalNextGroupTriggerFor", "groupData", "stateId", "expanded"], outputs: ["expandedChange"] }, { kind: "component", type: SiNavbarVerticalNextHeaderComponent, selector: "si-navbar-vertical-next-header" }, { kind: "component", type: SiNavbarVerticalNextItemComponent, selector: "a[si-navbar-vertical-next-item], button[si-navbar-vertical-next-item]", inputs: ["si-navbar-vertical-next-item", "activeOverride"] }, { kind: "directive", type: SiNavbarVerticalNextItemGuardDirective, selector: "[siNavbarVerticalNextItemGuard]" }, { kind: "component", type: SiNavbarVerticalNextItemLegacyComponent, selector: "si-navbar-vertical-next-item-legacy", inputs: ["item", "navbarExpandButtonText", "navbarCollapseButtonText", "expanded"], outputs: ["expandedChange"] }, { kind: "component", type: SiSearchBarComponent, selector: "si-search-bar", inputs: ["debounceTime", "prohibitedCharacters", "placeholder", "showIcon", "tabbable", "value", "readonly", "colorVariant", "disabled", "clearButtonAriaLabel"], outputs: ["searchChange"] }, { kind: "directive", type: SiSkipLinkTargetDirective, selector: "[siSkipLinkTarget]", inputs: ["siSkipLinkTarget"] }, { kind: "directive", type: SiTooltipDirective, selector: "[siTooltip]", inputs: ["siTooltip", "placement", "isDisabled", "tooltipContext"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
644
+ }
645
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextComponent, decorators: [{
646
+ type: Component,
647
+ args: [{ selector: 'si-navbar-vertical-next', imports: [
648
+ NgTemplateOutlet,
649
+ RouterLink,
650
+ RouterLinkActive,
651
+ SiIconComponent,
652
+ SiNavbarVerticalNextDividerComponent,
653
+ SiNavbarVerticalNextGroupComponent,
654
+ SiNavbarVerticalNextGroupTriggerDirective,
655
+ SiNavbarVerticalNextHeaderComponent,
656
+ SiNavbarVerticalNextItemComponent,
657
+ SiNavbarVerticalNextItemGuardDirective,
658
+ SiNavbarVerticalNextItemLegacyComponent,
659
+ SiSearchBarComponent,
660
+ SiSkipLinkTargetDirective,
661
+ SiTranslatePipe,
662
+ SiTooltipDirective
663
+ ], providers: [{ provide: SI_NAVBAR_VERTICAL_NEXT, useExisting: SiNavbarVerticalNextComponent }], host: {
664
+ class: 'si-layout-inner',
665
+ '[class.nav-collapsed]': 'collapsed()',
666
+ '[class.nav-text-only]': 'textOnly()',
667
+ '[class.visible]': 'visible()'
668
+ }, template: "@if (visible()) {\n @if (smallScreen() && !collapsed()) {\n <div class=\"modal-backdrop\" animate.leave=\"backdrop-leave\" (click)=\"toggleCollapse()\"></div>\n }\n <nav\n tabindex=\"-1\"\n class=\"bg-base-1 focus-sub-inside\"\n [class.expanded]=\"!collapsed()\"\n [siSkipLinkTarget]=\"skipLinkNavigationLabel()\"\n [class.text-only]=\"textOnly()\"\n >\n <div class=\"collapse-toggle ms-auto\">\n <div class=\"mobile-drawer focus-inside navbar-vertical-no-collapse\">\n <button\n type=\"button\"\n class=\"btn btn-icon btn-ghost\"\n [attr.aria-label]=\"\n (collapsed() ? navbarExpandButtonText() : navbarCollapseButtonText()) | translate\n \"\n [attr.aria-expanded]=\"!collapsed()\"\n (click)=\"toggleCollapse()\"\n >\n <si-icon\n class=\"flip-rtl\"\n [icon]=\"collapsed() ? icons.elementDoubleRight : icons.elementDoubleLeft\"\n />\n </button>\n </div>\n </div>\n @if (searchable()) {\n <div class=\"nav-search\">\n <si-search-bar\n class=\"mx-4\"\n colorVariant=\"base-0\"\n prohibitedCharacters=\"*?\"\n [placeholder]=\"searchPlaceholder() | translate\"\n [debounceTime]=\"searchDebounceTime()\"\n [showIcon]=\"true\"\n (searchChange)=\"doSearch($event)\"\n />\n <button\n type=\"button\"\n class=\"btn-search bg-base-0 p-3 mx-4 mobile navbar-vertical-no-collapse text-secondary\"\n [attr.aria-label]=\"searchPlaceholder() | translate\"\n (click)=\"expandForSearch()\"\n >\n <si-icon class=\"icon\" [icon]=\"icons.elementSearch\" />\n </button>\n </div>\n }\n <div class=\"nav-scroll\">\n @for (item of items(); track $index) {\n @if (isLegacyStyle(item)) {\n <si-navbar-vertical-next-item-legacy\n [item]=\"item\"\n [navbarExpandButtonText]=\"navbarExpandButtonText() | translate\"\n [navbarCollapseButtonText]=\"navbarCollapseButtonText() | translate\"\n [expanded]=\"\n (item.id ? uiStateExpandedItems()[item.id] : undefined) ?? item.expanded ?? false\n \"\n />\n } @else {\n <ng-container *ngTemplateOutlet=\"navbarItems; context: { item }\" />\n }\n }\n </div>\n </nav>\n}\n<main\n class=\"si-layout-inner focus-none\"\n tabindex=\"-1\"\n [siSkipLinkTarget]=\"skipLinkMainContentLabel()\"\n>\n <ng-content />\n</main>\n\n<ng-template #navbarItems let-item=\"item\" siNavbarVerticalNextItemGuard>\n @switch (item.type) {\n @case ('group') {\n <button\n type=\"button\"\n placement=\"end\"\n [si-navbar-vertical-next-item]=\"item\"\n [stateId]=\"item.id\"\n [siNavbarVerticalNextGroupTriggerFor]=\"group\"\n [groupData]=\"{ group: item }\"\n [expanded]=\"\n (item.id ? uiStateExpandedItems()[item.id] : undefined) ?? item.expanded ?? false\n \"\n [siTooltip]=\"item.label | translate\"\n [isDisabled]=\"!collapsed()\"\n >\n {{ item.label | translate }}\n </button>\n }\n @case ('action') {\n <button\n type=\"button\"\n placement=\"end\"\n [si-navbar-vertical-next-item]=\"item\"\n [activeOverride]=\"item.active\"\n [siTooltip]=\"item.label | translate\"\n [isDisabled]=\"!collapsed()\"\n >\n {{ item.label | translate }}\n </button>\n }\n @case ('router-link') {\n <a\n routerLinkActive\n placement=\"end\"\n [routerLinkActiveOptions]=\"item.activeMatchOptions ?? { exact: false }\"\n [si-navbar-vertical-next-item]=\"item\"\n [routerLink]=\"item.routerLink\"\n [queryParams]=\"item.extras?.queryParams\"\n [queryParamsHandling]=\"item.extras?.queryParamsHandling\"\n [fragment]=\"item.extras?.fragment\"\n [state]=\"item.extras?.state\"\n [relativeTo]=\"item.extras?.relativeTo ?? this.activatedRoute\"\n [preserveFragment]=\"item.extras?.preserveFragment\"\n [skipLocationChange]=\"item.extras?.skipLocationChange\"\n [replaceUrl]=\"item.extras?.replaceUrl\"\n [siTooltip]=\"item.label | translate\"\n [isDisabled]=\"!collapsed()\"\n >\n {{ item.label | translate }}\n </a>\n }\n @case ('link') {\n <a\n placement=\"end\"\n [si-navbar-vertical-next-item]=\"item\"\n [href]=\"item.href\"\n [target]=\"item.target\"\n [siTooltip]=\"item.label | translate\"\n [isDisabled]=\"!collapsed()\"\n >\n {{ item.label | translate }}\n </a>\n }\n @case ('divider') {\n <si-navbar-vertical-next-divider />\n }\n @case ('header') {\n <si-navbar-vertical-next-header>\n {{ item.label | translate }}\n </si-navbar-vertical-next-header>\n }\n }\n</ng-template>\n\n<ng-template #group let-group=\"group\" siNavbarVerticalNextItemGuard>\n <si-navbar-vertical-next-group routerLinkActive>\n @for (item of group.children; track $index) {\n <!-- a copy from above, but we have to nest the items to make routerLink active work -->\n @switch (item.type) {\n @case ('router-link') {\n <a\n routerLinkActive\n [routerLinkActiveOptions]=\"item.activeMatchOptions ?? { exact: false }\"\n [si-navbar-vertical-next-item]=\"item\"\n [routerLink]=\"item.routerLink\"\n [queryParams]=\"item.extras?.queryParams\"\n [queryParamsHandling]=\"item.extras?.queryParamsHandling\"\n [fragment]=\"item.extras?.fragment\"\n [state]=\"item.extras?.state\"\n [relativeTo]=\"item.extras?.relativeTo ?? this.activatedRoute\"\n [preserveFragment]=\"item.extras?.preserveFragment\"\n [skipLocationChange]=\"item.extras?.skipLocationChange\"\n [replaceUrl]=\"item.extras?.replaceUrl\"\n >\n {{ item.label | translate }}\n </a>\n }\n @case ('action') {\n <button\n type=\"button\"\n [si-navbar-vertical-next-item]=\"item\"\n [activeOverride]=\"item.active\"\n >\n {{ item.label | translate }}\n </button>\n }\n @case ('link') {\n <a [si-navbar-vertical-next-item]=\"item\" [href]=\"item.href\" [target]=\"item.target\">\n {{ item.label | translate }}\n </a>\n }\n }\n }\n </si-navbar-vertical-next-group>\n</ng-template>\n", styles: [":host{display:block;transition:padding-inline-start calc(.5s * var(--element-animations-enabled, 1));--si-layout-header-first-element-offset: 40px}:host.ready:not(.visible){padding-inline-start:0!important}nav{display:flex;flex-direction:column;position:fixed;z-index:1031;inset-block-start:calc(48px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px));inset-block-end:0;inset-inline-start:0;inline-size:0;transition:inline-size calc(.5s * var(--element-animations-enabled, 1)) ease}:host(.nav-collapsed) nav{z-index:1030}nav.expanded{inline-size:240px}.nav-scroll{overflow-x:hidden;min-block-size:0;flex:1 0 0;overflow-y:auto;margin-block-start:8px}:host(.nav-collapsed) .nav-scroll{display:none}.mobile-drawer{display:block;text-align:end;border:0;inline-size:48px;color:var(--element-text-primary);padding-block:4px;padding-inline:8px;margin-block-start:8px;border-start-end-radius:var(--element-radius-2);border-end-end-radius:var(--element-radius-2);transition:inline-size calc(.5s * var(--element-animations-enabled, 1)) ease,background-color calc(.5s * var(--element-animations-enabled, 1)) ease,box-shadow calc(.5s * var(--element-animations-enabled, 1)) ease}:host(:not(.nav-collapsed)) .mobile-drawer{inline-size:240px}.nav-search{display:flex;align-items:center;block-size:40px;margin-block-start:8px;overflow-x:hidden}:host(.nav-collapsed) .nav-search{display:none}si-search-bar{inline-size:100%}.btn-search{display:none;border:0;border-radius:var(--element-radius-2)}:host.nav-collapsed .mobile-drawer{border:0;color:var(--element-text-primary);background:var(--element-base-1);text-align:end;box-shadow:0 0 4px var(--element-box-shadow-color-1),0 4px 4px var(--element-box-shadow-color-2)}:host.nav-collapsed si-search-bar{display:none}.modal-backdrop{z-index:1031;transition:opacity calc(.15s * var(--element-animations-enabled, 1)) linear;opacity:1}@starting-style{.modal-backdrop{opacity:0}}.modal-backdrop.backdrop-leave{opacity:0}@media(min-width:576px){:host:not(.nav-text-only),:host:not(.nav-collapsed){--si-layout-header-first-element-offset: 0}:host:not(.nav-text-only){padding-inline-start:48px}:host:not(.nav-text-only) .mobile-drawer{background:transparent;box-shadow:none}:host:not(.nav-text-only).nav-collapsed .nav-scroll{display:block}:host:not(.nav-text-only).nav-collapsed .nav-search{display:flex}.btn-search{display:none}:host.nav-collapsed .btn-search{display:block}:host:not(.nav-text-only) nav{inline-size:48px}:host:not(.nav-text-only) nav.expanded{inline-size:240px}}@media(min-width:992px){:host:not(.nav-collapsed){padding-inline-start:240px}}\n"] }]
669
+ }], ctorParameters: () => [], propDecorators: { collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }, { type: i0.Output, args: ["itemsChange"] }], textOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "textOnly", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }], navbarExpandButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "navbarExpandButtonText", required: false }] }], navbarCollapseButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "navbarCollapseButtonText", required: false }] }], stateId: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateId", required: false }] }], skipLinkNavigationLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "skipLinkNavigationLabel", required: false }] }], skipLinkMainContentLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "skipLinkMainContentLabel", required: false }] }], searchDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchDebounceTime", required: false }] }], searchEvent: [{ type: i0.Output, args: ["searchEvent"] }], searchBar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiSearchBarComponent), { isSignal: true }] }], ready: [{
670
+ type: HostBinding,
671
+ args: ['class.ready']
672
+ }], navbarItems: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => SiNavbarVerticalNextItemComponent), { isSignal: true }] }], navbarItemsLegacy: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => SiNavbarVerticalNextItemLegacyComponent), { isSignal: true }] }] } });
673
+
674
+ /**
675
+ * Copyright (c) Siemens 2016 - 2026
676
+ * SPDX-License-Identifier: MIT
677
+ */
678
+ /** @experimental */
679
+ class SiNavbarVerticalNextModule {
680
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
681
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextModule, imports: [SiNavbarVerticalNextComponent], exports: [SiNavbarVerticalNextComponent] });
682
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextModule, imports: [SiNavbarVerticalNextComponent] });
683
+ }
684
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiNavbarVerticalNextModule, decorators: [{
685
+ type: NgModule,
686
+ args: [{
687
+ imports: [SiNavbarVerticalNextComponent],
688
+ exports: [SiNavbarVerticalNextComponent]
689
+ }]
690
+ }] });
691
+
692
+ /**
693
+ * Copyright (c) Siemens 2016 - 2026
694
+ * SPDX-License-Identifier: MIT
695
+ */
696
+
697
+ /**
698
+ * Generated bundle index. Do not edit.
699
+ */
700
+
701
+ export { SiNavbarVerticalNextComponent, SiNavbarVerticalNextItemGuardDirective, SiNavbarVerticalNextModule };
702
+ //# sourceMappingURL=siemens-element-ng-navbar-vertical-next.mjs.map