@agorapulse/ui-components 18.0.12-beta.1 → 18.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/agorapulse-ui-components-18.0.14.tgz +0 -0
  2. package/avatar/avatar.component.d.ts +1 -1
  3. package/checkbox/checkbox.component.d.ts +1 -1
  4. package/esm2022/add-comment/add-comment.component.mjs +3 -3
  5. package/esm2022/checkbox/checkbox.component.mjs +5 -4
  6. package/esm2022/datepicker/datepicker.component.mjs +3 -3
  7. package/esm2022/labels/label-list.component.mjs +3 -3
  8. package/esm2022/labels-selector/labels-selector.component.mjs +3 -3
  9. package/esm2022/media-display-overlay/media-display-overlay-dialog.component.mjs +3 -3
  10. package/esm2022/modal/modal.component.mjs +3 -3
  11. package/esm2022/nav-selector/directives/nav-selector-popover-trigger.directive.mjs +71 -0
  12. package/esm2022/nav-selector/nav-selector-category/nav-selector-category.component.mjs +15 -12
  13. package/esm2022/nav-selector/nav-selector-group/nav-selector-group.component.mjs +17 -14
  14. package/esm2022/nav-selector/nav-selector-leaf/nav-selector-leaf.component.mjs +38 -94
  15. package/esm2022/nav-selector/nav-selector-leaf/nav-selector-leaf.presenter.mjs +2 -2
  16. package/esm2022/nav-selector/nav-selector-leaf-detail/nav-selector-leaf-detail.component.mjs +6 -6
  17. package/esm2022/nav-selector/nav-selector-leaf-details/nav-selector-leaf-details.component.mjs +12 -9
  18. package/esm2022/nav-selector/nav-selector-popover/nav-selector-popover-item.component.mjs +14 -0
  19. package/esm2022/nav-selector/nav-selector-popover/nav-selector-popover.component.mjs +127 -0
  20. package/esm2022/nav-selector/nav-selector.component.mjs +56 -29
  21. package/esm2022/nav-selector/nav-selector.mjs +1 -1
  22. package/esm2022/nav-selector/nav-selector.state.mjs +42 -16
  23. package/esm2022/nav-selector/utils/leaf.utils.mjs +12 -3
  24. package/esm2022/nav-selector/utils/nav-selector.accessibility.mjs +22 -14
  25. package/esm2022/nav-selector/utils/nav-selector.builder.mjs +4 -2
  26. package/esm2022/nav-selector/utils/nav-selector.filter.mjs +49 -11
  27. package/esm2022/nav-selector/utils/nav-selector.folding.mjs +26 -23
  28. package/esm2022/nav-selector/utils/nav-selector.merger.mjs +76 -0
  29. package/esm2022/nav-selector/utils/nav-selector.minifying.mjs +14 -9
  30. package/esm2022/nav-selector/utils/nav-selector.multi-select.mjs +2 -2
  31. package/esm2022/nav-selector/utils/nav-selector.single-select.mjs +46 -23
  32. package/esm2022/neo-datepicker/neo-datepicker.component.mjs +3 -3
  33. package/esm2022/notification/notification.component.mjs +3 -3
  34. package/esm2022/paginator/paginator-button/paginator-button.component.mjs +2 -2
  35. package/esm2022/password-input/password-input.component.mjs +3 -3
  36. package/esm2022/popmenu/popmenu.component.mjs +3 -3
  37. package/esm2022/slide-toggle/slide-toggle.component.mjs +3 -3
  38. package/esm2022/snackbars-thread/component/snackbars-thread.component.mjs +3 -3
  39. package/esm2022/stepper/stepper.component.mjs +3 -3
  40. package/fesm2022/agorapulse-ui-components-add-comment.mjs +2 -2
  41. package/fesm2022/agorapulse-ui-components-add-comment.mjs.map +1 -1
  42. package/fesm2022/agorapulse-ui-components-checkbox.mjs +4 -3
  43. package/fesm2022/agorapulse-ui-components-checkbox.mjs.map +1 -1
  44. package/fesm2022/agorapulse-ui-components-datepicker.mjs +2 -2
  45. package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
  46. package/fesm2022/agorapulse-ui-components-labels-selector.mjs +2 -2
  47. package/fesm2022/agorapulse-ui-components-labels-selector.mjs.map +1 -1
  48. package/fesm2022/agorapulse-ui-components-labels.mjs +2 -2
  49. package/fesm2022/agorapulse-ui-components-labels.mjs.map +1 -1
  50. package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs +2 -2
  51. package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs.map +1 -1
  52. package/fesm2022/agorapulse-ui-components-modal.mjs +2 -2
  53. package/fesm2022/agorapulse-ui-components-modal.mjs.map +1 -1
  54. package/fesm2022/agorapulse-ui-components-nav-selector.mjs +616 -248
  55. package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
  56. package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs +2 -2
  57. package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs.map +1 -1
  58. package/fesm2022/agorapulse-ui-components-notification.mjs +2 -2
  59. package/fesm2022/agorapulse-ui-components-notification.mjs.map +1 -1
  60. package/fesm2022/agorapulse-ui-components-paginator.mjs +2 -2
  61. package/fesm2022/agorapulse-ui-components-paginator.mjs.map +1 -1
  62. package/fesm2022/agorapulse-ui-components-password-input.mjs +2 -2
  63. package/fesm2022/agorapulse-ui-components-password-input.mjs.map +1 -1
  64. package/fesm2022/agorapulse-ui-components-popmenu.mjs +2 -2
  65. package/fesm2022/agorapulse-ui-components-popmenu.mjs.map +1 -1
  66. package/fesm2022/agorapulse-ui-components-slide-toggle.mjs +2 -2
  67. package/fesm2022/agorapulse-ui-components-slide-toggle.mjs.map +1 -1
  68. package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs +2 -2
  69. package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs.map +1 -1
  70. package/fesm2022/agorapulse-ui-components-stepper.mjs +2 -2
  71. package/fesm2022/agorapulse-ui-components-stepper.mjs.map +1 -1
  72. package/nav-selector/directives/nav-selector-popover-trigger.directive.d.ts +25 -0
  73. package/nav-selector/nav-selector-group/nav-selector-group.component.d.ts +1 -1
  74. package/nav-selector/nav-selector-leaf/nav-selector-leaf.component.d.ts +5 -20
  75. package/nav-selector/nav-selector-leaf/nav-selector-leaf.presenter.d.ts +1 -1
  76. package/nav-selector/nav-selector-leaf-detail/nav-selector-leaf-detail.component.d.ts +1 -1
  77. package/nav-selector/nav-selector-popover/nav-selector-popover-item.component.d.ts +6 -0
  78. package/nav-selector/nav-selector-popover/nav-selector-popover.component.d.ts +39 -0
  79. package/nav-selector/nav-selector.component.d.ts +6 -4
  80. package/nav-selector/nav-selector.d.ts +6 -0
  81. package/nav-selector/nav-selector.state.d.ts +3 -2
  82. package/nav-selector/utils/leaf.utils.d.ts +15 -2
  83. package/nav-selector/utils/nav-selector.accessibility.d.ts +1 -1
  84. package/nav-selector/utils/nav-selector.filter.d.ts +3 -1
  85. package/nav-selector/utils/nav-selector.folding.d.ts +6 -3
  86. package/nav-selector/utils/nav-selector.merger.d.ts +23 -0
  87. package/nav-selector/utils/nav-selector.minifying.d.ts +4 -2
  88. package/nav-selector/utils/nav-selector.single-select.d.ts +2 -0
  89. package/package.json +7 -7
  90. package/agorapulse-ui-components-18.0.12-beta.1.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, signal, computed, effect, Injectable, ChangeDetectionStrategy, Component, viewChild, afterNextRender, model, contentChild, contentChildren, TemplateRef } from '@angular/core';
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
- return entries.reduce((acc, entry) => {
65
- if (!acc.length) {
66
- return [{ ...entry, accessibility: { ...entry.accessibility, tabIndex: entry.focusable ? 0 : -1 } }];
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 (acc.every(({ focusable }) => !focusable)) {
69
- return [...acc, { ...entry, accessibility: { ...entry.accessibility, tabIndex: entry.focusable ? 0 : -1 } }];
138
+ else if (entry.focusable) {
139
+ alreadyFocused = true;
140
+ entry.accessibility.tabIndex = 0;
70
141
  }
71
- return [...acc, entry];
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.previousEntryIsFirstAndNotFocusable(flattenEntries, idxFocusedId)) {
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 previousEntryIsFirstAndNotFocusable(flattenEntries, idxFocusedId) {
161
- if (idxFocusedId - 1 === 0) {
162
- const previous = flattenEntries[0];
163
- return !previous.focusable;
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 false;
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: true,
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
- const leafSelected = !leaf.detailsDisplayable && leaf.selectable;
464
- return {
465
- ...leaf,
466
- selected: leafSelected,
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 && !disabled,
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
- const isInternalNavSelectorEntryALeafFocusable = (leaf, { parentFolded, minified }) => {
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 (minified) {
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: isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded: false, minified: false }),
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, { minified, parentFolded }),
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, { minified, parentFolded }),
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, { minified, parentFolded }),
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, { parentFolded: parent?.folded === true, minified: minified }),
1149
- details: this.compute(entry.details, minified),
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
- filteredEntries = computed(() => NavSelectorFilter.filter(this.entries(), this.search()));
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);
@@ -1280,15 +1509,23 @@ class NavSelectorState {
1280
1509
  constructor() {
1281
1510
  effect(() => {
1282
1511
  const newSelectedUids = this.collectSelectedUids(this.entries());
1283
- if (this.selectedUidsChangeCallback) {
1284
- this.selectedUidsChangeCallback(newSelectedUids);
1285
- }
1286
- }, { allowSignalWrites: true });
1512
+ untracked(() => {
1513
+ if (this.selectedUidsChangeCallback) {
1514
+ this.selectedUidsChangeCallback(newSelectedUids);
1515
+ }
1516
+ });
1517
+ });
1518
+ effect(() => {
1519
+ const search = this.search();
1520
+ untracked(() => {
1521
+ this.entries.update(entries => NavSelectorFilter.filter(entries, search, this.multipleModeEnabled()));
1522
+ });
1523
+ });
1287
1524
  }
1288
1525
  updateMultiModeEnabled(enabled) {
1289
1526
  this.multipleModeEnabled.set(enabled);
1290
1527
  }
1291
- updateEntries(entries, initialSelectedEntryUids, detailsDisplayedLimit) {
1528
+ initEntries(entries, initialSelectedEntryUids, detailsDisplayedLimit) {
1292
1529
  if (this.multipleModeEnabled()) {
1293
1530
  this.entries.set(NavSelectorBuilder.buildInMultipleMode(entries, initialSelectedEntryUids, detailsDisplayedLimit));
1294
1531
  }
@@ -1296,8 +1533,21 @@ class NavSelectorState {
1296
1533
  this.entries.set(NavSelectorBuilder.build(entries, initialSelectedEntryUids?.[0] ?? null, detailsDisplayedLimit));
1297
1534
  }
1298
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
+ }
1299
1549
  onGroupToggleFolding(group) {
1300
- 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()));
1301
1551
  }
