@nova-design-system/nova-webcomponents 3.0.0-beta.41 → 3.0.0-beta.43

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 (524) hide show
  1. package/dist/cjs/_commonjsHelpers-b3309d7b.js +12 -0
  2. package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
  3. package/dist/cjs/{constants-79d2cdfc.js → constants-bcd6b2e2.js} +100 -2
  4. package/dist/cjs/constants-bcd6b2e2.js.map +1 -0
  5. package/dist/cjs/{index-5910ba06.js → index-9bda5507.js} +1364 -1182
  6. package/dist/cjs/index-9bda5507.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +1 -1
  8. package/dist/cjs/inputmask-76b7b93f.js +3763 -0
  9. package/dist/cjs/inputmask-76b7b93f.js.map +1 -0
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/native.cjs.js +3 -3
  12. package/dist/cjs/native.cjs.js.map +1 -1
  13. package/dist/cjs/nv-alert.cjs.entry.js +3 -3
  14. package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
  15. package/dist/cjs/nv-avatar.cjs.entry.js +3 -3
  16. package/dist/cjs/nv-avatar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/nv-badge_2.cjs.entry.js +16 -5
  18. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
  19. package/dist/cjs/nv-base.cjs.entry.js +2 -2
  20. package/dist/cjs/nv-breadcrumb.cjs.entry.js +2 -2
  21. package/dist/cjs/nv-breadcrumbs.cjs.entry.js +2 -2
  22. package/dist/cjs/nv-button.cjs.entry.js +3 -3
  23. package/dist/cjs/nv-calendar.cjs.entry.js +77 -22
  24. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  25. package/dist/cjs/nv-col.cjs.entry.js +2 -2
  26. package/dist/cjs/nv-datagrid.cjs.entry.js +267 -5
  27. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  28. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +2 -2
  29. package/dist/cjs/nv-dialog.cjs.entry.js +15 -10
  30. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  31. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +4 -4
  32. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +6 -6
  33. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
  34. package/dist/cjs/nv-fielddate.cjs.entry.js +281 -0
  35. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -0
  36. package/dist/cjs/nv-fielddaterange.cjs.entry.js +358 -0
  37. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -0
  38. package/dist/cjs/nv-fielddropdown.cjs.entry.js +13 -24
  39. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  40. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -2
  41. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +22 -30
  42. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  43. package/dist/cjs/nv-fieldnumber.cjs.entry.js +9 -6
  44. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  45. package/dist/cjs/nv-fieldpassword.cjs.entry.js +5 -13
  46. package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
  47. package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
  48. package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
  49. package/dist/cjs/nv-fieldselect.cjs.entry.js +7 -7
  50. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  51. package/dist/cjs/nv-fieldtext.cjs.entry.js +5 -5
  52. package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
  53. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +4 -4
  54. package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
  55. package/dist/cjs/nv-fieldtime.cjs.entry.js +12 -12
  56. package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
  57. package/dist/cjs/nv-icon.cjs.entry.js +4 -4
  58. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  59. package/dist/cjs/{nv-iconbutton.cjs.entry.js → nv-iconbutton_2.cjs.entry.js} +44 -3
  60. package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -0
  61. package/dist/cjs/nv-menu.cjs.entry.js +5 -5
  62. package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
  63. package/dist/cjs/nv-menuitem.cjs.entry.js +5 -5
  64. package/dist/cjs/nv-menuitem.cjs.entry.js.map +1 -1
  65. package/dist/cjs/nv-popover.cjs.entry.js +31 -18
  66. package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
  67. package/dist/cjs/nv-row.cjs.entry.js +2 -2
  68. package/dist/cjs/nv-stack.cjs.entry.js +2 -2
  69. package/dist/cjs/nv-table.cjs.entry.js +3 -3
  70. package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
  71. package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
  72. package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
  73. package/dist/cjs/nv-tooltip.cjs.entry.js +3 -3
  74. package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
  75. package/dist/collection/collection-manifest.json +4 -2
  76. package/dist/collection/components/nv-alert/nv-alert.js +2 -2
  77. package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
  78. package/dist/collection/components/nv-avatar/nv-avatar.js +8 -8
  79. package/dist/collection/components/nv-avatar/nv-avatar.js.map +1 -1
  80. package/dist/collection/components/nv-badge/nv-badge.js +4 -4
  81. package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
  82. package/dist/collection/components/nv-base/nv-base.js +1 -1
  83. package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
  84. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
  85. package/dist/collection/components/nv-button/nv-button.js +1 -1
  86. package/dist/collection/components/nv-calendar/nv-calendar.css +13 -8
  87. package/dist/collection/components/nv-calendar/nv-calendar.js +82 -24
  88. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  89. package/dist/collection/components/nv-col/nv-col.js +1 -1
  90. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +24 -0
  91. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
  92. package/dist/collection/components/nv-datagrid/nv-datagrid.js +89 -6
  93. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  94. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
  95. package/dist/collection/components/nv-dialog/nv-dialog.js +13 -8
  96. package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
  97. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
  98. package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
  99. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +56 -40
  100. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +7 -7
  101. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -1
  102. package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js +335 -0
  103. package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js.map +1 -0
  104. package/dist/collection/components/nv-fielddate/nv-fielddate.js +845 -0
  105. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -0
  106. package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +165 -0
  107. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js +284 -0
  108. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js.map +1 -0
  109. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +988 -0
  110. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -0
  111. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +192 -0
  112. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +11 -22
  113. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  114. package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +14 -16
  115. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
  116. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +1 -0
  117. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +12 -1
  118. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -1
  119. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +22 -24
  120. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +1 -4
  121. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
  122. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +19 -48
  123. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  124. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +17 -21
  125. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +1 -1
  126. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
  127. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +9 -6
  128. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
  129. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +9 -10
  130. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +1 -1
  131. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
  132. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -11
  133. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
  134. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +5 -5
  135. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js.map +1 -1
  136. package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +30 -15
  137. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +8 -8
  138. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
  139. package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +15 -16
  140. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +1 -1
  141. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
  142. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +6 -6
  143. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
  144. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +5 -5
  145. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
  146. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +11 -11
  147. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
  148. package/dist/collection/components/nv-fieldtime/{nv-fieldtime.css → styles/nv-fieldtime.css} +20 -32
  149. package/dist/collection/components/nv-icon/nv-icon.js +8 -8
  150. package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
  151. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +31 -1
  152. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js.map +1 -1
  153. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  154. package/dist/collection/components/nv-menu/nv-menu.css +3 -0
  155. package/dist/collection/components/nv-menu/nv-menu.docs.js +6 -6
  156. package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
  157. package/dist/collection/components/nv-menu/nv-menu.js +11 -12
  158. package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
  159. package/dist/collection/components/nv-menuitem/nv-menuitem.css +3 -0
  160. package/dist/collection/components/nv-menuitem/nv-menuitem.js +27 -9
  161. package/dist/collection/components/nv-menuitem/nv-menuitem.js.map +1 -1
  162. package/dist/collection/components/nv-popover/nv-popover.css +5 -5
  163. package/dist/collection/components/nv-popover/nv-popover.docs.js +3 -3
  164. package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -1
  165. package/dist/collection/components/nv-popover/nv-popover.js +38 -37
  166. package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
  167. package/dist/collection/components/nv-row/nv-row.js +1 -1
  168. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  169. package/dist/collection/components/nv-table/nv-table.js +2 -2
  170. package/dist/collection/components/nv-toggle/nv-toggle.js +9 -9
  171. package/dist/collection/components/nv-toggle/nv-toggle.js.map +1 -1
  172. package/dist/collection/components/nv-tooltip/nv-tooltip.css +1 -1
  173. package/dist/collection/components/nv-tooltip/nv-tooltip.js +4 -4
  174. package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -1
  175. package/dist/collection/utils/constants.js +94 -0
  176. package/dist/collection/utils/constants.js.map +1 -1
  177. package/dist/collection/utils/input.utils.js +20 -0
  178. package/dist/collection/utils/input.utils.js.map +1 -0
  179. package/dist/collection/utils/test/input.utils.test.js +42 -0
  180. package/dist/collection/utils/test/input.utils.test.js.map +1 -0
  181. package/dist/components/index.js +2 -2
  182. package/dist/components/nv-alert.js +5 -5
  183. package/dist/components/nv-alert.js.map +1 -1
  184. package/dist/components/nv-avatar.js +11 -11
  185. package/dist/components/nv-avatar.js.map +1 -1
  186. package/dist/components/nv-badge.js +1 -1
  187. package/dist/components/nv-base.js +2 -2
  188. package/dist/components/nv-breadcrumb.js +4 -4
  189. package/dist/components/nv-breadcrumbs.js +2 -2
  190. package/dist/components/nv-button.js +1 -1
  191. package/dist/components/nv-calendar.js +1 -1039
  192. package/dist/components/nv-calendar.js.map +1 -1
  193. package/dist/components/nv-col.js +2 -2
  194. package/dist/components/nv-datagrid.js +272 -7
  195. package/dist/components/nv-datagrid.js.map +1 -1
  196. package/dist/components/nv-datagridcolumn.js +2 -2
  197. package/dist/components/nv-dialog.js +20 -15
  198. package/dist/components/nv-dialog.js.map +1 -1
  199. package/dist/components/nv-dialogfooter.js +1 -1
  200. package/dist/components/nv-dialogheader.js +1 -1
  201. package/dist/components/nv-fieldcheckbox.js +1 -1
  202. package/dist/components/nv-fielddate.d.ts +11 -0
  203. package/dist/components/nv-fielddate.js +359 -0
  204. package/dist/components/nv-fielddate.js.map +1 -0
  205. package/dist/components/nv-fielddaterange.d.ts +11 -0
  206. package/dist/components/nv-fielddaterange.js +440 -0
  207. package/dist/components/nv-fielddaterange.js.map +1 -0
  208. package/dist/components/nv-fielddropdown.js +18 -29
  209. package/dist/components/nv-fielddropdown.js.map +1 -1
  210. package/dist/components/nv-fielddropdownitem.js +1 -1
  211. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  212. package/dist/components/nv-fieldmultiselect.js +30 -40
  213. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  214. package/dist/components/nv-fieldnumber.js +25 -10
  215. package/dist/components/nv-fieldnumber.js.map +1 -1
  216. package/dist/components/nv-fieldpassword.js +8 -16
  217. package/dist/components/nv-fieldpassword.js.map +1 -1
  218. package/dist/components/nv-fieldradio.js +6 -6
  219. package/dist/components/nv-fieldradio.js.map +1 -1
  220. package/dist/components/nv-fieldselect.js +24 -12
  221. package/dist/components/nv-fieldselect.js.map +1 -1
  222. package/dist/components/nv-fieldtext.js +9 -9
  223. package/dist/components/nv-fieldtext.js.map +1 -1
  224. package/dist/components/nv-fieldtextarea.js +6 -6
  225. package/dist/components/nv-fieldtextarea.js.map +1 -1
  226. package/dist/components/nv-fieldtime.js +16 -16
  227. package/dist/components/nv-fieldtime.js.map +1 -1
  228. package/dist/components/nv-icon.js +1 -1
  229. package/dist/components/nv-iconbutton.js +1 -1
  230. package/dist/components/nv-loader.js +1 -1
  231. package/dist/components/nv-menu.js +12 -12
  232. package/dist/components/nv-menu.js.map +1 -1
  233. package/dist/components/nv-menuitem.js +1 -1
  234. package/dist/components/nv-popover.js +1 -1
  235. package/dist/components/nv-row.js +2 -2
  236. package/dist/components/nv-stack.js +2 -2
  237. package/dist/components/nv-table.js +3 -3
  238. package/dist/components/nv-tablecolumn.js +1 -1
  239. package/dist/components/nv-toggle.js +10 -10
  240. package/dist/components/nv-toggle.js.map +1 -1
  241. package/dist/components/nv-tooltip.js +1 -1
  242. package/dist/components/{p-d17558a8.js → p-057ae4f2.js} +41 -1201
  243. package/dist/components/p-057ae4f2.js.map +1 -0
  244. package/dist/components/{p-ba145f46.js → p-1a4f9c97.js} +5 -5
  245. package/dist/components/{p-ba145f46.js.map → p-1a4f9c97.js.map} +1 -1
  246. package/dist/components/{p-77d0fedc.js → p-1c45c0f2.js} +1283 -1208
  247. package/dist/components/p-1c45c0f2.js.map +1 -0
  248. package/dist/components/{p-11cc38e0.js → p-1e095bba.js} +21 -6
  249. package/dist/components/p-1e095bba.js.map +1 -0
  250. package/dist/components/{p-4bb5eb79.js → p-1fad2529.js} +16 -5
  251. package/dist/components/p-1fad2529.js.map +1 -0
  252. package/dist/components/{p-f201db34.js → p-3a3ba5b1.js} +3 -3
  253. package/dist/components/{p-f201db34.js.map → p-3a3ba5b1.js.map} +1 -1
  254. package/dist/components/p-3aa6f6dc.js +1104 -0
  255. package/dist/components/p-3aa6f6dc.js.map +1 -0
  256. package/dist/components/{p-69543282.js → p-4c6ba63c.js} +8 -7
  257. package/dist/components/p-4c6ba63c.js.map +1 -0
  258. package/dist/components/{p-a633892a.js → p-4c6d8df7.js} +3 -3
  259. package/dist/components/{p-a633892a.js.map → p-4c6d8df7.js.map} +1 -1
  260. package/dist/components/p-55202370.js +172 -0
  261. package/dist/components/p-55202370.js.map +1 -0
  262. package/dist/components/{p-1657eba4.js → p-56716b97.js} +7 -7
  263. package/dist/components/{p-1657eba4.js.map → p-56716b97.js.map} +1 -1
  264. package/dist/components/{p-33f9bdb1.js → p-7f142767.js} +7 -7
  265. package/dist/components/{p-33f9bdb1.js.map → p-7f142767.js.map} +1 -1
  266. package/dist/components/{p-b316c35d.js → p-8348db09.js} +99 -3
  267. package/dist/components/p-8348db09.js.map +1 -0
  268. package/dist/components/p-89fb308b.js +3761 -0
  269. package/dist/components/p-89fb308b.js.map +1 -0
  270. package/dist/components/{p-4b184820.js → p-9476354d.js} +4 -4
  271. package/dist/components/{p-4b184820.js.map → p-9476354d.js.map} +1 -1
  272. package/dist/components/{p-fad78896.js → p-a8b5969f.js} +8 -8
  273. package/dist/components/p-a8b5969f.js.map +1 -0
  274. package/dist/components/{p-f77c3072.js → p-ebf24fd0.js} +11 -11
  275. package/dist/components/p-ebf24fd0.js.map +1 -0
  276. package/dist/docs.json +1822 -151
  277. package/dist/esm/_commonjsHelpers-1789f0cf.js +9 -0
  278. package/dist/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
  279. package/dist/esm/{constants-75e6d7f0.js → constants-98e2dcc2.js} +99 -3
  280. package/dist/esm/constants-98e2dcc2.js.map +1 -0
  281. package/dist/esm/{index-fac2d5d2.js → index-1fb7a9a6.js} +1364 -1182
  282. package/dist/esm/index-1fb7a9a6.js.map +1 -0
  283. package/dist/esm/index.js +1 -1
  284. package/dist/esm/inputmask-edcad3c1.js +3761 -0
  285. package/dist/esm/inputmask-edcad3c1.js.map +1 -0
  286. package/dist/esm/loader.js +3 -3
  287. package/dist/esm/native.js +4 -4
  288. package/dist/esm/native.js.map +1 -1
  289. package/dist/esm/nv-alert.entry.js +3 -3
  290. package/dist/esm/nv-alert.entry.js.map +1 -1
  291. package/dist/esm/nv-avatar.entry.js +3 -3
  292. package/dist/esm/nv-avatar.entry.js.map +1 -1
  293. package/dist/esm/nv-badge_2.entry.js +16 -5
  294. package/dist/esm/nv-badge_2.entry.js.map +1 -1
  295. package/dist/esm/nv-base.entry.js +2 -2
  296. package/dist/esm/nv-breadcrumb.entry.js +2 -2
  297. package/dist/esm/nv-breadcrumbs.entry.js +2 -2
  298. package/dist/esm/nv-button.entry.js +3 -3
  299. package/dist/esm/nv-calendar.entry.js +73 -18
  300. package/dist/esm/nv-calendar.entry.js.map +1 -1
  301. package/dist/esm/nv-col.entry.js +2 -2
  302. package/dist/esm/nv-datagrid.entry.js +267 -5
  303. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  304. package/dist/esm/nv-datagridcolumn.entry.js +2 -2
  305. package/dist/esm/nv-dialog.entry.js +15 -10
  306. package/dist/esm/nv-dialog.entry.js.map +1 -1
  307. package/dist/esm/nv-dialogfooter_2.entry.js +4 -4
  308. package/dist/esm/nv-fieldcheckbox.entry.js +6 -6
  309. package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
  310. package/dist/esm/nv-fielddate.entry.js +277 -0
  311. package/dist/esm/nv-fielddate.entry.js.map +1 -0
  312. package/dist/esm/nv-fielddaterange.entry.js +354 -0
  313. package/dist/esm/nv-fielddaterange.entry.js.map +1 -0
  314. package/dist/esm/nv-fielddropdown.entry.js +13 -24
  315. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  316. package/dist/esm/nv-fielddropdownitem.entry.js +2 -2
  317. package/dist/esm/nv-fieldmultiselect.entry.js +22 -30
  318. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  319. package/dist/esm/nv-fieldnumber.entry.js +9 -6
  320. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  321. package/dist/esm/nv-fieldpassword.entry.js +5 -13
  322. package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
  323. package/dist/esm/nv-fieldradio.entry.js +4 -4
  324. package/dist/esm/nv-fieldradio.entry.js.map +1 -1
  325. package/dist/esm/nv-fieldselect.entry.js +7 -7
  326. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  327. package/dist/esm/nv-fieldtext.entry.js +5 -5
  328. package/dist/esm/nv-fieldtext.entry.js.map +1 -1
  329. package/dist/esm/nv-fieldtextarea.entry.js +4 -4
  330. package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
  331. package/dist/esm/nv-fieldtime.entry.js +12 -12
  332. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  333. package/dist/esm/nv-icon.entry.js +4 -4
  334. package/dist/esm/nv-icon.entry.js.map +1 -1
  335. package/dist/esm/{nv-iconbutton.entry.js → nv-iconbutton_2.entry.js} +44 -4
  336. package/dist/esm/nv-iconbutton_2.entry.js.map +1 -0
  337. package/dist/esm/nv-menu.entry.js +5 -5
  338. package/dist/esm/nv-menu.entry.js.map +1 -1
  339. package/dist/esm/nv-menuitem.entry.js +5 -5
  340. package/dist/esm/nv-menuitem.entry.js.map +1 -1
  341. package/dist/esm/nv-popover.entry.js +31 -18
  342. package/dist/esm/nv-popover.entry.js.map +1 -1
  343. package/dist/esm/nv-row.entry.js +2 -2
  344. package/dist/esm/nv-stack.entry.js +2 -2
  345. package/dist/esm/nv-table.entry.js +3 -3
  346. package/dist/esm/nv-tablecolumn.entry.js +1 -1
  347. package/dist/esm/nv-toggle.entry.js +3 -3
  348. package/dist/esm/nv-toggle.entry.js.map +1 -1
  349. package/dist/esm/nv-tooltip.entry.js +3 -3
  350. package/dist/esm/nv-tooltip.entry.js.map +1 -1
  351. package/dist/native/index.esm.js +1 -1
  352. package/dist/native/native.esm.js +1 -1
  353. package/dist/native/native.esm.js.map +1 -1
  354. package/dist/native/p-0462f723.js +2 -0
  355. package/dist/native/p-0462f723.js.map +1 -0
  356. package/dist/native/{p-8664ab16.entry.js → p-048486e0.entry.js} +3 -3
  357. package/dist/native/p-048486e0.entry.js.map +1 -0
  358. package/dist/native/{p-fca807b4.entry.js → p-04c6048a.entry.js} +3 -3
  359. package/dist/native/{p-fca807b4.entry.js.map → p-04c6048a.entry.js.map} +1 -1
  360. package/dist/native/p-1a46cb52.entry.js +2 -0
  361. package/dist/native/p-2281d5ef.entry.js +2 -0
  362. package/dist/native/p-2281d5ef.entry.js.map +1 -0
  363. package/dist/native/p-22a45102.entry.js +2 -0
  364. package/dist/native/p-22a45102.entry.js.map +1 -0
  365. package/dist/native/p-2ed540e3.entry.js +2 -0
  366. package/dist/native/p-2ed540e3.entry.js.map +1 -0
  367. package/dist/native/p-31184fdd.entry.js +2 -0
  368. package/dist/native/p-31184fdd.entry.js.map +1 -0
  369. package/dist/native/p-314d2b34.entry.js +2 -0
  370. package/dist/native/p-314d2b34.entry.js.map +1 -0
  371. package/dist/native/p-332c5d6c.entry.js +2 -0
  372. package/dist/native/p-332c5d6c.entry.js.map +1 -0
  373. package/dist/native/p-3af5bcc1.entry.js +2 -0
  374. package/dist/native/p-3af5bcc1.entry.js.map +1 -0
  375. package/dist/native/{p-e36e956b.entry.js → p-442f04f9.entry.js} +2 -2
  376. package/dist/native/{p-af60740c.entry.js → p-45577c7f.entry.js} +2 -2
  377. package/dist/native/p-45577c7f.entry.js.map +1 -0
  378. package/dist/native/p-464ef88f.entry.js +2 -0
  379. package/dist/native/p-464ef88f.entry.js.map +1 -0
  380. package/dist/native/p-46aa1136.entry.js +2 -0
  381. package/dist/native/{p-27ad7af2.entry.js → p-4a440970.entry.js} +2 -2
  382. package/dist/native/p-4a440970.entry.js.map +1 -0
  383. package/dist/native/p-4dc1d036.entry.js +2 -0
  384. package/dist/native/{p-e9e77494.entry.js → p-514101d6.entry.js} +2 -2
  385. package/dist/native/p-514101d6.entry.js.map +1 -0
  386. package/dist/native/p-53aa81dd.js +10 -0
  387. package/dist/native/p-53aa81dd.js.map +1 -0
  388. package/dist/native/{p-1a3d2a74.entry.js → p-56e98443.entry.js} +2 -2
  389. package/dist/native/p-56e98443.entry.js.map +1 -0
  390. package/dist/native/{p-b316c35d.js → p-59768ee5.js} +2 -2
  391. package/dist/native/p-59768ee5.js.map +1 -0
  392. package/dist/native/{p-edee1c1f.entry.js → p-62df7dd4.entry.js} +2 -2
  393. package/dist/native/p-665db087.entry.js +2 -0
  394. package/dist/native/p-68b5a92c.entry.js +2 -0
  395. package/dist/native/{p-b58c661b.entry.js → p-6a629671.entry.js} +2 -2
  396. package/dist/native/p-7fade532.entry.js +2 -0
  397. package/dist/native/p-7fade532.entry.js.map +1 -0
  398. package/dist/native/p-913907fb.entry.js +2 -0
  399. package/dist/native/p-913907fb.entry.js.map +1 -0
  400. package/dist/native/p-942f8e92.entry.js +2 -0
  401. package/dist/native/p-942f8e92.entry.js.map +1 -0
  402. package/dist/native/p-9f5e4dfc.entry.js +2 -0
  403. package/dist/native/p-9f5e4dfc.entry.js.map +1 -0
  404. package/dist/native/p-ab002252.js +3 -0
  405. package/dist/native/p-ab002252.js.map +1 -0
  406. package/dist/native/{p-fde56f9c.entry.js → p-ab84ff42.entry.js} +2 -2
  407. package/dist/native/{p-fde56f9c.entry.js.map → p-ab84ff42.entry.js.map} +1 -1
  408. package/dist/native/{p-487b81bd.entry.js → p-b052f1cb.entry.js} +2 -2
  409. package/dist/native/{p-9795090f.entry.js → p-bdabd495.entry.js} +2 -2
  410. package/dist/native/p-bdabd495.entry.js.map +1 -0
  411. package/dist/native/p-be4fc827.entry.js +2 -0
  412. package/dist/native/p-be4fc827.entry.js.map +1 -0
  413. package/dist/native/{p-184cd119.entry.js → p-c10e5113.entry.js} +2 -2
  414. package/dist/native/{p-491f4605.entry.js → p-d5cbf5c8.entry.js} +2 -2
  415. package/dist/native/{p-491f4605.entry.js.map → p-d5cbf5c8.entry.js.map} +1 -1
  416. package/dist/native/{p-69fb1c9d.entry.js → p-db2902d6.entry.js} +2 -2
  417. package/dist/native/p-ecc28398.entry.js +2 -0
  418. package/dist/native/p-ecc28398.entry.js.map +1 -0
  419. package/dist/native/p-ed595c96.entry.js +2 -0
  420. package/dist/native/p-ed595c96.entry.js.map +1 -0
  421. package/dist/native/p-f5e0d5c5.entry.js +2 -0
  422. package/dist/native/p-f5e0d5c5.entry.js.map +1 -0
  423. package/dist/native/p-f89b7d06.entry.js +2 -0
  424. package/dist/types/components/nv-calendar/nv-calendar.d.ts +7 -0
  425. package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +21 -0
  426. package/dist/types/components/nv-dialog/nv-dialog.d.ts +1 -0
  427. package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +192 -0
  428. package/dist/types/components/nv-fielddate/nv-fielddate.docs.d.ts +4 -0
  429. package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +206 -0
  430. package/dist/types/components/nv-fielddaterange/nv-fielddaterange.docs.d.ts +4 -0
  431. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +1 -3
  432. package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +2 -0
  433. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +1 -11
  434. package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +1 -0
  435. package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +0 -1
  436. package/dist/types/components/nv-iconbutton/nv-iconbutton.d.ts +3 -0
  437. package/dist/types/components/nv-menu/nv-menu.d.ts +2 -3
  438. package/dist/types/components/nv-menuitem/nv-menuitem.d.ts +20 -16
  439. package/dist/types/components/nv-popover/nv-popover.d.ts +7 -4
  440. package/dist/types/components.d.ts +2344 -974
  441. package/dist/types/utils/constants.d.ts +6 -0
  442. package/dist/types/utils/input.utils.d.ts +8 -0
  443. package/dist/types/utils/test/input.utils.test.d.ts +1 -0
  444. package/hydrate/index.d.ts +22 -5
  445. package/hydrate/index.js +6403 -1242
  446. package/hydrate/index.mjs +6403 -1242
  447. package/package.json +7 -3
  448. package/dist/cjs/constants-79d2cdfc.js.map +0 -1
  449. package/dist/cjs/index-5910ba06.js.map +0 -1
  450. package/dist/cjs/nv-iconbutton.cjs.entry.js.map +0 -1
  451. package/dist/cjs/nv-loader.cjs.entry.js +0 -35
  452. package/dist/cjs/nv-loader.cjs.entry.js.map +0 -1
  453. package/dist/components/p-11cc38e0.js.map +0 -1
  454. package/dist/components/p-4bb5eb79.js.map +0 -1
  455. package/dist/components/p-69543282.js.map +0 -1
  456. package/dist/components/p-77d0fedc.js.map +0 -1
  457. package/dist/components/p-96605453.js +0 -172
  458. package/dist/components/p-96605453.js.map +0 -1
  459. package/dist/components/p-b316c35d.js.map +0 -1
  460. package/dist/components/p-d17558a8.js.map +0 -1
  461. package/dist/components/p-f77c3072.js.map +0 -1
  462. package/dist/components/p-fad78896.js.map +0 -1
  463. package/dist/esm/constants-75e6d7f0.js.map +0 -1
  464. package/dist/esm/index-fac2d5d2.js.map +0 -1
  465. package/dist/esm/nv-iconbutton.entry.js.map +0 -1
  466. package/dist/esm/nv-loader.entry.js +0 -31
  467. package/dist/esm/nv-loader.entry.js.map +0 -1
  468. package/dist/native/p-0a2a9f8b.entry.js +0 -2
  469. package/dist/native/p-0a2a9f8b.entry.js.map +0 -1
  470. package/dist/native/p-12d08abc.entry.js +0 -2
  471. package/dist/native/p-12d08abc.entry.js.map +0 -1
  472. package/dist/native/p-15be3d96.entry.js +0 -2
  473. package/dist/native/p-15be3d96.entry.js.map +0 -1
  474. package/dist/native/p-1a3d2a74.entry.js.map +0 -1
  475. package/dist/native/p-27ad7af2.entry.js.map +0 -1
  476. package/dist/native/p-2b2a10f9.entry.js +0 -2
  477. package/dist/native/p-2b2a10f9.entry.js.map +0 -1
  478. package/dist/native/p-359f0f53.entry.js +0 -2
  479. package/dist/native/p-359f0f53.entry.js.map +0 -1
  480. package/dist/native/p-3b65037c.entry.js +0 -2
  481. package/dist/native/p-3be2c9a1.entry.js +0 -2
  482. package/dist/native/p-4283f375.entry.js +0 -2
  483. package/dist/native/p-5439afb8.js +0 -3
  484. package/dist/native/p-5439afb8.js.map +0 -1
  485. package/dist/native/p-554f7b44.entry.js +0 -2
  486. package/dist/native/p-554f7b44.entry.js.map +0 -1
  487. package/dist/native/p-729c9d45.entry.js +0 -2
  488. package/dist/native/p-729c9d45.entry.js.map +0 -1
  489. package/dist/native/p-78f08578.entry.js +0 -2
  490. package/dist/native/p-78f08578.entry.js.map +0 -1
  491. package/dist/native/p-8664ab16.entry.js.map +0 -1
  492. package/dist/native/p-87bd53df.entry.js +0 -2
  493. package/dist/native/p-87bd53df.entry.js.map +0 -1
  494. package/dist/native/p-8d6516a3.entry.js +0 -2
  495. package/dist/native/p-8d6516a3.entry.js.map +0 -1
  496. package/dist/native/p-951baf95.entry.js +0 -2
  497. package/dist/native/p-9795090f.entry.js.map +0 -1
  498. package/dist/native/p-af60740c.entry.js.map +0 -1
  499. package/dist/native/p-b316c35d.js.map +0 -1
  500. package/dist/native/p-b7bc918b.entry.js +0 -2
  501. package/dist/native/p-cda56476.entry.js +0 -2
  502. package/dist/native/p-cda56476.entry.js.map +0 -1
  503. package/dist/native/p-d1bf4d77.entry.js +0 -2
  504. package/dist/native/p-d7665a07.entry.js +0 -2
  505. package/dist/native/p-d7665a07.entry.js.map +0 -1
  506. package/dist/native/p-daeb7e22.entry.js +0 -2
  507. package/dist/native/p-daeb7e22.entry.js.map +0 -1
  508. package/dist/native/p-e9e77494.entry.js.map +0 -1
  509. package/dist/native/p-f1585fc2.entry.js +0 -2
  510. package/dist/native/p-f1585fc2.entry.js.map +0 -1
  511. package/dist/native/p-f3579407.entry.js +0 -2
  512. package/dist/native/p-f3579407.entry.js.map +0 -1
  513. /package/dist/native/{p-3be2c9a1.entry.js.map → p-1a46cb52.entry.js.map} +0 -0
  514. /package/dist/native/{p-e36e956b.entry.js.map → p-442f04f9.entry.js.map} +0 -0
  515. /package/dist/native/{p-d1bf4d77.entry.js.map → p-46aa1136.entry.js.map} +0 -0
  516. /package/dist/native/{p-4283f375.entry.js.map → p-4dc1d036.entry.js.map} +0 -0
  517. /package/dist/native/{p-edee1c1f.entry.js.map → p-62df7dd4.entry.js.map} +0 -0
  518. /package/dist/native/{p-951baf95.entry.js.map → p-665db087.entry.js.map} +0 -0
  519. /package/dist/native/{p-b7bc918b.entry.js.map → p-68b5a92c.entry.js.map} +0 -0
  520. /package/dist/native/{p-b58c661b.entry.js.map → p-6a629671.entry.js.map} +0 -0
  521. /package/dist/native/{p-487b81bd.entry.js.map → p-b052f1cb.entry.js.map} +0 -0
  522. /package/dist/native/{p-184cd119.entry.js.map → p-c10e5113.entry.js.map} +0 -0
  523. /package/dist/native/{p-69fb1c9d.entry.js.map → p-db2902d6.entry.js.map} +0 -0
  524. /package/dist/native/{p-3b65037c.entry.js.map → p-f89b7d06.entry.js.map} +0 -0
