@arsedizioni/ars-utils 22.6.85 → 22.6.88

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 (79) hide show
  1. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +3158 -3344
  2. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  3. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +7616 -4772
  4. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-core.date.mjs +321 -702
  6. package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +445 -590
  8. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -1
  9. package/fesm2022/arsedizioni-ars-utils-core.mjs +1735 -2370
  10. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  11. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +1280 -1470
  12. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1097 -1528
  14. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
  15. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +198 -294
  16. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  17. package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +115 -117
  18. package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -1
  19. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +1607 -613
  20. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
  21. package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +840 -367
  22. package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -1
  23. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +1634 -651
  24. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
  25. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +1255 -792
  26. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
  27. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +1410 -357
  28. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
  29. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +2401 -944
  30. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
  31. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +1553 -741
  32. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
  33. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +901 -430
  34. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
  35. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +737 -530
  36. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -1
  37. package/fesm2022/arsedizioni-ars-utils-ui.mjs +6638 -1755
  38. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  39. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1479 -1207
  40. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
  41. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +1003 -270
  42. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
  43. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +497 -278
  44. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
  45. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +48 -52
  46. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -1
  47. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +464 -704
  48. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
  49. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +724 -657
  50. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
  51. package/fesm2022/arsedizioni-ars-utils.mjs +3 -19
  52. package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
  53. package/package.json +1 -1
  54. package/types/arsedizioni-ars-utils-clipper.common.d.ts +1151 -1163
  55. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1588 -1426
  56. package/types/arsedizioni-ars-utils-core.d.ts +1169 -1172
  57. package/types/arsedizioni-ars-utils-core.date.d.ts +204 -208
  58. package/types/arsedizioni-ars-utils-core.markdown.d.ts +128 -126
  59. package/types/arsedizioni-ars-utils-core.validators.d.ts +270 -236
  60. package/types/arsedizioni-ars-utils-evolution.common.d.ts +1054 -1067
  61. package/types/arsedizioni-ars-utils-support.common.d.ts +225 -234
  62. package/types/arsedizioni-ars-utils-ui.controls.d.ts +440 -278
  63. package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +24 -28
  64. package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +172 -136
  65. package/types/arsedizioni-ars-utils-ui.d.ts +2035 -821
  66. package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +327 -322
  67. package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +343 -347
  68. package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +167 -167
  69. package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +373 -367
  70. package/types/arsedizioni-ars-utils-ui.files.d.ts +335 -283
  71. package/types/arsedizioni-ars-utils-ui.filters.d.ts +232 -160
  72. package/types/arsedizioni-ars-utils-ui.help.d.ts +204 -211
  73. package/types/arsedizioni-ars-utils-ui.navigation.d.ts +811 -646
  74. package/types/arsedizioni-ars-utils-ui.notifications.d.ts +74 -78
  75. package/types/arsedizioni-ars-utils-ui.oauth.d.ts +102 -62
  76. package/types/arsedizioni-ars-utils-ui.paginator.d.ts +19 -22
  77. package/types/arsedizioni-ars-utils-ui.shell.d.ts +376 -382
  78. package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +244 -231
  79. package/types/arsedizioni-ars-utils.d.ts +1 -3
