@thalassic/ui 0.19.0 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -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,32 @@ 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
|
+
reserveErrorSpace = input(this._config.reserveErrorSpace, /* @ts-ignore */
|
|
1977
|
+
...(ngDevMode ? [{ debugName: "reserveErrorSpace" }] : /* istanbul ignore next */ []));
|
|
1978
|
+
reserveLabelSpace = input(this._config.reserveLabelSpace, /* @ts-ignore */
|
|
1979
|
+
...(ngDevMode ? [{ debugName: "reserveLabelSpace" }] : /* istanbul ignore next */ []));
|
|
1980
|
+
displayErrors = input(this._config.displayErrors, /* @ts-ignore */
|
|
1981
|
+
...(ngDevMode ? [{ debugName: "displayErrors" }] : /* istanbul ignore next */ []));
|
|
1982
|
+
showRequiredMarker = input(this._config.showRequiredMarker, /* @ts-ignore */
|
|
1983
|
+
...(ngDevMode ? [{ debugName: "showRequiredMarker" }] : /* istanbul ignore next */ []));
|
|
1984
|
+
optionalText = input(this._config.optionalText, /* @ts-ignore */
|
|
1985
|
+
...(ngDevMode ? [{ debugName: "optionalText" }] : /* istanbul ignore next */ []));
|
|
1888
1986
|
isInvalid = computed(() => {
|
|
1889
1987
|
const control = this.control();
|
|
1890
1988
|
if (!control)
|
|
1891
1989
|
return false;
|
|
1892
1990
|
return control.invalid() && control.touched();
|
|
1893
|
-
},
|
|
1991
|
+
}, /* @ts-ignore */
|
|
1992
|
+
...(ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []));
|
|
1894
1993
|
showRequired = computed(() => {
|
|
1895
1994
|
const control = this.control();
|
|
1896
1995
|
if (!control)
|
|
1897
1996
|
return false;
|
|
1898
1997
|
return this.showRequiredMarker() && control.required();
|
|
1899
|
-
},
|
|
1998
|
+
}, /* @ts-ignore */
|
|
1999
|
+
...(ngDevMode ? [{ debugName: "showRequired" }] : /* istanbul ignore next */ []));
|
|
1900
2000
|
showOptional = computed(() => {
|
|
1901
2001
|
const control = this.control();
|
|
1902
2002
|
if (!control)
|
|
@@ -1904,13 +2004,15 @@ class FormItem {
|
|
|
1904
2004
|
if (!this.optionalText())
|
|
1905
2005
|
return false;
|
|
1906
2006
|
return !control.required();
|
|
1907
|
-
},
|
|
2007
|
+
}, /* @ts-ignore */
|
|
2008
|
+
...(ngDevMode ? [{ debugName: "showOptional" }] : /* istanbul ignore next */ []));
|
|
1908
2009
|
labelFor = computed(() => {
|
|
1909
2010
|
const control = this.control();
|
|
1910
2011
|
if (!control || !control.supportsLabelFor)
|
|
1911
2012
|
return null;
|
|
1912
2013
|
return control.effectiveInputId();
|
|
1913
|
-
},
|
|
2014
|
+
}, /* @ts-ignore */
|
|
2015
|
+
...(ngDevMode ? [{ debugName: "labelFor" }] : /* istanbul ignore next */ []));
|
|
1914
2016
|
hostClasses = computed(() => {
|
|
1915
2017
|
const className = 'tls-form-item';
|
|
1916
2018
|
const array = [className];
|
|
@@ -1921,19 +2023,22 @@ class FormItem {
|
|
|
1921
2023
|
if (this.reserveLabelSpace())
|
|
1922
2024
|
array.push(`${className}--label-space-reserved`);
|
|
1923
2025
|
return array;
|
|
1924
|
-
},
|
|
2026
|
+
}, /* @ts-ignore */
|
|
2027
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
1925
2028
|
errorMessages = computed(() => {
|
|
1926
2029
|
const control = this.control();
|
|
1927
2030
|
if (!control)
|
|
1928
2031
|
return [];
|
|
1929
2032
|
return this._getErrorMessages(control.errors());
|
|
1930
|
-
},
|
|
2033
|
+
}, /* @ts-ignore */
|
|
2034
|
+
...(ngDevMode ? [{ debugName: "errorMessages" }] : /* istanbul ignore next */ []));
|
|
1931
2035
|
firstErrorMessage = computed(() => {
|
|
1932
2036
|
if (this.errorMessages().length > 0)
|
|
1933
2037
|
return this.errorMessages()[0];
|
|
1934
2038
|
else
|
|
1935
2039
|
return null;
|
|
1936
|
-
},
|
|
2040
|
+
}, /* @ts-ignore */
|
|
2041
|
+
...(ngDevMode ? [{ debugName: "firstErrorMessage" }] : /* istanbul ignore next */ []));
|
|
1937
2042
|
// constructor
|
|
1938
2043
|
constructor() {
|
|
1939
2044
|
effect(() => {
|
|
@@ -1962,10 +2067,10 @@ class FormItem {
|
|
|
1962
2067
|
}
|
|
1963
2068
|
return array;
|
|
1964
2069
|
}
|
|
1965
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1966
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2070
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2071
|
+
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 }, 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: "@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@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
2072
|
}
|
|
1968
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormItem, decorators: [{
|
|
1969
2074
|
type: Component,
|
|
1970
2075
|
args: [{ selector: 'tls-form-item', imports: [], host: { '[class]': 'hostClasses()' }, template: "@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@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" }]
|
|
1971
2076
|
}], 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 }] }] } });
|
|
@@ -1980,16 +2085,20 @@ class Checkbox extends CheckboxFormControl {
|
|
|
1980
2085
|
_config = inject(CHECKBOX_CONFIG);
|
|
1981
2086
|
CLASS_NAME = 'tls-checkbox';
|
|
1982
2087
|
supportsLabelFor = true;
|
|
1983
|
-
indeterminate = model(false,
|
|
1984
|
-
|
|
1985
|
-
|
|
2088
|
+
indeterminate = model(false, /* @ts-ignore */
|
|
2089
|
+
...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
2090
|
+
checked = model(false, /* @ts-ignore */
|
|
2091
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
2092
|
+
tabindex = input(0, /* @ts-ignore */
|
|
2093
|
+
...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
1986
2094
|
hostClasses = computed(() => {
|
|
1987
2095
|
const className = this.CLASS_NAME;
|
|
1988
2096
|
const array = [className];
|
|
1989
2097
|
if (this.indeterminate())
|
|
1990
2098
|
array.push(`${className}--indeterminate`);
|
|
1991
2099
|
return array.concat(this.controlClasses());
|
|
1992
|
-
},
|
|
2100
|
+
}, /* @ts-ignore */
|
|
2101
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
1993
2102
|
// Protected methods
|
|
1994
2103
|
toggle() {
|
|
1995
2104
|
if (this.notInteractive())
|
|
@@ -2000,10 +2109,10 @@ class Checkbox extends CheckboxFormControl {
|
|
|
2000
2109
|
event.preventDefault();
|
|
2001
2110
|
this.toggle();
|
|
2002
2111
|
}
|
|
2003
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2004
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Checkbox, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2113
|
+
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" } }, 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
2114
|
}
|
|
2006
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Checkbox, decorators: [{
|
|
2007
2116
|
type: Component,
|
|
2008
2117
|
args: [{ selector: 'tls-checkbox', imports: [], host: {
|
|
2009
2118
|
role: 'checkbox',
|
|
@@ -2028,10 +2137,14 @@ class Popover {
|
|
|
2028
2137
|
_templateRef = viewChild.required('content');
|
|
2029
2138
|
id = `tls-popover-${++Popover._counter}`;
|
|
2030
2139
|
isOpen = this._overlay.isOpen;
|
|
2031
|
-
position = input(this._config.position,
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2140
|
+
position = input(this._config.position, /* @ts-ignore */
|
|
2141
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
2142
|
+
offset = input(this._config.offset, /* @ts-ignore */
|
|
2143
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
2144
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
2145
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
2146
|
+
_positions = computed(() => buildOverlayPositions(this.position(), this.offset()), /* @ts-ignore */
|
|
2147
|
+
...(ngDevMode ? [{ debugName: "_positions" }] : /* istanbul ignore next */ []));
|
|
2035
2148
|
// Public methods
|
|
2036
2149
|
open(trigger) {
|
|
2037
2150
|
const origin = trigger instanceof MouseEvent ? trigger.currentTarget : trigger;
|
|
@@ -2052,8 +2165,8 @@ class Popover {
|
|
|
2052
2165
|
this.open(trigger);
|
|
2053
2166
|
}
|
|
2054
2167
|
}
|
|
2055
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2056
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
2168
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Popover, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2169
|
+
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
2170
|
<ng-template #content>
|
|
2058
2171
|
<div
|
|
2059
2172
|
class="tls-popover"
|
|
@@ -2069,7 +2182,7 @@ class Popover {
|
|
|
2069
2182
|
</ng-template>
|
|
2070
2183
|
`, isInline: true });
|
|
2071
2184
|
}
|
|
2072
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Popover, decorators: [{
|
|
2073
2186
|
type: Component,
|
|
2074
2187
|
args: [{
|
|
2075
2188
|
selector: 'tls-popover',
|
|
@@ -2093,10 +2206,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2093
2206
|
|
|
2094
2207
|
class Calendar {
|
|
2095
2208
|
// Inputs
|
|
2096
|
-
viewDate = input.required(
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2209
|
+
viewDate = input.required(/* @ts-ignore */
|
|
2210
|
+
...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
|
|
2211
|
+
selectedDate = input.required(/* @ts-ignore */
|
|
2212
|
+
...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
|
|
2213
|
+
weekStartsOn = input.required(/* @ts-ignore */
|
|
2214
|
+
...(ngDevMode ? [{ debugName: "weekStartsOn" }] : /* istanbul ignore next */ []));
|
|
2215
|
+
weekDays = input.required(/* @ts-ignore */
|
|
2216
|
+
...(ngDevMode ? [{ debugName: "weekDays" }] : /* istanbul ignore next */ []));
|
|
2100
2217
|
// Outputs
|
|
2101
2218
|
daySelect = output();
|
|
2102
2219
|
viewDateChange = output();
|
|
@@ -2106,8 +2223,10 @@ class Calendar {
|
|
|
2106
2223
|
const startDay = this.weekStartsOn();
|
|
2107
2224
|
const days = this.weekDays();
|
|
2108
2225
|
return [...days.slice(startDay), ...days.slice(0, startDay)];
|
|
2109
|
-
},
|
|
2110
|
-
|
|
2226
|
+
}, /* @ts-ignore */
|
|
2227
|
+
...(ngDevMode ? [{ debugName: "displayedWeekDays" }] : /* istanbul ignore next */ []));
|
|
2228
|
+
headerLabel = computed(() => format(this.viewDate(), 'MMMM yyyy'), /* @ts-ignore */
|
|
2229
|
+
...(ngDevMode ? [{ debugName: "headerLabel" }] : /* istanbul ignore next */ []));
|
|
2111
2230
|
days = computed(() => {
|
|
2112
2231
|
const monthStart = startOfMonth(this.viewDate());
|
|
2113
2232
|
const monthEnd = endOfMonth(this.viewDate());
|
|
@@ -2116,7 +2235,8 @@ class Calendar {
|
|
|
2116
2235
|
start: startOfWeek(monthStart, { weekStartsOn }),
|
|
2117
2236
|
end: endOfWeek(monthEnd, { weekStartsOn }),
|
|
2118
2237
|
});
|
|
2119
|
-
},
|
|
2238
|
+
}, /* @ts-ignore */
|
|
2239
|
+
...(ngDevMode ? [{ debugName: "days" }] : /* istanbul ignore next */ []));
|
|
2120
2240
|
// Protected methods
|
|
2121
2241
|
prevMonth() {
|
|
2122
2242
|
this.viewDateChange.emit(subMonths(this.viewDate(), 1));
|
|
@@ -2137,10 +2257,10 @@ class Calendar {
|
|
|
2137
2257
|
isTodayDay(day) {
|
|
2138
2258
|
return isToday(day);
|
|
2139
2259
|
}
|
|
2140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2141
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2260
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Calendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2261
|
+
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
2262
|
}
|
|
2143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Calendar, decorators: [{
|
|
2144
2264
|
type: Component,
|
|
2145
2265
|
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
2266
|
}], 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 +2280,18 @@ const DATE_TIME_PICKER_CONFIG = new InjectionToken('DATE_TIME_PICKER_CONFIG', {
|
|
|
2160
2280
|
const MONTH_INDEXES = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
2161
2281
|
class MonthPicker {
|
|
2162
2282
|
// Inputs
|
|
2163
|
-
viewDate = input.required(
|
|
2164
|
-
|
|
2283
|
+
viewDate = input.required(/* @ts-ignore */
|
|
2284
|
+
...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
|
|
2285
|
+
selectedDate = input.required(/* @ts-ignore */
|
|
2286
|
+
...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
|
|
2165
2287
|
// Outputs
|
|
2166
2288
|
monthSelect = output();
|
|
2167
2289
|
viewDateChange = output();
|
|
2168
2290
|
navigateUp = output();
|
|
2169
2291
|
// Computed
|
|
2170
2292
|
months = MONTH_INDEXES;
|
|
2171
|
-
yearLabel = computed(() => format(this.viewDate(), 'yyyy'),
|
|
2293
|
+
yearLabel = computed(() => format(this.viewDate(), 'yyyy'), /* @ts-ignore */
|
|
2294
|
+
...(ngDevMode ? [{ debugName: "yearLabel" }] : /* istanbul ignore next */ []));
|
|
2172
2295
|
// Protected methods
|
|
2173
2296
|
getMonthLabel(monthIndex) {
|
|
2174
2297
|
return format(setMonth(new Date(2000, 0, 1), monthIndex), 'MMM');
|
|
@@ -2191,30 +2314,35 @@ class MonthPicker {
|
|
|
2191
2314
|
isCurrentMonth(monthIndex) {
|
|
2192
2315
|
return isSameMonth(new Date(), setMonth(this.viewDate(), monthIndex));
|
|
2193
2316
|
}
|
|
2194
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2195
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2317
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MonthPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2318
|
+
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
2319
|
}
|
|
2197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MonthPicker, decorators: [{
|
|
2198
2321
|
type: Component,
|
|
2199
2322
|
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
2323
|
}], 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
2324
|
|
|
2202
2325
|
class TimePicker {
|
|
2203
2326
|
// Inputs
|
|
2204
|
-
value = input.required(
|
|
2327
|
+
value = input.required(/* @ts-ignore */
|
|
2328
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2205
2329
|
// Outputs
|
|
2206
2330
|
timeChange = output();
|
|
2207
2331
|
// Computed
|
|
2208
2332
|
hours = computed(() => {
|
|
2209
2333
|
const date = this.value();
|
|
2210
2334
|
return date ? getHours(date) : 0;
|
|
2211
|
-
},
|
|
2335
|
+
}, /* @ts-ignore */
|
|
2336
|
+
...(ngDevMode ? [{ debugName: "hours" }] : /* istanbul ignore next */ []));
|
|
2212
2337
|
minutes = computed(() => {
|
|
2213
2338
|
const date = this.value();
|
|
2214
2339
|
return date ? getMinutes(date) : 0;
|
|
2215
|
-
},
|
|
2216
|
-
|
|
2217
|
-
|
|
2340
|
+
}, /* @ts-ignore */
|
|
2341
|
+
...(ngDevMode ? [{ debugName: "minutes" }] : /* istanbul ignore next */ []));
|
|
2342
|
+
hoursLabel = computed(() => String(this.hours()).padStart(2, '0'), /* @ts-ignore */
|
|
2343
|
+
...(ngDevMode ? [{ debugName: "hoursLabel" }] : /* istanbul ignore next */ []));
|
|
2344
|
+
minutesLabel = computed(() => String(this.minutes()).padStart(2, '0'), /* @ts-ignore */
|
|
2345
|
+
...(ngDevMode ? [{ debugName: "minutesLabel" }] : /* istanbul ignore next */ []));
|
|
2218
2346
|
// Private accessors
|
|
2219
2347
|
get _baseDate() {
|
|
2220
2348
|
return this.value() ?? startOfDay(new Date());
|
|
@@ -2232,19 +2360,22 @@ class TimePicker {
|
|
|
2232
2360
|
decrementMinutes() {
|
|
2233
2361
|
this.timeChange.emit(setMinutes(this._baseDate, (this.minutes() + 59) % 60));
|
|
2234
2362
|
}
|
|
2235
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2236
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
2363
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TimePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2364
|
+
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
2365
|
}
|
|
2238
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TimePicker, decorators: [{
|
|
2239
2367
|
type: Component,
|
|
2240
2368
|
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
2369
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], timeChange: [{ type: i0.Output, args: ["timeChange"] }] } });
|
|
2242
2370
|
|
|
2243
2371
|
class YearPicker {
|
|
2244
2372
|
// Inputs
|
|
2245
|
-
viewDate = input.required(
|
|
2246
|
-
|
|
2247
|
-
|
|
2373
|
+
viewDate = input.required(/* @ts-ignore */
|
|
2374
|
+
...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
|
|
2375
|
+
selectedDate = input.required(/* @ts-ignore */
|
|
2376
|
+
...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
|
|
2377
|
+
yearsPerPage = input.required(/* @ts-ignore */
|
|
2378
|
+
...(ngDevMode ? [{ debugName: "yearsPerPage" }] : /* istanbul ignore next */ []));
|
|
2248
2379
|
// Outputs
|
|
2249
2380
|
yearSelect = output();
|
|
2250
2381
|
viewDateChange = output();
|
|
@@ -2254,11 +2385,13 @@ class YearPicker {
|
|
|
2254
2385
|
const perPage = this.yearsPerPage();
|
|
2255
2386
|
const start = Math.floor(year / perPage) * perPage;
|
|
2256
2387
|
return Array.from({ length: perPage }, (_, index) => start + index);
|
|
2257
|
-
},
|
|
2388
|
+
}, /* @ts-ignore */
|
|
2389
|
+
...(ngDevMode ? [{ debugName: "years" }] : /* istanbul ignore next */ []));
|
|
2258
2390
|
rangeLabel = computed(() => {
|
|
2259
2391
|
const yearsArray = this.years();
|
|
2260
2392
|
return `${yearsArray[0]} – ${yearsArray[yearsArray.length - 1]}`;
|
|
2261
|
-
},
|
|
2393
|
+
}, /* @ts-ignore */
|
|
2394
|
+
...(ngDevMode ? [{ debugName: "rangeLabel" }] : /* istanbul ignore next */ []));
|
|
2262
2395
|
// Protected methods
|
|
2263
2396
|
prevPage() {
|
|
2264
2397
|
this.viewDateChange.emit(subYears(this.viewDate(), this.yearsPerPage()));
|
|
@@ -2276,10 +2409,10 @@ class YearPicker {
|
|
|
2276
2409
|
isCurrentYear(year) {
|
|
2277
2410
|
return getYear(new Date()) === year;
|
|
2278
2411
|
}
|
|
2279
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2280
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2412
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: YearPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2413
|
+
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
2414
|
}
|
|
2282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: YearPicker, decorators: [{
|
|
2283
2416
|
type: Component,
|
|
2284
2417
|
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
2418
|
}], 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 +2421,30 @@ class DateTimePicker extends ValueFormControl {
|
|
|
2288
2421
|
// Injections
|
|
2289
2422
|
config = inject(DATE_TIME_PICKER_CONFIG);
|
|
2290
2423
|
// View children
|
|
2291
|
-
popoverComponent = viewChild('popoverRef',
|
|
2424
|
+
popoverComponent = viewChild('popoverRef', /* @ts-ignore */
|
|
2425
|
+
...(ngDevMode ? [{ debugName: "popoverComponent" }] : /* istanbul ignore next */ []));
|
|
2292
2426
|
// Inputs
|
|
2293
|
-
value = model(null,
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2427
|
+
value = model(null, /* @ts-ignore */
|
|
2428
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2429
|
+
mode = input(this.config.mode, /* @ts-ignore */
|
|
2430
|
+
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
2431
|
+
inline = input(this.config.inline, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2432
|
+
placeholder = input(this.config.placeholder, /* @ts-ignore */
|
|
2433
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2434
|
+
size = input(this.config.size, /* @ts-ignore */
|
|
2435
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2436
|
+
fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2437
|
+
yearsPerPage = input(this.config.yearsPerPage, /* @ts-ignore */
|
|
2438
|
+
...(ngDevMode ? [{ debugName: "yearsPerPage" }] : /* istanbul ignore next */ []));
|
|
2439
|
+
weekStartsOn = input(this.config.weekStartsOn, /* @ts-ignore */
|
|
2440
|
+
...(ngDevMode ? [{ debugName: "weekStartsOn" }] : /* istanbul ignore next */ []));
|
|
2441
|
+
weekDays = input(this.config.weekDays, /* @ts-ignore */
|
|
2442
|
+
...(ngDevMode ? [{ debugName: "weekDays" }] : /* istanbul ignore next */ []));
|
|
2302
2443
|
// State
|
|
2303
|
-
viewDate = signal(new Date(),
|
|
2304
|
-
|
|
2444
|
+
viewDate = signal(new Date(), /* @ts-ignore */
|
|
2445
|
+
...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
|
|
2446
|
+
activeView = signal(this.config.mode, /* @ts-ignore */
|
|
2447
|
+
...(ngDevMode ? [{ debugName: "activeView" }] : /* istanbul ignore next */ []));
|
|
2305
2448
|
// Computed
|
|
2306
2449
|
hostClasses = computed(() => {
|
|
2307
2450
|
const classes = ['tls-date-time-picker'];
|
|
@@ -2312,7 +2455,8 @@ class DateTimePicker extends ValueFormControl {
|
|
|
2312
2455
|
return classes.concat(this.controlClasses());
|
|
2313
2456
|
}
|
|
2314
2457
|
return classes;
|
|
2315
|
-
},
|
|
2458
|
+
}, /* @ts-ignore */
|
|
2459
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
2316
2460
|
triggerLabel = computed(() => {
|
|
2317
2461
|
const value = this.value();
|
|
2318
2462
|
if (!value)
|
|
@@ -2327,7 +2471,8 @@ class DateTimePicker extends ValueFormControl {
|
|
|
2327
2471
|
if (mode === 'time-picker')
|
|
2328
2472
|
return format(value, 'HH:mm');
|
|
2329
2473
|
return format(value, 'MMM d, yyyy HH:mm');
|
|
2330
|
-
},
|
|
2474
|
+
}, /* @ts-ignore */
|
|
2475
|
+
...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
2331
2476
|
constructor() {
|
|
2332
2477
|
super();
|
|
2333
2478
|
effect(() => {
|
|
@@ -2378,10 +2523,10 @@ class DateTimePicker extends ValueFormControl {
|
|
|
2378
2523
|
return;
|
|
2379
2524
|
this.value.set(date);
|
|
2380
2525
|
}
|
|
2381
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2382
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2526
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2527
|
+
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
2528
|
}
|
|
2384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2529
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateTimePicker, decorators: [{
|
|
2385
2530
|
type: Component,
|
|
2386
2531
|
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
2532
|
}], 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 +2555,36 @@ const CHIP_GROUP_CONFIG = new InjectionToken('CHIP_GROUP_CONFIG', {
|
|
|
2410
2555
|
class ChipGroup extends SelectionGroup {
|
|
2411
2556
|
_config = inject(CHIP_GROUP_CONFIG);
|
|
2412
2557
|
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
|
-
|
|
2558
|
+
multiple = input(this._config.multiple, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2559
|
+
unselectable = input(this._config.unselectable, { ...(ngDevMode ? { debugName: "unselectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2560
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2561
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2562
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
2563
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
2564
|
+
checkedColor = input(this._config.checkedColor, /* @ts-ignore */
|
|
2565
|
+
...(ngDevMode ? [{ debugName: "checkedColor" }] : /* istanbul ignore next */ []));
|
|
2566
|
+
variant = input(this._config.variant, /* @ts-ignore */
|
|
2567
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
2568
|
+
checkedVariant = input(this._config.checkedVariant, /* @ts-ignore */
|
|
2569
|
+
...(ngDevMode ? [{ debugName: "checkedVariant" }] : /* istanbul ignore next */ []));
|
|
2570
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
2571
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
2572
|
+
rounded = input(this._config.rounded, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2573
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2574
|
+
startIconTemplate = contentChild('startIcon', /* @ts-ignore */
|
|
2575
|
+
...(ngDevMode ? [{ debugName: "startIconTemplate" }] : /* istanbul ignore next */ []));
|
|
2576
|
+
endIconTemplate = contentChild('endIcon', /* @ts-ignore */
|
|
2577
|
+
...(ngDevMode ? [{ debugName: "endIconTemplate" }] : /* istanbul ignore next */ []));
|
|
2578
|
+
labelTemplate = contentChild('label', /* @ts-ignore */
|
|
2579
|
+
...(ngDevMode ? [{ debugName: "labelTemplate" }] : /* istanbul ignore next */ []));
|
|
2426
2580
|
classes = computed(() => {
|
|
2427
2581
|
const className = this.CLASS_NAME;
|
|
2428
2582
|
const array = [className, `${className}--${this.orientation()}`];
|
|
2429
2583
|
if (this.fluid())
|
|
2430
2584
|
array.push(`${className}--fluid`);
|
|
2431
2585
|
return array.concat(this.controlClasses());
|
|
2432
|
-
},
|
|
2586
|
+
}, /* @ts-ignore */
|
|
2587
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2433
2588
|
isDisabled(option) {
|
|
2434
2589
|
return this.disabled() || option.disabled;
|
|
2435
2590
|
}
|
|
@@ -2448,10 +2603,10 @@ class ChipGroup extends SelectionGroup {
|
|
|
2448
2603
|
classes.push('tls-chip--disabled');
|
|
2449
2604
|
return classes;
|
|
2450
2605
|
}
|
|
2451
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2452
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2606
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipGroup, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2607
|
+
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
2608
|
}
|
|
2454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2609
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipGroup, decorators: [{
|
|
2455
2610
|
type: Component,
|
|
2456
2611
|
args: [{ selector: 'tls-chip-group', imports: [NgTemplateOutlet, Chip], providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ChipGroup) }], host: {
|
|
2457
2612
|
role: 'group',
|
|
@@ -2476,19 +2631,25 @@ const CHIP_INPUT_CONFIG = new InjectionToken('CHIP_INPUT_CONFIG', {
|
|
|
2476
2631
|
|
|
2477
2632
|
class ChipInput extends ValueFormControl {
|
|
2478
2633
|
_config = inject(CHIP_INPUT_CONFIG);
|
|
2479
|
-
value = model([],
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2634
|
+
value = model([], /* @ts-ignore */
|
|
2635
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2636
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
2637
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2638
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2639
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2640
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2641
|
+
separator = input(this._config.separator, /* @ts-ignore */
|
|
2642
|
+
...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
|
|
2643
|
+
inputValue = signal('', /* @ts-ignore */
|
|
2644
|
+
...(ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []));
|
|
2485
2645
|
classes = computed(() => {
|
|
2486
2646
|
const className = this.CLASS_NAME;
|
|
2487
2647
|
const array = [className, `${className}--${this.size()}`];
|
|
2488
2648
|
if (this.fluid())
|
|
2489
2649
|
array.push(`${className}--fluid`);
|
|
2490
2650
|
return array.concat(this.controlClasses());
|
|
2491
|
-
},
|
|
2651
|
+
}, /* @ts-ignore */
|
|
2652
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2492
2653
|
onInput(event) {
|
|
2493
2654
|
const target = event.target;
|
|
2494
2655
|
this.inputValue.set(target.value);
|
|
@@ -2517,10 +2678,10 @@ class ChipInput extends ValueFormControl {
|
|
|
2517
2678
|
this.value.update(chips => [...chips, text]);
|
|
2518
2679
|
this.inputValue.set('');
|
|
2519
2680
|
}
|
|
2520
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2521
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2681
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2682
|
+
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
2683
|
}
|
|
2523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipInput, decorators: [{
|
|
2524
2685
|
type: Component,
|
|
2525
2686
|
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
2687
|
}], 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 +2700,26 @@ function normalizeAccept(value) {
|
|
|
2539
2700
|
class FileUploader extends ValueFormControl {
|
|
2540
2701
|
_config = inject(FILE_UPLOADER_CONFIG);
|
|
2541
2702
|
CLASS_NAME = 'tls-file-uploader';
|
|
2542
|
-
value = model([],
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2703
|
+
value = model([], /* @ts-ignore */
|
|
2704
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2705
|
+
multiple = input(this._config.multiple, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2706
|
+
accept = input(normalizeAccept(this._config.accept), { ...(ngDevMode ? { debugName: "accept" } : /* istanbul ignore next */ {}), transform: normalizeAccept });
|
|
2707
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2546
2708
|
fileInput = viewChild.required('fileInput');
|
|
2547
|
-
dragState = signal('idle',
|
|
2548
|
-
|
|
2549
|
-
|
|
2709
|
+
dragState = signal('idle', /* @ts-ignore */
|
|
2710
|
+
...(ngDevMode ? [{ debugName: "dragState" }] : /* istanbul ignore next */ []));
|
|
2711
|
+
dropZoneTemplate = contentChild('dropZone', /* @ts-ignore */
|
|
2712
|
+
...(ngDevMode ? [{ debugName: "dropZoneTemplate" }] : /* istanbul ignore next */ []));
|
|
2713
|
+
fileTemplate = contentChild('file', /* @ts-ignore */
|
|
2714
|
+
...(ngDevMode ? [{ debugName: "fileTemplate" }] : /* istanbul ignore next */ []));
|
|
2550
2715
|
classes = computed(() => {
|
|
2551
2716
|
const className = this.CLASS_NAME;
|
|
2552
2717
|
const array = [className];
|
|
2553
2718
|
if (this.fluid())
|
|
2554
2719
|
array.push(`${className}--fluid`);
|
|
2555
2720
|
return array.concat(this.controlClasses());
|
|
2556
|
-
},
|
|
2721
|
+
}, /* @ts-ignore */
|
|
2722
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2557
2723
|
acceptHint = computed(() => {
|
|
2558
2724
|
const accept = this.accept().trim();
|
|
2559
2725
|
if (!accept)
|
|
@@ -2564,7 +2730,8 @@ class FileUploader extends ValueFormControl {
|
|
|
2564
2730
|
.filter(Boolean)
|
|
2565
2731
|
.map(rule => this._formatAcceptRule(rule));
|
|
2566
2732
|
return [...new Set(labels)].join(', ');
|
|
2567
|
-
},
|
|
2733
|
+
}, /* @ts-ignore */
|
|
2734
|
+
...(ngDevMode ? [{ debugName: "acceptHint" }] : /* istanbul ignore next */ []));
|
|
2568
2735
|
openFilePicker() {
|
|
2569
2736
|
if (this.notInteractive())
|
|
2570
2737
|
return;
|
|
@@ -2672,10 +2839,10 @@ class FileUploader extends ValueFormControl {
|
|
|
2672
2839
|
const matches = rules.some(rule => rule.endsWith('/*') ? fileType.startsWith(rule.slice(0, -1)) : fileType === rule);
|
|
2673
2840
|
return !matches;
|
|
2674
2841
|
}
|
|
2675
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2676
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2842
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileUploader, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2843
|
+
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
2844
|
}
|
|
2678
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileUploader, decorators: [{
|
|
2679
2846
|
type: Component,
|
|
2680
2847
|
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
2848
|
}], 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 +2863,32 @@ class Input extends ValueFormControl {
|
|
|
2696
2863
|
_config = inject(INPUT_CONFIG);
|
|
2697
2864
|
supportsLabelFor = true;
|
|
2698
2865
|
// Inputs
|
|
2699
|
-
type = input(this._config.type,
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2866
|
+
type = input(this._config.type, /* @ts-ignore */
|
|
2867
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
2868
|
+
value = model('', /* @ts-ignore */
|
|
2869
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2870
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
2871
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2872
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2873
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2874
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2704
2875
|
classes = computed(() => {
|
|
2705
2876
|
const array = [this.CLASS_NAME];
|
|
2706
2877
|
array.push(`${this.CLASS_NAME}--${this.size()}`);
|
|
2707
2878
|
if (this.fluid())
|
|
2708
2879
|
array.push(`${this.CLASS_NAME}--fluid`);
|
|
2709
2880
|
return array.concat(this.controlClasses());
|
|
2710
|
-
},
|
|
2881
|
+
}, /* @ts-ignore */
|
|
2882
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2711
2883
|
// Protected methods
|
|
2712
2884
|
onInput(event) {
|
|
2713
2885
|
const target = event.target;
|
|
2714
2886
|
this.value.set(target.value);
|
|
2715
2887
|
}
|
|
2716
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2717
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
2888
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Input, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2889
|
+
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
2890
|
}
|
|
2719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2891
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Input, decorators: [{
|
|
2720
2892
|
type: Component,
|
|
2721
2893
|
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
2894
|
}], 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 +2896,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2724
2896
|
class InputDirective {
|
|
2725
2897
|
// Injections
|
|
2726
2898
|
_config = inject(INPUT_CONFIG);
|
|
2727
|
-
size = input(this._config.size,
|
|
2728
|
-
|
|
2899
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2900
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2901
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2729
2902
|
hostClasses = computed(() => {
|
|
2730
2903
|
const className = 'tls-form-control';
|
|
2731
2904
|
const array = [className];
|
|
@@ -2733,11 +2906,12 @@ class InputDirective {
|
|
|
2733
2906
|
if (this.fluid())
|
|
2734
2907
|
array.push(`${className}--fluid`);
|
|
2735
2908
|
return array;
|
|
2736
|
-
},
|
|
2737
|
-
|
|
2738
|
-
static
|
|
2909
|
+
}, /* @ts-ignore */
|
|
2910
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
2911
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2912
|
+
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
2913
|
}
|
|
2740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2914
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InputDirective, decorators: [{
|
|
2741
2915
|
type: Directive,
|
|
2742
2916
|
args: [{
|
|
2743
2917
|
selector: '[tlsInput]',
|
|
@@ -2764,14 +2938,19 @@ class InputNumber extends ValueFormControl {
|
|
|
2764
2938
|
_config = inject(INPUT_NUMBER_CONFIG);
|
|
2765
2939
|
supportsLabelFor = true;
|
|
2766
2940
|
// Inputs
|
|
2767
|
-
value = model(null,
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2941
|
+
value = model(null, /* @ts-ignore */
|
|
2942
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2943
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
2944
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2945
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2946
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2947
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2948
|
+
min = input(undefined, /* @ts-ignore */
|
|
2949
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
2950
|
+
max = input(undefined, /* @ts-ignore */
|
|
2951
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
2952
|
+
step = input(this._config.step, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
2953
|
+
hideArrows = input(this._config.hideArrows, { ...(ngDevMode ? { debugName: "hideArrows" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2775
2954
|
// Computed
|
|
2776
2955
|
classes = computed(() => {
|
|
2777
2956
|
const array = [this.CLASS_NAME, 'tls-input-number'];
|
|
@@ -2781,17 +2960,18 @@ class InputNumber extends ValueFormControl {
|
|
|
2781
2960
|
if (this.hideArrows())
|
|
2782
2961
|
array.push('tls-input-number--no-arrows');
|
|
2783
2962
|
return array.concat(this.controlClasses());
|
|
2784
|
-
},
|
|
2963
|
+
}, /* @ts-ignore */
|
|
2964
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2785
2965
|
// Protected methods
|
|
2786
2966
|
onInput(event) {
|
|
2787
2967
|
const target = event.target;
|
|
2788
2968
|
const parsed = target.valueAsNumber;
|
|
2789
2969
|
this.value.set(isNaN(parsed) ? null : parsed);
|
|
2790
2970
|
}
|
|
2791
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2792
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
2971
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InputNumber, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2972
|
+
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
2973
|
}
|
|
2794
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InputNumber, decorators: [{
|
|
2795
2975
|
type: Component,
|
|
2796
2976
|
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
2977
|
}], 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 +2989,21 @@ const PASSWORD_CONFIG = new InjectionToken('PASSWORD_CONFIG', {
|
|
|
2809
2989
|
class Password extends ValueFormControl {
|
|
2810
2990
|
_config = inject(PASSWORD_CONFIG);
|
|
2811
2991
|
supportsLabelFor = true;
|
|
2812
|
-
value = model('',
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2992
|
+
value = model('', /* @ts-ignore */
|
|
2993
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2994
|
+
visible = model(false, /* @ts-ignore */
|
|
2995
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
2996
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
2997
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2998
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
2999
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3000
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3001
|
+
showIconTemplate = contentChild('showIcon', /* @ts-ignore */
|
|
3002
|
+
...(ngDevMode ? [{ debugName: "showIconTemplate" }] : /* istanbul ignore next */ []));
|
|
3003
|
+
hideIconTemplate = contentChild('hideIcon', /* @ts-ignore */
|
|
3004
|
+
...(ngDevMode ? [{ debugName: "hideIconTemplate" }] : /* istanbul ignore next */ []));
|
|
3005
|
+
type = computed(() => (this.visible() ? 'text' : 'password'), /* @ts-ignore */
|
|
3006
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
2820
3007
|
// Protected methods
|
|
2821
3008
|
onInput(event) {
|
|
2822
3009
|
const target = event.target;
|
|
@@ -2827,10 +3014,10 @@ class Password extends ValueFormControl {
|
|
|
2827
3014
|
return;
|
|
2828
3015
|
this.visible.update(prev => !prev);
|
|
2829
3016
|
}
|
|
2830
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2831
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3017
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Password, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3018
|
+
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
3019
|
}
|
|
2833
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3020
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Password, decorators: [{
|
|
2834
3021
|
type: Component,
|
|
2835
3022
|
args: [{ selector: 'tls-password', imports: [FormControlGroup, NgTemplateOutlet], host: {
|
|
2836
3023
|
class: 'tls-password',
|
|
@@ -2858,20 +3045,27 @@ const PIN_INPUT_CONFIG = new InjectionToken('PIN_INPUT_CONFIG', {
|
|
|
2858
3045
|
class PinInput extends ValueFormControl {
|
|
2859
3046
|
_config = inject(PIN_INPUT_CONFIG);
|
|
2860
3047
|
_directionality = inject(Directionality);
|
|
2861
|
-
_inputs = viewChildren('cell',
|
|
3048
|
+
_inputs = viewChildren('cell', /* @ts-ignore */
|
|
3049
|
+
...(ngDevMode ? [{ debugName: "_inputs" }] : /* istanbul ignore next */ []));
|
|
2862
3050
|
// Inputs
|
|
2863
|
-
value = model('',
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
3051
|
+
value = model('', /* @ts-ignore */
|
|
3052
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3053
|
+
length = input(this._config.length, /* @ts-ignore */
|
|
3054
|
+
...(ngDevMode ? [{ debugName: "length" }] : /* istanbul ignore next */ []));
|
|
3055
|
+
type = input(this._config.type, /* @ts-ignore */
|
|
3056
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
3057
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
3058
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2867
3059
|
CLASS_NAME = 'tls-pin-input';
|
|
2868
3060
|
// Computed
|
|
2869
|
-
cells = computed(() => Array.from({ length: this.length() }, (_, index) => index),
|
|
3061
|
+
cells = computed(() => Array.from({ length: this.length() }, (_, index) => index), /* @ts-ignore */
|
|
3062
|
+
...(ngDevMode ? [{ debugName: "cells" }] : /* istanbul ignore next */ []));
|
|
2870
3063
|
hostClasses = computed(() => {
|
|
2871
3064
|
const className = this.CLASS_NAME;
|
|
2872
3065
|
const array = [className];
|
|
2873
3066
|
return array.concat(this.controlClasses());
|
|
2874
|
-
},
|
|
3067
|
+
}, /* @ts-ignore */
|
|
3068
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
2875
3069
|
// Protected methods
|
|
2876
3070
|
getCellValue(index) {
|
|
2877
3071
|
return this.value()[index] ?? '';
|
|
@@ -2964,10 +3158,10 @@ class PinInput extends ValueFormControl {
|
|
|
2964
3158
|
_getValueArray() {
|
|
2965
3159
|
return Array.from({ length: this.length() }, (_, i) => this.value()[i] ?? '');
|
|
2966
3160
|
}
|
|
2967
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2968
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3161
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PinInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3162
|
+
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
3163
|
}
|
|
2970
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PinInput, decorators: [{
|
|
2971
3165
|
type: Component,
|
|
2972
3166
|
args: [{ selector: 'tls-pin-input', imports: [], host: {
|
|
2973
3167
|
role: 'group',
|
|
@@ -2989,27 +3183,32 @@ class RadioButton extends ValueFormControl {
|
|
|
2989
3183
|
_config = inject(RADIO_BUTTON_CONFIG);
|
|
2990
3184
|
CLASS_NAME = 'tls-radio-button';
|
|
2991
3185
|
supportsLabelFor = true;
|
|
2992
|
-
radioValue = input.required(
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
3186
|
+
radioValue = input.required(/* @ts-ignore */
|
|
3187
|
+
...(ngDevMode ? [{ debugName: "radioValue" }] : /* istanbul ignore next */ []));
|
|
3188
|
+
value = model('', /* @ts-ignore */
|
|
3189
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3190
|
+
tabindex = input(0, /* @ts-ignore */
|
|
3191
|
+
...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
3192
|
+
checked = computed(() => this.radioValue() === this.value(), /* @ts-ignore */
|
|
3193
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
2996
3194
|
hostClasses = computed(() => {
|
|
2997
3195
|
const className = this.CLASS_NAME;
|
|
2998
3196
|
const array = [className];
|
|
2999
3197
|
if (this.checked())
|
|
3000
3198
|
array.push(`${className}--checked`);
|
|
3001
3199
|
return array.concat(this.controlClasses());
|
|
3002
|
-
},
|
|
3200
|
+
}, /* @ts-ignore */
|
|
3201
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3003
3202
|
// Protected methods
|
|
3004
3203
|
check() {
|
|
3005
3204
|
if (this.notInteractive())
|
|
3006
3205
|
return;
|
|
3007
3206
|
this.value.set(this.radioValue());
|
|
3008
3207
|
}
|
|
3009
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3010
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
3208
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RadioButton, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3209
|
+
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
3210
|
}
|
|
3012
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RadioButton, decorators: [{
|
|
3013
3212
|
type: Component,
|
|
3014
3213
|
args: [{ selector: 'tls-radio-button', imports: [], host: {
|
|
3015
3214
|
'[class]': 'hostClasses()',
|
|
@@ -3036,14 +3235,20 @@ class MultiSelect extends AbstractSelect {
|
|
|
3036
3235
|
uniqueId = `tls-multi-select-${MultiSelect._nextUniqueId++}`;
|
|
3037
3236
|
hostClassBase = 'tls-multi-select';
|
|
3038
3237
|
panelClass = 'tls-multi-select-panel';
|
|
3039
|
-
value = model([],
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3238
|
+
value = model([], /* @ts-ignore */
|
|
3239
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3240
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
3241
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
3242
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3243
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3244
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3245
|
+
clearable = input(this._config.clearable, { ...(ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3246
|
+
maxLabels = input(this._config.maxLabels, /* @ts-ignore */
|
|
3247
|
+
...(ngDevMode ? [{ debugName: "maxLabels" }] : /* istanbul ignore next */ []));
|
|
3248
|
+
hasValue = computed(() => this.value().length > 0, /* @ts-ignore */
|
|
3249
|
+
...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
3250
|
+
selectedValues = computed(() => new Set(this.value()), /* @ts-ignore */
|
|
3251
|
+
...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
|
|
3047
3252
|
triggerLabel = computed(() => {
|
|
3048
3253
|
const selected = this.value();
|
|
3049
3254
|
if (selected.length === 0)
|
|
@@ -3053,7 +3258,8 @@ class MultiSelect extends AbstractSelect {
|
|
|
3053
3258
|
return `${selected.length} selected`;
|
|
3054
3259
|
const optionMap = new Map(this.normalizedOptions().map(option => [option.value, option.label]));
|
|
3055
3260
|
return selected.map(value => optionMap.get(value) ?? String(value)).join(', ');
|
|
3056
|
-
},
|
|
3261
|
+
}, /* @ts-ignore */
|
|
3262
|
+
...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
3057
3263
|
isSelected(option) {
|
|
3058
3264
|
return this.selectedValues().has(option.value);
|
|
3059
3265
|
}
|
|
@@ -3081,10 +3287,10 @@ class MultiSelect extends AbstractSelect {
|
|
|
3081
3287
|
commitActiveOption(option) {
|
|
3082
3288
|
this.toggleOption(option);
|
|
3083
3289
|
}
|
|
3084
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3085
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3290
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MultiSelect, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3291
|
+
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
3292
|
}
|
|
3087
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MultiSelect, decorators: [{
|
|
3088
3294
|
type: Component,
|
|
3089
3295
|
args: [{ selector: 'tls-multi-select', host: {
|
|
3090
3296
|
'[class]': 'hostClasses()',
|
|
@@ -3109,15 +3315,19 @@ class Select extends AbstractSelect {
|
|
|
3109
3315
|
uniqueId = `tls-select-${Select._nextUniqueId++}`;
|
|
3110
3316
|
hostClassBase = 'tls-select';
|
|
3111
3317
|
panelClass = 'tls-select-panel';
|
|
3112
|
-
value = model(null,
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3318
|
+
value = model(null, /* @ts-ignore */
|
|
3319
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3320
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
3321
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
3322
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3323
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3324
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3325
|
+
clearable = input(this._config.clearable, { ...(ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3117
3326
|
hasValue = computed(() => {
|
|
3118
3327
|
const value = this.value();
|
|
3119
3328
|
return value !== null && value !== undefined && value !== '';
|
|
3120
|
-
},
|
|
3329
|
+
}, /* @ts-ignore */
|
|
3330
|
+
...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
3121
3331
|
selectedLabel = computed(() => {
|
|
3122
3332
|
if (!this.hasValue())
|
|
3123
3333
|
return '';
|
|
@@ -3125,7 +3335,8 @@ class Select extends AbstractSelect {
|
|
|
3125
3335
|
if (!selected)
|
|
3126
3336
|
return '';
|
|
3127
3337
|
return selected.label;
|
|
3128
|
-
},
|
|
3338
|
+
}, /* @ts-ignore */
|
|
3339
|
+
...(ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []));
|
|
3129
3340
|
select(option) {
|
|
3130
3341
|
if (option.disabled)
|
|
3131
3342
|
return;
|
|
@@ -3141,10 +3352,10 @@ class Select extends AbstractSelect {
|
|
|
3141
3352
|
commitActiveOption(option) {
|
|
3142
3353
|
this.select(option);
|
|
3143
3354
|
}
|
|
3144
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3145
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3355
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Select, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3356
|
+
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
3357
|
}
|
|
3147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Select, decorators: [{
|
|
3148
3359
|
type: Component,
|
|
3149
3360
|
args: [{ selector: 'tls-select', host: {
|
|
3150
3361
|
'[class]': 'hostClasses()',
|
|
@@ -3163,15 +3374,19 @@ class Switch extends CheckboxFormControl {
|
|
|
3163
3374
|
_config = inject(SWITCH_CONFIG);
|
|
3164
3375
|
CLASS_NAME = 'tls-switch';
|
|
3165
3376
|
supportsLabelFor = true;
|
|
3166
|
-
checked = model(false,
|
|
3167
|
-
|
|
3168
|
-
|
|
3377
|
+
checked = model(false, /* @ts-ignore */
|
|
3378
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
3379
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
3380
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
3381
|
+
tabindex = input(0, /* @ts-ignore */
|
|
3382
|
+
...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
3169
3383
|
hostClasses = computed(() => {
|
|
3170
3384
|
const className = this.CLASS_NAME;
|
|
3171
3385
|
const array = [className];
|
|
3172
3386
|
array.push(`${className}--${this.color()}`);
|
|
3173
3387
|
return array.concat(this.controlClasses());
|
|
3174
|
-
},
|
|
3388
|
+
}, /* @ts-ignore */
|
|
3389
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3175
3390
|
// Protected methods
|
|
3176
3391
|
toggle() {
|
|
3177
3392
|
if (this.notInteractive())
|
|
@@ -3182,10 +3397,10 @@ class Switch extends CheckboxFormControl {
|
|
|
3182
3397
|
event.preventDefault();
|
|
3183
3398
|
this.toggle();
|
|
3184
3399
|
}
|
|
3185
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3186
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
3400
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Switch, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3401
|
+
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
3402
|
}
|
|
3188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Switch, decorators: [{
|
|
3189
3404
|
type: Component,
|
|
3190
3405
|
args: [{ selector: 'tls-switch', host: {
|
|
3191
3406
|
role: 'switch',
|
|
@@ -3207,6 +3422,9 @@ const DEFAULT_TEXTAREA_CONFIG = {
|
|
|
3207
3422
|
fluid: false,
|
|
3208
3423
|
rows: 3,
|
|
3209
3424
|
resize: 'vertical',
|
|
3425
|
+
autosize: false,
|
|
3426
|
+
// Row cap while autosizing. `0` means unbounded — the textarea grows freely.
|
|
3427
|
+
maxRows: 0,
|
|
3210
3428
|
};
|
|
3211
3429
|
|
|
3212
3430
|
const TEXTAREA_CONFIG = new InjectionToken('TEXTAREA_CONFIG', {
|
|
@@ -3214,33 +3432,47 @@ const TEXTAREA_CONFIG = new InjectionToken('TEXTAREA_CONFIG', {
|
|
|
3214
3432
|
});
|
|
3215
3433
|
|
|
3216
3434
|
class Textarea extends ValueFormControl {
|
|
3435
|
+
// Injections
|
|
3217
3436
|
_config = inject(TEXTAREA_CONFIG);
|
|
3218
3437
|
supportsLabelFor = true;
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3438
|
+
// Inputs
|
|
3439
|
+
value = model('', /* @ts-ignore */
|
|
3440
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3441
|
+
placeholder = input(this._config.placeholder, /* @ts-ignore */
|
|
3442
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
3443
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3444
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3445
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3446
|
+
rows = input(this._config.rows, { ...(ngDevMode ? { debugName: "rows" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
3447
|
+
resize = input(this._config.resize, /* @ts-ignore */
|
|
3448
|
+
...(ngDevMode ? [{ debugName: "resize" }] : /* istanbul ignore next */ []));
|
|
3449
|
+
autosize = input(this._config.autosize, { ...(ngDevMode ? { debugName: "autosize" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3450
|
+
// Upper bound, in rows, on the autosized height. `0` grows without a cap.
|
|
3451
|
+
maxRows = input(this._config.maxRows, { ...(ngDevMode ? { debugName: "maxRows" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
3452
|
+
// Computed
|
|
3225
3453
|
classes = computed(() => {
|
|
3226
3454
|
const array = [this.CLASS_NAME];
|
|
3227
3455
|
array.push(`${this.CLASS_NAME}--${this.size()}`);
|
|
3228
3456
|
if (this.fluid())
|
|
3229
3457
|
array.push(`${this.CLASS_NAME}--fluid`);
|
|
3230
3458
|
return array.concat(this.controlClasses());
|
|
3231
|
-
},
|
|
3459
|
+
}, /* @ts-ignore */
|
|
3460
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3461
|
+
// Autosize owns the height, so the manual resize handle is suppressed.
|
|
3462
|
+
effectiveResize = computed(() => this.autosize() ? 'none' : this.resize(), /* @ts-ignore */
|
|
3463
|
+
...(ngDevMode ? [{ debugName: "effectiveResize" }] : /* istanbul ignore next */ []));
|
|
3232
3464
|
// Protected methods
|
|
3233
3465
|
onInput(event) {
|
|
3234
3466
|
const target = event.target;
|
|
3235
3467
|
this.value.set(target.value);
|
|
3236
3468
|
}
|
|
3237
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3238
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
3469
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Textarea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3470
|
+
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
3471
|
}
|
|
3240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Textarea, decorators: [{
|
|
3241
3473
|
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 }] }] } });
|
|
3474
|
+
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"] }]
|
|
3475
|
+
}], 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
3476
|
|
|
3245
3477
|
const DEFAULT_TOGGLE_GROUP_CONFIG = {
|
|
3246
3478
|
size: 'md',
|
|
@@ -3261,12 +3493,16 @@ const TOGGLE_GROUP_CONFIG = new InjectionToken('TOGGLE_GROUP_CONFIG', {
|
|
|
3261
3493
|
class ToggleGroup extends SelectionGroup {
|
|
3262
3494
|
_config = inject(TOGGLE_GROUP_CONFIG);
|
|
3263
3495
|
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
|
-
|
|
3496
|
+
multiple = input(this._config.multiple, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3497
|
+
unselectable = input(this._config.unselectable, { ...(ngDevMode ? { debugName: "unselectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3498
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3499
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3500
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
3501
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
3502
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
3503
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
3504
|
+
optionTemplate = contentChild('option', /* @ts-ignore */
|
|
3505
|
+
...(ngDevMode ? [{ debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
3270
3506
|
classes = computed(() => {
|
|
3271
3507
|
const className = this.CLASS_NAME;
|
|
3272
3508
|
const array = [
|
|
@@ -3276,11 +3512,12 @@ class ToggleGroup extends SelectionGroup {
|
|
|
3276
3512
|
`${className}--${this.orientation()}`,
|
|
3277
3513
|
];
|
|
3278
3514
|
return array.concat(this.controlClasses());
|
|
3279
|
-
},
|
|
3280
|
-
|
|
3281
|
-
static
|
|
3515
|
+
}, /* @ts-ignore */
|
|
3516
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3517
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToggleGroup, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3518
|
+
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
3519
|
}
|
|
3283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToggleGroup, decorators: [{
|
|
3284
3521
|
type: Component,
|
|
3285
3522
|
args: [{ selector: 'tls-toggle-group', imports: [NgTemplateOutlet], providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ToggleGroup) }], host: {
|
|
3286
3523
|
role: 'group',
|
|
@@ -3334,10 +3571,10 @@ class IconService {
|
|
|
3334
3571
|
// Remove import statements in style
|
|
3335
3572
|
.replace(/@import/gi, ''));
|
|
3336
3573
|
}
|
|
3337
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3338
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3574
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3575
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, providedIn: 'root' });
|
|
3339
3576
|
}
|
|
3340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3577
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, decorators: [{
|
|
3341
3578
|
type: Injectable,
|
|
3342
3579
|
args: [{ providedIn: 'root' }]
|
|
3343
3580
|
}] });
|
|
@@ -3355,12 +3592,16 @@ class Icon {
|
|
|
3355
3592
|
_iconService = inject(IconService);
|
|
3356
3593
|
_config = inject(ICON_CONFIG);
|
|
3357
3594
|
// Inputs
|
|
3358
|
-
iconSrc = input.required(
|
|
3359
|
-
|
|
3360
|
-
|
|
3595
|
+
iconSrc = input.required(/* @ts-ignore */
|
|
3596
|
+
...(ngDevMode ? [{ debugName: "iconSrc" }] : /* istanbul ignore next */ []));
|
|
3597
|
+
alt = input('', /* @ts-ignore */
|
|
3598
|
+
...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
3599
|
+
allowedSources = input(this._config.allowedSources, /* @ts-ignore */
|
|
3600
|
+
...(ngDevMode ? [{ debugName: "allowedSources" }] : /* istanbul ignore next */ []));
|
|
3361
3601
|
isSvg = computed(() => {
|
|
3362
3602
|
return this.iconSrc().endsWith('.svg');
|
|
3363
|
-
},
|
|
3603
|
+
}, /* @ts-ignore */
|
|
3604
|
+
...(ngDevMode ? [{ debugName: "isSvg" }] : /* istanbul ignore next */ []));
|
|
3364
3605
|
_svgContentResource = rxResource({
|
|
3365
3606
|
defaultValue: '',
|
|
3366
3607
|
params: () => ({
|
|
@@ -3373,10 +3614,10 @@ class Icon {
|
|
|
3373
3614
|
get svgContent() {
|
|
3374
3615
|
return this._svgContentResource.value.asReadonly();
|
|
3375
3616
|
}
|
|
3376
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3377
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3617
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Icon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3618
|
+
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
3619
|
}
|
|
3379
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3620
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Icon, decorators: [{
|
|
3380
3621
|
type: Component,
|
|
3381
3622
|
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
3623
|
}], 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 +3651,17 @@ const LOADER_CONFIG = new InjectionToken('LOADER_CONFIG', {
|
|
|
3410
3651
|
class Loader {
|
|
3411
3652
|
_config = inject(LOADER_CONFIG);
|
|
3412
3653
|
/** Predefined size token or custom pixel value. */
|
|
3413
|
-
size = input(this._config.size,
|
|
3654
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3655
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3414
3656
|
/** Stroke width in pixels. Overrides the size-class default for both token and numeric sizes. */
|
|
3415
|
-
width = input(this._config.width,
|
|
3657
|
+
width = input(this._config.width, /* @ts-ignore */
|
|
3658
|
+
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
3416
3659
|
/** Divisor for auto stroke width when size is a number and width is null (`size / widthRatio`). */
|
|
3417
|
-
widthRatio = input(this._config.widthRatio,
|
|
3660
|
+
widthRatio = input(this._config.widthRatio, /* @ts-ignore */
|
|
3661
|
+
...(ngDevMode ? [{ debugName: "widthRatio" }] : /* istanbul ignore next */ []));
|
|
3418
3662
|
/** Text announced by screen readers via `aria-label`. */
|
|
3419
|
-
ariaLabel = input(this._config.ariaLabel,
|
|
3663
|
+
ariaLabel = input(this._config.ariaLabel, /* @ts-ignore */
|
|
3664
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
3420
3665
|
hostClasses = computed(() => {
|
|
3421
3666
|
const className = 'tls-loader';
|
|
3422
3667
|
const size = this.size();
|
|
@@ -3425,7 +3670,8 @@ class Loader {
|
|
|
3425
3670
|
array.push(`${className}--${size}`);
|
|
3426
3671
|
}
|
|
3427
3672
|
return array;
|
|
3428
|
-
},
|
|
3673
|
+
}, /* @ts-ignore */
|
|
3674
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3429
3675
|
hostStyles = computed(() => {
|
|
3430
3676
|
const size = this.size();
|
|
3431
3677
|
const width = this.width();
|
|
@@ -3443,11 +3689,12 @@ class Loader {
|
|
|
3443
3689
|
styles['--tls-loader-width'] = `${size / this.widthRatio()}px`;
|
|
3444
3690
|
}
|
|
3445
3691
|
return styles;
|
|
3446
|
-
},
|
|
3447
|
-
|
|
3448
|
-
static
|
|
3692
|
+
}, /* @ts-ignore */
|
|
3693
|
+
...(ngDevMode ? [{ debugName: "hostStyles" }] : /* istanbul ignore next */ []));
|
|
3694
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Loader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3695
|
+
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
3696
|
}
|
|
3450
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Loader, decorators: [{
|
|
3451
3698
|
type: Component,
|
|
3452
3699
|
args: [{
|
|
3453
3700
|
selector: 'tls-loader',
|
|
@@ -3463,12 +3710,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3463
3710
|
}], 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
3711
|
|
|
3465
3712
|
class MenuItemComponent {
|
|
3466
|
-
key = input.required(
|
|
3713
|
+
key = input.required(/* @ts-ignore */
|
|
3714
|
+
...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
3467
3715
|
templateRef = viewChild.required('template');
|
|
3468
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3469
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
3716
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3717
|
+
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
3718
|
}
|
|
3471
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MenuItemComponent, decorators: [{
|
|
3472
3720
|
type: Component,
|
|
3473
3721
|
args: [{
|
|
3474
3722
|
selector: 'tls-menu-item',
|
|
@@ -3491,28 +3739,40 @@ class Menu {
|
|
|
3491
3739
|
_config = inject(MENU_CONFIG);
|
|
3492
3740
|
_overlay = createOverlayManager();
|
|
3493
3741
|
_panelRef = viewChild.required('panel');
|
|
3494
|
-
_customItems = contentChildren(MenuItemComponent,
|
|
3742
|
+
_customItems = contentChildren(MenuItemComponent, /* @ts-ignore */
|
|
3743
|
+
...(ngDevMode ? [{ debugName: "_customItems" }] : /* istanbul ignore next */ []));
|
|
3495
3744
|
customTemplates = computed(() => {
|
|
3496
3745
|
const map = new Map();
|
|
3497
3746
|
for (const item of this._customItems()) {
|
|
3498
3747
|
map.set(item.key(), item.templateRef());
|
|
3499
3748
|
}
|
|
3500
3749
|
return map;
|
|
3501
|
-
},
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3750
|
+
}, /* @ts-ignore */
|
|
3751
|
+
...(ngDevMode ? [{ debugName: "customTemplates" }] : /* istanbul ignore next */ []));
|
|
3752
|
+
itemTemplate = contentChild('itemTemplate', /* @ts-ignore */
|
|
3753
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
3754
|
+
labelTemplate = contentChild('labelTemplate', /* @ts-ignore */
|
|
3755
|
+
...(ngDevMode ? [{ debugName: "labelTemplate" }] : /* istanbul ignore next */ []));
|
|
3756
|
+
dividerTemplate = contentChild('dividerTemplate', /* @ts-ignore */
|
|
3757
|
+
...(ngDevMode ? [{ debugName: "dividerTemplate" }] : /* istanbul ignore next */ []));
|
|
3758
|
+
iconTemplate = contentChild('iconTemplate', /* @ts-ignore */
|
|
3759
|
+
...(ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
|
|
3506
3760
|
id = `tls-menu-${++Menu._counter}`;
|
|
3507
3761
|
// Inputs
|
|
3508
|
-
items = input([],
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3762
|
+
items = input([], /* @ts-ignore */
|
|
3763
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
3764
|
+
position = input(this._config.position, /* @ts-ignore */
|
|
3765
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
3766
|
+
offset = input(this._config.offset, /* @ts-ignore */
|
|
3767
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
3768
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
3769
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
3770
|
+
inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3771
|
+
_positions = computed(() => buildOverlayPositions(this.position(), this.offset()), /* @ts-ignore */
|
|
3772
|
+
...(ngDevMode ? [{ debugName: "_positions" }] : /* istanbul ignore next */ []));
|
|
3514
3773
|
// An inline menu is always "open" (rendered in place); otherwise reflect the overlay.
|
|
3515
|
-
isOpen = computed(() => this.inline() || this._overlay.isOpen(),
|
|
3774
|
+
isOpen = computed(() => this.inline() || this._overlay.isOpen(), /* @ts-ignore */
|
|
3775
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
3516
3776
|
constructor() {
|
|
3517
3777
|
if (isDevMode()) {
|
|
3518
3778
|
effect(() => {
|
|
@@ -3564,26 +3824,28 @@ class Menu {
|
|
|
3564
3824
|
item.action?.();
|
|
3565
3825
|
this.close();
|
|
3566
3826
|
}
|
|
3567
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3568
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3827
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Menu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3828
|
+
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
3829
|
}
|
|
3570
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Menu, decorators: [{
|
|
3571
3831
|
type: Component,
|
|
3572
3832
|
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
3833
|
}], 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
3834
|
|
|
3575
3835
|
class MenuTriggerDirective {
|
|
3576
|
-
menu = input.required({ ...(ngDevMode ? { debugName: "menu" } : {}), alias: 'tlsMenuTrigger' });
|
|
3577
|
-
isOpen = computed(() => this.menu().isOpen(),
|
|
3578
|
-
|
|
3836
|
+
menu = input.required({ ...(ngDevMode ? { debugName: "menu" } : /* istanbul ignore next */ {}), alias: 'tlsMenuTrigger' });
|
|
3837
|
+
isOpen = computed(() => this.menu().isOpen(), /* @ts-ignore */
|
|
3838
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
3839
|
+
menuId = computed(() => this.menu().id, /* @ts-ignore */
|
|
3840
|
+
...(ngDevMode ? [{ debugName: "menuId" }] : /* istanbul ignore next */ []));
|
|
3579
3841
|
// Protected methods
|
|
3580
3842
|
onClick(event) {
|
|
3581
3843
|
this.menu().toggle(event);
|
|
3582
3844
|
}
|
|
3583
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3584
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
3845
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3846
|
+
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
3847
|
}
|
|
3586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MenuTriggerDirective, decorators: [{
|
|
3587
3849
|
type: Directive,
|
|
3588
3850
|
args: [{
|
|
3589
3851
|
selector: '[tlsMenuTrigger]',
|
|
@@ -3597,17 +3859,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
3597
3859
|
}], propDecorators: { menu: [{ type: i0.Input, args: [{ isSignal: true, alias: "tlsMenuTrigger", required: true }] }] } });
|
|
3598
3860
|
|
|
3599
3861
|
class ContextMenuDirective {
|
|
3600
|
-
menu = input.required({ ...(ngDevMode ? { debugName: "menu" } : {}), alias: 'tlsContextMenu' });
|
|
3862
|
+
menu = input.required({ ...(ngDevMode ? { debugName: "menu" } : /* istanbul ignore next */ {}), alias: 'tlsContextMenu' });
|
|
3601
3863
|
// Protected methods
|
|
3602
3864
|
onContextMenu(event) {
|
|
3603
3865
|
event.preventDefault();
|
|
3604
3866
|
this.menu().close();
|
|
3605
3867
|
this.menu().openAtPoint(event.clientX, event.clientY);
|
|
3606
3868
|
}
|
|
3607
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3608
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
3869
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContextMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3870
|
+
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
3871
|
}
|
|
3610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
3611
3873
|
type: Directive,
|
|
3612
3874
|
args: [{
|
|
3613
3875
|
selector: '[tlsContextMenu]',
|
|
@@ -3644,15 +3906,19 @@ const ODOMETER_MINUS_SIGN = '−';
|
|
|
3644
3906
|
*/
|
|
3645
3907
|
class OdometerDigit {
|
|
3646
3908
|
// Inputs
|
|
3647
|
-
digit = input.required(
|
|
3648
|
-
|
|
3909
|
+
digit = input.required(/* @ts-ignore */
|
|
3910
|
+
...(ngDevMode ? [{ debugName: "digit" }] : /* istanbul ignore next */ []));
|
|
3911
|
+
duration = input.required(/* @ts-ignore */
|
|
3912
|
+
...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
3649
3913
|
// State
|
|
3650
3914
|
strip = ODOMETER_STRIP;
|
|
3651
3915
|
// Row the strip is translated to. Starts centred on the middle repetition.
|
|
3652
|
-
offset = signal(ODOMETER_CENTER_OFFSET,
|
|
3916
|
+
offset = signal(ODOMETER_CENTER_OFFSET, /* @ts-ignore */
|
|
3917
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
3653
3918
|
// Whether the translation transition is armed. Disabled while re-centring so
|
|
3654
3919
|
// the invisible jump between repetitions never animates.
|
|
3655
|
-
animating = signal(false,
|
|
3920
|
+
animating = signal(false, /* @ts-ignore */
|
|
3921
|
+
...(ngDevMode ? [{ debugName: "animating" }] : /* istanbul ignore next */ []));
|
|
3656
3922
|
// Digit currently settled in the viewport, tracked to derive the roll direction.
|
|
3657
3923
|
_currentDigit = 0;
|
|
3658
3924
|
_initialized = false;
|
|
@@ -3698,8 +3964,8 @@ class OdometerDigit {
|
|
|
3698
3964
|
delta += ODOMETER_DIGITS_PER_REPETITION;
|
|
3699
3965
|
return delta;
|
|
3700
3966
|
}
|
|
3701
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3702
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3967
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: OdometerDigit, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3968
|
+
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
3969
|
<span
|
|
3704
3970
|
class="tls-odometer-digit__strip"
|
|
3705
3971
|
[class.tls-odometer-digit__strip--animate]="animating()"
|
|
@@ -3711,7 +3977,7 @@ class OdometerDigit {
|
|
|
3711
3977
|
</span>
|
|
3712
3978
|
`, isInline: true });
|
|
3713
3979
|
}
|
|
3714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: OdometerDigit, decorators: [{
|
|
3715
3981
|
type: Component,
|
|
3716
3982
|
args: [{
|
|
3717
3983
|
selector: 'tls-odometer-digit',
|
|
@@ -3767,17 +4033,23 @@ class Odometer {
|
|
|
3767
4033
|
_config = inject(ODOMETER_CONFIG);
|
|
3768
4034
|
// Inputs
|
|
3769
4035
|
/** The number to display. Changes roll the affected digit columns. */
|
|
3770
|
-
value = input.required(
|
|
4036
|
+
value = input.required(/* @ts-ignore */
|
|
4037
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3771
4038
|
/** Duration of a single-digit roll, in milliseconds. */
|
|
3772
|
-
duration = input(this._config.duration,
|
|
4039
|
+
duration = input(this._config.duration, /* @ts-ignore */
|
|
4040
|
+
...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
3773
4041
|
/** Minimum number of integer digits, left-padded with zeros (`007`). */
|
|
3774
|
-
minIntegerDigits = input(this._config.minIntegerDigits,
|
|
4042
|
+
minIntegerDigits = input(this._config.minIntegerDigits, /* @ts-ignore */
|
|
4043
|
+
...(ngDevMode ? [{ debugName: "minIntegerDigits" }] : /* istanbul ignore next */ []));
|
|
3775
4044
|
/** Number of fraction digits to display. `0` hides the decimal part. */
|
|
3776
|
-
fractionDigits = input(this._config.fractionDigits,
|
|
4045
|
+
fractionDigits = input(this._config.fractionDigits, /* @ts-ignore */
|
|
4046
|
+
...(ngDevMode ? [{ debugName: "fractionDigits" }] : /* istanbul ignore next */ []));
|
|
3777
4047
|
/** Character rendered between the integer and fraction parts. */
|
|
3778
|
-
decimalSeparator = input(this._config.decimalSeparator,
|
|
4048
|
+
decimalSeparator = input(this._config.decimalSeparator, /* @ts-ignore */
|
|
4049
|
+
...(ngDevMode ? [{ debugName: "decimalSeparator" }] : /* istanbul ignore next */ []));
|
|
3779
4050
|
/** Overrides the text announced to screen readers (defaults to the formatted value). */
|
|
3780
|
-
ariaLabel = input(undefined,
|
|
4051
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
4052
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
3781
4053
|
// Computed
|
|
3782
4054
|
tokens = computed(() => {
|
|
3783
4055
|
const value = this.value();
|
|
@@ -3807,14 +4079,16 @@ class Odometer {
|
|
|
3807
4079
|
}
|
|
3808
4080
|
}
|
|
3809
4081
|
return tokens;
|
|
3810
|
-
},
|
|
4082
|
+
}, /* @ts-ignore */
|
|
4083
|
+
...(ngDevMode ? [{ debugName: "tokens" }] : /* istanbul ignore next */ []));
|
|
3811
4084
|
formattedValue = computed(() => this.tokens()
|
|
3812
4085
|
.map(token => (token.digit === null ? token.symbol : String(token.digit)))
|
|
3813
|
-
.join(''),
|
|
3814
|
-
|
|
3815
|
-
static
|
|
4086
|
+
.join(''), /* @ts-ignore */
|
|
4087
|
+
...(ngDevMode ? [{ debugName: "formattedValue" }] : /* istanbul ignore next */ []));
|
|
4088
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Odometer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4089
|
+
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
4090
|
}
|
|
3817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Odometer, decorators: [{
|
|
3818
4092
|
type: Component,
|
|
3819
4093
|
args: [{ selector: 'tls-odometer', imports: [OdometerDigit], host: {
|
|
3820
4094
|
class: 'tls-odometer',
|
|
@@ -3836,20 +4110,31 @@ const PAGINATION_CONFIG = new InjectionToken('PAGINATION_CONFIG', {
|
|
|
3836
4110
|
|
|
3837
4111
|
class Pagination {
|
|
3838
4112
|
_config = inject(PAGINATION_CONFIG);
|
|
3839
|
-
value = model(1,
|
|
4113
|
+
value = model(1, /* @ts-ignore */
|
|
4114
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3840
4115
|
/** Accessible name for the pagination navigation landmark. */
|
|
3841
|
-
ariaLabel = input('Pagination',
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
4116
|
+
ariaLabel = input('Pagination', /* @ts-ignore */
|
|
4117
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4118
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
4119
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
4120
|
+
pageSize = input(this._config.pageSize, /* @ts-ignore */
|
|
4121
|
+
...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
4122
|
+
total = input(0, /* @ts-ignore */
|
|
4123
|
+
...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
4124
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
4125
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
4126
|
+
boundaries = input(this._config.boundaries, /* @ts-ignore */
|
|
4127
|
+
...(ngDevMode ? [{ debugName: "boundaries" }] : /* istanbul ignore next */ []));
|
|
4128
|
+
siblings = input(this._config.siblings, /* @ts-ignore */
|
|
4129
|
+
...(ngDevMode ? [{ debugName: "siblings" }] : /* istanbul ignore next */ []));
|
|
4130
|
+
showFirstButton = input(this._config.showFirstButton, { ...(ngDevMode ? { debugName: "showFirstButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4131
|
+
showLastButton = input(this._config.showLastButton, { ...(ngDevMode ? { debugName: "showLastButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4132
|
+
pageCount = computed(() => Math.ceil(this.total() / this.pageSize()), /* @ts-ignore */
|
|
4133
|
+
...(ngDevMode ? [{ debugName: "pageCount" }] : /* istanbul ignore next */ []));
|
|
4134
|
+
visiblePages = computed(() => this._buildPages(this.pageCount(), this.value(), this.siblings(), this.boundaries()), /* @ts-ignore */
|
|
4135
|
+
...(ngDevMode ? [{ debugName: "visiblePages" }] : /* istanbul ignore next */ []));
|
|
4136
|
+
classes = computed(() => ['tls-pagination', `tls-pagination--${this.size()}`], /* @ts-ignore */
|
|
4137
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3853
4138
|
// Protected methods
|
|
3854
4139
|
setPage(page) {
|
|
3855
4140
|
this.value.set(page);
|
|
@@ -3901,10 +4186,10 @@ class Pagination {
|
|
|
3901
4186
|
...endPages,
|
|
3902
4187
|
];
|
|
3903
4188
|
}
|
|
3904
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3905
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Pagination, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4190
|
+
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
4191
|
}
|
|
3907
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Pagination, decorators: [{
|
|
3908
4193
|
type: Component,
|
|
3909
4194
|
args: [{ selector: 'tls-pagination', host: {
|
|
3910
4195
|
role: 'navigation',
|
|
@@ -3924,7 +4209,8 @@ class PaginationQuerySyncDirective extends QuerySyncDirective {
|
|
|
3924
4209
|
_pagination = inject(Pagination);
|
|
3925
4210
|
_config = inject(PAGINATION_QUERY_SYNC_CONFIG);
|
|
3926
4211
|
// Inputs
|
|
3927
|
-
tlsPaginationQuerySync = input(this._config.paramKey,
|
|
4212
|
+
tlsPaginationQuerySync = input(this._config.paramKey, /* @ts-ignore */
|
|
4213
|
+
...(ngDevMode ? [{ debugName: "tlsPaginationQuerySync" }] : /* istanbul ignore next */ []));
|
|
3928
4214
|
constructor() {
|
|
3929
4215
|
super();
|
|
3930
4216
|
effect(() => {
|
|
@@ -3942,10 +4228,10 @@ class PaginationQuerySyncDirective extends QuerySyncDirective {
|
|
|
3942
4228
|
if (!Number.isNaN(page) && page >= 1)
|
|
3943
4229
|
this._pagination.value.set(page);
|
|
3944
4230
|
}
|
|
3945
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3946
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
4231
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PaginationQuerySyncDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4232
|
+
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
4233
|
}
|
|
3948
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PaginationQuerySyncDirective, decorators: [{
|
|
3949
4235
|
type: Directive,
|
|
3950
4236
|
args: [{
|
|
3951
4237
|
selector: 'tls-pagination[tlsPaginationQuerySync]',
|
|
@@ -3968,13 +4254,18 @@ const SKELETON_CONFIG = new InjectionToken('SKELETON_CONFIG', {
|
|
|
3968
4254
|
|
|
3969
4255
|
class Skeleton {
|
|
3970
4256
|
_config = inject(SKELETON_CONFIG);
|
|
3971
|
-
size = input(this._config.size,
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
4257
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
4258
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
4259
|
+
width = input(this._config.width, /* @ts-ignore */
|
|
4260
|
+
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
4261
|
+
height = input(this._config.height, /* @ts-ignore */
|
|
4262
|
+
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
4263
|
+
radius = input(this._config.radius, /* @ts-ignore */
|
|
4264
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
4265
|
+
duration = input(this._config.duration, /* @ts-ignore */
|
|
4266
|
+
...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
4267
|
+
rounded = input(this._config.rounded, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4268
|
+
animate = input(this._config.animate, { ...(ngDevMode ? { debugName: "animate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3978
4269
|
hostClasses = computed(() => {
|
|
3979
4270
|
const className = 'tls-skeleton';
|
|
3980
4271
|
const array = [className];
|
|
@@ -3982,7 +4273,8 @@ class Skeleton {
|
|
|
3982
4273
|
array.push(`${className}--no-animate`);
|
|
3983
4274
|
}
|
|
3984
4275
|
return array;
|
|
3985
|
-
},
|
|
4276
|
+
}, /* @ts-ignore */
|
|
4277
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3986
4278
|
hostStyles = computed(() => {
|
|
3987
4279
|
const size = this.size();
|
|
3988
4280
|
const width = this.width() ?? size;
|
|
@@ -3995,7 +4287,8 @@ class Skeleton {
|
|
|
3995
4287
|
'--tls-skeleton-radius': rounded ? '50%' : `${radius}px`,
|
|
3996
4288
|
'--tls-skeleton-duration': `${this.duration()}ms`,
|
|
3997
4289
|
};
|
|
3998
|
-
},
|
|
4290
|
+
}, /* @ts-ignore */
|
|
4291
|
+
...(ngDevMode ? [{ debugName: "hostStyles" }] : /* istanbul ignore next */ []));
|
|
3999
4292
|
resolveDimension(value) {
|
|
4000
4293
|
if (value === null)
|
|
4001
4294
|
return '100%';
|
|
@@ -4003,10 +4296,10 @@ class Skeleton {
|
|
|
4003
4296
|
return value;
|
|
4004
4297
|
return `${value}px`;
|
|
4005
4298
|
}
|
|
4006
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4007
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
4299
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Skeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4300
|
+
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
4301
|
}
|
|
4009
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Skeleton, decorators: [{
|
|
4010
4303
|
type: Component,
|
|
4011
4304
|
args: [{
|
|
4012
4305
|
selector: 'tls-skeleton',
|
|
@@ -4022,10 +4315,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4022
4315
|
|
|
4023
4316
|
class StepperService {
|
|
4024
4317
|
active = null;
|
|
4025
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4026
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4318
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: StepperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4319
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: StepperService });
|
|
4027
4320
|
}
|
|
4028
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: StepperService, decorators: [{
|
|
4029
4322
|
type: Injectable
|
|
4030
4323
|
}] });
|
|
4031
4324
|
|
|
@@ -4045,15 +4338,23 @@ const STEPPER_CONFIG = new InjectionToken('STEPPER_CONFIG', {
|
|
|
4045
4338
|
class Step {
|
|
4046
4339
|
_config = inject(STEPPER_CONFIG);
|
|
4047
4340
|
_stepperService = inject(StepperService);
|
|
4048
|
-
iconTemplateRef = contentChild('stepIcon',
|
|
4049
|
-
|
|
4341
|
+
iconTemplateRef = contentChild('stepIcon', /* @ts-ignore */
|
|
4342
|
+
...(ngDevMode ? [{ debugName: "iconTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4343
|
+
completedIconTemplateRef = contentChild('stepCompletedIcon', /* @ts-ignore */
|
|
4344
|
+
...(ngDevMode ? [{ debugName: "completedIconTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4050
4345
|
// Inputs
|
|
4051
|
-
value = input.required(
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4346
|
+
value = input.required(/* @ts-ignore */
|
|
4347
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4348
|
+
label = input(/* @ts-ignore */
|
|
4349
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
4350
|
+
description = input(/* @ts-ignore */
|
|
4351
|
+
...(ngDevMode ? [undefined, { debugName: "description" }] : /* istanbul ignore next */ []));
|
|
4352
|
+
color = input(this._config.step.color, /* @ts-ignore */
|
|
4353
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
4354
|
+
disabled = input(false, /* @ts-ignore */
|
|
4355
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4356
|
+
_active = computed(() => this._stepperService.active?.() === this.value(), /* @ts-ignore */
|
|
4357
|
+
...(ngDevMode ? [{ debugName: "_active" }] : /* istanbul ignore next */ []));
|
|
4057
4358
|
hostClasses = computed(() => {
|
|
4058
4359
|
const className = 'tls-step';
|
|
4059
4360
|
const array = [className];
|
|
@@ -4062,11 +4363,12 @@ class Step {
|
|
|
4062
4363
|
if (this.disabled())
|
|
4063
4364
|
array.push(`${className}--disabled`);
|
|
4064
4365
|
return array;
|
|
4065
|
-
},
|
|
4066
|
-
|
|
4067
|
-
static
|
|
4366
|
+
}, /* @ts-ignore */
|
|
4367
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4368
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Step, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4369
|
+
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
4370
|
}
|
|
4069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Step, decorators: [{
|
|
4070
4372
|
type: Component,
|
|
4071
4373
|
args: [{ selector: 'tls-step', imports: [], host: {
|
|
4072
4374
|
'[class]': 'hostClasses()',
|
|
@@ -4079,17 +4381,27 @@ class Stepper {
|
|
|
4079
4381
|
_config = inject(STEPPER_CONFIG);
|
|
4080
4382
|
_stepperService = inject(StepperService);
|
|
4081
4383
|
_directionality = inject(Directionality);
|
|
4082
|
-
steps = contentChildren(Step,
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4384
|
+
steps = contentChildren(Step, /* @ts-ignore */
|
|
4385
|
+
...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
|
|
4386
|
+
completedTemplateRef = contentChild('completedTemplate', /* @ts-ignore */
|
|
4387
|
+
...(ngDevMode ? [{ debugName: "completedTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4388
|
+
completedIconTemplateRef = contentChild('stepCompletedIcon', /* @ts-ignore */
|
|
4389
|
+
...(ngDevMode ? [{ debugName: "completedIconTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4390
|
+
_stepButtons = viewChildren('stepButton', /* @ts-ignore */
|
|
4391
|
+
...(ngDevMode ? [{ debugName: "_stepButtons" }] : /* istanbul ignore next */ []));
|
|
4392
|
+
active = model.required(/* @ts-ignore */
|
|
4393
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
4394
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
4395
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
4396
|
+
completed = input(false, /* @ts-ignore */
|
|
4397
|
+
...(ngDevMode ? [{ debugName: "completed" }] : /* istanbul ignore next */ []));
|
|
4398
|
+
linear = input(this._config.linear, /* @ts-ignore */
|
|
4399
|
+
...(ngDevMode ? [{ debugName: "linear" }] : /* istanbul ignore next */ []));
|
|
4090
4400
|
/** Accessible name for the stepper tablist. */
|
|
4091
|
-
ariaLabel = input(undefined,
|
|
4092
|
-
|
|
4401
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
4402
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4403
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
4404
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
4093
4405
|
stepSelect = output();
|
|
4094
4406
|
hostClasses = computed(() => {
|
|
4095
4407
|
const className = 'tls-stepper';
|
|
@@ -4098,8 +4410,10 @@ class Stepper {
|
|
|
4098
4410
|
if (this.completed())
|
|
4099
4411
|
array.push(`${className}--completed`);
|
|
4100
4412
|
return array;
|
|
4101
|
-
},
|
|
4102
|
-
|
|
4413
|
+
}, /* @ts-ignore */
|
|
4414
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4415
|
+
activeIndex = computed(() => this.steps().findIndex(step => step.value() === this.active()), /* @ts-ignore */
|
|
4416
|
+
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
4103
4417
|
constructor() {
|
|
4104
4418
|
this._stepperService.active = this.active.asReadonly();
|
|
4105
4419
|
}
|
|
@@ -4156,10 +4470,10 @@ class Stepper {
|
|
|
4156
4470
|
}
|
|
4157
4471
|
return null;
|
|
4158
4472
|
}
|
|
4159
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4160
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4473
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Stepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4474
|
+
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
4475
|
}
|
|
4162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4476
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Stepper, decorators: [{
|
|
4163
4477
|
type: Component,
|
|
4164
4478
|
args: [{ selector: 'tls-stepper', imports: [NgTemplateOutlet], host: {
|
|
4165
4479
|
'[class]': 'hostClasses()',
|
|
@@ -4167,16 +4481,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4167
4481
|
}], 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
4482
|
|
|
4169
4483
|
class TableColumn {
|
|
4170
|
-
key = input.required(
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4484
|
+
key = input.required(/* @ts-ignore */
|
|
4485
|
+
...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
4486
|
+
header = input(/* @ts-ignore */
|
|
4487
|
+
...(ngDevMode ? [undefined, { debugName: "header" }] : /* istanbul ignore next */ []));
|
|
4488
|
+
hidden = input(false, { ...(ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4489
|
+
alignment = input(/* @ts-ignore */
|
|
4490
|
+
...(ngDevMode ? [undefined, { debugName: "alignment" }] : /* istanbul ignore next */ []));
|
|
4491
|
+
width = input(/* @ts-ignore */
|
|
4492
|
+
...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
4493
|
+
template = contentChild(TemplateRef, /* @ts-ignore */
|
|
4494
|
+
...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
|
|
4495
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TableColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4496
|
+
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
4497
|
}
|
|
4179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TableColumn, decorators: [{
|
|
4180
4499
|
type: Component,
|
|
4181
4500
|
args: [{
|
|
4182
4501
|
selector: 'tls-table-column',
|
|
@@ -4196,15 +4515,21 @@ const TABLE_CONFIG = new InjectionToken('TABLE_CONFIG', {
|
|
|
4196
4515
|
|
|
4197
4516
|
class Table {
|
|
4198
4517
|
_config = inject(TABLE_CONFIG);
|
|
4199
|
-
data = input.required(
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4518
|
+
data = input.required(/* @ts-ignore */
|
|
4519
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
4520
|
+
columnDefinitions = input([], /* @ts-ignore */
|
|
4521
|
+
...(ngDevMode ? [{ debugName: "columnDefinitions" }] : /* istanbul ignore next */ []));
|
|
4522
|
+
hideHeader = input(this._config.hideHeader, { ...(ngDevMode ? { debugName: "hideHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4523
|
+
striped = input(this._config.striped, { ...(ngDevMode ? { debugName: "striped" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4524
|
+
trackBy = input(/* @ts-ignore */
|
|
4525
|
+
...(ngDevMode ? [undefined, { debugName: "trackBy" }] : /* istanbul ignore next */ []));
|
|
4204
4526
|
/** Accessible name for the table, forwarded to the inner `<table>` element. */
|
|
4205
|
-
ariaLabel = input(undefined,
|
|
4206
|
-
|
|
4207
|
-
|
|
4527
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
4528
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4529
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
4530
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
4531
|
+
tableColumns = contentChildren(TableColumn, /* @ts-ignore */
|
|
4532
|
+
...(ngDevMode ? [{ debugName: "tableColumns" }] : /* istanbul ignore next */ []));
|
|
4208
4533
|
// Merges columnDefinitions input and tls-table-column content children into a single list.
|
|
4209
4534
|
// Input drives order; content children override matching keys and append unmatched columns at the end.
|
|
4210
4535
|
// Map keyed by content column key → O(1) lookup when applying overrides to each input column.
|
|
@@ -4225,12 +4550,14 @@ class Table {
|
|
|
4225
4550
|
}));
|
|
4226
4551
|
const extras = fromContent.filter(definition => !inputKeys.has(definition.key));
|
|
4227
4552
|
return [...merged, ...extras];
|
|
4228
|
-
},
|
|
4553
|
+
}, /* @ts-ignore */
|
|
4554
|
+
...(ngDevMode ? [{ debugName: "effectiveColumnDefinitions" }] : /* istanbul ignore next */ []));
|
|
4229
4555
|
columns = computed(() => this.effectiveColumnDefinitions().reduce((filtered, columnDefinition) => {
|
|
4230
4556
|
if (!columnDefinition.hidden)
|
|
4231
4557
|
filtered.push(columnDefinition.key);
|
|
4232
4558
|
return filtered;
|
|
4233
|
-
}, []),
|
|
4559
|
+
}, []), /* @ts-ignore */
|
|
4560
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
4234
4561
|
resolvedTrackBy = computed(() => {
|
|
4235
4562
|
const trackBy = this.trackBy();
|
|
4236
4563
|
if (trackBy === undefined)
|
|
@@ -4238,7 +4565,8 @@ class Table {
|
|
|
4238
4565
|
if (typeof trackBy === 'string')
|
|
4239
4566
|
return (_, row) => row[trackBy];
|
|
4240
4567
|
return trackBy;
|
|
4241
|
-
},
|
|
4568
|
+
}, /* @ts-ignore */
|
|
4569
|
+
...(ngDevMode ? [{ debugName: "resolvedTrackBy" }] : /* istanbul ignore next */ []));
|
|
4242
4570
|
classes = computed(() => {
|
|
4243
4571
|
const className = 'tls-table';
|
|
4244
4572
|
const array = [className];
|
|
@@ -4247,7 +4575,8 @@ class Table {
|
|
|
4247
4575
|
if (this.striped())
|
|
4248
4576
|
array.push(`${className}--striped`);
|
|
4249
4577
|
return array;
|
|
4250
|
-
},
|
|
4578
|
+
}, /* @ts-ignore */
|
|
4579
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
4251
4580
|
dataSource = {
|
|
4252
4581
|
connect: () => {
|
|
4253
4582
|
return toObservable(this.data);
|
|
@@ -4276,10 +4605,10 @@ class Table {
|
|
|
4276
4605
|
definition.template = template;
|
|
4277
4606
|
return definition;
|
|
4278
4607
|
}
|
|
4279
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4280
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4608
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Table, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4609
|
+
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
4610
|
}
|
|
4282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Table, decorators: [{
|
|
4283
4612
|
type: Component,
|
|
4284
4613
|
args: [{ selector: 'tls-table', imports: [
|
|
4285
4614
|
CdkTable,
|
|
@@ -4298,18 +4627,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4298
4627
|
|
|
4299
4628
|
class TabsService {
|
|
4300
4629
|
selected = null;
|
|
4301
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4302
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4630
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4631
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsService });
|
|
4303
4632
|
}
|
|
4304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsService, decorators: [{
|
|
4305
4634
|
type: Injectable
|
|
4306
4635
|
}] });
|
|
4307
4636
|
|
|
4308
4637
|
class Tab {
|
|
4309
4638
|
_tabsService = inject(TabsService);
|
|
4310
4639
|
// Inputs
|
|
4311
|
-
value = input.required(
|
|
4312
|
-
|
|
4640
|
+
value = input.required(/* @ts-ignore */
|
|
4641
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4642
|
+
label = input.required(/* @ts-ignore */
|
|
4643
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
4313
4644
|
_active = computed(() => {
|
|
4314
4645
|
if (!this._tabsService.selected)
|
|
4315
4646
|
return false;
|
|
@@ -4318,18 +4649,20 @@ class Tab {
|
|
|
4318
4649
|
return this.value() === selected;
|
|
4319
4650
|
else
|
|
4320
4651
|
return false;
|
|
4321
|
-
},
|
|
4652
|
+
}, /* @ts-ignore */
|
|
4653
|
+
...(ngDevMode ? [{ debugName: "_active" }] : /* istanbul ignore next */ []));
|
|
4322
4654
|
hostClasses = computed(() => {
|
|
4323
4655
|
const className = 'tls-tab';
|
|
4324
4656
|
const array = [className];
|
|
4325
4657
|
if (this._active())
|
|
4326
4658
|
array.push(`${className}--active`);
|
|
4327
4659
|
return array;
|
|
4328
|
-
},
|
|
4329
|
-
|
|
4330
|
-
static
|
|
4660
|
+
}, /* @ts-ignore */
|
|
4661
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4662
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tab, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4663
|
+
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
4664
|
}
|
|
4332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tab, decorators: [{
|
|
4333
4666
|
type: Component,
|
|
4334
4667
|
args: [{ selector: 'tls-tab', imports: [], host: {
|
|
4335
4668
|
'[class]': 'hostClasses()',
|
|
@@ -4347,25 +4680,31 @@ const TABS_CONFIG = new InjectionToken('TABS_CONFIG', {
|
|
|
4347
4680
|
class Tabs {
|
|
4348
4681
|
_config = inject(TABS_CONFIG);
|
|
4349
4682
|
_tabsService = inject(TabsService);
|
|
4350
|
-
tabs = contentChildren(Tab,
|
|
4351
|
-
|
|
4352
|
-
|
|
4683
|
+
tabs = contentChildren(Tab, /* @ts-ignore */
|
|
4684
|
+
...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
|
|
4685
|
+
variant = input(this._config.variant, /* @ts-ignore */
|
|
4686
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
4687
|
+
selected = model(null, /* @ts-ignore */
|
|
4688
|
+
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
4353
4689
|
/** Accessible name for the tablist. */
|
|
4354
|
-
ariaLabel = input(undefined,
|
|
4355
|
-
|
|
4690
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
4691
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4692
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
4693
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
4356
4694
|
hostClasses = computed(() => {
|
|
4357
4695
|
const className = 'tls-tabs';
|
|
4358
4696
|
const array = [className];
|
|
4359
4697
|
array.push(`${className}--${this.variant()}`);
|
|
4360
4698
|
return array;
|
|
4361
|
-
},
|
|
4699
|
+
}, /* @ts-ignore */
|
|
4700
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4362
4701
|
constructor() {
|
|
4363
4702
|
this._tabsService.selected = this.selected.asReadonly();
|
|
4364
4703
|
}
|
|
4365
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4366
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4704
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4705
|
+
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
4706
|
}
|
|
4368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4707
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tabs, decorators: [{
|
|
4369
4708
|
type: Component,
|
|
4370
4709
|
args: [{ selector: 'tls-tabs', imports: [], host: {
|
|
4371
4710
|
'[class]': 'hostClasses()',
|
|
@@ -4384,7 +4723,8 @@ class TabsQuerySyncDirective extends QuerySyncDirective {
|
|
|
4384
4723
|
_tabs = inject(Tabs);
|
|
4385
4724
|
_config = inject(TABS_QUERY_SYNC_CONFIG);
|
|
4386
4725
|
// Inputs
|
|
4387
|
-
tlsTabsQuerySync = input(this._config.paramKey,
|
|
4726
|
+
tlsTabsQuerySync = input(this._config.paramKey, /* @ts-ignore */
|
|
4727
|
+
...(ngDevMode ? [{ debugName: "tlsTabsQuerySync" }] : /* istanbul ignore next */ []));
|
|
4388
4728
|
constructor() {
|
|
4389
4729
|
super();
|
|
4390
4730
|
effect(() => {
|
|
@@ -4401,10 +4741,10 @@ class TabsQuerySyncDirective extends QuerySyncDirective {
|
|
|
4401
4741
|
if (value !== null)
|
|
4402
4742
|
this._tabs.selected.set(value);
|
|
4403
4743
|
}
|
|
4404
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4405
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
4744
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsQuerySyncDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4745
|
+
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
4746
|
}
|
|
4407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsQuerySyncDirective, decorators: [{
|
|
4408
4748
|
type: Directive,
|
|
4409
4749
|
args: [{
|
|
4410
4750
|
selector: 'tls-tabs[tlsTabsQuerySync]',
|
|
@@ -4414,23 +4754,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4414
4754
|
class Tooltip {
|
|
4415
4755
|
static _counter = 0;
|
|
4416
4756
|
id = `tls-tooltip-${++Tooltip._counter}`;
|
|
4417
|
-
content = model.required(
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4757
|
+
content = model.required(/* @ts-ignore */
|
|
4758
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
4759
|
+
templateData = model(null, /* @ts-ignore */
|
|
4760
|
+
...(ngDevMode ? [{ debugName: "templateData" }] : /* istanbul ignore next */ []));
|
|
4761
|
+
color = model.required(/* @ts-ignore */
|
|
4762
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
4763
|
+
isString = computed(() => typeof this.content() === 'string', /* @ts-ignore */
|
|
4764
|
+
...(ngDevMode ? [{ debugName: "isString" }] : /* istanbul ignore next */ []));
|
|
4421
4765
|
templateRef = computed(() => {
|
|
4422
4766
|
if (this.isString())
|
|
4423
4767
|
return null;
|
|
4424
4768
|
return this.content();
|
|
4425
|
-
},
|
|
4769
|
+
}, /* @ts-ignore */
|
|
4770
|
+
...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
|
|
4426
4771
|
hostClasses = computed(() => {
|
|
4427
4772
|
const className = 'tls-tooltip';
|
|
4428
4773
|
const array = [className];
|
|
4429
4774
|
array.push(`${className}--${this.color()}`);
|
|
4430
4775
|
return array;
|
|
4431
|
-
},
|
|
4432
|
-
|
|
4433
|
-
static
|
|
4776
|
+
}, /* @ts-ignore */
|
|
4777
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4778
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tooltip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4779
|
+
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
4780
|
@if (isString()) {
|
|
4435
4781
|
{{ content() }}
|
|
4436
4782
|
} @else {
|
|
@@ -4441,7 +4787,7 @@ class Tooltip {
|
|
|
4441
4787
|
}
|
|
4442
4788
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
4443
4789
|
}
|
|
4444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tooltip, decorators: [{
|
|
4445
4791
|
type: Component,
|
|
4446
4792
|
args: [{
|
|
4447
4793
|
selector: 'tls-tooltip',
|
|
@@ -4534,10 +4880,10 @@ class TooltipService {
|
|
|
4534
4880
|
paneElement.addEventListener('animationend', finalize);
|
|
4535
4881
|
const timeoutId = window.setTimeout(finalize, LEAVE_ANIMATION_FALLBACK_MS);
|
|
4536
4882
|
}
|
|
4537
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4538
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4883
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4884
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipService });
|
|
4539
4885
|
}
|
|
4540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4886
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipService, decorators: [{
|
|
4541
4887
|
type: Injectable
|
|
4542
4888
|
}] });
|
|
4543
4889
|
|
|
@@ -4558,21 +4904,30 @@ class TooltipDirective {
|
|
|
4558
4904
|
_elementRef = inject(ElementRef);
|
|
4559
4905
|
_renderer = inject(Renderer2);
|
|
4560
4906
|
_config = inject(TOOLTIP_CONFIG);
|
|
4561
|
-
content = input('Hello', { ...(ngDevMode ? { debugName: "content" } : {}), alias: 'tlsTooltip' });
|
|
4562
|
-
data = input(null,
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4907
|
+
content = input('Hello', { ...(ngDevMode ? { debugName: "content" } : /* istanbul ignore next */ {}), alias: 'tlsTooltip' });
|
|
4908
|
+
data = input(null, /* @ts-ignore */
|
|
4909
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
4910
|
+
tooltipDisabled = input(false, /* @ts-ignore */
|
|
4911
|
+
...(ngDevMode ? [{ debugName: "tooltipDisabled" }] : /* istanbul ignore next */ []));
|
|
4912
|
+
tooltipOrigin = input(this._config.origin, /* @ts-ignore */
|
|
4913
|
+
...(ngDevMode ? [{ debugName: "tooltipOrigin" }] : /* istanbul ignore next */ []));
|
|
4914
|
+
tooltipPositions = input(this._config.positions, /* @ts-ignore */
|
|
4915
|
+
...(ngDevMode ? [{ debugName: "tooltipPositions" }] : /* istanbul ignore next */ []));
|
|
4916
|
+
tooltipPosition = input(this._config.position, /* @ts-ignore */
|
|
4917
|
+
...(ngDevMode ? [{ debugName: "tooltipPosition" }] : /* istanbul ignore next */ []));
|
|
4918
|
+
tooltipOffset = input(this._config.offset, /* @ts-ignore */
|
|
4919
|
+
...(ngDevMode ? [{ debugName: "tooltipOffset" }] : /* istanbul ignore next */ []));
|
|
4920
|
+
tooltipColor = input(this._config.color, /* @ts-ignore */
|
|
4921
|
+
...(ngDevMode ? [{ debugName: "tooltipColor" }] : /* istanbul ignore next */ []));
|
|
4922
|
+
_visible = signal(false, /* @ts-ignore */
|
|
4923
|
+
...(ngDevMode ? [{ debugName: "_visible" }] : /* istanbul ignore next */ []));
|
|
4570
4924
|
_positions = computed(() => {
|
|
4571
4925
|
const positions = this.tooltipPositions();
|
|
4572
4926
|
if (positions)
|
|
4573
4927
|
return positions;
|
|
4574
4928
|
return buildOverlayPositions(this.tooltipPosition(), this.tooltipOffset());
|
|
4575
|
-
},
|
|
4929
|
+
}, /* @ts-ignore */
|
|
4930
|
+
...(ngDevMode ? [{ debugName: "_positions" }] : /* istanbul ignore next */ []));
|
|
4576
4931
|
// Protected methods
|
|
4577
4932
|
onMouseEnter(event) {
|
|
4578
4933
|
this._show(event);
|
|
@@ -4619,10 +4974,10 @@ class TooltipDirective {
|
|
|
4619
4974
|
this._tooltipService.dispose();
|
|
4620
4975
|
this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');
|
|
4621
4976
|
}
|
|
4622
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4623
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
4977
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4978
|
+
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
4979
|
}
|
|
4625
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
4626
4981
|
type: Directive,
|
|
4627
4982
|
args: [{
|
|
4628
4983
|
selector: '[tlsTooltip]',
|