shirkasoft-ui-components 1.1.3 → 1.2.0
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.
|
@@ -3,203 +3,464 @@ import { ElementRef, OnDestroy, Type, ViewContainerRef, ComponentRef, AfterViewI
|
|
|
3
3
|
import { ControlValueAccessor, FormGroup, FormControl } from '@angular/forms';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Shirkasoft UI Components.
|
|
8
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
9
|
+
* Belongs to Shirkasoft.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Text input (or textarea) that implements ControlValueAccessor with built-in
|
|
13
|
+
* validation messages, card/number formatting, password reveal and search mode.
|
|
14
|
+
*/
|
|
6
15
|
declare class TextFieldComponent implements ControlValueAccessor {
|
|
7
16
|
private cdr;
|
|
17
|
+
/** id attribute applied to the native input. */
|
|
8
18
|
id: _angular_core.InputSignal<string>;
|
|
19
|
+
/** Formats the value as a credit card number (XXXX-XXXX-XXXX-XXXX). */
|
|
9
20
|
formatCard: _angular_core.InputSignal<boolean>;
|
|
21
|
+
/** Blocks the minus sign from being typed. */
|
|
10
22
|
preventNegative: _angular_core.InputSignal<boolean>;
|
|
23
|
+
/** Label rendered above the field. */
|
|
11
24
|
label: _angular_core.InputSignal<string>;
|
|
25
|
+
/** Native input type ('text', 'password', 'number', etc.). */
|
|
12
26
|
type: _angular_core.InputSignal<string>;
|
|
27
|
+
/** Allows digits only, stripping any other character. */
|
|
13
28
|
numbersOnly: _angular_core.InputSignal<boolean>;
|
|
29
|
+
/** When true, allows decimals and normalizes ',' to '.'. */
|
|
14
30
|
allowDecimals: _angular_core.InputSignal<boolean>;
|
|
31
|
+
/** Maximum number of characters the user can type. */
|
|
15
32
|
maxLength: _angular_core.InputSignal<number | undefined>;
|
|
33
|
+
/** Placeholder text of the native input. */
|
|
16
34
|
placeholder: _angular_core.InputSignal<string>;
|
|
35
|
+
/** Custom messages keyed by validation error name. */
|
|
17
36
|
errorMessages: _angular_core.InputSignal<{
|
|
18
37
|
[key: string]: string;
|
|
19
38
|
}>;
|
|
39
|
+
/** Parent reactive form used to resolve the control by label. */
|
|
20
40
|
formGroup: _angular_core.InputSignal<FormGroup<any> | undefined>;
|
|
41
|
+
/** Reactive control bound directly to this field. */
|
|
21
42
|
control: _angular_core.InputSignal<FormControl<any> | undefined>;
|
|
43
|
+
/** Disables the field. */
|
|
22
44
|
disabled: _angular_core.InputSignal<boolean>;
|
|
45
|
+
/** Custom error message shown regardless of validation errors. */
|
|
23
46
|
errorMessage: _angular_core.InputSignal<string>;
|
|
47
|
+
/** Renders a textarea instead of an input. */
|
|
24
48
|
isTextArea: _angular_core.InputSignal<boolean>;
|
|
49
|
+
/** Height classes applied when `isTextArea` is true. */
|
|
25
50
|
textAreaHeight: _angular_core.InputSignal<string>;
|
|
51
|
+
/** Renders the field as a read-only search trigger. */
|
|
26
52
|
searchMode: _angular_core.InputSignal<boolean>;
|
|
53
|
+
/** Value shown when `searchMode` is enabled. */
|
|
27
54
|
displayValue: _angular_core.InputSignal<string>;
|
|
55
|
+
/** Native autocomplete attribute. */
|
|
28
56
|
autocomplete: _angular_core.InputSignal<string>;
|
|
57
|
+
/** Emitted when the search button is clicked (search mode). */
|
|
29
58
|
searchButtonClick: _angular_core.OutputEmitterRef<void>;
|
|
30
|
-
protected readonly getIcon: (name:
|
|
59
|
+
protected readonly getIcon: (name: any) => any;
|
|
60
|
+
/** Reference to the native input element. */
|
|
31
61
|
inputElement: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
62
|
+
/** Reference to the native textarea element. */
|
|
32
63
|
textareaElement: _angular_core.Signal<ElementRef<HTMLTextAreaElement> | undefined>;
|
|
64
|
+
/** Internal raw value of the field. */
|
|
33
65
|
private _value;
|
|
66
|
+
/** Reactive disabled state from the form control. */
|
|
34
67
|
private _disabledState;
|
|
68
|
+
/** Whether the password is currently revealed. */
|
|
35
69
|
showPassword: _angular_core.WritableSignal<boolean>;
|
|
70
|
+
/** Tracks whether the control was in error at some point (for "was fixed" UX). */
|
|
36
71
|
hadError: _angular_core.WritableSignal<boolean>;
|
|
72
|
+
/** Counter bumped to trigger recomputation of derived error signals. */
|
|
37
73
|
private errorTracker;
|
|
74
|
+
/** Text displayed in search mode when `displayValue` is set. */
|
|
38
75
|
displayLabel: _angular_core.Signal<string>;
|
|
76
|
+
/** Prevents re-subscribing to the same form control. */
|
|
39
77
|
private subscribed;
|
|
78
|
+
/** Effective disabled state combining the input and the form binding. */
|
|
40
79
|
isDisabled: _angular_core.Signal<boolean>;
|
|
80
|
+
/** Current field value. */
|
|
41
81
|
value: _angular_core.Signal<any>;
|
|
82
|
+
/** Resolves the reactive control: explicit `control` or `formGroup.get(label)`. */
|
|
42
83
|
actualControl: _angular_core.Signal<FormControl<any> | undefined>;
|
|
84
|
+
/** True when the resolved control is invalid and dirty or touched. */
|
|
43
85
|
shouldShowError: _angular_core.Signal<boolean | undefined>;
|
|
86
|
+
/** True when the control had an error before and is now valid (success state). */
|
|
44
87
|
wasFixedError: _angular_core.Signal<boolean | undefined>;
|
|
88
|
+
/** Resolved list of error messages for the current control state. */
|
|
45
89
|
getErrorMessages: _angular_core.Signal<string[]>;
|
|
90
|
+
/** Effective input type (handles textarea and password reveal). */
|
|
46
91
|
effectiveType: _angular_core.Signal<string>;
|
|
47
92
|
private transloco;
|
|
93
|
+
/** Callback notified with the new value (ControlValueAccessor). */
|
|
48
94
|
private onChange;
|
|
95
|
+
/** Callback notified when the field is touched (ControlValueAccessor). */
|
|
49
96
|
private onTouched;
|
|
50
97
|
private destroyRef;
|
|
51
98
|
constructor();
|
|
99
|
+
/** Prevents disallowed characters based on the `numbersOnly`/`allowDecimals` config. */
|
|
52
100
|
numberValidation(event: KeyboardEvent): void;
|
|
101
|
+
/** Marks the field as touched and refreshes the error state. */
|
|
53
102
|
onBlur(): void;
|
|
103
|
+
/** Formats the raw input as a credit card number and notifies the control. */
|
|
54
104
|
onCardInput(event: Event): void;
|
|
105
|
+
/** Handles raw input: applies number/card/max-length formatting and notifies the control. */
|
|
55
106
|
onInput(event: Event): void;
|
|
107
|
+
/** Toggles the visibility of a password field. */
|
|
56
108
|
togglePasswordVisibility(): void;
|
|
109
|
+
/** Sets the value from the form control applying the same formatting rules. */
|
|
57
110
|
writeValue(value: any): void;
|
|
111
|
+
/** Registers the callback invoked on value changes (ControlValueAccessor). */
|
|
58
112
|
registerOnChange(fn: any): void;
|
|
113
|
+
/** Registers the callback invoked when the field is touched. */
|
|
59
114
|
registerOnTouched(fn: any): void;
|
|
115
|
+
/** Reflects the disabled state of the form control. */
|
|
60
116
|
setDisabledState(isDisabled: boolean): void;
|
|
61
117
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TextFieldComponent, never>;
|
|
62
118
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TextFieldComponent, "shk-text-field", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "formatCard": { "alias": "formatCard"; "required": false; "isSignal": true; }; "preventNegative": { "alias": "preventNegative"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "numbersOnly": { "alias": "numbersOnly"; "required": false; "isSignal": true; }; "allowDecimals": { "alias": "allowDecimals"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "isTextArea": { "alias": "isTextArea"; "required": false; "isSignal": true; }; "textAreaHeight": { "alias": "textAreaHeight"; "required": false; "isSignal": true; }; "searchMode": { "alias": "searchMode"; "required": false; "isSignal": true; }; "displayValue": { "alias": "displayValue"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; }, { "searchButtonClick": "searchButtonClick"; }, never, never, true, never>;
|
|
63
119
|
}
|
|
64
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Shirkasoft UI Components.
|
|
123
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
124
|
+
* Belongs to Shirkasoft.
|
|
125
|
+
*/
|
|
126
|
+
/** Toast-style notification entry. */
|
|
65
127
|
interface Notification {
|
|
66
128
|
id: string;
|
|
67
129
|
message: string;
|
|
68
130
|
type: 'success' | 'error' | 'warning' | 'info';
|
|
131
|
+
/** Current progress 0-100 when `showProgress` is true. */
|
|
69
132
|
progress?: number;
|
|
133
|
+
/** Whether the notification renders a progress indicator. */
|
|
70
134
|
showProgress?: boolean;
|
|
71
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Central notification store. Components push/update/remove notifications
|
|
138
|
+
* reactively through signals for the notification component to render.
|
|
139
|
+
*/
|
|
72
140
|
declare class NotificationService {
|
|
141
|
+
/** Reactive list of visible notifications. */
|
|
73
142
|
private notificationsSignal;
|
|
143
|
+
/** Monotonic id counter for new notifications. */
|
|
74
144
|
private currentId;
|
|
145
|
+
/** Readonly reactive list of visible notifications. */
|
|
75
146
|
notifications: _angular_core.Signal<Notification[]>;
|
|
147
|
+
/**
|
|
148
|
+
* Adds a notification and returns its id. When `showProgress` is false and
|
|
149
|
+
* `duration` is positive, it auto-removes after that many ms.
|
|
150
|
+
*/
|
|
76
151
|
addNotification(message: string, type?: Notification['type'], showProgress?: boolean, duration?: number): string;
|
|
152
|
+
/** Updates a progress notification; auto-removes when progress hits 100. */
|
|
77
153
|
updateProgress(notificationId: string, progress: number): void;
|
|
154
|
+
/** Removes the given notification. */
|
|
78
155
|
removeNotification(notification: Notification): void;
|
|
156
|
+
/** Removes the notification with the given id. */
|
|
79
157
|
removeNotificationById(notificationId: string): void;
|
|
158
|
+
/** Removes every visible notification. */
|
|
80
159
|
clearAll(): void;
|
|
81
160
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotificationService, never>;
|
|
82
161
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NotificationService>;
|
|
83
162
|
}
|
|
84
163
|
|
|
85
164
|
type NotificationPosition = 'center-top' | 'right-top' | 'left-top';
|
|
165
|
+
/**
|
|
166
|
+
* Shirkasoft UI Components.
|
|
167
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
168
|
+
* Belongs to Shirkasoft.
|
|
169
|
+
*/
|
|
170
|
+
/**
|
|
171
|
+
* Toast notification host that renders the notifications pushed through the
|
|
172
|
+
* NotificationService in the configured position.
|
|
173
|
+
*/
|
|
86
174
|
declare class NotificationComponent {
|
|
175
|
+
/** Position of the notification stack: center, right or left top. */
|
|
87
176
|
position: _angular_core.InputSignal<NotificationPosition>;
|
|
88
177
|
private notificationService;
|
|
89
|
-
protected getIcon: (name:
|
|
178
|
+
protected getIcon: (name: any) => any;
|
|
179
|
+
/** Maps each notification type to its internal icon name. */
|
|
90
180
|
private readonly iconMap;
|
|
181
|
+
/** Resolves the icon name for a notification type. */
|
|
91
182
|
getNotificationIcon(type: string): string;
|
|
183
|
+
/** Live list of active notifications. */
|
|
92
184
|
notifications: _angular_core.Signal<Notification[]>;
|
|
185
|
+
/** Notifications sorted with the newest first. */
|
|
93
186
|
sortedNotifications: _angular_core.Signal<Notification[]>;
|
|
187
|
+
/** Removes a notification through the service. */
|
|
94
188
|
removeNotification(notification: Notification): void;
|
|
189
|
+
/** Rounds the progress value of a notification. */
|
|
95
190
|
roundProgress(progress: number | undefined): number;
|
|
191
|
+
/** Whether there are notifications to show. */
|
|
96
192
|
hasNotifications: _angular_core.Signal<boolean>;
|
|
193
|
+
/** CSS classes positioning the stack according to `position`. */
|
|
97
194
|
positionClass: _angular_core.Signal<"fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8 right-4" | "fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8 left-4" | "fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8 left-1/2 -translate-x-1/2">;
|
|
98
195
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotificationComponent, never>;
|
|
99
196
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NotificationComponent, "shk-notification", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
100
197
|
}
|
|
101
198
|
|
|
199
|
+
/**
|
|
200
|
+
* Shirkasoft UI Components.
|
|
201
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
202
|
+
* Belongs to Shirkasoft.
|
|
203
|
+
*/
|
|
204
|
+
/**
|
|
205
|
+
* Switch / checkbox component that implements ControlValueAccessor so it can
|
|
206
|
+
* be used with reactive and template-driven forms.
|
|
207
|
+
*/
|
|
102
208
|
declare class ToggleComponent implements ControlValueAccessor {
|
|
209
|
+
/** Text displayed next to the control. */
|
|
103
210
|
label: _angular_core.InputSignal<string>;
|
|
211
|
+
/** Visual style: 'toggle' (switch) or 'checkbox'. Defaults to 'toggle'. */
|
|
104
212
|
mode: _angular_core.InputSignal<"toggle" | "checkbox">;
|
|
213
|
+
/** Manually controlled checked state (supports one-way binding). */
|
|
105
214
|
checked: _angular_core.InputSignal<boolean | undefined>;
|
|
215
|
+
/** Emitted with the new value when the user toggles the control. */
|
|
106
216
|
checkedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
217
|
+
/** Internal controlled/reactive value. */
|
|
107
218
|
_value: _angular_core.WritableSignal<boolean>;
|
|
219
|
+
/** Reactive disabled state. */
|
|
108
220
|
_disabled: _angular_core.WritableSignal<boolean>;
|
|
221
|
+
/** Callback notified with the new value on change (ControlValueAccessor). */
|
|
109
222
|
private onChange;
|
|
223
|
+
/** Callback notified when the control loses focus or is touched. */
|
|
110
224
|
private onTouched;
|
|
111
225
|
constructor();
|
|
226
|
+
/** Sets the value from the form control. */
|
|
112
227
|
writeValue(value: any): void;
|
|
228
|
+
/** Registers the callback invoked on value changes (ControlValueAccessor). */
|
|
113
229
|
registerOnChange(fn: any): void;
|
|
230
|
+
/** Registers the callback invoked when the control is touched. */
|
|
114
231
|
registerOnTouched(fn: any): void;
|
|
232
|
+
/** Reflects the disabled state of the form control. */
|
|
115
233
|
setDisabledState(isDisabled: boolean): void;
|
|
234
|
+
/**
|
|
235
|
+
* Inverts the current value (unless disabled), notifies the form control,
|
|
236
|
+
* marks the control as touched and emits `checkedChange`.
|
|
237
|
+
*/
|
|
116
238
|
toggle(): void;
|
|
117
239
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToggleComponent, never>;
|
|
118
240
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToggleComponent, "shk-toggle", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "checkedChange": "checkedChange"; }, never, never, true, never>;
|
|
119
241
|
}
|
|
120
242
|
|
|
243
|
+
/**
|
|
244
|
+
* Shirkasoft UI Components.
|
|
245
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
246
|
+
* Belongs to Shirkasoft.
|
|
247
|
+
*/
|
|
248
|
+
/**
|
|
249
|
+
* Numeric input tailored for currency values with a optional percentage mode.
|
|
250
|
+
* Uses two-way bindable models: `value` and `isPercentage`.
|
|
251
|
+
*/
|
|
121
252
|
declare class PriceInputComponent {
|
|
253
|
+
/** Numeric value, bindable with [(value)]. */
|
|
122
254
|
value: _angular_core.ModelSignal<number>;
|
|
255
|
+
/** Whether the input works as a percentage, bindable with [(isPercentage)]. */
|
|
123
256
|
isPercentage: _angular_core.ModelSignal<boolean>;
|
|
257
|
+
/** Label displayed above the field. */
|
|
124
258
|
label: _angular_core.InputSignal<string>;
|
|
259
|
+
/** id attribute applied to the native input. */
|
|
125
260
|
inputId: _angular_core.InputSignal<string>;
|
|
261
|
+
/** Marks the field as required. */
|
|
126
262
|
required: _angular_core.InputSignal<boolean>;
|
|
263
|
+
/** Disables the input. */
|
|
127
264
|
disabled: _angular_core.InputSignal<boolean>;
|
|
265
|
+
/** Minimum allowed value. */
|
|
128
266
|
min: _angular_core.InputSignal<number>;
|
|
267
|
+
/** Maximum allowed value. */
|
|
129
268
|
max: _angular_core.InputSignal<number>;
|
|
269
|
+
/** Shows the error styling on the field. */
|
|
130
270
|
showError: _angular_core.InputSignal<boolean>;
|
|
271
|
+
/** Message rendered when the field is in error state. */
|
|
131
272
|
errorMessage: _angular_core.InputSignal<string>;
|
|
273
|
+
/** Toggles between amount and percentage modes (unless disabled). */
|
|
132
274
|
toggleMode(): void;
|
|
275
|
+
/** Parses the user input and updates the bound `value`. */
|
|
133
276
|
onInput(event: Event): void;
|
|
134
277
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PriceInputComponent, never>;
|
|
135
278
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PriceInputComponent, "shk-price-input", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "isPercentage": { "alias": "isPercentage"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "showError": { "alias": "showError"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "isPercentage": "isPercentageChange"; }, never, never, true, never>;
|
|
136
279
|
}
|
|
137
280
|
|
|
281
|
+
/** Which granularity the picker edits: a day, a month or a year. */
|
|
138
282
|
type DatePickerView = 'date' | 'month' | 'year';
|
|
283
|
+
/**
|
|
284
|
+
* Shirkasoft UI Components.
|
|
285
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
286
|
+
* Belongs to Shirkasoft.
|
|
287
|
+
*/
|
|
288
|
+
/**
|
|
289
|
+
* Date/time picker implemented as a ControlValueAccessor. Supports choosing a
|
|
290
|
+
* day, month or year, optional time selection (with seconds/12-hour format),
|
|
291
|
+
* min/max constraints and locale-aware labels.
|
|
292
|
+
*/
|
|
139
293
|
declare class DatePickerComponent implements ControlValueAccessor {
|
|
140
294
|
private elementRef;
|
|
141
295
|
private cdr;
|
|
142
296
|
private destroyRef;
|
|
143
297
|
private transloco;
|
|
298
|
+
/** HTML id for the input (for label/for pairing). */
|
|
144
299
|
id: _angular_core.InputSignal<string>;
|
|
300
|
+
/** Granularity of the picker ('date' | 'month' | 'year'). */
|
|
145
301
|
view: _angular_core.InputSignal<DatePickerView>;
|
|
302
|
+
/** Label shown above the input. */
|
|
146
303
|
label: _angular_core.InputSignal<string>;
|
|
304
|
+
/** Placeholder of the input. */
|
|
147
305
|
placeholder: _angular_core.InputSignal<string>;
|
|
306
|
+
/** FormGroup used to resolve the control from `label`. */
|
|
148
307
|
formGroup: _angular_core.InputSignal<FormGroup<any> | undefined>;
|
|
308
|
+
/** Directly bound FormControl. */
|
|
149
309
|
control: _angular_core.InputSignal<FormControl<any> | undefined>;
|
|
310
|
+
/** Disables the picker. */
|
|
150
311
|
disabled: _angular_core.InputSignal<boolean>;
|
|
312
|
+
/** Custom error message displayed (overrides translated ones). */
|
|
151
313
|
errorMessage: _angular_core.InputSignal<string>;
|
|
314
|
+
/** Per-validation-key custom error messages. */
|
|
152
315
|
errorMessages: _angular_core.InputSignal<{
|
|
153
316
|
[key: string]: string;
|
|
154
317
|
}>;
|
|
318
|
+
/** Minimum allowed date (YYYY-MM-DD) or year/month string. */
|
|
155
319
|
minValue: _angular_core.InputSignal<string>;
|
|
320
|
+
/** Maximum allowed date (YYYY-MM-DD) or year/month string. */
|
|
156
321
|
maxValue: _angular_core.InputSignal<string>;
|
|
322
|
+
/** Locale used for month/day names and formatted labels. */
|
|
157
323
|
locale: _angular_core.InputSignal<string>;
|
|
324
|
+
/** Edits only the time portion of the value. */
|
|
325
|
+
timeOnly: _angular_core.InputSignal<boolean>;
|
|
326
|
+
/** Shows the time selectors alongside the date. */
|
|
327
|
+
showTime: _angular_core.InputSignal<boolean>;
|
|
328
|
+
/** Hour format: '12' or '24'. */
|
|
329
|
+
hourFormat: _angular_core.InputSignal<"12" | "24">;
|
|
330
|
+
/** Whether the seconds selector is shown. */
|
|
331
|
+
showSeconds: _angular_core.InputSignal<boolean>;
|
|
332
|
+
/** Step (in minutes) for the minute selector. */
|
|
333
|
+
minuteStep: _angular_core.InputSignal<number>;
|
|
334
|
+
/** Whether the dropdown calendar is open. */
|
|
158
335
|
isOpen: _angular_core.WritableSignal<boolean>;
|
|
336
|
+
/** Year currently displayed in the calendar. */
|
|
159
337
|
viewYear: _angular_core.WritableSignal<number>;
|
|
338
|
+
/** Month currently displayed in the calendar (0-based). */
|
|
160
339
|
viewMonth: _angular_core.WritableSignal<number>;
|
|
340
|
+
/** Starting year of the decade shown in year view. */
|
|
161
341
|
viewDecade: _angular_core.WritableSignal<number>;
|
|
342
|
+
/** Hour selected in the time selectors. */
|
|
343
|
+
viewHour: _angular_core.WritableSignal<number>;
|
|
344
|
+
/** Minute selected in the time selectors. */
|
|
345
|
+
viewMinute: _angular_core.WritableSignal<number>;
|
|
346
|
+
/** Second selected in the time selectors. */
|
|
347
|
+
viewSecond: _angular_core.WritableSignal<number>;
|
|
348
|
+
/** Meridiem selected in 12-hour format. */
|
|
349
|
+
viewMeridiem: _angular_core.WritableSignal<"AM" | "PM">;
|
|
350
|
+
/** Date part selected but not yet committed until the time is confirmed. */
|
|
351
|
+
private pendingDate;
|
|
352
|
+
/** Underlying value (mirrors the reactive control). */
|
|
162
353
|
private _value;
|
|
354
|
+
/** Disabled state coming from the reactive form infrastructure. */
|
|
163
355
|
private _disabledState;
|
|
356
|
+
/** Whether status subscriptions have been attached to the control. */
|
|
164
357
|
private subscribed;
|
|
165
358
|
private valueSubscribed;
|
|
359
|
+
/** Counter used to recompute the error helpers reactively. */
|
|
166
360
|
private errorTracker;
|
|
361
|
+
/** Whether an error was displayed at some point. */
|
|
167
362
|
hadError: _angular_core.WritableSignal<boolean>;
|
|
363
|
+
/** ControlValueAccessor callbacks. */
|
|
168
364
|
private onChange;
|
|
169
365
|
private onTouched;
|
|
366
|
+
/** Current value of the picker. */
|
|
170
367
|
value: _angular_core.Signal<string | null>;
|
|
368
|
+
/** Whether the picker is disabled (input or reactive form). */
|
|
171
369
|
isDisabled: _angular_core.Signal<boolean>;
|
|
370
|
+
/** Resolves the control from `control` input or `formGroup`+`label`. */
|
|
172
371
|
actualControl: _angular_core.Signal<FormControl<any> | undefined>;
|
|
372
|
+
/** Whether the bound control should show its error message. */
|
|
173
373
|
shouldShowError: _angular_core.Signal<boolean | undefined>;
|
|
374
|
+
/** Whether an error was fixed (invalid before, now valid and touched). */
|
|
174
375
|
wasFixedError: _angular_core.Signal<boolean | undefined>;
|
|
376
|
+
/** Validation error messages to display, custom or translated. */
|
|
175
377
|
getErrorMessages: _angular_core.Signal<string[]>;
|
|
378
|
+
/** Date part displayed in the calendar (pending date or committed value). */
|
|
379
|
+
displayedDate: _angular_core.Signal<string | null>;
|
|
380
|
+
/** Human-readable label for the selected value in the input. */
|
|
176
381
|
displayLabel: _angular_core.Signal<string>;
|
|
382
|
+
/** Localized short month names for the year view. */
|
|
177
383
|
monthNames: _angular_core.Signal<string[]>;
|
|
384
|
+
/** Localized short weekday names for the calendar header. */
|
|
178
385
|
dayNames: _angular_core.Signal<string[]>;
|
|
386
|
+
/** Number of days in the currently viewed month. */
|
|
179
387
|
daysInMonth: _angular_core.Signal<number>;
|
|
388
|
+
/** Weekday index (0=Sunday) of the first day of the viewed month. */
|
|
180
389
|
firstDayOfMonth: _angular_core.Signal<number>;
|
|
390
|
+
/** Calendar grid: nulls for leading blanks then the days of the month. */
|
|
181
391
|
calendarDays: _angular_core.Signal<(number | null)[]>;
|
|
392
|
+
/** Whether the prev navigation button is allowed by `minValue`. */
|
|
182
393
|
canGoPrev: _angular_core.Signal<boolean>;
|
|
394
|
+
/** Whether the next navigation button is allowed by `maxValue`. */
|
|
183
395
|
canGoNext: _angular_core.Signal<boolean>;
|
|
396
|
+
/** Year of the displayed date, if any. */
|
|
184
397
|
selectedYear: _angular_core.Signal<number | null>;
|
|
398
|
+
/** Month index (0-based) of the displayed date, if any. */
|
|
185
399
|
selectedMonth: _angular_core.Signal<number | null>;
|
|
400
|
+
/** Day of the displayed date, if any (date view only). */
|
|
186
401
|
selectedDay: _angular_core.Signal<number | null>;
|
|
402
|
+
/** 12 years of the viewed decade for the year view. */
|
|
187
403
|
decadeYears: _angular_core.Signal<number[]>;
|
|
404
|
+
/** (Unused legacy placeholder) plain year list. */
|
|
188
405
|
years: number[];
|
|
189
406
|
constructor();
|
|
407
|
+
/** Closes the dropdown when clicking outside the component. */
|
|
190
408
|
onDocumentClick(event: MouseEvent): void;
|
|
409
|
+
/** Closes the dropdown on Escape. */
|
|
191
410
|
onEscape(): void;
|
|
411
|
+
/** Opens/closes the dropdown, syncing the calendar to the current value. */
|
|
192
412
|
toggle(): void;
|
|
413
|
+
/** Aligns the calendar view signals with the current value (or today). */
|
|
193
414
|
private syncViewToValue;
|
|
415
|
+
/** Closes the dropdown, marks the control as touched and refreshes errors. */
|
|
194
416
|
close(): void;
|
|
417
|
+
/** Navigates the calendar to the previous year/month/decade. */
|
|
195
418
|
prev(): void;
|
|
419
|
+
/** Navigates the calendar to the next year/month/decade. */
|
|
196
420
|
next(): void;
|
|
421
|
+
/** Selects a day of the month (pending if time is shown). */
|
|
197
422
|
selectDay(day: number): void;
|
|
423
|
+
/** Selects a month of the year (pending if time is shown). */
|
|
198
424
|
selectMonth(monthIndex: number): void;
|
|
425
|
+
/** Selects a year (pending if time is shown). */
|
|
199
426
|
selectYear(year: number): void;
|
|
427
|
+
/** Commits a value, updates the component, the control and the outputs. */
|
|
200
428
|
private setValue;
|
|
429
|
+
/** Confirms the selected time and commits the combined date+time value. */
|
|
430
|
+
confirmTime(): void;
|
|
431
|
+
/** Reads the hour selected in the time selector. */
|
|
432
|
+
onHourChange(event: Event): void;
|
|
433
|
+
/** Reads the minute selected in the time selector. */
|
|
434
|
+
onMinuteChange(event: Event): void;
|
|
435
|
+
/** Reads the second selected in the time selector. */
|
|
436
|
+
onSecondChange(event: Event): void;
|
|
437
|
+
/** Current meridiem ("AM"/"PM") for the 12-hour format. */
|
|
438
|
+
meridiem(): 'AM' | 'PM';
|
|
439
|
+
/** Reads the meridiem selected in the time selector. */
|
|
440
|
+
onMeridiemChange(event: Event): void;
|
|
441
|
+
/** Splits the date part from a full ISO "date" or "dateTtime" value. */
|
|
442
|
+
private datePartOf;
|
|
443
|
+
/** Formats a raw time string ("HH:mm[:ss]") using the configured format. */
|
|
444
|
+
private formatTimeFromValue;
|
|
445
|
+
/** Formats hour/minute/second according to hour format and seconds option. */
|
|
446
|
+
private formatTime;
|
|
447
|
+
/** Formats a Date as a YYYY-MM-DD ISO string. */
|
|
448
|
+
private toISODate;
|
|
449
|
+
/** Whether the given day matches the currently selected date. */
|
|
201
450
|
isSelectedDay(day: number): boolean;
|
|
451
|
+
/** Hours available in the time selector ('12' maps to 0..11 or 12..23). */
|
|
452
|
+
hoursRange(): number[];
|
|
453
|
+
/** Minutes available in the time selector, stepped by `minuteStep`. */
|
|
454
|
+
minutesRange(): number[];
|
|
455
|
+
/** Seconds available in the time selector (0..59). */
|
|
456
|
+
secondsRange(): number[];
|
|
457
|
+
/** Formats an hour for display in the selector (12-hour aware). */
|
|
458
|
+
hourDisplay(hour: number): string;
|
|
459
|
+
/** Pads a minute value with a leading zero. */
|
|
460
|
+
minutesLabel(value: number): string;
|
|
461
|
+
/** Whether the given day is today's date. */
|
|
202
462
|
isToday(day: number): boolean;
|
|
463
|
+
/** Whether the given month matches the selected month and year. */
|
|
203
464
|
isSelectedMonth(monthIndex: number): boolean;
|
|
204
465
|
isCurrentMonth(monthIndex: number): boolean;
|
|
205
466
|
isSelectedYear(year: number): boolean;
|
|
@@ -209,30 +470,60 @@ declare class DatePickerComponent implements ControlValueAccessor {
|
|
|
209
470
|
registerOnTouched(fn: any): void;
|
|
210
471
|
setDisabledState(isDisabled: boolean): void;
|
|
211
472
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
212
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatePickerComponent, "shk-date-picker", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
473
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatePickerComponent, "shk-date-picker", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "timeOnly": { "alias": "timeOnly"; "required": false; "isSignal": true; }; "showTime": { "alias": "showTime"; "required": false; "isSignal": true; }; "hourFormat": { "alias": "hourFormat"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
213
474
|
}
|
|
214
475
|
|
|
476
|
+
/**
|
|
477
|
+
* Shirkasoft UI Components.
|
|
478
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
479
|
+
* Belongs to Shirkasoft.
|
|
480
|
+
*/
|
|
481
|
+
/**
|
|
482
|
+
* Confirmation dialog opened via `show()` which resolves a Promise<boolean>
|
|
483
|
+
* with the user's choice.
|
|
484
|
+
*/
|
|
215
485
|
declare class ConfirmDialogComponent implements OnDestroy {
|
|
216
|
-
protected getIcon: (name:
|
|
486
|
+
protected getIcon: (name: any) => any;
|
|
487
|
+
/** Title shown in the dialog header. */
|
|
217
488
|
title: _angular_core.InputSignal<string>;
|
|
489
|
+
/** Message body of the dialog. */
|
|
218
490
|
message: _angular_core.InputSignal<string>;
|
|
491
|
+
/** Label of the confirm button. */
|
|
219
492
|
confirmLabel: _angular_core.InputSignal<string>;
|
|
493
|
+
/** Label of the cancel button. */
|
|
220
494
|
cancelLabel: _angular_core.InputSignal<string>;
|
|
495
|
+
/** Text shown on the confirm button while `loading` is true. */
|
|
221
496
|
loadingText: _angular_core.InputSignal<string>;
|
|
222
|
-
|
|
497
|
+
/** Visual style: 'danger', 'info' or 'warning'. */
|
|
498
|
+
type: _angular_core.InputSignal<"info" | "warning" | "danger">;
|
|
499
|
+
/** Shows a spinner and disables the confirm button. */
|
|
223
500
|
loading: _angular_core.InputSignal<boolean>;
|
|
501
|
+
/** Whether the cancel button is shown. */
|
|
224
502
|
showCancel: _angular_core.InputSignal<boolean>;
|
|
503
|
+
/** Controls dialog visibility. */
|
|
225
504
|
visible: _angular_core.WritableSignal<boolean>;
|
|
505
|
+
/** Resolver of the currently pending confirmation promise. */
|
|
226
506
|
private resolveRef;
|
|
507
|
+
/** Emitted whenever the dialog is closed (confirm or cancel). */
|
|
227
508
|
closed: _angular_core.OutputEmitterRef<void>;
|
|
509
|
+
/** Opens the dialog and returns a promise resolving with the user choice. */
|
|
228
510
|
show(): Promise<boolean>;
|
|
511
|
+
/** Resolves with `true` when the user confirms. */
|
|
229
512
|
onConfirm(): void;
|
|
513
|
+
/** Resolves with `false` when the user cancels. */
|
|
230
514
|
onCancel(): void;
|
|
515
|
+
/** Clears the pending resolver on destroy. */
|
|
231
516
|
ngOnDestroy(): void;
|
|
232
517
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
|
|
233
518
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfirmDialogComponent, "shk-confirm-dialog", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "confirmLabel": { "alias": "confirmLabel"; "required": false; "isSignal": true; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "showCancel": { "alias": "showCancel"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, never, true, never>;
|
|
234
519
|
}
|
|
235
520
|
|
|
521
|
+
/**
|
|
522
|
+
* Shirkasoft UI Components.
|
|
523
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
524
|
+
* Belongs to Shirkasoft.
|
|
525
|
+
*/
|
|
526
|
+
/** Options for opening a confirmation dialog. */
|
|
236
527
|
interface ConfirmConfig {
|
|
237
528
|
title?: string;
|
|
238
529
|
message: string;
|
|
@@ -243,172 +534,333 @@ interface ConfirmConfig {
|
|
|
243
534
|
showCancel?: boolean;
|
|
244
535
|
loading?: boolean;
|
|
245
536
|
}
|
|
537
|
+
/**
|
|
538
|
+
* Programmatically opens the confirmation dialog and resolves a Promise
|
|
539
|
+
* with the user's decision (true = confirm, false = cancel).
|
|
540
|
+
*/
|
|
246
541
|
declare class ConfirmDialogService {
|
|
542
|
+
/** Reference to the currently open dialog, if any. */
|
|
247
543
|
private dialogRef;
|
|
248
544
|
private destroyRef;
|
|
249
545
|
private appRef;
|
|
250
546
|
private injector;
|
|
251
547
|
constructor();
|
|
548
|
+
/**
|
|
549
|
+
* Opens a confirmation dialog with the given configuration and returns a
|
|
550
|
+
* promise resolving with the user's choice.
|
|
551
|
+
*/
|
|
252
552
|
confirm(config: ConfirmConfig): Promise<boolean>;
|
|
553
|
+
/** Detaches and destroys the mounted dialog if present. */
|
|
253
554
|
private cleanupDialog;
|
|
254
555
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmDialogService, never>;
|
|
255
556
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConfirmDialogService>;
|
|
256
557
|
}
|
|
257
558
|
|
|
559
|
+
/**
|
|
560
|
+
* Shirkasoft UI Components.
|
|
561
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
562
|
+
* Belongs to Shirkasoft.
|
|
563
|
+
*/
|
|
564
|
+
/** Options for opening a modal through the service. */
|
|
258
565
|
interface ModalConfig {
|
|
566
|
+
/** Title shown in the modal header. */
|
|
259
567
|
title: string;
|
|
568
|
+
/** Component rendered inside the modal body. */
|
|
260
569
|
component: Type<any>;
|
|
570
|
+
/** Data passed to the modal component via inputs. */
|
|
261
571
|
data?: Record<string, any>;
|
|
572
|
+
/** Modal width (CSS value). */
|
|
262
573
|
width?: string;
|
|
574
|
+
/** Whether the accept/cancel buttons are shown. */
|
|
263
575
|
showButtons?: boolean;
|
|
576
|
+
/** Whether the expand (fullscreen) button is shown. */
|
|
264
577
|
showExpandButton?: boolean;
|
|
578
|
+
/** Label of the accept button. */
|
|
265
579
|
acceptLabel?: string;
|
|
580
|
+
/** Label of the cancel button. */
|
|
266
581
|
cancelLabel?: string;
|
|
582
|
+
/** Optional callback invoked when the modal closes. */
|
|
267
583
|
onClose?: () => void;
|
|
268
584
|
}
|
|
585
|
+
/**
|
|
586
|
+
* Global modal manager. Opens modals on a stack, exposing reactive access to
|
|
587
|
+
* the current modal and the top-most opened config.
|
|
588
|
+
*/
|
|
269
589
|
declare class ModalService {
|
|
590
|
+
/** Stack of open modals (top-most renders on top). */
|
|
270
591
|
private stackSignal;
|
|
592
|
+
/** Counter emitted on each close, used to trigger close animations. */
|
|
271
593
|
private closeRequestSignal;
|
|
272
594
|
private router;
|
|
273
595
|
private destroyRef;
|
|
274
596
|
constructor();
|
|
597
|
+
/** Reactive list of open modals. */
|
|
275
598
|
modalStack: _angular_core.Signal<ModalConfig[]>;
|
|
599
|
+
/** Top-most modal on the stack, or null. */
|
|
276
600
|
currentModal: _angular_core.Signal<ModalConfig | null>;
|
|
601
|
+
/** Reactive close-request counter. */
|
|
277
602
|
closeRequest: _angular_core.Signal<number>;
|
|
603
|
+
/** Opens a new modal on top of the stack. */
|
|
278
604
|
open(config: ModalConfig): void;
|
|
605
|
+
/** Alias of `close()` used by the accept button. */
|
|
279
606
|
accept(): void;
|
|
607
|
+
/** Closes the top-most modal, invoking its onClose callback. */
|
|
280
608
|
close(): void;
|
|
609
|
+
/** Closes all open modals at once. */
|
|
281
610
|
clear(): void;
|
|
282
611
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalService, never>;
|
|
283
612
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModalService>;
|
|
284
613
|
}
|
|
285
614
|
|
|
615
|
+
/**
|
|
616
|
+
* Shirkasoft UI Components.
|
|
617
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
618
|
+
* Belongs to Shirkasoft.
|
|
619
|
+
*/
|
|
620
|
+
/**
|
|
621
|
+
* Modal dialog that renders a dynamically loaded component, tracks its
|
|
622
|
+
* form validity and submit outputs, and delegates accept/cancel to the
|
|
623
|
+
* shared ModalService.
|
|
624
|
+
*/
|
|
286
625
|
declare class ModalComponent {
|
|
287
|
-
protected getIcon: (name:
|
|
626
|
+
protected getIcon: (name: any) => any;
|
|
288
627
|
private notificationSrv;
|
|
289
628
|
private destroyRef;
|
|
290
629
|
private modalSrv;
|
|
291
630
|
private transloco;
|
|
292
631
|
private cdr;
|
|
632
|
+
/** Reference where the dynamic content is rendered. */
|
|
293
633
|
container: _angular_core.Signal<ViewContainerRef | undefined>;
|
|
634
|
+
/** Configuration of the modal currently open (from the service). */
|
|
294
635
|
currentConfig: _angular_core.WritableSignal<ModalConfig | null>;
|
|
636
|
+
/** Modal title. */
|
|
295
637
|
title: _angular_core.WritableSignal<string>;
|
|
638
|
+
/** Whether the modal is visible. */
|
|
296
639
|
visible: _angular_core.WritableSignal<boolean>;
|
|
640
|
+
/** Generic loading flag for the footer actions. */
|
|
297
641
|
loading: _angular_core.WritableSignal<boolean>;
|
|
642
|
+
/** Whether the accept action is being processed. */
|
|
298
643
|
isProcessing: _angular_core.WritableSignal<boolean>;
|
|
644
|
+
/** Whether the modal is currently expanded to fullscreen. */
|
|
299
645
|
isExpanded: _angular_core.WritableSignal<boolean>;
|
|
646
|
+
/** True when the dynamic component reports a valid form. */
|
|
300
647
|
isFormValid: _angular_core.WritableSignal<boolean>;
|
|
648
|
+
/** Reference to the dynamically created component. */
|
|
301
649
|
componentRef: ComponentRef<any> | null;
|
|
650
|
+
/** Subscriptions to the dynamic component outputs. */
|
|
302
651
|
private subscriptions;
|
|
652
|
+
/** Width of the modal (fullscreen when expanded). */
|
|
303
653
|
computedModalWidth: _angular_core.Signal<string>;
|
|
654
|
+
/** Whether the footer buttons should be rendered. */
|
|
304
655
|
modalButtonsVisible: _angular_core.Signal<boolean>;
|
|
656
|
+
/** Whether the expand/fullscreen button is shown. */
|
|
305
657
|
showExpandButton: _angular_core.Signal<boolean>;
|
|
658
|
+
/** Resolved cancel button label. */
|
|
306
659
|
cancelLabel: _angular_core.Signal<string>;
|
|
660
|
+
/** Resolved accept button label. */
|
|
307
661
|
acceptLabel: _angular_core.Signal<string>;
|
|
308
662
|
constructor();
|
|
663
|
+
/** Updates visibility when the backdrop/close controls change. */
|
|
309
664
|
onVisibleChange(show: boolean): void;
|
|
665
|
+
/** Creates the dynamic component and wires its form/submit outputs. */
|
|
310
666
|
private loadComponent;
|
|
667
|
+
/** Subscribes to a dynamic component output if it exists. */
|
|
311
668
|
private subscribeToOutput;
|
|
669
|
+
/** Finalizes the submit flow, accepting the modal on success. */
|
|
312
670
|
private handleSubmit;
|
|
671
|
+
/** Closes the modal, calling the dynamic component's `handleCancel` if any. */
|
|
313
672
|
closeModal(): void;
|
|
673
|
+
/** Performs the actual close sequence and cleanup. */
|
|
314
674
|
doClose(): void;
|
|
675
|
+
/** Toggles between normal width and fullscreen. */
|
|
315
676
|
toggleExpand(): void;
|
|
677
|
+
/** Validates the dynamic component form and triggers its `onSubmit`. */
|
|
316
678
|
onAccept(): void;
|
|
679
|
+
/** Resolves the dynamic component's form (property or getter function). */
|
|
317
680
|
private getForm;
|
|
681
|
+
/** Recursively checks for real validation errors (ignoring 'warning'). */
|
|
318
682
|
private hasRealErrors;
|
|
683
|
+
/** Marks a form (and all its descendants) as touched. */
|
|
319
684
|
private markAllAsTouched;
|
|
685
|
+
/** True when the component exposes both `onSubmit` and a `form`. */
|
|
320
686
|
private isDynamicComponent;
|
|
687
|
+
/** Unsubscribes outputs and destroys the dynamic component. */
|
|
321
688
|
private cleanup;
|
|
322
689
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalComponent, never>;
|
|
323
690
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalComponent, "shk-modal", never, {}, {}, never, never, true, never>;
|
|
324
691
|
}
|
|
325
692
|
|
|
693
|
+
/** Option rendered by the select, optionally prefixed with a "new entry" badge. */
|
|
326
694
|
interface SelectOption {
|
|
327
695
|
label: string;
|
|
328
696
|
value: any;
|
|
329
697
|
custom?: boolean;
|
|
330
698
|
}
|
|
699
|
+
/**
|
|
700
|
+
* Shirkasoft UI Components.
|
|
701
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
702
|
+
* Belongs to Shirkasoft.
|
|
703
|
+
*/
|
|
704
|
+
/**
|
|
705
|
+
* Custom select that works as a ControlValueAccessor: single/multiple
|
|
706
|
+
* selection, searchable, keyboard navigation, pagination, custom entries and
|
|
707
|
+
* reactive-form integration.
|
|
708
|
+
*/
|
|
331
709
|
declare class SelectComponent implements ControlValueAccessor {
|
|
332
710
|
private elementRef;
|
|
333
|
-
|
|
711
|
+
/** Resolves icon names to lucide components, falling back to a chevron. */
|
|
712
|
+
protected getIcon: (name: any) => any;
|
|
713
|
+
/** Available options. */
|
|
334
714
|
options: _angular_core.InputSignal<SelectOption[]>;
|
|
715
|
+
/** Enables multi-select mode. */
|
|
335
716
|
multiple: _angular_core.InputSignal<boolean>;
|
|
717
|
+
/** Restricts multi-selection to the given value combinations. */
|
|
336
718
|
validCombinations: _angular_core.InputSignal<string[][] | undefined>;
|
|
719
|
+
/** Placeholder shown when there is no selection. */
|
|
337
720
|
placeholder: _angular_core.InputSignal<string>;
|
|
721
|
+
/** Label used to bind the control inside a `formGroup`. */
|
|
338
722
|
label: _angular_core.InputSignal<string | undefined>;
|
|
723
|
+
/** Shows a loading state while options are being fetched. */
|
|
339
724
|
isLoading: _angular_core.InputSignal<boolean>;
|
|
725
|
+
/** Marks that all options have been loaded (used with pagination + search). */
|
|
340
726
|
isAllDataLoaded: _angular_core.InputSignal<boolean>;
|
|
727
|
+
/** Allows creating new entries from the typed search term. */
|
|
341
728
|
allowCustomEntries: _angular_core.InputSignal<boolean>;
|
|
729
|
+
/** Parent form group to resolve the control from `label`. */
|
|
342
730
|
formGroup: _angular_core.InputSignal<FormGroup<any> | undefined>;
|
|
731
|
+
/** Enables the search input inside the dropdown. */
|
|
343
732
|
isSearchable: _angular_core.InputSignal<boolean>;
|
|
733
|
+
/** Number of options loaded per page when pagination is enabled. */
|
|
344
734
|
itemsPerPage: _angular_core.InputSignal<number>;
|
|
735
|
+
/** FormControl bound externally (used instead of `formGroup`/`label`). */
|
|
345
736
|
control: _angular_core.InputSignal<FormControl<any> | undefined>;
|
|
737
|
+
/** Paginates the option list instead of rendering it all at once. */
|
|
346
738
|
usePagination: _angular_core.InputSignal<boolean>;
|
|
739
|
+
/** Disables the whole select. */
|
|
347
740
|
disabled: _angular_core.InputSignal<boolean>;
|
|
741
|
+
/** Custom per-validation-error messages shown under the select. */
|
|
348
742
|
errorMessages: _angular_core.InputSignal<{
|
|
349
743
|
[key: string]: string;
|
|
350
744
|
}>;
|
|
745
|
+
/** Keeps the search term when options reload. */
|
|
351
746
|
preserveSearchOnLoad: _angular_core.InputSignal<boolean>;
|
|
747
|
+
/** Translation key of the "no records" empty message. */
|
|
352
748
|
emptyMessageKey: _angular_core.InputSignal<string>;
|
|
749
|
+
/** Opens the dropdown above the trigger instead of below. */
|
|
353
750
|
dropdownUpward: _angular_core.InputSignal<boolean>;
|
|
751
|
+
/** Shows the "no selection" option in single-select mode. */
|
|
354
752
|
showEmptyOption: _angular_core.InputSignal<boolean>;
|
|
753
|
+
/** Emits when the selection changes (new value or array in multiple mode). */
|
|
355
754
|
selectionChange: _angular_core.OutputEmitterRef<any>;
|
|
755
|
+
/** Emits the debounced search term while typing. */
|
|
356
756
|
search: _angular_core.OutputEmitterRef<string>;
|
|
757
|
+
/** Reference to the filter input inside the dropdown (when searchable). */
|
|
357
758
|
filterInput: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
759
|
+
/** Reference to the select container element. */
|
|
358
760
|
private selectContainer;
|
|
761
|
+
/** Reference to the trigger button. */
|
|
359
762
|
private selectTrigger;
|
|
763
|
+
/** Reference to the dropdown list container. */
|
|
360
764
|
private dropdownContainer;
|
|
765
|
+
/** Underlying selection value (mirrors the reactive control). */
|
|
361
766
|
private _value;
|
|
767
|
+
/** Whether the dropdown is open. */
|
|
362
768
|
isOpen: _angular_core.WritableSignal<boolean>;
|
|
769
|
+
/** Index of the currently focused option for keyboard navigation. */
|
|
363
770
|
focusedIndex: _angular_core.WritableSignal<number>;
|
|
771
|
+
/** Current search term (searchable mode). */
|
|
364
772
|
searchTerm: _angular_core.WritableSignal<string>;
|
|
773
|
+
/** Current page of the paginated dropdown. */
|
|
365
774
|
currentPage: _angular_core.WritableSignal<number>;
|
|
775
|
+
/** Tracks whether the user typed in the search input. */
|
|
366
776
|
private searchTermChanged;
|
|
777
|
+
/** Internal disabled state from the reactive form (setDisabledState). */
|
|
367
778
|
private _isDisabled;
|
|
779
|
+
/** Debounce timer handle for the search output. */
|
|
368
780
|
private debounceTimer;
|
|
781
|
+
/** Error-state counter used to recompute error helpers reactively. */
|
|
369
782
|
private errorTracker;
|
|
783
|
+
/** Whether an error has been shown at some point (for "fixed" messaging). */
|
|
370
784
|
hadError: _angular_core.WritableSignal<boolean>;
|
|
785
|
+
/** Whether control status/value subscriptions have been attached. */
|
|
371
786
|
private subscribed;
|
|
372
787
|
private valueSubscribed;
|
|
788
|
+
/** Current selection value. */
|
|
373
789
|
value: _angular_core.Signal<any>;
|
|
790
|
+
/** True when the select is disabled via input or by the reactive form. */
|
|
374
791
|
isDisabled: _angular_core.Signal<boolean>;
|
|
792
|
+
/** Resolves the form control from `control` or from `formGroup`+`label`. */
|
|
375
793
|
actualControl: _angular_core.Signal<FormControl<any> | undefined>;
|
|
794
|
+
/** Whether the bound control should display its error (invalid + touched/dirty). */
|
|
376
795
|
shouldShowError: _angular_core.Signal<boolean | undefined>;
|
|
796
|
+
/** Whether an error was shown before and the control is now valid + touched. */
|
|
377
797
|
wasFixedError: _angular_core.Signal<boolean | undefined>;
|
|
798
|
+
/** Text shown in the trigger: the selected label(s) or the placeholder. */
|
|
378
799
|
displayValue: _angular_core.Signal<any>;
|
|
800
|
+
/** List of validation error messages for the bound control. */
|
|
379
801
|
getErrorMessages: _angular_core.Signal<string[]>;
|
|
802
|
+
/** Options filtered by the search term (matches first, then contains). */
|
|
380
803
|
filteredOptions: _angular_core.Signal<SelectOption[]>;
|
|
804
|
+
/** Options for the current page, with a synthetic custom entry when allowed. */
|
|
381
805
|
paginatedOptions: _angular_core.Signal<SelectOption[]>;
|
|
806
|
+
/** Non-custom options, including the empty option in single-select mode. */
|
|
382
807
|
regularOptions: _angular_core.Signal<SelectOption[]>;
|
|
808
|
+
/** Total pages of the filtered option list (1 when pagination is off). */
|
|
383
809
|
totalPages: _angular_core.Signal<number>;
|
|
810
|
+
/** Whether there is at least one selected value. */
|
|
384
811
|
hasSelectedValues: _angular_core.Signal<any>;
|
|
812
|
+
/** Whether the custom optional entry should be offered for the current term. */
|
|
385
813
|
showCustomOption: _angular_core.Signal<boolean>;
|
|
386
814
|
private transloco;
|
|
815
|
+
/** ControlValueAccessor onChange callback. */
|
|
387
816
|
private onChange;
|
|
817
|
+
/** ControlValueAccessor onTouched callback. */
|
|
388
818
|
private onTouched;
|
|
389
819
|
private destroyRef;
|
|
390
820
|
constructor(elementRef: ElementRef);
|
|
821
|
+
/** Sets the disabled state coming from the reactive form infrastructure. */
|
|
391
822
|
setDisabledState(isDisabled: boolean): void;
|
|
823
|
+
/** Marks the control as touched and updates validity and error state. */
|
|
392
824
|
private markAsTouchedAndUpdate;
|
|
825
|
+
/** Strips accents and lowercases text for accent-insensitive matching. */
|
|
393
826
|
normalizeText(text: string): string;
|
|
827
|
+
/** Keyboard handler for the trigger element (open/close/navigate/select). */
|
|
394
828
|
onKeydown(event: KeyboardEvent): void;
|
|
829
|
+
/** Keyboard handler for the search input inside a searchable dropdown. */
|
|
395
830
|
handleKeyDown(event: KeyboardEvent): void;
|
|
831
|
+
/** Moves the focused option index by `direction`, skipping disabled ones. */
|
|
396
832
|
private moveFocus;
|
|
833
|
+
/** Index of the currently selected option, or -1. */
|
|
397
834
|
private getSelectedIndex;
|
|
835
|
+
/** Whether an option is disabled based on the valid combinations rule. */
|
|
398
836
|
isOptionDisabled(option: SelectOption): boolean;
|
|
837
|
+
/** Whether an option is currently selected. */
|
|
399
838
|
isSelected(option: SelectOption): boolean;
|
|
839
|
+
/** Goes to the next options page when possible. */
|
|
400
840
|
nextPage(): void;
|
|
841
|
+
/** Goes to the previous options page when possible. */
|
|
401
842
|
previousPage(): void;
|
|
843
|
+
/** Closes the dropdown when a click happens outside the component. */
|
|
402
844
|
onClickOutside(event: MouseEvent): void;
|
|
845
|
+
/** Selects a typed free-text value as a new custom entry. */
|
|
403
846
|
onCustomOptionClick(): void;
|
|
847
|
+
/** Handles typing in the search input (updates term and emits search). */
|
|
404
848
|
onInputChange(event: Event): void;
|
|
849
|
+
/** Selects or toggles the clicked option (custom entries included). */
|
|
405
850
|
onOptionClick(option: SelectOption): void;
|
|
851
|
+
/** Selects a single option and updates the control/outputs. */
|
|
406
852
|
selectOption(option: SelectOption): void;
|
|
853
|
+
/** Toggles an option in multiple mode, honoring the valid combinations. */
|
|
407
854
|
toggleOption(option: SelectOption): void;
|
|
855
|
+
/** Opens/closes the dropdown and manages focus/selection state. */
|
|
408
856
|
toggleDropdown(): void;
|
|
857
|
+
/** trackBy for rendered options so Angular reuses DOM nodes by value. */
|
|
409
858
|
trackByFn(index: number, option: SelectOption): any;
|
|
859
|
+
/** Writes an external value into the internal signal (ControlValueAccessor). */
|
|
410
860
|
writeValue(value: any): void;
|
|
861
|
+
/** Stores the onChange callback (ControlValueAccessor). */
|
|
411
862
|
registerOnChange(fn: any): void;
|
|
863
|
+
/** Stores the onTouched callback (ControlValueAccessor). */
|
|
412
864
|
registerOnTouched(fn: any): void;
|
|
413
865
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
414
866
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent, "shk-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "validCombinations": { "alias": "validCombinations"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isAllDataLoaded": { "alias": "isAllDataLoaded"; "required": false; "isSignal": true; }; "allowCustomEntries": { "alias": "allowCustomEntries"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "isSearchable": { "alias": "isSearchable"; "required": false; "isSignal": true; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "usePagination": { "alias": "usePagination"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "preserveSearchOnLoad": { "alias": "preserveSearchOnLoad"; "required": false; "isSignal": true; }; "emptyMessageKey": { "alias": "emptyMessageKey"; "required": false; "isSignal": true; }; "dropdownUpward": { "alias": "dropdownUpward"; "required": false; "isSignal": true; }; "showEmptyOption": { "alias": "showEmptyOption"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "search": "search"; }, never, never, true, never>;
|
|
@@ -419,47 +871,95 @@ interface FileUploadError {
|
|
|
419
871
|
message: string;
|
|
420
872
|
file: File;
|
|
421
873
|
}
|
|
874
|
+
/**
|
|
875
|
+
* Shirkasoft UI Components.
|
|
876
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
877
|
+
* Belongs to Shirkasoft.
|
|
878
|
+
*/
|
|
879
|
+
/**
|
|
880
|
+
* Drag & drop file uploader with file type/size validation, image previews,
|
|
881
|
+
* multiple files support and localized error messages.
|
|
882
|
+
*/
|
|
422
883
|
declare class FileUploadComponent {
|
|
423
|
-
protected getIcon: (name:
|
|
884
|
+
protected getIcon: (name: any) => any;
|
|
424
885
|
private transloco;
|
|
886
|
+
/** Main label of the uploader. */
|
|
425
887
|
label: _angular_core.InputSignal<string>;
|
|
888
|
+
/** Accepted MIME types/extensions (e.g. 'image/*', '.pdf'). */
|
|
426
889
|
accept: _angular_core.InputSignal<string>;
|
|
890
|
+
/** Maximum allowed size per file (bytes). */
|
|
427
891
|
maxFileSize: _angular_core.InputSignal<number>;
|
|
892
|
+
/** Maximum number of files (0 = unlimited). */
|
|
428
893
|
maxFiles: _angular_core.InputSignal<number>;
|
|
894
|
+
/** Text of the file picker button. */
|
|
429
895
|
fileUploadText: _angular_core.InputSignal<string>;
|
|
896
|
+
/** Helper text shown next to the label. */
|
|
430
897
|
fileRecommendation: _angular_core.InputSignal<string>;
|
|
898
|
+
/** Text shown when files are already loaded. */
|
|
431
899
|
changeFilesText: _angular_core.InputSignal<string>;
|
|
900
|
+
/** Enables selecting more than one file at once. */
|
|
432
901
|
multiple: _angular_core.InputSignal<boolean>;
|
|
902
|
+
/** Emitted with the currently selected files. */
|
|
433
903
|
fileSelected: _angular_core.OutputEmitterRef<File[]>;
|
|
904
|
+
/** Emitted when the last selected file is removed. */
|
|
434
905
|
fileRemoved: _angular_core.OutputEmitterRef<void>;
|
|
906
|
+
/** Emitted when a file fails validation (type/size). */
|
|
435
907
|
fileError: _angular_core.OutputEmitterRef<FileUploadError>;
|
|
908
|
+
/** Emitted when a file is near the size limit. */
|
|
436
909
|
fileWarning: _angular_core.OutputEmitterRef<FileUploadError>;
|
|
910
|
+
/** Currently selected files. */
|
|
437
911
|
selectedFiles: _angular_core.WritableSignal<File[]>;
|
|
912
|
+
/** Localized error message displayed to the user. */
|
|
438
913
|
errorMessage: _angular_core.WritableSignal<string>;
|
|
914
|
+
/** Whether the user is dragging files over the zone. */
|
|
439
915
|
isDragOver: _angular_core.WritableSignal<boolean>;
|
|
916
|
+
/** Object URLs used for image previews. */
|
|
440
917
|
private previewUrls;
|
|
918
|
+
/** Whether another selection is allowed. */
|
|
441
919
|
canAddMore: _angular_core.Signal<boolean>;
|
|
920
|
+
/** True when the maximum number of files has been reached. */
|
|
442
921
|
maxReached: _angular_core.Signal<boolean>;
|
|
922
|
+
/** Whether the file is an image (used for previews). */
|
|
443
923
|
isImageFile(file: File): boolean;
|
|
924
|
+
/** Returns (creating on demand) the object URL for a file preview. */
|
|
444
925
|
previewUrl(file: File): string;
|
|
926
|
+
/** Marks the drop zone as active while dragging over it. */
|
|
445
927
|
onDragOver(event: DragEvent): void;
|
|
928
|
+
/** Clears the drag-over state when the drag leaves the zone. */
|
|
446
929
|
onDragLeave(event: DragEvent): void;
|
|
930
|
+
/** Processes the files dropped on the zone. */
|
|
447
931
|
onDrop(event: DragEvent): void;
|
|
932
|
+
/** Processes the files picked from the native file input. */
|
|
448
933
|
onFileChange(event: Event): void;
|
|
934
|
+
/** Validates and appends the received files, emitting errors/warnings. */
|
|
449
935
|
private processFiles;
|
|
936
|
+
/** Validates a file against `accept` and `maxFileSize`. */
|
|
450
937
|
private validateFile;
|
|
938
|
+
/** Emits a warning when the file is close to the size limit (>90%). */
|
|
451
939
|
private checkSizeWarning;
|
|
940
|
+
/** Removes a file, revoking its preview URL. */
|
|
452
941
|
removeFile(file: File): void;
|
|
942
|
+
/** Clears all selected files and previews. */
|
|
453
943
|
changeFiles(): void;
|
|
944
|
+
/** Revokes every stored preview object URL. */
|
|
454
945
|
private clearPreviews;
|
|
946
|
+
/** Human readable size (B/KB/MB). */
|
|
455
947
|
private formatFileSize;
|
|
456
948
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FileUploadComponent, never>;
|
|
457
949
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FileUploadComponent, "shk-file-upload", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "fileUploadText": { "alias": "fileUploadText"; "required": false; "isSignal": true; }; "fileRecommendation": { "alias": "fileRecommendation"; "required": false; "isSignal": true; }; "changeFilesText": { "alias": "changeFilesText"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; }, { "fileSelected": "fileSelected"; "fileRemoved": "fileRemoved"; "fileError": "fileError"; "fileWarning": "fileWarning"; }, never, never, true, never>;
|
|
458
950
|
}
|
|
459
951
|
|
|
460
|
-
/**
|
|
461
|
-
|
|
952
|
+
/**
|
|
953
|
+
* Resolves the icon passed to a component into a lucide component.
|
|
954
|
+
* Accepts a registered string name, an existing lucide component or a LucideIconData object.
|
|
955
|
+
*/
|
|
956
|
+
declare function getIcon(icon?: any, fallback?: any): any;
|
|
462
957
|
|
|
958
|
+
/**
|
|
959
|
+
* Shirkasoft UI Components.
|
|
960
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
961
|
+
* Belongs to Shirkasoft.
|
|
962
|
+
*/
|
|
463
963
|
type TagSeverity = 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'contrast';
|
|
464
964
|
/** Small label used to highlight a value, status or category. */
|
|
465
965
|
declare class TagComponent {
|
|
@@ -469,19 +969,18 @@ declare class TagComponent {
|
|
|
469
969
|
severity: _angular_core.InputSignal<TagSeverity>;
|
|
470
970
|
/** Renders the tag with fully rounded corners (pill). */
|
|
471
971
|
rounded: _angular_core.InputSignal<boolean>;
|
|
472
|
-
/** Optional leading lucide icon name. */
|
|
473
|
-
icon: _angular_core.InputSignal<
|
|
972
|
+
/** Optional leading lucide icon name or component. */
|
|
973
|
+
icon: _angular_core.InputSignal<any>;
|
|
474
974
|
/** Inline styles applied to the tag. */
|
|
475
975
|
style: _angular_core.InputSignal<Record<string, string | number>>;
|
|
476
976
|
/** Extra CSS classes. */
|
|
477
977
|
styleClass: _angular_core.InputSignal<string>;
|
|
478
|
-
protected getIcon: typeof getIcon
|
|
978
|
+
protected getIcon: typeof getIcon;
|
|
479
979
|
protected tagClass: _angular_core.Signal<string>;
|
|
480
980
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TagComponent, never>;
|
|
481
981
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TagComponent, "shk-tag", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "severity": { "alias": "severity"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
482
982
|
}
|
|
483
983
|
|
|
484
|
-
declare function getIcon$5(name: string): any;
|
|
485
984
|
interface Column {
|
|
486
985
|
field: string;
|
|
487
986
|
header: string;
|
|
@@ -505,7 +1004,7 @@ interface Column {
|
|
|
505
1004
|
}
|
|
506
1005
|
interface TableAction {
|
|
507
1006
|
label: string;
|
|
508
|
-
icon: string;
|
|
1007
|
+
icon: string | any;
|
|
509
1008
|
onClick: () => void;
|
|
510
1009
|
class?: string;
|
|
511
1010
|
isVisible?: () => boolean;
|
|
@@ -513,7 +1012,7 @@ interface TableAction {
|
|
|
513
1012
|
}
|
|
514
1013
|
interface RowAction {
|
|
515
1014
|
label: string | ((data: any) => string);
|
|
516
|
-
icon: string | ((data: any) =>
|
|
1015
|
+
icon: string | ((data: any) => any) | any;
|
|
517
1016
|
onClick: (rowData: any) => void;
|
|
518
1017
|
class?: string | ((data: any) => string);
|
|
519
1018
|
isVisible?: (rowData: any) => boolean;
|
|
@@ -530,181 +1029,292 @@ interface FilterChangeEvent {
|
|
|
530
1029
|
[key: string]: any;
|
|
531
1030
|
};
|
|
532
1031
|
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Shirkasoft UI Components.
|
|
1034
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1035
|
+
* Belongs to Shirkasoft.
|
|
1036
|
+
*/
|
|
1037
|
+
/**
|
|
1038
|
+
* Data table with sorting, column filters, global search, pagination,
|
|
1039
|
+
* row/header actions, tag cells and optional server-side mode.
|
|
1040
|
+
*/
|
|
533
1041
|
declare class TableComponent {
|
|
534
1042
|
private fb;
|
|
535
1043
|
private cdr;
|
|
536
1044
|
private transloco;
|
|
537
1045
|
private destroyRef;
|
|
538
|
-
|
|
1046
|
+
/** Maps icon names to lucide components, falling back to a plus icon. */
|
|
1047
|
+
protected getIcon: (name: any) => any;
|
|
539
1048
|
/**
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
*
|
|
543
|
-
*
|
|
544
|
-
* igual que antes. Ajustable por columna vía `col.width` si alguna
|
|
545
|
-
* necesita más o menos espacio en mobile.
|
|
1049
|
+
* Minimum width applied to each column (except `actions`, which keeps its
|
|
1050
|
+
* own computed width) only on narrow screens. On wide screens columns
|
|
1051
|
+
* stretch normally to fill the container width. Can be overridden per
|
|
1052
|
+
* column via `col.width`.
|
|
546
1053
|
*/
|
|
547
1054
|
protected readonly DEFAULT_COLUMN_WIDTH = "140px";
|
|
1055
|
+
/** Returns the effective CSS width for a column ('actions' included). */
|
|
548
1056
|
getColumnWidth(col: Column): string;
|
|
1057
|
+
/** Signal with the translated "Actions" header label. */
|
|
549
1058
|
private actionsHeaderLabel;
|
|
1059
|
+
/** Signal reacting to language changes so imperative translations are recomputed. */
|
|
550
1060
|
private currentLang;
|
|
1061
|
+
/** Reactive signal of loaded translations so pageReport is not stuck with raw keys. */
|
|
1062
|
+
private translations;
|
|
1063
|
+
/** Full dataset. In server-side mode only the current page rows. */
|
|
551
1064
|
data: _angular_core.InputSignal<any[]>;
|
|
1065
|
+
/** Column definitions (field, header, filterable, tag cell options, etc.). */
|
|
552
1066
|
columns: _angular_core.InputSignal<Column[]>;
|
|
1067
|
+
/** Number of rows displayed per page. */
|
|
553
1068
|
rowsPerPage: _angular_core.InputSignal<number>;
|
|
1069
|
+
/** Options shown in the rows-per-page selector. */
|
|
554
1070
|
rowsPerPageOptions: _angular_core.InputSignal<number[]>;
|
|
1071
|
+
/** Whether the table is in loading state (shows the overlay/skeleton). */
|
|
555
1072
|
loading: _angular_core.InputSignal<boolean>;
|
|
1073
|
+
/** Whether to render the row actions column. */
|
|
556
1074
|
showActionRow: _angular_core.InputSignal<boolean>;
|
|
1075
|
+
/** Custom cell/header templates keyed by column field. */
|
|
557
1076
|
customTemplates: _angular_core.InputSignal<{
|
|
558
1077
|
[key: string]: any;
|
|
559
1078
|
}>;
|
|
1079
|
+
/** Actions rendered in the table header. */
|
|
560
1080
|
headerActions: _angular_core.InputSignal<TableAction[]>;
|
|
1081
|
+
/** Actions rendered per row (icon, label, class, visibility/disabled). */
|
|
561
1082
|
rowActions: _angular_core.InputSignal<RowAction[]>;
|
|
1083
|
+
/** Whether the table container renders a drop shadow. */
|
|
562
1084
|
hasShadow: _angular_core.InputSignal<boolean>;
|
|
1085
|
+
/** Field used as the default initial sort. */
|
|
563
1086
|
defaultSortField: _angular_core.InputSignal<string>;
|
|
1087
|
+
/** Order used by the default initial sort (1 asc, -1 desc). */
|
|
564
1088
|
defaultSortOrder: _angular_core.InputSignal<number>;
|
|
1089
|
+
/** Whether the global search input is shown. */
|
|
565
1090
|
showSearch: _angular_core.InputSignal<boolean>;
|
|
1091
|
+
/** Placeholder for the global search input. */
|
|
566
1092
|
searchPlaceholder: _angular_core.InputSignal<string>;
|
|
1093
|
+
/** Message shown when there are no rows. */
|
|
567
1094
|
emptyMessage: _angular_core.InputSignal<string>;
|
|
1095
|
+
/** Enables server-side pagination/filtering/sorting mode. */
|
|
568
1096
|
serverSide: _angular_core.InputSignal<boolean>;
|
|
1097
|
+
/** Total number of records in server-side mode (for pagination math). */
|
|
569
1098
|
totalRecords: _angular_core.InputSignal<number>;
|
|
1099
|
+
/** Optional prebuilt filter chips (label + value) shown above the table. */
|
|
570
1100
|
filters: _angular_core.InputSignal<{
|
|
571
1101
|
label: string;
|
|
572
1102
|
value: string;
|
|
573
1103
|
}[]>;
|
|
1104
|
+
/** Currently active filter chip value. */
|
|
574
1105
|
activeFilter: _angular_core.InputSignal<string>;
|
|
1106
|
+
/** Emits when the user clicks the refresh button. */
|
|
575
1107
|
refresh: _angular_core.OutputEmitterRef<void>;
|
|
1108
|
+
/** Emits page changes (server-side mode) with first/rows/page info. */
|
|
576
1109
|
pageChange: _angular_core.OutputEmitterRef<PageChangeEvent>;
|
|
1110
|
+
/** Emits the active column filters. */
|
|
577
1111
|
filterChange: _angular_core.OutputEmitterRef<FilterChangeEvent>;
|
|
1112
|
+
/** Emits the debounced global search term. */
|
|
578
1113
|
searchChange: _angular_core.OutputEmitterRef<string>;
|
|
1114
|
+
/** Emits when a filter chip is clicked. */
|
|
579
1115
|
filterClick: _angular_core.OutputEmitterRef<string>;
|
|
1116
|
+
/** Internal copy of the input data used as the base for search/filter. */
|
|
580
1117
|
private originalData;
|
|
1118
|
+
/** Rows after the global search is applied. */
|
|
581
1119
|
searchedData: _angular_core.WritableSignal<any[]>;
|
|
1120
|
+
/** Rows after column filters are applied. */
|
|
582
1121
|
filteredData: _angular_core.WritableSignal<any[]>;
|
|
1122
|
+
/** Rows belonging to the current page (after slicing). */
|
|
583
1123
|
displayedData: _angular_core.WritableSignal<any[]>;
|
|
1124
|
+
/** Local total records after filtering (client mode). */
|
|
584
1125
|
localTotalRecords: _angular_core.WritableSignal<number>;
|
|
1126
|
+
/** Index of the first row of the current page. */
|
|
585
1127
|
first: _angular_core.WritableSignal<number>;
|
|
1128
|
+
/** Visibility map for each column filter input. */
|
|
586
1129
|
showFilterInput: _angular_core.WritableSignal<{
|
|
587
1130
|
[key: string]: boolean;
|
|
588
1131
|
}>;
|
|
1132
|
+
/** Current global search term. */
|
|
589
1133
|
searchQuery: _angular_core.WritableSignal<string>;
|
|
1134
|
+
/** Currently sorted field. */
|
|
590
1135
|
sortField: _angular_core.WritableSignal<string>;
|
|
1136
|
+
/** Current sort direction (1 asc, -1 desc). */
|
|
591
1137
|
sortOrder: _angular_core.WritableSignal<number>;
|
|
1138
|
+
/** Local rows per page, kept in sync with the `rowsPerPage` input. */
|
|
592
1139
|
rowsPerPageLocal: _angular_core.WritableSignal<number>;
|
|
1140
|
+
/** Total number of pages based on the effective record count. */
|
|
593
1141
|
totalPages: _angular_core.Signal<number>;
|
|
1142
|
+
/** Current page number (1-based). */
|
|
594
1143
|
currentPage: _angular_core.Signal<number>;
|
|
1144
|
+
/** Reactive form holding the value of each column filter. */
|
|
595
1145
|
columnFiltersForm: FormGroup;
|
|
1146
|
+
/** Subjects used to debounce column filters (server mode) and search. */
|
|
596
1147
|
private filterSubject;
|
|
597
1148
|
private searchSubject;
|
|
1149
|
+
/**
|
|
1150
|
+
* Signature of the last built set of filterable fields (+filter type) to
|
|
1151
|
+
* avoid rebuilding the form (and losing user input) on reference changes.
|
|
1152
|
+
*/
|
|
598
1153
|
private lastFilterFieldsSignature;
|
|
599
1154
|
private columnFilterSubscriptions;
|
|
1155
|
+
/** Columns array with the leading `actions` column when row actions exist. */
|
|
600
1156
|
columnsWithActions: _angular_core.Signal<Column[]>;
|
|
1157
|
+
/** Total records: server-provided in server mode, locally computed otherwise. */
|
|
601
1158
|
effectiveTotalRecords: _angular_core.Signal<number>;
|
|
1159
|
+
/**
|
|
1160
|
+
* Rows rendered by the template: the input data in server-side mode or the
|
|
1161
|
+
* locally sliced/page current rows otherwise.
|
|
1162
|
+
*/
|
|
602
1163
|
effectiveDisplayedData: _angular_core.Signal<any[]>;
|
|
1164
|
+
/**
|
|
1165
|
+
* Reactive "X to Y of Z" report. Depends on loaded translations and the
|
|
1166
|
+
* active language so it always reflects the translated template.
|
|
1167
|
+
*/
|
|
603
1168
|
pageReport: _angular_core.Signal<string>;
|
|
604
1169
|
constructor();
|
|
605
1170
|
/**
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
* "firma" del set de campos+tipo de filtro y solo reconstruimos si
|
|
611
|
-
* realmente cambió. Además, las suscripciones previas se limpian antes de
|
|
612
|
-
* crear las nuevas para no acumular fugas de memoria.
|
|
1171
|
+
* Builds (or keeps) the reactive form with one control per filterable
|
|
1172
|
+
* column. The form is only rebuilt when the set of filterable
|
|
1173
|
+
* fields/filter types changes, preserving the values already typed by the
|
|
1174
|
+
* user otherwise. Previous subscriptions are unsubscribed to avoid leaks.
|
|
613
1175
|
*/
|
|
614
1176
|
private setupColumnFilters;
|
|
1177
|
+
/** Collects the non-empty column filter values and emits them. */
|
|
615
1178
|
private emitFilterChange;
|
|
1179
|
+
/** Applies the global search over the original data (client mode). */
|
|
616
1180
|
private applySearch;
|
|
1181
|
+
/** Entry point that applies search (which cascades into column filters). */
|
|
617
1182
|
private applyFilters;
|
|
1183
|
+
/**
|
|
1184
|
+
* Applies every column filter on top of the searched data using each
|
|
1185
|
+
* column's `filterType` ('select', 'exact' or text contains).
|
|
1186
|
+
*/
|
|
618
1187
|
private applyColumnFilters;
|
|
1188
|
+
/** Slices the filtered rows for the current page. */
|
|
619
1189
|
private updateDisplayedData;
|
|
1190
|
+
/** Emits the filter chip clicked in the template. */
|
|
620
1191
|
onFilterClick(value: string): void;
|
|
1192
|
+
/** Toggles the sort direction of a column (first click sorts ascending). */
|
|
621
1193
|
toggleSort(field: string): void;
|
|
622
1194
|
/**
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
* orden (comportamiento común e intencional en tablas de datos). Si en tu
|
|
626
|
-
* caso de uso prefieres que "sigan" la dirección del sort, multiplica
|
|
627
|
-
* ambos returns por `order`.
|
|
1195
|
+
* Sorts the filtered rows by the current field. Rows with null/undefined
|
|
1196
|
+
* values are always kept at the end regardless of sort direction.
|
|
628
1197
|
*/
|
|
629
1198
|
private applySort;
|
|
1199
|
+
/** Handles the global search input (updates query, resets page, debounces server mode). */
|
|
630
1200
|
onSearchInput(value: string): void;
|
|
1201
|
+
/** Clears a column filter value and hides its input. */
|
|
631
1202
|
clearFilter(field: string): void;
|
|
1203
|
+
/** Toggles the visibility of a column filter input. */
|
|
632
1204
|
toggleFilter(field: string): void;
|
|
633
1205
|
/**
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
* (número), ya que `0` es falsy en JS. Este helper compara explícitamente
|
|
637
|
-
* contra null/undefined/''.
|
|
1206
|
+
* Whether a column filter is non-empty. Avoids treating the number 0 as
|
|
1207
|
+
* "no value".
|
|
638
1208
|
*/
|
|
639
1209
|
hasFilterValue(field: string): boolean;
|
|
1210
|
+
/** Returns the reactive page report string (template helper). */
|
|
640
1211
|
getPageReport(): string;
|
|
1212
|
+
/** Goes to the first page (emits pageChange in server-side mode). */
|
|
641
1213
|
goToFirst(): void;
|
|
1214
|
+
/** Goes to the last page (emits pageChange in server-side mode). */
|
|
642
1215
|
goToLast(): void;
|
|
1216
|
+
/** Updates rows-per-page and resets to the first page. */
|
|
643
1217
|
onRowsPerPageChange(rows: number): void;
|
|
1218
|
+
/** Emits the refresh output. */
|
|
644
1219
|
refreshData(): void;
|
|
1220
|
+
/** Whether the current page is the first one. */
|
|
645
1221
|
isFirstPage(): boolean;
|
|
1222
|
+
/** Whether the current page is the last one. */
|
|
646
1223
|
isLastPage(): boolean;
|
|
1224
|
+
/** Moves to the next page (emits pageChange in server-side mode). */
|
|
647
1225
|
next(): void;
|
|
1226
|
+
/** Moves to the previous page (emits pageChange in server mode). */
|
|
648
1227
|
prev(): void;
|
|
1228
|
+
/** Resets the table to the first page. */
|
|
649
1229
|
reset(): void;
|
|
1230
|
+
/** Resolves the row action label, static or per-row function. */
|
|
650
1231
|
getRowActionLabel(action: RowAction, rowData: any): string;
|
|
651
|
-
|
|
1232
|
+
/**
|
|
1233
|
+
* Resolves the row action icon: a lucide component, a function returning
|
|
1234
|
+
* the icon name, or a raw string resolved by the central icon map.
|
|
1235
|
+
*/
|
|
1236
|
+
getRowActionIconName(action: RowAction, rowData: any): any;
|
|
1237
|
+
/** Resolves the CSS class of a row action, static or per-row function. */
|
|
652
1238
|
getRowActionClass(action: RowAction, rowData: any): string;
|
|
1239
|
+
/** Whether a header action is disabled. */
|
|
653
1240
|
isHeaderActionDisabled(action: TableAction): boolean;
|
|
1241
|
+
/** Whether a header action is visible. */
|
|
654
1242
|
isHeaderActionVisible(action: TableAction): boolean;
|
|
1243
|
+
/** Whether a row action is disabled for the given row. */
|
|
655
1244
|
isRowActionDisabled(action: RowAction, rowData: any): boolean;
|
|
1245
|
+
/** Whether a row action is visible for the given row. */
|
|
656
1246
|
isRowActionVisible(action: RowAction, rowData: any): boolean;
|
|
1247
|
+
/** Truncates a value with an ellipsis past the given character limit. */
|
|
657
1248
|
truncate(value: any, limit?: number): string;
|
|
1249
|
+
/** Resolves the value displayed inside a tag cell, static or per-row function. */
|
|
658
1250
|
getTagValue(col: Column, rowData: any): string;
|
|
1251
|
+
/** Resolves and validates the tag severity, falling back to 'secondary'. */
|
|
659
1252
|
getTagSeverity(col: Column, rowData: any): TagSeverity;
|
|
1253
|
+
/** Resolves whether the tag in a cell is rounded, static or per-row function. */
|
|
660
1254
|
getTagRounded(col: Column, rowData: any): boolean;
|
|
1255
|
+
/** Resolves the icon shown inside a tag cell, static or per-row function. */
|
|
661
1256
|
getTagIcon(col: Column, rowData: any): string;
|
|
1257
|
+
/** Resolves the CSS styles of a tag cell, static or per-row function. */
|
|
662
1258
|
getTagStyle(col: Column, rowData: any): Record<string, string | number>;
|
|
663
1259
|
/**
|
|
664
|
-
*
|
|
665
|
-
* Si tu dato no tiene `id`/`_id`, cae de vuelta al índice (comportamiento
|
|
666
|
-
* anterior), pero se recomienda pasar filas con un identificador único.
|
|
1260
|
+
* trackBy for row identity: prefers `id`/`_id` and falls back to the index.
|
|
667
1261
|
*/
|
|
668
1262
|
trackByRow(row: any, index: number): any;
|
|
669
|
-
/**
|
|
1263
|
+
/** Keyboard support (Enter/Space) for sorting a column header. */
|
|
670
1264
|
onHeaderKeydown(event: KeyboardEvent, col: Column): void;
|
|
671
|
-
/**
|
|
1265
|
+
/** Accessible aria-sort value for a given column header. */
|
|
672
1266
|
getAriaSort(col: Column): 'ascending' | 'descending' | 'none';
|
|
673
1267
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
674
1268
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableComponent, "shk-table", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "rowsPerPage": { "alias": "rowsPerPage"; "required": false; "isSignal": true; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "showActionRow": { "alias": "showActionRow"; "required": false; "isSignal": true; }; "customTemplates": { "alias": "customTemplates"; "required": false; "isSignal": true; }; "headerActions": { "alias": "headerActions"; "required": false; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "hasShadow": { "alias": "hasShadow"; "required": false; "isSignal": true; }; "defaultSortField": { "alias": "defaultSortField"; "required": false; "isSignal": true; }; "defaultSortOrder": { "alias": "defaultSortOrder"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "serverSide": { "alias": "serverSide"; "required": false; "isSignal": true; }; "totalRecords": { "alias": "totalRecords"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "activeFilter": { "alias": "activeFilter"; "required": false; "isSignal": true; }; }, { "refresh": "refresh"; "pageChange": "pageChange"; "filterChange": "filterChange"; "searchChange": "searchChange"; "filterClick": "filterClick"; }, never, never, true, never>;
|
|
675
1269
|
}
|
|
676
1270
|
|
|
677
1271
|
/**
|
|
678
|
-
*
|
|
679
|
-
*
|
|
680
|
-
*
|
|
681
|
-
|
|
1272
|
+
* Shirkasoft UI Components.
|
|
1273
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1274
|
+
* Belongs to Shirkasoft.
|
|
1275
|
+
*/
|
|
1276
|
+
/**
|
|
1277
|
+
* Tooltip rendered in `document.body` with `position: fixed`, so it always
|
|
1278
|
+
* floats above any container (tables with `overflow: hidden`, modals, scroll
|
|
1279
|
+
* wrappers, etc.) and never gets clipped or hidden behind its anchor element.
|
|
682
1280
|
*/
|
|
683
1281
|
declare class TooltipComponent implements OnDestroy {
|
|
1282
|
+
/** Content of the tooltip. */
|
|
684
1283
|
readonly text: _angular_core.InputSignal<string>;
|
|
1284
|
+
/** Preferred placement relative to the trigger. */
|
|
685
1285
|
readonly position: _angular_core.InputSignal<"top" | "bottom" | "right">;
|
|
1286
|
+
/** 'hover' shows on mouse enter; 'fixed' stays pinned to the content. */
|
|
686
1287
|
readonly mode: _angular_core.InputSignal<"fixed" | "hover">;
|
|
1288
|
+
/** Distance (px) between the tooltip and the trigger. */
|
|
687
1289
|
readonly offset: _angular_core.InputSignal<number>;
|
|
688
1290
|
private readonly host;
|
|
689
1291
|
private readonly document;
|
|
1292
|
+
/** The dynamically created tooltip element. */
|
|
690
1293
|
private tooltipEl;
|
|
1294
|
+
/** Unsubscribe callbacks for the scroll/resize listeners. */
|
|
691
1295
|
private cleanup;
|
|
1296
|
+
/** Shows the tooltip over the host trigger on mouseenter. */
|
|
692
1297
|
onMouseEnter(): void;
|
|
1298
|
+
/** Hides the tooltip on mouseleave. */
|
|
693
1299
|
onMouseLeave(): void;
|
|
1300
|
+
/** Creates and positions the tooltip element on `document.body`. */
|
|
694
1301
|
private show;
|
|
1302
|
+
/** Computes the tooltip position, clamped to the viewport. */
|
|
695
1303
|
private computePosition;
|
|
1304
|
+
/** Fades the tooltip out and removes it from the DOM. */
|
|
696
1305
|
private hide;
|
|
1306
|
+
/** Removes the tooltip and its listeners. */
|
|
697
1307
|
private removeTooltip;
|
|
1308
|
+
/** Cleans up the tooltip on component destroy. */
|
|
698
1309
|
ngOnDestroy(): void;
|
|
699
1310
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
700
1311
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TooltipComponent, "shk-tooltip", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
701
1312
|
}
|
|
702
1313
|
|
|
703
|
-
declare function getIcon$4(name?: string): any;
|
|
704
1314
|
interface SidebarItem {
|
|
705
1315
|
id: string;
|
|
706
1316
|
label: string;
|
|
707
|
-
icon?: string;
|
|
1317
|
+
icon?: string | any;
|
|
708
1318
|
route?: string;
|
|
709
1319
|
children?: SidebarItem[];
|
|
710
1320
|
roles?: string[];
|
|
@@ -717,54 +1327,96 @@ interface SidebarGroup {
|
|
|
717
1327
|
label?: string;
|
|
718
1328
|
items: SidebarItem[];
|
|
719
1329
|
}
|
|
1330
|
+
/**
|
|
1331
|
+
* Shirkasoft UI Components.
|
|
1332
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1333
|
+
* Belongs to Shirkasoft.
|
|
1334
|
+
*/
|
|
1335
|
+
/**
|
|
1336
|
+
* Collapsible vertical navigation sidebar with groups, icons, badges,
|
|
1337
|
+
* role-based filtering, responsive mobile drawer and tooltips.
|
|
1338
|
+
*/
|
|
720
1339
|
declare class SidebarComponent {
|
|
721
1340
|
private platformId;
|
|
1341
|
+
/** Flat list of navigation items (used when no groups are provided). */
|
|
722
1342
|
items: _angular_core.InputSignal<SidebarItem[]>;
|
|
1343
|
+
/** Grouped navigation items; takes precedence over `items`. */
|
|
723
1344
|
groups: _angular_core.InputSignal<SidebarGroup[]>;
|
|
1345
|
+
/** Brand title shown at the top of the sidebar. */
|
|
724
1346
|
title: _angular_core.InputSignal<string>;
|
|
1347
|
+
/** Subtitle under the title. */
|
|
725
1348
|
subtitle: _angular_core.InputSignal<string>;
|
|
1349
|
+
/** Brand logo image/url shown at the top. */
|
|
726
1350
|
logo: _angular_core.InputSignal<string>;
|
|
1351
|
+
/** id of the item currently highlighted as active. */
|
|
727
1352
|
activeItemId: _angular_core.InputSignal<string>;
|
|
1353
|
+
/** Role used to filter items that declare `roles`. */
|
|
728
1354
|
userRole: _angular_core.InputSignal<string>;
|
|
1355
|
+
/** Whether the sidebar can collapse into a rail. */
|
|
729
1356
|
collapsible: _angular_core.InputSignal<boolean>;
|
|
1357
|
+
/** Shows the expand/collapse toggle button. */
|
|
730
1358
|
showToggle: _angular_core.InputSignal<boolean>;
|
|
1359
|
+
/** Enables the mobile drawer behaviour below lg breakpoint. */
|
|
731
1360
|
responsive: _angular_core.InputSignal<boolean>;
|
|
1361
|
+
/** Keeps the sidebar fixed while the page scrolls. */
|
|
732
1362
|
fixed: _angular_core.InputSignal<boolean>;
|
|
1363
|
+
/** Adds a drop shadow to the sidebar. */
|
|
733
1364
|
hasShadow: _angular_core.InputSignal<boolean>;
|
|
1365
|
+
/** Width in expanded state. */
|
|
734
1366
|
expandedWidth: _angular_core.InputSignal<string>;
|
|
1367
|
+
/** Width when collapsed. */
|
|
735
1368
|
collapsedWidth: _angular_core.InputSignal<string>;
|
|
1369
|
+
/** Group ids opened by default on load. */
|
|
736
1370
|
defaultExpanded: _angular_core.InputSignal<string[]>;
|
|
1371
|
+
/** Optional transform applied to item labels (e.g. i18n). */
|
|
737
1372
|
labelPipe: _angular_core.InputSignal<(label: string) => string>;
|
|
1373
|
+
/** Tooltip for the expand action. */
|
|
738
1374
|
expandTooltip: _angular_core.InputSignal<string>;
|
|
1375
|
+
/** Tooltip for the collapse action. */
|
|
739
1376
|
collapseTooltip: _angular_core.InputSignal<string>;
|
|
1377
|
+
/** Collapsed state, bindable with [(collapsed)]. */
|
|
740
1378
|
collapsed: _angular_core.ModelSignal<boolean>;
|
|
1379
|
+
/** Mobile drawer open state, bindable with [(mobileOpen)]. */
|
|
741
1380
|
mobileOpen: _angular_core.ModelSignal<boolean>;
|
|
1381
|
+
/** Emitted when a navigation item is clicked. */
|
|
742
1382
|
itemClick: _angular_core.OutputEmitterRef<SidebarItem>;
|
|
1383
|
+
/** Emitted with the new collapsed state after toggling. */
|
|
743
1384
|
toggle: _angular_core.OutputEmitterRef<boolean>;
|
|
744
|
-
protected getIcon:
|
|
1385
|
+
protected getIcon: (name: any) => any;
|
|
1386
|
+
/** Currently selected item id. */
|
|
745
1387
|
protected selectedId: _angular_core.WritableSignal<string>;
|
|
1388
|
+
/** Set of group ids currently expanded. */
|
|
746
1389
|
protected expandedGroups: _angular_core.WritableSignal<Set<string>>;
|
|
747
1390
|
private isBrowser;
|
|
748
|
-
constructor(
|
|
1391
|
+
constructor();
|
|
1392
|
+
/** Current sidebar width depending on the collapsed state. */
|
|
749
1393
|
protected width: _angular_core.Signal<string>;
|
|
1394
|
+
/** Navigation items after group flattening and role filtering. */
|
|
750
1395
|
protected navItems: _angular_core.Signal<SidebarItem[]>;
|
|
1396
|
+
/** Closes the mobile drawer when the window grows below lg. */
|
|
751
1397
|
onResize(_event: Event): void;
|
|
1398
|
+
/** Applies the `labelPipe` transform to an item label. */
|
|
752
1399
|
protected label(item: SidebarItem): string;
|
|
1400
|
+
/** Whether the item matches the selected id. */
|
|
753
1401
|
protected isItemActive(item: SidebarItem): boolean;
|
|
1402
|
+
/** Whether one of the item's children is currently active. */
|
|
754
1403
|
protected isGroupActive(item: SidebarItem): boolean;
|
|
1404
|
+
/** Whether a group is expanded. */
|
|
755
1405
|
protected isGroupExpanded(item: SidebarItem): boolean;
|
|
1406
|
+
/** Toggles the expanded state of a group. */
|
|
756
1407
|
protected toggleGroup(item: SidebarItem): void;
|
|
1408
|
+
/** Selects an item, emits `itemClick` and closes the mobile drawer when needed. */
|
|
757
1409
|
protected onItemClick(item: SidebarItem): void;
|
|
1410
|
+
/** Toggles collapse (desktop) or the mobile drawer (below lg). */
|
|
758
1411
|
protected onToggle(): void;
|
|
759
1412
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarComponent, never>;
|
|
760
1413
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarComponent, "shk-sidebar", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "activeItemId": { "alias": "activeItemId"; "required": false; "isSignal": true; }; "userRole": { "alias": "userRole"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "showToggle": { "alias": "showToggle"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "fixed": { "alias": "fixed"; "required": false; "isSignal": true; }; "hasShadow": { "alias": "hasShadow"; "required": false; "isSignal": true; }; "expandedWidth": { "alias": "expandedWidth"; "required": false; "isSignal": true; }; "collapsedWidth": { "alias": "collapsedWidth"; "required": false; "isSignal": true; }; "defaultExpanded": { "alias": "defaultExpanded"; "required": false; "isSignal": true; }; "labelPipe": { "alias": "labelPipe"; "required": false; "isSignal": true; }; "expandTooltip": { "alias": "expandTooltip"; "required": false; "isSignal": true; }; "collapseTooltip": { "alias": "collapseTooltip"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "mobileOpen": { "alias": "mobileOpen"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; "mobileOpen": "mobileOpenChange"; "itemClick": "itemClick"; "toggle": "toggle"; }, never, ["[sidebarHeader]", "[sidebarContent]", "[sidebarFooter]"], true, never>;
|
|
761
1414
|
}
|
|
762
1415
|
|
|
763
|
-
declare function getIcon$3(name?: string): any;
|
|
764
1416
|
interface RailSidebarItem {
|
|
765
1417
|
id: string;
|
|
766
1418
|
label: string;
|
|
767
|
-
icon?: string;
|
|
1419
|
+
icon?: string | any;
|
|
768
1420
|
routerLink?: string;
|
|
769
1421
|
children?: RailSidebarItem[];
|
|
770
1422
|
roles?: string[];
|
|
@@ -775,7 +1427,7 @@ interface RailSidebarItem {
|
|
|
775
1427
|
interface RailSidebarSection {
|
|
776
1428
|
key: string;
|
|
777
1429
|
label: string;
|
|
778
|
-
icon?: string;
|
|
1430
|
+
icon?: string | any;
|
|
779
1431
|
routerLink?: string;
|
|
780
1432
|
matchPrefixes?: string[];
|
|
781
1433
|
items?: RailSidebarItem[];
|
|
@@ -784,85 +1436,169 @@ interface RailSidebarSectionEvent {
|
|
|
784
1436
|
key: string;
|
|
785
1437
|
routerLink?: string;
|
|
786
1438
|
}
|
|
1439
|
+
/**
|
|
1440
|
+
* Shirkasoft UI Components.
|
|
1441
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1442
|
+
* Belongs to Shirkasoft.
|
|
1443
|
+
*/
|
|
1444
|
+
/**
|
|
1445
|
+
* Narrow "rail" sidebar that expands into sections. Supports sections, roles,
|
|
1446
|
+
* language switching, collapse/expand and responsive tooltips.
|
|
1447
|
+
*/
|
|
787
1448
|
declare class RailSidebarComponent {
|
|
1449
|
+
/** Sections presented as expandable areas of the rail. */
|
|
788
1450
|
sections: _angular_core.InputSignal<RailSidebarSection[]>;
|
|
1451
|
+
/** Current location url used to detect the active section/item. */
|
|
789
1452
|
activeUrl: _angular_core.InputSignal<string>;
|
|
1453
|
+
/** Key of the active section, bindable with [(activeSectionKey)]. */
|
|
790
1454
|
activeSectionKey: _angular_core.ModelSignal<string>;
|
|
1455
|
+
/** Collapsed (rail only) state, bindable with [(collapsed)]. */
|
|
791
1456
|
collapsed: _angular_core.ModelSignal<boolean>;
|
|
1457
|
+
/** Active language code. */
|
|
792
1458
|
activeLang: _angular_core.InputSignal<string>;
|
|
1459
|
+
/** Languages available in the language switcher. */
|
|
793
1460
|
langs: _angular_core.InputSignal<string[]>;
|
|
1461
|
+
/** Brand logo image/url. */
|
|
794
1462
|
logo: _angular_core.InputSignal<string>;
|
|
1463
|
+
/** Application name shown when expanded. */
|
|
795
1464
|
appName: _angular_core.InputSignal<string>;
|
|
1465
|
+
/** Role used to filter items that declare `roles`. */
|
|
796
1466
|
userRole: _angular_core.InputSignal<string>;
|
|
1467
|
+
/** Optional transform applied to item labels (e.g. i18n). */
|
|
797
1468
|
labelPipe: _angular_core.InputSignal<(label: string) => string>;
|
|
1469
|
+
/** Width of the collapsed rail. */
|
|
798
1470
|
railWidth: _angular_core.InputSignal<string>;
|
|
1471
|
+
/** Width when a section is expanded. */
|
|
799
1472
|
expandedWidth: _angular_core.InputSignal<string>;
|
|
1473
|
+
/** Tooltip for the workspace/home action. */
|
|
800
1474
|
workspaceTooltip: _angular_core.InputSignal<string>;
|
|
1475
|
+
/** Tooltip for the logout action. */
|
|
801
1476
|
logoutTooltip: _angular_core.InputSignal<string>;
|
|
1477
|
+
/** Tooltip for collapsing the sidebar. */
|
|
802
1478
|
collapseTooltip: _angular_core.InputSignal<string>;
|
|
1479
|
+
/** Tooltip for expanding the sidebar. */
|
|
803
1480
|
expandTooltip: _angular_core.InputSignal<string>;
|
|
1481
|
+
/** Emitted when a section is selected, with its key and optional route. */
|
|
804
1482
|
sectionSelected: _angular_core.OutputEmitterRef<RailSidebarSectionEvent>;
|
|
1483
|
+
/** Emitted when a navigation item is clicked. */
|
|
805
1484
|
itemClick: _angular_core.OutputEmitterRef<RailSidebarItem>;
|
|
1485
|
+
/** Emitted with the next language code when the user switches language. */
|
|
806
1486
|
setLang: _angular_core.OutputEmitterRef<string>;
|
|
1487
|
+
/** Emitted when the user requests to log out. */
|
|
807
1488
|
logoutRequested: _angular_core.OutputEmitterRef<void>;
|
|
1489
|
+
/** Emitted with the new collapsed state after toggling. */
|
|
808
1490
|
toggleSidebar: _angular_core.OutputEmitterRef<boolean>;
|
|
1491
|
+
/** Emitted when the workspace/home entry is clicked. */
|
|
809
1492
|
workspaceClick: _angular_core.OutputEmitterRef<void>;
|
|
810
|
-
protected getIcon:
|
|
1493
|
+
protected getIcon: (name: any) => any;
|
|
1494
|
+
/** Set of group ids currently expanded. */
|
|
811
1495
|
protected expandedGroups: _angular_core.WritableSignal<Set<string>>;
|
|
812
1496
|
constructor();
|
|
1497
|
+
/** Current sidebar width depending on the collapsed state. */
|
|
813
1498
|
protected width: _angular_core.Signal<string>;
|
|
1499
|
+
/** The section currently selected. */
|
|
814
1500
|
protected activeSection: _angular_core.Signal<RailSidebarSection | null>;
|
|
1501
|
+
/** Items of the active section, filtered by role. */
|
|
815
1502
|
protected navItems: _angular_core.Signal<RailSidebarItem[]>;
|
|
1503
|
+
/** Applies the `labelPipe` transform to a label. */
|
|
816
1504
|
protected label(label: string): string;
|
|
1505
|
+
/** Whether the section matches the active key. */
|
|
817
1506
|
protected isSectionActive(section: RailSidebarSection): boolean;
|
|
1507
|
+
/** Whether the item is the best route match for the active url. */
|
|
818
1508
|
protected isItemActive(item: RailSidebarItem): boolean;
|
|
1509
|
+
/** Whether one of the item's children matches the active url. */
|
|
819
1510
|
protected isGroupActive(item: RailSidebarItem): boolean;
|
|
1511
|
+
/** Exact or prefix match between a router link and the active url. */
|
|
820
1512
|
private matchesUrl;
|
|
1513
|
+
/** Longest (most specific) item whose route matches the active url. */
|
|
821
1514
|
private bestMatchItem;
|
|
1515
|
+
/** Whether a group is expanded. */
|
|
822
1516
|
protected isGroupExpanded(item: RailSidebarItem): boolean;
|
|
1517
|
+
/** Toggles the expanded state of a group. */
|
|
823
1518
|
protected toggleGroup(item: RailSidebarItem): void;
|
|
1519
|
+
/** Selects a section, emits `sectionSelected` and expands the rail when collapsed. */
|
|
824
1520
|
protected onSectionClick(section: RailSidebarSection): void;
|
|
1521
|
+
/** Emits `itemClick` for a navigation item (skipping disabled items). */
|
|
825
1522
|
protected onItemClick(item: RailSidebarItem): void;
|
|
1523
|
+
/** Emits `workspaceClick` and expands the sidebar if it was collapsed. */
|
|
826
1524
|
protected onWorkspace(): void;
|
|
1525
|
+
/** Cycles to the next language and emits `setLang`. */
|
|
827
1526
|
protected onToggleLang(): void;
|
|
1527
|
+
/** Toggles collapse and emits `toggleSidebar`. */
|
|
828
1528
|
protected onToggleSidebar(): void;
|
|
829
1529
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RailSidebarComponent, never>;
|
|
830
1530
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RailSidebarComponent, "shk-rail-sidebar", never, { "sections": { "alias": "sections"; "required": false; "isSignal": true; }; "activeUrl": { "alias": "activeUrl"; "required": false; "isSignal": true; }; "activeSectionKey": { "alias": "activeSectionKey"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "activeLang": { "alias": "activeLang"; "required": false; "isSignal": true; }; "langs": { "alias": "langs"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "appName": { "alias": "appName"; "required": false; "isSignal": true; }; "userRole": { "alias": "userRole"; "required": false; "isSignal": true; }; "labelPipe": { "alias": "labelPipe"; "required": false; "isSignal": true; }; "railWidth": { "alias": "railWidth"; "required": false; "isSignal": true; }; "expandedWidth": { "alias": "expandedWidth"; "required": false; "isSignal": true; }; "workspaceTooltip": { "alias": "workspaceTooltip"; "required": false; "isSignal": true; }; "logoutTooltip": { "alias": "logoutTooltip"; "required": false; "isSignal": true; }; "collapseTooltip": { "alias": "collapseTooltip"; "required": false; "isSignal": true; }; "expandTooltip": { "alias": "expandTooltip"; "required": false; "isSignal": true; }; }, { "activeSectionKey": "activeSectionKeyChange"; "collapsed": "collapsedChange"; "sectionSelected": "sectionSelected"; "itemClick": "itemClick"; "setLang": "setLang"; "logoutRequested": "logoutRequested"; "toggleSidebar": "toggleSidebar"; "workspaceClick": "workspaceClick"; }, never, never, true, never>;
|
|
831
1531
|
}
|
|
832
1532
|
|
|
1533
|
+
/**
|
|
1534
|
+
* Shirkasoft UI Components.
|
|
1535
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1536
|
+
* Belongs to Shirkasoft.
|
|
1537
|
+
*/
|
|
1538
|
+
/**
|
|
1539
|
+
* Chart.js wrapper that renders line, bar, pie, doughnut or polarArea charts
|
|
1540
|
+
* and updates them reactively as the inputs change.
|
|
1541
|
+
*/
|
|
833
1542
|
declare class ChartComponent implements AfterViewInit, OnDestroy {
|
|
1543
|
+
/** Guarantees Chart.js plugins are only registered once. */
|
|
834
1544
|
private static registered;
|
|
1545
|
+
/** Type of chart to render. */
|
|
835
1546
|
type: _angular_core.InputSignal<"line" | "bar" | "pie" | "doughnut" | "polarArea">;
|
|
1547
|
+
/** Chart.js datasets payload. */
|
|
836
1548
|
data: _angular_core.InputSignal<any>;
|
|
1549
|
+
/** Chart.js options object. */
|
|
837
1550
|
options: _angular_core.InputSignal<any>;
|
|
1551
|
+
/** Reference to the inner canvas element. */
|
|
838
1552
|
private canvasRef;
|
|
1553
|
+
/** Live Chart.js instance. */
|
|
839
1554
|
private chartInstance;
|
|
1555
|
+
/** Whether the view has been initialized yet. */
|
|
840
1556
|
private initialized;
|
|
841
1557
|
constructor();
|
|
1558
|
+
/** Creates the initial chart once the canvas is available. */
|
|
842
1559
|
ngAfterViewInit(): void;
|
|
1560
|
+
/** Destroys the Chart.js instance. */
|
|
843
1561
|
ngOnDestroy(): void;
|
|
1562
|
+
/** Clears the canvas by reassigning its width. */
|
|
844
1563
|
private resetCanvas;
|
|
1564
|
+
/** Creates a new Chart.js instance on the canvas. */
|
|
845
1565
|
private initChart;
|
|
1566
|
+
/** Deep clones a value to detach it from Angular's reactive objects. */
|
|
846
1567
|
private deepClone;
|
|
1568
|
+
/** Applies the new data/options, rebuilding the chart when the type changes. */
|
|
847
1569
|
private updateChart;
|
|
848
1570
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartComponent, never>;
|
|
849
1571
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartComponent, "shk-chart", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
850
1572
|
}
|
|
851
1573
|
|
|
1574
|
+
/**
|
|
1575
|
+
* Shirkasoft UI Components.
|
|
1576
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1577
|
+
* Belongs to Shirkasoft.
|
|
1578
|
+
*/
|
|
1579
|
+
/** Default dataset colors used by the ChartComponent when no palette is provided. */
|
|
852
1580
|
declare const COLOR_PALETTE: {
|
|
853
1581
|
bg: string;
|
|
854
1582
|
border: string;
|
|
855
1583
|
}[];
|
|
1584
|
+
/**
|
|
1585
|
+
* Reads the current `--shk-*` CSS variables from the document and returns
|
|
1586
|
+
* the text, muted and border colors used by charts to follow the active theme.
|
|
1587
|
+
*/
|
|
856
1588
|
declare function readThemeColors(): {
|
|
857
1589
|
text: string;
|
|
858
1590
|
muted: string;
|
|
859
1591
|
border: string;
|
|
860
1592
|
};
|
|
861
1593
|
|
|
862
|
-
|
|
1594
|
+
/**
|
|
1595
|
+
* Shirkasoft UI Components.
|
|
1596
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1597
|
+
* Belongs to Shirkasoft.
|
|
1598
|
+
*/
|
|
863
1599
|
/** A chip shown under a sub item (time, pricing model, quantity, etc). */
|
|
864
1600
|
interface TimelineMeta {
|
|
865
|
-
icon: string;
|
|
1601
|
+
icon: string | any;
|
|
866
1602
|
label?: string;
|
|
867
1603
|
value: string;
|
|
868
1604
|
}
|
|
@@ -873,8 +1609,8 @@ interface TimelineSubItem {
|
|
|
873
1609
|
subtitle?: string;
|
|
874
1610
|
/** Used to look up icon / color in `iconMap` and `iconColors`. */
|
|
875
1611
|
type?: string;
|
|
876
|
-
/** Overrides the resolved icon name. */
|
|
877
|
-
icon?: string;
|
|
1612
|
+
/** Overrides the resolved icon (name or component). */
|
|
1613
|
+
icon?: string | any;
|
|
878
1614
|
/** Hex background for the icon box (fallback). */
|
|
879
1615
|
color?: string;
|
|
880
1616
|
/** Hex text color for the icon (fallback). */
|
|
@@ -896,7 +1632,7 @@ interface TimelineItem {
|
|
|
896
1632
|
description?: string;
|
|
897
1633
|
/** Small pill shown above the title (e.g. "Día 1"). */
|
|
898
1634
|
badge?: string | number;
|
|
899
|
-
badgeIcon?: string;
|
|
1635
|
+
badgeIcon?: string | any;
|
|
900
1636
|
/** CSS classes for the marker (falls back to the cycled gradient palette). */
|
|
901
1637
|
color?: string;
|
|
902
1638
|
subItems?: TimelineSubItem[];
|
|
@@ -904,7 +1640,7 @@ interface TimelineItem {
|
|
|
904
1640
|
/** A button rendered in the header. */
|
|
905
1641
|
interface TimelineAction {
|
|
906
1642
|
label: string;
|
|
907
|
-
icon: string;
|
|
1643
|
+
icon: string | any;
|
|
908
1644
|
onClick: () => void;
|
|
909
1645
|
class?: string;
|
|
910
1646
|
isVisible?: () => boolean;
|
|
@@ -913,7 +1649,7 @@ interface TimelineAction {
|
|
|
913
1649
|
/** An action rendered in the item card footer. */
|
|
914
1650
|
interface TimelineItemAction {
|
|
915
1651
|
label: string | ((item: TimelineItem) => string);
|
|
916
|
-
icon: string | ((item: TimelineItem) => string);
|
|
1652
|
+
icon: string | any | ((item: TimelineItem) => string | any);
|
|
917
1653
|
onClick: (item: TimelineItem) => void;
|
|
918
1654
|
class?: string | ((item: TimelineItem) => string);
|
|
919
1655
|
isVisible?: (item: TimelineItem) => boolean;
|
|
@@ -922,7 +1658,7 @@ interface TimelineItemAction {
|
|
|
922
1658
|
/** An action rendered on hover over a sub item. */
|
|
923
1659
|
interface TimelineSubItemAction {
|
|
924
1660
|
label: string | ((item: TimelineItem, subItem: TimelineSubItem) => string);
|
|
925
|
-
icon: string | ((item: TimelineItem, subItem: TimelineSubItem) => string);
|
|
1661
|
+
icon: string | any | ((item: TimelineItem, subItem: TimelineSubItem) => string | any);
|
|
926
1662
|
onClick: (item: TimelineItem, subItem: TimelineSubItem) => void;
|
|
927
1663
|
isVisible?: (item: TimelineItem, subItem: TimelineSubItem) => boolean;
|
|
928
1664
|
isDisabled?: (item: TimelineItem, subItem: TimelineSubItem) => boolean;
|
|
@@ -935,10 +1671,10 @@ declare const DEFAULT_SUPPLIER_ICON_COLORS: Record<string, {
|
|
|
935
1671
|
bg: string;
|
|
936
1672
|
text: string;
|
|
937
1673
|
}>;
|
|
938
|
-
/** Maps a sub-item `type` to a lucide icon
|
|
939
|
-
declare const DEFAULT_SUPPLIER_TYPE_ICONS: Record<string,
|
|
1674
|
+
/** Maps a sub-item `type` to a lucide icon component. */
|
|
1675
|
+
declare const DEFAULT_SUPPLIER_TYPE_ICONS: Record<string, any>;
|
|
940
1676
|
declare class TimelineComponent {
|
|
941
|
-
protected getIcon:
|
|
1677
|
+
protected getIcon: (name: any) => any;
|
|
942
1678
|
/** Timeline data. */
|
|
943
1679
|
items: _angular_core.InputSignal<TimelineItem[]>;
|
|
944
1680
|
/** 'left' = line and markers on the left; 'alternate' = cards alternate around a centered line on lg+. */
|
|
@@ -974,9 +1710,9 @@ declare class TimelineComponent {
|
|
|
974
1710
|
addSubItemTooltip: _angular_core.InputSignal<string>;
|
|
975
1711
|
itemActions: _angular_core.InputSignal<TimelineItemAction[]>;
|
|
976
1712
|
subItemActions: _angular_core.InputSignal<TimelineSubItemAction[]>;
|
|
977
|
-
/** Maps a sub-item `type` to a lucide icon name. */
|
|
1713
|
+
/** Maps a sub-item `type` to a lucide icon (name or component). */
|
|
978
1714
|
iconMap: _angular_core.InputSignal<{
|
|
979
|
-
[type: string]:
|
|
1715
|
+
[type: string]: any;
|
|
980
1716
|
}>;
|
|
981
1717
|
/** Maps a sub-item `type` to its icon-box colors. */
|
|
982
1718
|
iconColors: _angular_core.InputSignal<{
|
|
@@ -986,10 +1722,10 @@ declare class TimelineComponent {
|
|
|
986
1722
|
};
|
|
987
1723
|
}>;
|
|
988
1724
|
/** Icon used when nothing matches. */
|
|
989
|
-
fallbackIcon: _angular_core.InputSignal<
|
|
1725
|
+
fallbackIcon: _angular_core.InputSignal<any>;
|
|
990
1726
|
showEmptyState: _angular_core.InputSignal<boolean>;
|
|
991
1727
|
emptyMessage: _angular_core.InputSignal<string>;
|
|
992
|
-
emptyIcon: _angular_core.InputSignal<
|
|
1728
|
+
emptyIcon: _angular_core.InputSignal<any>;
|
|
993
1729
|
editTooltip: _angular_core.InputSignal<string>;
|
|
994
1730
|
deleteTooltip: _angular_core.InputSignal<string>;
|
|
995
1731
|
optionalLabel: _angular_core.InputSignal<string>;
|
|
@@ -1017,30 +1753,38 @@ declare class TimelineComponent {
|
|
|
1017
1753
|
isHeaderActionVisible(action: TimelineAction): boolean;
|
|
1018
1754
|
isHeaderActionDisabled(action: TimelineAction): boolean;
|
|
1019
1755
|
getItemActionLabel(action: TimelineItemAction, item: TimelineItem): string;
|
|
1020
|
-
getItemActionIconName(action: TimelineItemAction, item: TimelineItem):
|
|
1756
|
+
getItemActionIconName(action: TimelineItemAction, item: TimelineItem): any;
|
|
1021
1757
|
getItemActionClass(action: TimelineItemAction, item: TimelineItem): string;
|
|
1022
1758
|
isItemActionVisible(action: TimelineItemAction, item: TimelineItem): boolean;
|
|
1023
1759
|
isItemActionDisabled(action: TimelineItemAction, item: TimelineItem): boolean;
|
|
1024
1760
|
getSubItemActionLabel(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): string;
|
|
1025
|
-
getSubItemActionIconName(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem):
|
|
1761
|
+
getSubItemActionIconName(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): any;
|
|
1026
1762
|
isSubItemActionVisible(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): boolean;
|
|
1027
1763
|
isSubItemActionDisabled(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): boolean;
|
|
1028
1764
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TimelineComponent, never>;
|
|
1029
1765
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TimelineComponent, "shk-timeline", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "showLine": { "alias": "showLine"; "required": false; "isSignal": true; }; "markerSize": { "alias": "markerSize"; "required": false; "isSignal": true; }; "markerGradients": { "alias": "markerGradients"; "required": false; "isSignal": true; }; "showOpposite": { "alias": "showOpposite"; "required": false; "isSignal": true; }; "showDescription": { "alias": "showDescription"; "required": false; "isSignal": true; }; "showSubItemMeta": { "alias": "showSubItemMeta"; "required": false; "isSignal": true; }; "showSubItemPrice": { "alias": "showSubItemPrice"; "required": false; "isSignal": true; }; "showSubItemCount": { "alias": "showSubItemCount"; "required": false; "isSignal": true; }; "subItemCountLabel": { "alias": "subItemCountLabel"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "headerTitle": { "alias": "headerTitle"; "required": false; "isSignal": true; }; "showAddItem": { "alias": "showAddItem"; "required": false; "isSignal": true; }; "addItemLabel": { "alias": "addItemLabel"; "required": false; "isSignal": true; }; "addItemIcon": { "alias": "addItemIcon"; "required": false; "isSignal": true; }; "addItemTooltip": { "alias": "addItemTooltip"; "required": false; "isSignal": true; }; "headerActions": { "alias": "headerActions"; "required": false; "isSignal": true; }; "showAddSubItem": { "alias": "showAddSubItem"; "required": false; "isSignal": true; }; "addSubItemLabel": { "alias": "addSubItemLabel"; "required": false; "isSignal": true; }; "addSubItemTooltip": { "alias": "addSubItemTooltip"; "required": false; "isSignal": true; }; "itemActions": { "alias": "itemActions"; "required": false; "isSignal": true; }; "subItemActions": { "alias": "subItemActions"; "required": false; "isSignal": true; }; "iconMap": { "alias": "iconMap"; "required": false; "isSignal": true; }; "iconColors": { "alias": "iconColors"; "required": false; "isSignal": true; }; "fallbackIcon": { "alias": "fallbackIcon"; "required": false; "isSignal": true; }; "showEmptyState": { "alias": "showEmptyState"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "emptyIcon": { "alias": "emptyIcon"; "required": false; "isSignal": true; }; "editTooltip": { "alias": "editTooltip"; "required": false; "isSignal": true; }; "deleteTooltip": { "alias": "deleteTooltip"; "required": false; "isSignal": true; }; "optionalLabel": { "alias": "optionalLabel"; "required": false; "isSignal": true; }; "noSubItemsMessage": { "alias": "noSubItemsMessage"; "required": false; "isSignal": true; }; "customTemplates": { "alias": "customTemplates"; "required": false; "isSignal": true; }; }, { "addItem": "addItem"; "addSubItem": "addSubItem"; "itemClick": "itemClick"; "subItemClick": "subItemClick"; }, never, never, true, never>;
|
|
1030
1766
|
}
|
|
1031
1767
|
|
|
1032
|
-
declare function getIcon$1(name: string): any;
|
|
1033
1768
|
/** An action button rendered on the right side of the fieldset header. */
|
|
1034
1769
|
interface FieldsetHeaderAction {
|
|
1035
1770
|
label: string;
|
|
1036
|
-
icon: string;
|
|
1771
|
+
icon: string | any;
|
|
1037
1772
|
onClick: () => void;
|
|
1038
1773
|
class?: string;
|
|
1039
1774
|
isVisible?: () => boolean;
|
|
1040
1775
|
isDisabled?: () => boolean;
|
|
1041
1776
|
}
|
|
1777
|
+
/**
|
|
1778
|
+
* Shirkasoft UI Components.
|
|
1779
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1780
|
+
* Belongs to Shirkasoft.
|
|
1781
|
+
*/
|
|
1782
|
+
/**
|
|
1783
|
+
* Collapsible content group with a legend header, optional leading icon,
|
|
1784
|
+
* badge and action buttons on the right side.
|
|
1785
|
+
*/
|
|
1042
1786
|
declare class FieldsetComponent {
|
|
1043
|
-
protected getIcon:
|
|
1787
|
+
protected getIcon: (name: any) => any;
|
|
1044
1788
|
/** Title shown in the header. */
|
|
1045
1789
|
legend: _angular_core.InputSignal<string>;
|
|
1046
1790
|
/** Collapsed state (default: collapsed). Two-way bindable with [(collapsed)]. */
|
|
@@ -1050,7 +1794,7 @@ declare class FieldsetComponent {
|
|
|
1050
1794
|
/** Shows the expand/collapse icon button. */
|
|
1051
1795
|
showToggleIcon: _angular_core.InputSignal<boolean>;
|
|
1052
1796
|
/** Optional leading icon shown next to the legend. */
|
|
1053
|
-
icon: _angular_core.InputSignal<
|
|
1797
|
+
icon: _angular_core.InputSignal<any>;
|
|
1054
1798
|
/** Optional badge/count shown after the legend. */
|
|
1055
1799
|
badge: _angular_core.InputSignal<string | number>;
|
|
1056
1800
|
/** CSS classes for the badge (override). */
|
|
@@ -1065,22 +1809,30 @@ declare class FieldsetComponent {
|
|
|
1065
1809
|
customTemplates: _angular_core.InputSignal<{
|
|
1066
1810
|
[key: string]: any;
|
|
1067
1811
|
}>;
|
|
1812
|
+
/** CSS classes for the extra shadow styling of the panel. */
|
|
1068
1813
|
hasShadow: _angular_core.InputSignal<boolean>;
|
|
1814
|
+
/** Accessible label for the expand action. */
|
|
1069
1815
|
expandLabel: _angular_core.InputSignal<string>;
|
|
1816
|
+
/** Accessible label for the collapse action. */
|
|
1070
1817
|
collapseLabel: _angular_core.InputSignal<string>;
|
|
1071
1818
|
/** Emits the new expanded state when toggled. */
|
|
1072
1819
|
toggle: _angular_core.OutputEmitterRef<boolean>;
|
|
1820
|
+
/** Emitted when the fieldset is expanded. */
|
|
1073
1821
|
expand: _angular_core.OutputEmitterRef<void>;
|
|
1822
|
+
/** Emitted when the fieldset is collapsed. */
|
|
1074
1823
|
collapse: _angular_core.OutputEmitterRef<void>;
|
|
1824
|
+
/** Stable id linking the header button and the content region. */
|
|
1075
1825
|
contentId: string;
|
|
1826
|
+
/** Toggles the collapsed state and emits the new state (unless not toggleable). */
|
|
1076
1827
|
onToggle(): void;
|
|
1828
|
+
/** Whether a header action can be rendered. */
|
|
1077
1829
|
isHeaderActionVisible(action: FieldsetHeaderAction): boolean;
|
|
1830
|
+
/** Whether a header action should be disabled. */
|
|
1078
1831
|
isHeaderActionDisabled(action: FieldsetHeaderAction): boolean;
|
|
1079
1832
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FieldsetComponent, never>;
|
|
1080
1833
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FieldsetComponent, "shk-fieldset", never, { "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "showToggleIcon": { "alias": "showToggleIcon"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "badgeClass": { "alias": "badgeClass"; "required": false; "isSignal": true; }; "collapsedIcon": { "alias": "collapsedIcon"; "required": false; "isSignal": true; }; "expandedIcon": { "alias": "expandedIcon"; "required": false; "isSignal": true; }; "headerActions": { "alias": "headerActions"; "required": false; "isSignal": true; }; "customTemplates": { "alias": "customTemplates"; "required": false; "isSignal": true; }; "hasShadow": { "alias": "hasShadow"; "required": false; "isSignal": true; }; "expandLabel": { "alias": "expandLabel"; "required": false; "isSignal": true; }; "collapseLabel": { "alias": "collapseLabel"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; "toggle": "toggle"; "expand": "expand"; "collapse": "collapse"; }, never, ["*"], true, never>;
|
|
1081
1834
|
}
|
|
1082
1835
|
|
|
1083
|
-
declare function getIcon(name: string): any;
|
|
1084
1836
|
/** A step of the wizard shown in the stepper. */
|
|
1085
1837
|
interface WizardStep {
|
|
1086
1838
|
id: string | number;
|
|
@@ -1100,8 +1852,17 @@ declare class ShkWizardStepContent {
|
|
|
1100
1852
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShkWizardStepContent, never>;
|
|
1101
1853
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ShkWizardStepContent, "ng-template[shkWizardStepContent]", never, { "stepId": { "alias": "shkWizardStepContent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1102
1854
|
}
|
|
1855
|
+
/**
|
|
1856
|
+
* Shirkasoft UI Components.
|
|
1857
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1858
|
+
* Belongs to Shirkasoft.
|
|
1859
|
+
*/
|
|
1860
|
+
/**
|
|
1861
|
+
* Multi-step wizard with a progress stepper, header, footer actions and
|
|
1862
|
+
* content templates declared with `shkWizardStepContent`.
|
|
1863
|
+
*/
|
|
1103
1864
|
declare class WizardComponent {
|
|
1104
|
-
protected getIcon:
|
|
1865
|
+
protected getIcon: (name: any) => any;
|
|
1105
1866
|
/** Steps definition shown in the stepper and used to resolve step content. */
|
|
1106
1867
|
steps: _angular_core.InputSignal<WizardStep[]>;
|
|
1107
1868
|
/** Active step id. Two-way bindable with [(currentStep)]. Null resolves to the first step. */
|
|
@@ -1170,6 +1931,11 @@ declare class WizardComponent {
|
|
|
1170
1931
|
|
|
1171
1932
|
type SkeletonShape = 'rectangle' | 'circle';
|
|
1172
1933
|
type SkeletonAnimation = 'wave' | 'pulse' | 'none';
|
|
1934
|
+
/**
|
|
1935
|
+
* Shirkasoft UI Components.
|
|
1936
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1937
|
+
* Belongs to Shirkasoft.
|
|
1938
|
+
*/
|
|
1173
1939
|
/** Placeholder block shown while content is loading. */
|
|
1174
1940
|
declare class SkeletonComponent {
|
|
1175
1941
|
/** Shape of the skeleton: rectangle (default) or circle. */
|
|
@@ -1198,12 +1964,17 @@ declare class SkeletonComponent {
|
|
|
1198
1964
|
type ButtonSeverity = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'help' | 'contrast';
|
|
1199
1965
|
type ButtonSize = 'small' | 'large';
|
|
1200
1966
|
type ButtonIconPosition = 'left' | 'right' | 'top' | 'bottom';
|
|
1967
|
+
/**
|
|
1968
|
+
* Shirkasoft UI Components.
|
|
1969
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
1970
|
+
* Belongs to Shirkasoft.
|
|
1971
|
+
*/
|
|
1201
1972
|
/** Generic button with icon, severity variants, loading state and sizes. */
|
|
1202
1973
|
declare class ButtonComponent {
|
|
1203
1974
|
/** Text shown inside the button. */
|
|
1204
1975
|
label: _angular_core.InputSignal<string>;
|
|
1205
|
-
/** Optional leading lucide icon name. */
|
|
1206
|
-
icon: _angular_core.InputSignal<
|
|
1976
|
+
/** Optional leading lucide icon name or component. */
|
|
1977
|
+
icon: _angular_core.InputSignal<any>;
|
|
1207
1978
|
/** Position of the icon relative to the label. */
|
|
1208
1979
|
iconPos: _angular_core.InputSignal<ButtonIconPosition>;
|
|
1209
1980
|
/** Color variant. Defaults to 'primary'. */
|
|
@@ -1238,12 +2009,17 @@ declare class ButtonComponent {
|
|
|
1238
2009
|
styleClass: _angular_core.InputSignal<string>;
|
|
1239
2010
|
/** Emitted on click with the original MouseEvent. */
|
|
1240
2011
|
onClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
1241
|
-
protected getIcon: typeof getIcon
|
|
2012
|
+
protected getIcon: typeof getIcon;
|
|
1242
2013
|
protected iconOnly: _angular_core.Signal<boolean>;
|
|
1243
2014
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
1244
2015
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "shk-button", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPos": { "alias": "iconPos"; "required": false; "isSignal": true; }; "severity": { "alias": "severity"; "required": false; "isSignal": true; }; "outlined": { "alias": "outlined"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "raised": { "alias": "raised"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingIcon": { "alias": "loadingIcon"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; }, never, ["*"], true, never>;
|
|
1245
2016
|
}
|
|
1246
2017
|
|
|
2018
|
+
/**
|
|
2019
|
+
* Shirkasoft UI Components.
|
|
2020
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2021
|
+
* Belongs to Shirkasoft.
|
|
2022
|
+
*/
|
|
1247
2023
|
/** SVG radial knob with drag and keyboard support. Implements ControlValueAccessor. */
|
|
1248
2024
|
declare class KnobComponent implements ControlValueAccessor {
|
|
1249
2025
|
/** Current value. Two-way bindable with [(value)]. */
|
|
@@ -1303,6 +2079,11 @@ declare class KnobComponent implements ControlValueAccessor {
|
|
|
1303
2079
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KnobComponent, "shk-knob", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "valueColor": { "alias": "valueColor"; "required": false; "isSignal": true; }; "rangeColor": { "alias": "rangeColor"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "change": "change"; "end": "end"; }, never, never, true, never>;
|
|
1304
2080
|
}
|
|
1305
2081
|
|
|
2082
|
+
/**
|
|
2083
|
+
* Shirkasoft UI Components.
|
|
2084
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2085
|
+
* Belongs to Shirkasoft.
|
|
2086
|
+
*/
|
|
1306
2087
|
/** Circular indeterminate spinner. */
|
|
1307
2088
|
declare class LoadingSpinnerComponent {
|
|
1308
2089
|
/** Diameter of the spinner. */
|
|
@@ -1317,6 +2098,11 @@ declare class LoadingSpinnerComponent {
|
|
|
1317
2098
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LoadingSpinnerComponent, "shk-loading-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "thickness": { "alias": "thickness"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1318
2099
|
}
|
|
1319
2100
|
|
|
2101
|
+
/**
|
|
2102
|
+
* Shirkasoft UI Components.
|
|
2103
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2104
|
+
* Belongs to Shirkasoft.
|
|
2105
|
+
*/
|
|
1320
2106
|
/** Progress bar with an indeterminate sweep or a determinate percentage. */
|
|
1321
2107
|
declare class LoadingBarComponent {
|
|
1322
2108
|
/** Height of the bar. */
|
|
@@ -1329,6 +2115,7 @@ declare class LoadingBarComponent {
|
|
|
1329
2115
|
color: _angular_core.InputSignal<string>;
|
|
1330
2116
|
/** Renders fully rounded ends. */
|
|
1331
2117
|
rounded: _angular_core.InputSignal<boolean>;
|
|
2118
|
+
/** Fill width/style for the determinate mode, empty for indeterminate. */
|
|
1332
2119
|
protected fillStyle: _angular_core.Signal<{
|
|
1333
2120
|
width?: undefined;
|
|
1334
2121
|
} | {
|
|
@@ -1338,7 +2125,13 @@ declare class LoadingBarComponent {
|
|
|
1338
2125
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LoadingBarComponent, "shk-loading-bar", never, { "height": { "alias": "height"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "progress": { "alias": "progress"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1339
2126
|
}
|
|
1340
2127
|
|
|
2128
|
+
/** Backdrop style behind the overlay: none, light or dark. */
|
|
1341
2129
|
type LoadingOverlayBackdrop = 'transparent' | 'light' | 'dark';
|
|
2130
|
+
/**
|
|
2131
|
+
* Shirkasoft UI Components.
|
|
2132
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2133
|
+
* Belongs to Shirkasoft.
|
|
2134
|
+
*/
|
|
1342
2135
|
/** Wraps content and shows a centered spinner over it while `visible` is true. */
|
|
1343
2136
|
declare class LoadingOverlayComponent {
|
|
1344
2137
|
/** Controls whether the spinner layer is shown. */
|
|
@@ -1355,6 +2148,11 @@ declare class LoadingOverlayComponent {
|
|
|
1355
2148
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LoadingOverlayComponent, "shk-loading-overlay", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "spinnerSize": { "alias": "spinnerSize"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "backdrop": { "alias": "backdrop"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1356
2149
|
}
|
|
1357
2150
|
|
|
2151
|
+
/**
|
|
2152
|
+
* Shirkasoft UI Components.
|
|
2153
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2154
|
+
* Belongs to Shirkasoft.
|
|
2155
|
+
*/
|
|
1358
2156
|
/** Bouncing dots loading indicator. */
|
|
1359
2157
|
declare class LoadingDotsComponent {
|
|
1360
2158
|
/** Diameter of each dot. */
|
|
@@ -1365,31 +2163,50 @@ declare class LoadingDotsComponent {
|
|
|
1365
2163
|
count: _angular_core.InputSignal<number>;
|
|
1366
2164
|
/** Optional text shown next to the dots. */
|
|
1367
2165
|
label: _angular_core.InputSignal<string>;
|
|
2166
|
+
/** Array of dot indices to render based on the `count` input. */
|
|
1368
2167
|
protected dots: _angular_core.Signal<unknown[]>;
|
|
1369
2168
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LoadingDotsComponent, never>;
|
|
1370
2169
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LoadingDotsComponent, "shk-loading-dots", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1371
2170
|
}
|
|
1372
2171
|
|
|
1373
|
-
/**
|
|
2172
|
+
/**
|
|
2173
|
+
* Shirkasoft UI Components.
|
|
2174
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2175
|
+
* Belongs to Shirkasoft.
|
|
2176
|
+
*/
|
|
2177
|
+
/** Shared state between shk-abs and its tab/tabpanel children. */
|
|
1374
2178
|
declare class TabsService {
|
|
2179
|
+
/** Currently active tab value. */
|
|
1375
2180
|
readonly active: _angular_core.WritableSignal<any>;
|
|
2181
|
+
/** Sets the active tab to the given value. */
|
|
1376
2182
|
select(value: any): void;
|
|
1377
2183
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabsService, never>;
|
|
1378
2184
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TabsService>;
|
|
1379
2185
|
}
|
|
1380
2186
|
|
|
2187
|
+
/**
|
|
2188
|
+
* Shirkasoft UI Components.
|
|
2189
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2190
|
+
* Belongs to Shirkasoft.
|
|
2191
|
+
*/
|
|
1381
2192
|
/** Container for tab panels. Renders its projected shk-tablist/shh-tab content. */
|
|
1382
2193
|
declare class TabsComponent {
|
|
1383
2194
|
/** Currently active tab value. Two-way bindable with [(value)]. */
|
|
1384
2195
|
value: _angular_core.ModelSignal<any>;
|
|
1385
2196
|
/** Allows the tab header to scroll horizontally when it overflows. */
|
|
1386
2197
|
scrollable: _angular_core.InputSignal<boolean>;
|
|
2198
|
+
/** Shared service used to sync the active tab with the children. */
|
|
1387
2199
|
protected tabsSvc: TabsService;
|
|
1388
2200
|
constructor();
|
|
1389
2201
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabsComponent, never>;
|
|
1390
2202
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabsComponent, "shk-tabs", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, ["*"], true, never>;
|
|
1391
2203
|
}
|
|
1392
2204
|
|
|
2205
|
+
/**
|
|
2206
|
+
* Shirkasoft UI Components.
|
|
2207
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2208
|
+
* Belongs to Shirkasoft.
|
|
2209
|
+
*/
|
|
1393
2210
|
/** Horizontal bar that contains the shk-tab headers. */
|
|
1394
2211
|
declare class TablistComponent {
|
|
1395
2212
|
/** Allows the header to scroll horizontally when it overflows. */
|
|
@@ -1400,6 +2217,11 @@ declare class TablistComponent {
|
|
|
1400
2217
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TablistComponent, "shk-tablist", never, { "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1401
2218
|
}
|
|
1402
2219
|
|
|
2220
|
+
/**
|
|
2221
|
+
* Shirkasoft UI Components.
|
|
2222
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2223
|
+
* Belongs to Shirkasoft.
|
|
2224
|
+
*/
|
|
1403
2225
|
/** A single tab header. Clicking it activates the matching panel. */
|
|
1404
2226
|
declare class TabComponent {
|
|
1405
2227
|
/** Value that links this tab to its panel. */
|
|
@@ -1408,54 +2230,101 @@ declare class TabComponent {
|
|
|
1408
2230
|
disabled: _angular_core.InputSignal<boolean>;
|
|
1409
2231
|
/** Extra CSS classes. */
|
|
1410
2232
|
styleClass: _angular_core.InputSignal<string>;
|
|
2233
|
+
/** Shared service used to read the active tab value. */
|
|
1411
2234
|
protected tabsSvc: TabsService;
|
|
2235
|
+
/** Whether this tab is the active one. */
|
|
1412
2236
|
protected active: _angular_core.Signal<boolean>;
|
|
2237
|
+
/** Activates this tab through the shared service. */
|
|
1413
2238
|
select(): void;
|
|
1414
2239
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabComponent, never>;
|
|
1415
2240
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabComponent, "shk-tab", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1416
2241
|
}
|
|
1417
2242
|
|
|
2243
|
+
/**
|
|
2244
|
+
* Shirkasoft UI Components.
|
|
2245
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2246
|
+
* Belongs to Shirkasoft.
|
|
2247
|
+
*/
|
|
1418
2248
|
/** Container that groups the shk-tabpanel content sections. */
|
|
1419
2249
|
declare class TabpanelsComponent {
|
|
1420
2250
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabpanelsComponent, never>;
|
|
1421
2251
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabpanelsComponent, "shk-tabpanels", never, {}, {}, never, ["*"], true, never>;
|
|
1422
2252
|
}
|
|
1423
2253
|
|
|
2254
|
+
/**
|
|
2255
|
+
* Shirkasoft UI Components.
|
|
2256
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2257
|
+
* Belongs to Shirkasoft.
|
|
2258
|
+
*/
|
|
1424
2259
|
/** Content section shown only while its value is the active tab. */
|
|
1425
2260
|
declare class TabPanelComponent {
|
|
1426
2261
|
/** Value that links this panel to its tab. */
|
|
1427
2262
|
value: _angular_core.InputSignal<any>;
|
|
2263
|
+
/** Shared service used to read the active tab value. */
|
|
1428
2264
|
protected tabsSvc: TabsService;
|
|
2265
|
+
/** Whether this panel is the active one. */
|
|
1429
2266
|
protected active: _angular_core.Signal<boolean>;
|
|
1430
2267
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabPanelComponent, never>;
|
|
1431
2268
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabPanelComponent, "shk-tabpanel", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1432
2269
|
}
|
|
1433
2270
|
|
|
2271
|
+
/**
|
|
2272
|
+
* Shirkasoft UI Components.
|
|
2273
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2274
|
+
* Belongs to Shirkasoft.
|
|
2275
|
+
*/
|
|
2276
|
+
/** A single breadcrumb entry with an optional navigation route. */
|
|
1434
2277
|
interface BreadcrumbItem {
|
|
1435
2278
|
label: string;
|
|
1436
2279
|
route?: string;
|
|
1437
2280
|
}
|
|
2281
|
+
/**
|
|
2282
|
+
* Global breadcrumb state. Components and pages write the current trail via
|
|
2283
|
+
* `set()` and observatories read it through `breadcrumbs$`.
|
|
2284
|
+
*/
|
|
1438
2285
|
declare class BreadcrumbService {
|
|
2286
|
+
/** Internal buffer holding the current breadcrumb trail. */
|
|
1439
2287
|
private breadcrumbsSubject;
|
|
2288
|
+
/** Observable emitted with the latest breadcrumb trail. */
|
|
1440
2289
|
breadcrumbs$: Observable<BreadcrumbItem[]>;
|
|
2290
|
+
/** Replaces the whole breadcrumb trail. */
|
|
1441
2291
|
set(items: BreadcrumbItem[]): void;
|
|
2292
|
+
/** Empties the breadcrumb trail. */
|
|
1442
2293
|
clear(): void;
|
|
2294
|
+
/** Returns the breadcrumb trail currently held (snapshot). */
|
|
1443
2295
|
getCurrent(): BreadcrumbItem[];
|
|
1444
2296
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbService, never>;
|
|
1445
2297
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<BreadcrumbService>;
|
|
1446
2298
|
}
|
|
1447
2299
|
|
|
1448
2300
|
type BreadcrumbSeparator = 'chevron' | 'slash' | 'arrow';
|
|
2301
|
+
/**
|
|
2302
|
+
* Shirkasoft UI Components.
|
|
2303
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
2304
|
+
* Belongs to Shirkasoft.
|
|
2305
|
+
*/
|
|
2306
|
+
/**
|
|
2307
|
+
* Navigation breadcrumb showing the current page hierarchy. Can be fed with
|
|
2308
|
+
* static items or driven by the shared BreadcrumbService.
|
|
2309
|
+
*/
|
|
1449
2310
|
declare class BreadcrumbComponent implements OnInit, OnDestroy {
|
|
1450
2311
|
private readonly breadcrumbService;
|
|
2312
|
+
/** Static list of breadcrumb items. Takes precedence over the service items. */
|
|
1451
2313
|
items: _angular_core.InputSignal<BreadcrumbItem[]>;
|
|
2314
|
+
/** Visual separator between items: 'chevron', 'slash' or 'arrow'. */
|
|
1452
2315
|
separator: _angular_core.InputSignal<BreadcrumbSeparator>;
|
|
2316
|
+
/** When true, subscribes to the BreadcrumbService to resolve items. */
|
|
1453
2317
|
useService: _angular_core.InputSignal<boolean>;
|
|
2318
|
+
/** Items received from the BreadcrumbService. */
|
|
1454
2319
|
protected serviceItems: _angular_core.WritableSignal<BreadcrumbItem[]>;
|
|
2320
|
+
/** Final items: static `items` if provided, otherwise the service items. */
|
|
1455
2321
|
protected resolvedItems: _angular_core.Signal<BreadcrumbItem[]>;
|
|
2322
|
+
/** Active subscription to the breadcrumb stream. */
|
|
1456
2323
|
private serviceSub;
|
|
1457
2324
|
constructor();
|
|
2325
|
+
/** Subscribes to the BreadcrumbService when `useService` is enabled. */
|
|
1458
2326
|
ngOnInit(): void;
|
|
2327
|
+
/** Unsubscribes from the breadcrumb stream to avoid leaks. */
|
|
1459
2328
|
ngOnDestroy(): void;
|
|
1460
2329
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbComponent, never>;
|
|
1461
2330
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BreadcrumbComponent, "shk-breadcrumb", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "useService": { "alias": "useService"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|