@@ -1,368 +1,841 @@
1
- import * as i0 from '@angular/core';
2
- import { input, model, output, viewChild, inject, ElementRef, computed, signal, effect, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { form, FormField } from '@angular/forms/signals';
4
- import { SafeHtmlPipe } from '@arsedizioni/ars-utils/core';
5
- import * as i1 from '@angular/material/tree';
6
- import { MatTree, MatTreeModule } from '@angular/material/tree';
7
- import * as i2 from '@angular/material/checkbox';
8
- import { MatCheckboxModule } from '@angular/material/checkbox';
9
- import * as i3 from '@angular/material/icon';
10
- import { MatIconModule } from '@angular/material/icon';
11
- import * as i4 from '@angular/material/tabs';
12
- import { MatTabsModule } from '@angular/material/tabs';
13
- import * as i5 from '@angular/material/chips';
14
- import { MatChipsModule } from '@angular/material/chips';
15
- import * as i6 from '@angular/material/button';
16
- import { MatButtonModule } from '@angular/material/button';
17
- import * as i7 from '@angular/material/tooltip';
18
- import { MatTooltipModule } from '@angular/material/tooltip';
19
- import * as i10 from '@arsedizioni/ars-utils/ui';
20
- import { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';
21
- import * as i8 from '@angular/material/form-field';
22
- import { MatFormFieldModule } from '@angular/material/form-field';
23
- import * as i9 from '@angular/material/input';
24
- import { MatInputModule } from '@angular/material/input';
25
-
26
- class TreePickerComponent {
27
- /** Returns true when the node can be selected: depth < maxDepth or explicitly listed in maxDepthOverrides. */
28
- isSelectable(node) {
29
- return this._isSelectableNode(node);
30
- }
31
- _isSelectableNode(node) {
32
- const depth = this._maps().depthMap.get(node.id) ?? 0;
33
- return depth < this.maxDepth() || this._overrideSubtreeSet().has(node.id);
34
- }
35
- constructor() {
36
- /** Nested tree data to display. */
37
- this.tree = input([], /* @ts-ignore */
38
- ...(ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []));
39
- /** Currently selected node ids. Supports two-way binding via [(selection)]. */
40
- this.selection = model([], /* @ts-ignore */
41
- ...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
42
- /** When true, checkboxes and chip remove buttons are disabled (mirrors Material convention). */
43
- this.disabled = input(false, /* @ts-ignore */
44
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
45
- /** Description to display when no selection is made. */
46
- this.descriptionEmpty = input('<span>Nessuna selezione: vengono inclusi <strong>tutti gli elementi</strong>.</span>', /* @ts-ignore */
47
- ...(ngDevMode ? [{ debugName: "descriptionEmpty" }] : /* istanbul ignore next */ []));
48
- /** Maximum number of tree levels to display (default: 3). */
49
- this.maxDepth = input(3, /* @ts-ignore */
50
- ...(ngDevMode ? [{ debugName: "maxDepth" }] : /* istanbul ignore next */ []));
51
- /**
52
- * List of node IDs at depth >= maxDepth that unlock selection for themselves
53
- * and all their descendants, regardless of depth.
54
- */
55
- this.maxDepthOverrides = input([], /* @ts-ignore */
56
- ...(ngDevMode ? [{ debugName: "maxDepthOverrides" }] : /* istanbul ignore next */ []));
57
- /**
58
- * Number of levels to auto-expand on load.
59
- * 0 or undefined = only top level visible (no expansion);
60
- * 1 = expand depth-0 nodes; 2 = expand depth-0 and depth-1 nodes; etc.
61
- * Must be less than maxDepth.
62
- */
63
- this.minDepth = input(undefined, /* @ts-ignore */
64
- ...(ngDevMode ? [{ debugName: "minDepth" }] : /* istanbul ignore next */ []));
65
- /**
66
- * Emits the count of visible selected nodes whenever the selection changes.
67
- * Emits 0 when nothing is selected (meaning all items are implicitly included).
68
- */
69
- this.selectionCount = output();
70
- /** Emits void whenever the user changes the selection (toggle, remove, clear). */
71
- this.changed = output();
72
- this._treeRef = viewChild((MatTree), /* @ts-ignore */
73
- ...(ngDevMode ? [{ debugName: "_treeRef" }] : /* istanbul ignore next */ []));
74
- this._elRef = inject(ElementRef);
75
- /**
76
- * Set of all node IDs selectable via overrides: each listed root and all its descendants.
77
- * Recomputed whenever the tree data or the override list changes.
78
- */
79
- this._overrideSubtreeSet = computed(() => {
80
- const overrideIds = new Set(this.maxDepthOverrides());
81
- const maps = this._maps();
82
- const result = new Set();
83
- for (const id of overrideIds) {
84
- const root = maps.nodeMap.get(id);
85
- if (!root)
86
- continue;
87
- const addSubtree = (n) => {
88
- result.add(n.id);
89
- for (const child of (n.children ?? []))
90
- addSubtree(child);
91
- };
92
- addSubtree(root);
93
- }
94
- return result;
95
- }, /* @ts-ignore */
96
- ...(ngDevMode ? [{ debugName: "_overrideSubtreeSet" }] : /* istanbul ignore next */ []));
97
- /** All three maps rebuilt lazily as a single computed whenever taxonomy changes. */
98
- this._maps = computed(() => {
99
- const parentMap = new Map();
100
- const depthMap = new Map();
101
- const nodeMap = new Map();
102
- const build = (nodes, parent, depth = 0) => {
103
- for (const node of nodes) {
104
- depthMap.set(node.id, depth);
105
- nodeMap.set(node.id, node);
106
- if (parent)
107
- parentMap.set(node.id, parent);
108
- if (node.children?.length)
109
- build(node.children, node, depth + 1);
110
- }
111
- };
112
- build(this.tree());
113
- return { parentMap, depthMap, nodeMap };
114
- }, /* @ts-ignore */
115
- ...(ngDevMode ? [{ debugName: "_maps" }] : /* istanbul ignore next */ []));
116
- /** O(1) set of selected ids, rebuilt only when selection changes. */
117
- this._selectedSet = computed(() => new Set(this.selection()), /* @ts-ignore */
118
- ...(ngDevMode ? [{ debugName: "_selectedSet" }] : /* istanbul ignore next */ []));
119
- /** True when at least one node is explicitly selected. */
120
- this.hasSelection = computed(() => this.selection().length > 0, /* @ts-ignore */
121
- ...(ngDevMode ? [{ debugName: "hasSelection" }] : /* istanbul ignore next */ []));
122
- /** Count of selected nodes within selectable levels (depth < maxDepth or in overrides), shown in the tab label. */
123
- this.selectedVisibleCount = computed(() => this.selection().filter(id => {
124
- const node = this._maps().nodeMap.get(id);
125
- return node ? this._isSelectableNode(node) : false;
126
- }).length, /* @ts-ignore */
127
- ...(ngDevMode ? [{ debugName: "selectedVisibleCount" }] : /* istanbul ignore next */ []));
128
- this.treeChildrenAccessor = (node) => {
129
- return (node.children ?? []);
130
- };
131
- this.hasChild = (_, node) => !!(node.children?.length);
132
- /** Current filter text. */
133
- this.filterText = signal('', /* @ts-ignore */
134
- ...(ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []));
135
- /** Root signal form bound to the filter text input. */
136
- this.filterForm = form(this.filterText);
137
- /** Nodes matching the current filter text, in nodeMap iteration order. */
138
- this.filteredItems = signal([], /* @ts-ignore */
139
- ...(ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []));
140
- /** Index of the currently highlighted filtered node (-1 = none). */
141
- this.filterIndex = signal(-1, /* @ts-ignore */
142
- ...(ngDevMode ? [{ debugName: "filterIndex" }] : /* istanbul ignore next */ []));
143
- /** The currently highlighted filtered node, or null. */
144
- this.filteredNode = computed(() => {
145
- const idx = this.filterIndex();
146
- return idx >= 0 ? (this.filteredItems()[idx] ?? null) : null;
147
- }, /* @ts-ignore */
148
- ...(ngDevMode ? [{ debugName: "filteredNode" }] : /* istanbul ignore next */ []));
149
- // Expand nodes up to minDepth whenever new taxonomy data arrives
150
- effect(() => {
151
- const maps = this._maps();
152
- const expandLevels = this.minDepth() ?? 0;
153
- setTimeout(() => {
154
- const tree = this._treeRef();
155
- if (!tree)
156
- return;
157
- tree.collapseAll();
158
- if (expandLevels <= 0)
159
- return;
160
- maps.depthMap.forEach((depth, id) => {
161
- if (depth < expandLevels) {
162
- const node = maps.nodeMap.get(id);
163
- if (node)
164
- tree.expand(node);
165
- }
166
- });
167
- });
168
- });
169
- // Emit visible selection count on every selection change
170
- effect(() => {
171
- this.selectionCount.emit(this.selectedVisibleCount());
172
- });
173
- }
174
- /** Expands all visible nodes in the tree. */
175
- expandAll() {
176
- this._treeRef()?.expandAll();
177
- }
178
- /** Collapses all nodes in the tree. */
179
- collapseAll() {
180
- this._treeRef()?.collapseAll();
181
- }
182
- /** Clears the entire selection. */
183
- clearAll() {
184
- this.selection.set([]);
185
- this.changed.emit();
186
- }
187
- /** Searches nodes by text and moves to the first match. */
188
- doFilter() {
189
- const text = this.filterText().trim().toLowerCase();
190
- if (text.length < 3) {
191
- this.filteredItems.set([]);
192
- this.filterIndex.set(-1);
193
- return;
194
- }
195
- const matches = Array.from(this._maps().nodeMap.values())
196
- .filter(n => n.name?.toLowerCase().includes(text));
197
- this.filteredItems.set(matches);
198
- const idx = matches.length > 0 ? 0 : -1;
199
- this.filterIndex.set(idx);
200
- if (idx >= 0)
201
- this._scrollToFiltered(idx, matches);
202
- }
203
- /** Clears the filter and restores the original tree state. */
204
- clearFilter() {
205
- this.filterText.set('');
206
- this.filteredItems.set([]);
207
- this.filterIndex.set(-1);
208
- }
209
- /** Moves to the next matching node, cycling back to the first. */
210
- nextFiltered() {
211
- const items = this.filteredItems();
212
- if (!items.length)
213
- return;
214
- const next = (this.filterIndex() + 1) % items.length;
215
- this.filterIndex.set(next);
216
- this._scrollToFiltered(next, items);
217
- }
218
- /** Returns true when the node is the currently highlighted filter match. */
219
- isFilteredNode(node) {
220
- return this.filteredNode()?.id === node.id;
221
- }
222
- /** Expands ancestors of the target node and scrolls it into view. */
223
- _scrollToFiltered(index, items) {
224
- const node = items[index];
225
- if (!node)
226
- return;
227
- const tree = this._treeRef();
228
- if (tree) {
229
- let parent = this._maps().parentMap.get(node.id);
230
- while (parent) {
231
- tree.expand(parent);
232
- parent = this._maps().parentMap.get(parent.id);
233
- }
234
- }
235
- setTimeout(() => {
236
- const el = this._elRef.nativeElement.querySelector(`[data-node-id="${node.id}"]`);
237
- el?.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
238
- });
239
- }
240
- /**
241
- * Returns true when the node is in the active selection.
242
- * @param node - tree node to check
243
- * @returns true if selected
244
- */
245
- isSelected(node) {
246
- return this._selectedSet().has(node.id);
247
- }
248
- /**
249
- * Returns true when a subset (but not all) of the node's descendants are selected,
250
- * producing the indeterminate checkbox state.
251
- * @param node - tree node to evaluate
252
- * @returns true if the node is in a partial-selection (indeterminate) state
253
- */
254
- isIndeterminate(node) {
255
- if (!node.children?.length)
256
- return false;
257
- const descendants = this._getSelectableDescendants(node);
258
- const set = this._selectedSet();
259
- const count = descendants.filter(d => set.has(d.id)).length;
260
- return count > 0 && count < descendants.length;
261
- }
262
- /**
263
- * Toggles the node and all its descendants; then syncs the ancestor chain.
264
- * @param node - the node that was clicked
265
- */
266
- toggleNode(node) {
267
- this.selection.update(current => {
268
- const set = new Set(current);
269
- if (set.has(node.id)) {
270
- set.delete(node.id);
271
- }
272
- else {
273
- set.add(node.id);
274
- }
275
- this._syncParentsInSet(node, set);
276
- return Array.from(set);
277
- });
278
- this.changed.emit();
279
- }
280
- /**
281
- * Deselects the node and all its descendants. Called by the chip remove button.
282
- * @param node - the node to remove from the selection
283
- */
284
- removeNode(node) {
285
- this.selection.update(current => {
286
- const set = new Set(current);
287
- set.delete(node.id);
288
- this._syncParentsInSet(node, set);
289
- return Array.from(set);
290
- });
291
- this.changed.emit();
292
- }
293
- /**
294
- * Returns the INode for the given id, or undefined if not found.
295
- * @param id - node id to look up
296
- * @returns the matching INode
297
- */
298
- nodeById(id) {
299
- return this._maps().nodeMap.get(id);
300
- }
301
- /**
302
- * Returns true when the node at the given id is within the visible depth range
303
- * and should appear in the chip list.
304
- * @param id - node id to check
305
- * @returns true if the node depth is less than maxDepth
306
- */
307
- isChipVisible(id) {
308
- const node = this._maps().nodeMap.get(id);
309
- return node ? this._isSelectableNode(node) : false;
310
- }
311
- /**
312
- * Returns only the selectable descendants of node (depth < maxDepth or in overrides),
313
- * used for indeterminate state and parent auto-selection logic.
314
- * @param node - root of the subtree to traverse
315
- * @returns flat array of selectable descendant INodes
316
- */
317
- _getSelectableDescendants(node) {
318
- const result = [];
319
- for (const child of (node.children ?? [])) {
320
- const c = child;
321
- if (this._isSelectableNode(c))
322
- result.push(c);
323
- result.push(...this._getSelectableDescendants(c));
324
- }
325
- return result;
326
- }
327
- /**
328
- * Walks up the ancestor chain from node, selecting a parent only when all
329
- * its descendants are in the set, deselecting it otherwise.
330
- * @param node - starting node for the upward traversal
331
- * @param set - mutable selection set updated in place
332
- */
333
- _syncParentsInSet(node, set) {
334
- let parent = this._maps().parentMap.get(node.id);
335
- while (parent) {
336
- const descendants = this._getSelectableDescendants(parent);
337
- if (descendants.length > 0 && descendants.every(d => set.has(d.id))) {
338
- set.add(parent.id);
339
- }
340
- else {
341
- set.delete(parent.id);
342
- }
343
- parent = this._maps().parentMap.get(parent.id);
344
- }
345
- }
346
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TreePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
347
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: TreePickerComponent, isStandalone: true, selector: "tree-picker", inputs: { tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, descriptionEmpty: { classPropertyName: "descriptionEmpty", publicName: "descriptionEmpty", isSignal: true, isRequired: false, transformFunction: null }, maxDepth: { classPropertyName: "maxDepth", publicName: "maxDepth", isSignal: true, isRequired: false, transformFunction: null }, maxDepthOverrides: { classPropertyName: "maxDepthOverrides", publicName: "maxDepthOverrides", isSignal: true, isRequired: false, transformFunction: null }, minDepth: { classPropertyName: "minDepth", publicName: "minDepth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection: "selectionChange", selectionCount: "selectionCount", changed: "changed" }, viewQueries: [{ propertyName: "_treeRef", first: true, predicate: (MatTree), descendants: true, isSignal: true }], ngImport: i0, template: "<mat-tab-group class=\"taxonomy-picker-tabs\" style=\"height:100%\">\n <mat-tab style=\"overflow-x: hidden !important; height: 100%\">\n <ng-template mat-tab-label>\n Seleziona\n <mat-icon\n style=\"font-size:16px;height:16px;width:16px;margin-left:4px;vertical-align:middle;color:var(--mat-sys-primary)\"\n [matTooltip]=\"'Nessuna selezione = tutti gli argomenti inclusi;\\r\\nOgni elemento selezionato include sempre tutti i suoi sottoelementi'\"\n matTooltipPosition=\"above\">\n info\n </mat-icon>\n </ng-template>\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex fxHide.xs>\n <mat-form-field style=\"width:200px; padding: 8px 0px\" appearance=\"outline\"\n subscriptSizing=\"dynamic\">\n <mat-label>Cerca...</mat-label>\n <input type=\"text\" (keyup)=\"doFilter()\" matInput [formField]=\"filterForm\"\n (keydown.enter)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\"\n (keydown.arrowDown)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\">\n @if (filterText()) {\n <button type=\"button\" type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button\n aria-label=\"Clear\" (click)=\"clearFilter()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n @if (filteredItems().length > 0) {\n <div fxFlex=\"50px\" fxHide.xs fxLayoutAlign=\"end center\">\n <div class=\"small\">{{filterIndex() + 1}} / {{filteredItems().length}}</div>\n </div>\n <div fxFlex=\"48px\" fxHide.xs fxLayoutAlign=\"end center\">\n <button mat-icon-button (click)=\"nextFiltered()\">\n <mat-icon aria-label=\"Vai al prossimo\"\n matTooltip=\"Vai al prossimo\">arrow_downward</mat-icon>\n </button>\n </div>\n }\n <div fxFlex=\"*\" fxLayoutAlign=\"end center\">\n <button mat-icon-button [matTooltip]=\"'Espandi tutto'\" (click)=\"expandAll()\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Comprimi tutto'\" (click)=\"collapseAll()\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Azzera selezione'\" [disabled]=\"!hasSelection()\"\n (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto;\">\n <mat-tree [dataSource]=\"tree()\" [childrenAccessor]=\"treeChildrenAccessor\" class=\"tree\">\n <!-- Leaf node -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\n class=\"tree-node\" [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button disabled style=\"visibility: hidden\"></button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n <!-- Expandable node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [matTreeNodePaddingIndent]=\"20\" #treeNode=\"matTreeNode\" class=\"tree-node\"\n [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button matTreeNodeToggle>\n <mat-icon>{{treeNode.isExpanded ? 'expand_more' : 'chevron_right'}}</mat-icon>\n </button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [indeterminate]=\"isIndeterminate(node)\"\n [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n </div>\n </mat-tab>\n <mat-tab [label]=\"hasSelection() ? 'Selezionati (' + selectedVisibleCount() + ')' : 'Selezionati (tutti)'\"\n style=\"height: 100%;\">\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"8px\" style=\"padding:12px\">\n @if (!hasSelection()) {\n <mat-icon>info</mat-icon>\n <span [innerHTML]=\"descriptionEmpty() | safeHtml\"></span>\n } @else {\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\n <button mat-button color=\"warn\" style=\"margin-left:auto\" (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon> Azzera tutto\n </button>\n </div>\n }\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto; padding-bottom: 12px;\">\n <mat-chip-set>\n @for (id of selection(); track id) {\n @let node = nodeById(id);\n @if (node && isChipVisible(id)) {\n <mat-chip (removed)=\"removeNode(node)\" style=\"max-width: 280px;\" [matTooltip]=\"node.name\">\n {{node.name}}\n @if (!disabled()) {\n <button matChipRemove matTooltip=\"Elimina\"><mat-icon>cancel</mat-icon></button>\n }\n </mat-chip>\n }\n }\n </mat-chip-set>\n </div>\n </div>\n </mat-tab>\n</mat-tab-group>", styles: [".tree-picker-tabs ::ng-deep .mat-mdc-tab-body-wrapper{flex:1 1 auto;height:100%}.tree{padding:8px 0 16px;background-color:transparent!important}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:not(.tree-node-no-select):hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-filtered ::ng-deep .mdc-label,.tree-node-filtered ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-accent, #7894ae)!important}.tree-node-filtered .tree-node-label-only{font-weight:700;color:var(--ars-color-accent, #7894ae);opacity:1}.tree-node-activated ::ng-deep .mdc-label,.tree-node-activated ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-secondary, #4a635f)!important}.tree-node-label-only{display:flex;flex-direction:column;justify-content:center;padding-left:30px;opacity:.7}\n"], dependencies: [{ kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i1.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i4.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i4.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i4.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i5.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i10.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.FxFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i10.FxShowHideDirective, selector: " [fxShow], [fxHide], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg] ", inputs: ["fxShow", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "directive", type: i10.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.FxLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
348
- }
349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TreePickerComponent, decorators: [{
350
- type: Component,
351
- args: [{ selector: 'tree-picker', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTreeModule, MatCheckboxModule, MatIconModule, MatTabsModule, MatChipsModule,
352
- MatButtonModule, MatTooltipModule, MatFormFieldModule, MatInputModule, FormField, FlexLayoutModule, SafeHtmlPipe], template: "<mat-tab-group class=\"taxonomy-picker-tabs\" style=\"height:100%\">\n <mat-tab style=\"overflow-x: hidden !important; height: 100%\">\n <ng-template mat-tab-label>\n Seleziona\n <mat-icon\n style=\"font-size:16px;height:16px;width:16px;margin-left:4px;vertical-align:middle;color:var(--mat-sys-primary)\"\n [matTooltip]=\"'Nessuna selezione = tutti gli argomenti inclusi;\\r\\nOgni elemento selezionato include sempre tutti i suoi sottoelementi'\"\n matTooltipPosition=\"above\">\n info\n </mat-icon>\n </ng-template>\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex fxHide.xs>\n <mat-form-field style=\"width:200px; padding: 8px 0px\" appearance=\"outline\"\n subscriptSizing=\"dynamic\">\n <mat-label>Cerca...</mat-label>\n <input type=\"text\" (keyup)=\"doFilter()\" matInput [formField]=\"filterForm\"\n (keydown.enter)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\"\n (keydown.arrowDown)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\">\n @if (filterText()) {\n <button type=\"button\" type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button\n aria-label=\"Clear\" (click)=\"clearFilter()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n @if (filteredItems().length > 0) {\n <div fxFlex=\"50px\" fxHide.xs fxLayoutAlign=\"end center\">\n <div class=\"small\">{{filterIndex() + 1}} / {{filteredItems().length}}</div>\n </div>\n <div fxFlex=\"48px\" fxHide.xs fxLayoutAlign=\"end center\">\n <button mat-icon-button (click)=\"nextFiltered()\">\n <mat-icon aria-label=\"Vai al prossimo\"\n matTooltip=\"Vai al prossimo\">arrow_downward</mat-icon>\n </button>\n </div>\n }\n <div fxFlex=\"*\" fxLayoutAlign=\"end center\">\n <button mat-icon-button [matTooltip]=\"'Espandi tutto'\" (click)=\"expandAll()\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Comprimi tutto'\" (click)=\"collapseAll()\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Azzera selezione'\" [disabled]=\"!hasSelection()\"\n (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto;\">\n <mat-tree [dataSource]=\"tree()\" [childrenAccessor]=\"treeChildrenAccessor\" class=\"tree\">\n <!-- Leaf node -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\n class=\"tree-node\" [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button disabled style=\"visibility: hidden\"></button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n <!-- Expandable node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [matTreeNodePaddingIndent]=\"20\" #treeNode=\"matTreeNode\" class=\"tree-node\"\n [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button matTreeNodeToggle>\n <mat-icon>{{treeNode.isExpanded ? 'expand_more' : 'chevron_right'}}</mat-icon>\n </button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [indeterminate]=\"isIndeterminate(node)\"\n [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n </div>\n </mat-tab>\n <mat-tab [label]=\"hasSelection() ? 'Selezionati (' + selectedVisibleCount() + ')' : 'Selezionati (tutti)'\"\n style=\"height: 100%;\">\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"8px\" style=\"padding:12px\">\n @if (!hasSelection()) {\n <mat-icon>info</mat-icon>\n <span [innerHTML]=\"descriptionEmpty() | safeHtml\"></span>\n } @else {\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\n <button mat-button color=\"warn\" style=\"margin-left:auto\" (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon> Azzera tutto\n </button>\n </div>\n }\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto; padding-bottom: 12px;\">\n <mat-chip-set>\n @for (id of selection(); track id) {\n @let node = nodeById(id);\n @if (node && isChipVisible(id)) {\n <mat-chip (removed)=\"removeNode(node)\" style=\"max-width: 280px;\" [matTooltip]=\"node.name\">\n {{node.name}}\n @if (!disabled()) {\n <button matChipRemove matTooltip=\"Elimina\"><mat-icon>cancel</mat-icon></button>\n }\n </mat-chip>\n }\n }\n </mat-chip-set>\n </div>\n </div>\n </mat-tab>\n</mat-tab-group>", styles: [".tree-picker-tabs ::ng-deep .mat-mdc-tab-body-wrapper{flex:1 1 auto;height:100%}.tree{padding:8px 0 16px;background-color:transparent!important}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:not(.tree-node-no-select):hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-filtered ::ng-deep .mdc-label,.tree-node-filtered ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-accent, #7894ae)!important}.tree-node-filtered .tree-node-label-only{font-weight:700;color:var(--ars-color-accent, #7894ae);opacity:1}.tree-node-activated ::ng-deep .mdc-label,.tree-node-activated ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-secondary, #4a635f)!important}.tree-node-label-only{display:flex;flex-direction:column;justify-content:center;padding-left:30px;opacity:.7}\n"] }]
353
- }], ctorParameters: () => [], propDecorators: { tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], descriptionEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "descriptionEmpty", required: false }] }], maxDepth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDepth", required: false }] }], maxDepthOverrides: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDepthOverrides", required: false }] }], minDepth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDepth", required: false }] }], selectionCount: [{ type: i0.Output, args: ["selectionCount"] }], changed: [{ type: i0.Output, args: ["changed"] }], _treeRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatTree), { isSignal: true }] }] } });
354
-
355
- /*
356
- * Public API Surface of @arsedizioni/ars-utils/ui.controls.tree
357
- *
358
- * `TreePickerComponent` alone. It is the only consumer of `mat-tree`, `mat-tabs`, `mat-input` and
359
- * `mat-checkbox` in the library: leaving it next to the small controls of `ui.controls` would tie
360
- * the placement of that whole Material subtree to whichever chunk first reaches a button.
361
- */
362
-
363
- /**
364
- * Generated bundle index. Do not edit.
365
- */
366
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, ElementRef, computed, effect, inject, input, model, output, signal, viewChild } from "@angular/core";
3
+ import { FormField, form } from "@angular/forms/signals";
4
+ import { SafeHtmlPipe } from "@arsedizioni/ars-utils/core";
5
+ import * as i1 from "@angular/material/tree";
6
+ import { MatTree, MatTreeModule } from "@angular/material/tree";
7
+ import * as i2 from "@angular/material/checkbox";
8
+ import { MatCheckboxModule } from "@angular/material/checkbox";
9
+ import * as i3 from "@angular/material/icon";
10
+ import { MatIconModule } from "@angular/material/icon";
11
+ import * as i4 from "@angular/material/tabs";
12
+ import { MatTabsModule } from "@angular/material/tabs";
13
+ import * as i5 from "@angular/material/chips";
14
+ import { MatChipsModule } from "@angular/material/chips";
15
+ import * as i6 from "@angular/material/button";
16
+ import { MatButtonModule } from "@angular/material/button";
17
+ import * as i7 from "@angular/material/tooltip";
18
+ import { MatTooltipModule } from "@angular/material/tooltip";
19
+ import * as i10 from "@arsedizioni/ars-utils/ui";
20
+ import { FlexLayoutModule } from "@arsedizioni/ars-utils/ui";
21
+ import * as i8 from "@angular/material/form-field";
22
+ import { MatFormFieldModule } from "@angular/material/form-field";
23
+ import * as i9 from "@angular/material/input";
24
+ import { MatInputModule } from "@angular/material/input";
25
+ var TreePickerComponent = class TreePickerComponent {
26
+ isSelectable(node) {
27
+ return this._isSelectableNode(node);
28
+ }
29
+ _isSelectableNode(node) {
30
+ return (this._maps().depthMap.get(node.id) ?? 0) < this.maxDepth() || this._overrideSubtreeSet().has(node.id);
31
+ }
32
+ constructor() {
33
+ this.tree = input([], ...ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []);
34
+ this.selection = model([], ...ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []);
35
+ this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
36
+ this.descriptionEmpty = input("<span>Nessuna selezione: vengono inclusi <strong>tutti gli elementi</strong>.</span>", ...ngDevMode ? [{ debugName: "descriptionEmpty" }] : /* istanbul ignore next */ []);
37
+ this.maxDepth = input(3, ...ngDevMode ? [{ debugName: "maxDepth" }] : /* istanbul ignore next */ []);
38
+ this.maxDepthOverrides = input([], ...ngDevMode ? [{ debugName: "maxDepthOverrides" }] : /* istanbul ignore next */ []);
39
+ this.minDepth = input(void 0, ...ngDevMode ? [{ debugName: "minDepth" }] : /* istanbul ignore next */ []);
40
+ this.selectionCount = output();
41
+ this.changed = output();
42
+ this._treeRef = viewChild(MatTree, ...ngDevMode ? [{ debugName: "_treeRef" }] : /* istanbul ignore next */ []);
43
+ this._elRef = inject(ElementRef);
44
+ this._overrideSubtreeSet = computed(() => {
45
+ const overrideIds = new Set(this.maxDepthOverrides());
46
+ const maps = this._maps();
47
+ const result = /* @__PURE__ */ new Set();
48
+ for (const id of overrideIds) {
49
+ const root = maps.nodeMap.get(id);
50
+ if (!root) continue;
51
+ const addSubtree = (n) => {
52
+ result.add(n.id);
53
+ for (const child of n.children ?? []) addSubtree(child);
54
+ };
55
+ addSubtree(root);
56
+ }
57
+ return result;
58
+ }, ...ngDevMode ? [{ debugName: "_overrideSubtreeSet" }] : /* istanbul ignore next */ []);
59
+ this._maps = computed(() => {
60
+ const parentMap = /* @__PURE__ */ new Map();
61
+ const depthMap = /* @__PURE__ */ new Map();
62
+ const nodeMap = /* @__PURE__ */ new Map();
63
+ const build = (nodes, parent, depth = 0) => {
64
+ for (const node of nodes) {
65
+ depthMap.set(node.id, depth);
66
+ nodeMap.set(node.id, node);
67
+ if (parent) parentMap.set(node.id, parent);
68
+ if (node.children?.length) build(node.children, node, depth + 1);
69
+ }
70
+ };
71
+ build(this.tree());
72
+ return {
73
+ parentMap,
74
+ depthMap,
75
+ nodeMap
76
+ };
77
+ }, ...ngDevMode ? [{ debugName: "_maps" }] : /* istanbul ignore next */ []);
78
+ this._selectedSet = computed(() => new Set(this.selection()), ...ngDevMode ? [{ debugName: "_selectedSet" }] : /* istanbul ignore next */ []);
79
+ this.hasSelection = computed(() => this.selection().length > 0, ...ngDevMode ? [{ debugName: "hasSelection" }] : /* istanbul ignore next */ []);
80
+ this.selectedVisibleCount = computed(() => this.selection().filter((id) => {
81
+ const node = this._maps().nodeMap.get(id);
82
+ return node ? this._isSelectableNode(node) : false;
83
+ }).length, ...ngDevMode ? [{ debugName: "selectedVisibleCount" }] : /* istanbul ignore next */ []);
84
+ this.treeChildrenAccessor = (node) => {
85
+ return node.children ?? [];
86
+ };
87
+ this.hasChild = (_, node) => !!node.children?.length;
88
+ this.filterText = signal("", ...ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []);
89
+ this.filterForm = form(this.filterText);
90
+ this.filteredItems = signal([], ...ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []);
91
+ this.filterIndex = signal(-1, ...ngDevMode ? [{ debugName: "filterIndex" }] : /* istanbul ignore next */ []);
92
+ this.filteredNode = computed(() => {
93
+ const idx = this.filterIndex();
94
+ return idx >= 0 ? this.filteredItems()[idx] ?? null : null;
95
+ }, ...ngDevMode ? [{ debugName: "filteredNode" }] : /* istanbul ignore next */ []);
96
+ effect(() => {
97
+ const maps = this._maps();
98
+ const expandLevels = this.minDepth() ?? 0;
99
+ setTimeout(() => {
100
+ const tree = this._treeRef();
101
+ if (!tree) return;
102
+ tree.collapseAll();
103
+ if (expandLevels <= 0) return;
104
+ maps.depthMap.forEach((depth, id) => {
105
+ if (depth < expandLevels) {
106
+ const node = maps.nodeMap.get(id);
107
+ if (node) tree.expand(node);
108
+ }
109
+ });
110
+ });
111
+ });
112
+ effect(() => {
113
+ this.selectionCount.emit(this.selectedVisibleCount());
114
+ });
115
+ }
116
+ expandAll() {
117
+ this._treeRef()?.expandAll();
118
+ }
119
+ collapseAll() {
120
+ this._treeRef()?.collapseAll();
121
+ }
122
+ clearAll() {
123
+ this.selection.set([]);
124
+ this.changed.emit();
125
+ }
126
+ doFilter() {
127
+ const text = this.filterText().trim().toLowerCase();
128
+ if (text.length < 3) {
129
+ this.filteredItems.set([]);
130
+ this.filterIndex.set(-1);
131
+ return;
132
+ }
133
+ const matches = Array.from(this._maps().nodeMap.values()).filter((n) => n.name?.toLowerCase().includes(text));
134
+ this.filteredItems.set(matches);
135
+ const idx = matches.length > 0 ? 0 : -1;
136
+ this.filterIndex.set(idx);
137
+ if (idx >= 0) this._scrollToFiltered(idx, matches);
138
+ }
139
+ clearFilter() {
140
+ this.filterText.set("");
141
+ this.filteredItems.set([]);
142
+ this.filterIndex.set(-1);
143
+ }
144
+ nextFiltered() {
145
+ const items = this.filteredItems();
146
+ if (!items.length) return;
147
+ const next = (this.filterIndex() + 1) % items.length;
148
+ this.filterIndex.set(next);
149
+ this._scrollToFiltered(next, items);
150
+ }
151
+ isFilteredNode(node) {
152
+ return this.filteredNode()?.id === node.id;
153
+ }
154
+ _scrollToFiltered(index, items) {
155
+ const node = items[index];
156
+ if (!node) return;
157
+ const tree = this._treeRef();
158
+ if (tree) {
159
+ let parent = this._maps().parentMap.get(node.id);
160
+ while (parent) {
161
+ tree.expand(parent);
162
+ parent = this._maps().parentMap.get(parent.id);
163
+ }
164
+ }
165
+ setTimeout(() => {
166
+ this._elRef.nativeElement.querySelector(`[data-node-id="${node.id}"]`)?.scrollIntoView({
167
+ block: "nearest",
168
+ behavior: "smooth"
169
+ });
170
+ });
171
+ }
172
+ isSelected(node) {
173
+ return this._selectedSet().has(node.id);
174
+ }
175
+ isIndeterminate(node) {
176
+ if (!node.children?.length) return false;
177
+ const descendants = this._getSelectableDescendants(node);
178
+ const set = this._selectedSet();
179
+ const count = descendants.filter((d) => set.has(d.id)).length;
180
+ return count > 0 && count < descendants.length;
181
+ }
182
+ toggleNode(node) {
183
+ this.selection.update((current) => {
184
+ const set = new Set(current);
185
+ if (set.has(node.id)) set.delete(node.id);
186
+ else set.add(node.id);
187
+ this._syncParentsInSet(node, set);
188
+ return Array.from(set);
189
+ });
190
+ this.changed.emit();
191
+ }
192
+ removeNode(node) {
193
+ this.selection.update((current) => {
194
+ const set = new Set(current);
195
+ set.delete(node.id);
196
+ this._syncParentsInSet(node, set);
197
+ return Array.from(set);
198
+ });
199
+ this.changed.emit();
200
+ }
201
+ nodeById(id) {
202
+ return this._maps().nodeMap.get(id);
203
+ }
204
+ isChipVisible(id) {
205
+ const node = this._maps().nodeMap.get(id);
206
+ return node ? this._isSelectableNode(node) : false;
207
+ }
208
+ _getSelectableDescendants(node) {
209
+ const result = [];
210
+ for (const child of node.children ?? []) {
211
+ const c = child;
212
+ if (this._isSelectableNode(c)) result.push(c);
213
+ result.push(...this._getSelectableDescendants(c));
214
+ }
215
+ return result;
216
+ }
217
+ _syncParentsInSet(node, set) {
218
+ let parent = this._maps().parentMap.get(node.id);
219
+ while (parent) {
220
+ const descendants = this._getSelectableDescendants(parent);
221
+ if (descendants.length > 0 && descendants.every((d) => set.has(d.id))) set.add(parent.id);
222
+ else set.delete(parent.id);
223
+ parent = this._maps().parentMap.get(parent.id);
224
+ }
225
+ }
226
+ static {
227
+ this.ɵfac = i0.ɵɵngDeclareFactory({
228
+ minVersion: "12.0.0",
229
+ version: "22.2.1",
230
+ ngImport: i0,
231
+ type: TreePickerComponent,
232
+ deps: [],
233
+ target: i0.ɵɵFactoryTarget.Component
234
+ });
235
+ }
236
+ static {
237
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
238
+ minVersion: "17.0.0",
239
+ version: "22.2.1",
240
+ type: TreePickerComponent,
241
+ isStandalone: true,
242
+ selector: "tree-picker",
243
+ inputs: {
244
+ tree: {
245
+ classPropertyName: "tree",
246
+ publicName: "tree",
247
+ isSignal: true,
248
+ isRequired: false,
249
+ transformFunction: null
250
+ },
251
+ selection: {
252
+ classPropertyName: "selection",
253
+ publicName: "selection",
254
+ isSignal: true,
255
+ isRequired: false,
256
+ transformFunction: null
257
+ },
258
+ disabled: {
259
+ classPropertyName: "disabled",
260
+ publicName: "disabled",
261
+ isSignal: true,
262
+ isRequired: false,
263
+ transformFunction: null
264
+ },
265
+ descriptionEmpty: {
266
+ classPropertyName: "descriptionEmpty",
267
+ publicName: "descriptionEmpty",
268
+ isSignal: true,
269
+ isRequired: false,
270
+ transformFunction: null
271
+ },
272
+ maxDepth: {
273
+ classPropertyName: "maxDepth",
274
+ publicName: "maxDepth",
275
+ isSignal: true,
276
+ isRequired: false,
277
+ transformFunction: null
278
+ },
279
+ maxDepthOverrides: {
280
+ classPropertyName: "maxDepthOverrides",
281
+ publicName: "maxDepthOverrides",
282
+ isSignal: true,
283
+ isRequired: false,
284
+ transformFunction: null
285
+ },
286
+ minDepth: {
287
+ classPropertyName: "minDepth",
288
+ publicName: "minDepth",
289
+ isSignal: true,
290
+ isRequired: false,
291
+ transformFunction: null
292
+ }
293
+ },
294
+ outputs: {
295
+ selection: "selectionChange",
296
+ selectionCount: "selectionCount",
297
+ changed: "changed"
298
+ },
299
+ viewQueries: [{
300
+ propertyName: "_treeRef",
301
+ first: true,
302
+ predicate: MatTree,
303
+ descendants: true,
304
+ isSignal: true
305
+ }],
306
+ ngImport: i0,
307
+ template: "<mat-tab-group class=\"taxonomy-picker-tabs\" style=\"height:100%\">\n <mat-tab style=\"overflow-x: hidden !important; height: 100%\">\n <ng-template mat-tab-label>\n Seleziona\n <mat-icon\n style=\"font-size:16px;height:16px;width:16px;margin-left:4px;vertical-align:middle;color:var(--mat-sys-primary)\"\n [matTooltip]=\"'Nessuna selezione = tutti gli argomenti inclusi;\\r\\nOgni elemento selezionato include sempre tutti i suoi sottoelementi'\"\n matTooltipPosition=\"above\">\n info\n </mat-icon>\n </ng-template>\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex fxHide.xs>\n <mat-form-field style=\"width:200px; padding: 8px 0px\" appearance=\"outline\"\n subscriptSizing=\"dynamic\">\n <mat-label>Cerca...</mat-label>\n <input type=\"text\" (keyup)=\"doFilter()\" matInput [formField]=\"filterForm\"\n (keydown.enter)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\"\n (keydown.arrowDown)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\">\n @if (filterText()) {\n <button type=\"button\" type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button\n aria-label=\"Clear\" (click)=\"clearFilter()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n @if (filteredItems().length > 0) {\n <div fxFlex=\"50px\" fxHide.xs fxLayoutAlign=\"end center\">\n <div class=\"small\">{{filterIndex() + 1}} / {{filteredItems().length}}</div>\n </div>\n <div fxFlex=\"48px\" fxHide.xs fxLayoutAlign=\"end center\">\n <button mat-icon-button (click)=\"nextFiltered()\">\n <mat-icon aria-label=\"Vai al prossimo\"\n matTooltip=\"Vai al prossimo\">arrow_downward</mat-icon>\n </button>\n </div>\n }\n <div fxFlex=\"*\" fxLayoutAlign=\"end center\">\n <button mat-icon-button [matTooltip]=\"'Espandi tutto'\" (click)=\"expandAll()\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Comprimi tutto'\" (click)=\"collapseAll()\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Azzera selezione'\" [disabled]=\"!hasSelection()\"\n (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto;\">\n <mat-tree [dataSource]=\"tree()\" [childrenAccessor]=\"treeChildrenAccessor\" class=\"tree\">\n <!-- Leaf node -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\n class=\"tree-node\" [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button disabled style=\"visibility: hidden\"></button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n <!-- Expandable node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [matTreeNodePaddingIndent]=\"20\" #treeNode=\"matTreeNode\" class=\"tree-node\"\n [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button matTreeNodeToggle>\n <mat-icon>{{treeNode.isExpanded ? 'expand_more' : 'chevron_right'}}</mat-icon>\n </button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [indeterminate]=\"isIndeterminate(node)\"\n [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n </div>\n </mat-tab>\n <mat-tab [label]=\"hasSelection() ? 'Selezionati (' + selectedVisibleCount() + ')' : 'Selezionati (tutti)'\"\n style=\"height: 100%;\">\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"8px\" style=\"padding:12px\">\n @if (!hasSelection()) {\n <mat-icon>info</mat-icon>\n <span [innerHTML]=\"descriptionEmpty() | safeHtml\"></span>\n } @else {\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\n <button mat-button color=\"warn\" style=\"margin-left:auto\" (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon> Azzera tutto\n </button>\n </div>\n }\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto; padding-bottom: 12px;\">\n <mat-chip-set>\n @for (id of selection(); track id) {\n @let node = nodeById(id);\n @if (node && isChipVisible(id)) {\n <mat-chip (removed)=\"removeNode(node)\" style=\"max-width: 280px;\" [matTooltip]=\"node.name\">\n {{node.name}}\n @if (!disabled()) {\n <button matChipRemove matTooltip=\"Elimina\"><mat-icon>cancel</mat-icon></button>\n }\n </mat-chip>\n }\n }\n </mat-chip-set>\n </div>\n </div>\n </mat-tab>\n</mat-tab-group>",
308
+ styles: [".tree-picker-tabs ::ng-deep .mat-mdc-tab-body-wrapper{flex:1 1 auto;height:100%}.tree{padding:8px 0 16px;background-color:transparent!important}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:not(.tree-node-no-select):hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-filtered ::ng-deep .mdc-label,.tree-node-filtered ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-accent, #7894ae)!important}.tree-node-filtered .tree-node-label-only{font-weight:700;color:var(--ars-color-accent, #7894ae);opacity:1}.tree-node-activated ::ng-deep .mdc-label,.tree-node-activated ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-secondary, #4a635f)!important}.tree-node-label-only{display:flex;flex-direction:column;justify-content:center;padding-left:30px;opacity:.7}\n"],
309
+ dependencies: [
310
+ {
311
+ kind: "ngmodule",
312
+ type: MatTreeModule
313
+ },
314
+ {
315
+ kind: "directive",
316
+ type: i1.MatTreeNodeDef,
317
+ selector: "[matTreeNodeDef]",
318
+ inputs: ["matTreeNodeDefWhen", "matTreeNode"]
319
+ },
320
+ {
321
+ kind: "directive",
322
+ type: i1.MatTreeNodePadding,
323
+ selector: "[matTreeNodePadding]",
324
+ inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"]
325
+ },
326
+ {
327
+ kind: "directive",
328
+ type: i1.MatTreeNodeToggle,
329
+ selector: "[matTreeNodeToggle]",
330
+ inputs: ["matTreeNodeToggleRecursive"]
331
+ },
332
+ {
333
+ kind: "component",
334
+ type: i1.MatTree,
335
+ selector: "mat-tree",
336
+ exportAs: ["matTree"]
337
+ },
338
+ {
339
+ kind: "directive",
340
+ type: i1.MatTreeNode,
341
+ selector: "mat-tree-node",
342
+ inputs: ["tabIndex", "disabled"],
343
+ outputs: ["activation", "expandedChange"],
344
+ exportAs: ["matTreeNode"]
345
+ },
346
+ {
347
+ kind: "ngmodule",
348
+ type: MatCheckboxModule
349
+ },
350
+ {
351
+ kind: "component",
352
+ type: i2.MatCheckbox,
353
+ selector: "mat-checkbox",
354
+ inputs: [
355
+ "aria-label",
356
+ "aria-labelledby",
357
+ "aria-describedby",
358
+ "aria-expanded",
359
+ "aria-controls",
360
+ "aria-owns",
361
+ "id",
362
+ "required",
363
+ "labelPosition",
364
+ "name",
365
+ "value",
366
+ "disableRipple",
367
+ "tabIndex",
368
+ "color",
369
+ "disabledInteractive",
370
+ "checked",
371
+ "disabled",
372
+ "indeterminate"
373
+ ],
374
+ outputs: ["change", "indeterminateChange"],
375
+ exportAs: ["matCheckbox"]
376
+ },
377
+ {
378
+ kind: "ngmodule",
379
+ type: MatIconModule
380
+ },
381
+ {
382
+ kind: "component",
383
+ type: i3.MatIcon,
384
+ selector: "mat-icon",
385
+ inputs: [
386
+ "color",
387
+ "inline",
388
+ "svgIcon",
389
+ "fontSet",
390
+ "fontIcon"
391
+ ],
392
+ exportAs: ["matIcon"]
393
+ },
394
+ {
395
+ kind: "ngmodule",
396
+ type: MatTabsModule
397
+ },
398
+ {
399
+ kind: "directive",
400
+ type: i4.MatTabLabel,
401
+ selector: "[mat-tab-label], [matTabLabel]"
402
+ },
403
+ {
404
+ kind: "component",
405
+ type: i4.MatTab,
406
+ selector: "mat-tab",
407
+ inputs: [
408
+ "disabled",
409
+ "label",
410
+ "aria-label",
411
+ "aria-labelledby",
412
+ "labelClass",
413
+ "bodyClass",
414
+ "id"
415
+ ],
416
+ exportAs: ["matTab"]
417
+ },
418
+ {
419
+ kind: "component",
420
+ type: i4.MatTabGroup,
421
+ selector: "mat-tab-group",
422
+ inputs: [
423
+ "color",
424
+ "fitInkBarToContent",
425
+ "mat-stretch-tabs",
426
+ "mat-align-tabs",
427
+ "dynamicHeight",
428
+ "selectedIndex",
429
+ "headerPosition",
430
+ "animationDuration",
431
+ "contentTabIndex",
432
+ "disablePagination",
433
+ "disableRipple",
434
+ "preserveContent",
435
+ "backgroundColor",
436
+ "aria-label",
437
+ "aria-labelledby"
438
+ ],
439
+ outputs: [
440
+ "selectedIndexChange",
441
+ "focusChange",
442
+ "animationDone",
443
+ "selectedTabChange"
444
+ ],
445
+ exportAs: ["matTabGroup"]
446
+ },
447
+ {
448
+ kind: "ngmodule",
449
+ type: MatChipsModule
450
+ },
451
+ {
452
+ kind: "component",
453
+ type: i5.MatChip,
454
+ selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]",
455
+ inputs: [
456
+ "role",
457
+ "id",
458
+ "aria-label",
459
+ "aria-description",
460
+ "value",
461
+ "color",
462
+ "removable",
463
+ "highlighted",
464
+ "disableRipple",
465
+ "disabled"
466
+ ],
467
+ outputs: ["removed", "destroyed"],
468
+ exportAs: ["matChip"]
469
+ },
470
+ {
471
+ kind: "directive",
472
+ type: i5.MatChipRemove,
473
+ selector: "[matChipRemove]"
474
+ },
475
+ {
476
+ kind: "component",
477
+ type: i5.MatChipSet,
478
+ selector: "mat-chip-set",
479
+ inputs: [
480
+ "disabled",
481
+ "role",
482
+ "tabIndex"
483
+ ]
484
+ },
485
+ {
486
+ kind: "ngmodule",
487
+ type: MatButtonModule
488
+ },
489
+ {
490
+ kind: "component",
491
+ type: i6.MatButton,
492
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
493
+ inputs: ["matButton"],
494
+ exportAs: ["matButton", "matAnchor"]
495
+ },
496
+ {
497
+ kind: "component",
498
+ type: i6.MatIconButton,
499
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
500
+ exportAs: ["matButton", "matAnchor"]
501
+ },
502
+ {
503
+ kind: "ngmodule",
504
+ type: MatTooltipModule
505
+ },
506
+ {
507
+ kind: "directive",
508
+ type: i7.MatTooltip,
509
+ selector: "[matTooltip]",
510
+ inputs: [
511
+ "matTooltipPosition",
512
+ "matTooltipPositionAtOrigin",
513
+ "matTooltipDisabled",
514
+ "matTooltipShowDelay",
515
+ "matTooltipHideDelay",
516
+ "matTooltipTouchGestures",
517
+ "matTooltip",
518
+ "matTooltipClass"
519
+ ],
520
+ exportAs: ["matTooltip"]
521
+ },
522
+ {
523
+ kind: "ngmodule",
524
+ type: MatFormFieldModule
525
+ },
526
+ {
527
+ kind: "component",
528
+ type: i8.MatFormField,
529
+ selector: "mat-form-field",
530
+ inputs: [
531
+ "hideRequiredMarker",
532
+ "color",
533
+ "floatLabel",
534
+ "appearance",
535
+ "subscriptSizing",
536
+ "hintLabel"
537
+ ],
538
+ exportAs: ["matFormField"]
539
+ },
540
+ {
541
+ kind: "directive",
542
+ type: i8.MatLabel,
543
+ selector: "mat-label"
544
+ },
545
+ {
546
+ kind: "directive",
547
+ type: i8.MatSuffix,
548
+ selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
549
+ inputs: ["matTextSuffix"]
550
+ },
551
+ {
552
+ kind: "ngmodule",
553
+ type: MatInputModule
554
+ },
555
+ {
556
+ kind: "directive",
557
+ type: i9.MatInput,
558
+ selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
559
+ inputs: [
560
+ "disabled",
561
+ "id",
562
+ "placeholder",
563
+ "name",
564
+ "required",
565
+ "type",
566
+ "errorStateMatcher",
567
+ "aria-describedby",
568
+ "value",
569
+ "readonly",
570
+ "disabledInteractive"
571
+ ],
572
+ exportAs: ["matInput"]
573
+ },
574
+ {
575
+ kind: "directive",
576
+ type: FormField,
577
+ selector: "[formField]",
578
+ inputs: ["formField"],
579
+ exportAs: ["formField"]
580
+ },
581
+ {
582
+ kind: "ngmodule",
583
+ type: FlexLayoutModule
584
+ },
585
+ {
586
+ kind: "directive",
587
+ type: i10.FxLayoutDirective,
588
+ selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
589
+ inputs: [
590
+ "fxLayout",
591
+ "fxLayout.xs",
592
+ "fxLayout.sm",
593
+ "fxLayout.md",
594
+ "fxLayout.lg",
595
+ "fxLayout.xl",
596
+ "fxLayout.lt-sm",
597
+ "fxLayout.lt-md",
598
+ "fxLayout.lt-lg",
599
+ "fxLayout.lt-xl",
600
+ "fxLayout.gt-xs",
601
+ "fxLayout.gt-sm",
602
+ "fxLayout.gt-md",
603
+ "fxLayout.gt-lg"
604
+ ]
605
+ },
606
+ {
607
+ kind: "directive",
608
+ type: i10.FxFlexDirective,
609
+ selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ",
610
+ inputs: [
611
+ "fxFlex",
612
+ "fxFlex.xs",
613
+ "fxFlex.sm",
614
+ "fxFlex.md",
615
+ "fxFlex.lg",
616
+ "fxFlex.xl",
617
+ "fxFlex.lt-sm",
618
+ "fxFlex.lt-md",
619
+ "fxFlex.lt-lg",
620
+ "fxFlex.lt-xl",
621
+ "fxFlex.gt-xs",
622
+ "fxFlex.gt-sm",
623
+ "fxFlex.gt-md",
624
+ "fxFlex.gt-lg"
625
+ ]
626
+ },
627
+ {
628
+ kind: "directive",
629
+ type: i10.FxShowHideDirective,
630
+ selector: " [fxShow], [fxHide], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg] ",
631
+ inputs: [
632
+ "fxShow",
633
+ "fxShow.xs",
634
+ "fxShow.sm",
635
+ "fxShow.md",
636
+ "fxShow.lg",
637
+ "fxShow.xl",
638
+ "fxShow.lt-sm",
639
+ "fxShow.lt-md",
640
+ "fxShow.lt-lg",
641
+ "fxShow.lt-xl",
642
+ "fxShow.gt-xs",
643
+ "fxShow.gt-sm",
644
+ "fxShow.gt-md",
645
+ "fxShow.gt-lg",
646
+ "fxHide",
647
+ "fxHide.xs",
648
+ "fxHide.sm",
649
+ "fxHide.md",
650
+ "fxHide.lg",
651
+ "fxHide.xl",
652
+ "fxHide.lt-sm",
653
+ "fxHide.lt-md",
654
+ "fxHide.lt-lg",
655
+ "fxHide.lt-xl",
656
+ "fxHide.gt-xs",
657
+ "fxHide.gt-sm",
658
+ "fxHide.gt-md",
659
+ "fxHide.gt-lg"
660
+ ]
661
+ },
662
+ {
663
+ kind: "directive",
664
+ type: i10.FxLayoutAlignDirective,
665
+ selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
666
+ inputs: [
667
+ "fxLayoutAlign",
668
+ "fxLayoutAlign.xs",
669
+ "fxLayoutAlign.sm",
670
+ "fxLayoutAlign.md",
671
+ "fxLayoutAlign.lg",
672
+ "fxLayoutAlign.xl",
673
+ "fxLayoutAlign.lt-sm",
674
+ "fxLayoutAlign.lt-md",
675
+ "fxLayoutAlign.lt-lg",
676
+ "fxLayoutAlign.lt-xl",
677
+ "fxLayoutAlign.gt-xs",
678
+ "fxLayoutAlign.gt-sm",
679
+ "fxLayoutAlign.gt-md",
680
+ "fxLayoutAlign.gt-lg"
681
+ ]
682
+ },
683
+ {
684
+ kind: "directive",
685
+ type: i10.FxLayoutGapDirective,
686
+ selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ",
687
+ inputs: [
688
+ "fxLayoutGap",
689
+ "fxLayoutGap.xs",
690
+ "fxLayoutGap.sm",
691
+ "fxLayoutGap.md",
692
+ "fxLayoutGap.lg",
693
+ "fxLayoutGap.xl",
694
+ "fxLayoutGap.lt-sm",
695
+ "fxLayoutGap.lt-md",
696
+ "fxLayoutGap.lt-lg",
697
+ "fxLayoutGap.lt-xl",
698
+ "fxLayoutGap.gt-xs",
699
+ "fxLayoutGap.gt-sm",
700
+ "fxLayoutGap.gt-md",
701
+ "fxLayoutGap.gt-lg"
702
+ ]
703
+ },
704
+ {
705
+ kind: "directive",
706
+ type: i10.FxFlexFillDirective,
707
+ selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ",
708
+ inputs: [
709
+ "fxFlexFill",
710
+ "fxFill",
711
+ "fxFlexFill.xs",
712
+ "fxFlexFill.sm",
713
+ "fxFlexFill.md",
714
+ "fxFlexFill.lg",
715
+ "fxFlexFill.xl",
716
+ "fxFlexFill.lt-sm",
717
+ "fxFlexFill.lt-md",
718
+ "fxFlexFill.lt-lg",
719
+ "fxFlexFill.lt-xl",
720
+ "fxFlexFill.gt-xs",
721
+ "fxFlexFill.gt-sm",
722
+ "fxFlexFill.gt-md",
723
+ "fxFlexFill.gt-lg"
724
+ ]
725
+ },
726
+ {
727
+ kind: "pipe",
728
+ type: SafeHtmlPipe,
729
+ name: "safeHtml"
730
+ }
731
+ ],
732
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
733
+ });
734
+ }
735
+ };
736
+ i0.ɵɵngDeclareClassMetadata({
737
+ minVersion: "12.0.0",
738
+ version: "22.2.1",
739
+ ngImport: i0,
740
+ type: TreePickerComponent,
741
+ decorators: [{
742
+ type: Component,
743
+ args: [{
744
+ selector: "tree-picker",
745
+ changeDetection: ChangeDetectionStrategy.OnPush,
746
+ imports: [
747
+ MatTreeModule,
748
+ MatCheckboxModule,
749
+ MatIconModule,
750
+ MatTabsModule,
751
+ MatChipsModule,
752
+ MatButtonModule,
753
+ MatTooltipModule,
754
+ MatFormFieldModule,
755
+ MatInputModule,
756
+ FormField,
757
+ FlexLayoutModule,
758
+ SafeHtmlPipe
759
+ ],
760
+ template: "<mat-tab-group class=\"taxonomy-picker-tabs\" style=\"height:100%\">\n <mat-tab style=\"overflow-x: hidden !important; height: 100%\">\n <ng-template mat-tab-label>\n Seleziona\n <mat-icon\n style=\"font-size:16px;height:16px;width:16px;margin-left:4px;vertical-align:middle;color:var(--mat-sys-primary)\"\n [matTooltip]=\"'Nessuna selezione = tutti gli argomenti inclusi;\\r\\nOgni elemento selezionato include sempre tutti i suoi sottoelementi'\"\n matTooltipPosition=\"above\">\n info\n </mat-icon>\n </ng-template>\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex fxHide.xs>\n <mat-form-field style=\"width:200px; padding: 8px 0px\" appearance=\"outline\"\n subscriptSizing=\"dynamic\">\n <mat-label>Cerca...</mat-label>\n <input type=\"text\" (keyup)=\"doFilter()\" matInput [formField]=\"filterForm\"\n (keydown.enter)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\"\n (keydown.arrowDown)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\">\n @if (filterText()) {\n <button type=\"button\" type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button\n aria-label=\"Clear\" (click)=\"clearFilter()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n @if (filteredItems().length > 0) {\n <div fxFlex=\"50px\" fxHide.xs fxLayoutAlign=\"end center\">\n <div class=\"small\">{{filterIndex() + 1}} / {{filteredItems().length}}</div>\n </div>\n <div fxFlex=\"48px\" fxHide.xs fxLayoutAlign=\"end center\">\n <button mat-icon-button (click)=\"nextFiltered()\">\n <mat-icon aria-label=\"Vai al prossimo\"\n matTooltip=\"Vai al prossimo\">arrow_downward</mat-icon>\n </button>\n </div>\n }\n <div fxFlex=\"*\" fxLayoutAlign=\"end center\">\n <button mat-icon-button [matTooltip]=\"'Espandi tutto'\" (click)=\"expandAll()\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Comprimi tutto'\" (click)=\"collapseAll()\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Azzera selezione'\" [disabled]=\"!hasSelection()\"\n (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto;\">\n <mat-tree [dataSource]=\"tree()\" [childrenAccessor]=\"treeChildrenAccessor\" class=\"tree\">\n <!-- Leaf node -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\n class=\"tree-node\" [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button disabled style=\"visibility: hidden\"></button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n <!-- Expandable node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [matTreeNodePaddingIndent]=\"20\" #treeNode=\"matTreeNode\" class=\"tree-node\"\n [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button matTreeNodeToggle>\n <mat-icon>{{treeNode.isExpanded ? 'expand_more' : 'chevron_right'}}</mat-icon>\n </button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [indeterminate]=\"isIndeterminate(node)\"\n [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n </div>\n </mat-tab>\n <mat-tab [label]=\"hasSelection() ? 'Selezionati (' + selectedVisibleCount() + ')' : 'Selezionati (tutti)'\"\n style=\"height: 100%;\">\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"8px\" style=\"padding:12px\">\n @if (!hasSelection()) {\n <mat-icon>info</mat-icon>\n <span [innerHTML]=\"descriptionEmpty() | safeHtml\"></span>\n } @else {\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\n <button mat-button color=\"warn\" style=\"margin-left:auto\" (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon> Azzera tutto\n </button>\n </div>\n }\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto; padding-bottom: 12px;\">\n <mat-chip-set>\n @for (id of selection(); track id) {\n @let node = nodeById(id);\n @if (node && isChipVisible(id)) {\n <mat-chip (removed)=\"removeNode(node)\" style=\"max-width: 280px;\" [matTooltip]=\"node.name\">\n {{node.name}}\n @if (!disabled()) {\n <button matChipRemove matTooltip=\"Elimina\"><mat-icon>cancel</mat-icon></button>\n }\n </mat-chip>\n }\n }\n </mat-chip-set>\n </div>\n </div>\n </mat-tab>\n</mat-tab-group>",
761
+ styles: [".tree-picker-tabs ::ng-deep .mat-mdc-tab-body-wrapper{flex:1 1 auto;height:100%}.tree{padding:8px 0 16px;background-color:transparent!important}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:not(.tree-node-no-select):hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-filtered ::ng-deep .mdc-label,.tree-node-filtered ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-accent, #7894ae)!important}.tree-node-filtered .tree-node-label-only{font-weight:700;color:var(--ars-color-accent, #7894ae);opacity:1}.tree-node-activated ::ng-deep .mdc-label,.tree-node-activated ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-secondary, #4a635f)!important}.tree-node-label-only{display:flex;flex-direction:column;justify-content:center;padding-left:30px;opacity:.7}\n"]
762
+ }]
763
+ }],
764
+ ctorParameters: () => [],
765
+ propDecorators: {
766
+ tree: [{
767
+ type: i0.Input,
768
+ args: [{
769
+ isSignal: true,
770
+ alias: "tree",
771
+ required: false
772
+ }]
773
+ }],
774
+ selection: [{
775
+ type: i0.Input,
776
+ args: [{
777
+ isSignal: true,
778
+ alias: "selection",
779
+ required: false
780
+ }]
781
+ }, {
782
+ type: i0.Output,
783
+ args: ["selectionChange"]
784
+ }],
785
+ disabled: [{
786
+ type: i0.Input,
787
+ args: [{
788
+ isSignal: true,
789
+ alias: "disabled",
790
+ required: false
791
+ }]
792
+ }],
793
+ descriptionEmpty: [{
794
+ type: i0.Input,
795
+ args: [{
796
+ isSignal: true,
797
+ alias: "descriptionEmpty",
798
+ required: false
799
+ }]
800
+ }],
801
+ maxDepth: [{
802
+ type: i0.Input,
803
+ args: [{
804
+ isSignal: true,
805
+ alias: "maxDepth",
806
+ required: false
807
+ }]
808
+ }],
809
+ maxDepthOverrides: [{
810
+ type: i0.Input,
811
+ args: [{
812
+ isSignal: true,
813
+ alias: "maxDepthOverrides",
814
+ required: false
815
+ }]
816
+ }],
817
+ minDepth: [{
818
+ type: i0.Input,
819
+ args: [{
820
+ isSignal: true,
821
+ alias: "minDepth",
822
+ required: false
823
+ }]
824
+ }],
825
+ selectionCount: [{
826
+ type: i0.Output,
827
+ args: ["selectionCount"]
828
+ }],
829
+ changed: [{
830
+ type: i0.Output,
831
+ args: ["changed"]
832
+ }],
833
+ _treeRef: [{
834
+ type: i0.ViewChild,
835
+ args: [i0.forwardRef(() => MatTree), { isSignal: true }]
836
+ }]
837
+ }
838
+ });
367
839
  export { TreePickerComponent };
368
- //# sourceMappingURL=arsedizioni-ars-utils-ui.controls.tree.mjs.map
840
+
841
+ //# sourceMappingURL=arsedizioni-ars-utils-ui.controls.tree.mjs.map