@thalassic/ui 0.10.0 → 0.12.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 +554 -308
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/thalassic-ui.d.ts +244 -41
package/package.json
CHANGED
package/types/thalassic-ui.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
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,
|
|
4
|
+
import { FormUiControl, WithOptionalFieldTree, ValidationError, FormValueControl, FormCheckboxControl, FieldTree } from '@angular/forms/signals';
|
|
5
5
|
import { CdkDialogContainer, DialogRole, DialogRef } from '@angular/cdk/dialog';
|
|
6
6
|
import { ComponentType } from '@angular/cdk/portal';
|
|
7
7
|
import { Day } from 'date-fns';
|
|
8
|
+
import { FlexibleConnectedPositionStrategyOrigin, ConnectedPosition } from '@angular/cdk/overlay';
|
|
8
9
|
import { SafeHtml } from '@angular/platform-browser';
|
|
9
10
|
import { Point } from '@thalassic/core';
|
|
10
11
|
import { DataSource } from '@angular/cdk/table';
|
|
11
|
-
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
12
12
|
|
|
13
13
|
type color = 'primary' | 'secondary' | 'tertiary' | 'success' | 'info' | 'warning' | 'danger';
|
|
14
14
|
|
|
@@ -38,6 +38,7 @@ interface tlsUiConfigProvider {
|
|
|
38
38
|
input?: Partial<InputConfig>;
|
|
39
39
|
loader?: Partial<LoaderConfig>;
|
|
40
40
|
menu?: Partial<MenuConfig>;
|
|
41
|
+
multiSelect?: Partial<MultiSelectConfig>;
|
|
41
42
|
pagination?: Partial<PaginationConfig>;
|
|
42
43
|
password?: Partial<PasswordConfig>;
|
|
43
44
|
pinInput?: Partial<PinInputConfig>;
|
|
@@ -195,6 +196,12 @@ declare abstract class FormControl implements FormUiControl {
|
|
|
195
196
|
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
|
}
|
|
197
198
|
|
|
199
|
+
declare abstract class ValueFormControl<T> extends FormControl implements FormValueControl<T> {
|
|
200
|
+
abstract readonly value: ModelSignal<T>;
|
|
201
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValueFormControl<any>, never>;
|
|
202
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ValueFormControl<any>, never, never, {}, {}, never, never, true, never>;
|
|
203
|
+
}
|
|
204
|
+
|
|
198
205
|
declare abstract class CheckboxFormControl extends FormControl implements FormCheckboxControl {
|
|
199
206
|
abstract readonly checked: ModelSignal<boolean>;
|
|
200
207
|
protected controlClasses: i0.Signal<string[]>;
|
|
@@ -210,10 +217,141 @@ interface Option<V = unknown> {
|
|
|
210
217
|
|
|
211
218
|
type optionInput<T> = string | number | T;
|
|
212
219
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
220
|
+
type selectionMode = 'single' | 'multiple';
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Shared base for controls that present a list of options and store the
|
|
224
|
+
* selected option values as an array (e.g. toggle group, chip group).
|
|
225
|
+
*
|
|
226
|
+
* Subclasses provide the visual shell plus the `type`/`unselectable` inputs
|
|
227
|
+
* (their defaults differ per component), while this base owns the selection
|
|
228
|
+
* state machine: value model, option normalization, and the toggle logic.
|
|
229
|
+
*/
|
|
230
|
+
declare abstract class SelectionGroup<T, V = unknown> extends ValueFormControl<V[]> {
|
|
231
|
+
readonly value: ModelSignal<V[]>;
|
|
232
|
+
readonly options: InputSignal<optionInput<T>[]>;
|
|
233
|
+
readonly optionLabel: InputSignal<keyof T | undefined>;
|
|
234
|
+
readonly optionValue: InputSignal<keyof T | undefined>;
|
|
235
|
+
readonly optionDisabled: InputSignal<keyof T | undefined>;
|
|
236
|
+
abstract readonly type: Signal<selectionMode>;
|
|
237
|
+
abstract readonly unselectable: Signal<boolean>;
|
|
238
|
+
protected readonly normalizedOptions: Signal<Option<V>[]>;
|
|
239
|
+
protected isSelected(optionValue: V): boolean;
|
|
240
|
+
protected select(option: Option<V>): void;
|
|
241
|
+
protected onKeyboardSelect(event: Event, option: Option<V>): void;
|
|
242
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionGroup<any, any>, never>;
|
|
243
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectionGroup<any, any>, never, 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; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
interface ConnectedOverlayConfig {
|
|
247
|
+
/** Template projected into the overlay. */
|
|
248
|
+
content: TemplateRef<unknown>;
|
|
249
|
+
/** Element or point the overlay is anchored to. */
|
|
250
|
+
origin: FlexibleConnectedPositionStrategyOrigin;
|
|
251
|
+
/** Connected positions to try, in order of preference. */
|
|
252
|
+
positions: ConnectedPosition[];
|
|
253
|
+
/** Forwarded to the position strategy. Defaults to the CDK default (true). */
|
|
254
|
+
flexibleDimensions?: boolean;
|
|
255
|
+
/** Forwarded to the position strategy. Defaults to the CDK default (true). */
|
|
256
|
+
push?: boolean;
|
|
257
|
+
/** Scroll handling while open. Defaults to `'reposition'`. */
|
|
258
|
+
scrollStrategy?: 'reposition' | 'close';
|
|
259
|
+
/** Whether to render a backdrop. Defaults to `true`. */
|
|
260
|
+
hasBackdrop?: boolean;
|
|
261
|
+
/** Backdrop class when a backdrop is rendered. Defaults to the transparent backdrop. */
|
|
262
|
+
backdropClass?: string;
|
|
263
|
+
/** Extra class(es) applied to the overlay pane. */
|
|
264
|
+
panelClass?: string | string[];
|
|
265
|
+
/** Close when the backdrop is clicked. Defaults to `true` when a backdrop is rendered. */
|
|
266
|
+
closeOnBackdropClick?: boolean;
|
|
267
|
+
/** Close on an outside pointer event. Defaults to `true` when no backdrop is rendered. */
|
|
268
|
+
closeOnOutsidePointer?: boolean;
|
|
269
|
+
/** Close when Escape is pressed. Defaults to `true`. */
|
|
270
|
+
closeOnEscape?: boolean;
|
|
271
|
+
/** Minimum width applied to the pane on every open (e.g. to match a trigger). */
|
|
272
|
+
minWidth?: number | string;
|
|
273
|
+
/**
|
|
274
|
+
* Keep the overlay alive across open/close (detach instead of dispose), so the
|
|
275
|
+
* same instance is reused on the next open. Defaults to `false`.
|
|
276
|
+
*/
|
|
277
|
+
reuse?: boolean;
|
|
278
|
+
/** Invoked after the overlay closes, from any cause (explicit, backdrop, outside, Escape). */
|
|
279
|
+
onClose?: () => void;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Owns the CDK-Overlay lifecycle shared by the library's connected overlay
|
|
283
|
+
* components (popover, menu, select): create/attach, dismissal wiring
|
|
284
|
+
* (backdrop / outside-pointer / Escape), `isOpen` state, and disposal. The
|
|
285
|
+
* positional and dismissal differences between components are expressed through
|
|
286
|
+
* {@link ConnectedOverlayConfig} rather than duplicated per component.
|
|
287
|
+
*
|
|
288
|
+
* Create one via {@link createOverlayManager} from a component field initializer
|
|
289
|
+
* so it is bound to the host's injection context.
|
|
290
|
+
*/
|
|
291
|
+
declare class OverlayManager {
|
|
292
|
+
private readonly _overlay;
|
|
293
|
+
private readonly _viewContainerRef;
|
|
294
|
+
private readonly _destroyRef;
|
|
295
|
+
private _overlayRef;
|
|
296
|
+
private _config;
|
|
297
|
+
private readonly _isOpen;
|
|
298
|
+
readonly isOpen: i0.Signal<boolean>;
|
|
299
|
+
private readonly _teardown;
|
|
300
|
+
open(config: ConnectedOverlayConfig): void;
|
|
301
|
+
close(): void;
|
|
302
|
+
private _buildPositionStrategy;
|
|
303
|
+
private _wireDismissal;
|
|
304
|
+
private _dispose;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Shared base for the single {@link Select} and {@link MultiSelect} controls.
|
|
309
|
+
* Owns everything the two listbox-combobox controls have in common: the option
|
|
310
|
+
* inputs, the connected overlay lifecycle, roving `aria-activedescendant`
|
|
311
|
+
* navigation, and the keyboard handler. The per-control differences (the value
|
|
312
|
+
* shape, the selected-state check, how the trigger label is built and what a
|
|
313
|
+
* commit does) are expressed through the abstract members below.
|
|
314
|
+
*/
|
|
315
|
+
declare abstract class AbstractSelect<T, V, ValueType> extends ValueFormControl<ValueType> {
|
|
316
|
+
protected readonly overlay: OverlayManager;
|
|
317
|
+
private readonly triggerElement;
|
|
318
|
+
private readonly panelTemplate;
|
|
319
|
+
readonly inputId: InputSignal<string | null>;
|
|
320
|
+
readonly options: InputSignal<optionInput<T>[]>;
|
|
321
|
+
readonly optionLabel: InputSignal<keyof T | undefined>;
|
|
322
|
+
readonly optionValue: InputSignal<keyof T | undefined>;
|
|
323
|
+
readonly optionDisabled: InputSignal<keyof T | undefined>;
|
|
324
|
+
readonly tabindex: InputSignal<string | number>;
|
|
325
|
+
abstract readonly placeholder: InputSignal<string>;
|
|
326
|
+
abstract readonly size: InputSignal<controlSize>;
|
|
327
|
+
abstract readonly fluid: InputSignalWithTransform<boolean, unknown>;
|
|
328
|
+
abstract readonly clearable: InputSignalWithTransform<boolean, unknown>;
|
|
329
|
+
protected readonly isOpen: Signal<boolean>;
|
|
330
|
+
protected readonly activeIndex: WritableSignal<number>;
|
|
331
|
+
protected readonly normalizedOptions: Signal<Option<V>[]>;
|
|
332
|
+
protected readonly activeDescendantId: Signal<string | null>;
|
|
333
|
+
protected readonly hostClasses: Signal<string[]>;
|
|
334
|
+
protected get listboxId(): string;
|
|
335
|
+
protected abstract readonly uniqueId: string;
|
|
336
|
+
protected abstract readonly hostClassBase: string;
|
|
337
|
+
protected abstract readonly panelClass: string;
|
|
338
|
+
protected abstract readonly hasValue: Signal<boolean>;
|
|
339
|
+
/** Index the active option starts on when the panel opens. */
|
|
340
|
+
protected abstract getInitialActiveIndex(): number;
|
|
341
|
+
/** Apply the active option's selection when committed via mouse or keyboard. */
|
|
342
|
+
protected abstract commitActiveOption(option: Option<V>): void;
|
|
343
|
+
/** Reset the control to its empty value. */
|
|
344
|
+
protected abstract clear(): void;
|
|
345
|
+
protected open(): void;
|
|
346
|
+
protected close(): void;
|
|
347
|
+
protected toggle(): void;
|
|
348
|
+
protected onOptionHover(index: number, disabled?: boolean): void;
|
|
349
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
350
|
+
protected optionId(index: number): string;
|
|
351
|
+
private moveActive;
|
|
352
|
+
private moveActiveToEdge;
|
|
353
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractSelect<any, any, any>, never>;
|
|
354
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractSelect<any, any, any>, never, never, { "inputId": { "alias": "inputId"; "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; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
217
355
|
}
|
|
218
356
|
|
|
219
357
|
declare class ChipControl extends CheckboxFormControl {
|
|
@@ -222,12 +360,13 @@ declare class ChipControl extends CheckboxFormControl {
|
|
|
222
360
|
private _chip;
|
|
223
361
|
readonly checked: i0.ModelSignal<boolean>;
|
|
224
362
|
readonly checkedColor: i0.InputSignal<_thalassic_ui.color | undefined>;
|
|
363
|
+
readonly checkedVariant: i0.InputSignal<chipVariant | undefined>;
|
|
225
364
|
protected hostClasses: i0.Signal<string[]>;
|
|
226
365
|
constructor();
|
|
227
366
|
protected toggle(): void;
|
|
228
367
|
protected onKeyboardToggle(event: Event): void;
|
|
229
368
|
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>;
|
|
369
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChipControl, "tls-chip[tlsChipControl]", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "checkedColor": { "alias": "checkedColor"; "required": false; "isSignal": true; }; "checkedVariant": { "alias": "checkedVariant"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; }, never, never, true, never>;
|
|
231
370
|
}
|
|
232
371
|
|
|
233
372
|
interface ChipConfig {
|
|
@@ -241,6 +380,7 @@ declare const CHIP_CONFIG: InjectionToken<ChipConfig>;
|
|
|
241
380
|
|
|
242
381
|
interface ChipControlConfig {
|
|
243
382
|
checkedColor: chipColor | undefined;
|
|
383
|
+
checkedVariant: chipVariant | undefined;
|
|
244
384
|
}
|
|
245
385
|
declare const DEFAULT_CHIP_CONTROL_CONFIG: ChipControlConfig;
|
|
246
386
|
|
|
@@ -423,6 +563,55 @@ declare const DEFAULT_DATE_TIME_PICKER_CONFIG: DateTimePickerConfig;
|
|
|
423
563
|
|
|
424
564
|
declare const DATE_TIME_PICKER_CONFIG: InjectionToken<DateTimePickerConfig>;
|
|
425
565
|
|
|
566
|
+
type chipGroupType = selectionMode;
|
|
567
|
+
interface ChipGroupOptionContext<V = unknown> {
|
|
568
|
+
option: Option<V>;
|
|
569
|
+
selected: boolean;
|
|
570
|
+
disabled: boolean;
|
|
571
|
+
index: number;
|
|
572
|
+
}
|
|
573
|
+
type chipGroupTemplateContext<V = unknown> = {
|
|
574
|
+
$implicit: ChipGroupOptionContext<V>;
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
declare class ChipGroup<T, V = unknown> extends SelectionGroup<T, V> {
|
|
578
|
+
private readonly _config;
|
|
579
|
+
protected CLASS_NAME: string;
|
|
580
|
+
readonly type: InputSignal<chipGroupType>;
|
|
581
|
+
readonly unselectable: InputSignalWithTransform<boolean, unknown>;
|
|
582
|
+
readonly size: InputSignal<controlSize>;
|
|
583
|
+
readonly color: InputSignal<chipColor>;
|
|
584
|
+
readonly checkedColor: InputSignal<_thalassic_ui.color | undefined>;
|
|
585
|
+
readonly variant: InputSignal<chipVariant>;
|
|
586
|
+
readonly checkedVariant: InputSignal<chipVariant | undefined>;
|
|
587
|
+
readonly orientation: InputSignal<orientation>;
|
|
588
|
+
readonly rounded: InputSignalWithTransform<boolean, unknown>;
|
|
589
|
+
protected readonly startIconTemplate: Signal<TemplateRef<chipGroupTemplateContext<V>> | undefined>;
|
|
590
|
+
protected readonly endIconTemplate: Signal<TemplateRef<chipGroupTemplateContext<V>> | undefined>;
|
|
591
|
+
protected readonly labelTemplate: Signal<TemplateRef<chipGroupTemplateContext<V>> | undefined>;
|
|
592
|
+
protected readonly classes: Signal<string[]>;
|
|
593
|
+
protected isDisabled(option: Option<V>): boolean;
|
|
594
|
+
protected optionClasses(option: Option<V>): string[];
|
|
595
|
+
protected optionContext(option: Option<V>, index: number): chipGroupTemplateContext<V>;
|
|
596
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChipGroup<any, any>, never>;
|
|
597
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChipGroup<any, any>, "tls-chip-group", never, { "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; }; "checkedColor": { "alias": "checkedColor"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "checkedVariant": { "alias": "checkedVariant"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; }, {}, ["startIconTemplate", "endIconTemplate", "labelTemplate"], never, true, never>;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
interface ChipGroupConfig {
|
|
601
|
+
size: controlSize;
|
|
602
|
+
color: chipColor;
|
|
603
|
+
checkedColor: chipColor | undefined;
|
|
604
|
+
variant: chipVariant;
|
|
605
|
+
checkedVariant: chipVariant | undefined;
|
|
606
|
+
orientation: orientation;
|
|
607
|
+
type: chipGroupType;
|
|
608
|
+
unselectable: boolean;
|
|
609
|
+
rounded: boolean;
|
|
610
|
+
}
|
|
611
|
+
declare const DEFAULT_CHIP_GROUP_CONFIG: ChipGroupConfig;
|
|
612
|
+
|
|
613
|
+
declare const CHIP_GROUP_CONFIG: InjectionToken<ChipGroupConfig>;
|
|
614
|
+
|
|
426
615
|
declare class ChipInput extends ValueFormControl<string[]> {
|
|
427
616
|
private readonly _config;
|
|
428
617
|
readonly value: ModelSignal<string[]>;
|
|
@@ -612,38 +801,60 @@ declare class RadioButton extends ValueFormControl<unknown> {
|
|
|
612
801
|
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>;
|
|
613
802
|
}
|
|
614
803
|
|
|
615
|
-
declare class
|
|
804
|
+
declare class MultiSelect<T, V = unknown> extends AbstractSelect<T, V, V[]> {
|
|
805
|
+
private static _nextUniqueId;
|
|
616
806
|
private readonly _config;
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
807
|
+
protected readonly uniqueId: string;
|
|
808
|
+
protected readonly hostClassBase = "tls-multi-select";
|
|
809
|
+
protected readonly panelClass = "tls-multi-select-panel";
|
|
810
|
+
readonly value: ModelSignal<V[]>;
|
|
811
|
+
readonly placeholder: InputSignal<string>;
|
|
812
|
+
readonly size: InputSignal<controlSize>;
|
|
813
|
+
readonly fluid: InputSignalWithTransform<boolean, unknown>;
|
|
814
|
+
readonly clearable: InputSignalWithTransform<boolean, unknown>;
|
|
815
|
+
readonly maxLabels: InputSignal<number>;
|
|
816
|
+
protected readonly hasValue: Signal<boolean>;
|
|
817
|
+
protected readonly selectedValues: Signal<Set<V>>;
|
|
818
|
+
protected readonly triggerLabel: Signal<string>;
|
|
819
|
+
protected isSelected(option: Option<V>): boolean;
|
|
820
|
+
protected toggleOption(option: Option<V>): void;
|
|
821
|
+
protected clear(): void;
|
|
822
|
+
protected getInitialActiveIndex(): number;
|
|
823
|
+
protected commitActiveOption(option: Option<V>): void;
|
|
824
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelect<any, any>, never>;
|
|
825
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelect<any, any>, "tls-multi-select", 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; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "maxLabels": { "alias": "maxLabels"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
interface MultiSelectConfig {
|
|
829
|
+
size: controlSize;
|
|
830
|
+
placeholder: string;
|
|
831
|
+
fluid: boolean;
|
|
832
|
+
clearable: boolean;
|
|
833
|
+
maxLabels: number;
|
|
834
|
+
}
|
|
835
|
+
declare const DEFAULT_MULTI_SELECT_CONFIG: MultiSelectConfig;
|
|
836
|
+
|
|
837
|
+
declare const MULTI_SELECT_CONFIG: InjectionToken<MultiSelectConfig>;
|
|
838
|
+
|
|
839
|
+
declare class Select<T, V = unknown> extends AbstractSelect<T, V, V | null> {
|
|
840
|
+
private static _nextUniqueId;
|
|
841
|
+
private readonly _config;
|
|
842
|
+
protected readonly uniqueId: string;
|
|
843
|
+
protected readonly hostClassBase = "tls-select";
|
|
844
|
+
protected readonly panelClass = "tls-select-panel";
|
|
620
845
|
readonly value: ModelSignal<V | null>;
|
|
621
|
-
readonly inputId: InputSignal<string | null>;
|
|
622
|
-
readonly options: InputSignal<optionInput<T>[]>;
|
|
623
|
-
readonly optionLabel: InputSignal<keyof T | undefined>;
|
|
624
|
-
readonly optionValue: InputSignal<keyof T | undefined>;
|
|
625
|
-
readonly optionDisabled: InputSignal<keyof T | undefined>;
|
|
626
846
|
readonly placeholder: InputSignal<string>;
|
|
627
847
|
readonly size: InputSignal<controlSize>;
|
|
628
848
|
readonly fluid: InputSignalWithTransform<boolean, unknown>;
|
|
629
|
-
readonly tabindex: InputSignal<string | number>;
|
|
630
849
|
readonly clearable: InputSignalWithTransform<boolean, unknown>;
|
|
631
|
-
protected readonly isOpen: Signal<boolean>;
|
|
632
|
-
protected readonly activeIndex: WritableSignal<number>;
|
|
633
|
-
protected readonly normalizedOptions: Signal<Option<V>[]>;
|
|
634
850
|
protected readonly hasValue: Signal<boolean>;
|
|
635
851
|
protected readonly selectedLabel: Signal<string>;
|
|
636
|
-
protected readonly hostClasses: Signal<string[]>;
|
|
637
|
-
protected open(): void;
|
|
638
|
-
protected close(): void;
|
|
639
|
-
protected toggle(): void;
|
|
640
852
|
protected select(option: Option<V>): void;
|
|
641
853
|
protected clear(): void;
|
|
642
|
-
protected
|
|
643
|
-
protected
|
|
644
|
-
private _moveActive;
|
|
854
|
+
protected getInitialActiveIndex(): number;
|
|
855
|
+
protected commitActiveOption(option: Option<V>): void;
|
|
645
856
|
static ɵfac: i0.ɵɵFactoryDeclaration<Select<any, any>, never>;
|
|
646
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Select<any, any>, "tls-select", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "
|
|
857
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Select<any, any>, "tls-select", 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; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
647
858
|
}
|
|
648
859
|
|
|
649
860
|
interface SelectConfig {
|
|
@@ -706,16 +917,11 @@ declare class Textarea extends ValueFormControl<string> {
|
|
|
706
917
|
|
|
707
918
|
declare const TEXTAREA_CONFIG: InjectionToken<TextareaConfig>;
|
|
708
919
|
|
|
709
|
-
type toggleGroupType =
|
|
920
|
+
type toggleGroupType = selectionMode;
|
|
710
921
|
|
|
711
|
-
declare class ToggleGroup<T, V = unknown> extends
|
|
922
|
+
declare class ToggleGroup<T, V = unknown> extends SelectionGroup<T, V> {
|
|
712
923
|
private readonly _config;
|
|
713
924
|
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
925
|
readonly type: InputSignal<toggleGroupType>;
|
|
720
926
|
readonly unselectable: InputSignalWithTransform<boolean, unknown>;
|
|
721
927
|
readonly size: InputSignal<controlSize>;
|
|
@@ -724,12 +930,9 @@ declare class ToggleGroup<T, V = unknown> extends ValueFormControl<V[]> {
|
|
|
724
930
|
protected readonly optionTemplate: Signal<TemplateRef<{
|
|
725
931
|
$implicit: Option<V>;
|
|
726
932
|
}> | undefined>;
|
|
727
|
-
protected readonly normalizedOptions: Signal<Option<V>[]>;
|
|
728
933
|
protected readonly classes: Signal<string[]>;
|
|
729
|
-
protected isSelected(optionValue: V): boolean;
|
|
730
|
-
protected select(option: Option<V>): void;
|
|
731
934
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToggleGroup<any, any>, never>;
|
|
732
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleGroup<any, any>, "tls-toggle-group", never, { "
|
|
935
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleGroup<any, any>, "tls-toggle-group", never, { "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; }; }, {}, ["optionTemplate"], never, true, never>;
|
|
733
936
|
}
|
|
734
937
|
|
|
735
938
|
interface ToggleGroupConfig {
|
|
@@ -1180,5 +1383,5 @@ declare const TOOLTIP_CONFIG: InjectionToken<TooltipConfig>;
|
|
|
1180
1383
|
|
|
1181
1384
|
declare const provideThalassicUIConfig: (config: tlsUiConfigProvider) => EnvironmentProviders;
|
|
1182
1385
|
|
|
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 };
|
|
1386
|
+
export { ALERT_CONFIG, Alert, BUTTON_CONFIG, Button, ButtonDirective, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_GROUP_CONFIG, CHIP_INPUT_CONFIG, Checkbox, Chip, ChipControl, ChipGroup, ChipInput, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_CHIP_CONFIG, DEFAULT_CHIP_CONTROL_CONFIG, DEFAULT_CHIP_GROUP_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_MULTI_SELECT_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, MULTI_SELECT_CONFIG, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, 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 };
|
|
1387
|
+
export type { AlertConfig, ButtonConfig, CheckboxConfig, ChipConfig, ChipContext, ChipControlConfig, ChipGroupConfig, ChipGroupOptionContext, ChipInputConfig, DateTimePickerConfig, DialogConfig, DialogOpenConfig, DividerConfig, FileUploaderConfig, FileUploaderDropZoneContext, FileUploaderFileContext, FormControlGroupConfig, FormItemConfig, IconConfig, InputConfig, LoaderConfig, MenuActionItem, MenuConfig, MenuCustomItem, MenuDivider, MenuItemDefinition, MenuLabel, MultiSelectConfig, PaginationConfig, PasswordConfig, PinInputConfig, PopoverConfig, RadioButtonConfig, SelectConfig, SkeletonConfig, StepConfig, StepperConfig, StepperSelectEvent, SwitchConfig, TableColumnDefinition, TableConfig, TableData, TableTrackBy, TabsConfig, TextareaConfig, ToggleGroupConfig, TooltipConfig, acceptInput, chipColor, chipGroupTemplateContext, chipGroupType, 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 };
|