dap-design-system 0.63.0 → 0.63.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -205,6 +205,7 @@ export default class DapDSDatePicker extends GenericFormElement {
205
205
  hideAdjacentMonths?: boolean;
206
206
  private formatOptions;
207
207
  private setValueState;
208
+ private inputDrivenValue?;
208
209
  private lastMaskDigitCount;
209
210
  static readonly styles: import('lit').CSSResult;
210
211
  constructor();
@@ -214,12 +215,14 @@ export default class DapDSDatePicker extends GenericFormElement {
214
215
  */
215
216
  private normalizeDate;
216
217
  protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
218
+ protected willUpdate(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
217
219
  protected updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
218
220
  getFormattedValue(): string;
219
221
  isValidFormat(value: string): boolean;
220
222
  isValueValid(): boolean;
221
223
  isInputValid(): boolean;
222
224
  setValue(value?: Dayjs, setInputValue?: boolean, sendEmptyEventOnInput?: boolean): void;
225
+ formResetCallback(): void;
223
226
  clearSelection(): Promise<void>;
224
227
  private isMaskActive;
225
228
  private getActiveMaskFormat;
@@ -24,18 +24,18 @@ import { getValidityStateObject as k } from "../../common/utils.js";
24
24
  import { GenericFormElement as C } from "../../internal/mixin/genericFormElement.js";
25
25
  import { formLabelTemplate as z } from "../../internal/templates/formLabel.js";
26
26
  import "../../localization/localization.js";
27
- import M from "../calendar/calendar.component.js";
28
- import E from "../feedback/feedback.component.js";
29
- import F from "../form/form-label/form-label.component.js";
27
+ import E from "../calendar/calendar.component.js";
28
+ import F from "../feedback/feedback.component.js";
29
+ import M from "../form/form-label/form-label.component.js";
30
30
  import x from "../icon/icon.component.js";
31
- import A from "../icon-button/icon-button.component.js";
32
- import w from "../icons/business/business-calendar-line/business-calendar-line.component.js";
31
+ import w from "../icon-button/icon-button.component.js";
32
+ import A from "../icons/business/business-calendar-line/business-calendar-line.component.js";
33
33
  import B from "../icons/system/system-loading-spinner/system-loading-spinner.component.js";
34
34
  import O from "../popup/popup.component.js";
35
35
  import L from "../tooltip/tooltip.component.js";
36
36
  import T from "../typography/typography.component.js";
37
- import q from "./datepicker.scss.js";
38
- import { t as U } from "../../node_modules/i18next/dist/esm/i18next.js";
37
+ import U from "./datepicker.scss.js";
38
+ import { t as q } from "../../node_modules/i18next/dist/esm/i18next.js";
39
39
  var Y = Object.defineProperty, o = (g, t, i, e) => {
40
40
  for (var s = void 0, a = g.length - 1, n; a >= 0; a--)
41
41
  (n = g[a]) && (s = n(t, i, s) || s);
@@ -134,6 +134,9 @@ const r = (h = class extends C {
134
134
  const s = this.normalizeDate(this.maxDate);
135
135
  this.calendar.maxDate = s || l($), s && (this.maxDate = s), this.calendar.disabledDate = this.disabledDate, this.hideAdjacentMonths !== void 0 && (this.calendar.hideAdjacentMonths = this.hideAdjacentMonths);
136
136
  }
137
+ willUpdate(t) {
138
+ super.willUpdate(t), t.has("value") && this.value !== this.inputDrivenValue && (this.setValueState = !0, this.inputDrivenValue = void 0);
139
+ }
137
140
  updated(t) {
138
141
  var s;
139
142
  super.updated(t);
@@ -201,10 +204,19 @@ const r = (h = class extends C {
201
204
  return this.isValidFormat(this.triggerInput.value);
202
205
  }
203
206
  setValue(t, i = !0, e = !0) {
204
- this.value = t, i ? (this.setValueState = !0, this.triggerInput.value = this.getFormattedValue()) : this.setValueState = !1, this.internals && this.internals.setFormValue(
207
+ this.value = t, i ? (this.setValueState = !0, this.triggerInput.value = this.getFormattedValue()) : (this.setValueState = !1, this.inputDrivenValue = t), this.internals && this.internals.setFormValue(
205
208
  this.value ? this.value.toString() : this.defaultValue
206
209
  ), this.setValidity(), this.hideCalendar(), e && (this.emit("dds-change", { value: this.value }), this.emit("dds-valid-date", { value: this.triggerInput.value }));
207
210
  }
211
+ // Native <form> reset: restore the initial value (or empty) and resync the input text.
212
+ // No dds-change is emitted, matching native inputs, which don't fire change on reset.
213
+ formResetCallback() {
214
+ if (super.formResetCallback(), this.lastMaskDigitCount = 0, this.mode === "range") {
215
+ this.rangeStart = void 0, this.rangeEnd = void 0, this.calendar.rangeStart = void 0, this.calendar.rangeEnd = void 0, this.triggerInput.value = "", this.setValidity(), this.hideCalendar({ skipFocus: !0 });
216
+ return;
217
+ }
218
+ this.hideCalendar({ skipFocus: !0 }), this.setValue(this.normalizeDate(this.defaultValue), !0, !1);
219
+ }
208
220
  clearSelection() {
209
221
  return f(this, null, function* () {
210
222
  this.lastMaskDigitCount = 0, this.setValue(void 0, !0, !0);
@@ -390,7 +402,7 @@ const r = (h = class extends C {
390
402
  part="clear-button"
391
403
  data-testid=${this.clearButtonTestId}
392
404
  aria-label=${p(
393
- (i = this.clearButtonAriaLabel) != null ? i : U("clear", { lng: this.locale })
405
+ (i = this.clearButtonAriaLabel) != null ? i : q("clear", { lng: this.locale })
394
406
  )}
395
407
  ?disabled=${this.disabled}
396
408
  @click=${this.handleClearClick}></dap-ds-icon-button>
@@ -435,16 +447,16 @@ const r = (h = class extends C {
435
447
  </div>`;
436
448
  }
437
449
  }, h.tagName = "dap-ds-datepicker", h.dependencies = {
438
- "dap-ds-form-label": F,
450
+ "dap-ds-form-label": M,
439
451
  "dap-ds-tooltip": L,
440
- "dap-ds-icon-button": A,
452
+ "dap-ds-icon-button": w,
441
453
  "dap-ds-icon": x,
442
454
  "dap-ds-typography": T,
443
455
  "dap-ds-popup": O,
444
456
  "dap-ds-icon-loading-spinner": B,
445
- "dap-ds-icon-calendar-line": w,
446
- "dap-ds-calendar": M,
447
- "dap-ds-feedback": E
457
+ "dap-ds-icon-calendar-line": A,
458
+ "dap-ds-calendar": E,
459
+ "dap-ds-feedback": F
448
460
  }, h.nextId = 0, h.datePropertyConverter = {
449
461
  fromAttribute: (t) => {
450
462
  if (t == null || t === "")
@@ -462,7 +474,7 @@ const r = (h = class extends C {
462
474
  }
463
475
  },
464
476
  toAttribute: (t) => t == null ? null : l.isDayjs(t) || t instanceof Date ? t.toISOString() : typeof t == "string" ? t : typeof t == "number" ? String(t) : null
465
- }, h.styles = I(q), h);
477
+ }, h.styles = I(U), h);
466
478
  o([
467
479
  V(".combobox__input")
468
480
  ], r.prototype, "triggerInput");
@@ -1 +1 @@
1
- {"version":3,"file":"datepicker.component.js","sources":["../../../src/components/datepicker/datepicker.component.ts"],"sourcesContent":["import clsx from 'clsx'\nimport dayjs, { Dayjs } from 'dayjs'\nimport { nothing, PropertyValueMap, unsafeCSS } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { html } from 'lit/static-html.js'\n\nimport {\n CommonFormElementSize,\n FloatingStrategy,\n PopupPlacement,\n} from '@/common/types'\nimport { getValidityStateObject } from '@/common/utils'\nimport { GenericFormElement } from '@/internal/mixin/genericFormElement'\nimport { formLabelTemplate } from '@/internal/templates/formLabel'\nimport { t } from '@/localization/localization'\n\nimport DapDSCalendar from '../calendar/calendar.component'\nimport DapDSFeedback from '../feedback/feedback.component'\nimport DapDSFormLabel from '../form/form-label/form-label.component'\nimport DapDSIcon from '../icon/icon.component'\nimport DapDSIconButton from '../icon-button/icon-button.component'\nimport BusinessCalendarLine from '../icons/business/business-calendar-line/business-calendar-line.component'\nimport SystemLoadingSpinner from '../icons/system/system-loading-spinner/system-loading-spinner.component'\nimport DapDSPopup from '../popup/popup.component'\nimport DapDSTooltip from '../tooltip/tooltip.component'\nimport DapDSTypography from '../typography/typography.component'\nimport styles from './datepicker.scss?inline'\n\ninterface MaskToken {\n type: 'digit' | 'separator'\n length?: number\n value?: string\n}\n\n/**\n * The bounds the calendar falls back to when the consumer sets no minDate/maxDate.\n * They have to stay finite: the calendar renders one option per year between them.\n */\nconst DEFAULT_MIN_DATE = '1901-01-01'\nconst DEFAULT_MAX_DATE = '2099-12-31'\n\n/** Framework-neutral shape for the date handed to consumers on the out-of-range event. */\nconst DEFAULT_ISO_FORMAT = 'YYYY-MM-DD'\n\n/**\n * `dap-ds-datepicker`\n * @summary A datepicker is a graphical user interface widget that allows the user to select a date from a calendar and/or time from a time range.\n * @element dap-ds-datepicker\n * @title - Datepicker\n *\n * @property {Dayjs} value - The value of the datepicker.\n * @property {string} label - The label of the datepicker.\n * @property {boolean} hideLabel - Visually hides the label while keeping it available to assistive technology. (default: false)\n * @property {string} description - The description of the datepicker.\n * @property {'xs' | 'sm' | 'sm'} size - The size of the datepicker.\n * @property {boolean} disabled - The disabled state of the datepicker.\n * @property {boolean} required - The required state of the datepicker.\n * @property {boolean} readonly - The readonly state of the datepicker.\n * @property {boolean} autofocus - The autofocus state of the datepicker.\n * @property {string} tooltip - The tooltip of the datepicker.\n * @property {'top' | 'right' | 'bottom' | 'left'} tooltipPlacement - The tooltip placement of the datepicker.\n * @property {string} feedback - The feedback of the datepicker.\n * @property {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the datepicker.\n * @property {boolean} optional - The optional state of the datepicker.\n * @property {string} optionalLabel - The optional label of the datepicker.\n * @property {string} requiredLabel - The required indicator of the datepicker. (default: '*')\n * @property {boolean} subtle - The weight of the label. Default is `false`\n * @property {string} autocomplete - The autocomplete of the datepicker.\n * @property {boolean} autofocus - The autofocus of the datepicker.\n *\n * @event {{ value: string }} dds-change - Fired when the datepicker value changes.\n * @event {{ value: string }} dds-input - Fired when the datepicker input value changes.\n * @event {{ value: string }} dds-valid-date - Fired when the datepicker input value is valid. Happens on manual input typing.\n * @event {{ value: string, type: 'invalid' | 'out-of-range', date?: string }} dds-invalid-date - Fired when the datepicker input value is invalid. Happens on manual input typing. For `out-of-range` the typed text was a well-formed date, so `date` carries it as an ISO (`YYYY-MM-DD`) string and the consumer can phrase its own range message; for `invalid` the text could not be parsed and `date` is omitted.\n * @event {{ void }} dds-clear - Fired when the datepicker is cleared.\n * @event {{ void }} dds-focus - Emitted when the datepicker gains focus.\n * @event {{ void }} dds-blur - Emitted when the datepicker loses focus.\n *\n * @csspart base - The main datepicker container.\n * @csspart calendar - The calendar of the datepicker.\n * @csspart trigger - The trigger button of the datepicker.\n * @csspart label - The label of the datepicker.\n * @csspart description - The description of the datepicker.\n * @csspart feedback - The feedback of the datepicker.\n * @csspart tooltip - The tooltip of the datepicker.\n * @csspart input - The input of the datepicker.\n * @csspart clear-button - The clear button of the datepicker.\n * @csspart calendar-grid-cell-base - The base of the calendar grid cell.\n * @csspart calendar-grid-cell - The cell of the calendar grid.\n * @csspart calendar-grid-header-cell-base - The base of the calendar grid header cell.\n * @csspart calendar-grid-header-cell - The header cell of the calendar grid.\n * @csspart calendar-grid-cell-today-mark - The today mark of the calendar grid cell.\n * @csspart calendar-button - The calendar icon button of the datepicker.\n * @csspart calendar-header-button-prev - The previous month button of the calendar header.\n * @csspart calendar-header-button-next - The next month button of the calendar header.\n * @csspart calendar-header-year-select - The year select of the calendar header.\n * @csspart calendar-header-month-select - The month select of the calendar header.\n * @csspart label-base - The base of the label.\n * @csspart label-required - The required indicator of the label.\n * @csspart label-optional - The optional indicator of the label.\n *\n * @cssproperty --dds-combobox-background - The background color of the combobox. (default: var(--dds-fields-background-default))\n * @cssproperty --dds-combobox-border-color - The border color of the combobox. (default: var(--dds-border-neutral-base))\n * @cssproperty --dds-combobox-border-width - The border width of the combobox. (default: var(--dds-border-width-base, 1px))\n * @cssproperty --dds-combobox-border-radius - The border radius of the combobox. (default: var(--dds-radius-base))\n * @cssproperty --dds-combobox-text-color - The text color of the combobox. (default: var(--dds-text-neutral-base))\n * @cssproperty --dds-combobox-placeholder-color - The placeholder text color. (default: var(--dds-text-neutral-subtle))\n * @cssproperty --dds-combobox-disabled-background - The background color when disabled. (default: var(--dds-background-neutral-stronger))\n * @cssproperty --dds-combobox-disabled-text - The text color when disabled. (default: var(--dds-text-neutral-disabled))\n * @cssproperty --dds-combobox-error-border - The border color for error state. (default: var(--dds-border-negative-base))\n * @cssproperty --dds-combobox-success-border - The border color for success state. (default: var(--dds-border-positive-base))\n * @cssproperty --dds-combobox-icon-color - The color of the icons. (default: var(--dds-text-icon-neutral-subtle))\n * @cssproperty --dds-combobox-clear-icon-color - The color of the clear icon. (default: var(--dds-button-subtle-icon-neutral-enabled))\n * @cssproperty --dds-combobox-popup-background - The background color of the popup. (default: var(--dds-background-neutral-subtle))\n * @cssproperty --dds-combobox-popup-shadow - The box shadow of the popup. (default: 0 4px 6px -1px rgb(0 0 0 / 8%), 0 2px 4px -1px rgb(0 0 0 / 6%))\n * @cssproperty --dds-combobox-padding-xs - The padding for extra small size. (default: var(--dds-spacing-200))\n * @cssproperty --dds-combobox-padding-sm - The padding for small size. (default: var(--dds-spacing-200))\n * @cssproperty --dds-combobox-padding-lg - The padding for large size. (default: var(--dds-spacing-300))\n * @cssproperty --dds-combobox-padding-horizontal - The horizontal padding. (default: var(--dds-spacing-300))\n * @cssproperty --dds-combobox-padding-vertical - The vertical padding. (default: var(--dds-spacing-200))\n * @cssproperty --dds-combobox-gap - The gap between elements. (default: var(--dds-spacing-100))\n * @cssproperty --dds-combobox-icon-gap - The gap between icons. (default: var(--dds-spacing-200))\n * @cssproperty --dds-combobox-action-gap - The gap between action elements. (default: var(--dds-spacing-200))\n * @cssproperty --dds-combobox-action-padding - The padding for action elements. (default: var(--dds-spacing-300))\n * @cssproperty --dds-combobox-clear-icon-width - The width of the clear icon. (default: var(--dds-spacing-800))\n * @cssproperty --dds-combobox-dropdown-icon-right - The right position of the dropdown icon. (default: var(--dds-spacing-600))\n * @cssproperty --dds-combobox-min-width - The minimum width of the combobox. (default: 7.5rem)\n */\nexport default class DapDSDatePicker extends GenericFormElement {\n static tagName = 'dap-ds-datepicker'\n\n static dependencies = {\n 'dap-ds-form-label': DapDSFormLabel,\n 'dap-ds-tooltip': DapDSTooltip,\n 'dap-ds-icon-button': DapDSIconButton,\n 'dap-ds-icon': DapDSIcon,\n 'dap-ds-typography': DapDSTypography,\n 'dap-ds-popup': DapDSPopup,\n 'dap-ds-icon-loading-spinner': SystemLoadingSpinner,\n 'dap-ds-icon-calendar-line': BusinessCalendarLine,\n 'dap-ds-calendar': DapDSCalendar,\n 'dap-ds-feedback': DapDSFeedback,\n }\n\n private static nextId = 0\n\n /**\n * Property converter for date properties.\n * Converts string attributes (from React) to Dayjs objects.\n * Allows both attribute binding (strings) and property binding (Dayjs objects).\n *\n * Note: When properties are set directly (bypassing attributes), they are normalized\n * in the `updated` lifecycle method via `normalizeDate`.\n */\n private static datePropertyConverter = {\n fromAttribute: (value: string | null): Dayjs | undefined => {\n if (value === null || value === undefined || value === '') {\n return undefined\n }\n const trimmed = value.trim()\n if (!trimmed) return undefined\n\n // Check if it's a numeric timestamp string\n if (/^\\d+$/.test(trimmed)) {\n const numValue = Number(trimmed)\n // Check if it's seconds (typically 10 digits, less than 10000000000)\n if (numValue > 0 && numValue < 10000000000) {\n return dayjs(numValue * 1000)\n }\n // Check if it's a valid timestamp (milliseconds since epoch)\n if (numValue >= 0 && numValue <= 4102444800000) {\n return dayjs(numValue)\n }\n }\n // Parse as date string (ISO string, date string, etc.)\n return dayjs(value)\n },\n toAttribute: (\n value: Dayjs | string | Date | number | undefined | null,\n ): string | null => {\n if (value === undefined || value === null) {\n return null // null removes the attribute\n }\n // Convert Dayjs to ISO string for attribute\n if (dayjs.isDayjs(value)) {\n return value.toISOString()\n }\n if (value instanceof Date) {\n return value.toISOString()\n }\n if (typeof value === 'string') {\n return value\n }\n if (typeof value === 'number') {\n return String(value)\n }\n return null\n },\n }\n\n private readonly inputId: string\n private readonly labelId: string\n private readonly descriptionId: string\n\n @query('.combobox__input') private readonly triggerInput!: HTMLInputElement\n @query('#calendar') private readonly calendar!: DapDSCalendar\n @query('dap-ds-popup') private readonly popup!: HTMLElement\n\n /** The value of the datepicker (selected date in single mode).\n * @type {Dayjs}\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n override value?: Dayjs\n\n /** The mode of the datepicker - single date or range selection.\n * @type {'single' | 'range'}\n * @default 'single'\n */\n @property({ reflect: true }) mode: 'single' | 'range' = 'single'\n\n /** The current visible date (month and year) of the calendar. Only the month and year are considered.\n * @type {Dayjs | string | Date}\n * @default dayjs()\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n currentDate?: Dayjs | string | Date\n\n /** The earliest date the datepicker accepts. Compared with day granularity.\n * @type {Dayjs | string | Date}\n * @default dayjs('1901-01-01')\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n minDate?: Dayjs | string | Date\n\n /** The latest date the datepicker accepts. Compared with day granularity.\n * @type {Dayjs | string | Date}\n * @default dayjs('2099-12-31')\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n maxDate?: Dayjs | string | Date\n\n /** The disabled date of the datepicker. This function will be called for each date to determine if it is disabled.\n * @type {(date: Dayjs) => boolean}\n * @default (date: Dayjs) => false\n */\n @property({ attribute: false }) disabledDate = (date: Dayjs) => {\n return !date\n }\n\n /** The start date of the range selection (only used in range mode).\n * @type {Dayjs | string | Date}\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n rangeStart?: Dayjs | string | Date\n\n /** The end date of the range selection (only used in range mode).\n * @type {Dayjs | string | Date}\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n rangeEnd?: Dayjs | string | Date\n\n /** The placement of the dropdown of the datepicker.\n * @type {'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end'}\n */\n @property({ reflect: true }) placement: PopupPlacement = 'bottom-start'\n\n /** The open state of the datepicker. */\n @property({ type: Boolean, reflect: true }) opened = false\n\n /** Wheter the calendar should open on typing. */\n @property({ type: Boolean }) openCalendarOnInput = false\n\n /** Wheter the calendar should send an empty event on typing. */\n @property({ type: Boolean }) sendEmptyEventOnInput = false\n\n /** The placeholder of the datepicker. */\n @property() placeholder: string | null\n\n /** The loading state of the datepicker. */\n @property({ type: Boolean }) loading?: boolean = false\n\n /** Whether to enable input masking. When active, only digit characters are accepted and format separators are auto-inserted after each complete digit group. Only works in single mode with a single configured format. */\n @property({ type: Boolean }) mask = false\n\n /** The format of the datepicker. This is a comma separated list of [formats](https://day.js.org/docs/en/display/format). */\n @property({ type: String }) format?: string\n\n /** The format separator character in the format attribute. */\n @property({ type: String }) formatSeparator: string = '|'\n\n /** Whether the clear button should be shown. */\n @property({ type: String }) clearButton?: string = 'true'\n\n /** The aria label of the clear button. */\n @property({ type: String }) clearButtonAriaLabel?: string\n\n /** `data-testid` for the clear button. */\n @property() clearButtonTestId = 'datepicker-clear-button'\n\n /** `data-testid` for the calendar indicator button that opens the calendar. */\n @property() calendarButtonTestId = 'datepicker-calendar-button'\n\n /** The floating strategy of the datepicker. */\n @property({ type: String }) floatingStrategy: FloatingStrategy = 'fixed'\n\n /** Whether to keep popup open when trigger leaves viewport. */\n @property({ type: Boolean }) disableViewportAutoClose: boolean = false\n\n /** The locale of the datepicker. By default it uses the global locale from dayjs. It is determined from the browser language.\n * @type {'hu' | 'en' | 'de'}\n */\n @property({ type: String }) locale: string = dayjs.locale()\n\n /** Whether to hide dates from adjacent months (previous/next) in the calendar grid. When not explicitly set, defaults to `false` for single mode and `true` for range mode.\n * @type {boolean}\n */\n @property({ type: Boolean }) hideAdjacentMonths?: boolean\n\n @state() private formatOptions: string[] = []\n @state() private setValueState: boolean = true\n private lastMaskDigitCount = 0\n\n static readonly styles = unsafeCSS(styles)\n\n constructor() {\n super()\n DapDSDatePicker.nextId++\n const uniqueSuffix =\n typeof crypto !== 'undefined' && crypto.randomUUID\n ? crypto.randomUUID().slice(0, 8)\n : Date.now().toString(36)\n this.inputId = `input-${DapDSDatePicker.nextId}-${uniqueSuffix}`\n this.labelId = `label-${DapDSDatePicker.nextId}-${uniqueSuffix}`\n this.descriptionId = `description-${DapDSDatePicker.nextId}-${uniqueSuffix}`\n // Initialize the feedbackId from FeedbackMixin\n this.feedbackId = `feedback-${DapDSDatePicker.nextId}-${uniqueSuffix}`\n }\n\n /**\n * Normalizes a date value to a Dayjs object.\n * Handles Dayjs objects, timestamps (numbers or strings), strings, Date objects, and undefined/null.\n */\n private normalizeDate(\n value: Dayjs | string | Date | number | undefined | null,\n ): Dayjs | undefined {\n if (value === undefined || value === null) {\n return undefined\n }\n\n // If it's already a Dayjs object, return it\n if (dayjs.isDayjs(value)) {\n return value\n }\n\n // If it's a string, check if it's a numeric timestamp string\n if (typeof value === 'string') {\n // Check if the string is purely numeric (timestamp as string)\n const trimmed = value.trim()\n if (/^\\d+$/.test(trimmed)) {\n const numValue = Number(trimmed)\n // Check if it's seconds (typically 10 digits, less than 10000000000)\n // Unix timestamps in seconds are typically 10 digits, milliseconds are 13 digits\n if (numValue > 0 && numValue < 10000000000) {\n return dayjs(numValue * 1000)\n }\n // Check if it's a valid timestamp (milliseconds since epoch)\n // Valid range: between 0 and year 2100 (4102444800000 ms)\n if (numValue >= 0 && numValue <= 4102444800000) {\n return dayjs(numValue)\n }\n }\n // If it's not a numeric string, let dayjs parse it as a date string\n return dayjs(value)\n }\n\n // If it's a number (timestamp), convert it\n if (typeof value === 'number') {\n // Check if it's seconds (typically 10 digits, less than 10000000000)\n // Unix timestamps in seconds are typically 10 digits, milliseconds are 13 digits\n if (value > 0 && value < 10000000000) {\n return dayjs(value * 1000)\n }\n // Check if it's a valid timestamp (milliseconds since epoch)\n // Valid range: between 0 and year 2100 (4102444800000 ms)\n if (value >= 0 && value <= 4102444800000) {\n return dayjs(value)\n }\n }\n\n // For Date objects, dayjs will handle them\n return dayjs(value)\n }\n\n protected firstUpdated(\n _changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>,\n ): void {\n super.firstUpdated(_changedProperties)\n\n // Set formatOptions BEFORE using getFormattedValue()\n this.formatOptions = this.format?.split(this.formatSeparator) || []\n\n this.calendar.mode = this.mode\n\n if (this.mode === 'range') {\n if (this.rangeStart) {\n const normalized = this.normalizeDate(this.rangeStart)\n if (normalized) {\n this.calendar.rangeStart = normalized.locale(this.locale)\n }\n }\n if (this.rangeEnd) {\n const normalized = this.normalizeDate(this.rangeEnd)\n if (normalized) {\n this.calendar.rangeEnd = normalized.locale(this.locale)\n }\n }\n } else if (this.value) {\n const normalized = this.normalizeDate(this.value)\n if (normalized) {\n this.calendar.value = normalized.locale(this.locale)\n // Update the internal value to be a Dayjs object\n this.value = normalized\n // Set the input field value if setValueState is enabled\n if (this.setValueState && this.triggerInput) {\n this.triggerInput.value = this.getFormattedValue()\n }\n }\n }\n\n const normalizedCurrentDate = this.normalizeDate(this.currentDate)\n this.calendar.currentDate = normalizedCurrentDate || dayjs()\n\n const normalizedMinDate = this.normalizeDate(this.minDate)\n this.calendar.minDate = normalizedMinDate || dayjs(DEFAULT_MIN_DATE)\n if (normalizedMinDate) {\n this.minDate = normalizedMinDate\n }\n\n const normalizedMaxDate = this.normalizeDate(this.maxDate)\n this.calendar.maxDate = normalizedMaxDate || dayjs(DEFAULT_MAX_DATE)\n if (normalizedMaxDate) {\n this.maxDate = normalizedMaxDate\n }\n this.calendar.disabledDate = this.disabledDate\n\n // Only set hideAdjacentMonths if explicitly provided\n if (this.hideAdjacentMonths !== undefined) {\n this.calendar.hideAdjacentMonths = this.hideAdjacentMonths\n }\n }\n\n protected updated(\n _changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>,\n ): void {\n super.updated(_changedProperties)\n\n // Process value changes - check both Lit's change detection AND if value exists but wasn't detected\n // This handles cases where React sets a dayjs object but Lit doesn't detect it as changed\n const valueChanged = _changedProperties.has('value')\n const valueExistsButNotProcessed =\n !valueChanged && this.value && this.mode === 'single' && this.hasUpdated\n\n if (\n (valueChanged || valueExistsButNotProcessed) &&\n this.mode === 'single'\n ) {\n const normalized = this.normalizeDate(this.value)\n if (normalized) {\n // Only update if the normalized value is different from current calendar value to avoid infinite loops\n const currentCalendarValue = this.calendar.value\n if (\n !currentCalendarValue ||\n !normalized.isSame(currentCalendarValue, 'day')\n ) {\n this.calendar.value = normalized.locale(this.locale)\n // Update the internal value to be a Dayjs object\n this.value = normalized\n }\n } else {\n this.calendar.value = undefined\n }\n if (this.setValueState && this.triggerInput) {\n this.triggerInput.value = this.getFormattedValue()\n }\n this.setValidity()\n }\n\n if (_changedProperties.has('rangeStart') && this.mode === 'range') {\n const normalized = this.normalizeDate(this.rangeStart)\n if (normalized) {\n this.calendar.rangeStart = normalized.locale(this.locale)\n this.rangeStart = normalized\n } else {\n this.calendar.rangeStart = undefined\n }\n if (this.setValueState && this.rangeStart && this.rangeEnd) {\n this.triggerInput.value = this.getFormattedValue()\n }\n }\n\n if (_changedProperties.has('rangeEnd') && this.mode === 'range') {\n const normalized = this.normalizeDate(this.rangeEnd)\n if (normalized) {\n this.calendar.rangeEnd = normalized.locale(this.locale)\n this.rangeEnd = normalized\n } else {\n this.calendar.rangeEnd = undefined\n }\n if (this.setValueState && this.rangeStart && this.rangeEnd) {\n this.triggerInput.value = this.getFormattedValue()\n }\n }\n\n if (_changedProperties.has('currentDate')) {\n const normalized = this.normalizeDate(this.currentDate)\n this.calendar.currentDate = normalized || dayjs()\n }\n\n if (_changedProperties.has('minDate')) {\n const normalized = this.normalizeDate(this.minDate)\n this.calendar.minDate = normalized || dayjs(DEFAULT_MIN_DATE)\n if (normalized) {\n this.minDate = normalized\n }\n }\n\n if (_changedProperties.has('maxDate')) {\n const normalized = this.normalizeDate(this.maxDate)\n this.calendar.maxDate = normalized || dayjs(DEFAULT_MAX_DATE)\n if (normalized) {\n this.maxDate = normalized\n }\n }\n\n if (_changedProperties.has('disabledDate')) {\n this.calendar.disabledDate = this.disabledDate\n }\n\n if (\n _changedProperties.has('format') ||\n _changedProperties.has('formatSeparator')\n ) {\n this.formatOptions = this.format?.split(this.formatSeparator) || []\n }\n }\n\n getFormattedValue() {\n if (this.mode === 'range') {\n if (!this.rangeStart || !this.rangeEnd) {\n return ''\n }\n const format = this.formatOptions[0] || 'L'\n const startStr = dayjs(this.rangeStart).locale(this.locale).format(format)\n const endStr = dayjs(this.rangeEnd).locale(this.locale).format(format)\n return `${startStr} - ${endStr}`\n }\n\n if (!this.value) {\n return ''\n }\n\n return dayjs(this.value)\n .locale(this.locale)\n .format(this.formatOptions[0] || 'L')\n }\n\n isValidFormat(value: string) {\n if (!this.formatOptions.length) {\n // For the default 'L' format, we need to be more strict to prevent partial dates\n // Get the actual format pattern for the current locale\n const trimmedValue = value.trim()\n\n // Get the actual 'L' format pattern for the current locale\n const localeFormat = dayjs()\n .locale(this.locale)\n .localeData()\n .longDateFormat('L')\n\n // Now validate that the input actually matches the expected format pattern\n // Use the robust string comparison approach: parse and format back to compare\n // The localeFormat already contains the correct format for the current locale\n const parsedDate = dayjs(trimmedValue, localeFormat)\n if (!parsedDate.isValid()) {\n return false\n }\n // Format back and compare - if they differ, the input was incomplete\n // Handle optional trailing separators by normalizing both strings\n const formattedDate = parsedDate.format(localeFormat)\n const normalizedInput = trimmedValue.replace(/[.,\\s]+$/, '') // Remove trailing separators\n const normalizedFormatted = formattedDate.replace(/[.,\\s]+$/, '') // Remove trailing separators\n if (normalizedFormatted !== normalizedInput) {\n return false\n }\n\n return true\n }\n\n return this.formatOptions.some(format => {\n // Use the same robust string comparison approach for custom formats\n // Parse with the custom format and compare the result\n const parsedDate = dayjs(value, format)\n if (!parsedDate.isValid()) {\n return false\n }\n // Format back and compare - if they differ, the input was incomplete\n // Handle optional trailing separators by normalizing both strings\n const formattedDate = parsedDate.format(format)\n const normalizedInput = value.replace(/[.,\\s]+$/, '') // Remove trailing separators\n const normalizedFormatted = formattedDate.replace(/[.,\\s]+$/, '') // Remove trailing separators\n return normalizedFormatted === normalizedInput\n })\n }\n\n isValueValid() {\n if (!this.value) {\n return true\n }\n\n return this.isInputValid()\n }\n\n isInputValid() {\n return this.isValidFormat(this.triggerInput.value)\n }\n\n setValue(\n value?: Dayjs,\n setInputValue: boolean = true,\n sendEmptyEventOnInput: boolean = true,\n ) {\n this.value = value\n\n if (setInputValue) {\n this.setValueState = true\n this.triggerInput.value = this.getFormattedValue()\n } else {\n this.setValueState = false\n }\n\n // Update form value for form participation\n if (this.internals) {\n this.internals.setFormValue(\n this.value ? this.value.toString() : this.defaultValue,\n )\n }\n\n this.setValidity()\n this.hideCalendar()\n\n if (sendEmptyEventOnInput) {\n this.emit('dds-change', { value: this.value })\n this.emit('dds-valid-date', { value: this.triggerInput.value })\n }\n }\n\n async clearSelection() {\n this.lastMaskDigitCount = 0\n this.setValue(undefined, true, true)\n }\n\n private isMaskActive(): boolean {\n return this.mask && this.mode === 'single' && this.formatOptions.length <= 1\n }\n\n private getActiveMaskFormat(): string {\n if (this.formatOptions.length > 0) {\n return this.formatOptions[0]\n }\n return dayjs().locale(this.locale).localeData().longDateFormat('L')\n }\n\n private parseMaskTokens(format: string): MaskToken[] {\n const tokens: MaskToken[] = []\n let i = 0\n while (i < format.length) {\n if (format.startsWith('YYYY', i)) {\n tokens.push({ type: 'digit', length: 4 })\n i += 4\n } else if (format.startsWith('YY', i)) {\n tokens.push({ type: 'digit', length: 2 })\n i += 2\n } else if (format.startsWith('MM', i)) {\n tokens.push({ type: 'digit', length: 2 })\n i += 2\n } else if (format.startsWith('DD', i)) {\n tokens.push({ type: 'digit', length: 2 })\n i += 2\n } else if (format[i] === 'M') {\n tokens.push({ type: 'digit', length: 2 })\n i += 1\n } else if (format[i] === 'D') {\n tokens.push({ type: 'digit', length: 2 })\n i += 1\n } else {\n tokens.push({ type: 'separator', value: format[i] })\n i += 1\n }\n }\n return tokens\n }\n\n private buildMaskedValue(digits: string): string {\n const tokens = this.parseMaskTokens(this.getActiveMaskFormat())\n let result = ''\n let digitIndex = 0\n\n for (const token of tokens) {\n if (token.type === 'separator') {\n if (digitIndex > 0) {\n result += token.value\n }\n } else {\n const available = digits.slice(digitIndex, digitIndex + token.length!)\n result += available\n digitIndex += available.length\n if (available.length < token.length!) {\n break\n }\n }\n }\n\n return result\n }\n\n private readonly handleDocumentMouseDown = (event: MouseEvent) => {\n const path = event.composedPath()\n if (\n this &&\n !path.includes(this) &&\n (!this.popup || !path.includes(this.popup))\n ) {\n this.hideCalendar()\n }\n }\n\n private readonly handlePopupAutoClose = () => {\n this.hideCalendar({ skipFocus: true })\n }\n\n private readonly handleInput = (event: InputEvent) => {\n const input = event.target as HTMLInputElement\n\n if (this.isMaskActive()) {\n let rawDigits = input.value.replace(/\\D/g, '')\n const isDeleting =\n event.inputType === 'deleteContentBackward' ||\n event.inputType === 'deleteContentForward'\n if (isDeleting && rawDigits.length === this.lastMaskDigitCount) {\n rawDigits = rawDigits.slice(0, -1)\n }\n this.lastMaskDigitCount = rawDigits.length\n const masked = this.buildMaskedValue(rawDigits)\n input.value = masked\n input.setSelectionRange(masked.length, masked.length)\n }\n\n if (!input.value) {\n this.setValue(undefined, false, true)\n } else {\n if (this.isInputValid()) {\n const date = dayjs(input.value).locale(this.locale)\n\n // Normalize minDate and maxDate to ensure they're Dayjs objects\n const minDate =\n this.normalizeDate(this.minDate) || dayjs(DEFAULT_MIN_DATE)\n const maxDate =\n this.normalizeDate(this.maxDate) || dayjs(DEFAULT_MAX_DATE)\n\n if (date.isBefore(minDate, 'day') || date.isAfter(maxDate, 'day')) {\n this.setValue(undefined, false, this.sendEmptyEventOnInput)\n // The text parsed cleanly, it only falls outside our range. Hand the parsed date\n // over so the consumer can phrase its own rule instead of re-parsing the text.\n this.emit('dds-invalid-date', {\n value: input.value,\n type: 'out-of-range',\n date: date.format(DEFAULT_ISO_FORMAT),\n })\n } else {\n this.setValue(date, false)\n this.currentDate = date\n this.emit('dds-valid-date', { value: input.value })\n }\n } else {\n this.setValue(undefined, false, this.sendEmptyEventOnInput)\n this.emit('dds-invalid-date', { value: input.value, type: 'invalid' })\n }\n }\n\n if (this.openCalendarOnInput && !this.opened) {\n this.showCalendar()\n }\n\n this.emit('dds-input', { value: input.value })\n }\n\n private readonly handleKeyDown = async (event: KeyboardEvent) => {\n if (event.key === 'Tab') {\n return\n }\n\n if (\n event.key === 'Enter' ||\n event.key === 'ArrowDown' ||\n event.key === 'ArrowUp'\n ) {\n event.preventDefault()\n event.stopPropagation()\n\n if (!this.opened) {\n this.showCalendar()\n await this.updateComplete\n this.calendar.captureFocus()\n } else {\n this.hideCalendar()\n }\n }\n }\n\n public get focusElement() {\n return this.triggerInput\n }\n\n private readonly handleClick = () => {\n if (!this.opened) {\n this.showCalendar()\n } else {\n this.hideCalendar()\n }\n }\n\n private readonly handleClearClick = () => {\n if (!this.disabled) {\n this.clearSelection()\n\n this.triggerInput.focus()\n this.setValidity()\n\n this.hideCalendar()\n\n this.emit('dds-clear')\n }\n }\n\n async showCalendar() {\n if (this.disabled || this.readonly || this.opened) {\n return\n }\n\n this.opened = true\n\n document.addEventListener('mousedown', this.handleDocumentMouseDown)\n }\n\n async hideCalendar(options?: { skipFocus?: boolean }) {\n if (!this.opened) {\n return\n }\n\n this.opened = false\n\n document.removeEventListener('mousedown', this.handleDocumentMouseDown)\n\n await this.updateComplete\n if (!options?.skipFocus) {\n this.focus()\n }\n }\n\n private readonly handleFocus = () => {\n this.emit('dds-focus')\n }\n\n private readonly handleBlur = () => {\n this.emit('dds-blur')\n }\n\n // custom validation\n getValidity() {\n return !!this.value\n }\n\n get validity(): ValidityState {\n if (this.internals.validity) {\n return this.internals.validity\n } else {\n return getValidityStateObject({\n valueMissing: this.required && !this.getValidity(),\n patternMismatch: !this.isValueValid(),\n })\n }\n }\n\n checkValidity() {\n return this.required && this.getValidity() && this.isValueValid()\n }\n\n reportValidity() {\n return this.required && this.getValidity() && this.isValueValid()\n }\n\n setValidity() {\n if (!this.checkValidity()) {\n this.internals.setValidity(\n {\n valueMissing: this.required && !this.getValidity(),\n patternMismatch: !this.isValueValid(),\n },\n this.validationMessage,\n this.triggerInput,\n )\n } else {\n this.internals.setValidity({})\n }\n }\n\n handleInvalid(event: Event) {\n event.preventDefault()\n }\n\n render() {\n return html` <div class=\"label-container\">\n ${formLabelTemplate({\n label: this.label,\n id: this.labelId,\n htmlFor: this.inputId,\n size: this.size,\n required: this.required,\n requiredLabel: this.requiredLabel,\n optional: this.optional,\n optionalLabel: this.optionalLabel,\n disabled: this.disabled,\n subtle: this.subtle,\n noMargin: !!this.description,\n hideLabel: this.hideLabel,\n })}\n ${this.tooltip &&\n html` <dap-ds-tooltip\n part=\"tooltip\"\n content=${this.tooltip}\n mode=\"toggle\"\n placement=${this.tooltipPlacement}>\n <dap-ds-icon-button\n slot=\"trigger\"\n size=${this.size as 'xs' | 'sm' | 'md' | 'lg'}\n iconSize=${this.size === 'xs' ? '16' : '22'}\n class=\"info-button\"\n clean>\n <dap-ds-icon\n name=\"information-line\"\n aria-label=${this.tooltipAriaLabel}\n class=\"info-button\"></dap-ds-icon>\n </dap-ds-icon-button>\n </dap-ds-tooltip>`}\n </div>\n ${this.description &&\n html`\n <dap-ds-typography\n part=\"description\"\n variant=\"description\"\n class=${clsx('input-description')}\n size=${ifDefined(this.size as CommonFormElementSize)}\n id=${this.descriptionId}>\n ${this.description}\n </dap-ds-typography>\n `}\n <div>\n <dap-ds-popup\n part=\"base\"\n class=\"select-popup\"\n overflow\n ?opened=${this.opened}\n ?hasArrow=${false}\n placement=${this.placement}\n floatingStrategy=${this.floatingStrategy}\n maxHeight=\"auto\"\n offset=\"4\"\n ?disableViewportAutoClose=${this.disableViewportAutoClose}\n @dds-close=${this.handlePopupAutoClose}>\n <div\n slot=\"trigger\"\n part=\"trigger\"\n class=\"${clsx('select', `select--${this.size}`, {\n 'select--disabled': this.disabled,\n 'select--readonly': this.readonly,\n 'select--opened': this.opened,\n 'select--loading': this.loading,\n 'select--success': this.status === 'success',\n 'select--error': this.status === 'error',\n 'select--no-animation': true,\n })}\">\n <input\n part=\"input\"\n role=\"combobox\"\n class=\"${clsx('combobox__input', 'input', `input--${this.size}`, {\n 'input--disabled': this.disabled,\n 'input--readonly': this.readonly,\n })}\"\n id=${this.inputId}\n value=${this.getFormattedValue()}\n aria-expanded=${this.opened}\n aria-haspopup=\"dialog\"\n aria-labelledby=${ifDefined(this.label ? this.labelId : nothing)}\n aria-describedby=\"${ifDefined(\n this.description ? this.descriptionId : nothing,\n )} ${ifDefined(this.feedback ? this.feedbackId : nothing)}\"\n aria-disabled=${this.disabled}\n aria-controls=\"calendar\"\n aria-autocomplete=\"none\"\n ?required=${this.required}\n ?readonly=${this.readonly}\n ?autofocus=${this.autofocus}\n ?disabled=${this.disabled}\n autocomplete=${this.autocomplete as any}\n placeholder=${ifDefined(this.placeholder ?? '')}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @input=${this.handleInput}\n @keydown=${this.handleKeyDown}\n @invalid=${this.handleInvalid}\n @click=${this.handleClick} />\n <div\n class=\"${clsx('select-action', `select-action--${this.size}`, {\n 'select-action--disabled': this.disabled,\n 'select-action--readonly': this.readonly,\n 'select-action--opened': this.opened,\n })}\">\n ${this.clearButton === 'true' && !this.readonly\n ? html`<div class=\"${clsx('clear-icon')}\">\n <dap-ds-icon-button\n icon=\"close-line\"\n part=\"clear-button\"\n data-testid=${this.clearButtonTestId}\n aria-label=${ifDefined(\n this.clearButtonAriaLabel ??\n t('clear', { lng: this.locale }),\n )}\n ?disabled=${this.disabled}\n @click=${this.handleClearClick}></dap-ds-icon-button>\n </div>`\n : nothing}\n <div\n class=\"${clsx('indicator-icon', {\n 'indicator-icon--loading': this.loading,\n })}\">\n ${this.loading\n ? html`<dap-ds-icon-loading-spinner></dap-ds-icon-loading-spinner>`\n : html`<dap-ds-icon-calendar-line\n aria-hidden=\"true\"\n part=\"calendar-button\"\n data-testid=${this.calendarButtonTestId}\n class=${clsx('calendar-icon')}\n @click=${this.handleClick}></dap-ds-icon-calendar-line>`}\n </div>\n </div>\n </div>\n <dap-ds-calendar\n id=\"calendar\"\n part=\"calendar\"\n exportparts=\"calendar-header-button-prev, calendar-header-button-next, calendar-header-year-select, calendar-header-month-select, calendar-grid-header-cell, calendar-grid-cell, calendar-grid-header-cell-base, calendar-grid-cell-base, calendar-grid-cell-today-mark\"\n locale=${this.locale}\n @dds-close=${this.hideCalendar}\n @dds-change=${(event: CustomEvent) => {\n event.preventDefault()\n event.stopPropagation()\n if (this.mode === 'single') {\n this.setValue(event.detail.value)\n }\n }}\n @dds-range-change=${(event: CustomEvent) => {\n event.preventDefault()\n event.stopPropagation()\n if (this.mode === 'range') {\n this.rangeStart = event.detail.startDate\n this.rangeEnd = event.detail.endDate\n this.triggerInput.value = this.getFormattedValue()\n this.emit('dds-change', {\n startDate: this.rangeStart,\n endDate: this.rangeEnd,\n })\n this.hideCalendar()\n }\n }}>\n </dap-ds-calendar>\n </dap-ds-popup>\n ${this.feedback &&\n html`<dap-ds-feedback\n part=\"feedback\"\n feedbackType=${ifDefined(this.feedbackType)}\n feedbackSize=\"${ifDefined(this.size as 'lg' | 'sm' | 'xs')}\"\n id=\"feedback\">\n ${this.feedback}\n </dap-ds-feedback>`}\n </div>`\n }\n}\n"],"names":["DEFAULT_MIN_DATE","DEFAULT_MAX_DATE","DEFAULT_ISO_FORMAT","_DapDSDatePicker","_a","GenericFormElement","date","dayjs","event","path","input","rawDigits","masked","minDate","maxDate","__async","uniqueSuffix","value","trimmed","numValue","_changedProperties","normalized","normalizedCurrentDate","normalizedMinDate","normalizedMaxDate","valueChanged","valueExistsButNotProcessed","currentCalendarValue","format","startStr","endStr","trimmedValue","localeFormat","parsedDate","formattedDate","normalizedInput","setInputValue","sendEmptyEventOnInput","tokens","i","digits","result","digitIndex","token","available","options","getValidityStateObject","html","formLabelTemplate","clsx","ifDefined","nothing","_b","t","DapDSFormLabel","DapDSTooltip","DapDSIconButton","DapDSIcon","DapDSTypography","DapDSPopup","SystemLoadingSpinner","BusinessCalendarLine","DapDSCalendar","DapDSFeedback","unsafeCSS","styles","__decorateClass","query","property","state","DapDSDatePicker"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAMA,IAAmB,cACnBC,IAAmB,cAGnBC,IAAqB;;AAsF3B,MAAqBC,KAArBC,IAAA,cAA6CC,EAAmB;AAAA,EAgN9D,cAAc;AACN,UAAA,GArHgD,KAAA,OAAA,UAiCxB,KAAA,eAAe,CAACC,MACvC,CAACA,GAsB+C,K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EAA3BE,EAAS,EAAE,MAAM,OAAQ,CAAA;AAAA,GAzKPjE,EAyKS,WAAA,QAAA;AAGA+D,EAAA;AAAA,EAA3BE,EAAS,EAAE,MAAM,OAAQ,CAAA;AAAA,GA5KPjE,EA4KS,WAAA,iBAAA;AAGA+D,EAAA;AAAA,EAA3BE,EAAS,EAAE,MAAM,OAAQ,CAAA;AAAA,GA/KPjE,EA+KS,WAAA,aAAA;AAGA+D,EAAA;AAAA,EAA3BE,EAAS,EAAE,MAAM,OAAQ,CAAA;AAAA,GAlLPjE,EAkLS,WAAA,sBAAA;AAGhB+D,EAAA;AAAA,EAAXE,EAAS;AAAA,GArLSjE,EAqLP,WAAA,mBAAA;AAGA+D,EAAA;AAAA,EAAXE,EAAS;AAAA,GAxLSjE,EAwLP,WAAA,sBAAA;AAGgB+D,EAAA;AAAA,EAA3BE,EAAS,EAAE,MAAM,OAAQ,CAAA;AAAA,GA3LPjE,EA2LS,WAAA,kBAAA;AAGC+D,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GA9LRjE,EA8LU,WAAA,0BAAA;AAKD+D,EAAA;AAAA,EAA3BE,EAAS,EAAE,MAAM,OAAQ,CAAA;AAAA,GAnMPjE,EAmMS,WAAA,QAAA;AAKC+D,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GAxMRjE,EAwMU,WAAA,oBAAA;AAEZ+D,EAAA;AAAA,EAAhBG,EAAM;AAAA,GA1MYlE,EA0MF,WAAA,eAAA;AACA+D,EAAA;AAAA,EAAhBG,EAAM;AAAA,GA3MYlE,EA2MF,WAAA,eAAA;AA3MnB,IAAqBmE,KAArBnE;"}
1
+ {"version":3,"file":"datepicker.component.js","sources":["../../../src/components/datepicker/datepicker.component.ts"],"sourcesContent":["import clsx from 'clsx'\nimport dayjs, { Dayjs } from 'dayjs'\nimport { nothing, PropertyValueMap, unsafeCSS } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { html } from 'lit/static-html.js'\n\nimport {\n CommonFormElementSize,\n FloatingStrategy,\n PopupPlacement,\n} from '@/common/types'\nimport { getValidityStateObject } from '@/common/utils'\nimport { GenericFormElement } from '@/internal/mixin/genericFormElement'\nimport { formLabelTemplate } from '@/internal/templates/formLabel'\nimport { t } from '@/localization/localization'\n\nimport DapDSCalendar from '../calendar/calendar.component'\nimport DapDSFeedback from '../feedback/feedback.component'\nimport DapDSFormLabel from '../form/form-label/form-label.component'\nimport DapDSIcon from '../icon/icon.component'\nimport DapDSIconButton from '../icon-button/icon-button.component'\nimport BusinessCalendarLine from '../icons/business/business-calendar-line/business-calendar-line.component'\nimport SystemLoadingSpinner from '../icons/system/system-loading-spinner/system-loading-spinner.component'\nimport DapDSPopup from '../popup/popup.component'\nimport DapDSTooltip from '../tooltip/tooltip.component'\nimport DapDSTypography from '../typography/typography.component'\nimport styles from './datepicker.scss?inline'\n\ninterface MaskToken {\n type: 'digit' | 'separator'\n length?: number\n value?: string\n}\n\n/**\n * The bounds the calendar falls back to when the consumer sets no minDate/maxDate.\n * They have to stay finite: the calendar renders one option per year between them.\n */\nconst DEFAULT_MIN_DATE = '1901-01-01'\nconst DEFAULT_MAX_DATE = '2099-12-31'\n\n/** Framework-neutral shape for the date handed to consumers on the out-of-range event. */\nconst DEFAULT_ISO_FORMAT = 'YYYY-MM-DD'\n\n/**\n * `dap-ds-datepicker`\n * @summary A datepicker is a graphical user interface widget that allows the user to select a date from a calendar and/or time from a time range.\n * @element dap-ds-datepicker\n * @title - Datepicker\n *\n * @property {Dayjs} value - The value of the datepicker.\n * @property {string} label - The label of the datepicker.\n * @property {boolean} hideLabel - Visually hides the label while keeping it available to assistive technology. (default: false)\n * @property {string} description - The description of the datepicker.\n * @property {'xs' | 'sm' | 'sm'} size - The size of the datepicker.\n * @property {boolean} disabled - The disabled state of the datepicker.\n * @property {boolean} required - The required state of the datepicker.\n * @property {boolean} readonly - The readonly state of the datepicker.\n * @property {boolean} autofocus - The autofocus state of the datepicker.\n * @property {string} tooltip - The tooltip of the datepicker.\n * @property {'top' | 'right' | 'bottom' | 'left'} tooltipPlacement - The tooltip placement of the datepicker.\n * @property {string} feedback - The feedback of the datepicker.\n * @property {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the datepicker.\n * @property {boolean} optional - The optional state of the datepicker.\n * @property {string} optionalLabel - The optional label of the datepicker.\n * @property {string} requiredLabel - The required indicator of the datepicker. (default: '*')\n * @property {boolean} subtle - The weight of the label. Default is `false`\n * @property {string} autocomplete - The autocomplete of the datepicker.\n * @property {boolean} autofocus - The autofocus of the datepicker.\n *\n * @event {{ value: string }} dds-change - Fired when the datepicker value changes.\n * @event {{ value: string }} dds-input - Fired when the datepicker input value changes.\n * @event {{ value: string }} dds-valid-date - Fired when the datepicker input value is valid. Happens on manual input typing.\n * @event {{ value: string, type: 'invalid' | 'out-of-range', date?: string }} dds-invalid-date - Fired when the datepicker input value is invalid. Happens on manual input typing. For `out-of-range` the typed text was a well-formed date, so `date` carries it as an ISO (`YYYY-MM-DD`) string and the consumer can phrase its own range message; for `invalid` the text could not be parsed and `date` is omitted.\n * @event {{ void }} dds-clear - Fired when the datepicker is cleared.\n * @event {{ void }} dds-focus - Emitted when the datepicker gains focus.\n * @event {{ void }} dds-blur - Emitted when the datepicker loses focus.\n *\n * @csspart base - The main datepicker container.\n * @csspart calendar - The calendar of the datepicker.\n * @csspart trigger - The trigger button of the datepicker.\n * @csspart label - The label of the datepicker.\n * @csspart description - The description of the datepicker.\n * @csspart feedback - The feedback of the datepicker.\n * @csspart tooltip - The tooltip of the datepicker.\n * @csspart input - The input of the datepicker.\n * @csspart clear-button - The clear button of the datepicker.\n * @csspart calendar-grid-cell-base - The base of the calendar grid cell.\n * @csspart calendar-grid-cell - The cell of the calendar grid.\n * @csspart calendar-grid-header-cell-base - The base of the calendar grid header cell.\n * @csspart calendar-grid-header-cell - The header cell of the calendar grid.\n * @csspart calendar-grid-cell-today-mark - The today mark of the calendar grid cell.\n * @csspart calendar-button - The calendar icon button of the datepicker.\n * @csspart calendar-header-button-prev - The previous month button of the calendar header.\n * @csspart calendar-header-button-next - The next month button of the calendar header.\n * @csspart calendar-header-year-select - The year select of the calendar header.\n * @csspart calendar-header-month-select - The month select of the calendar header.\n * @csspart label-base - The base of the label.\n * @csspart label-required - The required indicator of the label.\n * @csspart label-optional - The optional indicator of the label.\n *\n * @cssproperty --dds-combobox-background - The background color of the combobox. (default: var(--dds-fields-background-default))\n * @cssproperty --dds-combobox-border-color - The border color of the combobox. (default: var(--dds-border-neutral-base))\n * @cssproperty --dds-combobox-border-width - The border width of the combobox. (default: var(--dds-border-width-base, 1px))\n * @cssproperty --dds-combobox-border-radius - The border radius of the combobox. (default: var(--dds-radius-base))\n * @cssproperty --dds-combobox-text-color - The text color of the combobox. (default: var(--dds-text-neutral-base))\n * @cssproperty --dds-combobox-placeholder-color - The placeholder text color. (default: var(--dds-text-neutral-subtle))\n * @cssproperty --dds-combobox-disabled-background - The background color when disabled. (default: var(--dds-background-neutral-stronger))\n * @cssproperty --dds-combobox-disabled-text - The text color when disabled. (default: var(--dds-text-neutral-disabled))\n * @cssproperty --dds-combobox-error-border - The border color for error state. (default: var(--dds-border-negative-base))\n * @cssproperty --dds-combobox-success-border - The border color for success state. (default: var(--dds-border-positive-base))\n * @cssproperty --dds-combobox-icon-color - The color of the icons. (default: var(--dds-text-icon-neutral-subtle))\n * @cssproperty --dds-combobox-clear-icon-color - The color of the clear icon. (default: var(--dds-button-subtle-icon-neutral-enabled))\n * @cssproperty --dds-combobox-popup-background - The background color of the popup. (default: var(--dds-background-neutral-subtle))\n * @cssproperty --dds-combobox-popup-shadow - The box shadow of the popup. (default: 0 4px 6px -1px rgb(0 0 0 / 8%), 0 2px 4px -1px rgb(0 0 0 / 6%))\n * @cssproperty --dds-combobox-padding-xs - The padding for extra small size. (default: var(--dds-spacing-200))\n * @cssproperty --dds-combobox-padding-sm - The padding for small size. (default: var(--dds-spacing-200))\n * @cssproperty --dds-combobox-padding-lg - The padding for large size. (default: var(--dds-spacing-300))\n * @cssproperty --dds-combobox-padding-horizontal - The horizontal padding. (default: var(--dds-spacing-300))\n * @cssproperty --dds-combobox-padding-vertical - The vertical padding. (default: var(--dds-spacing-200))\n * @cssproperty --dds-combobox-gap - The gap between elements. (default: var(--dds-spacing-100))\n * @cssproperty --dds-combobox-icon-gap - The gap between icons. (default: var(--dds-spacing-200))\n * @cssproperty --dds-combobox-action-gap - The gap between action elements. (default: var(--dds-spacing-200))\n * @cssproperty --dds-combobox-action-padding - The padding for action elements. (default: var(--dds-spacing-300))\n * @cssproperty --dds-combobox-clear-icon-width - The width of the clear icon. (default: var(--dds-spacing-800))\n * @cssproperty --dds-combobox-dropdown-icon-right - The right position of the dropdown icon. (default: var(--dds-spacing-600))\n * @cssproperty --dds-combobox-min-width - The minimum width of the combobox. (default: 7.5rem)\n */\nexport default class DapDSDatePicker extends GenericFormElement {\n static tagName = 'dap-ds-datepicker'\n\n static dependencies = {\n 'dap-ds-form-label': DapDSFormLabel,\n 'dap-ds-tooltip': DapDSTooltip,\n 'dap-ds-icon-button': DapDSIconButton,\n 'dap-ds-icon': DapDSIcon,\n 'dap-ds-typography': DapDSTypography,\n 'dap-ds-popup': DapDSPopup,\n 'dap-ds-icon-loading-spinner': SystemLoadingSpinner,\n 'dap-ds-icon-calendar-line': BusinessCalendarLine,\n 'dap-ds-calendar': DapDSCalendar,\n 'dap-ds-feedback': DapDSFeedback,\n }\n\n private static nextId = 0\n\n /**\n * Property converter for date properties.\n * Converts string attributes (from React) to Dayjs objects.\n * Allows both attribute binding (strings) and property binding (Dayjs objects).\n *\n * Note: When properties are set directly (bypassing attributes), they are normalized\n * in the `updated` lifecycle method via `normalizeDate`.\n */\n private static datePropertyConverter = {\n fromAttribute: (value: string | null): Dayjs | undefined => {\n if (value === null || value === undefined || value === '') {\n return undefined\n }\n const trimmed = value.trim()\n if (!trimmed) return undefined\n\n // Check if it's a numeric timestamp string\n if (/^\\d+$/.test(trimmed)) {\n const numValue = Number(trimmed)\n // Check if it's seconds (typically 10 digits, less than 10000000000)\n if (numValue > 0 && numValue < 10000000000) {\n return dayjs(numValue * 1000)\n }\n // Check if it's a valid timestamp (milliseconds since epoch)\n if (numValue >= 0 && numValue <= 4102444800000) {\n return dayjs(numValue)\n }\n }\n // Parse as date string (ISO string, date string, etc.)\n return dayjs(value)\n },\n toAttribute: (\n value: Dayjs | string | Date | number | undefined | null,\n ): string | null => {\n if (value === undefined || value === null) {\n return null // null removes the attribute\n }\n // Convert Dayjs to ISO string for attribute\n if (dayjs.isDayjs(value)) {\n return value.toISOString()\n }\n if (value instanceof Date) {\n return value.toISOString()\n }\n if (typeof value === 'string') {\n return value\n }\n if (typeof value === 'number') {\n return String(value)\n }\n return null\n },\n }\n\n private readonly inputId: string\n private readonly labelId: string\n private readonly descriptionId: string\n\n @query('.combobox__input') private readonly triggerInput!: HTMLInputElement\n @query('#calendar') private readonly calendar!: DapDSCalendar\n @query('dap-ds-popup') private readonly popup!: HTMLElement\n\n /** The value of the datepicker (selected date in single mode).\n * @type {Dayjs}\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n override value?: Dayjs\n\n /** The mode of the datepicker - single date or range selection.\n * @type {'single' | 'range'}\n * @default 'single'\n */\n @property({ reflect: true }) mode: 'single' | 'range' = 'single'\n\n /** The current visible date (month and year) of the calendar. Only the month and year are considered.\n * @type {Dayjs | string | Date}\n * @default dayjs()\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n currentDate?: Dayjs | string | Date\n\n /** The earliest date the datepicker accepts. Compared with day granularity.\n * @type {Dayjs | string | Date}\n * @default dayjs('1901-01-01')\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n minDate?: Dayjs | string | Date\n\n /** The latest date the datepicker accepts. Compared with day granularity.\n * @type {Dayjs | string | Date}\n * @default dayjs('2099-12-31')\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n maxDate?: Dayjs | string | Date\n\n /** The disabled date of the datepicker. This function will be called for each date to determine if it is disabled.\n * @type {(date: Dayjs) => boolean}\n * @default (date: Dayjs) => false\n */\n @property({ attribute: false }) disabledDate = (date: Dayjs) => {\n return !date\n }\n\n /** The start date of the range selection (only used in range mode).\n * @type {Dayjs | string | Date}\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n rangeStart?: Dayjs | string | Date\n\n /** The end date of the range selection (only used in range mode).\n * @type {Dayjs | string | Date}\n */\n @property({\n converter: DapDSDatePicker.datePropertyConverter,\n })\n rangeEnd?: Dayjs | string | Date\n\n /** The placement of the dropdown of the datepicker.\n * @type {'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end'}\n */\n @property({ reflect: true }) placement: PopupPlacement = 'bottom-start'\n\n /** The open state of the datepicker. */\n @property({ type: Boolean, reflect: true }) opened = false\n\n /** Wheter the calendar should open on typing. */\n @property({ type: Boolean }) openCalendarOnInput = false\n\n /** Wheter the calendar should send an empty event on typing. */\n @property({ type: Boolean }) sendEmptyEventOnInput = false\n\n /** The placeholder of the datepicker. */\n @property() placeholder: string | null\n\n /** The loading state of the datepicker. */\n @property({ type: Boolean }) loading?: boolean = false\n\n /** Whether to enable input masking. When active, only digit characters are accepted and format separators are auto-inserted after each complete digit group. Only works in single mode with a single configured format. */\n @property({ type: Boolean }) mask = false\n\n /** The format of the datepicker. This is a comma separated list of [formats](https://day.js.org/docs/en/display/format). */\n @property({ type: String }) format?: string\n\n /** The format separator character in the format attribute. */\n @property({ type: String }) formatSeparator: string = '|'\n\n /** Whether the clear button should be shown. */\n @property({ type: String }) clearButton?: string = 'true'\n\n /** The aria label of the clear button. */\n @property({ type: String }) clearButtonAriaLabel?: string\n\n /** `data-testid` for the clear button. */\n @property() clearButtonTestId = 'datepicker-clear-button'\n\n /** `data-testid` for the calendar indicator button that opens the calendar. */\n @property() calendarButtonTestId = 'datepicker-calendar-button'\n\n /** The floating strategy of the datepicker. */\n @property({ type: String }) floatingStrategy: FloatingStrategy = 'fixed'\n\n /** Whether to keep popup open when trigger leaves viewport. */\n @property({ type: Boolean }) disableViewportAutoClose: boolean = false\n\n /** The locale of the datepicker. By default it uses the global locale from dayjs. It is determined from the browser language.\n * @type {'hu' | 'en' | 'de'}\n */\n @property({ type: String }) locale: string = dayjs.locale()\n\n /** Whether to hide dates from adjacent months (previous/next) in the calendar grid. When not explicitly set, defaults to `false` for single mode and `true` for range mode.\n * @type {boolean}\n */\n @property({ type: Boolean }) hideAdjacentMonths?: boolean\n\n @state() private formatOptions: string[] = []\n @state() private setValueState: boolean = true\n // The value last written from the user's typing. Any other incoming `value` is an\n // external write (e.g. a framework form reset), which must resync the input text.\n private inputDrivenValue?: Dayjs | null\n private lastMaskDigitCount = 0\n\n static readonly styles = unsafeCSS(styles)\n\n constructor() {\n super()\n DapDSDatePicker.nextId++\n const uniqueSuffix =\n typeof crypto !== 'undefined' && crypto.randomUUID\n ? crypto.randomUUID().slice(0, 8)\n : Date.now().toString(36)\n this.inputId = `input-${DapDSDatePicker.nextId}-${uniqueSuffix}`\n this.labelId = `label-${DapDSDatePicker.nextId}-${uniqueSuffix}`\n this.descriptionId = `description-${DapDSDatePicker.nextId}-${uniqueSuffix}`\n // Initialize the feedbackId from FeedbackMixin\n this.feedbackId = `feedback-${DapDSDatePicker.nextId}-${uniqueSuffix}`\n }\n\n /**\n * Normalizes a date value to a Dayjs object.\n * Handles Dayjs objects, timestamps (numbers or strings), strings, Date objects, and undefined/null.\n */\n private normalizeDate(\n value: Dayjs | string | Date | number | undefined | null,\n ): Dayjs | undefined {\n if (value === undefined || value === null) {\n return undefined\n }\n\n // If it's already a Dayjs object, return it\n if (dayjs.isDayjs(value)) {\n return value\n }\n\n // If it's a string, check if it's a numeric timestamp string\n if (typeof value === 'string') {\n // Check if the string is purely numeric (timestamp as string)\n const trimmed = value.trim()\n if (/^\\d+$/.test(trimmed)) {\n const numValue = Number(trimmed)\n // Check if it's seconds (typically 10 digits, less than 10000000000)\n // Unix timestamps in seconds are typically 10 digits, milliseconds are 13 digits\n if (numValue > 0 && numValue < 10000000000) {\n return dayjs(numValue * 1000)\n }\n // Check if it's a valid timestamp (milliseconds since epoch)\n // Valid range: between 0 and year 2100 (4102444800000 ms)\n if (numValue >= 0 && numValue <= 4102444800000) {\n return dayjs(numValue)\n }\n }\n // If it's not a numeric string, let dayjs parse it as a date string\n return dayjs(value)\n }\n\n // If it's a number (timestamp), convert it\n if (typeof value === 'number') {\n // Check if it's seconds (typically 10 digits, less than 10000000000)\n // Unix timestamps in seconds are typically 10 digits, milliseconds are 13 digits\n if (value > 0 && value < 10000000000) {\n return dayjs(value * 1000)\n }\n // Check if it's a valid timestamp (milliseconds since epoch)\n // Valid range: between 0 and year 2100 (4102444800000 ms)\n if (value >= 0 && value <= 4102444800000) {\n return dayjs(value)\n }\n }\n\n // For Date objects, dayjs will handle them\n return dayjs(value)\n }\n\n protected firstUpdated(\n _changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>,\n ): void {\n super.firstUpdated(_changedProperties)\n\n // Set formatOptions BEFORE using getFormattedValue()\n this.formatOptions = this.format?.split(this.formatSeparator) || []\n\n this.calendar.mode = this.mode\n\n if (this.mode === 'range') {\n if (this.rangeStart) {\n const normalized = this.normalizeDate(this.rangeStart)\n if (normalized) {\n this.calendar.rangeStart = normalized.locale(this.locale)\n }\n }\n if (this.rangeEnd) {\n const normalized = this.normalizeDate(this.rangeEnd)\n if (normalized) {\n this.calendar.rangeEnd = normalized.locale(this.locale)\n }\n }\n } else if (this.value) {\n const normalized = this.normalizeDate(this.value)\n if (normalized) {\n this.calendar.value = normalized.locale(this.locale)\n // Update the internal value to be a Dayjs object\n this.value = normalized\n // Set the input field value if setValueState is enabled\n if (this.setValueState && this.triggerInput) {\n this.triggerInput.value = this.getFormattedValue()\n }\n }\n }\n\n const normalizedCurrentDate = this.normalizeDate(this.currentDate)\n this.calendar.currentDate = normalizedCurrentDate || dayjs()\n\n const normalizedMinDate = this.normalizeDate(this.minDate)\n this.calendar.minDate = normalizedMinDate || dayjs(DEFAULT_MIN_DATE)\n if (normalizedMinDate) {\n this.minDate = normalizedMinDate\n }\n\n const normalizedMaxDate = this.normalizeDate(this.maxDate)\n this.calendar.maxDate = normalizedMaxDate || dayjs(DEFAULT_MAX_DATE)\n if (normalizedMaxDate) {\n this.maxDate = normalizedMaxDate\n }\n this.calendar.disabledDate = this.disabledDate\n\n // Only set hideAdjacentMonths if explicitly provided\n if (this.hideAdjacentMonths !== undefined) {\n this.calendar.hideAdjacentMonths = this.hideAdjacentMonths\n }\n }\n\n protected willUpdate(\n _changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>,\n ): void {\n super.willUpdate(_changedProperties)\n\n if (\n _changedProperties.has('value') &&\n this.value !== this.inputDrivenValue\n ) {\n this.setValueState = true\n this.inputDrivenValue = undefined\n }\n }\n\n protected updated(\n _changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>,\n ): void {\n super.updated(_changedProperties)\n\n // Process value changes - check both Lit's change detection AND if value exists but wasn't detected\n // This handles cases where React sets a dayjs object but Lit doesn't detect it as changed\n const valueChanged = _changedProperties.has('value')\n const valueExistsButNotProcessed =\n !valueChanged && this.value && this.mode === 'single' && this.hasUpdated\n\n if (\n (valueChanged || valueExistsButNotProcessed) &&\n this.mode === 'single'\n ) {\n const normalized = this.normalizeDate(this.value)\n if (normalized) {\n // Only update if the normalized value is different from current calendar value to avoid infinite loops\n const currentCalendarValue = this.calendar.value\n if (\n !currentCalendarValue ||\n !normalized.isSame(currentCalendarValue, 'day')\n ) {\n this.calendar.value = normalized.locale(this.locale)\n // Update the internal value to be a Dayjs object\n this.value = normalized\n }\n } else {\n this.calendar.value = undefined\n }\n if (this.setValueState && this.triggerInput) {\n this.triggerInput.value = this.getFormattedValue()\n }\n this.setValidity()\n }\n\n if (_changedProperties.has('rangeStart') && this.mode === 'range') {\n const normalized = this.normalizeDate(this.rangeStart)\n if (normalized) {\n this.calendar.rangeStart = normalized.locale(this.locale)\n this.rangeStart = normalized\n } else {\n this.calendar.rangeStart = undefined\n }\n if (this.setValueState && this.rangeStart && this.rangeEnd) {\n this.triggerInput.value = this.getFormattedValue()\n }\n }\n\n if (_changedProperties.has('rangeEnd') && this.mode === 'range') {\n const normalized = this.normalizeDate(this.rangeEnd)\n if (normalized) {\n this.calendar.rangeEnd = normalized.locale(this.locale)\n this.rangeEnd = normalized\n } else {\n this.calendar.rangeEnd = undefined\n }\n if (this.setValueState && this.rangeStart && this.rangeEnd) {\n this.triggerInput.value = this.getFormattedValue()\n }\n }\n\n if (_changedProperties.has('currentDate')) {\n const normalized = this.normalizeDate(this.currentDate)\n this.calendar.currentDate = normalized || dayjs()\n }\n\n if (_changedProperties.has('minDate')) {\n const normalized = this.normalizeDate(this.minDate)\n this.calendar.minDate = normalized || dayjs(DEFAULT_MIN_DATE)\n if (normalized) {\n this.minDate = normalized\n }\n }\n\n if (_changedProperties.has('maxDate')) {\n const normalized = this.normalizeDate(this.maxDate)\n this.calendar.maxDate = normalized || dayjs(DEFAULT_MAX_DATE)\n if (normalized) {\n this.maxDate = normalized\n }\n }\n\n if (_changedProperties.has('disabledDate')) {\n this.calendar.disabledDate = this.disabledDate\n }\n\n if (\n _changedProperties.has('format') ||\n _changedProperties.has('formatSeparator')\n ) {\n this.formatOptions = this.format?.split(this.formatSeparator) || []\n }\n }\n\n getFormattedValue() {\n if (this.mode === 'range') {\n if (!this.rangeStart || !this.rangeEnd) {\n return ''\n }\n const format = this.formatOptions[0] || 'L'\n const startStr = dayjs(this.rangeStart).locale(this.locale).format(format)\n const endStr = dayjs(this.rangeEnd).locale(this.locale).format(format)\n return `${startStr} - ${endStr}`\n }\n\n if (!this.value) {\n return ''\n }\n\n return dayjs(this.value)\n .locale(this.locale)\n .format(this.formatOptions[0] || 'L')\n }\n\n isValidFormat(value: string) {\n if (!this.formatOptions.length) {\n // For the default 'L' format, we need to be more strict to prevent partial dates\n // Get the actual format pattern for the current locale\n const trimmedValue = value.trim()\n\n // Get the actual 'L' format pattern for the current locale\n const localeFormat = dayjs()\n .locale(this.locale)\n .localeData()\n .longDateFormat('L')\n\n // Now validate that the input actually matches the expected format pattern\n // Use the robust string comparison approach: parse and format back to compare\n // The localeFormat already contains the correct format for the current locale\n const parsedDate = dayjs(trimmedValue, localeFormat)\n if (!parsedDate.isValid()) {\n return false\n }\n // Format back and compare - if they differ, the input was incomplete\n // Handle optional trailing separators by normalizing both strings\n const formattedDate = parsedDate.format(localeFormat)\n const normalizedInput = trimmedValue.replace(/[.,\\s]+$/, '') // Remove trailing separators\n const normalizedFormatted = formattedDate.replace(/[.,\\s]+$/, '') // Remove trailing separators\n if (normalizedFormatted !== normalizedInput) {\n return false\n }\n\n return true\n }\n\n return this.formatOptions.some(format => {\n // Use the same robust string comparison approach for custom formats\n // Parse with the custom format and compare the result\n const parsedDate = dayjs(value, format)\n if (!parsedDate.isValid()) {\n return false\n }\n // Format back and compare - if they differ, the input was incomplete\n // Handle optional trailing separators by normalizing both strings\n const formattedDate = parsedDate.format(format)\n const normalizedInput = value.replace(/[.,\\s]+$/, '') // Remove trailing separators\n const normalizedFormatted = formattedDate.replace(/[.,\\s]+$/, '') // Remove trailing separators\n return normalizedFormatted === normalizedInput\n })\n }\n\n isValueValid() {\n if (!this.value) {\n return true\n }\n\n return this.isInputValid()\n }\n\n isInputValid() {\n return this.isValidFormat(this.triggerInput.value)\n }\n\n setValue(\n value?: Dayjs,\n setInputValue: boolean = true,\n sendEmptyEventOnInput: boolean = true,\n ) {\n this.value = value\n\n if (setInputValue) {\n this.setValueState = true\n this.triggerInput.value = this.getFormattedValue()\n } else {\n this.setValueState = false\n this.inputDrivenValue = value\n }\n\n // Update form value for form participation\n if (this.internals) {\n this.internals.setFormValue(\n this.value ? this.value.toString() : this.defaultValue,\n )\n }\n\n this.setValidity()\n this.hideCalendar()\n\n if (sendEmptyEventOnInput) {\n this.emit('dds-change', { value: this.value })\n this.emit('dds-valid-date', { value: this.triggerInput.value })\n }\n }\n\n // Native <form> reset: restore the initial value (or empty) and resync the input text.\n // No dds-change is emitted, matching native inputs, which don't fire change on reset.\n formResetCallback() {\n super.formResetCallback()\n this.lastMaskDigitCount = 0\n\n if (this.mode === 'range') {\n this.rangeStart = undefined\n this.rangeEnd = undefined\n this.calendar.rangeStart = undefined\n this.calendar.rangeEnd = undefined\n this.triggerInput.value = ''\n this.setValidity()\n this.hideCalendar({ skipFocus: true })\n return\n }\n\n // Close first without moving focus: a reset must not pull focus into the picker\n this.hideCalendar({ skipFocus: true })\n this.setValue(this.normalizeDate(this.defaultValue), true, false)\n }\n\n async clearSelection() {\n this.lastMaskDigitCount = 0\n this.setValue(undefined, true, true)\n }\n\n private isMaskActive(): boolean {\n return this.mask && this.mode === 'single' && this.formatOptions.length <= 1\n }\n\n private getActiveMaskFormat(): string {\n if (this.formatOptions.length > 0) {\n return this.formatOptions[0]\n }\n return dayjs().locale(this.locale).localeData().longDateFormat('L')\n }\n\n private parseMaskTokens(format: string): MaskToken[] {\n const tokens: MaskToken[] = []\n let i = 0\n while (i < format.length) {\n if (format.startsWith('YYYY', i)) {\n tokens.push({ type: 'digit', length: 4 })\n i += 4\n } else if (format.startsWith('YY', i)) {\n tokens.push({ type: 'digit', length: 2 })\n i += 2\n } else if (format.startsWith('MM', i)) {\n tokens.push({ type: 'digit', length: 2 })\n i += 2\n } else if (format.startsWith('DD', i)) {\n tokens.push({ type: 'digit', length: 2 })\n i += 2\n } else if (format[i] === 'M') {\n tokens.push({ type: 'digit', length: 2 })\n i += 1\n } else if (format[i] === 'D') {\n tokens.push({ type: 'digit', length: 2 })\n i += 1\n } else {\n tokens.push({ type: 'separator', value: format[i] })\n i += 1\n }\n }\n return tokens\n }\n\n private buildMaskedValue(digits: string): string {\n const tokens = this.parseMaskTokens(this.getActiveMaskFormat())\n let result = ''\n let digitIndex = 0\n\n for (const token of tokens) {\n if (token.type === 'separator') {\n if (digitIndex > 0) {\n result += token.value\n }\n } else {\n const available = digits.slice(digitIndex, digitIndex + token.length!)\n result += available\n digitIndex += available.length\n if (available.length < token.length!) {\n break\n }\n }\n }\n\n return result\n }\n\n private readonly handleDocumentMouseDown = (event: MouseEvent) => {\n const path = event.composedPath()\n if (\n this &&\n !path.includes(this) &&\n (!this.popup || !path.includes(this.popup))\n ) {\n this.hideCalendar()\n }\n }\n\n private readonly handlePopupAutoClose = () => {\n this.hideCalendar({ skipFocus: true })\n }\n\n private readonly handleInput = (event: InputEvent) => {\n const input = event.target as HTMLInputElement\n\n if (this.isMaskActive()) {\n let rawDigits = input.value.replace(/\\D/g, '')\n const isDeleting =\n event.inputType === 'deleteContentBackward' ||\n event.inputType === 'deleteContentForward'\n if (isDeleting && rawDigits.length === this.lastMaskDigitCount) {\n rawDigits = rawDigits.slice(0, -1)\n }\n this.lastMaskDigitCount = rawDigits.length\n const masked = this.buildMaskedValue(rawDigits)\n input.value = masked\n input.setSelectionRange(masked.length, masked.length)\n }\n\n if (!input.value) {\n this.setValue(undefined, false, true)\n } else {\n if (this.isInputValid()) {\n const date = dayjs(input.value).locale(this.locale)\n\n // Normalize minDate and maxDate to ensure they're Dayjs objects\n const minDate =\n this.normalizeDate(this.minDate) || dayjs(DEFAULT_MIN_DATE)\n const maxDate =\n this.normalizeDate(this.maxDate) || dayjs(DEFAULT_MAX_DATE)\n\n if (date.isBefore(minDate, 'day') || date.isAfter(maxDate, 'day')) {\n this.setValue(undefined, false, this.sendEmptyEventOnInput)\n // The text parsed cleanly, it only falls outside our range. Hand the parsed date\n // over so the consumer can phrase its own rule instead of re-parsing the text.\n this.emit('dds-invalid-date', {\n value: input.value,\n type: 'out-of-range',\n date: date.format(DEFAULT_ISO_FORMAT),\n })\n } else {\n this.setValue(date, false)\n this.currentDate = date\n this.emit('dds-valid-date', { value: input.value })\n }\n } else {\n this.setValue(undefined, false, this.sendEmptyEventOnInput)\n this.emit('dds-invalid-date', { value: input.value, type: 'invalid' })\n }\n }\n\n if (this.openCalendarOnInput && !this.opened) {\n this.showCalendar()\n }\n\n this.emit('dds-input', { value: input.value })\n }\n\n private readonly handleKeyDown = async (event: KeyboardEvent) => {\n if (event.key === 'Tab') {\n return\n }\n\n if (\n event.key === 'Enter' ||\n event.key === 'ArrowDown' ||\n event.key === 'ArrowUp'\n ) {\n event.preventDefault()\n event.stopPropagation()\n\n if (!this.opened) {\n this.showCalendar()\n await this.updateComplete\n this.calendar.captureFocus()\n } else {\n this.hideCalendar()\n }\n }\n }\n\n public get focusElement() {\n return this.triggerInput\n }\n\n private readonly handleClick = () => {\n if (!this.opened) {\n this.showCalendar()\n } else {\n this.hideCalendar()\n }\n }\n\n private readonly handleClearClick = () => {\n if (!this.disabled) {\n this.clearSelection()\n\n this.triggerInput.focus()\n this.setValidity()\n\n this.hideCalendar()\n\n this.emit('dds-clear')\n }\n }\n\n async showCalendar() {\n if (this.disabled || this.readonly || this.opened) {\n return\n }\n\n this.opened = true\n\n document.addEventListener('mousedown', this.handleDocumentMouseDown)\n }\n\n async hideCalendar(options?: { skipFocus?: boolean }) {\n if (!this.opened) {\n return\n }\n\n this.opened = false\n\n document.removeEventListener('mousedown', this.handleDocumentMouseDown)\n\n await this.updateComplete\n if (!options?.skipFocus) {\n this.focus()\n }\n }\n\n private readonly handleFocus = () => {\n this.emit('dds-focus')\n }\n\n private readonly handleBlur = () => {\n this.emit('dds-blur')\n }\n\n // custom validation\n getValidity() {\n return !!this.value\n }\n\n get validity(): ValidityState {\n if (this.internals.validity) {\n return this.internals.validity\n } else {\n return getValidityStateObject({\n valueMissing: this.required && !this.getValidity(),\n patternMismatch: !this.isValueValid(),\n })\n }\n }\n\n checkValidity() {\n return this.required && this.getValidity() && this.isValueValid()\n }\n\n reportValidity() {\n return this.required && this.getValidity() && this.isValueValid()\n }\n\n setValidity() {\n if (!this.checkValidity()) {\n this.internals.setValidity(\n {\n valueMissing: this.required && !this.getValidity(),\n patternMismatch: !this.isValueValid(),\n },\n this.validationMessage,\n this.triggerInput,\n )\n } else {\n this.internals.setValidity({})\n }\n }\n\n handleInvalid(event: Event) {\n event.preventDefault()\n }\n\n render() {\n return html` <div class=\"label-container\">\n ${formLabelTemplate({\n label: this.label,\n id: this.labelId,\n htmlFor: this.inputId,\n size: this.size,\n required: this.required,\n requiredLabel: this.requiredLabel,\n optional: this.optional,\n optionalLabel: this.optionalLabel,\n disabled: this.disabled,\n subtle: this.subtle,\n noMargin: !!this.description,\n hideLabel: this.hideLabel,\n })}\n ${this.tooltip &&\n html` <dap-ds-tooltip\n part=\"tooltip\"\n content=${this.tooltip}\n mode=\"toggle\"\n placement=${this.tooltipPlacement}>\n <dap-ds-icon-button\n slot=\"trigger\"\n size=${this.size as 'xs' | 'sm' | 'md' | 'lg'}\n iconSize=${this.size === 'xs' ? '16' : '22'}\n class=\"info-button\"\n clean>\n <dap-ds-icon\n name=\"information-line\"\n aria-label=${this.tooltipAriaLabel}\n class=\"info-button\"></dap-ds-icon>\n </dap-ds-icon-button>\n </dap-ds-tooltip>`}\n </div>\n ${this.description &&\n html`\n <dap-ds-typography\n part=\"description\"\n variant=\"description\"\n class=${clsx('input-description')}\n size=${ifDefined(this.size as CommonFormElementSize)}\n id=${this.descriptionId}>\n ${this.description}\n </dap-ds-typography>\n `}\n <div>\n <dap-ds-popup\n part=\"base\"\n class=\"select-popup\"\n overflow\n ?opened=${this.opened}\n ?hasArrow=${false}\n placement=${this.placement}\n floatingStrategy=${this.floatingStrategy}\n maxHeight=\"auto\"\n offset=\"4\"\n ?disableViewportAutoClose=${this.disableViewportAutoClose}\n @dds-close=${this.handlePopupAutoClose}>\n <div\n slot=\"trigger\"\n part=\"trigger\"\n class=\"${clsx('select', `select--${this.size}`, {\n 'select--disabled': this.disabled,\n 'select--readonly': this.readonly,\n 'select--opened': this.opened,\n 'select--loading': this.loading,\n 'select--success': this.status === 'success',\n 'select--error': this.status === 'error',\n 'select--no-animation': true,\n })}\">\n <input\n part=\"input\"\n role=\"combobox\"\n class=\"${clsx('combobox__input', 'input', `input--${this.size}`, {\n 'input--disabled': this.disabled,\n 'input--readonly': this.readonly,\n })}\"\n id=${this.inputId}\n value=${this.getFormattedValue()}\n aria-expanded=${this.opened}\n aria-haspopup=\"dialog\"\n aria-labelledby=${ifDefined(this.label ? this.labelId : nothing)}\n aria-describedby=\"${ifDefined(\n this.description ? this.descriptionId : nothing,\n )} ${ifDefined(this.feedback ? this.feedbackId : nothing)}\"\n aria-disabled=${this.disabled}\n aria-controls=\"calendar\"\n aria-autocomplete=\"none\"\n ?required=${this.required}\n ?readonly=${this.readonly}\n ?autofocus=${this.autofocus}\n ?disabled=${this.disabled}\n autocomplete=${this.autocomplete as any}\n placeholder=${ifDefined(this.placeholder ?? '')}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @input=${this.handleInput}\n @keydown=${this.handleKeyDown}\n @invalid=${this.handleInvalid}\n @click=${this.handleClick} />\n <div\n class=\"${clsx('select-action', `select-action--${this.size}`, {\n 'select-action--disabled': this.disabled,\n 'select-action--readonly': this.readonly,\n 'select-action--opened': this.opened,\n })}\">\n ${this.clearButton === 'true' && !this.readonly\n ? html`<div class=\"${clsx('clear-icon')}\">\n <dap-ds-icon-button\n icon=\"close-line\"\n part=\"clear-button\"\n data-testid=${this.clearButtonTestId}\n aria-label=${ifDefined(\n this.clearButtonAriaLabel ??\n t('clear', { lng: this.locale }),\n )}\n ?disabled=${this.disabled}\n @click=${this.handleClearClick}></dap-ds-icon-button>\n </div>`\n : nothing}\n <div\n class=\"${clsx('indicator-icon', {\n 'indicator-icon--loading': this.loading,\n })}\">\n ${this.loading\n ? html`<dap-ds-icon-loading-spinner></dap-ds-icon-loading-spinner>`\n : html`<dap-ds-icon-calendar-line\n aria-hidden=\"true\"\n part=\"calendar-button\"\n data-testid=${this.calendarButtonTestId}\n class=${clsx('calendar-icon')}\n @click=${this.handleClick}></dap-ds-icon-calendar-line>`}\n </div>\n </div>\n </div>\n <dap-ds-calendar\n id=\"calendar\"\n part=\"calendar\"\n exportparts=\"calendar-header-button-prev, calendar-header-button-next, calendar-header-year-select, calendar-header-month-select, calendar-grid-header-cell, calendar-grid-cell, calendar-grid-header-cell-base, calendar-grid-cell-base, calendar-grid-cell-today-mark\"\n locale=${this.locale}\n @dds-close=${this.hideCalendar}\n @dds-change=${(event: CustomEvent) => {\n event.preventDefault()\n event.stopPropagation()\n if (this.mode === 'single') {\n this.setValue(event.detail.value)\n }\n }}\n @dds-range-change=${(event: CustomEvent) => {\n event.preventDefault()\n event.stopPropagation()\n if (this.mode === 'range') {\n this.rangeStart = event.detail.startDate\n this.rangeEnd = event.detail.endDate\n this.triggerInput.value = this.getFormattedValue()\n this.emit('dds-change', {\n startDate: this.rangeStart,\n endDate: this.rangeEnd,\n })\n this.hideCalendar()\n }\n }}>\n </dap-ds-calendar>\n </dap-ds-popup>\n ${this.feedback &&\n html`<dap-ds-feedback\n part=\"feedback\"\n feedbackType=${ifDefined(this.feedbackType)}\n feedbackSize=\"${ifDefined(this.size as 'lg' | 'sm' | 'xs')}\"\n id=\"feedback\">\n ${this.feedback}\n </dap-ds-feedback>`}\n </div>`\n }\n}\n"],"names":["DEFAULT_MIN_DATE","DEFAULT_MAX_DATE","DEFAULT_ISO_FORMAT","_DapDSDatePicker","_a","GenericFormElement","date","dayjs","event","path","input","rawDigits","masked","minDate","maxDate","__async","uniqueSuffix","value","trimmed","numValue","_changedProperties","normalized","normalizedCurrentDate","normalizedMinDate","normalizedMaxDate","valueChanged","valueExistsButNotProcessed","currentCalendarValue","format","startStr","endStr","trimmedValue","localeFormat","parsedDate","formattedDate","normalizedInput","setInputValue","sendEmptyEventOnInput","tokens","i","digits","result","digitIndex","token","available","options","getValidityStateObject","html","formLabelTemplate","clsx","ifDefined","nothing","_b","t","DapDSFormLabel","DapDSTooltip","DapDSIconButton","DapDSIcon","DapDSTypography","DapDSPopup","SystemLoadingSpinner","BusinessCalendarLine","DapDSCalendar","DapDSF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LPjE,EAkLS,WAAA,sBAAA;AAGhB+D,EAAA;AAAA,EAAXE,EAAS;AAAA,GArLSjE,EAqLP,WAAA,mBAAA;AAGA+D,EAAA;AAAA,EAAXE,EAAS;AAAA,GAxLSjE,EAwLP,WAAA,sBAAA;AAGgB+D,EAAA;AAAA,EAA3BE,EAAS,EAAE,MAAM,OAAQ,CAAA;AAAA,GA3LPjE,EA2LS,WAAA,kBAAA;AAGC+D,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GA9LRjE,EA8LU,WAAA,0BAAA;AAKD+D,EAAA;AAAA,EAA3BE,EAAS,EAAE,MAAM,OAAQ,CAAA;AAAA,GAnMPjE,EAmMS,WAAA,QAAA;AAKC+D,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GAxMRjE,EAwMU,WAAA,oBAAA;AAEZ+D,EAAA;AAAA,EAAhBG,EAAM;AAAA,GA1MYlE,EA0MF,WAAA,eAAA;AACA+D,EAAA;AAAA,EAAhBG,EAAM;AAAA,GA3MYlE,EA2MF,WAAA,eAAA;AA3MnB,IAAqBmE,KAArBnE;"}
@@ -210,6 +210,7 @@ export default class DapDSTimePicker extends GenericFormElement {
210
210
  */
211
211
  presets?: TimePreset[];
212
212
  private setValueState;
213
+ private inputDrivenValue?;
213
214
  static readonly styles: import('lit').CSSResult;
214
215
  private languageChangeHandler;
215
216
  constructor();
@@ -223,6 +224,7 @@ export default class DapDSTimePicker extends GenericFormElement {
223
224
  */
224
225
  private normalizeTime;
225
226
  private syncTimeValue;
227
+ protected willUpdate(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
226
228
  protected updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
227
229
  private updateTimeGridSelection;
228
230
  private getHourValue;
@@ -9,7 +9,7 @@ var S = (h, e, t) => e in h ? D(h, e, { enumerable: !0, configurable: !0, writab
9
9
  C.call(e, t) && S(h, t, e[t]);
10
10
  return h;
11
11
  };
12
- var b = (h, e, t) => new Promise((i, o) => {
12
+ var g = (h, e, t) => new Promise((i, o) => {
13
13
  var d = (u) => {
14
14
  try {
15
15
  m(t.next(u));
@@ -30,7 +30,7 @@ import n from "../../_virtual/dayjs.min.js";
30
30
  import { unsafeCSS as G, nothing as V } from "lit";
31
31
  import { query as k, property as l, state as x } from "lit/decorators.js";
32
32
  import { ifDefined as f } from "lit/directives/if-defined.js";
33
- import { html as g } from "lit/static-html.js";
33
+ import { html as b } from "lit/static-html.js";
34
34
  import { getValidityStateObject as B } from "../../common/utils.js";
35
35
  import { GenericFormElement as z } from "../../internal/mixin/genericFormElement.js";
36
36
  import { formLabelTemplate as A } from "../../internal/templates/formLabel.js";
@@ -42,8 +42,8 @@ import H from "../icon-button/icon-button.component.js";
42
42
  import M from "../icons/system/system-loading-spinner/system-loading-spinner.component.js";
43
43
  import O from "../icons/system/system-time-line/system-time-line.component.js";
44
44
  import E from "../popup/popup.component.js";
45
- import P from "../tooltip/tooltip.component.js";
46
- import U from "../typography/typography.component.js";
45
+ import U from "../tooltip/tooltip.component.js";
46
+ import P from "../typography/typography.component.js";
47
47
  import j from "./time-grid.component.js";
48
48
  import R from "./timepicker.scss.js";
49
49
  import $, { t as N } from "../../node_modules/i18next/dist/esm/i18next.js";
@@ -84,7 +84,7 @@ const s = (r = class extends z {
84
84
  minute: i.value.split(":")[1]
85
85
  });
86
86
  this.openTimeOnInput && !this.opened && this.showTimePicker(), this.emit("dds-input", { value: i.value });
87
- }, this.handleKeyDown = (t) => b(this, null, function* () {
87
+ }, this.handleKeyDown = (t) => g(this, null, function* () {
88
88
  t.key !== "Tab" && (t.key === "Enter" || t.key === "ArrowDown" || t.key === "ArrowUp") && (t.preventDefault(), t.stopPropagation(), this.opened ? this.hideTimePicker() : this.showTimePicker());
89
89
  }), this.handleClick = () => {
90
90
  this.opened ? this.hideTimePicker() : this.showTimePicker();
@@ -161,6 +161,9 @@ const s = (r = class extends z {
161
161
  const e = this.normalizeTime(this.value);
162
162
  this._timeValue = e, e ? (!n.isDayjs(this.value) || !e.isSame(this.value, "minute")) && (this.value = e) : this.value !== void 0 && this.value !== null && (this.value = void 0);
163
163
  }
164
+ willUpdate(e) {
165
+ super.willUpdate(e), e.has("value") && this.value !== this.inputDrivenValue && (this.setValueState = !0, this.inputDrivenValue = void 0);
166
+ }
164
167
  updated(e) {
165
168
  if (super.updated(e), e.has("value")) {
166
169
  const t = this.normalizeTime(this.value);
@@ -203,7 +206,7 @@ const s = (r = class extends z {
203
206
  }
204
207
  setValue(e, t = !0, i = !0) {
205
208
  var o, d, p, m, u, c;
206
- if (this._timeValue = e, this.value = e, t ? (this.setValueState = !0, this.triggerInput.value = this.getFormattedValue(), this.updateTimeGridSelection()) : this.setValueState = !1, this.internals && this.internals.setFormValue(
209
+ if (this._timeValue = e, this.value = e, t ? (this.setValueState = !0, this.triggerInput.value = this.getFormattedValue(), this.updateTimeGridSelection()) : (this.setValueState = !1, this.inputDrivenValue = e), this.internals && this.internals.setFormValue(
207
210
  this.value ? this.showSeconds ? this.value.format("HH:mm:ss") : this.value.format("HH:mm") : this.defaultValue
208
211
  ), this.setValidity(), this.closeOnSelection && this.hideTimePicker(), i) {
209
212
  const I = v({
@@ -219,7 +222,7 @@ const s = (r = class extends z {
219
222
  }
220
223
  }
221
224
  clearSelection() {
222
- return b(this, null, function* () {
225
+ return g(this, null, function* () {
223
226
  this.setValue(void 0, !0, !0);
224
227
  });
225
228
  }
@@ -227,12 +230,12 @@ const s = (r = class extends z {
227
230
  return this.triggerInput;
228
231
  }
229
232
  showTimePicker() {
230
- return b(this, null, function* () {
233
+ return g(this, null, function* () {
231
234
  this.disabled || this.readonly || this.opened || (this.opened = !0, document.addEventListener("mousedown", this.handleDocumentMouseDown));
232
235
  });
233
236
  }
234
237
  hideTimePicker(e) {
235
- return b(this, null, function* () {
238
+ return g(this, null, function* () {
236
239
  this.opened && (this.opened = !1, document.removeEventListener("mousedown", this.handleDocumentMouseDown), yield this.updateComplete, e != null && e.skipFocus || this.focus());
237
240
  });
238
241
  }
@@ -267,7 +270,7 @@ const s = (r = class extends z {
267
270
  }
268
271
  render() {
269
272
  var e, t;
270
- return g` <div class="label-container">
273
+ return b` <div class="label-container">
271
274
  ${A({
272
275
  label: this.label,
273
276
  id: this.labelId,
@@ -282,7 +285,7 @@ const s = (r = class extends z {
282
285
  noMargin: !!this.description,
283
286
  hideLabel: this.hideLabel
284
287
  })}
285
- ${this.tooltip && g` <dap-ds-tooltip
288
+ ${this.tooltip && b` <dap-ds-tooltip
286
289
  part="tooltip"
287
290
  content=${this.tooltip}
288
291
  mode="toggle"
@@ -299,7 +302,7 @@ const s = (r = class extends z {
299
302
  </dap-ds-icon-button>
300
303
  </dap-ds-tooltip>`}
301
304
  </div>
302
- ${this.description && g`
305
+ ${this.description && b`
303
306
  <dap-ds-typography
304
307
  part="description"
305
308
  variant="description"
@@ -370,7 +373,7 @@ const s = (r = class extends z {
370
373
  "select-action--readonly": this.readonly,
371
374
  "select-action--opened": this.opened
372
375
  })}">
373
- ${this.clearButton === "true" && !this.readonly ? g`<div class="${y("clear-icon")}">
376
+ ${this.clearButton === "true" && !this.readonly ? b`<div class="${y("clear-icon")}">
374
377
  <dap-ds-icon-button
375
378
  icon="close-line"
376
379
  part="clear-button"
@@ -385,7 +388,7 @@ const s = (r = class extends z {
385
388
  class="${y("indicator-icon", {
386
389
  "indicator-icon--loading": this.loading
387
390
  })}">
388
- ${this.loading ? g`<dap-ds-icon-loading-spinner></dap-ds-icon-loading-spinner>` : g`<dap-ds-icon-time-line
391
+ ${this.loading ? b`<dap-ds-icon-loading-spinner></dap-ds-icon-loading-spinner>` : b`<dap-ds-icon-time-line
389
392
  aria-hidden="true"
390
393
  part="time-button"
391
394
  data-testid=${this.timeButtonTestId}
@@ -414,7 +417,7 @@ const s = (r = class extends z {
414
417
  }}>
415
418
  </dap-ds-time-grid>
416
419
  </dap-ds-popup>
417
- ${this.feedback && g`<dap-ds-feedback
420
+ ${this.feedback && b`<dap-ds-feedback
418
421
  part="feedback"
419
422
  feedbackType=${f(this.feedbackType)}
420
423
  feedbackSize="${f(this.size)}"
@@ -425,10 +428,10 @@ const s = (r = class extends z {
425
428
  }
426
429
  }, r.tagName = "dap-ds-timepicker", r.dependencies = {
427
430
  "dap-ds-form-label": q,
428
- "dap-ds-tooltip": P,
431
+ "dap-ds-tooltip": U,
429
432
  "dap-ds-icon-button": H,
430
433
  "dap-ds-icon": F,
431
- "dap-ds-typography": U,
434
+ "dap-ds-typography": P,
432
435
  "dap-ds-popup": E,
433
436
  "dap-ds-icon-loading-spinner": M,
434
437
  "dap-ds-icon-time-line": O,