@arsedizioni/ars-utils 22.5.38 → 22.5.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +185 -179
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +15 -15
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +44 -43
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-core.mjs +48 -48
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +42 -42
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +15 -15
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +9 -9
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +118 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +17 -448
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +368 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +18 -18
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +12 -12
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +10 -10
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +12 -12
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +12 -12
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +9 -9
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +61 -61
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +9 -9
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +9 -9
- package/package.json +9 -1
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +3 -2
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +3 -180
- package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +49 -0
- package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +136 -0
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +1 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { INode } from '@arsedizioni/ars-utils/core';
|
|
4
|
+
|
|
5
|
+
declare class TreePickerComponent {
|
|
6
|
+
/** Nested tree data to display. */
|
|
7
|
+
readonly tree: _angular_core.InputSignal<INode[]>;
|
|
8
|
+
/** Currently selected node ids. Supports two-way binding via [(selection)]. */
|
|
9
|
+
readonly selection: _angular_core.ModelSignal<string[]>;
|
|
10
|
+
/** When true, checkboxes and chip remove buttons are disabled (mirrors Material convention). */
|
|
11
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
12
|
+
/** Description to display when no selection is made. */
|
|
13
|
+
readonly descriptionEmpty: _angular_core.InputSignal<string>;
|
|
14
|
+
/** Maximum number of tree levels to display (default: 3). */
|
|
15
|
+
readonly maxDepth: _angular_core.InputSignal<number>;
|
|
16
|
+
/**
|
|
17
|
+
* List of node IDs at depth >= maxDepth that unlock selection for themselves
|
|
18
|
+
* and all their descendants, regardless of depth.
|
|
19
|
+
*/
|
|
20
|
+
readonly maxDepthOverrides: _angular_core.InputSignal<string[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Number of levels to auto-expand on load.
|
|
23
|
+
* 0 or undefined = only top level visible (no expansion);
|
|
24
|
+
* 1 = expand depth-0 nodes; 2 = expand depth-0 and depth-1 nodes; etc.
|
|
25
|
+
* Must be less than maxDepth.
|
|
26
|
+
*/
|
|
27
|
+
readonly minDepth: _angular_core.InputSignal<number>;
|
|
28
|
+
/**
|
|
29
|
+
* Emits the count of visible selected nodes whenever the selection changes.
|
|
30
|
+
* Emits 0 when nothing is selected (meaning all items are implicitly included).
|
|
31
|
+
*/
|
|
32
|
+
readonly selectionCount: _angular_core.OutputEmitterRef<number>;
|
|
33
|
+
/** Emits void whenever the user changes the selection (toggle, remove, clear). */
|
|
34
|
+
readonly changed: _angular_core.OutputEmitterRef<void>;
|
|
35
|
+
private readonly _treeRef;
|
|
36
|
+
private readonly _elRef;
|
|
37
|
+
/**
|
|
38
|
+
* Set of all node IDs selectable via overrides: each listed root and all its descendants.
|
|
39
|
+
* Recomputed whenever the tree data or the override list changes.
|
|
40
|
+
*/
|
|
41
|
+
private readonly _overrideSubtreeSet;
|
|
42
|
+
/** All three maps rebuilt lazily as a single computed whenever taxonomy changes. */
|
|
43
|
+
private readonly _maps;
|
|
44
|
+
/** O(1) set of selected ids, rebuilt only when selection changes. */
|
|
45
|
+
private readonly _selectedSet;
|
|
46
|
+
/** True when at least one node is explicitly selected. */
|
|
47
|
+
protected readonly hasSelection: _angular_core.Signal<boolean>;
|
|
48
|
+
/** Count of selected nodes within selectable levels (depth < maxDepth or in overrides), shown in the tab label. */
|
|
49
|
+
protected readonly selectedVisibleCount: _angular_core.Signal<number>;
|
|
50
|
+
readonly treeChildrenAccessor: (node: INode) => INode[];
|
|
51
|
+
readonly hasChild: (_: number, node: INode) => boolean;
|
|
52
|
+
/** Returns true when the node can be selected: depth < maxDepth or explicitly listed in maxDepthOverrides. */
|
|
53
|
+
protected isSelectable(node: INode): boolean;
|
|
54
|
+
private _isSelectableNode;
|
|
55
|
+
/** Current filter text. */
|
|
56
|
+
protected readonly filterText: _angular_core.WritableSignal<string>;
|
|
57
|
+
/** Root signal form bound to the filter text input. */
|
|
58
|
+
protected readonly filterForm: _angular_forms_signals.FieldTree<string, string | number, "writable">;
|
|
59
|
+
/** Nodes matching the current filter text, in nodeMap iteration order. */
|
|
60
|
+
protected readonly filteredItems: _angular_core.WritableSignal<INode[]>;
|
|
61
|
+
/** Index of the currently highlighted filtered node (-1 = none). */
|
|
62
|
+
protected readonly filterIndex: _angular_core.WritableSignal<number>;
|
|
63
|
+
/** The currently highlighted filtered node, or null. */
|
|
64
|
+
protected readonly filteredNode: _angular_core.Signal<INode>;
|
|
65
|
+
constructor();
|
|
66
|
+
/** Expands all visible nodes in the tree. */
|
|
67
|
+
protected expandAll(): void;
|
|
68
|
+
/** Collapses all nodes in the tree. */
|
|
69
|
+
protected collapseAll(): void;
|
|
70
|
+
/** Clears the entire selection. */
|
|
71
|
+
protected clearAll(): void;
|
|
72
|
+
/** Searches nodes by text and moves to the first match. */
|
|
73
|
+
protected doFilter(): void;
|
|
74
|
+
/** Clears the filter and restores the original tree state. */
|
|
75
|
+
protected clearFilter(): void;
|
|
76
|
+
/** Moves to the next matching node, cycling back to the first. */
|
|
77
|
+
protected nextFiltered(): void;
|
|
78
|
+
/** Returns true when the node is the currently highlighted filter match. */
|
|
79
|
+
protected isFilteredNode(node: INode): boolean;
|
|
80
|
+
/** Expands ancestors of the target node and scrolls it into view. */
|
|
81
|
+
private _scrollToFiltered;
|
|
82
|
+
/**
|
|
83
|
+
* Returns true when the node is in the active selection.
|
|
84
|
+
* @param node - tree node to check
|
|
85
|
+
* @returns true if selected
|
|
86
|
+
*/
|
|
87
|
+
protected isSelected(node: INode): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Returns true when a subset (but not all) of the node's descendants are selected,
|
|
90
|
+
* producing the indeterminate checkbox state.
|
|
91
|
+
* @param node - tree node to evaluate
|
|
92
|
+
* @returns true if the node is in a partial-selection (indeterminate) state
|
|
93
|
+
*/
|
|
94
|
+
protected isIndeterminate(node: INode): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Toggles the node and all its descendants; then syncs the ancestor chain.
|
|
97
|
+
* @param node - the node that was clicked
|
|
98
|
+
*/
|
|
99
|
+
protected toggleNode(node: INode): void;
|
|
100
|
+
/**
|
|
101
|
+
* Deselects the node and all its descendants. Called by the chip remove button.
|
|
102
|
+
* @param node - the node to remove from the selection
|
|
103
|
+
*/
|
|
104
|
+
protected removeNode(node: INode): void;
|
|
105
|
+
/**
|
|
106
|
+
* Returns the INode for the given id, or undefined if not found.
|
|
107
|
+
* @param id - node id to look up
|
|
108
|
+
* @returns the matching INode
|
|
109
|
+
*/
|
|
110
|
+
protected nodeById(id: string): INode | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* Returns true when the node at the given id is within the visible depth range
|
|
113
|
+
* and should appear in the chip list.
|
|
114
|
+
* @param id - node id to check
|
|
115
|
+
* @returns true if the node depth is less than maxDepth
|
|
116
|
+
*/
|
|
117
|
+
protected isChipVisible(id: string): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Returns only the selectable descendants of node (depth < maxDepth or in overrides),
|
|
120
|
+
* used for indeterminate state and parent auto-selection logic.
|
|
121
|
+
* @param node - root of the subtree to traverse
|
|
122
|
+
* @returns flat array of selectable descendant INodes
|
|
123
|
+
*/
|
|
124
|
+
private _getSelectableDescendants;
|
|
125
|
+
/**
|
|
126
|
+
* Walks up the ancestor chain from node, selecting a parent only when all
|
|
127
|
+
* its descendants are in the set, deselecting it otherwise.
|
|
128
|
+
* @param node - starting node for the upward traversal
|
|
129
|
+
* @param set - mutable selection set updated in place
|
|
130
|
+
*/
|
|
131
|
+
private _syncParentsInSet;
|
|
132
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreePickerComponent, never>;
|
|
133
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TreePickerComponent, "tree-picker", never, { "tree": { "alias": "tree"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "descriptionEmpty": { "alias": "descriptionEmpty"; "required": false; "isSignal": true; }; "maxDepth": { "alias": "maxDepth"; "required": false; "isSignal": true; }; "maxDepthOverrides": { "alias": "maxDepthOverrides"; "required": false; "isSignal": true; }; "minDepth": { "alias": "minDepth"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "selectionCount": "selectionCount"; "changed": "changed"; }, never, never, true, never>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { TreePickerComponent };
|
|
@@ -459,7 +459,7 @@ declare class NavigationBarComponent {
|
|
|
459
459
|
* `compact` wraps the icon only (56x32 pill), `wide` wraps icon and label
|
|
460
460
|
* together, exactly as described by the M3 Expressive specs.
|
|
461
461
|
*/
|
|
462
|
-
protected readonly indicatorMode: _angular_core.Signal<"
|
|
462
|
+
protected readonly indicatorMode: _angular_core.Signal<"wide" | "compact">;
|
|
463
463
|
/** Tooltip placement derived from the variant and from the anchoring edge. */
|
|
464
464
|
protected readonly tooltipPosition: _angular_core.Signal<TooltipPosition>;
|
|
465
465
|
/** Inline width override for the rail / drawer, or `undefined` to keep the spec default. */
|