@thalassic/ui 0.19.0 → 22.0.1
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.
|
@@ -11,6 +11,7 @@ import { filter as filter$1 } from 'rxjs/operators';
|
|
|
11
11
|
import { CdkDialogContainer, DialogRef, Dialog as Dialog$1 } from '@angular/cdk/dialog';
|
|
12
12
|
import { Directionality } from '@angular/cdk/bidi';
|
|
13
13
|
import { format, startOfMonth, endOfMonth, eachDayOfInterval, endOfWeek, startOfWeek, subMonths, addMonths, isSameDay, isSameMonth, isToday, setMonth, subYears, addYears, getYear, getMonth, getHours, getMinutes, startOfDay, setHours, setMinutes, setYear } from 'date-fns';
|
|
14
|
+
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
14
15
|
import { HttpClient } from '@angular/common/http';
|
|
15
16
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
16
17
|
import { CdkTable, CdkHeaderCell, CdkCell, CdkCellDef, CdkHeaderCellDef, CdkColumnDef, CdkHeaderRow, CdkHeaderRowDef, CdkRow, CdkRowDef } from '@angular/cdk/table';
|
|
@@ -18,41 +19,50 @@ import { deepMerge } from '@thalassic/core';
|
|
|
18
19
|
|
|
19
20
|
class FormControl {
|
|
20
21
|
// Models
|
|
21
|
-
touched = model(false,
|
|
22
|
+
touched = model(false, /* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
22
24
|
// Inputs
|
|
23
|
-
name = input('',
|
|
25
|
+
name = input('', /* @ts-ignore */
|
|
26
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
24
27
|
/**
|
|
25
28
|
* Accessible name forwarded to the inner native control (`<input>`/`<textarea>`/trigger),
|
|
26
29
|
* for controls used without an associated visible `<label>`. Placed on the inner control
|
|
27
30
|
* because the host element is a non-interactive wrapper.
|
|
28
31
|
*/
|
|
29
|
-
ariaLabel = input(undefined,
|
|
32
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
33
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
30
34
|
/**
|
|
31
35
|
* `id` of an element whose text names the inner native control, for when the accessible
|
|
32
36
|
* name already exists as visible text. Takes precedence over `ariaLabel` per the ARIA spec.
|
|
33
37
|
*/
|
|
34
|
-
ariaLabelledby = input(undefined,
|
|
38
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
35
40
|
/** `id`(s) of element(s) describing the control (help text, hint), forwarded to `aria-describedby`. */
|
|
36
|
-
ariaDescribedby = input(undefined,
|
|
41
|
+
ariaDescribedby = input(undefined, /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "ariaDescribedby" }] : /* istanbul ignore next */ []));
|
|
37
43
|
/** Consumer-provided `id` for the inner native control element (e.g. to wire up an external label). */
|
|
38
|
-
inputId = input(null,
|
|
44
|
+
inputId = input(null, /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
39
46
|
/**
|
|
40
47
|
* `id` of the validation-error element, set by an enclosing `tls-form-item` while it renders an
|
|
41
48
|
* error. Merged with `ariaDescribedby` so the control's `aria-describedby` points at both the
|
|
42
49
|
* consumer's description and the live error message.
|
|
43
50
|
*/
|
|
44
|
-
errorMessageId = signal(null,
|
|
51
|
+
errorMessageId = signal(null, /* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [{ debugName: "errorMessageId" }] : /* istanbul ignore next */ []));
|
|
45
53
|
/**
|
|
46
54
|
* `id` of the visible `<label>` element rendered by an enclosing `tls-form-item`. Merged with
|
|
47
55
|
* `ariaLabelledby` so the control's `aria-labelledby` points at the form-item label while still
|
|
48
56
|
* honouring any consumer-supplied labelling.
|
|
49
57
|
*/
|
|
50
|
-
labelId = signal(null,
|
|
58
|
+
labelId = signal(null, /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
|
|
51
60
|
/**
|
|
52
61
|
* `id` assigned to the native control element by an enclosing `tls-form-item`, so the label's
|
|
53
62
|
* `for` attribute can point at the control. Consumer's `inputId` takes precedence.
|
|
54
63
|
*/
|
|
55
|
-
formItemInputId = signal(null,
|
|
64
|
+
formItemInputId = signal(null, /* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [{ debugName: "formItemInputId" }] : /* istanbul ignore next */ []));
|
|
56
66
|
/** Whether this control has a single native labelable element that a `<label for>` can target. */
|
|
57
67
|
supportsLabelFor = false;
|
|
58
68
|
/** Combined `aria-describedby` value (consumer description + form-item error), or null when empty. */
|
|
@@ -65,7 +75,8 @@ class FormControl {
|
|
|
65
75
|
if (errorId)
|
|
66
76
|
ids.push(errorId);
|
|
67
77
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
68
|
-
},
|
|
78
|
+
}, /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
|
|
69
80
|
/** Combined `aria-labelledby` value (consumer label id + form-item label), or null when empty. */
|
|
70
81
|
labelledBy = computed(() => {
|
|
71
82
|
const ids = [];
|
|
@@ -76,20 +87,25 @@ class FormControl {
|
|
|
76
87
|
if (formItemLabelId)
|
|
77
88
|
ids.push(formItemLabelId);
|
|
78
89
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
79
|
-
},
|
|
90
|
+
}, /* @ts-ignore */
|
|
91
|
+
...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
|
|
80
92
|
/** Resolved `id` for the native control element: consumer's `inputId` first, then form-item's assigned id. */
|
|
81
|
-
effectiveInputId = computed(() => this.inputId() ?? this.formItemInputId(),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
93
|
+
effectiveInputId = computed(() => this.inputId() ?? this.formItemInputId(), /* @ts-ignore */
|
|
94
|
+
...(ngDevMode ? [{ debugName: "effectiveInputId" }] : /* istanbul ignore next */ []));
|
|
95
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
96
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
97
|
+
hidden = input(false, { ...(ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
98
|
+
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
99
|
+
pending = input(false, { ...(ngDevMode ? { debugName: "pending" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
100
|
+
dirty = input(false, { ...(ngDevMode ? { debugName: "dirty" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
101
|
+
errors = input([], /* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
103
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
90
104
|
CLASS_NAME = 'tls-form-control';
|
|
91
|
-
notInteractive = computed(() => this.disabled() || this.readonly(),
|
|
92
|
-
|
|
105
|
+
notInteractive = computed(() => this.disabled() || this.readonly(), /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "notInteractive" }] : /* istanbul ignore next */ []));
|
|
107
|
+
controlClasses = computed(() => this.baseControlClasses(), /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "controlClasses" }] : /* istanbul ignore next */ []));
|
|
93
109
|
// Protected methods
|
|
94
110
|
baseControlClasses() {
|
|
95
111
|
const className = this.CLASS_NAME;
|
|
@@ -108,20 +124,20 @@ class FormControl {
|
|
|
108
124
|
array.push(`${className}--dirty`);
|
|
109
125
|
return array;
|
|
110
126
|
}
|
|
111
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
112
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
127
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
128
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: FormControl, isStandalone: true, inputs: { touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, pending: { classPropertyName: "pending", publicName: "pending", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { touched: "touchedChange" }, ngImport: i0 });
|
|
113
129
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormControl, decorators: [{
|
|
115
131
|
type: Directive
|
|
116
132
|
}], propDecorators: { touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], pending: [{ type: i0.Input, args: [{ isSignal: true, alias: "pending", required: false }] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }] } });
|
|
117
133
|
|
|
118
134
|
const FORM_CONTROL = new InjectionToken('FORM_CONTROL');
|
|
119
135
|
|
|
120
136
|
class ValueFormControl extends FormControl {
|
|
121
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
122
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ValueFormControl, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
138
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: ValueFormControl, isStandalone: true, usesInheritance: true, ngImport: i0 });
|
|
123
139
|
}
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ValueFormControl, decorators: [{
|
|
125
141
|
type: Directive
|
|
126
142
|
}] });
|
|
127
143
|
|
|
@@ -131,11 +147,12 @@ class CheckboxFormControl extends FormControl {
|
|
|
131
147
|
if (this.checked())
|
|
132
148
|
classes.push(`${this.CLASS_NAME}--checked`);
|
|
133
149
|
return classes;
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
static
|
|
150
|
+
}, /* @ts-ignore */
|
|
151
|
+
...(ngDevMode ? [{ debugName: "controlClasses" }] : /* istanbul ignore next */ []));
|
|
152
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CheckboxFormControl, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
153
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: CheckboxFormControl, isStandalone: true, usesInheritance: true, ngImport: i0 });
|
|
137
154
|
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CheckboxFormControl, decorators: [{
|
|
139
156
|
type: Directive
|
|
140
157
|
}] });
|
|
141
158
|
|
|
@@ -171,16 +188,22 @@ function normalizeOptions(options, keys) {
|
|
|
171
188
|
* a runtime-dependent `V | V[]`.
|
|
172
189
|
*/
|
|
173
190
|
class SelectionGroup extends ValueFormControl {
|
|
174
|
-
value = model([],
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
191
|
+
value = model([], /* @ts-ignore */
|
|
192
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
193
|
+
options = input([], /* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
195
|
+
optionLabel = input(undefined, /* @ts-ignore */
|
|
196
|
+
...(ngDevMode ? [{ debugName: "optionLabel" }] : /* istanbul ignore next */ []));
|
|
197
|
+
optionValue = input(undefined, /* @ts-ignore */
|
|
198
|
+
...(ngDevMode ? [{ debugName: "optionValue" }] : /* istanbul ignore next */ []));
|
|
199
|
+
optionDisabled = input(undefined, /* @ts-ignore */
|
|
200
|
+
...(ngDevMode ? [{ debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
|
|
179
201
|
normalizedOptions = computed(() => normalizeOptions(this.options(), {
|
|
180
202
|
label: this.optionLabel(),
|
|
181
203
|
value: this.optionValue(),
|
|
182
204
|
disabled: this.optionDisabled(),
|
|
183
|
-
}),
|
|
205
|
+
}), /* @ts-ignore */
|
|
206
|
+
...(ngDevMode ? [{ debugName: "normalizedOptions" }] : /* istanbul ignore next */ []));
|
|
184
207
|
isSelected(optionValue) {
|
|
185
208
|
return this.value().includes(optionValue);
|
|
186
209
|
}
|
|
@@ -216,10 +239,10 @@ class SelectionGroup extends ValueFormControl {
|
|
|
216
239
|
},
|
|
217
240
|
};
|
|
218
241
|
}
|
|
219
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
220
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
242
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SelectionGroup, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
243
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: SelectionGroup, isStandalone: true, inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, usesInheritance: true, ngImport: i0 });
|
|
221
244
|
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SelectionGroup, decorators: [{
|
|
223
246
|
type: Directive
|
|
224
247
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }] } });
|
|
225
248
|
|
|
@@ -244,7 +267,8 @@ class OverlayManager {
|
|
|
244
267
|
_destroyRef = inject(DestroyRef);
|
|
245
268
|
_overlayRef = null;
|
|
246
269
|
_config = null;
|
|
247
|
-
_isOpen = signal(false,
|
|
270
|
+
_isOpen = signal(false, /* @ts-ignore */
|
|
271
|
+
...(ngDevMode ? [{ debugName: "_isOpen" }] : /* istanbul ignore next */ []));
|
|
248
272
|
// Armed by `ignoreTrailingAuxClick` on open: swallow the first outside
|
|
249
273
|
// `auxclick` so the right-click gesture that opened a context menu doesn't
|
|
250
274
|
// immediately dismiss it. Consumed one-shot (not on a timer) because the user
|
|
@@ -394,27 +418,37 @@ function createOverlayManager() {
|
|
|
394
418
|
*/
|
|
395
419
|
class AbstractSelect extends ValueFormControl {
|
|
396
420
|
overlay = createOverlayManager();
|
|
397
|
-
triggerElement = viewChild('trigger',
|
|
398
|
-
|
|
421
|
+
triggerElement = viewChild('trigger', /* @ts-ignore */
|
|
422
|
+
...(ngDevMode ? [{ debugName: "triggerElement" }] : /* istanbul ignore next */ []));
|
|
423
|
+
panelTemplate = viewChild('panel', /* @ts-ignore */
|
|
424
|
+
...(ngDevMode ? [{ debugName: "panelTemplate" }] : /* istanbul ignore next */ []));
|
|
399
425
|
// Shared inputs (config-independent)
|
|
400
|
-
options = input([],
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
426
|
+
options = input([], /* @ts-ignore */
|
|
427
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
428
|
+
optionLabel = input(undefined, /* @ts-ignore */
|
|
429
|
+
...(ngDevMode ? [{ debugName: "optionLabel" }] : /* istanbul ignore next */ []));
|
|
430
|
+
optionValue = input(undefined, /* @ts-ignore */
|
|
431
|
+
...(ngDevMode ? [{ debugName: "optionValue" }] : /* istanbul ignore next */ []));
|
|
432
|
+
optionDisabled = input(undefined, /* @ts-ignore */
|
|
433
|
+
...(ngDevMode ? [{ debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
|
|
434
|
+
tabindex = input(0, /* @ts-ignore */
|
|
435
|
+
...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
405
436
|
isOpen = this.overlay.isOpen;
|
|
406
|
-
activeIndex = signal(-1,
|
|
437
|
+
activeIndex = signal(-1, /* @ts-ignore */
|
|
438
|
+
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
407
439
|
normalizedOptions = computed(() => normalizeOptions(this.options(), {
|
|
408
440
|
label: this.optionLabel(),
|
|
409
441
|
value: this.optionValue(),
|
|
410
442
|
disabled: this.optionDisabled(),
|
|
411
|
-
}),
|
|
443
|
+
}), /* @ts-ignore */
|
|
444
|
+
...(ngDevMode ? [{ debugName: "normalizedOptions" }] : /* istanbul ignore next */ []));
|
|
412
445
|
activeDescendantId = computed(() => {
|
|
413
446
|
const index = this.activeIndex();
|
|
414
447
|
if (index < 0)
|
|
415
448
|
return null;
|
|
416
449
|
return this.optionId(index);
|
|
417
|
-
},
|
|
450
|
+
}, /* @ts-ignore */
|
|
451
|
+
...(ngDevMode ? [{ debugName: "activeDescendantId" }] : /* istanbul ignore next */ []));
|
|
418
452
|
hostClasses = computed(() => {
|
|
419
453
|
const array = [this.hostClassBase];
|
|
420
454
|
if (this.isOpen())
|
|
@@ -423,7 +457,8 @@ class AbstractSelect extends ValueFormControl {
|
|
|
423
457
|
if (this.fluid())
|
|
424
458
|
array.push(`${this.CLASS_NAME}--fluid`);
|
|
425
459
|
return array.concat(this.controlClasses());
|
|
426
|
-
},
|
|
460
|
+
}, /* @ts-ignore */
|
|
461
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
427
462
|
get listboxId() {
|
|
428
463
|
return `${this.uniqueId}-listbox`;
|
|
429
464
|
}
|
|
@@ -554,10 +589,10 @@ class AbstractSelect extends ValueFormControl {
|
|
|
554
589
|
next += direction;
|
|
555
590
|
}
|
|
556
591
|
}
|
|
557
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
558
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
592
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AbstractSelect, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
593
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.5", type: AbstractSelect, isStandalone: true, inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "triggerElement", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelTemplate", first: true, predicate: ["panel"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
|
|
559
594
|
}
|
|
560
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AbstractSelect, decorators: [{
|
|
561
596
|
type: Directive
|
|
562
597
|
}], propDecorators: { triggerElement: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panelTemplate: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
563
598
|
|
|
@@ -577,10 +612,10 @@ class QuerySyncDirective {
|
|
|
577
612
|
readParam(param) {
|
|
578
613
|
return this._route.snapshot.queryParamMap.get(param);
|
|
579
614
|
}
|
|
580
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
581
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
615
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: QuerySyncDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
616
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: QuerySyncDirective, isStandalone: true, ngImport: i0 });
|
|
582
617
|
}
|
|
583
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: QuerySyncDirective, decorators: [{
|
|
584
619
|
type: Directive
|
|
585
620
|
}] });
|
|
586
621
|
|
|
@@ -604,9 +639,11 @@ const ALERT_CONFIG = new InjectionToken('ALERT_CONFIG', {
|
|
|
604
639
|
|
|
605
640
|
class Alert {
|
|
606
641
|
_config = inject(ALERT_CONFIG);
|
|
607
|
-
color = input(this._config.color,
|
|
608
|
-
|
|
609
|
-
|
|
642
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
643
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
644
|
+
label = input(typeof this._config.label === 'string' ? this._config.label : null, /* @ts-ignore */
|
|
645
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
646
|
+
hideLabel = input(this._config.hideLabel, { ...(ngDevMode ? { debugName: "hideLabel" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
610
647
|
displayLabel = computed(() => {
|
|
611
648
|
const label = this.label();
|
|
612
649
|
if (label)
|
|
@@ -615,21 +652,24 @@ class Alert {
|
|
|
615
652
|
return this._config.label[this.color()];
|
|
616
653
|
}
|
|
617
654
|
return '';
|
|
618
|
-
},
|
|
655
|
+
}, /* @ts-ignore */
|
|
656
|
+
...(ngDevMode ? [{ debugName: "displayLabel" }] : /* istanbul ignore next */ []));
|
|
619
657
|
hostClasses = computed(() => {
|
|
620
658
|
const className = 'tls-alert';
|
|
621
659
|
const array = [className];
|
|
622
660
|
array.push(`${className}--${this.color()}`);
|
|
623
661
|
return array;
|
|
624
|
-
},
|
|
662
|
+
}, /* @ts-ignore */
|
|
663
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
625
664
|
hostRole = computed(() => {
|
|
626
665
|
const urgent = ['danger', 'warning'];
|
|
627
666
|
return urgent.includes(this.color()) ? 'alert' : 'note';
|
|
628
|
-
},
|
|
629
|
-
|
|
630
|
-
static
|
|
667
|
+
}, /* @ts-ignore */
|
|
668
|
+
...(ngDevMode ? [{ debugName: "hostRole" }] : /* istanbul ignore next */ []));
|
|
669
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
670
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Alert, isStandalone: true, selector: "tls-alert", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "attr.role": "hostRole()", "attr.aria-label": "hideLabel() ? displayLabel() : null" } }, ngImport: i0, template: "<div class=\"tls-alert-icon\"></div>\n<div class=\"tls-alert-body\">\n @if (!hideLabel()) {\n <span class=\"tls-alert-body__label\">{{ displayLabel() }}</span>\n }\n <span class=\"tls-alert-body__content\">\n <ng-content></ng-content>\n </span>\n</div>\n" });
|
|
631
671
|
}
|
|
632
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Alert, decorators: [{
|
|
633
673
|
type: Component,
|
|
634
674
|
args: [{ selector: 'tls-alert', imports: [], host: {
|
|
635
675
|
'[class]': 'hostClasses()',
|
|
@@ -654,14 +694,17 @@ class ButtonBase {
|
|
|
654
694
|
// Injections
|
|
655
695
|
_config = inject(BUTTON_CONFIG);
|
|
656
696
|
APPLY_HOST_CLASSES = true;
|
|
657
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
658
|
-
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : {}), transform: booleanAttribute });
|
|
659
|
-
color = input(this._config.color,
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
697
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
698
|
+
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
699
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
700
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
701
|
+
variant = input(this._config.variant, /* @ts-ignore */
|
|
702
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
703
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
704
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
705
|
+
rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
663
706
|
/** Whether the button stretches to fill its container's width. */
|
|
664
|
-
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : {}), transform: booleanAttribute });
|
|
707
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
665
708
|
classes = computed(() => {
|
|
666
709
|
const className = 'tls-button';
|
|
667
710
|
const array = [className];
|
|
@@ -677,11 +720,12 @@ class ButtonBase {
|
|
|
677
720
|
if (this.rounded())
|
|
678
721
|
array.push(`${className}--rounded`);
|
|
679
722
|
return array;
|
|
680
|
-
},
|
|
681
|
-
|
|
682
|
-
static
|
|
723
|
+
}, /* @ts-ignore */
|
|
724
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
725
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ButtonBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
726
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: ButtonBase, isStandalone: true, inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "APPLY_HOST_CLASSES ? classes() : null" } }, ngImport: i0 });
|
|
683
727
|
}
|
|
684
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
728
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ButtonBase, decorators: [{
|
|
685
729
|
type: Directive,
|
|
686
730
|
args: [{
|
|
687
731
|
host: {
|
|
@@ -698,24 +742,31 @@ class Button extends ButtonBase {
|
|
|
698
742
|
APPLY_HOST_CLASSES = false;
|
|
699
743
|
// Inputs
|
|
700
744
|
/** The text label displayed inside the button. Takes priority over projected content. */
|
|
701
|
-
label = input(
|
|
745
|
+
label = input(/* @ts-ignore */
|
|
746
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
702
747
|
/**
|
|
703
748
|
* Accessible name forwarded to the inner `<button>`/`<a>`. Required for icon-only buttons,
|
|
704
749
|
* where there is no visible text for screen readers to announce. Placed on the inner control
|
|
705
750
|
* because the host `tls-button` element is a non-interactive wrapper.
|
|
706
751
|
*/
|
|
707
|
-
ariaLabel = input(undefined,
|
|
752
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
753
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
708
754
|
/**
|
|
709
755
|
* `id` of an element whose text names the inner `<button>`/`<a>`, for when the accessible
|
|
710
756
|
* name already exists as visible text. Takes precedence over `ariaLabel` per the ARIA spec.
|
|
711
757
|
*/
|
|
712
|
-
ariaLabelledby = input(undefined,
|
|
713
|
-
|
|
758
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
759
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
760
|
+
type = input(this._config.type, /* @ts-ignore */
|
|
761
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
714
762
|
/** An optional URL that causes the button to render as an anchor link. */
|
|
715
|
-
href = input(null,
|
|
716
|
-
|
|
763
|
+
href = input(null, /* @ts-ignore */
|
|
764
|
+
...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
|
|
765
|
+
tabindex = input('0', /* @ts-ignore */
|
|
766
|
+
...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
717
767
|
// Computed
|
|
718
|
-
isLink = computed(() => Boolean(this._routerLink || this.href()),
|
|
768
|
+
isLink = computed(() => Boolean(this._routerLink || this.href()), /* @ts-ignore */
|
|
769
|
+
...(ngDevMode ? [{ debugName: "isLink" }] : /* istanbul ignore next */ []));
|
|
719
770
|
/**
|
|
720
771
|
* Resolved URL placed on the inner anchor so the browser treats it as a real link
|
|
721
772
|
* (enables "Open in new tab", middle-click, status-bar preview, etc.). An explicit
|
|
@@ -732,7 +783,8 @@ class Button extends ButtonBase {
|
|
|
732
783
|
return null;
|
|
733
784
|
const serialized = this._router.serializeUrl(urlTree);
|
|
734
785
|
return this._locationStrategy?.prepareExternalUrl(serialized) ?? serialized;
|
|
735
|
-
},
|
|
786
|
+
}, /* @ts-ignore */
|
|
787
|
+
...(ngDevMode ? [{ debugName: "linkHref" }] : /* istanbul ignore next */ []));
|
|
736
788
|
// Protected methods
|
|
737
789
|
/**
|
|
738
790
|
* Keeps navigation correct when the host carries a `routerLink` while the inner anchor
|
|
@@ -757,10 +809,10 @@ class Button extends ButtonBase {
|
|
|
757
809
|
}
|
|
758
810
|
event.preventDefault();
|
|
759
811
|
}
|
|
760
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
761
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
812
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Button, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
813
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Button, isStandalone: true, selector: "tls-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "tabindex": "-1" } }, usesInheritance: true, ngImport: i0, template: "@if (isLink()) {\n <a\n role=\"link\"\n [class]=\"classes()\"\n [attr.href]=\"linkHref()\"\n [tabindex]=\"tabindex()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n [attr.aria-disabled]=\"disabled()\"\n (click)=\"onLinkClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"></ng-container>\n </a>\n} @else {\n <button\n role=\"button\"\n [class]=\"classes()\"\n [type]=\"type()\"\n [tabindex]=\"tabindex()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"></ng-container>\n </button>\n}\n\n<!-- Content -->\n<ng-template #contentTemplate>\n @if (label() && !icon()) {\n {{ label() }}\n } @else {\n <ng-container *ngTemplateOutlet=\"projectedContentTemplate\"></ng-container>\n }\n</ng-template>\n\n<ng-template #projectedContentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{width:fit-content;display:inline-block}:host:focus-visible{outline:none}:host:has(.tls-button.tls-button--fluid){width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
762
814
|
}
|
|
763
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
815
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Button, decorators: [{
|
|
764
816
|
type: Component,
|
|
765
817
|
args: [{ selector: 'tls-button', imports: [NgTemplateOutlet], host: {
|
|
766
818
|
'[tabindex]': '-1',
|
|
@@ -768,10 +820,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
768
820
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
769
821
|
|
|
770
822
|
class ButtonDirective extends ButtonBase {
|
|
771
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
772
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
823
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
824
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: ButtonDirective, isStandalone: true, selector: "[tlsButton]", usesInheritance: true, ngImport: i0 });
|
|
773
825
|
}
|
|
774
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ButtonDirective, decorators: [{
|
|
775
827
|
type: Directive,
|
|
776
828
|
args: [{
|
|
777
829
|
selector: '[tlsButton]',
|
|
@@ -790,13 +842,17 @@ const CHIP_CONFIG = new InjectionToken('CHIP_CONFIG', {
|
|
|
790
842
|
|
|
791
843
|
class Chip {
|
|
792
844
|
_config = inject(CHIP_CONFIG);
|
|
793
|
-
label = input(
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
845
|
+
label = input(/* @ts-ignore */
|
|
846
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
847
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
848
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
849
|
+
variant = input(this._config.variant, /* @ts-ignore */
|
|
850
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
851
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
852
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
853
|
+
rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
854
|
+
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
855
|
+
fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
800
856
|
context = signal({
|
|
801
857
|
checked: false,
|
|
802
858
|
disabled: false,
|
|
@@ -805,9 +861,12 @@ class Chip {
|
|
|
805
861
|
dirty: false,
|
|
806
862
|
invalid: false,
|
|
807
863
|
pending: false,
|
|
808
|
-
},
|
|
809
|
-
|
|
810
|
-
|
|
864
|
+
}, /* @ts-ignore */
|
|
865
|
+
...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
866
|
+
startIconTemplate = contentChild('startIcon', /* @ts-ignore */
|
|
867
|
+
...(ngDevMode ? [{ debugName: "startIconTemplate" }] : /* istanbul ignore next */ []));
|
|
868
|
+
endIconTemplate = contentChild('endIcon', /* @ts-ignore */
|
|
869
|
+
...(ngDevMode ? [{ debugName: "endIconTemplate" }] : /* istanbul ignore next */ []));
|
|
811
870
|
classes = computed(() => {
|
|
812
871
|
const className = 'tls-chip';
|
|
813
872
|
const array = [className];
|
|
@@ -821,11 +880,12 @@ class Chip {
|
|
|
821
880
|
if (this.fluid())
|
|
822
881
|
array.push(`${className}--fluid`);
|
|
823
882
|
return array;
|
|
824
|
-
},
|
|
825
|
-
|
|
826
|
-
static
|
|
883
|
+
}, /* @ts-ignore */
|
|
884
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
885
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Chip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
886
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Chip, isStandalone: true, selector: "tls-chip", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, queries: [{ propertyName: "startIconTemplate", first: true, predicate: ["startIcon"], descendants: true, isSignal: true }, { propertyName: "endIconTemplate", first: true, predicate: ["endIcon"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (startIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n\n@if (label()) {\n {{ label() }}\n} @else {\n <ng-content></ng-content>\n}\n\n@if (endIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
827
887
|
}
|
|
828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
888
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Chip, decorators: [{
|
|
829
889
|
type: Component,
|
|
830
890
|
args: [{ selector: 'tls-chip', imports: [NgTemplateOutlet], host: {
|
|
831
891
|
'[class]': 'classes()',
|
|
@@ -845,9 +905,12 @@ class ChipControl extends CheckboxFormControl {
|
|
|
845
905
|
CLASS_NAME = 'tls-chip';
|
|
846
906
|
_config = inject(CHIP_CONTROL_CONFIG);
|
|
847
907
|
_chip = inject(Chip);
|
|
848
|
-
checked = model(false,
|
|
849
|
-
|
|
850
|
-
|
|
908
|
+
checked = model(false, /* @ts-ignore */
|
|
909
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
910
|
+
checkedColor = input(this._config.checkedColor, /* @ts-ignore */
|
|
911
|
+
...(ngDevMode ? [{ debugName: "checkedColor" }] : /* istanbul ignore next */ []));
|
|
912
|
+
checkedVariant = input(this._config.checkedVariant, /* @ts-ignore */
|
|
913
|
+
...(ngDevMode ? [{ debugName: "checkedVariant" }] : /* istanbul ignore next */ []));
|
|
851
914
|
hostClasses = computed(() => {
|
|
852
915
|
const classes = ['tls-chip--control'];
|
|
853
916
|
if (this.checked()) {
|
|
@@ -862,7 +925,8 @@ class ChipControl extends CheckboxFormControl {
|
|
|
862
925
|
if (this.disabled())
|
|
863
926
|
classes.push('tls-chip--disabled');
|
|
864
927
|
return classes;
|
|
865
|
-
},
|
|
928
|
+
}, /* @ts-ignore */
|
|
929
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
866
930
|
constructor() {
|
|
867
931
|
super();
|
|
868
932
|
effect(() => this._chip.context.set({
|
|
@@ -884,10 +948,10 @@ class ChipControl extends CheckboxFormControl {
|
|
|
884
948
|
event.preventDefault();
|
|
885
949
|
this.toggle();
|
|
886
950
|
}
|
|
887
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
888
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
951
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
952
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: ChipControl, isStandalone: true, selector: "tls-chip[tlsChipControl]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, checkedColor: { classPropertyName: "checkedColor", publicName: "checkedColor", isSignal: true, isRequired: false, transformFunction: null }, checkedVariant: { classPropertyName: "checkedVariant", publicName: "checkedVariant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, host: { attributes: { "role": "checkbox" }, listeners: { "click": "toggle()", "blur": "touched.set(true)", "keydown.space": "onKeyboardToggle($event)", "keydown.enter": "onKeyboardToggle($event)" }, properties: { "class": "hostClasses()", "tabindex": "disabled() ? -1 : 0", "attr.aria-checked": "checked()", "attr.aria-disabled": "disabled()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ChipControl) }], usesInheritance: true, ngImport: i0 });
|
|
889
953
|
}
|
|
890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipControl, decorators: [{
|
|
891
955
|
type: Directive,
|
|
892
956
|
args: [{
|
|
893
957
|
selector: 'tls-chip[tlsChipControl]',
|
|
@@ -1073,14 +1137,21 @@ class ConfirmPanel {
|
|
|
1073
1137
|
_config = inject(CONFIRM_CONFIG);
|
|
1074
1138
|
_buttonConfig = inject(BUTTON_CONFIG);
|
|
1075
1139
|
// Inputs
|
|
1076
|
-
title = input(undefined,
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1140
|
+
title = input(undefined, /* @ts-ignore */
|
|
1141
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
1142
|
+
message = input.required(/* @ts-ignore */
|
|
1143
|
+
...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
1144
|
+
confirm = input(undefined, /* @ts-ignore */
|
|
1145
|
+
...(ngDevMode ? [{ debugName: "confirm" }] : /* istanbul ignore next */ []));
|
|
1146
|
+
cancel = input(undefined, /* @ts-ignore */
|
|
1147
|
+
...(ngDevMode ? [{ debugName: "cancel" }] : /* istanbul ignore next */ []));
|
|
1148
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
1149
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
1081
1150
|
/** Whether the panel is a focus-trapped modal (`aria-modal="true"`) rather than an anchored popover. */
|
|
1082
|
-
modal = input(false,
|
|
1083
|
-
|
|
1151
|
+
modal = input(false, /* @ts-ignore */
|
|
1152
|
+
...(ngDevMode ? [{ debugName: "modal" }] : /* istanbul ignore next */ []));
|
|
1153
|
+
actionsAlign = input(this._config.actionsAlign, /* @ts-ignore */
|
|
1154
|
+
...(ngDevMode ? [{ debugName: "actionsAlign" }] : /* istanbul ignore next */ []));
|
|
1084
1155
|
// Outputs
|
|
1085
1156
|
confirmed = output();
|
|
1086
1157
|
cancelled = output();
|
|
@@ -1089,12 +1160,15 @@ class ConfirmPanel {
|
|
|
1089
1160
|
titleId = `${this.id}-title`;
|
|
1090
1161
|
messageId = `${this.id}-message`;
|
|
1091
1162
|
// Computed
|
|
1092
|
-
resolvedConfirm = computed(() => this._resolve(this.confirm(), this._config.confirmButton),
|
|
1093
|
-
|
|
1163
|
+
resolvedConfirm = computed(() => this._resolve(this.confirm(), this._config.confirmButton), /* @ts-ignore */
|
|
1164
|
+
...(ngDevMode ? [{ debugName: "resolvedConfirm" }] : /* istanbul ignore next */ []));
|
|
1165
|
+
resolvedCancel = computed(() => this._resolve(this.cancel(), this._config.cancelButton), /* @ts-ignore */
|
|
1166
|
+
...(ngDevMode ? [{ debugName: "resolvedCancel" }] : /* istanbul ignore next */ []));
|
|
1094
1167
|
actionsClasses = computed(() => [
|
|
1095
1168
|
'tls-confirm__actions',
|
|
1096
1169
|
`tls-confirm__actions--${this.actionsAlign()}`,
|
|
1097
|
-
],
|
|
1170
|
+
], /* @ts-ignore */
|
|
1171
|
+
...(ngDevMode ? [{ debugName: "actionsClasses" }] : /* istanbul ignore next */ []));
|
|
1098
1172
|
// Constructor
|
|
1099
1173
|
constructor() {
|
|
1100
1174
|
// Move focus to the primary action once the panel has rendered, so the
|
|
@@ -1122,8 +1196,8 @@ class ConfirmPanel {
|
|
|
1122
1196
|
if (confirmButton)
|
|
1123
1197
|
confirmButton.focus();
|
|
1124
1198
|
}
|
|
1125
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1126
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1199
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1200
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ConfirmPanel, isStandalone: true, selector: "tls-confirm-panel", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, confirm: { classPropertyName: "confirm", publicName: "confirm", isSignal: true, isRequired: false, transformFunction: null }, cancel: { classPropertyName: "cancel", publicName: "cancel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, actionsAlign: { classPropertyName: "actionsAlign", publicName: "actionsAlign", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", cancelled: "cancelled" }, host: { attributes: { "role": "alertdialog", "animate.enter": "tls-confirm--enter", "animate.leave": "tls-confirm--leave" }, properties: { "attr.aria-modal": "modal() ? \"true\" : \"false\"", "id": "id", "attr.aria-labelledby": "title() ? titleId : null", "attr.aria-describedby": "messageId", "attr.aria-label": "ariaLabel() ?? null" }, classAttribute: "tls-confirm" }, ngImport: i0, template: `
|
|
1127
1201
|
@if (title()) {
|
|
1128
1202
|
<h2 class="tls-confirm__title" [id]="titleId">{{ title() }}</h2>
|
|
1129
1203
|
}
|
|
@@ -1157,7 +1231,7 @@ class ConfirmPanel {
|
|
|
1157
1231
|
</div>
|
|
1158
1232
|
`, isInline: true, dependencies: [{ kind: "component", type: Button, selector: "tls-button", inputs: ["label", "ariaLabel", "ariaLabelledby", "type", "href", "tabindex"] }] });
|
|
1159
1233
|
}
|
|
1160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmPanel, decorators: [{
|
|
1161
1235
|
type: Component,
|
|
1162
1236
|
args: [{
|
|
1163
1237
|
selector: 'tls-confirm-panel',
|
|
@@ -1222,14 +1296,22 @@ class Confirm {
|
|
|
1222
1296
|
_overlay = createOverlayManager();
|
|
1223
1297
|
_templateRef = viewChild.required('content');
|
|
1224
1298
|
// Inputs
|
|
1225
|
-
title = input(undefined,
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1299
|
+
title = input(undefined, /* @ts-ignore */
|
|
1300
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
1301
|
+
message = input.required(/* @ts-ignore */
|
|
1302
|
+
...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
1303
|
+
confirm = input(undefined, /* @ts-ignore */
|
|
1304
|
+
...(ngDevMode ? [{ debugName: "confirm" }] : /* istanbul ignore next */ []));
|
|
1305
|
+
cancel = input(undefined, /* @ts-ignore */
|
|
1306
|
+
...(ngDevMode ? [{ debugName: "cancel" }] : /* istanbul ignore next */ []));
|
|
1307
|
+
actionsAlign = input(this._config.actionsAlign, /* @ts-ignore */
|
|
1308
|
+
...(ngDevMode ? [{ debugName: "actionsAlign" }] : /* istanbul ignore next */ []));
|
|
1309
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
1310
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
1311
|
+
position = input(this._config.position, /* @ts-ignore */
|
|
1312
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
1313
|
+
offset = input(this._config.offset, /* @ts-ignore */
|
|
1314
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
1233
1315
|
// Outputs
|
|
1234
1316
|
confirmed = output();
|
|
1235
1317
|
cancelled = output();
|
|
@@ -1242,7 +1324,8 @@ class Confirm {
|
|
|
1242
1324
|
// to the trigger rather than being lost when the panel is removed.
|
|
1243
1325
|
_previouslyFocused = null;
|
|
1244
1326
|
// Computed
|
|
1245
|
-
_positions = computed(() => buildOverlayPositions(this.position(), this.offset()),
|
|
1327
|
+
_positions = computed(() => buildOverlayPositions(this.position(), this.offset()), /* @ts-ignore */
|
|
1328
|
+
...(ngDevMode ? [{ debugName: "_positions" }] : /* istanbul ignore next */ []));
|
|
1246
1329
|
// Public methods
|
|
1247
1330
|
open(trigger) {
|
|
1248
1331
|
const origin = trigger instanceof MouseEvent ? trigger.currentTarget : trigger;
|
|
@@ -1285,8 +1368,8 @@ class Confirm {
|
|
|
1285
1368
|
return;
|
|
1286
1369
|
this.cancelled.emit();
|
|
1287
1370
|
}
|
|
1288
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1289
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
1371
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Confirm, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1372
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: Confirm, isStandalone: true, selector: "tls-confirm", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, confirm: { classPropertyName: "confirm", publicName: "confirm", isSignal: true, isRequired: false, transformFunction: null }, cancel: { classPropertyName: "cancel", publicName: "cancel", isSignal: true, isRequired: false, transformFunction: null }, actionsAlign: { classPropertyName: "actionsAlign", publicName: "actionsAlign", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", cancelled: "cancelled" }, viewQueries: [{ propertyName: "_templateRef", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1290
1373
|
<ng-template #content>
|
|
1291
1374
|
<tls-confirm-panel
|
|
1292
1375
|
[title]="title()"
|
|
@@ -1301,7 +1384,7 @@ class Confirm {
|
|
|
1301
1384
|
</ng-template>
|
|
1302
1385
|
`, isInline: true, dependencies: [{ kind: "component", type: ConfirmPanel, selector: "tls-confirm-panel", inputs: ["title", "message", "confirm", "cancel", "ariaLabel", "modal", "actionsAlign"], outputs: ["confirmed", "cancelled"] }] });
|
|
1303
1386
|
}
|
|
1304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Confirm, decorators: [{
|
|
1305
1388
|
type: Component,
|
|
1306
1389
|
args: [{
|
|
1307
1390
|
selector: 'tls-confirm',
|
|
@@ -1446,10 +1529,10 @@ class ConfirmService {
|
|
|
1446
1529
|
paneElement.addEventListener('animationend', finalize);
|
|
1447
1530
|
const timeoutId = window.setTimeout(finalize, LEAVE_ANIMATION_FALLBACK_MS$2);
|
|
1448
1531
|
}
|
|
1449
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1450
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1532
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1533
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmService, providedIn: 'root' });
|
|
1451
1534
|
}
|
|
1452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmService, decorators: [{
|
|
1453
1536
|
type: Injectable,
|
|
1454
1537
|
args: [{ providedIn: 'root' }]
|
|
1455
1538
|
}] });
|
|
@@ -1474,10 +1557,10 @@ class Dialog extends CdkDialogContainer {
|
|
|
1474
1557
|
close() {
|
|
1475
1558
|
this._dialogRef.close();
|
|
1476
1559
|
}
|
|
1477
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1478
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1560
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Dialog, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1561
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Dialog, isStandalone: true, selector: "tls-dialog", host: { properties: { "class": "hostClasses" } }, usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-dialog__close\" type=\"button\" aria-label=\"Close dialog\" (click)=\"close()\">\n <svg viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L9 9M9 1L1 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n}\n", dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
|
|
1479
1562
|
}
|
|
1480
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Dialog, decorators: [{
|
|
1481
1564
|
type: Component,
|
|
1482
1565
|
args: [{ selector: 'tls-dialog', imports: [CdkPortalOutlet], host: { '[class]': 'hostClasses' }, template: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-dialog__close\" type=\"button\" aria-label=\"Close dialog\" (click)=\"close()\">\n <svg viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L9 9M9 1L1 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n}\n" }]
|
|
1483
1566
|
}] });
|
|
@@ -1509,10 +1592,10 @@ class DialogService {
|
|
|
1509
1592
|
closeAll() {
|
|
1510
1593
|
this._dialog.closeAll();
|
|
1511
1594
|
}
|
|
1512
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1513
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1595
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1596
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DialogService, providedIn: 'root' });
|
|
1514
1597
|
}
|
|
1515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DialogService, decorators: [{
|
|
1516
1599
|
type: Injectable,
|
|
1517
1600
|
args: [{ providedIn: 'root' }]
|
|
1518
1601
|
}] });
|
|
@@ -1530,10 +1613,13 @@ const DIVIDER_CONFIG = new InjectionToken('DIVIDER_CONFIG', {
|
|
|
1530
1613
|
|
|
1531
1614
|
class Divider {
|
|
1532
1615
|
_config = inject(DIVIDER_CONFIG);
|
|
1533
|
-
orientation = input(this._config.orientation,
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1616
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
1617
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
1618
|
+
position = input(this._config.position, /* @ts-ignore */
|
|
1619
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
1620
|
+
variant = input(this._config.variant, /* @ts-ignore */
|
|
1621
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
1622
|
+
flush = input(this._config.flush, { ...(ngDevMode ? { debugName: "flush" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1537
1623
|
hostClasses = computed(() => {
|
|
1538
1624
|
const className = 'tls-divider';
|
|
1539
1625
|
const array = [className];
|
|
@@ -1543,11 +1629,12 @@ class Divider {
|
|
|
1543
1629
|
if (this.flush())
|
|
1544
1630
|
array.push(`${className}--flush`);
|
|
1545
1631
|
return array;
|
|
1546
|
-
},
|
|
1547
|
-
|
|
1548
|
-
static
|
|
1632
|
+
}, /* @ts-ignore */
|
|
1633
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
1634
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Divider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1635
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Divider, isStandalone: true, selector: "tls-divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, flush: { classPropertyName: "flush", publicName: "flush", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "aria-orientation": "orientation()", "class": "hostClasses()" } }, ngImport: i0, template: "<span class=\"tls-divider-line tls-divider-line--start\"></span>\n<div class=\"tls-divider-content\">\n <ng-content></ng-content>\n</div>\n<span class=\"tls-divider-line tls-divider-line--end\"></span>\n" });
|
|
1549
1636
|
}
|
|
1550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Divider, decorators: [{
|
|
1551
1638
|
type: Component,
|
|
1552
1639
|
args: [{ selector: 'tls-divider', imports: [], host: {
|
|
1553
1640
|
role: 'separator',
|
|
@@ -1581,7 +1668,8 @@ class Drawer extends CdkDialogContainer {
|
|
|
1581
1668
|
_tlsConfig = inject(DRAWER_CONFIG);
|
|
1582
1669
|
_dialogRef = inject(DialogRef);
|
|
1583
1670
|
// State
|
|
1584
|
-
_state = signal('enter',
|
|
1671
|
+
_state = signal('enter', /* @ts-ignore */
|
|
1672
|
+
...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
|
|
1585
1673
|
_closing = false;
|
|
1586
1674
|
// Computed
|
|
1587
1675
|
hostClasses = computed(() => {
|
|
@@ -1594,7 +1682,8 @@ class Drawer extends CdkDialogContainer {
|
|
|
1594
1682
|
if (this._tlsConfig.rounded)
|
|
1595
1683
|
classes.push('tls-drawer--rounded');
|
|
1596
1684
|
return classes;
|
|
1597
|
-
},
|
|
1685
|
+
}, /* @ts-ignore */
|
|
1686
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
1598
1687
|
// Accessors
|
|
1599
1688
|
get config() {
|
|
1600
1689
|
return this._tlsConfig;
|
|
@@ -1658,10 +1747,10 @@ class Drawer extends CdkDialogContainer {
|
|
|
1658
1747
|
finalize();
|
|
1659
1748
|
});
|
|
1660
1749
|
}
|
|
1661
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1662
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1750
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Drawer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1751
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Drawer, isStandalone: true, selector: "tls-drawer", host: { properties: { "class": "hostClasses()", "style.--tls-drawer-size": "customSize" } }, usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-drawer__close\" type=\"button\" aria-label=\"Close drawer\" (click)=\"close()\">\n <svg viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L9 9M9 1L1 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n}\n", dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
|
|
1663
1752
|
}
|
|
1664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Drawer, decorators: [{
|
|
1665
1754
|
type: Component,
|
|
1666
1755
|
args: [{ selector: 'tls-drawer', imports: [CdkPortalOutlet], host: {
|
|
1667
1756
|
'[class]': 'hostClasses()',
|
|
@@ -1773,19 +1862,19 @@ class DrawerService {
|
|
|
1773
1862
|
.pipe(takeUntil(dialogRef.closed), filter(event => event.key === 'Escape'))
|
|
1774
1863
|
.subscribe(() => drawerRef.close());
|
|
1775
1864
|
}
|
|
1776
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1777
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1865
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1866
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DrawerService, providedIn: 'root' });
|
|
1778
1867
|
}
|
|
1779
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DrawerService, decorators: [{
|
|
1780
1869
|
type: Injectable,
|
|
1781
1870
|
args: [{ providedIn: 'root' }]
|
|
1782
1871
|
}] });
|
|
1783
1872
|
|
|
1784
1873
|
class FormControlAddon {
|
|
1785
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1786
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1874
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormControlAddon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1875
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: FormControlAddon, isStandalone: true, selector: "tls-form-control-addon", host: { classAttribute: "tls-form-control-addon" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
1787
1876
|
}
|
|
1788
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormControlAddon, decorators: [{
|
|
1789
1878
|
type: Component,
|
|
1790
1879
|
args: [{
|
|
1791
1880
|
selector: 'tls-form-control-addon',
|
|
@@ -1808,8 +1897,9 @@ const FORM_CONTROL_GROUP_CONFIG = new InjectionToken('FORM_CONTROL_GROUP_CONFIG'
|
|
|
1808
1897
|
|
|
1809
1898
|
class FormControlGroup {
|
|
1810
1899
|
_config = inject(FORM_CONTROL_GROUP_CONFIG);
|
|
1811
|
-
size = input(this._config.size,
|
|
1812
|
-
|
|
1900
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
1901
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1902
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1813
1903
|
hostClasses = computed(() => {
|
|
1814
1904
|
const className = 'tls-form-control-group';
|
|
1815
1905
|
const array = [className];
|
|
@@ -1817,11 +1907,12 @@ class FormControlGroup {
|
|
|
1817
1907
|
if (this.fluid())
|
|
1818
1908
|
array.push(`${className}--fluid`);
|
|
1819
1909
|
return array;
|
|
1820
|
-
},
|
|
1821
|
-
|
|
1822
|
-
static
|
|
1910
|
+
}, /* @ts-ignore */
|
|
1911
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
1912
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormControlGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1913
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: FormControlGroup, isStandalone: true, selector: "tls-form-control-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
1823
1914
|
}
|
|
1824
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormControlGroup, decorators: [{
|
|
1825
1916
|
type: Component,
|
|
1826
1917
|
args: [{
|
|
1827
1918
|
selector: 'tls-form-control-group',
|
|
@@ -1871,7 +1962,8 @@ class FormItem {
|
|
|
1871
1962
|
// Injections
|
|
1872
1963
|
static _counter = 0;
|
|
1873
1964
|
_config = inject(FORM_ITEM_CONFIG);
|
|
1874
|
-
control = contentChild(FORM_CONTROL,
|
|
1965
|
+
control = contentChild(FORM_CONTROL, /* @ts-ignore */
|
|
1966
|
+
...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
1875
1967
|
/** Stable id for the label element, linked to the control via `aria-labelledby`. */
|
|
1876
1968
|
labelId = `tls-form-item-label-${FormItem._counter}`;
|
|
1877
1969
|
/** Stable id assigned to the native control element, linked from the label via `for`. */
|
|
@@ -1879,24 +1971,43 @@ class FormItem {
|
|
|
1879
1971
|
/** Stable id for the error element, linked to the control via `aria-describedby`. */
|
|
1880
1972
|
errorId = `tls-form-item-error-${FormItem._counter++}`;
|
|
1881
1973
|
// Inputs
|
|
1882
|
-
label = input(
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1974
|
+
label = input(/* @ts-ignore */
|
|
1975
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1976
|
+
/**
|
|
1977
|
+
* Placement of the label relative to the control. `top` stacks the label above the control;
|
|
1978
|
+
* `start` / `end` place it inline before / after the control (typical for a checkbox or switch).
|
|
1979
|
+
*/
|
|
1980
|
+
labelPosition = input('top', /* @ts-ignore */
|
|
1981
|
+
...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
|
|
1982
|
+
/**
|
|
1983
|
+
* Pushes the label and control to opposite ends of an inline row (`space-between`), spanning the
|
|
1984
|
+
* item to full width. Only applies to inline (`start` / `end`) label positions.
|
|
1985
|
+
*/
|
|
1986
|
+
spread = input(false, { ...(ngDevMode ? { debugName: "spread" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1987
|
+
reserveErrorSpace = input(this._config.reserveErrorSpace, /* @ts-ignore */
|
|
1988
|
+
...(ngDevMode ? [{ debugName: "reserveErrorSpace" }] : /* istanbul ignore next */ []));
|
|
1989
|
+
reserveLabelSpace = input(this._config.reserveLabelSpace, /* @ts-ignore */
|
|
1990
|
+
...(ngDevMode ? [{ debugName: "reserveLabelSpace" }] : /* istanbul ignore next */ []));
|
|
1991
|
+
displayErrors = input(this._config.displayErrors, /* @ts-ignore */
|
|
1992
|
+
...(ngDevMode ? [{ debugName: "displayErrors" }] : /* istanbul ignore next */ []));
|
|
1993
|
+
showRequiredMarker = input(this._config.showRequiredMarker, /* @ts-ignore */
|
|
1994
|
+
...(ngDevMode ? [{ debugName: "showRequiredMarker" }] : /* istanbul ignore next */ []));
|
|
1995
|
+
optionalText = input(this._config.optionalText, /* @ts-ignore */
|
|
1996
|
+
...(ngDevMode ? [{ debugName: "optionalText" }] : /* istanbul ignore next */ []));
|
|
1888
1997
|
isInvalid = computed(() => {
|
|
1889
1998
|
const control = this.control();
|
|
1890
1999
|
if (!control)
|
|
1891
2000
|
return false;
|
|
1892
2001
|
return control.invalid() && control.touched();
|
|
1893
|
-
},
|
|
2002
|
+
}, /* @ts-ignore */
|
|
2003
|
+
...(ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []));
|
|
1894
2004
|
showRequired = computed(() => {
|
|
1895
2005
|
const control = this.control();
|
|
1896
2006
|
if (!control)
|
|
1897
2007
|
return false;
|
|
1898
2008
|
return this.showRequiredMarker() && control.required();
|
|
1899
|
-
},
|
|
2009
|
+
}, /* @ts-ignore */
|
|
2010
|
+
...(ngDevMode ? [{ debugName: "showRequired" }] : /* istanbul ignore next */ []));
|
|
1900
2011
|
showOptional = computed(() => {
|
|
1901
2012
|
const control = this.control();
|
|
1902
2013
|
if (!control)
|
|
@@ -1904,36 +2015,46 @@ class FormItem {
|
|
|
1904
2015
|
if (!this.optionalText())
|
|
1905
2016
|
return false;
|
|
1906
2017
|
return !control.required();
|
|
1907
|
-
},
|
|
2018
|
+
}, /* @ts-ignore */
|
|
2019
|
+
...(ngDevMode ? [{ debugName: "showOptional" }] : /* istanbul ignore next */ []));
|
|
1908
2020
|
labelFor = computed(() => {
|
|
1909
2021
|
const control = this.control();
|
|
1910
2022
|
if (!control || !control.supportsLabelFor)
|
|
1911
2023
|
return null;
|
|
1912
2024
|
return control.effectiveInputId();
|
|
1913
|
-
},
|
|
2025
|
+
}, /* @ts-ignore */
|
|
2026
|
+
...(ngDevMode ? [{ debugName: "labelFor" }] : /* istanbul ignore next */ []));
|
|
1914
2027
|
hostClasses = computed(() => {
|
|
1915
2028
|
const className = 'tls-form-item';
|
|
1916
2029
|
const array = [className];
|
|
1917
2030
|
if (this.isInvalid())
|
|
1918
2031
|
array.push(`${className}--invalid`);
|
|
2032
|
+
if (this.labelPosition() !== 'top') {
|
|
2033
|
+
array.push(`${className}--label-${this.labelPosition()}`);
|
|
2034
|
+
if (this.spread())
|
|
2035
|
+
array.push(`${className}--spread`);
|
|
2036
|
+
}
|
|
1919
2037
|
if (this.reserveErrorSpace())
|
|
1920
2038
|
array.push(`${className}--error-space-reserved`);
|
|
1921
2039
|
if (this.reserveLabelSpace())
|
|
1922
2040
|
array.push(`${className}--label-space-reserved`);
|
|
1923
2041
|
return array;
|
|
1924
|
-
},
|
|
2042
|
+
}, /* @ts-ignore */
|
|
2043
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
1925
2044
|
errorMessages = computed(() => {
|
|
1926
2045
|
const control = this.control();
|
|
1927
2046
|
if (!control)
|
|
1928
2047
|
return [];
|
|
1929
2048
|
return this._getErrorMessages(control.errors());
|
|
1930
|
-
},
|
|
2049
|
+
}, /* @ts-ignore */
|
|
2050
|
+
...(ngDevMode ? [{ debugName: "errorMessages" }] : /* istanbul ignore next */ []));
|
|
1931
2051
|
firstErrorMessage = computed(() => {
|
|
1932
2052
|
if (this.errorMessages().length > 0)
|
|
1933
2053
|
return this.errorMessages()[0];
|
|
1934
2054
|
else
|
|
1935
2055
|
return null;
|
|
1936
|
-
},
|
|
2056
|
+
}, /* @ts-ignore */
|
|
2057
|
+
...(ngDevMode ? [{ debugName: "firstErrorMessage" }] : /* istanbul ignore next */ []));
|
|
1937
2058
|
// constructor
|
|
1938
2059
|
constructor() {
|
|
1939
2060
|
effect(() => {
|
|
@@ -1962,13 +2083,13 @@ class FormItem {
|
|
|
1962
2083
|
}
|
|
1963
2084
|
return array;
|
|
1964
2085
|
}
|
|
1965
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1966
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2086
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2087
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FormItem, isStandalone: true, selector: "tls-form-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, spread: { classPropertyName: "spread", publicName: "spread", isSignal: true, isRequired: false, transformFunction: null }, reserveErrorSpace: { classPropertyName: "reserveErrorSpace", publicName: "reserveErrorSpace", isSignal: true, isRequired: false, transformFunction: null }, reserveLabelSpace: { classPropertyName: "reserveLabelSpace", publicName: "reserveLabelSpace", isSignal: true, isRequired: false, transformFunction: null }, displayErrors: { classPropertyName: "displayErrors", publicName: "displayErrors", isSignal: true, isRequired: false, transformFunction: null }, showRequiredMarker: { classPropertyName: "showRequiredMarker", publicName: "showRequiredMarker", isSignal: true, isRequired: false, transformFunction: null }, optionalText: { classPropertyName: "optionalText", publicName: "optionalText", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "control", first: true, predicate: FORM_CONTROL, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"form-item-main\">\n @if (label() || reserveLabelSpace()) {\n <label class=\"form-item-label\" [id]=\"labelId\" [attr.for]=\"labelFor()\">\n <span class=\"form-item-label__text\">{{ label() }}</span>\n @if (showRequired()) {\n <span class=\"form-item-label__required\">*</span>\n } @else if (showOptional()) {\n <span class=\"form-item-label__optional\">{{ optionalText() }}</span>\n }\n </label>\n }\n <div class=\"form-item-control\">\n <ng-content></ng-content>\n </div>\n</div>\n@if (displayErrors()) {\n <small class=\"form-item-error\">\n @if (isInvalid()) {\n <span class=\"form-item-error__text\" [id]=\"errorId\">\n {{ firstErrorMessage() }}\n </span>\n }\n </small>\n}\n" });
|
|
1967
2088
|
}
|
|
1968
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormItem, decorators: [{
|
|
1969
2090
|
type: Component,
|
|
1970
|
-
args: [{ selector: 'tls-form-item', imports: [], host: { '[class]': 'hostClasses()' }, template: "@if (label() || reserveLabelSpace()) {\n
|
|
1971
|
-
}], ctorParameters: () => [], propDecorators: { control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FORM_CONTROL), { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], reserveErrorSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveErrorSpace", required: false }] }], reserveLabelSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveLabelSpace", required: false }] }], displayErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayErrors", required: false }] }], showRequiredMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRequiredMarker", required: false }] }], optionalText: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionalText", required: false }] }] } });
|
|
2091
|
+
args: [{ selector: 'tls-form-item', imports: [], host: { '[class]': 'hostClasses()' }, template: "<div class=\"form-item-main\">\n @if (label() || reserveLabelSpace()) {\n <label class=\"form-item-label\" [id]=\"labelId\" [attr.for]=\"labelFor()\">\n <span class=\"form-item-label__text\">{{ label() }}</span>\n @if (showRequired()) {\n <span class=\"form-item-label__required\">*</span>\n } @else if (showOptional()) {\n <span class=\"form-item-label__optional\">{{ optionalText() }}</span>\n }\n </label>\n }\n <div class=\"form-item-control\">\n <ng-content></ng-content>\n </div>\n</div>\n@if (displayErrors()) {\n <small class=\"form-item-error\">\n @if (isInvalid()) {\n <span class=\"form-item-error__text\" [id]=\"errorId\">\n {{ firstErrorMessage() }}\n </span>\n }\n </small>\n}\n" }]
|
|
2092
|
+
}], ctorParameters: () => [], propDecorators: { control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FORM_CONTROL), { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], spread: [{ type: i0.Input, args: [{ isSignal: true, alias: "spread", required: false }] }], reserveErrorSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveErrorSpace", required: false }] }], reserveLabelSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveLabelSpace", required: false }] }], displayErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayErrors", required: false }] }], showRequiredMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRequiredMarker", required: false }] }], optionalText: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionalText", required: false }] }] } });
|
|
1972
2093
|
|
|
1973
2094
|
const DEFAULT_CHECKBOX_CONFIG = {};
|
|
1974
2095
|
|
|
@@ -1980,16 +2101,20 @@ class Checkbox extends CheckboxFormControl {
|
|
|
1980
2101
|
_config = inject(CHECKBOX_CONFIG);
|
|
1981
2102
|
CLASS_NAME = 'tls-checkbox';
|
|
1982
2103
|
supportsLabelFor = true;
|
|
1983
|
-
indeterminate = model(false,
|
|
1984
|
-
|
|
1985
|
-
|
|
2104
|
+
indeterminate = model(false, /* @ts-ignore */
|
|
2105
|
+
...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
2106
|
+
checked = model(false, /* @ts-ignore */
|
|
2107
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
2108
|
+
tabindex = input(0, /* @ts-ignore */
|
|
2109
|
+
...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
1986
2110
|
hostClasses = computed(() => {
|
|
1987
2111
|
const className = this.CLASS_NAME;
|
|
1988
2112
|
const array = [className];
|
|
1989
2113
|
if (this.indeterminate())
|
|
1990
2114
|
array.push(`${className}--indeterminate`);
|
|
1991
2115
|
return array.concat(this.controlClasses());
|
|
1992
|
-
},
|
|
2116
|
+
}, /* @ts-ignore */
|
|
2117
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
1993
2118
|
// Protected methods
|
|
1994
2119
|
toggle() {
|
|
1995
2120
|
if (this.notInteractive())
|
|
@@ -2000,16 +2125,16 @@ class Checkbox extends CheckboxFormControl {
|
|
|
2000
2125
|
event.preventDefault();
|
|
2001
2126
|
this.toggle();
|
|
2002
2127
|
}
|
|
2003
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2004
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Checkbox, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2129
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Checkbox, isStandalone: true, selector: "tls-checkbox", inputs: { indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indeterminate: "indeterminateChange", checked: "checkedChange" }, host: { attributes: { "role": "checkbox" }, properties: { "class": "hostClasses()", "tabindex": "-1" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Checkbox) }], usesInheritance: true, ngImport: i0, template: "<input\n type=\"checkbox\"\n class=\"tls-checkbox-input\"\n [attr.id]=\"effectiveInputId()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown.space)=\"onKeyboardToggle($event)\"\n (keydown.enter)=\"onKeyboardToggle($event)\"\n/>\n<div class=\"tls-checkbox-icon\">\n @if (indeterminate()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M288-444v-72h384v72H288Z\" />\n </svg>\n } @else {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M400-301 240-461l51-51 109 109 269-269 51 51-320 320Z\" />\n </svg>\n }\n</div>\n" });
|
|
2005
2130
|
}
|
|
2006
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Checkbox, decorators: [{
|
|
2007
2132
|
type: Component,
|
|
2008
2133
|
args: [{ selector: 'tls-checkbox', imports: [], host: {
|
|
2009
2134
|
role: 'checkbox',
|
|
2010
2135
|
'[class]': 'hostClasses()',
|
|
2011
2136
|
'[tabindex]': '-1',
|
|
2012
|
-
}, template: "<input\n type=\"checkbox\"\n class=\"tls-checkbox-input\"\n [attr.id]=\"effectiveInputId()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown.space)=\"onKeyboardToggle($event)\"\n (keydown.enter)=\"onKeyboardToggle($event)\"\n/>\n<div class=\"tls-checkbox-icon\">\n @if (indeterminate()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M288-444v-72h384v72H288Z\" />\n </svg>\n } @else {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M400-301 240-461l51-51 109 109 269-269 51 51-320 320Z\" />\n </svg>\n }\n</div>\n" }]
|
|
2137
|
+
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Checkbox) }], template: "<input\n type=\"checkbox\"\n class=\"tls-checkbox-input\"\n [attr.id]=\"effectiveInputId()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown.space)=\"onKeyboardToggle($event)\"\n (keydown.enter)=\"onKeyboardToggle($event)\"\n/>\n<div class=\"tls-checkbox-icon\">\n @if (indeterminate()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M288-444v-72h384v72H288Z\" />\n </svg>\n } @else {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M400-301 240-461l51-51 109 109 269-269 51 51-320 320Z\" />\n </svg>\n }\n</div>\n" }]
|
|
2013
2138
|
}], propDecorators: { indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
2014
2139
|
|
|
2015
2140
|
const DEFAULT_POPOVER_CONFIG = {
|
|
@@ -2028,10 +2153,14 @@ class Popover {
|
|
|
2028
2153
|
_templateRef = viewChild.required('content');
|
|
2029
2154
|
id = `tls-popover-${++Popover._counter}`;
|
|
2030
2155
|
isOpen = this._overlay.isOpen;
|
|
2031
|
-
position = input(this._config.position,
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2156
|
+
position = input(this._config.position, /* @ts-ignore */
|
|
2157
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
2158
|
+
offset = input(this._config.offset, /* @ts-ignore */
|
|
2159
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
2160
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
2161
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
2162
|
+
_positions = computed(() => buildOverlayPositions(this.position(), this.offset()), /* @ts-ignore */
|
|
2163
|
+
...(ngDevMode ? [{ debugName: "_positions" }] : /* istanbul ignore next */ []));
|
|
2035
2164
|
// Public methods
|
|
2036
2165
|
open(trigger) {
|
|
2037
2166
|
const origin = trigger instanceof MouseEvent ? trigger.currentTarget : trigger;
|
|
@@ -2052,8 +2181,8 @@ class Popover {
|
|
|
2052
2181
|
this.open(trigger);
|
|
2053
2182
|
}
|
|
2054
2183
|
}
|
|
2055
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2056
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
2184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Popover, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2185
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: Popover, isStandalone: true, selector: "tls-popover", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_templateRef", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2057
2186
|
<ng-template #content>
|
|
2058
2187
|
<div
|
|
2059
2188
|
class="tls-popover"
|
|
@@ -2069,7 +2198,7 @@ class Popover {
|
|
|
2069
2198
|
</ng-template>
|
|
2070
2199
|
`, isInline: true });
|
|
2071
2200
|
}
|
|
2072
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Popover, decorators: [{
|
|
2073
2202
|
type: Component,
|
|
2074
2203
|
args: [{
|
|
2075
2204
|
selector: 'tls-popover',
|
|
@@ -2093,10 +2222,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2093
2222
|
|
|
2094
2223
|
class Calendar {
|
|
2095
2224
|
// Inputs
|
|
2096
|
-
viewDate = input.required(
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2225
|
+
viewDate = input.required(/* @ts-ignore */
|
|
2226
|
+
...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
|
|
2227
|
+
selectedDate = input.required(/* @ts-ignore */
|
|
2228
|
+
...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
|
|
2229
|
+
weekStartsOn = input.required(/* @ts-ignore */
|
|
2230
|
+
...(ngDevMode ? [{ debugName: "weekStartsOn" }] : /* istanbul ignore next */ []));
|
|
2231
|
+
weekDays = input.required(/* @ts-ignore */
|
|
2232
|
+
...(ngDevMode ? [{ debugName: "weekDays" }] : /* istanbul ignore next */ []));
|
|
2100
2233
|
// Outputs
|
|
2101
2234
|
daySelect = output();
|
|
2102
2235
|
viewDateChange = output();
|
|
@@ -2106,8 +2239,10 @@ class Calendar {
|
|
|
2106
2239
|
const startDay = this.weekStartsOn();
|
|
2107
2240
|
const days = this.weekDays();
|
|
2108
2241
|
return [...days.slice(startDay), ...days.slice(0, startDay)];
|
|
2109
|
-
},
|
|
2110
|
-
|
|
2242
|
+
}, /* @ts-ignore */
|
|
2243
|
+
...(ngDevMode ? [{ debugName: "displayedWeekDays" }] : /* istanbul ignore next */ []));
|
|
2244
|
+
headerLabel = computed(() => format(this.viewDate(), 'MMMM yyyy'), /* @ts-ignore */
|
|
2245
|
+
...(ngDevMode ? [{ debugName: "headerLabel" }] : /* istanbul ignore next */ []));
|
|
2111
2246
|
days = computed(() => {
|
|
2112
2247
|
const monthStart = startOfMonth(this.viewDate());
|
|
2113
2248
|
const monthEnd = endOfMonth(this.viewDate());
|
|
@@ -2116,7 +2251,8 @@ class Calendar {
|
|
|
2116
2251
|
start: startOfWeek(monthStart, { weekStartsOn }),
|
|
2117
2252
|
end: endOfWeek(monthEnd, { weekStartsOn }),
|
|
2118
2253
|
});
|
|
2119
|
-
},
|
|
2254
|
+
}, /* @ts-ignore */
|
|
2255
|
+
...(ngDevMode ? [{ debugName: "days" }] : /* istanbul ignore next */ []));
|
|
2120
2256
|
// Protected methods
|
|
2121
2257
|
prevMonth() {
|
|
2122
2258
|
this.viewDateChange.emit(subMonths(this.viewDate(), 1));
|
|
@@ -2137,10 +2273,10 @@ class Calendar {
|
|
|
2137
2273
|
isTodayDay(day) {
|
|
2138
2274
|
return isToday(day);
|
|
2139
2275
|
}
|
|
2140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2141
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2276
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Calendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2277
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Calendar, isStandalone: true, selector: "tls-calendar", inputs: { viewDate: { classPropertyName: "viewDate", publicName: "viewDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: true, transformFunction: null }, weekDays: { classPropertyName: "weekDays", publicName: "weekDays", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { daySelect: "daySelect", viewDateChange: "viewDateChange", navigateUp: "navigateUp" }, host: { classAttribute: "tls-calendar" }, ngImport: i0, template: "<div class=\"tls-calendar__header\">\n <button type=\"button\" class=\"tls-calendar__nav\" (click)=\"prevMonth()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <button type=\"button\" class=\"tls-calendar__header-button\" (click)=\"navigateUp.emit()\">\n {{ headerLabel() }}\n </button>\n <button type=\"button\" class=\"tls-calendar__nav\" (click)=\"nextMonth()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n\n<div class=\"tls-calendar__grid\">\n @for (day of displayedWeekDays(); track day) {\n <span class=\"tls-calendar__weekday\">{{ day }}</span>\n }\n @for (day of days(); track day.getTime()) {\n <button\n type=\"button\"\n class=\"tls-calendar__day\"\n [class.tls-calendar__day--outside]=\"!isInCurrentMonth(day)\"\n [class.tls-calendar__day--today]=\"isTodayDay(day)\"\n [class.tls-calendar__day--selected]=\"isSelectedDay(day)\"\n (click)=\"daySelect.emit(day)\"\n >\n {{ getDayLabel(day) }}\n </button>\n }\n</div>\n" });
|
|
2142
2278
|
}
|
|
2143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Calendar, decorators: [{
|
|
2144
2280
|
type: Component,
|
|
2145
2281
|
args: [{ selector: 'tls-calendar', imports: [], host: { class: 'tls-calendar' }, template: "<div class=\"tls-calendar__header\">\n <button type=\"button\" class=\"tls-calendar__nav\" (click)=\"prevMonth()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <button type=\"button\" class=\"tls-calendar__header-button\" (click)=\"navigateUp.emit()\">\n {{ headerLabel() }}\n </button>\n <button type=\"button\" class=\"tls-calendar__nav\" (click)=\"nextMonth()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n\n<div class=\"tls-calendar__grid\">\n @for (day of displayedWeekDays(); track day) {\n <span class=\"tls-calendar__weekday\">{{ day }}</span>\n }\n @for (day of days(); track day.getTime()) {\n <button\n type=\"button\"\n class=\"tls-calendar__day\"\n [class.tls-calendar__day--outside]=\"!isInCurrentMonth(day)\"\n [class.tls-calendar__day--today]=\"isTodayDay(day)\"\n [class.tls-calendar__day--selected]=\"isSelectedDay(day)\"\n (click)=\"daySelect.emit(day)\"\n >\n {{ getDayLabel(day) }}\n </button>\n }\n</div>\n" }]
|
|
2146
2282
|
}], propDecorators: { viewDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewDate", required: true }] }], selectedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDate", required: true }] }], weekStartsOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekStartsOn", required: true }] }], weekDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekDays", required: true }] }], daySelect: [{ type: i0.Output, args: ["daySelect"] }], viewDateChange: [{ type: i0.Output, args: ["viewDateChange"] }], navigateUp: [{ type: i0.Output, args: ["navigateUp"] }] } });
|
|
@@ -2160,15 +2296,18 @@ const DATE_TIME_PICKER_CONFIG = new InjectionToken('DATE_TIME_PICKER_CONFIG', {
|
|
|
2160
2296
|
const MONTH_INDEXES = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
2161
2297
|
class MonthPicker {
|
|
2162
2298
|
// Inputs
|
|
2163
|
-
viewDate = input.required(
|
|
2164
|
-
|
|
2299
|
+
viewDate = input.required(/* @ts-ignore */
|
|
2300
|
+
...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
|
|
2301
|
+
selectedDate = input.required(/* @ts-ignore */
|
|
2302
|
+
...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
|
|
2165
2303
|
// Outputs
|
|
2166
2304
|
monthSelect = output();
|
|
2167
2305
|
viewDateChange = output();
|
|
2168
2306
|
navigateUp = output();
|
|
2169
2307
|
// Computed
|
|
2170
2308
|
months = MONTH_INDEXES;
|
|
2171
|
-
yearLabel = computed(() => format(this.viewDate(), 'yyyy'),
|
|
2309
|
+
yearLabel = computed(() => format(this.viewDate(), 'yyyy'), /* @ts-ignore */
|
|
2310
|
+
...(ngDevMode ? [{ debugName: "yearLabel" }] : /* istanbul ignore next */ []));
|
|
2172
2311
|
// Protected methods
|
|
2173
2312
|
getMonthLabel(monthIndex) {
|
|
2174
2313
|
return format(setMonth(new Date(2000, 0, 1), monthIndex), 'MMM');
|
|
@@ -2191,30 +2330,35 @@ class MonthPicker {
|
|
|
2191
2330
|
isCurrentMonth(monthIndex) {
|
|
2192
2331
|
return isSameMonth(new Date(), setMonth(this.viewDate(), monthIndex));
|
|
2193
2332
|
}
|
|
2194
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2195
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2333
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MonthPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2334
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: MonthPicker, isStandalone: true, selector: "tls-month-picker", inputs: { viewDate: { classPropertyName: "viewDate", publicName: "viewDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { monthSelect: "monthSelect", viewDateChange: "viewDateChange", navigateUp: "navigateUp" }, host: { classAttribute: "tls-month-picker" }, ngImport: i0, template: "<div class=\"tls-month-picker__header\">\n <button type=\"button\" class=\"tls-month-picker__nav\" (click)=\"prevYear()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <button type=\"button\" class=\"tls-month-picker__header-button\" (click)=\"navigateUp.emit()\">\n {{ yearLabel() }}\n </button>\n <button type=\"button\" class=\"tls-month-picker__nav\" (click)=\"nextYear()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n<div class=\"tls-month-picker__grid\">\n @for (month of months; track month) {\n <button\n type=\"button\"\n class=\"tls-month-picker__cell\"\n [class.tls-month-picker__cell--selected]=\"isSelectedMonth(month)\"\n [class.tls-month-picker__cell--current]=\"isCurrentMonth(month)\"\n (click)=\"selectMonth(month)\"\n >\n {{ getMonthLabel(month) }}\n </button>\n }\n</div>\n" });
|
|
2196
2335
|
}
|
|
2197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MonthPicker, decorators: [{
|
|
2198
2337
|
type: Component,
|
|
2199
2338
|
args: [{ selector: 'tls-month-picker', imports: [], host: { class: 'tls-month-picker' }, template: "<div class=\"tls-month-picker__header\">\n <button type=\"button\" class=\"tls-month-picker__nav\" (click)=\"prevYear()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <button type=\"button\" class=\"tls-month-picker__header-button\" (click)=\"navigateUp.emit()\">\n {{ yearLabel() }}\n </button>\n <button type=\"button\" class=\"tls-month-picker__nav\" (click)=\"nextYear()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n<div class=\"tls-month-picker__grid\">\n @for (month of months; track month) {\n <button\n type=\"button\"\n class=\"tls-month-picker__cell\"\n [class.tls-month-picker__cell--selected]=\"isSelectedMonth(month)\"\n [class.tls-month-picker__cell--current]=\"isCurrentMonth(month)\"\n (click)=\"selectMonth(month)\"\n >\n {{ getMonthLabel(month) }}\n </button>\n }\n</div>\n" }]
|
|
2200
2339
|
}], propDecorators: { viewDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewDate", required: true }] }], selectedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDate", required: true }] }], monthSelect: [{ type: i0.Output, args: ["monthSelect"] }], viewDateChange: [{ type: i0.Output, args: ["viewDateChange"] }], navigateUp: [{ type: i0.Output, args: ["navigateUp"] }] } });
|
|
2201
2340
|
|
|
2202
2341
|
class TimePicker {
|
|
2203
2342
|
// Inputs
|
|
2204
|
-
value = input.required(
|
|
2343
|
+
value = input.required(/* @ts-ignore */
|
|
2344
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2205
2345
|
// Outputs
|
|
2206
2346
|
timeChange = output();
|
|
2207
2347
|
// Computed
|
|
2208
2348
|
hours = computed(() => {
|
|
2209
2349
|
const date = this.value();
|
|
2210
2350
|
return date ? getHours(date) : 0;
|
|
2211
|
-
},
|
|
2351
|
+
}, /* @ts-ignore */
|
|
2352
|
+
...(ngDevMode ? [{ debugName: "hours" }] : /* istanbul ignore next */ []));
|
|
2212
2353
|
minutes = computed(() => {
|
|
2213
2354
|
const date = this.value();
|
|
2214
2355
|
return date ? getMinutes(date) : 0;
|
|
2215
|
-
},
|
|
2216
|
-
|
|
2217
|
-
|
|
2356
|
+
}, /* @ts-ignore */
|
|
2357
|
+
...(ngDevMode ? [{ debugName: "minutes" }] : /* istanbul ignore next */ []));
|
|
2358
|
+
hoursLabel = computed(() => String(this.hours()).padStart(2, '0'), /* @ts-ignore */
|
|
2359
|
+
...(ngDevMode ? [{ debugName: "hoursLabel" }] : /* istanbul ignore next */ []));
|
|
2360
|
+
minutesLabel = computed(() => String(this.minutes()).padStart(2, '0'), /* @ts-ignore */
|
|
2361
|
+
...(ngDevMode ? [{ debugName: "minutesLabel" }] : /* istanbul ignore next */ []));
|
|
2218
2362
|
// Private accessors
|
|
2219
2363
|
get _baseDate() {
|
|
2220
2364
|
return this.value() ?? startOfDay(new Date());
|
|
@@ -2232,19 +2376,22 @@ class TimePicker {
|
|
|
2232
2376
|
decrementMinutes() {
|
|
2233
2377
|
this.timeChange.emit(setMinutes(this._baseDate, (this.minutes() + 59) % 60));
|
|
2234
2378
|
}
|
|
2235
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2236
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
2379
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TimePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2380
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: TimePicker, isStandalone: true, selector: "tls-time-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { timeChange: "timeChange" }, host: { classAttribute: "tls-time-picker" }, ngImport: i0, template: "<div class=\"tls-time-picker__column\">\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"incrementHours()\">\n <svg viewBox=\"0 0 14 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 7L7 1L13 7\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <span class=\"tls-time-picker__value\">{{ hoursLabel() }}</span>\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"decrementHours()\">\n <svg viewBox=\"0 0 14 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L13 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n\n<span class=\"tls-time-picker__separator\">:</span>\n\n<div class=\"tls-time-picker__column\">\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"incrementMinutes()\">\n <svg viewBox=\"0 0 14 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 7L7 1L13 7\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <span class=\"tls-time-picker__value\">{{ minutesLabel() }}</span>\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"decrementMinutes()\">\n <svg viewBox=\"0 0 14 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L13 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n" });
|
|
2237
2381
|
}
|
|
2238
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TimePicker, decorators: [{
|
|
2239
2383
|
type: Component,
|
|
2240
2384
|
args: [{ selector: 'tls-time-picker', imports: [], host: { class: 'tls-time-picker' }, template: "<div class=\"tls-time-picker__column\">\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"incrementHours()\">\n <svg viewBox=\"0 0 14 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 7L7 1L13 7\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <span class=\"tls-time-picker__value\">{{ hoursLabel() }}</span>\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"decrementHours()\">\n <svg viewBox=\"0 0 14 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L13 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n\n<span class=\"tls-time-picker__separator\">:</span>\n\n<div class=\"tls-time-picker__column\">\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"incrementMinutes()\">\n <svg viewBox=\"0 0 14 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 7L7 1L13 7\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <span class=\"tls-time-picker__value\">{{ minutesLabel() }}</span>\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"decrementMinutes()\">\n <svg viewBox=\"0 0 14 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L13 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n" }]
|
|
2241
2385
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], timeChange: [{ type: i0.Output, args: ["timeChange"] }] } });
|
|
2242
2386
|
|
|
2243
2387
|
class YearPicker {
|
|
2244
2388
|
// Inputs
|
|
2245
|
-
viewDate = input.required(
|
|
2246
|
-
|
|
2247
|
-
|
|
2389
|
+
viewDate = input.required(/* @ts-ignore */
|
|
2390
|
+
...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
|
|
2391
|
+
selectedDate = input.required(/* @ts-ignore */
|
|
2392
|
+
...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
|
|
2393
|
+
yearsPerPage = input.required(/* @ts-ignore */
|
|
2394
|
+
...(ngDevMode ? [{ debugName: "yearsPerPage" }] : /* istanbul ignore next */ []));
|
|
2248
2395
|
// Outputs
|
|
2249
2396
|
yearSelect = output();
|
|
2250
2397
|
viewDateChange = output();
|
|
@@ -2254,11 +2401,13 @@ class YearPicker {
|
|
|
2254
2401
|
const perPage = this.yearsPerPage();
|
|
2255
2402
|
const start = Math.floor(year / perPage) * perPage;
|
|
2256
2403
|
return Array.from({ length: perPage }, (_, index) => start + index);
|
|
2257
|
-
},
|
|
2404
|
+
}, /* @ts-ignore */
|
|
2405
|
+
...(ngDevMode ? [{ debugName: "years" }] : /* istanbul ignore next */ []));
|
|
2258
2406
|
rangeLabel = computed(() => {
|
|
2259
2407
|
const yearsArray = this.years();
|
|
2260
2408
|
return `${yearsArray[0]} – ${yearsArray[yearsArray.length - 1]}`;
|
|
2261
|
-
},
|
|
2409
|
+
}, /* @ts-ignore */
|
|
2410
|
+
...(ngDevMode ? [{ debugName: "rangeLabel" }] : /* istanbul ignore next */ []));
|
|
2262
2411
|
// Protected methods
|
|
2263
2412
|
prevPage() {
|
|
2264
2413
|
this.viewDateChange.emit(subYears(this.viewDate(), this.yearsPerPage()));
|
|
@@ -2276,10 +2425,10 @@ class YearPicker {
|
|
|
2276
2425
|
isCurrentYear(year) {
|
|
2277
2426
|
return getYear(new Date()) === year;
|
|
2278
2427
|
}
|
|
2279
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2280
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2428
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: YearPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2429
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: YearPicker, isStandalone: true, selector: "tls-year-picker", inputs: { viewDate: { classPropertyName: "viewDate", publicName: "viewDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, yearsPerPage: { classPropertyName: "yearsPerPage", publicName: "yearsPerPage", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { yearSelect: "yearSelect", viewDateChange: "viewDateChange" }, host: { classAttribute: "tls-year-picker" }, ngImport: i0, template: "<div class=\"tls-year-picker__header\">\n <button type=\"button\" class=\"tls-year-picker__nav\" (click)=\"prevPage()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <span class=\"tls-year-picker__range\">{{ rangeLabel() }}</span>\n <button type=\"button\" class=\"tls-year-picker__nav\" (click)=\"nextPage()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n<div class=\"tls-year-picker__grid\">\n @for (year of years(); track year) {\n <button\n type=\"button\"\n class=\"tls-year-picker__cell\"\n [class.tls-year-picker__cell--selected]=\"isSelectedYear(year)\"\n [class.tls-year-picker__cell--current]=\"isCurrentYear(year)\"\n (click)=\"selectYear(year)\"\n >\n {{ year }}\n </button>\n }\n</div>\n" });
|
|
2281
2430
|
}
|
|
2282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: YearPicker, decorators: [{
|
|
2283
2432
|
type: Component,
|
|
2284
2433
|
args: [{ selector: 'tls-year-picker', imports: [], host: { class: 'tls-year-picker' }, template: "<div class=\"tls-year-picker__header\">\n <button type=\"button\" class=\"tls-year-picker__nav\" (click)=\"prevPage()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <span class=\"tls-year-picker__range\">{{ rangeLabel() }}</span>\n <button type=\"button\" class=\"tls-year-picker__nav\" (click)=\"nextPage()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n<div class=\"tls-year-picker__grid\">\n @for (year of years(); track year) {\n <button\n type=\"button\"\n class=\"tls-year-picker__cell\"\n [class.tls-year-picker__cell--selected]=\"isSelectedYear(year)\"\n [class.tls-year-picker__cell--current]=\"isCurrentYear(year)\"\n (click)=\"selectYear(year)\"\n >\n {{ year }}\n </button>\n }\n</div>\n" }]
|
|
2285
2434
|
}], propDecorators: { viewDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewDate", required: true }] }], selectedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDate", required: true }] }], yearsPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "yearsPerPage", required: true }] }], yearSelect: [{ type: i0.Output, args: ["yearSelect"] }], viewDateChange: [{ type: i0.Output, args: ["viewDateChange"] }] } });
|
|
@@ -2288,20 +2437,30 @@ class DateTimePicker extends ValueFormControl {
|
|
|
2288
2437
|
// Injections
|
|
2289
2438
|
config = inject(DATE_TIME_PICKER_CONFIG);
|
|
2290
2439
|
// View children
|
|
2291
|
-
popoverComponent = viewChild('popoverRef',
|
|
2440
|
+
popoverComponent = viewChild('popoverRef', /* @ts-ignore */
|
|
2441
|
+
...(ngDevMode ? [{ debugName: "popoverComponent" }] : /* istanbul ignore next */ []));
|
|
2292
2442
|
// Inputs
|
|
2293
|
-
value = model(null,
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2443
|
+
value = model(null, /* @ts-ignore */
|
|
2444
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2445
|
+
mode = input(this.config.mode, /* @ts-ignore */
|
|
2446
|
+
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
2447
|
+
inline = input(this.config.inline, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2448
|
+
placeholder = input(this.config.placeholder, /* @ts-ignore */
|
|
2449
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2450
|
+
size = input(this.config.size, /* @ts-ignore */
|
|
2451
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2452
|
+
fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2453
|
+
yearsPerPage = input(this.config.yearsPerPage, /* @ts-ignore */
|
|
2454
|
+
...(ngDevMode ? [{ debugName: "yearsPerPage" }] : /* istanbul ignore next */ []));
|
|
2455
|
+
weekStartsOn = input(this.config.weekStartsOn, /* @ts-ignore */
|
|
2456
|
+
...(ngDevMode ? [{ debugName: "weekStartsOn" }] : /* istanbul ignore next */ []));
|
|
2457
|
+
weekDays = input(this.config.weekDays, /* @ts-ignore */
|
|
2458
|
+
...(ngDevMode ? [{ debugName: "weekDays" }] : /* istanbul ignore next */ []));
|
|
2302
2459
|
// State
|
|
2303
|
-
viewDate = signal(new Date(),
|
|
2304
|
-
|
|
2460
|
+
viewDate = signal(new Date(), /* @ts-ignore */
|
|
2461
|
+
...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
|
|
2462
|
+
activeView = signal(this.config.mode, /* @ts-ignore */
|
|
2463
|
+
...(ngDevMode ? [{ debugName: "activeView" }] : /* istanbul ignore next */ []));
|
|
2305
2464
|
// Computed
|
|
2306
2465
|
hostClasses = computed(() => {
|
|
2307
2466
|
const classes = ['tls-date-time-picker'];
|
|
@@ -2312,7 +2471,8 @@ class DateTimePicker extends ValueFormControl {
|
|
|
2312
2471
|
return classes.concat(this.controlClasses());
|
|
2313
2472
|
}
|
|
2314
2473
|
return classes;
|
|
2315
|
-
},
|
|
2474
|
+
}, /* @ts-ignore */
|
|
2475
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
2316
2476
|
triggerLabel = computed(() => {
|
|
2317
2477
|
const value = this.value();
|
|
2318
2478
|
if (!value)
|
|
@@ -2327,7 +2487,8 @@ class DateTimePicker extends ValueFormControl {
|
|
|
2327
2487
|
if (mode === 'time-picker')
|
|
2328
2488
|
return format(value, 'HH:mm');
|
|
2329
2489
|
return format(value, 'MMM d, yyyy HH:mm');
|
|
2330
|
-
},
|
|
2490
|
+
}, /* @ts-ignore */
|
|
2491
|
+
...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
2331
2492
|
constructor() {
|
|
2332
2493
|
super();
|
|
2333
2494
|
effect(() => {
|
|
@@ -2378,10 +2539,10 @@ class DateTimePicker extends ValueFormControl {
|
|
|
2378
2539
|
return;
|
|
2379
2540
|
this.value.set(date);
|
|
2380
2541
|
}
|
|
2381
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2382
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2542
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2543
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: DateTimePicker, isStandalone: true, selector: "tls-date-time-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, yearsPerPage: { classPropertyName: "yearsPerPage", publicName: "yearsPerPage", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, weekDays: { classPropertyName: "weekDays", publicName: "weekDays", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => DateTimePicker) }], viewQueries: [{ propertyName: "popoverComponent", first: true, predicate: ["popoverRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #pickerTemplate>\n @switch (activeView()) {\n @case ('calendar') {\n <tls-calendar\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n (daySelect)=\"onDaySelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('month-picker')\"\n />\n }\n @case ('month-picker') {\n <tls-month-picker\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n (monthSelect)=\"onMonthSelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('year-picker')\"\n />\n }\n @case ('year-picker') {\n <tls-year-picker\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [yearsPerPage]=\"yearsPerPage()\"\n (yearSelect)=\"onYearSelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n />\n }\n @case ('time-picker') {\n <tls-time-picker\n [value]=\"value()\"\n (timeChange)=\"onTimeChange($event)\"\n />\n }\n @case ('date-time') {\n <tls-calendar\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n (daySelect)=\"onDaySelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('month-picker')\"\n />\n <tls-time-picker\n [value]=\"value()\"\n (timeChange)=\"onTimeChange($event)\"\n />\n }\n }\n</ng-template>\n\n@if (inline()) {\n <div\n class=\"tls-date-time-picker__panel\"\n role=\"group\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [class.tls-date-time-picker__panel--disabled]=\"disabled()\"\n [class.tls-date-time-picker__panel--readonly]=\"readonly()\"\n [class.tls-date-time-picker__panel--invalid]=\"invalid()\"\n >\n <ng-container [ngTemplateOutlet]=\"pickerTemplate\" />\n </div>\n} @else {\n <button\n type=\"button\"\n class=\"tls-date-time-picker__trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-expanded]=\"popoverRef.isOpen()\"\n [disabled]=\"disabled()\"\n (click)=\"popoverRef.toggle($event)\"\n (blur)=\"touched.set(true)\"\n >\n <span [class.tls-form-control__placeholder]=\"!value()\">{{ triggerLabel() }}</span>\n </button>\n <tls-popover #popoverRef position=\"bottom-start\">\n <ng-container [ngTemplateOutlet]=\"pickerTemplate\" />\n </tls-popover>\n}\n", dependencies: [{ kind: "component", type: Calendar, selector: "tls-calendar", inputs: ["viewDate", "selectedDate", "weekStartsOn", "weekDays"], outputs: ["daySelect", "viewDateChange", "navigateUp"] }, { kind: "component", type: MonthPicker, selector: "tls-month-picker", inputs: ["viewDate", "selectedDate"], outputs: ["monthSelect", "viewDateChange", "navigateUp"] }, { kind: "component", type: YearPicker, selector: "tls-year-picker", inputs: ["viewDate", "selectedDate", "yearsPerPage"], outputs: ["yearSelect", "viewDateChange"] }, { kind: "component", type: TimePicker, selector: "tls-time-picker", inputs: ["value"], outputs: ["timeChange"] }, { kind: "component", type: Popover, selector: "tls-popover", inputs: ["position", "offset", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
2383
2544
|
}
|
|
2384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateTimePicker, decorators: [{
|
|
2385
2546
|
type: Component,
|
|
2386
2547
|
args: [{ selector: 'tls-date-time-picker', imports: [Calendar, MonthPicker, YearPicker, TimePicker, Popover, NgTemplateOutlet], host: { '[class]': 'hostClasses()' }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => DateTimePicker) }], template: "<ng-template #pickerTemplate>\n @switch (activeView()) {\n @case ('calendar') {\n <tls-calendar\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n (daySelect)=\"onDaySelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('month-picker')\"\n />\n }\n @case ('month-picker') {\n <tls-month-picker\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n (monthSelect)=\"onMonthSelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('year-picker')\"\n />\n }\n @case ('year-picker') {\n <tls-year-picker\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [yearsPerPage]=\"yearsPerPage()\"\n (yearSelect)=\"onYearSelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n />\n }\n @case ('time-picker') {\n <tls-time-picker\n [value]=\"value()\"\n (timeChange)=\"onTimeChange($event)\"\n />\n }\n @case ('date-time') {\n <tls-calendar\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n (daySelect)=\"onDaySelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('month-picker')\"\n />\n <tls-time-picker\n [value]=\"value()\"\n (timeChange)=\"onTimeChange($event)\"\n />\n }\n }\n</ng-template>\n\n@if (inline()) {\n <div\n class=\"tls-date-time-picker__panel\"\n role=\"group\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [class.tls-date-time-picker__panel--disabled]=\"disabled()\"\n [class.tls-date-time-picker__panel--readonly]=\"readonly()\"\n [class.tls-date-time-picker__panel--invalid]=\"invalid()\"\n >\n <ng-container [ngTemplateOutlet]=\"pickerTemplate\" />\n </div>\n} @else {\n <button\n type=\"button\"\n class=\"tls-date-time-picker__trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-expanded]=\"popoverRef.isOpen()\"\n [disabled]=\"disabled()\"\n (click)=\"popoverRef.toggle($event)\"\n (blur)=\"touched.set(true)\"\n >\n <span [class.tls-form-control__placeholder]=\"!value()\">{{ triggerLabel() }}</span>\n </button>\n <tls-popover #popoverRef position=\"bottom-start\">\n <ng-container [ngTemplateOutlet]=\"pickerTemplate\" />\n </tls-popover>\n}\n" }]
|
|
2387
2548
|
}], ctorParameters: () => [], propDecorators: { popoverComponent: [{ type: i0.ViewChild, args: ['popoverRef', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], yearsPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "yearsPerPage", required: false }] }], weekStartsOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekStartsOn", required: false }] }], weekDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekDays", required: false }] }] } });
|
|
@@ -2410,26 +2571,36 @@ const CHIP_GROUP_CONFIG = new InjectionToken('CHIP_GROUP_CONFIG', {
|
|
|
2410
2571
|
class ChipGroup extends SelectionGroup {
|
|
2411
2572
|
_config = inject(CHIP_GROUP_CONFIG);
|
|
2412
2573
|
CLASS_NAME = 'tls-chip-group';
|
|
2413
|
-
multiple = input(this._config.multiple, { ...(ngDevMode ? { debugName: "multiple" } : {}), transform: booleanAttribute });
|
|
2414
|
-
unselectable = input(this._config.unselectable, { ...(ngDevMode ? { debugName: "unselectable" } : {}), transform: booleanAttribute });
|
|
2415
|
-
size = input(this._config.size,
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2574
|
+
multiple = input(this._config.multiple, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2575
|
+
unselectable = input(this._config.unselectable, { ...(ngDevMode ? { debugName: "unselectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2576
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2577
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2578
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
2579
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
2580
|
+
checkedColor = input(this._config.checkedColor, /* @ts-ignore */
|
|
2581
|
+
...(ngDevMode ? [{ debugName: "checkedColor" }] : /* istanbul ignore next */ []));
|
|
2582
|
+
variant = input(this._config.variant, /* @ts-ignore */
|
|
2583
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
2584
|
+
checkedVariant = input(this._config.checkedVariant, /* @ts-ignore */
|
|
2585
|
+
...(ngDevMode ? [{ debugName: "checkedVariant" }] : /* istanbul ignore next */ []));
|
|
2586
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
2587
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
2588
|
+
rounded = input(this._config.rounded, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2589
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2590
|
+
startIconTemplate = contentChild('startIcon', /* @ts-ignore */
|
|
2591
|
+
...(ngDevMode ? [{ debugName: "startIconTemplate" }] : /* istanbul ignore next */ []));
|
|
2592
|
+
endIconTemplate = contentChild('endIcon', /* @ts-ignore */
|
|
2593
|
+
...(ngDevMode ? [{ debugName: "endIconTemplate" }] : /* istanbul ignore next */ []));
|
|
2594
|
+
labelTemplate = contentChild('label', /* @ts-ignore */
|
|
2595
|
+
...(ngDevMode ? [{ debugName: "labelTemplate" }] : /* istanbul ignore next */ []));
|
|
2426
2596
|
classes = computed(() => {
|
|
2427
2597
|
const className = this.CLASS_NAME;
|
|
2428
2598
|
const array = [className, `${className}--${this.orientation()}`];
|
|
2429
2599
|
if (this.fluid())
|
|
2430
2600
|
array.push(`${className}--fluid`);
|
|
2431
2601
|
return array.concat(this.controlClasses());
|
|
2432
|
-
},
|
|
2602
|
+
}, /* @ts-ignore */
|
|
2603
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2433
2604
|
isDisabled(option) {
|
|
2434
2605
|
return this.disabled() || option.disabled;
|
|
2435
2606
|
}
|
|
@@ -2448,10 +2619,10 @@ class ChipGroup extends SelectionGroup {
|
|
|
2448
2619
|
classes.push('tls-chip--disabled');
|
|
2449
2620
|
return classes;
|
|
2450
2621
|
}
|
|
2451
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2452
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2622
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipGroup, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2623
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ChipGroup, isStandalone: true, selector: "tls-chip-group", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, unselectable: { classPropertyName: "unselectable", publicName: "unselectable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, checkedColor: { classPropertyName: "checkedColor", publicName: "checkedColor", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, checkedVariant: { classPropertyName: "checkedVariant", publicName: "checkedVariant", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "classes()", "attr.aria-label": "ariaLabel() ?? null", "attr.aria-labelledby": "labelledBy()", "attr.aria-describedby": "describedBy()", "attr.aria-invalid": "invalid() ? 'true' : null" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ChipGroup) }], queries: [{ propertyName: "startIconTemplate", first: true, predicate: ["startIcon"], descendants: true, isSignal: true }, { propertyName: "endIconTemplate", first: true, predicate: ["endIcon"], descendants: true, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: ["label"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@for (option of normalizedOptions(); track option.value; let index = $index) {\n <tls-chip\n [color]=\"color()\"\n [variant]=\"variant()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [fluid]=\"fluid()\"\n [class]=\"optionClasses(option)\"\n role=\"checkbox\"\n [attr.aria-checked]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n [tabindex]=\"isDisabled(option) ? -1 : 0\"\n (click)=\"select(option)\"\n (blur)=\"touched.set(true)\"\n (keydown.space)=\"onKeyboardSelect($event, option)\"\n (keydown.enter)=\"onKeyboardSelect($event, option)\"\n >\n @if (startIconTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"optionContext(option, index)\"\n />\n }\n\n @if (labelTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"optionContext(option, index)\"\n />\n } @else {\n {{ option.label }}\n }\n\n @if (endIconTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"optionContext(option, index)\"\n />\n }\n </tls-chip>\n}\n\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Chip, selector: "tls-chip", inputs: ["label", "color", "variant", "size", "rounded", "icon", "fluid"] }] });
|
|
2453
2624
|
}
|
|
2454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipGroup, decorators: [{
|
|
2455
2626
|
type: Component,
|
|
2456
2627
|
args: [{ selector: 'tls-chip-group', imports: [NgTemplateOutlet, Chip], providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ChipGroup) }], host: {
|
|
2457
2628
|
role: 'group',
|
|
@@ -2476,19 +2647,25 @@ const CHIP_INPUT_CONFIG = new InjectionToken('CHIP_INPUT_CONFIG', {
|
|
|
2476
2647
|
|
|
2477
2648
|
class ChipInput extends ValueFormControl {
|
|
2478
2649
|
_config = inject(CHIP_INPUT_CONFIG);
|
|
2479
|
-
value = model([],
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2650
|
+
value = model([], /* @ts-ignore */
|
|
2651
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2652
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
2653
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2654
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2655
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2656
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2657
|
+
separator = input(this._config.separator, /* @ts-ignore */
|
|
2658
|
+
...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
|
|
2659
|
+
inputValue = signal('', /* @ts-ignore */
|
|
2660
|
+
...(ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []));
|
|
2485
2661
|
classes = computed(() => {
|
|
2486
2662
|
const className = this.CLASS_NAME;
|
|
2487
2663
|
const array = [className, `${className}--${this.size()}`];
|
|
2488
2664
|
if (this.fluid())
|
|
2489
2665
|
array.push(`${className}--fluid`);
|
|
2490
2666
|
return array.concat(this.controlClasses());
|
|
2491
|
-
},
|
|
2667
|
+
}, /* @ts-ignore */
|
|
2668
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2492
2669
|
onInput(event) {
|
|
2493
2670
|
const target = event.target;
|
|
2494
2671
|
this.inputValue.set(target.value);
|
|
@@ -2517,10 +2694,10 @@ class ChipInput extends ValueFormControl {
|
|
|
2517
2694
|
this.value.update(chips => [...chips, text]);
|
|
2518
2695
|
this.inputValue.set('');
|
|
2519
2696
|
}
|
|
2520
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2521
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2697
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2698
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ChipInput, isStandalone: true, selector: "tls-chip-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ChipInput) }], usesInheritance: true, ngImport: i0, template: "@for (chip of value(); track $index; let index = $index) {\n <tls-chip size=\"sm\" variant=\"filled\" color=\"primary\" [label]=\"chip\">\n <ng-template #endIcon>\n <button\n type=\"button\"\n class=\"tls-chip-input__remove\"\n [attr.aria-label]=\"'Remove ' + chip\"\n [disabled]=\"notInteractive()\"\n (click)=\"removeChip(index)\"\n >\u00D7</button>\n </ng-template>\n </tls-chip>\n}\n<input\n class=\"tls-chip-input__field\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"inputValue()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"touched.set(true)\"\n/>\n", dependencies: [{ kind: "component", type: Chip, selector: "tls-chip", inputs: ["label", "color", "variant", "size", "rounded", "icon", "fluid"] }] });
|
|
2522
2699
|
}
|
|
2523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2700
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipInput, decorators: [{
|
|
2524
2701
|
type: Component,
|
|
2525
2702
|
args: [{ selector: 'tls-chip-input', imports: [Chip], providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ChipInput) }], host: { '[class]': 'classes()' }, template: "@for (chip of value(); track $index; let index = $index) {\n <tls-chip size=\"sm\" variant=\"filled\" color=\"primary\" [label]=\"chip\">\n <ng-template #endIcon>\n <button\n type=\"button\"\n class=\"tls-chip-input__remove\"\n [attr.aria-label]=\"'Remove ' + chip\"\n [disabled]=\"notInteractive()\"\n (click)=\"removeChip(index)\"\n >\u00D7</button>\n </ng-template>\n </tls-chip>\n}\n<input\n class=\"tls-chip-input__field\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"inputValue()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"touched.set(true)\"\n/>\n" }]
|
|
2526
2703
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }] } });
|
|
@@ -2539,21 +2716,26 @@ function normalizeAccept(value) {
|
|
|
2539
2716
|
class FileUploader extends ValueFormControl {
|
|
2540
2717
|
_config = inject(FILE_UPLOADER_CONFIG);
|
|
2541
2718
|
CLASS_NAME = 'tls-file-uploader';
|
|
2542
|
-
value = model([],
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2719
|
+
value = model([], /* @ts-ignore */
|
|
2720
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2721
|
+
multiple = input(this._config.multiple, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2722
|
+
accept = input(normalizeAccept(this._config.accept), { ...(ngDevMode ? { debugName: "accept" } : /* istanbul ignore next */ {}), transform: normalizeAccept });
|
|
2723
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2546
2724
|
fileInput = viewChild.required('fileInput');
|
|
2547
|
-
dragState = signal('idle',
|
|
2548
|
-
|
|
2549
|
-
|
|
2725
|
+
dragState = signal('idle', /* @ts-ignore */
|
|
2726
|
+
...(ngDevMode ? [{ debugName: "dragState" }] : /* istanbul ignore next */ []));
|
|
2727
|
+
dropZoneTemplate = contentChild('dropZone', /* @ts-ignore */
|
|
2728
|
+
...(ngDevMode ? [{ debugName: "dropZoneTemplate" }] : /* istanbul ignore next */ []));
|
|
2729
|
+
fileTemplate = contentChild('file', /* @ts-ignore */
|
|
2730
|
+
...(ngDevMode ? [{ debugName: "fileTemplate" }] : /* istanbul ignore next */ []));
|
|
2550
2731
|
classes = computed(() => {
|
|
2551
2732
|
const className = this.CLASS_NAME;
|
|
2552
2733
|
const array = [className];
|
|
2553
2734
|
if (this.fluid())
|
|
2554
2735
|
array.push(`${className}--fluid`);
|
|
2555
2736
|
return array.concat(this.controlClasses());
|
|
2556
|
-
},
|
|
2737
|
+
}, /* @ts-ignore */
|
|
2738
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2557
2739
|
acceptHint = computed(() => {
|
|
2558
2740
|
const accept = this.accept().trim();
|
|
2559
2741
|
if (!accept)
|
|
@@ -2564,7 +2746,8 @@ class FileUploader extends ValueFormControl {
|
|
|
2564
2746
|
.filter(Boolean)
|
|
2565
2747
|
.map(rule => this._formatAcceptRule(rule));
|
|
2566
2748
|
return [...new Set(labels)].join(', ');
|
|
2567
|
-
},
|
|
2749
|
+
}, /* @ts-ignore */
|
|
2750
|
+
...(ngDevMode ? [{ debugName: "acceptHint" }] : /* istanbul ignore next */ []));
|
|
2568
2751
|
openFilePicker() {
|
|
2569
2752
|
if (this.notInteractive())
|
|
2570
2753
|
return;
|
|
@@ -2672,10 +2855,10 @@ class FileUploader extends ValueFormControl {
|
|
|
2672
2855
|
const matches = rules.some(rule => rule.endsWith('/*') ? fileType.startsWith(rule.slice(0, -1)) : fileType === rule);
|
|
2673
2856
|
return !matches;
|
|
2674
2857
|
}
|
|
2675
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2676
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2858
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileUploader, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2859
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FileUploader, isStandalone: true, selector: "tls-file-uploader", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => FileUploader) }], queries: [{ propertyName: "dropZoneTemplate", first: true, predicate: ["dropZone"], descendants: true, isSignal: true }, { propertyName: "fileTemplate", first: true, predicate: ["file"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<input\n #fileInput\n class=\"tls-file-uploader__input\"\n type=\"file\"\n [accept]=\"accept()\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onFilesSelected($event)\"\n/>\n<div\n class=\"tls-file-uploader__drop-zone\"\n role=\"button\"\n [attr.tabindex]=\"notInteractive() ? -1 : 0\"\n [attr.aria-label]=\"ariaLabel() ?? (multiple() ? 'Upload files' : 'Upload file')\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [class.tls-file-uploader__drop-zone--dragging]=\"dragState() === 'valid'\"\n [class.tls-file-uploader__drop-zone--rejected]=\"dragState() === 'invalid'\"\n [class.tls-file-uploader__drop-zone--disabled]=\"notInteractive()\"\n (click)=\"openFilePicker()\"\n (keydown)=\"onDropZoneKeydown($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\"\n>\n @if (dropZoneTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ $implicit: dragState(), accept: acceptHint() }\"\n />\n } @else {\n <span class=\"tls-file-uploader__label\">\n @if (dragState() === 'invalid') {\n File type not allowed\n } @else {\n Drop files here or <strong>browse</strong>\n }\n </span>\n @if (acceptHint()) {\n <span class=\"tls-file-uploader__hint\">Allowed: {{ acceptHint() }}</span>\n }\n }\n</div>\n@if (value().length) {\n <ul class=\"tls-file-uploader__file-list\">\n @for (file of value(); track file; let fileIndex = $index) {\n <li class=\"tls-file-uploader__file\">\n @if (fileTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ $implicit: file, index: fileIndex, remove: removeFile }\"\n />\n } @else {\n <span class=\"tls-file-uploader__file-name\">{{ file.name }}</span>\n <button\n type=\"button\"\n class=\"tls-file-uploader__file-remove\"\n [attr.aria-label]=\"'Remove ' + file.name\"\n [disabled]=\"notInteractive()\"\n (click)=\"removeFile(fileIndex)\"\n >\u00D7</button>\n }\n </li>\n }\n </ul>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
2677
2860
|
}
|
|
2678
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2861
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileUploader, decorators: [{
|
|
2679
2862
|
type: Component,
|
|
2680
2863
|
args: [{ selector: 'tls-file-uploader', imports: [NgTemplateOutlet], providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => FileUploader) }], host: { '[class]': 'classes()' }, template: "<input\n #fileInput\n class=\"tls-file-uploader__input\"\n type=\"file\"\n [accept]=\"accept()\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onFilesSelected($event)\"\n/>\n<div\n class=\"tls-file-uploader__drop-zone\"\n role=\"button\"\n [attr.tabindex]=\"notInteractive() ? -1 : 0\"\n [attr.aria-label]=\"ariaLabel() ?? (multiple() ? 'Upload files' : 'Upload file')\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [class.tls-file-uploader__drop-zone--dragging]=\"dragState() === 'valid'\"\n [class.tls-file-uploader__drop-zone--rejected]=\"dragState() === 'invalid'\"\n [class.tls-file-uploader__drop-zone--disabled]=\"notInteractive()\"\n (click)=\"openFilePicker()\"\n (keydown)=\"onDropZoneKeydown($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\"\n>\n @if (dropZoneTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ $implicit: dragState(), accept: acceptHint() }\"\n />\n } @else {\n <span class=\"tls-file-uploader__label\">\n @if (dragState() === 'invalid') {\n File type not allowed\n } @else {\n Drop files here or <strong>browse</strong>\n }\n </span>\n @if (acceptHint()) {\n <span class=\"tls-file-uploader__hint\">Allowed: {{ acceptHint() }}</span>\n }\n }\n</div>\n@if (value().length) {\n <ul class=\"tls-file-uploader__file-list\">\n @for (file of value(); track file; let fileIndex = $index) {\n <li class=\"tls-file-uploader__file\">\n @if (fileTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ $implicit: file, index: fileIndex, remove: removeFile }\"\n />\n } @else {\n <span class=\"tls-file-uploader__file-name\">{{ file.name }}</span>\n <button\n type=\"button\"\n class=\"tls-file-uploader__file-remove\"\n [attr.aria-label]=\"'Remove ' + file.name\"\n [disabled]=\"notInteractive()\"\n (click)=\"removeFile(fileIndex)\"\n >\u00D7</button>\n }\n </li>\n }\n </ul>\n}\n" }]
|
|
2681
2864
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }], dropZoneTemplate: [{ type: i0.ContentChild, args: ['dropZone', { isSignal: true }] }], fileTemplate: [{ type: i0.ContentChild, args: ['file', { isSignal: true }] }] } });
|
|
@@ -2696,27 +2879,32 @@ class Input extends ValueFormControl {
|
|
|
2696
2879
|
_config = inject(INPUT_CONFIG);
|
|
2697
2880
|
supportsLabelFor = true;
|
|
2698
2881
|
// Inputs
|
|
2699
|
-
type = input(this._config.type,
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2882
|
+
type = input(this._config.type, /* @ts-ignore */
|
|
2883
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
2884
|
+
value = model('', /* @ts-ignore */
|
|
2885
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2886
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
2887
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2888
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2889
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2890
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2704
2891
|
classes = computed(() => {
|
|
2705
2892
|
const array = [this.CLASS_NAME];
|
|
2706
2893
|
array.push(`${this.CLASS_NAME}--${this.size()}`);
|
|
2707
2894
|
if (this.fluid())
|
|
2708
2895
|
array.push(`${this.CLASS_NAME}--fluid`);
|
|
2709
2896
|
return array.concat(this.controlClasses());
|
|
2710
|
-
},
|
|
2897
|
+
}, /* @ts-ignore */
|
|
2898
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2711
2899
|
// Protected methods
|
|
2712
2900
|
onInput(event) {
|
|
2713
2901
|
const target = event.target;
|
|
2714
2902
|
this.value.set(target.value);
|
|
2715
2903
|
}
|
|
2716
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2717
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
2904
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Input, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2905
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Input, isStandalone: true, selector: "tls-input", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Input) }], usesInheritance: true, ngImport: i0, template: "<input\n [type]=\"type()\"\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n/>\n", styles: [":host{--tls-input-width: 200px;display:inline-block;width:var(--tls-input-width)}:host .tls-form-control{width:100%}:host:has(.tls-form-control--fluid){--tls-input-width: 100%}\n"] });
|
|
2718
2906
|
}
|
|
2719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Input, decorators: [{
|
|
2720
2908
|
type: Component,
|
|
2721
2909
|
args: [{ selector: 'tls-input', providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Input) }], template: "<input\n [type]=\"type()\"\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n/>\n", styles: [":host{--tls-input-width: 200px;display:inline-block;width:var(--tls-input-width)}:host .tls-form-control{width:100%}:host:has(.tls-form-control--fluid){--tls-input-width: 100%}\n"] }]
|
|
2722
2910
|
}], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }] } });
|
|
@@ -2724,8 +2912,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2724
2912
|
class InputDirective {
|
|
2725
2913
|
// Injections
|
|
2726
2914
|
_config = inject(INPUT_CONFIG);
|
|
2727
|
-
size = input(this._config.size,
|
|
2728
|
-
|
|
2915
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2916
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2917
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2729
2918
|
hostClasses = computed(() => {
|
|
2730
2919
|
const className = 'tls-form-control';
|
|
2731
2920
|
const array = [className];
|
|
@@ -2733,11 +2922,12 @@ class InputDirective {
|
|
|
2733
2922
|
if (this.fluid())
|
|
2734
2923
|
array.push(`${className}--fluid`);
|
|
2735
2924
|
return array;
|
|
2736
|
-
},
|
|
2737
|
-
|
|
2738
|
-
static
|
|
2925
|
+
}, /* @ts-ignore */
|
|
2926
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
2927
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2928
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: InputDirective, isStandalone: true, selector: "[tlsInput]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0 });
|
|
2739
2929
|
}
|
|
2740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2930
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InputDirective, decorators: [{
|
|
2741
2931
|
type: Directive,
|
|
2742
2932
|
args: [{
|
|
2743
2933
|
selector: '[tlsInput]',
|
|
@@ -2764,14 +2954,19 @@ class InputNumber extends ValueFormControl {
|
|
|
2764
2954
|
_config = inject(INPUT_NUMBER_CONFIG);
|
|
2765
2955
|
supportsLabelFor = true;
|
|
2766
2956
|
// Inputs
|
|
2767
|
-
value = model(null,
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2957
|
+
value = model(null, /* @ts-ignore */
|
|
2958
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2959
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
2960
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2961
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2962
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2963
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2964
|
+
min = input(undefined, /* @ts-ignore */
|
|
2965
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
2966
|
+
max = input(undefined, /* @ts-ignore */
|
|
2967
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
2968
|
+
step = input(this._config.step, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
2969
|
+
hideArrows = input(this._config.hideArrows, { ...(ngDevMode ? { debugName: "hideArrows" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2775
2970
|
// Computed
|
|
2776
2971
|
classes = computed(() => {
|
|
2777
2972
|
const array = [this.CLASS_NAME, 'tls-input-number'];
|
|
@@ -2781,17 +2976,18 @@ class InputNumber extends ValueFormControl {
|
|
|
2781
2976
|
if (this.hideArrows())
|
|
2782
2977
|
array.push('tls-input-number--no-arrows');
|
|
2783
2978
|
return array.concat(this.controlClasses());
|
|
2784
|
-
},
|
|
2979
|
+
}, /* @ts-ignore */
|
|
2980
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2785
2981
|
// Protected methods
|
|
2786
2982
|
onInput(event) {
|
|
2787
2983
|
const target = event.target;
|
|
2788
2984
|
const parsed = target.valueAsNumber;
|
|
2789
2985
|
this.value.set(isNaN(parsed) ? null : parsed);
|
|
2790
2986
|
}
|
|
2791
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2792
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
2987
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InputNumber, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2988
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: InputNumber, isStandalone: true, selector: "tls-input-number", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, hideArrows: { classPropertyName: "hideArrows", publicName: "hideArrows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => InputNumber) }], usesInheritance: true, ngImport: i0, template: "<input\n type=\"number\"\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"value() ?? ''\"\n [attr.min]=\"min() ?? null\"\n [attr.max]=\"max() ?? null\"\n [step]=\"step()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n/>\n", styles: [":host{--tls-input-number-width: 200px;display:inline-block;width:var(--tls-input-number-width)}:host .tls-form-control{width:100%}:host:has(.tls-form-control--fluid){--tls-input-number-width: 100%}\n"] });
|
|
2793
2989
|
}
|
|
2794
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InputNumber, decorators: [{
|
|
2795
2991
|
type: Component,
|
|
2796
2992
|
args: [{ selector: 'tls-input-number', providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => InputNumber) }], template: "<input\n type=\"number\"\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"value() ?? ''\"\n [attr.min]=\"min() ?? null\"\n [attr.max]=\"max() ?? null\"\n [step]=\"step()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n/>\n", styles: [":host{--tls-input-number-width: 200px;display:inline-block;width:var(--tls-input-number-width)}:host .tls-form-control{width:100%}:host:has(.tls-form-control--fluid){--tls-input-number-width: 100%}\n"] }]
|
|
2797
2993
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], hideArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideArrows", required: false }] }] } });
|
|
@@ -2809,14 +3005,21 @@ const PASSWORD_CONFIG = new InjectionToken('PASSWORD_CONFIG', {
|
|
|
2809
3005
|
class Password extends ValueFormControl {
|
|
2810
3006
|
_config = inject(PASSWORD_CONFIG);
|
|
2811
3007
|
supportsLabelFor = true;
|
|
2812
|
-
value = model('',
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
3008
|
+
value = model('', /* @ts-ignore */
|
|
3009
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3010
|
+
visible = model(false, /* @ts-ignore */
|
|
3011
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
3012
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
3013
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
3014
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3015
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3016
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3017
|
+
showIconTemplate = contentChild('showIcon', /* @ts-ignore */
|
|
3018
|
+
...(ngDevMode ? [{ debugName: "showIconTemplate" }] : /* istanbul ignore next */ []));
|
|
3019
|
+
hideIconTemplate = contentChild('hideIcon', /* @ts-ignore */
|
|
3020
|
+
...(ngDevMode ? [{ debugName: "hideIconTemplate" }] : /* istanbul ignore next */ []));
|
|
3021
|
+
type = computed(() => (this.visible() ? 'text' : 'password'), /* @ts-ignore */
|
|
3022
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
2820
3023
|
// Protected methods
|
|
2821
3024
|
onInput(event) {
|
|
2822
3025
|
const target = event.target;
|
|
@@ -2827,10 +3030,10 @@ class Password extends ValueFormControl {
|
|
|
2827
3030
|
return;
|
|
2828
3031
|
this.visible.update(prev => !prev);
|
|
2829
3032
|
}
|
|
2830
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2831
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3033
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Password, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3034
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Password, isStandalone: true, selector: "tls-password", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", visible: "visibleChange" }, host: { classAttribute: "tls-password" }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Password) }], queries: [{ propertyName: "showIconTemplate", first: true, predicate: ["showIcon"], descendants: true, isSignal: true }, { propertyName: "hideIconTemplate", first: true, predicate: ["hideIcon"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<tls-form-control-group [size]=\"size()\" [fluid]=\"fluid()\">\n <input\n [type]=\"type()\"\n [name]=\"name()\"\n [class]=\"controlClasses()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n />\n <button\n class=\"tls-password-toggle tls-form-control-addon\"\n type=\"button\"\n [attr.aria-label]=\"visible() ? 'Hide password' : 'Show password'\"\n [attr.aria-pressed]=\"visible()\"\n (click)=\"toggle()\"\n >\n <span class=\"tls-password-toggle__item\" [class.tls-password-toggle__item--hidden]=\"visible()\">\n @if (showIconTemplate(); as icon) {\n <ng-container [ngTemplateOutlet]=\"icon\" />\n } @else {\n <span class=\"text-label-md\">Show</span>\n }\n </span>\n <span class=\"tls-password-toggle__item\" [class.tls-password-toggle__item--hidden]=\"!visible()\">\n @if (hideIconTemplate(); as icon) {\n <ng-container [ngTemplateOutlet]=\"icon\" />\n } @else {\n <span class=\"text-label-md\">Hide</span>\n }\n </span>\n </button>\n</tls-form-control-group>\n", dependencies: [{ kind: "component", type: FormControlGroup, selector: "tls-form-control-group", inputs: ["size", "fluid"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
2832
3035
|
}
|
|
2833
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Password, decorators: [{
|
|
2834
3037
|
type: Component,
|
|
2835
3038
|
args: [{ selector: 'tls-password', imports: [FormControlGroup, NgTemplateOutlet], host: {
|
|
2836
3039
|
class: 'tls-password',
|
|
@@ -2858,20 +3061,27 @@ const PIN_INPUT_CONFIG = new InjectionToken('PIN_INPUT_CONFIG', {
|
|
|
2858
3061
|
class PinInput extends ValueFormControl {
|
|
2859
3062
|
_config = inject(PIN_INPUT_CONFIG);
|
|
2860
3063
|
_directionality = inject(Directionality);
|
|
2861
|
-
_inputs = viewChildren('cell',
|
|
3064
|
+
_inputs = viewChildren('cell', /* @ts-ignore */
|
|
3065
|
+
...(ngDevMode ? [{ debugName: "_inputs" }] : /* istanbul ignore next */ []));
|
|
2862
3066
|
// Inputs
|
|
2863
|
-
value = model('',
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
3067
|
+
value = model('', /* @ts-ignore */
|
|
3068
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3069
|
+
length = input(this._config.length, /* @ts-ignore */
|
|
3070
|
+
...(ngDevMode ? [{ debugName: "length" }] : /* istanbul ignore next */ []));
|
|
3071
|
+
type = input(this._config.type, /* @ts-ignore */
|
|
3072
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
3073
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
3074
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2867
3075
|
CLASS_NAME = 'tls-pin-input';
|
|
2868
3076
|
// Computed
|
|
2869
|
-
cells = computed(() => Array.from({ length: this.length() }, (_, index) => index),
|
|
3077
|
+
cells = computed(() => Array.from({ length: this.length() }, (_, index) => index), /* @ts-ignore */
|
|
3078
|
+
...(ngDevMode ? [{ debugName: "cells" }] : /* istanbul ignore next */ []));
|
|
2870
3079
|
hostClasses = computed(() => {
|
|
2871
3080
|
const className = this.CLASS_NAME;
|
|
2872
3081
|
const array = [className];
|
|
2873
3082
|
return array.concat(this.controlClasses());
|
|
2874
|
-
},
|
|
3083
|
+
}, /* @ts-ignore */
|
|
3084
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
2875
3085
|
// Protected methods
|
|
2876
3086
|
getCellValue(index) {
|
|
2877
3087
|
return this.value()[index] ?? '';
|
|
@@ -2964,10 +3174,10 @@ class PinInput extends ValueFormControl {
|
|
|
2964
3174
|
_getValueArray() {
|
|
2965
3175
|
return Array.from({ length: this.length() }, (_, i) => this.value()[i] ?? '');
|
|
2966
3176
|
}
|
|
2967
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2968
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3177
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PinInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3178
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: PinInput, isStandalone: true, selector: "tls-pin-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "group" }, properties: { "class": "hostClasses()", "attr.aria-label": "ariaLabel() ?? null", "attr.aria-labelledby": "labelledBy()", "attr.aria-invalid": "invalid() ? 'true' : null", "attr.aria-describedby": "describedBy()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => PinInput) }], viewQueries: [{ propertyName: "_inputs", predicate: ["cell"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@for (cell of cells(); track cell; let index = $index) {\n <input\n #cell\n class=\"tls-pin-input__cell\"\n type=\"text\"\n maxlength=\"2\"\n autocomplete=\"one-time-code\"\n [placeholder]=\"placeholder()\"\n [tabindex]=\"this.value().length === index ? '0' : '-1'\"\n [value]=\"getCellValue(cell)\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.inputmode]=\"type() === 'numeric' ? 'numeric' : 'text'\"\n (input)=\"onInput($event, cell)\"\n (keydown)=\"onKeydown($event, cell)\"\n (paste)=\"onPaste($event, cell)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"touched.set(true)\"\n />\n}\n\n" });
|
|
2969
3179
|
}
|
|
2970
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PinInput, decorators: [{
|
|
2971
3181
|
type: Component,
|
|
2972
3182
|
args: [{ selector: 'tls-pin-input', imports: [], host: {
|
|
2973
3183
|
role: 'group',
|
|
@@ -2989,27 +3199,32 @@ class RadioButton extends ValueFormControl {
|
|
|
2989
3199
|
_config = inject(RADIO_BUTTON_CONFIG);
|
|
2990
3200
|
CLASS_NAME = 'tls-radio-button';
|
|
2991
3201
|
supportsLabelFor = true;
|
|
2992
|
-
radioValue = input.required(
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
3202
|
+
radioValue = input.required(/* @ts-ignore */
|
|
3203
|
+
...(ngDevMode ? [{ debugName: "radioValue" }] : /* istanbul ignore next */ []));
|
|
3204
|
+
value = model('', /* @ts-ignore */
|
|
3205
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3206
|
+
tabindex = input(0, /* @ts-ignore */
|
|
3207
|
+
...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
3208
|
+
checked = computed(() => this.radioValue() === this.value(), /* @ts-ignore */
|
|
3209
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
2996
3210
|
hostClasses = computed(() => {
|
|
2997
3211
|
const className = this.CLASS_NAME;
|
|
2998
3212
|
const array = [className];
|
|
2999
3213
|
if (this.checked())
|
|
3000
3214
|
array.push(`${className}--checked`);
|
|
3001
3215
|
return array.concat(this.controlClasses());
|
|
3002
|
-
},
|
|
3216
|
+
}, /* @ts-ignore */
|
|
3217
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3003
3218
|
// Protected methods
|
|
3004
3219
|
check() {
|
|
3005
3220
|
if (this.notInteractive())
|
|
3006
3221
|
return;
|
|
3007
3222
|
this.value.set(this.radioValue());
|
|
3008
3223
|
}
|
|
3009
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3010
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
3224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RadioButton, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3225
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: RadioButton, isStandalone: true, selector: "tls-radio-button", inputs: { radioValue: { classPropertyName: "radioValue", publicName: "radioValue", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()", "tabindex": "-1" } }, usesInheritance: true, ngImport: i0, template: "<input\n type=\"radio\"\n class=\"tls-radio-button-input\"\n [attr.id]=\"effectiveInputId()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [tabindex]=\"tabindex()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n [value]=\"radioValue()\"\n (change)=\"check()\"\n (blur)=\"touched.set(true)\"\n/>\n<div class=\"tls-radio-button-circle\"></div>\n" });
|
|
3011
3226
|
}
|
|
3012
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RadioButton, decorators: [{
|
|
3013
3228
|
type: Component,
|
|
3014
3229
|
args: [{ selector: 'tls-radio-button', imports: [], host: {
|
|
3015
3230
|
'[class]': 'hostClasses()',
|
|
@@ -3036,14 +3251,20 @@ class MultiSelect extends AbstractSelect {
|
|
|
3036
3251
|
uniqueId = `tls-multi-select-${MultiSelect._nextUniqueId++}`;
|
|
3037
3252
|
hostClassBase = 'tls-multi-select';
|
|
3038
3253
|
panelClass = 'tls-multi-select-panel';
|
|
3039
|
-
value = model([],
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3254
|
+
value = model([], /* @ts-ignore */
|
|
3255
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3256
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
3257
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
3258
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3259
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3260
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3261
|
+
clearable = input(this._config.clearable, { ...(ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3262
|
+
maxLabels = input(this._config.maxLabels, /* @ts-ignore */
|
|
3263
|
+
...(ngDevMode ? [{ debugName: "maxLabels" }] : /* istanbul ignore next */ []));
|
|
3264
|
+
hasValue = computed(() => this.value().length > 0, /* @ts-ignore */
|
|
3265
|
+
...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
3266
|
+
selectedValues = computed(() => new Set(this.value()), /* @ts-ignore */
|
|
3267
|
+
...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
|
|
3047
3268
|
triggerLabel = computed(() => {
|
|
3048
3269
|
const selected = this.value();
|
|
3049
3270
|
if (selected.length === 0)
|
|
@@ -3053,7 +3274,8 @@ class MultiSelect extends AbstractSelect {
|
|
|
3053
3274
|
return `${selected.length} selected`;
|
|
3054
3275
|
const optionMap = new Map(this.normalizedOptions().map(option => [option.value, option.label]));
|
|
3055
3276
|
return selected.map(value => optionMap.get(value) ?? String(value)).join(', ');
|
|
3056
|
-
},
|
|
3277
|
+
}, /* @ts-ignore */
|
|
3278
|
+
...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
3057
3279
|
isSelected(option) {
|
|
3058
3280
|
return this.selectedValues().has(option.value);
|
|
3059
3281
|
}
|
|
@@ -3081,10 +3303,10 @@ class MultiSelect extends AbstractSelect {
|
|
|
3081
3303
|
commitActiveOption(option) {
|
|
3082
3304
|
this.toggleOption(option);
|
|
3083
3305
|
}
|
|
3084
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3085
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3306
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MultiSelect, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3307
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: MultiSelect, isStandalone: true, selector: "tls-multi-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, maxLabels: { classPropertyName: "maxLabels", publicName: "maxLabels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => MultiSelect) }], usesInheritance: true, ngImport: i0, template: "<button\n #trigger\n type=\"button\"\n class=\"tls-multi-select__trigger\"\n role=\"combobox\"\n [attr.id]=\"effectiveInputId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n>\n <span class=\"tls-multi-select__value\" [class.tls-form-control__placeholder]=\"!triggerLabel()\">\n {{ triggerLabel() || placeholder() }}\n </span>\n <div class=\"tls-multi-select__icon\" aria-hidden=\"true\">\n <svg class=\"tls-multi-select__chevron\" viewBox=\"0 0 10 6\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1 1L5 5L9 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n </div>\n</button>\n@if (clearable() && hasValue()) {\n <button\n type=\"button\"\n class=\"tls-multi-select__clear\"\n tabindex=\"-1\"\n aria-label=\"Clear\"\n (click)=\"clear()\"\n >\n <svg class=\"tls-multi-select__clear-icon\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1 1L9 9M9 1L1 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n}\n\n<ng-template #panel>\n <ul\n class=\"tls-multi-select__panel\"\n animate.enter=\"tls-multi-select__panel--enter\"\n animate.leave=\"tls-multi-select__panel--leave\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId\"\n >\n @for (option of normalizedOptions(); track option.value; let index = $index) {\n <li\n class=\"tls-multi-select__option\"\n [class.tls-multi-select__option--selected]=\"isSelected(option)\"\n [class.tls-multi-select__option--active]=\"index === activeIndex()\"\n [class.tls-multi-select__option--disabled]=\"option.disabled\"\n >\n <button\n class=\"tls-multi-select__option-button\"\n role=\"option\"\n [id]=\"optionId(index)\"\n [disabled]=\"option.disabled\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled\"\n (click)=\"toggleOption(option)\"\n (mouseenter)=\"onOptionHover(index, option.disabled)\"\n >\n <span class=\"tls-multi-select__option-label\">{{ option.label }}</span>\n @if (isSelected(option)) {\n <svg class=\"tls-multi-select__option-check\" viewBox=\"0 0 10 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 4L3.5 6.5L9 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n }\n </button>\n </li>\n }\n </ul>\n</ng-template>\n" });
|
|
3086
3308
|
}
|
|
3087
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MultiSelect, decorators: [{
|
|
3088
3310
|
type: Component,
|
|
3089
3311
|
args: [{ selector: 'tls-multi-select', host: {
|
|
3090
3312
|
'[class]': 'hostClasses()',
|
|
@@ -3109,15 +3331,19 @@ class Select extends AbstractSelect {
|
|
|
3109
3331
|
uniqueId = `tls-select-${Select._nextUniqueId++}`;
|
|
3110
3332
|
hostClassBase = 'tls-select';
|
|
3111
3333
|
panelClass = 'tls-select-panel';
|
|
3112
|
-
value = model(null,
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3334
|
+
value = model(null, /* @ts-ignore */
|
|
3335
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3336
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
3337
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
3338
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3339
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3340
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3341
|
+
clearable = input(this._config.clearable, { ...(ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3117
3342
|
hasValue = computed(() => {
|
|
3118
3343
|
const value = this.value();
|
|
3119
3344
|
return value !== null && value !== undefined && value !== '';
|
|
3120
|
-
},
|
|
3345
|
+
}, /* @ts-ignore */
|
|
3346
|
+
...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
3121
3347
|
selectedLabel = computed(() => {
|
|
3122
3348
|
if (!this.hasValue())
|
|
3123
3349
|
return '';
|
|
@@ -3125,7 +3351,8 @@ class Select extends AbstractSelect {
|
|
|
3125
3351
|
if (!selected)
|
|
3126
3352
|
return '';
|
|
3127
3353
|
return selected.label;
|
|
3128
|
-
},
|
|
3354
|
+
}, /* @ts-ignore */
|
|
3355
|
+
...(ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []));
|
|
3129
3356
|
select(option) {
|
|
3130
3357
|
if (option.disabled)
|
|
3131
3358
|
return;
|
|
@@ -3141,10 +3368,10 @@ class Select extends AbstractSelect {
|
|
|
3141
3368
|
commitActiveOption(option) {
|
|
3142
3369
|
this.select(option);
|
|
3143
3370
|
}
|
|
3144
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3145
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3371
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Select, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3372
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Select, isStandalone: true, selector: "tls-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Select) }], usesInheritance: true, ngImport: i0, template: "<button\n #trigger\n type=\"button\"\n class=\"tls-select__trigger\"\n role=\"combobox\"\n [attr.id]=\"effectiveInputId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n>\n <span class=\"tls-select__value\" [class.tls-form-control__placeholder]=\"!selectedLabel()\">\n {{ selectedLabel() || placeholder() }}\n </span>\n <div class=\"tls-select__icon\" aria-hidden=\"true\">\n <svg class=\"tls-select__chevron\" viewBox=\"0 0 10 6\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1 1L5 5L9 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n </div>\n</button>\n@if (clearable() && hasValue()) {\n <button\n type=\"button\"\n class=\"tls-select__clear\"\n tabindex=\"-1\"\n aria-label=\"Clear\"\n (click)=\"clear()\"\n >\n <svg class=\"tls-select__clear-icon\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1 1L9 9M9 1L1 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n}\n\n<ng-template #panel>\n <ul\n class=\"tls-select__panel\"\n animate.enter=\"tls-select__panel--enter\"\n animate.leave=\"tls-select__panel--leave\"\n role=\"listbox\"\n [id]=\"listboxId\"\n >\n @for (option of normalizedOptions(); track option.value; let index = $index) {\n <li\n class=\"tls-select__option\"\n [class.tls-select__option--selected]=\"option.value === value()\"\n [class.tls-select__option--active]=\"index === activeIndex()\"\n [class.tls-select__option--disabled]=\"option.disabled\"\n >\n <button\n class=\"tls-select__option-button\"\n role=\"option\"\n [id]=\"optionId(index)\"\n [disabled]=\"option.disabled\"\n [attr.aria-selected]=\"option.value === value()\"\n [attr.aria-disabled]=\"option.disabled\"\n (click)=\"select(option)\"\n (mouseenter)=\"onOptionHover(index, option.disabled)\"\n >{{ option.label }}\n </button>\n </li>\n }\n </ul>\n</ng-template>\n" });
|
|
3146
3373
|
}
|
|
3147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Select, decorators: [{
|
|
3148
3375
|
type: Component,
|
|
3149
3376
|
args: [{ selector: 'tls-select', host: {
|
|
3150
3377
|
'[class]': 'hostClasses()',
|
|
@@ -3163,15 +3390,19 @@ class Switch extends CheckboxFormControl {
|
|
|
3163
3390
|
_config = inject(SWITCH_CONFIG);
|
|
3164
3391
|
CLASS_NAME = 'tls-switch';
|
|
3165
3392
|
supportsLabelFor = true;
|
|
3166
|
-
checked = model(false,
|
|
3167
|
-
|
|
3168
|
-
|
|
3393
|
+
checked = model(false, /* @ts-ignore */
|
|
3394
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
3395
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
3396
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
3397
|
+
tabindex = input(0, /* @ts-ignore */
|
|
3398
|
+
...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
3169
3399
|
hostClasses = computed(() => {
|
|
3170
3400
|
const className = this.CLASS_NAME;
|
|
3171
3401
|
const array = [className];
|
|
3172
3402
|
array.push(`${className}--${this.color()}`);
|
|
3173
3403
|
return array.concat(this.controlClasses());
|
|
3174
|
-
},
|
|
3404
|
+
}, /* @ts-ignore */
|
|
3405
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3175
3406
|
// Protected methods
|
|
3176
3407
|
toggle() {
|
|
3177
3408
|
if (this.notInteractive())
|
|
@@ -3182,10 +3413,10 @@ class Switch extends CheckboxFormControl {
|
|
|
3182
3413
|
event.preventDefault();
|
|
3183
3414
|
this.toggle();
|
|
3184
3415
|
}
|
|
3185
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3186
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
3416
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Switch, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3417
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Switch, isStandalone: true, selector: "tls-switch", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, host: { attributes: { "role": "switch" }, listeners: { "click": "toggle()", "blur": "touched.set(true)", "keydown.space": "onKeyboardToggle($event)", "keydown.enter": "onKeyboardToggle($event)" }, properties: { "class": "hostClasses()", "tabindex": "disabled() ? -1 : tabindex()", "attr.aria-checked": "checked()", "attr.aria-disabled": "disabled()", "attr.aria-readonly": "readonly()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Switch) }], usesInheritance: true, ngImport: i0, template: "<input\n type=\"checkbox\"\n class=\"tls-switch-input\"\n [attr.id]=\"effectiveInputId()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n/>\n<div class=\"tls-switch-handle\"></div>\n" });
|
|
3187
3418
|
}
|
|
3188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Switch, decorators: [{
|
|
3189
3420
|
type: Component,
|
|
3190
3421
|
args: [{ selector: 'tls-switch', host: {
|
|
3191
3422
|
role: 'switch',
|
|
@@ -3207,6 +3438,9 @@ const DEFAULT_TEXTAREA_CONFIG = {
|
|
|
3207
3438
|
fluid: false,
|
|
3208
3439
|
rows: 3,
|
|
3209
3440
|
resize: 'vertical',
|
|
3441
|
+
autosize: false,
|
|
3442
|
+
// Row cap while autosizing. `0` means unbounded — the textarea grows freely.
|
|
3443
|
+
maxRows: 0,
|
|
3210
3444
|
};
|
|
3211
3445
|
|
|
3212
3446
|
const TEXTAREA_CONFIG = new InjectionToken('TEXTAREA_CONFIG', {
|
|
@@ -3214,33 +3448,47 @@ const TEXTAREA_CONFIG = new InjectionToken('TEXTAREA_CONFIG', {
|
|
|
3214
3448
|
});
|
|
3215
3449
|
|
|
3216
3450
|
class Textarea extends ValueFormControl {
|
|
3451
|
+
// Injections
|
|
3217
3452
|
_config = inject(TEXTAREA_CONFIG);
|
|
3218
3453
|
supportsLabelFor = true;
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3454
|
+
// Inputs
|
|
3455
|
+
value = model('', /* @ts-ignore */
|
|
3456
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3457
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
3458
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
3459
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3460
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3461
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3462
|
+
rows = input(this._config.rows, { ...(ngDevMode ? { debugName: "rows" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
3463
|
+
resize = input(this._config.resize, /* @ts-ignore */
|
|
3464
|
+
...(ngDevMode ? [{ debugName: "resize" }] : /* istanbul ignore next */ []));
|
|
3465
|
+
autosize = input(this._config.autosize, { ...(ngDevMode ? { debugName: "autosize" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3466
|
+
// Upper bound, in rows, on the autosized height. `0` grows without a cap.
|
|
3467
|
+
maxRows = input(this._config.maxRows, { ...(ngDevMode ? { debugName: "maxRows" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
3468
|
+
// Computed
|
|
3225
3469
|
classes = computed(() => {
|
|
3226
3470
|
const array = [this.CLASS_NAME];
|
|
3227
3471
|
array.push(`${this.CLASS_NAME}--${this.size()}`);
|
|
3228
3472
|
if (this.fluid())
|
|
3229
3473
|
array.push(`${this.CLASS_NAME}--fluid`);
|
|
3230
3474
|
return array.concat(this.controlClasses());
|
|
3231
|
-
},
|
|
3475
|
+
}, /* @ts-ignore */
|
|
3476
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3477
|
+
// Autosize owns the height, so the manual resize handle is suppressed.
|
|
3478
|
+
effectiveResize = computed(() => this.autosize() ? 'none' : this.resize(), /* @ts-ignore */
|
|
3479
|
+
...(ngDevMode ? [{ debugName: "effectiveResize" }] : /* istanbul ignore next */ []));
|
|
3232
3480
|
// Protected methods
|
|
3233
3481
|
onInput(event) {
|
|
3234
3482
|
const target = event.target;
|
|
3235
3483
|
this.value.set(target.value);
|
|
3236
3484
|
}
|
|
3237
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3238
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
3485
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Textarea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3486
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Textarea, isStandalone: true, selector: "tls-textarea", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, autosize: { classPropertyName: "autosize", publicName: "autosize", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { classAttribute: "tls-textarea" }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Textarea) }], usesInheritance: true, ngImport: i0, template: "<textarea\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [rows]=\"rows()\"\n [style.resize]=\"effectiveResize()\"\n [value]=\"value()\"\n [cdkTextareaAutosize]=\"autosize()\"\n [cdkAutosizeMinRows]=\"rows()\"\n [cdkAutosizeMaxRows]=\"maxRows()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n></textarea>\n", styles: [":host{--tls-textarea-width: 200px;display:inline-block;width:var(--tls-textarea-width)}:host .tls-form-control{width:100%}:host:has(.tls-form-control--fluid){--tls-textarea-width: 100%}\n"], dependencies: [{ kind: "directive", type: CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }] });
|
|
3239
3487
|
}
|
|
3240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Textarea, decorators: [{
|
|
3241
3489
|
type: Component,
|
|
3242
|
-
args: [{ selector: 'tls-textarea', host: { class: 'tls-textarea' }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Textarea) }], template: "<textarea\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [rows]=\"rows()\"\n [style.resize]=\"
|
|
3243
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }] } });
|
|
3490
|
+
args: [{ selector: 'tls-textarea', imports: [CdkTextareaAutosize], host: { class: 'tls-textarea' }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Textarea) }], template: "<textarea\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [rows]=\"rows()\"\n [style.resize]=\"effectiveResize()\"\n [value]=\"value()\"\n [cdkTextareaAutosize]=\"autosize()\"\n [cdkAutosizeMinRows]=\"rows()\"\n [cdkAutosizeMaxRows]=\"maxRows()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n></textarea>\n", styles: [":host{--tls-textarea-width: 200px;display:inline-block;width:var(--tls-textarea-width)}:host .tls-form-control{width:100%}:host:has(.tls-form-control--fluid){--tls-textarea-width: 100%}\n"] }]
|
|
3491
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }], autosize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autosize", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }] } });
|
|
3244
3492
|
|
|
3245
3493
|
const DEFAULT_TOGGLE_GROUP_CONFIG = {
|
|
3246
3494
|
size: 'md',
|
|
@@ -3261,12 +3509,16 @@ const TOGGLE_GROUP_CONFIG = new InjectionToken('TOGGLE_GROUP_CONFIG', {
|
|
|
3261
3509
|
class ToggleGroup extends SelectionGroup {
|
|
3262
3510
|
_config = inject(TOGGLE_GROUP_CONFIG);
|
|
3263
3511
|
CLASS_NAME = 'tls-toggle-group';
|
|
3264
|
-
multiple = input(this._config.multiple, { ...(ngDevMode ? { debugName: "multiple" } : {}), transform: booleanAttribute });
|
|
3265
|
-
unselectable = input(this._config.unselectable, { ...(ngDevMode ? { debugName: "unselectable" } : {}), transform: booleanAttribute });
|
|
3266
|
-
size = input(this._config.size,
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3512
|
+
multiple = input(this._config.multiple, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3513
|
+
unselectable = input(this._config.unselectable, { ...(ngDevMode ? { debugName: "unselectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3514
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3515
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3516
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
3517
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
3518
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
3519
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
3520
|
+
optionTemplate = contentChild('option', /* @ts-ignore */
|
|
3521
|
+
...(ngDevMode ? [{ debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
3270
3522
|
classes = computed(() => {
|
|
3271
3523
|
const className = this.CLASS_NAME;
|
|
3272
3524
|
const array = [
|
|
@@ -3276,11 +3528,12 @@ class ToggleGroup extends SelectionGroup {
|
|
|
3276
3528
|
`${className}--${this.orientation()}`,
|
|
3277
3529
|
];
|
|
3278
3530
|
return array.concat(this.controlClasses());
|
|
3279
|
-
},
|
|
3280
|
-
|
|
3281
|
-
static
|
|
3531
|
+
}, /* @ts-ignore */
|
|
3532
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3533
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToggleGroup, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3534
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ToggleGroup, isStandalone: true, selector: "tls-toggle-group", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, unselectable: { classPropertyName: "unselectable", publicName: "unselectable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "classes()", "attr.aria-label": "ariaLabel() ?? null", "attr.aria-labelledby": "labelledBy()", "attr.aria-describedby": "describedBy()", "attr.aria-invalid": "invalid() ? 'true' : null" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ToggleGroup) }], queries: [{ propertyName: "optionTemplate", first: true, predicate: ["option"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@for (option of normalizedOptions(); track option.value; let index = $index) {\n <button\n type=\"button\"\n class=\"tls-toggle-group__option\"\n [class.tls-toggle-group__option--selected]=\"isSelected(option.value)\"\n [class.tls-toggle-group__option--disabled]=\"option.disabled\"\n [attr.aria-pressed]=\"isSelected(option.value)\"\n [disabled]=\"disabled() || option.disabled\"\n (click)=\"select(option)\"\n (blur)=\"touched.set(true)\"\n >\n @if (optionTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"optionContext(option, index)\" />\n } @else {\n {{ option.label }}\n }\n </button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
3282
3535
|
}
|
|
3283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToggleGroup, decorators: [{
|
|
3284
3537
|
type: Component,
|
|
3285
3538
|
args: [{ selector: 'tls-toggle-group', imports: [NgTemplateOutlet], providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ToggleGroup) }], host: {
|
|
3286
3539
|
role: 'group',
|
|
@@ -3334,10 +3587,10 @@ class IconService {
|
|
|
3334
3587
|
// Remove import statements in style
|
|
3335
3588
|
.replace(/@import/gi, ''));
|
|
3336
3589
|
}
|
|
3337
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3338
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3590
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3591
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, providedIn: 'root' });
|
|
3339
3592
|
}
|
|
3340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, decorators: [{
|
|
3341
3594
|
type: Injectable,
|
|
3342
3595
|
args: [{ providedIn: 'root' }]
|
|
3343
3596
|
}] });
|
|
@@ -3355,12 +3608,16 @@ class Icon {
|
|
|
3355
3608
|
_iconService = inject(IconService);
|
|
3356
3609
|
_config = inject(ICON_CONFIG);
|
|
3357
3610
|
// Inputs
|
|
3358
|
-
iconSrc = input.required(
|
|
3359
|
-
|
|
3360
|
-
|
|
3611
|
+
iconSrc = input.required(/* @ts-ignore */
|
|
3612
|
+
...(ngDevMode ? [{ debugName: "iconSrc" }] : /* istanbul ignore next */ []));
|
|
3613
|
+
alt = input('', /* @ts-ignore */
|
|
3614
|
+
...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
3615
|
+
allowedSources = input(this._config.allowedSources, /* @ts-ignore */
|
|
3616
|
+
...(ngDevMode ? [{ debugName: "allowedSources" }] : /* istanbul ignore next */ []));
|
|
3361
3617
|
isSvg = computed(() => {
|
|
3362
3618
|
return this.iconSrc().endsWith('.svg');
|
|
3363
|
-
},
|
|
3619
|
+
}, /* @ts-ignore */
|
|
3620
|
+
...(ngDevMode ? [{ debugName: "isSvg" }] : /* istanbul ignore next */ []));
|
|
3364
3621
|
_svgContentResource = rxResource({
|
|
3365
3622
|
defaultValue: '',
|
|
3366
3623
|
params: () => ({
|
|
@@ -3373,10 +3630,10 @@ class Icon {
|
|
|
3373
3630
|
get svgContent() {
|
|
3374
3631
|
return this._svgContentResource.value.asReadonly();
|
|
3375
3632
|
}
|
|
3376
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3377
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3633
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Icon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3634
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Icon, isStandalone: true, selector: "tls-icon", inputs: { iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, allowedSources: { classPropertyName: "allowedSources", publicName: "allowedSources", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "tls-icon" }, ngImport: i0, template: "@if (isSvg() && iconSrc()) {\n <span [innerHTML]=\"svgContent()\" class=\"tls-svg-icon\"></span>\n} @else if (iconSrc()) {\n <img [src]=\"iconSrc()\" [alt]=\"alt()\" class=\"tls-img-icon\" />\n} @else {\n {{ iconSrc() }}\n}\n" });
|
|
3378
3635
|
}
|
|
3379
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Icon, decorators: [{
|
|
3380
3637
|
type: Component,
|
|
3381
3638
|
args: [{ selector: 'tls-icon', imports: [], host: { class: 'tls-icon' }, template: "@if (isSvg() && iconSrc()) {\n <span [innerHTML]=\"svgContent()\" class=\"tls-svg-icon\"></span>\n} @else if (iconSrc()) {\n <img [src]=\"iconSrc()\" [alt]=\"alt()\" class=\"tls-img-icon\" />\n} @else {\n {{ iconSrc() }}\n}\n" }]
|
|
3382
3639
|
}], propDecorators: { iconSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSrc", required: true }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], allowedSources: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowedSources", required: false }] }] } });
|
|
@@ -3410,13 +3667,17 @@ const LOADER_CONFIG = new InjectionToken('LOADER_CONFIG', {
|
|
|
3410
3667
|
class Loader {
|
|
3411
3668
|
_config = inject(LOADER_CONFIG);
|
|
3412
3669
|
/** Predefined size token or custom pixel value. */
|
|
3413
|
-
size = input(this._config.size,
|
|
3670
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3671
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3414
3672
|
/** Stroke width in pixels. Overrides the size-class default for both token and numeric sizes. */
|
|
3415
|
-
width = input(this._config.width,
|
|
3673
|
+
width = input(this._config.width, /* @ts-ignore */
|
|
3674
|
+
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
3416
3675
|
/** Divisor for auto stroke width when size is a number and width is null (`size / widthRatio`). */
|
|
3417
|
-
widthRatio = input(this._config.widthRatio,
|
|
3676
|
+
widthRatio = input(this._config.widthRatio, /* @ts-ignore */
|
|
3677
|
+
...(ngDevMode ? [{ debugName: "widthRatio" }] : /* istanbul ignore next */ []));
|
|
3418
3678
|
/** Text announced by screen readers via `aria-label`. */
|
|
3419
|
-
ariaLabel = input(this._config.ariaLabel,
|
|
3679
|
+
ariaLabel = input(this._config.ariaLabel, /* @ts-ignore */
|
|
3680
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
3420
3681
|
hostClasses = computed(() => {
|
|
3421
3682
|
const className = 'tls-loader';
|
|
3422
3683
|
const size = this.size();
|
|
@@ -3425,7 +3686,8 @@ class Loader {
|
|
|
3425
3686
|
array.push(`${className}--${size}`);
|
|
3426
3687
|
}
|
|
3427
3688
|
return array;
|
|
3428
|
-
},
|
|
3689
|
+
}, /* @ts-ignore */
|
|
3690
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3429
3691
|
hostStyles = computed(() => {
|
|
3430
3692
|
const size = this.size();
|
|
3431
3693
|
const width = this.width();
|
|
@@ -3443,11 +3705,12 @@ class Loader {
|
|
|
3443
3705
|
styles['--tls-loader-width'] = `${size / this.widthRatio()}px`;
|
|
3444
3706
|
}
|
|
3445
3707
|
return styles;
|
|
3446
|
-
},
|
|
3447
|
-
|
|
3448
|
-
static
|
|
3708
|
+
}, /* @ts-ignore */
|
|
3709
|
+
...(ngDevMode ? [{ debugName: "hostStyles" }] : /* istanbul ignore next */ []));
|
|
3710
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Loader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3711
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Loader, isStandalone: true, selector: "tls-loader", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, widthRatio: { classPropertyName: "widthRatio", publicName: "widthRatio", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status" }, properties: { "class": "hostClasses()", "style": "hostStyles()", "attr.aria-label": "ariaLabel()" } }, ngImport: i0, template: '', isInline: true });
|
|
3449
3712
|
}
|
|
3450
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Loader, decorators: [{
|
|
3451
3714
|
type: Component,
|
|
3452
3715
|
args: [{
|
|
3453
3716
|
selector: 'tls-loader',
|
|
@@ -3463,12 +3726,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3463
3726
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], widthRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "widthRatio", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
3464
3727
|
|
|
3465
3728
|
class MenuItemComponent {
|
|
3466
|
-
key = input.required(
|
|
3729
|
+
key = input.required(/* @ts-ignore */
|
|
3730
|
+
...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
3467
3731
|
templateRef = viewChild.required('template');
|
|
3468
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3469
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
3732
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3733
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: MenuItemComponent, isStandalone: true, selector: "tls-menu-item", inputs: { key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null } }, host: { styleAttribute: "display: none" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["template"], descendants: true, isSignal: true }], ngImport: i0, template: `<ng-template #template><ng-content /></ng-template>`, isInline: true });
|
|
3470
3734
|
}
|
|
3471
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3735
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MenuItemComponent, decorators: [{
|
|
3472
3736
|
type: Component,
|
|
3473
3737
|
args: [{
|
|
3474
3738
|
selector: 'tls-menu-item',
|
|
@@ -3491,28 +3755,40 @@ class Menu {
|
|
|
3491
3755
|
_config = inject(MENU_CONFIG);
|
|
3492
3756
|
_overlay = createOverlayManager();
|
|
3493
3757
|
_panelRef = viewChild.required('panel');
|
|
3494
|
-
_customItems = contentChildren(MenuItemComponent,
|
|
3758
|
+
_customItems = contentChildren(MenuItemComponent, /* @ts-ignore */
|
|
3759
|
+
...(ngDevMode ? [{ debugName: "_customItems" }] : /* istanbul ignore next */ []));
|
|
3495
3760
|
customTemplates = computed(() => {
|
|
3496
3761
|
const map = new Map();
|
|
3497
3762
|
for (const item of this._customItems()) {
|
|
3498
3763
|
map.set(item.key(), item.templateRef());
|
|
3499
3764
|
}
|
|
3500
3765
|
return map;
|
|
3501
|
-
},
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3766
|
+
}, /* @ts-ignore */
|
|
3767
|
+
...(ngDevMode ? [{ debugName: "customTemplates" }] : /* istanbul ignore next */ []));
|
|
3768
|
+
itemTemplate = contentChild('itemTemplate', /* @ts-ignore */
|
|
3769
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
3770
|
+
labelTemplate = contentChild('labelTemplate', /* @ts-ignore */
|
|
3771
|
+
...(ngDevMode ? [{ debugName: "labelTemplate" }] : /* istanbul ignore next */ []));
|
|
3772
|
+
dividerTemplate = contentChild('dividerTemplate', /* @ts-ignore */
|
|
3773
|
+
...(ngDevMode ? [{ debugName: "dividerTemplate" }] : /* istanbul ignore next */ []));
|
|
3774
|
+
iconTemplate = contentChild('iconTemplate', /* @ts-ignore */
|
|
3775
|
+
...(ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
|
|
3506
3776
|
id = `tls-menu-${++Menu._counter}`;
|
|
3507
3777
|
// Inputs
|
|
3508
|
-
items = input([],
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3778
|
+
items = input([], /* @ts-ignore */
|
|
3779
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
3780
|
+
position = input(this._config.position, /* @ts-ignore */
|
|
3781
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
3782
|
+
offset = input(this._config.offset, /* @ts-ignore */
|
|
3783
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
3784
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
3785
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
3786
|
+
inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3787
|
+
_positions = computed(() => buildOverlayPositions(this.position(), this.offset()), /* @ts-ignore */
|
|
3788
|
+
...(ngDevMode ? [{ debugName: "_positions" }] : /* istanbul ignore next */ []));
|
|
3514
3789
|
// An inline menu is always "open" (rendered in place); otherwise reflect the overlay.
|
|
3515
|
-
isOpen = computed(() => this.inline() || this._overlay.isOpen(),
|
|
3790
|
+
isOpen = computed(() => this.inline() || this._overlay.isOpen(), /* @ts-ignore */
|
|
3791
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
3516
3792
|
constructor() {
|
|
3517
3793
|
if (isDevMode()) {
|
|
3518
3794
|
effect(() => {
|
|
@@ -3564,26 +3840,28 @@ class Menu {
|
|
|
3564
3840
|
item.action?.();
|
|
3565
3841
|
this.close();
|
|
3566
3842
|
}
|
|
3567
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3568
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3843
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Menu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3844
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Menu, isStandalone: true, selector: "tls-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_customItems", predicate: MenuItemComponent, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: ["labelTemplate"], descendants: true, isSignal: true }, { propertyName: "dividerTemplate", first: true, predicate: ["dividerTemplate"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["iconTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #panel>\n <div\n class=\"tls-menu\"\n animate.enter=\"tls-menu--enter\"\n animate.leave=\"tls-menu--leave\"\n [id]=\"id\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n >\n @for (item of items(); track $index) {\n @switch (item.type) {\n @case ('item') {\n @let actionItem = item;\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n } @else if (actionItem.link) {\n <a\n role=\"menuitem\"\n class=\"tls-menu__item\"\n [routerLink]=\"actionItem.link\"\n [class.tls-menu__item--disabled]=\"actionItem.disabled ?? false\"\n (click)=\"onItemClick(actionItem)\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </a>\n } @else {\n <button\n role=\"menuitem\"\n class=\"tls-menu__item\"\n [disabled]=\"actionItem.disabled ?? false\"\n (click)=\"onItemClick(actionItem)\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </button>\n }\n\n <ng-template #actionItemContent let-actionItem>\n @if (actionItem.icon) {\n @if (iconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem.icon, data: actionItem }\" />\n } @else {\n <tls-icon class=\"tls-menu__item-icon\" [iconSrc]=\"actionItem.icon\" />\n }\n }\n <span class=\"tls-menu__item-label\">{{ actionItem.label }}</span>\n @if (actionItem.shortcut) {\n <kbd class=\"tls-menu__item-shortcut\">{{ actionItem.shortcut }}</kbd>\n }\n </ng-template>\n }\n @case ('label') {\n @let labelItem = item;\n @if (labelTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: labelItem }\" />\n } @else {\n <span class=\"tls-menu__label\" aria-hidden=\"true\">{{ labelItem.label }}</span>\n }\n }\n @case ('divider') {\n @if (dividerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <hr class=\"tls-menu__divider\" role=\"separator\" aria-hidden=\"true\" />\n }\n }\n @case ('custom') {\n @if (customTemplates().get(item.key); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }\n }\n }\n }\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panel\" />\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Icon, selector: "tls-icon", inputs: ["iconSrc", "alt", "allowedSources"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
|
|
3569
3845
|
}
|
|
3570
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3846
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Menu, decorators: [{
|
|
3571
3847
|
type: Component,
|
|
3572
3848
|
args: [{ selector: 'tls-menu', imports: [NgTemplateOutlet, Icon, RouterLink], template: "<ng-template #panel>\n <div\n class=\"tls-menu\"\n animate.enter=\"tls-menu--enter\"\n animate.leave=\"tls-menu--leave\"\n [id]=\"id\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n >\n @for (item of items(); track $index) {\n @switch (item.type) {\n @case ('item') {\n @let actionItem = item;\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n } @else if (actionItem.link) {\n <a\n role=\"menuitem\"\n class=\"tls-menu__item\"\n [routerLink]=\"actionItem.link\"\n [class.tls-menu__item--disabled]=\"actionItem.disabled ?? false\"\n (click)=\"onItemClick(actionItem)\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </a>\n } @else {\n <button\n role=\"menuitem\"\n class=\"tls-menu__item\"\n [disabled]=\"actionItem.disabled ?? false\"\n (click)=\"onItemClick(actionItem)\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </button>\n }\n\n <ng-template #actionItemContent let-actionItem>\n @if (actionItem.icon) {\n @if (iconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem.icon, data: actionItem }\" />\n } @else {\n <tls-icon class=\"tls-menu__item-icon\" [iconSrc]=\"actionItem.icon\" />\n }\n }\n <span class=\"tls-menu__item-label\">{{ actionItem.label }}</span>\n @if (actionItem.shortcut) {\n <kbd class=\"tls-menu__item-shortcut\">{{ actionItem.shortcut }}</kbd>\n }\n </ng-template>\n }\n @case ('label') {\n @let labelItem = item;\n @if (labelTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: labelItem }\" />\n } @else {\n <span class=\"tls-menu__label\" aria-hidden=\"true\">{{ labelItem.label }}</span>\n }\n }\n @case ('divider') {\n @if (dividerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <hr class=\"tls-menu__divider\" role=\"separator\" aria-hidden=\"true\" />\n }\n }\n @case ('custom') {\n @if (customTemplates().get(item.key); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }\n }\n }\n }\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panel\" />\n}\n" }]
|
|
3573
3849
|
}], ctorParameters: () => [], propDecorators: { _panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], _customItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MenuItemComponent), { isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['itemTemplate', { isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: ['labelTemplate', { isSignal: true }] }], dividerTemplate: [{ type: i0.ContentChild, args: ['dividerTemplate', { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: ['iconTemplate', { isSignal: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }] } });
|
|
3574
3850
|
|
|
3575
3851
|
class MenuTriggerDirective {
|
|
3576
|
-
menu = input.required({ ...(ngDevMode ? { debugName: "menu" } : {}), alias: 'tlsMenuTrigger' });
|
|
3577
|
-
isOpen = computed(() => this.menu().isOpen(),
|
|
3578
|
-
|
|
3852
|
+
menu = input.required({ ...(ngDevMode ? { debugName: "menu" } : /* istanbul ignore next */ {}), alias: 'tlsMenuTrigger' });
|
|
3853
|
+
isOpen = computed(() => this.menu().isOpen(), /* @ts-ignore */
|
|
3854
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
3855
|
+
menuId = computed(() => this.menu().id, /* @ts-ignore */
|
|
3856
|
+
...(ngDevMode ? [{ debugName: "menuId" }] : /* istanbul ignore next */ []));
|
|
3579
3857
|
// Protected methods
|
|
3580
3858
|
onClick(event) {
|
|
3581
3859
|
this.menu().toggle(event);
|
|
3582
3860
|
}
|
|
3583
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3584
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
3861
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3862
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: MenuTriggerDirective, isStandalone: true, selector: "[tlsMenuTrigger]", inputs: { menu: { classPropertyName: "menu", publicName: "tlsMenuTrigger", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "onClick($event)" }, properties: { "attr.aria-haspopup": "\"menu\"", "attr.aria-expanded": "isOpen()", "attr.aria-controls": "menuId()" } }, ngImport: i0 });
|
|
3585
3863
|
}
|
|
3586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3864
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MenuTriggerDirective, decorators: [{
|
|
3587
3865
|
type: Directive,
|
|
3588
3866
|
args: [{
|
|
3589
3867
|
selector: '[tlsMenuTrigger]',
|
|
@@ -3597,17 +3875,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3597
3875
|
}], propDecorators: { menu: [{ type: i0.Input, args: [{ isSignal: true, alias: "tlsMenuTrigger", required: true }] }] } });
|
|
3598
3876
|
|
|
3599
3877
|
class ContextMenuDirective {
|
|
3600
|
-
menu = input.required({ ...(ngDevMode ? { debugName: "menu" } : {}), alias: 'tlsContextMenu' });
|
|
3878
|
+
menu = input.required({ ...(ngDevMode ? { debugName: "menu" } : /* istanbul ignore next */ {}), alias: 'tlsContextMenu' });
|
|
3601
3879
|
// Protected methods
|
|
3602
3880
|
onContextMenu(event) {
|
|
3603
3881
|
event.preventDefault();
|
|
3604
3882
|
this.menu().close();
|
|
3605
3883
|
this.menu().openAtPoint(event.clientX, event.clientY);
|
|
3606
3884
|
}
|
|
3607
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3608
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
3885
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContextMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3886
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: ContextMenuDirective, isStandalone: true, selector: "[tlsContextMenu]", inputs: { menu: { classPropertyName: "menu", publicName: "tlsContextMenu", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "contextmenu": "onContextMenu($event)" } }, ngImport: i0 });
|
|
3609
3887
|
}
|
|
3610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3888
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
3611
3889
|
type: Directive,
|
|
3612
3890
|
args: [{
|
|
3613
3891
|
selector: '[tlsContextMenu]',
|
|
@@ -3644,15 +3922,19 @@ const ODOMETER_MINUS_SIGN = '−';
|
|
|
3644
3922
|
*/
|
|
3645
3923
|
class OdometerDigit {
|
|
3646
3924
|
// Inputs
|
|
3647
|
-
digit = input.required(
|
|
3648
|
-
|
|
3925
|
+
digit = input.required(/* @ts-ignore */
|
|
3926
|
+
...(ngDevMode ? [{ debugName: "digit" }] : /* istanbul ignore next */ []));
|
|
3927
|
+
duration = input.required(/* @ts-ignore */
|
|
3928
|
+
...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
3649
3929
|
// State
|
|
3650
3930
|
strip = ODOMETER_STRIP;
|
|
3651
3931
|
// Row the strip is translated to. Starts centred on the middle repetition.
|
|
3652
|
-
offset = signal(ODOMETER_CENTER_OFFSET,
|
|
3932
|
+
offset = signal(ODOMETER_CENTER_OFFSET, /* @ts-ignore */
|
|
3933
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
3653
3934
|
// Whether the translation transition is armed. Disabled while re-centring so
|
|
3654
3935
|
// the invisible jump between repetitions never animates.
|
|
3655
|
-
animating = signal(false,
|
|
3936
|
+
animating = signal(false, /* @ts-ignore */
|
|
3937
|
+
...(ngDevMode ? [{ debugName: "animating" }] : /* istanbul ignore next */ []));
|
|
3656
3938
|
// Digit currently settled in the viewport, tracked to derive the roll direction.
|
|
3657
3939
|
_currentDigit = 0;
|
|
3658
3940
|
_initialized = false;
|
|
@@ -3698,8 +3980,8 @@ class OdometerDigit {
|
|
|
3698
3980
|
delta += ODOMETER_DIGITS_PER_REPETITION;
|
|
3699
3981
|
return delta;
|
|
3700
3982
|
}
|
|
3701
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3702
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3983
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: OdometerDigit, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3984
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: OdometerDigit, isStandalone: true, selector: "tls-odometer-digit", inputs: { digit: { classPropertyName: "digit", publicName: "digit", isSignal: true, isRequired: true, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "style.--tls-odometer-duration.ms": "duration()" }, classAttribute: "tls-odometer-digit" }, ngImport: i0, template: `
|
|
3703
3985
|
<span
|
|
3704
3986
|
class="tls-odometer-digit__strip"
|
|
3705
3987
|
[class.tls-odometer-digit__strip--animate]="animating()"
|
|
@@ -3711,7 +3993,7 @@ class OdometerDigit {
|
|
|
3711
3993
|
</span>
|
|
3712
3994
|
`, isInline: true });
|
|
3713
3995
|
}
|
|
3714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: OdometerDigit, decorators: [{
|
|
3715
3997
|
type: Component,
|
|
3716
3998
|
args: [{
|
|
3717
3999
|
selector: 'tls-odometer-digit',
|
|
@@ -3767,17 +4049,23 @@ class Odometer {
|
|
|
3767
4049
|
_config = inject(ODOMETER_CONFIG);
|
|
3768
4050
|
// Inputs
|
|
3769
4051
|
/** The number to display. Changes roll the affected digit columns. */
|
|
3770
|
-
value = input.required(
|
|
4052
|
+
value = input.required(/* @ts-ignore */
|
|
4053
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3771
4054
|
/** Duration of a single-digit roll, in milliseconds. */
|
|
3772
|
-
duration = input(this._config.duration,
|
|
4055
|
+
duration = input(this._config.duration, /* @ts-ignore */
|
|
4056
|
+
...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
3773
4057
|
/** Minimum number of integer digits, left-padded with zeros (`007`). */
|
|
3774
|
-
minIntegerDigits = input(this._config.minIntegerDigits,
|
|
4058
|
+
minIntegerDigits = input(this._config.minIntegerDigits, /* @ts-ignore */
|
|
4059
|
+
...(ngDevMode ? [{ debugName: "minIntegerDigits" }] : /* istanbul ignore next */ []));
|
|
3775
4060
|
/** Number of fraction digits to display. `0` hides the decimal part. */
|
|
3776
|
-
fractionDigits = input(this._config.fractionDigits,
|
|
4061
|
+
fractionDigits = input(this._config.fractionDigits, /* @ts-ignore */
|
|
4062
|
+
...(ngDevMode ? [{ debugName: "fractionDigits" }] : /* istanbul ignore next */ []));
|
|
3777
4063
|
/** Character rendered between the integer and fraction parts. */
|
|
3778
|
-
decimalSeparator = input(this._config.decimalSeparator,
|
|
4064
|
+
decimalSeparator = input(this._config.decimalSeparator, /* @ts-ignore */
|
|
4065
|
+
...(ngDevMode ? [{ debugName: "decimalSeparator" }] : /* istanbul ignore next */ []));
|
|
3779
4066
|
/** Overrides the text announced to screen readers (defaults to the formatted value). */
|
|
3780
|
-
ariaLabel = input(undefined,
|
|
4067
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
4068
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
3781
4069
|
// Computed
|
|
3782
4070
|
tokens = computed(() => {
|
|
3783
4071
|
const value = this.value();
|
|
@@ -3807,14 +4095,16 @@ class Odometer {
|
|
|
3807
4095
|
}
|
|
3808
4096
|
}
|
|
3809
4097
|
return tokens;
|
|
3810
|
-
},
|
|
4098
|
+
}, /* @ts-ignore */
|
|
4099
|
+
...(ngDevMode ? [{ debugName: "tokens" }] : /* istanbul ignore next */ []));
|
|
3811
4100
|
formattedValue = computed(() => this.tokens()
|
|
3812
4101
|
.map(token => (token.digit === null ? token.symbol : String(token.digit)))
|
|
3813
|
-
.join(''),
|
|
3814
|
-
|
|
3815
|
-
static
|
|
4102
|
+
.join(''), /* @ts-ignore */
|
|
4103
|
+
...(ngDevMode ? [{ debugName: "formattedValue" }] : /* istanbul ignore next */ []));
|
|
4104
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Odometer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4105
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Odometer, isStandalone: true, selector: "tls-odometer", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, minIntegerDigits: { classPropertyName: "minIntegerDigits", publicName: "minIntegerDigits", isSignal: true, isRequired: false, transformFunction: null }, fractionDigits: { classPropertyName: "fractionDigits", publicName: "fractionDigits", isSignal: true, isRequired: false, transformFunction: null }, decimalSeparator: { classPropertyName: "decimalSeparator", publicName: "decimalSeparator", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "tls-odometer" }, ngImport: i0, template: "<span class=\"tls-odometer__value\">{{ ariaLabel() ?? formattedValue() }}</span>\n\n<span class=\"tls-odometer__row\" aria-hidden=\"true\">\n @for (token of tokens(); track token.key) {\n @if (token.digit === null) {\n <span class=\"tls-odometer__symbol\">{{ token.symbol }}</span>\n } @else {\n <tls-odometer-digit class=\"tls-odometer__digit\" [digit]=\"token.digit\" [duration]=\"duration()\" />\n }\n }\n</span>\n", dependencies: [{ kind: "component", type: OdometerDigit, selector: "tls-odometer-digit", inputs: ["digit", "duration"] }] });
|
|
3816
4106
|
}
|
|
3817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Odometer, decorators: [{
|
|
3818
4108
|
type: Component,
|
|
3819
4109
|
args: [{ selector: 'tls-odometer', imports: [OdometerDigit], host: {
|
|
3820
4110
|
class: 'tls-odometer',
|
|
@@ -3836,20 +4126,31 @@ const PAGINATION_CONFIG = new InjectionToken('PAGINATION_CONFIG', {
|
|
|
3836
4126
|
|
|
3837
4127
|
class Pagination {
|
|
3838
4128
|
_config = inject(PAGINATION_CONFIG);
|
|
3839
|
-
value = model(1,
|
|
4129
|
+
value = model(1, /* @ts-ignore */
|
|
4130
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3840
4131
|
/** Accessible name for the pagination navigation landmark. */
|
|
3841
|
-
ariaLabel = input('Pagination',
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
4132
|
+
ariaLabel = input('Pagination', /* @ts-ignore */
|
|
4133
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4134
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
4135
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
4136
|
+
pageSize = input(this._config.pageSize, /* @ts-ignore */
|
|
4137
|
+
...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
4138
|
+
total = input(0, /* @ts-ignore */
|
|
4139
|
+
...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
4140
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
4141
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
4142
|
+
boundaries = input(this._config.boundaries, /* @ts-ignore */
|
|
4143
|
+
...(ngDevMode ? [{ debugName: "boundaries" }] : /* istanbul ignore next */ []));
|
|
4144
|
+
siblings = input(this._config.siblings, /* @ts-ignore */
|
|
4145
|
+
...(ngDevMode ? [{ debugName: "siblings" }] : /* istanbul ignore next */ []));
|
|
4146
|
+
showFirstButton = input(this._config.showFirstButton, { ...(ngDevMode ? { debugName: "showFirstButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4147
|
+
showLastButton = input(this._config.showLastButton, { ...(ngDevMode ? { debugName: "showLastButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4148
|
+
pageCount = computed(() => Math.ceil(this.total() / this.pageSize()), /* @ts-ignore */
|
|
4149
|
+
...(ngDevMode ? [{ debugName: "pageCount" }] : /* istanbul ignore next */ []));
|
|
4150
|
+
visiblePages = computed(() => this._buildPages(this.pageCount(), this.value(), this.siblings(), this.boundaries()), /* @ts-ignore */
|
|
4151
|
+
...(ngDevMode ? [{ debugName: "visiblePages" }] : /* istanbul ignore next */ []));
|
|
4152
|
+
classes = computed(() => ['tls-pagination', `tls-pagination--${this.size()}`], /* @ts-ignore */
|
|
4153
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3853
4154
|
// Protected methods
|
|
3854
4155
|
setPage(page) {
|
|
3855
4156
|
this.value.set(page);
|
|
@@ -3901,10 +4202,10 @@ class Pagination {
|
|
|
3901
4202
|
...endPages,
|
|
3902
4203
|
];
|
|
3903
4204
|
}
|
|
3904
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3905
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4205
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Pagination, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4206
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Pagination, isStandalone: true, selector: "tls-pagination", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, boundaries: { classPropertyName: "boundaries", publicName: "boundaries", isSignal: true, isRequired: false, transformFunction: null }, siblings: { classPropertyName: "siblings", publicName: "siblings", isSignal: true, isRequired: false, transformFunction: null }, showFirstButton: { classPropertyName: "showFirstButton", publicName: "showFirstButton", isSignal: true, isRequired: false, transformFunction: null }, showLastButton: { classPropertyName: "showLastButton", publicName: "showLastButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "navigation" }, properties: { "class": "classes()", "attr.aria-label": "ariaLabelledby() ? null : ariaLabel()", "attr.aria-labelledby": "ariaLabelledby() ?? null" } }, ngImport: i0, template: "@if (showFirstButton()) {\n <button\n id=\"tls-pagination-first\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === 1\"\n (click)=\"firstPage()\"\n >\n <span class=\"tls-pagination__button-icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"11 17 6 12 11 7\" />\n <polyline points=\"18 17 13 12 18 7\" />\n </svg>\n </span>\n </button>\n}\n\n<button\n id=\"tls-pagination-prev\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === 1\"\n (click)=\"prevPage()\"\n>\n <span class=\"tls-pagination__button-icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"15 18 9 12 15 6\" />\n </svg>\n </span>\n</button>\n\n<ul class=\"tls-pagination__list\">\n @for (item of visiblePages(); track $index) {\n <li class=\"tls-pagination__item\">\n @if (item === 'gap') {\n <span class=\"tls-pagination__gap\">...</span>\n } @else {\n <button\n class=\"tls-pagination__item-button\"\n [class.tls-pagination__item-button--active]=\"value() === item\"\n (click)=\"setPage(item)\"\n >\n {{ item }}\n </button>\n }\n </li>\n }\n</ul>\n\n<button\n id=\"tls-pagination-next\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === pageCount()\"\n (click)=\"nextPage()\"\n>\n <span class=\"tls-pagination__button-icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n </span>\n</button>\n\n@if (showLastButton()) {\n <button\n id=\"tls-pagination-last\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === pageCount()\"\n (click)=\"lastPage()\"\n >\n <span class=\"tls-pagination__button-icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"13 17 18 12 13 7\" />\n <polyline points=\"6 17 11 12 6 7\" />\n </svg>\n </span>\n </button>\n}\n" });
|
|
3906
4207
|
}
|
|
3907
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Pagination, decorators: [{
|
|
3908
4209
|
type: Component,
|
|
3909
4210
|
args: [{ selector: 'tls-pagination', host: {
|
|
3910
4211
|
role: 'navigation',
|
|
@@ -3924,7 +4225,8 @@ class PaginationQuerySyncDirective extends QuerySyncDirective {
|
|
|
3924
4225
|
_pagination = inject(Pagination);
|
|
3925
4226
|
_config = inject(PAGINATION_QUERY_SYNC_CONFIG);
|
|
3926
4227
|
// Inputs
|
|
3927
|
-
tlsPaginationQuerySync = input(this._config.paramKey,
|
|
4228
|
+
tlsPaginationQuerySync = input(this._config.paramKey, /* @ts-ignore */
|
|
4229
|
+
...(ngDevMode ? [{ debugName: "tlsPaginationQuerySync" }] : /* istanbul ignore next */ []));
|
|
3928
4230
|
constructor() {
|
|
3929
4231
|
super();
|
|
3930
4232
|
effect(() => {
|
|
@@ -3942,10 +4244,10 @@ class PaginationQuerySyncDirective extends QuerySyncDirective {
|
|
|
3942
4244
|
if (!Number.isNaN(page) && page >= 1)
|
|
3943
4245
|
this._pagination.value.set(page);
|
|
3944
4246
|
}
|
|
3945
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3946
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
4247
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PaginationQuerySyncDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4248
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: PaginationQuerySyncDirective, isStandalone: true, selector: "tls-pagination[tlsPaginationQuerySync]", inputs: { tlsPaginationQuerySync: { classPropertyName: "tlsPaginationQuerySync", publicName: "tlsPaginationQuerySync", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
3947
4249
|
}
|
|
3948
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PaginationQuerySyncDirective, decorators: [{
|
|
3949
4251
|
type: Directive,
|
|
3950
4252
|
args: [{
|
|
3951
4253
|
selector: 'tls-pagination[tlsPaginationQuerySync]',
|
|
@@ -3968,13 +4270,18 @@ const SKELETON_CONFIG = new InjectionToken('SKELETON_CONFIG', {
|
|
|
3968
4270
|
|
|
3969
4271
|
class Skeleton {
|
|
3970
4272
|
_config = inject(SKELETON_CONFIG);
|
|
3971
|
-
size = input(this._config.size,
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
4273
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
4274
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
4275
|
+
width = input(this._config.width, /* @ts-ignore */
|
|
4276
|
+
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
4277
|
+
height = input(this._config.height, /* @ts-ignore */
|
|
4278
|
+
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
4279
|
+
radius = input(this._config.radius, /* @ts-ignore */
|
|
4280
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
4281
|
+
duration = input(this._config.duration, /* @ts-ignore */
|
|
4282
|
+
...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
4283
|
+
rounded = input(this._config.rounded, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4284
|
+
animate = input(this._config.animate, { ...(ngDevMode ? { debugName: "animate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3978
4285
|
hostClasses = computed(() => {
|
|
3979
4286
|
const className = 'tls-skeleton';
|
|
3980
4287
|
const array = [className];
|
|
@@ -3982,7 +4289,8 @@ class Skeleton {
|
|
|
3982
4289
|
array.push(`${className}--no-animate`);
|
|
3983
4290
|
}
|
|
3984
4291
|
return array;
|
|
3985
|
-
},
|
|
4292
|
+
}, /* @ts-ignore */
|
|
4293
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3986
4294
|
hostStyles = computed(() => {
|
|
3987
4295
|
const size = this.size();
|
|
3988
4296
|
const width = this.width() ?? size;
|
|
@@ -3995,7 +4303,8 @@ class Skeleton {
|
|
|
3995
4303
|
'--tls-skeleton-radius': rounded ? '50%' : `${radius}px`,
|
|
3996
4304
|
'--tls-skeleton-duration': `${this.duration()}ms`,
|
|
3997
4305
|
};
|
|
3998
|
-
},
|
|
4306
|
+
}, /* @ts-ignore */
|
|
4307
|
+
...(ngDevMode ? [{ debugName: "hostStyles" }] : /* istanbul ignore next */ []));
|
|
3999
4308
|
resolveDimension(value) {
|
|
4000
4309
|
if (value === null)
|
|
4001
4310
|
return '100%';
|
|
@@ -4003,10 +4312,10 @@ class Skeleton {
|
|
|
4003
4312
|
return value;
|
|
4004
4313
|
return `${value}px`;
|
|
4005
4314
|
}
|
|
4006
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4007
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
4315
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Skeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4316
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Skeleton, isStandalone: true, selector: "tls-skeleton", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "class": "hostClasses()", "style": "hostStyles()" } }, ngImport: i0, template: '', isInline: true });
|
|
4008
4317
|
}
|
|
4009
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Skeleton, decorators: [{
|
|
4010
4319
|
type: Component,
|
|
4011
4320
|
args: [{
|
|
4012
4321
|
selector: 'tls-skeleton',
|
|
@@ -4022,10 +4331,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4022
4331
|
|
|
4023
4332
|
class StepperService {
|
|
4024
4333
|
active = null;
|
|
4025
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4026
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4334
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: StepperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4335
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: StepperService });
|
|
4027
4336
|
}
|
|
4028
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: StepperService, decorators: [{
|
|
4029
4338
|
type: Injectable
|
|
4030
4339
|
}] });
|
|
4031
4340
|
|
|
@@ -4045,15 +4354,23 @@ const STEPPER_CONFIG = new InjectionToken('STEPPER_CONFIG', {
|
|
|
4045
4354
|
class Step {
|
|
4046
4355
|
_config = inject(STEPPER_CONFIG);
|
|
4047
4356
|
_stepperService = inject(StepperService);
|
|
4048
|
-
iconTemplateRef = contentChild('stepIcon',
|
|
4049
|
-
|
|
4357
|
+
iconTemplateRef = contentChild('stepIcon', /* @ts-ignore */
|
|
4358
|
+
...(ngDevMode ? [{ debugName: "iconTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4359
|
+
completedIconTemplateRef = contentChild('stepCompletedIcon', /* @ts-ignore */
|
|
4360
|
+
...(ngDevMode ? [{ debugName: "completedIconTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4050
4361
|
// Inputs
|
|
4051
|
-
value = input.required(
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4362
|
+
value = input.required(/* @ts-ignore */
|
|
4363
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4364
|
+
label = input(/* @ts-ignore */
|
|
4365
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
4366
|
+
description = input(/* @ts-ignore */
|
|
4367
|
+
...(ngDevMode ? [undefined, { debugName: "description" }] : /* istanbul ignore next */ []));
|
|
4368
|
+
color = input(this._config.step.color, /* @ts-ignore */
|
|
4369
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
4370
|
+
disabled = input(false, /* @ts-ignore */
|
|
4371
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4372
|
+
_active = computed(() => this._stepperService.active?.() === this.value(), /* @ts-ignore */
|
|
4373
|
+
...(ngDevMode ? [{ debugName: "_active" }] : /* istanbul ignore next */ []));
|
|
4057
4374
|
hostClasses = computed(() => {
|
|
4058
4375
|
const className = 'tls-step';
|
|
4059
4376
|
const array = [className];
|
|
@@ -4062,11 +4379,12 @@ class Step {
|
|
|
4062
4379
|
if (this.disabled())
|
|
4063
4380
|
array.push(`${className}--disabled`);
|
|
4064
4381
|
return array;
|
|
4065
|
-
},
|
|
4066
|
-
|
|
4067
|
-
static
|
|
4382
|
+
}, /* @ts-ignore */
|
|
4383
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4384
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Step, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4385
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: Step, isStandalone: true, selector: "tls-step", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "iconTemplateRef", first: true, predicate: ["stepIcon"], descendants: true, isSignal: true }, { propertyName: "completedIconTemplateRef", first: true, predicate: ["stepCompletedIcon"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
4068
4386
|
}
|
|
4069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Step, decorators: [{
|
|
4070
4388
|
type: Component,
|
|
4071
4389
|
args: [{ selector: 'tls-step', imports: [], host: {
|
|
4072
4390
|
'[class]': 'hostClasses()',
|
|
@@ -4079,17 +4397,27 @@ class Stepper {
|
|
|
4079
4397
|
_config = inject(STEPPER_CONFIG);
|
|
4080
4398
|
_stepperService = inject(StepperService);
|
|
4081
4399
|
_directionality = inject(Directionality);
|
|
4082
|
-
steps = contentChildren(Step,
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4400
|
+
steps = contentChildren(Step, /* @ts-ignore */
|
|
4401
|
+
...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
|
|
4402
|
+
completedTemplateRef = contentChild('completedTemplate', /* @ts-ignore */
|
|
4403
|
+
...(ngDevMode ? [{ debugName: "completedTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4404
|
+
completedIconTemplateRef = contentChild('stepCompletedIcon', /* @ts-ignore */
|
|
4405
|
+
...(ngDevMode ? [{ debugName: "completedIconTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4406
|
+
_stepButtons = viewChildren('stepButton', /* @ts-ignore */
|
|
4407
|
+
...(ngDevMode ? [{ debugName: "_stepButtons" }] : /* istanbul ignore next */ []));
|
|
4408
|
+
active = model.required(/* @ts-ignore */
|
|
4409
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
4410
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
4411
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
4412
|
+
completed = input(false, /* @ts-ignore */
|
|
4413
|
+
...(ngDevMode ? [{ debugName: "completed" }] : /* istanbul ignore next */ []));
|
|
4414
|
+
linear = input(this._config.linear, /* @ts-ignore */
|
|
4415
|
+
...(ngDevMode ? [{ debugName: "linear" }] : /* istanbul ignore next */ []));
|
|
4090
4416
|
/** Accessible name for the stepper tablist. */
|
|
4091
|
-
ariaLabel = input(undefined,
|
|
4092
|
-
|
|
4417
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
4418
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4419
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
4420
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
4093
4421
|
stepSelect = output();
|
|
4094
4422
|
hostClasses = computed(() => {
|
|
4095
4423
|
const className = 'tls-stepper';
|
|
@@ -4098,8 +4426,10 @@ class Stepper {
|
|
|
4098
4426
|
if (this.completed())
|
|
4099
4427
|
array.push(`${className}--completed`);
|
|
4100
4428
|
return array;
|
|
4101
|
-
},
|
|
4102
|
-
|
|
4429
|
+
}, /* @ts-ignore */
|
|
4430
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4431
|
+
activeIndex = computed(() => this.steps().findIndex(step => step.value() === this.active()), /* @ts-ignore */
|
|
4432
|
+
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
4103
4433
|
constructor() {
|
|
4104
4434
|
this._stepperService.active = this.active.asReadonly();
|
|
4105
4435
|
}
|
|
@@ -4156,10 +4486,10 @@ class Stepper {
|
|
|
4156
4486
|
}
|
|
4157
4487
|
return null;
|
|
4158
4488
|
}
|
|
4159
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4160
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4489
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Stepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4490
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Stepper, isStandalone: true, selector: "tls-stepper", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, completed: { classPropertyName: "completed", publicName: "completed", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", stepSelect: "stepSelect" }, host: { properties: { "class": "hostClasses()" } }, providers: [StepperService], queries: [{ propertyName: "steps", predicate: Step, isSignal: true }, { propertyName: "completedTemplateRef", first: true, predicate: ["completedTemplate"], descendants: true, isSignal: true }, { propertyName: "completedIconTemplateRef", first: true, predicate: ["stepCompletedIcon"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_stepButtons", predicate: ["stepButton"], descendants: true, isSignal: true }], ngImport: i0, template: "<ul\n class=\"tls-stepper-header\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (step of steps(); track step.value(); let index = $index; let last = $last) {\n <li role=\"presentation\"\n class=\"tls-stepper-header__item\"\n [class]=\"`tls-stepper-header--${step.color()}`\"\n [class.tls-stepper-header__item--active]=\"step.value() === active()\"\n [class.tls-stepper-header__item--disabled]=\"step.disabled()\"\n [class.tls-stepper-header__item--unreachable]=\"linear() && index > activeIndex() + 1\"\n [class.tls-stepper-header__item--completed]=\"activeIndex() > index || completed()\">\n @let id = 'tls-stepper-tab-' + step.value();\n <button\n #stepButton\n class=\"tls-stepper-header-button\"\n role=\"tab\"\n type=\"button\"\n [attr.aria-controls]=\"panelId\"\n [id]=\"id\"\n [tabindex]=\"step.value() === active() ? 0 : -1\"\n [disabled]=\"step.disabled()\"\n [attr.aria-selected]=\"step.value() === active()\"\n (click)=\"onSelect(step, index)\"\n (keydown)=\"onKeydown($event, index)\"\n >\n <span class=\"tls-stepper-header-button__index\">\n @let isCompleted = activeIndex() > index || completed();\n @if (isCompleted && step.completedIconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"step.completedIconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else if (isCompleted && completedIconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"completedIconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else if (step.iconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"step.iconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else {\n {{ index + 1 }}\n }\n </span>\n\n <span class=\"tls-stepper-header-button__text\">\n @if (step.label()) {\n <span class=\"tls-stepper-header-button__label\">{{ step.label() }}</span>\n }\n @if (step.description()) {\n <span class=\"tls-stepper-header-button__description\">{{ step.description() }}</span>\n }\n </span>\n </button>\n @if (!last) {\n <div class=\"tls-stepper-header__divider\"></div>\n }\n </li>\n }\n</ul>\n<div class=\"tls-stepper-content\"\n [id]=\"panelId\"\n role=\"tabpanel\"\n [attr.aria-labelledby]=\"'tls-stepper-tab-' + active()\">\n <ng-content></ng-content>\n @if (completed() && completedTemplateRef()) {\n <div class=\"tls-stepper-content__template\">\n <ng-container [ngTemplateOutlet]=\"completedTemplateRef()\"></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
4161
4491
|
}
|
|
4162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Stepper, decorators: [{
|
|
4163
4493
|
type: Component,
|
|
4164
4494
|
args: [{ selector: 'tls-stepper', imports: [NgTemplateOutlet], host: {
|
|
4165
4495
|
'[class]': 'hostClasses()',
|
|
@@ -4167,16 +4497,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4167
4497
|
}], ctorParameters: () => [], propDecorators: { steps: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => Step), { isSignal: true }] }], completedTemplateRef: [{ type: i0.ContentChild, args: ['completedTemplate', { isSignal: true }] }], completedIconTemplateRef: [{ type: i0.ContentChild, args: ['stepCompletedIcon', { isSignal: true }] }], _stepButtons: [{ type: i0.ViewChildren, args: ['stepButton', { isSignal: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: true }] }, { type: i0.Output, args: ["activeChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], completed: [{ type: i0.Input, args: [{ isSignal: true, alias: "completed", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], stepSelect: [{ type: i0.Output, args: ["stepSelect"] }] } });
|
|
4168
4498
|
|
|
4169
4499
|
class TableColumn {
|
|
4170
|
-
key = input.required(
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4500
|
+
key = input.required(/* @ts-ignore */
|
|
4501
|
+
...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
4502
|
+
header = input(/* @ts-ignore */
|
|
4503
|
+
...(ngDevMode ? [undefined, { debugName: "header" }] : /* istanbul ignore next */ []));
|
|
4504
|
+
hidden = input(false, { ...(ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4505
|
+
alignment = input(/* @ts-ignore */
|
|
4506
|
+
...(ngDevMode ? [undefined, { debugName: "alignment" }] : /* istanbul ignore next */ []));
|
|
4507
|
+
width = input(/* @ts-ignore */
|
|
4508
|
+
...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
4509
|
+
template = contentChild(TemplateRef, /* @ts-ignore */
|
|
4510
|
+
...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
|
|
4511
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TableColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4512
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: TableColumn, isStandalone: true, selector: "tls-table-column", inputs: { key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: '', isInline: true });
|
|
4178
4513
|
}
|
|
4179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TableColumn, decorators: [{
|
|
4180
4515
|
type: Component,
|
|
4181
4516
|
args: [{
|
|
4182
4517
|
selector: 'tls-table-column',
|
|
@@ -4196,15 +4531,21 @@ const TABLE_CONFIG = new InjectionToken('TABLE_CONFIG', {
|
|
|
4196
4531
|
|
|
4197
4532
|
class Table {
|
|
4198
4533
|
_config = inject(TABLE_CONFIG);
|
|
4199
|
-
data = input.required(
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4534
|
+
data = input.required(/* @ts-ignore */
|
|
4535
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
4536
|
+
columnDefinitions = input([], /* @ts-ignore */
|
|
4537
|
+
...(ngDevMode ? [{ debugName: "columnDefinitions" }] : /* istanbul ignore next */ []));
|
|
4538
|
+
hideHeader = input(this._config.hideHeader, { ...(ngDevMode ? { debugName: "hideHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4539
|
+
striped = input(this._config.striped, { ...(ngDevMode ? { debugName: "striped" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4540
|
+
trackBy = input(/* @ts-ignore */
|
|
4541
|
+
...(ngDevMode ? [undefined, { debugName: "trackBy" }] : /* istanbul ignore next */ []));
|
|
4204
4542
|
/** Accessible name for the table, forwarded to the inner `<table>` element. */
|
|
4205
|
-
ariaLabel = input(undefined,
|
|
4206
|
-
|
|
4207
|
-
|
|
4543
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
4544
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4545
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
4546
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
4547
|
+
tableColumns = contentChildren(TableColumn, /* @ts-ignore */
|
|
4548
|
+
...(ngDevMode ? [{ debugName: "tableColumns" }] : /* istanbul ignore next */ []));
|
|
4208
4549
|
// Merges columnDefinitions input and tls-table-column content children into a single list.
|
|
4209
4550
|
// Input drives order; content children override matching keys and append unmatched columns at the end.
|
|
4210
4551
|
// Map keyed by content column key → O(1) lookup when applying overrides to each input column.
|
|
@@ -4225,12 +4566,14 @@ class Table {
|
|
|
4225
4566
|
}));
|
|
4226
4567
|
const extras = fromContent.filter(definition => !inputKeys.has(definition.key));
|
|
4227
4568
|
return [...merged, ...extras];
|
|
4228
|
-
},
|
|
4569
|
+
}, /* @ts-ignore */
|
|
4570
|
+
...(ngDevMode ? [{ debugName: "effectiveColumnDefinitions" }] : /* istanbul ignore next */ []));
|
|
4229
4571
|
columns = computed(() => this.effectiveColumnDefinitions().reduce((filtered, columnDefinition) => {
|
|
4230
4572
|
if (!columnDefinition.hidden)
|
|
4231
4573
|
filtered.push(columnDefinition.key);
|
|
4232
4574
|
return filtered;
|
|
4233
|
-
}, []),
|
|
4575
|
+
}, []), /* @ts-ignore */
|
|
4576
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
4234
4577
|
resolvedTrackBy = computed(() => {
|
|
4235
4578
|
const trackBy = this.trackBy();
|
|
4236
4579
|
if (trackBy === undefined)
|
|
@@ -4238,7 +4581,8 @@ class Table {
|
|
|
4238
4581
|
if (typeof trackBy === 'string')
|
|
4239
4582
|
return (_, row) => row[trackBy];
|
|
4240
4583
|
return trackBy;
|
|
4241
|
-
},
|
|
4584
|
+
}, /* @ts-ignore */
|
|
4585
|
+
...(ngDevMode ? [{ debugName: "resolvedTrackBy" }] : /* istanbul ignore next */ []));
|
|
4242
4586
|
classes = computed(() => {
|
|
4243
4587
|
const className = 'tls-table';
|
|
4244
4588
|
const array = [className];
|
|
@@ -4247,7 +4591,8 @@ class Table {
|
|
|
4247
4591
|
if (this.striped())
|
|
4248
4592
|
array.push(`${className}--striped`);
|
|
4249
4593
|
return array;
|
|
4250
|
-
},
|
|
4594
|
+
}, /* @ts-ignore */
|
|
4595
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
4251
4596
|
dataSource = {
|
|
4252
4597
|
connect: () => {
|
|
4253
4598
|
return toObservable(this.data);
|
|
@@ -4276,10 +4621,10 @@ class Table {
|
|
|
4276
4621
|
definition.template = template;
|
|
4277
4622
|
return definition;
|
|
4278
4623
|
}
|
|
4279
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4280
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4624
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Table, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4625
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Table, isStandalone: true, selector: "tls-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, columnDefinitions: { classPropertyName: "columnDefinitions", publicName: "columnDefinitions", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "tableColumns", predicate: TableColumn, isSignal: true }], ngImport: i0, template: "<table\n cdk-table\n [class]=\"classes()\"\n [dataSource]=\"dataSource\"\n [trackBy]=\"resolvedTrackBy()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (column of effectiveColumnDefinitions(); track column.key) {\n <ng-container [cdkColumnDef]=\"column.key\">\n <!-- Header cell -->\n <th cdk-header-cell *cdkHeaderCellDef class=\"tls-table__header-cell\" [style.width]=\"column.width + 'px'\">\n {{ column.header }}\n </th>\n\n <!-- Row cell -->\n <td\n cdk-cell\n *cdkCellDef=\"let data; let index = index; let count = count; let first = first; let last = last; let even = even; let odd = odd\"\n class=\"tls-table__cell\"\n [style.text-align]=\"column.alignment\"\n >\n @if (column.template) {\n <ng-container\n [ngTemplateOutlet]=\"column.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: data[column.key],\n data: data,\n index: index,\n count: count,\n first: first,\n last: last,\n even: even,\n odd: odd\n }\"\n />\n } @else {\n {{ data[column.key] }}\n }\n </td>\n </ng-container>\n }\n\n <tr cdk-header-row *cdkHeaderRowDef=\"columns()\" class=\"tls-table__header-row\"></tr>\n\n <tr *cdkRowDef=\"let row; columns: columns()\" cdk-row class=\"tls-table__row\"></tr>\n</table>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout", "recycleRows"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "directive", type: CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "directive", type: CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "component", type: CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "directive", type: CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "component", type: CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "directive", type: CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
4281
4626
|
}
|
|
4282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Table, decorators: [{
|
|
4283
4628
|
type: Component,
|
|
4284
4629
|
args: [{ selector: 'tls-table', imports: [
|
|
4285
4630
|
CdkTable,
|
|
@@ -4298,18 +4643,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4298
4643
|
|
|
4299
4644
|
class TabsService {
|
|
4300
4645
|
selected = null;
|
|
4301
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4302
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4646
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4647
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsService });
|
|
4303
4648
|
}
|
|
4304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4649
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsService, decorators: [{
|
|
4305
4650
|
type: Injectable
|
|
4306
4651
|
}] });
|
|
4307
4652
|
|
|
4308
4653
|
class Tab {
|
|
4309
4654
|
_tabsService = inject(TabsService);
|
|
4310
4655
|
// Inputs
|
|
4311
|
-
value = input.required(
|
|
4312
|
-
|
|
4656
|
+
value = input.required(/* @ts-ignore */
|
|
4657
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4658
|
+
label = input.required(/* @ts-ignore */
|
|
4659
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
4313
4660
|
_active = computed(() => {
|
|
4314
4661
|
if (!this._tabsService.selected)
|
|
4315
4662
|
return false;
|
|
@@ -4318,18 +4665,20 @@ class Tab {
|
|
|
4318
4665
|
return this.value() === selected;
|
|
4319
4666
|
else
|
|
4320
4667
|
return false;
|
|
4321
|
-
},
|
|
4668
|
+
}, /* @ts-ignore */
|
|
4669
|
+
...(ngDevMode ? [{ debugName: "_active" }] : /* istanbul ignore next */ []));
|
|
4322
4670
|
hostClasses = computed(() => {
|
|
4323
4671
|
const className = 'tls-tab';
|
|
4324
4672
|
const array = [className];
|
|
4325
4673
|
if (this._active())
|
|
4326
4674
|
array.push(`${className}--active`);
|
|
4327
4675
|
return array;
|
|
4328
|
-
},
|
|
4329
|
-
|
|
4330
|
-
static
|
|
4676
|
+
}, /* @ts-ignore */
|
|
4677
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4678
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tab, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4679
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Tab, isStandalone: true, selector: "tls-tab", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
4331
4680
|
}
|
|
4332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tab, decorators: [{
|
|
4333
4682
|
type: Component,
|
|
4334
4683
|
args: [{ selector: 'tls-tab', imports: [], host: {
|
|
4335
4684
|
'[class]': 'hostClasses()',
|
|
@@ -4347,25 +4696,31 @@ const TABS_CONFIG = new InjectionToken('TABS_CONFIG', {
|
|
|
4347
4696
|
class Tabs {
|
|
4348
4697
|
_config = inject(TABS_CONFIG);
|
|
4349
4698
|
_tabsService = inject(TabsService);
|
|
4350
|
-
tabs = contentChildren(Tab,
|
|
4351
|
-
|
|
4352
|
-
|
|
4699
|
+
tabs = contentChildren(Tab, /* @ts-ignore */
|
|
4700
|
+
...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
|
|
4701
|
+
variant = input(this._config.variant, /* @ts-ignore */
|
|
4702
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
4703
|
+
selected = model(null, /* @ts-ignore */
|
|
4704
|
+
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
4353
4705
|
/** Accessible name for the tablist. */
|
|
4354
|
-
ariaLabel = input(undefined,
|
|
4355
|
-
|
|
4706
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
4707
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4708
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
4709
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
4356
4710
|
hostClasses = computed(() => {
|
|
4357
4711
|
const className = 'tls-tabs';
|
|
4358
4712
|
const array = [className];
|
|
4359
4713
|
array.push(`${className}--${this.variant()}`);
|
|
4360
4714
|
return array;
|
|
4361
|
-
},
|
|
4715
|
+
}, /* @ts-ignore */
|
|
4716
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4362
4717
|
constructor() {
|
|
4363
4718
|
this._tabsService.selected = this.selected.asReadonly();
|
|
4364
4719
|
}
|
|
4365
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4366
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4720
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4721
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Tabs, isStandalone: true, selector: "tls-tabs", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [TabsService], queries: [{ propertyName: "tabs", predicate: Tab, isSignal: true }], ngImport: i0, template: "<ul\n class=\"tls-tabs-header\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (tab of tabs(); track tab) {\n <li\n class=\"tls-tabs-header__item\"\n [class.tls-tabs-header__item--active]=\"tab.value() === selected()\"\n >\n <button\n class=\"tls-tabs-header__item-button\"\n role=\"tab\"\n (click)=\"selected.set(tab.value())\"\n [attr.aria-selected]=\"tab.value() === selected()\"\n >\n {{ tab.label() }}\n </button>\n </li>\n }\n</ul>\n<div class=\"tls-tabs-content\">\n <ng-content></ng-content>\n</div>\n" });
|
|
4367
4722
|
}
|
|
4368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tabs, decorators: [{
|
|
4369
4724
|
type: Component,
|
|
4370
4725
|
args: [{ selector: 'tls-tabs', imports: [], host: {
|
|
4371
4726
|
'[class]': 'hostClasses()',
|
|
@@ -4384,7 +4739,8 @@ class TabsQuerySyncDirective extends QuerySyncDirective {
|
|
|
4384
4739
|
_tabs = inject(Tabs);
|
|
4385
4740
|
_config = inject(TABS_QUERY_SYNC_CONFIG);
|
|
4386
4741
|
// Inputs
|
|
4387
|
-
tlsTabsQuerySync = input(this._config.paramKey,
|
|
4742
|
+
tlsTabsQuerySync = input(this._config.paramKey, /* @ts-ignore */
|
|
4743
|
+
...(ngDevMode ? [{ debugName: "tlsTabsQuerySync" }] : /* istanbul ignore next */ []));
|
|
4388
4744
|
constructor() {
|
|
4389
4745
|
super();
|
|
4390
4746
|
effect(() => {
|
|
@@ -4401,10 +4757,10 @@ class TabsQuerySyncDirective extends QuerySyncDirective {
|
|
|
4401
4757
|
if (value !== null)
|
|
4402
4758
|
this._tabs.selected.set(value);
|
|
4403
4759
|
}
|
|
4404
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4405
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
4760
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsQuerySyncDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4761
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: TabsQuerySyncDirective, isStandalone: true, selector: "tls-tabs[tlsTabsQuerySync]", inputs: { tlsTabsQuerySync: { classPropertyName: "tlsTabsQuerySync", publicName: "tlsTabsQuerySync", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
4406
4762
|
}
|
|
4407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsQuerySyncDirective, decorators: [{
|
|
4408
4764
|
type: Directive,
|
|
4409
4765
|
args: [{
|
|
4410
4766
|
selector: 'tls-tabs[tlsTabsQuerySync]',
|
|
@@ -4414,23 +4770,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4414
4770
|
class Tooltip {
|
|
4415
4771
|
static _counter = 0;
|
|
4416
4772
|
id = `tls-tooltip-${++Tooltip._counter}`;
|
|
4417
|
-
content = model.required(
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4773
|
+
content = model.required(/* @ts-ignore */
|
|
4774
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
4775
|
+
templateData = model(null, /* @ts-ignore */
|
|
4776
|
+
...(ngDevMode ? [{ debugName: "templateData" }] : /* istanbul ignore next */ []));
|
|
4777
|
+
color = model.required(/* @ts-ignore */
|
|
4778
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
4779
|
+
isString = computed(() => typeof this.content() === 'string', /* @ts-ignore */
|
|
4780
|
+
...(ngDevMode ? [{ debugName: "isString" }] : /* istanbul ignore next */ []));
|
|
4421
4781
|
templateRef = computed(() => {
|
|
4422
4782
|
if (this.isString())
|
|
4423
4783
|
return null;
|
|
4424
4784
|
return this.content();
|
|
4425
|
-
},
|
|
4785
|
+
}, /* @ts-ignore */
|
|
4786
|
+
...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
|
|
4426
4787
|
hostClasses = computed(() => {
|
|
4427
4788
|
const className = 'tls-tooltip';
|
|
4428
4789
|
const array = [className];
|
|
4429
4790
|
array.push(`${className}--${this.color()}`);
|
|
4430
4791
|
return array;
|
|
4431
|
-
},
|
|
4432
|
-
|
|
4433
|
-
static
|
|
4792
|
+
}, /* @ts-ignore */
|
|
4793
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4794
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tooltip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4795
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Tooltip, isStandalone: true, selector: "tls-tooltip", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, templateData: { classPropertyName: "templateData", publicName: "templateData", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { content: "contentChange", templateData: "templateDataChange", color: "colorChange" }, host: { attributes: { "role": "tooltip", "animate.enter": "tls-tooltip--enter", "animate.leave": "tls-tooltip--leave" }, properties: { "class": "hostClasses()", "id": "id" } }, ngImport: i0, template: `
|
|
4434
4796
|
@if (isString()) {
|
|
4435
4797
|
{{ content() }}
|
|
4436
4798
|
} @else {
|
|
@@ -4441,7 +4803,7 @@ class Tooltip {
|
|
|
4441
4803
|
}
|
|
4442
4804
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
4443
4805
|
}
|
|
4444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4806
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tooltip, decorators: [{
|
|
4445
4807
|
type: Component,
|
|
4446
4808
|
args: [{
|
|
4447
4809
|
selector: 'tls-tooltip',
|
|
@@ -4534,10 +4896,10 @@ class TooltipService {
|
|
|
4534
4896
|
paneElement.addEventListener('animationend', finalize);
|
|
4535
4897
|
const timeoutId = window.setTimeout(finalize, LEAVE_ANIMATION_FALLBACK_MS);
|
|
4536
4898
|
}
|
|
4537
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4538
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4899
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4900
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipService });
|
|
4539
4901
|
}
|
|
4540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipService, decorators: [{
|
|
4541
4903
|
type: Injectable
|
|
4542
4904
|
}] });
|
|
4543
4905
|
|
|
@@ -4558,21 +4920,30 @@ class TooltipDirective {
|
|
|
4558
4920
|
_elementRef = inject(ElementRef);
|
|
4559
4921
|
_renderer = inject(Renderer2);
|
|
4560
4922
|
_config = inject(TOOLTIP_CONFIG);
|
|
4561
|
-
content = input('Hello', { ...(ngDevMode ? { debugName: "content" } : {}), alias: 'tlsTooltip' });
|
|
4562
|
-
data = input(null,
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4923
|
+
content = input('Hello', { ...(ngDevMode ? { debugName: "content" } : /* istanbul ignore next */ {}), alias: 'tlsTooltip' });
|
|
4924
|
+
data = input(null, /* @ts-ignore */
|
|
4925
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
4926
|
+
tooltipDisabled = input(false, /* @ts-ignore */
|
|
4927
|
+
...(ngDevMode ? [{ debugName: "tooltipDisabled" }] : /* istanbul ignore next */ []));
|
|
4928
|
+
tooltipOrigin = input(this._config.origin, /* @ts-ignore */
|
|
4929
|
+
...(ngDevMode ? [{ debugName: "tooltipOrigin" }] : /* istanbul ignore next */ []));
|
|
4930
|
+
tooltipPositions = input(this._config.positions, /* @ts-ignore */
|
|
4931
|
+
...(ngDevMode ? [{ debugName: "tooltipPositions" }] : /* istanbul ignore next */ []));
|
|
4932
|
+
tooltipPosition = input(this._config.position, /* @ts-ignore */
|
|
4933
|
+
...(ngDevMode ? [{ debugName: "tooltipPosition" }] : /* istanbul ignore next */ []));
|
|
4934
|
+
tooltipOffset = input(this._config.offset, /* @ts-ignore */
|
|
4935
|
+
...(ngDevMode ? [{ debugName: "tooltipOffset" }] : /* istanbul ignore next */ []));
|
|
4936
|
+
tooltipColor = input(this._config.color, /* @ts-ignore */
|
|
4937
|
+
...(ngDevMode ? [{ debugName: "tooltipColor" }] : /* istanbul ignore next */ []));
|
|
4938
|
+
_visible = signal(false, /* @ts-ignore */
|
|
4939
|
+
...(ngDevMode ? [{ debugName: "_visible" }] : /* istanbul ignore next */ []));
|
|
4570
4940
|
_positions = computed(() => {
|
|
4571
4941
|
const positions = this.tooltipPositions();
|
|
4572
4942
|
if (positions)
|
|
4573
4943
|
return positions;
|
|
4574
4944
|
return buildOverlayPositions(this.tooltipPosition(), this.tooltipOffset());
|
|
4575
|
-
},
|
|
4945
|
+
}, /* @ts-ignore */
|
|
4946
|
+
...(ngDevMode ? [{ debugName: "_positions" }] : /* istanbul ignore next */ []));
|
|
4576
4947
|
// Protected methods
|
|
4577
4948
|
onMouseEnter(event) {
|
|
4578
4949
|
this._show(event);
|
|
@@ -4619,10 +4990,10 @@ class TooltipDirective {
|
|
|
4619
4990
|
this._tooltipService.dispose();
|
|
4620
4991
|
this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');
|
|
4621
4992
|
}
|
|
4622
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4623
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
4993
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4994
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: TooltipDirective, isStandalone: true, selector: "[tlsTooltip]", inputs: { content: { classPropertyName: "content", publicName: "tlsTooltip", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, tooltipDisabled: { classPropertyName: "tooltipDisabled", publicName: "tooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, tooltipOrigin: { classPropertyName: "tooltipOrigin", publicName: "tooltipOrigin", isSignal: true, isRequired: false, transformFunction: null }, tooltipPositions: { classPropertyName: "tooltipPositions", publicName: "tooltipPositions", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltipOffset: { classPropertyName: "tooltipOffset", publicName: "tooltipOffset", isSignal: true, isRequired: false, transformFunction: null }, tooltipColor: { classPropertyName: "tooltipColor", publicName: "tooltipColor", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter($event)", "mousemove": "onMouseMove($event)", "mouseleave": "onMouseLeave()", "touchstart": "onTouchStart($event)" } }, providers: [TooltipService], ngImport: i0 });
|
|
4624
4995
|
}
|
|
4625
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
4626
4997
|
type: Directive,
|
|
4627
4998
|
args: [{
|
|
4628
4999
|
selector: '[tlsTooltip]',
|