1302
1552
  onNodeSelect(node) {
1303
1553
  this.entries.update(entries => NavSelectorMultiSelect.selectInMultipleMode(entries, node.uid));
@@ -1314,7 +1564,7 @@ class NavSelectorState {
1314
1564
  }
1315
1565
  }
1316
1566
  onLeafToggleFolding(leaf) {
1317
- 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()));
1318
1568
  }
1319
1569
  onLeafDetailClicked(leafDetail) {
1320
1570
  this.entries.update(entries => NavSelectorSingleSelect.select(entries, leafDetail.uid));
@@ -1329,9 +1579,9 @@ class NavSelectorState {
1329
1579
  this.expanded.update(expanded => !expanded);
1330
1580
  this.entries.update(entries => {
1331
1581
  if (this.expanded()) {
1332
- return NavSelectorMinifying.expand(entries);
1582
+ return NavSelectorMinifying.expand(entries, this.multipleModeEnabled());
1333
1583
  }
1334
- return NavSelectorMinifying.minify(entries);
1584
+ return NavSelectorMinifying.minify(entries, this.multipleModeEnabled());
1335
1585
  });
1336
1586
  if (!this.expanded()) {
1337
1587
  setTimeout(() => this.expandedAfterDelay.set(this.expanded()), 150);
@@ -1340,6 +1590,11 @@ class NavSelectorState {
1340
1590
  this.expandedAfterDelay.set(this.expanded());
1341
1591
  }
1342
1592
  }
1593
+ minify() {
1594
+ if (this.expanded()) {
1595
+ this.toggleExpanded();
1596
+ }
1597
+ }
1343
1598
  onSelectionChange(uids) {
1344
1599
  // Avoid infinite loop if you put unexisting uids as select will generate the same entries but with different reference
1345
1600
  if (JSON.stringify(uids) === JSON.stringify(this.lastSelectedUids())) {
@@ -1375,7 +1630,7 @@ class NavSelectorState {
1375
1630
  collectSelectedUids(entries) {
1376
1631
  return entries.flatMap(entry => {
1377
1632
  if (isInternalNavSelectorEntryALeaf(entry)) {
1378
- if (entry.details.length) {
1633
+ if (entry.detailsDisplayable) {
1379
1634
  return entry.details.flatMap(detail => (detail.selected ? [detail.uid] : []));
1380
1635
  }
1381
1636
  return entry.selected ? [entry.uid] : [];
@@ -1390,10 +1645,10 @@ class NavSelectorState {
1390
1645
  this.leafActionProjection.set(leafActionProjection);
1391
1646
  }
1392
1647
  fold(entry) {
1393
- 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()));
1394
1649
  }
1395
1650
  unfold(entry) {
1396
- 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()));
1397
1652
  }
1398
1653
  updateDetailsDisplayedLimit(detailsDisplayedLimit) {
1399
1654
  this.entries.update(entries => NavSelectorViewMore.changeViewMoreDetailsDisplayedLimit(entries, detailsDisplayedLimit));
@@ -1433,18 +1688,18 @@ class NavSelectorLeafDetailComponent {
1433
1688
  constructor(navSelectorLeafDetailPresenter) {
1434
1689
  this.navSelectorLeafDetailPresenter = navSelectorLeafDetailPresenter;
1435
1690
  }
1436
- onClick($event) {
1437
- $event.stopImmediatePropagation();
1691
+ onClick(event) {
1692
+ event.stopImmediatePropagation();
1438
1693
  this.navSelectorLeafDetailPresenter.onLeafDetailClicked(this.detail());
1439
1694
  }
1440
1695
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafDetailComponent, deps: [{ token: NavSelectorLeafDetailPresenter }], target: i0.ɵɵFactoryTarget.Component });
1441
- 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 && !embedded()", "class.embedded": "embedded()" } }, providers: [withSymbols(apErrorFill), NavSelectorLeafDetailPresenter], hostDirectives: [{ directive: TreeNodeAccessibilityDirective, inputs: ["apTreeNodeAccessibility", "detail"] }], ngImport: i0, template: "<span class=\"caption\">\n {{ detail().alias }}\n</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: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{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:focus{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-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)}\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 });
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 });
1442
1697
  }
1443
1698
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafDetailComponent, decorators: [{
1444
1699
  type: Component,
1445
1700
  args: [{ selector: 'ap-nav-selector-leaf-detail', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CounterComponent, SymbolComponent], providers: [withSymbols(apErrorFill), NavSelectorLeafDetailPresenter], host: {
1446
1701
  '(click)': 'onClick($event)',
1447
- '[class.selected]': 'detail().selected && !embedded()',
1702
+ '[class.selected]': 'detail().selected',
1448
1703
  '[class.embedded]': 'embedded()',
1449
1704
  '(keydown.enter)': 'onClick($event)',
1450
1705
  '(keydown.space)': 'onClick($event)',
@@ -1454,7 +1709,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
1454
1709
  // Alias the input of the directive to detail the input detail will be used in the directive and in the component as well
1455
1710
  inputs: ['apTreeNodeAccessibility: detail'],
1456
1711
  },
1457
- ], template: "<span class=\"caption\">\n {{ detail().alias }}\n</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: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{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:focus{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-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)}\n"] }]
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"] }]
1458
1713
  }], ctorParameters: () => [{ type: NavSelectorLeafDetailPresenter }] });
