@arsedizioni/ars-utils 22.1.5 → 22.5.2
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 +158 -10
- package/clipper.ui/clipper.scss +564 -0
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +11 -7
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +609 -0
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +591 -0
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-core.mjs +270 -1449
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +14 -4108
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +962 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +506 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +450 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +184 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +825 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +708 -0
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +426 -0
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +531 -0
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +54 -1227
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1049 -0
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +263 -0
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +4 -3
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +53 -0
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +517 -0
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +246 -0
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils.mjs +13 -12
- package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
- package/help/package.json +4 -0
- package/package.json +80 -14
- package/styles/ui.colors.scss +23 -0
- package/support.ui/package.json +4 -0
- package/tinymce/package.json +4 -0
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +1 -2
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +4 -1
- package/types/arsedizioni-ars-utils-core.d.ts +684 -1004
- package/types/arsedizioni-ars-utils-core.date.d.ts +304 -0
- package/types/arsedizioni-ars-utils-core.markdown.d.ts +159 -0
- package/types/arsedizioni-ars-utils-ui.application.d.ts +10 -2022
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +413 -0
- package/types/arsedizioni-ars-utils-ui.d.ts +183 -566
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +224 -0
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +228 -0
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +47 -0
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +309 -0
- package/types/arsedizioni-ars-utils-ui.files.d.ts +271 -0
- package/types/arsedizioni-ars-utils-ui.filters.d.ts +163 -0
- package/types/arsedizioni-ars-utils-ui.help.d.ts +220 -0
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +650 -0
- package/types/arsedizioni-ars-utils-ui.notifications.d.ts +73 -0
- package/types/arsedizioni-ars-utils-ui.paginator.d.ts +23 -0
- package/types/arsedizioni-ars-utils-ui.shell.d.ts +345 -0
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +63 -0
- package/types/arsedizioni-ars-utils.d.ts +4 -10
- package/ui.tinymce/README.md +12 -0
- package/ui.tinymce/langs/it.js +466 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
4
|
+
import { NameValueItem, INode } from '@arsedizioni/ars-utils/core';
|
|
5
|
+
|
|
6
|
+
declare class ButtonSelectorComponent implements OnDestroy, ControlValueAccessor {
|
|
7
|
+
ngControl: NgControl;
|
|
8
|
+
/** Emitted whenever the selected value changes (including programmatic resets). */
|
|
9
|
+
readonly changed: _angular_core.OutputEmitterRef<NameValueItem<any>>;
|
|
10
|
+
/** Emitted when the user explicitly picks an item from the menu. */
|
|
11
|
+
readonly selected: _angular_core.OutputEmitterRef<NameValueItem<any>>;
|
|
12
|
+
private readonly stateChanges;
|
|
13
|
+
private focused;
|
|
14
|
+
private _value;
|
|
15
|
+
set value(value: NameValueItem<any> | undefined);
|
|
16
|
+
/**
|
|
17
|
+
* Updates the internal state. Form propagation is skipped for model->view
|
|
18
|
+
* writes (writeValue) to avoid the CVA echo loop, and performed for
|
|
19
|
+
* user/programmatic changes via the `value` setter.
|
|
20
|
+
* @param value - The new value to store and display.
|
|
21
|
+
* @param propagate - When `true`, notifies the registered onChange callback.
|
|
22
|
+
*/
|
|
23
|
+
private setValue;
|
|
24
|
+
/** The current value as the selected item. */
|
|
25
|
+
get value(): NameValueItem<any> | undefined;
|
|
26
|
+
private _disabled;
|
|
27
|
+
get disabled(): boolean;
|
|
28
|
+
set disabled(value: boolean);
|
|
29
|
+
private propagateChange;
|
|
30
|
+
private propagateTouched;
|
|
31
|
+
id: string;
|
|
32
|
+
describedBy: string;
|
|
33
|
+
private readonly renderer;
|
|
34
|
+
/** Currently selected item, kept in sync with the form control value. */
|
|
35
|
+
protected readonly current: _angular_core.WritableSignal<NameValueItem<any>>;
|
|
36
|
+
/** Width of the trigger button in pixels. Use `-1` for 100 %, `0` for `auto`. */
|
|
37
|
+
readonly width: _angular_core.InputSignal<number>;
|
|
38
|
+
/** Border thickness override. Use `-1` to inherit. */
|
|
39
|
+
readonly border: _angular_core.InputSignal<number>;
|
|
40
|
+
/** CSS border-radius of the trigger button. Defaults to a pill shape. */
|
|
41
|
+
readonly borderRadius: _angular_core.InputSignal<string>;
|
|
42
|
+
/** Placeholder label shown when nothing is selected. */
|
|
43
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
44
|
+
/** Label shown above the selected value (replaces `label` when an item is selected). */
|
|
45
|
+
readonly labelSelected: _angular_core.InputSignal<string>;
|
|
46
|
+
/** List of selectable options. */
|
|
47
|
+
readonly options: _angular_core.InputSignal<NameValueItem<any>[]>;
|
|
48
|
+
/** When `true`, the first available option is pre-selected on init. */
|
|
49
|
+
readonly autoSelect: _angular_core.InputSignal<boolean>;
|
|
50
|
+
constructor(ngControl: NgControl);
|
|
51
|
+
ngOnDestroy(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Writes a new value to the component (called by the form layer).
|
|
54
|
+
* @param value - The new value to display.
|
|
55
|
+
*/
|
|
56
|
+
writeValue(value: any): void;
|
|
57
|
+
/**
|
|
58
|
+
* Registers the on-change callback (called by the form layer).
|
|
59
|
+
* @param fn - Callback to invoke whenever the value changes.
|
|
60
|
+
*/
|
|
61
|
+
registerOnChange(fn: (_: any) => void): void;
|
|
62
|
+
/**
|
|
63
|
+
* Registers the on-touched callback (called by the form layer).
|
|
64
|
+
* @param fn - Callback to invoke when the control is touched.
|
|
65
|
+
*/
|
|
66
|
+
registerOnTouched(fn: () => void): void;
|
|
67
|
+
/**
|
|
68
|
+
* Sets the ARIA described-by IDs for accessibility.
|
|
69
|
+
* @param ids - The list of element IDs to associate with this control.
|
|
70
|
+
*/
|
|
71
|
+
setDescribedByIds(ids: string[]): void;
|
|
72
|
+
/**
|
|
73
|
+
* Updates the disabled state when the Angular form layer changes it.
|
|
74
|
+
* @param isDisabled - Whether the control should be disabled.
|
|
75
|
+
*/
|
|
76
|
+
setDisabledState(isDisabled: boolean): void;
|
|
77
|
+
/**
|
|
78
|
+
* Handles a click on the container element, focusing it and marking it as touched.
|
|
79
|
+
*/
|
|
80
|
+
onContainerClick(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Selects an option and optionally emits the `selected` output event.
|
|
83
|
+
* @param item - The item to select.
|
|
84
|
+
* @param notify - When `true` (default), emits the `selected` event.
|
|
85
|
+
*/
|
|
86
|
+
select(item: NameValueItem<any>, notify?: boolean): void;
|
|
87
|
+
/** Clears the current selection and resets the control to an empty state. */
|
|
88
|
+
reset(): void;
|
|
89
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonSelectorComponent, [{ optional: true; self: true; }]>;
|
|
90
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonSelectorComponent, "button-selector", never, { "disabled": { "alias": "disabled"; "required": false; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "border": { "alias": "border"; "required": false; "isSignal": true; }; "borderRadius": { "alias": "borderRadius"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelSelected": { "alias": "labelSelected"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "autoSelect": { "alias": "autoSelect"; "required": false; "isSignal": true; }; }, { "changed": "changed"; "selected": "selected"; }, never, never, true, never>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface ButtonToggleInfo {
|
|
94
|
+
value: boolean;
|
|
95
|
+
toggled: boolean;
|
|
96
|
+
}
|
|
97
|
+
declare class ButtonToggleComponent {
|
|
98
|
+
/** Emitted each time the button is clicked. Carries the current `value` and the new `toggled` state. */
|
|
99
|
+
readonly changed: _angular_core.OutputEmitterRef<ButtonToggleInfo>;
|
|
100
|
+
/** Current value bound from the parent. Drives label and icon selection. */
|
|
101
|
+
readonly value: _angular_core.InputSignal<boolean>;
|
|
102
|
+
/** Width of the button in pixels. Use `-1` for automatic sizing. */
|
|
103
|
+
readonly width: _angular_core.InputSignal<number>;
|
|
104
|
+
/** Border thickness override in pixels. Use `-1` to inherit. */
|
|
105
|
+
readonly border: _angular_core.InputSignal<number>;
|
|
106
|
+
/** Label shown when `value` is `true`. */
|
|
107
|
+
readonly labelOn: _angular_core.InputSignal<string>;
|
|
108
|
+
/** Label shown when `value` is `false`. */
|
|
109
|
+
readonly labelOff: _angular_core.InputSignal<string>;
|
|
110
|
+
/** Material icon name shown when `value` is `true`. */
|
|
111
|
+
readonly iconOn: _angular_core.InputSignal<string>;
|
|
112
|
+
/** Material icon name shown when `value` is `false`. */
|
|
113
|
+
readonly iconOff: _angular_core.InputSignal<string>;
|
|
114
|
+
/** CSS class applied to the button at all breakpoints. */
|
|
115
|
+
readonly cssClass: _angular_core.InputSignal<string>;
|
|
116
|
+
/** CSS class applied to the button on `xs` screens. */
|
|
117
|
+
readonly cssClassSmall: _angular_core.InputSignal<string>;
|
|
118
|
+
/** Resolves the appropriate label for the current value state. */
|
|
119
|
+
protected readonly label: _angular_core.Signal<string>;
|
|
120
|
+
/** Resolves the appropriate icon name for the current value state. */
|
|
121
|
+
protected readonly icon: _angular_core.Signal<string>;
|
|
122
|
+
/**
|
|
123
|
+
* Toggles the button state and emits the `changed` event.
|
|
124
|
+
* The emitted `toggled` value is the logical inverse of the current `value`.
|
|
125
|
+
*/
|
|
126
|
+
toggle(): void;
|
|
127
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonToggleComponent, never>;
|
|
128
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonToggleComponent, "button-toggle", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "border": { "alias": "border"; "required": false; "isSignal": true; }; "labelOn": { "alias": "labelOn"; "required": false; "isSignal": true; }; "labelOff": { "alias": "labelOff"; "required": false; "isSignal": true; }; "iconOn": { "alias": "iconOn"; "required": false; "isSignal": true; }; "iconOff": { "alias": "iconOff"; "required": false; "isSignal": true; }; "cssClass": { "alias": "cssClass"; "required": false; "isSignal": true; }; "cssClassSmall": { "alias": "cssClassSmall"; "required": false; "isSignal": true; }; }, { "changed": "changed"; }, never, never, true, never>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare class ChipsSelectorComponent implements OnDestroy, ControlValueAccessor {
|
|
132
|
+
ngControl: NgControl;
|
|
133
|
+
/** Emitted when the selection changes. Carries the new array of selected items, or `undefined` when cleared. */
|
|
134
|
+
readonly changed: _angular_core.OutputEmitterRef<NameValueItem<any>[]>;
|
|
135
|
+
protected readonly containerId: string;
|
|
136
|
+
protected readonly containerWidth: _angular_core.WritableSignal<number>;
|
|
137
|
+
private focused;
|
|
138
|
+
private readonly stateChanges;
|
|
139
|
+
private readonly destroyRef;
|
|
140
|
+
private changesEnabled;
|
|
141
|
+
private destroyed;
|
|
142
|
+
private widthRetries;
|
|
143
|
+
/** Observer that tracks size changes of the container element. */
|
|
144
|
+
private resizeObserver?;
|
|
145
|
+
/** Debounce bridge for `ResizeObserver` notifications. */
|
|
146
|
+
private readonly resize$;
|
|
147
|
+
/** List of available options to display as chips. */
|
|
148
|
+
readonly options: _angular_core.InputSignal<NameValueItem<any>[]>;
|
|
149
|
+
/** Minimum width in pixels when collapsed. Use `-1` for automatic. */
|
|
150
|
+
readonly collapsedWidth: _angular_core.InputSignal<number>;
|
|
151
|
+
/** Display mode used when the selector is in collapsed state. */
|
|
152
|
+
readonly collapsedDisplayMode: _angular_core.InputSignal<"dropdown" | "button">;
|
|
153
|
+
/** Pixel threshold below which the selector collapses. Use `-1` to disable. */
|
|
154
|
+
readonly collapseAt: _angular_core.InputSignal<number>;
|
|
155
|
+
/** When `true`, `collapseAt` is compared against the container width rather than the window width. */
|
|
156
|
+
readonly collapseAtContainer: _angular_core.InputSignal<boolean>;
|
|
157
|
+
protected readonly collapsed: _angular_core.Signal<boolean>;
|
|
158
|
+
/** Label shown in the dropdown / above the chip list. */
|
|
159
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
160
|
+
/** When `true`, multiple chips can be selected simultaneously. */
|
|
161
|
+
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
162
|
+
/** When `true`, at least one item must remain selected. */
|
|
163
|
+
readonly mustSelect: _angular_core.InputSignal<boolean>;
|
|
164
|
+
/** Layout mode: `'collapsed'` forces dropdown mode, `'dynamic'` collapses based on `collapseAt`. */
|
|
165
|
+
readonly mode: _angular_core.InputSignal<"collapsed" | "dynamic">;
|
|
166
|
+
/** When `true`, chips are stacked vertically instead of wrapping horizontally. */
|
|
167
|
+
readonly stacked: _angular_core.InputSignal<boolean>;
|
|
168
|
+
/** Chips below this index receive extra padding to align with other UI elements. */
|
|
169
|
+
readonly padAt: _angular_core.InputSignal<number>;
|
|
170
|
+
/** When `true`, the control is required. */
|
|
171
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
172
|
+
/** Placeholder text shown when no value is selected. */
|
|
173
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
174
|
+
private _disabled;
|
|
175
|
+
get disabled(): boolean;
|
|
176
|
+
set disabled(value: boolean);
|
|
177
|
+
id: string;
|
|
178
|
+
describedBy: string;
|
|
179
|
+
/** True when the label should float above the field (focused or has a value). */
|
|
180
|
+
get shouldLabelFloat(): boolean;
|
|
181
|
+
private _value?;
|
|
182
|
+
set value(value: NameValueItem<any>[] | undefined);
|
|
183
|
+
/**
|
|
184
|
+
* Updates the internal state and selection mirrors.
|
|
185
|
+
* @param value - The new selection array.
|
|
186
|
+
* @param propagate - When `true`, notifies the registered onChange callback.
|
|
187
|
+
*/
|
|
188
|
+
private setValue;
|
|
189
|
+
/** The current value as an array of selected items. */
|
|
190
|
+
get value(): NameValueItem<any>[] | undefined;
|
|
191
|
+
/** True when no item is selected. */
|
|
192
|
+
get empty(): boolean;
|
|
193
|
+
/** True when the control has validation errors and has been touched. */
|
|
194
|
+
get errorState(): boolean;
|
|
195
|
+
private propagateChange;
|
|
196
|
+
private propagateTouched;
|
|
197
|
+
private readonly renderer;
|
|
198
|
+
private readonly cdr;
|
|
199
|
+
/** Currently selected items (may contain multiple entries when `multiple` is `true`). */
|
|
200
|
+
protected selection: NameValueItem<any>[];
|
|
201
|
+
/** The single selected item — used in `button` collapsed-display mode. */
|
|
202
|
+
protected singleSelection?: NameValueItem<any>;
|
|
203
|
+
constructor(ngControl: NgControl);
|
|
204
|
+
ngOnDestroy(): void;
|
|
205
|
+
/**
|
|
206
|
+
* Measures the container (or window) width and updates the `containerWidth` signal,
|
|
207
|
+
* retrying after 100 ms if the element is not yet laid out.
|
|
208
|
+
*/
|
|
209
|
+
private updateContainerWidth;
|
|
210
|
+
/**
|
|
211
|
+
* Resolves the effective selection array for the current display mode.
|
|
212
|
+
* In single-select collapsed button mode the `singleSelection` item is wrapped in an array.
|
|
213
|
+
* @returns The array of currently selected items.
|
|
214
|
+
*/
|
|
215
|
+
private getSelection;
|
|
216
|
+
/**
|
|
217
|
+
* Schedules a value update after a short delay, giving the template time to sync `ngModel`.
|
|
218
|
+
*/
|
|
219
|
+
updateValue(): void;
|
|
220
|
+
/**
|
|
221
|
+
* Returns `true` when the given item can be selected in the current mode.
|
|
222
|
+
* In single-select mode an already-selected item is not re-selectable.
|
|
223
|
+
* @param item - The item to check.
|
|
224
|
+
* @returns True when the item is selectable.
|
|
225
|
+
*/
|
|
226
|
+
isSelectable(item: NameValueItem<any>): boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Writes a new value to the component (called by the form layer).
|
|
229
|
+
* @param value - The new selection to display.
|
|
230
|
+
*/
|
|
231
|
+
writeValue(value: any): void;
|
|
232
|
+
/**
|
|
233
|
+
* Registers the on-change callback (called by the form layer).
|
|
234
|
+
* @param fn - Callback to invoke whenever the value changes.
|
|
235
|
+
*/
|
|
236
|
+
registerOnChange(fn: (_: any) => void): void;
|
|
237
|
+
/**
|
|
238
|
+
* Registers the on-touched callback (called by the form layer).
|
|
239
|
+
* @param fn - Callback to invoke when the control is touched.
|
|
240
|
+
*/
|
|
241
|
+
registerOnTouched(fn: () => void): void;
|
|
242
|
+
/**
|
|
243
|
+
* Sets the ARIA described-by IDs for accessibility.
|
|
244
|
+
* @param ids - The list of element IDs to associate with this control.
|
|
245
|
+
*/
|
|
246
|
+
setDescribedByIds(ids: string[]): void;
|
|
247
|
+
/**
|
|
248
|
+
* Updates the disabled state when the Angular form layer changes it.
|
|
249
|
+
* @param isDisabled - Whether the control should be disabled.
|
|
250
|
+
*/
|
|
251
|
+
setDisabledState(isDisabled: boolean): void;
|
|
252
|
+
/**
|
|
253
|
+
* Handles a click on the container element, focusing it and marking it as touched.
|
|
254
|
+
*/
|
|
255
|
+
onContainerClick(): void;
|
|
256
|
+
/**
|
|
257
|
+
* Clears the current selection and stops the event from bubbling.
|
|
258
|
+
* @param e - The originating click event.
|
|
259
|
+
*/
|
|
260
|
+
clear(e: Event): void;
|
|
261
|
+
/**
|
|
262
|
+
* Selects a single item, replacing any existing selection.
|
|
263
|
+
* @param item - The item to select. Does nothing when `undefined`.
|
|
264
|
+
*/
|
|
265
|
+
select(item?: NameValueItem<any>): void;
|
|
266
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChipsSelectorComponent, [{ optional: true; self: true; }]>;
|
|
267
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChipsSelectorComponent, "chips-selector", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "collapsedWidth": { "alias": "collapsedWidth"; "required": false; "isSignal": true; }; "collapsedDisplayMode": { "alias": "collapsedDisplayMode"; "required": false; "isSignal": true; }; "collapseAt": { "alias": "collapseAt"; "required": false; "isSignal": true; }; "collapseAtContainer": { "alias": "collapseAtContainer"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "mustSelect": { "alias": "mustSelect"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "stacked": { "alias": "stacked"; "required": false; "isSignal": true; }; "padAt": { "alias": "padAt"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "changed": "changed"; }, never, never, true, never>;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
declare class TreePickerComponent {
|
|
271
|
+
/** Nested tree data to display. */
|
|
272
|
+
readonly tree: _angular_core.InputSignal<INode[]>;
|
|
273
|
+
/** Currently selected node ids. Supports two-way binding via [(selection)]. */
|
|
274
|
+
readonly selection: _angular_core.ModelSignal<string[]>;
|
|
275
|
+
/** When true, checkboxes and chip remove buttons are disabled (mirrors Material convention). */
|
|
276
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
277
|
+
/** Description to display when no selection is made. */
|
|
278
|
+
readonly descriptionEmpty: _angular_core.InputSignal<string>;
|
|
279
|
+
/** Maximum number of tree levels to display (default: 3). */
|
|
280
|
+
readonly maxDepth: _angular_core.InputSignal<number>;
|
|
281
|
+
/**
|
|
282
|
+
* List of node IDs at depth >= maxDepth that unlock selection for themselves
|
|
283
|
+
* and all their descendants, regardless of depth.
|
|
284
|
+
*/
|
|
285
|
+
readonly maxDepthOverrides: _angular_core.InputSignal<string[]>;
|
|
286
|
+
/**
|
|
287
|
+
* Number of levels to auto-expand on load.
|
|
288
|
+
* 0 or undefined = only top level visible (no expansion);
|
|
289
|
+
* 1 = expand depth-0 nodes; 2 = expand depth-0 and depth-1 nodes; etc.
|
|
290
|
+
* Must be less than maxDepth.
|
|
291
|
+
*/
|
|
292
|
+
readonly minDepth: _angular_core.InputSignal<number>;
|
|
293
|
+
/**
|
|
294
|
+
* Emits the count of visible selected nodes whenever the selection changes.
|
|
295
|
+
* Emits 0 when nothing is selected (meaning all items are implicitly included).
|
|
296
|
+
*/
|
|
297
|
+
readonly selectionCount: _angular_core.OutputEmitterRef<number>;
|
|
298
|
+
/** Emits void whenever the user changes the selection (toggle, remove, clear). */
|
|
299
|
+
readonly changed: _angular_core.OutputEmitterRef<void>;
|
|
300
|
+
private readonly _treeRef;
|
|
301
|
+
private readonly _elRef;
|
|
302
|
+
/**
|
|
303
|
+
* Set of all node IDs selectable via overrides: each listed root and all its descendants.
|
|
304
|
+
* Recomputed whenever the tree data or the override list changes.
|
|
305
|
+
*/
|
|
306
|
+
private readonly _overrideSubtreeSet;
|
|
307
|
+
/** All three maps rebuilt lazily as a single computed whenever taxonomy changes. */
|
|
308
|
+
private readonly _maps;
|
|
309
|
+
/** O(1) set of selected ids, rebuilt only when selection changes. */
|
|
310
|
+
private readonly _selectedSet;
|
|
311
|
+
/** True when at least one node is explicitly selected. */
|
|
312
|
+
protected readonly hasSelection: _angular_core.Signal<boolean>;
|
|
313
|
+
/** Count of selected nodes within selectable levels (depth < maxDepth or in overrides), shown in the tab label. */
|
|
314
|
+
protected readonly selectedVisibleCount: _angular_core.Signal<number>;
|
|
315
|
+
readonly treeChildrenAccessor: (node: INode) => INode[];
|
|
316
|
+
readonly hasChild: (_: number, node: INode) => boolean;
|
|
317
|
+
/** Returns true when the node can be selected: depth < maxDepth or explicitly listed in maxDepthOverrides. */
|
|
318
|
+
protected isSelectable(node: INode): boolean;
|
|
319
|
+
private _isSelectableNode;
|
|
320
|
+
/** Current filter text. */
|
|
321
|
+
protected readonly filterText: _angular_core.WritableSignal<string>;
|
|
322
|
+
/** Nodes matching the current filter text, in nodeMap iteration order. */
|
|
323
|
+
protected readonly filteredItems: _angular_core.WritableSignal<INode[]>;
|
|
324
|
+
/** Index of the currently highlighted filtered node (-1 = none). */
|
|
325
|
+
protected readonly filterIndex: _angular_core.WritableSignal<number>;
|
|
326
|
+
/** The currently highlighted filtered node, or null. */
|
|
327
|
+
protected readonly filteredNode: _angular_core.Signal<INode>;
|
|
328
|
+
constructor();
|
|
329
|
+
/** Expands all visible nodes in the tree. */
|
|
330
|
+
protected expandAll(): void;
|
|
331
|
+
/** Collapses all nodes in the tree. */
|
|
332
|
+
protected collapseAll(): void;
|
|
333
|
+
/** Clears the entire selection. */
|
|
334
|
+
protected clearAll(): void;
|
|
335
|
+
/** Searches nodes by text and moves to the first match. */
|
|
336
|
+
protected doFilter(): void;
|
|
337
|
+
/** Clears the filter and restores the original tree state. */
|
|
338
|
+
protected clearFilter(): void;
|
|
339
|
+
/** Moves to the next matching node, cycling back to the first. */
|
|
340
|
+
protected nextFiltered(): void;
|
|
341
|
+
/** Returns true when the node is the currently highlighted filter match. */
|
|
342
|
+
protected isFilteredNode(node: INode): boolean;
|
|
343
|
+
/** Expands ancestors of the target node and scrolls it into view. */
|
|
344
|
+
private _scrollToFiltered;
|
|
345
|
+
/**
|
|
346
|
+
* Returns true when the node is in the active selection.
|
|
347
|
+
* @param node - tree node to check
|
|
348
|
+
* @returns true if selected
|
|
349
|
+
*/
|
|
350
|
+
protected isSelected(node: INode): boolean;
|
|
351
|
+
/**
|
|
352
|
+
* Returns true when a subset (but not all) of the node's descendants are selected,
|
|
353
|
+
* producing the indeterminate checkbox state.
|
|
354
|
+
* @param node - tree node to evaluate
|
|
355
|
+
* @returns true if the node is in a partial-selection (indeterminate) state
|
|
356
|
+
*/
|
|
357
|
+
protected isIndeterminate(node: INode): boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Toggles the node and all its descendants; then syncs the ancestor chain.
|
|
360
|
+
* @param node - the node that was clicked
|
|
361
|
+
*/
|
|
362
|
+
protected toggleNode(node: INode): void;
|
|
363
|
+
/**
|
|
364
|
+
* Deselects the node and all its descendants. Called by the chip remove button.
|
|
365
|
+
* @param node - the node to remove from the selection
|
|
366
|
+
*/
|
|
367
|
+
protected removeNode(node: INode): void;
|
|
368
|
+
/**
|
|
369
|
+
* Returns the INode for the given id, or undefined if not found.
|
|
370
|
+
* @param id - node id to look up
|
|
371
|
+
* @returns the matching INode
|
|
372
|
+
*/
|
|
373
|
+
protected nodeById(id: string): INode | undefined;
|
|
374
|
+
/**
|
|
375
|
+
* Returns true when the node at the given id is within the visible depth range
|
|
376
|
+
* and should appear in the chip list.
|
|
377
|
+
* @param id - node id to check
|
|
378
|
+
* @returns true if the node depth is less than maxDepth
|
|
379
|
+
*/
|
|
380
|
+
protected isChipVisible(id: string): boolean;
|
|
381
|
+
/**
|
|
382
|
+
* Returns only the selectable descendants of node (depth < maxDepth or in overrides),
|
|
383
|
+
* used for indeterminate state and parent auto-selection logic.
|
|
384
|
+
* @param node - root of the subtree to traverse
|
|
385
|
+
* @returns flat array of selectable descendant INodes
|
|
386
|
+
*/
|
|
387
|
+
private _getSelectableDescendants;
|
|
388
|
+
/**
|
|
389
|
+
* Walks up the ancestor chain from node, selecting a parent only when all
|
|
390
|
+
* its descendants are in the set, deselecting it otherwise.
|
|
391
|
+
* @param node - starting node for the upward traversal
|
|
392
|
+
* @param set - mutable selection set updated in place
|
|
393
|
+
*/
|
|
394
|
+
private _syncParentsInSet;
|
|
395
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreePickerComponent, never>;
|
|
396
|
+
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>;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* A blank calendar header that hides the month/year navigation controls.
|
|
401
|
+
* Used when an inline calendar should render without any navigation UI.
|
|
402
|
+
*/
|
|
403
|
+
declare class CalendarEmptyHeader<D> {
|
|
404
|
+
private readonly destroyRef;
|
|
405
|
+
private readonly calendar;
|
|
406
|
+
private readonly changeDetector;
|
|
407
|
+
constructor();
|
|
408
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalendarEmptyHeader<any>, never>;
|
|
409
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalendarEmptyHeader<any>, "ng-component", never, {}, {}, never, never, true, never>;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export { ButtonSelectorComponent, ButtonToggleComponent, CalendarEmptyHeader, ChipsSelectorComponent, TreePickerComponent };
|
|
413
|
+
export type { ButtonToggleInfo };
|