@@ -0,0 +1,1104 @@
1
+ import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-1c45c0f2.js';
2
+ import { C as CUSTOM_DAY_NAMES, b as CUSTOM_MONTH_NAMES, W as WEEK_ABBREVIATIONS } from './p-8348db09.js';
3
+ import { d as defineCustomElement$4 } from './p-1a4f9c97.js';
4
+ import { d as defineCustomElement$3 } from './p-ebf24fd0.js';
5
+ import { d as defineCustomElement$2 } from './p-1e095bba.js';
6
+ import { d as defineCustomElement$1 } from './p-3a3ba5b1.js';
7
+
8
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
+
10
+ function getDefaultExportFromCjs (x) {
11
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
12
+ }
13
+
14
+ var dayjs_min = {exports: {}};
15
+
16
+ (function (module, exports) {
17
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
18
+ }(dayjs_min));
19
+
20
+ const dayjs = dayjs_min.exports;
21
+
22
+ var customParseFormat$1 = {exports: {}};
23
+
24
+ (function (module, exports) {
25
+ !function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return (e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t;}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,!1);}],a:[o,function(e){this.afternoon=d(e,!0);}],Q:[n,function(e){this.month=3*(e-1)+1;}],S:[n,function(e){this.milliseconds=100*+e;}],SS:[r,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e);}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else {var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if("string"==typeof a){var f=!0===o[2],h=!0===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={};}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""));}else i.call(this,e);};}}));
26
+ }(customParseFormat$1));
27
+
28
+ const customParseFormat = customParseFormat$1.exports;
29
+
30
+ var utc$1 = {exports: {}};
31
+
32
+ (function (module, exports) {
33
+ !function(t,i){module.exports=i();}(commonjsGlobal,(function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t);};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds();}else r.call(this);};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(i);if(!s)return null;var f=(""+s[0]).match(e)||["-",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:"+"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r;}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return !!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return "s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)};}}));
34
+ }(utc$1));
35
+
36
+ const utc = utc$1.exports;
37
+
38
+ var weekOfYear$1 = {exports: {}};
39
+
40
+ (function (module, exports) {
41
+ !function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e="week",t="year";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),o=this.diff(a,e,!0);return o<0?r(this).startOf("week").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)};}}));
42
+ }(weekOfYear$1));
43
+
44
+ const weekOfYear = weekOfYear$1.exports;
45
+
46
+ const nvCalendarCss = "nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--color-level-00-background);border-radius:var(--menu-contextual-radius);padding:0.25rem;box-shadow:0 2px 6px 1px solid var(--components-button-medium-border);border:1px solid var(--components-button-medium-border);width:auto;max-width:100%}.datepicker-container-single{width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:0.5rem;width:auto;overflow-x:hidden}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:0.25rem;width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-button-medium-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:0.25rem;width:100%}.nav-buttons{display:flex;gap:0.15rem;margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:0.25rem;align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start !important}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:center !important}.calendar-grid{display:grid;grid-template-columns:auto 1fr;gap:0.25rem;position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:2rem repeat(6, 2rem);background:var(--color-level-30-background);border-radius:var(--menu-contextual-radius);width:2.5rem}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background:var(--components-button-high-background-hover);color:white;border-radius:var(--menu-contextual-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:0.875rem}.week-header{font-weight:600;color:var(--components-form-text-label-default)}.week-number{color:var(--components-form-text-description-default)}.days-container{display:grid;grid-template-rows:auto 1fr}.days-header{display:grid;grid-template-columns:repeat(7, 2rem);height:2rem}.day-header{display:grid;place-items:center;font-size:0.875rem;color:var(--components-form-text-description-default)}.days-grid{display:grid;grid-template-columns:repeat(7, 2rem);grid-template-rows:repeat(6, 2rem);animation:fadeIn 0.2s ease-in}.day{display:grid;place-items:center;width:2rem;height:2rem;font-size:0.875rem;border-radius:var(--menu-contextual-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-button-high-background-hover);color:white}.day.selected,.day.selected:hover{background:var(--components-button-high-background);color:white}.day.disabled{color:color-mix(in srgb, var(--components-form-shape-background-selected) 50%, transparent);cursor:not-allowed}.day.outside-month{color:var(--components-form-text-description-default);opacity:0.6}.day.outside-month.selected,.day.outside-month.in-range{opacity:1 !important;color:inherit}.day.in-range{background:color-mix(in srgb, var(--components-form-shape-background-selected) 50%, transparent);color:white;border-radius:0;position:relative}.day.range-start,.day.range-end{background:var(--components-button-high-background);color:white;position:relative}.day.range-start{border-radius:var(--menu-contextual-radius) 0 0 var(--menu-contextual-radius)}.day.range-end{border-radius:0 var(--menu-contextual-radius) var(--menu-contextual-radius) 0}.day.outside-month.range-start,.day.outside-month.range-end{background:var(--components-button-high-background) !important;color:white;opacity:1 !important}.day.outside-month.in-range{background:color-mix(in srgb, var(--components-form-shape-background-selected) 50%, transparent);color:white}.day.is-today{font-weight:600;position:relative}.day.is-today::after{content:\"\";position:absolute;bottom:0.15rem;left:50%;transform:translateX(-50%);width:0.15rem;height:0.15rem;background-color:currentColor;border-radius:50%}.day.is-today.selected::after{background-color:white}.calendar-footer{display:flex;gap:0.25rem;justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-button-medium-border);padding:1rem;gap:0.25rem;width:100%}.datepicker-actions{display:flex;justify-content:flex-end;gap:0.25rem;width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:0.25rem;margin-top:1rem}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}";
47
+ const NvCalendarStyle0 = nvCalendarCss;
48
+
49
+ // Extend dayjs with plugins
50
+ dayjs.extend(customParseFormat);
51
+ dayjs.extend(utc);
52
+ dayjs.extend(weekOfYear);
53
+ const NvCalendar = /*@__PURE__*/ proxyCustomElement(class NvCalendar extends H {
54
+ constructor() {
55
+ super();
56
+ this.__registerHost();
57
+ this.singleDateChange = createEvent(this, "singleDateChange", 7);
58
+ this.rangeDateChange = createEvent(this, "rangeDateChange", 7);
59
+ /****************************************************************************/
60
+ //#region PROPERTIES
61
+ /**
62
+ * First day of the week (0 = Sunday, 1 = Monday, etc.)
63
+ * @default 0
64
+ */
65
+ this.firstDayOfWeek = 0;
66
+ /**
67
+ * Number of calendars to display
68
+ * @default 1
69
+ */
70
+ this.numberOfCalendars = 1;
71
+ /**
72
+ * Selected date (ISO string format)
73
+ * ex: "2025-03-15"
74
+ */
75
+ this.singleValue = '';
76
+ /**
77
+ * Selected date range
78
+ * format: { start: ISO string, end: ISO string }
79
+ * ex: { start: "2025-03-15", end: "2025-03-20" }
80
+ */
81
+ this.rangeValue = '';
82
+ /**
83
+ * Minimum date for selection (ISO string format, ex: "2025-01-01")
84
+ */
85
+ this.min = '';
86
+ /**
87
+ * Maximum date for selection (ISO string format, ex: "2025-12-31")
88
+ */
89
+ this.max = '';
90
+ /** Disabled dates (ISO string array)
91
+ * @default '[]'
92
+ */
93
+ this.disabledDates = '';
94
+ /** Locale for date formatting
95
+ * @default 'en-BE'
96
+ */
97
+ this.locale = 'en-BE';
98
+ /** Date format (ex: 'YYYY-MM-DD', 'DD-MM-YYYY', etc.)
99
+ * @default 'YYYY-MM-DD'
100
+ * @note If the date format is in UTC mode, the date will be displayed in UTC time.
101
+ * @note If the date format is not in UTC mode, the date will be displayed in the local time.
102
+ */
103
+ this.dateFormat = 'YYYY-MM-DD';
104
+ /**
105
+ * Footer placement
106
+ * @default 'bottom'
107
+ */
108
+ this.shortcutsPlacement = 'bottom';
109
+ /**
110
+ * Selection type (single date or date range)
111
+ * @default 'single'
112
+ */
113
+ this.selectionType = 'single';
114
+ /**
115
+ * Show action buttons
116
+ * @default false
117
+ */
118
+ this.showActions = false;
119
+ /**
120
+ * Custom actions to display in the footer
121
+ * JSON array of objects with the following properties:
122
+ * - label: string
123
+ * - onClick: function
124
+ * @default '[]'
125
+ */
126
+ this.shortcuts = '[]';
127
+ /** Cache for parsed disabled dates */
128
+ this.parsedDisabledDates = [];
129
+ /** Selected date */
130
+ this.selectedDate = null;
131
+ /** Start date */
132
+ this.startDate = null;
133
+ /** End date */
134
+ this.endDate = null;
135
+ /** List of formatted months for the selector */
136
+ this.months = [];
137
+ /**
138
+ * Resets the current selection
139
+ */
140
+ this.resetSelection = () => {
141
+ if (this.selectionType === 'single') {
142
+ this.selectedDate = null;
143
+ this.singleValue = '';
144
+ this.singleDateChange.emit('');
145
+ }
146
+ else {
147
+ this.startDate = null;
148
+ this.endDate = null;
149
+ this.rangeValue = '';
150
+ this.rangeDateChange.emit({ start: '', end: '' });
151
+ }
152
+ };
153
+ /**
154
+ * Confirms the current selection
155
+ */
156
+ this.confirmSelection = () => {
157
+ if (this.selectionType === 'single' && this.selectedDate) {
158
+ const dateStr = this.formatDate(this.selectedDate);
159
+ this.singleDateChange.emit(dateStr);
160
+ this.singleValue = dateStr;
161
+ const event = new CustomEvent('closePopover', {
162
+ bubbles: true,
163
+ composed: true,
164
+ });
165
+ this.el.dispatchEvent(event);
166
+ }
167
+ else if (this.selectionType === 'range' &&
168
+ this.startDate &&
169
+ this.endDate) {
170
+ this.rangeDateChange.emit({
171
+ start: this.formatDate(this.startDate),
172
+ end: this.formatDate(this.endDate),
173
+ });
174
+ this.rangeValue = JSON.stringify({
175
+ start: this.formatDate(this.startDate),
176
+ end: this.formatDate(this.endDate),
177
+ });
178
+ const event = new CustomEvent('closePopover', {
179
+ bubbles: true,
180
+ composed: true,
181
+ });
182
+ this.el.dispatchEvent(event);
183
+ }
184
+ };
185
+ }
186
+ //#endregion EVENTS
187
+ /****************************************************************************/
188
+ //#region LIFECYCLE
189
+ componentWillLoad() {
190
+ this.parseDisabledDates();
191
+ if (this.selectionType === 'single' && this.singleValue) {
192
+ this.selectedDate = this.parseDate(this.singleValue);
193
+ this.currentDate = this.selectedDate;
194
+ }
195
+ else if (this.selectionType === 'range' && this.rangeValue) {
196
+ try {
197
+ let parsed;
198
+ if (typeof this.rangeValue === 'string') {
199
+ parsed = JSON.parse(this.rangeValue);
200
+ }
201
+ else {
202
+ parsed = this.rangeValue;
203
+ }
204
+ if (parsed.start && parsed.end) {
205
+ this.startDate = this.parseDate(parsed.start);
206
+ this.endDate = this.parseDate(parsed.end);
207
+ this.currentDate = this.startDate;
208
+ if (this.startDate && this.endDate && this.startDate > this.endDate) {
209
+ console.warn(`Warning: startDate (${this.formatDate(this.startDate)}) is after endDate (${this.formatDate(this.endDate)})`);
210
+ // [this.startDate, this.endDate] = [this.endDate, this.startDate];
211
+ throw new Error('startDate cannot be after endDate');
212
+ }
213
+ }
214
+ }
215
+ catch (error) {
216
+ console.error('Invalid JSON for rangeValue:', error);
217
+ }
218
+ }
219
+ else {
220
+ this.currentDate = new Date();
221
+ }
222
+ this.initializeMonths();
223
+ }
224
+ // componentDidLoad() {
225
+ // if (this.rangeValue) {
226
+ // this.onRangeValueChange(this.rangeValue);
227
+ // }
228
+ // }
229
+ //#endregion LIFECYCLE
230
+ /****************************************************************************/
231
+ //#region METHODS
232
+ /**
233
+ * Change the displayed month
234
+ * @param {number} offset - Month offset (-1 for previous, 1 for next)
235
+ * @param {number} calendarOffset - Month offset for the calendar (0 by default)
236
+ */
237
+ changeMonth(offset, calendarOffset = 0) {
238
+ const newDate = new Date(this.currentDate);
239
+ newDate.setUTCMonth(newDate.getUTCMonth() + offset + calendarOffset);
240
+ // Add the appropriate animation class
241
+ const containers = this.el.querySelectorAll('.calendar-grid');
242
+ containers.forEach(container => {
243
+ // Remove existing animation classes
244
+ container.classList.remove('slide-left', 'slide-right');
245
+ // Add the new animation class
246
+ const animationClass = offset > 0 ? 'slide-left' : 'slide-right';
247
+ container.classList.add(animationClass);
248
+ // Remove the class after the animation
249
+ setTimeout(() => {
250
+ container.classList.remove(animationClass);
251
+ }, 300); // 300ms corresponds to $slide-duration in the SCSS
252
+ });
253
+ this.currentDate = newDate;
254
+ }
255
+ /**
256
+ * Handles date selection based on the mode
257
+ * @param {Date} date - Selected date
258
+ */
259
+ handleDateSelection(date) {
260
+ if (this.isDateDisabled(date)) {
261
+ return;
262
+ }
263
+ if (this.selectionType === 'single') {
264
+ this.handleSingleSelection(date);
265
+ }
266
+ else {
267
+ this.handleRangeSelection(date);
268
+ }
269
+ }
270
+ /**
271
+ * Handles single date selection
272
+ * @param {Date} date - Selected date
273
+ */
274
+ handleSingleSelection(date) {
275
+ if (!date)
276
+ return;
277
+ const formattedDate = this.formatDate(date);
278
+ this.selectedDate = date;
279
+ this.singleDateChange.emit(formattedDate);
280
+ }
281
+ /**
282
+ * Handles range date selection
283
+ * @param {Date} date - Selected date
284
+ */
285
+ handleRangeSelection(date) {
286
+ if (!this.startDate || (this.startDate && this.endDate)) {
287
+ this.startDate = date;
288
+ this.endDate = null;
289
+ }
290
+ else {
291
+ this.endDate = date;
292
+ if (this.startDate > this.endDate) {
293
+ [this.startDate, this.endDate] = [this.endDate, this.startDate];
294
+ }
295
+ this.rangeDateChange.emit({
296
+ start: this.formatDate(this.startDate),
297
+ end: this.formatDate(this.endDate),
298
+ });
299
+ }
300
+ }
301
+ /**
302
+ * Calculates the ISO week number
303
+ * @param {Date} date - Date to calculate
304
+ * @returns {number} Week number
305
+ */
306
+ getWeekNumber(date) {
307
+ const startOfYear = new Date(date.getFullYear(), 0, 1);
308
+ const pastDaysOfYear = (date.getTime() - startOfYear.getTime()) / 86400000;
309
+ return Math.ceil((pastDaysOfYear + startOfYear.getDay() + 1) / 7);
310
+ }
311
+ /**
312
+ * Checks if a date is disabled.
313
+ * Disabled if:
314
+ * - The date is before min (if defined)
315
+ * - The date is after max (if defined)
316
+ * - The date is in the disabledDates array
317
+ * @param {Date} date - Date to check
318
+ * @returns {boolean} true if the date is disabled
319
+ */
320
+ isDateDisabled(date) {
321
+ if (!date)
322
+ return true;
323
+ // Minimum bound check
324
+ if (this.min) {
325
+ const minDate = this.parseDate(this.min);
326
+ if (minDate && date < minDate) {
327
+ return true;
328
+ }
329
+ }
330
+ // Maximum bound check
331
+ if (this.max) {
332
+ const maxDate = this.parseDate(this.max);
333
+ if (maxDate && date > maxDate) {
334
+ return true;
335
+ }
336
+ }
337
+ // Check disabled dates
338
+ return this.parsedDisabledDates.some(disabledDate => this.isSameDate(date, disabledDate));
339
+ }
340
+ /**
341
+ * Checks if a date is in the selected range
342
+ * @param {Date} date - Date to check
343
+ * @returns {boolean} true if the date is in the range
344
+ */
345
+ isDateInRange(date) {
346
+ if (!date || !this.startDate || !this.endDate)
347
+ return false;
348
+ const checkDate = this.parseDate(date);
349
+ const startDate = this.parseDate(this.startDate);
350
+ const endDate = this.parseDate(this.endDate);
351
+ // Verify if startDate and endDate are valid
352
+ if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
353
+ return false;
354
+ }
355
+ // Verify that startDate is before endDate (additional security)
356
+ if (startDate > endDate)
357
+ return false;
358
+ // Comparison based only on the date (year, month, day)
359
+ return (this.isSameOrAfter(checkDate, startDate) &&
360
+ this.isSameOrBefore(checkDate, endDate));
361
+ }
362
+ /**
363
+ * Retrieves the localized day names
364
+ * @returns {string[]} Array of short day names
365
+ */
366
+ getDayNames() {
367
+ // If we have custom day names for this locale
368
+ if (CUSTOM_DAY_NAMES[this.locale]) {
369
+ const days = [...CUSTOM_DAY_NAMES[this.locale]];
370
+ // Reorganize the days based on the first day of the week
371
+ const firstDays = days.slice(0, this.firstDayOfWeek);
372
+ const remainingDays = days.slice(this.firstDayOfWeek);
373
+ return [...remainingDays, ...firstDays];
374
+ }
375
+ // Otherwise, use the default behavior
376
+ const formatter = new Intl.DateTimeFormat(this.locale, {
377
+ weekday: 'short',
378
+ });
379
+ const days = [...Array(7)].map((_, i) => formatter.format(new Date(2023, 0, i + 1)).toUpperCase());
380
+ // Reorganize the days based on the first day of the week
381
+ const firstDays = days.slice(0, this.firstDayOfWeek);
382
+ const remainingDays = days.slice(this.firstDayOfWeek);
383
+ return [...remainingDays, ...firstDays];
384
+ }
385
+ /**
386
+ * Generates the days of the current month
387
+ * @param {number} offset - Month offset (0 by default)
388
+ * @param {number} totalCalendars - Number of calendars to display (1 by default)
389
+ * @returns {Array<{ dayOfMonth: number | null, date: Date | null, isSelected: boolean, isDisabled: boolean }>} Array of formatted days
390
+ */
391
+ getDaysInMonth(offset = 0, totalCalendars = 1) {
392
+ const year = this.currentDate.getUTCFullYear();
393
+ const month = this.currentDate.getUTCMonth() + offset;
394
+ const firstDay = new Date(Date.UTC(year, month, 1));
395
+ const lastDay = new Date(Date.UTC(year, month + 1, 0));
396
+ const days = [];
397
+ // Calculate the offset to include the days of the previous month only for the first calendar
398
+ const offsetDays = offset === 0 ? (firstDay.getUTCDay() - this.firstDayOfWeek + 7) % 7 : 0;
399
+ // Add the days of the previous month for the first calendar
400
+ if (offset === 0) {
401
+ const prevMonthLastDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
402
+ for (let i = offsetDays; i > 0; i--) {
403
+ const date = new Date(Date.UTC(year, month - 1, prevMonthLastDay - i + 1));
404
+ days.push({
405
+ dayOfMonth: date.getUTCDate(),
406
+ date,
407
+ isCurrentMonth: false,
408
+ isDisabled: this.isDateDisabled(date),
409
+ });
410
+ }
411
+ }
412
+ // Add the days of the current month
413
+ for (let i = 1; i <= lastDay.getUTCDate(); i++) {
414
+ const date = new Date(Date.UTC(year, month, i));
415
+ days.push({
416
+ dayOfMonth: i,
417
+ date,
418
+ isCurrentMonth: true,
419
+ isDisabled: this.isDateDisabled(date),
420
+ });
421
+ }
422
+ // Add the days of the next month only for the last calendar
423
+ if (offset === totalCalendars - 1) {
424
+ const nextMonthDaysNeeded = 7 - (days.length % 7 || 7);
425
+ for (let i = 1; i <= nextMonthDaysNeeded; i++) {
426
+ const date = new Date(Date.UTC(year, month + 1, i));
427
+ days.push({
428
+ dayOfMonth: i,
429
+ date,
430
+ isCurrentMonth: false,
431
+ isDisabled: this.isDateDisabled(date),
432
+ });
433
+ }
434
+ }
435
+ return days;
436
+ }
437
+ /** Initializes the list of formatted months according to the locale */
438
+ initializeMonths() {
439
+ // If we have custom month names for this locale
440
+ if (CUSTOM_MONTH_NAMES[this.locale]) {
441
+ this.months = CUSTOM_MONTH_NAMES[this.locale].map((label, value) => ({
442
+ value,
443
+ label,
444
+ }));
445
+ return;
446
+ }
447
+ // Otherwise, use the default behavior
448
+ const formatter = new Intl.DateTimeFormat(this.locale, { month: 'short' });
449
+ this.months = Array.from({ length: 12 }, (_, i) => ({
450
+ value: i,
451
+ label: formatter.format(new Date(2000, i, 1)).toUpperCase(),
452
+ }));
453
+ }
454
+ /**
455
+ * Retrieves the localized abbreviation for "week"
456
+ * @returns {string} Localized abbreviation for "week"
457
+ */
458
+ getLocalizedWeekText() {
459
+ return WEEK_ABBREVIATIONS[this.locale] || 'W';
460
+ }
461
+ /**
462
+ * Handles month change in the selector
463
+ * @param {Event} event - Month change event
464
+ * @param {number} calendarOffset - Calendar offset (0 by default)
465
+ */
466
+ handleMonthChange(event, calendarOffset = 0) {
467
+ const select = event.target;
468
+ const selectedMonth = parseInt(select.value, 10);
469
+ const currentMonth = this.currentDate.getUTCMonth();
470
+ // Calculate the difference considering the calendar offset
471
+ const monthDiff = selectedMonth - ((currentMonth + calendarOffset) % 12);
472
+ const newDate = new Date(this.currentDate);
473
+ newDate.setUTCMonth(newDate.getUTCMonth() + monthDiff);
474
+ this.currentDate = newDate;
475
+ }
476
+ /**
477
+ * Handles year change in the numeric entry
478
+ * @param {Event} event - Year change event
479
+ * @param {number} calendarOffset - Calendar offset (0 by default)
480
+ */
481
+ handleYearChange(event, calendarOffset = 0) {
482
+ const input = event.target;
483
+ const year = parseInt(input.value, 10);
484
+ if (!isNaN(year) && year >= 1900 && year <= 2100) {
485
+ const newDate = new Date(this.currentDate);
486
+ newDate.setUTCFullYear(year);
487
+ newDate.setUTCMonth(newDate.getUTCMonth() + calendarOffset);
488
+ this.currentDate = newDate;
489
+ }
490
+ }
491
+ /**
492
+ * Handles week selection
493
+ * @param {Date[]} weekDays - Selected week days
494
+ * @param {number} calendarIndex - Calendar index from which the selection is made
495
+ */
496
+ handleWeekSelection(weekDays, calendarIndex) {
497
+ if (this.selectionType !== 'range')
498
+ return;
499
+ const allDays = this.getDaysInMonth(calendarIndex, this.numberOfCalendars);
500
+ const weekStart = weekDays[0];
501
+ const weekEnd = weekDays[weekDays.length - 1];
502
+ if (!weekStart || !weekEnd)
503
+ return;
504
+ const selectedWeekDays = allDays.filter(day => day.date && day.date >= weekStart && day.date <= weekEnd);
505
+ const validDays = selectedWeekDays.filter(day => !this.isDateDisabled(day.date));
506
+ if (validDays.length > 0) {
507
+ this.startDate = validDays[0].date;
508
+ this.endDate = validDays[validDays.length - 1].date;
509
+ this.rangeDateChange.emit({
510
+ start: this.formatDate(this.startDate),
511
+ end: this.formatDate(this.endDate),
512
+ });
513
+ }
514
+ }
515
+ /**
516
+ * Checks if a date corresponds to today
517
+ * @param {Date} date - Date to check
518
+ * @returns {boolean} true if the date is today
519
+ */
520
+ isToday(date) {
521
+ const today = new Date();
522
+ return (date.getDate() === today.getDate() &&
523
+ date.getMonth() === today.getMonth() &&
524
+ date.getFullYear() === today.getFullYear());
525
+ }
526
+ /**
527
+ * Watches the changes of the number of calendars
528
+ * @watch numberOfCalendars
529
+ * @param {number} newValue - New number of calendars
530
+ */
531
+ validateNumberOfCalendars(newValue) {
532
+ if (newValue < 1 || newValue > 4) {
533
+ console.warn('numberOfCalendars must be between 1 and 4. Defaulting to 1.');
534
+ this.numberOfCalendars = 1;
535
+ }
536
+ }
537
+ /**
538
+ * Watches the changes of the selected date range
539
+ * @watch rangeValue
540
+ * @param {Object} newValue - New rangeValue value
541
+ * @param {string} newValue.start - Start date
542
+ * @param {string} newValue.end - End date
543
+ */
544
+ onRangeValueChange(newValue) {
545
+ if (newValue) {
546
+ try {
547
+ const parsed = JSON.parse(newValue);
548
+ if (parsed.start && parsed.end) {
549
+ this.startDate = this.parseDate(parsed.start);
550
+ this.endDate = this.parseDate(parsed.end);
551
+ this.currentDate = this.parseDate(parsed.start);
552
+ }
553
+ }
554
+ catch (error) {
555
+ console.error('Invalid JSON for rangeValue:', error);
556
+ }
557
+ }
558
+ }
559
+ /**
560
+ * Watches the changes of the disabled dates
561
+ * @watch disabledDates
562
+ * @description Watches the changes of the disabled dates
563
+ */
564
+ handleDisabledDatesChange() {
565
+ this.parseDisabledDates();
566
+ }
567
+ /**
568
+ * Watches the changes of the single value
569
+ * @watch singleValue
570
+ * @param {string} newValue - New single value
571
+ * @param {string} oldValue - Old single value
572
+ */
573
+ onSingleValueChange(newValue, oldValue) {
574
+ if (this.selectionType === 'single' && newValue !== oldValue && newValue) {
575
+ const parsedDate = this.parseDate(newValue);
576
+ if (parsedDate) {
577
+ this.selectedDate = parsedDate;
578
+ this.currentDate = parsedDate;
579
+ }
580
+ }
581
+ }
582
+ /**
583
+ * Convert a date string/Date to a Date without timezone offset
584
+ * @param {string | Date} dateInput - Date under string or Date object form
585
+ * @returns {Date} Date in Date form without timezone offset
586
+ */
587
+ parseDate(dateInput) {
588
+ if (dateInput instanceof Date)
589
+ return dateInput;
590
+ // Handling Unix Seconds ("X") formats
591
+ if (this.dateFormat === 'X') {
592
+ const unixSeconds = Number(dateInput);
593
+ if (isNaN(unixSeconds))
594
+ return null;
595
+ return this.isUTCMode
596
+ ? dayjs.unix(unixSeconds).utc().toDate()
597
+ : dayjs.unix(unixSeconds).toDate();
598
+ }
599
+ // Handling Unix Milliseconds ("x") formats
600
+ if (this.dateFormat === 'x') {
601
+ const unixMilliseconds = Number(dateInput);
602
+ if (isNaN(unixMilliseconds))
603
+ return null;
604
+ return this.isUTCMode
605
+ ? dayjs(unixMilliseconds).utc().toDate()
606
+ : dayjs(unixMilliseconds).toDate();
607
+ }
608
+ // Handling C# Ticks format
609
+ if (this.dateFormat === 'Ticks') {
610
+ const ticks = Number(dateInput);
611
+ if (isNaN(ticks))
612
+ return null;
613
+ // Conversion of .NET ticks to milliseconds since Unix epoch
614
+ const unixMilliseconds = (ticks - 621355968000000000) / 10000;
615
+ return this.isUTCMode
616
+ ? dayjs(unixMilliseconds).utc().toDate()
617
+ : dayjs(unixMilliseconds).toDate();
618
+ }
619
+ // For all other formats, use customParseFormat in strict mode
620
+ let parsed;
621
+ if (this.isUTCMode) {
622
+ parsed = dayjs.utc(dateInput, this.dateFormat, true);
623
+ }
624
+ else {
625
+ parsed = dayjs(dateInput, this.dateFormat, true);
626
+ }
627
+ if (!parsed.isValid()) {
628
+ console.error(`Parsing error:`, {
629
+ dateInput,
630
+ dateFormat: this.dateFormat,
631
+ });
632
+ return null;
633
+ }
634
+ return parsed.toDate();
635
+ }
636
+ /**
637
+ * Formats a date to a string according to the format
638
+ * @param {Date} date - Date to format
639
+ * @returns {string} Formatted date
640
+ */
641
+ formatDate(date) {
642
+ if (!date)
643
+ return '';
644
+ // If the format is "Ticks", convert the time to C# ticks
645
+ if (this.dateFormat === 'Ticks') {
646
+ const ticks = date.getTime() * 10000 + 621355968000000000;
647
+ return ticks.toString();
648
+ }
649
+ // If the format is "X" (Unix Seconds)
650
+ if (this.dateFormat === 'X') {
651
+ return dayjs(date).unix().toString();
652
+ }
653
+ // If the format is "x" (Unix Milliseconds)
654
+ if (this.dateFormat === 'x') {
655
+ return date.getTime().toString();
656
+ }
657
+ // Otherwise, format according to the mode (UTC or local)
658
+ return this.isUTCMode
659
+ ? dayjs(date).utc().format(this.dateFormat)
660
+ : dayjs(date).format(this.dateFormat);
661
+ }
662
+ /**
663
+ * Parse and cache the disabled dates
664
+ * @description Parse and cache the disabled dates
665
+ */
666
+ parseDisabledDates() {
667
+ if (!this.disabledDates) {
668
+ this.parsedDisabledDates = [];
669
+ return;
670
+ }
671
+ try {
672
+ const disabledDatesArray = JSON.parse(this.disabledDates);
673
+ this.parsedDisabledDates = disabledDatesArray
674
+ .map(date => this.parseDate(date))
675
+ .filter(date => date !== null);
676
+ }
677
+ catch (error) {
678
+ console.error('Error parsing disabled dates:', error);
679
+ this.parsedDisabledDates = [];
680
+ }
681
+ }
682
+ /**
683
+ * Checks if two dates are identical
684
+ * @param {Date | null} date1 - First date
685
+ * @param {Date | null} date2 - Second date
686
+ * @returns {boolean} true if the dates are identical
687
+ */
688
+ isSameDate(date1, date2) {
689
+ if (!date1 || !date2)
690
+ return false;
691
+ if (this.isUTCMode) {
692
+ return (date1.getUTCFullYear() === date2.getUTCFullYear() &&
693
+ date1.getUTCMonth() === date2.getUTCMonth() &&
694
+ date1.getUTCDate() === date2.getUTCDate());
695
+ }
696
+ else {
697
+ return (date1.getFullYear() === date2.getFullYear() &&
698
+ date1.getMonth() === date2.getMonth() &&
699
+ date1.getDate() === date2.getDate());
700
+ }
701
+ }
702
+ /**
703
+ * Checks if a date is identical or after another date
704
+ * @param {Date} date - Date to check
705
+ * @param {Date} compareDate - Reference date
706
+ * @returns {boolean} true if `date` >= `compareDate`
707
+ */
708
+ isSameOrAfter(date, compareDate) {
709
+ if (this.isUTCMode) {
710
+ return (date.getUTCFullYear() > compareDate.getUTCFullYear() ||
711
+ (date.getUTCFullYear() === compareDate.getUTCFullYear() &&
712
+ date.getUTCMonth() > compareDate.getUTCMonth()) ||
713
+ (date.getUTCFullYear() === compareDate.getUTCFullYear() &&
714
+ date.getUTCMonth() === compareDate.getUTCMonth() &&
715
+ date.getUTCDate() >= compareDate.getUTCDate()));
716
+ }
717
+ else {
718
+ return (date.getFullYear() > compareDate.getFullYear() ||
719
+ (date.getFullYear() === compareDate.getFullYear() &&
720
+ date.getMonth() > compareDate.getMonth()) ||
721
+ (date.getFullYear() === compareDate.getFullYear() &&
722
+ date.getMonth() === compareDate.getMonth() &&
723
+ date.getDate() >= compareDate.getDate()));
724
+ }
725
+ }
726
+ /**
727
+ * Checks if a date is identical or before another date
728
+ * @param {Date} date - Date to check
729
+ * @param {Date} compareDate - Reference date
730
+ * @returns {boolean} true if `date` <= `compareDate`
731
+ */
732
+ isSameOrBefore(date, compareDate) {
733
+ if (this.isUTCMode) {
734
+ return (date.getUTCFullYear() < compareDate.getUTCFullYear() ||
735
+ (date.getUTCFullYear() === compareDate.getUTCFullYear() &&
736
+ date.getUTCMonth() < compareDate.getUTCMonth()) ||
737
+ (date.getUTCFullYear() === compareDate.getUTCFullYear() &&
738
+ date.getUTCMonth() === compareDate.getUTCMonth() &&
739
+ date.getUTCDate() <= compareDate.getUTCDate()));
740
+ }
741
+ else {
742
+ return (date.getFullYear() < compareDate.getFullYear() ||
743
+ (date.getFullYear() === compareDate.getFullYear() &&
744
+ date.getMonth() < compareDate.getMonth()) ||
745
+ (date.getFullYear() === compareDate.getFullYear() &&
746
+ date.getMonth() === compareDate.getMonth() &&
747
+ date.getDate() <= compareDate.getDate()));
748
+ }
749
+ }
750
+ /**
751
+ * Applies a shortcut selection
752
+ * @param {Object} shortcut - Shortcut to apply
753
+ * @param {string | Date} shortcut.singleValue - Selected date value
754
+ * @param {Object} shortcut.rangeValue - Start and end date values
755
+ * @param {string | Date} shortcut.rangeValue.start - Start date value
756
+ * @param {string | Date} shortcut.rangeValue.end - End date value
757
+ * @param {string} shortcut.label - Label
758
+ */
759
+ applyShortcut(shortcut) {
760
+ this.selectedDate = null;
761
+ this.startDate = null;
762
+ this.endDate = null;
763
+ if (shortcut.singleValue) {
764
+ const newDate = this.parseDate(shortcut.singleValue);
765
+ this.selectedDate = newDate;
766
+ this.singleDateChange.emit(this.formatDate(newDate));
767
+ this.singleValue = this.formatDate(newDate);
768
+ if (!this.showActions) {
769
+ const event = new CustomEvent('closePopover', {
770
+ bubbles: true,
771
+ composed: true,
772
+ });
773
+ this.el.dispatchEvent(event);
774
+ }
775
+ this.forceCalendarUpdate(newDate);
776
+ }
777
+ else {
778
+ const start = this.parseDate(shortcut.rangeValue.start);
779
+ const end = this.parseDate(shortcut.rangeValue.end);
780
+ this.startDate = start;
781
+ this.endDate = end;
782
+ this.rangeDateChange.emit({
783
+ start: this.formatDate(start),
784
+ end: this.formatDate(end),
785
+ });
786
+ this.rangeValue = JSON.stringify({
787
+ start: this.formatDate(start),
788
+ end: this.formatDate(end),
789
+ });
790
+ if (!this.showActions) {
791
+ const event = new CustomEvent('closePopover', {
792
+ bubbles: true,
793
+ composed: true,
794
+ });
795
+ this.el.dispatchEvent(event);
796
+ }
797
+ this.forceCalendarUpdate(end);
798
+ }
799
+ }
800
+ /**
801
+ * Method to force the complete calendar update (and fix the persistent hover problem)
802
+ * @param {Date} newDate - Date to force
803
+ */
804
+ forceCalendarUpdate(newDate) {
805
+ this.currentDate = new Date(newDate);
806
+ this.currentDate = new Date(this.currentDate); // Force a re-render
807
+ // Reset visually the hover/touch effect
808
+ requestAnimationFrame(() => {
809
+ const days = document.querySelectorAll('.day');
810
+ days.forEach(el => {
811
+ el.classList.remove('hover', 'active', 'touched');
812
+ el.style.pointerEvents = 'none';
813
+ });
814
+ // Add specific touch handling (for mobile)
815
+ document.body.addEventListener('touchstart', this.clearTouchState, {
816
+ passive: true,
817
+ });
818
+ // Reset the touch state after 50ms
819
+ setTimeout(() => {
820
+ days.forEach(el => {
821
+ el.style.pointerEvents = '';
822
+ });
823
+ }, 50);
824
+ });
825
+ }
826
+ /**
827
+ * Function to reset the touch effect (Mobile fix)
828
+ */
829
+ clearTouchState() {
830
+ document.querySelectorAll('.day').forEach(el => {
831
+ el.classList.remove('touched');
832
+ });
833
+ // Remove the listener after the first interaction
834
+ document.body.removeEventListener('touchstart', this.clearTouchState);
835
+ }
836
+ /**
837
+ * Handles month change with an offset
838
+ * @param {number} direction - Direction (-1 for previous, 1 for next)
839
+ * @param {number} offset - Month offset (0 by default)
840
+ * @returns {Function} Change month handler
841
+ */
842
+ getChangeMonthHandler(direction, offset) {
843
+ return () => this.changeMonth(direction, offset);
844
+ }
845
+ /**
846
+ * Handles month change from an event (ex: dropdown)
847
+ * @param {number} offset - Month offset (0 by default)
848
+ * @returns {Function} Change month handler
849
+ */
850
+ getHandleMonthChange(offset) {
851
+ return (event) => this.handleMonthChange(event, offset);
852
+ }
853
+ /**
854
+ * Handles year change from an event (ex: dropdown)
855
+ * @param {number} offset - Year offset (0 by default)
856
+ * @returns {Function} Change year handler
857
+ */
858
+ getHandleYearChange(offset) {
859
+ return (event) => this.handleYearChange(event, offset);
860
+ }
861
+ /**
862
+ * Handles day click
863
+ * @param {Date} date - Date to handle
864
+ * @param {boolean} isDisabled - Whether the date is disabled
865
+ * @returns {Function} Day click handler
866
+ */
867
+ getDayClickHandler(date, isDisabled) {
868
+ return isDisabled ? undefined : () => this.handleDateSelection(date);
869
+ }
870
+ /**
871
+ * Handles shortcut selection
872
+ * @param {Object} shortcut - Shortcut to handle
873
+ * @param {string | Date} shortcut.singleValue - Selected date value
874
+ * @param {Object} shortcut.rangeValue - Start and end date values
875
+ * @param {string | Date} shortcut.rangeValue.start - Start date value
876
+ * @param {string | Date} shortcut.rangeValue.end - End date value
877
+ * @param {string} shortcut.label - Label
878
+ * @returns {Function} Shortcut selection handler
879
+ */
880
+ getShortcutHandler(shortcut) {
881
+ return () => this.applyShortcut(shortcut);
882
+ }
883
+ /**
884
+ * Handles week selection
885
+ * @param {Date[]} dates - Dates to handle
886
+ * @param {number} index - Calendar index
887
+ * @returns {Function} Week selection handler
888
+ */
889
+ getWeekSelectionHandler(dates, index) {
890
+ return () => {
891
+ if (this.selectionType === 'range') {
892
+ this.handleWeekSelection(dates, index);
893
+ }
894
+ };
895
+ }
896
+ parsedShortcuts() {
897
+ try {
898
+ return this.shortcuts ? JSON.parse(this.shortcuts) : [];
899
+ }
900
+ catch (error) {
901
+ console.error('Invalid JSON for shortcuts:', error);
902
+ return [];
903
+ }
904
+ }
905
+ /**
906
+ * Checks if the date format is in UTC mode
907
+ * @returns {boolean} true if the date format is in UTC mode
908
+ */
909
+ get isUTCMode() {
910
+ return this.dateFormat.includes('Z');
911
+ }
912
+ /**
913
+ * Checks if shortcuts are visible
914
+ * @returns {boolean} true if shortcuts are visible
915
+ */
916
+ get hasShortcuts() {
917
+ return (this.shortcutsPlacement === 'bottom' && this.parsedShortcuts().length > 0);
918
+ }
919
+ /**
920
+ * Checks if actions are visible
921
+ * @returns {boolean} true if actions are visible
922
+ */
923
+ get hasActions() {
924
+ return this.showActions;
925
+ }
926
+ //#endregion METHODS
927
+ /****************************************************************************/
928
+ //#region RENDER
929
+ /**
930
+ * Renders the header
931
+ * @param {number} offset - Month offset
932
+ * @param {number} index - Calendar index
933
+ * @returns {JSX.Element} Header
934
+ * @description Renders the header of the calendar
935
+ */
936
+ renderHeader(offset, index) {
937
+ return (h("div", { class: "header" }, this.numberOfCalendars > 1 && index === 0 && (h("nv-iconbutton", { class: "nav-left", emphasis: "low", name: "chevron-left", size: "sm", onClick: this.getChangeMonthHandler(-1, offset) })), h("div", { class: "date-controls" }, h("select", { class: "month-select mr-4", onChange: this.getHandleMonthChange(offset) }, this.months.map(month => (h("option", { key: month.value, value: month.value, selected: month.value === (this.currentDate.getUTCMonth() + offset) % 12 }, month.label)))), h("input", { type: "number", class: "year-input", min: "1950", max: "2100", value: this.currentDate.getUTCFullYear() +
938
+ Math.floor((this.currentDate.getUTCMonth() + offset) / 12), onChange: this.getHandleYearChange(offset) })), this.numberOfCalendars === 1 && (h("div", { class: "nav-buttons" }, h("nv-iconbutton", { emphasis: "low", name: "chevron-left", onClick: this.getChangeMonthHandler(-1, offset) }), h("nv-iconbutton", { emphasis: "low", name: "chevron-right", onClick: this.getChangeMonthHandler(1, offset) }))), this.numberOfCalendars > 1 && index === this.numberOfCalendars - 1 && (h("nv-iconbutton", { emphasis: "low", name: "chevron-right", size: "sm", onClick: this.getChangeMonthHandler(1, offset), class: "nav-right" }))));
939
+ }
940
+ /**
941
+ * Renders the week numbers
942
+ * @param {Array<{date: Date}>} weeks - Weeks to render
943
+ * @param {number} index - Calendar index
944
+ * @returns {JSX.Element} Week numbers
945
+ * @description Renders the week numbers of the calendar
946
+ */
947
+ renderWeekNumbers(
948
+ /** Weeks to render */
949
+ weeks,
950
+ /** Calendar index */
951
+ index) {
952
+ return (h("div", { class: "week-numbers" }, h("div", { class: "week-header" }, this.getLocalizedWeekText()), weeks.map((week, weekIndex) => {
953
+ var _a;
954
+ const dates = week.map(d => d.date);
955
+ return (h("div", { class: `week-number ${this.selectionType === 'range' ? 'clickable' : ''}`, onClick: this.getWeekSelectionHandler(dates, index), key: `week-${weekIndex}` }, this.getWeekNumber(((_a = week.find(d => d.date)) === null || _a === void 0 ? void 0 : _a.date) || new Date())));
956
+ })));
957
+ }
958
+ renderDaysGrid(
959
+ /** Days to render */
960
+ days) {
961
+ return (h("div", { class: "days-grid" }, days.map(day => {
962
+ const date = day.date;
963
+ if (!date)
964
+ return null;
965
+ const isSelected = this.selectionType === 'single' &&
966
+ this.isSameDate(date, this.selectedDate);
967
+ const isInRange = this.isDateInRange(date);
968
+ const isStart = this.isSameDate(date, this.startDate);
969
+ const isEnd = this.isSameDate(date, this.endDate);
970
+ const isToday = this.isToday(date);
971
+ const isOutsideMonth = !day.isCurrentMonth;
972
+ const dayClasses = [
973
+ 'day',
974
+ isSelected ? 'selected' : '',
975
+ isStart ? 'range-start' : '',
976
+ isEnd ? 'range-end' : '',
977
+ isInRange ? 'in-range' : '',
978
+ day.isDisabled ? 'disabled' : '',
979
+ isOutsideMonth ? 'outside-month' : '',
980
+ isToday ? 'is-today' : '',
981
+ ];
982
+ return (h("div", { class: dayClasses.filter(Boolean).join(' '), onClick: this.getDayClickHandler(date, day.isDisabled), "aria-disabled": day.isDisabled, key: `day-${date.toISOString()}` }, day.dayOfMonth));
983
+ })));
984
+ }
985
+ /**
986
+ * Renders the calendar
987
+ * @param {number} index - Calendar index
988
+ * @param {number} offset - Month offset
989
+ * @returns {JSX.Element} Calendar
990
+ * @description Renders the calendar of the calendar
991
+ */
992
+ renderCalendar(
993
+ /** Calendar index */
994
+ index,
995
+ /** Month offset */
996
+ offset) {
997
+ const days = this.getDaysInMonth(offset, this.numberOfCalendars);
998
+ const weeks = [];
999
+ for (let i = 0; i < days.length; i += 7) {
1000
+ weeks.push(days.slice(i, i + 7));
1001
+ }
1002
+ return (h("div", { class: "calendar-wrapper" }, h("div", { class: "calendar-container", key: `calendar-${index}` }, this.renderHeader(offset, index), h("div", { class: "calendar-grid" }, this.showWeekNumbers && this.renderWeekNumbers(weeks, index), h("div", { class: "days-container" }, h("div", { class: "days-header" }, this.getDayNames().map(day => (h("div", { class: "day-header" }, day)))), this.renderDaysGrid(days)))), index < this.numberOfCalendars - 1 && (h("div", { class: "calendar-separator" }))));
1003
+ }
1004
+ /**
1005
+ * Renders the shortcuts
1006
+ * @returns {JSX.Element} Shortcuts
1007
+ * @description Renders the shortcuts of the calendar
1008
+ */
1009
+ renderShortcuts() {
1010
+ if (!this.parsedShortcuts().length) {
1011
+ return null;
1012
+ }
1013
+ return (h("div", { class: `shortcuts-container shortcuts-placement-${this.shortcutsPlacement}` }, this.parsedShortcuts().map(shortcut => (h("nv-button", { emphasis: "lower", size: "xs", "aria-label": shortcut.label, onClick: this.getShortcutHandler(shortcut) }, shortcut.label)))));
1014
+ }
1015
+ /**
1016
+ * Renders the actions
1017
+ * @returns {JSX.Element} Actions
1018
+ * @description Renders the actions of the calendar
1019
+ * @slot actions - Child content of the component.
1020
+ */
1021
+ renderActions() {
1022
+ return (h("div", { class: "datepicker-actions" }, h("slot", { name: "actions" }, h("nv-button", { emphasis: "low", size: "sm", onClick: this.resetSelection }, "Cancel"), h("nv-button", { size: "sm", onClick: this.confirmSelection }, "OK"))));
1023
+ }
1024
+ /**
1025
+ * Renders the datepicker
1026
+ * @returns {JSX.Element} Datepicker
1027
+ * @description Renders the datepicker of the calendar
1028
+ * @slot default - Child content of the component.
1029
+ */
1030
+ render() {
1031
+ return (h(Host, { key: 'f7835b1457300a2faddc249b426c07a7a0269783' }, h("div", { key: '2e064a4abdda98fd60707ee2fac75bfe13214655', class: "datepicker-root" }, h("div", { key: '5041c7cc3efae4aa27194be09d3f8814f134b4c8', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, h("div", { key: '8f622f0ec26ab2caf7edd4a05da6b00aabd9c472', 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.hasActions) && (h("div", { key: '908067dd983f9e27fd80b475767d464fe192d245', class: "datepicker-controls" }, this.hasShortcuts && this.renderShortcuts(), this.hasActions && this.renderActions())))), h("slot", { key: 'd27b083edc68386b6b9f0bf048b15fb36b75dcd0' })));
1032
+ }
1033
+ get el() { return this; }
1034
+ static get watchers() { return {
1035
+ "numberOfCalendars": ["validateNumberOfCalendars"],
1036
+ "rangeValue": ["onRangeValueChange"],
1037
+ "disabledDates": ["handleDisabledDatesChange"],
1038
+ "singleValue": ["onSingleValueChange"]
1039
+ }; }
1040
+ static get style() { return NvCalendarStyle0; }
1041
+ }, [4, "nv-calendar", {
1042
+ "firstDayOfWeek": [514, "first-day-of-week"],
1043
+ "numberOfCalendars": [1538, "number-of-calendars"],
1044
+ "singleValue": [1537, "single-value"],
1045
+ "rangeValue": [1537, "range-value"],
1046
+ "min": [513],
1047
+ "max": [513],
1048
+ "disabledDates": [513, "disabled-dates"],
1049
+ "locale": [513],
1050
+ "dateFormat": [513, "date-format"],
1051
+ "shortcutsPlacement": [513, "shortcuts-placement"],
1052
+ "selectionType": [513, "selection-type"],
1053
+ "showActions": [516, "show-actions"],
1054
+ "shortcuts": [513],
1055
+ "showWeekNumbers": [516, "show-week-numbers"],
1056
+ "currentDate": [32],
1057
+ "selectedDate": [32],
1058
+ "startDate": [32],
1059
+ "endDate": [32],
1060
+ "months": [32]
1061
+ }, undefined, {
1062
+ "numberOfCalendars": ["validateNumberOfCalendars"],
1063
+ "rangeValue": ["onRangeValueChange"],
1064
+ "disabledDates": ["handleDisabledDatesChange"],
1065
+ "singleValue": ["onSingleValueChange"]
1066
+ }]);
1067
+ function defineCustomElement() {
1068
+ if (typeof customElements === "undefined") {
1069
+ return;
1070
+ }
1071
+ const components = ["nv-calendar", "nv-button", "nv-icon", "nv-iconbutton", "nv-loader"];
1072
+ components.forEach(tagName => { switch (tagName) {
1073
+ case "nv-calendar":
1074
+ if (!customElements.get(tagName)) {
1075
+ customElements.define(tagName, NvCalendar);
1076
+ }
1077
+ break;
1078
+ case "nv-button":
1079
+ if (!customElements.get(tagName)) {
1080
+ defineCustomElement$4();
1081
+ }
1082
+ break;
1083
+ case "nv-icon":
1084
+ if (!customElements.get(tagName)) {
1085
+ defineCustomElement$3();
1086
+ }
1087
+ break;
1088
+ case "nv-iconbutton":
1089
+ if (!customElements.get(tagName)) {
1090
+ defineCustomElement$2();
1091
+ }
1092
+ break;
1093
+ case "nv-loader":
1094
+ if (!customElements.get(tagName)) {
1095
+ defineCustomElement$1();
1096
+ }
1097
+ break;
1098
+ } });
1099
+ }
1100
+ defineCustomElement();
1101
+
1102
+ export { NvCalendar as N, commonjsGlobal as c, defineCustomElement as d, getDefaultExportFromCjs as g };
1103
+
1104
+ //# sourceMappingURL=p-3aa6f6dc.js.map