1459
1714
 
1460
1715
  class NavSelectorLeafDetailsPresenter {
@@ -1502,13 +1757,16 @@ class NavSelectorLeafDetailsComponent {
1502
1757
  this.el = el;
1503
1758
  this.navSelectorLeafDetailsPresenter = navSelectorLeafDetailsPresenter;
1504
1759
  effect(() => {
1505
- if (this.leaf().viewMoreDisplayed) {
1506
- setTimeout(() => this.viewMoreDelay.set(false), 150);
1507
- }
1508
- else {
1509
- this.viewMoreDelay.set(true);
1510
- }
1511
- }, { allowSignalWrites: true });
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
+ });
1512
1770
  }
1513
1771
  ngAfterViewInit() {
1514
1772
  // scrollHeight = leaf + first details displayed when there is a limit
@@ -1571,6 +1829,141 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
1571
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"] }]
1572
1830
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorLeafDetailsPresenter }] });
1573
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
+
1574
1967
  class NavSelectorLeafPresenter {
1575
1968
  navSelectorState;
1576
1969
  expanded = computed(() => this.navSelectorState.expanded());
@@ -1581,7 +1974,7 @@ class NavSelectorLeafPresenter {
1581
1974
  constructor(navSelectorState) {
1582
1975
  this.navSelectorState = navSelectorState;
1583
1976
  }
1584
- onLeafClicked(leaf) {
1977
+ selectLeaf(leaf) {
1585
1978
  this.navSelectorState.onLeafClicked(leaf);
1586
1979
  }
1587
1980
  onLeafToggleFolding(leaf) {
@@ -1609,11 +2002,8 @@ class NavSelectorLeafComponent {
1609
2002
  leaf = input.required();
1610
2003
  initial = computed(() => this.leaf().alias[0].toUpperCase());
1611
2004
  foldSymbol = computed(() => (this.leaf().folded ? 'chevron-down' : 'chevron-up'));
1612
- hovering = signal(false);
1613
- hoveringMenu = signal(false);
1614
- onlyButtonDisplayed = computed(() => this.navSelectorLeafPresenter.isMultipleModeEnabled() &&
1615
- (this.hovering() || this.leaf().accessibility.tabIndex === 0) &&
1616
- this.leaf().selectable);
2005
+ focused = signal(false);
2006
+ detailSelected = computed(() => this.leaf().details.some(({ selected }) => selected));
1617
2007
  aliasEl = viewChild('alias');
1618
2008
  aliasBoundedClientRect = signal({
1619
2009
  offsetWidth: 0,
@@ -1631,26 +2021,24 @@ class NavSelectorLeafComponent {
1631
2021
  if (disableReason) {
1632
2022
  content.push(disableReason);
1633
2023
  }
1634
- if (this.leaf().displayFeatureLocked) {
1635
- content.push(this.navSelectorLeafPresenter.texts().featureLocked);
1636
- }
1637
- if (this.leaf().displayTokenInvalid) {
1638
- content.push(this.navSelectorLeafPresenter.texts().tokenInvalid);
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
+ }
1639
2031
  }
1640
2032
  return content.join('<br>');
1641
2033
  });
1642
2034
  tooltipDisabled = computed(() => !this.tooltipContent().length || this.leaf().detailsDisplayable);
1643
- minifiedEl = viewChild('minified');
1644
- menuEl = viewChild('menuContainer');
1645
- menuTriggerEl = viewChild('menuTrigger');
1646
- actionMenuTriggerEl = viewChild('actionMenuTrigger');
1647
2035
  foldedWithDelay = signal(false);
1648
2036
  network = computed(() => (this.leaf().network ? this.leaf().network : undefined));
1649
2037
  constructor(el, navSelectorLeafPresenter) {
1650
2038
  this.el = el;
1651
2039
  this.navSelectorLeafPresenter = navSelectorLeafPresenter;
1652
2040
  afterNextRender(() => {
1653
- this.maxHeight.set(`${this.el.nativeElement.scrollHeight}px`);
2041
+ this.maxHeight.set(`${this.el.nativeElement.clientHeight * this.leaf().details.length}px`);
1654
2042
  const el = this.aliasEl()?.nativeElement;
1655
2043
  if (el) {
1656
2044
  this.aliasBoundedClientRect.set({
@@ -1662,74 +2050,42 @@ class NavSelectorLeafComponent {
1662
2050
  }
1663
2051
  });
1664
2052
  effect(() => {
1665
- if (this.leaf().folded) {
1666
- setTimeout(() => this.foldedWithDelay.set(true), 150);
1667
- }
1668
- else {
1669
- this.foldedWithDelay.set(false);
1670
- }
1671
- }, { allowSignalWrites: true });
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
+ });
1672
2063
  }
1673
2064
  animationState = computed(() => (this.leaf().folded ? 'collapsed' : 'expanded'));
1674
2065
  maxHeight = signal('0px');
1675
- onClick($event) {
1676
- $event.stopImmediatePropagation();
1677
- this.navSelectorLeafPresenter.onLeafClicked(this.leaf());
2066
+ onClick(event) {
2067
+ event.stopImmediatePropagation();
2068
+ this.navSelectorLeafPresenter.selectLeaf(this.leaf());
1678
2069
  }
1679
2070
  toggleFolding(event) {
1680
2071
  event.stopImmediatePropagation();
1681
2072
  this.navSelectorLeafPresenter.onLeafToggleFolding(this.leaf());
1682
2073
  }
1683
- mouseEntered() {
1684
- this.hovering.set(true);
1685
- const menuTrigger = this.menuTriggerEl();
1686
- if (menuTrigger && this.leaf().detailsDisplayable) {
1687
- menuTrigger.openMenu();
1688
- }
1689
- }
1690
- mouseLeft($event) {
1691
- this.hovering.set(false);
1692
- const menuTrigger = this.menuTriggerEl();
1693
- if (menuTrigger) {
1694
- setTimeout(() => {
1695
- this.tryCloseMenu(menuTrigger, $event);
1696
- }, 100);
1697
- }
1698
- }
1699
- mouseEnteredMenu() {
1700
- this.hoveringMenu.set(true);
1701
- }
1702
- mouseLeftMenu(menuTrigger, $event) {
1703
- this.hoveringMenu.set(false);
1704
- this.tryCloseMenu(menuTrigger, $event);
1705
- }
1706
- menuOpened() {
1707
- if (!this.leaf().detailsDisplayable) {
1708
- this.menuTriggerEl()?.closeMenu();
1709
- }
1710
- }
1711
- onActionButtonClick($event) {
1712
- $event.stopImmediatePropagation();
1713
- }
1714
- onActionButtonKeyDownSpaceOrEnter($event) {
1715
- $event.stopImmediatePropagation();
1716
- this.actionMenuTriggerEl()?.openMenu();
1717
- }
1718
2074
  selectOnly(event) {
1719
2075
  event.stopImmediatePropagation();
1720
2076
  this.navSelectorLeafPresenter.selectOnlyLeaf(this.leaf());
1721
2077
  }
1722
2078
  onCheckboxToggle() {
1723
- this.navSelectorLeafPresenter.onLeafClicked(this.leaf());
2079
+ this.navSelectorLeafPresenter.selectLeaf(this.leaf());
1724
2080
  }
1725
- onSpaceOrEnterPressed($event) {
1726
- $event.stopImmediatePropagation();
2081
+ onSpaceOrEnterPressed(event) {
2082
+ event.stopImmediatePropagation();
1727
2083
  if (document.activeElement === this.el.nativeElement.querySelector('.nav-selector-leaf')) {
1728
2084
  if (this.leaf().foldable) {
1729
- this.toggleFolding($event);
2085
+ this.toggleFolding(event);
1730
2086
  }
1731
2087
  else {
1732
- this.navSelectorLeafPresenter.onLeafClicked(this.leaf());
2088
+ this.navSelectorLeafPresenter.selectLeaf(this.leaf());
1733
2089
  }
1734
2090
  }
1735
2091
  }
@@ -1741,27 +2097,8 @@ class NavSelectorLeafComponent {
1741
2097
  event.stopImmediatePropagation();
1742
2098
  this.navSelectorLeafPresenter.unfold(this.leaf());
1743
2099
  }
1744
- tryCloseMenu(menuTrigger, $event) {
1745
- if (!this.hoveringMenu()) {
1746
- const minifiedEl = this.minifiedEl();
1747
- const minifiedBoundedClientRect = minifiedEl.nativeElement.getBoundingClientRect();
1748
- const mouseHoveringLeaf = this.mouseIsHovering($event, minifiedBoundedClientRect);
1749
- const menuEl = this.menuEl();
1750
- const menuBoundedClientRect = menuEl.nativeElement.getBoundingClientRect();
1751
- const mouseHoveringMenu = this.mouseIsHovering($event, menuBoundedClientRect);
1752
- if (!mouseHoveringLeaf && !mouseHoveringMenu) {
1753
- menuTrigger.closeMenu();
1754
- }
1755
- }
1756
- }
1757
- mouseIsHovering($event, boundingClientRect) {
1758
- return (boundingClientRect.left <= $event.clientX &&
1759
- $event.clientX <= boundingClientRect.right &&
1760
- boundingClientRect.top <= $event.clientY &&
1761
- $event.clientY <= boundingClientRect.bottom);
1762
- }
1763
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 });
1764
- 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: [
1765
2102
  /**
1766
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)
1767
2104
  */
@@ -1791,18 +2128,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
1791
2128
  NavSelectorLeafDetailsComponent,
1792
2129
  CheckboxComponent,
1793
2130
  TooltipDirective,
1794
- MatMenu,
1795
- MatMenuTrigger,
1796
- MatMenuItem,
1797
2131
  NavSelectorLeafDetailComponent,
1798
2132
  NavSelectorLeafDetailComponent,
1799
2133
  NgTemplateOutlet,
1800
2134
  TreeNodeAccessibilityDirective,
2135
+ NavSelectorPopoverComponent,
2136
+ NavSelectorPopoverTriggerDirective,
2137
+ NavSelectorPopoverItemComponent,
1801
2138
  ], providers: [withSymbols(apErrorFill, apFeatureLock, apChevronDown, apChevronUp, apMore), NavSelectorLeafPresenter], host: {
1802
2139
  '[class.minified]': '!navSelectorLeafPresenter.expanded()',
1803
2140
  role: 'treeitem',
1804
- '(mouseenter)': 'mouseEntered()',
1805
- '(mouseleave)': 'mouseLeft($event)',
1806
2141
  '(keydown.arrowLeft)': 'fold($event)',
1807
2142
  '(keydown.arrowRight)': 'unfold($event)',
1808
2143
  }, animations: [
@@ -1824,7 +2159,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
1824
2159
  animate('250ms cubic-bezier(.4, 0, .3, 1)', keyframes([style({ overflow: 'hidden', maxHeight: '{{maxHeight}}' }), style({ maxHeight: 0 })])),
1825
2160
  ]),
1826
2161
  ]),
1827
- ], 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"] }]
1828
2163
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorLeafPresenter }] });
1829
2164
 
