@nova-design-system/nova-webcomponents 3.9.0 → 3.9.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.
Files changed (48) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/native.cjs.js +1 -1
  3. package/dist/cjs/nv-calendar.cjs.entry.js +9 -3
  4. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  5. package/dist/cjs/nv-fielddate.cjs.entry.js +62 -94
  6. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  7. package/dist/cjs/nv-fielddaterange.cjs.entry.js +52 -33
  8. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  9. package/dist/collection/components/nv-calendar/nv-calendar.js +9 -3
  10. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  11. package/dist/collection/components/nv-fielddate/nv-fielddate.js +63 -94
  12. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  13. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +52 -33
  14. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  15. package/dist/components/nv-calendar.js +1 -1
  16. package/dist/components/nv-fielddate.js +66 -98
  17. package/dist/components/nv-fielddate.js.map +1 -1
  18. package/dist/components/nv-fielddaterange.js +54 -35
  19. package/dist/components/nv-fielddaterange.js.map +1 -1
  20. package/dist/components/{p-d32b75ac.js → p-82e5674c.js} +10 -4
  21. package/dist/components/p-82e5674c.js.map +1 -0
  22. package/dist/components/{p-91a558eb.js → p-f1df2634.js} +2 -2
  23. package/dist/components/{p-91a558eb.js.map → p-f1df2634.js.map} +1 -1
  24. package/dist/esm/loader.js +1 -1
  25. package/dist/esm/native.js +1 -1
  26. package/dist/esm/nv-calendar.entry.js +9 -3
  27. package/dist/esm/nv-calendar.entry.js.map +1 -1
  28. package/dist/esm/nv-fielddate.entry.js +62 -94
  29. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  30. package/dist/esm/nv-fielddaterange.entry.js +52 -33
  31. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  32. package/dist/native/native.esm.js +1 -1
  33. package/dist/native/native.esm.js.map +1 -1
  34. package/dist/native/{p-dc34da69.entry.js → p-4a533dd8.entry.js} +2 -2
  35. package/dist/native/p-4a533dd8.entry.js.map +1 -0
  36. package/dist/native/{p-f687e05c.entry.js → p-55cd3d62.entry.js} +2 -2
  37. package/dist/native/p-55cd3d62.entry.js.map +1 -0
  38. package/dist/native/{p-516da423.entry.js → p-9ea3d30d.entry.js} +2 -2
  39. package/dist/native/p-9ea3d30d.entry.js.map +1 -0
  40. package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +4 -19
  41. package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +1 -0
  42. package/hydrate/index.js +123 -131
  43. package/hydrate/index.mjs +123 -131
  44. package/package.json +1 -1
  45. package/dist/components/p-d32b75ac.js.map +0 -1
  46. package/dist/native/p-516da423.entry.js.map +0 -1
  47. package/dist/native/p-dc34da69.entry.js.map +0 -1
  48. package/dist/native/p-f687e05c.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"nv-fielddaterange.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,60SAA60S,CAAC;AAC12S,+BAAe,mBAAmB;;MC4CrB,gBAAgB;IAL7B;;;;QASU,cAAS,GAAWA,KAAM,EAAE,CAAC;;;;;;;QAW5B,iBAAY,GAAWA,KAAM,EAAE,CAAC;;;;;QAOhC,eAAU,GAAWA,KAAM,EAAE,CAAC;;;;QA0C9B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,UAAK,GAAY,KAAK,CAAC;;;;QAYvB,YAAO,GAAY,KAAK,CAAC;;;;QAOzB,cAAS,GAAY,KAAK,CAAC;;;;;QAOpC,UAAK,GA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IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnDA,kEAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IAChD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,IAClDA,kBAAM,IAAI,EAAC,mBAAmB,GAAQ,KAEtC,IAAI,CAAC,gBAAgB,CACtB,CACG,CACP,EAEDA,oEAAa,CACR,EACP;KACH;;;;;;;;;;;","names":["uuidv4","Inputmask","h","Host"],"sources":["src/components/nv-fielddaterange/styles/nv-fielddaterange.scss?tag=nv-fielddaterange","src/components/nv-fielddaterange/nv-fielddaterange.tsx"],"sourcesContent":["@import '../../../styles/form-field';\n@import './mixins';\n\nnv-fielddaterange {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n width: 100%;\n display: block;\n\n [data-scope='popover'] {\n padding: 0;\n background-color: var(--components-list-dropdown-background);\n border: 1px solid var(--components-list-dropdown-border);\n width: auto;\n }\n\n [slot='content'] {\n display: block;\n width: 100%;\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n display: flex;\n align-items: center;\n gap: 8px;\n\n .input-container {\n @include form-field-input-container();\n\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n box-shadow: none;\n border-color: var(--nv-field-border-default);\n }\n\n input {\n @include form-field-input();\n width: 100%;\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n outline: var(--focus-outline-stroke) solid var(--nv-field-border-focus);\n outline-offset: 0px;\n & ~ .range-separator {\n background-color: transparent;\n }\n }\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n\n .range-inputs {\n display: flex;\n align-items: center;\n gap: 0;\n width: 100%;\n\n input {\n flex: 1;\n border: none;\n outline: none;\n padding: 0;\n font-size: var(--form-field-font-size);\n color: var(--components-form-field-content-text);\n background: transparent;\n min-width: 0; // to avoid overflow\n\n &::placeholder {\n color: var(--components-form-field-content-placeholder);\n }\n\n &:disabled {\n cursor: not-allowed;\n color: var(--components-form-field-content-text);\n background-color: var(--components-form-field-background-disabled);\n }\n }\n\n .range-separator {\n @include range-separator();\n }\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n Method,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * Extends HTMLInputElement to include the inputmask property.\n */\ninterface HTMLInputElementWithInputmask extends HTMLInputElement {\n /**\n * The inputmask instance that provides masking functionality.\n */\n inputmask?: {\n /**\n * Removes the inputmask instance.\n */\n remove: () => void;\n };\n}\n\n/**\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddaterange',\n styleUrl: 'styles/nv-fielddaterange.scss',\n shadow: false,\n})\nexport class NvFielddaterange {\n @Element() el!: HTMLNvFielddaterangeElement;\n private popoverElement!: HTMLNvPopoverElement;\n private calendarElement!: HTMLNvCalendarElement;\n private popoverId: string = uuidv4();\n private contentRef?: HTMLDivElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the start input field.\n */\n @Prop({ reflect: true })\n readonly startPlaceholder: string;\n\n /**\n * Placeholder for the end input field.\n */\n @Prop({ reflect: true })\n readonly endPlaceholder: string;\n\n /**\n * Name attribute for the start input.\n */\n @Prop({ reflect: true })\n readonly startName: string;\n\n /**\n * Name attribute for the end input.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Disables both input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets both input fields as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks both input fields as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the start input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the date range (in string format).\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the start date in string format.\n */\n @State()\n startValue: string = '';\n\n /**\n * The current value of the end date in string format.\n */\n @State()\n endValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 2\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 2;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Parses the unified value prop and synchronizes with internal state\n * @param {string} value - Value to parse\n */\n private parseUnifiedValue = (value: string): void => {\n if (!value) {\n // Reset all selections\n this.startValue = '';\n this.endValue = '';\n return;\n }\n\n const values = value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n\n if (values.length >= 2) {\n this.startValue = values[0];\n this.endValue = values[1];\n } else {\n // Handle malformed value gracefully\n console.warn(`Invalid date range format: ${value}`);\n this.startValue = '';\n this.endValue = '';\n }\n };\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format to convert\n * @returns {string} The converted format for Inputmask\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format YYYY-MM-DD\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The mouse event\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Handles the input event on the start input element.\n * @param {Event} event - The input event\n */\n private handleStartInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n this.startValue = input.value;\n\n // Update unified value prop\n this.value = `${input.value},${this.endValue}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: input.value, end: this.endValue });\n\n // Temporarily enable navigation for keyboard input\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n this.updateCalendarValue();\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles the input event on the end input element.\n * @param {Event} event - The input event\n */\n private handleEndInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n this.endValue = input.value;\n\n // Update unified value prop\n this.value = `${this.startValue},${input.value}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: this.startValue, end: input.value });\n\n // Temporarily enable navigation for keyboard input\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n this.updateCalendarValue();\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Update the calendar's rangeValue property without forcing month change\n */\n private updateCalendarValue() {\n if (this.calendarElement && this.startValue && this.endValue) {\n // Store the current calendar state\n }\n }\n\n /**\n * Handles focus events on the input elements.\n * @param {FocusEvent} event - The focus event\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n // Enable navigation on focus\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n }\n\n this.open = true;\n\n // Restore navigation prevention after opening\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 300);\n };\n\n /**\n * Toggles the opening/closing of the popover.\n */\n private toggleCalendar = () => {\n if (this.readonly || this.disabled) {\n return;\n }\n this.open = !this.open;\n };\n\n /**\n * Clears the current selection and resets the date range field to its initial state.\n * This method can be called programmatically to reset the field.\n */\n @Method()\n async clear(): Promise<void> {\n // Reset internal state\n this.startValue = '';\n this.endValue = '';\n this.value = '';\n\n // Reset both input elements\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n // Remove input mask if exists\n if ((input as HTMLInputElementWithInputmask).inputmask) {\n (input as HTMLInputElementWithInputmask).inputmask.remove();\n }\n });\n\n // Emit events to notify about the change\n this.valueChanged.emit('');\n this.dateRangeChange.emit({ start: '', end: '' });\n\n // Close the popover if open\n this.open = false;\n\n // Clear the calendar if it exists\n if (this.calendarElement) {\n this.calendarElement.clear();\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n // Use the unified parsing method\n this.parseUnifiedValue(this.value);\n }\n }\n\n componentDidLoad() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: false,\n clearMaskOnLostFocus: false,\n insertMode: true,\n rightAlign: false,\n oncomplete: function (e) {\n const input = e.target as HTMLInputElement;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n },\n });\n inputMask.mask(input);\n\n // Set the value after applying the mask\n if (input.name === this.startName && this.startValue) {\n requestAnimationFrame(() => {\n input.value = this.startValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n } else if (input.name === this.endName && this.endValue) {\n requestAnimationFrame(() => {\n input.value = this.endValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n }\n });\n }\n\n componentDidRender() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const value =\n input.name === this.startName\n ? this.startValue\n : this.endName\n ? this.endValue\n : '';\n if (value) {\n // Make sure the value is defined both as a property and attribute\n requestAnimationFrame(() => {\n input.value = value;\n input.setAttribute('value', value);\n });\n }\n });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the date range changes.\n */\n @Event()\n dateRangeChange: EventEmitter<\n HTMLNvCalendarElementEventMap['rangeDateChange']\n >;\n\n /**\n * Emitted when the unified value changes\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Handles the range date selection event from nv-calendar.\n * @param {CustomEvent<DateRange>} event - The custom event\n */\n @Listen('rangeDateChange')\n handleRangeDateChange(\n event: CustomEvent<HTMLNvCalendarElementEventMap['rangeDateChange']>,\n ) {\n const { start, end } = event.detail || {};\n\n // Check that both dates are defined\n if (start && end) {\n this.startValue = start;\n this.endValue = end;\n\n // Update unified value prop (like nv-calendar)\n this.value = `${start},${end}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n\n if (!this.showActions) {\n this.open = false;\n }\n }\n }\n\n /**\n * Handles the unified value change event from nv-calendar\n * @param {CustomEvent<string>} event - The custom event\n */\n @Listen('valueChanged')\n handleCalendarValueChanged(event: CustomEvent<string>) {\n const newValue = event.detail || '';\n\n if (newValue !== this.value) {\n this.value = newValue;\n this.valueChanged.emit(newValue);\n\n // Parse and update internal state\n this.parseUnifiedValue(newValue);\n\n // Legacy support - emit dateRangeChange\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('applyDateRange')\n handleApplyDateRange() {\n this.open = false;\n }\n\n /**\n * Handles the reset event from the calendar's cancel button\n * @param {CustomEvent} event - The event emitted by the calendar\n */\n @Listen('singleDateChange')\n @Listen('rangeDateChange')\n handleDateReset(event: CustomEvent) {\n const isResetSingle =\n event.type === 'singleDateChange' && event.detail === '';\n const isResetRange =\n event.type === 'rangeDateChange' &&\n event.detail &&\n event.detail.start === '' &&\n event.detail.end === '';\n\n if (isResetSingle || isResetRange) {\n this.startValue = '';\n this.endValue = '';\n\n // Update unified value prop\n this.value = '';\n this.valueChanged.emit('');\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n });\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: '', end: '' });\n }\n }\n\n /**\n * Handles keyboard events.\n * @param {KeyboardEvent} event - The keyboard event\n */\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n event.preventDefault();\n return;\n }\n return;\n }\n\n if (!this.popoverElement) {\n console.warn('nv-fielddaterange -> Popover element is not defined');\n return;\n }\n }\n\n @Watch('value')\n handleValueChange(newValue: string) {\n // Use the unified parsing method instead of JSON.parse\n this.parseUnifiedValue(newValue);\n }\n\n @Watch('open')\n onOpenChanged(newValue: boolean) {\n if (this.contentRef) {\n if (newValue) {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = '0px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n });\n } else {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = '0px';\n });\n }\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\">\n <slot name=\"leading-input\"></slot>\n\n <div class=\"range-inputs\">\n <input\n id={this.startInputId}\n type=\"text\"\n placeholder={this.startPlaceholder}\n name={this.startName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n value={this.startValue}\n onInput={this.handleStartInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n\n <div class=\"range-separator\"></div>\n\n <input\n id={this.endInputId}\n type=\"text\"\n placeholder={this.endPlaceholder}\n name={this.endName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n value={this.endValue}\n onInput={this.handleEndInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n </div>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\"\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n aria-pressed={this.open.toString()}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n ref={el => (this.calendarElement = el as HTMLNvCalendarElement)}\n dateFormat={this.dateFormat}\n value={this.value}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n selectionType=\"range\"\n data-prevent-navigation=\"true\"\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"version":3}
1
+ {"file":"nv-fielddaterange.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,60SAA60S,CAAC;AAC12S,+BAAe,mBAAmB;;MC4CrB,gBAAgB;IAL7B;;;;QASU,cAAS,GAAWA,KAAM,EAAE,CAAC;;;;;;;QAW5B,iBAAY,GAAWA,KAAM,EAAE,CAAC;;;;;QAOhC,eAAU,GAAWA,KAAM,EAAE,CAAC;;;;QA0C9B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,UAAK,GAAY,KAAK,CAAC;;;;QAYvB,YAAO,GAAY,KAAK,CAAC;;;;QAOzB,cAAS,GAAY,KAAK,CAAC;;;;;QAOpC,UAAK,GAAW,EAAE,CAAC;;;;QAMnB,eAAU,GAAW,EAAE,CAAC;;;;QAMxB,aAAQ,GAAW,EAAE,CAAC;;;;QAMtB,SAAI,GAAY,KAAK,CAAC;;;;;QAOb,mBAAc,GAAW,CAAC,CAAC;;;;;QAO3B,sBAAiB,GAAW,CAAC,CAAC;;;;QAM9B,QAAG,GAAY,EAAE,CAAC;;;;QAMlB,QAAG,GAAY,EAAE,CAAC;;;;QAMlB,WAAM,GAAW,OAAO,CAAC;;;;QAMzB,eAAU,GAAW,YAAY,CAAC;;;;;QAOlC,uBAAkB,GAAgC,QAAQ,CAAC;;;;;QAO3D,gBAAW,GAAY,KAAK,CAAC;;;;QAwB7B,UAAK,GAAY,KAAK,CAAC;;;;;;;;QAUxB,sBAAiB,GAAG,CAAC,KAA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CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnDA,kEAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IAChD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,IAClDA,kBAAM,IAAI,EAAC,mBAAmB,GAAQ,KAEtC,IAAI,CAAC,gBAAgB,CACtB,CACG,CACP,EAEDA,oEAAa,CACR,EACP;KACH;;;;;;;;;;;","names":["uuidv4","Inputmask","h","Host"],"sources":["src/components/nv-fielddaterange/styles/nv-fielddaterange.scss?tag=nv-fielddaterange","src/components/nv-fielddaterange/nv-fielddaterange.tsx"],"sourcesContent":["@import '../../../styles/form-field';\n@import './mixins';\n\nnv-fielddaterange {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n width: 100%;\n display: block;\n\n [data-scope='popover'] {\n padding: 0;\n background-color: var(--components-list-dropdown-background);\n border: 1px solid var(--components-list-dropdown-border);\n width: auto;\n }\n\n [slot='content'] {\n display: block;\n width: 100%;\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n display: flex;\n align-items: center;\n gap: 8px;\n\n .input-container {\n @include form-field-input-container();\n\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n box-shadow: none;\n border-color: var(--nv-field-border-default);\n }\n\n input {\n @include form-field-input();\n width: 100%;\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n outline: var(--focus-outline-stroke) solid var(--nv-field-border-focus);\n outline-offset: 0px;\n & ~ .range-separator {\n background-color: transparent;\n }\n }\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n\n .range-inputs {\n display: flex;\n align-items: center;\n gap: 0;\n width: 100%;\n\n input {\n flex: 1;\n border: none;\n outline: none;\n padding: 0;\n font-size: var(--form-field-font-size);\n color: var(--components-form-field-content-text);\n background: transparent;\n min-width: 0; // to avoid overflow\n\n &::placeholder {\n color: var(--components-form-field-content-placeholder);\n }\n\n &:disabled {\n cursor: not-allowed;\n color: var(--components-form-field-content-text);\n background-color: var(--components-form-field-background-disabled);\n }\n }\n\n .range-separator {\n @include range-separator();\n }\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n Method,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * Extends HTMLInputElement to include the inputmask property.\n */\ninterface HTMLInputElementWithInputmask extends HTMLInputElement {\n /**\n * The inputmask instance that provides masking functionality.\n */\n inputmask?: {\n /**\n * Removes the inputmask instance.\n */\n remove: () => void;\n };\n}\n\n/**\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddaterange',\n styleUrl: 'styles/nv-fielddaterange.scss',\n shadow: false,\n})\nexport class NvFielddaterange {\n @Element() el!: HTMLNvFielddaterangeElement;\n private popoverElement!: HTMLNvPopoverElement;\n private calendarElement!: HTMLNvCalendarElement;\n private popoverId: string = uuidv4();\n private contentRef?: HTMLDivElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the start input field.\n */\n @Prop({ reflect: true })\n readonly startPlaceholder: string;\n\n /**\n * Placeholder for the end input field.\n */\n @Prop({ reflect: true })\n readonly endPlaceholder: string;\n\n /**\n * Name attribute for the start input.\n */\n @Prop({ reflect: true })\n readonly startName: string;\n\n /**\n * Name attribute for the end input.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Disables both input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets both input fields as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks both input fields as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the start input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the date range (in string format).\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the start date in string format.\n */\n @State()\n startValue: string = '';\n\n /**\n * The current value of the end date in string format.\n */\n @State()\n endValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 2\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 2;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Parses the unified value prop and synchronizes with internal state\n * @param {string} value - Value to parse\n */\n private parseUnifiedValue = (value: string): void => {\n if (!value) {\n // Reset all selections\n this.startValue = '';\n this.endValue = '';\n return;\n }\n\n const values = value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n\n if (values.length >= 2) {\n this.startValue = values[0];\n this.endValue = values[1];\n }\n };\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format to convert\n * @returns {string} The converted format for Inputmask\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format YYYY-MM-DD\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The mouse event\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Handles the input event on the start input element.\n * @param {Event} event - The input event\n */\n private handleStartInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n this.startValue = input.value;\n\n // Update unified value prop\n this.value = `${input.value},${this.endValue}`;\n\n // Temporarily enable navigation for keyboard input\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n this.updateCalendarValue();\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles the input event on the end input element.\n * @param {Event} event - The input event\n */\n private handleEndInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n this.endValue = input.value;\n\n // Update unified value prop\n this.value = `${this.startValue},${input.value}`;\n\n // Temporarily enable navigation for keyboard input\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n this.updateCalendarValue();\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Update the calendar's rangeValue property without forcing month change\n */\n private updateCalendarValue() {\n if (this.calendarElement && this.startValue && this.endValue) {\n // Store the current calendar state\n }\n }\n\n /**\n * Handles focus events on the input elements.\n * @param {FocusEvent} event - The focus event\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n // Enable navigation on focus\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n }\n\n this.open = true;\n\n // Restore navigation prevention after opening\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 300);\n };\n\n /**\n * Toggles the opening/closing of the popover.\n */\n private toggleCalendar = () => {\n if (this.readonly || this.disabled) {\n return;\n }\n this.open = !this.open;\n };\n\n /**\n * Clears the current selection and resets the date range field to its initial state.\n * This method can be called programmatically to reset the field.\n */\n @Method()\n async clear(): Promise<void> {\n // Reset internal state\n this.startValue = '';\n this.endValue = '';\n this.value = '';\n\n // Reset both input elements\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n // Remove input mask if exists\n if ((input as HTMLInputElementWithInputmask).inputmask) {\n (input as HTMLInputElementWithInputmask).inputmask.remove();\n }\n });\n\n // Emit events to notify about the change\n this.valueChanged.emit('');\n this.dateRangeChange.emit({ start: '', end: '' });\n\n // Close the popover if open\n this.open = false;\n\n // Clear the calendar if it exists\n if (this.calendarElement) {\n this.calendarElement.clear();\n }\n }\n\n private updateMask() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n (input as HTMLInputElementWithInputmask).inputmask?.remove?.();\n\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: true,\n clearMaskOnLostFocus: !this.open,\n postValidation: true,\n oncleared: (e: CustomEvent) => {\n const input = e.target as HTMLInputElement;\n if (input.id === this.startInputId) {\n this.startValue = '';\n }\n if (input.id === this.endInputId) {\n this.endValue = '';\n }\n },\n oncomplete: () => {\n if (/[a-zA-Z]/g.test(this.value)) return;\n const values = this.value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n if (values.length < 2) return;\n\n // If valid emit change event\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: input.value,\n });\n },\n });\n inputMask.mask(input);\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n // Use the unified parsing method\n this.parseUnifiedValue(this.value);\n }\n }\n\n componentDidLoad() {\n this.updateMask();\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n // Set the value after applying the mask\n if (input.name === this.startName && this.startValue) {\n requestAnimationFrame(() => {\n input.value = this.startValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n } else if (input.name === this.endName && this.endValue) {\n requestAnimationFrame(() => {\n input.value = this.endValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n }\n });\n }\n\n componentDidRender() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const value =\n input.name === this.startName\n ? this.startValue\n : this.endName\n ? this.endValue\n : '';\n if (value) {\n // Make sure the value is defined both as a property and attribute\n requestAnimationFrame(() => {\n input.value = value;\n input.setAttribute('value', value);\n });\n }\n });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the date range changes.\n */\n @Event()\n dateRangeChange: EventEmitter<\n HTMLNvCalendarElementEventMap['rangeDateChange']\n >;\n\n /**\n * Emitted when the unified value changes\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Handles the range date selection event from nv-calendar.\n * @param {CustomEvent<DateRange>} event - The custom event\n */\n @Listen('rangeDateChange')\n handleRangeDateChange(\n event: CustomEvent<HTMLNvCalendarElementEventMap['rangeDateChange']>,\n ) {\n const { start, end } = event.detail || {};\n\n // Check that both dates are defined\n if (start && end) {\n this.startValue = start;\n this.endValue = end;\n\n // Update unified value prop (like nv-calendar)\n this.value = `${start},${end}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n\n if (!this.showActions) {\n this.open = false;\n }\n }\n }\n\n /**\n * Handles the unified value change event from nv-calendar\n * @param {CustomEvent<string>} event - The custom event\n */\n @Listen('valueChanged')\n handleCalendarValueChanged(event: CustomEvent<string>) {\n const newValue = event.detail || '';\n\n if (newValue !== this.value) {\n this.value = newValue;\n this.valueChanged.emit(newValue);\n\n // Parse and update internal state\n this.parseUnifiedValue(newValue);\n\n // Legacy support - emit dateRangeChange\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('applyDateRange')\n handleApplyDateRange() {\n this.open = false;\n }\n\n /**\n * Handles the reset event from the calendar's cancel button\n * @param {CustomEvent} event - The event emitted by the calendar\n */\n @Listen('singleDateChange')\n @Listen('rangeDateChange')\n handleDateReset(event: CustomEvent) {\n const isResetSingle =\n event.type === 'singleDateChange' && event.detail === '';\n const isResetRange =\n event.type === 'rangeDateChange' &&\n event.detail &&\n event.detail.start === '' &&\n event.detail.end === '';\n\n if (isResetSingle || isResetRange) {\n this.startValue = '';\n this.endValue = '';\n\n // Update unified value prop\n this.value = '';\n this.valueChanged.emit('');\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n });\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: '', end: '' });\n }\n }\n\n /**\n * Handles keyboard events.\n * @param {KeyboardEvent} event - The keyboard event\n */\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n event.preventDefault();\n return;\n }\n return;\n }\n\n if (!this.popoverElement) {\n console.warn('nv-fielddaterange -> Popover element is not defined');\n return;\n }\n }\n\n @Watch('value')\n handleValueChange(newValue: string) {\n // Use the unified parsing method instead of JSON.parse\n this.parseUnifiedValue(newValue);\n }\n\n @Watch('open')\n onOpenChanged(newValue: boolean) {\n this.updateMask();\n if (this.contentRef) {\n if (newValue) {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = '0px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n });\n } else {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = '0px';\n });\n }\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\">\n <slot name=\"leading-input\"></slot>\n\n <div class=\"range-inputs\">\n <input\n id={this.startInputId}\n type=\"text\"\n placeholder={\n this.startPlaceholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.startName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n value={this.startValue}\n onInput={this.handleStartInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n\n <div class=\"range-separator\"></div>\n\n <input\n id={this.endInputId}\n type=\"text\"\n placeholder={\n this.endPlaceholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.endName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n value={this.endValue}\n onInput={this.handleEndInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n </div>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\"\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n aria-pressed={this.open.toString()}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n ref={el => (this.calendarElement = el as HTMLNvCalendarElement)}\n dateFormat={this.dateFormat}\n value={this.value}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n selectionType=\"range\"\n data-prevent-navigation=\"true\"\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"version":3}
@@ -85,6 +85,12 @@ export class NvCalendar {
85
85
  .split(',')
86
86
  .map(v => v.trim())
87
87
  .filter(Boolean);
88
+ if (this.selectionType === 'range' && values.length < 2) {
89
+ console.warn(`Invalid date range format: ${value}`);
90
+ this.startDate = null;
91
+ this.endDate = null;
92
+ return;
93
+ }
88
94
  if (this.selectionType === 'single' && values.length >= 1) {
89
95
  const parsedDate = parseDate(values[0], this.dateFormat);
90
96
  if (parsedDate) {
@@ -129,7 +135,7 @@ export class NvCalendar {
129
135
  }
130
136
  else {
131
137
  // Handle malformed dates gracefully - reset state
132
- console.warn(`Invalid date range format: ${values[0]}, ${values[1]}`);
138
+ console.warn(`Invalid date range format: ${values === null || values === void 0 ? void 0 : values[0]}, ${values === null || values === void 0 ? void 0 : values[1]}`);
133
139
  this.startDate = null;
134
140
  this.endDate = null;
135
141
  if (!this.showActions) {
@@ -892,8 +898,8 @@ export class NvCalendar {
892
898
  * @slot default - Child content of the component.
893
899
  */
894
900
  render() {
895
- return (h(Host, { key: '7abeb96312f2bcf26eed3a133ef59d5d3b5b528f' }, h("div", { key: 'e0b2db720853551e3b6445e92b39b418123cb83e', class: "datepicker-root" }, h("div", { key: '1a83c285278c440c4e33ae770a033974e4924830', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, h("div", { key: '3481fe780a3e1d8f0c1e22ffc82c3b7830721055', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), ((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||
896
- this.hasActions) && (h("div", { key: '3a644bdc993142c181c45173756e362025d4a23a', class: "datepicker-controls" }, this.shortcutsPlacement === 'bottom' && this.renderShortcuts(), this.hasActions && this.renderActions())))), h("slot", { key: '4a4290ccf63429a9a88cfd95a33b4fdc34c8ef74' })));
901
+ return (h(Host, { key: '492526a4a9ed114aba804db45f49847b1db58c9f' }, h("div", { key: '632759b4eb6c65c3b082b707fba75568ed351e49', class: "datepicker-root" }, h("div", { key: '8dc6160dec8ed46e2d2f70e3154cd73cbaeee586', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, h("div", { key: '55b1c7f8bcda0785ca63a1572bfebc628a3971d5', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), ((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||
902
+ this.hasActions) && (h("div", { key: '7234a6d497fccdcab8923b5235f591f24061c92d', class: "datepicker-controls" }, this.shortcutsPlacement === 'bottom' && this.renderShortcuts(), this.hasActions && this.renderActions())))), h("slot", { key: '1a23c6e92ffbc8ca64b42ff41ed6d106a3697e7f' })));
897
903
  }
898
904
  static get is() { return "nv-calendar"; }
899
905
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"nv-calendar.js","sourceRoot":"","sources":["../../../src/components/nv-calendar/nv-calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT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;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\nimport {\n WEEK_ABBREVIATIONS,\n CUSTOM_DAY_NAMES,\n CUSTOM_MONTH_NAMES,\n} from '../../utils/constants';\n\nimport {\n parseDate,\n isSameDate,\n formatDate,\n isSameOrAfter,\n isSameOrBefore,\n} from './nv-calendar.utils';\n\n// Import partials\nimport {\n CalendarHeader,\n CalendarGrid,\n WeekNumbers,\n CalendarShortcuts,\n CalendarActions,\n} from './partials';\n\n/**\n * @slot default - Child content of the component.\n * @slot actions - Child content of the component.\n */\n@Component({\n tag: 'nv-calendar',\n styleUrl: 'nv-calendar.scss',\n shadow: false,\n})\nexport class NvCalendar {\n @Element() el: HTMLNvCalendarElement;\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * First day of the week (0 = Sunday, 1 = Monday, etc.)\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 1\n */\n @Prop({ mutable: true, reflect: true })\n numberOfCalendars: number = 1;\n\n /**\n * Selected date value. For single mode: ISO date string. For range mode: comma-separated ISO date strings.\n * Examples:\n * - Single: \"2025-03-15\"\n * - Range: \"2025-03-15,2025-03-20\"\n * @default \"\"\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * Selected date (ISO string format)\n * ex: \"2025-03-15\"\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n singleValue: string;\n\n /**\n * Selected date range\n * format: { start: ISO string, end: ISO string }\n * ex: { start: \"2025-03-15\", end: \"2025-03-20\" }\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: false, mutable: true })\n rangeValue: {\n /** ISO string for start date */\n start: string;\n /** ISO string for end date */\n end: string;\n };\n\n /**\n * Minimum date for selection (ISO string format, ex: \"2025-01-01\")\n */\n @Prop({ reflect: true })\n readonly min?: string;\n\n /**\n * Maximum date for selection (ISO string format, ex: \"2025-12-31\")\n */\n @Prop({ reflect: true })\n readonly max?: string;\n\n /**\n * Disabled dates (ISO string array)\n */\n @Prop({ reflect: false })\n readonly disabledDates: Array<string>;\n\n /**\n * Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /**\n * Date format (ex: 'YYYY-MM-DD', 'DD-MM-YYYY', etc.)\n * @default 'YYYY-MM-DD'\n * @note If the date format is in UTC mode, the date will be displayed in UTC time.\n * @note If the date format is not in UTC mode, the date will be displayed in the local time.\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Selection type (single date or date range)\n * @default 'single'\n */\n @Prop({ reflect: true })\n readonly selectionType: 'single' | 'range' = 'single';\n\n /**\n * Show action buttons\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: {\n /** Label of the shortcut */\n label: string;\n /** Selected date value for single selection mode */\n singleValue?: string;\n /** Date range values for range selection mode */\n rangeValue?: HTMLNvCalendarElement['rangeValue'];\n }[];\n\n /**\n * Show week numbers\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /** Cache for parsed disabled dates */\n private parsedDisabledDates: Date[] = [];\n\n /** Flag to indicate a user click for selection */\n private isUserClick: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n @State()\n currentDate: Date | null = null;\n\n @State()\n selectedDate: Date | null = null;\n\n @State()\n startDate: Date | null = null;\n\n @State()\n endDate: Date | null = null;\n\n /** List of formatted months for the selector */\n @State()\n private months: {\n /** Month value */\n value: number;\n /** Month label */\n label: string;\n }[] = [];\n\n //#endregion STATE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when a single date is selected\n */\n @Event()\n singleDateChange: EventEmitter<string>;\n\n /**\n * Emitted when a date range is selected\n */\n @Event()\n rangeDateChange: EventEmitter<HTMLNvCalendarElement['rangeValue']>;\n\n /**\n * Emitted when the unified value changes\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Watches the changes of the number of calendars\n * @param {number} newValue - New number of calendars\n */\n @Watch('numberOfCalendars')\n validateNumberOfCalendars(newValue: number) {\n if (newValue < 1 || newValue > 4) {\n console.warn(\n 'numberOfCalendars must be between 1 and 4. Defaulting to 1.',\n );\n this.numberOfCalendars = 1;\n }\n }\n\n /**\n * Watches the changes of the selected date range\n * @param {Object} newValue - New rangeValue value\n * @param {string} newValue.start - Start date\n * @param {string} newValue.end - End date\n */\n @Watch('rangeValue')\n onRangeValueChange(newValue: typeof this.rangeValue) {\n if (newValue && newValue.start && newValue.end) {\n try {\n const { startDate, endDate } = this.validateDateRange(\n newValue.start,\n newValue.end,\n );\n\n this.startDate = startDate;\n this.endDate = endDate;\n\n // Do not navigate to the start date if data-prevent-navigation attribute is present\n const preventNavigation =\n this.el.getAttribute('data-prevent-navigation') === 'true';\n if (!preventNavigation && !this.isUserClick) {\n this.currentDate = startDate;\n }\n } catch (error) {\n console.error('Invalid rangeValue:', error);\n }\n }\n }\n\n /**\n * Watches the changes of the disabled dates\n * @description Watches the changes of the disabled dates\n */\n @Watch('disabledDates')\n handleDisabledDatesChange() {\n this.parseDisabledDates();\n }\n\n /**\n * Watches the changes of the single value\n * @param {string} newValue - New single value\n * @param {string} oldValue - Old single value\n */\n @Watch('singleValue')\n onSingleValueChange(newValue: string, oldValue: string) {\n if (this.selectionType === 'single' && newValue !== oldValue && newValue) {\n const parsedDate = parseDate(newValue, this.dateFormat);\n if (parsedDate) {\n this.selectedDate = parsedDate;\n\n // Do not navigate to the selected date if data-prevent-navigation attribute is present\n const preventNavigation =\n this.el.getAttribute('data-prevent-navigation') === 'true';\n if (!preventNavigation && !this.isUserClick) {\n this.currentDate = parsedDate;\n }\n }\n }\n }\n\n /**\n * Watches the changes of the unified value prop\n * @param {string} newValue - New value\n * @param {string} oldValue - Old value\n */\n @Watch('value')\n onValueChange(newValue: string, oldValue: string) {\n if (newValue !== oldValue) {\n this.parseUnifiedValue(newValue);\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.parseDisabledDates();\n\n // Initialize from unified value prop if provided\n if (this.value) {\n this.parseUnifiedValue(this.value);\n } else if (this.selectionType === 'single' && this.singleValue) {\n this.selectedDate = parseDate(this.singleValue, this.dateFormat);\n this.currentDate = this.selectedDate;\n } else if (this.selectionType === 'range' && this.rangeValue) {\n try {\n if (this.rangeValue.start && this.rangeValue.end) {\n const { startDate, endDate, swapped } = this.validateDateRange(\n this.rangeValue.start,\n this.rangeValue.end,\n );\n\n this.startDate = startDate;\n this.endDate = endDate;\n this.currentDate = startDate;\n\n if (swapped) {\n // If dates were swapped, update the rangeValue property\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.rangeValue = {\n start: formatDate(startDate, { dateFormat: this.dateFormat }),\n end: formatDate(endDate, { dateFormat: this.dateFormat }),\n };\n }\n }\n } catch (error) {\n console.error('Invalid rangeValue:', error);\n }\n }\n\n // Ensure currentDate is always initialized\n if (!this.currentDate) {\n this.currentDate = new Date();\n }\n\n this.initializeMonths();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Checks if shortcuts are visible\n * @returns {boolean} true if shortcuts are visible\n */\n private get hasShortcuts(): boolean {\n return Boolean(this.shortcutsPlacement && this.shortcuts);\n }\n\n /**\n * Checks if actions are visible\n * @returns {boolean} true if actions are visible\n */\n private get hasActions(): boolean {\n return this.showActions;\n }\n\n /**\n * Checks if the date format is in UTC mode\n * @returns {boolean} true if the date format is in UTC mode\n */\n private get isUTCMode(): boolean {\n return this.dateFormat.includes('Z');\n }\n\n /**\n * Parses the unified value prop and synchronizes with internal state\n * @param {string} value - Value to parse\n */\n private parseUnifiedValue = (value: string): void => {\n if (!value) {\n // Reset all selections\n this.selectedDate = null;\n this.startDate = null;\n this.endDate = null;\n return;\n }\n\n const values = value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n\n if (this.selectionType === 'single' && values.length >= 1) {\n const parsedDate = parseDate(values[0], this.dateFormat);\n if (parsedDate) {\n this.selectedDate = parsedDate;\n\n // Only sync with legacy prop if not using actions (immediate mode)\n if (!this.showActions) {\n this.singleValue = values[0];\n }\n\n // Navigate to the date if not prevented\n const preventNavigation =\n this.el.getAttribute('data-prevent-navigation') === 'true';\n if (!preventNavigation && !this.isUserClick) {\n this.currentDate = parsedDate;\n }\n } else {\n // Handle malformed date gracefully - reset state\n console.warn(`Invalid date format: ${values[0]}`);\n this.selectedDate = null;\n if (!this.showActions) {\n this.singleValue = '';\n }\n }\n } else if (this.selectionType === 'range' && values.length >= 2) {\n const startDate = parseDate(values[0], this.dateFormat);\n const endDate = parseDate(values[1], this.dateFormat);\n\n if (startDate && endDate) {\n this.startDate = startDate;\n this.endDate = endDate;\n\n // Only sync with legacy prop if not using actions (immediate mode)\n if (!this.showActions) {\n this.rangeValue = {\n start: values[0],\n end: values[1],\n };\n }\n\n // Navigate to start date if not prevented\n const preventNavigation =\n this.el.getAttribute('data-prevent-navigation') === 'true';\n if (!preventNavigation && !this.isUserClick) {\n this.currentDate = startDate;\n }\n } else {\n // Handle malformed dates gracefully - reset state\n console.warn(`Invalid date range format: ${values[0]}, ${values[1]}`);\n this.startDate = null;\n this.endDate = null;\n if (!this.showActions) {\n this.rangeValue = { start: '', end: '' };\n }\n }\n }\n };\n\n /**\n * Validates and processes a date range, warning if start is after end\n * @param {string} startDateStr - Start date in ISO string format\n * @param {string} endDateStr - End date in ISO string format\n * @returns {object} Object containing the validated start and end dates\n */\n private validateDateRange(\n startDateStr: string,\n endDateStr: string,\n ): {\n /** Start date */\n startDate: Date;\n /** End date */\n endDate: Date;\n /** If the dates were swapped */\n swapped: boolean;\n } {\n try {\n const startDate = parseDate(startDateStr, this.dateFormat);\n const endDate = parseDate(endDateStr, this.dateFormat);\n\n if (startDate && endDate && startDate > endDate) {\n console.warn(\n `Warning: startDate (${formatDate(startDate, {\n dateFormat: this.dateFormat,\n })}) is after endDate (${formatDate(endDate, {\n dateFormat: this.dateFormat,\n })})`,\n );\n\n // Return dates in correct order, with swapped flag\n return {\n startDate: endDate,\n endDate: startDate,\n swapped: true,\n };\n }\n\n return {\n startDate,\n endDate,\n swapped: false,\n };\n } catch (error) {\n console.error('Invalid date range:', error);\n throw error; // Re-throw to let the caller handle it\n }\n }\n\n /**\n * Change the displayed month\n * @param {number} offset - Month offset (-1 for previous, 1 for next)\n */\n private changeMonth = (offset: number) => {\n const newDate = new Date(this.currentDate);\n newDate.setUTCDate(1); // Set to the first of the month to avoid day-of-month issues\n newDate.setUTCMonth(newDate.getUTCMonth() + offset);\n\n const containers = this.el.querySelectorAll('.calendar-grid');\n containers.forEach(container => {\n container.classList.remove('slide-left', 'slide-right');\n const animationClass = offset > 0 ? 'slide-left' : 'slide-right';\n container.classList.add(animationClass);\n setTimeout(() => container.classList.remove(animationClass), 300);\n });\n\n this.currentDate = newDate;\n };\n\n /**\n * Handles date selection based on the mode\n * @param {Date} date - Selected date\n */\n private handleDateSelection = (date: Date) => {\n if (this.isDateDisabled(date)) {\n return;\n }\n\n this.isUserClick = true;\n\n if (this.selectionType === 'single') {\n this.handleSingleSelection(date);\n } else {\n this.handleRangeSelection(date);\n }\n\n requestAnimationFrame(() => {\n this.isUserClick = false;\n });\n };\n\n /**\n * Handles single date selection\n * @param {Date} date - Selected date\n */\n private handleSingleSelection = (date: Date) => {\n if (!date) return;\n\n const formattedDate = formatDate(date, { dateFormat: this.dateFormat });\n this.selectedDate = date;\n\n // Update the unified value prop (like nv-fieldslider)\n this.value = formattedDate;\n this.valueChanged.emit(formattedDate);\n\n // Legacy support (deprecated) - only sync props if not using actions\n if (!this.showActions) {\n this.singleValue = formattedDate;\n this.singleDateChange.emit(formattedDate);\n }\n };\n\n /**\n * Handles range date selection\n * @param {Date} date - Selected date\n */\n private handleRangeSelection = (date: Date) => {\n if (!this.startDate || (this.startDate && this.endDate)) {\n // Start new range selection\n this.startDate = date;\n this.endDate = null;\n } else {\n // Complete range selection\n this.endDate = date;\n\n // Ensure correct order\n if (this.startDate > this.endDate) {\n [this.startDate, this.endDate] = [this.endDate, this.startDate];\n }\n\n const startFormatted = formatDate(this.startDate, {\n dateFormat: this.dateFormat,\n });\n const endFormatted = formatDate(this.endDate, {\n dateFormat: this.dateFormat,\n });\n\n // Update the unified value prop (like nv-fieldslider)\n this.value = `${startFormatted},${endFormatted}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated) - only sync props if not using actions\n if (!this.showActions) {\n const legacyRange = { start: startFormatted, end: endFormatted };\n this.rangeDateChange.emit(legacyRange);\n this.rangeValue = legacyRange;\n }\n }\n };\n\n /**\n * Checks if a date is disabled.\n * Disabled if:\n * - The date is before min (if defined)\n * - The date is after max (if defined)\n * - The date is in the disabledDates array\n * @param {Date} date - Date to check\n * @returns {boolean} true if the date is disabled\n */\n private isDateDisabled = (date: Date): boolean => {\n if (!date) return true;\n\n // Minimum bound check\n if (this.min) {\n const minDate = parseDate(this.min, this.dateFormat);\n if (minDate && date < minDate) {\n return true;\n }\n }\n\n // Maximum bound check\n if (this.max) {\n const maxDate = parseDate(this.max, this.dateFormat);\n if (maxDate && date > maxDate) {\n return true;\n }\n }\n\n // Check disabled dates\n return this.parsedDisabledDates.some(disabledDate =>\n isSameDate(date, disabledDate, { isUTCMode: this.isUTCMode }),\n );\n };\n\n /**\n * Checks if a date is in the selected range\n * @param {Date} date - Date to check\n * @returns {boolean} true if the date is in the range\n */\n private isDateInRange = (date: Date): boolean => {\n if (!date || !this.startDate || !this.endDate) return false;\n\n const checkDate = parseDate(date, this.dateFormat);\n const startDate = parseDate(this.startDate, this.dateFormat);\n const endDate = parseDate(this.endDate, this.dateFormat);\n\n // Verify if startDate and endDate are valid\n if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {\n return false;\n }\n\n // Verify that startDate is before endDate (additional security)\n if (startDate > endDate) return false;\n\n // Comparison based only on the date (year, month, day)\n return (\n isSameOrAfter(checkDate, startDate, { isUTCMode: this.isUTCMode }) &&\n isSameOrBefore(checkDate, endDate, { isUTCMode: this.isUTCMode })\n );\n };\n\n /**\n * Retrieves the localized day names\n * @returns {string[]} Array of short day names\n */\n private getDayNames = (): string[] => {\n let days: string[];\n\n // If we have custom day names for this locale\n if (CUSTOM_DAY_NAMES[this.locale]) {\n // Custom day names are expected to start with Monday (index 0 = Monday)\n days = [...CUSTOM_DAY_NAMES[this.locale]];\n } else {\n // Generate days using Intl.DateTimeFormat, starting from Monday\n const formatter = new Intl.DateTimeFormat(this.locale, {\n weekday: 'short',\n });\n\n // Generate days starting from Monday (2023-01-02 was a Monday)\n days = [...Array(7)].map((_, i) =>\n formatter.format(new Date(2023, 0, i + 2)).toUpperCase(),\n );\n }\n\n // Now reorganize based on firstDayOfWeek\n // 0 = Sunday, 1 = Monday (default), 2 = Tuesday, etc.\n if (this.firstDayOfWeek === 0) {\n // If Sunday is first day, move Sunday (last element) to the beginning\n return [days[6], ...days.slice(0, 6)];\n } else if (this.firstDayOfWeek === 1) {\n // If Monday is first day, return as-is (since our array starts with Monday)\n return days;\n } else {\n // For other first days (Tuesday=2, Wednesday=3, etc.)\n const offset = this.firstDayOfWeek - 1; // Convert to 0-based offset from Monday\n return [...days.slice(offset), ...days.slice(0, offset)];\n }\n };\n\n /**\n * Generates the days of the current month\n * @param {number} offset - Month offset (0 by default)\n * @returns {Array<{ dayOfMonth: number | null, date: Date | null, isSelected: boolean, isDisabled: boolean }>} Array of formatted days\n */\n private getDaysInMonth = (\n offset: number = 0,\n ): Array<{\n /** Day of the month (1 to 31) */\n dayOfMonth: number | null;\n /** Complete date */\n date: Date | null;\n /** If the day belongs to the current month */\n isCurrentMonth: boolean;\n /** If the day is disabled */\n isDisabled: boolean;\n /** If the day is blank (padding) */\n isBlank: boolean;\n }> => {\n const baseMonth = this.currentDate.getUTCMonth();\n\n // Correctly calculate the year and month for the given offset\n const targetDate = new Date(this.currentDate);\n targetDate.setUTCMonth(baseMonth + offset);\n const year = targetDate.getUTCFullYear();\n const month = targetDate.getUTCMonth();\n\n const firstDay = new Date(Date.UTC(year, month, 1));\n const lastDay = new Date(Date.UTC(year, month + 1, 0));\n\n const days = [];\n\n // Correct calculation of offset for previous month days\n // Use getUTCDay to stay consistent with UTC timezone\n const dayOfWeekIndex = firstDay.getUTCDay(); // 0 = Sunday, 1 = Monday, etc.\n\n // Adjust based on firstDayOfWeek (if week starts on Monday, offset is different)\n const offsetDays = (dayOfWeekIndex - this.firstDayOfWeek + 7) % 7;\n\n // Add padding days from the previous month\n for (let i = 0; i < offsetDays; i++) {\n const prevMonthDay = new Date(Date.UTC(year, month, 0)).getUTCDate();\n const date = new Date(\n Date.UTC(year, month - 1, prevMonthDay - offsetDays + 1 + i),\n );\n days.push({\n dayOfMonth: date.getUTCDate(),\n date,\n isCurrentMonth: false,\n isDisabled: this.isDateDisabled(date),\n // Days from previous month are blank if not the first calendar\n isBlank: offset > 0,\n });\n }\n\n // Add the days of the current month\n for (let i = 1; i <= lastDay.getUTCDate(); i++) {\n const date = new Date(Date.UTC(year, month, i));\n days.push({\n dayOfMonth: i,\n date,\n isCurrentMonth: true,\n isDisabled: this.isDateDisabled(date),\n isBlank: false,\n });\n }\n\n // Add padding days to fill the last week\n const nextMonthDaysNeeded = 7 - (days.length % 7 || 7);\n if (nextMonthDaysNeeded < 7) {\n for (let i = 1; i <= nextMonthDaysNeeded; i++) {\n const date = new Date(Date.UTC(year, month + 1, i));\n days.push({\n dayOfMonth: i,\n date,\n isCurrentMonth: false,\n isDisabled: this.isDateDisabled(date),\n // Days from next month are blank if not the last calendar\n isBlank: offset < this.numberOfCalendars - 1,\n });\n }\n }\n\n return days;\n };\n\n /** Initializes the list of formatted months according to the locale */\n private initializeMonths = () => {\n // If we have custom month names for this locale\n if (CUSTOM_MONTH_NAMES[this.locale]) {\n this.months = CUSTOM_MONTH_NAMES[this.locale].map((label, value) => ({\n value,\n label,\n }));\n return;\n }\n\n // Otherwise, use the default behavior\n const formatter = new Intl.DateTimeFormat(this.locale, { month: 'short' });\n this.months = Array.from({ length: 12 }, (_, i) => ({\n value: i,\n label: formatter.format(new Date(2000, i, 1)).toUpperCase(),\n }));\n };\n\n /**\n * Retrieves the localized abbreviation for \"week\"\n * @returns {string} Localized abbreviation for \"week\"\n */\n private getLocalizedWeekText = (): string => {\n return WEEK_ABBREVIATIONS[this.locale] || 'W';\n };\n\n /**\n * Handles month change in the selector\n * @param {Event} event - Month change event\n * @param {number} calendarOffset - Calendar offset (0 by default)\n */\n private handleMonthChange = (event: Event, calendarOffset: number = 0) => {\n const select = event.target as HTMLSelectElement;\n const selectedMonth = parseInt(select.value, 10);\n const newDate = new Date(this.currentDate);\n\n // Date for the calendar being changed\n const targetCalendarDate = new Date(newDate.toUTCString());\n targetCalendarDate.setUTCMonth(\n targetCalendarDate.getUTCMonth() + calendarOffset,\n );\n\n const currentMonth = targetCalendarDate.getUTCMonth();\n let monthDiff = selectedMonth - currentMonth;\n\n // Smartly adjust for year change\n if (monthDiff > 6) {\n // e.g. from Jan to Dec, go back 1 month\n monthDiff -= 12;\n }\n if (monthDiff < -6) {\n // e.g. from Dec to Jan, go forward 1 month\n monthDiff += 12;\n }\n\n // Apply the diff to the original `currentDate`\n const finalDate = new Date(this.currentDate);\n finalDate.setUTCMonth(finalDate.getUTCMonth() + monthDiff);\n this.currentDate = finalDate;\n };\n\n /**\n * Handles year change in the numeric entry\n * @param {Event} event - Year change event\n * @param {number} calendarOffset - Calendar offset (0 by default)\n */\n private handleYearChange = (event: Event, calendarOffset: number = 0) => {\n const input = event.target as HTMLInputElement;\n const year = parseInt(input.value, 10);\n if (!isNaN(year) && year >= 1900 && year <= 2100) {\n const newDate = new Date(this.currentDate);\n newDate.setUTCMonth(newDate.getUTCMonth() + calendarOffset);\n newDate.setUTCFullYear(year);\n newDate.setUTCMonth(newDate.getUTCMonth() - calendarOffset);\n this.currentDate = new Date(newDate);\n }\n };\n\n /**\n * Handles week selection\n * @param {Date[]} weekDays - Selected week days\n * @param {number} calendarIndex - Calendar index from which the selection is made\n */\n private handleWeekSelection = (weekDays: Date[], calendarIndex: number) => {\n if (this.selectionType !== 'range') return;\n\n const allDays = this.getDaysInMonth(calendarIndex);\n\n const weekStart = weekDays[0];\n const weekEnd = weekDays[weekDays.length - 1];\n\n if (!weekStart || !weekEnd) return;\n\n const selectedWeekDays = allDays.filter(\n day => day.date && day.date >= weekStart && day.date <= weekEnd,\n );\n\n const validDays = selectedWeekDays.filter(\n day => !this.isDateDisabled(day.date),\n );\n\n if (validDays.length > 0) {\n this.startDate = validDays[0].date;\n this.endDate = validDays[validDays.length - 1].date;\n\n this.rangeDateChange.emit({\n start: formatDate(this.startDate, { dateFormat: this.dateFormat }),\n end: formatDate(this.endDate, { dateFormat: this.dateFormat }),\n });\n }\n };\n\n /**\n * Checks if a date corresponds to today\n * @param {Date} date - Date to check\n * @returns {boolean} true if the date is today\n */\n private isToday = (date: Date): boolean => {\n const today = new Date();\n return (\n date.getDate() === today.getDate() &&\n date.getMonth() === today.getMonth() &&\n date.getFullYear() === today.getFullYear()\n );\n };\n\n /**\n * Parse and cache the disabled dates\n * @description Parse and cache the disabled dates\n */\n private parseDisabledDates = () => {\n if (!this.disabledDates) {\n this.parsedDisabledDates = [];\n return;\n }\n\n try {\n this.parsedDisabledDates = this.disabledDates\n .map(date => parseDate(date, this.dateFormat))\n .filter(date => date !== null) as Date[];\n } catch (error) {\n console.error('Error parsing disabled dates:', error);\n this.parsedDisabledDates = [];\n }\n };\n\n /**\n * Applies a shortcut selection\n * @param {Object} shortcut - Shortcut to apply\n * @param {string | Date} shortcut.singleValue - Selected date value\n * @param {Object} shortcut.rangeValue - Start and end date values\n * @param {string | Date} shortcut.rangeValue.start - Start date value\n * @param {string | Date} shortcut.rangeValue.end - End date value\n * @param {string} shortcut.label - Label\n */\n private applyShortcut = (shortcut: (typeof this.shortcuts)[number]) => {\n this.selectedDate = null;\n this.startDate = null;\n this.endDate = null;\n\n if (shortcut.singleValue) {\n const newDate = parseDate(shortcut.singleValue, this.dateFormat);\n this.selectedDate = newDate;\n const formattedDate = formatDate(newDate, {\n dateFormat: this.dateFormat,\n });\n\n // Update the unified value prop (like nv-fieldslider)\n this.value = formattedDate;\n this.valueChanged.emit(formattedDate);\n\n // Legacy support (deprecated) - sync props\n this.singleValue = formattedDate;\n this.singleDateChange.emit(formattedDate);\n\n if (!this.showActions) {\n const event = new CustomEvent('closePopover', {\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(event);\n }\n\n this.forceCalendarUpdate(newDate);\n } else {\n const start = parseDate(shortcut.rangeValue.start, this.dateFormat);\n const end = parseDate(shortcut.rangeValue.end, this.dateFormat);\n\n this.startDate = start;\n this.endDate = end;\n\n const startFormatted = formatDate(start, {\n dateFormat: this.dateFormat,\n });\n const endFormatted = formatDate(end, { dateFormat: this.dateFormat });\n\n // Update the unified value prop (like nv-fieldslider)\n this.value = `${startFormatted},${endFormatted}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated) - sync props\n const legacyRange = { start: startFormatted, end: endFormatted };\n this.rangeDateChange.emit(legacyRange);\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.rangeValue = legacyRange;\n\n if (!this.showActions) {\n const event = new CustomEvent('closePopover', {\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(event);\n }\n\n this.currentDate = start;\n }\n };\n\n /**\n * Method to force the complete calendar update\n * @param {Date} newDate - Date to force\n */\n private forceCalendarUpdate = newDate => {\n this.currentDate = new Date(newDate);\n };\n\n /**\n * Resets the current selection\n */\n private resetSelection = (): void => {\n if (this.selectionType === 'single') {\n this.selectedDate = null;\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.singleValue = null;\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.value = '';\n this.singleDateChange.emit('');\n this.valueChanged.emit('');\n } else {\n this.startDate = null;\n this.endDate = null;\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.rangeValue = null;\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.value = '';\n this.rangeDateChange.emit({ start: '', end: '' });\n this.valueChanged.emit('');\n }\n };\n\n /**\n * Confirms the current selection\n */\n private confirmSelection = (): void => {\n if (this.selectionType === 'single' && this.selectedDate) {\n const dateStr = formatDate(this.selectedDate, {\n dateFormat: this.dateFormat,\n });\n this.singleDateChange.emit(dateStr);\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.singleValue = dateStr;\n const event = new CustomEvent('closePopover', {\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(event);\n } else if (\n this.selectionType === 'range' &&\n this.startDate &&\n this.endDate\n ) {\n this.rangeDateChange.emit({\n start: formatDate(this.startDate, { dateFormat: this.dateFormat }),\n end: formatDate(this.endDate, { dateFormat: this.dateFormat }),\n });\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.rangeValue = {\n start: formatDate(this.startDate, { dateFormat: this.dateFormat }),\n end: formatDate(this.endDate, { dateFormat: this.dateFormat }),\n };\n const event = new CustomEvent('closePopover', {\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(event);\n }\n };\n\n /**\n * Clears the current selection and resets the calendar to its initial state.\n * This method can be called programmatically to reset the calendar.\n */\n @Method()\n async clear(): Promise<void> {\n if (this.selectionType === 'single') {\n this.selectedDate = null;\n this.singleValue = '';\n this.value = '';\n this.singleDateChange.emit('');\n this.valueChanged.emit('');\n } else {\n this.startDate = null;\n this.endDate = null;\n this.rangeValue = { start: '', end: '' };\n this.value = '';\n this.rangeDateChange.emit({ start: '', end: '' });\n this.valueChanged.emit('');\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n /**\n * Renders the header\n * @param {number} offset - Month offset\n * @param {number} index - Calendar index\n * @returns {JSX.Element} Header\n * @description Renders the header of the calendar\n */\n private renderHeader = (offset: number, index: number) => {\n return (\n <CalendarHeader\n currentDate={this.currentDate}\n months={this.months}\n numberOfCalendars={this.numberOfCalendars}\n calendarIndex={index}\n monthOffset={offset}\n onMonthChange={this.changeMonth}\n onMonthSelect={this.handleMonthChange}\n onYearChange={this.handleYearChange}\n />\n );\n };\n\n /**\n * Renders the week numbers\n * @param {Array<{date: Date}>} weeks - Weeks to render\n * @param {number} index - Calendar index\n * @returns {JSX.Element} Week numbers\n * @description Renders the week numbers of the calendar\n */\n private renderWeekNumbers = (\n /** Weeks to render */\n weeks: Array<{\n /** Date */\n date: Date;\n }>[],\n /** Calendar index */\n index: number,\n ) => {\n return (\n <WeekNumbers\n weeks={weeks}\n localizedWeekText={this.getLocalizedWeekText()}\n selectionType={this.selectionType}\n onWeekSelect={this.handleWeekSelection}\n calendarIndex={index}\n />\n );\n };\n\n /**\n * Renders the calendar\n * @param {number} index - Calendar index\n * @param {number} offset - Month offset\n * @returns {JSX.Element} Calendar\n * @description Renders the calendar of the calendar\n */\n private renderCalendar = (\n /** Calendar index */\n index: number,\n /** Month offset */\n offset: number,\n ) => {\n const days = this.getDaysInMonth(offset);\n const weeks = [];\n for (let i = 0; i < days.length; i += 7) {\n weeks.push(days.slice(i, i + 7));\n }\n\n // Add year and month to the key to force re-render on date change\n const targetDate = new Date(this.currentDate);\n targetDate.setUTCMonth(targetDate.getUTCMonth() + offset);\n const year = targetDate.getUTCFullYear();\n const month = targetDate.getUTCMonth();\n\n return (\n <div class=\"calendar-wrapper\">\n <div\n class=\"calendar-container\"\n key={`calendar-${index}-${year}-${month}`}\n >\n {this.renderHeader(offset, index)}\n <div class=\"calendar-grid\">\n {this.showWeekNumbers && this.renderWeekNumbers(weeks, index)}\n <CalendarGrid\n days={days}\n dayNames={this.getDayNames()}\n selectionType={this.selectionType}\n selectedDate={this.selectedDate}\n startDate={this.startDate}\n endDate={this.endDate}\n isUTCMode={this.isUTCMode}\n onDayClick={this.handleDateSelection}\n isDateInRange={this.isDateInRange}\n isToday={this.isToday}\n />\n </div>\n </div>\n\n {/* Display a vertical separator only if multiple calendars */}\n {index < this.numberOfCalendars - 1 && (\n <div class=\"calendar-separator\"></div>\n )}\n </div>\n );\n };\n\n /**\n * Renders the shortcuts\n * @returns {JSX.Element} Shortcuts\n * @description Renders the shortcuts of the calendar\n */\n private renderShortcuts = () => {\n if (!this.hasShortcuts) {\n return null;\n }\n\n return (\n <CalendarShortcuts\n shortcuts={this.shortcuts}\n placement={this.shortcutsPlacement}\n onShortcutClick={this.applyShortcut}\n />\n );\n };\n\n /**\n * Renders the actions\n * @returns {JSX.Element} Actions\n * @description Renders the actions of the calendar\n * @slot actions - Child content of the component.\n */\n private renderActions = () => {\n return (\n <div class=\"datepicker-actions\">\n <slot name=\"actions\">\n <CalendarActions\n onReset={this.resetSelection}\n onConfirm={this.confirmSelection}\n useSlot={false}\n />\n </slot>\n </div>\n );\n };\n\n /**\n * Renders the datepicker\n * @returns {JSX.Element} Datepicker\n * @description Renders the datepicker of the calendar\n * @slot default - Child content of the component.\n */\n render() {\n return (\n <Host>\n <div class=\"datepicker-root\">\n <div\n class={`datepicker-container ${\n this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''\n }`}\n >\n <div\n class={`datepicker-wrapper ${\n this.numberOfCalendars === 1 ? 'single' : ''\n }`}\n >\n {this.shortcutsPlacement === 'left' && this.renderShortcuts()}\n\n {Array.from({ length: this.numberOfCalendars }, (_, index) =>\n this.renderCalendar(index, index),\n )}\n\n {this.shortcutsPlacement === 'right' && this.renderShortcuts()}\n </div>\n\n {((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||\n this.hasActions) && (\n <div class=\"datepicker-controls\">\n {this.shortcutsPlacement === 'bottom' && this.renderShortcuts()}\n {this.hasActions && this.renderActions()}\n </div>\n )}\n </div>\n </div>\n <slot></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
1
+ {"version":3,"file":"nv-calendar.js","sourceRoot":"","sources":["../../../src/components/nv-calendar/nv-calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EAEL,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,aAAa,EACb,cAAc,GACf,MAAM,qBAAqB,CAAC;AAE7B,kBAAkB;AAClB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AAMH,MAAM,OAAO,UAAU;IALvB;QAOE,8EAA8E;QAC9E,oBAAoB;QAEpB;;;WAGG;QAEM,mBAAc,GAAW,CAAC,CAAC;QAEpC;;;WAGG;QAEH,sBAAiB,GAAW,CAAC,CAAC;QAE9B;;;;;;WAMG;QACH,6DAA6D;QAE7D,UAAK,GAAW,EAAE,CAAC;QA0CnB;;;WAGG;QAEM,WAAM,GAAW,OAAO,CAAC;QAElC;;;;;WAKG;QAEM,eAAU,GAAW,YAAY,CAAC;QAE3C;;;WAGG;QAEM,uBAAkB,GAAgC,QAAQ,CAAC;QAEpE;;;WAGG;QAEM,kBAAa,GAAuB,QAAQ,CAAC;QAEtD;;WAEG;QAEM,gBAAW,GAAY,KAAK,CAAC;QAqBtC,sCAAsC;QAC9B,wBAAmB,GAAW,EAAE,CAAC;QAEzC,kDAAkD;QAC1C,gBAAW,GAAY,KAAK,CAAC;QAErC,uBAAuB;QACvB,8EAA8E;QAC9E,eAAe;QAGf,gBAAW,GAA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;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\nimport {\n WEEK_ABBREVIATIONS,\n CUSTOM_DAY_NAMES,\n CUSTOM_MONTH_NAMES,\n} from '../../utils/constants';\n\nimport {\n parseDate,\n isSameDate,\n formatDate,\n isSameOrAfter,\n isSameOrBefore,\n} from './nv-calendar.utils';\n\n// Import partials\nimport {\n CalendarHeader,\n CalendarGrid,\n WeekNumbers,\n CalendarShortcuts,\n CalendarActions,\n} from './partials';\n\n/**\n * @slot default - Child content of the component.\n * @slot actions - Child content of the component.\n */\n@Component({\n tag: 'nv-calendar',\n styleUrl: 'nv-calendar.scss',\n shadow: false,\n})\nexport class NvCalendar {\n @Element() el: HTMLNvCalendarElement;\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * First day of the week (0 = Sunday, 1 = Monday, etc.)\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 1\n */\n @Prop({ mutable: true, reflect: true })\n numberOfCalendars: number = 1;\n\n /**\n * Selected date value. For single mode: ISO date string. For range mode: comma-separated ISO date strings.\n * Examples:\n * - Single: \"2025-03-15\"\n * - Range: \"2025-03-15,2025-03-20\"\n * @default \"\"\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * Selected date (ISO string format)\n * ex: \"2025-03-15\"\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n singleValue: string;\n\n /**\n * Selected date range\n * format: { start: ISO string, end: ISO string }\n * ex: { start: \"2025-03-15\", end: \"2025-03-20\" }\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: false, mutable: true })\n rangeValue: {\n /** ISO string for start date */\n start: string;\n /** ISO string for end date */\n end: string;\n };\n\n /**\n * Minimum date for selection (ISO string format, ex: \"2025-01-01\")\n */\n @Prop({ reflect: true })\n readonly min?: string;\n\n /**\n * Maximum date for selection (ISO string format, ex: \"2025-12-31\")\n */\n @Prop({ reflect: true })\n readonly max?: string;\n\n /**\n * Disabled dates (ISO string array)\n */\n @Prop({ reflect: false })\n readonly disabledDates: Array<string>;\n\n /**\n * Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /**\n * Date format (ex: 'YYYY-MM-DD', 'DD-MM-YYYY', etc.)\n * @default 'YYYY-MM-DD'\n * @note If the date format is in UTC mode, the date will be displayed in UTC time.\n * @note If the date format is not in UTC mode, the date will be displayed in the local time.\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Selection type (single date or date range)\n * @default 'single'\n */\n @Prop({ reflect: true })\n readonly selectionType: 'single' | 'range' = 'single';\n\n /**\n * Show action buttons\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: {\n /** Label of the shortcut */\n label: string;\n /** Selected date value for single selection mode */\n singleValue?: string;\n /** Date range values for range selection mode */\n rangeValue?: HTMLNvCalendarElement['rangeValue'];\n }[];\n\n /**\n * Show week numbers\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /** Cache for parsed disabled dates */\n private parsedDisabledDates: Date[] = [];\n\n /** Flag to indicate a user click for selection */\n private isUserClick: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n @State()\n currentDate: Date | null = null;\n\n @State()\n selectedDate: Date | null = null;\n\n @State()\n startDate: Date | null = null;\n\n @State()\n endDate: Date | null = null;\n\n /** List of formatted months for the selector */\n @State()\n private months: {\n /** Month value */\n value: number;\n /** Month label */\n label: string;\n }[] = [];\n\n //#endregion STATE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when a single date is selected\n */\n @Event()\n singleDateChange: EventEmitter<string>;\n\n /**\n * Emitted when a date range is selected\n */\n @Event()\n rangeDateChange: EventEmitter<HTMLNvCalendarElement['rangeValue']>;\n\n /**\n * Emitted when the unified value changes\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Watches the changes of the number of calendars\n * @param {number} newValue - New number of calendars\n */\n @Watch('numberOfCalendars')\n validateNumberOfCalendars(newValue: number) {\n if (newValue < 1 || newValue > 4) {\n console.warn(\n 'numberOfCalendars must be between 1 and 4. Defaulting to 1.',\n );\n this.numberOfCalendars = 1;\n }\n }\n\n /**\n * Watches the changes of the selected date range\n * @param {Object} newValue - New rangeValue value\n * @param {string} newValue.start - Start date\n * @param {string} newValue.end - End date\n */\n @Watch('rangeValue')\n onRangeValueChange(newValue: typeof this.rangeValue) {\n if (newValue && newValue.start && newValue.end) {\n try {\n const { startDate, endDate } = this.validateDateRange(\n newValue.start,\n newValue.end,\n );\n\n this.startDate = startDate;\n this.endDate = endDate;\n\n // Do not navigate to the start date if data-prevent-navigation attribute is present\n const preventNavigation =\n this.el.getAttribute('data-prevent-navigation') === 'true';\n if (!preventNavigation && !this.isUserClick) {\n this.currentDate = startDate;\n }\n } catch (error) {\n console.error('Invalid rangeValue:', error);\n }\n }\n }\n\n /**\n * Watches the changes of the disabled dates\n * @description Watches the changes of the disabled dates\n */\n @Watch('disabledDates')\n handleDisabledDatesChange() {\n this.parseDisabledDates();\n }\n\n /**\n * Watches the changes of the single value\n * @param {string} newValue - New single value\n * @param {string} oldValue - Old single value\n */\n @Watch('singleValue')\n onSingleValueChange(newValue: string, oldValue: string) {\n if (this.selectionType === 'single' && newValue !== oldValue && newValue) {\n const parsedDate = parseDate(newValue, this.dateFormat);\n if (parsedDate) {\n this.selectedDate = parsedDate;\n\n // Do not navigate to the selected date if data-prevent-navigation attribute is present\n const preventNavigation =\n this.el.getAttribute('data-prevent-navigation') === 'true';\n if (!preventNavigation && !this.isUserClick) {\n this.currentDate = parsedDate;\n }\n }\n }\n }\n\n /**\n * Watches the changes of the unified value prop\n * @param {string} newValue - New value\n * @param {string} oldValue - Old value\n */\n @Watch('value')\n onValueChange(newValue: string, oldValue: string) {\n if (newValue !== oldValue) {\n this.parseUnifiedValue(newValue);\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.parseDisabledDates();\n\n // Initialize from unified value prop if provided\n if (this.value) {\n this.parseUnifiedValue(this.value);\n } else if (this.selectionType === 'single' && this.singleValue) {\n this.selectedDate = parseDate(this.singleValue, this.dateFormat);\n this.currentDate = this.selectedDate;\n } else if (this.selectionType === 'range' && this.rangeValue) {\n try {\n if (this.rangeValue.start && this.rangeValue.end) {\n const { startDate, endDate, swapped } = this.validateDateRange(\n this.rangeValue.start,\n this.rangeValue.end,\n );\n\n this.startDate = startDate;\n this.endDate = endDate;\n this.currentDate = startDate;\n\n if (swapped) {\n // If dates were swapped, update the rangeValue property\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.rangeValue = {\n start: formatDate(startDate, { dateFormat: this.dateFormat }),\n end: formatDate(endDate, { dateFormat: this.dateFormat }),\n };\n }\n }\n } catch (error) {\n console.error('Invalid rangeValue:', error);\n }\n }\n\n // Ensure currentDate is always initialized\n if (!this.currentDate) {\n this.currentDate = new Date();\n }\n\n this.initializeMonths();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Checks if shortcuts are visible\n * @returns {boolean} true if shortcuts are visible\n */\n private get hasShortcuts(): boolean {\n return Boolean(this.shortcutsPlacement && this.shortcuts);\n }\n\n /**\n * Checks if actions are visible\n * @returns {boolean} true if actions are visible\n */\n private get hasActions(): boolean {\n return this.showActions;\n }\n\n /**\n * Checks if the date format is in UTC mode\n * @returns {boolean} true if the date format is in UTC mode\n */\n private get isUTCMode(): boolean {\n return this.dateFormat.includes('Z');\n }\n\n /**\n * Parses the unified value prop and synchronizes with internal state\n * @param {string} value - Value to parse\n */\n private parseUnifiedValue = (value: string): void => {\n if (!value) {\n // Reset all selections\n this.selectedDate = null;\n this.startDate = null;\n this.endDate = null;\n return;\n }\n\n const values = value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n\n if (this.selectionType === 'range' && values.length < 2) {\n console.warn(`Invalid date range format: ${value}`);\n this.startDate = null;\n this.endDate = null;\n return;\n }\n\n if (this.selectionType === 'single' && values.length >= 1) {\n const parsedDate = parseDate(values[0], this.dateFormat);\n if (parsedDate) {\n this.selectedDate = parsedDate;\n\n // Only sync with legacy prop if not using actions (immediate mode)\n if (!this.showActions) {\n this.singleValue = values[0];\n }\n\n // Navigate to the date if not prevented\n const preventNavigation =\n this.el.getAttribute('data-prevent-navigation') === 'true';\n if (!preventNavigation && !this.isUserClick) {\n this.currentDate = parsedDate;\n }\n } else {\n // Handle malformed date gracefully - reset state\n console.warn(`Invalid date format: ${values[0]}`);\n this.selectedDate = null;\n if (!this.showActions) {\n this.singleValue = '';\n }\n }\n } else if (this.selectionType === 'range' && values.length >= 2) {\n const startDate = parseDate(values[0], this.dateFormat);\n const endDate = parseDate(values[1], this.dateFormat);\n\n if (startDate && endDate) {\n this.startDate = startDate;\n this.endDate = endDate;\n\n // Only sync with legacy prop if not using actions (immediate mode)\n if (!this.showActions) {\n this.rangeValue = {\n start: values[0],\n end: values[1],\n };\n }\n\n // Navigate to start date if not prevented\n const preventNavigation =\n this.el.getAttribute('data-prevent-navigation') === 'true';\n if (!preventNavigation && !this.isUserClick) {\n this.currentDate = startDate;\n }\n } else {\n // Handle malformed dates gracefully - reset state\n console.warn(\n `Invalid date range format: ${values?.[0]}, ${values?.[1]}`,\n );\n this.startDate = null;\n this.endDate = null;\n if (!this.showActions) {\n this.rangeValue = { start: '', end: '' };\n }\n }\n }\n };\n\n /**\n * Validates and processes a date range, warning if start is after end\n * @param {string} startDateStr - Start date in ISO string format\n * @param {string} endDateStr - End date in ISO string format\n * @returns {object} Object containing the validated start and end dates\n */\n private validateDateRange(\n startDateStr: string,\n endDateStr: string,\n ): {\n /** Start date */\n startDate: Date;\n /** End date */\n endDate: Date;\n /** If the dates were swapped */\n swapped: boolean;\n } {\n try {\n const startDate = parseDate(startDateStr, this.dateFormat);\n const endDate = parseDate(endDateStr, this.dateFormat);\n\n if (startDate && endDate && startDate > endDate) {\n console.warn(\n `Warning: startDate (${formatDate(startDate, {\n dateFormat: this.dateFormat,\n })}) is after endDate (${formatDate(endDate, {\n dateFormat: this.dateFormat,\n })})`,\n );\n\n // Return dates in correct order, with swapped flag\n return {\n startDate: endDate,\n endDate: startDate,\n swapped: true,\n };\n }\n\n return {\n startDate,\n endDate,\n swapped: false,\n };\n } catch (error) {\n console.error('Invalid date range:', error);\n throw error; // Re-throw to let the caller handle it\n }\n }\n\n /**\n * Change the displayed month\n * @param {number} offset - Month offset (-1 for previous, 1 for next)\n */\n private changeMonth = (offset: number) => {\n const newDate = new Date(this.currentDate);\n newDate.setUTCDate(1); // Set to the first of the month to avoid day-of-month issues\n newDate.setUTCMonth(newDate.getUTCMonth() + offset);\n\n const containers = this.el.querySelectorAll('.calendar-grid');\n containers.forEach(container => {\n container.classList.remove('slide-left', 'slide-right');\n const animationClass = offset > 0 ? 'slide-left' : 'slide-right';\n container.classList.add(animationClass);\n setTimeout(() => container.classList.remove(animationClass), 300);\n });\n\n this.currentDate = newDate;\n };\n\n /**\n * Handles date selection based on the mode\n * @param {Date} date - Selected date\n */\n private handleDateSelection = (date: Date) => {\n if (this.isDateDisabled(date)) {\n return;\n }\n\n this.isUserClick = true;\n\n if (this.selectionType === 'single') {\n this.handleSingleSelection(date);\n } else {\n this.handleRangeSelection(date);\n }\n\n requestAnimationFrame(() => {\n this.isUserClick = false;\n });\n };\n\n /**\n * Handles single date selection\n * @param {Date} date - Selected date\n */\n private handleSingleSelection = (date: Date) => {\n if (!date) return;\n\n const formattedDate = formatDate(date, { dateFormat: this.dateFormat });\n this.selectedDate = date;\n\n // Update the unified value prop (like nv-fieldslider)\n this.value = formattedDate;\n this.valueChanged.emit(formattedDate);\n\n // Legacy support (deprecated) - only sync props if not using actions\n if (!this.showActions) {\n this.singleValue = formattedDate;\n this.singleDateChange.emit(formattedDate);\n }\n };\n\n /**\n * Handles range date selection\n * @param {Date} date - Selected date\n */\n private handleRangeSelection = (date: Date) => {\n if (!this.startDate || (this.startDate && this.endDate)) {\n // Start new range selection\n this.startDate = date;\n this.endDate = null;\n } else {\n // Complete range selection\n this.endDate = date;\n\n // Ensure correct order\n if (this.startDate > this.endDate) {\n [this.startDate, this.endDate] = [this.endDate, this.startDate];\n }\n\n const startFormatted = formatDate(this.startDate, {\n dateFormat: this.dateFormat,\n });\n const endFormatted = formatDate(this.endDate, {\n dateFormat: this.dateFormat,\n });\n\n // Update the unified value prop (like nv-fieldslider)\n this.value = `${startFormatted},${endFormatted}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated) - only sync props if not using actions\n if (!this.showActions) {\n const legacyRange = { start: startFormatted, end: endFormatted };\n this.rangeDateChange.emit(legacyRange);\n this.rangeValue = legacyRange;\n }\n }\n };\n\n /**\n * Checks if a date is disabled.\n * Disabled if:\n * - The date is before min (if defined)\n * - The date is after max (if defined)\n * - The date is in the disabledDates array\n * @param {Date} date - Date to check\n * @returns {boolean} true if the date is disabled\n */\n private isDateDisabled = (date: Date): boolean => {\n if (!date) return true;\n\n // Minimum bound check\n if (this.min) {\n const minDate = parseDate(this.min, this.dateFormat);\n if (minDate && date < minDate) {\n return true;\n }\n }\n\n // Maximum bound check\n if (this.max) {\n const maxDate = parseDate(this.max, this.dateFormat);\n if (maxDate && date > maxDate) {\n return true;\n }\n }\n\n // Check disabled dates\n return this.parsedDisabledDates.some(disabledDate =>\n isSameDate(date, disabledDate, { isUTCMode: this.isUTCMode }),\n );\n };\n\n /**\n * Checks if a date is in the selected range\n * @param {Date} date - Date to check\n * @returns {boolean} true if the date is in the range\n */\n private isDateInRange = (date: Date): boolean => {\n if (!date || !this.startDate || !this.endDate) return false;\n\n const checkDate = parseDate(date, this.dateFormat);\n const startDate = parseDate(this.startDate, this.dateFormat);\n const endDate = parseDate(this.endDate, this.dateFormat);\n\n // Verify if startDate and endDate are valid\n if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {\n return false;\n }\n\n // Verify that startDate is before endDate (additional security)\n if (startDate > endDate) return false;\n\n // Comparison based only on the date (year, month, day)\n return (\n isSameOrAfter(checkDate, startDate, { isUTCMode: this.isUTCMode }) &&\n isSameOrBefore(checkDate, endDate, { isUTCMode: this.isUTCMode })\n );\n };\n\n /**\n * Retrieves the localized day names\n * @returns {string[]} Array of short day names\n */\n private getDayNames = (): string[] => {\n let days: string[];\n\n // If we have custom day names for this locale\n if (CUSTOM_DAY_NAMES[this.locale]) {\n // Custom day names are expected to start with Monday (index 0 = Monday)\n days = [...CUSTOM_DAY_NAMES[this.locale]];\n } else {\n // Generate days using Intl.DateTimeFormat, starting from Monday\n const formatter = new Intl.DateTimeFormat(this.locale, {\n weekday: 'short',\n });\n\n // Generate days starting from Monday (2023-01-02 was a Monday)\n days = [...Array(7)].map((_, i) =>\n formatter.format(new Date(2023, 0, i + 2)).toUpperCase(),\n );\n }\n\n // Now reorganize based on firstDayOfWeek\n // 0 = Sunday, 1 = Monday (default), 2 = Tuesday, etc.\n if (this.firstDayOfWeek === 0) {\n // If Sunday is first day, move Sunday (last element) to the beginning\n return [days[6], ...days.slice(0, 6)];\n } else if (this.firstDayOfWeek === 1) {\n // If Monday is first day, return as-is (since our array starts with Monday)\n return days;\n } else {\n // For other first days (Tuesday=2, Wednesday=3, etc.)\n const offset = this.firstDayOfWeek - 1; // Convert to 0-based offset from Monday\n return [...days.slice(offset), ...days.slice(0, offset)];\n }\n };\n\n /**\n * Generates the days of the current month\n * @param {number} offset - Month offset (0 by default)\n * @returns {Array<{ dayOfMonth: number | null, date: Date | null, isSelected: boolean, isDisabled: boolean }>} Array of formatted days\n */\n private getDaysInMonth = (\n offset: number = 0,\n ): Array<{\n /** Day of the month (1 to 31) */\n dayOfMonth: number | null;\n /** Complete date */\n date: Date | null;\n /** If the day belongs to the current month */\n isCurrentMonth: boolean;\n /** If the day is disabled */\n isDisabled: boolean;\n /** If the day is blank (padding) */\n isBlank: boolean;\n }> => {\n const baseMonth = this.currentDate.getUTCMonth();\n\n // Correctly calculate the year and month for the given offset\n const targetDate = new Date(this.currentDate);\n targetDate.setUTCMonth(baseMonth + offset);\n const year = targetDate.getUTCFullYear();\n const month = targetDate.getUTCMonth();\n\n const firstDay = new Date(Date.UTC(year, month, 1));\n const lastDay = new Date(Date.UTC(year, month + 1, 0));\n\n const days = [];\n\n // Correct calculation of offset for previous month days\n // Use getUTCDay to stay consistent with UTC timezone\n const dayOfWeekIndex = firstDay.getUTCDay(); // 0 = Sunday, 1 = Monday, etc.\n\n // Adjust based on firstDayOfWeek (if week starts on Monday, offset is different)\n const offsetDays = (dayOfWeekIndex - this.firstDayOfWeek + 7) % 7;\n\n // Add padding days from the previous month\n for (let i = 0; i < offsetDays; i++) {\n const prevMonthDay = new Date(Date.UTC(year, month, 0)).getUTCDate();\n const date = new Date(\n Date.UTC(year, month - 1, prevMonthDay - offsetDays + 1 + i),\n );\n days.push({\n dayOfMonth: date.getUTCDate(),\n date,\n isCurrentMonth: false,\n isDisabled: this.isDateDisabled(date),\n // Days from previous month are blank if not the first calendar\n isBlank: offset > 0,\n });\n }\n\n // Add the days of the current month\n for (let i = 1; i <= lastDay.getUTCDate(); i++) {\n const date = new Date(Date.UTC(year, month, i));\n days.push({\n dayOfMonth: i,\n date,\n isCurrentMonth: true,\n isDisabled: this.isDateDisabled(date),\n isBlank: false,\n });\n }\n\n // Add padding days to fill the last week\n const nextMonthDaysNeeded = 7 - (days.length % 7 || 7);\n if (nextMonthDaysNeeded < 7) {\n for (let i = 1; i <= nextMonthDaysNeeded; i++) {\n const date = new Date(Date.UTC(year, month + 1, i));\n days.push({\n dayOfMonth: i,\n date,\n isCurrentMonth: false,\n isDisabled: this.isDateDisabled(date),\n // Days from next month are blank if not the last calendar\n isBlank: offset < this.numberOfCalendars - 1,\n });\n }\n }\n\n return days;\n };\n\n /** Initializes the list of formatted months according to the locale */\n private initializeMonths = () => {\n // If we have custom month names for this locale\n if (CUSTOM_MONTH_NAMES[this.locale]) {\n this.months = CUSTOM_MONTH_NAMES[this.locale].map((label, value) => ({\n value,\n label,\n }));\n return;\n }\n\n // Otherwise, use the default behavior\n const formatter = new Intl.DateTimeFormat(this.locale, { month: 'short' });\n this.months = Array.from({ length: 12 }, (_, i) => ({\n value: i,\n label: formatter.format(new Date(2000, i, 1)).toUpperCase(),\n }));\n };\n\n /**\n * Retrieves the localized abbreviation for \"week\"\n * @returns {string} Localized abbreviation for \"week\"\n */\n private getLocalizedWeekText = (): string => {\n return WEEK_ABBREVIATIONS[this.locale] || 'W';\n };\n\n /**\n * Handles month change in the selector\n * @param {Event} event - Month change event\n * @param {number} calendarOffset - Calendar offset (0 by default)\n */\n private handleMonthChange = (event: Event, calendarOffset: number = 0) => {\n const select = event.target as HTMLSelectElement;\n const selectedMonth = parseInt(select.value, 10);\n const newDate = new Date(this.currentDate);\n\n // Date for the calendar being changed\n const targetCalendarDate = new Date(newDate.toUTCString());\n targetCalendarDate.setUTCMonth(\n targetCalendarDate.getUTCMonth() + calendarOffset,\n );\n\n const currentMonth = targetCalendarDate.getUTCMonth();\n let monthDiff = selectedMonth - currentMonth;\n\n // Smartly adjust for year change\n if (monthDiff > 6) {\n // e.g. from Jan to Dec, go back 1 month\n monthDiff -= 12;\n }\n if (monthDiff < -6) {\n // e.g. from Dec to Jan, go forward 1 month\n monthDiff += 12;\n }\n\n // Apply the diff to the original `currentDate`\n const finalDate = new Date(this.currentDate);\n finalDate.setUTCMonth(finalDate.getUTCMonth() + monthDiff);\n this.currentDate = finalDate;\n };\n\n /**\n * Handles year change in the numeric entry\n * @param {Event} event - Year change event\n * @param {number} calendarOffset - Calendar offset (0 by default)\n */\n private handleYearChange = (event: Event, calendarOffset: number = 0) => {\n const input = event.target as HTMLInputElement;\n const year = parseInt(input.value, 10);\n if (!isNaN(year) && year >= 1900 && year <= 2100) {\n const newDate = new Date(this.currentDate);\n newDate.setUTCMonth(newDate.getUTCMonth() + calendarOffset);\n newDate.setUTCFullYear(year);\n newDate.setUTCMonth(newDate.getUTCMonth() - calendarOffset);\n this.currentDate = new Date(newDate);\n }\n };\n\n /**\n * Handles week selection\n * @param {Date[]} weekDays - Selected week days\n * @param {number} calendarIndex - Calendar index from which the selection is made\n */\n private handleWeekSelection = (weekDays: Date[], calendarIndex: number) => {\n if (this.selectionType !== 'range') return;\n\n const allDays = this.getDaysInMonth(calendarIndex);\n\n const weekStart = weekDays[0];\n const weekEnd = weekDays[weekDays.length - 1];\n\n if (!weekStart || !weekEnd) return;\n\n const selectedWeekDays = allDays.filter(\n day => day.date && day.date >= weekStart && day.date <= weekEnd,\n );\n\n const validDays = selectedWeekDays.filter(\n day => !this.isDateDisabled(day.date),\n );\n\n if (validDays.length > 0) {\n this.startDate = validDays[0].date;\n this.endDate = validDays[validDays.length - 1].date;\n\n this.rangeDateChange.emit({\n start: formatDate(this.startDate, { dateFormat: this.dateFormat }),\n end: formatDate(this.endDate, { dateFormat: this.dateFormat }),\n });\n }\n };\n\n /**\n * Checks if a date corresponds to today\n * @param {Date} date - Date to check\n * @returns {boolean} true if the date is today\n */\n private isToday = (date: Date): boolean => {\n const today = new Date();\n return (\n date.getDate() === today.getDate() &&\n date.getMonth() === today.getMonth() &&\n date.getFullYear() === today.getFullYear()\n );\n };\n\n /**\n * Parse and cache the disabled dates\n * @description Parse and cache the disabled dates\n */\n private parseDisabledDates = () => {\n if (!this.disabledDates) {\n this.parsedDisabledDates = [];\n return;\n }\n\n try {\n this.parsedDisabledDates = this.disabledDates\n .map(date => parseDate(date, this.dateFormat))\n .filter(date => date !== null) as Date[];\n } catch (error) {\n console.error('Error parsing disabled dates:', error);\n this.parsedDisabledDates = [];\n }\n };\n\n /**\n * Applies a shortcut selection\n * @param {Object} shortcut - Shortcut to apply\n * @param {string | Date} shortcut.singleValue - Selected date value\n * @param {Object} shortcut.rangeValue - Start and end date values\n * @param {string | Date} shortcut.rangeValue.start - Start date value\n * @param {string | Date} shortcut.rangeValue.end - End date value\n * @param {string} shortcut.label - Label\n */\n private applyShortcut = (shortcut: (typeof this.shortcuts)[number]) => {\n this.selectedDate = null;\n this.startDate = null;\n this.endDate = null;\n\n if (shortcut.singleValue) {\n const newDate = parseDate(shortcut.singleValue, this.dateFormat);\n this.selectedDate = newDate;\n const formattedDate = formatDate(newDate, {\n dateFormat: this.dateFormat,\n });\n\n // Update the unified value prop (like nv-fieldslider)\n this.value = formattedDate;\n this.valueChanged.emit(formattedDate);\n\n // Legacy support (deprecated) - sync props\n this.singleValue = formattedDate;\n this.singleDateChange.emit(formattedDate);\n\n if (!this.showActions) {\n const event = new CustomEvent('closePopover', {\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(event);\n }\n\n this.forceCalendarUpdate(newDate);\n } else {\n const start = parseDate(shortcut.rangeValue.start, this.dateFormat);\n const end = parseDate(shortcut.rangeValue.end, this.dateFormat);\n\n this.startDate = start;\n this.endDate = end;\n\n const startFormatted = formatDate(start, {\n dateFormat: this.dateFormat,\n });\n const endFormatted = formatDate(end, { dateFormat: this.dateFormat });\n\n // Update the unified value prop (like nv-fieldslider)\n this.value = `${startFormatted},${endFormatted}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated) - sync props\n const legacyRange = { start: startFormatted, end: endFormatted };\n this.rangeDateChange.emit(legacyRange);\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.rangeValue = legacyRange;\n\n if (!this.showActions) {\n const event = new CustomEvent('closePopover', {\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(event);\n }\n\n this.currentDate = start;\n }\n };\n\n /**\n * Method to force the complete calendar update\n * @param {Date} newDate - Date to force\n */\n private forceCalendarUpdate = newDate => {\n this.currentDate = new Date(newDate);\n };\n\n /**\n * Resets the current selection\n */\n private resetSelection = (): void => {\n if (this.selectionType === 'single') {\n this.selectedDate = null;\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.singleValue = null;\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.value = '';\n this.singleDateChange.emit('');\n this.valueChanged.emit('');\n } else {\n this.startDate = null;\n this.endDate = null;\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.rangeValue = null;\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.value = '';\n this.rangeDateChange.emit({ start: '', end: '' });\n this.valueChanged.emit('');\n }\n };\n\n /**\n * Confirms the current selection\n */\n private confirmSelection = (): void => {\n if (this.selectionType === 'single' && this.selectedDate) {\n const dateStr = formatDate(this.selectedDate, {\n dateFormat: this.dateFormat,\n });\n this.singleDateChange.emit(dateStr);\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.singleValue = dateStr;\n const event = new CustomEvent('closePopover', {\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(event);\n } else if (\n this.selectionType === 'range' &&\n this.startDate &&\n this.endDate\n ) {\n this.rangeDateChange.emit({\n start: formatDate(this.startDate, { dateFormat: this.dateFormat }),\n end: formatDate(this.endDate, { dateFormat: this.dateFormat }),\n });\n // eslint-disable-next-line @stencil-community/strict-mutable\n this.rangeValue = {\n start: formatDate(this.startDate, { dateFormat: this.dateFormat }),\n end: formatDate(this.endDate, { dateFormat: this.dateFormat }),\n };\n const event = new CustomEvent('closePopover', {\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(event);\n }\n };\n\n /**\n * Clears the current selection and resets the calendar to its initial state.\n * This method can be called programmatically to reset the calendar.\n */\n @Method()\n async clear(): Promise<void> {\n if (this.selectionType === 'single') {\n this.selectedDate = null;\n this.singleValue = '';\n this.value = '';\n this.singleDateChange.emit('');\n this.valueChanged.emit('');\n } else {\n this.startDate = null;\n this.endDate = null;\n this.rangeValue = { start: '', end: '' };\n this.value = '';\n this.rangeDateChange.emit({ start: '', end: '' });\n this.valueChanged.emit('');\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n /**\n * Renders the header\n * @param {number} offset - Month offset\n * @param {number} index - Calendar index\n * @returns {JSX.Element} Header\n * @description Renders the header of the calendar\n */\n private renderHeader = (offset: number, index: number) => {\n return (\n <CalendarHeader\n currentDate={this.currentDate}\n months={this.months}\n numberOfCalendars={this.numberOfCalendars}\n calendarIndex={index}\n monthOffset={offset}\n onMonthChange={this.changeMonth}\n onMonthSelect={this.handleMonthChange}\n onYearChange={this.handleYearChange}\n />\n );\n };\n\n /**\n * Renders the week numbers\n * @param {Array<{date: Date}>} weeks - Weeks to render\n * @param {number} index - Calendar index\n * @returns {JSX.Element} Week numbers\n * @description Renders the week numbers of the calendar\n */\n private renderWeekNumbers = (\n /** Weeks to render */\n weeks: Array<{\n /** Date */\n date: Date;\n }>[],\n /** Calendar index */\n index: number,\n ) => {\n return (\n <WeekNumbers\n weeks={weeks}\n localizedWeekText={this.getLocalizedWeekText()}\n selectionType={this.selectionType}\n onWeekSelect={this.handleWeekSelection}\n calendarIndex={index}\n />\n );\n };\n\n /**\n * Renders the calendar\n * @param {number} index - Calendar index\n * @param {number} offset - Month offset\n * @returns {JSX.Element} Calendar\n * @description Renders the calendar of the calendar\n */\n private renderCalendar = (\n /** Calendar index */\n index: number,\n /** Month offset */\n offset: number,\n ) => {\n const days = this.getDaysInMonth(offset);\n const weeks = [];\n for (let i = 0; i < days.length; i += 7) {\n weeks.push(days.slice(i, i + 7));\n }\n\n // Add year and month to the key to force re-render on date change\n const targetDate = new Date(this.currentDate);\n targetDate.setUTCMonth(targetDate.getUTCMonth() + offset);\n const year = targetDate.getUTCFullYear();\n const month = targetDate.getUTCMonth();\n\n return (\n <div class=\"calendar-wrapper\">\n <div\n class=\"calendar-container\"\n key={`calendar-${index}-${year}-${month}`}\n >\n {this.renderHeader(offset, index)}\n <div class=\"calendar-grid\">\n {this.showWeekNumbers && this.renderWeekNumbers(weeks, index)}\n <CalendarGrid\n days={days}\n dayNames={this.getDayNames()}\n selectionType={this.selectionType}\n selectedDate={this.selectedDate}\n startDate={this.startDate}\n endDate={this.endDate}\n isUTCMode={this.isUTCMode}\n onDayClick={this.handleDateSelection}\n isDateInRange={this.isDateInRange}\n isToday={this.isToday}\n />\n </div>\n </div>\n\n {/* Display a vertical separator only if multiple calendars */}\n {index < this.numberOfCalendars - 1 && (\n <div class=\"calendar-separator\"></div>\n )}\n </div>\n );\n };\n\n /**\n * Renders the shortcuts\n * @returns {JSX.Element} Shortcuts\n * @description Renders the shortcuts of the calendar\n */\n private renderShortcuts = () => {\n if (!this.hasShortcuts) {\n return null;\n }\n\n return (\n <CalendarShortcuts\n shortcuts={this.shortcuts}\n placement={this.shortcutsPlacement}\n onShortcutClick={this.applyShortcut}\n />\n );\n };\n\n /**\n * Renders the actions\n * @returns {JSX.Element} Actions\n * @description Renders the actions of the calendar\n * @slot actions - Child content of the component.\n */\n private renderActions = () => {\n return (\n <div class=\"datepicker-actions\">\n <slot name=\"actions\">\n <CalendarActions\n onReset={this.resetSelection}\n onConfirm={this.confirmSelection}\n useSlot={false}\n />\n </slot>\n </div>\n );\n };\n\n /**\n * Renders the datepicker\n * @returns {JSX.Element} Datepicker\n * @description Renders the datepicker of the calendar\n * @slot default - Child content of the component.\n */\n render() {\n return (\n <Host>\n <div class=\"datepicker-root\">\n <div\n class={`datepicker-container ${\n this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''\n }`}\n >\n <div\n class={`datepicker-wrapper ${\n this.numberOfCalendars === 1 ? 'single' : ''\n }`}\n >\n {this.shortcutsPlacement === 'left' && this.renderShortcuts()}\n\n {Array.from({ length: this.numberOfCalendars }, (_, index) =>\n this.renderCalendar(index, index),\n )}\n\n {this.shortcutsPlacement === 'right' && this.renderShortcuts()}\n </div>\n\n {((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||\n this.hasActions) && (\n <div class=\"datepicker-controls\">\n {this.shortcutsPlacement === 'bottom' && this.renderShortcuts()}\n {this.hasActions && this.renderActions()}\n </div>\n )}\n </div>\n </div>\n <slot></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}