@agorapulse/ui-components 18.0.13 → 18.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agorapulse-ui-components-18.0.15.tgz +0 -0
- package/avatar/avatar.component.d.ts +1 -1
- package/checkbox/checkbox.component.d.ts +1 -1
- package/esm2022/add-comment/add-comment.component.mjs +3 -3
- package/esm2022/checkbox/checkbox.component.mjs +5 -4
- package/esm2022/datepicker/datepicker.component.mjs +3 -3
- package/esm2022/labels/label-list.component.mjs +3 -3
- package/esm2022/labels-selector/labels-selector.component.mjs +3 -3
- package/esm2022/media-display-overlay/media-display-overlay-dialog.component.mjs +3 -3
- package/esm2022/modal/modal.component.mjs +3 -3
- package/esm2022/nav-selector/directives/nav-selector-popover-trigger.directive.mjs +71 -0
- package/esm2022/nav-selector/nav-selector-category/nav-selector-category.component.mjs +15 -12
- package/esm2022/nav-selector/nav-selector-group/nav-selector-group.component.mjs +17 -14
- package/esm2022/nav-selector/nav-selector-leaf/nav-selector-leaf.component.mjs +38 -94
- package/esm2022/nav-selector/nav-selector-leaf/nav-selector-leaf.presenter.mjs +2 -2
- package/esm2022/nav-selector/nav-selector-leaf-detail/nav-selector-leaf-detail.component.mjs +6 -6
- package/esm2022/nav-selector/nav-selector-leaf-details/nav-selector-leaf-details.component.mjs +12 -9
- package/esm2022/nav-selector/nav-selector-popover/nav-selector-popover-item.component.mjs +14 -0
- package/esm2022/nav-selector/nav-selector-popover/nav-selector-popover.component.mjs +127 -0
- package/esm2022/nav-selector/nav-selector.component.mjs +45 -23
- package/esm2022/nav-selector/nav-selector.mjs +1 -1
- package/esm2022/nav-selector/nav-selector.state.mjs +35 -11
- package/esm2022/nav-selector/utils/leaf.utils.mjs +12 -3
- package/esm2022/nav-selector/utils/nav-selector.accessibility.mjs +22 -14
- package/esm2022/nav-selector/utils/nav-selector.builder.mjs +4 -2
- package/esm2022/nav-selector/utils/nav-selector.filter.mjs +49 -11
- package/esm2022/nav-selector/utils/nav-selector.folding.mjs +26 -23
- package/esm2022/nav-selector/utils/nav-selector.merger.mjs +76 -0
- package/esm2022/nav-selector/utils/nav-selector.minifying.mjs +14 -9
- package/esm2022/nav-selector/utils/nav-selector.multi-select.mjs +2 -2
- package/esm2022/nav-selector/utils/nav-selector.single-select.mjs +46 -23
- package/esm2022/neo-datepicker/neo-datepicker.component.mjs +3 -3
- package/esm2022/notification/notification.component.mjs +3 -3
- package/esm2022/paginator/paginator-button/paginator-button.component.mjs +2 -2
- package/esm2022/password-input/password-input.component.mjs +3 -3
- package/esm2022/popmenu/popmenu.component.mjs +3 -3
- package/esm2022/slide-toggle/slide-toggle.component.mjs +3 -3
- package/esm2022/snackbars-thread/component/snackbars-thread.component.mjs +3 -3
- package/esm2022/stepper/stepper.component.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-add-comment.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-add-comment.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-checkbox.mjs +4 -3
- package/fesm2022/agorapulse-ui-components-checkbox.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-datepicker.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-labels-selector.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-labels-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-labels.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-labels.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-modal.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-modal.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +599 -238
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-notification.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-notification.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-paginator.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-password-input.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-password-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-popmenu.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-popmenu.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-slide-toggle.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-slide-toggle.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-stepper.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-stepper.mjs.map +1 -1
- package/nav-selector/directives/nav-selector-popover-trigger.directive.d.ts +25 -0
- package/nav-selector/nav-selector-group/nav-selector-group.component.d.ts +1 -1
- package/nav-selector/nav-selector-leaf/nav-selector-leaf.component.d.ts +5 -20
- package/nav-selector/nav-selector-leaf/nav-selector-leaf.presenter.d.ts +1 -1
- package/nav-selector/nav-selector-leaf-detail/nav-selector-leaf-detail.component.d.ts +1 -1
- package/nav-selector/nav-selector-popover/nav-selector-popover-item.component.d.ts +6 -0
- package/nav-selector/nav-selector-popover/nav-selector-popover.component.d.ts +39 -0
- package/nav-selector/nav-selector.component.d.ts +6 -4
- package/nav-selector/nav-selector.d.ts +6 -0
- package/nav-selector/nav-selector.state.d.ts +3 -2
- package/nav-selector/utils/leaf.utils.d.ts +15 -2
- package/nav-selector/utils/nav-selector.accessibility.d.ts +1 -1
- package/nav-selector/utils/nav-selector.filter.d.ts +3 -1
- package/nav-selector/utils/nav-selector.folding.d.ts +6 -3
- package/nav-selector/utils/nav-selector.merger.d.ts +23 -0
- package/nav-selector/utils/nav-selector.minifying.d.ts +4 -2
- package/nav-selector/utils/nav-selector.single-select.d.ts +2 -0
- package/package.json +1 -1
- package/agorapulse-ui-components-18.0.13.tgz +0 -0
|
@@ -4,7 +4,7 @@ import { SymbolComponent, withSymbols, apErrorFill, apFeatureLock, apChevronDown
|
|
|
4
4
|
import { trigger, state, transition, style, animate, keyframes } from '@angular/animations';
|
|
5
5
|
import { NgTemplateOutlet } from '@angular/common';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { input, afterRender, Directive,
|
|
7
|
+
import { input, afterRender, Directive, effect, untracked, signal, computed, Injectable, ChangeDetectionStrategy, Component, contentChildren, viewChild, afterNextRender, model, contentChild } from '@angular/core';
|
|
8
8
|
import * as i2 from '@angular/forms';
|
|
9
9
|
import { FormsModule } from '@angular/forms';
|
|
10
10
|
import { EventPluginsModule } from '@tinkoff/ng-event-plugins';
|
|
@@ -13,7 +13,6 @@ import { CheckboxComponent } from '@agorapulse/ui-components/checkbox';
|
|
|
13
13
|
import { CounterComponent } from '@agorapulse/ui-components/counter';
|
|
14
14
|
import { TooltipDirective } from '@agorapulse/ui-components/tooltip';
|
|
15
15
|
import { apMore } from '@agorapulse/ui-symbol/icons';
|
|
16
|
-
import { MatMenu, MatMenuTrigger, MatMenuItem } from '@angular/material/menu';
|
|
17
16
|
|
|
18
17
|
class TreeNodeAccessibilityDirective {
|
|
19
18
|
apTreeNodeAccessibility = input.required();
|
|
@@ -43,6 +42,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
43
42
|
}]
|
|
44
43
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
|
|
45
44
|
|
|
45
|
+
class NavSelectorPopoverTriggerDirective {
|
|
46
|
+
el;
|
|
47
|
+
renderer;
|
|
48
|
+
apNavSelectorPopoverTrigger = input.required();
|
|
49
|
+
apNavSelectorPopoverTriggerMode = input({
|
|
50
|
+
click: true,
|
|
51
|
+
keyboard: [],
|
|
52
|
+
hover: false,
|
|
53
|
+
focus: false,
|
|
54
|
+
});
|
|
55
|
+
apNavSelectorPopoverDisabled = input(false);
|
|
56
|
+
ACTIVE_CLASS = 'nav-selector-popover-trigger--active';
|
|
57
|
+
constructor(el, renderer) {
|
|
58
|
+
this.el = el;
|
|
59
|
+
this.renderer = renderer;
|
|
60
|
+
effect(() => {
|
|
61
|
+
const displayed = this.apNavSelectorPopoverTrigger().navSelectorPopoverDisplayed();
|
|
62
|
+
untracked(() => {
|
|
63
|
+
if (displayed) {
|
|
64
|
+
this.renderer.addClass(this.el.nativeElement, this.ACTIVE_CLASS);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.renderer.removeClass(this.el.nativeElement, this.ACTIVE_CLASS);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
onClick(event) {
|
|
73
|
+
if (!this.apNavSelectorPopoverTriggerMode().click || this.apNavSelectorPopoverDisabled()) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
event.stopImmediatePropagation();
|
|
77
|
+
this.toggleDisplay();
|
|
78
|
+
}
|
|
79
|
+
onKeydown(event) {
|
|
80
|
+
if (this.apNavSelectorPopoverTriggerMode().keyboard?.includes(event.code) && !this.apNavSelectorPopoverDisabled()) {
|
|
81
|
+
this.toggleDisplay();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
onMouseEnter() {
|
|
85
|
+
if (this.apNavSelectorPopoverTriggerMode().hover && !this.apNavSelectorPopoverDisabled()) {
|
|
86
|
+
this.apNavSelectorPopoverTrigger().display(this.el);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
onMouseLeave() {
|
|
90
|
+
if (this.apNavSelectorPopoverTriggerMode().hover) {
|
|
91
|
+
this.apNavSelectorPopoverTrigger().hide();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
toggleDisplay() {
|
|
95
|
+
this.apNavSelectorPopoverTrigger().toggle(this.el);
|
|
96
|
+
}
|
|
97
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverTriggerDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
98
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.9", type: NavSelectorPopoverTriggerDirective, isStandalone: true, selector: "[apNavSelectorPopoverTrigger]", inputs: { apNavSelectorPopoverTrigger: { classPropertyName: "apNavSelectorPopoverTrigger", publicName: "apNavSelectorPopoverTrigger", isSignal: true, isRequired: true, transformFunction: null }, apNavSelectorPopoverTriggerMode: { classPropertyName: "apNavSelectorPopoverTriggerMode", publicName: "apNavSelectorPopoverTriggerMode", isSignal: true, isRequired: false, transformFunction: null }, apNavSelectorPopoverDisabled: { classPropertyName: "apNavSelectorPopoverDisabled", publicName: "apNavSelectorPopoverDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeydown($event)", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0 });
|
|
99
|
+
}
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverTriggerDirective, decorators: [{
|
|
101
|
+
type: Directive,
|
|
102
|
+
args: [{
|
|
103
|
+
selector: '[apNavSelectorPopoverTrigger]',
|
|
104
|
+
standalone: true,
|
|
105
|
+
host: {
|
|
106
|
+
'(click)': 'onClick($event)',
|
|
107
|
+
'(keydown)': 'onKeydown($event)',
|
|
108
|
+
'(mouseenter)': 'onMouseEnter()',
|
|
109
|
+
'(mouseleave)': 'onMouseLeave()',
|
|
110
|
+
},
|
|
111
|
+
}]
|
|
112
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
|
|
113
|
+
|
|
46
114
|
const isNavSelectorEntryALeaf = (entry) => entry.type === 'LEAF';
|
|
47
115
|
const isNavSelectorEntryAGroup = (entry) => entry.type === 'GROUP';
|
|
48
116
|
const isNavSelectorEntryACategory = (entry) => entry.type === 'CATEGORY';
|
|
@@ -61,15 +129,21 @@ class NavSelectorAccessibility {
|
|
|
61
129
|
* @param entries nav selector entries
|
|
62
130
|
*/
|
|
63
131
|
static resetFocus(entries) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
132
|
+
const flattenEntries = this.flatten(entries);
|
|
133
|
+
let alreadyFocused = false;
|
|
134
|
+
for (const entry of flattenEntries) {
|
|
135
|
+
if (alreadyFocused) {
|
|
136
|
+
entry.accessibility.tabIndex = -1;
|
|
67
137
|
}
|
|
68
|
-
if (
|
|
69
|
-
|
|
138
|
+
else if (entry.focusable) {
|
|
139
|
+
alreadyFocused = true;
|
|
140
|
+
entry.accessibility.tabIndex = 0;
|
|
70
141
|
}
|
|
71
|
-
|
|
72
|
-
|
|
142
|
+
else {
|
|
143
|
+
entry.accessibility.tabIndex = -1;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return this.unflatten(flattenEntries);
|
|
73
147
|
}
|
|
74
148
|
/**
|
|
75
149
|
* Focus the given entry and set tabIndex to 0 for the given uid and -1 for all other entries
|
|
@@ -125,7 +199,7 @@ class NavSelectorAccessibility {
|
|
|
125
199
|
static focusPrevious(entries) {
|
|
126
200
|
const flattenEntries = this.flatten(entries);
|
|
127
201
|
const idxFocusedId = flattenEntries.findIndex(({ accessibility }) => accessibility.tabIndex === 0);
|
|
128
|
-
if (idxFocusedId === 0 || this.
|
|
202
|
+
if (idxFocusedId === 0 || this.noPreviousEntryFocusable(flattenEntries, idxFocusedId)) {
|
|
129
203
|
return entries;
|
|
130
204
|
}
|
|
131
205
|
const focusedEntry = flattenEntries[idxFocusedId];
|
|
@@ -157,12 +231,14 @@ class NavSelectorAccessibility {
|
|
|
157
231
|
focusableFlattenEntries[idxFocusedId + 1].accessibility.tabIndex = 0;
|
|
158
232
|
return this.unflatten(flattenEntries);
|
|
159
233
|
}
|
|
160
|
-
static
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
|
|
234
|
+
static noPreviousEntryFocusable(flattenEntries, idxFocusedId) {
|
|
235
|
+
for (let i = idxFocusedId - 1; i >= 0; i--) {
|
|
236
|
+
const entry = flattenEntries[i];
|
|
237
|
+
if (entry.focusable) {
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
164
240
|
}
|
|
165
|
-
return
|
|
241
|
+
return true;
|
|
166
242
|
}
|
|
167
243
|
static focusAnEntry(entry, uid) {
|
|
168
244
|
return { ...entry, accessibility: { ...entry.accessibility, tabIndex: entry.uid === uid ? 0 : -1 } };
|
|
@@ -370,7 +446,7 @@ class NavSelectorMultiSelect {
|
|
|
370
446
|
static selectLeafs(leafs) {
|
|
371
447
|
return leafs.map(leaf => ({
|
|
372
448
|
...leaf,
|
|
373
|
-
selected:
|
|
449
|
+
selected: leaf.selectable,
|
|
374
450
|
}));
|
|
375
451
|
}
|
|
376
452
|
static unselectLeafs(leafs) {
|
|
@@ -460,28 +536,10 @@ class NavSelectorSingleSelect {
|
|
|
460
536
|
}
|
|
461
537
|
static selectALeafWithDetails(leaf, entryUid) {
|
|
462
538
|
if (leaf.uid === entryUid) {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
accessibility: {
|
|
468
|
-
...leaf.accessibility,
|
|
469
|
-
tabIndex: leafSelected ? 0 : -1,
|
|
470
|
-
},
|
|
471
|
-
folded: !leaf.detailsDisplayable,
|
|
472
|
-
details: leaf.details.reduce((details, detail, idx) => {
|
|
473
|
-
const detailSelected = leaf.detailsDisplayable && !detail.displayError && (idx === 0 || !details[idx - 1].selected);
|
|
474
|
-
details.push({
|
|
475
|
-
...detail,
|
|
476
|
-
selected: detailSelected,
|
|
477
|
-
accessibility: {
|
|
478
|
-
...detail.accessibility,
|
|
479
|
-
tabIndex: detailSelected ? 0 : -1,
|
|
480
|
-
},
|
|
481
|
-
});
|
|
482
|
-
return details;
|
|
483
|
-
}, []),
|
|
484
|
-
};
|
|
539
|
+
if (!leaf.detailsDisplayable) {
|
|
540
|
+
return this.selectALeafWitDetailsNotDisplayable(leaf);
|
|
541
|
+
}
|
|
542
|
+
return this.selectALeafWithDisplayableDetails(leaf);
|
|
485
543
|
}
|
|
486
544
|
const details = leaf.details.map(detail => {
|
|
487
545
|
const detailSelected = detail.uid === entryUid && !detail.displayError;
|
|
@@ -505,6 +563,47 @@ class NavSelectorSingleSelect {
|
|
|
505
563
|
details,
|
|
506
564
|
};
|
|
507
565
|
}
|
|
566
|
+
static selectALeafWitDetailsNotDisplayable(leaf) {
|
|
567
|
+
const selected = leaf.selectable;
|
|
568
|
+
return {
|
|
569
|
+
...leaf,
|
|
570
|
+
selected,
|
|
571
|
+
accessibility: {
|
|
572
|
+
...leaf.accessibility,
|
|
573
|
+
tabIndex: selected ? 0 : -1,
|
|
574
|
+
},
|
|
575
|
+
folded: !leaf.detailsDisplayable,
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
static selectALeafWithDisplayableDetails(leaf) {
|
|
579
|
+
return {
|
|
580
|
+
...leaf,
|
|
581
|
+
selected: false,
|
|
582
|
+
accessibility: {
|
|
583
|
+
...leaf.accessibility,
|
|
584
|
+
tabIndex: -1,
|
|
585
|
+
},
|
|
586
|
+
counterDisplayable: true,
|
|
587
|
+
displayCounter: false,
|
|
588
|
+
folded: !leaf.detailsDisplayable,
|
|
589
|
+
details: leaf.details.reduce(({ previousDetailSelected, details }, detail, idx) => {
|
|
590
|
+
const detailSelected = !previousDetailSelected &&
|
|
591
|
+
leaf.detailsDisplayable &&
|
|
592
|
+
!detail.displayError &&
|
|
593
|
+
(idx === 0 || !details[idx - 1].selected);
|
|
594
|
+
details.push({
|
|
595
|
+
...detail,
|
|
596
|
+
selected: detailSelected,
|
|
597
|
+
focusable: true,
|
|
598
|
+
accessibility: {
|
|
599
|
+
...detail.accessibility,
|
|
600
|
+
tabIndex: detailSelected ? 0 : -1,
|
|
601
|
+
},
|
|
602
|
+
});
|
|
603
|
+
return { previousDetailSelected: previousDetailSelected || detailSelected, details };
|
|
604
|
+
}, { previousDetailSelected: false, details: [] }).details,
|
|
605
|
+
};
|
|
606
|
+
}
|
|
508
607
|
static selectALeafWithoutDetails(leaf, entryUid) {
|
|
509
608
|
const selected = leaf.selectable && leaf.uid === entryUid;
|
|
510
609
|
return {
|
|
@@ -721,10 +820,12 @@ class NavSelectorBuilder {
|
|
|
721
820
|
uid: leaf.uid,
|
|
722
821
|
alias: leaf.alias,
|
|
723
822
|
pictureUrl: leaf.pictureUrl,
|
|
823
|
+
actionsDisplayable: this.isLeafLogicValid(leaf, LeafLogics.COUNTER),
|
|
724
824
|
disabled,
|
|
725
825
|
disableReason: leaf.disableReason,
|
|
726
826
|
hidden: false,
|
|
727
|
-
focusable: focusable &&
|
|
827
|
+
focusable: focusable &&
|
|
828
|
+
((multipleModeEnabled && this.isLeafLogicValid(leaf, LeafLogics.COUNTER)) || (!multipleModeEnabled && !disabled)),
|
|
728
829
|
accessibility: {
|
|
729
830
|
tabIndex: -1,
|
|
730
831
|
ariaPosinset: idx + 1,
|
|
@@ -778,11 +879,20 @@ class NavSelectorBuilder {
|
|
|
778
879
|
}
|
|
779
880
|
}
|
|
780
881
|
|
|
781
|
-
|
|
882
|
+
/**
|
|
883
|
+
* Create a Record of key/value pairs from an array of objects
|
|
884
|
+
* @param array
|
|
885
|
+
* @param key attribute of the object to use as key
|
|
886
|
+
*/
|
|
887
|
+
const associateBy = (array, key) => array.reduce((previousValue, currentValue) => {
|
|
888
|
+
previousValue[`${currentValue[key]}`] = currentValue;
|
|
889
|
+
return previousValue;
|
|
890
|
+
}, {});
|
|
891
|
+
const isInternalNavSelectorEntryALeafFocusable = (leaf, { parentFolded, multipleMode }) => {
|
|
782
892
|
if (parentFolded) {
|
|
783
893
|
return false;
|
|
784
894
|
}
|
|
785
|
-
if (
|
|
895
|
+
if (multipleMode) {
|
|
786
896
|
return !leaf.disabled && !leaf.displayTokenInvalid && !leaf.displayFeatureLocked;
|
|
787
897
|
}
|
|
788
898
|
return !leaf.disabled;
|
|
@@ -809,38 +919,52 @@ class NavSelectorFilter {
|
|
|
809
919
|
*
|
|
810
920
|
* @param entries The entries to filter.
|
|
811
921
|
* @param search The search string.
|
|
922
|
+
* @param multipleMode to update the focusable state of leaves correctly.
|
|
812
923
|
* @returns The filtered entries.
|
|
813
924
|
*/
|
|
814
|
-
static filter(entries, search) {
|
|
925
|
+
static filter(entries, search, multipleMode) {
|
|
815
926
|
const formattedSearch = this.cleanValue(search);
|
|
816
927
|
if (!formattedSearch) {
|
|
817
|
-
return entries;
|
|
928
|
+
return this.resetState(entries);
|
|
818
929
|
}
|
|
819
|
-
return this.filterEntries(entries, formattedSearch);
|
|
930
|
+
return this.filterEntries(entries, formattedSearch, multipleMode);
|
|
820
931
|
}
|
|
821
|
-
static filterEntries(entries, formattedSearch) {
|
|
932
|
+
static filterEntries(entries, formattedSearch, multipleMode) {
|
|
822
933
|
const newEntries = entries.map(entry => {
|
|
823
934
|
if (this.matches(entry.alias, formattedSearch)) {
|
|
824
|
-
return this.recursivelyUnfoldEntry(entry);
|
|
935
|
+
return this.recursivelyUnfoldEntry(entry, multipleMode);
|
|
825
936
|
}
|
|
826
937
|
if (isInternalNavSelectorEntryANode(entry)) {
|
|
827
|
-
const children = this.filterEntries(entry.children, formattedSearch);
|
|
938
|
+
const children = this.filterEntries(entry.children, formattedSearch, multipleMode);
|
|
828
939
|
if (children.every(({ hidden }) => hidden)) {
|
|
829
940
|
return {
|
|
830
941
|
...entry,
|
|
831
942
|
children,
|
|
943
|
+
focusable: false,
|
|
832
944
|
hidden: true,
|
|
833
945
|
};
|
|
834
946
|
}
|
|
835
947
|
return {
|
|
836
948
|
...entry,
|
|
837
949
|
hidden: false,
|
|
950
|
+
focusable: true,
|
|
838
951
|
displayCounter: false,
|
|
839
952
|
displayTokenInvalid: false,
|
|
840
953
|
folded: false,
|
|
841
954
|
children,
|
|
842
955
|
};
|
|
843
956
|
}
|
|
957
|
+
if (isInternalNavSelectorEntryALeaf(entry)) {
|
|
958
|
+
return {
|
|
959
|
+
...entry,
|
|
960
|
+
focusable: false,
|
|
961
|
+
hidden: true,
|
|
962
|
+
details: entry.details.map(detail => ({
|
|
963
|
+
...detail,
|
|
964
|
+
focusable: false,
|
|
965
|
+
})),
|
|
966
|
+
};
|
|
967
|
+
}
|
|
844
968
|
return {
|
|
845
969
|
...entry,
|
|
846
970
|
focusable: false,
|
|
@@ -849,29 +973,36 @@ class NavSelectorFilter {
|
|
|
849
973
|
});
|
|
850
974
|
return NavSelectorAccessibility.resetFocus(newEntries);
|
|
851
975
|
}
|
|
852
|
-
static recursivelyUnfoldEntry(entry) {
|
|
976
|
+
static recursivelyUnfoldEntry(entry, multipleMode) {
|
|
853
977
|
if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
854
|
-
const children = entry.children.map(child => this.recursivelyUnfoldEntry(child));
|
|
978
|
+
const children = entry.children.map(child => this.recursivelyUnfoldEntry(child, multipleMode));
|
|
855
979
|
return {
|
|
856
980
|
...entry,
|
|
857
981
|
folded: false,
|
|
982
|
+
focusable: true,
|
|
858
983
|
children,
|
|
859
984
|
displayCounter: false,
|
|
860
985
|
displayTokenInvalid: false,
|
|
861
986
|
};
|
|
862
987
|
}
|
|
863
988
|
else if (isInternalNavSelectorEntryALeaf(entry)) {
|
|
989
|
+
const leafFocusable = isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded: false, multipleMode });
|
|
864
990
|
return {
|
|
865
991
|
...entry,
|
|
866
992
|
hidden: false,
|
|
867
|
-
focusable:
|
|
993
|
+
focusable: leafFocusable,
|
|
868
994
|
displayCounter: entry.counterDisplayable,
|
|
995
|
+
details: entry.details.map(detail => ({
|
|
996
|
+
...detail,
|
|
997
|
+
focusable: !entry.folded,
|
|
998
|
+
})),
|
|
869
999
|
};
|
|
870
1000
|
}
|
|
871
1001
|
else if (isInternalNavSelectorEntryACategory(entry)) {
|
|
872
|
-
const children = entry.children.map(child => this.recursivelyUnfoldEntry(child));
|
|
1002
|
+
const children = entry.children.map(child => this.recursivelyUnfoldEntry(child, multipleMode));
|
|
873
1003
|
return {
|
|
874
1004
|
...entry,
|
|
1005
|
+
focusable: true,
|
|
875
1006
|
folded: false,
|
|
876
1007
|
hidden: false,
|
|
877
1008
|
children,
|
|
@@ -885,6 +1016,23 @@ class NavSelectorFilter {
|
|
|
885
1016
|
static cleanValue(value) {
|
|
886
1017
|
return value.trim().normalize('NFKC').toLowerCase();
|
|
887
1018
|
}
|
|
1019
|
+
static resetState(entries, parentFolded = false) {
|
|
1020
|
+
return entries.map(entry => {
|
|
1021
|
+
if (isInternalNavSelectorEntryANode(entry)) {
|
|
1022
|
+
return {
|
|
1023
|
+
...entry,
|
|
1024
|
+
hidden: false,
|
|
1025
|
+
focusable: !parentFolded,
|
|
1026
|
+
children: this.resetState(entry.children, entry.folded),
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
return {
|
|
1030
|
+
...entry,
|
|
1031
|
+
focusable: !parentFolded,
|
|
1032
|
+
hidden: false,
|
|
1033
|
+
};
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
888
1036
|
}
|
|
889
1037
|
|
|
890
1038
|
/**
|
|
@@ -898,10 +1046,11 @@ class NavSelectorFolding {
|
|
|
898
1046
|
*
|
|
899
1047
|
* @param entries nav selector entries
|
|
900
1048
|
* @param entryUid the entry uid to toggle
|
|
1049
|
+
* @param multipleMode to update the focusable state of leaves and details correctly.
|
|
901
1050
|
* @param minified true if the nav selector is minified. Needed for leaf as they are not foldable in minified mode
|
|
902
1051
|
*/
|
|
903
|
-
static toggleFolding(entries, entryUid, minified) {
|
|
904
|
-
return this.toggleEntryFolding(entries, entryUid, minified);
|
|
1052
|
+
static toggleFolding(entries, entryUid, multipleMode, minified) {
|
|
1053
|
+
return this.toggleEntryFolding(entries, entryUid, multipleMode, minified);
|
|
905
1054
|
}
|
|
906
1055
|
/**
|
|
907
1056
|
* Fold an entry.
|
|
@@ -911,10 +1060,11 @@ class NavSelectorFolding {
|
|
|
911
1060
|
*
|
|
912
1061
|
* @param entries nav selector entries
|
|
913
1062
|
* @param entryUid the entry uid to fold
|
|
1063
|
+
* @param multipleMode to update the focusable state of leaves and details correctly.
|
|
914
1064
|
* @param minified true if the nav selector is minified. Needed for leaf as they are not foldable in minified mode
|
|
915
1065
|
*/
|
|
916
|
-
static fold(entries, entryUid, minified) {
|
|
917
|
-
return this.foldEntry(entries, entryUid, minified);
|
|
1066
|
+
static fold(entries, entryUid, multipleMode, minified) {
|
|
1067
|
+
return this.foldEntry(entries, entryUid, multipleMode, minified);
|
|
918
1068
|
}
|
|
919
1069
|
/**
|
|
920
1070
|
* Unfold an entry.
|
|
@@ -924,12 +1074,13 @@ class NavSelectorFolding {
|
|
|
924
1074
|
*
|
|
925
1075
|
* @param entries nav selector entries
|
|
926
1076
|
* @param entryUid the entry uid to unfold
|
|
1077
|
+
* @param multipleMode to update the focusable state of leaves and details correctly.
|
|
927
1078
|
* @param minified true if the nav selector is minified. Needed for leaf as they are not foldable in minified mode
|
|
928
1079
|
*/
|
|
929
|
-
static unfold(entries, entryUid, minified) {
|
|
930
|
-
return this.unfoldEntry(entries, entryUid, minified);
|
|
1080
|
+
static unfold(entries, entryUid, multipleMode, minified) {
|
|
1081
|
+
return this.unfoldEntry(entries, entryUid, multipleMode, minified);
|
|
931
1082
|
}
|
|
932
|
-
static toggleEntryFolding(entries, entryUid, minified, parentFolded = false) {
|
|
1083
|
+
static toggleEntryFolding(entries, entryUid, multipleMode, minified, parentFolded = false) {
|
|
933
1084
|
return entries.map(entry => {
|
|
934
1085
|
if (isInternalNavSelectorEntryACategory(entry)) {
|
|
935
1086
|
if (entry.uid === entryUid) {
|
|
@@ -950,10 +1101,10 @@ class NavSelectorFolding {
|
|
|
950
1101
|
if (entry.uid === entryUid) {
|
|
951
1102
|
const folded = !entry.folded;
|
|
952
1103
|
if (folded) {
|
|
953
|
-
return this.foldGroup(entry, minified);
|
|
1104
|
+
return this.foldGroup(entry, multipleMode, minified);
|
|
954
1105
|
}
|
|
955
1106
|
else {
|
|
956
|
-
return this.unfoldGroup(entry, minified);
|
|
1107
|
+
return this.unfoldGroup(entry, multipleMode, minified);
|
|
957
1108
|
}
|
|
958
1109
|
}
|
|
959
1110
|
return {
|
|
@@ -973,13 +1124,13 @@ class NavSelectorFolding {
|
|
|
973
1124
|
}
|
|
974
1125
|
return {
|
|
975
1126
|
...entry,
|
|
976
|
-
focusable: isInternalNavSelectorEntryALeafFocusable(entry, {
|
|
1127
|
+
focusable: isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded, multipleMode }),
|
|
977
1128
|
};
|
|
978
1129
|
}
|
|
979
1130
|
return { ...entry, focusable: !parentFolded };
|
|
980
1131
|
});
|
|
981
1132
|
}
|
|
982
|
-
static foldEntry(entries, entryUid, minified, parentFolded = false) {
|
|
1133
|
+
static foldEntry(entries, entryUid, multipleMode, minified, parentFolded = false) {
|
|
983
1134
|
return entries.map(entry => {
|
|
984
1135
|
if (isInternalNavSelectorEntryACategory(entry)) {
|
|
985
1136
|
if (entry.uid === entryUid) {
|
|
@@ -992,7 +1143,7 @@ class NavSelectorFolding {
|
|
|
992
1143
|
}
|
|
993
1144
|
if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
994
1145
|
if (entry.uid === entryUid) {
|
|
995
|
-
return this.foldGroup(entry, minified);
|
|
1146
|
+
return this.foldGroup(entry, multipleMode, minified);
|
|
996
1147
|
}
|
|
997
1148
|
return {
|
|
998
1149
|
...entry,
|
|
@@ -1006,13 +1157,13 @@ class NavSelectorFolding {
|
|
|
1006
1157
|
}
|
|
1007
1158
|
return {
|
|
1008
1159
|
...entry,
|
|
1009
|
-
focusable: isInternalNavSelectorEntryALeafFocusable(entry, {
|
|
1160
|
+
focusable: isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded, multipleMode }),
|
|
1010
1161
|
};
|
|
1011
1162
|
}
|
|
1012
1163
|
return { ...entry, focusable: !parentFolded };
|
|
1013
1164
|
});
|
|
1014
1165
|
}
|
|
1015
|
-
static unfoldEntry(entries, entryUid, minified, parentFolded = false) {
|
|
1166
|
+
static unfoldEntry(entries, entryUid, multipleMode, minified, parentFolded = false) {
|
|
1016
1167
|
return entries.map(entry => {
|
|
1017
1168
|
if (isInternalNavSelectorEntryACategory(entry)) {
|
|
1018
1169
|
if (entry.uid === entryUid) {
|
|
@@ -1020,16 +1171,16 @@ class NavSelectorFolding {
|
|
|
1020
1171
|
}
|
|
1021
1172
|
return {
|
|
1022
1173
|
...entry,
|
|
1023
|
-
children: this.unfoldEntry(entry.children, entryUid, minified, entry.folded),
|
|
1174
|
+
children: this.unfoldEntry(entry.children, entryUid, multipleMode, minified, entry.folded),
|
|
1024
1175
|
};
|
|
1025
1176
|
}
|
|
1026
1177
|
if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
1027
1178
|
if (entry.uid === entryUid) {
|
|
1028
|
-
return this.unfoldGroup(entry, minified);
|
|
1179
|
+
return this.unfoldGroup(entry, multipleMode, minified);
|
|
1029
1180
|
}
|
|
1030
1181
|
return {
|
|
1031
1182
|
...entry,
|
|
1032
|
-
children: this.unfoldEntry(entry.children, entryUid, minified, parentFolded || entry.folded),
|
|
1183
|
+
children: this.unfoldEntry(entry.children, entryUid, multipleMode, minified, parentFolded || entry.folded),
|
|
1033
1184
|
focusable: !parentFolded,
|
|
1034
1185
|
};
|
|
1035
1186
|
}
|
|
@@ -1039,7 +1190,7 @@ class NavSelectorFolding {
|
|
|
1039
1190
|
}
|
|
1040
1191
|
return {
|
|
1041
1192
|
...entry,
|
|
1042
|
-
focusable: isInternalNavSelectorEntryALeafFocusable(entry, {
|
|
1193
|
+
focusable: isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded, multipleMode }),
|
|
1043
1194
|
};
|
|
1044
1195
|
}
|
|
1045
1196
|
return { ...entry, focusable: !parentFolded };
|
|
@@ -1059,20 +1210,20 @@ class NavSelectorFolding {
|
|
|
1059
1210
|
children: this.unfoldEntry(category.children, category.uid, minified, false),
|
|
1060
1211
|
};
|
|
1061
1212
|
}
|
|
1062
|
-
static foldGroup(group, minified) {
|
|
1213
|
+
static foldGroup(group, multipleMode, minified) {
|
|
1063
1214
|
return {
|
|
1064
1215
|
...group,
|
|
1065
1216
|
folded: true,
|
|
1066
|
-
children: this.foldEntry(group.children, group.uid, minified, true),
|
|
1217
|
+
children: this.foldEntry(group.children, group.uid, multipleMode, minified, true),
|
|
1067
1218
|
displayCounter: !!group.counter,
|
|
1068
1219
|
displayTokenInvalid: group.children.some(({ displayTokenInvalid }) => displayTokenInvalid),
|
|
1069
1220
|
};
|
|
1070
1221
|
}
|
|
1071
|
-
static unfoldGroup(group, minified) {
|
|
1222
|
+
static unfoldGroup(group, multipleMode, minified) {
|
|
1072
1223
|
return {
|
|
1073
1224
|
...group,
|
|
1074
1225
|
folded: false,
|
|
1075
|
-
children: this.unfoldEntry(group.children, group.uid, minified, false),
|
|
1226
|
+
children: this.unfoldEntry(group.children, group.uid, multipleMode, minified, false),
|
|
1076
1227
|
displayCounter: false,
|
|
1077
1228
|
displayTokenInvalid: false,
|
|
1078
1229
|
};
|
|
@@ -1104,6 +1255,80 @@ class NavSelectorFolding {
|
|
|
1104
1255
|
}
|
|
1105
1256
|
}
|
|
1106
1257
|
|
|
1258
|
+
/**
|
|
1259
|
+
* NavSelectorMerger is a utility class that merges old entries into new entries.
|
|
1260
|
+
* It is used to keep some previous properties of the previous state. Ex: folded, selected, focused, etc.
|
|
1261
|
+
*/
|
|
1262
|
+
class NavSelectorMerger {
|
|
1263
|
+
/**
|
|
1264
|
+
* Merges the old entries into the new entries.
|
|
1265
|
+
*
|
|
1266
|
+
* Modify directly the new entries as new entries are generated from scratch so no need to destructure them to have a new reference.
|
|
1267
|
+
*
|
|
1268
|
+
* @param newEntries
|
|
1269
|
+
* @param oldEntries
|
|
1270
|
+
*
|
|
1271
|
+
* @returns the new entries with the old entries merged into them
|
|
1272
|
+
*/
|
|
1273
|
+
static mergeInternalNavSelectorEntries(newEntries, oldEntries) {
|
|
1274
|
+
const oldEntryByUid = associateBy(oldEntries, 'uid');
|
|
1275
|
+
for (const newEntry of newEntries) {
|
|
1276
|
+
if (!oldEntryByUid[newEntry.uid]) {
|
|
1277
|
+
continue;
|
|
1278
|
+
}
|
|
1279
|
+
this.merge(newEntry, oldEntryByUid[newEntry.uid]);
|
|
1280
|
+
}
|
|
1281
|
+
return newEntries;
|
|
1282
|
+
}
|
|
1283
|
+
static merge(newEntry, oldEntry) {
|
|
1284
|
+
if (isInternalNavSelectorEntryALeaf(newEntry) && isInternalNavSelectorEntryALeaf(oldEntry)) {
|
|
1285
|
+
this.mergeLeaf(newEntry, oldEntry);
|
|
1286
|
+
}
|
|
1287
|
+
else if (isInternalNavSelectorEntryANode(newEntry) && isInternalNavSelectorEntryANode(oldEntry)) {
|
|
1288
|
+
this.mergeInternalNavSelectorEntries(newEntry.children, oldEntry.children);
|
|
1289
|
+
this.mergeNode(newEntry, oldEntry);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
static mergeNode(newNode, oldNode) {
|
|
1293
|
+
newNode.folded = oldNode.folded;
|
|
1294
|
+
newNode.accessibility.tabIndex = oldNode.accessibility.tabIndex;
|
|
1295
|
+
if (isInternalNavSelectorEntryAGroup(newNode) && isInternalNavSelectorEntryAGroup(oldNode)) {
|
|
1296
|
+
this.mergeGroup(newNode, oldNode);
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
static mergeGroup(newGroup, oldGroup) {
|
|
1300
|
+
newGroup.displayCounter = oldGroup.displayCounter;
|
|
1301
|
+
newGroup.displayTokenInvalid = oldGroup.displayTokenInvalid;
|
|
1302
|
+
}
|
|
1303
|
+
static mergeLeaf(newLeaf, oldLeaf) {
|
|
1304
|
+
if (this.isInternalLeafLogicValid(newLeaf)) {
|
|
1305
|
+
newLeaf.viewMoreDisplayable = oldLeaf.viewMoreDisplayable;
|
|
1306
|
+
newLeaf.viewMoreDisplayed = oldLeaf.viewMoreDisplayed;
|
|
1307
|
+
newLeaf.displayCounter = oldLeaf.displayCounter;
|
|
1308
|
+
newLeaf.folded = oldLeaf.folded;
|
|
1309
|
+
newLeaf.selected = oldLeaf.selected;
|
|
1310
|
+
newLeaf.accessibility.tabIndex = oldLeaf.accessibility.tabIndex;
|
|
1311
|
+
const oldDetailByUId = associateBy(oldLeaf.details, 'uid');
|
|
1312
|
+
newLeaf.details.forEach(newDetail => {
|
|
1313
|
+
if (!oldDetailByUId[newDetail.uid] || newDetail.errorReason) {
|
|
1314
|
+
return;
|
|
1315
|
+
}
|
|
1316
|
+
newDetail.selected = oldDetailByUId[newDetail.uid].selected;
|
|
1317
|
+
newDetail.accessibility.tabIndex = oldDetailByUId[newDetail.uid].accessibility.tabIndex;
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
else {
|
|
1321
|
+
const oldDetailHasFocused = oldLeaf.details.some(oldDetail => oldDetail.accessibility.tabIndex === 0);
|
|
1322
|
+
if (oldDetailHasFocused) {
|
|
1323
|
+
newLeaf.accessibility.tabIndex = 0;
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
static isInternalLeafLogicValid(leaf) {
|
|
1328
|
+
return !leaf.disabled && !leaf.displayTokenInvalid && !leaf.displayFeatureLocked;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1107
1332
|
/**
|
|
1108
1333
|
* NavSelectorMinifying is a utility class that provides methods to apply rules on entries when minifying or expanded nav selector.
|
|
1109
1334
|
*/
|
|
@@ -1115,10 +1340,11 @@ class NavSelectorMinifying {
|
|
|
1115
1340
|
* Detail are not focusable when minified.
|
|
1116
1341
|
*
|
|
1117
1342
|
* @param entries The entries to minify.
|
|
1343
|
+
* @param multipleMode to update the focusable state of leaves correctly.
|
|
1118
1344
|
* @returns The modified entries.
|
|
1119
1345
|
*/
|
|
1120
|
-
static minify(entries) {
|
|
1121
|
-
return this.compute(entries, true);
|
|
1346
|
+
static minify(entries, multipleMode) {
|
|
1347
|
+
return this.compute(entries, multipleMode, true);
|
|
1122
1348
|
}
|
|
1123
1349
|
/**
|
|
1124
1350
|
* When expanding the nav selector, compute the focusable state of the entries.
|
|
@@ -1127,12 +1353,13 @@ class NavSelectorMinifying {
|
|
|
1127
1353
|
* Detail are focusable when expanded.
|
|
1128
1354
|
*
|
|
1129
1355
|
* @param entries The entries to minify.
|
|
1356
|
+
* @param multipleMode to update the focusable state of leaves and details correctly.
|
|
1130
1357
|
* @returns The modified entries.
|
|
1131
1358
|
*/
|
|
1132
|
-
static expand(entries) {
|
|
1133
|
-
return this.compute(entries, false);
|
|
1359
|
+
static expand(entries, multipleMode) {
|
|
1360
|
+
return this.compute(entries, multipleMode, false);
|
|
1134
1361
|
}
|
|
1135
|
-
static compute(entries, minified, parent = null) {
|
|
1362
|
+
static compute(entries, multipleMode, minified, parent = null) {
|
|
1136
1363
|
return entries.map(entry => {
|
|
1137
1364
|
if (isInternalNavSelectorEntryALeafDetails(entry)) {
|
|
1138
1365
|
return { ...entry, focusable: !minified };
|
|
@@ -1140,13 +1367,16 @@ class NavSelectorMinifying {
|
|
|
1140
1367
|
if (isInternalNavSelectorEntryANode(entry)) {
|
|
1141
1368
|
return {
|
|
1142
1369
|
...entry,
|
|
1143
|
-
children: this.compute(entry.children, minified, entry),
|
|
1370
|
+
children: this.compute(entry.children, multipleMode, minified, entry),
|
|
1144
1371
|
};
|
|
1145
1372
|
}
|
|
1146
1373
|
return {
|
|
1147
1374
|
...entry,
|
|
1148
|
-
focusable: isInternalNavSelectorEntryALeafFocusable(entry, {
|
|
1149
|
-
|
|
1375
|
+
focusable: isInternalNavSelectorEntryALeafFocusable(entry, {
|
|
1376
|
+
parentFolded: parent?.folded === true,
|
|
1377
|
+
multipleMode,
|
|
1378
|
+
}),
|
|
1379
|
+
details: this.compute(entry.details, multipleMode, minified),
|
|
1150
1380
|
};
|
|
1151
1381
|
});
|
|
1152
1382
|
}
|
|
@@ -1270,8 +1500,7 @@ class NavSelectorState {
|
|
|
1270
1500
|
lastSelectedUids = signal([]);
|
|
1271
1501
|
isMultipleModeEnabled = this.multipleModeEnabled;
|
|
1272
1502
|
search = signal('');
|
|
1273
|
-
|
|
1274
|
-
noResults = computed(() => this.filteredEntries().every(({ hidden }) => hidden));
|
|
1503
|
+
noResults = computed(() => this.entries().every(({ hidden }) => hidden));
|
|
1275
1504
|
texts = this._texts.asReadonly();
|
|
1276
1505
|
leafActionProjection = signal(undefined);
|
|
1277
1506
|
expanded = signal(true);
|
|
@@ -1285,12 +1514,18 @@ class NavSelectorState {
|
|
|
1285
1514
|
this.selectedUidsChangeCallback(newSelectedUids);
|
|
1286
1515
|
}
|
|
1287
1516
|
});
|
|
1288
|
-
}
|
|
1517
|
+
});
|
|
1518
|
+
effect(() => {
|
|
1519
|
+
const search = this.search();
|
|
1520
|
+
untracked(() => {
|
|
1521
|
+
this.entries.update(entries => NavSelectorFilter.filter(entries, search, this.multipleModeEnabled()));
|
|
1522
|
+
});
|
|
1523
|
+
});
|
|
1289
1524
|
}
|
|
1290
1525
|
updateMultiModeEnabled(enabled) {
|
|
1291
1526
|
this.multipleModeEnabled.set(enabled);
|
|
1292
1527
|
}
|
|
1293
|
-
|
|
1528
|
+
initEntries(entries, initialSelectedEntryUids, detailsDisplayedLimit) {
|
|
1294
1529
|
if (this.multipleModeEnabled()) {
|
|
1295
1530
|
this.entries.set(NavSelectorBuilder.buildInMultipleMode(entries, initialSelectedEntryUids, detailsDisplayedLimit));
|
|
1296
1531
|
}
|
|
@@ -1298,8 +1533,21 @@ class NavSelectorState {
|
|
|
1298
1533
|
this.entries.set(NavSelectorBuilder.build(entries, initialSelectedEntryUids?.[0] ?? null, detailsDisplayedLimit));
|
|
1299
1534
|
}
|
|
1300
1535
|
}
|
|
1536
|
+
updateEntries(entries, initialSelectedEntryUids, detailsDisplayedLimit) {
|
|
1537
|
+
let newEntries;
|
|
1538
|
+
if (this.multipleModeEnabled()) {
|
|
1539
|
+
newEntries = NavSelectorBuilder.buildInMultipleMode(entries, initialSelectedEntryUids, detailsDisplayedLimit);
|
|
1540
|
+
}
|
|
1541
|
+
else {
|
|
1542
|
+
newEntries = NavSelectorBuilder.build(entries, initialSelectedEntryUids?.[0] ?? null, detailsDisplayedLimit);
|
|
1543
|
+
}
|
|
1544
|
+
this.entries.update(oldEntries => {
|
|
1545
|
+
const mergeEntries = NavSelectorMerger.mergeInternalNavSelectorEntries(newEntries, oldEntries);
|
|
1546
|
+
return NavSelectorFilter.filter(mergeEntries, this.search(), this.multipleModeEnabled());
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1301
1549
|
onGroupToggleFolding(group) {
|
|
1302
|
-
this.entries.update(entries => NavSelectorFolding.toggleFolding(entries, group.uid, !this.expanded()));
|
|
1550
|
+
this.entries.update(entries => NavSelectorFolding.toggleFolding(entries, group.uid, this.multipleModeEnabled(), !this.expanded()));
|
|
1303
1551
|
}
|
|
1304
1552
|
onNodeSelect(node) {
|
|
1305
1553
|
this.entries.update(entries => NavSelectorMultiSelect.selectInMultipleMode(entries, node.uid));
|
|
@@ -1316,7 +1564,7 @@ class NavSelectorState {
|
|
|
1316
1564
|
}
|
|
1317
1565
|
}
|
|
1318
1566
|
onLeafToggleFolding(leaf) {
|
|
1319
|
-
this.entries.update(entries => NavSelectorFolding.toggleFolding(entries, leaf.uid, !this.expanded()));
|
|
1567
|
+
this.entries.update(entries => NavSelectorFolding.toggleFolding(entries, leaf.uid, this.multipleModeEnabled(), !this.expanded()));
|
|
1320
1568
|
}
|
|
1321
1569
|
onLeafDetailClicked(leafDetail) {
|
|
1322
1570
|
this.entries.update(entries => NavSelectorSingleSelect.select(entries, leafDetail.uid));
|
|
@@ -1331,9 +1579,9 @@ class NavSelectorState {
|
|
|
1331
1579
|
this.expanded.update(expanded => !expanded);
|
|
1332
1580
|
this.entries.update(entries => {
|
|
1333
1581
|
if (this.expanded()) {
|
|
1334
|
-
return NavSelectorMinifying.expand(entries);
|
|
1582
|
+
return NavSelectorMinifying.expand(entries, this.multipleModeEnabled());
|
|
1335
1583
|
}
|
|
1336
|
-
return NavSelectorMinifying.minify(entries);
|
|
1584
|
+
return NavSelectorMinifying.minify(entries, this.multipleModeEnabled());
|
|
1337
1585
|
});
|
|
1338
1586
|
if (!this.expanded()) {
|
|
1339
1587
|
setTimeout(() => this.expandedAfterDelay.set(this.expanded()), 150);
|
|
@@ -1342,6 +1590,11 @@ class NavSelectorState {
|
|
|
1342
1590
|
this.expandedAfterDelay.set(this.expanded());
|
|
1343
1591
|
}
|
|
1344
1592
|
}
|
|
1593
|
+
minify() {
|
|
1594
|
+
if (this.expanded()) {
|
|
1595
|
+
this.toggleExpanded();
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1345
1598
|
onSelectionChange(uids) {
|
|
1346
1599
|
// Avoid infinite loop if you put unexisting uids as select will generate the same entries but with different reference
|
|
1347
1600
|
if (JSON.stringify(uids) === JSON.stringify(this.lastSelectedUids())) {
|
|
@@ -1392,10 +1645,10 @@ class NavSelectorState {
|
|
|
1392
1645
|
this.leafActionProjection.set(leafActionProjection);
|
|
1393
1646
|
}
|
|
1394
1647
|
fold(entry) {
|
|
1395
|
-
this.entries.update(entries => NavSelectorFolding.fold(entries, entry.uid, !this.expanded()));
|
|
1648
|
+
this.entries.update(entries => NavSelectorFolding.fold(entries, entry.uid, this.multipleModeEnabled(), !this.expanded()));
|
|
1396
1649
|
}
|
|
1397
1650
|
unfold(entry) {
|
|
1398
|
-
this.entries.update(entries => NavSelectorFolding.unfold(entries, entry.uid, !this.expanded()));
|
|
1651
|
+
this.entries.update(entries => NavSelectorFolding.unfold(entries, entry.uid, this.multipleModeEnabled(), !this.expanded()));
|
|
1399
1652
|
}
|
|
1400
1653
|
updateDetailsDisplayedLimit(detailsDisplayedLimit) {
|
|
1401
1654
|
this.entries.update(entries => NavSelectorViewMore.changeViewMoreDetailsDisplayedLimit(entries, detailsDisplayedLimit));
|
|
@@ -1435,18 +1688,18 @@ class NavSelectorLeafDetailComponent {
|
|
|
1435
1688
|
constructor(navSelectorLeafDetailPresenter) {
|
|
1436
1689
|
this.navSelectorLeafDetailPresenter = navSelectorLeafDetailPresenter;
|
|
1437
1690
|
}
|
|
1438
|
-
onClick(
|
|
1439
|
-
|
|
1691
|
+
onClick(event) {
|
|
1692
|
+
event.stopImmediatePropagation();
|
|
1440
1693
|
this.navSelectorLeafDetailPresenter.onLeafDetailClicked(this.detail());
|
|
1441
1694
|
}
|
|
1442
1695
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafDetailComponent, deps: [{ token: NavSelectorLeafDetailPresenter }], target: i0.ɵɵFactoryTarget.Component });
|
|
1443
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorLeafDetailComponent, isStandalone: true, selector: "ap-nav-selector-leaf-detail", inputs: { detail: { classPropertyName: "detail", publicName: "detail", isSignal: true, isRequired: true, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "keydown.enter": "onClick($event)", "keydown.space": "onClick($event)" }, properties: { "class.selected": "detail().selected
|
|
1696
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorLeafDetailComponent, isStandalone: true, selector: "ap-nav-selector-leaf-detail", inputs: { detail: { classPropertyName: "detail", publicName: "detail", isSignal: true, isRequired: true, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "keydown.enter": "onClick($event)", "keydown.space": "onClick($event)" }, properties: { "class.selected": "detail().selected", "class.embedded": "embedded()" } }, providers: [withSymbols(apErrorFill), NavSelectorLeafDetailPresenter], hostDirectives: [{ directive: TreeNodeAccessibilityDirective, inputs: ["apTreeNodeAccessibility", "detail"] }], ngImport: i0, template: "<span class=\"caption\">{{ detail().alias }}</span>\n\n@if (detail().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ detail().counter }}\n </ap-counter>\n}\n@if (detail().displayError) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n}\n", styles: [":host{display:flex;height:32px;padding:0 var(--ref-spacing-xxs);align-items:center;gap:var(--ref-spacing-xxs);align-self:stretch;flex-grow:1}:host.embedded{padding:0}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host .caption{flex-grow:1;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;white-space:nowrap;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host:not(.disabled):not(.embedded){cursor:pointer}:host:not(.disabled):not(.embedded):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host:not(.disabled):not(.embedded):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host:not(.disabled):not(.embedded):focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host:not(.disabled):not(.embedded).selected{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host:not(.disabled):not(.embedded).selected .caption{overflow:hidden;color:var(--ref-color-electric-blue-150);text-overflow:ellipsis;white-space:nowrap;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host:not(.disabled):not(.embedded).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host.embedded.selected .caption{color:var(--ref-color-electric-blue-150);font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm)}\n"], dependencies: [{ kind: "component", type: CounterComponent, selector: "ap-counter", inputs: ["color", "size", "background", "notif"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1444
1697
|
}
|
|
1445
1698
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafDetailComponent, decorators: [{
|
|
1446
1699
|
type: Component,
|
|
1447
1700
|
args: [{ selector: 'ap-nav-selector-leaf-detail', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CounterComponent, SymbolComponent], providers: [withSymbols(apErrorFill), NavSelectorLeafDetailPresenter], host: {
|
|
1448
1701
|
'(click)': 'onClick($event)',
|
|
1449
|
-
'[class.selected]': 'detail().selected
|
|
1702
|
+
'[class.selected]': 'detail().selected',
|
|
1450
1703
|
'[class.embedded]': 'embedded()',
|
|
1451
1704
|
'(keydown.enter)': 'onClick($event)',
|
|
1452
1705
|
'(keydown.space)': 'onClick($event)',
|
|
@@ -1456,7 +1709,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
1456
1709
|
// Alias the input of the directive to detail the input detail will be used in the directive and in the component as well
|
|
1457
1710
|
inputs: ['apTreeNodeAccessibility: detail'],
|
|
1458
1711
|
},
|
|
1459
|
-
], template: "<span class=\"caption\"
|
|
1712
|
+
], template: "<span class=\"caption\">{{ detail().alias }}</span>\n\n@if (detail().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ detail().counter }}\n </ap-counter>\n}\n@if (detail().displayError) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n}\n", styles: [":host{display:flex;height:32px;padding:0 var(--ref-spacing-xxs);align-items:center;gap:var(--ref-spacing-xxs);align-self:stretch;flex-grow:1}:host.embedded{padding:0}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host .caption{flex-grow:1;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;white-space:nowrap;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host:not(.disabled):not(.embedded){cursor:pointer}:host:not(.disabled):not(.embedded):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host:not(.disabled):not(.embedded):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host:not(.disabled):not(.embedded):focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host:not(.disabled):not(.embedded).selected{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host:not(.disabled):not(.embedded).selected .caption{overflow:hidden;color:var(--ref-color-electric-blue-150);text-overflow:ellipsis;white-space:nowrap;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host:not(.disabled):not(.embedded).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host.embedded.selected .caption{color:var(--ref-color-electric-blue-150);font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm)}\n"] }]
|
|
1460
1713
|
}], ctorParameters: () => [{ type: NavSelectorLeafDetailPresenter }] });
|
|
1461
1714
|
|
|
1462
1715
|
class NavSelectorLeafDetailsPresenter {
|
|
@@ -1504,13 +1757,16 @@ class NavSelectorLeafDetailsComponent {
|
|
|
1504
1757
|
this.el = el;
|
|
1505
1758
|
this.navSelectorLeafDetailsPresenter = navSelectorLeafDetailsPresenter;
|
|
1506
1759
|
effect(() => {
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1760
|
+
const viewMoreDisplayed = this.leaf().viewMoreDisplayed;
|
|
1761
|
+
untracked(() => {
|
|
1762
|
+
if (viewMoreDisplayed) {
|
|
1763
|
+
setTimeout(() => this.viewMoreDelay.set(false), 150);
|
|
1764
|
+
}
|
|
1765
|
+
else {
|
|
1766
|
+
this.viewMoreDelay.set(true);
|
|
1767
|
+
}
|
|
1768
|
+
});
|
|
1769
|
+
});
|
|
1514
1770
|
}
|
|
1515
1771
|
ngAfterViewInit() {
|
|
1516
1772
|
// scrollHeight = leaf + first details displayed when there is a limit
|
|
@@ -1573,6 +1829,141 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
1573
1829
|
], template: "@for (detail of firstDetails(); track detail.uid) {\n <div class=\"detail\">\n <div class=\"separator\">\n <div class=\"rectangle\"></div>\n </div>\n <ap-nav-selector-leaf-detail [detail]=\"detail\" />\n </div>\n}\n\n@if (leaf().viewMoreDisplayable) {\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (viewMoreDelay()) {\n @for (detail of lastDetails(); track detail.uid) {\n <div class=\"detail\">\n <div class=\"separator\">\n <div class=\"rectangle\"></div>\n </div>\n <ap-nav-selector-leaf-detail [detail]=\"detail\" />\n </div>\n }\n }\n </div>\n\n <div class=\"detail\">\n <div class=\"separator\">\n <div class=\"rectangle\"></div>\n </div>\n <a\n tabindex=\"0\"\n role=\"button\"\n class=\"standalone view-more\"\n (keydown.space)=\"onSpaceOrEnter($event)\"\n (keydown.enter)=\"onSpaceOrEnter($event)\"\n (click)=\"toggleViewMore()\">\n @if (leaf().viewMoreDisplayed) {\n {{ navSelectorLeafDetailsPresenter.viewMoreText() }}\n } @else {\n {{ navSelectorLeafDetailsPresenter.viewLessText() }}\n }\n </a>\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}:host .detail{display:flex;align-self:stretch}:host .separator{display:flex;padding:0 11px 0 20px;align-items:center;align-self:stretch}:host .rectangle{width:1px;align-self:stretch;background:var(--ref-color-grey-10)}:host .view-more{display:flex;padding:8px;align-items:center;align-self:stretch}:host .details-container{display:flex;flex-direction:column;align-self:stretch}\n"] }]
|
|
1574
1830
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorLeafDetailsPresenter }] });
|
|
1575
1831
|
|
|
1832
|
+
class NavSelectorPopoverItemComponent {
|
|
1833
|
+
selected = input(false);
|
|
1834
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1835
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.9", type: NavSelectorPopoverItemComponent, isStandalone: true, selector: "ap-nav-selector-popover-item", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.selected": "selected()" } }, ngImport: i0, template: '<ng-content/>', isInline: true, styles: [":host{width:100%;height:40px;display:flex;flex-wrap:wrap;align-content:center;gap:var(--ref-spacing-xxs);padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);background:none;border:none;cursor:pointer;color:var(--ref-color-grey-100)}:host:focus-visible{background-color:var(--ref-color-electric-blue-10)}:host:hover{background-color:var(--ref-color-electric-blue-10)}:host:active{background-color:var(--ref-color-electric-blue-20)}:host.nav-selector-popover__item--active{background-color:var(--ref-color-electric-blue-10);color:var(--ref-color-electric-blue-100);font-weight:var(--ref-font-weight-bold)}:host.selected{background:var(--ref-color-electric-blue-10)}\n"] });
|
|
1836
|
+
}
|
|
1837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverItemComponent, decorators: [{
|
|
1838
|
+
type: Component,
|
|
1839
|
+
args: [{ selector: 'ap-nav-selector-popover-item', standalone: true, template: '<ng-content/>', host: {
|
|
1840
|
+
'[class.selected]': 'selected()',
|
|
1841
|
+
}, styles: [":host{width:100%;height:40px;display:flex;flex-wrap:wrap;align-content:center;gap:var(--ref-spacing-xxs);padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);background:none;border:none;cursor:pointer;color:var(--ref-color-grey-100)}:host:focus-visible{background-color:var(--ref-color-electric-blue-10)}:host:hover{background-color:var(--ref-color-electric-blue-10)}:host:active{background-color:var(--ref-color-electric-blue-20)}:host.nav-selector-popover__item--active{background-color:var(--ref-color-electric-blue-10);color:var(--ref-color-electric-blue-100);font-weight:var(--ref-font-weight-bold)}:host.selected{background:var(--ref-color-electric-blue-10)}\n"] }]
|
|
1842
|
+
}] });
|
|
1843
|
+
|
|
1844
|
+
const NavSelectorPopoverPlacement = {
|
|
1845
|
+
RIGHT: 'right',
|
|
1846
|
+
BOTTOM_START: 'bottom_start',
|
|
1847
|
+
};
|
|
1848
|
+
class NavSelectorPopoverComponent {
|
|
1849
|
+
elementRef;
|
|
1850
|
+
placement = input(NavSelectorPopoverPlacement.RIGHT);
|
|
1851
|
+
popoverTitle = input();
|
|
1852
|
+
offset = input({ mainAxis: 0, crossAxis: 0 });
|
|
1853
|
+
items = contentChildren('item');
|
|
1854
|
+
displayed = signal(false);
|
|
1855
|
+
navSelectorPopoverDisplayed = this.displayed.asReadonly();
|
|
1856
|
+
position = signal({
|
|
1857
|
+
top: 0,
|
|
1858
|
+
left: 0,
|
|
1859
|
+
});
|
|
1860
|
+
parentEl = signal(null);
|
|
1861
|
+
mainAxisOffset = computed(() => this.offset().mainAxis ?? 0);
|
|
1862
|
+
crossAxisOffset = computed(() => this.offset().crossAxis ?? 0);
|
|
1863
|
+
constructor(elementRef) {
|
|
1864
|
+
this.elementRef = elementRef;
|
|
1865
|
+
}
|
|
1866
|
+
display(parentEl) {
|
|
1867
|
+
this.parentEl.set(parentEl);
|
|
1868
|
+
this.displayed.set(true);
|
|
1869
|
+
this.computePosition(parentEl);
|
|
1870
|
+
}
|
|
1871
|
+
hide() {
|
|
1872
|
+
this.displayed.set(false);
|
|
1873
|
+
}
|
|
1874
|
+
toggle(parentEl) {
|
|
1875
|
+
this.parentEl.set(parentEl);
|
|
1876
|
+
this.displayed.update(value => !value);
|
|
1877
|
+
if (this.displayed()) {
|
|
1878
|
+
this.computePosition(parentEl);
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
onClick(event) {
|
|
1882
|
+
// Prevent click to be caught from element behind the popover (real bug)
|
|
1883
|
+
event.stopImmediatePropagation();
|
|
1884
|
+
this.displayed.set(false);
|
|
1885
|
+
}
|
|
1886
|
+
computePosition(parentEl) {
|
|
1887
|
+
// Needed to wait first render and have the total height of the popover
|
|
1888
|
+
setTimeout(() => {
|
|
1889
|
+
const parentRect = parentEl.nativeElement.getBoundingClientRect();
|
|
1890
|
+
if (!parentRect.top && !parentRect.left) {
|
|
1891
|
+
this.displayed.set(false);
|
|
1892
|
+
}
|
|
1893
|
+
else if (this.placement().startsWith('right')) {
|
|
1894
|
+
this.computeRightPosition(parentEl);
|
|
1895
|
+
}
|
|
1896
|
+
else if (this.placement().startsWith('bottom')) {
|
|
1897
|
+
this.computeBottomPosition(parentEl);
|
|
1898
|
+
}
|
|
1899
|
+
});
|
|
1900
|
+
}
|
|
1901
|
+
computeRightPosition(parentEl) {
|
|
1902
|
+
const nativeEl = parentEl.nativeElement;
|
|
1903
|
+
const rect = nativeEl.getBoundingClientRect();
|
|
1904
|
+
let top = rect.top + (rect.height - nativeEl.offsetHeight) / 2 + this.crossAxisOffset();
|
|
1905
|
+
const left = rect.left + rect.width + this.mainAxisOffset();
|
|
1906
|
+
const elementEl = this.elementRef.nativeElement;
|
|
1907
|
+
const popoverRect = elementEl.getBoundingClientRect();
|
|
1908
|
+
if (top + elementEl.clientHeight > window.innerHeight) {
|
|
1909
|
+
const popoverEl = document.querySelector('.nav-selector-popover');
|
|
1910
|
+
const paddingBottom = parseInt(getComputedStyle(popoverEl).paddingBottom);
|
|
1911
|
+
top = rect.top + rect.height - popoverRect.height + paddingBottom;
|
|
1912
|
+
}
|
|
1913
|
+
this.position.set({
|
|
1914
|
+
top: top,
|
|
1915
|
+
left: left,
|
|
1916
|
+
});
|
|
1917
|
+
}
|
|
1918
|
+
computeBottomPosition(parentEl) {
|
|
1919
|
+
const nativeEl = parentEl.nativeElement;
|
|
1920
|
+
const rect = nativeEl.getBoundingClientRect();
|
|
1921
|
+
let top = rect.top + rect.height + this.mainAxisOffset();
|
|
1922
|
+
let left = rect.left + (rect.width - nativeEl.offsetWidth) / 2 + this.crossAxisOffset();
|
|
1923
|
+
if (this.placement() === NavSelectorPopoverPlacement.BOTTOM_START) {
|
|
1924
|
+
left = rect.left;
|
|
1925
|
+
}
|
|
1926
|
+
const elementEl = this.elementRef.nativeElement;
|
|
1927
|
+
const popoverRect = elementEl.getBoundingClientRect();
|
|
1928
|
+
if (top + elementEl.clientHeight > window.innerHeight) {
|
|
1929
|
+
top -= popoverRect.height + rect.height;
|
|
1930
|
+
}
|
|
1931
|
+
this.position.set({
|
|
1932
|
+
top: top,
|
|
1933
|
+
left: left,
|
|
1934
|
+
});
|
|
1935
|
+
}
|
|
1936
|
+
onAnyScroll() {
|
|
1937
|
+
const parent = this.parentEl();
|
|
1938
|
+
if (parent) {
|
|
1939
|
+
this.computePosition(parent);
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
onFocusChanged(event) {
|
|
1943
|
+
if (!this.elementRef.nativeElement.contains(event.target)) {
|
|
1944
|
+
this.displayed.set(false);
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
onAnyClick(event) {
|
|
1948
|
+
if (!this.elementRef.nativeElement.contains(event.target)) {
|
|
1949
|
+
this.displayed.set(false);
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1953
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorPopoverComponent, isStandalone: true, selector: "ap-nav-selector-popover", inputs: { placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, popoverTitle: { classPropertyName: "popoverTitle", publicName: "popoverTitle", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "window:wheel": "onAnyScroll()", "window:focusin": "onFocusChanged($event)", "window:click": "onAnyClick($event)" }, properties: { "style.top.px": "position().top", "style.left.px": "position().left" } }, queries: [{ propertyName: "items", predicate: ["item"], isSignal: true }], ngImport: i0, template: "@if (displayed()) {\n <div class=\"nav-selector-popover\">\n @if (popoverTitle()) {\n <div class=\"nav-selector-popover__title\">{{ popoverTitle() }}</div>\n }\n\n @let itemsNotNull = items();\n\n @if (itemsNotNull?.length) {\n @for (item of itemsNotNull; track item) {\n <ap-nav-selector-popover-item>\n <ng-container [ngTemplateOutlet]=\"item\"/>\n </ap-nav-selector-popover-item>\n }\n } @else {\n <ng-content select=\"[item]\"/>\n }\n </div>\n}\n", styles: [":host{position:fixed;z-index:10}:host .nav-selector-popover{padding:var(--ref-spacing-xxs) 0;background:var(--ref-color-white);border-radius:var(--ref-border-radius-sm);box-shadow:0 4px 25px -2px #34456326,0 4px 6px -2px #34456326}:host .nav-selector-popover__title{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm) var(--ref-spacing-xxxs);text-align:left;color:var(--ref-color-grey-100);font-size:var(--ref-font-size-xs);font-weight:var(--ref-font-weight-bold)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NavSelectorPopoverItemComponent, selector: "ap-nav-selector-popover-item", inputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1954
|
+
}
|
|
1955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverComponent, decorators: [{
|
|
1956
|
+
type: Component,
|
|
1957
|
+
args: [{ selector: 'ap-nav-selector-popover', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1958
|
+
'[style.top.px]': 'position().top',
|
|
1959
|
+
'[style.left.px]': 'position().left',
|
|
1960
|
+
'(click)': 'onClick($event)',
|
|
1961
|
+
'(window:wheel)': 'onAnyScroll()',
|
|
1962
|
+
'(window:focusin)': 'onFocusChanged($event)',
|
|
1963
|
+
'(window:click)': 'onAnyClick($event)',
|
|
1964
|
+
}, imports: [NgTemplateOutlet, NavSelectorPopoverItemComponent], template: "@if (displayed()) {\n <div class=\"nav-selector-popover\">\n @if (popoverTitle()) {\n <div class=\"nav-selector-popover__title\">{{ popoverTitle() }}</div>\n }\n\n @let itemsNotNull = items();\n\n @if (itemsNotNull?.length) {\n @for (item of itemsNotNull; track item) {\n <ap-nav-selector-popover-item>\n <ng-container [ngTemplateOutlet]=\"item\"/>\n </ap-nav-selector-popover-item>\n }\n } @else {\n <ng-content select=\"[item]\"/>\n }\n </div>\n}\n", styles: [":host{position:fixed;z-index:10}:host .nav-selector-popover{padding:var(--ref-spacing-xxs) 0;background:var(--ref-color-white);border-radius:var(--ref-border-radius-sm);box-shadow:0 4px 25px -2px #34456326,0 4px 6px -2px #34456326}:host .nav-selector-popover__title{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm) var(--ref-spacing-xxxs);text-align:left;color:var(--ref-color-grey-100);font-size:var(--ref-font-size-xs);font-weight:var(--ref-font-weight-bold)}\n"] }]
|
|
1965
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
1966
|
+
|
|
1576
1967
|
class NavSelectorLeafPresenter {
|
|
1577
1968
|
navSelectorState;
|
|
1578
1969
|
expanded = computed(() => this.navSelectorState.expanded());
|
|
@@ -1583,7 +1974,7 @@ class NavSelectorLeafPresenter {
|
|
|
1583
1974
|
constructor(navSelectorState) {
|
|
1584
1975
|
this.navSelectorState = navSelectorState;
|
|
1585
1976
|
}
|
|
1586
|
-
|
|
1977
|
+
selectLeaf(leaf) {
|
|
1587
1978
|
this.navSelectorState.onLeafClicked(leaf);
|
|
1588
1979
|
}
|
|
1589
1980
|
onLeafToggleFolding(leaf) {
|
|
@@ -1611,11 +2002,8 @@ class NavSelectorLeafComponent {
|
|
|
1611
2002
|
leaf = input.required();
|
|
1612
2003
|
initial = computed(() => this.leaf().alias[0].toUpperCase());
|
|
1613
2004
|
foldSymbol = computed(() => (this.leaf().folded ? 'chevron-down' : 'chevron-up'));
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
onlyButtonDisplayed = computed(() => this.navSelectorLeafPresenter.isMultipleModeEnabled() &&
|
|
1617
|
-
(this.hovering() || this.leaf().accessibility.tabIndex === 0) &&
|
|
1618
|
-
this.leaf().selectable);
|
|
2005
|
+
focused = signal(false);
|
|
2006
|
+
detailSelected = computed(() => this.leaf().details.some(({ selected }) => selected));
|
|
1619
2007
|
aliasEl = viewChild('alias');
|
|
1620
2008
|
aliasBoundedClientRect = signal({
|
|
1621
2009
|
offsetWidth: 0,
|
|
@@ -1633,26 +2021,24 @@ class NavSelectorLeafComponent {
|
|
|
1633
2021
|
if (disableReason) {
|
|
1634
2022
|
content.push(disableReason);
|
|
1635
2023
|
}
|
|
1636
|
-
if (this.
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
2024
|
+
if (this.navSelectorLeafPresenter.isMultipleModeEnabled()) {
|
|
2025
|
+
if (this.leaf().displayFeatureLocked) {
|
|
2026
|
+
content.push(this.navSelectorLeafPresenter.texts().featureLocked);
|
|
2027
|
+
}
|
|
2028
|
+
if (this.leaf().displayTokenInvalid) {
|
|
2029
|
+
content.push(this.navSelectorLeafPresenter.texts().tokenInvalid);
|
|
2030
|
+
}
|
|
1641
2031
|
}
|
|
1642
2032
|
return content.join('<br>');
|
|
1643
2033
|
});
|
|
1644
2034
|
tooltipDisabled = computed(() => !this.tooltipContent().length || this.leaf().detailsDisplayable);
|
|
1645
|
-
minifiedEl = viewChild('minified');
|
|
1646
|
-
menuEl = viewChild('menuContainer');
|
|
1647
|
-
menuTriggerEl = viewChild('menuTrigger');
|
|
1648
|
-
actionMenuTriggerEl = viewChild('actionMenuTrigger');
|
|
1649
2035
|
foldedWithDelay = signal(false);
|
|
1650
2036
|
network = computed(() => (this.leaf().network ? this.leaf().network : undefined));
|
|
1651
2037
|
constructor(el, navSelectorLeafPresenter) {
|
|
1652
2038
|
this.el = el;
|
|
1653
2039
|
this.navSelectorLeafPresenter = navSelectorLeafPresenter;
|
|
1654
2040
|
afterNextRender(() => {
|
|
1655
|
-
this.maxHeight.set(`${this.el.nativeElement.
|
|
2041
|
+
this.maxHeight.set(`${this.el.nativeElement.clientHeight * this.leaf().details.length}px`);
|
|
1656
2042
|
const el = this.aliasEl()?.nativeElement;
|
|
1657
2043
|
if (el) {
|
|
1658
2044
|
this.aliasBoundedClientRect.set({
|
|
@@ -1664,74 +2050,42 @@ class NavSelectorLeafComponent {
|
|
|
1664
2050
|
}
|
|
1665
2051
|
});
|
|
1666
2052
|
effect(() => {
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
2053
|
+
const folded = this.leaf().folded;
|
|
2054
|
+
untracked(() => {
|
|
2055
|
+
if (folded) {
|
|
2056
|
+
setTimeout(() => this.foldedWithDelay.set(true), 150);
|
|
2057
|
+
}
|
|
2058
|
+
else {
|
|
2059
|
+
this.foldedWithDelay.set(false);
|
|
2060
|
+
}
|
|
2061
|
+
});
|
|
2062
|
+
});
|
|
1674
2063
|
}
|
|
1675
2064
|
animationState = computed(() => (this.leaf().folded ? 'collapsed' : 'expanded'));
|
|
1676
2065
|
maxHeight = signal('0px');
|
|
1677
|
-
onClick(
|
|
1678
|
-
|
|
1679
|
-
this.navSelectorLeafPresenter.
|
|
2066
|
+
onClick(event) {
|
|
2067
|
+
event.stopImmediatePropagation();
|
|
2068
|
+
this.navSelectorLeafPresenter.selectLeaf(this.leaf());
|
|
1680
2069
|
}
|
|
1681
2070
|
toggleFolding(event) {
|
|
1682
2071
|
event.stopImmediatePropagation();
|
|
1683
2072
|
this.navSelectorLeafPresenter.onLeafToggleFolding(this.leaf());
|
|
1684
2073
|
}
|
|
1685
|
-
mouseEntered() {
|
|
1686
|
-
this.hovering.set(true);
|
|
1687
|
-
const menuTrigger = this.menuTriggerEl();
|
|
1688
|
-
if (menuTrigger && this.leaf().detailsDisplayable) {
|
|
1689
|
-
menuTrigger.openMenu();
|
|
1690
|
-
}
|
|
1691
|
-
}
|
|
1692
|
-
mouseLeft($event) {
|
|
1693
|
-
this.hovering.set(false);
|
|
1694
|
-
const menuTrigger = this.menuTriggerEl();
|
|
1695
|
-
if (menuTrigger) {
|
|
1696
|
-
setTimeout(() => {
|
|
1697
|
-
this.tryCloseMenu(menuTrigger, $event);
|
|
1698
|
-
}, 100);
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
mouseEnteredMenu() {
|
|
1702
|
-
this.hoveringMenu.set(true);
|
|
1703
|
-
}
|
|
1704
|
-
mouseLeftMenu(menuTrigger, $event) {
|
|
1705
|
-
this.hoveringMenu.set(false);
|
|
1706
|
-
this.tryCloseMenu(menuTrigger, $event);
|
|
1707
|
-
}
|
|
1708
|
-
menuOpened() {
|
|
1709
|
-
if (!this.leaf().detailsDisplayable) {
|
|
1710
|
-
this.menuTriggerEl()?.closeMenu();
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
onActionButtonClick($event) {
|
|
1714
|
-
$event.stopImmediatePropagation();
|
|
1715
|
-
}
|
|
1716
|
-
onActionButtonKeyDownSpaceOrEnter($event) {
|
|
1717
|
-
$event.stopImmediatePropagation();
|
|
1718
|
-
this.actionMenuTriggerEl()?.openMenu();
|
|
1719
|
-
}
|
|
1720
2074
|
selectOnly(event) {
|
|
1721
2075
|
event.stopImmediatePropagation();
|
|
1722
2076
|
this.navSelectorLeafPresenter.selectOnlyLeaf(this.leaf());
|
|
1723
2077
|
}
|
|
1724
2078
|
onCheckboxToggle() {
|
|
1725
|
-
this.navSelectorLeafPresenter.
|
|
2079
|
+
this.navSelectorLeafPresenter.selectLeaf(this.leaf());
|
|
1726
2080
|
}
|
|
1727
|
-
onSpaceOrEnterPressed(
|
|
1728
|
-
|
|
2081
|
+
onSpaceOrEnterPressed(event) {
|
|
2082
|
+
event.stopImmediatePropagation();
|
|
1729
2083
|
if (document.activeElement === this.el.nativeElement.querySelector('.nav-selector-leaf')) {
|
|
1730
2084
|
if (this.leaf().foldable) {
|
|
1731
|
-
this.toggleFolding(
|
|
2085
|
+
this.toggleFolding(event);
|
|
1732
2086
|
}
|
|
1733
2087
|
else {
|
|
1734
|
-
this.navSelectorLeafPresenter.
|
|
2088
|
+
this.navSelectorLeafPresenter.selectLeaf(this.leaf());
|
|
1735
2089
|
}
|
|
1736
2090
|
}
|
|
1737
2091
|
}
|
|
@@ -1743,27 +2097,8 @@ class NavSelectorLeafComponent {
|
|
|
1743
2097
|
event.stopImmediatePropagation();
|
|
1744
2098
|
this.navSelectorLeafPresenter.unfold(this.leaf());
|
|
1745
2099
|
}
|
|
1746
|
-
tryCloseMenu(menuTrigger, $event) {
|
|
1747
|
-
if (!this.hoveringMenu()) {
|
|
1748
|
-
const minifiedEl = this.minifiedEl();
|
|
1749
|
-
const minifiedBoundedClientRect = minifiedEl.nativeElement.getBoundingClientRect();
|
|
1750
|
-
const mouseHoveringLeaf = this.mouseIsHovering($event, minifiedBoundedClientRect);
|
|
1751
|
-
const menuEl = this.menuEl();
|
|
1752
|
-
const menuBoundedClientRect = menuEl.nativeElement.getBoundingClientRect();
|
|
1753
|
-
const mouseHoveringMenu = this.mouseIsHovering($event, menuBoundedClientRect);
|
|
1754
|
-
if (!mouseHoveringLeaf && !mouseHoveringMenu) {
|
|
1755
|
-
menuTrigger.closeMenu();
|
|
1756
|
-
}
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1759
|
-
mouseIsHovering($event, boundingClientRect) {
|
|
1760
|
-
return (boundingClientRect.left <= $event.clientX &&
|
|
1761
|
-
$event.clientX <= boundingClientRect.right &&
|
|
1762
|
-
boundingClientRect.top <= $event.clientY &&
|
|
1763
|
-
$event.clientY <= boundingClientRect.bottom);
|
|
1764
|
-
}
|
|
1765
2100
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafComponent, deps: [{ token: i0.ElementRef }, { token: NavSelectorLeafPresenter }], target: i0.ɵɵFactoryTarget.Component });
|
|
1766
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorLeafComponent, isStandalone: true, selector: "ap-nav-selector-leaf", inputs: { leaf: { classPropertyName: "leaf", publicName: "leaf", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "treeitem" }, listeners: { "mouseenter": "mouseEntered()", "mouseleave": "mouseLeft($event)", "keydown.arrowLeft": "fold($event)", "keydown.arrowRight": "unfold($event)" }, properties: { "class.minified": "!navSelectorLeafPresenter.expanded()" } }, providers: [withSymbols(apErrorFill, apFeatureLock, apChevronDown, apChevronUp, apMore), NavSelectorLeafPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }, { propertyName: "minifiedEl", first: true, predicate: ["minified"], descendants: true, isSignal: true }, { propertyName: "menuEl", first: true, predicate: ["menuContainer"], descendants: true, isSignal: true }, { propertyName: "menuTriggerEl", first: true, predicate: ["menuTrigger"], descendants: true, isSignal: true }, { propertyName: "actionMenuTriggerEl", first: true, predicate: ["actionMenuTrigger"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (navSelectorLeafPresenter.expandedAfterDelay()) {\n <div\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n role=\"treeitem\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [disabled]=\"!leaf().selectable\"\n (change)=\"onCheckboxToggle()\" />\n }\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <span\n #alias\n class=\"caption\">\n {{ leaf().alias }}\n </span>\n\n @if (onlyButtonDisplayed()) {\n <a\n class=\"standalone\"\n role=\"button\"\n [attr.aria-label]=\"'Select only ' + leaf().alias\"\n [attr.tabindex]=\"leaf().accessibility.tabIndex\"\n (keydown.space)=\"selectOnly($event)\"\n (keydown.enter)=\"selectOnly($event)\"\n (click)=\"selectOnly($event)\">\n {{ navSelectorLeafPresenter.texts().only }}\n </a>\n } @else {\n @if (leaf().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n\n @let actionProjection = navSelectorLeafPresenter.leafActionProjection();\n @if (actionProjection?.length) {\n <ap-symbol\n #actionMenuTrigger=\"matMenuTrigger\"\n class=\"actions-menu\"\n size=\"sm\"\n symbolId=\"more\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Action menu ' + leaf().alias\"\n [matMenuTriggerFor]=\"actionMenu\"\n (click)=\"onActionButtonClick($event)\"\n (keydown.space)=\"onActionButtonKeyDownSpaceOrEnter($event)\"\n (keydown.enter)=\"onActionButtonKeyDownSpaceOrEnter($event)\" />\n\n <mat-menu #actionMenu=\"matMenu\">\n @for (action of actionProjection; track action) {\n <button mat-menu-item>\n <ng-container\n [ngTemplateOutlet]=\"action\"\n [ngTemplateOutletContext]=\"{\n uid: leaf().uid\n }\" />\n </button>\n }\n </mat-menu>\n }\n\n @if (leaf().foldable) {\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n role=\"button\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Toggle ' + leaf().alias\"\n [symbolId]=\"foldSymbol()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"toggleFolding($event)\"\n (keydown.enter)=\"toggleFolding($event)\" />\n }\n }\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <ap-nav-selector-leaf-details [details]=\"leaf().details\" [leaf]=\"leaf()\"/>\n }\n </div>\n} @else {\n <div\n #menuTrigger=\"matMenuTrigger\"\n #minified\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [matMenuTriggerFor]=\"menu\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (menuOpened)=\"menuOpened()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [disabled]=\"!leaf().selectable\" />\n }\n\n <div class=\"avatar-container\">\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <div class=\"status\">\n @if (leaf().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n </div>\n <mat-menu\n #menu=\"matMenu\"\n class=\"nav-selector-leaf-menu\"\n xPosition=\"after\"\n [hasBackdrop]=\"false\">\n <div\n #menuContainer\n [class.not-displayable]=\"!leaf().detailsDisplayable\"\n (mouseenter)=\"mouseEnteredMenu()\"\n (mouseleave)=\"mouseLeftMenu(menuTrigger, $event)\">\n <button mat-menu-item>\n <span class=\"caption-bold\">{{ leaf().alias }}</span>\n </button>\n @for (detail of leaf().details; track detail.uid) {\n <button\n mat-menu-item\n [class.selected]=\"detail.selected\">\n <ap-nav-selector-leaf-detail\n [embedded]=\"true\"\n [detail]=\"detail\" />\n </button>\n }\n </div>\n </mat-menu>\n </div>\n}\n", styles: [":host{display:flex;gap:2px;flex-shrink:0;align-self:stretch;flex-direction:column}:host .details-container{align-self:stretch}:host .nav-selector-leaf{position:relative;display:flex;padding:0 var(--ref-spacing-xxs);height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=feature-lock]{color:var(--ref-color-purple-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button,:host .actions-menu{display:flex;width:24px;height:24px;justify-content:center;align-items:center;flex-shrink:0}:host .folding-button:hover,:host .actions-menu:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .folding-button:active,:host .actions-menu:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-40)}:host .folding-button:focus,:host .actions-menu:focus{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector-leaf:not(.disabled){cursor:pointer}:host .nav-selector-leaf:not(.disabled):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .nav-selector-leaf:not(.disabled):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):focus{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled).selected{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled).selected:focus{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.feature-locked{border-radius:var(--ref-border-radius-sm)}:host .nav-selector-leaf.feature-locked:hover{background:var(--ref-color-purple-10)}:host .nav-selector-leaf.feature-locked:active{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:focus{background:var(--ref-color-purple-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-purple-100)}:host .nav-selector-leaf.feature-locked.selected{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked.selected:focus{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.disabled{opacity:.5}:host .status{position:absolute;right:-4px;top:-6px}:host .avatar-container{position:relative}:host.minified .nav-selector-leaf{gap:var(--ref-spacing-xxxs);justify-content:center}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}::ng-deep .nav-selector-leaf-menu{position:absolute;left:55px;top:-20%;width:225px}::ng-deep .nav-selector-leaf-menu .not-displayable{display:none}::ng-deep .nav-selector-leaf-menu .caption-bold{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}::ng-deep .nav-selector-leaf-menu.mat-mdc-menu-panel:not(.pop-menu) .mat-mdc-menu-item.selected{background:var(--ref-color-electric-blue-20)}::ng-deep .nav-selector-leaf-menu.mat-mdc-menu-panel:not(.pop-menu) .mat-mdc-menu-item ap-symbol{padding-right:0}\n"], dependencies: [{ kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "bigNetwork", "anonymous", "online", "youtubeAvatarMode", "rounded"] }, { kind: "component", type: CounterComponent, selector: "ap-counter", inputs: ["color", "size", "background", "notif"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: NavSelectorLeafDetailsComponent, selector: "ap-nav-selector-leaf-details", inputs: ["leaf", "details"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "component", type: NavSelectorLeafDetailComponent, selector: "ap-nav-selector-leaf-detail", inputs: ["detail", "embedded"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }], animations: [
|
|
2101
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorLeafComponent, isStandalone: true, selector: "ap-nav-selector-leaf", inputs: { leaf: { classPropertyName: "leaf", publicName: "leaf", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "treeitem" }, listeners: { "keydown.arrowLeft": "fold($event)", "keydown.arrowRight": "unfold($event)" }, properties: { "class.minified": "!navSelectorLeafPresenter.expanded()" } }, providers: [withSymbols(apErrorFill, apFeatureLock, apChevronDown, apChevronUp, apMore), NavSelectorLeafPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (navSelectorLeafPresenter.expandedAfterDelay()) {\n <div\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [attr.aria-selected]=\"leaf().selected\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [class.multiple-mode]=\"navSelectorLeafPresenter.isMultipleModeEnabled()\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [class.actions-displayable]=\"leaf().actionsDisplayable && leaf().detailsDisplayable\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (focusin)=\"focused.set(true)\"\n (focusout)=\"focused.set(false)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [aria-label]=\"leaf().alias\"\n [disabled]=\"!leaf().selectable\"\n (change)=\"onCheckboxToggle()\" />\n }\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <span\n #alias\n class=\"caption\">\n {{ leaf().alias }}\n </span>\n\n <a\n class=\"standalone only-button\"\n role=\"button\"\n [attr.aria-label]=\"'Select only ' + leaf().alias\"\n [attr.tabindex]=\"leaf().accessibility.tabIndex\"\n (keydown.space)=\"selectOnly($event)\"\n (keydown.enter)=\"selectOnly($event)\"\n (click)=\"selectOnly($event)\">\n {{ navSelectorLeafPresenter.texts().only }}\n </a>\n\n @let actionProjection = navSelectorLeafPresenter.leafActionProjection();\n @if (actionProjection?.length) {\n <ap-symbol\n class=\"actions-menu\"\n size=\"sm\"\n symbolId=\"more\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Action menu ' + leaf().alias\"\n [apNavSelectorPopoverTrigger]=\"popover\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: true, keyboard: ['Space', 'Enter'] }\" />\n\n <ap-nav-selector-popover\n #popover\n placement=\"bottom_start\">\n @for (action of actionProjection; track action) {\n <ng-template #item>\n <ng-container\n [ngTemplateOutlet]=\"action\"\n [ngTemplateOutletContext]=\"{\n uid: leaf().uid\n }\" />\n </ng-template>\n }\n </ap-nav-selector-popover>\n }\n\n @if (leaf().foldable) {\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n role=\"button\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Toggle ' + leaf().alias\"\n [symbolId]=\"foldSymbol()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"toggleFolding($event)\"\n (keydown.enter)=\"toggleFolding($event)\" />\n }\n @if (leaf().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <ap-nav-selector-leaf-details\n [details]=\"leaf().details\"\n [leaf]=\"leaf()\" />\n }\n </div>\n} @else {\n <div\n #minified\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [apNavSelectorPopoverTrigger]=\"minifiedPopover\"\n [apNavSelectorPopoverDisabled]=\"!leaf().detailsDisplayable\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: false, hover: true }\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected || detailSelected()\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [disabled]=\"!leaf().selectable\" />\n }\n\n <div class=\"avatar-container\">\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <div class=\"status\">\n @if (leaf().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n </div>\n\n <ap-nav-selector-popover\n #minifiedPopover\n [popoverTitle]=\"leaf().alias\"\n [offset]=\"{ mainAxis: 0, crossAxis: -36.5 }\"\n placement=\"right\">\n @for (detail of leaf().details; track detail.uid) {\n <ap-nav-selector-popover-item item [selected]=\"detail.selected\">\n <ap-nav-selector-leaf-detail\n [embedded]=\"true\"\n [detail]=\"detail\" />\n </ap-nav-selector-popover-item>\n }\n </ap-nav-selector-popover>\n </div>\n}\n", styles: [":host{display:flex;flex-shrink:0;align-self:stretch;flex-direction:column}:host .details-container{align-self:stretch}:host .nav-selector-leaf{position:relative;display:flex;padding:0 var(--ref-spacing-xxs);height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch}:host .nav-selector-leaf ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=feature-lock]{color:var(--ref-color-purple-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button,:host .actions-menu{display:none;width:24px;height:24px;justify-content:center;align-items:center;flex-shrink:0}:host .folding-button:hover,:host .actions-menu:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .folding-button:active,:host .folding-button.nav-selector-popover-trigger--active,:host .actions-menu:active,:host .actions-menu.nav-selector-popover-trigger--active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-40)}:host .folding-button:focus-visible,:host .actions-menu:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error){cursor:pointer}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).selected:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).selected:not(.multiple-mode) .caption{color:var(--ref-color-electric-blue-150)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).selected.multiple-mode .caption{color:var(--ref-color-grey-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).selected .caption{overflow:hidden;text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:hover ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:focus-within ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:focus-visible ap-counter{display:none}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:hover .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:focus-within .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:focus-visible .only-button{display:flex}:host .nav-selector-leaf.feature-locked:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);outline:none}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):hover{background:var(--ref-color-purple-10)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):active{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):focus-visible{background:var(--ref-color-purple-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-purple-100)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected .caption{overflow:hidden;color:var(--ref-color-purple-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover ap-counter{display:none}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .folding-button{display:flex}:host .nav-selector-leaf.feature-locked.multiple-mode ap-avatar,:host .nav-selector-leaf.feature-locked.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.feature-locked.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.token-error.multiple-mode ap-avatar,:host .nav-selector-leaf.token-error.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.token-error.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled.multiple-mode ap-avatar,:host .nav-selector-leaf.disabled.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.disabled.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled ap-avatar,:host .nav-selector-leaf.disabled .caption{opacity:.5}:host .nav-selector-leaf.disabled .caption{color:var(--ref-color-grey-40)}:host .status{position:absolute;right:-4px;top:-6px}:host .avatar-container{position:relative}:host.minified .counter-override{background-color:var(--ref-color-orange-150)}:host.minified .nav-selector-leaf{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs);justify-content:center}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .only-button{display:none;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}::ng-deep .nav-selector-leaf-menu{position:absolute;left:55px;top:-20%;width:225px}::ng-deep .nav-selector-leaf-menu .not-displayable{display:none}::ng-deep .nav-selector-leaf-menu .caption-bold{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}\n"], dependencies: [{ kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "bigNetwork", "anonymous", "online", "youtubeAvatarMode", "rounded"] }, { kind: "component", type: CounterComponent, selector: "ap-counter", inputs: ["color", "size", "background", "notif"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: NavSelectorLeafDetailsComponent, selector: "ap-nav-selector-leaf-details", inputs: ["leaf", "details"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }, { kind: "component", type: NavSelectorLeafDetailComponent, selector: "ap-nav-selector-leaf-detail", inputs: ["detail", "embedded"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }, { kind: "component", type: NavSelectorPopoverComponent, selector: "ap-nav-selector-popover", inputs: ["placement", "popoverTitle", "offset"] }, { kind: "directive", type: NavSelectorPopoverTriggerDirective, selector: "[apNavSelectorPopoverTrigger]", inputs: ["apNavSelectorPopoverTrigger", "apNavSelectorPopoverTriggerMode", "apNavSelectorPopoverDisabled"] }, { kind: "component", type: NavSelectorPopoverItemComponent, selector: "ap-nav-selector-popover-item", inputs: ["selected"] }], animations: [
|
|
1767
2102
|
/**
|
|
1768
2103
|
* Overflow hidden is put only during the animation and on the collapsed state because if it is put on the expanded state then children’s border will be cut (hover / focus)
|
|
1769
2104
|
*/
|
|
@@ -1793,18 +2128,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
1793
2128
|
NavSelectorLeafDetailsComponent,
|
|
1794
2129
|
CheckboxComponent,
|
|
1795
2130
|
TooltipDirective,
|
|
1796
|
-
MatMenu,
|
|
1797
|
-
MatMenuTrigger,
|
|
1798
|
-
MatMenuItem,
|
|
1799
2131
|
NavSelectorLeafDetailComponent,
|
|
1800
2132
|
NavSelectorLeafDetailComponent,
|
|
1801
2133
|
NgTemplateOutlet,
|
|
1802
2134
|
TreeNodeAccessibilityDirective,
|
|
2135
|
+
NavSelectorPopoverComponent,
|
|
2136
|
+
NavSelectorPopoverTriggerDirective,
|
|
2137
|
+
NavSelectorPopoverItemComponent,
|
|
1803
2138
|
], providers: [withSymbols(apErrorFill, apFeatureLock, apChevronDown, apChevronUp, apMore), NavSelectorLeafPresenter], host: {
|
|
1804
2139
|
'[class.minified]': '!navSelectorLeafPresenter.expanded()',
|
|
1805
2140
|
role: 'treeitem',
|
|
1806
|
-
'(mouseenter)': 'mouseEntered()',
|
|
1807
|
-
'(mouseleave)': 'mouseLeft($event)',
|
|
1808
2141
|
'(keydown.arrowLeft)': 'fold($event)',
|
|
1809
2142
|
'(keydown.arrowRight)': 'unfold($event)',
|
|
1810
2143
|
}, animations: [
|
|
@@ -1826,7 +2159,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
1826
2159
|
animate('250ms cubic-bezier(.4, 0, .3, 1)', keyframes([style({ overflow: 'hidden', maxHeight: '{{maxHeight}}' }), style({ maxHeight: 0 })])),
|
|
1827
2160
|
]),
|
|
1828
2161
|
]),
|
|
1829
|
-
], template: "@if (navSelectorLeafPresenter.expandedAfterDelay()) {\n <div\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n role=\"treeitem\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [disabled]=\"!leaf().selectable\"\n (change)=\"onCheckboxToggle()\" />\n }\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <span\n #alias\n class=\"caption\">\n {{ leaf().alias }}\n </span>\n\n @if (onlyButtonDisplayed()) {\n <a\n class=\"standalone\"\n role=\"button\"\n [attr.aria-label]=\"'Select only ' + leaf().alias\"\n [attr.tabindex]=\"leaf().accessibility.tabIndex\"\n (keydown.space)=\"selectOnly($event)\"\n (keydown.enter)=\"selectOnly($event)\"\n (click)=\"selectOnly($event)\">\n {{ navSelectorLeafPresenter.texts().only }}\n </a>\n } @else {\n @if (leaf().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n\n @let actionProjection = navSelectorLeafPresenter.leafActionProjection();\n @if (actionProjection?.length) {\n <ap-symbol\n #actionMenuTrigger=\"matMenuTrigger\"\n class=\"actions-menu\"\n size=\"sm\"\n symbolId=\"more\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Action menu ' + leaf().alias\"\n [matMenuTriggerFor]=\"actionMenu\"\n (click)=\"onActionButtonClick($event)\"\n (keydown.space)=\"onActionButtonKeyDownSpaceOrEnter($event)\"\n (keydown.enter)=\"onActionButtonKeyDownSpaceOrEnter($event)\" />\n\n <mat-menu #actionMenu=\"matMenu\">\n @for (action of actionProjection; track action) {\n <button mat-menu-item>\n <ng-container\n [ngTemplateOutlet]=\"action\"\n [ngTemplateOutletContext]=\"{\n uid: leaf().uid\n }\" />\n </button>\n }\n </mat-menu>\n }\n\n @if (leaf().foldable) {\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n role=\"button\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Toggle ' + leaf().alias\"\n [symbolId]=\"foldSymbol()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"toggleFolding($event)\"\n (keydown.enter)=\"toggleFolding($event)\" />\n }\n }\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <ap-nav-selector-leaf-details [details]=\"leaf().details\" [leaf]=\"leaf()\"/>\n }\n </div>\n} @else {\n <div\n #menuTrigger=\"matMenuTrigger\"\n #minified\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [matMenuTriggerFor]=\"menu\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (menuOpened)=\"menuOpened()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [disabled]=\"!leaf().selectable\" />\n }\n\n <div class=\"avatar-container\">\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <div class=\"status\">\n @if (leaf().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n </div>\n <mat-menu\n #menu=\"matMenu\"\n class=\"nav-selector-leaf-menu\"\n xPosition=\"after\"\n [hasBackdrop]=\"false\">\n <div\n #menuContainer\n [class.not-displayable]=\"!leaf().detailsDisplayable\"\n (mouseenter)=\"mouseEnteredMenu()\"\n (mouseleave)=\"mouseLeftMenu(menuTrigger, $event)\">\n <button mat-menu-item>\n <span class=\"caption-bold\">{{ leaf().alias }}</span>\n </button>\n @for (detail of leaf().details; track detail.uid) {\n <button\n mat-menu-item\n [class.selected]=\"detail.selected\">\n <ap-nav-selector-leaf-detail\n [embedded]=\"true\"\n [detail]=\"detail\" />\n </button>\n }\n </div>\n </mat-menu>\n </div>\n}\n", styles: [":host{display:flex;gap:2px;flex-shrink:0;align-self:stretch;flex-direction:column}:host .details-container{align-self:stretch}:host .nav-selector-leaf{position:relative;display:flex;padding:0 var(--ref-spacing-xxs);height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=feature-lock]{color:var(--ref-color-purple-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button,:host .actions-menu{display:flex;width:24px;height:24px;justify-content:center;align-items:center;flex-shrink:0}:host .folding-button:hover,:host .actions-menu:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .folding-button:active,:host .actions-menu:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-40)}:host .folding-button:focus,:host .actions-menu:focus{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector-leaf:not(.disabled){cursor:pointer}:host .nav-selector-leaf:not(.disabled):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .nav-selector-leaf:not(.disabled):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):focus{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled).selected{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled).selected:focus{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.feature-locked{border-radius:var(--ref-border-radius-sm)}:host .nav-selector-leaf.feature-locked:hover{background:var(--ref-color-purple-10)}:host .nav-selector-leaf.feature-locked:active{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:focus{background:var(--ref-color-purple-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-purple-100)}:host .nav-selector-leaf.feature-locked.selected{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked.selected:focus{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.disabled{opacity:.5}:host .status{position:absolute;right:-4px;top:-6px}:host .avatar-container{position:relative}:host.minified .nav-selector-leaf{gap:var(--ref-spacing-xxxs);justify-content:center}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}::ng-deep .nav-selector-leaf-menu{position:absolute;left:55px;top:-20%;width:225px}::ng-deep .nav-selector-leaf-menu .not-displayable{display:none}::ng-deep .nav-selector-leaf-menu .caption-bold{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}::ng-deep .nav-selector-leaf-menu.mat-mdc-menu-panel:not(.pop-menu) .mat-mdc-menu-item.selected{background:var(--ref-color-electric-blue-20)}::ng-deep .nav-selector-leaf-menu.mat-mdc-menu-panel:not(.pop-menu) .mat-mdc-menu-item ap-symbol{padding-right:0}\n"] }]
|
|
2162
|
+
], template: "@if (navSelectorLeafPresenter.expandedAfterDelay()) {\n <div\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [attr.aria-selected]=\"leaf().selected\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [class.multiple-mode]=\"navSelectorLeafPresenter.isMultipleModeEnabled()\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [class.actions-displayable]=\"leaf().actionsDisplayable && leaf().detailsDisplayable\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (focusin)=\"focused.set(true)\"\n (focusout)=\"focused.set(false)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [aria-label]=\"leaf().alias\"\n [disabled]=\"!leaf().selectable\"\n (change)=\"onCheckboxToggle()\" />\n }\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <span\n #alias\n class=\"caption\">\n {{ leaf().alias }}\n </span>\n\n <a\n class=\"standalone only-button\"\n role=\"button\"\n [attr.aria-label]=\"'Select only ' + leaf().alias\"\n [attr.tabindex]=\"leaf().accessibility.tabIndex\"\n (keydown.space)=\"selectOnly($event)\"\n (keydown.enter)=\"selectOnly($event)\"\n (click)=\"selectOnly($event)\">\n {{ navSelectorLeafPresenter.texts().only }}\n </a>\n\n @let actionProjection = navSelectorLeafPresenter.leafActionProjection();\n @if (actionProjection?.length) {\n <ap-symbol\n class=\"actions-menu\"\n size=\"sm\"\n symbolId=\"more\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Action menu ' + leaf().alias\"\n [apNavSelectorPopoverTrigger]=\"popover\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: true, keyboard: ['Space', 'Enter'] }\" />\n\n <ap-nav-selector-popover\n #popover\n placement=\"bottom_start\">\n @for (action of actionProjection; track action) {\n <ng-template #item>\n <ng-container\n [ngTemplateOutlet]=\"action\"\n [ngTemplateOutletContext]=\"{\n uid: leaf().uid\n }\" />\n </ng-template>\n }\n </ap-nav-selector-popover>\n }\n\n @if (leaf().foldable) {\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n role=\"button\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Toggle ' + leaf().alias\"\n [symbolId]=\"foldSymbol()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"toggleFolding($event)\"\n (keydown.enter)=\"toggleFolding($event)\" />\n }\n @if (leaf().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <ap-nav-selector-leaf-details\n [details]=\"leaf().details\"\n [leaf]=\"leaf()\" />\n }\n </div>\n} @else {\n <div\n #minified\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [apNavSelectorPopoverTrigger]=\"minifiedPopover\"\n [apNavSelectorPopoverDisabled]=\"!leaf().detailsDisplayable\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: false, hover: true }\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected || detailSelected()\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [disabled]=\"!leaf().selectable\" />\n }\n\n <div class=\"avatar-container\">\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <div class=\"status\">\n @if (leaf().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n </div>\n\n <ap-nav-selector-popover\n #minifiedPopover\n [popoverTitle]=\"leaf().alias\"\n [offset]=\"{ mainAxis: 0, crossAxis: -36.5 }\"\n placement=\"right\">\n @for (detail of leaf().details; track detail.uid) {\n <ap-nav-selector-popover-item item [selected]=\"detail.selected\">\n <ap-nav-selector-leaf-detail\n [embedded]=\"true\"\n [detail]=\"detail\" />\n </ap-nav-selector-popover-item>\n }\n </ap-nav-selector-popover>\n </div>\n}\n", styles: [":host{display:flex;flex-shrink:0;align-self:stretch;flex-direction:column}:host .details-container{align-self:stretch}:host .nav-selector-leaf{position:relative;display:flex;padding:0 var(--ref-spacing-xxs);height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch}:host .nav-selector-leaf ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=feature-lock]{color:var(--ref-color-purple-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button,:host .actions-menu{display:none;width:24px;height:24px;justify-content:center;align-items:center;flex-shrink:0}:host .folding-button:hover,:host .actions-menu:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .folding-button:active,:host .folding-button.nav-selector-popover-trigger--active,:host .actions-menu:active,:host .actions-menu.nav-selector-popover-trigger--active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-40)}:host .folding-button:focus-visible,:host .actions-menu:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error){cursor:pointer}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).selected:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).selected:not(.multiple-mode) .caption{color:var(--ref-color-electric-blue-150)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).selected.multiple-mode .caption{color:var(--ref-color-grey-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).selected .caption{overflow:hidden;text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:hover ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:focus-within ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:focus-visible ap-counter{display:none}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:hover .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:focus-within .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error).multiple-mode:focus-visible .only-button{display:flex}:host .nav-selector-leaf.feature-locked:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);outline:none}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):hover{background:var(--ref-color-purple-10)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):active{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):focus-visible{background:var(--ref-color-purple-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-purple-100)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected .caption{overflow:hidden;color:var(--ref-color-purple-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover ap-counter{display:none}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .folding-button{display:flex}:host .nav-selector-leaf.feature-locked.multiple-mode ap-avatar,:host .nav-selector-leaf.feature-locked.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.feature-locked.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.token-error.multiple-mode ap-avatar,:host .nav-selector-leaf.token-error.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.token-error.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled.multiple-mode ap-avatar,:host .nav-selector-leaf.disabled.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.disabled.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled ap-avatar,:host .nav-selector-leaf.disabled .caption{opacity:.5}:host .nav-selector-leaf.disabled .caption{color:var(--ref-color-grey-40)}:host .status{position:absolute;right:-4px;top:-6px}:host .avatar-container{position:relative}:host.minified .counter-override{background-color:var(--ref-color-orange-150)}:host.minified .nav-selector-leaf{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs);justify-content:center}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .only-button{display:none;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}::ng-deep .nav-selector-leaf-menu{position:absolute;left:55px;top:-20%;width:225px}::ng-deep .nav-selector-leaf-menu .not-displayable{display:none}::ng-deep .nav-selector-leaf-menu .caption-bold{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}\n"] }]
|
|
1830
2163
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorLeafPresenter }] });
|
|
1831
2164
|
|
|
1832
2165
|
class NavSelectorGroupPresenter {
|
|
@@ -1887,7 +2220,7 @@ class NavSelectorGroupComponent {
|
|
|
1887
2220
|
this.el = el;
|
|
1888
2221
|
this.navSelectorGroupPresenter = navSelectorGroupPresenter;
|
|
1889
2222
|
afterNextRender(() => {
|
|
1890
|
-
this.maxHeight.set(`${this.el.nativeElement.
|
|
2223
|
+
this.maxHeight.set(`${this.el.nativeElement.clientHeight * this.group().children.length}px`);
|
|
1891
2224
|
const el = this.aliasEl()?.nativeElement;
|
|
1892
2225
|
if (el) {
|
|
1893
2226
|
this.aliasBoundedClientRect.set({
|
|
@@ -1899,19 +2232,22 @@ class NavSelectorGroupComponent {
|
|
|
1899
2232
|
}
|
|
1900
2233
|
});
|
|
1901
2234
|
effect(() => {
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
2235
|
+
const folded = this.group().folded;
|
|
2236
|
+
untracked(() => {
|
|
2237
|
+
if (folded) {
|
|
2238
|
+
setTimeout(() => this.foldedWithDelay.set(true), 150);
|
|
2239
|
+
}
|
|
2240
|
+
else {
|
|
2241
|
+
this.foldedWithDelay.set(false);
|
|
2242
|
+
}
|
|
2243
|
+
});
|
|
2244
|
+
});
|
|
1909
2245
|
}
|
|
1910
2246
|
maxHeight = signal('0px');
|
|
1911
|
-
onKeydownSpaceOrEnter(
|
|
2247
|
+
onKeydownSpaceOrEnter(event) {
|
|
1912
2248
|
// Prevent to toggle folding when focus is on the checkbox
|
|
1913
2249
|
if (document.activeElement === this.el.nativeElement.querySelector('.content')) {
|
|
1914
|
-
this.toggleFolding(
|
|
2250
|
+
this.toggleFolding(event);
|
|
1915
2251
|
}
|
|
1916
2252
|
else {
|
|
1917
2253
|
this.navSelectorGroupPresenter.onGroupSelected(this.group());
|
|
@@ -1930,7 +2266,7 @@ class NavSelectorGroupComponent {
|
|
|
1930
2266
|
this.navSelectorGroupPresenter.unfold(this.group());
|
|
1931
2267
|
}
|
|
1932
2268
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorGroupComponent, deps: [{ token: i0.ElementRef }, { token: NavSelectorGroupPresenter }], target: i0.ɵɵFactoryTarget.Component });
|
|
1933
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorGroupComponent, isStandalone: true, selector: "ap-nav-selector-group", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "keydown.arrowLeft": "fold($event)", "keydown.arrowRight": "unfold($event)" }, properties: { "class.minified": "!navSelectorGroupPresenter.expanded()" } }, providers: [withSymbols(apFolder, apErrorFill, apChevronDown, apChevronUp), NavSelectorGroupPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (navSelectorGroupPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (change)=\"navSelectorGroupPresenter.onGroupSelected(group())\" />\n }\n\n <ap-symbol\n symbolId=\"folder\"\n size=\"sm\" />\n\n <span\n #alias\n class=\"caption\">\n {{ group().alias }}\n </span>\n\n @if (group().displayTokenInvalid) {\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n }\n\n @if (group().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ group().counter }}\n </ap-counter>\n }\n\n <ap-symbol\n size=\"sm\"\n class=\"folding-button\"\n [tabindex]=\"group().accessibility.tabIndex\"\n [attr.aria-label]=\"'Toggle ' + group().alias\"\n [symbolId]=\"foldSymbol()\"\n (keydown.space)=\"toggleFolding($event)\"\n (keydown.enter)=\"toggleFolding($event)\"\n (click)=\"toggleFolding($event)\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (change)=\"navSelectorGroupPresenter.onGroupSelected(group())\" />\n }\n\n <div class=\"picture-url-sample-container\">\n <div class=\"picture-url-sample\">\n @for (pictureUrlSample of group().childrenPictureUrlSample; track pictureUrlSample) {\n <ap-avatar\n [size]=\"$any(12)\"\n [profilePicture]=\"pictureUrlSample.url ?? undefined\"\n [showInitials]=\"pictureUrlSample.initial\" />\n }\n\n <div class=\"status\">\n @if (group().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ group().counter }}\n </ap-counter>\n }\n </div>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .content:focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host:not(.minified) ap-symbol[symbol-id=chevron-down],:host:not(.minified) ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host:not(.minified) ap-symbol[symbol-id=chevron-down]:hover,:host:not(.minified) ap-symbol[symbol-id=chevron-up]:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host:not(.minified) ap-symbol[symbol-id=chevron-down]:active,:host:not(.minified) ap-symbol[symbol-id=chevron-up]:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-40)}:host:not(.minified) ap-symbol[symbol-id=chevron-down]:focus,:host:not(.minified) ap-symbol[symbol-id=chevron-up]:focus{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=folder]{color:var(--ref-color-grey-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:24px;height:24px;justify-content:center;align-items:center;flex-shrink:0}:host .folding-button:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .folding-button:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-40)}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .picture-url-sample-container{position:relative;width:26px}:host .picture-url-sample{display:flex;width:26px;align-items:center;align-content:center;gap:2px;flex-wrap:wrap}:host.minified .content{gap:var(--ref-spacing-xxxs);position:relative;justify-content:center}:host.minified .content .toggle{position:absolute;display:none}:host.minified .content:hover .toggle,:host.minified .content:focus .toggle{inset:0;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .picture-url-sample,:host.minified .content:focus .picture-url-sample{display:none}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host.minified .status{position:absolute;right:-4px;top:-6px}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: CounterComponent, selector: "ap-counter", inputs: ["color", "size", "background", "notif"] }, { kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "bigNetwork", "anonymous", "online", "youtubeAvatarMode", "rounded"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }], animations: [
|
|
2269
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorGroupComponent, isStandalone: true, selector: "ap-nav-selector-group", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "keydown.arrowLeft": "fold($event)", "keydown.arrowRight": "unfold($event)" }, properties: { "class.minified": "!navSelectorGroupPresenter.expanded()" } }, providers: [withSymbols(apFolder, apErrorFill, apChevronDown, apChevronUp), NavSelectorGroupPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (navSelectorGroupPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\"\n (click)=\"toggleFolding($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (change)=\"navSelectorGroupPresenter.onGroupSelected(group())\" />\n }\n\n <ap-symbol\n symbolId=\"folder\"\n size=\"sm\" />\n\n <span\n #alias\n class=\"caption\">\n {{ group().alias }}\n </span>\n\n @if (group().displayTokenInvalid) {\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n }\n\n @if (group().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ group().counter }}\n </ap-counter>\n }\n\n <ap-symbol\n size=\"sm\"\n class=\"folding-button\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [class.token-invalid]=\"group().displayTokenInvalid\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (change)=\"navSelectorGroupPresenter.onGroupSelected(group())\" />\n }\n\n <div class=\"picture-url-sample-container\">\n <div class=\"picture-url-sample\">\n @for (pictureUrlSample of group().childrenPictureUrlSample; track pictureUrlSample) {\n <ap-avatar\n class=\"avatar-sample\"\n [size]=\"16\"\n [profilePicture]=\"pictureUrlSample.url ?? undefined\"\n [showInitials]=\"pictureUrlSample.initial\" />\n }\n\n <div class=\"status\">\n @if (group().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ group().counter }}\n </ap-counter>\n }\n </div>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=folder]{color:var(--ref-color-grey-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .picture-url-sample-container{position:relative;width:26px}:host .picture-url-sample{display:flex;width:26px;align-items:center;align-content:center;gap:2px;flex-wrap:wrap}:host .avatar-sample{width:12px;height:12px;min-width:12px;max-width:12px;min-height:12px;max-height:12px}:host.minified .content{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs);position:relative;justify-content:center}:host.minified .content .toggle{display:none}:host.minified .content .counter-override{background-color:var(--ref-color-orange-150)}:host.minified .content:hover .toggle,:host.minified .content:focus-visible .toggle{width:26px;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .picture-url-sample,:host.minified .content:focus-visible .picture-url-sample{display:none}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host.minified .status{position:absolute;right:-12px;top:-2px}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: CounterComponent, selector: "ap-counter", inputs: ["color", "size", "background", "notif"] }, { kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "bigNetwork", "anonymous", "online", "youtubeAvatarMode", "rounded"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }], animations: [
|
|
1934
2270
|
/**
|
|
1935
2271
|
* Overflow hidden is put only during the animation and on the collapsed state because if it is put on the expanded state then children’s border will be cut (hover / focus)
|
|
1936
2272
|
*/
|
|
@@ -1984,7 +2320,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
1984
2320
|
animate('250ms cubic-bezier(.4, 0, .3, 1)', keyframes([style({ maxHeight: '{{maxHeight}}', overflow: 'hidden' }), style({ maxHeight: 0, overflow: 'hidden' })])),
|
|
1985
2321
|
]),
|
|
1986
2322
|
]),
|
|
1987
|
-
], template: "@if (navSelectorGroupPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (change)=\"navSelectorGroupPresenter.onGroupSelected(group())\" />\n }\n\n <ap-symbol\n symbolId=\"folder\"\n size=\"sm\" />\n\n <span\n #alias\n class=\"caption\">\n {{ group().alias }}\n </span>\n\n @if (group().displayTokenInvalid) {\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n }\n\n @if (group().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ group().counter }}\n </ap-counter>\n }\n\n <ap-symbol\n size=\"sm\"\n class=\"folding-button\"\n [
|
|
2323
|
+
], template: "@if (navSelectorGroupPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\"\n (click)=\"toggleFolding($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (change)=\"navSelectorGroupPresenter.onGroupSelected(group())\" />\n }\n\n <ap-symbol\n symbolId=\"folder\"\n size=\"sm\" />\n\n <span\n #alias\n class=\"caption\">\n {{ group().alias }}\n </span>\n\n @if (group().displayTokenInvalid) {\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n }\n\n @if (group().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ group().counter }}\n </ap-counter>\n }\n\n <ap-symbol\n size=\"sm\"\n class=\"folding-button\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [class.token-invalid]=\"group().displayTokenInvalid\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (change)=\"navSelectorGroupPresenter.onGroupSelected(group())\" />\n }\n\n <div class=\"picture-url-sample-container\">\n <div class=\"picture-url-sample\">\n @for (pictureUrlSample of group().childrenPictureUrlSample; track pictureUrlSample) {\n <ap-avatar\n class=\"avatar-sample\"\n [size]=\"16\"\n [profilePicture]=\"pictureUrlSample.url ?? undefined\"\n [showInitials]=\"pictureUrlSample.initial\" />\n }\n\n <div class=\"status\">\n @if (group().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ group().counter }}\n </ap-counter>\n }\n </div>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=folder]{color:var(--ref-color-grey-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .picture-url-sample-container{position:relative;width:26px}:host .picture-url-sample{display:flex;width:26px;align-items:center;align-content:center;gap:2px;flex-wrap:wrap}:host .avatar-sample{width:12px;height:12px;min-width:12px;max-width:12px;min-height:12px;max-height:12px}:host.minified .content{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs);position:relative;justify-content:center}:host.minified .content .toggle{display:none}:host.minified .content .counter-override{background-color:var(--ref-color-orange-150)}:host.minified .content:hover .toggle,:host.minified .content:focus-visible .toggle{width:26px;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .picture-url-sample,:host.minified .content:focus-visible .picture-url-sample{display:none}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host.minified .status{position:absolute;right:-12px;top:-2px}\n"] }]
|
|
1988
2324
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorGroupPresenter }] });
|
|
1989
2325
|
|
|
1990
2326
|
class NavSelectorCategoryPresenter {
|
|
@@ -2023,19 +2359,22 @@ class NavSelectorCategoryComponent {
|
|
|
2023
2359
|
constructor(el, navSelectorCategoryPresenter) {
|
|
2024
2360
|
this.el = el;
|
|
2025
2361
|
this.navSelectorCategoryPresenter = navSelectorCategoryPresenter;
|
|
2026
|
-
afterNextRender(() => this.maxHeight.set(`${this.el.nativeElement.
|
|
2362
|
+
afterNextRender(() => this.maxHeight.set(`${this.el.nativeElement.clientHeight * this.category().children.length}px`));
|
|
2027
2363
|
effect(() => {
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2364
|
+
const folded = this.category().folded;
|
|
2365
|
+
untracked(() => {
|
|
2366
|
+
if (folded) {
|
|
2367
|
+
setTimeout(() => this.foldedWithDelay.set(true), 150);
|
|
2368
|
+
}
|
|
2369
|
+
else {
|
|
2370
|
+
this.foldedWithDelay.set(false);
|
|
2371
|
+
}
|
|
2372
|
+
});
|
|
2373
|
+
});
|
|
2035
2374
|
}
|
|
2036
2375
|
maxHeight = signal('0px');
|
|
2037
2376
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorCategoryComponent, deps: [{ token: i0.ElementRef }, { token: NavSelectorCategoryPresenter }], target: i0.ɵɵFactoryTarget.Component });
|
|
2038
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorCategoryComponent, isStandalone: true, selector: "ap-nav-selector-category", inputs: { category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "keydown.arrowLeft": "navSelectorCategoryPresenter.fold($event, this.category())", "keydown.arrowRight": "navSelectorCategoryPresenter.unfold($event, this.category())" }, properties: { "class.minified": "!navSelectorCategoryPresenter.expanded()" } }, providers: [withSymbols(apChevronDown, apChevronUp), NavSelectorCategoryPresenter], ngImport: i0, template: "@if (navSelectorCategoryPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space
|
|
2377
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorCategoryComponent, isStandalone: true, selector: "ap-nav-selector-category", inputs: { category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "keydown.arrowLeft": "navSelectorCategoryPresenter.fold($event, this.category())", "keydown.arrowRight": "navSelectorCategoryPresenter.unfold($event, this.category())" }, properties: { "class.minified": "!navSelectorCategoryPresenter.expanded()" } }, providers: [withSymbols(apChevronDown, apChevronUp), NavSelectorCategoryPresenter], ngImport: i0, template: "@if (navSelectorCategoryPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <span class=\"caption\">{{ category().alias }}</span>\n\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"child\" />\n }\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n [apTreeNodeAccessibility]=\"category()\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <div class=\"name-container\">\n <span class=\"caption\">{{ category().alias }}</span>\n <span>.</span>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"child\" />\n }\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .content:focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--sys-text-style-h4-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host.minified .name-container{overflow:hidden;display:flex}:host.minified .content{position:relative}:host.minified .content .toggle{position:absolute;display:none}:host.minified .content:hover .toggle,:host.minified .content:focus .toggle{inset:0;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .name-container,:host.minified .content:focus .name-container{display:none}\n"], dependencies: [{ kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: NavSelectorGroupComponent, selector: "ap-nav-selector-group", inputs: ["group"] }, { kind: "ngmodule", type: EventPluginsModule }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }], animations: [
|
|
2039
2378
|
/**
|
|
2040
2379
|
* Overflow hidden is put only during the animation and on the collapsed state because if it is put on the expanded state then children’s border will be cut (hover / focus)
|
|
2041
2380
|
*/
|
|
@@ -2081,7 +2420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
2081
2420
|
animate('250ms cubic-bezier(.4, 0, .3, 1)', keyframes([style({ maxHeight: '{{maxHeight}}' }), style({ overflow: 'hidden', maxHeight: 0 })])),
|
|
2082
2421
|
]),
|
|
2083
2422
|
]),
|
|
2084
|
-
], template: "@if (navSelectorCategoryPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space
|
|
2423
|
+
], template: "@if (navSelectorCategoryPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <span class=\"caption\">{{ category().alias }}</span>\n\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"child\" />\n }\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n [apTreeNodeAccessibility]=\"category()\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <div class=\"name-container\">\n <span class=\"caption\">{{ category().alias }}</span>\n <span>.</span>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"child\" />\n }\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .content:focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--sys-text-style-h4-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host.minified .name-container{overflow:hidden;display:flex}:host.minified .content{position:relative}:host.minified .content .toggle{position:absolute;display:none}:host.minified .content:hover .toggle,:host.minified .content:focus .toggle{inset:0;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .name-container,:host.minified .content:focus .name-container{display:none}\n"] }]
|
|
2085
2424
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorCategoryPresenter }] });
|
|
2086
2425
|
|
|
2087
2426
|
let nextUniqueId = 0;
|
|
@@ -2092,6 +2431,7 @@ class NavSelectorComponent {
|
|
|
2092
2431
|
translatedTexts = input.required();
|
|
2093
2432
|
multipleModeEnabled = input(false);
|
|
2094
2433
|
detailsDisplayedLimit = input(Number.MAX_SAFE_INTEGER);
|
|
2434
|
+
embedded = input(false);
|
|
2095
2435
|
/**
|
|
2096
2436
|
* If true, the nav selector will be expanded by default. Even if the width of the screen is smaller than 1280px.
|
|
2097
2437
|
*/
|
|
@@ -2107,58 +2447,77 @@ class NavSelectorComponent {
|
|
|
2107
2447
|
this.navSelectorState = navSelectorState;
|
|
2108
2448
|
this.el = el;
|
|
2109
2449
|
navSelectorState.registerOnSelectedUidsChange(selectedUids => {
|
|
2110
|
-
this.
|
|
2450
|
+
const isInit = !!this.navSelectorState.entries().length;
|
|
2451
|
+
if (isInit) {
|
|
2452
|
+
this.selectedEntryUids.set(selectedUids);
|
|
2453
|
+
}
|
|
2111
2454
|
});
|
|
2112
2455
|
afterNextRender(() => {
|
|
2113
|
-
if (!this.forceExpanded() && document.body.clientWidth < 1200) {
|
|
2456
|
+
if (!this.embedded() && !this.forceExpanded() && document.body.clientWidth < 1200) {
|
|
2114
2457
|
this.navSelectorState.toggleExpanded();
|
|
2115
2458
|
}
|
|
2116
2459
|
});
|
|
2117
2460
|
effect(() => {
|
|
2118
2461
|
const multipleModeEnabled = this.multipleModeEnabled();
|
|
2462
|
+
const newEntries = this.navSelectorEntries();
|
|
2119
2463
|
untracked(() => {
|
|
2120
2464
|
this.navSelectorState.updateMultiModeEnabled(multipleModeEnabled);
|
|
2121
|
-
if (!this.navSelectorState.
|
|
2122
|
-
this.navSelectorState.
|
|
2465
|
+
if (!this.navSelectorState.entries().length) {
|
|
2466
|
+
this.navSelectorState.initEntries(newEntries, this.selectedEntryUids(), this.detailsDisplayedLimit());
|
|
2467
|
+
}
|
|
2468
|
+
else {
|
|
2469
|
+
this.navSelectorState.updateEntries(newEntries, this.selectedEntryUids(), this.detailsDisplayedLimit());
|
|
2123
2470
|
}
|
|
2124
2471
|
});
|
|
2125
|
-
}
|
|
2472
|
+
});
|
|
2126
2473
|
effect(() => {
|
|
2127
2474
|
const detailsDisplayedLimit = this.detailsDisplayedLimit();
|
|
2128
2475
|
untracked(() => this.navSelectorState.updateDetailsDisplayedLimit(detailsDisplayedLimit));
|
|
2129
|
-
}
|
|
2476
|
+
});
|
|
2130
2477
|
const leafActionProjectionEffect = effect(() => {
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2478
|
+
const leafActionProjection = this.leafActionProjection();
|
|
2479
|
+
untracked(() => {
|
|
2480
|
+
if (leafActionProjection) {
|
|
2481
|
+
this.navSelectorState.updateLeafAction(this.leafActionProjection());
|
|
2482
|
+
leafActionProjectionEffect.destroy();
|
|
2483
|
+
}
|
|
2484
|
+
});
|
|
2485
|
+
}, { manualCleanup: true });
|
|
2136
2486
|
effect(() => {
|
|
2137
2487
|
const selectedEntryUids = this.selectedEntryUids();
|
|
2138
|
-
|
|
2139
|
-
|
|
2488
|
+
const isInit = !!this.navSelectorState.entries().length;
|
|
2489
|
+
untracked(() => isInit && this.navSelectorState.onSelectionChange(selectedEntryUids));
|
|
2490
|
+
});
|
|
2140
2491
|
effect(() => {
|
|
2141
2492
|
const translatedTexts = this.translatedTexts();
|
|
2142
2493
|
untracked(() => this.navSelectorState.updateTexts(translatedTexts));
|
|
2143
|
-
}
|
|
2494
|
+
});
|
|
2495
|
+
}
|
|
2496
|
+
onMinifiedSearchClicked() {
|
|
2497
|
+
this.navSelectorState.toggleExpanded();
|
|
2498
|
+
setTimeout(() => this.el.nativeElement.querySelector('input').focus());
|
|
2144
2499
|
}
|
|
2145
|
-
onArrowDown(
|
|
2500
|
+
onArrowDown(event) {
|
|
2146
2501
|
if (this.el.nativeElement.querySelector('.nav-selector__content').contains(document.activeElement)) {
|
|
2147
|
-
|
|
2502
|
+
event.stopImmediatePropagation();
|
|
2148
2503
|
this.navSelectorState.onArrowDown();
|
|
2149
2504
|
setTimeout(() => this.el.nativeElement.querySelector('[role="treeitem"][tabindex="0"]').focus());
|
|
2150
2505
|
}
|
|
2151
2506
|
}
|
|
2152
|
-
onArrowUp(
|
|
2507
|
+
onArrowUp(event) {
|
|
2153
2508
|
if (this.el.nativeElement.querySelector('.nav-selector__content').contains(document.activeElement)) {
|
|
2154
|
-
|
|
2509
|
+
event.stopImmediatePropagation();
|
|
2155
2510
|
this.navSelectorState.onArrowUp();
|
|
2156
2511
|
setTimeout(() => this.el.nativeElement.querySelector('[role="treeitem"][tabindex="0"]').focus());
|
|
2157
2512
|
}
|
|
2158
2513
|
}
|
|
2159
|
-
|
|
2514
|
+
onWindowResize() {
|
|
2515
|
+
if (window.innerWidth < 1280) {
|
|
2516
|
+
this.navSelectorState.minify();
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2160
2519
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorComponent, deps: [{ token: NavSelectorState }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2161
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorComponent, isStandalone: true, selector: "ap-nav-selector", inputs: { navSelectorEntries: { classPropertyName: "navSelectorEntries", publicName: "navSelectorEntries", isSignal: true, isRequired: true, transformFunction: null }, translatedTexts: { classPropertyName: "translatedTexts", publicName: "translatedTexts", isSignal: true, isRequired: true, transformFunction: null }, multipleModeEnabled: { classPropertyName: "multipleModeEnabled", publicName: "multipleModeEnabled", isSignal: true, isRequired: false, transformFunction: null }, detailsDisplayedLimit: { classPropertyName: "detailsDisplayedLimit", publicName: "detailsDisplayedLimit", isSignal: true, isRequired: false, transformFunction: null }, forceExpanded: { classPropertyName: "forceExpanded", publicName: "forceExpanded", isSignal: true, isRequired: false, transformFunction: null }, selectedEntryUids: { classPropertyName: "selectedEntryUids", publicName: "selectedEntryUids", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedEntryUids: "selectedEntryUidsChange" }, host: { attributes: { "role": "tree" }, listeners: { "keydown.arrowDown": "onArrowDown($event)", "keydown.arrowUp": "onArrowUp($event)" }, properties: { "class.minified": "!navSelectorState.expanded()" } }, providers: [NavSelectorState, withSymbols(apArrowExpand, apArrowReduce, apSearch)], queries: [{ propertyName: "headerProjection", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerProjection", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "leafActionProjection", predicate: ["leafAction"], isSignal: true }], ngImport: i0, template: "<nav [@expand]=\"expansionState()\">\n @let headerProjectionNotNull = headerProjection();\n @let footerProjectionNotNull = footerProjection();\n\n @if (navSelectorState.expandedAfterDelay()) {\n <div class=\"nav-selector__header\">\n <span class=\"h3\">{{ translatedTexts().title }}</span>\n\n <button\n type=\"button\"\n class=\"expand-button expanded\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-reduce\" />\n </button>\n\n\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-input-search\n [id]=\"componentUid + '_search'\"\n class=\"nav-selector-search\"\n [placeholder]=\"translatedTexts().searchPlaceholder\"\n [ngModel]=\"navSelectorState.search()\"\n (ngModelChange)=\"navSelectorState.search.set($event ?? '')\" />\n </div>\n\n <div\n class=\"nav-selector__content\"\n role=\"tree\">\n @for (entry of navSelectorState.filteredEntries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"$any(entry)\" />\n }\n </div>\n }\n }\n @if (navSelectorState.noResults()) {\n <div class=\"no-result\">{{ translatedTexts().noResults }}</div>\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n } @else {\n <div class=\"nav-selector__header\">\n <button\n type=\"button\"\n class=\"expand-button\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-expand\" />\n </button>\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-icon-button (onClick)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol symbolId=\"search\" />\n </ap-icon-button>\n </div>\n\n <div class=\"nav-selector__content\">\n @for (entry of navSelectorState.filteredEntries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"entry\" />\n }\n </div>\n }\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n }\n</nav>\n", styles: [":host{display:flex;height:100%;flex-direction:column;align-items:flex-start;flex-shrink:0;width:224px;max-width:224px}@media only screen and (min-device-width: 1400px){:host{width:100%;max-width:250px}}:host :hover .expand-button.expanded{animation-name:translateExpandButton}:host nav{display:flex;height:100%;width:100%;flex-direction:column;align-items:flex-start;flex-shrink:0;overflow:hidden;border-right:1px solid var(--ref-color-grey-10);background:var(--ref-color-white)}:host .nav-selector__header{position:relative;display:flex;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;gap:8px;align-self:stretch;border-bottom:1px solid var(--ref-color-grey-10);background:var(--ref-color-white)}:host .nav-selector__header .h3{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--sys-text-h3-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-lg)}:host .nav-selector__header .expand-button-container{position:absolute;right:0;top:var(--ref-spacing-xs)}:host .nav-selector__header .expand-button{animation-duration:70ms;animation-timing-function:cubic-bezier(0,0,.2,1);animation-fill-mode:forwards;display:flex;width:24px;height:24px;justify-content:center;align-items:center;background:none;border:1px solid var(--ref-color-grey-20);border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm);cursor:pointer}@keyframes translateExpandButton{0%{transform:translate(100%)}to{transform:translate(0)}}:host .nav-selector__header .expand-button.expanded{position:absolute;right:0;top:12px;transform:translate(100%)}:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-reduce],:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-expand]{color:var(--ref-color-grey-80)}:host .nav-selector__header .expand-button:focus{border-radius:var(--ref-border-radius-sm) 0px 0px var(--ref-border-radius-sm);border-top:1px solid var(--ref-color-grey-20);border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-10);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector__header .expand-button:focus.expanded{animation-name:translateExpandButton}:host .nav-selector__header .expand-button:hover{background-color:var(--ref-color-grey-10)}:host .nav-selector__header .expand-button:active{background-color:var(--ref-color-grey-20)}:host .nav-selector__header .nav-selector-search{width:100%}:host .nav-selector__content{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;overflow:auto}:host .nav-selector__content .entry{padding:var(--ref-spacing-xxs);align-self:stretch;display:flex;flex-direction:column}:host .nav-selector__content .entry+.entry{border-top:1px solid var(--sys-border-color-default)}:host .nav-selector__content .no-result{display:flex;padding:var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;color:var(--ref-color-grey-80);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:italic;font-weight:400;line-height:var(--ref-font-line-height-sm)}:host .nav-selector__footer{display:flex;padding:var(--ref-spacing-xs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs);align-self:stretch;border-top:1px solid var(--sys-border-color-default);background:var(--ref-color-white)}:host.minified nav{width:64px}:host.minified nav .nav-selector__header{align-items:center}:host.minified nav .nav-selector__content .entry{padding:var(--ref-spacing-xxxs)}:host.minified nav .nav-selector__footer{padding:var(--ref-spacing-xs) var(--ref-spacing-xxxs) var(--ref-spacing-xs) var(--ref-spacing-xxxs)}\n"], dependencies: [{ kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"] }, { kind: "component", type: NavSelectorGroupComponent, selector: "ap-nav-selector-group", inputs: ["group"] }, { kind: "component", type: NavSelectorCategoryComponent, selector: "ap-nav-selector-category", inputs: ["category"] }, { kind: "component", type: InputSearchComponent, selector: "ap-input-search", inputs: ["id", "placeholder", "clearable"], outputs: ["focus", "blur", "keyup"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: IconButtonComponent, selector: "ap-icon-button", inputs: ["ariaLabel", "name", "color", "disabled", "menuTrigger", "locked", "loading", "type"], outputs: ["onClick", "onFocus", "onBlur", "menuOpened", "menuClosed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: EventPluginsModule }], animations: [
|
|
2520
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorComponent, isStandalone: true, selector: "ap-nav-selector", inputs: { navSelectorEntries: { classPropertyName: "navSelectorEntries", publicName: "navSelectorEntries", isSignal: true, isRequired: true, transformFunction: null }, translatedTexts: { classPropertyName: "translatedTexts", publicName: "translatedTexts", isSignal: true, isRequired: true, transformFunction: null }, multipleModeEnabled: { classPropertyName: "multipleModeEnabled", publicName: "multipleModeEnabled", isSignal: true, isRequired: false, transformFunction: null }, detailsDisplayedLimit: { classPropertyName: "detailsDisplayedLimit", publicName: "detailsDisplayedLimit", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null }, forceExpanded: { classPropertyName: "forceExpanded", publicName: "forceExpanded", isSignal: true, isRequired: false, transformFunction: null }, selectedEntryUids: { classPropertyName: "selectedEntryUids", publicName: "selectedEntryUids", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedEntryUids: "selectedEntryUidsChange" }, host: { attributes: { "role": "tree" }, listeners: { "keydown.arrowDown": "onArrowDown($event)", "keydown.arrowUp": "onArrowUp($event)", "window:resize": "onWindowResize()" }, properties: { "class.minified": "!navSelectorState.expanded()", "class.embedded": "embedded()" } }, providers: [NavSelectorState, withSymbols(apArrowExpand, apArrowReduce, apSearch)], queries: [{ propertyName: "headerProjection", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerProjection", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "leafActionProjection", predicate: ["leafAction"], isSignal: true }], ngImport: i0, template: "<nav [@expand]=\"expansionState()\" [class.embedded]=\"embedded()\">\n @let headerProjectionNotNull = headerProjection();\n @let footerProjectionNotNull = footerProjection();\n\n @if (navSelectorState.expandedAfterDelay()) {\n <div class=\"nav-selector__header\">\n @if (!embedded()) {\n <span class=\"h3\">{{ translatedTexts().title }}</span>\n\n <button\n type=\"button\"\n class=\"expand-button expanded\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-reduce\" />\n </button>\n }\n\n\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-input-search\n [id]=\"componentUid + '_search'\"\n class=\"nav-selector-search\"\n [placeholder]=\"translatedTexts().searchPlaceholder\"\n [ngModel]=\"navSelectorState.search()\"\n (ngModelChange)=\"navSelectorState.search.set($event ?? '')\" />\n </div>\n\n <div\n class=\"nav-selector__content\"\n [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\"\n role=\"tree\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"$any(entry)\" />\n }\n </div>\n }\n }\n @if (navSelectorState.noResults()) {\n <div class=\"no-result\">{{ translatedTexts().noResults }}</div>\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n } @else {\n <div class=\"nav-selector__header\">\n <button\n type=\"button\"\n class=\"expand-button\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-expand\" />\n </button>\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-icon-button (onClick)=\"onMinifiedSearchClicked()\" type=\"stroked\" role=\"search\">\n <ap-symbol symbolId=\"search\" />\n </ap-icon-button>\n </div>\n\n <div class=\"nav-selector__content\" role=\"tree\" [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"entry\" />\n }\n </div>\n }\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n }\n</nav>\n", styles: [":host{display:flex;height:100%;flex-direction:column;align-items:flex-start;flex-shrink:0;width:100%;max-width:224px;min-width:224px}@media only screen and (min-device-width: 1400px){:host:not(.embedded){max-width:250px;min-width:250px}}:host :hover .expand-button.expanded{animation-name:translateExpandButton}:host nav{display:flex;height:100%;width:100%;flex-direction:column;align-items:flex-start;flex-shrink:0;overflow:hidden;background:var(--ref-color-white)}:host nav:not(.embedded){border-right:1px solid var(--ref-color-grey-10)}:host .nav-selector__header{position:relative;display:flex;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;gap:8px;align-self:stretch;border-bottom:1px solid var(--ref-color-grey-10);background:var(--ref-color-white)}:host .nav-selector__header .h3{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--sys-text-h3-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-lg)}:host .nav-selector__header .expand-button-container{position:absolute;right:0;top:var(--ref-spacing-xs)}:host .nav-selector__header .expand-button{animation-duration:70ms;animation-timing-function:cubic-bezier(0,0,.2,1);animation-fill-mode:forwards;animation-name:translateHideButton;display:flex;width:24px;height:24px;justify-content:center;align-items:center;background:var(--ref-color-grey-bg);border-top:1px solid var(--ref-color-grey-20);border-right:none;border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm);cursor:pointer}@keyframes translateHideButton{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes translateExpandButton{0%{transform:translate(100%)}to{transform:translate(0)}}:host .nav-selector__header .expand-button.expanded{position:absolute;right:0;top:12px;transform:translate(100%)}:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-reduce],:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-expand]{color:var(--ref-color-grey-80)}:host .nav-selector__header .expand-button:focus{border-radius:var(--ref-border-radius-sm) 0px 0px var(--ref-border-radius-sm);border-top:1px solid var(--ref-color-grey-20);border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-10);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector__header .expand-button:focus.expanded{animation-name:translateExpandButton}:host .nav-selector__header .expand-button:hover{background-color:var(--ref-color-grey-10)}:host .nav-selector__header .expand-button:active{background-color:var(--ref-color-grey-20)}:host .nav-selector__header .nav-selector-search{width:100%}:host .nav-selector__content{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;overflow:auto}:host .nav-selector__content .entry{padding:var(--ref-spacing-xxs);align-self:stretch;display:flex;flex-direction:column}:host .nav-selector__content .entry+.entry{border-top:1px solid var(--sys-border-color-default)}:host .nav-selector__content .no-result{display:flex;padding:var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;color:var(--ref-color-grey-80);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:italic;font-weight:400;line-height:var(--ref-font-line-height-sm)}:host .nav-selector__footer{display:flex;padding:var(--ref-spacing-xs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs);align-self:stretch;border-top:1px solid var(--sys-border-color-default);background:var(--ref-color-white)}:host.minified nav{width:64px}:host.minified nav .nav-selector__header{align-items:center}:host.minified nav .nav-selector__header .expand-button{animation-name:none;border-radius:var(--ref-border-radius-sm);border:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-bg)}:host.minified nav .nav-selector__content .entry{padding:var(--ref-spacing-xxxs)}:host.minified nav .nav-selector__footer{padding:var(--ref-spacing-xs) var(--ref-spacing-xxxs) var(--ref-spacing-xs) var(--ref-spacing-xxxs)}\n"], dependencies: [{ kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"] }, { kind: "component", type: NavSelectorGroupComponent, selector: "ap-nav-selector-group", inputs: ["group"] }, { kind: "component", type: NavSelectorCategoryComponent, selector: "ap-nav-selector-category", inputs: ["category"] }, { kind: "component", type: InputSearchComponent, selector: "ap-input-search", inputs: ["id", "placeholder", "clearable"], outputs: ["focus", "blur", "keyup"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: IconButtonComponent, selector: "ap-icon-button", inputs: ["ariaLabel", "name", "color", "disabled", "menuTrigger", "locked", "loading", "type"], outputs: ["onClick", "onFocus", "onBlur", "menuOpened", "menuClosed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: EventPluginsModule }], animations: [
|
|
2162
2521
|
trigger('expand', [
|
|
2163
2522
|
state('expanded', style({ width: '100%' })),
|
|
2164
2523
|
state('minified', style({ width: '64px' })),
|
|
@@ -2183,9 +2542,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
2183
2542
|
EventPluginsModule,
|
|
2184
2543
|
], providers: [NavSelectorState, withSymbols(apArrowExpand, apArrowReduce, apSearch)], host: {
|
|
2185
2544
|
'[class.minified]': '!navSelectorState.expanded()',
|
|
2545
|
+
'[class.embedded]': 'embedded()',
|
|
2186
2546
|
role: 'tree',
|
|
2187
2547
|
'(keydown.arrowDown)': 'onArrowDown($event)',
|
|
2188
2548
|
'(keydown.arrowUp)': 'onArrowUp($event)',
|
|
2549
|
+
'(window:resize)': 'onWindowResize()',
|
|
2189
2550
|
}, animations: [
|
|
2190
2551
|
trigger('expand', [
|
|
2191
2552
|
state('expanded', style({ width: '100%' })),
|
|
@@ -2195,7 +2556,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
2195
2556
|
// Force animation to do not be with 100% instantly
|
|
2196
2557
|
keyframes([style({ width: '64px' }), style({ width: '50%' }), style({ width: '100%' })]))),
|
|
2197
2558
|
]),
|
|
2198
|
-
], template: "<nav [@expand]=\"expansionState()\">\n @let headerProjectionNotNull = headerProjection();\n @let footerProjectionNotNull = footerProjection();\n\n @if (navSelectorState.expandedAfterDelay()) {\n <div class=\"nav-selector__header\">\n <span class=\"h3\">{{ translatedTexts().title }}</span>\n\n
|
|
2559
|
+
], template: "<nav [@expand]=\"expansionState()\" [class.embedded]=\"embedded()\">\n @let headerProjectionNotNull = headerProjection();\n @let footerProjectionNotNull = footerProjection();\n\n @if (navSelectorState.expandedAfterDelay()) {\n <div class=\"nav-selector__header\">\n @if (!embedded()) {\n <span class=\"h3\">{{ translatedTexts().title }}</span>\n\n <button\n type=\"button\"\n class=\"expand-button expanded\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-reduce\" />\n </button>\n }\n\n\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-input-search\n [id]=\"componentUid + '_search'\"\n class=\"nav-selector-search\"\n [placeholder]=\"translatedTexts().searchPlaceholder\"\n [ngModel]=\"navSelectorState.search()\"\n (ngModelChange)=\"navSelectorState.search.set($event ?? '')\" />\n </div>\n\n <div\n class=\"nav-selector__content\"\n [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\"\n role=\"tree\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"$any(entry)\" />\n }\n </div>\n }\n }\n @if (navSelectorState.noResults()) {\n <div class=\"no-result\">{{ translatedTexts().noResults }}</div>\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n } @else {\n <div class=\"nav-selector__header\">\n <button\n type=\"button\"\n class=\"expand-button\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-expand\" />\n </button>\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-icon-button (onClick)=\"onMinifiedSearchClicked()\" type=\"stroked\" role=\"search\">\n <ap-symbol symbolId=\"search\" />\n </ap-icon-button>\n </div>\n\n <div class=\"nav-selector__content\" role=\"tree\" [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"entry\" />\n }\n </div>\n }\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n }\n</nav>\n", styles: [":host{display:flex;height:100%;flex-direction:column;align-items:flex-start;flex-shrink:0;width:100%;max-width:224px;min-width:224px}@media only screen and (min-device-width: 1400px){:host:not(.embedded){max-width:250px;min-width:250px}}:host :hover .expand-button.expanded{animation-name:translateExpandButton}:host nav{display:flex;height:100%;width:100%;flex-direction:column;align-items:flex-start;flex-shrink:0;overflow:hidden;background:var(--ref-color-white)}:host nav:not(.embedded){border-right:1px solid var(--ref-color-grey-10)}:host .nav-selector__header{position:relative;display:flex;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;gap:8px;align-self:stretch;border-bottom:1px solid var(--ref-color-grey-10);background:var(--ref-color-white)}:host .nav-selector__header .h3{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--sys-text-h3-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-lg)}:host .nav-selector__header .expand-button-container{position:absolute;right:0;top:var(--ref-spacing-xs)}:host .nav-selector__header .expand-button{animation-duration:70ms;animation-timing-function:cubic-bezier(0,0,.2,1);animation-fill-mode:forwards;animation-name:translateHideButton;display:flex;width:24px;height:24px;justify-content:center;align-items:center;background:var(--ref-color-grey-bg);border-top:1px solid var(--ref-color-grey-20);border-right:none;border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm);cursor:pointer}@keyframes translateHideButton{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes translateExpandButton{0%{transform:translate(100%)}to{transform:translate(0)}}:host .nav-selector__header .expand-button.expanded{position:absolute;right:0;top:12px;transform:translate(100%)}:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-reduce],:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-expand]{color:var(--ref-color-grey-80)}:host .nav-selector__header .expand-button:focus{border-radius:var(--ref-border-radius-sm) 0px 0px var(--ref-border-radius-sm);border-top:1px solid var(--ref-color-grey-20);border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-10);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector__header .expand-button:focus.expanded{animation-name:translateExpandButton}:host .nav-selector__header .expand-button:hover{background-color:var(--ref-color-grey-10)}:host .nav-selector__header .expand-button:active{background-color:var(--ref-color-grey-20)}:host .nav-selector__header .nav-selector-search{width:100%}:host .nav-selector__content{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;overflow:auto}:host .nav-selector__content .entry{padding:var(--ref-spacing-xxs);align-self:stretch;display:flex;flex-direction:column}:host .nav-selector__content .entry+.entry{border-top:1px solid var(--sys-border-color-default)}:host .nav-selector__content .no-result{display:flex;padding:var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;color:var(--ref-color-grey-80);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:italic;font-weight:400;line-height:var(--ref-font-line-height-sm)}:host .nav-selector__footer{display:flex;padding:var(--ref-spacing-xs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs);align-self:stretch;border-top:1px solid var(--sys-border-color-default);background:var(--ref-color-white)}:host.minified nav{width:64px}:host.minified nav .nav-selector__header{align-items:center}:host.minified nav .nav-selector__header .expand-button{animation-name:none;border-radius:var(--ref-border-radius-sm);border:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-bg)}:host.minified nav .nav-selector__content .entry{padding:var(--ref-spacing-xxxs)}:host.minified nav .nav-selector__footer{padding:var(--ref-spacing-xs) var(--ref-spacing-xxxs) var(--ref-spacing-xs) var(--ref-spacing-xxxs)}\n"] }]
|
|
2199
2560
|
}], ctorParameters: () => [{ type: NavSelectorState }, { type: i0.ElementRef }] });
|
|
2200
2561
|
|
|
2201
2562
|
/**
|