@odx/angular 12.21.5 → 12.22.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.
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from 'tslib';
2
2
  import * as i1$1 from '@angular/cdk/a11y';
3
3
  import { A11yModule } from '@angular/cdk/a11y';
4
4
  import * as i0 from '@angular/core';
5
- import { inject, EventEmitter, HostListener, Output, Directive, input, booleanAttribute, ElementRef, ContentChild, ViewChild, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
5
+ import { inject, EventEmitter, HostListener, Output, Directive, input, booleanAttribute, ElementRef, ContentChild, ViewChild, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, effect, forwardRef, NgModule } from '@angular/core';
6
6
  import * as i1 from '@odx/angular';
7
7
  import { ReadonlyController, WithTabIndex, detectControllerChanges, CoreModule } from '@odx/angular';
8
8
  import { InputControlDirective, CustomFormControl } from '@odx/angular/cdk/custom-form-control';
@@ -16,9 +16,11 @@ import { DropdownModule, DropdownDirective } from '@odx/angular/components/dropd
16
16
  import { IconComponent } from '@odx/angular/components/icon';
17
17
  import { CSSComponent } from '@odx/angular/internal';
18
18
  import { untilDestroyed, injectElement, deferFn } from '@odx/angular/utils';
19
- import { startOfDay, format } from 'date-fns';
19
+ import { startOfDay, format, isBefore, isAfter } from 'date-fns';
20
+ import { distinctUntilChanged } from 'rxjs';
20
21
  import * as i2 from 'ngx-mask';
21
22
  import { NgxMaskDirective, provideNgxMask } from 'ngx-mask';
23
+ import { NG_VALIDATORS } from '@angular/forms';
22
24
 
23
25
  /**
24
26
  * A directive to enhance an input element as part of a datepicker control. It applies date input formatting,
@@ -171,7 +173,7 @@ let DatepickerComponent = class DatepickerComponent extends CustomFormControl {
171
173
  * @emits {Date}
172
174
  */
173
175
  this.selectedChange = new EventEmitter();
174
- detectControllerChanges(this).subscribe();
176
+ detectControllerChanges(this).pipe(this.takeUntilDestroyed()).subscribe();
175
177
  }
176
178
  ngAfterViewInit() {
177
179
  this.handleDateFieldChanges();
@@ -227,10 +229,10 @@ let DatepickerComponent = class DatepickerComponent extends CustomFormControl {
227
229
  }
228
230
  handleDateFieldChanges() {
229
231
  initNgxMask(this.dateField?.ngxMaskDirective, getDateInputMask(this.config));
230
- this.dateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe(() => {
232
+ this.dateField?.valueChange$.pipe(distinctUntilChanged(), this.takeUntilDestroyed()).subscribe(() => {
231
233
  if (!this.dateField?.valueAsDate)
232
234
  return;
233
- this.updateValue(this.dateField?.valueAsDate ?? null);
235
+ this.updateValue(this.dateField?.valueAsDate);
234
236
  });
235
237
  }
236
238
  handleDateFieldFocus() {
@@ -283,10 +285,112 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
283
285
  args: ['keydown.alt.ArrowDown', ['$event']]
284
286
  }] } });
285
287
 
286
- const modules = [DatepickerComponent, DatepickerInputControlDirective];
288
+ /**
289
+ * A validation directive to be used with date picker controls that have filtering capabilities.
290
+ */
291
+ class DatepickerFilterValidator {
292
+ constructor() {
293
+ this.filterFn = input(null);
294
+ effect(() => {
295
+ this.filterFn();
296
+ this.onChange?.();
297
+ });
298
+ }
299
+ registerOnValidatorChange(fn) {
300
+ this.onChange = fn;
301
+ }
302
+ validate(control) {
303
+ const controlValue = control.value;
304
+ const filterFn = this.filterFn();
305
+ if (!controlValue || !filterFn) {
306
+ return null;
307
+ }
308
+ return filterFn(controlValue) ? { filter: true } : null;
309
+ }
310
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatepickerFilterValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
311
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DatepickerFilterValidator, isStandalone: true, selector: "odx-datepicker[filterFn]", inputs: { filterFn: { classPropertyName: "filterFn", publicName: "filterFn", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
312
+ {
313
+ provide: NG_VALIDATORS,
314
+ useExisting: forwardRef(() => DatepickerFilterValidator),
315
+ multi: true,
316
+ },
317
+ ], ngImport: i0 }); }
318
+ }
319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatepickerFilterValidator, decorators: [{
320
+ type: Directive,
321
+ args: [{
322
+ standalone: true,
323
+ selector: 'odx-datepicker[filterFn]',
324
+ providers: [
325
+ {
326
+ provide: NG_VALIDATORS,
327
+ useExisting: forwardRef(() => DatepickerFilterValidator),
328
+ multi: true,
329
+ },
330
+ ],
331
+ }]
332
+ }], ctorParameters: () => [] });
333
+
334
+ /**
335
+ * A validation directive to be used with date picker controls that have minimum and maximum date constraints.
336
+ */
337
+ class DatepickerMinMaxValidator {
338
+ constructor() {
339
+ this.minDate = input(null);
340
+ this.maxDate = input(null);
341
+ effect(() => {
342
+ this.minDate();
343
+ this.maxDate();
344
+ this.onChange?.();
345
+ });
346
+ }
347
+ registerOnValidatorChange(fn) {
348
+ this.onChange = fn;
349
+ }
350
+ validate(control) {
351
+ const controlValue = control.value;
352
+ if (!controlValue) {
353
+ return null;
354
+ }
355
+ const givenDate = startOfDay(controlValue);
356
+ const min = this.minDate() ? startOfDay(this.minDate()) : null;
357
+ const max = this.maxDate() ? startOfDay(this.maxDate()) : null;
358
+ if (min && isBefore(givenDate, min)) {
359
+ return { minDate: true };
360
+ }
361
+ if (max && isAfter(givenDate, max)) {
362
+ return { maxDate: true };
363
+ }
364
+ return null;
365
+ }
366
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatepickerMinMaxValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
367
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DatepickerMinMaxValidator, isStandalone: true, selector: "odx-datepicker[minDate], odx-datepicker[maxDate]", inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
368
+ {
369
+ provide: NG_VALIDATORS,
370
+ useExisting: forwardRef(() => DatepickerMinMaxValidator),
371
+ multi: true,
372
+ },
373
+ ], ngImport: i0 }); }
374
+ }
375
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatepickerMinMaxValidator, decorators: [{
376
+ type: Directive,
377
+ args: [{
378
+ standalone: true,
379
+ selector: 'odx-datepicker[minDate], odx-datepicker[maxDate]',
380
+ providers: [
381
+ {
382
+ provide: NG_VALIDATORS,
383
+ useExisting: forwardRef(() => DatepickerMinMaxValidator),
384
+ multi: true,
385
+ },
386
+ ],
387
+ }]
388
+ }], ctorParameters: () => [] });
389
+
390
+ const modules = [DatepickerComponent, DatepickerInputControlDirective, DatepickerMinMaxValidator, DatepickerFilterValidator];
287
391
  class DatepickerModule {
288
392
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
289
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: DatepickerModule, imports: [DatepickerComponent, DatepickerInputControlDirective], exports: [CoreModule, DatepickerComponent, DatepickerInputControlDirective] }); }
393
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: DatepickerModule, imports: [DatepickerComponent, DatepickerInputControlDirective, DatepickerMinMaxValidator, DatepickerFilterValidator], exports: [CoreModule, DatepickerComponent, DatepickerInputControlDirective, DatepickerMinMaxValidator, DatepickerFilterValidator] }); }
290
394
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatepickerModule, imports: [DatepickerComponent, CoreModule] }); }
291
395
  }