1830
2165
  class NavSelectorGroupPresenter {
@@ -1885,7 +2220,7 @@ class NavSelectorGroupComponent {
1885
2220
  this.el = el;
1886
2221
  this.navSelectorGroupPresenter = navSelectorGroupPresenter;
1887
2222
  afterNextRender(() => {
1888
- this.maxHeight.set(`${this.el.nativeElement.scrollHeight}px`);
2223
+ this.maxHeight.set(`${this.el.nativeElement.clientHeight * this.group().children.length}px`);
1889
2224
  const el = this.aliasEl()?.nativeElement;
1890
2225
  if (el) {
1891
2226
  this.aliasBoundedClientRect.set({
@@ -1897,19 +2232,22 @@ class NavSelectorGroupComponent {
1897
2232
  }
1898
2233
  });
1899
2234
  effect(() => {
1900
- if (this.group().folded) {
1901
- setTimeout(() => this.foldedWithDelay.set(true), 150);
1902
- }
1903
- else {
1904
- this.foldedWithDelay.set(false);
1905
- }
1906
- }, { allowSignalWrites: true });
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
+ });
1907
2245
  }
1908
2246
  maxHeight = signal('0px');
1909
- onKeydownSpaceOrEnter($event) {
2247
+ onKeydownSpaceOrEnter(event) {
1910
2248
  // Prevent to toggle folding when focus is on the checkbox
1911
2249
  if (document.activeElement === this.el.nativeElement.querySelector('.content')) {
1912
- this.toggleFolding($event);
2250
+ this.toggleFolding(event);
1913
2251
  }
1914
2252
  else {
1915
2253
  this.navSelectorGroupPresenter.onGroupSelected(this.group());
@@ -1928,7 +2266,7 @@ class NavSelectorGroupComponent {
1928
2266
  this.navSelectorGroupPresenter.unfold(this.group());
1929
2267
  }
1930
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 });
1931
- 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: [
1932
2270
  /**
1933
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)
1934
2272
  */
@@ -1982,7 +2320,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
1982
2320
  animate('250ms cubic-bezier(.4, 0, .3, 1)', keyframes([style({ maxHeight: '{{maxHeight}}', overflow: 'hidden' }), style({ maxHeight: 0, overflow: 'hidden' })])),
1983
2321
  ]),
1984
2322
  ]),
