@nova-design-system/nova-webcomponents 3.18.0 → 3.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/dist/cjs/index.cjs.js +13 -0
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/native.cjs.js +1 -1
  5. package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
  6. package/dist/cjs/nv-fielddate.cjs.entry.js +10 -6
  7. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nv-fielddaterange.cjs.entry.js +11 -7
  9. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nv-fielddropdown.cjs.entry.js +193 -209
  11. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  12. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +7 -4
  13. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +4 -0
  15. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
  17. package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
  18. package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
  19. package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
  20. package/dist/cjs/nv-fieldslider.cjs.entry.js +3 -3
  21. package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
  22. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
  23. package/dist/cjs/nv-fieldtime.cjs.entry.js +4 -3
  24. package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
  25. package/dist/cjs/nv-icon.cjs.entry.js +2 -2
  26. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  27. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
  28. package/dist/cjs/nv-menu.cjs.entry.js +2 -2
  29. package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  31. package/dist/cjs/nv-notification.cjs.entry.js +1 -1
  32. package/dist/cjs/nv-notificationcontainer.cjs.entry.js +1 -1
  33. package/dist/cjs/nv-popover.cjs.entry.js +2 -2
  34. package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
  35. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  36. package/dist/cjs/nv-split.cjs.entry.js +1 -1
  37. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  38. package/dist/cjs/nv-table.cjs.entry.js +1 -1
  39. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  40. package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
  41. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
  42. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  43. package/dist/collection/components/nv-fielddate/nv-fielddate.js +10 -6
  44. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  45. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +10 -6
  46. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  47. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +2 -0
  48. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +31 -13
  49. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  50. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +310 -245
  51. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  52. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +29 -6
  53. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js.map +1 -1
  54. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  55. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +4 -0
  56. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  57. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
  58. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
  59. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  60. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
  61. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
  62. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
  63. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  64. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +4 -3
  65. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
  66. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  67. package/dist/collection/components/nv-icon/nv-icons.js +13 -0
  68. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  69. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  70. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  71. package/dist/collection/components/nv-menu/nv-menu.js +3 -3
  72. package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
  73. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  74. package/dist/collection/components/nv-notification/nv-notification.js +1 -1
  75. package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +1 -1
  76. package/dist/collection/components/nv-popover/nv-popover.js +2 -2
  77. package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
  78. package/dist/collection/components/nv-row/nv-row.js +1 -1
  79. package/dist/collection/components/nv-split/nv-split.js +1 -1
  80. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  81. package/dist/collection/components/nv-table/nv-table.js +1 -1
  82. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  83. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
  84. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
  85. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  86. package/dist/components/index.js +13 -0
  87. package/dist/components/index.js.map +1 -1
  88. package/dist/components/nv-accordion-item.js +1 -1
  89. package/dist/components/nv-accordion.js +4 -4
  90. package/dist/components/nv-alert.js +1 -1
  91. package/dist/components/nv-avatar.js +1 -1
  92. package/dist/components/nv-badge.js +1 -1
  93. package/dist/components/nv-breadcrumb.js +2 -2
  94. package/dist/components/nv-button.js +1 -1
  95. package/dist/components/nv-datagrid.js +2 -2
  96. package/dist/components/nv-dialog.js +4 -4
  97. package/dist/components/nv-dialogfooter.js +1 -1
  98. package/dist/components/nv-fielddate.js +14 -10
  99. package/dist/components/nv-fielddate.js.map +1 -1
  100. package/dist/components/nv-fielddaterange.js +15 -11
  101. package/dist/components/nv-fielddaterange.js.map +1 -1
  102. package/dist/components/nv-fielddropdown.js +207 -220
  103. package/dist/components/nv-fielddropdown.js.map +1 -1
  104. package/dist/components/nv-fielddropdownitem.js +1 -1
  105. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  106. package/dist/components/nv-fieldmultiselect.js +10 -6
  107. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  108. package/dist/components/nv-fieldnumber.js +1 -1
  109. package/dist/components/nv-fieldpassword.js +6 -6
  110. package/dist/components/nv-fieldradio.js +3 -3
  111. package/dist/components/nv-fieldselect.js +8 -8
  112. package/dist/components/nv-fieldslider.js +7 -7
  113. package/dist/components/nv-fieldtext.js +1 -1
  114. package/dist/components/nv-fieldtextarea.js +3 -3
  115. package/dist/components/nv-fieldtime.js +8 -7
  116. package/dist/components/nv-fieldtime.js.map +1 -1
  117. package/dist/components/nv-icon.js +1 -1
  118. package/dist/components/nv-iconbutton.js +1 -1
  119. package/dist/components/nv-loader.js +1 -1
  120. package/dist/components/nv-menu.js +5 -5
  121. package/dist/components/nv-menu.js.map +1 -1
  122. package/dist/components/nv-menuitem.js +1 -1
  123. package/dist/components/nv-notification.js +2 -2
  124. package/dist/components/nv-notificationcontainer.js +1 -1
  125. package/dist/components/nv-popover.js +1 -1
  126. package/dist/components/nv-row.js +1 -1
  127. package/dist/components/nv-split.js +1 -1
  128. package/dist/components/nv-stack.js +1 -1
  129. package/dist/components/nv-table.js +1 -1
  130. package/dist/components/nv-toggle.js +2 -2
  131. package/dist/components/nv-togglebutton.js +1 -1
  132. package/dist/components/nv-togglebuttongroup.js +1 -1
  133. package/dist/components/nv-tooltip.js +1 -1
  134. package/dist/components/{p-015330b8.js → p-18f50d91.js} +2 -2
  135. package/dist/components/{p-015330b8.js.map → p-18f50d91.js.map} +1 -1
  136. package/dist/components/{p-c981bb48.js → p-222136c2.js} +2 -2
  137. package/dist/components/{p-c981bb48.js.map → p-222136c2.js.map} +1 -1
  138. package/dist/components/{p-fca4d85b.js → p-2ac6f42d.js} +3 -3
  139. package/dist/components/{p-fca4d85b.js.map → p-2ac6f42d.js.map} +1 -1
  140. package/dist/components/{p-fabbaf47.js → p-334e19d3.js} +4 -4
  141. package/dist/components/{p-fabbaf47.js.map → p-334e19d3.js.map} +1 -1
  142. package/dist/components/{p-5e315239.js → p-45a3cf85.js} +11 -7
  143. package/dist/components/p-45a3cf85.js.map +1 -0
  144. package/dist/components/{p-ebfecbaa.js → p-4799b6c3.js} +3 -3
  145. package/dist/components/p-4799b6c3.js.map +1 -0
  146. package/dist/components/{p-4cd6f629.js → p-49205084.js} +5 -5
  147. package/dist/components/{p-4cd6f629.js.map → p-49205084.js.map} +1 -1
  148. package/dist/components/{p-6ca3d847.js → p-5a5db065.js} +4 -4
  149. package/dist/components/{p-6ca3d847.js.map → p-5a5db065.js.map} +1 -1
  150. package/dist/components/{p-1bd396b1.js → p-60083982.js} +4 -4
  151. package/dist/components/{p-1bd396b1.js.map → p-60083982.js.map} +1 -1
  152. package/dist/components/{p-ea45f1ab.js → p-81d915ef.js} +3 -3
  153. package/dist/components/{p-ea45f1ab.js.map → p-81d915ef.js.map} +1 -1
  154. package/dist/components/p-946a047c.js +88 -0
  155. package/dist/components/p-946a047c.js.map +1 -0
  156. package/dist/components/{p-715e5235.js → p-a6c29711.js} +2 -2
  157. package/dist/components/{p-715e5235.js.map → p-a6c29711.js.map} +1 -1
  158. package/dist/components/{p-d1b02966.js → p-e0eb748c.js} +7 -7
  159. package/dist/components/{p-d1b02966.js.map → p-e0eb748c.js.map} +1 -1
  160. package/dist/components/{p-2574f8c2.js → p-e1b2eba2.js} +2 -2
  161. package/dist/components/{p-2574f8c2.js.map → p-e1b2eba2.js.map} +1 -1
  162. package/dist/esm/index.js +13 -0
  163. package/dist/esm/index.js.map +1 -1
  164. package/dist/esm/loader.js +1 -1
  165. package/dist/esm/native.js +1 -1
  166. package/dist/esm/nv-badge_2.entry.js +1 -1
  167. package/dist/esm/nv-fielddate.entry.js +10 -6
  168. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  169. package/dist/esm/nv-fielddaterange.entry.js +11 -7
  170. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  171. package/dist/esm/nv-fielddropdown.entry.js +193 -209
  172. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  173. package/dist/esm/nv-fielddropdownitem.entry.js +7 -4
  174. package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
  175. package/dist/esm/nv-fieldmultiselect.entry.js +4 -0
  176. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  177. package/dist/esm/nv-fieldnumber.entry.js +3 -3
  178. package/dist/esm/nv-fieldpassword.entry.js +3 -3
  179. package/dist/esm/nv-fieldradio.entry.js +3 -3
  180. package/dist/esm/nv-fieldselect.entry.js +5 -5
  181. package/dist/esm/nv-fieldslider.entry.js +3 -3
  182. package/dist/esm/nv-fieldtext.entry.js +3 -3
  183. package/dist/esm/nv-fieldtextarea.entry.js +3 -3
  184. package/dist/esm/nv-fieldtime.entry.js +4 -3
  185. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  186. package/dist/esm/nv-icon.entry.js +2 -2
  187. package/dist/esm/nv-icon.entry.js.map +1 -1
  188. package/dist/esm/nv-iconbutton_2.entry.js +2 -2
  189. package/dist/esm/nv-menu.entry.js +2 -2
  190. package/dist/esm/nv-menu.entry.js.map +1 -1
  191. package/dist/esm/nv-menuitem.entry.js +1 -1
  192. package/dist/esm/nv-notification.entry.js +1 -1
  193. package/dist/esm/nv-notificationcontainer.entry.js +1 -1
  194. package/dist/esm/nv-popover.entry.js +2 -2
  195. package/dist/esm/nv-popover.entry.js.map +1 -1
  196. package/dist/esm/nv-row.entry.js +1 -1
  197. package/dist/esm/nv-split.entry.js +1 -1
  198. package/dist/esm/nv-stack.entry.js +1 -1
  199. package/dist/esm/nv-table.entry.js +1 -1
  200. package/dist/esm/nv-toggle.entry.js +2 -2
  201. package/dist/esm/nv-togglebutton.entry.js +1 -1
  202. package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
  203. package/dist/esm/nv-tooltip.entry.js +1 -1
  204. package/dist/native/index.esm.js +1 -1
  205. package/dist/native/index.esm.js.map +1 -1
  206. package/dist/native/native.esm.js +1 -1
  207. package/dist/native/native.esm.js.map +1 -1
  208. package/dist/native/{p-acada158.entry.js → p-0177409b.entry.js} +2 -2
  209. package/dist/native/{p-14d2f70a.entry.js → p-075d231e.entry.js} +2 -2
  210. package/dist/native/{p-d878e90a.entry.js → p-144d0f8a.entry.js} +2 -2
  211. package/dist/native/p-144d0f8a.entry.js.map +1 -0
  212. package/dist/native/{p-b4c15f25.entry.js → p-17666092.entry.js} +2 -2
  213. package/dist/native/{p-107e80c6.entry.js → p-218135b1.entry.js} +2 -2
  214. package/dist/native/p-218135b1.entry.js.map +1 -0
  215. package/dist/native/p-2a7f80f4.entry.js +2 -0
  216. package/dist/native/p-2a7f80f4.entry.js.map +1 -0
  217. package/dist/native/{p-e5b7ce4e.entry.js → p-445221dc.entry.js} +2 -2
  218. package/dist/native/{p-4e6fb719.entry.js → p-44a78545.entry.js} +2 -2
  219. package/dist/native/p-57420a2f.entry.js +2 -0
  220. package/dist/native/{p-5c678bc7.entry.js → p-587d94f3.entry.js} +2 -2
  221. package/dist/native/{p-95184ea2.entry.js → p-6a418ec4.entry.js} +2 -2
  222. package/dist/native/{p-5039ceb8.entry.js → p-859bf9ad.entry.js} +2 -2
  223. package/dist/native/{p-5039ceb8.entry.js.map → p-859bf9ad.entry.js.map} +1 -1
  224. package/dist/native/{p-ae43eee2.entry.js → p-9950e075.entry.js} +2 -2
  225. package/dist/native/{p-ad029453.entry.js → p-9c432751.entry.js} +2 -2
  226. package/dist/native/{p-8c053954.entry.js → p-a026654f.entry.js} +2 -2
  227. package/dist/native/p-a026654f.entry.js.map +1 -0
  228. package/dist/native/{p-417fba7d.entry.js → p-a2f58133.entry.js} +2 -2
  229. package/dist/native/{p-3464b86a.entry.js → p-b02c896a.entry.js} +2 -2
  230. package/dist/native/{p-9613087c.entry.js → p-b4382c94.entry.js} +2 -2
  231. package/dist/native/{p-835abdb9.entry.js → p-b626ef47.entry.js} +2 -2
  232. package/dist/native/{p-23ee0384.entry.js → p-c0de4bb0.entry.js} +2 -2
  233. package/dist/native/{p-5f98d4cd.entry.js → p-c9fea0df.entry.js} +2 -2
  234. package/dist/native/{p-5f98d4cd.entry.js.map → p-c9fea0df.entry.js.map} +1 -1
  235. package/dist/native/{p-ca39f78d.entry.js → p-d62869ff.entry.js} +2 -2
  236. package/dist/native/p-d63689da.entry.js +2 -0
  237. package/dist/native/p-d63689da.entry.js.map +1 -0
  238. package/dist/native/p-d8f3cf92.entry.js +2 -0
  239. package/dist/native/p-d8f3cf92.entry.js.map +1 -0
  240. package/dist/native/{p-539666dd.entry.js → p-dfb6b65e.entry.js} +2 -2
  241. package/dist/native/{p-230af58a.entry.js → p-e6f24210.entry.js} +2 -2
  242. package/dist/native/p-e6f24210.entry.js.map +1 -0
  243. package/dist/native/{p-da2060a5.entry.js → p-eb74feb7.entry.js} +2 -2
  244. package/dist/native/{p-6d427897.entry.js → p-fa3e588e.entry.js} +2 -2
  245. package/dist/native/{p-112d096c.entry.js → p-fffbd3c1.entry.js} +2 -2
  246. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +54 -35
  247. package/dist/types/components/nv-fielddropdownitem/nv-fielddropdownitem.d.ts +7 -0
  248. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  249. package/dist/types/components.d.ts +59 -13
  250. package/dist/vscode-data.json +50 -3
  251. package/hydrate/index.js +283 -279
  252. package/hydrate/index.mjs +283 -279
  253. package/package.json +1 -1
  254. package/dist/components/p-5e315239.js.map +0 -1
  255. package/dist/components/p-ebfecbaa.js.map +0 -1
  256. package/dist/components/p-ed43bcec.js +0 -88
  257. package/dist/components/p-ed43bcec.js.map +0 -1
  258. package/dist/native/p-00d1e5e1.entry.js +0 -2
  259. package/dist/native/p-00d1e5e1.entry.js.map +0 -1
  260. package/dist/native/p-107e80c6.entry.js.map +0 -1
  261. package/dist/native/p-230af58a.entry.js.map +0 -1
  262. package/dist/native/p-5e70f9ce.entry.js +0 -2
  263. package/dist/native/p-8c053954.entry.js.map +0 -1
  264. package/dist/native/p-b72b5e88.entry.js +0 -2
  265. package/dist/native/p-b72b5e88.entry.js.map +0 -1
  266. package/dist/native/p-d7f444fb.entry.js +0 -2
  267. package/dist/native/p-d7f444fb.entry.js.map +0 -1
  268. package/dist/native/p-d878e90a.entry.js.map +0 -1
  269. /package/dist/native/{p-acada158.entry.js.map → p-0177409b.entry.js.map} +0 -0
  270. /package/dist/native/{p-14d2f70a.entry.js.map → p-075d231e.entry.js.map} +0 -0
  271. /package/dist/native/{p-b4c15f25.entry.js.map → p-17666092.entry.js.map} +0 -0
  272. /package/dist/native/{p-e5b7ce4e.entry.js.map → p-445221dc.entry.js.map} +0 -0
  273. /package/dist/native/{p-4e6fb719.entry.js.map → p-44a78545.entry.js.map} +0 -0
  274. /package/dist/native/{p-5e70f9ce.entry.js.map → p-57420a2f.entry.js.map} +0 -0
  275. /package/dist/native/{p-5c678bc7.entry.js.map → p-587d94f3.entry.js.map} +0 -0
  276. /package/dist/native/{p-95184ea2.entry.js.map → p-6a418ec4.entry.js.map} +0 -0
  277. /package/dist/native/{p-ae43eee2.entry.js.map → p-9950e075.entry.js.map} +0 -0
  278. /package/dist/native/{p-ad029453.entry.js.map → p-9c432751.entry.js.map} +0 -0
  279. /package/dist/native/{p-417fba7d.entry.js.map → p-a2f58133.entry.js.map} +0 -0
  280. /package/dist/native/{p-3464b86a.entry.js.map → p-b02c896a.entry.js.map} +0 -0
  281. /package/dist/native/{p-9613087c.entry.js.map → p-b4382c94.entry.js.map} +0 -0
  282. /package/dist/native/{p-835abdb9.entry.js.map → p-b626ef47.entry.js.map} +0 -0
  283. /package/dist/native/{p-23ee0384.entry.js.map → p-c0de4bb0.entry.js.map} +0 -0
  284. /package/dist/native/{p-ca39f78d.entry.js.map → p-d62869ff.entry.js.map} +0 -0
  285. /package/dist/native/{p-539666dd.entry.js.map → p-dfb6b65e.entry.js.map} +0 -0
  286. /package/dist/native/{p-da2060a5.entry.js.map → p-eb74feb7.entry.js.map} +0 -0
  287. /package/dist/native/{p-6d427897.entry.js.map → p-fa3e588e.entry.js.map} +0 -0
  288. /package/dist/native/{p-112d096c.entry.js.map → p-fffbd3c1.entry.js.map} +0 -0
