@nova-design-system/nova-webcomponents 3.8.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 (137) 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-dialog.cjs.entry.js +19 -32
  6. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  7. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
  8. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
  9. package/dist/cjs/nv-fielddate.cjs.entry.js +62 -94
  10. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nv-fielddaterange.cjs.entry.js +52 -33
  12. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nv-fieldselect.cjs.entry.js +14 -26
  14. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  15. package/dist/cjs/nv-icon.cjs.entry.js +2 -2
  16. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  17. package/dist/collection/components/nv-calendar/nv-calendar.js +9 -3
  18. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  19. package/dist/collection/components/nv-dialog/nv-dialog.js +21 -40
  20. package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
  21. package/dist/collection/components/nv-dialogheader/nv-dialogheader.css +1 -0
  22. package/dist/collection/components/nv-fielddate/nv-fielddate.js +63 -94
  23. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  24. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +52 -33
  25. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  26. package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +2 -0
  27. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +8 -8
  28. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
  29. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +25 -35
  30. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
  31. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  32. package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
  33. package/dist/components/nv-accordion-item.js +1 -1
  34. package/dist/components/nv-accordion.js +3 -3
  35. package/dist/components/nv-alert.js +1 -1
  36. package/dist/components/nv-avatar.js +1 -1
  37. package/dist/components/nv-badge.js +1 -1
  38. package/dist/components/nv-calendar.js +1 -1
  39. package/dist/components/nv-datagrid.js +2 -2
  40. package/dist/components/nv-dialog.js +23 -36
  41. package/dist/components/nv-dialog.js.map +1 -1
  42. package/dist/components/nv-dialogfooter.js +1 -1
  43. package/dist/components/nv-dialogheader.js +1 -1
  44. package/dist/components/nv-fielddate.js +68 -100
  45. package/dist/components/nv-fielddate.js.map +1 -1
  46. package/dist/components/nv-fielddaterange.js +56 -37
  47. package/dist/components/nv-fielddaterange.js.map +1 -1
  48. package/dist/components/nv-fielddropdown.js +3 -3
  49. package/dist/components/nv-fielddropdownitem.js +1 -1
  50. package/dist/components/nv-fieldmultiselect.js +3 -3
  51. package/dist/components/nv-fieldnumber.js +1 -1
  52. package/dist/components/nv-fieldpassword.js +2 -2
  53. package/dist/components/nv-fieldselect.js +18 -31
  54. package/dist/components/nv-fieldselect.js.map +1 -1
  55. package/dist/components/nv-fieldslider.js +3 -3
  56. package/dist/components/nv-fieldtext.js +1 -1
  57. package/dist/components/nv-fieldtime.js +2 -2
  58. package/dist/components/nv-icon.js +1 -1
  59. package/dist/components/nv-iconbutton.js +1 -1
  60. package/dist/components/nv-menu.js +2 -2
  61. package/dist/components/nv-menuitem.js +1 -1
  62. package/dist/components/{p-6e2f91ae.js → p-025b8a78.js} +2 -2
  63. package/dist/components/{p-6e2f91ae.js.map → p-025b8a78.js.map} +1 -1
  64. package/dist/components/{p-865725bf.js → p-30f970c3.js} +2 -2
  65. package/dist/components/{p-865725bf.js.map → p-30f970c3.js.map} +1 -1
  66. package/dist/components/{p-f0371d98.js → p-60064345.js} +2 -2
  67. package/dist/components/{p-f0371d98.js.map → p-60064345.js.map} +1 -1
  68. package/dist/components/p-6460318d.js +88 -0
  69. package/dist/components/p-6460318d.js.map +1 -0
  70. package/dist/components/{p-9a209ac7.js → p-68ff562f.js} +2 -2
  71. package/dist/components/{p-9a209ac7.js.map → p-68ff562f.js.map} +1 -1
  72. package/dist/components/{p-abb8f5ae.js → p-6de6866c.js} +2 -2
  73. package/dist/components/{p-abb8f5ae.js.map → p-6de6866c.js.map} +1 -1
  74. package/dist/components/{p-f927f771.js → p-79e6b6a2.js} +3 -3
  75. package/dist/components/{p-f927f771.js.map → p-79e6b6a2.js.map} +1 -1
  76. package/dist/components/{p-d32b75ac.js → p-82e5674c.js} +10 -4
  77. package/dist/components/p-82e5674c.js.map +1 -0
  78. package/dist/components/{p-7bc65e46.js → p-db4ba1d9.js} +3 -3
  79. package/dist/components/{p-7bc65e46.js.map → p-db4ba1d9.js.map} +1 -1
  80. package/dist/components/{p-fa1988d9.js → p-e4e1a926.js} +2 -2
  81. package/dist/components/{p-fa1988d9.js.map → p-e4e1a926.js.map} +1 -1
  82. package/dist/components/{p-ca130ad2.js → p-ed6686a1.js} +2 -2
  83. package/dist/components/p-ed6686a1.js.map +1 -0
  84. package/dist/components/{p-91a558eb.js → p-f1df2634.js} +2 -2
  85. package/dist/components/{p-91a558eb.js.map → p-f1df2634.js.map} +1 -1
  86. package/dist/esm/loader.js +1 -1
  87. package/dist/esm/native.js +1 -1
  88. package/dist/esm/nv-calendar.entry.js +9 -3
  89. package/dist/esm/nv-calendar.entry.js.map +1 -1
  90. package/dist/esm/nv-dialog.entry.js +19 -32
  91. package/dist/esm/nv-dialog.entry.js.map +1 -1
  92. package/dist/esm/nv-dialogfooter_2.entry.js +1 -1
  93. package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
  94. package/dist/esm/nv-fielddate.entry.js +62 -94
  95. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  96. package/dist/esm/nv-fielddaterange.entry.js +52 -33
  97. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  98. package/dist/esm/nv-fieldselect.entry.js +14 -26
  99. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  100. package/dist/esm/nv-icon.entry.js +2 -2
  101. package/dist/esm/nv-icon.entry.js.map +1 -1
  102. package/dist/native/native.esm.js +1 -1
  103. package/dist/native/native.esm.js.map +1 -1
  104. package/dist/native/{p-baddee4c.entry.js → p-11012998.entry.js} +2 -2
  105. package/dist/native/p-11012998.entry.js.map +1 -0
  106. package/dist/native/{p-dc34da69.entry.js → p-4a533dd8.entry.js} +2 -2
  107. package/dist/native/p-4a533dd8.entry.js.map +1 -0
  108. package/dist/native/{p-f687e05c.entry.js → p-55cd3d62.entry.js} +2 -2
  109. package/dist/native/p-55cd3d62.entry.js.map +1 -0
  110. package/dist/native/{p-516da423.entry.js → p-9ea3d30d.entry.js} +2 -2
  111. package/dist/native/p-9ea3d30d.entry.js.map +1 -0
  112. package/dist/native/{p-12039da4.entry.js → p-b7ec9a1b.entry.js} +2 -2
  113. package/dist/native/p-b7ec9a1b.entry.js.map +1 -0
  114. package/dist/native/p-bc77cac1.entry.js +2 -0
  115. package/dist/native/p-bc77cac1.entry.js.map +1 -0
  116. package/dist/native/{p-9dc1c3e7.entry.js → p-ff248eb8.entry.js} +2 -2
  117. package/dist/native/{p-9dc1c3e7.entry.js.map → p-ff248eb8.entry.js.map} +1 -1
  118. package/dist/types/components/nv-dialog/nv-dialog.d.ts +6 -17
  119. package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +4 -19
  120. package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +1 -0
  121. package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +22 -9
  122. package/dist/types/components.d.ts +38 -4
  123. package/dist/vscode-data.json +2 -6
  124. package/hydrate/index.js +163 -197
  125. package/hydrate/index.mjs +163 -197
  126. package/package.json +1 -1
  127. package/dist/components/p-9232d306.js +0 -88
  128. package/dist/components/p-9232d306.js.map +0 -1
  129. package/dist/components/p-ca130ad2.js.map +0 -1
  130. package/dist/components/p-d32b75ac.js.map +0 -1
  131. package/dist/native/p-12039da4.entry.js.map +0 -1
  132. package/dist/native/p-516da423.entry.js.map +0 -1
  133. package/dist/native/p-baddee4c.entry.js.map +0 -1
  134. package/dist/native/p-c65a79a9.entry.js +0 -2
  135. package/dist/native/p-c65a79a9.entry.js.map +0 -1
  136. package/dist/native/p-dc34da69.entry.js.map +0 -1
  137. package/dist/native/p-f687e05c.entry.js.map +0 -1