1985
- ], 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"] }]
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"] }]
1986
2324
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorGroupPresenter }] });
1987
2325
 
1988
2326
  class NavSelectorCategoryPresenter {
@@ -2021,19 +2359,22 @@ class NavSelectorCategoryComponent {
2021
2359
  constructor(el, navSelectorCategoryPresenter) {
2022
2360
  this.el = el;
2023
2361
  this.navSelectorCategoryPresenter = navSelectorCategoryPresenter;
2024
- afterNextRender(() => this.maxHeight.set(`${this.el.nativeElement.scrollHeight}px`));
2362
+ afterNextRender(() => this.maxHeight.set(`${this.el.nativeElement.clientHeight * this.category().children.length}px`));
2025
2363
  effect(() => {
2026
- if (this.category().folded) {
2027
- setTimeout(() => this.foldedWithDelay.set(true), 150);
2028
- }
2029
- else {
2030
- this.foldedWithDelay.set(false);
2031
- }
2032
- }, { allowSignalWrites: true });
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
+ });
2033
2374
  }
2034
2375
  maxHeight = signal('0px');
2035
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 });
2036
- 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.stop)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <span class=\"caption\">{{ category().alias }}</span>\n\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n [attr.aria-label]=\"'Toggle ' + category().alias\"\n [symbolId]=\"foldSymbol()\"\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>\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: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 .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=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: [
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: [
2037
2378
  /**
2038
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)
2039
2380
  */
@@ -2079,7 +2420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
2079
2420
  animate('250ms cubic-bezier(.4, 0, .3, 1)', keyframes([style({ maxHeight: '{{maxHeight}}' }), style({ overflow: 'hidden', maxHeight: 0 })])),
2080
2421
  ]),
