@tekus/design-system 5.30.0 → 5.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/tekus-design-system-components-card-list.mjs +1 -1
- package/fesm2022/tekus-design-system-components-card-list.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-card.mjs +16 -4
- package/fesm2022/tekus-design-system-components-card.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-color-picker.mjs +1028 -0
- package/fesm2022/tekus-design-system-components-color-picker.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-date-picker.mjs +269 -204
- package/fesm2022/tekus-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-icon.mjs +119 -7
- package/fesm2022/tekus-design-system-components-icon.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-select.mjs +1 -1
- package/fesm2022/tekus-design-system-components-select.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-stepper.mjs +115 -0
- package/fesm2022/tekus-design-system-components-stepper.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-table.mjs +40 -6
- package/fesm2022/tekus-design-system-components-table.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-time-ago.mjs +154 -0
- package/fesm2022/tekus-design-system-components-time-ago.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-time-picker.mjs +443 -0
- package/fesm2022/tekus-design-system-components-time-picker.mjs.map +1 -0
- package/fesm2022/tekus-design-system-core-types.mjs +23 -0
- package/fesm2022/tekus-design-system-core-types.mjs.map +1 -1
- package/fesm2022/tekus-design-system-core.mjs +23 -0
- package/fesm2022/tekus-design-system-core.mjs.map +1 -1
- package/fesm2022/tekus-design-system-utils-wcag-contrast.mjs +97 -0
- package/fesm2022/tekus-design-system-utils-wcag-contrast.mjs.map +1 -0
- package/package.json +21 -1
- package/types/tekus-design-system-components-card.d.ts +9 -1
- package/types/tekus-design-system-components-color-picker.d.ts +356 -0
- package/types/tekus-design-system-components-date-picker.d.ts +191 -141
- package/types/tekus-design-system-components-icon.d.ts +10 -1
- package/types/tekus-design-system-components-stepper.d.ts +117 -0
- package/types/tekus-design-system-components-table.d.ts +28 -1
- package/types/tekus-design-system-components-time-ago.d.ts +53 -0
- package/types/tekus-design-system-components-time-picker.d.ts +203 -0
- package/types/tekus-design-system-utils-wcag-contrast.d.ts +55 -0
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, input, model, output, signal, computed, viewChild, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { switchMap } from 'rxjs';
|
|
5
|
+
import * as i1 from '@angular/forms';
|
|
6
|
+
import { NgControl, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i2 from 'primeng/datepicker';
|
|
8
|
+
import { DatePickerModule } from 'primeng/datepicker';
|
|
9
|
+
import * as i3 from 'primeng/floatlabel';
|
|
10
|
+
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
11
|
+
import { InputMask } from 'primeng/inputmask';
|
|
12
|
+
import { IconComponent } from '@tekus/design-system/components/icon';
|
|
13
|
+
|
|
14
|
+
let timePickerUid = 0;
|
|
15
|
+
class TimePickerComponent {
|
|
16
|
+
constructor() {
|
|
17
|
+
/** @internal */
|
|
18
|
+
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
19
|
+
/** @internal */
|
|
20
|
+
this.destroyRef = inject(DestroyRef);
|
|
21
|
+
/**
|
|
22
|
+
* @description
|
|
23
|
+
* Marks the field as required. When `true`, the component returns a
|
|
24
|
+
* `{ required: true }` validation error when no time is selected.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <tk-time-picker [required]="true" errorMessage="Time is required" />
|
|
30
|
+
*/
|
|
31
|
+
this.required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
32
|
+
/**
|
|
33
|
+
* @description
|
|
34
|
+
* Controls how the user enters the time.
|
|
35
|
+
* - `true` — direct keyboard input via a masked field; the clock icon opens
|
|
36
|
+
* a spinner overlay for visual selection. Only 24-hour format is supported
|
|
37
|
+
* in this mode.
|
|
38
|
+
* - `false` — spinners only; keyboard input is disabled.
|
|
39
|
+
*
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
this.editableInput = input(false, ...(ngDevMode ? [{ debugName: "editableInput" }] : /* istanbul ignore next */ []));
|
|
43
|
+
/**
|
|
44
|
+
* @description
|
|
45
|
+
* Time display format used both for the masked input and for PrimeNG's spinner.
|
|
46
|
+
* Supported tokens: `HH` (24-h hours), `hh` (12-h hours), `mm` (minutes),
|
|
47
|
+
* `ss` (seconds).
|
|
48
|
+
*
|
|
49
|
+
* @default 'HH:mm'
|
|
50
|
+
*/
|
|
51
|
+
this.timeFormat = input('HH:mm', ...(ngDevMode ? [{ debugName: "timeFormat" }] : /* istanbul ignore next */ []));
|
|
52
|
+
/**
|
|
53
|
+
* @description
|
|
54
|
+
* Hour format for the time spinner.
|
|
55
|
+
* - `'24'` — 0–23 hours.
|
|
56
|
+
* - `'12'` — 1–12 hours with AM/PM toggle. Ignored when `editableInput=true`.
|
|
57
|
+
*
|
|
58
|
+
* @default '24'
|
|
59
|
+
*/
|
|
60
|
+
this.hourFormat = input('24', ...(ngDevMode ? [{ debugName: "hourFormat" }] : /* istanbul ignore next */ []));
|
|
61
|
+
/** @description Hour increment/decrement step for the spinner. @default 1 */
|
|
62
|
+
this.stepHour = input(1, ...(ngDevMode ? [{ debugName: "stepHour" }] : /* istanbul ignore next */ []));
|
|
63
|
+
/** @description Minute increment/decrement step for the spinner. @default 1 */
|
|
64
|
+
this.stepMinute = input(1, ...(ngDevMode ? [{ debugName: "stepMinute" }] : /* istanbul ignore next */ []));
|
|
65
|
+
/** @description Second increment/decrement step for the spinner. @default 1 */
|
|
66
|
+
this.stepSecond = input(1, ...(ngDevMode ? [{ debugName: "stepSecond" }] : /* istanbul ignore next */ []));
|
|
67
|
+
/**
|
|
68
|
+
* @description Whether to show the seconds segment. Only active when `hourFormat="24"`.
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
this.showSeconds = input(false, ...(ngDevMode ? [{ debugName: "showSeconds" }] : /* istanbul ignore next */ []));
|
|
72
|
+
/** @description Shows a clear (×) button that resets the value to `null`. @default true */
|
|
73
|
+
this.showClear = input(true, ...(ngDevMode ? [{ debugName: "showClear" }] : /* istanbul ignore next */ []));
|
|
74
|
+
/**
|
|
75
|
+
* @description
|
|
76
|
+
* Shows the clock icon inside the input field.
|
|
77
|
+
* When `false`, the overlay can only be opened by clicking the input itself.
|
|
78
|
+
*
|
|
79
|
+
* @default true
|
|
80
|
+
*/
|
|
81
|
+
this.showIcon = input(true, ...(ngDevMode ? [{ debugName: "showIcon" }] : /* istanbul ignore next */ []));
|
|
82
|
+
/** @description Disables the component. @default false */
|
|
83
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
84
|
+
/**
|
|
85
|
+
* @description
|
|
86
|
+
* Earliest selectable time. Enforced through Angular form validation only —
|
|
87
|
+
* the field value is never cleared when the limit is reached.
|
|
88
|
+
*
|
|
89
|
+
* @default null
|
|
90
|
+
*/
|
|
91
|
+
this.minDate = input(null, ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
92
|
+
/**
|
|
93
|
+
* @description Latest selectable time. Same validation-only semantics as `minDate`.
|
|
94
|
+
* @default null
|
|
95
|
+
*/
|
|
96
|
+
this.maxDate = input(null, ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
97
|
+
/** @description Floating label text shown above the input field. @default 'Select a time' */
|
|
98
|
+
this.labelText = input('Select a time', ...(ngDevMode ? [{ debugName: "labelText" }] : /* istanbul ignore next */ []));
|
|
99
|
+
/**
|
|
100
|
+
* @description
|
|
101
|
+
* Validation error message rendered beneath the field when the bound control
|
|
102
|
+
* is invalid and the field has been dirtied or touched.
|
|
103
|
+
*
|
|
104
|
+
* @default null
|
|
105
|
+
*/
|
|
106
|
+
this.errorMessage = input(null, ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
107
|
+
/**
|
|
108
|
+
* @description
|
|
109
|
+
* Optional external `FormControl` to bind when not using the standard
|
|
110
|
+
* `formControl` / `formControlName` / `ngModel` directives.
|
|
111
|
+
*/
|
|
112
|
+
this.control = input(undefined, ...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
113
|
+
/**
|
|
114
|
+
* @description
|
|
115
|
+
* Target element or CSS selector to which the overlay panel is appended.
|
|
116
|
+
* @default 'body'
|
|
117
|
+
*/
|
|
118
|
+
this.appendTo = input('body', ...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
119
|
+
/**
|
|
120
|
+
* @description
|
|
121
|
+
* Two-way signal binding for the selected time value (`Date | null`).
|
|
122
|
+
*/
|
|
123
|
+
this.modelValue = model(null, ...(ngDevMode ? [{ debugName: "modelValue" }] : /* istanbul ignore next */ []));
|
|
124
|
+
/** @description Emits the selected value whenever a complete time is chosen. */
|
|
125
|
+
this.handleSelect = output();
|
|
126
|
+
/** @description Emits when the user clears the field via the clear button. */
|
|
127
|
+
this.handleClear = output();
|
|
128
|
+
/** @internal */
|
|
129
|
+
this.disabledStatus = signal(false, ...(ngDevMode ? [{ debugName: "disabledStatus" }] : /* istanbul ignore next */ []));
|
|
130
|
+
/** @internal */
|
|
131
|
+
this.effectiveDisabled = computed(() => this.disabled() || this.disabledStatus(), ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
|
|
132
|
+
/** @internal */
|
|
133
|
+
this.maskInput = viewChild('maskInputRef', ...(ngDevMode ? [{ debugName: "maskInput" }] : /* istanbul ignore next */ []));
|
|
134
|
+
/**
|
|
135
|
+
* @description
|
|
136
|
+
* Forces `'24'` when `editableInput=true` because the InputMask digit-only
|
|
137
|
+
* pattern cannot represent AM/PM tokens.
|
|
138
|
+
*/
|
|
139
|
+
this.effectiveHourFormat = computed(() => this.editableInput() ? '24' : this.hourFormat(), ...(ngDevMode ? [{ debugName: "effectiveHourFormat" }] : /* istanbul ignore next */ []));
|
|
140
|
+
/**
|
|
141
|
+
* @description
|
|
142
|
+
* PrimeNG InputMask pattern derived from `timeFormat` by replacing all
|
|
143
|
+
* time-letter placeholders with the digit wildcard `'9'`.
|
|
144
|
+
*/
|
|
145
|
+
this.effectiveTimeMask = computed(() => this.timeFormat()
|
|
146
|
+
.replaceAll('H', '9')
|
|
147
|
+
.replaceAll('h', '9')
|
|
148
|
+
.replaceAll('m', '9')
|
|
149
|
+
.replaceAll('s', '9'), ...(ngDevMode ? [{ debugName: "effectiveTimeMask" }] : /* istanbul ignore next */ []));
|
|
150
|
+
/**
|
|
151
|
+
* @description
|
|
152
|
+
* Formats the current `modelValue` as a time string matching `timeFormat`,
|
|
153
|
+
* bound to the InputMask via `[ngModel]`.
|
|
154
|
+
*/
|
|
155
|
+
this.maskedTimeValue = computed(() => {
|
|
156
|
+
const v = this.modelValue();
|
|
157
|
+
if (!v || !(v instanceof Date))
|
|
158
|
+
return '';
|
|
159
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
160
|
+
const fmt = this.timeFormat().replaceAll('h', 'H');
|
|
161
|
+
return fmt
|
|
162
|
+
.replace('HH', pad(v.getHours()))
|
|
163
|
+
.replace('H', String(v.getHours()))
|
|
164
|
+
.replace('mm', pad(v.getMinutes()))
|
|
165
|
+
.replace('m', String(v.getMinutes()))
|
|
166
|
+
.replace('ss', pad(v.getSeconds()))
|
|
167
|
+
.replace('s', String(v.getSeconds()));
|
|
168
|
+
}, ...(ngDevMode ? [{ debugName: "maskedTimeValue" }] : /* istanbul ignore next */ []));
|
|
169
|
+
/** @internal */
|
|
170
|
+
this.effectiveShowSeconds = computed(() => this.effectiveHourFormat() === '24' && this.showSeconds(), ...(ngDevMode ? [{ debugName: "effectiveShowSeconds" }] : /* istanbul ignore next */ []));
|
|
171
|
+
/** @internal */
|
|
172
|
+
this.internalControl = new FormControl(null);
|
|
173
|
+
/** @internal */
|
|
174
|
+
this.effectiveControl = computed(() => this.ngControl?.control ?? this.control() ?? this.internalControl, ...(ngDevMode ? [{ debugName: "effectiveControl" }] : /* istanbul ignore next */ []));
|
|
175
|
+
/** @internal */
|
|
176
|
+
this.uid = `tk-timepicker-${++timePickerUid}`;
|
|
177
|
+
/** @internal */
|
|
178
|
+
this.partialMask = signal(false, ...(ngDevMode ? [{ debugName: "partialMask" }] : /* istanbul ignore next */ []));
|
|
179
|
+
/** @internal */
|
|
180
|
+
this.invalidTimeInput = signal(false, ...(ngDevMode ? [{ debugName: "invalidTimeInput" }] : /* istanbul ignore next */ []));
|
|
181
|
+
/** @internal */ this.onChange = () => { };
|
|
182
|
+
/** @internal */ this.onTouched = () => { };
|
|
183
|
+
/** @internal */ this.onValidatorChange = () => { };
|
|
184
|
+
/** @internal */ this.lastValue = null;
|
|
185
|
+
/** @internal */ this.boundValidate = this.validate.bind(this);
|
|
186
|
+
if (this.ngControl) {
|
|
187
|
+
this.ngControl.valueAccessor = this;
|
|
188
|
+
}
|
|
189
|
+
toObservable(this.effectiveControl)
|
|
190
|
+
.pipe(switchMap(ctrl => {
|
|
191
|
+
this.disabledStatus.set(ctrl.disabled);
|
|
192
|
+
return ctrl.statusChanges;
|
|
193
|
+
}), takeUntilDestroyed())
|
|
194
|
+
.subscribe(() => {
|
|
195
|
+
this.disabledStatus.set(this.effectiveControl().disabled);
|
|
196
|
+
});
|
|
197
|
+
effect(() => {
|
|
198
|
+
this.required();
|
|
199
|
+
this.minDate();
|
|
200
|
+
this.maxDate();
|
|
201
|
+
this.partialMask();
|
|
202
|
+
this.invalidTimeInput();
|
|
203
|
+
untracked(() => {
|
|
204
|
+
this.onValidatorChange();
|
|
205
|
+
this.effectiveControl().updateValueAndValidity({ emitEvent: false });
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
effect(() => {
|
|
209
|
+
const val = this.maskedTimeValue();
|
|
210
|
+
const mask = this.maskInput();
|
|
211
|
+
if (!mask)
|
|
212
|
+
return;
|
|
213
|
+
untracked(() => {
|
|
214
|
+
if (mask.value !== val) {
|
|
215
|
+
mask.writeValue(val);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/** @inheritdoc */
|
|
221
|
+
ngOnInit() {
|
|
222
|
+
const control = this.effectiveControl();
|
|
223
|
+
this.disabledStatus.set(control.disabled);
|
|
224
|
+
const initialValue = control.value;
|
|
225
|
+
if (initialValue !== null && initialValue !== undefined) {
|
|
226
|
+
this.modelValue.set(initialValue);
|
|
227
|
+
this.lastValue = initialValue;
|
|
228
|
+
}
|
|
229
|
+
if (!this.ngControl) {
|
|
230
|
+
const currentModel = this.modelValue();
|
|
231
|
+
if (currentModel !== null && currentModel !== undefined) {
|
|
232
|
+
this.handleSelect.emit(currentModel);
|
|
233
|
+
this.onChange(currentModel);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
control.addValidators(this.boundValidate);
|
|
237
|
+
control.updateValueAndValidity({ emitEvent: false });
|
|
238
|
+
this.destroyRef.onDestroy(() => {
|
|
239
|
+
control.removeValidators(this.boundValidate);
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
/** @inheritdoc */
|
|
243
|
+
writeValue(value) {
|
|
244
|
+
this.modelValue.set(value);
|
|
245
|
+
this.lastValue = value;
|
|
246
|
+
if (value === null) {
|
|
247
|
+
this.partialMask.set(false);
|
|
248
|
+
this.invalidTimeInput.set(false);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
/** @inheritdoc */
|
|
252
|
+
registerOnChange(fn) {
|
|
253
|
+
this.onChange = fn;
|
|
254
|
+
}
|
|
255
|
+
/** @inheritdoc */
|
|
256
|
+
registerOnTouched(fn) {
|
|
257
|
+
this.onTouched = fn;
|
|
258
|
+
}
|
|
259
|
+
/** @inheritdoc */
|
|
260
|
+
registerOnValidatorChange(fn) {
|
|
261
|
+
this.onValidatorChange = fn;
|
|
262
|
+
}
|
|
263
|
+
/** @inheritdoc */
|
|
264
|
+
validate() {
|
|
265
|
+
if (this.editableInput() && this.partialMask()) {
|
|
266
|
+
return { incompleteMask: true };
|
|
267
|
+
}
|
|
268
|
+
if (this.editableInput() && this.invalidTimeInput()) {
|
|
269
|
+
return { invalidTime: true };
|
|
270
|
+
}
|
|
271
|
+
const value = this.modelValue();
|
|
272
|
+
if (!value)
|
|
273
|
+
return this.required() ? { required: true } : null;
|
|
274
|
+
let min = this.minDate();
|
|
275
|
+
let max = this.maxDate();
|
|
276
|
+
const epoch = new Date(1970, 0, 1);
|
|
277
|
+
const valCompare = new Date(epoch);
|
|
278
|
+
valCompare.setHours(value.getHours(), value.getMinutes(), value.getSeconds(), 0);
|
|
279
|
+
if (min) {
|
|
280
|
+
const t = new Date(epoch);
|
|
281
|
+
t.setHours(min.getHours(), min.getMinutes(), min.getSeconds(), 0);
|
|
282
|
+
min = t;
|
|
283
|
+
}
|
|
284
|
+
if (max) {
|
|
285
|
+
const t = new Date(epoch);
|
|
286
|
+
t.setHours(max.getHours(), max.getMinutes(), max.getSeconds(), 0);
|
|
287
|
+
max = t;
|
|
288
|
+
}
|
|
289
|
+
if (min && valCompare < min)
|
|
290
|
+
return { minDate: { min: this.minDate(), actual: value } };
|
|
291
|
+
if (max && valCompare > max)
|
|
292
|
+
return { maxDate: { max: this.maxDate(), actual: value } };
|
|
293
|
+
return null;
|
|
294
|
+
}
|
|
295
|
+
/** @inheritdoc */
|
|
296
|
+
setDisabledState(isDisabled) {
|
|
297
|
+
this.disabledStatus.set(isDisabled);
|
|
298
|
+
const control = this.effectiveControl();
|
|
299
|
+
if (isDisabled && control.enabled) {
|
|
300
|
+
control.disable({ emitEvent: false });
|
|
301
|
+
}
|
|
302
|
+
else if (!isDisabled && control.disabled) {
|
|
303
|
+
control.enable({ emitEvent: false });
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
/** @description Marks the control as touched when the user leaves the field. */
|
|
307
|
+
onBlur() {
|
|
308
|
+
this.onTouched();
|
|
309
|
+
this.effectiveControl().markAsTouched();
|
|
310
|
+
}
|
|
311
|
+
/** @description Programmatically clears the selected value, resetting it to `null`. */
|
|
312
|
+
clear() {
|
|
313
|
+
this.modelValue.set(null);
|
|
314
|
+
this.lastValue = null;
|
|
315
|
+
this.partialMask.set(false);
|
|
316
|
+
this.invalidTimeInput.set(false);
|
|
317
|
+
this.onChange(null);
|
|
318
|
+
this.effectiveControl().setValue(null, { emitEvent: false });
|
|
319
|
+
this.handleClear.emit();
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* @description
|
|
323
|
+
* Parses the string emitted by InputMask and propagates the resulting Date.
|
|
324
|
+
*/
|
|
325
|
+
onMaskedTimeChange(timeStr) {
|
|
326
|
+
if (!timeStr || timeStr.includes('_')) {
|
|
327
|
+
const hasDigits = /\d/.test(timeStr ?? '');
|
|
328
|
+
this.partialMask.set(hasDigits);
|
|
329
|
+
this.invalidTimeInput.set(false);
|
|
330
|
+
if (!hasDigits && this.modelValue() !== null) {
|
|
331
|
+
this.lastValue = null;
|
|
332
|
+
this.modelValue.set(null);
|
|
333
|
+
this.onChange(null);
|
|
334
|
+
this.effectiveControl().setValue(null, { emitEvent: false });
|
|
335
|
+
this.handleClear.emit();
|
|
336
|
+
}
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
this.partialMask.set(false);
|
|
340
|
+
const parts = timeStr.split(':');
|
|
341
|
+
if (parts.length < 2)
|
|
342
|
+
return;
|
|
343
|
+
const hours = Number.parseInt(parts[0], 10);
|
|
344
|
+
const minutes = Number.parseInt(parts[1], 10);
|
|
345
|
+
const seconds = parts.length > 2 ? Number.parseInt(parts[2], 10) : 0;
|
|
346
|
+
if (Number.isNaN(hours) || Number.isNaN(minutes) || Number.isNaN(seconds))
|
|
347
|
+
return;
|
|
348
|
+
if (hours >= 24 || minutes >= 60 || seconds >= 60) {
|
|
349
|
+
this.invalidTimeInput.set(true);
|
|
350
|
+
this.onChange(null);
|
|
351
|
+
this.effectiveControl().setValue(null, { emitEvent: false });
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
this.invalidTimeInput.set(false);
|
|
355
|
+
const base = this.minDate() || new Date();
|
|
356
|
+
const result = new Date(base);
|
|
357
|
+
result.setHours(hours, minutes, seconds, 0);
|
|
358
|
+
this.lastValue = result;
|
|
359
|
+
this.modelValue.set(result);
|
|
360
|
+
this.onChange(result);
|
|
361
|
+
this.effectiveControl().setValue(result, { emitEvent: false });
|
|
362
|
+
this.effectiveControl().markAsDirty();
|
|
363
|
+
this.handleSelect.emit(result);
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* @description
|
|
367
|
+
* Handles value changes from the hidden spinner overlay in mask+overlay mode.
|
|
368
|
+
*/
|
|
369
|
+
onOverlayTimeChange(value) {
|
|
370
|
+
if (value === null) {
|
|
371
|
+
this.clear();
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
if (!(value instanceof Date))
|
|
375
|
+
return;
|
|
376
|
+
let finalValue = value;
|
|
377
|
+
if (this.lastValue instanceof Date && finalValue.toDateString() === this.lastValue.toDateString()) {
|
|
378
|
+
finalValue = this.applyTimeCascading(this.lastValue, finalValue);
|
|
379
|
+
}
|
|
380
|
+
const base = this.minDate() || new Date();
|
|
381
|
+
const result = new Date(finalValue);
|
|
382
|
+
result.setFullYear(base.getFullYear(), base.getMonth(), base.getDate());
|
|
383
|
+
this.lastValue = result;
|
|
384
|
+
this.modelValue.set(result);
|
|
385
|
+
this.onChange(result);
|
|
386
|
+
this.effectiveControl().setValue(result, { emitEvent: false });
|
|
387
|
+
this.effectiveControl().markAsDirty();
|
|
388
|
+
this.handleSelect.emit(result);
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* @description
|
|
392
|
+
* Fires when the spinner overlay opens. If no value is selected, auto-commits
|
|
393
|
+
* the time that PrimeNG displays by default (minDate or current time).
|
|
394
|
+
*/
|
|
395
|
+
onOverlayShow() {
|
|
396
|
+
if (this.modelValue() !== null)
|
|
397
|
+
return;
|
|
398
|
+
const base = this.minDate() ?? new Date();
|
|
399
|
+
const initial = new Date(base);
|
|
400
|
+
initial.setSeconds(0, 0);
|
|
401
|
+
this.onOverlayTimeChange(initial);
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* @description
|
|
405
|
+
* Adjusts hours or minutes when the spinner rolls over a unit boundary.
|
|
406
|
+
*/
|
|
407
|
+
applyTimeCascading(prev, curr) {
|
|
408
|
+
const updated = new Date(curr);
|
|
409
|
+
if (prev.getSeconds() === 59 && updated.getSeconds() === 0) {
|
|
410
|
+
updated.setMinutes(updated.getMinutes() + 1);
|
|
411
|
+
}
|
|
412
|
+
else if (prev.getSeconds() === 0 && updated.getSeconds() === 59) {
|
|
413
|
+
updated.setMinutes(updated.getMinutes() - 1);
|
|
414
|
+
}
|
|
415
|
+
if (prev.getMinutes() === 59 && updated.getMinutes() === 0) {
|
|
416
|
+
updated.setHours(updated.getHours() + 1);
|
|
417
|
+
}
|
|
418
|
+
else if (prev.getMinutes() === 0 && updated.getMinutes() === 59) {
|
|
419
|
+
updated.setHours(updated.getHours() - 1);
|
|
420
|
+
}
|
|
421
|
+
return updated;
|
|
422
|
+
}
|
|
423
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: TimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
424
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: TimePickerComponent, isStandalone: true, selector: "tk-time-picker", inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, editableInput: { classPropertyName: "editableInput", publicName: "editableInput", isSignal: true, isRequired: false, transformFunction: null }, timeFormat: { classPropertyName: "timeFormat", publicName: "timeFormat", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, stepHour: { classPropertyName: "stepHour", publicName: "stepHour", isSignal: true, isRequired: false, transformFunction: null }, stepMinute: { classPropertyName: "stepMinute", publicName: "stepMinute", isSignal: true, isRequired: false, transformFunction: null }, stepSecond: { classPropertyName: "stepSecond", publicName: "stepSecond", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, labelText: { classPropertyName: "labelText", publicName: "labelText", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, modelValue: { classPropertyName: "modelValue", publicName: "modelValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modelValue: "modelValueChange", handleSelect: "handleSelect", handleClear: "handleClear" }, viewQueries: [{ propertyName: "maskInput", first: true, predicate: ["maskInputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"timepicker-container\">\n <p-floatlabel>\n @if (!editableInput()) {\n <!-- Spinners only \u2014 no direct typing -->\n <p-datepicker\n [inputId]=\"uid\"\n iconDisplay=\"input\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onOverlayTimeChange($event)\"\n (onShow)=\"onOverlayShow()\"\n (onBlur)=\"onBlur()\"\n [timeOnly]=\"true\"\n [readonlyInput]=\"true\"\n [showIcon]=\"showIcon()\"\n [showClear]=\"showClear()\"\n [disabled]=\"effectiveDisabled()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\"\n [appendTo]=\"appendTo()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <tk-icon\n icon=\"clock\"\n tabindex=\"0\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </tk-icon>\n </ng-template>\n </p-datepicker>\n } @else {\n <!-- Direct typing (mask) + clock icon opens spinner overlay -->\n <p-inputmask\n #maskInputRef\n [inputId]=\"uid\"\n [mask]=\"effectiveTimeMask()\"\n [ngModel]=\"maskedTimeValue()\"\n (ngModelChange)=\"onMaskedTimeChange($event)\"\n (onBlur)=\"onBlur()\"\n [disabled]=\"effectiveDisabled()\">\n </p-inputmask>\n @if (showClear() && modelValue() && !effectiveDisabled()) {\n <tk-icon class=\"tk-mask-clear\" icon=\"xmark\" tabindex=\"0\" (click)=\"clear()\" (keydown.enter)=\"clear()\" (keydown.space)=\"clear()\" />\n }\n @if (showIcon()) {\n <span class=\"tk-time-overlay-anchor\" aria-hidden=\"true\">\n <p-datepicker\n iconDisplay=\"input\"\n [showIcon]=\"true\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onOverlayTimeChange($event)\"\n (onShow)=\"onOverlayShow()\"\n [timeOnly]=\"true\"\n [hourFormat]=\"effectiveHourFormat()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\"\n [appendTo]=\"appendTo()\"\n [disabled]=\"effectiveDisabled()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <tk-icon\n icon=\"clock\"\n tabindex=\"0\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </tk-icon>\n </ng-template>\n </p-datepicker>\n </span>\n }\n }\n <label [for]=\"uid\">{{ labelText() }}</label>\n </p-floatlabel>\n @if (errorMessage() && effectiveControl().invalid && (effectiveControl().dirty || effectiveControl().touched)) {\n <small class=\"p-error\">{{ errorMessage() }}</small>\n }\n</div>\n", styles: [":host ::ng-deep .p-datepicker{width:100%}:host ::ng-deep .p-datepicker-input{border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;background-color:transparent;padding:var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-25, 4px)!important}:host ::ng-deep .p-datepicker-input:focus{border-color:var(--tk-color-primary-default, #16006f)}:host ::ng-deep .p-inputmask{width:100%;border:1px solid transparent!important;border-radius:var(--tk-border-radius-sm, 4px);background-color:transparent;box-shadow:none!important;border-color:transparent!important;transition:border-color .2s}:host ::ng-deep .p-inputmask:hover{border-color:transparent!important}:host ::ng-deep .p-inputmask:focus{outline:none;box-shadow:none!important;border-color:transparent!important}:host ::ng-deep .p-inputmask .p-inputtext{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;padding-block:var(--tk-spacing-base-75, 12px);padding-inline-start:var(--tk-spacing-base-25, 4px)}:host ::ng-deep .p-inputmask.p-disabled{opacity:1;cursor:not-allowed;background-color:transparent!important}:host ::ng-deep .p-inputmask.p-disabled .p-inputtext{background-color:var(--tk-color-base-surface-200, #e4e4e4);color:var(--tk-color-base-surface-500, #8a8a8b);border-bottom-color:var(--tk-color-base-surface-300, #d2d2d2);opacity:1;cursor:not-allowed}:host ::ng-deep .p-datepicker.p-disabled{opacity:1!important}:host ::ng-deep .p-datepicker.p-disabled .p-datepicker-input{background-color:var(--tk-color-base-surface-200, #e4e4e4)!important;color:var(--tk-color-base-surface-500, #8a8a8b);border-bottom-color:var(--tk-color-base-surface-300, #d2d2d2);cursor:not-allowed}:host ::ng-deep .p-datepicker.p-disabled .p-datepicker-input-icon-container{color:var(--tk-color-base-surface-500, #8a8a8b);pointer-events:none}:host ::ng-deep .p-floatlabel:has(.p-disabled) label{color:var(--tk-color-base-surface-500, #8a8a8b)!important}:host ::ng-deep .tk-mask-clear{position:absolute;top:calc(50% + .1rem);transform:translateY(-50%);inset-inline-end:var(--tk-spacing-base-75, .75rem);color:var(--tk-surface-700, #424243);cursor:pointer;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:calc(var(--tk-spacing-base-100, 1rem) + .2rem);height:calc(var(--tk-spacing-base-100, 1rem) + .2rem)}:host ::ng-deep .tk-mask-clear fa-icon svg{width:calc(var(--tk-spacing-base-100, 1rem) + .2rem);height:calc(var(--tk-spacing-base-100, 1rem) + .2rem)}:host ::ng-deep .p-floatlabel:has(.tk-time-overlay-anchor):not(:has(.tk-mask-clear)) .p-inputmask .p-inputtext{padding-inline-end:calc(var(--tk-spacing-base-75, .75rem) * 2 + var(--tk-spacing-base-100, 1rem))!important}:host ::ng-deep .p-floatlabel:has(.tk-mask-clear):not(:has(.tk-time-overlay-anchor)) .p-inputmask .p-inputtext{padding-inline-end:calc(var(--tk-spacing-base-75, .75rem) * 2 + var(--tk-spacing-base-100, 1rem))!important}:host ::ng-deep .p-floatlabel:has(.tk-mask-clear):has(.tk-time-overlay-anchor) .p-inputmask .p-inputtext{padding-inline-end:calc(var(--tk-spacing-base-75, .75rem) * 3 + var(--tk-spacing-base-100, 1rem) * 2)!important}:host ::ng-deep .p-floatlabel:has(.tk-time-overlay-anchor) .tk-mask-clear{inset-inline-end:calc(var(--tk-spacing-base-75, .75rem) * 2 + var(--tk-spacing-base-100, 1rem))}:host ::ng-deep .tk-time-overlay-anchor{position:absolute;inset:0;pointer-events:none}:host ::ng-deep .tk-time-overlay-anchor p-datepicker{display:block;width:100%;height:100%}:host ::ng-deep .tk-time-overlay-anchor .p-datepicker{width:100%;height:100%;position:relative}:host ::ng-deep .tk-time-overlay-anchor .p-datepicker .p-datepicker-input{position:absolute;inset:0;opacity:0!important;pointer-events:none!important;border:none!important;padding:0!important;width:100%!important;height:100%!important}:host ::ng-deep .tk-time-overlay-anchor .p-datepicker .p-datepicker-input-icon-container{pointer-events:all;cursor:pointer}:host ::ng-deep .p-floatlabel{position:relative}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input:focus) label,:host ::ng-deep .p-floatlabel:has(.p-inputmask.p-filled) label,:host ::ng-deep .p-floatlabel:has(.p-inputmask:focus) label{color:var(--tk-primary-500, #16006f)}:host ::ng-deep .p-floatlabel label{color:var(--tk-surface-700, #8a8a8b);font-family:var(--tk-font-family, Poppins, sans-serif);font-size:var(--tk-font-size-2xs, 1rem);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem)}:host ::ng-deep .p-datepicker-panel{min-width:0!important;max-width:300px!important;width:100%!important}:host ::ng-deep .p-inputtext:disabled{background:var(--tk-color-base-surface-200, #e4e4e4)!important}.timepicker-container{margin-top:var(--tk-spacing-base-200, 2rem)}small.p-error{display:block;margin-top:var(--tk-spacing-base-25, .25rem);color:var(--tk-color-base-red-700, #cf2604);font-size:var(--tk-font-size-xs, .75rem)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: InputMask, selector: "p-inputmask, p-inputMask, p-input-mask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "readonly", "unmask", "characterPattern", "autofocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "component", type: IconComponent, selector: "tk-icon", inputs: ["icon", "styleIcon", "color", "size", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
425
|
+
}
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
427
|
+
type: Component,
|
|
428
|
+
args: [{ selector: 'tk-time-picker', imports: [
|
|
429
|
+
FormsModule,
|
|
430
|
+
ReactiveFormsModule,
|
|
431
|
+
DatePickerModule,
|
|
432
|
+
FloatLabelModule,
|
|
433
|
+
InputMask,
|
|
434
|
+
IconComponent,
|
|
435
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"timepicker-container\">\n <p-floatlabel>\n @if (!editableInput()) {\n <!-- Spinners only \u2014 no direct typing -->\n <p-datepicker\n [inputId]=\"uid\"\n iconDisplay=\"input\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onOverlayTimeChange($event)\"\n (onShow)=\"onOverlayShow()\"\n (onBlur)=\"onBlur()\"\n [timeOnly]=\"true\"\n [readonlyInput]=\"true\"\n [showIcon]=\"showIcon()\"\n [showClear]=\"showClear()\"\n [disabled]=\"effectiveDisabled()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\"\n [appendTo]=\"appendTo()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <tk-icon\n icon=\"clock\"\n tabindex=\"0\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </tk-icon>\n </ng-template>\n </p-datepicker>\n } @else {\n <!-- Direct typing (mask) + clock icon opens spinner overlay -->\n <p-inputmask\n #maskInputRef\n [inputId]=\"uid\"\n [mask]=\"effectiveTimeMask()\"\n [ngModel]=\"maskedTimeValue()\"\n (ngModelChange)=\"onMaskedTimeChange($event)\"\n (onBlur)=\"onBlur()\"\n [disabled]=\"effectiveDisabled()\">\n </p-inputmask>\n @if (showClear() && modelValue() && !effectiveDisabled()) {\n <tk-icon class=\"tk-mask-clear\" icon=\"xmark\" tabindex=\"0\" (click)=\"clear()\" (keydown.enter)=\"clear()\" (keydown.space)=\"clear()\" />\n }\n @if (showIcon()) {\n <span class=\"tk-time-overlay-anchor\" aria-hidden=\"true\">\n <p-datepicker\n iconDisplay=\"input\"\n [showIcon]=\"true\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onOverlayTimeChange($event)\"\n (onShow)=\"onOverlayShow()\"\n [timeOnly]=\"true\"\n [hourFormat]=\"effectiveHourFormat()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\"\n [appendTo]=\"appendTo()\"\n [disabled]=\"effectiveDisabled()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <tk-icon\n icon=\"clock\"\n tabindex=\"0\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </tk-icon>\n </ng-template>\n </p-datepicker>\n </span>\n }\n }\n <label [for]=\"uid\">{{ labelText() }}</label>\n </p-floatlabel>\n @if (errorMessage() && effectiveControl().invalid && (effectiveControl().dirty || effectiveControl().touched)) {\n <small class=\"p-error\">{{ errorMessage() }}</small>\n }\n</div>\n", styles: [":host ::ng-deep .p-datepicker{width:100%}:host ::ng-deep .p-datepicker-input{border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;background-color:transparent;padding:var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-25, 4px)!important}:host ::ng-deep .p-datepicker-input:focus{border-color:var(--tk-color-primary-default, #16006f)}:host ::ng-deep .p-inputmask{width:100%;border:1px solid transparent!important;border-radius:var(--tk-border-radius-sm, 4px);background-color:transparent;box-shadow:none!important;border-color:transparent!important;transition:border-color .2s}:host ::ng-deep .p-inputmask:hover{border-color:transparent!important}:host ::ng-deep .p-inputmask:focus{outline:none;box-shadow:none!important;border-color:transparent!important}:host ::ng-deep .p-inputmask .p-inputtext{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;padding-block:var(--tk-spacing-base-75, 12px);padding-inline-start:var(--tk-spacing-base-25, 4px)}:host ::ng-deep .p-inputmask.p-disabled{opacity:1;cursor:not-allowed;background-color:transparent!important}:host ::ng-deep .p-inputmask.p-disabled .p-inputtext{background-color:var(--tk-color-base-surface-200, #e4e4e4);color:var(--tk-color-base-surface-500, #8a8a8b);border-bottom-color:var(--tk-color-base-surface-300, #d2d2d2);opacity:1;cursor:not-allowed}:host ::ng-deep .p-datepicker.p-disabled{opacity:1!important}:host ::ng-deep .p-datepicker.p-disabled .p-datepicker-input{background-color:var(--tk-color-base-surface-200, #e4e4e4)!important;color:var(--tk-color-base-surface-500, #8a8a8b);border-bottom-color:var(--tk-color-base-surface-300, #d2d2d2);cursor:not-allowed}:host ::ng-deep .p-datepicker.p-disabled .p-datepicker-input-icon-container{color:var(--tk-color-base-surface-500, #8a8a8b);pointer-events:none}:host ::ng-deep .p-floatlabel:has(.p-disabled) label{color:var(--tk-color-base-surface-500, #8a8a8b)!important}:host ::ng-deep .tk-mask-clear{position:absolute;top:calc(50% + .1rem);transform:translateY(-50%);inset-inline-end:var(--tk-spacing-base-75, .75rem);color:var(--tk-surface-700, #424243);cursor:pointer;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:calc(var(--tk-spacing-base-100, 1rem) + .2rem);height:calc(var(--tk-spacing-base-100, 1rem) + .2rem)}:host ::ng-deep .tk-mask-clear fa-icon svg{width:calc(var(--tk-spacing-base-100, 1rem) + .2rem);height:calc(var(--tk-spacing-base-100, 1rem) + .2rem)}:host ::ng-deep .p-floatlabel:has(.tk-time-overlay-anchor):not(:has(.tk-mask-clear)) .p-inputmask .p-inputtext{padding-inline-end:calc(var(--tk-spacing-base-75, .75rem) * 2 + var(--tk-spacing-base-100, 1rem))!important}:host ::ng-deep .p-floatlabel:has(.tk-mask-clear):not(:has(.tk-time-overlay-anchor)) .p-inputmask .p-inputtext{padding-inline-end:calc(var(--tk-spacing-base-75, .75rem) * 2 + var(--tk-spacing-base-100, 1rem))!important}:host ::ng-deep .p-floatlabel:has(.tk-mask-clear):has(.tk-time-overlay-anchor) .p-inputmask .p-inputtext{padding-inline-end:calc(var(--tk-spacing-base-75, .75rem) * 3 + var(--tk-spacing-base-100, 1rem) * 2)!important}:host ::ng-deep .p-floatlabel:has(.tk-time-overlay-anchor) .tk-mask-clear{inset-inline-end:calc(var(--tk-spacing-base-75, .75rem) * 2 + var(--tk-spacing-base-100, 1rem))}:host ::ng-deep .tk-time-overlay-anchor{position:absolute;inset:0;pointer-events:none}:host ::ng-deep .tk-time-overlay-anchor p-datepicker{display:block;width:100%;height:100%}:host ::ng-deep .tk-time-overlay-anchor .p-datepicker{width:100%;height:100%;position:relative}:host ::ng-deep .tk-time-overlay-anchor .p-datepicker .p-datepicker-input{position:absolute;inset:0;opacity:0!important;pointer-events:none!important;border:none!important;padding:0!important;width:100%!important;height:100%!important}:host ::ng-deep .tk-time-overlay-anchor .p-datepicker .p-datepicker-input-icon-container{pointer-events:all;cursor:pointer}:host ::ng-deep .p-floatlabel{position:relative}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input:focus) label,:host ::ng-deep .p-floatlabel:has(.p-inputmask.p-filled) label,:host ::ng-deep .p-floatlabel:has(.p-inputmask:focus) label{color:var(--tk-primary-500, #16006f)}:host ::ng-deep .p-floatlabel label{color:var(--tk-surface-700, #8a8a8b);font-family:var(--tk-font-family, Poppins, sans-serif);font-size:var(--tk-font-size-2xs, 1rem);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem)}:host ::ng-deep .p-datepicker-panel{min-width:0!important;max-width:300px!important;width:100%!important}:host ::ng-deep .p-inputtext:disabled{background:var(--tk-color-base-surface-200, #e4e4e4)!important}.timepicker-container{margin-top:var(--tk-spacing-base-200, 2rem)}small.p-error{display:block;margin-top:var(--tk-spacing-base-25, .25rem);color:var(--tk-color-base-red-700, #cf2604);font-size:var(--tk-font-size-xs, .75rem)}\n"] }]
|
|
436
|
+
}], ctorParameters: () => [], propDecorators: { required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], editableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "editableInput", required: false }] }], timeFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeFormat", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], stepHour: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepHour", required: false }] }], stepMinute: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepMinute", required: false }] }], stepSecond: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepSecond", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], labelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelText", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], modelValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "modelValue", required: false }] }, { type: i0.Output, args: ["modelValueChange"] }], handleSelect: [{ type: i0.Output, args: ["handleSelect"] }], handleClear: [{ type: i0.Output, args: ["handleClear"] }], maskInput: [{ type: i0.ViewChild, args: ['maskInputRef', { isSignal: true }] }] } });
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Generated bundle index. Do not edit.
|
|
440
|
+
*/
|
|
441
|
+
|
|
442
|
+
export { TimePickerComponent };
|
|
443
|
+
//# sourceMappingURL=tekus-design-system-components-time-picker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-time-picker.mjs","sources":["../../../projects/design-system/components/time-picker/src/time-picker.component.ts","../../../projects/design-system/components/time-picker/src/time-picker.component.html","../../../projects/design-system/components/time-picker/tekus-design-system-components-time-picker.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n OnInit,\n inject,\n input,\n model,\n signal,\n computed,\n output,\n effect,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { switchMap } from 'rxjs';\nimport {\n FormsModule,\n ReactiveFormsModule,\n FormControl,\n ControlValueAccessor,\n NgControl,\n Validator,\n ValidationErrors,\n} from '@angular/forms';\n\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { InputMask } from 'primeng/inputmask';\nimport { IconComponent } from '@tekus/design-system/components/icon';\n\nlet timePickerUid = 0;\n\n@Component({\n selector: 'tk-time-picker',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n DatePickerModule,\n FloatLabelModule,\n InputMask,\n IconComponent,\n ],\n templateUrl: './time-picker.component.html',\n styleUrl: './time-picker.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TimePickerComponent implements OnInit, ControlValueAccessor, Validator {\n /** @internal */\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n /** @internal */\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n toObservable(this.effectiveControl)\n .pipe(\n switchMap(ctrl => {\n this.disabledStatus.set(ctrl.disabled);\n return ctrl.statusChanges;\n }),\n takeUntilDestroyed()\n )\n .subscribe(() => {\n this.disabledStatus.set(this.effectiveControl().disabled);\n });\n\n effect(() => {\n this.required();\n this.minDate();\n this.maxDate();\n this.partialMask();\n this.invalidTimeInput();\n untracked(() => {\n this.onValidatorChange();\n this.effectiveControl().updateValueAndValidity({ emitEvent: false });\n });\n });\n\n effect(() => {\n const val = this.maskedTimeValue();\n const mask = this.maskInput();\n if (!mask) return;\n untracked(() => {\n if (mask.value !== val) {\n mask.writeValue(val);\n }\n });\n });\n }\n\n /**\n * @description\n * Marks the field as required. When `true`, the component returns a\n * `{ required: true }` validation error when no time is selected.\n *\n * @default false\n *\n * @example\n * <tk-time-picker [required]=\"true\" errorMessage=\"Time is required\" />\n */\n required = input<boolean>(false);\n\n /**\n * @description\n * Controls how the user enters the time.\n * - `true` — direct keyboard input via a masked field; the clock icon opens\n * a spinner overlay for visual selection. Only 24-hour format is supported\n * in this mode.\n * - `false` — spinners only; keyboard input is disabled.\n *\n * @default false\n */\n editableInput = input<boolean>(false);\n\n /**\n * @description\n * Time display format used both for the masked input and for PrimeNG's spinner.\n * Supported tokens: `HH` (24-h hours), `hh` (12-h hours), `mm` (minutes),\n * `ss` (seconds).\n *\n * @default 'HH:mm'\n */\n timeFormat = input<string>('HH:mm');\n\n /**\n * @description\n * Hour format for the time spinner.\n * - `'24'` — 0–23 hours.\n * - `'12'` — 1–12 hours with AM/PM toggle. Ignored when `editableInput=true`.\n *\n * @default '24'\n */\n hourFormat = input<'12' | '24'>('24');\n\n /** @description Hour increment/decrement step for the spinner. @default 1 */\n stepHour = input<number>(1);\n\n /** @description Minute increment/decrement step for the spinner. @default 1 */\n stepMinute = input<number>(1);\n\n /** @description Second increment/decrement step for the spinner. @default 1 */\n stepSecond = input<number>(1);\n\n /**\n * @description Whether to show the seconds segment. Only active when `hourFormat=\"24\"`.\n * @default false\n */\n showSeconds = input<boolean>(false);\n\n /** @description Shows a clear (×) button that resets the value to `null`. @default true */\n showClear = input<boolean>(true);\n\n /**\n * @description\n * Shows the clock icon inside the input field.\n * When `false`, the overlay can only be opened by clicking the input itself.\n *\n * @default true\n */\n showIcon = input<boolean>(true);\n\n /** @description Disables the component. @default false */\n disabled = input<boolean>(false);\n\n /**\n * @description\n * Earliest selectable time. Enforced through Angular form validation only —\n * the field value is never cleared when the limit is reached.\n *\n * @default null\n */\n minDate = input<Date | null>(null);\n\n /**\n * @description Latest selectable time. Same validation-only semantics as `minDate`.\n * @default null\n */\n maxDate = input<Date | null>(null);\n\n /** @description Floating label text shown above the input field. @default 'Select a time' */\n labelText = input<string>('Select a time');\n\n /**\n * @description\n * Validation error message rendered beneath the field when the bound control\n * is invalid and the field has been dirtied or touched.\n *\n * @default null\n */\n errorMessage = input<string | null>(null);\n\n /**\n * @description\n * Optional external `FormControl` to bind when not using the standard\n * `formControl` / `formControlName` / `ngModel` directives.\n */\n control = input<FormControl | undefined>(undefined);\n\n /**\n * @description\n * Target element or CSS selector to which the overlay panel is appended.\n * @default 'body'\n */\n appendTo = input<string | HTMLElement | null | undefined>('body');\n\n /**\n * @description\n * Two-way signal binding for the selected time value (`Date | null`).\n */\n modelValue = model<Date | null>(null);\n\n /** @description Emits the selected value whenever a complete time is chosen. */\n handleSelect = output<Date>();\n\n /** @description Emits when the user clears the field via the clear button. */\n handleClear = output<void>();\n\n /** @internal */\n disabledStatus = signal<boolean>(false);\n\n /** @internal */\n effectiveDisabled = computed(() => this.disabled() || this.disabledStatus());\n\n /** @internal */\n readonly maskInput = viewChild<InputMask>('maskInputRef');\n\n /**\n * @description\n * Forces `'24'` when `editableInput=true` because the InputMask digit-only\n * pattern cannot represent AM/PM tokens.\n */\n effectiveHourFormat = computed<'12' | '24'>(() =>\n this.editableInput() ? '24' : this.hourFormat()\n );\n\n /**\n * @description\n * PrimeNG InputMask pattern derived from `timeFormat` by replacing all\n * time-letter placeholders with the digit wildcard `'9'`.\n */\n effectiveTimeMask = computed(() =>\n this.timeFormat()\n .replaceAll('H', '9')\n .replaceAll('h', '9')\n .replaceAll('m', '9')\n .replaceAll('s', '9')\n );\n\n /**\n * @description\n * Formats the current `modelValue` as a time string matching `timeFormat`,\n * bound to the InputMask via `[ngModel]`.\n */\n maskedTimeValue = computed(() => {\n const v = this.modelValue();\n if (!v || !(v instanceof Date)) return '';\n const pad = (n: number) => String(n).padStart(2, '0');\n const fmt = this.timeFormat().replaceAll('h', 'H');\n return fmt\n .replace('HH', pad(v.getHours()))\n .replace('H', String(v.getHours()))\n .replace('mm', pad(v.getMinutes()))\n .replace('m', String(v.getMinutes()))\n .replace('ss', pad(v.getSeconds()))\n .replace('s', String(v.getSeconds()));\n });\n\n /** @internal */\n effectiveShowSeconds = computed(\n () => this.effectiveHourFormat() === '24' && this.showSeconds()\n );\n\n /** @internal */\n private readonly internalControl = new FormControl<Date | null>(null);\n\n /** @internal */\n readonly effectiveControl = computed<FormControl>(\n () => (this.ngControl?.control as FormControl) ?? this.control() ?? this.internalControl\n );\n\n /** @internal */\n readonly uid = `tk-timepicker-${++timePickerUid}`;\n\n /** @internal */\n private readonly partialMask = signal(false);\n\n /** @internal */\n private readonly invalidTimeInput = signal(false);\n\n /** @internal */ onChange: (value: Date | null) => void = () => {};\n /** @internal */ onTouched: () => void = () => {};\n /** @internal */ onValidatorChange: () => void = () => {};\n /** @internal */ private lastValue: Date | null = null;\n /** @internal */ private readonly boundValidate = this.validate.bind(this);\n\n /** @inheritdoc */\n ngOnInit(): void {\n const control = this.effectiveControl();\n\n this.disabledStatus.set(control.disabled);\n\n const initialValue = control.value;\n if (initialValue !== null && initialValue !== undefined) {\n this.modelValue.set(initialValue);\n this.lastValue = initialValue;\n }\n\n if (!this.ngControl) {\n const currentModel = this.modelValue();\n if (currentModel !== null && currentModel !== undefined) {\n this.handleSelect.emit(currentModel);\n this.onChange(currentModel);\n }\n }\n\n control.addValidators(this.boundValidate);\n control.updateValueAndValidity({ emitEvent: false });\n this.destroyRef.onDestroy(() => {\n control.removeValidators(this.boundValidate);\n });\n }\n\n /** @inheritdoc */\n writeValue(value: Date | null): void {\n this.modelValue.set(value);\n this.lastValue = value;\n if (value === null) {\n this.partialMask.set(false);\n this.invalidTimeInput.set(false);\n }\n }\n\n /** @inheritdoc */\n registerOnChange(fn: (value: Date | null) => void): void {\n this.onChange = fn;\n }\n\n /** @inheritdoc */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @inheritdoc */\n registerOnValidatorChange(fn: () => void): void {\n this.onValidatorChange = fn;\n }\n\n /** @inheritdoc */\n validate(): ValidationErrors | null {\n if (this.editableInput() && this.partialMask()) {\n return { incompleteMask: true };\n }\n if (this.editableInput() && this.invalidTimeInput()) {\n return { invalidTime: true };\n }\n\n const value = this.modelValue();\n if (!value) return this.required() ? { required: true } : null;\n\n let min = this.minDate();\n let max = this.maxDate();\n\n const epoch = new Date(1970, 0, 1);\n const valCompare = new Date(epoch);\n valCompare.setHours(value.getHours(), value.getMinutes(), value.getSeconds(), 0);\n if (min) {\n const t = new Date(epoch);\n t.setHours(min.getHours(), min.getMinutes(), min.getSeconds(), 0);\n min = t;\n }\n if (max) {\n const t = new Date(epoch);\n t.setHours(max.getHours(), max.getMinutes(), max.getSeconds(), 0);\n max = t;\n }\n\n if (min && valCompare < min) return { minDate: { min: this.minDate(), actual: value } };\n if (max && valCompare > max) return { maxDate: { max: this.maxDate(), actual: value } };\n\n return null;\n }\n\n /** @inheritdoc */\n setDisabledState(isDisabled: boolean): void {\n this.disabledStatus.set(isDisabled);\n const control = this.effectiveControl();\n if (isDisabled && control.enabled) {\n control.disable({ emitEvent: false });\n } else if (!isDisabled && control.disabled) {\n control.enable({ emitEvent: false });\n }\n }\n\n /** @description Marks the control as touched when the user leaves the field. */\n onBlur(): void {\n this.onTouched();\n this.effectiveControl().markAsTouched();\n }\n\n /** @description Programmatically clears the selected value, resetting it to `null`. */\n clear(): void {\n this.modelValue.set(null);\n this.lastValue = null;\n this.partialMask.set(false);\n this.invalidTimeInput.set(false);\n this.onChange(null);\n this.effectiveControl().setValue(null, { emitEvent: false });\n this.handleClear.emit();\n }\n\n /**\n * @description\n * Parses the string emitted by InputMask and propagates the resulting Date.\n */\n onMaskedTimeChange(timeStr: string): void {\n if (!timeStr || timeStr.includes('_')) {\n const hasDigits = /\\d/.test(timeStr ?? '');\n this.partialMask.set(hasDigits);\n this.invalidTimeInput.set(false);\n if (!hasDigits && this.modelValue() !== null) {\n this.lastValue = null;\n this.modelValue.set(null);\n this.onChange(null);\n this.effectiveControl().setValue(null, { emitEvent: false });\n this.handleClear.emit();\n }\n return;\n }\n this.partialMask.set(false);\n const parts = timeStr.split(':');\n if (parts.length < 2) return;\n const hours = Number.parseInt(parts[0], 10);\n const minutes = Number.parseInt(parts[1], 10);\n const seconds = parts.length > 2 ? Number.parseInt(parts[2], 10) : 0;\n if (Number.isNaN(hours) || Number.isNaN(minutes) || Number.isNaN(seconds)) return;\n if (hours >= 24 || minutes >= 60 || seconds >= 60) {\n this.invalidTimeInput.set(true);\n this.onChange(null);\n this.effectiveControl().setValue(null, { emitEvent: false });\n return;\n }\n this.invalidTimeInput.set(false);\n const base = this.minDate() || new Date();\n const result = new Date(base);\n result.setHours(hours, minutes, seconds, 0);\n this.lastValue = result;\n this.modelValue.set(result);\n this.onChange(result);\n this.effectiveControl().setValue(result, { emitEvent: false });\n this.effectiveControl().markAsDirty();\n this.handleSelect.emit(result);\n }\n\n /**\n * @description\n * Handles value changes from the hidden spinner overlay in mask+overlay mode.\n */\n onOverlayTimeChange(value: Date | null): void {\n if (value === null) {\n this.clear();\n return;\n }\n if (!(value instanceof Date)) return;\n let finalValue = value;\n if (this.lastValue instanceof Date && finalValue.toDateString() === this.lastValue.toDateString()) {\n finalValue = this.applyTimeCascading(this.lastValue, finalValue);\n }\n const base = this.minDate() || new Date();\n const result = new Date(finalValue);\n result.setFullYear(base.getFullYear(), base.getMonth(), base.getDate());\n this.lastValue = result;\n this.modelValue.set(result);\n this.onChange(result);\n this.effectiveControl().setValue(result, { emitEvent: false });\n this.effectiveControl().markAsDirty();\n this.handleSelect.emit(result);\n }\n\n /**\n * @description\n * Fires when the spinner overlay opens. If no value is selected, auto-commits\n * the time that PrimeNG displays by default (minDate or current time).\n */\n onOverlayShow(): void {\n if (this.modelValue() !== null) return;\n const base = this.minDate() ?? new Date();\n const initial = new Date(base);\n initial.setSeconds(0, 0);\n this.onOverlayTimeChange(initial);\n }\n\n /**\n * @description\n * Adjusts hours or minutes when the spinner rolls over a unit boundary.\n */\n private applyTimeCascading(prev: Date, curr: Date): Date {\n const updated = new Date(curr);\n\n if (prev.getSeconds() === 59 && updated.getSeconds() === 0) {\n updated.setMinutes(updated.getMinutes() + 1);\n } else if (prev.getSeconds() === 0 && updated.getSeconds() === 59) {\n updated.setMinutes(updated.getMinutes() - 1);\n }\n\n if (prev.getMinutes() === 59 && updated.getMinutes() === 0) {\n updated.setHours(updated.getHours() + 1);\n } else if (prev.getMinutes() === 0 && updated.getMinutes() === 59) {\n updated.setHours(updated.getHours() - 1);\n }\n\n return updated;\n }\n}\n","<div class=\"timepicker-container\">\n <p-floatlabel>\n @if (!editableInput()) {\n <!-- Spinners only — no direct typing -->\n <p-datepicker\n [inputId]=\"uid\"\n iconDisplay=\"input\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onOverlayTimeChange($event)\"\n (onShow)=\"onOverlayShow()\"\n (onBlur)=\"onBlur()\"\n [timeOnly]=\"true\"\n [readonlyInput]=\"true\"\n [showIcon]=\"showIcon()\"\n [showClear]=\"showClear()\"\n [disabled]=\"effectiveDisabled()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\"\n [appendTo]=\"appendTo()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <tk-icon\n icon=\"clock\"\n tabindex=\"0\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </tk-icon>\n </ng-template>\n </p-datepicker>\n } @else {\n <!-- Direct typing (mask) + clock icon opens spinner overlay -->\n <p-inputmask\n #maskInputRef\n [inputId]=\"uid\"\n [mask]=\"effectiveTimeMask()\"\n [ngModel]=\"maskedTimeValue()\"\n (ngModelChange)=\"onMaskedTimeChange($event)\"\n (onBlur)=\"onBlur()\"\n [disabled]=\"effectiveDisabled()\">\n </p-inputmask>\n @if (showClear() && modelValue() && !effectiveDisabled()) {\n <tk-icon class=\"tk-mask-clear\" icon=\"xmark\" tabindex=\"0\" (click)=\"clear()\" (keydown.enter)=\"clear()\" (keydown.space)=\"clear()\" />\n }\n @if (showIcon()) {\n <span class=\"tk-time-overlay-anchor\" aria-hidden=\"true\">\n <p-datepicker\n iconDisplay=\"input\"\n [showIcon]=\"true\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onOverlayTimeChange($event)\"\n (onShow)=\"onOverlayShow()\"\n [timeOnly]=\"true\"\n [hourFormat]=\"effectiveHourFormat()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\"\n [appendTo]=\"appendTo()\"\n [disabled]=\"effectiveDisabled()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <tk-icon\n icon=\"clock\"\n tabindex=\"0\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </tk-icon>\n </ng-template>\n </p-datepicker>\n </span>\n }\n }\n <label [for]=\"uid\">{{ labelText() }}</label>\n </p-floatlabel>\n @if (errorMessage() && effectiveControl().invalid && (effectiveControl().dirty || effectiveControl().touched)) {\n <small class=\"p-error\">{{ errorMessage() }}</small>\n }\n</div>\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AAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAMJ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAd/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,OAAA,EACjB;wBACP,WAAW;wBACX,mBAAmB;wBACnB,gBAAgB;wBAChB,gBAAgB;wBAChB,SAAS;wBACT,aAAa;qBACd,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,snGAAA,EAAA,MAAA,EAAA,CAAA,u6JAAA,CAAA,EAAA;o/DAuLL,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErO1D;;AAEG;;;;"}
|
|
@@ -397,6 +397,29 @@ const tkOverrides = {
|
|
|
397
397
|
focusColor: 'transparent',
|
|
398
398
|
},
|
|
399
399
|
},
|
|
400
|
+
stepper: {
|
|
401
|
+
colorScheme: {
|
|
402
|
+
light: {
|
|
403
|
+
separator: {
|
|
404
|
+
background: 'var(--tk-color-base-surface-200)',
|
|
405
|
+
activeBackground: 'var(--tk-color-base-primary-500)',
|
|
406
|
+
},
|
|
407
|
+
stepTitle: {
|
|
408
|
+
color: 'var(--tk-color-text-muted)',
|
|
409
|
+
activeColor: 'var(--tk-color-base-primary-500)',
|
|
410
|
+
},
|
|
411
|
+
stepNumber: {
|
|
412
|
+
background: 'var(--tk-color-base-surface-0)',
|
|
413
|
+
activeBackground: 'var(--tk-color-base-surface-0)',
|
|
414
|
+
borderColor: 'var(--tk-color-base-surface-300)',
|
|
415
|
+
activeBorderColor: 'var(--tk-color-base-primary-500)',
|
|
416
|
+
color: 'var(--tk-color-text-muted)',
|
|
417
|
+
activeColor: 'var(--tk-color-base-primary-500)',
|
|
418
|
+
shadow: 'none',
|
|
419
|
+
},
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
400
423
|
},
|
|
401
424
|
};
|
|
402
425
|
const TkPreset = definePreset(Aura, tkOverrides);
|