292
396
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatepickerModule, decorators: [{
@@ -301,5 +405,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
301
405
  * Generated bundle index. Do not edit.
302
406
  */
303
407
 
304
- export { DatepickerComponent, DatepickerInputControlDirective, DatepickerModule };
408
+ export { DatepickerComponent, DatepickerFilterValidator, DatepickerInputControlDirective, DatepickerMinMaxValidator, DatepickerModule };
305
409
  //# sourceMappingURL=odx-angular-components-datepicker.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-components-datepicker.mjs","sources":["../../../../libs/angular/components/datepicker/src/lib/directives/datepicker-input-control.directive.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.component.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.component.html","../../../../libs/angular/components/datepicker/src/lib/datepicker.module.ts","../../../../libs/angular/components/datepicker/src/odx-angular-components-datepicker.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, inject, Output } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputValueAsDate, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgxMaskDirective, provideNgxMask } from 'ngx-mask';\n\n/**\n * A directive to enhance an input element as part of a datepicker control. It applies date input formatting,\n * mask handling, and emits focus events. This directive integrates with ngx-mask to handle input masking and\n * ensures that the input complies with the date format specified in the datepicker configuration.\n * Extends the `InputControlDirective` to provide input control functionality.\n * Has host directive `WithTabIndex` to manage the tabindex attribute of the input element.\n *\n * @see {InputControlDirective}\n * @see {WithTabIndex}\n */\n@CSSComponent('datepicker__control')\n@Directive({\n standalone: true,\n selector: 'input[odxDatepickerControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n '[attr.placeholder]': 'placeholder',\n },\n providers: [ReadonlyController.connect(), provideNgxMask({ validation: false, leadZeroDateTime: true })],\n hostDirectives: [WithTabIndex, NgxMaskDirective],\n})\nexport class DatepickerInputControlDirective extends InputControlDirective {\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly config = injectDateConfig();\n public readonly ngxMaskDirective = inject(NgxMaskDirective);\n\n /**\n * Emits an event when the input field receives focus or loses focus, indicating the focus state.\n *\n * @emits {boolean} - Indicates whether the input field is focused.\n */\n @Output()\n public focused = new EventEmitter<boolean>();\n\n /**\n * Gets the current value of the input field as a `Date` object, based on the date format from the datepicker\n * configuration.\n *\n * @returns {Date | null} - The current value of the input field as a `Date` object, or `null` if the value is invalid.\n */\n public get valueAsDate(): Date | null {\n return getDateInputValueAsDate(this.config, this.nativeElementValue);\n }\n\n /**\n * Computes the placeholder text for the input based on the date format from\n * the datepicker configuration.\n *\n * @returns {string} - The placeholder text, typically the date format in uppercase.\n */\n public get placeholder(): string {\n return getDateInputFormat(this.config).toUpperCase();\n }\n\n @HostListener('focusin')\n protected handleFocusIn(): void {\n this.focused.emit(true);\n }\n\n @HostListener('focusout')\n protected handleFocusOut(): void {\n this.focused.emit(false);\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n input,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { detectControllerChanges } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputMask, initNgxMask, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { CalendarComponent, DateFilter } from '@odx/angular/components/calendar';\nimport { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, injectElement, Position, untilDestroyed } from '@odx/angular/utils';\nimport { format, startOfDay } from 'date-fns';\nimport { DatepickerInputControlDirective } from './directives';\n\n/**\n * Represents a datepicker component for selecting a date.\n * Extends the `CustomFormControl` class and implements the `AfterViewInit` interface.\n *\n * @see {CustomFormControl}\n */\n@CSSComponent('datepicker')\n@Component({\n selector: 'odx-datepicker',\n standalone: true,\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, CalendarComponent, DropdownModule, IconComponent],\n templateUrl: './datepicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class DatepickerComponent extends CustomFormControl<Date | null> implements AfterViewInit {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n protected readonly config = injectDateConfig();\n\n public readonly element = injectElement();\n\n /**\n * Gets a value indicating whether the datepicker is currently open.\n *\n * @returns {boolean}\n */\n public get isOpen(): boolean {\n return !!this.dropdown.isOpen;\n }\n\n /**\n * Represents the current date.\n *\n * @type {Date}\n */\n public today = new Date();\n\n /**\n * The filter function used to determine if a date should be included or excluded in the datepicker.\n * If set to `null`, no filtering will be applied.\n *\n * @type {DateFilter | null}\n * @default null\n *\n * @example\n * ```ts\n * // Excludes mondays from the datepicker.\n * const filterFn: DateFilter = (date) => date.getDay() !== 1;\n * ```\n */\n @Input()\n public filterFn: DateFilter | null = null;\n\n /**\n * The minimum selectable date for the datepicker.\n * If set to null, there is no minimum date restriction.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public minDate: Date | null = null;\n\n /**\n * The maximum selectable date for the datepicker.\n * If set to null, there is no maximum date restriction.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public maxDate: Date | null = null;\n\n /**\n * The position of the dropdown relative to the input field.\n *\n * @type {Position}\n * @default Position.BOTTOM\n */\n @Input()\n public dropdownPosition: Position = 'bottom';\n\n /**\n * When set to true, the select will display a reset button.\n *\n * @type {boolean}\n * @default false\n */\n public clearable = input(false, { transform: booleanAttribute });\n\n /**\n * Emits the selected date when it changes.\n *\n * @emits {Date}\n */\n @Output()\n public selectedChange = new EventEmitter<Date>();\n\n /**\n * The dropdown directive used in the datepicker component.\n *\n * @type {DropdownDirective}\n */\n @ViewChild(DropdownDirective)\n public dropdown!: DropdownDirective;\n\n /**\n * The dropdown trigger element used in the datepicker component.\n *\n * @type {ElementRef<HTMLElement>}\n */\n @ViewChild('dropdownTrigger', { read: ElementRef, static: true })\n public dropdownTriggerElement!: ElementRef<HTMLElement>;\n\n /**\n * The date field input control directive used in the datepicker component.\n *\n * @type {DatepickerInputControlDirective | undefined}\n */\n @ContentChild(DatepickerInputControlDirective)\n public dateField?: DatepickerInputControlDirective;\n\n constructor() {\n super(null);\n detectControllerChanges(this).subscribe();\n }\n\n public ngAfterViewInit(): void {\n this.handleDateFieldChanges();\n this.handleDateFieldFocus();\n\n deferFn(() => {\n if (!this.value) return;\n this.updateDateField(startOfDay(this.value));\n });\n }\n\n /**\n * Selects a date.\n *\n * @param {Date | null} value - The date value to be selected.\n */\n public selectDate(value: Date | null): void {\n if (!value) return;\n\n this.updateInternalValue(value);\n\n this.selectedChange.emit(value);\n\n this.dropdown.close();\n }\n\n /**\n * Resets the datepicker's value to null.\n */\n public reset(): void {\n this.updateInternalValue(null);\n }\n\n /**\n * @internal\n * Writes a new value to the element.\n * Part of the ControlValueAccessor interface.\n * @param {Date | null} value - The new value.\n */\n public override writeValue(value: Date | null): void {\n super.writeValue(value);\n this.updateDateField(value);\n }\n\n /**\n * Opens the datepicker dropdown.\n *\n * @param {KeyboardEvent} event\n */\n @HostListener('keydown.alt.ArrowDown', ['$event'])\n public openDatepicker(event?: KeyboardEvent) {\n event?.stopPropagation();\n\n if (this.isReadonly || this.isDisabled) return;\n\n this.dropdown.open(event);\n }\n\n protected updateInternalValue(value: Date | null): void {\n this.updateValue(value);\n this.updateDateField(value);\n }\n\n protected handleDateFieldChanges(): void {\n initNgxMask(this.dateField?.ngxMaskDirective, getDateInputMask(this.config));\n this.dateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe(() => {\n if (!this.dateField?.valueAsDate) return;\n this.updateValue(this.dateField?.valueAsDate ?? null);\n });\n }\n\n protected handleDateFieldFocus(): void {\n this.dateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {\n if (!isFocused) {\n this.onTouched();\n }\n if (this.isOpen) {\n this.dropdown.close();\n }\n });\n }\n\n private updateDateField(date: Date | null): void {\n if (!this.dateField) return;\n\n const dateFormat = getDateInputFormat(this.config);\n this.dateField.nativeElementValue = date ? format(date, dateFormat) : '';\n }\n}\n","<ng-content select=\"input[odxDatepickerControl]\" />\n\n<odx-action-group class=\"odx-datepicker__trigger-wrapper\">\n @if (clearable() && value) {\n <button odxButton class=\"odx-datepicker__clear\" (click)=\"reset()\" size=\"small\" aria-label=\"Reset time\">\n <odx-icon name=\"close\" iconSet=\"core\" />\n </button>\n }\n <button\n #dropdownTrigger\n odxButton\n size=\"small\"\n variant=\"ghost\"\n class=\"odx-datepicker__trigger\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: dropdownPosition }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n >\n <odx-icon name=\"calendar\" />\n </button>\n <ng-content select=\"[odxButton]\" ngProjectAs=\"[odxButton]\" />\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"value || today\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (selectedDateChange)=\"selectDate($event)\"\n />\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DatepickerComponent } from './datepicker.component';\nimport { DatepickerInputControlDirective } from './directives';\n\nconst modules = [DatepickerComponent, DatepickerInputControlDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class DatepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;;;AASG;AAYI,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,qBAAqB,CAAA;AAAnE,IAAA,WAAA,GAAA;;AACc,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE;QAChD,IAAA,CAAA,MAAM,GAAG,gBAAgB,EAAE;AAC9B,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAE3D;;;;AAIG;AAEI,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAW;AA+B7C,IAAA;AA7BC;;;;;AAKG;AACH,IAAA,IAAW,WAAW,GAAA;QACpB,OAAO,uBAAuB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC;IACtE;AAEA;;;;;AAKG;AACH,IAAA,IAAW,WAAW,GAAA;QACpB,OAAO,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE;IACtD;IAGU,aAAa,GAAA;AACrB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;IACzB;IAGU,cAAc,GAAA;AACtB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;IAC1B;+GAzCW,+BAA+B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CA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AO,EAAA,CAAA;sBADb;gBAWM,OAAO,EAAA,CAAA;sBADb;gBAUM,gBAAgB,EAAA,CAAA;sBADtB;gBAiBM,cAAc,EAAA,CAAA;sBADpB;gBASM,QAAQ,EAAA,CAAA;sBADd,SAAS;uBAAC,iBAAiB;gBASrB,sBAAsB,EAAA,CAAA;sBAD5B,SAAS;uBAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;gBASzD,SAAS,EAAA,CAAA;sBADf,YAAY;uBAAC,+BAA+B;gBAyDtC,cAAc,EAAA,CAAA;sBADpB,YAAY;uBAAC,uBAAuB,EAAE,CAAC,QAAQ,CAAC;;;AExMnD,MAAM,OAAO,GAAG,CAAC,mBAAmB,EAAE,+BAA+B,CAAC;MAMzD,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAhB,gBAAgB,EAAA,OAAA,EAAA,CANZ,mBAAmB,EAAE,+BAA+B,aAIzD,UAAU,EAJL,mBAAmB,EAAE,+BAA+B,CAAA,EAAA,CAAA,CAAA;gHAMxD,gBAAgB,EAAA,OAAA,EAAA,CANZ,mBAAmB,EAIxB,UAAU,CAAA,EAAA,CAAA,CAAA;;4FAET,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-components-datepicker.mjs","sources":["../../../../libs/angular/components/datepicker/src/lib/directives/datepicker-input-control.directive.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.component.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.component.html","../../../../libs/angular/components/datepicker/src/lib/validators/filter.validator.ts","../../../../libs/angular/components/datepicker/src/lib/validators/minmax.validator.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.module.ts","../../../../libs/angular/components/datepicker/src/odx-angular-components-datepicker.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, inject, Output } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputValueAsDate, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgxMaskDirective, provideNgxMask } from 'ngx-mask';\n\n/**\n * A directive to enhance an input element as part of a datepicker control. It applies date input formatting,\n * mask handling, and emits focus events. This directive integrates with ngx-mask to handle input masking and\n * ensures that the input complies with the date format specified in the datepicker configuration.\n * Extends the `InputControlDirective` to provide input control functionality.\n * Has host directive `WithTabIndex` to manage the tabindex attribute of the input element.\n *\n * @see {InputControlDirective}\n * @see {WithTabIndex}\n */\n@CSSComponent('datepicker__control')\n@Directive({\n standalone: true,\n selector: 'input[odxDatepickerControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n '[attr.placeholder]': 'placeholder',\n },\n providers: [ReadonlyController.connect(), provideNgxMask({ validation: false, leadZeroDateTime: true })],\n hostDirectives: [WithTabIndex, NgxMaskDirective],\n})\nexport class DatepickerInputControlDirective extends InputControlDirective {\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly config = injectDateConfig();\n public readonly ngxMaskDirective = inject(NgxMaskDirective);\n\n /**\n * Emits an event when the input field receives focus or loses focus, indicating the focus state.\n *\n * @emits {boolean} - Indicates whether the input field is focused.\n */\n @Output()\n public focused = new EventEmitter<boolean>();\n\n /**\n * Gets the current value of the input field as a `Date` object, based on the date format from the datepicker\n * configuration.\n *\n * @returns {Date | null} - The current value of the input field as a `Date` object, or `null` if the value is invalid.\n */\n public get valueAsDate(): Date | null {\n return getDateInputValueAsDate(this.config, this.nativeElementValue);\n }\n\n /**\n * Computes the placeholder text for the input based on the date format from\n * the datepicker configuration.\n *\n * @returns {string} - The placeholder text, typically the date format in uppercase.\n */\n public get placeholder(): string {\n return getDateInputFormat(this.config).toUpperCase();\n }\n\n @HostListener('focusin')\n protected handleFocusIn(): void {\n this.focused.emit(true);\n }\n\n @HostListener('focusout')\n protected handleFocusOut(): void {\n this.focused.emit(false);\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n input,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { detectControllerChanges } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputMask, initNgxMask, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { CalendarComponent, DateFilter } from '@odx/angular/components/calendar';\nimport { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, injectElement, Position, untilDestroyed } from '@odx/angular/utils';\nimport { format, startOfDay } from 'date-fns';\nimport { distinctUntilChanged } from 'rxjs';\nimport { DatepickerInputControlDirective } from './directives';\n\n/**\n * Represents a datepicker component for selecting a date.\n * Extends the `CustomFormControl` class and implements the `AfterViewInit` interface.\n *\n * @see {CustomFormControl}\n */\n@CSSComponent('datepicker')\n@Component({\n selector: 'odx-datepicker',\n standalone: true,\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, CalendarComponent, DropdownModule, IconComponent],\n templateUrl: './datepicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class DatepickerComponent extends CustomFormControl<Date | null> implements AfterViewInit {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n protected readonly config = injectDateConfig();\n\n public readonly element = injectElement();\n\n /**\n * Gets a value indicating whether the datepicker is currently open.\n *\n * @returns {boolean}\n */\n public get isOpen(): boolean {\n return !!this.dropdown.isOpen;\n }\n\n /**\n * Represents the current date.\n *\n * @type {Date}\n */\n public today = new Date();\n\n /**\n * The filter function used to determine if a date should be included or excluded in the datepicker.\n * If set to `null`, no filtering will be applied.\n *\n * @type {DateFilter | null}\n * @default null\n *\n * @example\n * ```ts\n * // Excludes mondays from the datepicker.\n * const filterFn: DateFilter = (date) => date.getDay() !== 1;\n * ```\n */\n @Input()\n public filterFn: DateFilter | null = null;\n\n /**\n * The minimum selectable date for the datepicker.\n * If set to null, there is no minimum date restriction.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public minDate: Date | null = null;\n\n /**\n * The maximum selectable date for the datepicker.\n * If set to null, there is no maximum date restriction.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public maxDate: Date | null = null;\n\n /**\n * The position of the dropdown relative to the input field.\n *\n * @type {Position}\n * @default Position.BOTTOM\n */\n @Input()\n public dropdownPosition: Position = 'bottom';\n\n /**\n * When set to true, the select will display a reset button.\n *\n * @type {boolean}\n * @default false\n */\n public clearable = input(false, { transform: booleanAttribute });\n\n /**\n * Emits the selected date when it changes.\n *\n * @emits {Date}\n */\n @Output()\n public selectedChange = new EventEmitter<Date>();\n\n /**\n * The dropdown directive used in the datepicker component.\n *\n * @type {DropdownDirective}\n */\n @ViewChild(DropdownDirective)\n public dropdown!: DropdownDirective;\n\n /**\n * The dropdown trigger element used in the datepicker component.\n *\n * @type {ElementRef<HTMLElement>}\n */\n @ViewChild('dropdownTrigger', { read: ElementRef, static: true })\n public dropdownTriggerElement!: ElementRef<HTMLElement>;\n\n /**\n * The date field input control directive used in the datepicker component.\n *\n * @type {DatepickerInputControlDirective | undefined}\n */\n @ContentChild(DatepickerInputControlDirective)\n public dateField?: DatepickerInputControlDirective;\n\n constructor() {\n super(null);\n detectControllerChanges(this).pipe(this.takeUntilDestroyed()).subscribe();\n }\n\n public ngAfterViewInit(): void {\n this.handleDateFieldChanges();\n this.handleDateFieldFocus();\n\n deferFn(() => {\n if (!this.value) return;\n this.updateDateField(startOfDay(this.value));\n });\n }\n\n /**\n * Selects a date.\n *\n * @param {Date | null} value - The date value to be selected.\n */\n public selectDate(value: Date | null): void {\n if (!value) return;\n\n this.updateInternalValue(value);\n\n this.selectedChange.emit(value);\n\n this.dropdown.close();\n }\n\n /**\n * Resets the datepicker's value to null.\n */\n public reset(): void {\n this.updateInternalValue(null);\n }\n\n /**\n * @internal\n * Writes a new value to the element.\n * Part of the ControlValueAccessor interface.\n * @param {Date | null} value - The new value.\n */\n public override writeValue(value: Date | null): void {\n super.writeValue(value);\n this.updateDateField(value);\n }\n\n /**\n * Opens the datepicker dropdown.\n *\n * @param {KeyboardEvent} event\n */\n @HostListener('keydown.alt.ArrowDown', ['$event'])\n public openDatepicker(event?: KeyboardEvent) {\n event?.stopPropagation();\n\n if (this.isReadonly || this.isDisabled) return;\n\n this.dropdown.open(event);\n }\n\n protected updateInternalValue(value: Date | null): void {\n this.updateValue(value);\n this.updateDateField(value);\n }\n\n protected handleDateFieldChanges(): void {\n initNgxMask(this.dateField?.ngxMaskDirective, getDateInputMask(this.config));\n this.dateField?.valueChange$.pipe(distinctUntilChanged(), this.takeUntilDestroyed()).subscribe(() => {\n if (!this.dateField?.valueAsDate) return;\n this.updateValue(this.dateField?.valueAsDate);\n });\n }\n\n protected handleDateFieldFocus(): void {\n this.dateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {\n if (!isFocused) {\n this.onTouched();\n }\n if (this.isOpen) {\n this.dropdown.close();\n }\n });\n }\n\n private updateDateField(date: Date | null): void {\n if (!this.dateField) return;\n\n const dateFormat = getDateInputFormat(this.config);\n this.dateField.nativeElementValue = date ? format(date, dateFormat) : '';\n }\n}\n","<ng-content select=\"input[odxDatepickerControl]\" />\n\n<odx-action-group class=\"odx-datepicker__trigger-wrapper\">\n @if (clearable() && value) {\n <button odxButton class=\"odx-datepicker__clear\" (click)=\"reset()\" size=\"small\" aria-label=\"Reset time\">\n <odx-icon name=\"close\" iconSet=\"core\" />\n </button>\n }\n <button\n #dropdownTrigger\n odxButton\n size=\"small\"\n variant=\"ghost\"\n class=\"odx-datepicker__trigger\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: dropdownPosition }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n >\n <odx-icon name=\"calendar\" />\n </button>\n <ng-content select=\"[odxButton]\" ngProjectAs=\"[odxButton]\" />\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"value || today\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (selectedDateChange)=\"selectDate($event)\"\n />\n</ng-template>\n","import { Directive, effect, forwardRef, input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { DateFilter } from '@odx/angular/components/calendar';\n/**\n * A validation directive to be used with date picker controls that have filtering capabilities.\n */\n@Directive({\n standalone: true,\n selector: 'odx-datepicker[filterFn]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatepickerFilterValidator),\n multi: true,\n },\n ],\n})\nexport class DatepickerFilterValidator implements Validator {\n private onChange?: () => void;\n public filterFn = input<DateFilter | null>(null);\n\n constructor() {\n effect(() => {\n this.filterFn();\n this.onChange?.();\n });\n }\n\n public registerOnValidatorChange(fn: () => void) {\n this.onChange = fn;\n }\n\n public validate(control: AbstractControl): ValidationErrors | null {\n const controlValue = control.value as Date | null;\n const filterFn = this.filterFn();\n\n if (!controlValue || !filterFn) {\n return null;\n }\n\n return filterFn(controlValue) ? { filter: true } : null;\n }\n}\n","import { Directive, effect, forwardRef, input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { isAfter, isBefore, startOfDay } from 'date-fns';\n\n/**\n * A validation directive to be used with date picker controls that have minimum and maximum date constraints.\n */\n@Directive({\n standalone: true,\n selector: 'odx-datepicker[minDate], odx-datepicker[maxDate]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatepickerMinMaxValidator),\n multi: true,\n },\n ],\n})\nexport class DatepickerMinMaxValidator implements Validator {\n private onChange?: () => void;\n public minDate = input<Date | null>(null);\n public maxDate = input<Date | null>(null);\n\n constructor() {\n effect(() => {\n this.minDate();\n this.maxDate();\n this.onChange?.();\n });\n }\n\n public registerOnValidatorChange(fn: () => void) {\n this.onChange = fn;\n }\n\n public validate(control: AbstractControl): ValidationErrors | null {\n const controlValue = control.value as Date | null;\n if (!controlValue) {\n return null;\n }\n const givenDate = startOfDay(controlValue);\n const min = this.minDate() ? startOfDay(this.minDate() as Date) : null;\n const max = this.maxDate() ? startOfDay(this.maxDate() as Date) : null;\n if (min && isBefore(givenDate, min)) {\n return { minDate: true };\n }\n if (max && isAfter(givenDate, max)) {\n return { maxDate: true };\n }\n return null;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DatepickerComponent } from './datepicker.component';\nimport { DatepickerInputControlDirective } from './directives';\nimport { DatepickerFilterValidator } from './validators/filter.validator';\nimport { DatepickerMinMaxValidator } from './validators/minmax.validator';\n\nconst modules = [DatepickerComponent, DatepickerInputControlDirective, DatepickerMinMaxValidator, DatepickerFilterValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class DatepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;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;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA;;;ACZD;;AAEG;;;;"}
@@ -7,6 +7,7 @@ import { OptionControl } from '@odx/angular/cdk/option-control';
7
7
  import { CSSComponent } from '@odx/angular/internal';
8
8
  import { InputControlDirective, CustomFormControl } from '@odx/angular/cdk/custom-form-control';
9
9
  import { initNgxMask, ngxMaskProviderConfig } from '@odx/angular/cdk/date-input';
10
+ import { isString, untilDestroyed, injectElement, isFunction } from '@odx/angular/utils';
10
11
  import * as i2 from 'ngx-mask';
11
12
  import { NgxMaskDirective, provideNgxMask } from 'ngx-mask';
12
13
  import { isBefore, isEqual, isAfter } from 'date-fns';
@@ -16,7 +17,6 @@ import { ButtonComponent } from '@odx/angular/components/button';
16
17
  import * as i2$1 from '@odx/angular/components/dropdown';
17
18
  import { DropdownModule, DropdownDirective } from '@odx/angular/components/dropdown';
18
19
  import { IconComponent } from '@odx/angular/components/icon';
19
- import { untilDestroyed, injectElement, isFunction } from '@odx/angular/utils';
20
20
 
21
21
  /**
22
22
  * An InjectionToken used for injecting an instance of TimepickerComponent.
@@ -277,6 +277,15 @@ let TimepickerInputControlDirective = class TimepickerInputControlDirective exte
277
277
  initNgxMask(this.ngxMaskDirective, mask);
278
278
  }
279
279
  }
280
+ /**
281
+ * Updates the input value through ngx-mask directive.
282
+ *
283
+ * @param {string | null} value - The new value to set in the input.
284
+ */
285
+ setMaskedValue(value) {
286
+ const normalized = isString(value) ? value : '';
287
+ this.ngxMaskDirective?.writeValue(normalized);
288
+ }
280
289
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TimepickerInputControlDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
281
290
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: TimepickerInputControlDirective, isStandalone: true, selector: "input[odxTimepickerControl]", host: { properties: { "attr.readonly": "isReadonly || null", "attr.placeholder": "placeholder" } }, providers: [provideNgxMask(ngxMaskProviderConfig)], usesInheritance: true, hostDirectives: [{ directive: i1.WithTabIndex }, { directive: i1.WithDisabledState }, { directive: i2.NgxMaskDirective }], ngImport: i0 }); }
282
291
  };