2081
2422
  ]),
2082
- ], template: "@if (navSelectorCategoryPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space.stop)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <span class=\"caption\">{{ category().alias }}</span>\n\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n [attr.aria-label]=\"'Toggle ' + category().alias\"\n [symbolId]=\"foldSymbol()\"\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>\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: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 .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=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"] }]
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"] }]
2083
2424
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorCategoryPresenter }] });
2084
2425
 
2085
2426
  let nextUniqueId = 0;
@@ -2090,6 +2431,7 @@ class NavSelectorComponent {
2090
2431
  translatedTexts = input.required();
2091
2432
  multipleModeEnabled = input(false);
2092
2433
  detailsDisplayedLimit = input(Number.MAX_SAFE_INTEGER);
2434
+ embedded = input(false);
2093
2435
  /**
2094
2436
  * If true, the nav selector will be expanded by default. Even if the width of the screen is smaller than 1280px.
2095
2437
  */
@@ -2105,55 +2447,80 @@ class NavSelectorComponent {
2105
2447
  this.navSelectorState = navSelectorState;
2106
2448
  this.el = el;
2107
2449
  navSelectorState.registerOnSelectedUidsChange(selectedUids => {
2108
- this.selectedEntryUids.set(selectedUids);
2450
+ const isInit = !!this.navSelectorState.entries().length;
2451
+ if (isInit) {
2452
+ this.selectedEntryUids.set(selectedUids);
2453
+ }
2109
2454
  });
2110
2455
  afterNextRender(() => {
2111
- if (!this.forceExpanded() && document.body.clientWidth < 1200) {
2456
+ if (!this.embedded() && !this.forceExpanded() && document.body.clientWidth < 1200) {
2112
2457
  this.navSelectorState.toggleExpanded();
2113
2458
  }
2114
2459
  });
2115
2460
  effect(() => {
2116
- this.navSelectorState.updateMultiModeEnabled(this.multipleModeEnabled());
2117
- if (!this.navSelectorState.filteredEntries().length) {
2118
- this.navSelectorState.updateEntries(this.navSelectorEntries(), this.selectedEntryUids(), this.detailsDisplayedLimit());
2119
- }
2120
- }, { allowSignalWrites: true });
2461
+ const multipleModeEnabled = this.multipleModeEnabled();
2462
+ const newEntries = this.navSelectorEntries();
2463
+ untracked(() => {
2464
+ this.navSelectorState.updateMultiModeEnabled(multipleModeEnabled);
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());
2470
+ }
2471
+ });
2472
+ });
2121
2473
  effect(() => {
2122
- this.navSelectorState.updateDetailsDisplayedLimit(this.detailsDisplayedLimit());
2123
- }, { allowSignalWrites: true });
2474
+ const detailsDisplayedLimit = this.detailsDisplayedLimit();
2475
+ untracked(() => this.navSelectorState.updateDetailsDisplayedLimit(detailsDisplayedLimit));
2476
+ });
2124
2477
  const leafActionProjectionEffect = effect(() => {
2125
- if (this.leafActionProjection()) {
2126
- this.navSelectorState.updateLeafAction(this.leafActionProjection());
2127
- leafActionProjectionEffect.destroy();
2128
- }
2129
- }, { manualCleanup: true, allowSignalWrites: true });
2478
+ const leafActionProjection = this.leafActionProjection();
2479
+ untracked(() => {
2480
+ if (leafActionProjection) {
2481
+ this.navSelectorState.updateLeafAction(this.leafActionProjection());
2482
+ leafActionProjectionEffect.destroy();
2483
+ }
2484
+ });
2485
+ }, { manualCleanup: true });
2130
2486
  effect(() => {
2131
- this.navSelectorState.onSelectionChange(this.selectedEntryUids());
2132
- }, { allowSignalWrites: true });
2487
+ const selectedEntryUids = this.selectedEntryUids();
2488
+ const isInit = !!this.navSelectorState.entries().length;
2489
+ untracked(() => isInit && this.navSelectorState.onSelectionChange(selectedEntryUids));
2490
+ });
2133
2491
  effect(() => {
2134
- this.navSelectorState.updateTexts(this.translatedTexts());
2135
- }, { allowSignalWrites: true });
2492
+ const translatedTexts = this.translatedTexts();
2493
+ untracked(() => this.navSelectorState.updateTexts(translatedTexts));
2494
+ });
2136
2495
  }
