@aeris-ui/core 22.0.0-alpha.11 → 22.0.0-alpha.13

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 (138) hide show
  1. package/README.md +3 -3
  2. package/fesm2022/aeris-ui-core-accordion.mjs +14 -14
  3. package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
  4. package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +3 -3
  5. package/fesm2022/aeris-ui-core-auto-complete.mjs +21 -20
  6. package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
  7. package/fesm2022/aeris-ui-core-auto-focus.mjs +3 -3
  8. package/fesm2022/aeris-ui-core-avatar.mjs +6 -6
  9. package/fesm2022/aeris-ui-core-badge.mjs +6 -6
  10. package/fesm2022/aeris-ui-core-block-ui.mjs +3 -3
  11. package/fesm2022/aeris-ui-core-breadcrumb.mjs +12 -12
  12. package/fesm2022/aeris-ui-core-button-forms.mjs +3 -3
  13. package/fesm2022/aeris-ui-core-button-group.mjs +6 -6
  14. package/fesm2022/aeris-ui-core-button.mjs +9 -9
  15. package/fesm2022/aeris-ui-core-card.mjs +18 -18
  16. package/fesm2022/aeris-ui-core-carousel.mjs +12 -12
  17. package/fesm2022/aeris-ui-core-cascade-select.mjs +17 -14
  18. package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
  19. package/fesm2022/aeris-ui-core-chart.mjs +3 -3
  20. package/fesm2022/aeris-ui-core-checkbox.mjs +3 -3
  21. package/fesm2022/aeris-ui-core-chip.mjs +12 -12
  22. package/fesm2022/aeris-ui-core-class-names.mjs +3 -3
  23. package/fesm2022/aeris-ui-core-code-block.mjs +3 -3
  24. package/fesm2022/aeris-ui-core-color-picker.mjs +6 -4
  25. package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
  26. package/fesm2022/aeris-ui-core-command-palette.mjs +18 -18
  27. package/fesm2022/aeris-ui-core-compare.mjs +12 -12
  28. package/fesm2022/aeris-ui-core-confirm-dialog.mjs +53 -26
  29. package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
  30. package/fesm2022/aeris-ui-core-confirm-popup.mjs +54 -27
  31. package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
  32. package/fesm2022/aeris-ui-core-context-menu.mjs +7 -7
  33. package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
  34. package/fesm2022/{aeris-ui-core-date-picker-aeris-date-picker-input-jAhzMzLQ.mjs → aeris-ui-core-date-picker-aeris-date-picker-input-66V2U8rC.mjs} +4 -4
  35. package/fesm2022/{aeris-ui-core-date-picker-aeris-date-picker-input-jAhzMzLQ.mjs.map → aeris-ui-core-date-picker-aeris-date-picker-input-66V2U8rC.mjs.map} +1 -1
  36. package/fesm2022/aeris-ui-core-date-picker.mjs +528 -151
  37. package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
  38. package/fesm2022/aeris-ui-core-dialog.mjs +16 -16
  39. package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
  40. package/fesm2022/aeris-ui-core-divider.mjs +3 -3
  41. package/fesm2022/aeris-ui-core-drawer.mjs +16 -16
  42. package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
  43. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +27 -14
  44. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
  45. package/fesm2022/aeris-ui-core-editor.mjs +5 -5
  46. package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
  47. package/fesm2022/aeris-ui-core-file-upload.mjs +24 -24
  48. package/fesm2022/aeris-ui-core-filter-service.mjs +3 -3
  49. package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
  50. package/fesm2022/aeris-ui-core-fluid.mjs +3 -3
  51. package/fesm2022/aeris-ui-core-focus-trap.mjs +3 -3
  52. package/fesm2022/aeris-ui-core-form-field.mjs +15 -15
  53. package/fesm2022/aeris-ui-core-galleria.mjs +35 -35
  54. package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
  55. package/fesm2022/aeris-ui-core-glass.mjs +3 -3
  56. package/fesm2022/aeris-ui-core-icon-field.mjs +12 -12
  57. package/fesm2022/aeris-ui-core-inplace.mjs +9 -9
  58. package/fesm2022/aeris-ui-core-input-group.mjs +15 -15
  59. package/fesm2022/aeris-ui-core-input-mask.mjs +3 -3
  60. package/fesm2022/aeris-ui-core-input-number.mjs +3 -3
  61. package/fesm2022/aeris-ui-core-input-otp.mjs +19 -8
  62. package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
  63. package/fesm2022/aeris-ui-core-input-text.mjs +6 -6
  64. package/fesm2022/aeris-ui-core-kbd.mjs +9 -9
  65. package/fesm2022/aeris-ui-core-key-filter.mjs +3 -3
  66. package/fesm2022/aeris-ui-core-listbox.mjs +15 -15
  67. package/fesm2022/aeris-ui-core-mega-menu.mjs +6 -6
  68. package/fesm2022/aeris-ui-core-menu.mjs +16 -16
  69. package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
  70. package/fesm2022/aeris-ui-core-menubar.mjs +12 -12
  71. package/fesm2022/aeris-ui-core-message.mjs +9 -9
  72. package/fesm2022/aeris-ui-core-meter-group.mjs +15 -15
  73. package/fesm2022/aeris-ui-core-multi-select.mjs +36 -24
  74. package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
  75. package/fesm2022/aeris-ui-core-navbar.mjs +25 -25
  76. package/fesm2022/aeris-ui-core-navbar.mjs.map +1 -1
  77. package/fesm2022/aeris-ui-core-order-list.mjs +9 -9
  78. package/fesm2022/aeris-ui-core-organization-chart.mjs +117 -50
  79. package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
  80. package/fesm2022/aeris-ui-core-paginator.mjs +7 -5
  81. package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
  82. package/fesm2022/aeris-ui-core-panel.mjs +15 -15
  83. package/fesm2022/aeris-ui-core-password.mjs +13 -13
  84. package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
  85. package/fesm2022/aeris-ui-core-pick-list.mjs +9 -9
  86. package/fesm2022/aeris-ui-core-popover.mjs +16 -16
  87. package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
  88. package/fesm2022/aeris-ui-core-progress-bar.mjs +9 -9
  89. package/fesm2022/aeris-ui-core-progress-spinner.mjs +6 -6
  90. package/fesm2022/aeris-ui-core-radio-button.mjs +3 -3
  91. package/fesm2022/aeris-ui-core-rating.mjs +15 -5
  92. package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
  93. package/fesm2022/aeris-ui-core-scroll-panel.mjs +3 -3
  94. package/fesm2022/aeris-ui-core-scroll-top.mjs +3 -3
  95. package/fesm2022/aeris-ui-core-select-native.mjs +3 -3
  96. package/fesm2022/aeris-ui-core-select.mjs +41 -39
  97. package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
  98. package/fesm2022/aeris-ui-core-sidebar.mjs +24 -24
  99. package/fesm2022/aeris-ui-core-skeleton.mjs +3 -3
  100. package/fesm2022/aeris-ui-core-slider.mjs +23 -12
  101. package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
  102. package/fesm2022/aeris-ui-core-speed-dial.mjs +3 -3
  103. package/fesm2022/aeris-ui-core-split-button.mjs +7 -7
  104. package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
  105. package/fesm2022/aeris-ui-core-splitter.mjs +6 -6
  106. package/fesm2022/aeris-ui-core-stepper.mjs +12 -12
  107. package/fesm2022/aeris-ui-core-style-class.mjs +3 -3
  108. package/fesm2022/aeris-ui-core-table.mjs +21 -21
  109. package/fesm2022/aeris-ui-core-tabs.mjs +12 -12
  110. package/fesm2022/aeris-ui-core-textarea.mjs +6 -6
  111. package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
  112. package/fesm2022/aeris-ui-core-theming.mjs +3 -3
  113. package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
  114. package/fesm2022/aeris-ui-core-tiered-menu.mjs +7 -7
  115. package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
  116. package/fesm2022/aeris-ui-core-timeline.mjs +15 -15
  117. package/fesm2022/aeris-ui-core-toast.mjs +69 -46
  118. package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
  119. package/fesm2022/aeris-ui-core-toggle-switch.mjs +3 -3
  120. package/fesm2022/aeris-ui-core-toolbar.mjs +30 -30
  121. package/fesm2022/aeris-ui-core-tooltip.mjs +6 -6
  122. package/fesm2022/aeris-ui-core-tree-select.mjs +37 -26
  123. package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
  124. package/fesm2022/aeris-ui-core-tree-table.mjs +18 -18
  125. package/fesm2022/aeris-ui-core-tree.mjs +12 -12
  126. package/fesm2022/aeris-ui-core.mjs +40 -17
  127. package/fesm2022/aeris-ui-core.mjs.map +1 -1
  128. package/package.json +2 -2
  129. package/types/aeris-ui-core-code-block.d.ts +0 -4
  130. package/types/aeris-ui-core-confirm-dialog.d.ts +2 -0
  131. package/types/aeris-ui-core-confirm-popup.d.ts +2 -0
  132. package/types/aeris-ui-core-date-picker.d.ts +5 -44
  133. package/types/aeris-ui-core-drawer.d.ts +0 -6
  134. package/types/aeris-ui-core-dynamic-dialog.d.ts +1 -0
  135. package/types/aeris-ui-core-organization-chart.d.ts +6 -2
  136. package/types/aeris-ui-core-toast.d.ts +4 -2
  137. package/types/aeris-ui-core-tree-select.d.ts +1 -0
  138. package/types/aeris-ui-core.d.ts +4 -3
@@ -1,7 +1,7 @@
1
1
  import { ɵAerisIcon } from "@aeris-ui/core";
2
2
  import { NgTemplateOutlet } from "@angular/common";
3
3
  import * as i0 from "@angular/core";