@@ -370,7 +379,7 @@ let TimepickerComponent = class TimepickerComponent extends CustomFormControl {
370
379
  if (this.value && this.dateField) {
371
380
  const time = this.timepickerService.getLocalizedTimeFormat(this.value);
372
381
  this.updateValue(time);
373
- this.dateField.nativeElementValue = time;
382
+ this.dateField.setMaskedValue(time);
374
383
  }
375
384
  this._useLocale = val;
376
385
  }
@@ -491,9 +500,12 @@ let TimepickerComponent = class TimepickerComponent extends CustomFormControl {
491
500
  this.updateValue(null);
492
501
  return;
493
502
  }
494
- if (this.timepickerService.is12HourFormat(normalized) === this._useLocale) {
495
- this.updateValue(this.timepickerService.getLocalizedTimeFormat(normalized));
496
- }
503
+ if (!this.timepickerService.isValidTime(normalized))
504
+ return;
505
+ const is12HourInput = this.timepickerService.is12HourFormat(normalized);
506
+ if (is12HourInput !== this._useLocale)
507
+ return;
508
+ this.updateValue(this.timepickerService.getLocalizedTimeFormat(normalized));
497
509
  });
498
510
  }
499
511
  resetValue(e) {
@@ -529,7 +541,7 @@ let TimepickerComponent = class TimepickerComponent extends CustomFormControl {
529
541
  updateInputValue() {
530
542
  if (!this.dateField)
531
543
  return;
532
- this.dateField.nativeElementValue = this.timepickerService.getLocalizedTimeFormat(this.value);
544
+ this.dateField.setMaskedValue(this.timepickerService.getLocalizedTimeFormat(this.value));
533
545
  }
534
546
  scrollToActiveOption(option, _opts = {}) {
535
547
  if (isFunction(option.element.nativeElement.scrollIntoView)) {
@@ -540,7 +552,7 @@ let TimepickerComponent = class TimepickerComponent extends CustomFormControl {
540
552
  if (!option || option.disabled)
541
553
  return;
542
554
  const time = this.timepickerService.getLocalizedTimeFormat(option.getLabel());
543
- this.dateField && (this.dateField.nativeElementValue = time);
555
+ this.dateField?.setMaskedValue(time);
544
556
  this.updateValue(time);
545
557
  }
546
558
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-components-timepicker.mjs","sources":["../../../../libs/angular/components/timepicker/src/lib/timepicker.token.ts","../../../../libs/angular/components/timepicker/src/lib/components/timepicker-option.component.ts","../../../../libs/angular/components/timepicker/src/lib/timepicker.service.ts","../../../../libs/angular/components/timepicker/src/lib/directives/timepicker-input-control.directive.ts","../../../../libs/angular/components/timepicker/src/lib/utils/generate-time-stamps.ts","../../../../libs/angular/components/timepicker/src/lib/timepicker.component.ts","../../../../libs/angular/components/timepicker/src/lib/timepicker.component.html","../../../../libs/angular/components/timepicker/src/lib/timepicker.module.ts","../../../../libs/angular/components/timepicker/src/lib/utils/ngx-mask-helper.ts","../../../../libs/angular/components/timepicker/src/odx-angular-components-timepicker.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { TimepickerComponent } from './timepicker.component';\n\n/**\n * An InjectionToken used for injecting an instance of TimepickerComponent.\n * This token facilitates the decoupling of the TimepickerComponent's implementation from its consumption,\n * allowing for more flexible and maintainable code, especially in scenarios requiring custom time picker\n * behavior or appearance.\n */\nexport const TIMEPICKER_CONTROL = new InjectionToken<TimepickerComponent>('@odx/angular/components/timepicker::TimepickerComponent');\n","import { ChangeDetectionStrategy, Component, EventEmitter, OnInit, Output, ViewEncapsulation, inject } from '@angular/core';\nimport { DisabledController, WithDisabledState, detectControllerChanges } from '@odx/angular';\nimport { OptionControl } from '@odx/angular/cdk/option-control';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { TIMEPICKER_CONTROL } from '../timepicker.token';\n\n/**\n * Represents a selectable option within a timepicker component. This component allows for\n * individual time values to be selected from a dropdown menu as part of the timepicker interface.\n * It integrates with the timepicker's control to manage selection state and accessibility.\n *\n * @extends {OptionControl<string>}\n */\n@CSSComponent('timepicker-option')\n@Component({\n selector: 'odx-timepicker-option',\n template: `<ng-content />`,\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DisabledController.connect()],\n hostDirectives: [WithDisabledState],\n})\nexport class TimepickerOptionComponent extends OptionControl<string> implements OnInit {\n private readonly timepicker = inject(TIMEPICKER_CONTROL);\n protected readonly disabledController = DisabledController.inject();\n\n /**\n * Indicates whether this time option is currently selected.\n * @type {boolean}\n * @default false\n */\n public isSelected = false;\n /**\n * Indicates whether this time option is currently active (e.g., highlighted by keyboard navigation).\n * This is an override from the base `OptionControl`.\n * @type {boolean}\n * @default false\n */\n public override isActive = false;\n\n /**\n * Whether the option is disabled. This is used to determine whether the option should be selectable.\n *\n * @type {boolean}\n */\n public get disabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Emits an event when the option is selected, allowing the timepicker component to update its value\n * and close the dropdown.\n *\n * @emits {TimepickerOptionComponent}\n */\n @Output()\n public selected = new EventEmitter<TimepickerOptionComponent>();\n\n constructor() {\n super();\n detectControllerChanges(this.timepicker).pipe(this.takeUntilDestroyed()).subscribe();\n }\n\n public ngOnInit(): void {\n this.isSelected = this.timepicker.isTimeOptionSelected(this);\n }\n\n /**\n * Sets the active styles for the option, typically indicating that it is\n * focused or highlighted via keyboard navigation.\n */\n public setActiveStyles(): void {\n this.isActive = true;\n }\n\n protected selectOption(): void {\n this.selected.emit(this);\n }\n}\n","import { Injectable, inject, signal } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { isAfter, isBefore, isEqual } from 'date-fns';\n\n/**\n * Service to provide utility functions for timepicker components, including validation, placeholder generation, and finding the closest time.\n * It also handles locale-based time formatting.\n */\n@Injectable({ providedIn: 'root' })\nexport class TimepickerService {\n private readonly windowRef = inject(WindowRef);\n\n public useLocale = signal(false);\n\n /**\n * @deprecated Will be removed in a future major version. Use `useLocale` signal instead.\n * Generates a placeholder string for time input fields, preserving legacy API.\n */\n public getPlaceholder(apm = this.useLocale()): string {\n return apm ? '--:-- --' : '--:--';\n }\n\n /**\n * Validates if the given time is less than or equal to a maximum time constraint.\n *\n * @param {string} time - The time to validate.\n * @param {string} max - The maximum allowable time.\n * @returns {boolean} True if the time is valid (i.e., not after max), false otherwise.\n */\n public maxValidation(time: string, max: string): boolean {\n const [targetValue, maxValue] = this.convertToDates([time, max]);\n return isBefore(targetValue, maxValue) || isEqual(targetValue, maxValue);\n }\n\n /**\n * Checks if the provided value is a valid time string in HH:mm or HH:mm AM/PM format.\n * This method also acts as a type guard.\n *\n * @param {unknown} time - The value to validate.\n * @returns {time is string} True if the value is a valid time string, false otherwise.\n */\n public isValidTime(time: unknown): time is string {\n if (typeof time !== 'string') return false;\n const trimmedTime = time.trim();\n if (!trimmedTime) return false;\n return Boolean(this.parseTimeString(trimmedTime.toUpperCase()));\n }\n\n public is12HourFormat(value: string): boolean {\n return this.isValidTime(value) && !!this.parseTimeString(value.toUpperCase())?.hour12;\n }\n\n /**\n * Validates if the given time is greater than or equal to a minimum time constraint.\n *\n * @param {string} time - The time to validate.\n * @param {string} min - The minimum allowable time.\n * @returns {boolean} True if the time is valid (i.e., not before min), false otherwise.\n */\n public minValidation(time: string, min: string): boolean {\n const [targetValue, minValue] = this.convertToDates([time, min]);\n return isAfter(targetValue, minValue) || isEqual(targetValue, minValue);\n }\n\n /**\n * Finds the closest time to a target time from a list of times.\n *\n * @param {string[]} timeStamps - The list of time strings to search through (e.g., [\"10:00\", \"10:30\", \"11:00\"]).\n * @param {string} targetTime - The target time string to find the closest match for (e.g., \"10:35\").\n * @returns {string} The closest time string from the list to the target, formatted according to locale.\n */\n public findClosestDate(timeStamps: string[], targetTime: string): string {\n const [target] = this.convertToDates([targetTime]);\n const datesArray = this.convertToDates(timeStamps);\n\n if (datesArray.length === 0) return this.getLocalizedTimeFormat(targetTime);\n\n const closestDate = datesArray.reduce((prev, curr) => {\n const prevDiff = Math.abs(prev.getTime() - target.getTime());\n const currDiff = Math.abs(curr.getTime() - target.getTime());\n return currDiff < prevDiff ? curr : prev;\n });\n\n const hours = closestDate.getHours().toString().padStart(2, '0');\n const minutes = closestDate.getMinutes().toString().padStart(2, '0');\n return this.getLocalizedTimeFormat(`${hours}:${minutes}`);\n }\n\n /**\n * Formats a time string to a localized time format using Intl.DateTimeFormat.\n *\n * @param {unknown} time - The time string to format (e.g., \"14:30\").\n * @param {boolean} [hour12=false] - Specifies if the output should use 12-hour format with AM/PM notation.\n * @returns {string} The formatted time string, or an empty string if the input time is invalid.\n */\n public getLocalizedTimeFormat(time: unknown, hour12?: boolean): string {\n if (!this.isValidTime(time)) return '';\n const shouldUseHour12 = typeof hour12 === 'boolean' ? hour12 : this.useLocale();\n const locale = shouldUseHour12 ? 'en-US' : 'en-GB';\n const [date] = this.convertToDates([time]);\n return new this.windowRef.nativeWindow.Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n minute: '2-digit',\n hour12: shouldUseHour12,\n }).format(date);\n }\n\n private convertToDates(times: string[]): Date[] {\n return times.map((time) => {\n if (typeof time !== 'string') return new Date(NaN);\n const parsed = this.parseTimeString(time.toUpperCase());\n if (!parsed) return new Date(NaN);\n const { hours, minutes } = parsed;\n return new Date(2022, 11, 19, hours, minutes, 0, 0);\n });\n }\n\n private parseTimeString(time: string): { hours: number; minutes: number; hour12: boolean } | null {\n const match = time.trim().match(/^([01]?\\d|2[0-3]):([0-5]\\d)(?:\\s?(AM|PM))?$/);\n if (!match) return null;\n\n let hours = Number(match[1]);\n const minutes = Number(match[2]);\n const period = match[3]?.toUpperCase();\n\n if (period) {\n if (period === 'PM' && hours < 12) hours += 12;\n if (period === 'AM' && hours === 12) hours = 0;\n }\n\n return { hours, minutes, hour12: Boolean(period) };\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { initNgxMask, ngxMaskProviderConfig } from '@odx/angular/cdk/date-input';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgxMaskDirective, provideNgxMask } from 'ngx-mask';\nimport { TimepickerService } from '../timepicker.service';\nimport { TIMEPICKER_CONTROL } from '../timepicker.token';\n\n/**\n * Directive to enhance a standard input element for time picking, integrating mask functionality for time format.\n * It automatically adapts to locale settings provided by the enclosing `TimepickerComponent` to display time in the appropriate format.\n *\n * @extends {InputControlDirective}\n */\n@CSSComponent('timepicker__control')\n@Directive({\n standalone: true,\n selector: 'input[odxTimepickerControl]',\n host: {\n '[attr.readonly]': 'isReadonly || null',\n '[attr.placeholder]': 'placeholder',\n },\n providers: [provideNgxMask(ngxMaskProviderConfig)],\n hostDirectives: [WithTabIndex, WithDisabledState, NgxMaskDirective],\n})\nexport class TimepickerInputControlDirective extends InputControlDirective {\n private readonly timepicker = inject(TIMEPICKER_CONTROL);\n private readonly timepickerService = inject(TimepickerService);\n public readonly ngxMaskDirective = inject(NgxMaskDirective, { self: true, optional: true });\n\n /**\n * Returns the placeholder text for the input based on locale settings.\n *\n * @returns {string} The placeholder text for the input.\n */\n public get placeholder(): string {\n return this.timepickerService.useLocale() ? '--:-- --' : '--:--';\n }\n\n /**\n * Determines whether the timepicker input is readonly, based on the state of the parent timepicker component.\n *\n * @returns {boolean} `true` if the input should be readonly; otherwise, `false`.\n */\n protected get isReadonly(): boolean {\n return this.timepicker.isReadonly;\n }\n\n /**\n * Applies the time format mask to the input value, transforming and returning the masked value.\n *\n * @param {Event} event - The input event triggering the mask application.\n * @returns {string} The masked input value.\n */\n public applyMask(useLocale: boolean): void {\n if (!this.ngxMaskDirective) return;\n const mask = useLocale ? 'Hh:m0 AM' : 'Hh:m0';\n useLocale !== this.ngxMaskDirective._maskService.apm && (this.ngxMaskDirective._maskService.apm = useLocale);\n if (Object.hasOwn(this.ngxMaskDirective, '_maskValue') && this.ngxMaskDirective['_maskValue'] !== mask) {\n initNgxMask(this.ngxMaskDirective, mask);\n }\n }\n}\n","/**\n * Generates an array of time stamps within a 24-hour period based on the specified step interval.\n * The time stamps can be formatted in 24-hour format or 12-hour format with AM/PM based on locale preference.\n *\n * @param {number} step - The interval, in minutes, between each time stamp.\n * @param {boolean} useLocale - Determines if the time stamps should use the 12-hour format with AM/PM (`true`) or the 24-hour format (`false`).\n * @returns {string[]} An array of formatted time stamps as strings.\n * @example\n * ```ts\n * // Generate time stamps every 30 minutes using 24-hour format\n * generateTimeStamps(30, false);\n * // Returns [\"00:00\", \"00:30\", \"01:00\", ..., \"23:30\"]\n *\n * // Generate time stamps every 60 minutes using 12-hour format with AM/PM\n * generateTimeStamps(60, true);\n * // Returns [\"12:00 AM\", \"01:00 AM\", ..., \"11:00 PM\"]\n * ```\n */\nexport function generateTimeStamps(step: number, useLocale: boolean): string[] {\n const roundedStep = Math.round(step);\n\n return Array.from({ length: Math.ceil(24 * (60 / roundedStep)) }, (_, i) => {\n const hours = Math.floor((i * roundedStep) / 60);\n const minutes = (i * roundedStep) % 60;\n return formatTime(hours, minutes, useLocale);\n });\n}\n\n/**\n * Formats a given time as a string based on the specified hour, minute, and locale preference.\n * Can format time in either 24-hour format or 12-hour format with AM/PM.\n *\n * @param {number} hours - The hour component of the time.\n * @param {number} minutes - The minute component of the time.\n * @param {boolean} useLocale - Determines if the time should be formatted using the 12-hour format with AM/PM (`true`) or the 24-hour format (`false`).\n * @returns {string} The formatted time as a string.\n * @example\n * ```ts\n * // Format time using 24-hour format\n * formatTime(14, 30, false); // \"14:30\"\n *\n * // Format time using 12-hour format with AM/PM\n * formatTime(14, 30, true); // \"2:30 PM\"\n * ```\n */\nfunction formatTime(hours: number, minutes: number, useLocale: boolean): string {\n if (useLocale) {\n const period = hours >= 12 ? 'PM' : 'AM';\n const displayHours = hours % 12 === 0 ? 12 : hours % 12;\n return `${displayHours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')} ${period}`;\n } else {\n return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;\n }\n}\n","import { A11yModule, ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n HostListener,\n Input,\n QueryList,\n ViewChild,\n ViewChildren,\n ViewEncapsulation,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { OptionControl } from '@odx/angular/cdk/option-control';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement, isFunction, untilDestroyed } from '@odx/angular/utils';\nimport { TimepickerOptionComponent } from './components/timepicker-option.component';\nimport { TimepickerInputControlDirective } from './directives/timepicker-input-control.directive';\nimport { TimepickerService } from './timepicker.service';\nimport { TIMEPICKER_CONTROL } from './timepicker.token';\nimport { generateTimeStamps } from './utils/generate-time-stamps';\n\n/**\n * Represents a time picker component allowing users to select a time from a dropdown list.\n * This component integrates with Angular forms and supports customization for locale, time range, and step intervals.\n *\n * @see {CustomFormControl}\n */\n@CSSComponent('timepicker')\n@Component({\n standalone: true,\n selector: 'odx-timepicker',\n templateUrl: 'timepicker.component.html',\n providers: [\n DisabledController.connect(),\n ReadonlyController.connect(),\n {\n provide: TIMEPICKER_CONTROL,\n useExisting: forwardRef(() => TimepickerComponent),\n },\n TimepickerService,\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, DropdownModule, TimepickerOptionComponent, IconComponent, TimepickerInputControlDirective],\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n },\n})\nexport class TimepickerComponent extends CustomFormControl<string | null> implements AfterViewInit {\n private readonly timepickerService = inject(TimepickerService);\n private _useLocale = false;\n protected keyManager?: ActiveDescendantKeyManager<OptionControl<string>>;\n\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n @ViewChild(DropdownDirective)\n protected readonly dropdown?: DropdownDirective;\n\n @ViewChildren(TimepickerOptionComponent, { emitDistinctChangesOnly: true })\n protected options!: QueryList<TimepickerOptionComponent>;\n\n public readonly element = injectElement();\n\n /**\n * Controls whether the timepicker should use locale-specific time formats AM/PM.\n *\n * @type {boolean}\n * @default false\n */\n @Input({ transform: booleanAttribute })\n public set useLocale(val: boolean) {\n this.timepickerService.useLocale.set(val);\n this.dateField?.applyMask(val);\n if (this.value && this.dateField) {\n const time = this.timepickerService.getLocalizedTimeFormat(this.value);\n this.updateValue(time);\n this.dateField.nativeElementValue = time;\n }\n this._useLocale = val;\n }\n\n /**\n * Gets a boolean value indicating whether the locale is being used.\n *\n * @returns {boolean} A boolean value indicating whether the locale is being used.\n */\n public get useLocale(): boolean {\n return this._useLocale;\n }\n\n /**\n * When set to true, the select will display a reset button.\n *\n * @type {boolean}\n * @default false\n */\n public clearable = input(false, { transform: booleanAttribute });\n\n /**\n * Controls the step interval between time options in minutes.\n *\n * @type {number}\n * @default 30\n */\n @Input({ transform: numberAttribute })\n public step = 30;\n\n /**\n * Specifies the minimum time value that can be selected ('05:00' or '05:00 AM').\n *\n * @type {string}\n * @default '00:00'\n */\n @Input()\n public min = '00:00';\n\n /**\n * Specifies the maximum time value that can be selected ('22:00' or '10:00 PM').\n *\n * @type {string}\n * @default '23:59'\n */\n @Input()\n public max = '23:59';\n\n /**\n * The directive for the timepicker input control.\n *\n * @type {TimepickerInputControlDirective | undefined}\n */\n @ViewChild(TimepickerInputControlDirective)\n public dateField?: TimepickerInputControlDirective;\n\n constructor() {\n super(null);\n }\n\n public ngAfterViewInit(): void {\n this.handleDateFieldChanges();\n this.updateInputValue();\n }\n\n /**\n * Checks if the given time option is selected.\n *\n * @param {TimepickerOptionComponent} option - The time option to check.\n * @returns {boolean} True if the option is selected, false otherwise.\n */\n public isTimeOptionSelected(option: TimepickerOptionComponent): boolean {\n return this.value === option.value;\n }\n\n /**\n * Handles the selection of a time option from the dropdown, updating the input field and closing the dropdown.\n *\n * @param {TimepickerOptionComponent | undefined} option - The selected time option component.\n */\n public timeSelected(option?: TimepickerOptionComponent): void {\n this.setOption(option);\n this.dropdown?.isOpen && this.dropdown?.close();\n }\n\n /**\n * Determines whether the specified time is within the allowed time range.\n *\n * @param {string} time - The time to check, in 'HH:mm' or 'HH:mm AM/PM' format.\n * @returns {boolean} True if the time is within the range; otherwise, false.\n */\n public inTimeRange(time: string): boolean {\n return this.timepickerService.maxValidation(time, this.max) && this.timepickerService.minValidation(time, this.min);\n }\n\n /**\n * Generates the list of time options based on the configured step interval and locale settings AM/PM.\n *\n * @returns {string[]} An array of time strings in 'HH:mm' format.\n */\n public get timeStampsList(): string[] {\n return generateTimeStamps(this.step, this.useLocale);\n }\n\n /**\n * @internal\n * Writes a new value to the element.\n * Part of the ControlValueAccessor interface.\n * @param {string | null} value - The new value.\n */\n public override writeValue(value: string | null): void {\n super.writeValue(value);\n if (value === null || this.timepickerService.isValidTime(value)) {\n this.updateInputValue();\n }\n }\n\n protected onOpen(): void {\n this.keyManager = new ActiveDescendantKeyManager<OptionControl<string>>(this.options).withHomeAndEnd();\n this.setActiveOptionBasedOnCurrentValue();\n }\n\n @HostListener('click', ['$event'])\n @HostListener('keydown', ['$event'])\n protected handleControllerEvent(event: KeyboardEvent) {\n if (this.readonlyController?.readonly) return;\n this.keyManager?.onKeydown(event);\n const activeOption = this.keyManager?.activeItem as TimepickerOptionComponent;\n activeOption && this.scrollToActiveOption(activeOption, { behavior: 'smooth' });\n if (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar') {\n event.stopImmediatePropagation();\n this.setOption(activeOption);\n }\n }\n\n protected handleDateFieldChanges(): void {\n this.dateField?.applyMask(this.useLocale);\n this.dateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe((time) => {\n const normalized = typeof time === 'string' ? time.trim() : '';\n if (!normalized) {\n this.updateValue(null);\n return;\n }\n if (this.timepickerService.is12HourFormat(normalized) === this._useLocale) {\n this.updateValue(this.timepickerService.getLocalizedTimeFormat(normalized));\n }\n });\n }\n\n protected resetValue(e: Event): void {\n e.stopImmediatePropagation();\n this.updateValue(null);\n }\n\n private setActiveOptionBasedOnCurrentValue(): void {\n const isSelected = this.options.find((option) => option.isSelected);\n if (isSelected) {\n this.activateOption(isSelected);\n return;\n }\n this.activateNearestTimeOption();\n }\n\n private activateOption(option: TimepickerOptionComponent): void {\n this.keyManager && this.keyManager.setActiveItem(option);\n this.scrollToActiveOption(option);\n }\n\n private activateNearestTimeOption(): void {\n if (!this.value) {\n const currentDate = new Date();\n const isNearest = this.findNearestTimeOption(currentDate);\n if (isNearest) {\n this.activateOption(isNearest);\n }\n }\n }\n\n private findNearestTimeOption(currentDate: Date): TimepickerOptionComponent | undefined {\n const availableTimeSlots = this.options.filter((option) => !option.disabled);\n const nearestTimeValue = this.timepickerService.findClosestDate(\n availableTimeSlots.map((option) => option.value) as string[],\n `${currentDate.getHours()}:${currentDate.getMinutes()}`,\n );\n\n return availableTimeSlots.find((option) => option.value === nearestTimeValue);\n }\n\n private updateInputValue(): void {\n if (!this.dateField) return;\n this.dateField.nativeElementValue = this.timepickerService.getLocalizedTimeFormat(this.value);\n }\n\n private scrollToActiveOption(option: TimepickerOptionComponent, _opts: ScrollIntoViewOptions = {}): void {\n if (isFunction(option.element.nativeElement.scrollIntoView)) {\n option.element.nativeElement.scrollIntoView({ block: 'center', ..._opts });\n }\n }\n\n private setOption(option?: TimepickerOptionComponent): void {\n if (!option || option.disabled) return;\n const time = this.timepickerService.getLocalizedTimeFormat(option.getLabel());\n this.dateField && (this.dateField.nativeElementValue = time);\n this.updateValue(time);\n }\n}\n","<div class=\"odx-timepicker__wrapper\">\n <input [value]=\"value\" odxTimepickerControl type=\"text\" />\n</div>\n\n<odx-action-group class=\"odx-timepicker__trigger-wrapper odx-no-margin\">\n @if (clearable() && value) {\n <button class=\"odx-timepicker__clear\" odxButton size=\"small\" aria-label=\"Reset time\" (click)=\"resetValue($event)\">\n <odx-icon name=\"close\" iconSet=\"core\" />\n </button>\n }\n <button\n #dropdownTrigger\n class=\"odx-timepicker__trigger\"\n odxButton\n size=\"small\"\n variant=\"ghost\"\n aria-label=\"Select time\"\n [odxDropdown]=\"timeList\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, position: 'bottom-start' }\"\n [odxDropdownTriggerElement]=\"dropdownTrigger.element.nativeElement\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n (odxDropdownAfterOpen)=\"onOpen()\"\n >\n <odx-icon name=\"chevron-down\" />\n </button>\n</odx-action-group>\n\n<ng-template #timeList>\n <div class=\"odx-timepicker__option-list\" role=\"listbox\">\n @for (time of timeStampsList; track $index) {\n <odx-timepicker-option [value]=\"time\" [disabled]=\"!inTimeRange(time)\" (selected)=\"timeSelected($event)\">{{ time }}</odx-timepicker-option>\n }\n </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { TimepickerOptionComponent } from './components/timepicker-option.component';\nimport { TimepickerInputControlDirective } from './directives/timepicker-input-control.directive';\nimport { TimepickerComponent } from './timepicker.component';\n\nconst modules = [TimepickerComponent, TimepickerInputControlDirective, TimepickerOptionComponent];\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class TimepickerModule {}\n","/**\n * Processes and formats a time input value based on specific rules. It adjusts the input for valid time format,\n * especially focusing on single-digit hour inputs, ensuring minute values start with 0 if the last digit is greater\n * than 5, and appending 'M' to AM/PM indicators.\n *\n * @param {string} value - The current input value of the time field.\n * @param {InputEvent} event - The input event triggered by the user's interaction with the field.\n * @returns {string} The processed and potentially reformatted value.\n *\n * @example\n * ```ts\n * // Prepend 0 to single-digit hours greater than 1\n * processInputValue(\"2\", { inputType: \"insertText\" }); // Returns \"02\"\n *\n * // Ensure minute values are within valid ranges\n * processInputValue(\"11:8\", { inputType: \"insertText\" }); // Returns \"11:08\"\n *\n * // Append 'M' to AM/PM indicators\n * processInputValue(\"2 p\", { inputType: \"insertText\" }); // Returns \"2 PM\"\n * ```\n */\nexport function processInputValue(value: string, event: InputEvent): string {\n if (value.length === 1 && Number(value) > 1) {\n value = `0${value}`;\n } else if (value.length === 4 && Number(value.at(-1)) > 5) {\n value = `${value.slice(0, -1)}0${value.slice(-1)}`;\n }\n\n if (/[AaPp]/.test(value) && event.inputType === 'insertText') {\n value = `${value.toUpperCase()}M`;\n }\n\n return value;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA;;;;;AAKG;MACU,kBAAkB,GAAG,IAAI,cAAc,CAAsB,yDAAyD;;ACHnI;;;;;;AAMG;AAWI,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,aAAqB,CAAA;AAkBlE;;;;AAIG;AACH,IAAA,IAAW,QAAQ,GAAA;AACjB,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ;IAC5C;AAWA,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AApCQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE;AAEnE;;;;AAIG;QACI,IAAA,CAAA,UAAU,GAAG,KAAK;AACzB;;;;;AAKG;QACa,IAAA,CAAA,QAAQ,GAAG,KAAK;AAWhC;;;;;AAKG;AAEI,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAA6B;AAI7D,QAAA,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,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AA,CALZ,mBAAmB,EAGxB,UAAU,CAAA,EAAA,CAAA,CAAA;;4FAET,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA;;;ACVD;;;;;;;;;;;;;;;;;;;;AAoBG;AACG,SAAU,iBAAiB,CAAC,KAAa,EAAE,KAAiB,EAAA;AAChE,IAAA,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AAC3C,QAAA,KAAK,GAAG,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE;IACrB;AAAO,SAAA,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;QACzD,KAAK,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA,CAAA,EAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;IACpD;AAEA,IAAA,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,KAAK,YAAY,EAAE;AAC5D,QAAA,KAAK,GAAG,CAAA,EAAG,KAAK,CAAC,WAAW,EAAE,GAAG;IACnC;AAEA,IAAA,OAAO,KAAK;AACd;;ACjCA;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-components-timepicker.mjs","sources":["../../../../libs/angular/components/timepicker/src/lib/timepicker.token.ts","../../../../libs/angular/components/timepicker/src/lib/components/timepicker-option.component.ts","../../../../libs/angular/components/timepicker/src/lib/timepicker.service.ts","../../../../libs/angular/components/timepicker/src/lib/directives/timepicker-input-control.directive.ts","../../../../libs/angular/components/timepicker/src/lib/utils/generate-time-stamps.ts","../../../../libs/angular/components/timepicker/src/lib/timepicker.component.ts","../../../../libs/angular/components/timepicker/src/lib/timepicker.component.html","../../../../libs/angular/components/timepicker/src/lib/timepicker.module.ts","../../../../libs/angular/components/timepicker/src/lib/utils/ngx-mask-helper.ts","../../../../libs/angular/components/timepicker/src/odx-angular-components-timepicker.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { TimepickerComponent } from './timepicker.component';\n\n/**\n * An InjectionToken used for injecting an instance of TimepickerComponent.\n * This token facilitates the decoupling of the TimepickerComponent's implementation from its consumption,\n * allowing for more flexible and maintainable code, especially in scenarios requiring custom time picker\n * behavior or appearance.\n */\nexport const TIMEPICKER_CONTROL = new InjectionToken<TimepickerComponent>('@odx/angular/components/timepicker::TimepickerComponent');\n","import { ChangeDetectionStrategy, Component, EventEmitter, OnInit, Output, ViewEncapsulation, inject } from '@angular/core';\nimport { DisabledController, WithDisabledState, detectControllerChanges } from '@odx/angular';\nimport { OptionControl } from '@odx/angular/cdk/option-control';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { TIMEPICKER_CONTROL } from '../timepicker.token';\n\n/**\n * Represents a selectable option within a timepicker component. This component allows for\n * individual time values to be selected from a dropdown menu as part of the timepicker interface.\n * It integrates with the timepicker's control to manage selection state and accessibility.\n *\n * @extends {OptionControl<string>}\n */\n@CSSComponent('timepicker-option')\n@Component({\n selector: 'odx-timepicker-option',\n template: `<ng-content />`,\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DisabledController.connect()],\n hostDirectives: [WithDisabledState],\n})\nexport class TimepickerOptionComponent extends OptionControl<string> implements OnInit {\n private readonly timepicker = inject(TIMEPICKER_CONTROL);\n protected readonly disabledController = DisabledController.inject();\n\n /**\n * Indicates whether this time option is currently selected.\n * @type {boolean}\n * @default false\n */\n public isSelected = false;\n /**\n * Indicates whether this time option is currently active (e.g., highlighted by keyboard navigation).\n * This is an override from the base `OptionControl`.\n * @type {boolean}\n * @default false\n */\n public override isActive = false;\n\n /**\n * Whether the option is disabled. This is used to determine whether the option should be selectable.\n *\n * @type {boolean}\n */\n public get disabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Emits an event when the option is selected, allowing the timepicker component to update its value\n * and close the dropdown.\n *\n * @emits {TimepickerOptionComponent}\n */\n @Output()\n public selected = new EventEmitter<TimepickerOptionComponent>();\n\n constructor() {\n super();\n detectControllerChanges(this.timepicker).pipe(this.takeUntilDestroyed()).subscribe();\n }\n\n public ngOnInit(): void {\n this.isSelected = this.timepicker.isTimeOptionSelected(this);\n }\n\n /**\n * Sets the active styles for the option, typically indicating that it is\n * focused or highlighted via keyboard navigation.\n */\n public setActiveStyles(): void {\n this.isActive = true;\n }\n\n protected selectOption(): void {\n this.selected.emit(this);\n }\n}\n","import { Injectable, inject, signal } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { isAfter, isBefore, isEqual } from 'date-fns';\n\n/**\n * Service to provide utility functions for timepicker components, including validation, placeholder generation, and finding the closest time.\n * It also handles locale-based time formatting.\n */\n@Injectable({ providedIn: 'root' })\nexport class TimepickerService {\n private readonly windowRef = inject(WindowRef);\n\n public useLocale = signal(false);\n\n /**\n * @deprecated Will be removed in a future major version. Use `useLocale` signal instead.\n * Generates a placeholder string for time input fields, preserving legacy API.\n */\n public getPlaceholder(apm = this.useLocale()): string {\n return apm ? '--:-- --' : '--:--';\n }\n\n /**\n * Validates if the given time is less than or equal to a maximum time constraint.\n *\n * @param {string} time - The time to validate.\n * @param {string} max - The maximum allowable time.\n * @returns {boolean} True if the time is valid (i.e., not after max), false otherwise.\n */\n public maxValidation(time: string, max: string): boolean {\n const [targetValue, maxValue] = this.convertToDates([time, max]);\n return isBefore(targetValue, maxValue) || isEqual(targetValue, maxValue);\n }\n\n /**\n * Checks if the provided value is a valid time string in HH:mm or HH:mm AM/PM format.\n * This method also acts as a type guard.\n *\n * @param {unknown} time - The value to validate.\n * @returns {time is string} True if the value is a valid time string, false otherwise.\n */\n public isValidTime(time: unknown): time is string {\n if (typeof time !== 'string') return false;\n const trimmedTime = time.trim();\n if (!trimmedTime) return false;\n return Boolean(this.parseTimeString(trimmedTime.toUpperCase()));\n }\n\n public is12HourFormat(value: string): boolean {\n return this.isValidTime(value) && !!this.parseTimeString(value.toUpperCase())?.hour12;\n }\n\n /**\n * Validates if the given time is greater than or equal to a minimum time constraint.\n *\n * @param {string} time - The time to validate.\n * @param {string} min - The minimum allowable time.\n * @returns {boolean} True if the time is valid (i.e., not before min), false otherwise.\n */\n public minValidation(time: string, min: string): boolean {\n const [targetValue, minValue] = this.convertToDates([time, min]);\n return isAfter(targetValue, minValue) || isEqual(targetValue, minValue);\n }\n\n /**\n * Finds the closest time to a target time from a list of times.\n *\n * @param {string[]} timeStamps - The list of time strings to search through (e.g., [\"10:00\", \"10:30\", \"11:00\"]).\n * @param {string} targetTime - The target time string to find the closest match for (e.g., \"10:35\").\n * @returns {string} The closest time string from the list to the target, formatted according to locale.\n */\n public findClosestDate(timeStamps: string[], targetTime: string): string {\n const [target] = this.convertToDates([targetTime]);\n const datesArray = this.convertToDates(timeStamps);\n\n if (datesArray.length === 0) return this.getLocalizedTimeFormat(targetTime);\n\n const closestDate = datesArray.reduce((prev, curr) => {\n const prevDiff = Math.abs(prev.getTime() - target.getTime());\n const currDiff = Math.abs(curr.getTime() - target.getTime());\n return currDiff < prevDiff ? curr : prev;\n });\n\n const hours = closestDate.getHours().toString().padStart(2, '0');\n const minutes = closestDate.getMinutes().toString().padStart(2, '0');\n return this.getLocalizedTimeFormat(`${hours}:${minutes}`);\n }\n\n /**\n * Formats a time string to a localized time format using Intl.DateTimeFormat.\n *\n * @param {unknown} time - The time string to format (e.g., \"14:30\").\n * @param {boolean} [hour12=false] - Specifies if the output should use 12-hour format with AM/PM notation.\n * @returns {string} The formatted time string, or an empty string if the input time is invalid.\n */\n public getLocalizedTimeFormat(time: unknown, hour12?: boolean): string {\n if (!this.isValidTime(time)) return '';\n const shouldUseHour12 = typeof hour12 === 'boolean' ? hour12 : this.useLocale();\n const locale = shouldUseHour12 ? 'en-US' : 'en-GB';\n const [date] = this.convertToDates([time]);\n return new this.windowRef.nativeWindow.Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n minute: '2-digit',\n hour12: shouldUseHour12,\n }).format(date);\n }\n\n private convertToDates(times: string[]): Date[] {\n return times.map((time) => {\n if (typeof time !== 'string') return new Date(NaN);\n const parsed = this.parseTimeString(time.toUpperCase());\n if (!parsed) return new Date(NaN);\n const { hours, minutes } = parsed;\n return new Date(2022, 11, 19, hours, minutes, 0, 0);\n });\n }\n\n private parseTimeString(time: string): { hours: number; minutes: number; hour12: boolean } | null {\n const match = time.trim().match(/^([01]?\\d|2[0-3]):([0-5]\\d)(?:\\s?(AM|PM))?$/);\n if (!match) return null;\n\n let hours = Number(match[1]);\n const minutes = Number(match[2]);\n const period = match[3]?.toUpperCase();\n\n if (period) {\n if (period === 'PM' && hours < 12) hours += 12;\n if (period === 'AM' && hours === 12) hours = 0;\n }\n\n return { hours, minutes, hour12: Boolean(period) };\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { initNgxMask, ngxMaskProviderConfig } from '@odx/angular/cdk/date-input';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { isString } from '@odx/angular/utils';\nimport { NgxMaskDirective, provideNgxMask } from 'ngx-mask';\nimport { TimepickerService } from '../timepicker.service';\nimport { TIMEPICKER_CONTROL } from '../timepicker.token';\n\n/**\n * Directive to enhance a standard input element for time picking, integrating mask functionality for time format.\n * It automatically adapts to locale settings provided by the enclosing `TimepickerComponent` to display time in the appropriate format.\n *\n * @extends {InputControlDirective}\n */\n@CSSComponent('timepicker__control')\n@Directive({\n standalone: true,\n selector: 'input[odxTimepickerControl]',\n host: {\n '[attr.readonly]': 'isReadonly || null',\n '[attr.placeholder]': 'placeholder',\n },\n providers: [provideNgxMask(ngxMaskProviderConfig)],\n hostDirectives: [WithTabIndex, WithDisabledState, NgxMaskDirective],\n})\nexport class TimepickerInputControlDirective extends InputControlDirective {\n private readonly timepicker = inject(TIMEPICKER_CONTROL);\n private readonly timepickerService = inject(TimepickerService);\n public readonly ngxMaskDirective = inject(NgxMaskDirective, { self: true, optional: true });\n\n /**\n * Returns the placeholder text for the input based on locale settings.\n *\n * @returns {string} The placeholder text for the input.\n */\n public get placeholder(): string {\n return this.timepickerService.useLocale() ? '--:-- --' : '--:--';\n }\n\n /**\n * Determines whether the timepicker input is readonly, based on the state of the parent timepicker component.\n *\n * @returns {boolean} `true` if the input should be readonly; otherwise, `false`.\n */\n protected get isReadonly(): boolean {\n return this.timepicker.isReadonly;\n }\n\n /**\n * Applies the time format mask to the input value, transforming and returning the masked value.\n *\n * @param {Event} event - The input event triggering the mask application.\n * @returns {string} The masked input value.\n */\n public applyMask(useLocale: boolean): void {\n if (!this.ngxMaskDirective) return;\n const mask = useLocale ? 'Hh:m0 AM' : 'Hh:m0';\n useLocale !== this.ngxMaskDirective._maskService.apm && (this.ngxMaskDirective._maskService.apm = useLocale);\n if (Object.hasOwn(this.ngxMaskDirective, '_maskValue') && this.ngxMaskDirective['_maskValue'] !== mask) {\n initNgxMask(this.ngxMaskDirective, mask);\n }\n }\n\n /**\n * Updates the input value through ngx-mask directive.\n *\n * @param {string | null} value - The new value to set in the input.\n */\n public setMaskedValue(value: string | null): void {\n const normalized = isString(value) ? value : '';\n this.ngxMaskDirective?.writeValue(normalized);\n }\n}\n","/**\n * Generates an array of time stamps within a 24-hour period based on the specified step interval.\n * The time stamps can be formatted in 24-hour format or 12-hour format with AM/PM based on locale preference.\n *\n * @param {number} step - The interval, in minutes, between each time stamp.\n * @param {boolean} useLocale - Determines if the time stamps should use the 12-hour format with AM/PM (`true`) or the 24-hour format (`false`).\n * @returns {string[]} An array of formatted time stamps as strings.\n * @example\n * ```ts\n * // Generate time stamps every 30 minutes using 24-hour format\n * generateTimeStamps(30, false);\n * // Returns [\"00:00\", \"00:30\", \"01:00\", ..., \"23:30\"]\n *\n * // Generate time stamps every 60 minutes using 12-hour format with AM/PM\n * generateTimeStamps(60, true);\n * // Returns [\"12:00 AM\", \"01:00 AM\", ..., \"11:00 PM\"]\n * ```\n */\nexport function generateTimeStamps(step: number, useLocale: boolean): string[] {\n const roundedStep = Math.round(step);\n\n return Array.from({ length: Math.ceil(24 * (60 / roundedStep)) }, (_, i) => {\n const hours = Math.floor((i * roundedStep) / 60);\n const minutes = (i * roundedStep) % 60;\n return formatTime(hours, minutes, useLocale);\n });\n}\n\n/**\n * Formats a given time as a string based on the specified hour, minute, and locale preference.\n * Can format time in either 24-hour format or 12-hour format with AM/PM.\n *\n * @param {number} hours - The hour component of the time.\n * @param {number} minutes - The minute component of the time.\n * @param {boolean} useLocale - Determines if the time should be formatted using the 12-hour format with AM/PM (`true`) or the 24-hour format (`false`).\n * @returns {string} The formatted time as a string.\n * @example\n * ```ts\n * // Format time using 24-hour format\n * formatTime(14, 30, false); // \"14:30\"\n *\n * // Format time using 12-hour format with AM/PM\n * formatTime(14, 30, true); // \"2:30 PM\"\n * ```\n */\nfunction formatTime(hours: number, minutes: number, useLocale: boolean): string {\n if (useLocale) {\n const period = hours >= 12 ? 'PM' : 'AM';\n const displayHours = hours % 12 === 0 ? 12 : hours % 12;\n return `${displayHours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')} ${period}`;\n } else {\n return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;\n }\n}\n","import { A11yModule, ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n HostListener,\n Input,\n QueryList,\n ViewChild,\n ViewChildren,\n ViewEncapsulation,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { OptionControl } from '@odx/angular/cdk/option-control';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement, isFunction, untilDestroyed } from '@odx/angular/utils';\nimport { TimepickerOptionComponent } from './components/timepicker-option.component';\nimport { TimepickerInputControlDirective } from './directives/timepicker-input-control.directive';\nimport { TimepickerService } from './timepicker.service';\nimport { TIMEPICKER_CONTROL } from './timepicker.token';\nimport { generateTimeStamps } from './utils/generate-time-stamps';\n\n/**\n * Represents a time picker component allowing users to select a time from a dropdown list.\n * This component integrates with Angular forms and supports customization for locale, time range, and step intervals.\n *\n * @see {CustomFormControl}\n */\n@CSSComponent('timepicker')\n@Component({\n standalone: true,\n selector: 'odx-timepicker',\n templateUrl: 'timepicker.component.html',\n providers: [\n DisabledController.connect(),\n ReadonlyController.connect(),\n {\n provide: TIMEPICKER_CONTROL,\n useExisting: forwardRef(() => TimepickerComponent),\n },\n TimepickerService,\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, DropdownModule, TimepickerOptionComponent, IconComponent, TimepickerInputControlDirective],\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n },\n})\nexport class TimepickerComponent extends CustomFormControl<string | null> implements AfterViewInit {\n private readonly timepickerService = inject(TimepickerService);\n private _useLocale = false;\n protected keyManager?: ActiveDescendantKeyManager<OptionControl<string>>;\n\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n @ViewChild(DropdownDirective)\n protected readonly dropdown?: DropdownDirective;\n\n @ViewChildren(TimepickerOptionComponent, { emitDistinctChangesOnly: true })\n protected options!: QueryList<TimepickerOptionComponent>;\n\n public readonly element = injectElement();\n\n /**\n * Controls whether the timepicker should use locale-specific time formats AM/PM.\n *\n * @type {boolean}\n * @default false\n */\n @Input({ transform: booleanAttribute })\n public set useLocale(val: boolean) {\n this.timepickerService.useLocale.set(val);\n this.dateField?.applyMask(val);\n if (this.value && this.dateField) {\n const time = this.timepickerService.getLocalizedTimeFormat(this.value);\n this.updateValue(time);\n this.dateField.setMaskedValue(time);\n }\n this._useLocale = val;\n }\n\n /**\n * Gets a boolean value indicating whether the locale is being used.\n *\n * @returns {boolean} A boolean value indicating whether the locale is being used.\n */\n public get useLocale(): boolean {\n return this._useLocale;\n }\n\n /**\n * When set to true, the select will display a reset button.\n *\n * @type {boolean}\n * @default false\n */\n public clearable = input(false, { transform: booleanAttribute });\n\n /**\n * Controls the step interval between time options in minutes.\n *\n * @type {number}\n * @default 30\n */\n @Input({ transform: numberAttribute })\n public step = 30;\n\n /**\n * Specifies the minimum time value that can be selected ('05:00' or '05:00 AM').\n *\n * @type {string}\n * @default '00:00'\n */\n @Input()\n public min = '00:00';\n\n /**\n * Specifies the maximum time value that can be selected ('22:00' or '10:00 PM').\n *\n * @type {string}\n * @default '23:59'\n */\n @Input()\n public max = '23:59';\n\n /**\n * The directive for the timepicker input control.\n *\n * @type {TimepickerInputControlDirective | undefined}\n */\n @ViewChild(TimepickerInputControlDirective)\n public dateField?: TimepickerInputControlDirective;\n\n constructor() {\n super(null);\n }\n\n public ngAfterViewInit(): void {\n this.handleDateFieldChanges();\n this.updateInputValue();\n }\n\n /**\n * Checks if the given time option is selected.\n *\n * @param {TimepickerOptionComponent} option - The time option to check.\n * @returns {boolean} True if the option is selected, false otherwise.\n */\n public isTimeOptionSelected(option: TimepickerOptionComponent): boolean {\n return this.value === option.value;\n }\n\n /**\n * Handles the selection of a time option from the dropdown, updating the input field and closing the dropdown.\n *\n * @param {TimepickerOptionComponent | undefined} option - The selected time option component.\n */\n public timeSelected(option?: TimepickerOptionComponent): void {\n this.setOption(option);\n this.dropdown?.isOpen && this.dropdown?.close();\n }\n\n /**\n * Determines whether the specified time is within the allowed time range.\n *\n * @param {string} time - The time to check, in 'HH:mm' or 'HH:mm AM/PM' format.\n * @returns {boolean} True if the time is within the range; otherwise, false.\n */\n public inTimeRange(time: string): boolean {\n return this.timepickerService.maxValidation(time, this.max) && this.timepickerService.minValidation(time, this.min);\n }\n\n /**\n * Generates the list of time options based on the configured step interval and locale settings AM/PM.\n *\n * @returns {string[]} An array of time strings in 'HH:mm' format.\n */\n public get timeStampsList(): string[] {\n return generateTimeStamps(this.step, this.useLocale);\n }\n\n /**\n * @internal\n * Writes a new value to the element.\n * Part of the ControlValueAccessor interface.\n * @param {string | null} value - The new value.\n */\n public override writeValue(value: string | null): void {\n super.writeValue(value);\n if (value === null || this.timepickerService.isValidTime(value)) {\n this.updateInputValue();\n }\n }\n\n protected onOpen(): void {\n this.keyManager = new ActiveDescendantKeyManager<OptionControl<string>>(this.options).withHomeAndEnd();\n this.setActiveOptionBasedOnCurrentValue();\n }\n\n @HostListener('click', ['$event'])\n @HostListener('keydown', ['$event'])\n protected handleControllerEvent(event: KeyboardEvent) {\n if (this.readonlyController?.readonly) return;\n this.keyManager?.onKeydown(event);\n const activeOption = this.keyManager?.activeItem as TimepickerOptionComponent;\n activeOption && this.scrollToActiveOption(activeOption, { behavior: 'smooth' });\n if (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar') {\n event.stopImmediatePropagation();\n this.setOption(activeOption);\n }\n }\n\n protected handleDateFieldChanges(): void {\n this.dateField?.applyMask(this.useLocale);\n this.dateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe((time) => {\n const normalized = typeof time === 'string' ? time.trim() : '';\n if (!normalized) {\n this.updateValue(null);\n return;\n }\n if (!this.timepickerService.isValidTime(normalized)) return;\n const is12HourInput = this.timepickerService.is12HourFormat(normalized);\n if (is12HourInput !== this._useLocale) return;\n this.updateValue(this.timepickerService.getLocalizedTimeFormat(normalized));\n });\n }\n\n protected resetValue(e: Event): void {\n e.stopImmediatePropagation();\n this.updateValue(null);\n }\n\n private setActiveOptionBasedOnCurrentValue(): void {\n const isSelected = this.options.find((option) => option.isSelected);\n if (isSelected) {\n this.activateOption(isSelected);\n return;\n }\n this.activateNearestTimeOption();\n }\n\n private activateOption(option: TimepickerOptionComponent): void {\n this.keyManager && this.keyManager.setActiveItem(option);\n this.scrollToActiveOption(option);\n }\n\n private activateNearestTimeOption(): void {\n if (!this.value) {\n const currentDate = new Date();\n const isNearest = this.findNearestTimeOption(currentDate);\n if (isNearest) {\n this.activateOption(isNearest);\n }\n }\n }\n\n private findNearestTimeOption(currentDate: Date): TimepickerOptionComponent | undefined {\n const availableTimeSlots = this.options.filter((option) => !option.disabled);\n const nearestTimeValue = this.timepickerService.findClosestDate(\n availableTimeSlots.map((option) => option.value) as string[],\n `${currentDate.getHours()}:${currentDate.getMinutes()}`,\n );\n\n return availableTimeSlots.find((option) => option.value === nearestTimeValue);\n }\n\n private updateInputValue(): void {\n if (!this.dateField) return;\n this.dateField.setMaskedValue(this.timepickerService.getLocalizedTimeFormat(this.value));\n }\n\n private scrollToActiveOption(option: TimepickerOptionComponent, _opts: ScrollIntoViewOptions = {}): void {\n if (isFunction(option.element.nativeElement.scrollIntoView)) {\n option.element.nativeElement.scrollIntoView({ block: 'center', ..._opts });\n }\n }\n\n private setOption(option?: TimepickerOptionComponent): void {\n if (!option || option.disabled) return;\n const time = this.timepickerService.getLocalizedTimeFormat(option.getLabel());\n this.dateField?.setMaskedValue(time);\n this.updateValue(time);\n }\n}\n","<div class=\"odx-timepicker__wrapper\">\n <input [value]=\"value\" odxTimepickerControl type=\"text\" />\n</div>\n\n<odx-action-group class=\"odx-timepicker__trigger-wrapper odx-no-margin\">\n @if (clearable() && value) {\n <button class=\"odx-timepicker__clear\" odxButton size=\"small\" aria-label=\"Reset time\" (click)=\"resetValue($event)\">\n <odx-icon name=\"close\" iconSet=\"core\" />\n </button>\n }\n <button\n #dropdownTrigger\n class=\"odx-timepicker__trigger\"\n odxButton\n size=\"small\"\n variant=\"ghost\"\n aria-label=\"Select time\"\n [odxDropdown]=\"timeList\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, position: 'bottom-start' }\"\n [odxDropdownTriggerElement]=\"dropdownTrigger.element.nativeElement\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n (odxDropdownAfterOpen)=\"onOpen()\"\n >\n <odx-icon name=\"chevron-down\" />\n </button>\n</odx-action-group>\n\n<ng-template #timeList>\n <div class=\"odx-timepicker__option-list\" role=\"listbox\">\n @for (time of timeStampsList; track $index) {\n <odx-timepicker-option [value]=\"time\" [disabled]=\"!inTimeRange(time)\" (selected)=\"timeSelected($event)\">{{ time }}</odx-timepicker-option>\n }\n </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { TimepickerOptionComponent } from './components/timepicker-option.component';\nimport { TimepickerInputControlDirective } from './directives/timepicker-input-control.directive';\nimport { TimepickerComponent } from './timepicker.component';\n\nconst modules = [TimepickerComponent, TimepickerInputControlDirective, TimepickerOptionComponent];\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class TimepickerModule {}\n","/**\n * Processes and formats a time input value based on specific rules. It adjusts the input for valid time format,\n * especially focusing on single-digit hour inputs, ensuring minute values start with 0 if the last digit is greater\n * than 5, and appending 'M' to AM/PM indicators.\n *\n * @param {string} value - The current input value of the time field.\n * @param {InputEvent} event - The input event triggered by the user's interaction with the field.\n * @returns {string} The processed and potentially reformatted value.\n *\n * @example\n * ```ts\n * // Prepend 0 to single-digit hours greater than 1\n * processInputValue(\"2\", { inputType: \"insertText\" }); // Returns \"02\"\n *\n * // Ensure minute values are within valid ranges\n * processInputValue(\"11:8\", { inputType: \"insertText\" }); // Returns \"11:08\"\n *\n * // Append 'M' to AM/PM indicators\n * processInputValue(\"2 p\", { inputType: \"insertText\" }); // Returns \"2 PM\"\n * ```\n */\nexport function processInputValue(value: string, event: InputEvent): string {\n if (value.length === 1 && Number(value) > 1) {\n value = `0${value}`;\n } else if (value.length === 4 && Number(value.at(-1)) > 5) {\n value = `${value.slice(0, -1)}0${value.slice(-1)}`;\n }\n\n if (/[AaPp]/.test(value) && event.inputType === 'insertText') {\n value = `${value.toUpperCase()}M`;\n }\n\n return value;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA;;;;;AAKG;MACU,kBAAkB,GAAG,IAAI,cAAc,CAAsB,yDAAyD;;ACHnI;;;;;;AAMG;AAWI,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,aAAqB,CAAA;AAkBlE;;;;AAIG;AACH,IAAA,IAAW,QAAQ,GAAA;AACjB,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ;IAC5C;AAWA,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AApCQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE;AAEnE;;;;AAIG;QACI,IAAA,CAAA,UAAU,GAAG,KAAK;AACzB;;;;;AAKG;QACa,IAAA,CAAA,QAAQ,GAAG,KAAK;AAWhC;;;;;AAKG;AAEI,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAA6B;AAI7D,QAAA,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,SAAS,EAAE;IACtF;IAEO,QAAQ,GAAA;QACb,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,IAAI,CAAC;IAC9D;AAEA;;;AAGG;IACI,eAAe,GAAA;AACpB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;IACtB;IAEU,YAAY,G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