@@ -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-cal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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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AI,CAAC,UAAU,IAAI,IAAI,CAAC,aAAa,EAAE,CACpC,CACP,CACG,CACF;YACN,8DAAa,CACR,CACR,CAAC;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"]}
@@ -27,7 +27,8 @@ export class NvDialog {
27
27
  */
28
28
  this.clickOutside = false;
29
29
  /**
30
- * If true, the dialog visibility is managed manually through methods or the open prop.
30
+ * If true, the dialog visibility is managed manually through methods or the
31
+ * open prop.
31
32
  */
32
33
  this.controlled = false;
33
34
  /**
@@ -35,22 +36,11 @@ export class NvDialog {
35
36
  */
36
37
  this.full = false;
37
38
  /**
38
- * Controls whether the dialog should automatically focus the first focusable element when opened.
39
- * When disabled, prevents unwanted tooltip triggers on dialog open.
39
+ * Controls whether the dialog should automatically focus the first focusable
40
+ * element when opened. When disabled, prevents unwanted tooltip triggers on
41
+ * dialog open.
40
42
  */
41
43
  this.autofocus = false;
42
- /**
43
- * Handles the close button click.
44
- */
45
- this.handleCloseButton = () => {
46
- this.close();
47
- };
48
- /**
49
- * Handles the cancel button click.
50
- */
51
- this.handleCancelButton = () => {
52
- this.close();
53
- };
54
44
  /**
55
45
  * Checks for and sets up form ID if a form is present
56
46
  */
@@ -79,7 +69,6 @@ export class NvDialog {
79
69
  };
80
70
  this.triggerClickEvents = [
81
71
  ['click', this.show],
82
- ['touchstart', this.show],
83
72
  [
84
73
  'keydown',
85
74
  (e) => {
@@ -100,9 +89,10 @@ export class NvDialog {
100
89
  async show() {
101
90
  this.open = true;
102
91
  this.preventScroll();
103
- // It is recommended to use the .show() or .showModal() method to render dialogs, rather than the open attribute. If a <dialog> is opened using the open attribute, it is non-modal.
92
+ /** It is recommended to use the .show() or .showModal() method to render
93
+ * dialogs, rather than the open attribute. If a <dialog> is opened using
94
+ * the open attribute, it is non-modal. */
104
95
  this.dialogElement.showModal();
105
- this.openChanged.emit(this.open);
106
96
  }
107
97
  /**
108
98
  * Call this method to hide the dialog, making it disappear from view.
@@ -111,7 +101,6 @@ export class NvDialog {
111
101
  this.open = false;
112
102
  this.allowScroll();
113
103
  this.dialogElement.close();
114
- this.openChanged.emit(this.open);
115
104
  }
116
105
  /**
117
106
  * Sets the autofocus on the first focusable element in the dialog.
@@ -175,10 +164,15 @@ export class NvDialog {
175
164
  * @param {KeyboardEvent} event - The keydown event.
176
165
  */
177
166
  handleKeyDown(event) {
178
- if (event.key === 'Escape' && this.undismissable) {
167
+ if (event.key !== 'Escape')
168
+ return;
169
+ if (this.undismissable) {
179
170
  event.preventDefault();
180
171
  event.stopPropagation();
181
172
  }
173
+ else {
174
+ this.close();
175
+ }
182
176
  }
183
177
  /**
184
178
  * Handles the click event to close the dialog when clickOutside is true.
@@ -189,24 +183,17 @@ export class NvDialog {
189
183
  return;
190
184
  this.handleClickOutside(event);
191
185
  }
192
- /**
193
- * Handles the touchstart event to close the dialog when clickOutside is true.
194
- * @param {TouchEvent} event - The touchstart event.
195
- */
196
- handleDocumentTouch(event) {
197
- if (!this.clickOutside || this.undismissable)
198
- return;
199
- this.handleClickOutside(event);
200
- }
201
186
  //#endregion EVENTS
202
187
  /****************************************************************************/
203
188
  //#region WATCHERS
204
- async handleDialogOpenChange(open) {
205
- if (open) {
189
+ async handleDialogOpenChange(isOpen) {
190
+ if (isOpen) {
206
191
  this.show();
192
+ this.openChanged.emit(isOpen);
207
193
  }
208
194
  else {
209
195
  this.close();
196
+ this.openChanged.emit(isOpen);
210
197
  }
211
198
  }
212
199
  //#endregion WATCHERS
@@ -259,7 +246,7 @@ export class NvDialog {
259
246
  //#region RENDER
260
247
  render() {
261
248
  const hasForm = this.form || this.el.querySelector('form');
262
- return (h(Host, { key: '8e4a46dd7749656670d5b8eb167aae2108644375' }, h("slot", { key: '954980e2b451c9f5c0e4f09df76c62c1f04ab01e', name: "trigger" }), h("dialog", { key: '8541ad521ae348d26764756e45c668f7aab5c278', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsx({ full: this.full }) }, h("div", { key: 'cd07e78da6f5cb3abd14640b941629bff034ec63', class: "content" }, !this.undismissable && (h("nv-button", { key: '5b610a9d30acd450a273e9dc10a4a29bdf85d58c', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleCloseButton, "aria-label": "Close dialog" }, h("nv-icon", { key: '4e5841c525221c6c23c699deaeefa7492f57e091', name: "x", size: "sm" }))), this.headerElement ? (h("slot", { name: "header" })) : (h("nv-dialogheader", { id: "dialog-header" })), h("div", { key: 'f09fd0f7013b1c2c912ed7958a8a9cab0016858b', class: "content-body", id: "dialog-content" }, h("slot", { key: 'c3c196c3e8f40acbb29f3fa89d1620e7beaad10c' })), this.footerElement ? (h("slot", { name: "footer" })) : (h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? ButtonType.Submit : ButtonType.Button, onDialogCanceled: this.handleCancelButton, undismissable: this.undismissable }))))));
249
+ return (h(Host, { key: '7ee864d4f6df5a503bff43353a7b32f29fdb285e' }, h("slot", { key: 'dc13563074a0339bbd488baf00a74428d6ef4812', name: "trigger" }), h("dialog", { key: 'c5781d389cf728469ece1cef977a8370101cf85a', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsx({ full: this.full }) }, h("div", { key: 'bd5b0f19c639a5f9e5767b1a95b9b07870f18df2', class: "content" }, !this.undismissable && (h("nv-button", { key: '5163f2027391b0207f4128290f6755f302d90070', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDialogClose, "aria-label": "Close dialog" }, h("nv-icon", { key: '646d222572ec015bcaf0a957937420f3ca4fb917', name: "x", size: "sm" }))), this.headerElement ? (h("slot", { name: "header" })) : (h("nv-dialogheader", { id: "dialog-header" })), h("div", { key: 'bde55c33725d002ac934b63c079c34024248be52', class: "content-body", id: "dialog-content" }, h("slot", { key: '1ff4c4e01282d08d1a99d274483c55e398d14ffd' })), this.footerElement ? (h("slot", { name: "footer" })) : (h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? ButtonType.Submit : ButtonType.Button, onDialogCanceled: this.handleDialogClose, undismissable: this.undismissable }))))));
263
250
  }
264
251
  static get is() { return "nv-dialog"; }
265
252
  static get originalStyleUrls() {
@@ -424,7 +411,7 @@ export class NvDialog {
424
411
  "optional": false,
425
412
  "docs": {
426
413
  "tags": [],
427
- "text": "If true, the dialog visibility is managed manually through methods or the open prop."
414
+ "text": "If true, the dialog visibility is managed manually through methods or the\nopen prop."
428
415
  },
429
416
  "getter": false,
430
417
  "setter": false,
@@ -464,7 +451,7 @@ export class NvDialog {
464
451
  "optional": false,
465
452
  "docs": {
466
453
  "tags": [],
467
- "text": "Controls whether the dialog should automatically focus the first focusable element when opened.\nWhen disabled, prevents unwanted tooltip triggers on dialog open."
454
+ "text": "Controls whether the dialog should automatically focus the first focusable\nelement when opened. When disabled, prevents unwanted tooltip triggers on\ndialog open."
468
455
  },
469
456
  "getter": false,
470
457
  "setter": false,
@@ -553,12 +540,6 @@ export class NvDialog {
553
540
  "target": "document",
554
541
  "capture": false,
555
542
  "passive": false
556
- }, {
557
- "name": "touchstart",
558
- "method": "handleDocumentTouch",
559
- "target": "document",
560
- "capture": false,
561
- "passive": true
562
543
  }];
563
544
  }
564
545
  }