@tekus/design-system 5.22.1 → 5.23.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.
@@ -22,11 +22,12 @@ class DatePickerComponent {
22
22
  /** Internal references and injections */
23
23
  this.ngControl = inject(NgControl, { self: true, optional: true });
24
24
  /**
25
- * @property {InputSignal<'date' | 'time'>} variant
25
+ * @property {InputSignal<'date' | 'time' | 'both'>} variant
26
26
  * @description
27
27
  * Defines the visual and functional mode:
28
28
  * - `'date'`: standard date/range picker
29
29
  * - `'time'`: time-only picker
30
+ * - `'both'`: date and time picker
30
31
  * @default 'date'
31
32
  */
32
33
  this.variant = input('date', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
@@ -64,9 +65,9 @@ class DatePickerComponent {
64
65
  * @property {InputSignal<string>} dateFormat
65
66
  * @description
66
67
  * Format used by PrimeNG for displaying dates.
67
- * @default 'mm/dd/yy'
68
+ * @default 'dd/mm/yy'
68
69
  */
69
- this.dateFormat = input('mm/dd/yy', ...(ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []));
70
+ this.dateFormat = input('dd/mm/yy', ...(ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []));
70
71
  /**
71
72
  * @property {InputSignal<string>} timeFormat
72
73
  * @description
@@ -99,9 +100,38 @@ class DatePickerComponent {
99
100
  * @property {InputSignal<boolean>} showSeconds
100
101
  * @description
101
102
  * Whether to show seconds in the time picker.
103
+ * Only applicable when hourFormat is '24'.
102
104
  * @default false
103
105
  */
104
106
  this.showSeconds = input(false, ...(ngDevMode ? [{ debugName: "showSeconds" }] : /* istanbul ignore next */ []));
107
+ /**
108
+ * @property {InputSignal<boolean>} inline
109
+ * @description
110
+ * Whether to display the datepicker inline.
111
+ * @default false
112
+ */
113
+ this.inline = input(false, ...(ngDevMode ? [{ debugName: "inline" }] : /* istanbul ignore next */ []));
114
+ /**
115
+ * @property {InputSignal<boolean>} showTime
116
+ * @description
117
+ * Whether to show the time picker along with the date picker.
118
+ * @default false
119
+ */
120
+ this.showTime = input(false, ...(ngDevMode ? [{ debugName: "showTime" }] : /* istanbul ignore next */ []));
121
+ /**
122
+ * @property {InputSignal<'12' | '24'>} hourFormat
123
+ * @description
124
+ * Format of the hours: '12' or '24'.
125
+ * @default '24'
126
+ */
127
+ this.hourFormat = input('24', ...(ngDevMode ? [{ debugName: "hourFormat" }] : /* istanbul ignore next */ []));
128
+ /**
129
+ * @property {InputSignal<string | HTMLElement | null | undefined>} appendTo
130
+ * @description
131
+ * Target element to attach the overlay to.
132
+ * @default 'body'
133
+ */
134
+ this.appendTo = input('body', ...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
105
135
  /**
106
136
  * @property {InputSignal<Date | null>} maxDate
107
137
  * @description
@@ -164,6 +194,24 @@ class DatePickerComponent {
164
194
  this.effectiveDateFormat = computed(() => {
165
195
  return this.variant() === 'time' ? this.timeFormat() : this.dateFormat();
166
196
  }, ...(ngDevMode ? [{ debugName: "effectiveDateFormat" }] : /* istanbul ignore next */ []));
197
+ /**
198
+ * @property {Signal<boolean>} effectiveShowSeconds
199
+ * @description
200
+ * Returns whether seconds should be shown, restricted to 24h format.
201
+ */
202
+ this.effectiveShowSeconds = computed(() => {
203
+ return ((this.effectiveShowTime() || this.variant() === 'time') &&
204
+ this.hourFormat() === '24' &&
205
+ this.showSeconds());
206
+ }, ...(ngDevMode ? [{ debugName: "effectiveShowSeconds" }] : /* istanbul ignore next */ []));
207
+ /**
208
+ * @property {Signal<boolean>} effectiveShowTime
209
+ * @description
210
+ * Returns whether the time picker should be shown.
211
+ */
212
+ this.effectiveShowTime = computed(() => {
213
+ return this.variant() === 'both' || this.showTime();
214
+ }, ...(ngDevMode ? [{ debugName: "effectiveShowTime" }] : /* istanbul ignore next */ []));
167
215
  /**
168
216
  * @property {Signal<FormControl>} effectiveControl
169
217
  * @description
@@ -177,6 +225,7 @@ class DatePickerComponent {
177
225
  this.onChange = () => { };
178
226
  this.onTouched = () => { };
179
227
  this.sub = new Subscription();
228
+ this.lastValue = null;
180
229
  if (this.ngControl) {
181
230
  this.ngControl.valueAccessor = this;
182
231
  }
@@ -189,9 +238,12 @@ class DatePickerComponent {
189
238
  ngOnInit() {
190
239
  const control = this.effectiveControl;
191
240
  // Synchronize signal model with control value
192
- this.modelValue.set(control.value);
241
+ const initialValue = control.value;
242
+ this.modelValue.set(initialValue);
243
+ this.lastValue = initialValue;
193
244
  this.sub.add(control.valueChanges.subscribe(value => {
194
245
  this.modelValue.set(value);
246
+ this.lastValue = value;
195
247
  }));
196
248
  }
197
249
  ngOnDestroy() {
@@ -199,6 +251,7 @@ class DatePickerComponent {
199
251
  }
200
252
  writeValue(value) {
201
253
  this.modelValue.set(value);
254
+ this.lastValue = value;
202
255
  }
203
256
  registerOnChange(fn) {
204
257
  this.onChange = fn;
@@ -216,24 +269,56 @@ class DatePickerComponent {
216
269
  * Called when the PrimeNG DatePicker template updates the value.
217
270
  */
218
271
  onModelChange(value) {
219
- this.modelValue.set(value);
220
- this.onChange(value);
221
- this.effectiveControl.setValue(value, { emitEvent: false });
272
+ let finalValue = value;
273
+ // Time cascading logic (single mode only)
274
+ if (this.selectionMode() === 'single' &&
275
+ finalValue instanceof Date &&
276
+ this.lastValue instanceof Date) {
277
+ finalValue = this.applyTimeCascading(this.lastValue, finalValue);
278
+ }
279
+ this.lastValue = finalValue;
280
+ this.modelValue.set(finalValue);
281
+ this.onChange(finalValue);
282
+ this.effectiveControl.setValue(finalValue, { emitEvent: false });
222
283
  this.effectiveControl.markAsDirty();
223
- if (value === null) {
284
+ if (finalValue === null) {
224
285
  this.handleClear.emit();
225
286
  }
226
287
  else if (this.selectionMode() === 'range') {
227
- if (Array.isArray(value)) {
228
- const [start, end] = value;
288
+ if (Array.isArray(finalValue)) {
289
+ const [start, end] = finalValue;
229
290
  if (start instanceof Date && end instanceof Date) {
230
- this.handleSelect.emit(value);
291
+ this.handleSelect.emit(finalValue);
231
292
  }
232
293
  }
233
294
  }
234
- else if (value instanceof Date) {
235
- this.handleSelect.emit(value);
295
+ else if (finalValue instanceof Date) {
296
+ this.handleSelect.emit(finalValue);
297
+ }
298
+ }
299
+ /**
300
+ * @method applyTimeCascading
301
+ * @private
302
+ * @description
303
+ * Adjusts the date when minutes or seconds wrap around.
304
+ */
305
+ applyTimeCascading(prev, curr) {
306
+ const updated = new Date(curr);
307
+ // Cascade seconds to minutes
308
+ if (prev.getSeconds() === 59 && updated.getSeconds() === 0) {
309
+ updated.setMinutes(updated.getMinutes() + 1);
310
+ }
311
+ else if (prev.getSeconds() === 0 && updated.getSeconds() === 59) {
312
+ updated.setMinutes(updated.getMinutes() - 1);
313
+ }
314
+ // Cascade minutes to hours
315
+ if (prev.getMinutes() === 59 && updated.getMinutes() === 0) {
316
+ updated.setHours(updated.getHours() + 1);
317
+ }
318
+ else if (prev.getMinutes() === 0 && updated.getMinutes() === 59) {
319
+ updated.setHours(updated.getHours() - 1);
236
320
  }
321
+ return updated;
237
322
  }
238
323
  /**
239
324
  * @method onBlur
@@ -253,7 +338,7 @@ class DatePickerComponent {
253
338
  this.onModelChange(null);
254
339
  }
255
340
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
256
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.3", type: DatePickerComponent, isStandalone: true, selector: "tk-date-picker", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", 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 }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, timeFormat: { classPropertyName: "timeFormat", publicName: "timeFormat", 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 }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, labelText: { classPropertyName: "labelText", publicName: "labelText", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, modelValue: { classPropertyName: "modelValue", publicName: "modelValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modelValue: "modelValueChange", handleSelect: "handleSelect", handleClear: "handleClear" }, ngImport: i0, template: "<div class=\"datepicker-container\">\n <p-floatlabel>\n <p-datepicker\n inputId=\"datepicker\"\n iconDisplay=\"input\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onBlur()\"\n [selectionMode]=\"effectiveSelectionMode()\"\n [readonlyInput]=\"readonlyInput()\"\n [showClear]=\"showClear()\"\n [showIcon]=\"showIcon()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabled]=\"effectiveControl.disabled\"\n [dateFormat]=\"effectiveDateFormat()\"\n [timeOnly]=\"variant() === 'time'\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"showSeconds()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <fa-icon\n tabindex=\"0\"\n [icon]=\"variant() === 'time' ? faClock : faCalendarDay\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </fa-icon>\n </ng-template>\n </p-datepicker>\n\n <label for=\"datepicker\">{{ labelText() }}</label>\n </p-floatlabel>\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-accent-default, #16006f)}:host ::ng-deep .p-datepicker-decade{color:var(--tk-color-text-default, #121214)}:host ::ng-deep .p-datepicker-clear-icon{color:var(--tk-surface-700, #424243);inset-inline-end:2.5rem!important}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input: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-day-selected-range{background-color:var(--tk-primary-100, #b7b0d2);color:var(--tk-primary-700, #10004f)}:host ::ng-deep .p-datepicker-panel{min-width:0!important;max-width:300px!important;width:100%!important}.datepicker-container{margin-top:var(--tk-spacing-base-200, 2rem)}\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: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }] }); }
341
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DatePickerComponent, isStandalone: true, selector: "tk-date-picker", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", 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 }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, timeFormat: { classPropertyName: "timeFormat", publicName: "timeFormat", 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 }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, labelText: { classPropertyName: "labelText", publicName: "labelText", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, modelValue: { classPropertyName: "modelValue", publicName: "modelValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modelValue: "modelValueChange", handleSelect: "handleSelect", handleClear: "handleClear" }, ngImport: i0, template: "<div class=\"datepicker-container\" [class.inline]=\"inline()\">\n @if (inline()) {\n <p-datepicker\n inputId=\"datepicker\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onBlur()\"\n [selectionMode]=\"effectiveSelectionMode()\"\n [readonlyInput]=\"readonlyInput()\"\n [showClear]=\"showClear()\"\n [showIcon]=\"showIcon()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabled]=\"effectiveControl.disabled\"\n [dateFormat]=\"effectiveDateFormat()\"\n [timeOnly]=\"variant() === 'time'\"\n [inline]=\"true\"\n [showTime]=\"effectiveShowTime()\"\n [hourFormat]=\"hourFormat()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\">\n </p-datepicker>\n } @else {\n <p-floatlabel>\n <p-datepicker\n inputId=\"datepicker\"\n iconDisplay=\"input\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onBlur()\"\n [selectionMode]=\"effectiveSelectionMode()\"\n [readonlyInput]=\"readonlyInput()\"\n [showClear]=\"showClear()\"\n [showIcon]=\"showIcon()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabled]=\"effectiveControl.disabled\"\n [dateFormat]=\"effectiveDateFormat()\"\n [timeOnly]=\"variant() === 'time'\"\n [showTime]=\"effectiveShowTime()\"\n [hourFormat]=\"hourFormat()\"\n [appendTo]=\"appendTo()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <fa-icon\n tabindex=\"0\"\n [icon]=\"variant() === 'time' ? faClock : faCalendarDay\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </fa-icon>\n </ng-template>\n </p-datepicker>\n\n <label for=\"datepicker\">{{ labelText() }}</label>\n </p-floatlabel>\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-accent-default, #16006f)}:host ::ng-deep .p-datepicker-decade{color:var(--tk-color-text-default, #121214)}:host ::ng-deep .p-datepicker-clear-icon{color:var(--tk-surface-700, #424243);inset-inline-end:2.5rem!important}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input: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-day-selected-range{background-color:var(--tk-primary-100, #b7b0d2);color:var(--tk-primary-700, #10004f)}:host ::ng-deep .p-datepicker-panel{min-width:0!important;max-width:300px!important;width:100%!important}.datepicker-container{margin-top:var(--tk-spacing-base-200, 2rem)}.datepicker-container.inline{margin-top:0}\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: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }] }); }
257
342
  }
258
343
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DatePickerComponent, decorators: [{
259
344
  type: Component,
@@ -263,8 +348,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImpor
263
348
  DatePickerModule,
264
349
  FloatLabelModule,
265
350
  FaIconComponent,
266
- ], template: "<div class=\"datepicker-container\">\n <p-floatlabel>\n <p-datepicker\n inputId=\"datepicker\"\n iconDisplay=\"input\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onBlur()\"\n [selectionMode]=\"effectiveSelectionMode()\"\n [readonlyInput]=\"readonlyInput()\"\n [showClear]=\"showClear()\"\n [showIcon]=\"showIcon()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabled]=\"effectiveControl.disabled\"\n [dateFormat]=\"effectiveDateFormat()\"\n [timeOnly]=\"variant() === 'time'\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"showSeconds()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <fa-icon\n tabindex=\"0\"\n [icon]=\"variant() === 'time' ? faClock : faCalendarDay\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </fa-icon>\n </ng-template>\n </p-datepicker>\n\n <label for=\"datepicker\">{{ labelText() }}</label>\n </p-floatlabel>\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-accent-default, #16006f)}:host ::ng-deep .p-datepicker-decade{color:var(--tk-color-text-default, #121214)}:host ::ng-deep .p-datepicker-clear-icon{color:var(--tk-surface-700, #424243);inset-inline-end:2.5rem!important}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input: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-day-selected-range{background-color:var(--tk-primary-100, #b7b0d2);color:var(--tk-primary-700, #10004f)}:host ::ng-deep .p-datepicker-panel{min-width:0!important;max-width:300px!important;width:100%!important}.datepicker-container{margin-top:var(--tk-spacing-base-200, 2rem)}\n"] }]
267
- }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonlyInput", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], timeFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeFormat", 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 }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], labelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelText", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", 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"] }] } });
351
+ ], template: "<div class=\"datepicker-container\" [class.inline]=\"inline()\">\n @if (inline()) {\n <p-datepicker\n inputId=\"datepicker\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onBlur()\"\n [selectionMode]=\"effectiveSelectionMode()\"\n [readonlyInput]=\"readonlyInput()\"\n [showClear]=\"showClear()\"\n [showIcon]=\"showIcon()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabled]=\"effectiveControl.disabled\"\n [dateFormat]=\"effectiveDateFormat()\"\n [timeOnly]=\"variant() === 'time'\"\n [inline]=\"true\"\n [showTime]=\"effectiveShowTime()\"\n [hourFormat]=\"hourFormat()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\">\n </p-datepicker>\n } @else {\n <p-floatlabel>\n <p-datepicker\n inputId=\"datepicker\"\n iconDisplay=\"input\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onBlur()\"\n [selectionMode]=\"effectiveSelectionMode()\"\n [readonlyInput]=\"readonlyInput()\"\n [showClear]=\"showClear()\"\n [showIcon]=\"showIcon()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabled]=\"effectiveControl.disabled\"\n [dateFormat]=\"effectiveDateFormat()\"\n [timeOnly]=\"variant() === 'time'\"\n [showTime]=\"effectiveShowTime()\"\n [hourFormat]=\"hourFormat()\"\n [appendTo]=\"appendTo()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <fa-icon\n tabindex=\"0\"\n [icon]=\"variant() === 'time' ? faClock : faCalendarDay\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </fa-icon>\n </ng-template>\n </p-datepicker>\n\n <label for=\"datepicker\">{{ labelText() }}</label>\n </p-floatlabel>\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-accent-default, #16006f)}:host ::ng-deep .p-datepicker-decade{color:var(--tk-color-text-default, #121214)}:host ::ng-deep .p-datepicker-clear-icon{color:var(--tk-surface-700, #424243);inset-inline-end:2.5rem!important}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input: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-day-selected-range{background-color:var(--tk-primary-100, #b7b0d2);color:var(--tk-primary-700, #10004f)}:host ::ng-deep .p-datepicker-panel{min-width:0!important;max-width:300px!important;width:100%!important}.datepicker-container{margin-top:var(--tk-spacing-base-200, 2rem)}.datepicker-container.inline{margin-top:0}\n"] }]
352
+ }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonlyInput", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], timeFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeFormat", 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 }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], labelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelText", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", 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"] }] } });
268
353
 
269
354
  /**
270
355
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"tekus-design-system-components-date-picker.mjs","sources":["../../../projects/design-system/components/date-picker/src/date-picker.component.ts","../../../projects/design-system/components/date-picker/src/date-picker.component.html","../../../projects/design-system/components/date-picker/tekus-design-system-components-date-picker.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnDestroy,\n inject,\n input,\n model,\n computed,\n output,\n} from '@angular/core';\nimport {\n FormsModule,\n ReactiveFormsModule,\n FormControl,\n ControlValueAccessor,\n NgControl,\n} from '@angular/forms';\nimport { Subscription } from 'rxjs';\n\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { faCalendarDay, faClock } from '@fortawesome/pro-regular-svg-icons';\n\nexport type DateValue = Date | [Date, Date] | null;\n\n@Component({\n selector: 'tk-date-picker',\n standalone: true,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n DatePickerModule,\n FloatLabelModule,\n FaIconComponent,\n ],\n templateUrl: './date-picker.component.html',\n styleUrls: ['./date-picker.component.scss'],\n})\n/**\n * @component DatePickerComponent\n * @description\n * A wrapper around PrimeNG's DatePicker component with support for single-date,\n * range selection, and time-only modes. It uses Angular Signals for reactivity\n * and strictly implements the ControlValueAccessor interface via NgControl.\n */\nexport class DatePickerComponent\n implements OnInit, OnDestroy, ControlValueAccessor\n{\n /** Internal references and injections */\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n /**\n * @property {InputSignal<'date' | 'time'>} variant\n * @description\n * Defines the visual and functional mode:\n * - `'date'`: standard date/range picker\n * - `'time'`: time-only picker\n * @default 'date'\n */\n variant = input<'date' | 'time'>('date');\n\n /**\n * @property {InputSignal<'single' | 'range'>} selectionMode\n * @description\n * Defines how the datepicker behaves:\n * - `'single'`: select one date\n * - `'range'`: select a pair of dates [start, end]\n * @default 'range'\n */\n selectionMode = input<'single' | 'range'>('range');\n\n /**\n * @property {InputSignal<boolean>} readonlyInput\n * @description\n * Disables manual typing in the input and forces the user to select via the calendar.\n * @default true\n */\n readonlyInput = input<boolean>(true);\n\n /**\n * @property {InputSignal<boolean>} showClear\n * @description\n * Displays a clear button that resets the datepicker value.\n * @default true\n */\n showClear = input<boolean>(true);\n\n /**\n * @property {InputSignal<boolean>} showIcon\n * @description\n * Shows the calendar or clock icon inside the input.\n * @default true\n */\n showIcon = input<boolean>(true);\n\n /**\n * @property {InputSignal<string>} dateFormat\n * @description\n * Format used by PrimeNG for displaying dates.\n * @default 'mm/dd/yy'\n */\n dateFormat = input<string>('mm/dd/yy');\n\n /**\n * @property {InputSignal<string>} timeFormat\n * @description\n * Format used by PrimeNG for displaying times.\n * @default 'HH:mm'\n */\n timeFormat = input<string>('HH:mm');\n\n /**\n * @property {InputSignal<number>} stepHour\n * @description\n * Hours to skip when clicking up/down.\n * @default 1\n */\n stepHour = input<number>(1);\n\n /**\n * @property {InputSignal<number>} stepMinute\n * @description\n * Minutes to skip when clicking up/down.\n * @default 1\n */\n stepMinute = input<number>(1);\n\n /**\n * @property {InputSignal<number>} stepSecond\n * @description\n * Seconds to skip when clicking up/down.\n * @default 1\n */\n stepSecond = input<number>(1);\n\n /**\n * @property {InputSignal<boolean>} showSeconds\n * @description\n * Whether to show seconds in the time picker.\n * @default false\n */\n showSeconds = input<boolean>(false);\n\n /**\n * @property {InputSignal<Date | null>} maxDate\n * @description\n * Maximum selectable date.\n * @default null\n */\n maxDate = input<Date | null>(null);\n\n /**\n * @property {InputSignal<Date | null>} minDate\n * @description\n * Minimum selectable date.\n * @default null\n */\n minDate = input<Date | null>(null);\n\n /**\n * @property {InputSignal<string>} labelText\n * @description\n * Label shown by the float-label wrapper.\n */\n labelText = input<string>('Select a date');\n\n /**\n * @property {InputSignal<FormControl>} control\n * @description\n * External FormControl used to read/set the datepicker value.\n * If not provided, an internal FormControl is created.\n */\n control = input<FormControl | undefined>(undefined);\n\n /**\n * @property {ModelSignal<DateValue>} modelValue\n * @description\n * The value of the datepicker model. Supports two-way binding.\n */\n modelValue = model<DateValue>(null);\n\n /**\n * @property {OutputRef<DateValue>} handleSelect\n * @description\n * Emitted when a value is selected.\n */\n handleSelect = output<DateValue>();\n\n /**\n * @property {OutputRef<void>} handleClear\n * @description\n * Emitted when the value is cleared.\n */\n handleClear = output<void>();\n\n /** Computed properties */\n\n /**\n * @property {Signal<'single' | 'range'>} effectiveSelectionMode\n * @description\n * Returns 'single' automatically if variant is 'time', otherwise returns the user-provided selectionMode.\n */\n effectiveSelectionMode = computed(() => {\n return this.variant() === 'time' ? 'single' : this.selectionMode();\n });\n\n /**\n * @property {Signal<string>} effectiveDateFormat\n * @description\n * Returns the user-provided dateFormat or timeFormat based on the variant.\n */\n effectiveDateFormat = computed(() => {\n return this.variant() === 'time' ? this.timeFormat() : this.dateFormat();\n });\n\n /**\n * @property {Signal<FormControl>} effectiveControl\n * @description\n * Returns the external FormControl from NgControl or a local fallback.\n */\n internalControl = new FormControl<DateValue>(null);\n get effectiveControl(): FormControl {\n return (\n (this.ngControl?.control as FormControl) ||\n this.control() ||\n this.internalControl\n );\n }\n\n /** Icons */\n faCalendarDay = faCalendarDay;\n faClock = faClock;\n\n /** CVA Logic */\n onChange: (value: DateValue) => void = () => {};\n onTouched: () => void = () => {};\n private readonly sub = new Subscription();\n\n ngOnInit(): void {\n const control = this.effectiveControl;\n\n // Synchronize signal model with control value\n this.modelValue.set(control.value);\n\n this.sub.add(\n control.valueChanges.subscribe(value => {\n this.modelValue.set(value);\n })\n );\n }\n\n ngOnDestroy(): void {\n this.sub.unsubscribe();\n }\n\n writeValue(value: DateValue): void {\n this.modelValue.set(value);\n }\n\n registerOnChange(fn: (value: DateValue) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n const action = isDisabled ? 'disable' : 'enable';\n this.effectiveControl[action]({ emitEvent: false });\n }\n\n /**\n * @method onModelChange\n * @description\n * Called when the PrimeNG DatePicker template updates the value.\n */\n onModelChange(value: DateValue): void {\n this.modelValue.set(value);\n this.onChange(value);\n this.effectiveControl.setValue(value, { emitEvent: false });\n this.effectiveControl.markAsDirty();\n\n if (value === null) {\n this.handleClear.emit();\n } else if (this.selectionMode() === 'range') {\n if (Array.isArray(value)) {\n const [start, end] = value;\n if (start instanceof Date && end instanceof Date) {\n this.handleSelect.emit(value);\n }\n }\n } else if (value instanceof Date) {\n this.handleSelect.emit(value);\n }\n }\n\n /**\n * @method onBlur\n * @description\n * Triggered when the component loses focus.\n */\n onBlur(): void {\n this.onTouched();\n this.effectiveControl.markAsTouched();\n }\n\n /**\n * @method clear\n * @description\n * Programmatically clears the value.\n */\n clear() {\n this.onModelChange(null);\n }\n}\n","<div class=\"datepicker-container\">\n <p-floatlabel>\n <p-datepicker\n inputId=\"datepicker\"\n iconDisplay=\"input\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onBlur()\"\n [selectionMode]=\"effectiveSelectionMode()\"\n [readonlyInput]=\"readonlyInput()\"\n [showClear]=\"showClear()\"\n [showIcon]=\"showIcon()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabled]=\"effectiveControl.disabled\"\n [dateFormat]=\"effectiveDateFormat()\"\n [timeOnly]=\"variant() === 'time'\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"showSeconds()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <fa-icon\n tabindex=\"0\"\n [icon]=\"variant() === 'time' ? faClock : faCalendarDay\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </fa-icon>\n </ng-template>\n </p-datepicker>\n\n <label for=\"datepicker\">{{ labelText() }}</label>\n </p-floatlabel>\n</div>\n","/**\n * Generated bundle index. Do not edit.\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-system/components/date-picker/src/date-picker.component.ts","../../../projects/design-system/components/date-picker/src/date-picker.component.html","../../../projects/design-system/components/date-picker/tekus-design-system-components-date-picker.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnDestroy,\n inject,\n input,\n model,\n computed,\n output,\n} from '@angular/core';\nimport {\n FormsModule,\n ReactiveFormsModule,\n FormControl,\n ControlValueAccessor,\n NgControl,\n} from '@angular/forms';\nimport { Subscription } from 'rxjs';\n\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { faCalendarDay, faClock } from '@fortawesome/pro-regular-svg-icons';\n\nexport type DateValue = Date | [Date, Date] | null;\n\n@Component({\n selector: 'tk-date-picker',\n standalone: true,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n DatePickerModule,\n FloatLabelModule,\n FaIconComponent,\n ],\n templateUrl: './date-picker.component.html',\n styleUrls: ['./date-picker.component.scss'],\n})\n/**\n * @component DatePickerComponent\n * @description\n * A wrapper around PrimeNG's DatePicker component with support for single-date,\n * range selection, and time-only modes. It uses Angular Signals for reactivity\n * and strictly implements the ControlValueAccessor interface via NgControl.\n */\nexport class DatePickerComponent\n implements OnInit, OnDestroy, ControlValueAccessor\n{\n /** Internal references and injections */\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n /**\n * @property {InputSignal<'date' | 'time' | 'both'>} variant\n * @description\n * Defines the visual and functional mode:\n * - `'date'`: standard date/range picker\n * - `'time'`: time-only picker\n * - `'both'`: date and time picker\n * @default 'date'\n */\n variant = input<'date' | 'time' | 'both'>('date');\n\n /**\n * @property {InputSignal<'single' | 'range'>} selectionMode\n * @description\n * Defines how the datepicker behaves:\n * - `'single'`: select one date\n * - `'range'`: select a pair of dates [start, end]\n * @default 'range'\n */\n selectionMode = input<'single' | 'range'>('range');\n\n /**\n * @property {InputSignal<boolean>} readonlyInput\n * @description\n * Disables manual typing in the input and forces the user to select via the calendar.\n * @default true\n */\n readonlyInput = input<boolean>(true);\n\n /**\n * @property {InputSignal<boolean>} showClear\n * @description\n * Displays a clear button that resets the datepicker value.\n * @default true\n */\n showClear = input<boolean>(true);\n\n /**\n * @property {InputSignal<boolean>} showIcon\n * @description\n * Shows the calendar or clock icon inside the input.\n * @default true\n */\n showIcon = input<boolean>(true);\n\n /**\n * @property {InputSignal<string>} dateFormat\n * @description\n * Format used by PrimeNG for displaying dates.\n * @default 'dd/mm/yy'\n */\n dateFormat = input<string>('dd/mm/yy');\n\n /**\n * @property {InputSignal<string>} timeFormat\n * @description\n * Format used by PrimeNG for displaying times.\n * @default 'HH:mm'\n */\n timeFormat = input<string>('HH:mm');\n\n /**\n * @property {InputSignal<number>} stepHour\n * @description\n * Hours to skip when clicking up/down.\n * @default 1\n */\n stepHour = input<number>(1);\n\n /**\n * @property {InputSignal<number>} stepMinute\n * @description\n * Minutes to skip when clicking up/down.\n * @default 1\n */\n stepMinute = input<number>(1);\n\n /**\n * @property {InputSignal<number>} stepSecond\n * @description\n * Seconds to skip when clicking up/down.\n * @default 1\n */\n stepSecond = input<number>(1);\n\n /**\n * @property {InputSignal<boolean>} showSeconds\n * @description\n * Whether to show seconds in the time picker.\n * Only applicable when hourFormat is '24'.\n * @default false\n */\n showSeconds = input<boolean>(false);\n\n /**\n * @property {InputSignal<boolean>} inline\n * @description\n * Whether to display the datepicker inline.\n * @default false\n */\n inline = input<boolean>(false);\n\n /**\n * @property {InputSignal<boolean>} showTime\n * @description\n * Whether to show the time picker along with the date picker.\n * @default false\n */\n showTime = input<boolean>(false);\n\n /**\n * @property {InputSignal<'12' | '24'>} hourFormat\n * @description\n * Format of the hours: '12' or '24'.\n * @default '24'\n */\n hourFormat = input<'12' | '24'>('24');\n\n /**\n * @property {InputSignal<string | HTMLElement | null | undefined>} appendTo\n * @description\n * Target element to attach the overlay to.\n * @default 'body'\n */\n appendTo = input<string | HTMLElement | null | undefined>('body');\n\n /**\n * @property {InputSignal<Date | null>} maxDate\n * @description\n * Maximum selectable date.\n * @default null\n */\n maxDate = input<Date | null>(null);\n\n /**\n * @property {InputSignal<Date | null>} minDate\n * @description\n * Minimum selectable date.\n * @default null\n */\n minDate = input<Date | null>(null);\n\n /**\n * @property {InputSignal<string>} labelText\n * @description\n * Label shown by the float-label wrapper.\n */\n labelText = input<string>('Select a date');\n\n /**\n * @property {InputSignal<FormControl>} control\n * @description\n * External FormControl used to read/set the datepicker value.\n * If not provided, an internal FormControl is created.\n */\n control = input<FormControl | undefined>(undefined);\n\n /**\n * @property {ModelSignal<DateValue>} modelValue\n * @description\n * The value of the datepicker model. Supports two-way binding.\n */\n modelValue = model<DateValue>(null);\n\n /**\n * @property {OutputRef<DateValue>} handleSelect\n * @description\n * Emitted when a value is selected.\n */\n handleSelect = output<DateValue>();\n\n /**\n * @property {OutputRef<void>} handleClear\n * @description\n * Emitted when the value is cleared.\n */\n handleClear = output<void>();\n\n /** Computed properties */\n\n /**\n * @property {Signal<'single' | 'range'>} effectiveSelectionMode\n * @description\n * Returns 'single' automatically if variant is 'time', otherwise returns the user-provided selectionMode.\n */\n effectiveSelectionMode = computed(() => {\n return this.variant() === 'time' ? 'single' : this.selectionMode();\n });\n\n /**\n * @property {Signal<string>} effectiveDateFormat\n * @description\n * Returns the user-provided dateFormat or timeFormat based on the variant.\n */\n effectiveDateFormat = computed(() => {\n return this.variant() === 'time' ? this.timeFormat() : this.dateFormat();\n });\n\n /**\n * @property {Signal<boolean>} effectiveShowSeconds\n * @description\n * Returns whether seconds should be shown, restricted to 24h format.\n */\n effectiveShowSeconds = computed(() => {\n return (\n (this.effectiveShowTime() || this.variant() === 'time') &&\n this.hourFormat() === '24' &&\n this.showSeconds()\n );\n });\n\n /**\n * @property {Signal<boolean>} effectiveShowTime\n * @description\n * Returns whether the time picker should be shown.\n */\n effectiveShowTime = computed(() => {\n return this.variant() === 'both' || this.showTime();\n });\n\n /**\n * @property {Signal<FormControl>} effectiveControl\n * @description\n * Returns the external FormControl from NgControl or a local fallback.\n */\n internalControl = new FormControl<DateValue>(null);\n get effectiveControl(): FormControl {\n return (\n (this.ngControl?.control as FormControl) ||\n this.control() ||\n this.internalControl\n );\n }\n\n /** Icons */\n faCalendarDay = faCalendarDay;\n faClock = faClock;\n\n /** CVA Logic */\n onChange: (value: DateValue) => void = () => {};\n onTouched: () => void = () => {};\n private readonly sub = new Subscription();\n private lastValue: DateValue = null;\n\n ngOnInit(): void {\n const control = this.effectiveControl;\n\n // Synchronize signal model with control value\n const initialValue = control.value;\n this.modelValue.set(initialValue);\n this.lastValue = initialValue;\n\n this.sub.add(\n control.valueChanges.subscribe(value => {\n this.modelValue.set(value);\n this.lastValue = value;\n })\n );\n }\n\n ngOnDestroy(): void {\n this.sub.unsubscribe();\n }\n\n writeValue(value: DateValue): void {\n this.modelValue.set(value);\n this.lastValue = value;\n }\n\n registerOnChange(fn: (value: DateValue) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n const action = isDisabled ? 'disable' : 'enable';\n this.effectiveControl[action]({ emitEvent: false });\n }\n\n /**\n * @method onModelChange\n * @description\n * Called when the PrimeNG DatePicker template updates the value.\n */\n onModelChange(value: DateValue): void {\n let finalValue = value;\n\n // Time cascading logic (single mode only)\n if (\n this.selectionMode() === 'single' &&\n finalValue instanceof Date &&\n this.lastValue instanceof Date\n ) {\n finalValue = this.applyTimeCascading(this.lastValue, finalValue);\n }\n\n this.lastValue = finalValue;\n this.modelValue.set(finalValue);\n this.onChange(finalValue);\n this.effectiveControl.setValue(finalValue, { emitEvent: false });\n this.effectiveControl.markAsDirty();\n\n if (finalValue === null) {\n this.handleClear.emit();\n } else if (this.selectionMode() === 'range') {\n if (Array.isArray(finalValue)) {\n const [start, end] = finalValue;\n if (start instanceof Date && end instanceof Date) {\n this.handleSelect.emit(finalValue);\n }\n }\n } else if (finalValue instanceof Date) {\n this.handleSelect.emit(finalValue);\n }\n }\n\n /**\n * @method applyTimeCascading\n * @private\n * @description\n * Adjusts the date when minutes or seconds wrap around.\n */\n private applyTimeCascading(prev: Date, curr: Date): Date {\n const updated = new Date(curr);\n\n // Cascade seconds to minutes\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 // Cascade minutes to hours\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 /**\n * @method onBlur\n * @description\n * Triggered when the component loses focus.\n */\n onBlur(): void {\n this.onTouched();\n this.effectiveControl.markAsTouched();\n }\n\n /**\n * @method clear\n * @description\n * Programmatically clears the value.\n */\n clear() {\n this.onModelChange(null);\n }\n}\n","<div class=\"datepicker-container\" [class.inline]=\"inline()\">\n @if (inline()) {\n <p-datepicker\n inputId=\"datepicker\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onBlur()\"\n [selectionMode]=\"effectiveSelectionMode()\"\n [readonlyInput]=\"readonlyInput()\"\n [showClear]=\"showClear()\"\n [showIcon]=\"showIcon()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabled]=\"effectiveControl.disabled\"\n [dateFormat]=\"effectiveDateFormat()\"\n [timeOnly]=\"variant() === 'time'\"\n [inline]=\"true\"\n [showTime]=\"effectiveShowTime()\"\n [hourFormat]=\"hourFormat()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\">\n </p-datepicker>\n } @else {\n <p-floatlabel>\n <p-datepicker\n inputId=\"datepicker\"\n iconDisplay=\"input\"\n [ngModel]=\"modelValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (onBlur)=\"onBlur()\"\n [selectionMode]=\"effectiveSelectionMode()\"\n [readonlyInput]=\"readonlyInput()\"\n [showClear]=\"showClear()\"\n [showIcon]=\"showIcon()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [disabled]=\"effectiveControl.disabled\"\n [dateFormat]=\"effectiveDateFormat()\"\n [timeOnly]=\"variant() === 'time'\"\n [showTime]=\"effectiveShowTime()\"\n [hourFormat]=\"hourFormat()\"\n [appendTo]=\"appendTo()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [showSeconds]=\"effectiveShowSeconds()\">\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\n <fa-icon\n tabindex=\"0\"\n [icon]=\"variant() === 'time' ? faClock : faCalendarDay\"\n (keydown.enter)=\"clickCallBack($event)\"\n (keydown.space)=\"clickCallBack($event)\"\n (click)=\"clickCallBack($event)\">\n </fa-icon>\n </ng-template>\n </p-datepicker>\n\n <label for=\"datepicker\">{{ labelText() }}</label>\n </p-floatlabel>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAuCA;;;;;;AAMG;MACU,mBAAmB,CAAA;AAM9B,IAAA,WAAA,GAAA;;AAFS,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAQtE;;;;;;;;AAQG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAA2B,MAAM,8EAAC;AAEjD;;;;;;;AAOG;AACH,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAqB,OAAO,oFAAC;AAElD;;;;;AAKG;AACH,QAAA,IAAA,CAAA,a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AAA,EAAA,gBAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAChB,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,eAAe,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,YAAA,EAAA,WAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,aAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,YAAA,EAAA,YAAA,EAAA,YAAA,EAAA,cAAA,EAAA,eAAA,EAAA,cAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,iBAAA,EAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAYN,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBApB/B,SAAS;+BACE,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,OAAA,EACP;wBACP,WAAW;wBACX,mBAAmB;wBACnB,gBAAgB;wBAChB,gBAAgB;wBAChB,eAAe;AAChB,qBAAA,EAAA,QAAA,EAAA,4vEAAA,EAAA,MAAA,EAAA,CAAA,02CAAA,CAAA,EAAA;;;AEnCH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tekus/design-system",
3
3
  "description": "Tekus design system library",
4
- "version": "5.22.1",
4
+ "version": "5.23.0",
5
5
  "license": "UNLICENSED",
6
6
  "peerDependencies": {
7
7
  "@angular/core": "^21.0.0",
@@ -9,14 +9,15 @@ declare class DatePickerComponent implements OnInit, OnDestroy, ControlValueAcce
9
9
  readonly ngControl: NgControl | null;
10
10
  constructor();
11
11
  /**
12
- * @property {InputSignal<'date' | 'time'>} variant
12
+ * @property {InputSignal<'date' | 'time' | 'both'>} variant
13
13
  * @description
14
14
  * Defines the visual and functional mode:
15
15
  * - `'date'`: standard date/range picker
16
16
  * - `'time'`: time-only picker
17
+ * - `'both'`: date and time picker
17
18
  * @default 'date'
18
19
  */
19
- variant: _angular_core.InputSignal<"date" | "time">;
20
+ variant: _angular_core.InputSignal<"date" | "time" | "both">;
20
21
  /**
21
22
  * @property {InputSignal<'single' | 'range'>} selectionMode
22
23
  * @description
@@ -51,7 +52,7 @@ declare class DatePickerComponent implements OnInit, OnDestroy, ControlValueAcce
51
52
  * @property {InputSignal<string>} dateFormat
52
53
  * @description
53
54
  * Format used by PrimeNG for displaying dates.
54
- * @default 'mm/dd/yy'
55
+ * @default 'dd/mm/yy'
55
56
  */
56
57
  dateFormat: _angular_core.InputSignal<string>;
57
58
  /**
@@ -86,9 +87,38 @@ declare class DatePickerComponent implements OnInit, OnDestroy, ControlValueAcce
86
87
  * @property {InputSignal<boolean>} showSeconds
87
88
  * @description
88
89
  * Whether to show seconds in the time picker.
90
+ * Only applicable when hourFormat is '24'.
89
91
  * @default false
90
92
  */
91
93
  showSeconds: _angular_core.InputSignal<boolean>;
94
+ /**
95
+ * @property {InputSignal<boolean>} inline
96
+ * @description
97
+ * Whether to display the datepicker inline.
98
+ * @default false
99
+ */
100
+ inline: _angular_core.InputSignal<boolean>;
101
+ /**
102
+ * @property {InputSignal<boolean>} showTime
103
+ * @description
104
+ * Whether to show the time picker along with the date picker.
105
+ * @default false
106
+ */
107
+ showTime: _angular_core.InputSignal<boolean>;
108
+ /**
109
+ * @property {InputSignal<'12' | '24'>} hourFormat
110
+ * @description
111
+ * Format of the hours: '12' or '24'.
112
+ * @default '24'
113
+ */
114
+ hourFormat: _angular_core.InputSignal<"12" | "24">;
115
+ /**
116
+ * @property {InputSignal<string | HTMLElement | null | undefined>} appendTo
117
+ * @description
118
+ * Target element to attach the overlay to.
119
+ * @default 'body'
120
+ */
121
+ appendTo: _angular_core.InputSignal<string | HTMLElement | null | undefined>;
92
122
  /**
93
123
  * @property {InputSignal<Date | null>} maxDate
94
124
  * @description
@@ -147,6 +177,18 @@ declare class DatePickerComponent implements OnInit, OnDestroy, ControlValueAcce
147
177
  * Returns the user-provided dateFormat or timeFormat based on the variant.
148
178
  */
149
179
  effectiveDateFormat: _angular_core.Signal<string>;
180
+ /**
181
+ * @property {Signal<boolean>} effectiveShowSeconds
182
+ * @description
183
+ * Returns whether seconds should be shown, restricted to 24h format.
184
+ */
185
+ effectiveShowSeconds: _angular_core.Signal<boolean>;
186
+ /**
187
+ * @property {Signal<boolean>} effectiveShowTime
188
+ * @description
189
+ * Returns whether the time picker should be shown.
190
+ */
191
+ effectiveShowTime: _angular_core.Signal<boolean>;
150
192
  /**
151
193
  * @property {Signal<FormControl>} effectiveControl
152
194
  * @description
@@ -161,6 +203,7 @@ declare class DatePickerComponent implements OnInit, OnDestroy, ControlValueAcce
161
203
  onChange: (value: DateValue) => void;
162
204
  onTouched: () => void;
163
205
  private readonly sub;
206
+ private lastValue;
164
207
  ngOnInit(): void;
165
208
  ngOnDestroy(): void;
166
209
  writeValue(value: DateValue): void;
@@ -173,6 +216,13 @@ declare class DatePickerComponent implements OnInit, OnDestroy, ControlValueAcce
173
216
  * Called when the PrimeNG DatePicker template updates the value.
174
217
  */
175
218
  onModelChange(value: DateValue): void;
219
+ /**
220
+ * @method applyTimeCascading
221
+ * @private
222
+ * @description
223
+ * Adjusts the date when minutes or seconds wrap around.
224
+ */
225
+ private applyTimeCascading;
176
226
  /**
177
227
  * @method onBlur
178
228
  * @description
@@ -186,7 +236,7 @@ declare class DatePickerComponent implements OnInit, OnDestroy, ControlValueAcce
186
236
  */
187
237
  clear(): void;
188
238
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DatePickerComponent, never>;
189
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatePickerComponent, "tk-date-picker", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "readonlyInput": { "alias": "readonlyInput"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "showIcon": { "alias": "showIcon"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "stepHour": { "alias": "stepHour"; "required": false; "isSignal": true; }; "stepMinute": { "alias": "stepMinute"; "required": false; "isSignal": true; }; "stepSecond": { "alias": "stepSecond"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "labelText": { "alias": "labelText"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "modelValue": { "alias": "modelValue"; "required": false; "isSignal": true; }; }, { "modelValue": "modelValueChange"; "handleSelect": "handleSelect"; "handleClear": "handleClear"; }, never, never, true, never>;
239
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatePickerComponent, "tk-date-picker", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "readonlyInput": { "alias": "readonlyInput"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "showIcon": { "alias": "showIcon"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "stepHour": { "alias": "stepHour"; "required": false; "isSignal": true; }; "stepMinute": { "alias": "stepMinute"; "required": false; "isSignal": true; }; "stepSecond": { "alias": "stepSecond"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; "showTime": { "alias": "showTime"; "required": false; "isSignal": true; }; "hourFormat": { "alias": "hourFormat"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "labelText": { "alias": "labelText"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "modelValue": { "alias": "modelValue"; "required": false; "isSignal": true; }; }, { "modelValue": "modelValueChange"; "handleSelect": "handleSelect"; "handleClear": "handleClear"; }, never, never, true, never>;
190
240
  }
191
241
 
192
242
  export { DatePickerComponent };