@@ -14,7 +14,7 @@ const NvRow = class {
14
14
  /****************************************************************************/
15
15
  //#region RENDER
16
16
  render() {
17
- return (index.h(index.Host, { key: '664375922c55485e6b297f0e64950db684ecffa3' }, index.h("slot", { key: '194e45ce439cadb2bdba17072070d3926a746d3f' })));
17
+ return (index.h(index.Host, { key: '7349317dfee793dd34ceab919bae6155811f25f4' }, index.h("slot", { key: '0b31cf4d03d1057ec6f02b65b0ace85ee390cbc4' })));
18
18
  }
19
19
  };
20
20
  NvRow.style = NvRowStyle0;
@@ -324,7 +324,7 @@ const NvSplit = class {
324
324
  /****************************************************************************/
325
325
  //#region RENDER
326
326
  render() {
327
- return (index.h(index.Host, { key: 'b0874368ed8b3c1b5cd0676a1c8181e827369ad7', "data-dragging": this.isDragging.toString() }, index.h("slot", { key: 'a0e35a851390bf1f0ffcf065fdeb23cba3c75c9c', name: "pane" }), index.h("slot", { key: 'a80dbbc4862c3a30aac9e89d6b80a19245083c42', name: "gutter" })));
327
+ return (index.h(index.Host, { key: 'd0bcb4330d157fa239289fa7176c502bfe01d0b8', "data-dragging": this.isDragging.toString() }, index.h("slot", { key: '490799f805f0833e5a33b480e205c8deb65f215b', name: "pane" }), index.h("slot", { key: '69d05ed6f6bbeac1f123ac100c753cf78ced3f08', name: "gutter" })));
328
328
  }
329
329
  get el() { return index.getElement(this); }
330
330
  static get watchers() { return {
@@ -23,7 +23,7 @@ const NvStack = class {
23
23
  /****************************************************************************/
24
24
  //#region RENDER
25
25
  render() {
26
- return (index.h(index.Host, { key: '66123f22ad4a6ebefe8663c795274eb900d2c178', class: clsx.clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, index.h("slot", { key: '7b3d395c3490664f0e2f337a04f69cc717ed6c0e' })));
26
+ return (index.h(index.Host, { key: '8f771805224c769b5a87f5c550ddbcb8f888d002', class: clsx.clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, index.h("slot", { key: '6fcd46cfd74415d2f07c762b065e3aa0f0194764' })));
27
27
  }
28
28
  };
29
29
  NvStack.style = NvStackStyle0;
@@ -236,7 +236,7 @@ const NvTable = class {
236
236
  /****************************************************************************/
237
237
  //#region RENDER
238
238
  render() {
239
- return (index.h(index.Host, { key: '37c5e773664fc7bc324d46c003057f322e118c0d' }, index.h("slot", { key: '28decbb3d75da3471a95d9130fdb8206df811270' })));
239
+ return (index.h(index.Host, { key: 'b63510e2da93a1b98eb3813ba7ac9bed97b81c1f' }, index.h("slot", { key: '14fb76c397db4da5dfba94bce599d1e4d8992a6b' })));
240
240
  }
241
241
  get host() { return index.getElement(this); }
242
242
  };
@@ -66,8 +66,8 @@ const NvToggle = class {
66
66
  /****************************************************************************/
67
67
  //#region RENDER
68
68
  render() {
69
- return (index.h(index.Host, { key: '3e1eecaddeab51801343663989a1554ae62794be', class: clsx.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: 'a67b9c8c0159d6b2a1f87d06d536116475fd9683', class: "input-container" }, index.h("input", { key: '2ce5d01313da8fe74cdac78616c051236aa3102e', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), index.h("div", { key: '0e7e1960fc3cd8ff1c79b3c8d4fc306e2b761bfc', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '0325700fc58d39878821a4b1871cb433eda18199', htmlFor: this.inputId, class: clsx.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '4b627dbbad2f52446a0ebb4eacdfe3d6d5ccdbb0', name: "label" }, this.label))), (this.description ||
70
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'db7d0a200c66e234142b455686afdd409337b336', class: "description" }, index.h("slot", { key: '171bb20b639a07bda52cb788fb367a51d6dbe7f8', name: "description" }, this.description))))));
69
+ return (index.h(index.Host, { key: '65222149af4edb9f8fd2da7efe9a01e15dec4722', class: clsx.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: '7edd5587281b5610269f1ac09826ce379abfae24', class: "input-container" }, index.h("input", { key: '30d3db3cbdc263259a5ba1bf8e637225c4db3b4a', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), index.h("div", { key: 'a8a6d3c2774560b7d43cda75882d90cc564f4c54', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'fe980a07df4901081fda42df758236da0b8a11d0', htmlFor: this.inputId, class: clsx.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '723cec5914c6c0bed7e14e61e2f64e83c8e8b7b8', name: "label" }, this.label))), (this.description ||
70
+ this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'f811065ed06f0816d8f0f1f65d4c659cbde3f683', class: "description" }, index.h("slot", { key: '541946e3f33a315bf667999c30a44fd93fc5f07f', name: "description" }, this.description))))));
71
71
  }