4
- import { Component, Directive, TemplateRef, booleanAttribute, computed, contentChild, inject, input, model, output, viewChildren } from "@angular/core";
4
+ import { Component, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChild, effect, inject, input, linkedSignal, model, output, viewChildren } from "@angular/core";
5
5
  var AerisOrganizationChartNodeTemplate = class AerisOrganizationChartNodeTemplate {
6
6
  template = inject(TemplateRef);
7
7
  static ngTemplateContextGuard(_directive, context) {
@@ -9,7 +9,7 @@ var AerisOrganizationChartNodeTemplate = class AerisOrganizationChartNodeTemplat
9
9
  }
10
10
  static ɵfac = i0.ɵɵngDeclareFactory({
11
11
  minVersion: "12.0.0",
12
- version: "22.2.3",
12
+ version: "22.2.4",
13
13
  ngImport: i0,
14
14
  type: AerisOrganizationChartNodeTemplate,
15
15
  deps: [],
@@ -17,7 +17,7 @@ var AerisOrganizationChartNodeTemplate = class AerisOrganizationChartNodeTemplat
17
17
  });
18
18
  static ɵdir = i0.ɵɵngDeclareDirective({
19
19
  minVersion: "14.0.0",
20
- version: "22.2.3",
20
+ version: "22.2.4",
21
21
  type: AerisOrganizationChartNodeTemplate,
22
22
  isStandalone: true,
23
23
  selector: "ng-template[aerisOrganizationChartNode]",
@@ -26,7 +26,7 @@ var AerisOrganizationChartNodeTemplate = class AerisOrganizationChartNodeTemplat
26
26
  };
27
27
  i0.ɵɵngDeclareClassMetadata({
28
28
  minVersion: "12.0.0",
29
- version: "22.2.3",
29
+ version: "22.2.4",
30
30
  ngImport: i0,
31
31
  type: AerisOrganizationChartNodeTemplate,
32
32
  decorators: [{
@@ -38,7 +38,7 @@ var AerisOrganizationChartEmptyTemplate = class AerisOrganizationChartEmptyTempl
38
38
  template = inject(TemplateRef);
39
39
  static ɵfac = i0.ɵɵngDeclareFactory({
40
40
  minVersion: "12.0.0",
41
- version: "22.2.3",
41
+ version: "22.2.4",
42
42
  ngImport: i0,
43
43
  type: AerisOrganizationChartEmptyTemplate,
44
44
  deps: [],
@@ -46,7 +46,7 @@ var AerisOrganizationChartEmptyTemplate = class AerisOrganizationChartEmptyTempl
46
46
  });
47
47
  static ɵdir = i0.ɵɵngDeclareDirective({
48
48
  minVersion: "14.0.0",
49
- version: "22.2.3",
49
+ version: "22.2.4",
50
50
  type: AerisOrganizationChartEmptyTemplate,
51
51
  isStandalone: true,
52
52
  selector: "ng-template[aerisOrganizationChartEmpty]",
@@ -55,7 +55,7 @@ var AerisOrganizationChartEmptyTemplate = class AerisOrganizationChartEmptyTempl
55
55
  };
56
56
  i0.ɵɵngDeclareClassMetadata({
57
57
  minVersion: "12.0.0",
58
- version: "22.2.3",
58
+ version: "22.2.4",
59
59
  ngImport: i0,
60
60
  type: AerisOrganizationChartEmptyTemplate,
61
61
  decorators: [{
@@ -89,7 +89,32 @@ var AerisOrganizationChart = class AerisOrganizationChart {
89
89
  nodeTemplateDirective = contentChild(AerisOrganizationChartNodeTemplate, ...ngDevMode ? [{ debugName: "nodeTemplateDirective" }] : /* istanbul ignore next */ []);
90
90
  emptyTemplate = contentChild(AerisOrganizationChartEmptyTemplate, ...ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []);
91
91
  nodeElements = viewChildren("nodeElement", ...ngDevMode ? [{ debugName: "nodeElements" }] : /* istanbul ignore next */ []);
92
- renderedKeys = computed(() => this.collectRenderedKeys(this.value()), ...ngDevMode ? [{ debugName: "renderedKeys" }] : /* istanbul ignore next */ []);
92
+ host = inject(ElementRef);
93
+ renderedEntries = computed(() => this.collectRenderedEntries(this.value()), ...ngDevMode ? [{ debugName: "renderedEntries" }] : /* istanbul ignore next */ []);
94
+ activeKey = linkedSignal({
95
+ ...ngDevMode ? { debugName: "activeKey" } : /* istanbul ignore next */ {},
96
+ source: this.renderedEntries,
97
+ computation: (entries, previous) => {
98
+ let key = previous?.value ?? null;
99
+ while (key !== null) {
100
+ if (entries.some((entry) => entry.key === key)) return key;
101
+ key = previous?.source.find((entry) => entry.key === key)?.parentKey ?? null;
102
+ }
103
+ return entries[0]?.key ?? null;
104
+ }
105
+ });
106
+ constructor() {
107
+ effect(() => {
108
+ const key = this.activeKey();
109
+ const active = this.host.nativeElement.ownerDocument.activeElement;
110
+ if (!active || !this.host.nativeElement.contains(active)) return;
111
+ const branch = active.closest("[data-aeris-key]");
112
+ if (branch && !this.renderedEntries().some((entry) => entry.key === branch.getAttribute("data-aeris-key"))) this.focusRenderedKey(key ?? void 0);
113
+ });
114
+ }
115
+ handleNodeFocus(event, key) {
116
+ if (event.target instanceof Element && event.target.closest("[role=\"treeitem\"]") === event.currentTarget) this.activeKey.set(key);
117
+ }
93
118
  nodeKey(node, fallback) {
94
119
  return node.key ?? String(fallback);
95
120
  }
@@ -118,6 +143,8 @@ var AerisOrganizationChart = class AerisOrganizationChart {
118
143
  return Boolean(this.selectionMode()) && node.selectable !== false;
119
144
  }
120
145
  selectNode(node, key, originalEvent) {
146
+ originalEvent.stopPropagation();
147
+ this.activeKey.set(key);
121
148
  if (!this.isNodeSelectable(node)) return;
122
149
  const wasSelected = this.isSelected(key);
123
150
  const selectedKeys = this.selectionMode() === "single" ? wasSelected ? [] : [key] : wasSelected ? this.selectionKeys().filter((selectedKey) => selectedKey !== key) : [...this.selectionKeys(), key];
@@ -134,7 +161,7 @@ var AerisOrganizationChart = class AerisOrganizationChart {
134
161
  }
135
162
  toggleNode(node, key, originalEvent) {
136
163
  originalEvent.stopPropagation();
137
- if (!this.hasChildren(node)) return;
164
+ if (!this.collapsible() || !this.hasChildren(node)) return;
138
165
  if (this.isCollapsed(key)) {
139
166
  this.collapsedKeys.set(this.collapsedKeys().filter((item) => item !== key));
140
167
  this.nodeExpanded.emit({
@@ -152,32 +179,53 @@ var AerisOrganizationChart = class AerisOrganizationChart {
152
179
  }
153
180
  }
154
181
  handleNodeKeydown(event, node, key) {
182
+ if (event.target !== event.currentTarget || event.isComposing) return;
183
+ const entries = this.renderedEntries();
184
+ const index = entries.findIndex((entry) => entry.key === key);
185
+ const rtl = this.host.nativeElement.ownerDocument.defaultView?.getComputedStyle(this.host.nativeElement).direction === "rtl";
186
+ const expandKey = rtl ? "ArrowLeft" : "ArrowRight";
187
+ const collapseKey = rtl ? "ArrowRight" : "ArrowLeft";
155
188
  if (event.key === "Enter" || event.key === " ") {
156
189
  event.preventDefault();
157
190
  this.selectNode(node, key, event);
158
- } else if (event.key === "ArrowLeft" && this.hasChildren(node) && !this.isCollapsed(key)) {
191
+ } else if (event.key === "ArrowDown" || event.key === "ArrowUp") {
192
+ event.preventDefault();
193
+ this.focusRenderedKey(entries[index + (event.key === "ArrowDown" ? 1 : -1)]?.key);
194
+ } else if (event.key === collapseKey) {
159
195
  event.preventDefault();
160
- this.toggleNode(node, key, event);
161
- } else if (event.key === "ArrowRight" && this.hasChildren(node) && this.isCollapsed(key)) {
196
+ if (this.collapsible() && this.hasChildren(node) && !this.isCollapsed(key)) this.toggleNode(node, key, event);
197
+ else this.focusRenderedKey(entries[index]?.parentKey ?? void 0);
198
+ } else if (event.key === expandKey) {
162
199
  event.preventDefault();
163
- this.toggleNode(node, key, event);
200
+ if (this.collapsible() && this.hasChildren(node) && this.isCollapsed(key)) this.toggleNode(node, key, event);
201
+ else this.focusRenderedKey(entries.find((entry) => entry.parentKey === key)?.key);
164
202
  } else if (event.key === "Home") {
165
203
  event.preventDefault();
166
- this.focusRenderedKey(this.renderedKeys()[0]);
204
+ this.focusRenderedKey(entries[0]?.key);
167
205
  } else if (event.key === "End") {
168
206
  event.preventDefault();
169
- const keys = this.renderedKeys();
170
- this.focusRenderedKey(keys[keys.length - 1]);
207
+ this.focusRenderedKey(entries.at(-1)?.key);
208
+ } else if (event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {
209
+ const query = event.key.toLocaleLowerCase();
210
+ const match = [...entries.slice(index + 1), ...entries.slice(0, index + 1)].find((entry) => this.nodeAriaLabel(entry.node).toLocaleLowerCase().startsWith(query));
211
+ if (match) {
212
+ event.preventDefault();
213
+ this.focusRenderedKey(match.key);
214
+ }
171
215
  }
172
216
  }
173
- collectRenderedKeys(nodes, parentKey = "") {
174
- const keys = [];
217
+ collectRenderedEntries(nodes, parentKey = null) {
218
+ const entries = [];
175
219
  nodes.forEach((node, index) => {
176
220
  const key = this.nodeKey(node, parentKey ? `${parentKey}-${index}` : String(index));
177
- keys.push(key);
178
- if (node.children?.length && !this.isCollapsed(key)) keys.push(...this.collectRenderedKeys(node.children, key));
221
+ entries.push({
222
+ key,
223
+ parentKey,
224
+ node
225
+ });
226
+ if (node.children?.length && !this.isCollapsed(key)) entries.push(...this.collectRenderedEntries(node.children, key));
179
227
  });
180
- return keys;
228
+ return entries;
181
229
  }
182
230
  focusRenderedKey(key) {
183
231
  if (!key) return;
@@ -185,7 +233,7 @@ var AerisOrganizationChart = class AerisOrganizationChart {
185
233
  }
186
234
  static ɵfac = i0.ɵɵngDeclareFactory({
187
235
  minVersion: "12.0.0",
188
- version: "22.2.3",
236
+ version: "22.2.4",
189
237
  ngImport: i0,
190
238
  type: AerisOrganizationChart,
191
239
  deps: [],
@@ -193,7 +241,7 @@ var AerisOrganizationChart = class AerisOrganizationChart {
193
241
  });
194
242
  static ɵcmp = i0.ɵɵngDeclareComponent({
195
243
  minVersion: "17.0.0",
196
- version: "22.2.3",
244
+ version: "22.2.4",
197
245
  type: AerisOrganizationChart,
198
246
  isStandalone: true,
199
247
  selector: "aeris-organization-chart",
@@ -308,25 +356,28 @@ var AerisOrganizationChart = class AerisOrganizationChart {
308
356
  template: `
309
357
  <div class="aeris-organization-chart" [attr.data-fluid]="fluid() || null">
310
358
  @if (value().length) {
311
- <div class="aeris-organization-chart__viewport" tabindex="0">
359
+ <div class="aeris-organization-chart__viewport">
312
360
  <ng-template #nodeTemplate let-node let-key="key" let-level="level">
313
- <li class="aeris-organization-chart__branch">
361
+ <li
362
+ #nodeElement
363
+ class="aeris-organization-chart__branch"
364
+ role="treeitem"
365
+ [tabIndex]="activeKey() === key ? 0 : -1"
366
+ [attr.aria-label]="nodeAriaLabel(node)"
367
+ [attr.aria-selected]="selectionMode() ? isSelected(key) : null"
368
+ [attr.aria-expanded]="hasChildren(node) ? !isCollapsed(key) : null"
369
+ [attr.data-aeris-key]="key"
370
+ (click)="selectNode(node, key, $event)"
371
+ (keydown)="handleNodeKeydown($event, node, key)"
372
+ (focusin)="handleNodeFocus($event, key)"
373
+ >
314
374
  <div class="aeris-organization-chart__node-shell">
315
375
  <div
316
- #nodeElement
317
376
  class="aeris-organization-chart__node"
318
- role="treeitem"
319
- tabindex="0"
320
- [attr.aria-label]="nodeAriaLabel(node)"
321
- [attr.aria-selected]="selectionMode() ? isSelected(key) : null"
322
- [attr.aria-expanded]="hasChildren(node) ? !isCollapsed(key) : null"
323
377
  [attr.data-selected]="isSelected(key) || null"
324
378
  [attr.data-selectable]="isNodeSelectable(node) || null"
325
379
  [attr.data-type]="node.type || null"
326
- [attr.data-aeris-key]="key"
327
380
  [style.--aeris-org-level]="level"
328
- (click)="selectNode(node, key, $event)"
329
- (keydown)="handleNodeKeydown($event, node, key)"
330
381
  >
331
382
  @if (nodeTemplateDirective(); as customNode) {
332
383
  <ng-container
@@ -353,6 +404,7 @@ var AerisOrganizationChart = class AerisOrganizationChart {
353
404
  <button
354
405
  class="aeris-organization-chart__toggle"
355
406
  type="button"
407
+ tabindex="-1"
356
408
  [attr.aria-label]="isCollapsed(key) ? expandAriaLabel() : collapseAriaLabel()"
357
409
  [attr.aria-expanded]="!isCollapsed(key)"
358
410
  (click)="toggleNode(node, key, $event)"
@@ -394,7 +446,12 @@ var AerisOrganizationChart = class AerisOrganizationChart {
394
446
  </li>
395
447
  </ng-template>
396
448
 
397
- <ul class="aeris-organization-chart__tree" role="tree" [attr.aria-label]="ariaLabel()">
449
+ <ul
450
+ class="aeris-organization-chart__tree"
451
+ role="tree"
452
+ [attr.aria-label]="ariaLabel()"
453
+ [attr.aria-multiselectable]="selectionMode() === 'multiple' ? true : null"
454
+ >
398
455
  @for (node of value(); track nodeKey(node, $index); let index = $index) {
399
456
  <ng-container
400
457
  [ngTemplateOutlet]="nodeTemplate"
@@ -419,7 +476,7 @@ var AerisOrganizationChart = class AerisOrganizationChart {
419
476
  </div>
420
477
  `,
421
478
  isInline: true,
422
- styles: [":host{--_aeris-chevron-mask: var( --aeris-icon-chevron, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m6 9 6 6 6-6\"/%3E%3C/svg%3E') );display:block;min-width:0;max-width:100%}.aeris-organization-chart{width:max-content;min-width:0;max-width:100%;color:var(--aeris-text, #111111)}.aeris-organization-chart[data-fluid=true]{width:100%}.aeris-organization-chart__viewport{box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:var(--aeris-organization-chart-padding, 1rem);overflow:auto}.aeris-organization-chart__viewport:focus-visible{outline:0;box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--aeris-focus, #111111) 22%,transparent)}.aeris-organization-chart__tree,.aeris-organization-chart__children{display:flex;justify-content:center;width:max-content;margin:0;padding:0;list-style:none}.aeris-organization-chart__tree{min-width:100%}.aeris-organization-chart__branch{position:relative;display:grid;justify-items:center;padding:0 var(--aeris-organization-chart-node-gap, .625rem)}.aeris-organization-chart__node-shell{position:relative;display:grid;justify-items:center}.aeris-organization-chart__node{min-width:var(--aeris-organization-chart-node-min-width, 9.5rem);max-width:var(--aeris-organization-chart-node-max-width, 14rem);display:grid;gap:.25rem;padding:var(--aeris-organization-chart-node-padding, .625rem .75rem);border:1px solid var(--aeris-organization-chart-node-border, var(--aeris-border));border-radius:var(--aeris-organization-chart-node-radius, var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem)));background:var(--aeris-organization-chart-node-background, var(--aeris-surface, #fff));color:var(--aeris-organization-chart-node-color, var(--aeris-text, #111111));box-shadow:var(--aeris-organization-chart-node-shadow, 0 .75rem 1.75rem rgba(31, 35, 27, .08));text-align:center;cursor:default}.aeris-organization-chart__node[data-selectable=true]{cursor:pointer}@media(hover:hover){.aeris-organization-chart__node[data-selectable=true]:hover{border-color:var(--aeris-focus, #111111);background:var(--aeris-surface-2, #f3f3f3)}}.aeris-organization-chart__node[data-selected=true]{border-color:color-mix(in srgb,var(--aeris-primary, #111111) 58%,var(--aeris-border, #efefef));background:var(--aeris-primary-soft, #eef2e6);color:var(--aeris-primary-text, #111111)}.aeris-organization-chart__node:focus-visible,.aeris-organization-chart__toggle:focus-visible{outline:0;box-shadow:var(--aeris-organization-chart-node-shadow, 0 .75rem 1.75rem rgba(31, 35, 27, .08)),0 0 0 3px color-mix(in srgb,var(--aeris-focus, #111111) 24%,transparent)}.aeris-organization-chart__label{font-size:var(--aeris-font-size-lg, .875rem);font-weight:var(--aeris-font-weight-bold, 700);line-height:var(--aeris-line-height-tight, 1.25)}.aeris-organization-chart__node small{color:var(--aeris-text-muted, #6d7068);font-size:var(--aeris-font-size-sm, .75rem);font-weight:var(--aeris-font-weight-semibold, 600)}.aeris-organization-chart__toggle{width:1.625rem;height:1.625rem;display:grid;place-items:center;margin-top:.625rem;padding:0;border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-surface, #fff);color:var(--aeris-text, #111111);cursor:pointer}@media(hover:hover){.aeris-organization-chart__toggle:hover{border-color:var(--aeris-focus, #111111);background:var(--aeris-surface-2, #f3f3f3)}}.aeris-organization-chart__toggle span{width:1rem;height:1rem;display:block;background:currentColor;transform:rotate(0);transition:transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease);-webkit-mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat}.aeris-organization-chart__toggle[aria-expanded=false] span{transform:rotate(180deg)}.aeris-organization-chart__children{position:relative;gap:0;transform-origin:top center}.aeris-organization-chart__children--enter{animation:aeris-organization-chart-children-enter var(--aeris-motion-slow, .22s) var(--aeris-ease-enter, ease-out) both}.aeris-organization-chart__children--leave{animation:aeris-organization-chart-children-leave var(--aeris-motion-normal, .15s) var(--aeris-ease-exit, ease-in) both}.aeris-organization-chart__children>.aeris-organization-chart__branch{padding-top:var(--aeris-organization-chart-level-gap, 2rem)}.aeris-organization-chart__children:before{position:absolute;top:0;left:50%;width:1px;height:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__children>.aeris-organization-chart__branch:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:after{position:absolute;top:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);height:1px;background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__children>.aeris-organization-chart__branch:before{right:50%;left:0}.aeris-organization-chart__children>.aeris-organization-chart__branch:after{right:0;left:50%}.aeris-organization-chart__children>.aeris-organization-chart__branch:first-child:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:last-child:after{content:none}.aeris-organization-chart__children>.aeris-organization-chart__branch:only-child:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:only-child:after{content:none}.aeris-organization-chart__children>.aeris-organization-chart__branch>.aeris-organization-chart__node-shell:before{position:absolute;top:calc(-1 * var(--aeris-organization-chart-level-gap, 2rem) / 2);left:50%;width:1px;height:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__empty{min-height:10rem;display:grid;place-items:center;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem));background:var(--aeris-surface, #fff);color:var(--aeris-text-muted, #6d7068);text-align:center}@keyframes aeris-organization-chart-children-enter{0%{opacity:0;transform:translateY(calc(var(--aeris-motion-distance, .25rem) * -1)) scale(var(--aeris-motion-scale, .985))}}:host [data-aeris-custom-icon]:not([data-aeris-global-icon]){display:inline-flex;align-items:center;justify-content:center;inline-size:var(--aeris-icon-size, 1rem);block-size:var(--aeris-icon-size, 1rem);background:transparent;border:0;box-shadow:none;-webkit-mask:none;mask:none;line-height:1}:host [data-aeris-custom-icon]:before,:host [data-aeris-custom-icon]:after{display:none}@keyframes aeris-organization-chart-children-leave{to{opacity:0;transform:translateY(calc(var(--aeris-motion-distance, .25rem) * -1)) scale(var(--aeris-motion-scale, .985))}}@media(prefers-reduced-motion:reduce){.aeris-organization-chart__toggle span{transition:none}.aeris-organization-chart__children--enter,.aeris-organization-chart__children--leave{animation:none}}@media(max-width:44rem){.aeris-organization-chart__node{min-width:var(--aeris-organization-chart-node-min-width, 8.5rem)}}\n"],
479
+ styles: [":host{--_aeris-chevron-mask: var( --aeris-icon-chevron, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m6 9 6 6 6-6\"/%3E%3C/svg%3E') );display:block;min-width:0;max-width:100%}.aeris-organization-chart{width:max-content;min-width:0;max-width:100%;color:var(--aeris-text, #111111)}.aeris-organization-chart[data-fluid=true]{width:100%}.aeris-organization-chart__viewport{box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:var(--aeris-organization-chart-padding, 1rem);overflow:auto}.aeris-organization-chart__tree,.aeris-organization-chart__children{display:flex;justify-content:center;width:max-content;margin:0;padding:0;list-style:none}.aeris-organization-chart__tree{min-width:100%}.aeris-organization-chart__branch{outline:none;position:relative;display:grid;justify-items:center;padding:0 var(--aeris-organization-chart-node-gap, .625rem)}.aeris-organization-chart__node-shell{position:relative;display:grid;justify-items:center}.aeris-organization-chart__node{min-width:var(--aeris-organization-chart-node-min-width, 9.5rem);max-width:var(--aeris-organization-chart-node-max-width, 14rem);display:grid;gap:.25rem;padding:var(--aeris-organization-chart-node-padding, .625rem .75rem);border:1px solid var(--aeris-organization-chart-node-border, var(--aeris-border));border-radius:var(--aeris-organization-chart-node-radius, var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem)));background:var(--aeris-organization-chart-node-background, var(--aeris-surface, #fff));color:var(--aeris-organization-chart-node-color, var(--aeris-text, #111111));box-shadow:var(--aeris-organization-chart-node-shadow, 0 .75rem 1.75rem rgba(31, 35, 27, .08));text-align:center;cursor:default}.aeris-organization-chart__node[data-selectable=true]{cursor:pointer}@media(hover:hover){.aeris-organization-chart__node[data-selectable=true]:hover{border-color:var(--aeris-focus, #111111);background:var(--aeris-surface-2, #f3f3f3)}}.aeris-organization-chart__node[data-selected=true]{border-color:color-mix(in srgb,var(--aeris-primary, #111111) 58%,var(--aeris-border, #efefef));background:var(--aeris-primary-soft, #eef2e6);color:var(--aeris-primary-text, #111111)}.aeris-organization-chart__branch:focus-visible>.aeris-organization-chart__node-shell>.aeris-organization-chart__node,.aeris-organization-chart__toggle:focus-visible{outline:0;box-shadow:var(--aeris-organization-chart-node-shadow, 0 .75rem 1.75rem rgba(31, 35, 27, .08)),0 0 0 3px color-mix(in srgb,var(--aeris-focus, #111111) 24%,transparent)}.aeris-organization-chart__label{font-size:var(--aeris-font-size-lg, .875rem);font-weight:var(--aeris-font-weight-bold, 700);line-height:var(--aeris-line-height-tight, 1.25)}.aeris-organization-chart__node small{color:var(--aeris-text-muted, #6d7068);font-size:var(--aeris-font-size-sm, .75rem);font-weight:var(--aeris-font-weight-semibold, 600)}.aeris-organization-chart__toggle{width:1.625rem;height:1.625rem;display:grid;place-items:center;margin-top:.625rem;padding:0;border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-surface, #fff);color:var(--aeris-text, #111111);cursor:pointer}@media(hover:hover){.aeris-organization-chart__toggle:hover{border-color:var(--aeris-focus, #111111);background:var(--aeris-surface-2, #f3f3f3)}}.aeris-organization-chart__toggle span{width:1rem;height:1rem;display:block;background:currentColor;transform:rotate(0);transition:transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease);-webkit-mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat}.aeris-organization-chart__toggle[aria-expanded=false] span{transform:rotate(180deg)}.aeris-organization-chart__children{position:relative;gap:0;transform-origin:top center}.aeris-organization-chart__children--enter{animation:aeris-organization-chart-children-enter var(--aeris-motion-slow, .22s) var(--aeris-ease-enter, ease-out) both}.aeris-organization-chart__children--leave{animation:aeris-organization-chart-children-leave var(--aeris-motion-normal, .15s) var(--aeris-ease-exit, ease-in) both}.aeris-organization-chart__children>.aeris-organization-chart__branch{padding-top:var(--aeris-organization-chart-level-gap, 2rem)}.aeris-organization-chart__children:before{position:absolute;top:0;left:50%;width:1px;height:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__children>.aeris-organization-chart__branch:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:after{position:absolute;top:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);height:1px;background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__children>.aeris-organization-chart__branch:before{right:50%;left:0}.aeris-organization-chart__children>.aeris-organization-chart__branch:after{right:0;left:50%}.aeris-organization-chart__children>.aeris-organization-chart__branch:first-child:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:last-child:after{content:none}.aeris-organization-chart__children>.aeris-organization-chart__branch:only-child:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:only-child:after{content:none}.aeris-organization-chart__children>.aeris-organization-chart__branch>.aeris-organization-chart__node-shell:before{position:absolute;top:calc(-1 * var(--aeris-organization-chart-level-gap, 2rem) / 2);left:50%;width:1px;height:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__empty{min-height:10rem;display:grid;place-items:center;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem));background:var(--aeris-surface, #fff);color:var(--aeris-text-muted, #6d7068);text-align:center}@keyframes aeris-organization-chart-children-enter{0%{opacity:0;transform:translateY(calc(var(--aeris-motion-distance, .25rem) * -1)) scale(var(--aeris-motion-scale, .985))}}:host [data-aeris-custom-icon]:not([data-aeris-global-icon]){display:inline-flex;align-items:center;justify-content:center;inline-size:var(--aeris-icon-size, 1rem);block-size:var(--aeris-icon-size, 1rem);background:transparent;border:0;box-shadow:none;-webkit-mask:none;mask:none;line-height:1}:host [data-aeris-custom-icon]:before,:host [data-aeris-custom-icon]:after{display:none}@keyframes aeris-organization-chart-children-leave{to{opacity:0;transform:translateY(calc(var(--aeris-motion-distance, .25rem) * -1)) scale(var(--aeris-motion-scale, .985))}}@media(prefers-reduced-motion:reduce){.aeris-organization-chart__toggle span{transition:none}.aeris-organization-chart__children--enter,.aeris-organization-chart__children--leave{animation:none}}@media(max-width:44rem){.aeris-organization-chart__node{min-width:var(--aeris-organization-chart-node-min-width, 8.5rem)}}\n"],
423
480
  dependencies: [{
424
481
  kind: "component",
425
482
  type: ɵAerisIcon,
@@ -439,7 +496,7 @@ var AerisOrganizationChart = class AerisOrganizationChart {
439
496
  };
440
497
  i0.ɵɵngDeclareClassMetadata({
441
498
  minVersion: "12.0.0",
442
- version: "22.2.3",
499
+ version: "22.2.4",
443
500
  ngImport: i0,
444
501
  type: AerisOrganizationChart,
445
502
  decorators: [{
@@ -450,25 +507,28 @@ i0.ɵɵngDeclareClassMetadata({
450
507
  template: `
451
508
  <div class="aeris-organization-chart" [attr.data-fluid]="fluid() || null">
452
509
  @if (value().length) {
453
- <div class="aeris-organization-chart__viewport" tabindex="0">
510
+ <div class="aeris-organization-chart__viewport">
454
511
  <ng-template #nodeTemplate let-node let-key="key" let-level="level">
455
- <li class="aeris-organization-chart__branch">
512
+ <li
513
+ #nodeElement
514
+ class="aeris-organization-chart__branch"
515
+ role="treeitem"
516
+ [tabIndex]="activeKey() === key ? 0 : -1"
517
+ [attr.aria-label]="nodeAriaLabel(node)"
518
+ [attr.aria-selected]="selectionMode() ? isSelected(key) : null"
519
+ [attr.aria-expanded]="hasChildren(node) ? !isCollapsed(key) : null"
520
+ [attr.data-aeris-key]="key"
521
+ (click)="selectNode(node, key, $event)"
522
+ (keydown)="handleNodeKeydown($event, node, key)"
523
+ (focusin)="handleNodeFocus($event, key)"
524
+ >
456
525
  <div class="aeris-organization-chart__node-shell">
457
526
  <div
458
- #nodeElement
459
527
  class="aeris-organization-chart__node"
460
- role="treeitem"
461
- tabindex="0"
462
- [attr.aria-label]="nodeAriaLabel(node)"
463
- [attr.aria-selected]="selectionMode() ? isSelected(key) : null"
464
- [attr.aria-expanded]="hasChildren(node) ? !isCollapsed(key) : null"
465
528
  [attr.data-selected]="isSelected(key) || null"
466
529
  [attr.data-selectable]="isNodeSelectable(node) || null"
467
530
  [attr.data-type]="node.type || null"
468
- [attr.data-aeris-key]="key"
469
531
  [style.--aeris-org-level]="level"
470
- (click)="selectNode(node, key, $event)"
471
- (keydown)="handleNodeKeydown($event, node, key)"
472
532
  >
473
533
  @if (nodeTemplateDirective(); as customNode) {
474
534
  <ng-container
@@ -495,6 +555,7 @@ i0.ɵɵngDeclareClassMetadata({
495
555
  <button
496
556
  class="aeris-organization-chart__toggle"
497
557
  type="button"
558
+ tabindex="-1"
498
559
  [attr.aria-label]="isCollapsed(key) ? expandAriaLabel() : collapseAriaLabel()"
499
560
  [attr.aria-expanded]="!isCollapsed(key)"
500
561
  (click)="toggleNode(node, key, $event)"
@@ -536,7 +597,12 @@ i0.ɵɵngDeclareClassMetadata({
536
597
  </li>
537
598
  </ng-template>
538
599
 
539
- <ul class="aeris-organization-chart__tree" role="tree" [attr.aria-label]="ariaLabel()">
600
+ <ul
601
+ class="aeris-organization-chart__tree"
602
+ role="tree"
603
+ [attr.aria-label]="ariaLabel()"
604
+ [attr.aria-multiselectable]="selectionMode() === 'multiple' ? true : null"
605
+ >
540
606
  @for (node of value(); track nodeKey(node, $index); let index = $index) {
541
607
  <ng-container
542
608
  [ngTemplateOutlet]="nodeTemplate"
@@ -560,9 +626,10 @@ i0.ɵɵngDeclareClassMetadata({
560
626
  }
561
627
  </div>
562
628
  `,
563
- styles: [":host{--_aeris-chevron-mask: var( --aeris-icon-chevron, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m6 9 6 6 6-6\"/%3E%3C/svg%3E') );display:block;min-width:0;max-width:100%}.aeris-organization-chart{width:max-content;min-width:0;max-width:100%;color:var(--aeris-text, #111111)}.aeris-organization-chart[data-fluid=true]{width:100%}.aeris-organization-chart__viewport{box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:var(--aeris-organization-chart-padding, 1rem);overflow:auto}.aeris-organization-chart__viewport:focus-visible{outline:0;box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--aeris-focus, #111111) 22%,transparent)}.aeris-organization-chart__tree,.aeris-organization-chart__children{display:flex;justify-content:center;width:max-content;margin:0;padding:0;list-style:none}.aeris-organization-chart__tree{min-width:100%}.aeris-organization-chart__branch{position:relative;display:grid;justify-items:center;padding:0 var(--aeris-organization-chart-node-gap, .625rem)}.aeris-organization-chart__node-shell{position:relative;display:grid;justify-items:center}.aeris-organization-chart__node{min-width:var(--aeris-organization-chart-node-min-width, 9.5rem);max-width:var(--aeris-organization-chart-node-max-width, 14rem);display:grid;gap:.25rem;padding:var(--aeris-organization-chart-node-padding, .625rem .75rem);border:1px solid var(--aeris-organization-chart-node-border, var(--aeris-border));border-radius:var(--aeris-organization-chart-node-radius, var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem)));background:var(--aeris-organization-chart-node-background, var(--aeris-surface, #fff));color:var(--aeris-organization-chart-node-color, var(--aeris-text, #111111));box-shadow:var(--aeris-organization-chart-node-shadow, 0 .75rem 1.75rem rgba(31, 35, 27, .08));text-align:center;cursor:default}.aeris-organization-chart__node[data-selectable=true]{cursor:pointer}@media(hover:hover){.aeris-organization-chart__node[data-selectable=true]:hover{border-color:var(--aeris-focus, #111111);background:var(--aeris-surface-2, #f3f3f3)}}.aeris-organization-chart__node[data-selected=true]{border-color:color-mix(in srgb,var(--aeris-primary, #111111) 58%,var(--aeris-border, #efefef));background:var(--aeris-primary-soft, #eef2e6);color:var(--aeris-primary-text, #111111)}.aeris-organization-chart__node:focus-visible,.aeris-organization-chart__toggle:focus-visible{outline:0;box-shadow:var(--aeris-organization-chart-node-shadow, 0 .75rem 1.75rem rgba(31, 35, 27, .08)),0 0 0 3px color-mix(in srgb,var(--aeris-focus, #111111) 24%,transparent)}.aeris-organization-chart__label{font-size:var(--aeris-font-size-lg, .875rem);font-weight:var(--aeris-font-weight-bold, 700);line-height:var(--aeris-line-height-tight, 1.25)}.aeris-organization-chart__node small{color:var(--aeris-text-muted, #6d7068);font-size:var(--aeris-font-size-sm, .75rem);font-weight:var(--aeris-font-weight-semibold, 600)}.aeris-organization-chart__toggle{width:1.625rem;height:1.625rem;display:grid;place-items:center;margin-top:.625rem;padding:0;border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-surface, #fff);color:var(--aeris-text, #111111);cursor:pointer}@media(hover:hover){.aeris-organization-chart__toggle:hover{border-color:var(--aeris-focus, #111111);background:var(--aeris-surface-2, #f3f3f3)}}.aeris-organization-chart__toggle span{width:1rem;height:1rem;display:block;background:currentColor;transform:rotate(0);transition:transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease);-webkit-mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat}.aeris-organization-chart__toggle[aria-expanded=false] span{transform:rotate(180deg)}.aeris-organization-chart__children{position:relative;gap:0;transform-origin:top center}.aeris-organization-chart__children--enter{animation:aeris-organization-chart-children-enter var(--aeris-motion-slow, .22s) var(--aeris-ease-enter, ease-out) both}.aeris-organization-chart__children--leave{animation:aeris-organization-chart-children-leave var(--aeris-motion-normal, .15s) var(--aeris-ease-exit, ease-in) both}.aeris-organization-chart__children>.aeris-organization-chart__branch{padding-top:var(--aeris-organization-chart-level-gap, 2rem)}.aeris-organization-chart__children:before{position:absolute;top:0;left:50%;width:1px;height:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__children>.aeris-organization-chart__branch:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:after{position:absolute;top:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);height:1px;background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__children>.aeris-organization-chart__branch:before{right:50%;left:0}.aeris-organization-chart__children>.aeris-organization-chart__branch:after{right:0;left:50%}.aeris-organization-chart__children>.aeris-organization-chart__branch:first-child:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:last-child:after{content:none}.aeris-organization-chart__children>.aeris-organization-chart__branch:only-child:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:only-child:after{content:none}.aeris-organization-chart__children>.aeris-organization-chart__branch>.aeris-organization-chart__node-shell:before{position:absolute;top:calc(-1 * var(--aeris-organization-chart-level-gap, 2rem) / 2);left:50%;width:1px;height:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__empty{min-height:10rem;display:grid;place-items:center;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem));background:var(--aeris-surface, #fff);color:var(--aeris-text-muted, #6d7068);text-align:center}@keyframes aeris-organization-chart-children-enter{0%{opacity:0;transform:translateY(calc(var(--aeris-motion-distance, .25rem) * -1)) scale(var(--aeris-motion-scale, .985))}}:host [data-aeris-custom-icon]:not([data-aeris-global-icon]){display:inline-flex;align-items:center;justify-content:center;inline-size:var(--aeris-icon-size, 1rem);block-size:var(--aeris-icon-size, 1rem);background:transparent;border:0;box-shadow:none;-webkit-mask:none;mask:none;line-height:1}:host [data-aeris-custom-icon]:before,:host [data-aeris-custom-icon]:after{display:none}@keyframes aeris-organization-chart-children-leave{to{opacity:0;transform:translateY(calc(var(--aeris-motion-distance, .25rem) * -1)) scale(var(--aeris-motion-scale, .985))}}@media(prefers-reduced-motion:reduce){.aeris-organization-chart__toggle span{transition:none}.aeris-organization-chart__children--enter,.aeris-organization-chart__children--leave{animation:none}}@media(max-width:44rem){.aeris-organization-chart__node{min-width:var(--aeris-organization-chart-node-min-width, 8.5rem)}}\n"]
629
+ styles: [":host{--_aeris-chevron-mask: var( --aeris-icon-chevron, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m6 9 6 6 6-6\"/%3E%3C/svg%3E') );display:block;min-width:0;max-width:100%}.aeris-organization-chart{width:max-content;min-width:0;max-width:100%;color:var(--aeris-text, #111111)}.aeris-organization-chart[data-fluid=true]{width:100%}.aeris-organization-chart__viewport{box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:var(--aeris-organization-chart-padding, 1rem);overflow:auto}.aeris-organization-chart__tree,.aeris-organization-chart__children{display:flex;justify-content:center;width:max-content;margin:0;padding:0;list-style:none}.aeris-organization-chart__tree{min-width:100%}.aeris-organization-chart__branch{outline:none;position:relative;display:grid;justify-items:center;padding:0 var(--aeris-organization-chart-node-gap, .625rem)}.aeris-organization-chart__node-shell{position:relative;display:grid;justify-items:center}.aeris-organization-chart__node{min-width:var(--aeris-organization-chart-node-min-width, 9.5rem);max-width:var(--aeris-organization-chart-node-max-width, 14rem);display:grid;gap:.25rem;padding:var(--aeris-organization-chart-node-padding, .625rem .75rem);border:1px solid var(--aeris-organization-chart-node-border, var(--aeris-border));border-radius:var(--aeris-organization-chart-node-radius, var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem)));background:var(--aeris-organization-chart-node-background, var(--aeris-surface, #fff));color:var(--aeris-organization-chart-node-color, var(--aeris-text, #111111));box-shadow:var(--aeris-organization-chart-node-shadow, 0 .75rem 1.75rem rgba(31, 35, 27, .08));text-align:center;cursor:default}.aeris-organization-chart__node[data-selectable=true]{cursor:pointer}@media(hover:hover){.aeris-organization-chart__node[data-selectable=true]:hover{border-color:var(--aeris-focus, #111111);background:var(--aeris-surface-2, #f3f3f3)}}.aeris-organization-chart__node[data-selected=true]{border-color:color-mix(in srgb,var(--aeris-primary, #111111) 58%,var(--aeris-border, #efefef));background:var(--aeris-primary-soft, #eef2e6);color:var(--aeris-primary-text, #111111)}.aeris-organization-chart__branch:focus-visible>.aeris-organization-chart__node-shell>.aeris-organization-chart__node,.aeris-organization-chart__toggle:focus-visible{outline:0;box-shadow:var(--aeris-organization-chart-node-shadow, 0 .75rem 1.75rem rgba(31, 35, 27, .08)),0 0 0 3px color-mix(in srgb,var(--aeris-focus, #111111) 24%,transparent)}.aeris-organization-chart__label{font-size:var(--aeris-font-size-lg, .875rem);font-weight:var(--aeris-font-weight-bold, 700);line-height:var(--aeris-line-height-tight, 1.25)}.aeris-organization-chart__node small{color:var(--aeris-text-muted, #6d7068);font-size:var(--aeris-font-size-sm, .75rem);font-weight:var(--aeris-font-weight-semibold, 600)}.aeris-organization-chart__toggle{width:1.625rem;height:1.625rem;display:grid;place-items:center;margin-top:.625rem;padding:0;border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-surface, #fff);color:var(--aeris-text, #111111);cursor:pointer}@media(hover:hover){.aeris-organization-chart__toggle:hover{border-color:var(--aeris-focus, #111111);background:var(--aeris-surface-2, #f3f3f3)}}.aeris-organization-chart__toggle span{width:1rem;height:1rem;display:block;background:currentColor;transform:rotate(0);transition:transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease);-webkit-mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat}.aeris-organization-chart__toggle[aria-expanded=false] span{transform:rotate(180deg)}.aeris-organization-chart__children{position:relative;gap:0;transform-origin:top center}.aeris-organization-chart__children--enter{animation:aeris-organization-chart-children-enter var(--aeris-motion-slow, .22s) var(--aeris-ease-enter, ease-out) both}.aeris-organization-chart__children--leave{animation:aeris-organization-chart-children-leave var(--aeris-motion-normal, .15s) var(--aeris-ease-exit, ease-in) both}.aeris-organization-chart__children>.aeris-organization-chart__branch{padding-top:var(--aeris-organization-chart-level-gap, 2rem)}.aeris-organization-chart__children:before{position:absolute;top:0;left:50%;width:1px;height:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__children>.aeris-organization-chart__branch:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:after{position:absolute;top:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);height:1px;background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__children>.aeris-organization-chart__branch:before{right:50%;left:0}.aeris-organization-chart__children>.aeris-organization-chart__branch:after{right:0;left:50%}.aeris-organization-chart__children>.aeris-organization-chart__branch:first-child:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:last-child:after{content:none}.aeris-organization-chart__children>.aeris-organization-chart__branch:only-child:before,.aeris-organization-chart__children>.aeris-organization-chart__branch:only-child:after{content:none}.aeris-organization-chart__children>.aeris-organization-chart__branch>.aeris-organization-chart__node-shell:before{position:absolute;top:calc(-1 * var(--aeris-organization-chart-level-gap, 2rem) / 2);left:50%;width:1px;height:calc(var(--aeris-organization-chart-level-gap, 2rem) / 2);background:var(--aeris-organization-chart-connector, var(--aeris-border));content:\"\"}.aeris-organization-chart__empty{min-height:10rem;display:grid;place-items:center;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem));background:var(--aeris-surface, #fff);color:var(--aeris-text-muted, #6d7068);text-align:center}@keyframes aeris-organization-chart-children-enter{0%{opacity:0;transform:translateY(calc(var(--aeris-motion-distance, .25rem) * -1)) scale(var(--aeris-motion-scale, .985))}}:host [data-aeris-custom-icon]:not([data-aeris-global-icon]){display:inline-flex;align-items:center;justify-content:center;inline-size:var(--aeris-icon-size, 1rem);block-size:var(--aeris-icon-size, 1rem);background:transparent;border:0;box-shadow:none;-webkit-mask:none;mask:none;line-height:1}:host [data-aeris-custom-icon]:before,:host [data-aeris-custom-icon]:after{display:none}@keyframes aeris-organization-chart-children-leave{to{opacity:0;transform:translateY(calc(var(--aeris-motion-distance, .25rem) * -1)) scale(var(--aeris-motion-scale, .985))}}@media(prefers-reduced-motion:reduce){.aeris-organization-chart__toggle span{transition:none}.aeris-organization-chart__children--enter,.aeris-organization-chart__children--leave{animation:none}}@media(max-width:44rem){.aeris-organization-chart__node{min-width:var(--aeris-organization-chart-node-min-width, 8.5rem)}}\n"]
564
630
  }]
565
631
  }],
632
+ ctorParameters: () => [],
566
633
  propDecorators: {
567
634
  toggleIconTemplate: [{
568
635
  type: i0.Input,
@@ -1 +1 @@
1
- {"version":3,"file":"aeris-ui-core-organization-chart.mjs","names":[],"sources":["../../../projects/aeris-ui/organization-chart/aeris-organization-chart.ts"],"sourcesContent":["import { ɵAerisIcon } from '@aeris-ui/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n Directive,\n ElementRef,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n viewChildren,\n} from '@angular/core';\n\nexport type AerisOrganizationChartSelectionMode = 'single' | 'multiple';\n\nexport interface AerisOrganizationChartNode<TData = unknown> {\n readonly key?: string;\n readonly label?: string;\n readonly type?: string;\n readonly data?: TData;\n readonly children?: readonly AerisOrganizationChartNode<TData>[];\n readonly selectable?: boolean;\n readonly expanded?: boolean;\n}\n\nexport interface AerisOrganizationChartNodeEvent<TData = unknown> {\n readonly originalEvent: Event;\n readonly node: AerisOrganizationChartNode<TData>;\n readonly key: string;\n}\n\nexport interface AerisOrganizationChartSelectionEvent<TData = unknown> {\n readonly originalEvent: Event;\n readonly selectedKeys: readonly string[];\n readonly node: AerisOrganizationChartNode<TData>;\n readonly key: string;\n}\n\ninterface AerisOrganizationChartNodeContext<TData = unknown> {\n readonly $implicit: AerisOrganizationChartNode<TData>;\n readonly node: AerisOrganizationChartNode<TData>;\n readonly key: string;\n readonly selected: boolean;\n readonly expanded: boolean;\n readonly leaf: boolean;\n readonly level: number;\n}\n\n@Directive({ selector: 'ng-template[aerisOrganizationChartNode]' })\nexport class AerisOrganizationChartNodeTemplate<TData = unknown> {\n readonly template = inject<TemplateRef<AerisOrganizationChartNodeContext<TData>>>(TemplateRef);\n\n static ngTemplateContextGuard<TData>(\n _directive: AerisOrganizationChartNodeTemplate<TData>,\n context: unknown,\n ): context is AerisOrganizationChartNodeContext<TData> {\n return true;\n }\n}\n\n@Directive({ selector: 'ng-template[aerisOrganizationChartEmpty]' })\nexport class AerisOrganizationChartEmptyTemplate {\n readonly template = inject<TemplateRef<void>>(TemplateRef);\n}\n\n@Component({\n selector: 'aeris-organization-chart',\n imports: [ɵAerisIcon, NgTemplateOutlet],\n template: `\n <div class=\"aeris-organization-chart\" [attr.data-fluid]=\"fluid() || null\">\n @if (value().length) {\n <div class=\"aeris-organization-chart__viewport\" tabindex=\"0\">\n <ng-template #nodeTemplate let-node let-key=\"key\" let-level=\"level\">\n <li class=\"aeris-organization-chart__branch\">\n <div class=\"aeris-organization-chart__node-shell\">\n <div\n #nodeElement\n class=\"aeris-organization-chart__node\"\n role=\"treeitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"nodeAriaLabel(node)\"\n [attr.aria-selected]=\"selectionMode() ? isSelected(key) : null\"\n [attr.aria-expanded]=\"hasChildren(node) ? !isCollapsed(key) : null\"\n [attr.data-selected]=\"isSelected(key) || null\"\n [attr.data-selectable]=\"isNodeSelectable(node) || null\"\n [attr.data-type]=\"node.type || null\"\n [attr.data-aeris-key]=\"key\"\n [style.--aeris-org-level]=\"level\"\n (click)=\"selectNode(node, key, $event)\"\n (keydown)=\"handleNodeKeydown($event, node, key)\"\n >\n @if (nodeTemplateDirective(); as customNode) {\n <ng-container\n [ngTemplateOutlet]=\"customNode.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: node,\n node,\n key,\n selected: isSelected(key),\n expanded: !isCollapsed(key),\n leaf: !hasChildren(node),\n level,\n }\"\n />\n } @else {\n <span class=\"aeris-organization-chart__label\">{{ nodeLabel(node) }}</span>\n @if (node.type) {\n <small>{{ node.type }}</small>\n }\n }\n </div>\n\n @if (collapsible() && hasChildren(node)) {\n <button\n class=\"aeris-organization-chart__toggle\"\n type=\"button\"\n [attr.aria-label]=\"isCollapsed(key) ? expandAriaLabel() : collapseAriaLabel()\"\n [attr.aria-expanded]=\"!isCollapsed(key)\"\n (click)=\"toggleNode(node, key, $event)\"\n >\n @if (toggleIconTemplate(); as customIcon) {\n <span aria-hidden=\"true\" data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span aerisInternalIcon=\"chevron\" aria-hidden=\"true\"></span>\n }\n </button>\n }\n </div>\n\n @if (hasVisibleChildren(node, key)) {\n <ul\n role=\"group\"\n class=\"aeris-organization-chart__children\"\n animate.enter=\"aeris-organization-chart__children--enter\"\n animate.leave=\"aeris-organization-chart__children--leave\"\n >\n @for (\n child of visibleChildren(node, key);\n track nodeKey(child, childIndex);\n let childIndex = $index\n ) {\n <ng-container\n [ngTemplateOutlet]=\"nodeTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: child,\n key: nodeKey(child, key + '-' + childIndex),\n level: level + 1,\n }\"\n />\n }\n </ul>\n }\n </li>\n </ng-template>\n\n <ul class=\"aeris-organization-chart__tree\" role=\"tree\" [attr.aria-label]=\"ariaLabel()\">\n @for (node of value(); track nodeKey(node, $index); let index = $index) {\n <ng-container\n [ngTemplateOutlet]=\"nodeTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: node,\n key: nodeKey(node, index),\n level: 1,\n }\"\n />\n }\n </ul>\n </div>\n } @else {\n <div class=\"aeris-organization-chart__empty\" role=\"status\">\n @if (emptyTemplate(); as customEmpty) {\n <ng-container [ngTemplateOutlet]=\"customEmpty.template\" />\n } @else {\n {{ emptyMessage() }}\n }\n </div>\n }\n </div>\n `,\n styleUrl: './aeris-organization-chart.scss',\n})\nexport class AerisOrganizationChart<TData = unknown> {\n readonly toggleIconTemplate = input<TemplateRef<void>>();\n\n readonly value = input<readonly AerisOrganizationChartNode<TData>[]>([]);\n readonly selectionKeys = model<readonly string[]>([]);\n readonly collapsedKeys = model<readonly string[]>([]);\n readonly selectionMode = input<AerisOrganizationChartSelectionMode | null>(null);\n readonly collapsible = input(true, { transform: booleanAttribute });\n readonly fluid = input(true, { transform: booleanAttribute });\n readonly ariaLabel = input('Organization chart');\n readonly emptyMessage = input('No organization chart data available');\n readonly expandAriaLabel = input('Expand node');\n readonly collapseAriaLabel = input('Collapse node');\n\n readonly nodeSelected = output<AerisOrganizationChartSelectionEvent<TData>>();\n readonly nodeUnselected = output<AerisOrganizationChartSelectionEvent<TData>>();\n readonly selectionChanged = output<AerisOrganizationChartSelectionEvent<TData>>();\n readonly nodeExpanded = output<AerisOrganizationChartNodeEvent<TData>>();\n readonly nodeCollapsed = output<AerisOrganizationChartNodeEvent<TData>>();\n\n protected readonly nodeTemplateDirective = contentChild(\n AerisOrganizationChartNodeTemplate<TData>,\n );\n protected readonly emptyTemplate = contentChild(AerisOrganizationChartEmptyTemplate);\n private readonly nodeElements = viewChildren<ElementRef<HTMLElement>>('nodeElement');\n protected readonly renderedKeys = computed(() => this.collectRenderedKeys(this.value()));\n\n protected nodeKey(node: AerisOrganizationChartNode<TData>, fallback: string | number): string {\n return node.key ?? String(fallback);\n }\n\n protected nodeLabel(node: AerisOrganizationChartNode<TData>): string {\n return node.label ?? '';\n }\n\n protected nodeAriaLabel(node: AerisOrganizationChartNode<TData>): string {\n return this.nodeLabel(node) || node.type || 'Organization chart node';\n }\n\n protected hasChildren(node: AerisOrganizationChartNode<TData>): boolean {\n return Boolean(node.children?.length);\n }\n\n protected isCollapsed(key: string): boolean {\n return this.collapsedKeys().includes(key);\n }\n\n protected hasVisibleChildren(node: AerisOrganizationChartNode<TData>, key: string): boolean {\n return this.hasChildren(node) && !this.isCollapsed(key);\n }\n\n protected visibleChildren(\n node: AerisOrganizationChartNode<TData>,\n key: string,\n ): readonly AerisOrganizationChartNode<TData>[] {\n return this.hasVisibleChildren(node, key) ? (node.children ?? []) : [];\n }\n\n protected isSelected(key: string): boolean {\n return this.selectionKeys().includes(key);\n }\n\n protected isNodeSelectable(node: AerisOrganizationChartNode<TData>): boolean {\n return Boolean(this.selectionMode()) && node.selectable !== false;\n }\n\n protected selectNode(\n node: AerisOrganizationChartNode<TData>,\n key: string,\n originalEvent: Event,\n ): void {\n if (!this.isNodeSelectable(node)) return;\n\n const wasSelected = this.isSelected(key);\n const selectedKeys =\n this.selectionMode() === 'single'\n ? wasSelected\n ? []\n : [key]\n : wasSelected\n ? this.selectionKeys().filter((selectedKey) => selectedKey !== key)\n : [...this.selectionKeys(), key];\n\n this.selectionKeys.set(selectedKeys);\n const event = { originalEvent, selectedKeys, node, key };\n this.selectionChanged.emit(event);\n if (wasSelected) {\n this.nodeUnselected.emit(event);\n } else {\n this.nodeSelected.emit(event);\n }\n }\n\n protected toggleNode(\n node: AerisOrganizationChartNode<TData>,\n key: string,\n originalEvent: Event,\n ): void {\n originalEvent.stopPropagation();\n if (!this.hasChildren(node)) return;\n\n if (this.isCollapsed(key)) {\n this.collapsedKeys.set(this.collapsedKeys().filter((item) => item !== key));\n this.nodeExpanded.emit({ originalEvent, node, key });\n } else {\n this.collapsedKeys.set([...this.collapsedKeys(), key]);\n this.nodeCollapsed.emit({ originalEvent, node, key });\n }\n }\n\n protected handleNodeKeydown(\n event: KeyboardEvent,\n node: AerisOrganizationChartNode<TData>,\n key: string,\n ): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.selectNode(node, key, event);\n } else if (event.key === 'ArrowLeft' && this.hasChildren(node) && !this.isCollapsed(key)) {\n event.preventDefault();\n this.toggleNode(node, key, event);\n } else if (event.key === 'ArrowRight' && this.hasChildren(node) && this.isCollapsed(key)) {\n event.preventDefault();\n this.toggleNode(node, key, event);\n } else if (event.key === 'Home') {\n event.preventDefault();\n this.focusRenderedKey(this.renderedKeys()[0]);\n } else if (event.key === 'End') {\n event.preventDefault();\n const keys = this.renderedKeys();\n this.focusRenderedKey(keys[keys.length - 1]);\n }\n }\n\n private collectRenderedKeys(\n nodes: readonly AerisOrganizationChartNode<TData>[],\n parentKey = '',\n ): readonly string[] {\n const keys: string[] = [];\n nodes.forEach((node, index) => {\n const key = this.nodeKey(node, parentKey ? `${parentKey}-${index}` : String(index));\n keys.push(key);\n if (node.children?.length && !this.isCollapsed(key)) {\n keys.push(...this.collectRenderedKeys(node.children, key));\n }\n });\n return keys;\n }\n\n private focusRenderedKey(key: string | undefined): void {\n if (!key) return;\n this.nodeElements()\n .find((element) => element.nativeElement.getAttribute('data-aeris-key') === key)\n ?.nativeElement.focus();\n }\n}\n\nexport const AerisOrganizationChartModule = [\n AerisOrganizationChart,\n AerisOrganizationChartNodeTemplate,\n AerisOrganizationChartEmptyTemplate,\n] as const;\n"],"mappings":";;;;AAqDA,IAAa,qCAAb,MAAa,mCAAkC;CACpC,WAAW,OAA8D,WAAW;CAE7F,OAAO,uBACL,YACA,SAAgB;EAEhB,OAAO;CACT;CARW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAkC,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAlC,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAkC,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAlC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkC,YAAA,CAAA;EAD9C,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,0CAAyC,CAAE;;;AAalE,IAAa,sCAAb,MAAa,oCAAmC;CACrC,WAAW,OAA0B,WAAW;CAD9C,OAAA,OAAA,GAAA,mBAAA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A,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,eAAA;EAAA,CAAA;EAAA,uBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,kCAAyC,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAEK,mCAAmC,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CACb,eAAa,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AAqIrF,MAAa,+BAA+B;CAC1C;CACA;CACA;AACQ"}
1
+ {"version":3,"file":"aeris-ui-core-organization-chart.mjs","names":[],"sources":["../../../projects/aeris-ui/organization-chart/aeris-organization-chart.ts"],"sourcesContent":["import { ɵAerisIcon } from '@aeris-ui/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n Directive,\n ElementRef,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n effect,\n linkedSignal,\n model,\n output,\n viewChildren,\n} from '@angular/core';\n\nexport type AerisOrganizationChartSelectionMode = 'single' | 'multiple';\n\nexport interface AerisOrganizationChartNode<TData = unknown> {\n readonly key?: string;\n readonly label?: string;\n readonly type?: string;\n readonly data?: TData;\n readonly children?: readonly AerisOrganizationChartNode<TData>[];\n readonly selectable?: boolean;\n readonly expanded?: boolean;\n}\n\ninterface OrganizationChartEntry<TData> {\n readonly key: string;\n readonly parentKey: string | null;\n readonly node: AerisOrganizationChartNode<TData>;\n}\n\nexport interface AerisOrganizationChartNodeEvent<TData = unknown> {\n readonly originalEvent: Event;\n readonly node: AerisOrganizationChartNode<TData>;\n readonly key: string;\n}\n\nexport interface AerisOrganizationChartSelectionEvent<TData = unknown> {\n readonly originalEvent: Event;\n readonly selectedKeys: readonly string[];\n readonly node: AerisOrganizationChartNode<TData>;\n readonly key: string;\n}\n\ninterface AerisOrganizationChartNodeContext<TData = unknown> {\n readonly $implicit: AerisOrganizationChartNode<TData>;\n readonly node: AerisOrganizationChartNode<TData>;\n readonly key: string;\n readonly selected: boolean;\n readonly expanded: boolean;\n readonly leaf: boolean;\n readonly level: number;\n}\n\n@Directive({ selector: 'ng-template[aerisOrganizationChartNode]' })\nexport class AerisOrganizationChartNodeTemplate<TData = unknown> {\n readonly template = inject<TemplateRef<AerisOrganizationChartNodeContext<TData>>>(TemplateRef);\n\n static ngTemplateContextGuard<TData>(\n _directive: AerisOrganizationChartNodeTemplate<TData>,\n context: unknown,\n ): context is AerisOrganizationChartNodeContext<TData> {\n return true;\n }\n}\n\n@Directive({ selector: 'ng-template[aerisOrganizationChartEmpty]' })\nexport class AerisOrganizationChartEmptyTemplate {\n readonly template = inject<TemplateRef<void>>(TemplateRef);\n}\n\n@Component({\n selector: 'aeris-organization-chart',\n imports: [ɵAerisIcon, NgTemplateOutlet],\n template: `\n <div class=\"aeris-organization-chart\" [attr.data-fluid]=\"fluid() || null\">\n @if (value().length) {\n <div class=\"aeris-organization-chart__viewport\">\n <ng-template #nodeTemplate let-node let-key=\"key\" let-level=\"level\">\n <li\n #nodeElement\n class=\"aeris-organization-chart__branch\"\n role=\"treeitem\"\n [tabIndex]=\"activeKey() === key ? 0 : -1\"\n [attr.aria-label]=\"nodeAriaLabel(node)\"\n [attr.aria-selected]=\"selectionMode() ? isSelected(key) : null\"\n [attr.aria-expanded]=\"hasChildren(node) ? !isCollapsed(key) : null\"\n [attr.data-aeris-key]=\"key\"\n (click)=\"selectNode(node, key, $event)\"\n (keydown)=\"handleNodeKeydown($event, node, key)\"\n (focusin)=\"handleNodeFocus($event, key)\"\n >\n <div class=\"aeris-organization-chart__node-shell\">\n <div\n class=\"aeris-organization-chart__node\"\n [attr.data-selected]=\"isSelected(key) || null\"\n [attr.data-selectable]=\"isNodeSelectable(node) || null\"\n [attr.data-type]=\"node.type || null\"\n [style.--aeris-org-level]=\"level\"\n >\n @if (nodeTemplateDirective(); as customNode) {\n <ng-container\n [ngTemplateOutlet]=\"customNode.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: node,\n node,\n key,\n selected: isSelected(key),\n expanded: !isCollapsed(key),\n leaf: !hasChildren(node),\n level,\n }\"\n />\n } @else {\n <span class=\"aeris-organization-chart__label\">{{ nodeLabel(node) }}</span>\n @if (node.type) {\n <small>{{ node.type }}</small>\n }\n }\n </div>\n\n @if (collapsible() && hasChildren(node)) {\n <button\n class=\"aeris-organization-chart__toggle\"\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"isCollapsed(key) ? expandAriaLabel() : collapseAriaLabel()\"\n [attr.aria-expanded]=\"!isCollapsed(key)\"\n (click)=\"toggleNode(node, key, $event)\"\n >\n @if (toggleIconTemplate(); as customIcon) {\n <span aria-hidden=\"true\" data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span aerisInternalIcon=\"chevron\" aria-hidden=\"true\"></span>\n }\n </button>\n }\n </div>\n\n @if (hasVisibleChildren(node, key)) {\n <ul\n role=\"group\"\n class=\"aeris-organization-chart__children\"\n animate.enter=\"aeris-organization-chart__children--enter\"\n animate.leave=\"aeris-organization-chart__children--leave\"\n >\n @for (\n child of visibleChildren(node, key);\n track nodeKey(child, childIndex);\n let childIndex = $index\n ) {\n <ng-container\n [ngTemplateOutlet]=\"nodeTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: child,\n key: nodeKey(child, key + '-' + childIndex),\n level: level + 1,\n }\"\n />\n }\n </ul>\n }\n </li>\n </ng-template>\n\n <ul\n class=\"aeris-organization-chart__tree\"\n role=\"tree\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-multiselectable]=\"selectionMode() === 'multiple' ? true : null\"\n >\n @for (node of value(); track nodeKey(node, $index); let index = $index) {\n <ng-container\n [ngTemplateOutlet]=\"nodeTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: node,\n key: nodeKey(node, index),\n level: 1,\n }\"\n />\n }\n </ul>\n </div>\n } @else {\n <div class=\"aeris-organization-chart__empty\" role=\"status\">\n @if (emptyTemplate(); as customEmpty) {\n <ng-container [ngTemplateOutlet]=\"customEmpty.template\" />\n } @else {\n {{ emptyMessage() }}\n }\n </div>\n }\n </div>\n `,\n styleUrl: './aeris-organization-chart.scss',\n})\nexport class AerisOrganizationChart<TData = unknown> {\n readonly toggleIconTemplate = input<TemplateRef<void>>();\n\n readonly value = input<readonly AerisOrganizationChartNode<TData>[]>([]);\n readonly selectionKeys = model<readonly string[]>([]);\n readonly collapsedKeys = model<readonly string[]>([]);\n readonly selectionMode = input<AerisOrganizationChartSelectionMode | null>(null);\n readonly collapsible = input(true, { transform: booleanAttribute });\n readonly fluid = input(true, { transform: booleanAttribute });\n readonly ariaLabel = input('Organization chart');\n readonly emptyMessage = input('No organization chart data available');\n readonly expandAriaLabel = input('Expand node');\n readonly collapseAriaLabel = input('Collapse node');\n\n readonly nodeSelected = output<AerisOrganizationChartSelectionEvent<TData>>();\n readonly nodeUnselected = output<AerisOrganizationChartSelectionEvent<TData>>();\n readonly selectionChanged = output<AerisOrganizationChartSelectionEvent<TData>>();\n readonly nodeExpanded = output<AerisOrganizationChartNodeEvent<TData>>();\n readonly nodeCollapsed = output<AerisOrganizationChartNodeEvent<TData>>();\n\n protected readonly nodeTemplateDirective = contentChild(\n AerisOrganizationChartNodeTemplate<TData>,\n );\n protected readonly emptyTemplate = contentChild(AerisOrganizationChartEmptyTemplate);\n private readonly nodeElements = viewChildren<ElementRef<HTMLElement>>('nodeElement');\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderedEntries = computed(() => this.collectRenderedEntries(this.value()));\n protected readonly activeKey = linkedSignal<\n readonly OrganizationChartEntry<TData>[],\n string | null\n >({\n source: this.renderedEntries,\n computation: (entries, previous) => {\n let key = previous?.value ?? null;\n while (key !== null) {\n if (entries.some((entry) => entry.key === key)) return key;\n key = previous?.source.find((entry) => entry.key === key)?.parentKey ?? null;\n }\n return entries[0]?.key ?? null;\n },\n });\n\n constructor() {\n effect(() => {\n const key = this.activeKey();\n const active = this.host.nativeElement.ownerDocument.activeElement;\n if (!active || !this.host.nativeElement.contains(active)) return;\n const branch = active.closest('[data-aeris-key]');\n if (\n branch &&\n !this.renderedEntries().some((entry) => entry.key === branch.getAttribute('data-aeris-key'))\n )\n this.focusRenderedKey(key ?? undefined);\n });\n }\n\n protected handleNodeFocus(event: FocusEvent, key: string): void {\n if (\n event.target instanceof Element &&\n event.target.closest('[role=\"treeitem\"]') === event.currentTarget\n )\n this.activeKey.set(key);\n }\n\n protected nodeKey(node: AerisOrganizationChartNode<TData>, fallback: string | number): string {\n return node.key ?? String(fallback);\n }\n\n protected nodeLabel(node: AerisOrganizationChartNode<TData>): string {\n return node.label ?? '';\n }\n\n protected nodeAriaLabel(node: AerisOrganizationChartNode<TData>): string {\n return this.nodeLabel(node) || node.type || 'Organization chart node';\n }\n\n protected hasChildren(node: AerisOrganizationChartNode<TData>): boolean {\n return Boolean(node.children?.length);\n }\n\n protected isCollapsed(key: string): boolean {\n return this.collapsedKeys().includes(key);\n }\n\n protected hasVisibleChildren(node: AerisOrganizationChartNode<TData>, key: string): boolean {\n return this.hasChildren(node) && !this.isCollapsed(key);\n }\n\n protected visibleChildren(\n node: AerisOrganizationChartNode<TData>,\n key: string,\n ): readonly AerisOrganizationChartNode<TData>[] {\n return this.hasVisibleChildren(node, key) ? (node.children ?? []) : [];\n }\n\n protected isSelected(key: string): boolean {\n return this.selectionKeys().includes(key);\n }\n\n protected isNodeSelectable(node: AerisOrganizationChartNode<TData>): boolean {\n return Boolean(this.selectionMode()) && node.selectable !== false;\n }\n\n protected selectNode(\n node: AerisOrganizationChartNode<TData>,\n key: string,\n originalEvent: Event,\n ): void {\n originalEvent.stopPropagation();\n this.activeKey.set(key);\n if (!this.isNodeSelectable(node)) return;\n\n const wasSelected = this.isSelected(key);\n const selectedKeys =\n this.selectionMode() === 'single'\n ? wasSelected\n ? []\n : [key]\n : wasSelected\n ? this.selectionKeys().filter((selectedKey) => selectedKey !== key)\n : [...this.selectionKeys(), key];\n\n this.selectionKeys.set(selectedKeys);\n const event = { originalEvent, selectedKeys, node, key };\n this.selectionChanged.emit(event);\n if (wasSelected) {\n this.nodeUnselected.emit(event);\n } else {\n this.nodeSelected.emit(event);\n }\n }\n\n protected toggleNode(\n node: AerisOrganizationChartNode<TData>,\n key: string,\n originalEvent: Event,\n ): void {\n originalEvent.stopPropagation();\n if (!this.collapsible() || !this.hasChildren(node)) return;\n\n if (this.isCollapsed(key)) {\n this.collapsedKeys.set(this.collapsedKeys().filter((item) => item !== key));\n this.nodeExpanded.emit({ originalEvent, node, key });\n } else {\n this.collapsedKeys.set([...this.collapsedKeys(), key]);\n this.nodeCollapsed.emit({ originalEvent, node, key });\n }\n }\n\n protected handleNodeKeydown(\n event: KeyboardEvent,\n node: AerisOrganizationChartNode<TData>,\n key: string,\n ): void {\n if (event.target !== event.currentTarget || event.isComposing) return;\n const entries = this.renderedEntries();\n const index = entries.findIndex((entry) => entry.key === key);\n const rtl =\n this.host.nativeElement.ownerDocument.defaultView?.getComputedStyle(this.host.nativeElement)\n .direction === 'rtl';\n const expandKey = rtl ? 'ArrowLeft' : 'ArrowRight';\n const collapseKey = rtl ? 'ArrowRight' : 'ArrowLeft';\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.selectNode(node, key, event);\n } else if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n this.focusRenderedKey(entries[index + (event.key === 'ArrowDown' ? 1 : -1)]?.key);\n } else if (event.key === collapseKey) {\n event.preventDefault();\n if (this.collapsible() && this.hasChildren(node) && !this.isCollapsed(key))\n this.toggleNode(node, key, event);\n else this.focusRenderedKey(entries[index]?.parentKey ?? undefined);\n } else if (event.key === expandKey) {\n event.preventDefault();\n if (this.collapsible() && this.hasChildren(node) && this.isCollapsed(key))\n this.toggleNode(node, key, event);\n else this.focusRenderedKey(entries.find((entry) => entry.parentKey === key)?.key);\n } else if (event.key === 'Home') {\n event.preventDefault();\n this.focusRenderedKey(entries[0]?.key);\n } else if (event.key === 'End') {\n event.preventDefault();\n this.focusRenderedKey(entries.at(-1)?.key);\n } else if (event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {\n const query = event.key.toLocaleLowerCase();\n const ordered = [...entries.slice(index + 1), ...entries.slice(0, index + 1)];\n const match = ordered.find((entry) =>\n this.nodeAriaLabel(entry.node).toLocaleLowerCase().startsWith(query),\n );\n if (match) {\n event.preventDefault();\n this.focusRenderedKey(match.key);\n }\n }\n }\n\n private collectRenderedEntries(\n nodes: readonly AerisOrganizationChartNode<TData>[],\n parentKey: string | null = null,\n ): readonly OrganizationChartEntry<TData>[] {\n const entries: OrganizationChartEntry<TData>[] = [];\n nodes.forEach((node, index) => {\n const key = this.nodeKey(node, parentKey ? `${parentKey}-${index}` : String(index));\n entries.push({ key, parentKey, node });\n if (node.children?.length && !this.isCollapsed(key)) {\n entries.push(...this.collectRenderedEntries(node.children, key));\n }\n });\n return entries;\n }\n\n private focusRenderedKey(key: string | undefined): void {\n if (!key) return;\n this.nodeElements()\n .find((element) => element.nativeElement.getAttribute('data-aeris-key') === key)\n ?.nativeElement.focus();\n }\n}\n\nexport const AerisOrganizationChartModule = [\n AerisOrganizationChart,\n AerisOrganizationChartNodeTemplate,\n AerisOrganizationChartEmptyTemplate,\n] as const;\n"],"mappings":";;;;AA6DA,IAAa,qCAAb,MAAa,mCAAkC;CACpC,WAAW,OAA8D,WAAW;CAE7F,OAAO,uBACL,YACA,SAAgB;EAEhB,OAAO;CACT;CARW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAkC,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAlC,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;E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;GAAA,MAAA,CAAA,GAAA,iBAAA,kCAAyC,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAEK,mCAAmC,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CACb,eAAa,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AAoMrF,MAAa,+BAA+B;CAC1C;CACA;CACA;AACQ"}
@@ -78,7 +78,7 @@ var AerisPaginator = class AerisPaginator {
78
78
  }
79
79
  handleRowsFocusOut(event) {
80
80
  const nextTarget = event.relatedTarget;
81
- if (nextTarget instanceof Node && (event.currentTarget.contains(nextTarget) || this.rowsPanel()?.nativeElement.contains(nextTarget))) return;
81
+ if (nextTarget instanceof Node && (event.currentTarget.contains(nextTarget) || this.rowsTrigger()?.nativeElement.contains(nextTarget) || this.rowsPanel()?.nativeElement.contains(nextTarget))) return;
82
82
  this.closeRowsPanel();
83
83
  }
84
84
  closeRowsPanel() {
@@ -95,7 +95,7 @@ var AerisPaginator = class AerisPaginator {
95
95
  }
96
96
  static ɵfac = i0.ɵɵngDeclareFactory({
97
97
  minVersion: "12.0.0",
98
- version: "22.2.3",
98
+ version: "22.2.4",
99
99
  ngImport: i0,
100
100
  type: AerisPaginator,
101
101
  deps: [],
@@ -103,7 +103,7 @@ var AerisPaginator = class AerisPaginator {
103
103
  });
104
104
  static ɵcmp = i0.ɵɵngDeclareComponent({
105
105
  minVersion: "17.0.0",
106
- version: "22.2.3",
106
+ version: "22.2.4",
107
107
  type: AerisPaginator,
108
108
  isStandalone: true,
109
109
  selector: "aeris-paginator",
@@ -383,6 +383,7 @@ var AerisPaginator = class AerisPaginator {
383
383
  [aerisInternalAppendToAnchor]="this.rowsTrigger()?.nativeElement ?? null"
384
384
  [aerisInternalAppendToCollisionPadding]="viewportMargin()"
385
385
  (aerisInternalAppendToOutside)="closeRowsPanel()"
386
+ (aerisInternalAppendToFocusOut)="handleRowsFocusOut($event)"
386
387
  [id]="rowsListboxId"
387
388
  role="listbox"
388
389
  [attr.aria-labelledby]="rowsLabelId"
@@ -452,14 +453,14 @@ var AerisPaginator = class AerisPaginator {
452
453
  "aerisInternalAppendToPositionSelf",
453
454
  "aerisInternalAppendToDismiss"
454
455
  ],
455
- outputs: ["aerisInternalAppendToOutside"]
456
+ outputs: ["aerisInternalAppendToOutside", "aerisInternalAppendToFocusOut"]
456
457
  }
457
458
  ]
458
459
  });
459
460
  };
460
461
  i0.ɵɵngDeclareClassMetadata({
461
462
  minVersion: "12.0.0",
462
- version: "22.2.3",
463
+ version: "22.2.4",
463
464
  ngImport: i0,
464
465
  type: AerisPaginator,
465
466
  decorators: [{
@@ -611,6 +612,7 @@ i0.ɵɵngDeclareClassMetadata({
611
612
  [aerisInternalAppendToAnchor]="this.rowsTrigger()?.nativeElement ?? null"
612
613
  [aerisInternalAppendToCollisionPadding]="viewportMargin()"
613
614
  (aerisInternalAppendToOutside)="closeRowsPanel()"
615
+ (aerisInternalAppendToFocusOut)="handleRowsFocusOut($event)"
614
616
  [id]="rowsListboxId"
615
617
  role="listbox"
616
618
  [attr.aria-labelledby]="rowsLabelId"