@qualcomm-ui/angular 1.8.1 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,864 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, input, computed, Directive, inject, TemplateRef, Component, Injector, booleanAttribute, contentChild, NgModule } from '@angular/core';
3
+ import * as i2 from '@qualcomm-ui/angular-core/machine';
4
+ import { BaseApiContextService, createApiContext, useTrackBindings, useMachine, normalizeProps, ApiContextDirective, QBindDirective } from '@qualcomm-ui/angular-core/machine';
5
+ import { useCollapsibleContext, CollapsibleContextService, provideCollapsibleContext } from '@qualcomm-ui/angular-core/collapsible';
6
+ import { useId } from '@qualcomm-ui/angular-core/common';
7
+ import { CoreTreeBranchContentDirective, CoreTreeBranchIndentGuideDirective, CoreTreeBranchNodeDirective, CoreTreeBranchTriggerDirective, CoreTreeBranchDirective, useTreeNodeStateContext, CoreTreeLeafNodeDirective, CoreTreeNodeActionDirective, TreeNodeStateContextService, CoreTreeNodeIconDirective, CoreTreeNodeIndicatorDirective, CoreTreeNodeTextDirective, useTreeContext, TreeNodePropsContextService, provideTreeNodePropsContext, provideTreeNodeStateContext, provideTreeContext } from '@qualcomm-ui/angular-core/tree';
8
+ import { collapsibleClasses } from '@qualcomm-ui/qds-core/collapsible';
9
+ import { mergeProps } from '@qualcomm-ui/utils/merge-props';
10
+ import { ChevronDown, PanelLeftOpen, PanelLeftClose } from 'lucide-angular';
11
+ import * as i1 from '@qualcomm-ui/angular/icon';
12
+ import { IconDirective } from '@qualcomm-ui/angular/icon';
13
+ import * as i1$2 from '@angular/common';
14
+ import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
15
+ import { useRenderStrategyContext, provideRenderStrategyContext } from '@qualcomm-ui/angular-core/presence';
16
+ import { collapsibleMachine, createCollapsibleApi } from '@qualcomm-ui/core/collapsible';
17
+ import { useIconButtonApi } from '@qualcomm-ui/angular/button';
18
+ import * as i1$1 from '@qualcomm-ui/angular/transitions';
19
+ import { QuiPreloadDirective } from '@qualcomm-ui/angular/transitions';
20
+ import { provideIcons } from '@qualcomm-ui/angular-core/lucide';
21
+ import { CoreSideNavTriggerDirective, CoreSideNavHeaderActionDirective, CoreSideNavHeaderLogoDirective, CoreSideNavHeaderTitleDirective, CoreSideNavHeaderDirective, CoreSideNavRootDirective, provideSideNavContext } from '@qualcomm-ui/angular-core/side-nav';
22
+ import { createQdsDividerApi } from '@qualcomm-ui/qds-core/divider';
23
+ import { createQdsSideNavApi } from '@qualcomm-ui/qds-core/side-nav';
24
+
25
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
26
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
27
+ class QdsSideNavContextService extends BaseApiContextService {
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: QdsSideNavContextService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
29
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: QdsSideNavContextService });
30
+ }
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: QdsSideNavContextService, decorators: [{
32
+ type: Injectable
33
+ }] });
34
+ const [QDS_SIDE_NAV_CONTEXT, useQdsSideNavContext, provideQdsSideNavContext,] = createApiContext("QdsSideNavContext", QdsSideNavContextService);
35
+
36
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
37
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
38
+ class SideNavBranchContentDirective extends CoreTreeBranchContentDirective {
39
+ qdsContext = useQdsSideNavContext();
40
+ id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
41
+ hostId = computed(() => useId(this, this.id()), ...(ngDevMode ? [{ debugName: "hostId" }] : []));
42
+ collapsibleContext = useCollapsibleContext();
43
+ trackBindings = useTrackBindings(() => mergeProps(this.treeContext().getBranchContentBindings(this.treeNodePropsContext()), this.collapsibleContext().getRootBindings(), this.collapsibleContext().getContentBindings({ id: this.hostId() }), { class: collapsibleClasses.content }, this.qdsContext().getBranchContentBindings()));
44
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchContentDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
45
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.12", type: SideNavBranchContentDirective, isStandalone: false, selector: "[q-side-nav-branch-content]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
46
+ }
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchContentDirective, decorators: [{
48
+ type: Directive,
49
+ args: [{
50
+ selector: "[q-side-nav-branch-content]",
51
+ standalone: false,
52
+ }]
53
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
54
+
55
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
56
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
57
+ class SideNavBranchIndentGuideDirective extends CoreTreeBranchIndentGuideDirective {
58
+ qdsContext = useQdsSideNavContext();
59
+ constructor() {
60
+ super();
61
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getBranchIndentGuideBindings()));
62
+ }
63
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchIndentGuideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
64
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavBranchIndentGuideDirective, isStandalone: false, selector: "[q-side-nav-branch-indent-guide]", usesInheritance: true, ngImport: i0 });
65
+ }
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchIndentGuideDirective, decorators: [{
67
+ type: Directive,
68
+ args: [{
69
+ selector: "[q-side-nav-branch-indent-guide]",
70
+ standalone: false,
71
+ }]
72
+ }], ctorParameters: () => [] });
73
+
74
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
75
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
76
+ class SideNavBranchNodeDirective extends CoreTreeBranchNodeDirective {
77
+ qdsContext = useQdsSideNavContext();
78
+ constructor() {
79
+ super();
80
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getBranchNodeBindings()));
81
+ }
82
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchNodeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
83
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavBranchNodeDirective, isStandalone: false, selector: "[q-side-nav-branch-node]", usesInheritance: true, ngImport: i0 });
84
+ }
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchNodeDirective, decorators: [{
86
+ type: Directive,
87
+ args: [{
88
+ selector: "[q-side-nav-branch-node]",
89
+ standalone: false,
90
+ }]
91
+ }], ctorParameters: () => [] });
92
+
93
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
94
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
95
+ /**
96
+ * Structural directive that defines the template used to render branch nodes in a
97
+ * side nav. Apply this to an `ng-template` to customize how branch nodes (nodes with
98
+ * children) are displayed. Note that this template will only customize the content
99
+ * of the node. The parent `<q-side-nav-nodes>` component renders the branch children
100
+ * internally.
101
+ *
102
+ * @example
103
+ * ```html
104
+ * <ng-template q-side-nav-branch-template let-node>
105
+ * <div q-side-nav-branch-node>
106
+ * <span q-side-nav-node-text>{{ node.item.label }}</span>
107
+ * </div>
108
+ * </ng-template>
109
+ * ```
110
+ */
111
+ class SideNavBranchTemplateDirective {
112
+ /**
113
+ * The root node of the tree. Used for type narrowing of the template guard.
114
+ */
115
+ rootNode = input(...(ngDevMode ? [undefined, { debugName: "rootNode" }] : []));
116
+ template = inject(TemplateRef);
117
+ static ngTemplateContextGuard(dir, ctx) {
118
+ return true;
119
+ }
120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
121
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.12", type: SideNavBranchTemplateDirective, isStandalone: false, selector: "ng-template[q-side-nav-branch-template]", inputs: { rootNode: { classPropertyName: "rootNode", publicName: "rootNode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
122
+ }
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchTemplateDirective, decorators: [{
124
+ type: Directive,
125
+ args: [{
126
+ selector: "ng-template[q-side-nav-branch-template]",
127
+ standalone: false,
128
+ }]
129
+ }], propDecorators: { rootNode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootNode", required: false }] }] } });
130
+
131
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
132
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
133
+ class SideNavBranchTriggerDirective extends CoreTreeBranchTriggerDirective {
134
+ /**
135
+ * The icon to display. This rotates by 180deg when the branch is expanded.
136
+ *
137
+ * @default ChevronDown
138
+ */
139
+ icon = input(ChevronDown, ...(ngDevMode ? [{ debugName: "icon" }] : []));
140
+ qdsContext = useQdsSideNavContext();
141
+ constructor() {
142
+ super();
143
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getBranchTriggerBindings()));
144
+ }
145
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Component });
146
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: SideNavBranchTriggerDirective, isStandalone: false, selector: "[q-side-nav-branch-trigger]", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
147
+ <ng-content>
148
+ @if (icon()) {
149
+ <svg [qIcon]="icon()!" />
150
+ }
151
+ </ng-content>
152
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.IconDirective, selector: "svg[qIcon]", inputs: ["qIcon", "size", "viewBox", "xmlns", "height", "width"] }] });
153
+ }
154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchTriggerDirective, decorators: [{
155
+ type: Component,
156
+ args: [{
157
+ selector: "[q-side-nav-branch-trigger]",
158
+ standalone: false,
159
+ template: `
160
+ <ng-content>
161
+ @if (icon()) {
162
+ <svg [qIcon]="icon()!" />
163
+ }
164
+ </ng-content>
165
+ `,
166
+ }]
167
+ }], ctorParameters: () => [], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }] } });
168
+
169
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
170
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
171
+ class SideNavBranchDirective extends CoreTreeBranchDirective {
172
+ qdsContext = useQdsSideNavContext();
173
+ collapsibleApi = inject(CollapsibleContextService);
174
+ document = inject(DOCUMENT);
175
+ injector = inject(Injector);
176
+ nodeState = useTreeNodeStateContext();
177
+ renderStrategyProps = useRenderStrategyContext();
178
+ constructor() {
179
+ super();
180
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getBranchBindings()));
181
+ }
182
+ ngOnInit() {
183
+ const machine = useMachine(collapsibleMachine, computed(() => ({
184
+ defaultOpen: false,
185
+ disabled: this.nodeState().disabled,
186
+ forceMeasureOnOpen: true,
187
+ getRootNode: () => this.document,
188
+ open: this.nodeState().expanded,
189
+ })), this.injector);
190
+ this.collapsibleApi.init(computed(() => createCollapsibleApi(machine, normalizeProps)));
191
+ super.ngOnInit();
192
+ }
193
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
194
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavBranchDirective, isStandalone: false, selector: "[q-side-nav-branch]", providers: [provideCollapsibleContext()], usesInheritance: true, ngImport: i0 });
195
+ }
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavBranchDirective, decorators: [{
197
+ type: Directive,
198
+ args: [{
199
+ providers: [provideCollapsibleContext()],
200
+ selector: "[q-side-nav-branch]",
201
+ standalone: false,
202
+ }]
203
+ }], ctorParameters: () => [] });
204
+
205
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
206
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
207
+ class SideNavCollapseTriggerDirective extends CoreSideNavTriggerDirective {
208
+ qdsContext = useQdsSideNavContext();
209
+ open = computed(() => this.sideNavContext().open, ...(ngDevMode ? [{ debugName: "open" }] : []));
210
+ iconButtonApi = useIconButtonApi({
211
+ density: "default",
212
+ size: "md",
213
+ variant: "ghost",
214
+ });
215
+ iconProps = computed(() => this.iconButtonApi().getIconBindings(), ...(ngDevMode ? [{ debugName: "iconProps" }] : []));
216
+ constructor() {
217
+ super();
218
+ this.trackBindings.extendWith(computed(() => mergeProps(this.iconButtonApi().getRootBindings(), this.qdsContext().getCollapseTriggerBindings())));
219
+ }
220
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavCollapseTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Component });
221
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: SideNavCollapseTriggerDirective, isStandalone: false, selector: "[q-side-nav-collapse-trigger]", providers: [provideIcons({ PanelLeftClose, PanelLeftOpen })], usesInheritance: true, hostDirectives: [{ directive: i1$1.QuiPreloadDirective }], ngImport: i0, template: `
222
+ <svg
223
+ [q-bind]="iconProps()"
224
+ [qIcon]="open() ? 'PanelLeftClose' : 'PanelLeftOpen'"
225
+ ></svg>
226
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.QBindDirective, selector: "[q-bind]", inputs: ["q-bind", "q-bind-options"] }, { kind: "directive", type: i1.IconDirective, selector: "svg[qIcon]", inputs: ["qIcon", "size", "viewBox", "xmlns", "height", "width"] }] });
227
+ }
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavCollapseTriggerDirective, decorators: [{
229
+ type: Component,
230
+ args: [{
231
+ hostDirectives: [QuiPreloadDirective],
232
+ providers: [provideIcons({ PanelLeftClose, PanelLeftOpen })],
233
+ selector: "[q-side-nav-collapse-trigger]",
234
+ standalone: false,
235
+ template: `
236
+ <svg
237
+ [q-bind]="iconProps()"
238
+ [qIcon]="open() ? 'PanelLeftClose' : 'PanelLeftOpen'"
239
+ ></svg>
240
+ `,
241
+ }]
242
+ }], ctorParameters: () => [] });
243
+
244
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
245
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
246
+ class SideNavDividerDirective {
247
+ qdsContext = useQdsSideNavContext();
248
+ trackBindings = useTrackBindings(() => mergeProps(createQdsDividerApi({}, normalizeProps).getRootBindings(), this.qdsContext().getDividerBindings()));
249
+ ngOnInit() {
250
+ this.trackBindings();
251
+ }
252
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavDividerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
253
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavDividerDirective, isStandalone: false, selector: "[q-side-nav-divider]", ngImport: i0 });
254
+ }
255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavDividerDirective, decorators: [{
256
+ type: Directive,
257
+ args: [{
258
+ selector: "[q-side-nav-divider]",
259
+ standalone: false,
260
+ }]
261
+ }] });
262
+
263
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
264
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
265
+ class SideNavFilterInputDirective {
266
+ qdsContext = useQdsSideNavContext();
267
+ trackBindings = useTrackBindings(() => this.qdsContext().getFilterInputBindings());
268
+ ngOnInit() {
269
+ this.trackBindings();
270
+ }
271
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavFilterInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
272
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavFilterInputDirective, isStandalone: false, selector: "[q-side-nav-filter-input]", ngImport: i0 });
273
+ }
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavFilterInputDirective, decorators: [{
275
+ type: Directive,
276
+ args: [{
277
+ selector: "[q-side-nav-filter-input]",
278
+ standalone: false,
279
+ }]
280
+ }] });
281
+
282
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
283
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
284
+ class SideNavGroupLabelDirective {
285
+ qdsContext = useQdsSideNavContext();
286
+ trackBindings = useTrackBindings(() => this.qdsContext().getGroupLabelBindings());
287
+ ngOnInit() {
288
+ this.trackBindings();
289
+ }
290
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavGroupLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
291
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavGroupLabelDirective, isStandalone: false, selector: "[q-side-nav-group-label]", ngImport: i0 });
292
+ }
293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavGroupLabelDirective, decorators: [{
294
+ type: Directive,
295
+ args: [{
296
+ selector: "[q-side-nav-group-label]",
297
+ standalone: false,
298
+ }]
299
+ }] });
300
+
301
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
302
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
303
+ class SideNavGroupDirective {
304
+ qdsContext = useQdsSideNavContext();
305
+ trackBindings = useTrackBindings(() => this.qdsContext().getGroupBindings());
306
+ ngOnInit() {
307
+ this.trackBindings();
308
+ }
309
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
310
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavGroupDirective, isStandalone: false, selector: "[q-side-nav-group]", ngImport: i0 });
311
+ }
312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavGroupDirective, decorators: [{
313
+ type: Directive,
314
+ args: [{
315
+ selector: "[q-side-nav-group]",
316
+ standalone: false,
317
+ }]
318
+ }] });
319
+
320
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
321
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
322
+ class SideNavHeaderActionDirective extends CoreSideNavHeaderActionDirective {
323
+ qdsContext = useQdsSideNavContext();
324
+ constructor() {
325
+ super();
326
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getHeaderActionBindings()));
327
+ }
328
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavHeaderActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
329
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavHeaderActionDirective, isStandalone: false, selector: "[q-side-nav-header-action]", usesInheritance: true, ngImport: i0 });
330
+ }
331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavHeaderActionDirective, decorators: [{
332
+ type: Directive,
333
+ args: [{
334
+ selector: "[q-side-nav-header-action]",
335
+ standalone: false,
336
+ }]
337
+ }], ctorParameters: () => [] });
338
+
339
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
340
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
341
+ class SideNavHeaderLogoDirective extends CoreSideNavHeaderLogoDirective {
342
+ qdsContext = useQdsSideNavContext();
343
+ constructor() {
344
+ super();
345
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getHeaderLogoBindings()));
346
+ }
347
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavHeaderLogoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
348
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavHeaderLogoDirective, isStandalone: false, selector: "[q-side-nav-header-logo]", usesInheritance: true, ngImport: i0 });
349
+ }
350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavHeaderLogoDirective, decorators: [{
351
+ type: Directive,
352
+ args: [{
353
+ selector: "[q-side-nav-header-logo]",
354
+ standalone: false,
355
+ }]
356
+ }], ctorParameters: () => [] });
357
+
358
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
359
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
360
+ class SideNavHeaderTitleDirective extends CoreSideNavHeaderTitleDirective {
361
+ qdsContext = useQdsSideNavContext();
362
+ constructor() {
363
+ super();
364
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getHeaderTitleBindings()));
365
+ }
366
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavHeaderTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
367
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavHeaderTitleDirective, isStandalone: false, selector: "[q-side-nav-header-title]", usesInheritance: true, ngImport: i0 });
368
+ }
369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavHeaderTitleDirective, decorators: [{
370
+ type: Directive,
371
+ args: [{
372
+ selector: "[q-side-nav-header-title]",
373
+ standalone: false,
374
+ }]
375
+ }], ctorParameters: () => [] });
376
+
377
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
378
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
379
+ class SideNavHeaderDirective extends CoreSideNavHeaderDirective {
380
+ qdsContext = useQdsSideNavContext();
381
+ constructor() {
382
+ super();
383
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getHeaderBindings()));
384
+ }
385
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
386
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavHeaderDirective, isStandalone: false, selector: "[q-side-nav-header]", usesInheritance: true, ngImport: i0 });
387
+ }
388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavHeaderDirective, decorators: [{
389
+ type: Directive,
390
+ args: [{
391
+ selector: "[q-side-nav-header]",
392
+ standalone: false,
393
+ }]
394
+ }], ctorParameters: () => [] });
395
+
396
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
397
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
398
+ class SideNavLeafNodeDirective extends CoreTreeLeafNodeDirective {
399
+ qdsContext = useQdsSideNavContext();
400
+ constructor() {
401
+ super();
402
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getLeafNodeBindings()));
403
+ }
404
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavLeafNodeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
405
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavLeafNodeDirective, isStandalone: false, selector: "[q-side-nav-leaf-node]", usesInheritance: true, ngImport: i0 });
406
+ }
407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavLeafNodeDirective, decorators: [{
408
+ type: Directive,
409
+ args: [{
410
+ selector: "[q-side-nav-leaf-node]",
411
+ standalone: false,
412
+ }]
413
+ }], ctorParameters: () => [] });
414
+
415
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
416
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
417
+ /**
418
+ * Structural directive that defines the template used to render leaf nodes in a
419
+ * side nav. Apply this to an `ng-template` to customize how leaf nodes (nodes
420
+ * without children) are displayed.
421
+ *
422
+ * @example
423
+ * ```html
424
+ * <ng-template q-side-nav-leaf-template let-node>
425
+ * <div q-side-nav-leaf-node>
426
+ * <span q-side-nav-node-text>{{ node.item.label }}</span>
427
+ * </div>
428
+ * </ng-template>
429
+ * ```
430
+ */
431
+ class SideNavLeafTemplateDirective {
432
+ /**
433
+ * The root node of the tree. Used for type narrowing of the template guard.
434
+ */
435
+ rootNode = input(...(ngDevMode ? [undefined, { debugName: "rootNode" }] : []));
436
+ template = inject(TemplateRef);
437
+ static ngTemplateContextGuard(dir, ctx) {
438
+ return true;
439
+ }
440
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavLeafTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
441
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.12", type: SideNavLeafTemplateDirective, isStandalone: false, selector: "ng-template[q-side-nav-leaf-template]", inputs: { rootNode: { classPropertyName: "rootNode", publicName: "rootNode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
442
+ }
443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavLeafTemplateDirective, decorators: [{
444
+ type: Directive,
445
+ args: [{
446
+ selector: "ng-template[q-side-nav-leaf-template]",
447
+ standalone: false,
448
+ }]
449
+ }], propDecorators: { rootNode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootNode", required: false }] }] } });
450
+
451
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
452
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
453
+ class SideNavNodeAccessoryDirective {
454
+ qdsContext = useQdsSideNavContext();
455
+ trackBindings = useTrackBindings(() => this.qdsContext().getNodeAccessoryBindings());
456
+ ngOnInit() {
457
+ this.trackBindings();
458
+ }
459
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeAccessoryDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
460
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavNodeAccessoryDirective, isStandalone: false, selector: "[q-side-nav-node-accessory]", ngImport: i0 });
461
+ }
462
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeAccessoryDirective, decorators: [{
463
+ type: Directive,
464
+ args: [{
465
+ selector: "[q-side-nav-node-accessory]",
466
+ standalone: false,
467
+ }]
468
+ }] });
469
+
470
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
471
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
472
+ class SideNavNodeActionDirective extends CoreTreeNodeActionDirective {
473
+ qdsContext = useQdsSideNavContext();
474
+ constructor() {
475
+ super();
476
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getNodeActionBindings()));
477
+ }
478
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
479
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavNodeActionDirective, isStandalone: false, selector: "[q-side-nav-node-action]", usesInheritance: true, ngImport: i0 });
480
+ }
481
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeActionDirective, decorators: [{
482
+ type: Directive,
483
+ args: [{
484
+ selector: "[q-side-nav-node-action]",
485
+ standalone: false,
486
+ }]
487
+ }], ctorParameters: () => [] });
488
+
489
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
490
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
491
+ class SideNavNodeContextDirective extends ApiContextDirective {
492
+ /**
493
+ * The root node of the tree. Used for type narrowing of the template guard.
494
+ */
495
+ rootNode = input(...(ngDevMode ? [undefined, { debugName: "rootNode" }] : []));
496
+ constructor() {
497
+ const contextService = inject(TreeNodeStateContextService);
498
+ super(contextService, "sideNavNodeContext");
499
+ }
500
+ static ngTemplateContextGuard(dir, ctx) {
501
+ return true;
502
+ }
503
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
504
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.12", type: SideNavNodeContextDirective, isStandalone: false, selector: "[sideNavNodeContext]", inputs: { rootNode: { classPropertyName: "rootNode", publicName: "rootNode", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
505
+ }
506
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeContextDirective, decorators: [{
507
+ type: Directive,
508
+ args: [{
509
+ selector: "[sideNavNodeContext]",
510
+ standalone: false,
511
+ }]
512
+ }], ctorParameters: () => [], propDecorators: { rootNode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootNode", required: false }] }] } });
513
+
514
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
515
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
516
+ class SideNavNodeIconDirective extends CoreTreeNodeIconDirective {
517
+ qdsContext = useQdsSideNavContext();
518
+ constructor() {
519
+ super();
520
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getNodeIconBindings()));
521
+ }
522
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
523
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavNodeIconDirective, isStandalone: false, selector: "[q-side-nav-node-icon]", usesInheritance: true, ngImport: i0 });
524
+ }
525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeIconDirective, decorators: [{
526
+ type: Directive,
527
+ args: [{
528
+ selector: "[q-side-nav-node-icon]",
529
+ standalone: false,
530
+ }]
531
+ }], ctorParameters: () => [] });
532
+
533
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
534
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
535
+ class SideNavNodeIndicatorDirective extends CoreTreeNodeIndicatorDirective {
536
+ qdsContext = useQdsSideNavContext();
537
+ constructor() {
538
+ super();
539
+ this.trackBindings.extendWith(computed(() => this.qdsContext().getNodeIndicatorBindings()));
540
+ }
541
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
542
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavNodeIndicatorDirective, isStandalone: false, selector: "[q-side-nav-node-indicator]", usesInheritance: true, ngImport: i0 });
543
+ }
544
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeIndicatorDirective, decorators: [{
545
+ type: Directive,
546
+ args: [{
547
+ selector: "[q-side-nav-node-indicator]",
548
+ standalone: false,
549
+ }]
550
+ }], ctorParameters: () => [] });
551
+
552
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
553
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
554
+ class SideNavNodeTextDirective extends CoreTreeNodeTextDirective {
555
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeTextDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
556
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: SideNavNodeTextDirective, isStandalone: false, selector: "[q-side-nav-node-text]", usesInheritance: true, ngImport: i0 });
557
+ }
558
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodeTextDirective, decorators: [{
559
+ type: Directive,
560
+ args: [{
561
+ selector: "[q-side-nav-node-text]",
562
+ standalone: false,
563
+ }]
564
+ }] });
565
+
566
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
567
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
568
+ class SideNavNodesComponent {
569
+ /**
570
+ * The index path of the tree node
571
+ */
572
+ indexPath = input.required(...(ngDevMode ? [{ debugName: "indexPath" }] : []));
573
+ /**
574
+ * The tree node
575
+ */
576
+ node = input.required(...(ngDevMode ? [{ debugName: "node" }] : []));
577
+ showIndentGuide = input(undefined, ...(ngDevMode ? [{ debugName: "showIndentGuide", transform: booleanAttribute }] : [{
578
+ transform: booleanAttribute,
579
+ }]));
580
+ renderBranch = input(...(ngDevMode ? [undefined, { debugName: "renderBranch" }] : []));
581
+ renderLeaf = input(...(ngDevMode ? [undefined, { debugName: "renderLeaf" }] : []));
582
+ sideNavBranchContentChild = contentChild((SideNavBranchTemplateDirective), ...(ngDevMode ? [{ debugName: "sideNavBranchContentChild" }] : []));
583
+ sideNavLeafContentChild = contentChild((SideNavLeafTemplateDirective), ...(ngDevMode ? [{ debugName: "sideNavLeafContentChild" }] : []));
584
+ branchTemplate = computed(() => {
585
+ const branchInput = this.renderBranch();
586
+ const branchTemplate = this.sideNavBranchContentChild();
587
+ return branchInput || branchTemplate?.template;
588
+ }, ...(ngDevMode ? [{ debugName: "branchTemplate" }] : []));
589
+ leafTemplate = computed(() => {
590
+ const leafInput = this.renderLeaf();
591
+ const leafTemplate = this.sideNavLeafContentChild();
592
+ return (leafInput || leafTemplate?.template);
593
+ }, ...(ngDevMode ? [{ debugName: "leafTemplate" }] : []));
594
+ treeContext = useTreeContext();
595
+ injector = inject(Injector, { self: true });
596
+ templateContext = computed(() => ({
597
+ $implicit: {
598
+ indexPath: this.indexPath(),
599
+ node: this.node(),
600
+ },
601
+ }), ...(ngDevMode ? [{ debugName: "templateContext" }] : []));
602
+ childNodes = computed(() => {
603
+ return this.treeContext().collection.getNodeChildren(this.node());
604
+ }, ...(ngDevMode ? [{ debugName: "childNodes" }] : []));
605
+ treeNodePropsContextService = inject(TreeNodePropsContextService, { self: true });
606
+ treeNodeStateContextService = inject(TreeNodeStateContextService, {
607
+ self: true,
608
+ });
609
+ ngOnInit() {
610
+ const nodeProps = computed(() => ({
611
+ indexPath: this.indexPath(),
612
+ node: this.node(),
613
+ }), ...(ngDevMode ? [{ debugName: "nodeProps" }] : []));
614
+ this.treeNodePropsContextService.init(nodeProps);
615
+ this.treeNodeStateContextService.init(computed(() => this.treeContext().getNodeState(nodeProps())));
616
+ }
617
+ getChildIndexPath(index) {
618
+ return [...this.indexPath(), index];
619
+ }
620
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
621
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: SideNavNodesComponent, isStandalone: false, selector: "q-side-nav-nodes", inputs: { indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: true, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, showIndentGuide: { classPropertyName: "showIndentGuide", publicName: "showIndentGuide", isSignal: true, isRequired: false, transformFunction: null }, renderBranch: { classPropertyName: "renderBranch", publicName: "renderBranch", isSignal: true, isRequired: false, transformFunction: null }, renderLeaf: { classPropertyName: "renderLeaf", publicName: "renderLeaf", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideTreeNodePropsContext(), provideTreeNodeStateContext()], queries: [{ propertyName: "sideNavBranchContentChild", first: true, predicate: (SideNavBranchTemplateDirective), descendants: true, isSignal: true }, { propertyName: "sideNavLeafContentChild", first: true, predicate: (SideNavLeafTemplateDirective), descendants: true, isSignal: true }], ngImport: i0, template: `
622
+ @if (childNodes().length) {
623
+ <div q-side-nav-branch>
624
+ <ng-template
625
+ [ngTemplateOutlet]="branchTemplate()!"
626
+ [ngTemplateOutletContext]="templateContext()"
627
+ [ngTemplateOutletInjector]="injector"
628
+ />
629
+
630
+ <div q-side-nav-branch-content>
631
+ @if (showIndentGuide()) {
632
+ <div q-side-nav-branch-indent-guide></div>
633
+ }
634
+
635
+ @for (
636
+ child of childNodes();
637
+ let i = $index;
638
+ track treeContext().collection.getNodeValue(child)
639
+ ) {
640
+ <q-side-nav-nodes
641
+ [indexPath]="getChildIndexPath(i)"
642
+ [node]="child"
643
+ [renderBranch]="branchTemplate()"
644
+ [renderLeaf]="leafTemplate()"
645
+ [showIndentGuide]="showIndentGuide()"
646
+ />
647
+ }
648
+ </div>
649
+ </div>
650
+ } @else {
651
+ <ng-template
652
+ [ngTemplateOutlet]="leafTemplate()!"
653
+ [ngTemplateOutletContext]="templateContext()"
654
+ [ngTemplateOutletInjector]="injector"
655
+ />
656
+ }
657
+ `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SideNavBranchDirective, selector: "[q-side-nav-branch]" }, { kind: "directive", type: SideNavBranchContentDirective, selector: "[q-side-nav-branch-content]", inputs: ["id"] }, { kind: "directive", type: SideNavBranchIndentGuideDirective, selector: "[q-side-nav-branch-indent-guide]" }, { kind: "component", type: SideNavNodesComponent, selector: "q-side-nav-nodes", inputs: ["indexPath", "node", "showIndentGuide", "renderBranch", "renderLeaf"] }] });
658
+ }
659
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavNodesComponent, decorators: [{
660
+ type: Component,
661
+ args: [{ providers: [provideTreeNodePropsContext(), provideTreeNodeStateContext()], selector: "q-side-nav-nodes", standalone: false, template: `
662
+ @if (childNodes().length) {
663
+ <div q-side-nav-branch>
664
+ <ng-template
665
+ [ngTemplateOutlet]="branchTemplate()!"
666
+ [ngTemplateOutletContext]="templateContext()"
667
+ [ngTemplateOutletInjector]="injector"
668
+ />
669
+
670
+ <div q-side-nav-branch-content>
671
+ @if (showIndentGuide()) {
672
+ <div q-side-nav-branch-indent-guide></div>
673
+ }
674
+
675
+ @for (
676
+ child of childNodes();
677
+ let i = $index;
678
+ track treeContext().collection.getNodeValue(child)
679
+ ) {
680
+ <q-side-nav-nodes
681
+ [indexPath]="getChildIndexPath(i)"
682
+ [node]="child"
683
+ [renderBranch]="branchTemplate()"
684
+ [renderLeaf]="leafTemplate()"
685
+ [showIndentGuide]="showIndentGuide()"
686
+ />
687
+ }
688
+ </div>
689
+ </div>
690
+ } @else {
691
+ <ng-template
692
+ [ngTemplateOutlet]="leafTemplate()!"
693
+ [ngTemplateOutletContext]="templateContext()"
694
+ [ngTemplateOutletInjector]="injector"
695
+ />
696
+ }
697
+ `, styles: [":host{display:contents}\n"] }]
698
+ }], propDecorators: { indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: true }] }], node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: true }] }], showIndentGuide: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIndentGuide", required: false }] }], renderBranch: [{ type: i0.Input, args: [{ isSignal: true, alias: "renderBranch", required: false }] }], renderLeaf: [{ type: i0.Input, args: [{ isSignal: true, alias: "renderLeaf", required: false }] }], sideNavBranchContentChild: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SideNavBranchTemplateDirective), { isSignal: true }] }], sideNavLeafContentChild: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SideNavLeafTemplateDirective), { isSignal: true }] }] } });
699
+
700
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
701
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
702
+ class SideNavRootDirective extends CoreSideNavRootDirective {
703
+ /**
704
+ * The background color of the side navigation.
705
+ *
706
+ * @default 'primary'
707
+ */
708
+ surface = input(...(ngDevMode ? [undefined, { debugName: "surface" }] : []));
709
+ qdsSideNavService = inject(QdsSideNavContextService);
710
+ constructor() {
711
+ super();
712
+ this.trackBindings.extendWith(computed(() => this.qdsSideNavService.context().getRootBindings({
713
+ surface: this.surface(),
714
+ })));
715
+ }
716
+ ngOnInit() {
717
+ this.qdsSideNavService.init(computed(() => createQdsSideNavApi(normalizeProps)));
718
+ super.ngOnInit();
719
+ }
720
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
721
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.12", type: SideNavRootDirective, isStandalone: false, selector: "[q-side-nav-root]", inputs: { surface: { classPropertyName: "surface", publicName: "surface", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
722
+ provideTreeContext(),
723
+ provideRenderStrategyContext(),
724
+ provideSideNavContext(),
725
+ provideQdsSideNavContext(),
726
+ ], exportAs: ["sideNavRoot"], usesInheritance: true, ngImport: i0 });
727
+ }
728
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavRootDirective, decorators: [{
729
+ type: Directive,
730
+ args: [{
731
+ exportAs: "sideNavRoot",
732
+ providers: [
733
+ provideTreeContext(),
734
+ provideRenderStrategyContext(),
735
+ provideSideNavContext(),
736
+ provideQdsSideNavContext(),
737
+ ],
738
+ selector: "[q-side-nav-root]",
739
+ standalone: false,
740
+ }]
741
+ }], ctorParameters: () => [], propDecorators: { surface: [{ type: i0.Input, args: [{ isSignal: true, alias: "surface", required: false }] }] } });
742
+
743
+ // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
744
+ // SPDX-License-Identifier: BSD-3-Clause-Clear
745
+ class SideNavModule {
746
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
747
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: SideNavModule, declarations: [SideNavRootDirective,
748
+ SideNavBranchDirective,
749
+ SideNavBranchContentDirective,
750
+ SideNavBranchIndentGuideDirective,
751
+ SideNavBranchNodeDirective,
752
+ SideNavBranchTriggerDirective,
753
+ SideNavBranchTemplateDirective,
754
+ SideNavCollapseTriggerDirective,
755
+ SideNavDividerDirective,
756
+ SideNavFilterInputDirective,
757
+ SideNavGroupDirective,
758
+ SideNavGroupLabelDirective,
759
+ SideNavHeaderDirective,
760
+ SideNavHeaderActionDirective,
761
+ SideNavHeaderLogoDirective,
762
+ SideNavHeaderTitleDirective,
763
+ SideNavLeafNodeDirective,
764
+ SideNavLeafTemplateDirective,
765
+ SideNavNodeAccessoryDirective,
766
+ SideNavNodeActionDirective,
767
+ SideNavNodeContextDirective,
768
+ SideNavNodeIconDirective,
769
+ SideNavNodeIndicatorDirective,
770
+ SideNavNodeTextDirective,
771
+ SideNavNodesComponent], imports: [QBindDirective, NgTemplateOutlet, IconDirective], exports: [SideNavRootDirective,
772
+ SideNavBranchDirective,
773
+ SideNavBranchContentDirective,
774
+ SideNavBranchIndentGuideDirective,
775
+ SideNavBranchNodeDirective,
776
+ SideNavBranchTriggerDirective,
777
+ SideNavBranchTemplateDirective,
778
+ SideNavCollapseTriggerDirective,
779
+ SideNavDividerDirective,
780
+ SideNavFilterInputDirective,
781
+ SideNavGroupDirective,
782
+ SideNavGroupLabelDirective,
783
+ SideNavHeaderDirective,
784
+ SideNavHeaderActionDirective,
785
+ SideNavHeaderLogoDirective,
786
+ SideNavHeaderTitleDirective,
787
+ SideNavLeafNodeDirective,
788
+ SideNavLeafTemplateDirective,
789
+ SideNavNodeAccessoryDirective,
790
+ SideNavNodeActionDirective,
791
+ SideNavNodeContextDirective,
792
+ SideNavNodeIconDirective,
793
+ SideNavNodeIndicatorDirective,
794
+ SideNavNodeTextDirective,
795
+ SideNavNodesComponent] });
796
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavModule });
797
+ }
798
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SideNavModule, decorators: [{
799
+ type: NgModule,
800
+ args: [{
801
+ declarations: [
802
+ SideNavRootDirective,
803
+ SideNavBranchDirective,
804
+ SideNavBranchContentDirective,
805
+ SideNavBranchIndentGuideDirective,
806
+ SideNavBranchNodeDirective,
807
+ SideNavBranchTriggerDirective,
808
+ SideNavBranchTemplateDirective,
809
+ SideNavCollapseTriggerDirective,
810
+ SideNavDividerDirective,
811
+ SideNavFilterInputDirective,
812
+ SideNavGroupDirective,
813
+ SideNavGroupLabelDirective,
814
+ SideNavHeaderDirective,
815
+ SideNavHeaderActionDirective,
816
+ SideNavHeaderLogoDirective,
817
+ SideNavHeaderTitleDirective,
818
+ SideNavLeafNodeDirective,
819
+ SideNavLeafTemplateDirective,
820
+ SideNavNodeAccessoryDirective,
821
+ SideNavNodeActionDirective,
822
+ SideNavNodeContextDirective,
823
+ SideNavNodeIconDirective,
824
+ SideNavNodeIndicatorDirective,
825
+ SideNavNodeTextDirective,
826
+ SideNavNodesComponent,
827
+ ],
828
+ exports: [
829
+ SideNavRootDirective,
830
+ SideNavBranchDirective,
831
+ SideNavBranchContentDirective,
832
+ SideNavBranchIndentGuideDirective,
833
+ SideNavBranchNodeDirective,
834
+ SideNavBranchTriggerDirective,
835
+ SideNavBranchTemplateDirective,
836
+ SideNavCollapseTriggerDirective,
837
+ SideNavDividerDirective,
838
+ SideNavFilterInputDirective,
839
+ SideNavGroupDirective,
840
+ SideNavGroupLabelDirective,
841
+ SideNavHeaderDirective,
842
+ SideNavHeaderActionDirective,
843
+ SideNavHeaderLogoDirective,
844
+ SideNavHeaderTitleDirective,
845
+ SideNavLeafNodeDirective,
846
+ SideNavLeafTemplateDirective,
847
+ SideNavNodeAccessoryDirective,
848
+ SideNavNodeActionDirective,
849
+ SideNavNodeContextDirective,
850
+ SideNavNodeIconDirective,
851
+ SideNavNodeIndicatorDirective,
852
+ SideNavNodeTextDirective,
853
+ SideNavNodesComponent,
854
+ ],
855
+ imports: [QBindDirective, NgTemplateOutlet, IconDirective],
856
+ }]
857
+ }] });
858
+
859
+ /**
860
+ * Generated bundle index. Do not edit.
861
+ */
862
+
863
+ export { QDS_SIDE_NAV_CONTEXT, QdsSideNavContextService, SideNavBranchContentDirective, SideNavBranchDirective, SideNavBranchIndentGuideDirective, SideNavBranchNodeDirective, SideNavBranchTemplateDirective, SideNavBranchTriggerDirective, SideNavCollapseTriggerDirective, SideNavDividerDirective, SideNavFilterInputDirective, SideNavGroupDirective, SideNavGroupLabelDirective, SideNavHeaderActionDirective, SideNavHeaderDirective, SideNavHeaderLogoDirective, SideNavHeaderTitleDirective, SideNavLeafNodeDirective, SideNavLeafTemplateDirective, SideNavModule, SideNavNodeAccessoryDirective, SideNavNodeActionDirective, SideNavNodeContextDirective, SideNavNodeIconDirective, SideNavNodeIndicatorDirective, SideNavNodeTextDirective, SideNavNodesComponent, SideNavRootDirective, provideQdsSideNavContext, useQdsSideNavContext };
864
+ //# sourceMappingURL=qualcomm-ui-angular-side-nav.mjs.map