@thalassic/ui 0.9.0 → 0.10.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.
- package/fesm2022/thalassic-ui.mjs +645 -112
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/thalassic-ui.d.ts +281 -56
package/package.json
CHANGED
package/types/thalassic-ui.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InputSignal, InputSignalWithTransform, InjectionToken,
|
|
2
|
+
import { InputSignal, InputSignalWithTransform, InjectionToken, Signal, TemplateRef, ModelSignal, WritableSignal, ElementRef, OutputEmitterRef, TrackByFunction, OnDestroy, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as _thalassic_ui from '@thalassic/ui';
|
|
4
|
+
import { FormUiControl, WithOptionalFieldTree, ValidationError, FormCheckboxControl, FormValueControl, FieldTree } from '@angular/forms/signals';
|
|
4
5
|
import { CdkDialogContainer, DialogRole, DialogRef } from '@angular/cdk/dialog';
|
|
5
6
|
import { ComponentType } from '@angular/cdk/portal';
|
|
6
|
-
import { FieldTree, FormUiControl, WithOptionalFieldTree, ValidationError, FormCheckboxControl, FormValueControl } from '@angular/forms/signals';
|
|
7
7
|
import { Day } from 'date-fns';
|
|
8
8
|
import { SafeHtml } from '@angular/platform-browser';
|
|
9
9
|
import { Point } from '@thalassic/core';
|
|
@@ -24,22 +24,33 @@ interface tlsUiConfigProvider {
|
|
|
24
24
|
components: {
|
|
25
25
|
alert?: Partial<AlertConfig>;
|
|
26
26
|
button?: Partial<ButtonConfig>;
|
|
27
|
+
checkbox?: Partial<CheckboxConfig>;
|
|
28
|
+
chip?: Partial<ChipConfig>;
|
|
29
|
+
chipControl?: Partial<ChipControlConfig>;
|
|
30
|
+
chipInput?: Partial<ChipInputConfig>;
|
|
27
31
|
dateTimePicker?: Partial<DateTimePickerConfig>;
|
|
28
32
|
dialog?: Partial<DialogConfig>;
|
|
29
33
|
divider?: Partial<DividerConfig>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
select?: Partial<SelectConfig>;
|
|
33
|
-
switch?: Partial<SwitchConfig>;
|
|
34
|
+
fileUploader?: Partial<FileUploaderConfig>;
|
|
35
|
+
formControlGroup?: Partial<FormControlGroupConfig>;
|
|
34
36
|
formItem?: Partial<FormItemConfig>;
|
|
35
37
|
icon?: Partial<IconConfig>;
|
|
38
|
+
input?: Partial<InputConfig>;
|
|
39
|
+
loader?: Partial<LoaderConfig>;
|
|
40
|
+
menu?: Partial<MenuConfig>;
|
|
36
41
|
pagination?: Partial<PaginationConfig>;
|
|
42
|
+
password?: Partial<PasswordConfig>;
|
|
43
|
+
pinInput?: Partial<PinInputConfig>;
|
|
37
44
|
popover?: Partial<PopoverConfig>;
|
|
45
|
+
radioButton?: Partial<RadioButtonConfig>;
|
|
46
|
+
select?: Partial<SelectConfig>;
|
|
38
47
|
skeleton?: Partial<SkeletonConfig>;
|
|
39
48
|
stepper?: Partial<StepperConfig>;
|
|
49
|
+
switch?: Partial<SwitchConfig>;
|
|
40
50
|
table?: Partial<TableConfig>;
|
|
41
51
|
tabs?: Partial<TabsConfig>;
|
|
42
52
|
textarea?: Partial<TextareaConfig>;
|
|
53
|
+
toggleGroup?: Partial<ToggleGroupConfig>;
|
|
43
54
|
tooltip?: Partial<TooltipConfig>;
|
|
44
55
|
};
|
|
45
56
|
}
|
|
@@ -89,6 +100,8 @@ declare abstract class ButtonBase {
|
|
|
89
100
|
|
|
90
101
|
declare class Button extends ButtonBase {
|
|
91
102
|
private _routerLink;
|
|
103
|
+
private _router;
|
|
104
|
+
private _locationStrategy;
|
|
92
105
|
protected APPLY_HOST_CLASSES: boolean;
|
|
93
106
|
/** The text label displayed inside the button. Takes priority over projected content. */
|
|
94
107
|
readonly label: InputSignal<string | undefined>;
|
|
@@ -96,7 +109,22 @@ declare class Button extends ButtonBase {
|
|
|
96
109
|
/** An optional URL that causes the button to render as an anchor link. */
|
|
97
110
|
readonly href: InputSignal<string | null>;
|
|
98
111
|
readonly tabindex: InputSignal<string>;
|
|
99
|
-
protected isLink:
|
|
112
|
+
protected isLink: Signal<boolean>;
|
|
113
|
+
/**
|
|
114
|
+
* Resolved URL placed on the inner anchor so the browser treats it as a real link
|
|
115
|
+
* (enables "Open in new tab", middle-click, status-bar preview, etc.). An explicit
|
|
116
|
+
* `href` wins; otherwise the URL is derived from the host `routerLink`.
|
|
117
|
+
*/
|
|
118
|
+
protected linkHref: Signal<string | null>;
|
|
119
|
+
/**
|
|
120
|
+
* Keeps navigation correct when the host carries a `routerLink` while the inner anchor
|
|
121
|
+
* exposes a real `href`:
|
|
122
|
+
* - modified / non-primary clicks bubble to the browser so it can open a new tab, and
|
|
123
|
+
* are stopped from reaching the host RouterLink to avoid a duplicate in-app navigation;
|
|
124
|
+
* - a plain left click defers to the host RouterLink for SPA navigation, so the anchor's
|
|
125
|
+
* own full-page navigation is prevented.
|
|
126
|
+
*/
|
|
127
|
+
protected onLinkClick(event: MouseEvent): void;
|
|
100
128
|
static ɵfac: i0.ɵɵFactoryDeclaration<Button, never>;
|
|
101
129
|
static ɵcmp: i0.ɵɵComponentDeclaration<Button, "tls-button", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
102
130
|
}
|
|
@@ -117,6 +145,107 @@ declare const DEFAULT_BUTTON_CONFIG: ButtonConfig;
|
|
|
117
145
|
|
|
118
146
|
declare const BUTTON_CONFIG: InjectionToken<ButtonConfig>;
|
|
119
147
|
|
|
148
|
+
type chipColor = color;
|
|
149
|
+
type chipVariant = 'filled' | 'outlined' | 'text';
|
|
150
|
+
interface ChipContext {
|
|
151
|
+
checked: boolean;
|
|
152
|
+
disabled: boolean;
|
|
153
|
+
readonly: boolean;
|
|
154
|
+
touched: boolean;
|
|
155
|
+
dirty: boolean;
|
|
156
|
+
invalid: boolean;
|
|
157
|
+
pending: boolean;
|
|
158
|
+
}
|
|
159
|
+
type chipTemplateContext = {
|
|
160
|
+
$implicit: ChipContext;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
declare class Chip {
|
|
164
|
+
private _config;
|
|
165
|
+
readonly label: InputSignal<string | undefined>;
|
|
166
|
+
readonly color: InputSignal<chipColor>;
|
|
167
|
+
readonly variant: InputSignal<chipVariant>;
|
|
168
|
+
readonly size: InputSignal<controlSize>;
|
|
169
|
+
readonly rounded: i0.InputSignalWithTransform<boolean, unknown>;
|
|
170
|
+
readonly icon: i0.InputSignalWithTransform<boolean, unknown>;
|
|
171
|
+
readonly context: i0.WritableSignal<ChipContext>;
|
|
172
|
+
protected readonly startIconTemplate: i0.Signal<TemplateRef<chipTemplateContext> | undefined>;
|
|
173
|
+
protected readonly endIconTemplate: i0.Signal<TemplateRef<chipTemplateContext> | undefined>;
|
|
174
|
+
protected classes: i0.Signal<string[]>;
|
|
175
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Chip, never>;
|
|
176
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Chip, "tls-chip", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, {}, ["startIconTemplate", "endIconTemplate"], ["*"], true, never>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
declare abstract class FormControl implements FormUiControl {
|
|
180
|
+
readonly touched: ModelSignal<boolean>;
|
|
181
|
+
readonly name: InputSignal<string>;
|
|
182
|
+
readonly disabled: InputSignalWithTransform<boolean, unknown>;
|
|
183
|
+
readonly readonly: InputSignalWithTransform<boolean, unknown>;
|
|
184
|
+
readonly hidden: InputSignalWithTransform<boolean, unknown>;
|
|
185
|
+
readonly invalid: InputSignalWithTransform<boolean, unknown>;
|
|
186
|
+
readonly pending: InputSignalWithTransform<boolean, unknown>;
|
|
187
|
+
readonly dirty: InputSignalWithTransform<boolean, unknown>;
|
|
188
|
+
readonly errors: InputSignal<readonly WithOptionalFieldTree<ValidationError>[]>;
|
|
189
|
+
readonly required: InputSignalWithTransform<boolean, unknown>;
|
|
190
|
+
protected CLASS_NAME: string;
|
|
191
|
+
protected notInteractive: Signal<boolean>;
|
|
192
|
+
protected controlClasses: Signal<string[]>;
|
|
193
|
+
protected baseControlClasses(): string[];
|
|
194
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormControl, never>;
|
|
195
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FormControl, never, never, { "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "pending": { "alias": "pending"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; }, { "touched": "touchedChange"; }, never, never, true, never>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
declare abstract class CheckboxFormControl extends FormControl implements FormCheckboxControl {
|
|
199
|
+
abstract readonly checked: ModelSignal<boolean>;
|
|
200
|
+
protected controlClasses: i0.Signal<string[]>;
|
|
201
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxFormControl, never>;
|
|
202
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxFormControl, never, never, {}, {}, never, never, true, never>;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
interface Option<V = unknown> {
|
|
206
|
+
value: V;
|
|
207
|
+
label: string;
|
|
208
|
+
disabled: boolean;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
type optionInput<T> = string | number | T;
|
|
212
|
+
|
|
213
|
+
declare abstract class ValueFormControl<T> extends FormControl implements FormValueControl<T> {
|
|
214
|
+
abstract readonly value: ModelSignal<T>;
|
|
215
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValueFormControl<any>, never>;
|
|
216
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ValueFormControl<any>, never, never, {}, {}, never, never, true, never>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
declare class ChipControl extends CheckboxFormControl {
|
|
220
|
+
protected CLASS_NAME: string;
|
|
221
|
+
private _config;
|
|
222
|
+
private _chip;
|
|
223
|
+
readonly checked: i0.ModelSignal<boolean>;
|
|
224
|
+
readonly checkedColor: i0.InputSignal<_thalassic_ui.color | undefined>;
|
|
225
|
+
protected hostClasses: i0.Signal<string[]>;
|
|
226
|
+
constructor();
|
|
227
|
+
protected toggle(): void;
|
|
228
|
+
protected onKeyboardToggle(event: Event): void;
|
|
229
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChipControl, never>;
|
|
230
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChipControl, "tls-chip[tlsChipControl]", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "checkedColor": { "alias": "checkedColor"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; }, never, never, true, never>;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
interface ChipConfig {
|
|
234
|
+
color: chipColor;
|
|
235
|
+
variant: chipVariant;
|
|
236
|
+
size: controlSize;
|
|
237
|
+
}
|
|
238
|
+
declare const DEFAULT_CHIP_CONFIG: ChipConfig;
|
|
239
|
+
|
|
240
|
+
declare const CHIP_CONFIG: InjectionToken<ChipConfig>;
|
|
241
|
+
|
|
242
|
+
interface ChipControlConfig {
|
|
243
|
+
checkedColor: chipColor | undefined;
|
|
244
|
+
}
|
|
245
|
+
declare const DEFAULT_CHIP_CONTROL_CONFIG: ChipControlConfig;
|
|
246
|
+
|
|
247
|
+
declare const CHIP_CONTROL_CONFIG: InjectionToken<ChipControlConfig>;
|
|
248
|
+
|
|
120
249
|
type dialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'wide' | 'full';
|
|
121
250
|
|
|
122
251
|
interface DialogConfig {
|
|
@@ -182,6 +311,28 @@ declare const DEFAULT_DIVIDER_CONFIG: DividerConfig;
|
|
|
182
311
|
|
|
183
312
|
declare const DIVIDER_CONFIG: InjectionToken<DividerConfig>;
|
|
184
313
|
|
|
314
|
+
declare class FormControlAddon {
|
|
315
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormControlAddon, never>;
|
|
316
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormControlAddon, "tls-form-control-addon", never, {}, {}, never, ["*"], true, never>;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
declare class FormControlGroup {
|
|
320
|
+
private _config;
|
|
321
|
+
readonly size: InputSignal<controlSize>;
|
|
322
|
+
readonly fluid: InputSignalWithTransform<boolean, unknown>;
|
|
323
|
+
protected readonly hostClasses: Signal<string[]>;
|
|
324
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormControlGroup, never>;
|
|
325
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormControlGroup, "tls-form-control-group", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
interface FormControlGroupConfig {
|
|
329
|
+
size: controlSize;
|
|
330
|
+
fluid: boolean;
|
|
331
|
+
}
|
|
332
|
+
declare const DEFAULT_FORM_CONTROL_GROUP_CONFIG: FormControlGroupConfig;
|
|
333
|
+
|
|
334
|
+
declare const FORM_CONTROL_GROUP_CONFIG: InjectionToken<FormControlGroupConfig>;
|
|
335
|
+
|
|
185
336
|
type ErrorMessageFn = (fieldTree?: FieldTree<unknown>) => string;
|
|
186
337
|
type ErrorMessageMap = Record<string, ErrorMessageFn>;
|
|
187
338
|
|
|
@@ -192,38 +343,6 @@ interface FormItemConfig {
|
|
|
192
343
|
}
|
|
193
344
|
declare const DEFAULT_FORM_ITEM_CONFIG: FormItemConfig;
|
|
194
345
|
|
|
195
|
-
declare abstract class FormControl implements FormUiControl {
|
|
196
|
-
readonly touched: ModelSignal<boolean>;
|
|
197
|
-
readonly name: InputSignal<string>;
|
|
198
|
-
readonly disabled: InputSignalWithTransform<boolean, unknown>;
|
|
199
|
-
readonly readonly: InputSignalWithTransform<boolean, unknown>;
|
|
200
|
-
readonly hidden: InputSignalWithTransform<boolean, unknown>;
|
|
201
|
-
readonly invalid: InputSignalWithTransform<boolean, unknown>;
|
|
202
|
-
readonly pending: InputSignalWithTransform<boolean, unknown>;
|
|
203
|
-
readonly dirty: InputSignalWithTransform<boolean, unknown>;
|
|
204
|
-
readonly errors: InputSignal<readonly WithOptionalFieldTree<ValidationError>[]>;
|
|
205
|
-
readonly required: InputSignalWithTransform<boolean, unknown>;
|
|
206
|
-
protected CLASS_NAME: string;
|
|
207
|
-
protected notInteractive: Signal<boolean>;
|
|
208
|
-
protected controlClasses: Signal<string[]>;
|
|
209
|
-
protected baseControlClasses(): string[];
|
|
210
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormControl, never>;
|
|
211
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FormControl, never, never, { "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "pending": { "alias": "pending"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; }, { "touched": "touchedChange"; }, never, never, true, never>;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
declare abstract class CheckboxFormControl extends FormControl implements FormCheckboxControl {
|
|
215
|
-
abstract readonly checked: ModelSignal<boolean>;
|
|
216
|
-
protected controlClasses: i0.Signal<string[]>;
|
|
217
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxFormControl, never>;
|
|
218
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxFormControl, never, never, {}, {}, never, never, true, never>;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
declare abstract class ValueFormControl<T> extends FormControl implements FormValueControl<T> {
|
|
222
|
-
abstract readonly value: ModelSignal<T>;
|
|
223
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ValueFormControl<any>, never>;
|
|
224
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ValueFormControl<any>, never, never, {}, {}, never, never, true, never>;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
346
|
declare class FormItem {
|
|
228
347
|
private _config;
|
|
229
348
|
protected control: Signal<FormControl | undefined>;
|
|
@@ -304,6 +423,81 @@ declare const DEFAULT_DATE_TIME_PICKER_CONFIG: DateTimePickerConfig;
|
|
|
304
423
|
|
|
305
424
|
declare const DATE_TIME_PICKER_CONFIG: InjectionToken<DateTimePickerConfig>;
|
|
306
425
|
|
|
426
|
+
declare class ChipInput extends ValueFormControl<string[]> {
|
|
427
|
+
private readonly _config;
|
|
428
|
+
readonly value: ModelSignal<string[]>;
|
|
429
|
+
readonly placeholder: InputSignal<string>;
|
|
430
|
+
readonly size: InputSignal<controlSize>;
|
|
431
|
+
readonly fluid: InputSignalWithTransform<boolean, unknown>;
|
|
432
|
+
readonly separator: InputSignal<string[]>;
|
|
433
|
+
protected readonly inputValue: i0.WritableSignal<string>;
|
|
434
|
+
protected readonly classes: Signal<string[]>;
|
|
435
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
436
|
+
protected removeChip(index: number): void;
|
|
437
|
+
private _addChip;
|
|
438
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChipInput, never>;
|
|
439
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChipInput, "tls-chip-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
interface ChipInputConfig {
|
|
443
|
+
size: controlSize;
|
|
444
|
+
placeholder: string;
|
|
445
|
+
fluid: boolean;
|
|
446
|
+
separator: string[];
|
|
447
|
+
}
|
|
448
|
+
declare const DEFAULT_CHIP_INPUT_CONFIG: ChipInputConfig;
|
|
449
|
+
|
|
450
|
+
declare const CHIP_INPUT_CONFIG: InjectionToken<ChipInputConfig>;
|
|
451
|
+
|
|
452
|
+
type acceptInput = string | string[];
|
|
453
|
+
type fileUploaderDragState = 'idle' | 'valid' | 'invalid';
|
|
454
|
+
interface FileUploaderDropZoneContext {
|
|
455
|
+
$implicit: fileUploaderDragState;
|
|
456
|
+
accept: string;
|
|
457
|
+
}
|
|
458
|
+
interface FileUploaderFileContext {
|
|
459
|
+
$implicit: File;
|
|
460
|
+
index: number;
|
|
461
|
+
remove: (index: number) => void;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
declare class FileUploader extends ValueFormControl<File[]> {
|
|
465
|
+
private readonly _config;
|
|
466
|
+
protected CLASS_NAME: string;
|
|
467
|
+
readonly value: ModelSignal<File[]>;
|
|
468
|
+
readonly multiple: InputSignalWithTransform<boolean, unknown>;
|
|
469
|
+
readonly accept: InputSignalWithTransform<string, acceptInput>;
|
|
470
|
+
readonly fluid: InputSignalWithTransform<boolean, unknown>;
|
|
471
|
+
protected readonly fileInput: Signal<ElementRef<HTMLInputElement>>;
|
|
472
|
+
protected readonly dragState: i0.WritableSignal<fileUploaderDragState>;
|
|
473
|
+
protected readonly dropZoneTemplate: Signal<TemplateRef<FileUploaderDropZoneContext> | undefined>;
|
|
474
|
+
protected readonly fileTemplate: Signal<TemplateRef<FileUploaderFileContext> | undefined>;
|
|
475
|
+
protected readonly classes: Signal<string[]>;
|
|
476
|
+
protected readonly acceptHint: Signal<string>;
|
|
477
|
+
protected openFilePicker(): void;
|
|
478
|
+
protected onFilesSelected(event: Event): void;
|
|
479
|
+
protected onDropZoneKeydown(event: KeyboardEvent): void;
|
|
480
|
+
protected onDragOver(event: DragEvent): void;
|
|
481
|
+
protected onDragLeave(): void;
|
|
482
|
+
protected onDrop(event: DragEvent): void;
|
|
483
|
+
protected readonly removeFile: (fileIndex: number) => void;
|
|
484
|
+
private _addFiles;
|
|
485
|
+
private _acceptsFile;
|
|
486
|
+
private _formatAcceptRule;
|
|
487
|
+
private _isTypeRejected;
|
|
488
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploader, never>;
|
|
489
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploader, "tls-file-uploader", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["dropZoneTemplate", "fileTemplate"], never, true, never>;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
interface FileUploaderConfig {
|
|
493
|
+
multiple: boolean;
|
|
494
|
+
accept: acceptInput;
|
|
495
|
+
fluid: boolean;
|
|
496
|
+
}
|
|
497
|
+
declare const DEFAULT_FILE_UPLOADER_CONFIG: FileUploaderConfig;
|
|
498
|
+
|
|
499
|
+
declare const FILE_UPLOADER_CONFIG: InjectionToken<FileUploaderConfig>;
|
|
500
|
+
|
|
307
501
|
declare class Input extends ValueFormControl<string> {
|
|
308
502
|
private _config;
|
|
309
503
|
readonly type: InputSignal<string>;
|
|
@@ -345,12 +539,13 @@ declare class Password extends ValueFormControl<string> {
|
|
|
345
539
|
readonly placeholder: InputSignal<string>;
|
|
346
540
|
readonly size: InputSignal<controlSize>;
|
|
347
541
|
readonly fluid: InputSignalWithTransform<boolean, unknown>;
|
|
348
|
-
protected readonly
|
|
349
|
-
protected
|
|
542
|
+
protected readonly showIconTemplate: i0.Signal<TemplateRef<unknown> | undefined>;
|
|
543
|
+
protected readonly hideIconTemplate: i0.Signal<TemplateRef<unknown> | undefined>;
|
|
544
|
+
protected type: i0.Signal<"text" | "password">;
|
|
350
545
|
protected onInput(event: Event): void;
|
|
351
546
|
protected toggle(): void;
|
|
352
547
|
static ɵfac: i0.ɵɵFactoryDeclaration<Password, never>;
|
|
353
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Password, "tls-password", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "visible": "visibleChange"; },
|
|
548
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Password, "tls-password", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "visible": "visibleChange"; }, ["showIconTemplate", "hideIconTemplate"], never, true, never>;
|
|
354
549
|
}
|
|
355
550
|
|
|
356
551
|
interface PasswordConfig {
|
|
@@ -417,13 +612,6 @@ declare class RadioButton extends ValueFormControl<unknown> {
|
|
|
417
612
|
static ɵcmp: i0.ɵɵComponentDeclaration<RadioButton, "tls-radio-button", never, { "radioValue": { "alias": "radioValue"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
418
613
|
}
|
|
419
614
|
|
|
420
|
-
type selectOptionType<T> = string | number | T;
|
|
421
|
-
|
|
422
|
-
interface NormalizedOption<V = unknown> {
|
|
423
|
-
value: V;
|
|
424
|
-
label: string;
|
|
425
|
-
disabled: boolean;
|
|
426
|
-
}
|
|
427
615
|
declare class Select<T, V = unknown> extends ValueFormControl<V | null> {
|
|
428
616
|
private readonly _config;
|
|
429
617
|
private readonly _overlay;
|
|
@@ -431,7 +619,7 @@ declare class Select<T, V = unknown> extends ValueFormControl<V | null> {
|
|
|
431
619
|
private readonly _panelTemplate;
|
|
432
620
|
readonly value: ModelSignal<V | null>;
|
|
433
621
|
readonly inputId: InputSignal<string | null>;
|
|
434
|
-
readonly options: InputSignal<
|
|
622
|
+
readonly options: InputSignal<optionInput<T>[]>;
|
|
435
623
|
readonly optionLabel: InputSignal<keyof T | undefined>;
|
|
436
624
|
readonly optionValue: InputSignal<keyof T | undefined>;
|
|
437
625
|
readonly optionDisabled: InputSignal<keyof T | undefined>;
|
|
@@ -442,14 +630,14 @@ declare class Select<T, V = unknown> extends ValueFormControl<V | null> {
|
|
|
442
630
|
readonly clearable: InputSignalWithTransform<boolean, unknown>;
|
|
443
631
|
protected readonly isOpen: Signal<boolean>;
|
|
444
632
|
protected readonly activeIndex: WritableSignal<number>;
|
|
445
|
-
protected readonly normalizedOptions: Signal<
|
|
633
|
+
protected readonly normalizedOptions: Signal<Option<V>[]>;
|
|
446
634
|
protected readonly hasValue: Signal<boolean>;
|
|
447
635
|
protected readonly selectedLabel: Signal<string>;
|
|
448
636
|
protected readonly hostClasses: Signal<string[]>;
|
|
449
637
|
protected open(): void;
|
|
450
638
|
protected close(): void;
|
|
451
639
|
protected toggle(): void;
|
|
452
|
-
protected select(option:
|
|
640
|
+
protected select(option: Option<V>): void;
|
|
453
641
|
protected clear(): void;
|
|
454
642
|
protected onOptionHover(index: number, disabled?: boolean): void;
|
|
455
643
|
protected onKeydown(event: KeyboardEvent): void;
|
|
@@ -518,6 +706,43 @@ declare class Textarea extends ValueFormControl<string> {
|
|
|
518
706
|
|
|
519
707
|
declare const TEXTAREA_CONFIG: InjectionToken<TextareaConfig>;
|
|
520
708
|
|
|
709
|
+
type toggleGroupType = 'single' | 'multiple';
|
|
710
|
+
|
|
711
|
+
declare class ToggleGroup<T, V = unknown> extends ValueFormControl<V[]> {
|
|
712
|
+
private readonly _config;
|
|
713
|
+
protected CLASS_NAME: string;
|
|
714
|
+
readonly value: ModelSignal<V[]>;
|
|
715
|
+
readonly options: InputSignal<optionInput<T>[]>;
|
|
716
|
+
readonly optionLabel: InputSignal<keyof T | undefined>;
|
|
717
|
+
readonly optionValue: InputSignal<keyof T | undefined>;
|
|
718
|
+
readonly optionDisabled: InputSignal<keyof T | undefined>;
|
|
719
|
+
readonly type: InputSignal<toggleGroupType>;
|
|
720
|
+
readonly unselectable: InputSignalWithTransform<boolean, unknown>;
|
|
721
|
+
readonly size: InputSignal<controlSize>;
|
|
722
|
+
readonly color: InputSignal<color>;
|
|
723
|
+
readonly orientation: InputSignal<orientation>;
|
|
724
|
+
protected readonly optionTemplate: Signal<TemplateRef<{
|
|
725
|
+
$implicit: Option<V>;
|
|
726
|
+
}> | undefined>;
|
|
727
|
+
protected readonly normalizedOptions: Signal<Option<V>[]>;
|
|
728
|
+
protected readonly classes: Signal<string[]>;
|
|
729
|
+
protected isSelected(optionValue: V): boolean;
|
|
730
|
+
protected select(option: Option<V>): void;
|
|
731
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToggleGroup<any, any>, never>;
|
|
732
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleGroup<any, any>, "tls-toggle-group", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "unselectable": { "alias": "unselectable"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["optionTemplate"], never, true, never>;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
interface ToggleGroupConfig {
|
|
736
|
+
size: controlSize;
|
|
737
|
+
color: color;
|
|
738
|
+
orientation: orientation;
|
|
739
|
+
type: toggleGroupType;
|
|
740
|
+
unselectable: boolean;
|
|
741
|
+
}
|
|
742
|
+
declare const DEFAULT_TOGGLE_GROUP_CONFIG: ToggleGroupConfig;
|
|
743
|
+
|
|
744
|
+
declare const TOGGLE_GROUP_CONFIG: InjectionToken<ToggleGroupConfig>;
|
|
745
|
+
|
|
521
746
|
declare class Icon {
|
|
522
747
|
private _iconService;
|
|
523
748
|
private _config;
|
|
@@ -738,7 +963,7 @@ declare const POPOVER_CONFIG: InjectionToken<PopoverConfig>;
|
|
|
738
963
|
|
|
739
964
|
declare class Skeleton {
|
|
740
965
|
private _config;
|
|
741
|
-
readonly size: InputSignal<number>;
|
|
966
|
+
readonly size: InputSignal<number | null>;
|
|
742
967
|
readonly width: InputSignal<number | null>;
|
|
743
968
|
readonly height: InputSignal<number | null>;
|
|
744
969
|
readonly radius: InputSignal<number>;
|
|
@@ -757,7 +982,7 @@ declare class Skeleton {
|
|
|
757
982
|
}
|
|
758
983
|
|
|
759
984
|
interface SkeletonConfig {
|
|
760
|
-
size: number;
|
|
985
|
+
size: number | null;
|
|
761
986
|
width: number | null;
|
|
762
987
|
height: number | null;
|
|
763
988
|
radius: number;
|
|
@@ -955,5 +1180,5 @@ declare const TOOLTIP_CONFIG: InjectionToken<TooltipConfig>;
|
|
|
955
1180
|
|
|
956
1181
|
declare const provideThalassicUIConfig: (config: tlsUiConfigProvider) => EnvironmentProviders;
|
|
957
1182
|
|
|
958
|
-
export { ALERT_CONFIG, Alert, BUTTON_CONFIG, Button, ButtonDirective, CHECKBOX_CONFIG, Checkbox, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_ICON_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_MENU_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOOLTIP_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DateTimePicker, Dialog, DialogService, Divider, FORM_ITEM_CONFIG, FormItem, ICON_CONFIG, INPUT_CONFIG, Icon, Input, InputDirective, LOADER_CONFIG, Loader, MENU_CONFIG, Menu, MenuItemComponent, MenuTriggerDirective, PAGINATION_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, Pagination, Password, PinInput, Popover, RADIO_BUTTON_CONFIG, RadioButton, SELECT_CONFIG, SKELETON_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TEXTAREA_CONFIG, TOOLTIP_CONFIG, Tab, Table, TableColumn, Tabs, Textarea, TooltipDirective, provideThalassicUIConfig };
|
|
959
|
-
export type { AlertConfig, ButtonConfig, CheckboxConfig, DateTimePickerConfig, DialogConfig, DialogOpenConfig, DividerConfig, FormItemConfig, IconConfig, InputConfig, LoaderConfig, MenuActionItem, MenuConfig, MenuCustomItem, MenuDivider, MenuItemDefinition, MenuLabel, PaginationConfig, PasswordConfig, PinInputConfig, PopoverConfig, RadioButtonConfig, SelectConfig, SkeletonConfig, StepConfig, StepperConfig, StepperSelectEvent, SwitchConfig, TableColumnDefinition, TableConfig, TableData, TableTrackBy, TabsConfig, TextareaConfig, TooltipConfig, color, controlSize, dateTimePickerMode, dialogSize, dividerContentPosition, dividerOrientation, dividerVariant, menuItemType, menuPosition, orientation, overlayPosition, paginationItem, pinInputType,
|
|
1183
|
+
export { ALERT_CONFIG, Alert, BUTTON_CONFIG, Button, ButtonDirective, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_INPUT_CONFIG, Checkbox, Chip, ChipControl, ChipInput, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_CHIP_CONFIG, DEFAULT_CHIP_CONTROL_CONFIG, DEFAULT_CHIP_INPUT_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_FILE_UPLOADER_CONFIG, DEFAULT_FORM_CONTROL_GROUP_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_ICON_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_MENU_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DateTimePicker, Dialog, DialogService, Divider, FILE_UPLOADER_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FileUploader, FormControlAddon, FormControlGroup, FormItem, ICON_CONFIG, INPUT_CONFIG, Icon, Input, InputDirective, LOADER_CONFIG, Loader, MENU_CONFIG, Menu, MenuItemComponent, MenuTriggerDirective, PAGINATION_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, Pagination, Password, PinInput, Popover, RADIO_BUTTON_CONFIG, RadioButton, SELECT_CONFIG, SKELETON_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TEXTAREA_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, Tab, Table, TableColumn, Tabs, Textarea, ToggleGroup, TooltipDirective, provideThalassicUIConfig };
|
|
1184
|
+
export type { AlertConfig, ButtonConfig, CheckboxConfig, ChipConfig, ChipContext, ChipControlConfig, ChipInputConfig, DateTimePickerConfig, DialogConfig, DialogOpenConfig, DividerConfig, FileUploaderConfig, FileUploaderDropZoneContext, FileUploaderFileContext, FormControlGroupConfig, FormItemConfig, IconConfig, InputConfig, LoaderConfig, MenuActionItem, MenuConfig, MenuCustomItem, MenuDivider, MenuItemDefinition, MenuLabel, PaginationConfig, PasswordConfig, PinInputConfig, PopoverConfig, RadioButtonConfig, SelectConfig, SkeletonConfig, StepConfig, StepperConfig, StepperSelectEvent, SwitchConfig, TableColumnDefinition, TableConfig, TableData, TableTrackBy, TabsConfig, TextareaConfig, ToggleGroupConfig, TooltipConfig, acceptInput, chipColor, chipTemplateContext, chipVariant, color, controlSize, dateTimePickerMode, dialogSize, dividerContentPosition, dividerOrientation, dividerVariant, fileUploaderDragState, menuItemType, menuPosition, orientation, overlayPosition, paginationItem, pinInputType, size, stepperColor, stepperOrientation, stepperValue, tableColumnAlignment, textareaResize, tlsUiConfigProvider, toggleGroupType, tooltipColor, tooltipOrigin, tooltipPosition };
|