2137
- onArrowDown($event) {
2496
+ onMinifiedSearchClicked() {
2497
+ this.navSelectorState.toggleExpanded();
2498
+ setTimeout(() => this.el.nativeElement.querySelector('input').focus());
2499
+ }
2500
+ onArrowDown(event) {
2138
2501
  if (this.el.nativeElement.querySelector('.nav-selector__content').contains(document.activeElement)) {
2139
- $event.stopImmediatePropagation();
2502
+ event.stopImmediatePropagation();
2140
2503
  this.navSelectorState.onArrowDown();
2141
2504
  setTimeout(() => this.el.nativeElement.querySelector('[role="treeitem"][tabindex="0"]').focus());
2142
2505
  }
2143
2506
  }
2144
- onArrowUp($event) {
2507
+ onArrowUp(event) {
2145
2508
  if (this.el.nativeElement.querySelector('.nav-selector__content').contains(document.activeElement)) {
2146
- $event.stopImmediatePropagation();
2509
+ event.stopImmediatePropagation();
2147
2510
  this.navSelectorState.onArrowUp();
2148
2511
  setTimeout(() => this.el.nativeElement.querySelector('[role="treeitem"][tabindex="0"]').focus());
2149
2512
  }
2150
2513
  }
2151
- TemplateRef = TemplateRef;
2514
+ onWindowResize() {
2515
+ if (window.innerWidth < 1280) {
2516
+ this.navSelectorState.minify();
2517
+ }
2518
+ }
2152
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 });
2153
- 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()" } }, 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{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: [
2154
2521
  trigger('expand', [
2155
2522
  state('expanded', style({ width: '100%' })),
2156
- state('minified', style({ with: '64px' })),
2523
+ state('minified', style({ width: '64px' })),
2157
2524
  transition('expanded => minified', animate('250ms cubic-bezier(.4, 0, .3, 1)')),
2158
2525
  transition('minified => expanded', animate('250ms cubic-bezier(.4, 0, .3, 1)',
2159
2526
  // Force animation to do not be with 100% instantly
@@ -2178,16 +2545,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
2178
2545
  role: 'tree',
2179
2546
  '(keydown.arrowDown)': 'onArrowDown($event)',
2180
2547
  '(keydown.arrowUp)': 'onArrowUp($event)',
2548
+ '(window:resize)': 'onWindowResize()',
2181
2549
  }, animations: [
2182
2550
  trigger('expand', [
2183
2551
  state('expanded', style({ width: '100%' })),
2184
- state('minified', style({ with: '64px' })),
2552
+ state('minified', style({ width: '64px' })),
2185
2553
  transition('expanded => minified', animate('250ms cubic-bezier(.4, 0, .3, 1)')),
2186
2554
  transition('minified => expanded', animate('250ms cubic-bezier(.4, 0, .3, 1)',
2187
2555
  // Force animation to do not be with 100% instantly
2188
2556
  keyframes([style({ width: '64px' }), style({ width: '50%' }), style({ width: '100%' })]))),
2189
2557
  ]),
2190
- ], 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"] }]
2558
+ ], 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{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"] }]
2191
2559
  }], ctorParameters: () => [{ type: NavSelectorState }, { type: i0.ElementRef }] });
2192
2560
 
2193
2561
  /**