72
72
  static get formAssociated() { return true; }
73
73
  get el() { return index.getElement(this); }
@@ -48,7 +48,7 @@ const NvTogglebutton = class {
48
48
  /****************************************************************************/
49
49
  //#region RENDER
50
50
  render() {
51
- return (index.h(index.Host, { key: '6965d7bd520347f5236cca32ca674875a9a4fd2f', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: '45ddd14b67904252c2e78b6357fbd33790facf23' })));
51
+ return (index.h(index.Host, { key: 'c4b698b1fb80f0dcca5d7a77bc20d22db1cbf538', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: '605385f07f32b989685983cfd1a082525741fba4' })));
52
52
  }
53
53
  };
54
54
  NvTogglebutton.style = NvTogglebuttonStyle0;
@@ -156,7 +156,7 @@ const NvTogglebuttongroup = class {
156
156
  /****************************************************************************/
157
157
  //#region RENDER
158
158
  render() {
159
- return (index.h(index.Host, { key: '4e075360c060e6de5af80325f7b91e7573f89b16' }, index.h("slot", { key: '7b361c2d608b17cb91814d279aac842e666fda5a' })));
159
+ return (index.h(index.Host, { key: 'ab91ff1817e3388508ed1da7a9ed57a79cf8c4bc' }, index.h("slot", { key: '4a3280db78c1f0cd120a0cb32d95eabaf69995a6' })));
160
160
  }
161
161
  get el() { return index.getElement(this); }
162
162
  static get watchers() { return {
@@ -46,7 +46,7 @@ const NvTooltip = class {
46
46
  /****************************************************************************/
47
47
  //#region RENDER
48
48
  render() {
49
- return (index.h(index.Host, { key: 'bbf9407ca59c3e6122cbdc7c9e3aefe56b64311d' }, index.h("slot", { key: 'b13ae1307843e66cd018ce204c94147b53a26649' }), index.h("nv-popover", { key: '12d9bdca8d68eff93f6aa80304535df3be127c32', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, index.h("p", { key: '6f4e64e97cc644f9da030e30b1069150c47c2985', slot: "content" }, this.message), index.h("slot", { key: '2b55d3b0c1279ce0a8bf165be1b26fe854e91d47', name: "content" }))));
49
+ return (index.h(index.Host, { key: 'c2fdcd47be909554e31a3a7d77cd94dcb07c0d6e' }, index.h("slot", { key: '2305f6b7175d0ba84819351f60f2a4d76d117df9' }), index.h("nv-popover", { key: 'e388730b5858671d08981c6bbf72588a5084edbf', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, index.h("p", { key: '73f548a1c822f7c6d5a97bb4ef8da0d335cf049e', slot: "content" }, this.message), index.h("slot", { key: 'abb7a2dfa6a327122732802a867c5d4057fd1616', name: "content" }))));
50
50
  }
51
51
  get el() { return index.getElement(this); }
52
52
  };
@@ -346,6 +346,10 @@ export class NvFielddate {
346
346
  this.open = false;
347
347
  }
348
348
  handleKeyDown(event) {
349
+ if (event.key === 'Escape') {
350
+ this.open = false;
351
+ return;
352
+ }
349
353
  if (!this.open) {
350
354
  if (event.key === 'ArrowDown') {
351
355
  this.open = true;
@@ -364,13 +368,13 @@ export class NvFielddate {
364
368
  /****************************************************************************/
365
369
  //#region RENDER
366
370
  render() {
367
- return (h(Host, { key: '82eb2c86f3fe02b03a7db18d7ae4d7a705765af8' }, ((this.label && this.label.length > 0) ||
368
- this.el.querySelector('[slot="label"]')) && (h("label", { key: '8f8a341b986275fbcebbdc3a67541db0a7692b68', htmlFor: this.inputId }, h("slot", { key: 'bdab8a01ff5edc5b1b7490d33a7b526f5ee7e710', name: "label" }, this.label))), h("nv-popover", { key: 'af5379b7f23d7d297af947da515d1794ddf2efce', ref: this.setPopoverRef, id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", strategy: "fixed", open: this.open }, h("div", { key: 'a7cd18e088c59da8db3962c67fa9bda5e61d0113', slot: "trigger", class: "input-wrapper" }, h("slot", { key: '46031415f70467700b382081e769c664728df1e9', name: "before-input" }), h("div", { key: 'd92075a9db8ef0857d5d7e4b6f43ab89564eb3d1', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: 'ba368c298cf08b4b321c5d77a5af0bd7f265dcc2', name: "leading-input" }), h("input", { key: 'a384558958d5cb4943b17f2d032cc0022bb884dc', id: this.inputId, ref: this.setInputRef, placeholder: this.placeholder ||
369
- this.convertToInputmaskFormat(this.dateFormat), name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, onInput: this.handleInput, onFocus: this.handleFocus, "data-scope": "date" }), this.error && (h("nv-icon", { key: 'f3194332ca751ac320b18f6c1d4c888f9237ce58', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: 'dcb9385dfdac0e7b932b8227cf3a434bd4be71c3', name: "circle-check", class: "validation", size: "md" })), h("nv-iconbutton", { key: '9e6cf9f850c3602c8f12a717a2a71f260b260820', class: "toggle-calendar-icon", name: "calendar" //{this.open ? 'chevron-top' : 'chevron-down'}
371
+ return (h(Host, { key: '0ec615c05a7f830586f21a6e26a62cbbec4902b0' }, ((this.label && this.label.length > 0) ||
372
+ this.el.querySelector('[slot="label"]')) && (h("label", { key: '1b1814a4ab2ccef80d2ee641d2624397f6b953d1', htmlFor: this.inputId }, h("slot", { key: '853d2f3ef6561dd05ccd438c717a866a62f4791a', name: "label" }, this.label))), h("nv-popover", { key: '3259f86dbb8051a9ca10fe3a63b5716dc24b356e', ref: this.setPopoverRef, id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", strategy: "fixed", open: this.open }, h("div", { key: 'd6f40610224724396ce6a1b5857f6baa6b308172', slot: "trigger", class: "input-wrapper" }, h("slot", { key: '9736e07f75aff0c74d23198648f6266854c4f523', name: "before-input" }), h("div", { key: 'c7019e5f0c7a88458f3dc1759b4d7d1d5f098dc9', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '1c8fcc1f3cb6dfe5016f09780b5c4085eb53bf9b', name: "leading-input" }), h("input", { key: 'b1482ebabf4753dacb434774df3247c0ea9b885b', id: this.inputId, ref: this.setInputRef, placeholder: this.placeholder ||
373
+ this.convertToInputmaskFormat(this.dateFormat), name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, onInput: this.handleInput, onFocus: this.handleFocus, "data-scope": "date" }), this.error && (h("nv-icon", { key: '7a9448bd1aef0dcf95183651b07621cebdeec467', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: 'c7329b1feaca5f1bcdaae5e8398a6357bb228333', name: "circle-check", class: "validation", size: "md" })), h("nv-iconbutton", { key: 'd26593800bc0f65438906c576adbefabc841081a', class: "toggle-calendar-icon", name: "calendar" //{this.open ? 'chevron-top' : 'chevron-down'}
370
374
  ,
371
- size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), h("slot", { key: '1770575c9165c2a4947ffcc11403a72cb0649a19', name: "after-input" })), h("div", { key: '993bad8e8f0586e73bb35c3835e210c111f2e092', slot: "content" }, h("nv-calendar", { key: 'c3d4ac3ae966152ace53f2a23371bdd1c9ea9071', dateFormat: this.dateFormat, singleValue: this.singleValue, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, onValueChanged: this.handleCalendarValueChanged }))), ((this.description && this.description.length > 0) ||
372
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '843a383f5880332c41220dd0e52e4123207fc468', class: "description" }, h("slot", { key: '6adddd38bc5c3cc633eb953ce21f5ae45fd659f4', name: "description" }, this.description))), (this.errorDescription ||
373
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'e9715f6fb742cf2fa568cf6ba2c2657ad39de04a', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (h("slot", { name: "error-description" })) : (this.errorDescription))), h("slot", { key: '2ffea0b9384696a0b9d577c7c08c2faf93ef0917' })));
375
+ size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), h("slot", { key: '7308a0126263ca8f0182bfbbc5305d0392fe6187', name: "after-input" })), h("div", { key: '25f181caaa5fa66d0245de5d050f41f603bae804', slot: "content" }, h("nv-calendar", { key: '0ade256f483d9c7d3c7a3af47790646510a59c2e', dateFormat: this.dateFormat, singleValue: this.singleValue, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, onValueChanged: this.handleCalendarValueChanged }))), ((this.description && this.description.length > 0) ||
376
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: 'a6b011fb140ed508a9681e9dd0635261db705c7c', class: "description" }, h("slot", { key: 'dfffc39d6fd525a359ff72f1ccf263f1f2a57274', name: "description" }, this.description))), (this.errorDescription ||
377
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'd421e5bf8f9839ce636007864fddfb24bac43631', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (h("slot", { name: "error-description" })) : (this.errorDescription))), h("slot", { key: 'b8e8b003f1fca9a499ab276bf8717f018d33fbb5' })));
374
378
  }
375
379
  static get is() { return "nv-fielddate"; }
376
380
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fielddate.js","sourceRoot":"","sources":["../../../src/components/nv-fielddate/nv-fielddate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,CAAC,EACD,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EAEL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAiBpC;;;;;;;;;;GAUG;AAMH,MAAM,OAAO,WAAW;IALxB;QAUU,cAAS,GAAW,MAAM,EAAE,CAAC;QAErC,8EAA8E;QAC9E,oBAAoB;QAEpB;;;WAGG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA0BpC;;WAEG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;WAEG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;WAEG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;WAEG;QAEM,UAAK,GAAY,KAAK,CAAC;QAQhC;;WAEG;QAEM,YAAO,GAAY,KAAK,CAAC;QAElC;;WAEG;QAGM,cAAS,GAAY,KAAK,CAAC;QAEpC;;;WAGG;QAEH,UAAK,GAAW,EAAE,CAAC;QAEnB;;WAEG;QAEH,gBAAW,GAAW,EAAE,CAAC;QAEzB;;WAEG;QAEH,SAAI,GAAY,KAAK,CAAC;QAEtB;;;WAGG;QAEM,mBAAc,GAAW,CAAC,CAAC;QAEpC;;;WAGG;QAEM,sBAAiB,GAAW,CAAC,CAAC;QAEvC;;WAEG;QAEM,QAAG,GAAY,EAAE,CAAC;QAE3B;;WAEG;QAEM,QAAG,GAAY,EAAE,CAAC;QAE3B;;WAEG;Q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mitter,\n Listen,\n Host,\n Watch,\n Method,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * Extends HTMLInputElement to include the inputmask property.\n */\ninterface HTMLInputElementWithInputmask extends HTMLInputElement {\n /**\n * The inputmask instance that provides masking functionality.\n */\n inputmask?: {\n /**\n * Removes the inputmask instance.\n */\n remove?: () => void;\n };\n}\n\n/**\n * A field date component that combines an input with a calendar popover.\n *\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddate',\n styleUrl: 'styles/nv-fielddate.scss',\n shadow: false,\n})\nexport class NvFielddate {\n @Element() el: HTMLNvFielddateElement;\n private inputElement!: HTMLInputElement;\n\n private popoverElement!: HTMLNvPopoverElement;\n private popoverId: string = uuidv4();\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the input field.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Name attribute for the input.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Disables the input field.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets the input field as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the input (date in string format).\n * @bind value\n */\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the input date in string format.\n */\n @State()\n singleValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 1\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 1;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n * @note If the date format is in UTC mode, the date will be displayed in UTC time.\n * @note If the date format is not in UTC mode, the date will be displayed in the local time.\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n * @default true\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format.\n * @returns {string} Format adapted for Inputmask.\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The click event.\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Focuses the input when the input container is clicked.\n * @param {MouseEvent} event - The click event.\n */\n private handleInputContainerClick = (event: MouseEvent) => {\n // Stop propagation to prevent closing parent dialogs\n event.stopPropagation();\n\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n this.inputElement.focus();\n };\n\n /**\n * Handles the input event on the input element.\n * Updates internal state to keep UI in sync - events are only emitted on completion or clear.\n * @param {Event} event - The input event.\n */\n private handleInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update singleValue to keep state in sync\n this.singleValue = input.value;\n\n // Only emit event when input is cleared\n if (input.value === '') {\n this.value = '';\n this.valueChanged.emit('');\n }\n };\n\n /**\n * Handles focus events on the input element.\n * @param {FocusEvent} event - The focus event.\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n this.open = true;\n };\n\n /**\n * Prevents the valueChanged event from the calendar from propagating up.\n * @param {CustomEvent} event - The valueChanged event from nv-calendar.\n */\n private handleCalendarValueChanged = (event: CustomEvent) => {\n event.stopPropagation();\n };\n\n /**\n * Sets the reference to the popover element.\n * @param {HTMLNvPopoverElement} el - The popover element.\n */\n private setPopoverRef = (el: HTMLNvPopoverElement) => {\n this.popoverElement = el;\n };\n\n /**\n * Sets the reference to the input element.\n * @param {HTMLInputElement} el - The input element.\n */\n private setInputRef = (el: HTMLInputElement) => {\n this.inputElement = el;\n };\n\n /**\n * Toggles the opening/closing of the popover.\n * @param {MouseEvent} event - The click event.\n */\n private toggleCalendar = (event: MouseEvent) => {\n if (this.readonly || this.disabled) {\n return;\n }\n // Stop propagation to prevent closing parent dialogs\n event.stopPropagation();\n this.open = !this.open;\n };\n\n /**\n * Clears the current selection and resets the field to its initial state.\n * This method can be called programmatically to reset the field.\n */\n @Method()\n async clear(): Promise<void> {\n // Reset internal state\n this.singleValue = '';\n this.value = '';\n\n // Reset the input element value\n if (this.inputElement) {\n this.inputElement.value = '';\n // Remove the input mask and reinitialize if needed\n if ((this.inputElement as HTMLInputElementWithInputmask).inputmask) {\n (this.inputElement as HTMLInputElementWithInputmask).inputmask.remove();\n }\n }\n\n // Emit events to notify about the change\n this.valueChanged.emit('');\n\n // Close the popover if open\n this.open = false;\n }\n\n private updateMask() {\n if (!this.inputElement) return;\n (this.inputElement as HTMLInputElementWithInputmask).inputmask?.remove?.();\n\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: true,\n clearMaskOnLostFocus: !this.open,\n postValidation: true,\n oncomplete: (e: CustomEvent) => {\n const newValue = (e.target as HTMLInputElement)?.value;\n // Only emit if the value actually changed\n if (this.value !== newValue) {\n this.singleValue = newValue;\n this.value = newValue;\n this.valueChanged.emit(newValue);\n }\n },\n });\n inputMask.mask(this.inputElement);\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n this.singleValue = this.value;\n }\n }\n\n componentDidLoad() {\n this.updateMask();\n\n // Set the initial value after applying the mask\n if (this.inputElement.name === this.name && this.singleValue) {\n requestAnimationFrame(() => {\n this.inputElement.value = this.singleValue;\n const event = new CustomEvent('input', { bubbles: true });\n this.inputElement.dispatchEvent(event);\n });\n }\n }\n\n componentDidRender() {\n // Only set value on initial render when there's no existing value in the input\n if (this.singleValue && this.inputElement && !this.inputElement.value) {\n requestAnimationFrame(() => {\n this.inputElement.value = this.singleValue;\n this.inputElement.setAttribute('value', this.singleValue);\n });\n }\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n if (\n this.inputElement &&\n (this.inputElement as HTMLInputElementWithInputmask).inputmask\n ) {\n (this.inputElement as HTMLInputElementWithInputmask).inputmask.remove();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the value changes (unified value binding).\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.singleValue = newValue;\n // Only set input value if it's different from current input value\n // This prevents interfering with user typing\n if (this.inputElement && this.inputElement.value !== newValue) {\n this.inputElement.value = newValue;\n }\n }\n\n @Watch('open')\n handleOpenChange(newOpen: boolean) {\n this.updateMask();\n\n // Additional side effect for external control, e.g., focus calendar if opened externally\n if (newOpen && this.popoverElement) {\n // Focus first selectable date\n const firstDate = this.popoverElement.querySelector(\n 'nv-calendar [data-date]',\n );\n if (firstDate) (firstDate as HTMLElement).focus();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LISTENERS\n\n /**\n * Handles the single date selection event from nv-calendar.\n * Updates the input value and closes the popover.\n * @param {CustomEvent} event - The event from nv-calendar.\n */\n @Listen('singleDateChange')\n handleSingleDateChange(event: CustomEvent) {\n const value: string = event.detail;\n const previousValue = this.value;\n this.singleValue = value;\n this.value = value;\n\n // Set the input value directly when calendar is used\n if (this.inputElement) {\n this.inputElement.value = value;\n }\n\n // Only emit valueChanged if the value actually changed\n if (previousValue !== value) {\n this.valueChanged.emit(value);\n }\n if (!this.showActions) {\n this.open = false;\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n // Verify if the popover element is defined\n if (!this.popoverElement) {\n console.warn('nv-fielddate -> Popover element is not defined');\n return;\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={this.setPopoverRef}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n strategy=\"fixed\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={this.setInputRef}\n placeholder={\n this.placeholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.name}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n data-scope=\"date\"\n />\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\" //{this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n dateFormat={this.dateFormat}\n singleValue={this.singleValue}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n onValueChanged={this.handleCalendarValueChanged}\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
1
+ {"version":3,"file":"nv-fielddate.js","sourceRoot":"","sources":["../../../src/components/nv-fielddate/nv-fielddate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,CAAC,EACD,IAAI,EACJ,KAAK,E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xD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IAChD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC,CACrD,YAAM,IAAI,EAAC,mBAAmB,GAAQ,CACvC,CAAC,CAAC,CAAC,CACF,IAAI,CAAC,gBAAgB,CACtB,CACG,CACP;YAED,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n Method,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * Extends HTMLInputElement to include the inputmask property.\n */\ninterface HTMLInputElementWithInputmask extends HTMLInputElement {\n /**\n * The inputmask instance that provides masking functionality.\n */\n inputmask?: {\n /**\n * Removes the inputmask instance.\n */\n remove?: () => void;\n };\n}\n\n/**\n * A field date component that combines an input with a calendar popover.\n *\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddate',\n styleUrl: 'styles/nv-fielddate.scss',\n shadow: false,\n})\nexport class NvFielddate {\n @Element() el: HTMLNvFielddateElement;\n private inputElement!: HTMLInputElement;\n\n private popoverElement!: HTMLNvPopoverElement;\n private popoverId: string = uuidv4();\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the input field.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Name attribute for the input.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Disables the input field.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets the input field as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the input (date in string format).\n * @bind value\n */\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the input date in string format.\n */\n @State()\n singleValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 1\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 1;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n * @note If the date format is in UTC mode, the date will be displayed in UTC time.\n * @note If the date format is not in UTC mode, the date will be displayed in the local time.\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n * @default true\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format.\n * @returns {string} Format adapted for Inputmask.\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The click event.\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Focuses the input when the input container is clicked.\n * @param {MouseEvent} event - The click event.\n */\n private handleInputContainerClick = (event: MouseEvent) => {\n // Stop propagation to prevent closing parent dialogs\n event.stopPropagation();\n\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n this.inputElement.focus();\n };\n\n /**\n * Handles the input event on the input element.\n * Updates internal state to keep UI in sync - events are only emitted on completion or clear.\n * @param {Event} event - The input event.\n */\n private handleInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update singleValue to keep state in sync\n this.singleValue = input.value;\n\n // Only emit event when input is cleared\n if (input.value === '') {\n this.value = '';\n this.valueChanged.emit('');\n }\n };\n\n /**\n * Handles focus events on the input element.\n * @param {FocusEvent} event - The focus event.\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n this.open = true;\n };\n\n /**\n * Prevents the valueChanged event from the calendar from propagating up.\n * @param {CustomEvent} event - The valueChanged event from nv-calendar.\n */\n private handleCalendarValueChanged = (event: CustomEvent) => {\n event.stopPropagation();\n };\n\n /**\n * Sets the reference to the popover element.\n * @param {HTMLNvPopoverElement} el - The popover element.\n */\n private setPopoverRef = (el: HTMLNvPopoverElement) => {\n this.popoverElement = el;\n };\n\n /**\n * Sets the reference to the input element.\n * @param {HTMLInputElement} el - The input element.\n */\n private setInputRef = (el: HTMLInputElement) => {\n this.inputElement = el;\n };\n\n /**\n * Toggles the opening/closing of the popover.\n * @param {MouseEvent} event - The click event.\n */\n private toggleCalendar = (event: MouseEvent) => {\n if (this.readonly || this.disabled) {\n return;\n }\n // Stop propagation to prevent closing parent dialogs\n event.stopPropagation();\n this.open = !this.open;\n };\n\n /**\n * Clears the current selection and resets the field to its initial state.\n * This method can be called programmatically to reset the field.\n */\n @Method()\n async clear(): Promise<void> {\n // Reset internal state\n this.singleValue = '';\n this.value = '';\n\n // Reset the input element value\n if (this.inputElement) {\n this.inputElement.value = '';\n // Remove the input mask and reinitialize if needed\n if ((this.inputElement as HTMLInputElementWithInputmask).inputmask) {\n (this.inputElement as HTMLInputElementWithInputmask).inputmask.remove();\n }\n }\n\n // Emit events to notify about the change\n this.valueChanged.emit('');\n\n // Close the popover if open\n this.open = false;\n }\n\n private updateMask() {\n if (!this.inputElement) return;\n (this.inputElement as HTMLInputElementWithInputmask).inputmask?.remove?.();\n\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: true,\n clearMaskOnLostFocus: !this.open,\n postValidation: true,\n oncomplete: (e: CustomEvent) => {\n const newValue = (e.target as HTMLInputElement)?.value;\n // Only emit if the value actually changed\n if (this.value !== newValue) {\n this.singleValue = newValue;\n this.value = newValue;\n this.valueChanged.emit(newValue);\n }\n },\n });\n inputMask.mask(this.inputElement);\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n this.singleValue = this.value;\n }\n }\n\n componentDidLoad() {\n this.updateMask();\n\n // Set the initial value after applying the mask\n if (this.inputElement.name === this.name && this.singleValue) {\n requestAnimationFrame(() => {\n this.inputElement.value = this.singleValue;\n const event = new CustomEvent('input', { bubbles: true });\n this.inputElement.dispatchEvent(event);\n });\n }\n }\n\n componentDidRender() {\n // Only set value on initial render when there's no existing value in the input\n if (this.singleValue && this.inputElement && !this.inputElement.value) {\n requestAnimationFrame(() => {\n this.inputElement.value = this.singleValue;\n this.inputElement.setAttribute('value', this.singleValue);\n });\n }\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n if (\n this.inputElement &&\n (this.inputElement as HTMLInputElementWithInputmask).inputmask\n ) {\n (this.inputElement as HTMLInputElementWithInputmask).inputmask.remove();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the value changes (unified value binding).\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.singleValue = newValue;\n // Only set input value if it's different from current input value\n // This prevents interfering with user typing\n if (this.inputElement && this.inputElement.value !== newValue) {\n this.inputElement.value = newValue;\n }\n }\n\n @Watch('open')\n handleOpenChange(newOpen: boolean) {\n this.updateMask();\n\n // Additional side effect for external control, e.g., focus calendar if opened externally\n if (newOpen && this.popoverElement) {\n // Focus first selectable date\n const firstDate = this.popoverElement.querySelector(\n 'nv-calendar [data-date]',\n );\n if (firstDate) (firstDate as HTMLElement).focus();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LISTENERS\n\n /**\n * Handles the single date selection event from nv-calendar.\n * Updates the input value and closes the popover.\n * @param {CustomEvent} event - The event from nv-calendar.\n */\n @Listen('singleDateChange')\n handleSingleDateChange(event: CustomEvent) {\n const value: string = event.detail;\n const previousValue = this.value;\n this.singleValue = value;\n this.value = value;\n\n // Set the input value directly when calendar is used\n if (this.inputElement) {\n this.inputElement.value = value;\n }\n\n // Only emit valueChanged if the value actually changed\n if (previousValue !== value) {\n this.valueChanged.emit(value);\n }\n if (!this.showActions) {\n this.open = false;\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.open = false;\n return;\n }\n\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n // Verify if the popover element is defined\n if (!this.popoverElement) {\n console.warn('nv-fielddate -> Popover element is not defined');\n return;\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={this.setPopoverRef}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n strategy=\"fixed\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={this.setInputRef}\n placeholder={\n this.placeholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.name}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n data-scope=\"date\"\n />\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\" //{this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n dateFormat={this.dateFormat}\n singleValue={this.singleValue}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n onValueChanged={this.handleCalendarValueChanged}\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
@@ -471,6 +471,10 @@ export class NvFielddaterange {
471
471
  * @param {KeyboardEvent} event - The keyboard event
472
472
  */
473
473
  handleKeyDown(event) {
474
+ if (event.key === 'Escape') {
475
+ this.open = false;
476
+ return;
477
+ }
474
478
  if (!this.open) {
475
479
  if (event.key === 'ArrowDown') {
476
480
  this.open = true;
@@ -517,12 +521,12 @@ export class NvFielddaterange {
517
521
  /****************************************************************************/
518
522
  //#region RENDER
519
523
  render() {
520
- return (h(Host, { key: '59ecd9fc59245a97bbbeac742552b350708a1528' }, ((this.label && this.label.length > 0) ||
521
- this.el.querySelector('[slot="label"]')) && (h("label", { key: '5b0def9db7f90f9828bc8c08b728784e393c109a', htmlFor: this.startInputId }, h("slot", { key: '2b6abe7f34951838636b38cd9bb1a0ed75d6dfbe', name: "label" }, this.label))), h("nv-popover", { key: '5407e344f94f1a168e146df52ea04dc857c95aab', ref: el => (this.popoverElement = el), id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", strategy: "fixed", open: this.open }, h("div", { key: 'c34e8ae161ae52bf26686eb4ef3c0f522538f97c', slot: "trigger", class: "input-wrapper" }, h("slot", { key: 'dee7a416efa8608661edfdbfb6607ab325d20778', name: "before-input" }), h("div", { key: 'b1612645dadbb20c131ec1db6ea790cf03db8645', class: "input-container" }, h("slot", { key: '2c978351dc56c751b775641e91d12ac8b0e7a9c5', name: "leading-input" }), h("div", { key: 'c8a69b1174c5ed62aeb7408c20ecc614ea735e72', class: "range-inputs" }, h("input", { key: '534ef1aebfbb47b2bd9627d1d25701b3b9b50b59', id: this.startInputId, type: "text", placeholder: this.startPlaceholder ||
522
- this.convertToInputmaskFormat(this.dateFormat), name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), h("div", { key: '36d35e60c3aadc7c8252f14dd7d2565e3be8ecde', class: "range-separator" }), h("input", { key: 'e068562f20e2ba20b85b196c1257bf5d9d37c522', id: this.endInputId, type: "text", placeholder: this.endPlaceholder ||
523
- this.convertToInputmaskFormat(this.dateFormat), name: this.endName, disabled: this.disabled, readOnly: this.readonly, required: this.required, value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus, "data-scope": "date-range" })), this.error && (h("nv-icon", { key: '4eb8a4a4e7c6f26d2d182166935df39c7bce8bc4', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '796a276976661bb8506a14e6e05156b672950368', name: "circle-check", class: "validation", size: "md" })), h("nv-iconbutton", { key: '9f4115cb1e9ce79f430c1674a2bf39abed781b8b', class: "toggle-calendar-icon", name: "calendar", size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), h("slot", { key: '12f19584c116d915c8c292f1e851fd149535991d', name: "after-input" })), h("div", { key: 'ddfa1ee0a53cdd7dd613abfe657321bddcd12e7c', slot: "content" }, h("nv-calendar", { key: '618e19c1c53a9c97ed6b857368efdef03e8eee32', ref: el => (this.calendarElement = el), dateFormat: this.dateFormat, value: this.value, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, selectionType: "range", "data-prevent-navigation": "true" }))), ((this.description && this.description.length > 0) ||
524
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '87d197b39117083736b0b6f7737072a2c95e7119', class: "description" }, h("slot", { key: '5ee232c12b57e5ce07de09b1bc2968d0bc91ec9d', name: "description" }, this.description))), (this.errorDescription ||
525
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'f4dd844d8c628a33dd7f59e0c9de3f50154ea00e', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (h("slot", { name: "error-description" })) : (this.errorDescription))), h("slot", { key: 'af49f08db15166ca7724b5dd08e18bdc06f0ace0' })));
524
+ return (h(Host, { key: '091fcbf743d63bce095fe2f0dfe2c3b62eb27691' }, ((this.label && this.label.length > 0) ||
525
+ this.el.querySelector('[slot="label"]')) && (h("label", { key: '6566223deb5070b16724fdffa5223f3142abe8a8', htmlFor: this.startInputId }, h("slot", { key: 'e26f1c52a4c9326506752679a8cca1952a7a16cc', name: "label" }, this.label))), h("nv-popover", { key: 'f88e0162e05a5267fe79edfce881302959324d0c', ref: el => (this.popoverElement = el), id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", strategy: "fixed", open: this.open }, h("div", { key: '9891bd8f655bb197937a4cb749ae6aab04dd7d03', slot: "trigger", class: "input-wrapper" }, h("slot", { key: '501373a4a2cd17a8ff0e51f8bb6bd7812686d96f', name: "before-input" }), h("div", { key: '67586c4999a0f5eb7261486162be293ad3a7af88', class: "input-container" }, h("slot", { key: '6f47145fe7a8de22311e5bbf7dbda3f9ad3a7516', name: "leading-input" }), h("div", { key: 'e3d5a24a8874709ef4ee2075934824664817e23c', class: "range-inputs" }, h("input", { key: '15d3ff16f47fe17b72a697e9155cc448253fd9e2', id: this.startInputId, type: "text", placeholder: this.startPlaceholder ||
526
+ this.convertToInputmaskFormat(this.dateFormat), name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), h("div", { key: 'f5401156bcf4f3815bab6151446f0d610c15fdd4', class: "range-separator" }), h("input", { key: '0c00bf69390ff60d14cdbaea4bb50ef0b2bad4f6', id: this.endInputId, type: "text", placeholder: this.endPlaceholder ||
527
+ this.convertToInputmaskFormat(this.dateFormat), name: this.endName, disabled: this.disabled, readOnly: this.readonly, required: this.required, value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus, "data-scope": "date-range" })), this.error && (h("nv-icon", { key: '12edaf5750b1859bcf2760a5879e2c95587d56fd', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: 'f5022132ee6771922e84d942764516c9e1beb539', name: "circle-check", class: "validation", size: "md" })), h("nv-iconbutton", { key: '8938c06c316d7fdae873d7ee0f967d56c70824a1', class: "toggle-calendar-icon", name: "calendar", size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), h("slot", { key: '9915b8477bc690f3137b5a9aa6d1b05e7836a951', name: "after-input" })), h("div", { key: '6068c57cf56b056ff5420923864a94472dbac32a', slot: "content" }, h("nv-calendar", { key: '8dd945abd1a9f16f38474fa091dfb8d4919887a0', ref: el => (this.calendarElement = el), dateFormat: this.dateFormat, value: this.value, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, selectionType: "range", "data-prevent-navigation": "true" }))), ((this.description && this.description.length > 0) ||
528
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: '7ef39c67687d0bd02e3f7df90a3d219961074602', class: "description" }, h("slot", { key: '8d7a226adcf892da6851406d45c18dfcb2a7f9c7', name: "description" }, this.description))), (this.errorDescription ||
529
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '23ed909597234f6dde3ace8de00b891e9b6ac862', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (h("slot", { name: "error-description" })) : (this.errorDescription))), h("slot", { key: '34d6bf60a2dab0d3f167ae775e3a43997ae2fa42' })));
526
530
  }
527
531
  static get is() { return "nv-fielddaterange"; }
528
532
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fielddaterange.js","sourceRoot":"","sources":["../../../src/components/nv-fielddaterange/nv-fielddaterange.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,CAAC,EACD,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EAEL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAiBpC;;;;;;;;GAQG;AAMH,MAAM,OAAO,g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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n Method,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * Extends HTMLInputElement to include the inputmask property.\n */\ninterface HTMLInputElementWithInputmask extends HTMLInputElement {\n /**\n * The inputmask instance that provides masking functionality.\n */\n inputmask?: {\n /**\n * Removes the inputmask instance.\n */\n remove: () => void;\n };\n}\n\n/**\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddaterange',\n styleUrl: 'styles/nv-fielddaterange.scss',\n shadow: false,\n})\nexport class NvFielddaterange {\n @Element() el!: HTMLNvFielddaterangeElement;\n private popoverElement!: HTMLNvPopoverElement;\n private calendarElement!: HTMLNvCalendarElement;\n private popoverId: string = uuidv4();\n private contentRef?: HTMLDivElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the start input field.\n */\n @Prop({ reflect: true })\n readonly startPlaceholder: string;\n\n /**\n * Placeholder for the end input field.\n */\n @Prop({ reflect: true })\n readonly endPlaceholder: string;\n\n /**\n * Name attribute for the start input.\n */\n @Prop({ reflect: true })\n readonly startName: string;\n\n /**\n * Name attribute for the end input.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Disables both input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets both input fields as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks both input fields as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the start input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the date range (in string format).\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the start date in string format.\n */\n @State()\n startValue: string = '';\n\n /**\n * The current value of the end date in string format.\n */\n @State()\n endValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 2\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 2;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Parses the unified value prop and synchronizes with internal state\n * @param {string} value - Value to parse\n */\n private parseUnifiedValue = (value: string): void => {\n if (!value) {\n // Reset all selections\n this.startValue = '';\n this.endValue = '';\n return;\n }\n\n const values = value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n\n if (values.length >= 2) {\n this.startValue = values[0];\n this.endValue = values[1];\n }\n };\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format to convert\n * @returns {string} The converted format for Inputmask\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format YYYY-MM-DD\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The mouse event\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Handles the input event on the start input element.\n * Updates internal state and calendar navigation without emitting events.\n * @param {Event} event - The input event\n */\n private handleStartInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update startValue to keep state in sync\n this.startValue = input.value;\n\n // Update calendar value for navigation (without triggering events)\n if (this.calendarElement && input.value) {\n // Temporarily enable navigation for keyboard input\n this.calendarElement.removeAttribute('data-prevent-navigation');\n\n // Update calendar's rangeValue to allow navigation\n const currentValue = `${input.value},${this.endValue}`;\n if (this.calendarElement.value !== currentValue) {\n this.calendarElement.value = currentValue;\n }\n\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles the input event on the end input element.\n * Updates internal state and calendar navigation without emitting events.\n * @param {Event} event - The input event\n */\n private handleEndInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update endValue to keep state in sync\n this.endValue = input.value;\n\n // Update calendar value for navigation (without triggering events)\n if (this.calendarElement && input.value) {\n // Temporarily enable navigation for keyboard input\n this.calendarElement.removeAttribute('data-prevent-navigation');\n\n // Update calendar's rangeValue to allow navigation\n const currentValue = `${this.startValue},${input.value}`;\n if (this.calendarElement.value !== currentValue) {\n this.calendarElement.value = currentValue;\n }\n\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles focus events on the input elements.\n * @param {FocusEvent} event - The focus event\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n // Enable navigation on focus\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n }\n\n this.open = true;\n\n // Restore navigation prevention after opening\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 300);\n };\n\n /**\n * Toggles the opening/closing of the popover.\n * @param {MouseEvent} event - The click event.\n */\n private toggleCalendar = (event: MouseEvent) => {\n if (this.readonly || this.disabled) {\n return;\n }\n // Stop propagation to prevent closing parent dialogs\n event.stopPropagation();\n this.open = !this.open;\n };\n\n /**\n * Clears the current selection and resets the date range field to its initial state.\n * This method can be called programmatically to reset the field.\n */\n @Method()\n async clear(): Promise<void> {\n // Reset internal state\n this.startValue = '';\n this.endValue = '';\n this.value = '';\n\n // Reset both input elements\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n // Remove input mask if exists\n if ((input as HTMLInputElementWithInputmask).inputmask) {\n (input as HTMLInputElementWithInputmask).inputmask.remove();\n }\n });\n\n // Emit events to notify about the change\n this.valueChanged.emit('');\n this.dateRangeChange.emit({ start: '', end: '' });\n\n // Close the popover if open\n this.open = false;\n\n // Clear the calendar if it exists\n if (this.calendarElement) {\n this.calendarElement.clear();\n }\n }\n\n private updateMask() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n (input as HTMLInputElementWithInputmask).inputmask?.remove?.();\n\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: true,\n clearMaskOnLostFocus: !this.open,\n postValidation: true,\n oncleared: (e: CustomEvent) => {\n const input = e.target as HTMLInputElement;\n if (input.id === this.startInputId) {\n this.startValue = '';\n }\n if (input.id === this.endInputId) {\n this.endValue = '';\n }\n },\n oncomplete: (e: CustomEvent) => {\n const input = e.target as HTMLInputElement;\n\n // Update the corresponding state based on which input completed\n if (input.id === this.startInputId) {\n this.startValue = input.value;\n } else if (input.id === this.endInputId) {\n this.endValue = input.value;\n }\n\n // Update unified value\n const newValue = `${this.startValue},${this.endValue}`;\n\n // Only emit if both dates are filled and value changed\n if (this.startValue && this.endValue && this.value !== newValue) {\n this.value = newValue;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n },\n });\n inputMask.mask(input);\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n // Use the unified parsing method\n this.parseUnifiedValue(this.value);\n }\n }\n\n componentDidLoad() {\n this.updateMask();\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n // Set the value after applying the mask\n if (input.name === this.startName && this.startValue) {\n requestAnimationFrame(() => {\n input.value = this.startValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n } else if (input.name === this.endName && this.endValue) {\n requestAnimationFrame(() => {\n input.value = this.endValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n }\n });\n }\n\n componentDidRender() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const value =\n input.name === this.startName\n ? this.startValue\n : this.endName\n ? this.endValue\n : '';\n if (value) {\n // Make sure the value is defined both as a property and attribute\n requestAnimationFrame(() => {\n input.value = value;\n input.setAttribute('value', value);\n });\n }\n });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the date range changes.\n */\n @Event()\n dateRangeChange: EventEmitter<\n HTMLNvCalendarElementEventMap['rangeDateChange']\n >;\n\n /**\n * Emitted when the unified value changes\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Handles the range date selection event from nv-calendar.\n * Stops propagation to prevent duplicate events with handleCalendarValueChanged.\n * @param {CustomEvent<DateRange>} event - The custom event\n */\n @Listen('rangeDateChange')\n handleRangeDateChange(\n event: CustomEvent<HTMLNvCalendarElementEventMap['rangeDateChange']>,\n ) {\n // Stop propagation to prevent this from being handled by handleCalendarValueChanged\n event.stopPropagation();\n\n const { start, end } = event.detail || {};\n\n // Check that both dates are defined\n if (start && end) {\n this.startValue = start;\n this.endValue = end;\n\n // Update unified value prop (like nv-calendar)\n const newValue = `${start},${end}`;\n if (this.value !== newValue) {\n this.value = newValue;\n this.valueChanged.emit(this.value);\n }\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n\n if (!this.showActions) {\n this.open = false;\n }\n }\n }\n\n /**\n * Handles the unified value change event from nv-calendar\n * Note: This might not be called if rangeDateChange stops propagation first.\n * @param {CustomEvent<string>} event - The custom event\n */\n @Listen('valueChanged')\n handleCalendarValueChanged(event: CustomEvent<string>) {\n // Only handle events from the calendar, not from self\n if (event.target === this.el) {\n return;\n }\n\n // Stop propagation to prevent parent components from receiving calendar events\n event.stopPropagation();\n\n const newValue = event.detail || '';\n\n if (newValue !== this.value) {\n this.value = newValue;\n this.valueChanged.emit(newValue);\n\n // Parse and update internal state\n this.parseUnifiedValue(newValue);\n\n // Legacy support - emit dateRangeChange\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('applyDateRange')\n handleApplyDateRange() {\n this.open = false;\n }\n\n /**\n * Handles the reset event from the calendar's cancel button\n * @param {CustomEvent} event - The event emitted by the calendar\n */\n @Listen('singleDateChange')\n @Listen('rangeDateChange')\n handleDateReset(event: CustomEvent) {\n const isResetSingle =\n event.type === 'singleDateChange' && event.detail === '';\n const isResetRange =\n event.type === 'rangeDateChange' &&\n event.detail &&\n event.detail.start === '' &&\n event.detail.end === '';\n\n if (isResetSingle || isResetRange) {\n this.startValue = '';\n this.endValue = '';\n\n // Update unified value prop\n this.value = '';\n this.valueChanged.emit('');\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n });\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: '', end: '' });\n }\n }\n\n /**\n * Handles keyboard events.\n * @param {KeyboardEvent} event - The keyboard event\n */\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n event.preventDefault();\n return;\n }\n return;\n }\n\n if (!this.popoverElement) {\n console.warn('nv-fielddaterange -> Popover element is not defined');\n return;\n }\n }\n\n @Watch('value')\n handleValueChange(newValue: string) {\n // Use the unified parsing method instead of JSON.parse\n this.parseUnifiedValue(newValue);\n }\n\n @Watch('open')\n onOpenChanged(newValue: boolean) {\n this.updateMask();\n if (this.contentRef) {\n if (newValue) {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = '0px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n });\n } else {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = '0px';\n });\n }\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n strategy=\"fixed\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\">\n <slot name=\"leading-input\"></slot>\n\n <div class=\"range-inputs\">\n <input\n id={this.startInputId}\n type=\"text\"\n placeholder={\n this.startPlaceholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.startName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n value={this.startValue}\n onInput={this.handleStartInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n\n <div class=\"range-separator\"></div>\n\n <input\n id={this.endInputId}\n type=\"text\"\n placeholder={\n this.endPlaceholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.endName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n value={this.endValue}\n onInput={this.handleEndInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n </div>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\"\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n ref={el => (this.calendarElement = el as HTMLNvCalendarElement)}\n dateFormat={this.dateFormat}\n value={this.value}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n selectionType=\"range\"\n data-prevent-navigation=\"true\"\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n //#endregion RENDER\n}\n"]}
1
+ {"version":3,"file":"nv-fielddaterange.js","sourceRoot":"","sources":["../../../src/components/nv-fielddaterange/nv-fielddaterange.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,CAAC,EACD,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EAEL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAiBpC;;;;;;;;GAQG;AAMH,MAAM,OAAO,gBAAgB;IAL7B;QASU,cAAS,GAAW,MAAM,EAAE,CAAC;QAGrC,8EAA8E;QAC9E,oBAAoB;QAEpB;;;WAGG;QAEM,iBAAY,GAAW,MAAM,EAAE,CAAC;QAEzC;;;WAGG;QAEM,eAAU,GAAW,MAAM,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n Method,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * Extends HTMLInputElement to include the inputmask property.\n */\ninterface HTMLInputElementWithInputmask extends HTMLInputElement {\n /**\n * The inputmask instance that provides masking functionality.\n */\n inputmask?: {\n /**\n * Removes the inputmask instance.\n */\n remove: () => void;\n };\n}\n\n/**\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddaterange',\n styleUrl: 'styles/nv-fielddaterange.scss',\n shadow: false,\n})\nexport class NvFielddaterange {\n @Element() el!: HTMLNvFielddaterangeElement;\n private popoverElement!: HTMLNvPopoverElement;\n private calendarElement!: HTMLNvCalendarElement;\n private popoverId: string = uuidv4();\n private contentRef?: HTMLDivElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the start input field.\n */\n @Prop({ reflect: true })\n readonly startPlaceholder: string;\n\n /**\n * Placeholder for the end input field.\n */\n @Prop({ reflect: true })\n readonly endPlaceholder: string;\n\n /**\n * Name attribute for the start input.\n */\n @Prop({ reflect: true })\n readonly startName: string;\n\n /**\n * Name attribute for the end input.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Disables both input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets both input fields as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks both input fields as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the start input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the date range (in string format).\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the start date in string format.\n */\n @State()\n startValue: string = '';\n\n /**\n * The current value of the end date in string format.\n */\n @State()\n endValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 2\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 2;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Parses the unified value prop and synchronizes with internal state\n * @param {string} value - Value to parse\n */\n private parseUnifiedValue = (value: string): void => {\n if (!value) {\n // Reset all selections\n this.startValue = '';\n this.endValue = '';\n return;\n }\n\n const values = value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n\n if (values.length >= 2) {\n this.startValue = values[0];\n this.endValue = values[1];\n }\n };\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format to convert\n * @returns {string} The converted format for Inputmask\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format YYYY-MM-DD\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The mouse event\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Handles the input event on the start input element.\n * Updates internal state and calendar navigation without emitting events.\n * @param {Event} event - The input event\n */\n private handleStartInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update startValue to keep state in sync\n this.startValue = input.value;\n\n // Update calendar value for navigation (without triggering events)\n if (this.calendarElement && input.value) {\n // Temporarily enable navigation for keyboard input\n this.calendarElement.removeAttribute('data-prevent-navigation');\n\n // Update calendar's rangeValue to allow navigation\n const currentValue = `${input.value},${this.endValue}`;\n if (this.calendarElement.value !== currentValue) {\n this.calendarElement.value = currentValue;\n }\n\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles the input event on the end input element.\n * Updates internal state and calendar navigation without emitting events.\n * @param {Event} event - The input event\n */\n private handleEndInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update endValue to keep state in sync\n this.endValue = input.value;\n\n // Update calendar value for navigation (without triggering events)\n if (this.calendarElement && input.value) {\n // Temporarily enable navigation for keyboard input\n this.calendarElement.removeAttribute('data-prevent-navigation');\n\n // Update calendar's rangeValue to allow navigation\n const currentValue = `${this.startValue},${input.value}`;\n if (this.calendarElement.value !== currentValue) {\n this.calendarElement.value = currentValue;\n }\n\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles focus events on the input elements.\n * @param {FocusEvent} event - The focus event\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n // Enable navigation on focus\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n }\n\n this.open = true;\n\n // Restore navigation prevention after opening\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 300);\n };\n\n /**\n * Toggles the opening/closing of the popover.\n * @param {MouseEvent} event - The click event.\n */\n private toggleCalendar = (event: MouseEvent) => {\n if (this.readonly || this.disabled) {\n return;\n }\n // Stop propagation to prevent closing parent dialogs\n event.stopPropagation();\n this.open = !this.open;\n };\n\n /**\n * Clears the current selection and resets the date range field to its initial state.\n * This method can be called programmatically to reset the field.\n */\n @Method()\n async clear(): Promise<void> {\n // Reset internal state\n this.startValue = '';\n this.endValue = '';\n this.value = '';\n\n // Reset both input elements\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n // Remove input mask if exists\n if ((input as HTMLInputElementWithInputmask).inputmask) {\n (input as HTMLInputElementWithInputmask).inputmask.remove();\n }\n });\n\n // Emit events to notify about the change\n this.valueChanged.emit('');\n this.dateRangeChange.emit({ start: '', end: '' });\n\n // Close the popover if open\n this.open = false;\n\n // Clear the calendar if it exists\n if (this.calendarElement) {\n this.calendarElement.clear();\n }\n }\n\n private updateMask() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n (input as HTMLInputElementWithInputmask).inputmask?.remove?.();\n\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: true,\n clearMaskOnLostFocus: !this.open,\n postValidation: true,\n oncleared: (e: CustomEvent) => {\n const input = e.target as HTMLInputElement;\n if (input.id === this.startInputId) {\n this.startValue = '';\n }\n if (input.id === this.endInputId) {\n this.endValue = '';\n }\n },\n oncomplete: (e: CustomEvent) => {\n const input = e.target as HTMLInputElement;\n\n // Update the corresponding state based on which input completed\n if (input.id === this.startInputId) {\n this.startValue = input.value;\n } else if (input.id === this.endInputId) {\n this.endValue = input.value;\n }\n\n // Update unified value\n const newValue = `${this.startValue},${this.endValue}`;\n\n // Only emit if both dates are filled and value changed\n if (this.startValue && this.endValue && this.value !== newValue) {\n this.value = newValue;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n },\n });\n inputMask.mask(input);\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n // Use the unified parsing method\n this.parseUnifiedValue(this.value);\n }\n }\n\n componentDidLoad() {\n this.updateMask();\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n // Set the value after applying the mask\n if (input.name === this.startName && this.startValue) {\n requestAnimationFrame(() => {\n input.value = this.startValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n } else if (input.name === this.endName && this.endValue) {\n requestAnimationFrame(() => {\n input.value = this.endValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n }\n });\n }\n\n componentDidRender() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const value =\n input.name === this.startName\n ? this.startValue\n : this.endName\n ? this.endValue\n : '';\n if (value) {\n // Make sure the value is defined both as a property and attribute\n requestAnimationFrame(() => {\n input.value = value;\n input.setAttribute('value', value);\n });\n }\n });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the date range changes.\n */\n @Event()\n dateRangeChange: EventEmitter<\n HTMLNvCalendarElementEventMap['rangeDateChange']\n >;\n\n /**\n * Emitted when the unified value changes\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Handles the range date selection event from nv-calendar.\n * Stops propagation to prevent duplicate events with handleCalendarValueChanged.\n * @param {CustomEvent<DateRange>} event - The custom event\n */\n @Listen('rangeDateChange')\n handleRangeDateChange(\n event: CustomEvent<HTMLNvCalendarElementEventMap['rangeDateChange']>,\n ) {\n // Stop propagation to prevent this from being handled by handleCalendarValueChanged\n event.stopPropagation();\n\n const { start, end } = event.detail || {};\n\n // Check that both dates are defined\n if (start && end) {\n this.startValue = start;\n this.endValue = end;\n\n // Update unified value prop (like nv-calendar)\n const newValue = `${start},${end}`;\n if (this.value !== newValue) {\n this.value = newValue;\n this.valueChanged.emit(this.value);\n }\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n\n if (!this.showActions) {\n this.open = false;\n }\n }\n }\n\n /**\n * Handles the unified value change event from nv-calendar\n * Note: This might not be called if rangeDateChange stops propagation first.\n * @param {CustomEvent<string>} event - The custom event\n */\n @Listen('valueChanged')\n handleCalendarValueChanged(event: CustomEvent<string>) {\n // Only handle events from the calendar, not from self\n if (event.target === this.el) {\n return;\n }\n\n // Stop propagation to prevent parent components from receiving calendar events\n event.stopPropagation();\n\n const newValue = event.detail || '';\n\n if (newValue !== this.value) {\n this.value = newValue;\n this.valueChanged.emit(newValue);\n\n // Parse and update internal state\n this.parseUnifiedValue(newValue);\n\n // Legacy support - emit dateRangeChange\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('applyDateRange')\n handleApplyDateRange() {\n this.open = false;\n }\n\n /**\n * Handles the reset event from the calendar's cancel button\n * @param {CustomEvent} event - The event emitted by the calendar\n */\n @Listen('singleDateChange')\n @Listen('rangeDateChange')\n handleDateReset(event: CustomEvent) {\n const isResetSingle =\n event.type === 'singleDateChange' && event.detail === '';\n const isResetRange =\n event.type === 'rangeDateChange' &&\n event.detail &&\n event.detail.start === '' &&\n event.detail.end === '';\n\n if (isResetSingle || isResetRange) {\n this.startValue = '';\n this.endValue = '';\n\n // Update unified value prop\n this.value = '';\n this.valueChanged.emit('');\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n });\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: '', end: '' });\n }\n }\n\n /**\n * Handles keyboard events.\n * @param {KeyboardEvent} event - The keyboard event\n */\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.open = false;\n return;\n }\n\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n event.preventDefault();\n return;\n }\n return;\n }\n\n if (!this.popoverElement) {\n console.warn('nv-fielddaterange -> Popover element is not defined');\n return;\n }\n }\n\n @Watch('value')\n handleValueChange(newValue: string) {\n // Use the unified parsing method instead of JSON.parse\n this.parseUnifiedValue(newValue);\n }\n\n @Watch('open')\n onOpenChanged(newValue: boolean) {\n this.updateMask();\n if (this.contentRef) {\n if (newValue) {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = '0px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n });\n } else {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = '0px';\n });\n }\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n strategy=\"fixed\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\">\n <slot name=\"leading-input\"></slot>\n\n <div class=\"range-inputs\">\n <input\n id={this.startInputId}\n type=\"text\"\n placeholder={\n this.startPlaceholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.startName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n value={this.startValue}\n onInput={this.handleStartInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n\n <div class=\"range-separator\"></div>\n\n <input\n id={this.endInputId}\n type=\"text\"\n placeholder={\n this.endPlaceholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.endName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n value={this.endValue}\n onInput={this.handleEndInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n </div>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\"\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n ref={el => (this.calendarElement = el as HTMLNvCalendarElement)}\n dateFormat={this.dateFormat}\n value={this.value}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n selectionType=\"range\"\n data-prevent-navigation=\"true\"\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n //#endregion RENDER\n}\n"]}
@@ -239,6 +239,8 @@ nv-fielddaterange .range-inputs {
239
239
  align-items: center;
240
240
  gap: 0;
241
241
  width: 100%;
242
+ }
243
+ nv-fielddaterange .range-inputs:focus-within {
242
244
  z-index: 1;
243
245
  }
244
246
  nv-fielddaterange .range-inputs input {