@nova-design-system/nova-webcomponents 3.4.0 → 3.6.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 (459) hide show
  1. package/dist/cjs/{timeline.animation-dbb9c5ea.js → collapse.animation-a129dc3f.js} +5 -26
  2. package/dist/cjs/collapse.animation-a129dc3f.js.map +1 -0
  3. package/dist/cjs/fade.animation-644b5c4d.js +70 -0
  4. package/dist/cjs/fade.animation-644b5c4d.js.map +1 -0
  5. package/dist/cjs/{grow.animation-a1f0bc22.js → grow.animation-6d003803.js} +5 -5
  6. package/dist/cjs/{grow.animation-a1f0bc22.js.map → grow.animation-6d003803.js.map} +1 -1
  7. package/dist/cjs/index-c56424e5.js +8 -0
  8. package/dist/cjs/index.cjs.js +9 -4
  9. package/dist/cjs/index.cjs.js.map +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/native.cjs.js +1 -1
  12. package/dist/cjs/nv-accordion-item.cjs.entry.js +181 -0
  13. package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -0
  14. package/dist/cjs/nv-accordion.cjs.entry.js +194 -0
  15. package/dist/cjs/nv-accordion.cjs.entry.js.map +1 -0
  16. package/dist/cjs/nv-alert.cjs.entry.js +6 -4
  17. package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
  18. package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
  19. package/dist/cjs/nv-badge_2.cjs.entry.js +9 -7
  20. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
  21. package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
  22. package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
  23. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  24. package/dist/cjs/nv-calendar.cjs.entry.js +59 -50
  25. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  27. package/dist/cjs/nv-datagrid.cjs.entry.js +2 -2
  28. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
  29. package/dist/cjs/nv-dialog.cjs.entry.js +19 -6
  30. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  31. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
  32. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
  33. package/dist/cjs/nv-fielddate.cjs.entry.js +100 -35
  34. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  35. package/dist/cjs/nv-fielddaterange.cjs.entry.js +6 -6
  36. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  37. package/dist/cjs/nv-fielddropdown.cjs.entry.js +3 -3
  38. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
  39. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +85 -100
  40. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  41. package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
  42. package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
  43. package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
  44. package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
  45. package/dist/cjs/nv-fieldslider.cjs.entry.js +53 -9
  46. package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
  47. package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
  48. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
  49. package/dist/cjs/nv-fieldtime.cjs.entry.js +9 -9
  50. package/dist/cjs/nv-icon.cjs.entry.js +2 -2
  51. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  52. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
  53. package/dist/cjs/nv-menu.cjs.entry.js +1 -1
  54. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  55. package/dist/cjs/nv-popover.cjs.entry.js +4 -3
  56. package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
  57. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  58. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  59. package/dist/cjs/nv-table.cjs.entry.js +2 -2
  60. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  61. package/dist/cjs/nv-tooltip.cjs.entry.js +3 -2
  62. package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
  63. package/dist/cjs/{fade.animation-0d33d198.js → stylefire.es-717e022a.js} +1 -65
  64. package/dist/cjs/stylefire.es-717e022a.js.map +1 -0
  65. package/dist/cjs/timeline.animation-155e8839.js +25 -0
  66. package/dist/cjs/timeline.animation-155e8839.js.map +1 -0
  67. package/dist/collection/collection-manifest.json +2 -0
  68. package/dist/collection/components/nv-accordion/nv-accordion.docs.js +146 -0
  69. package/dist/collection/components/nv-accordion/nv-accordion.docs.js.map +1 -0
  70. package/dist/collection/components/nv-accordion/nv-accordion.js +342 -0
  71. package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -0
  72. package/dist/collection/components/nv-accordion/styles/nv-accordion.css +15 -0
  73. package/dist/collection/components/nv-accordion-item/nv-accordion-item.docs.js +6 -0
  74. package/dist/collection/components/nv-accordion-item/nv-accordion-item.docs.js.map +1 -0
  75. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +353 -0
  76. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -0
  77. package/dist/collection/components/nv-accordion-item/styles/nv-accordion-item.css +66 -0
  78. package/dist/collection/components/nv-alert/nv-alert.js +1 -1
  79. package/dist/collection/components/nv-avatar/nv-avatar.js +1 -1
  80. package/dist/collection/components/nv-badge/nv-badge.js +2 -2
  81. package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
  82. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
  83. package/dist/collection/components/nv-button/nv-button.js +1 -1
  84. package/dist/collection/components/nv-calendar/nv-calendar.css +5 -0
  85. package/dist/collection/components/nv-calendar/nv-calendar.js +55 -27
  86. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  87. package/dist/collection/components/nv-calendar/nv-calendar.utils.js +0 -20
  88. package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -1
  89. package/dist/collection/components/nv-calendar/partials/calendar-grid.js +3 -2
  90. package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -1
  91. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +5 -31
  92. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -1
  93. package/dist/collection/components/nv-col/nv-col.js +1 -1
  94. package/dist/collection/components/nv-datagrid/nv-datagrid.js +2 -2
  95. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
  96. package/dist/collection/components/nv-dialog/nv-dialog.css +1 -1
  97. package/dist/collection/components/nv-dialog/nv-dialog.js +38 -5
  98. package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
  99. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
  100. package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
  101. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
  102. package/dist/collection/components/nv-fielddate/nv-fielddate.js +102 -34
  103. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  104. package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +2 -0
  105. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +5 -5
  106. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  107. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +18 -2
  108. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +3 -3
  109. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
  110. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  111. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +36 -26
  112. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
  113. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +117 -115
  114. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  115. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
  116. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
  117. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  118. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
  119. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
  120. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
  121. package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js +45 -1
  122. package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js.map +1 -1
  123. package/dist/collection/components/nv-fieldslider/partials/range-thumb.js +4 -4
  124. package/dist/collection/components/nv-fieldslider/partials/range-thumb.js.map +1 -1
  125. package/dist/collection/components/nv-fieldslider/partials/single-thumb.js +3 -3
  126. package/dist/collection/components/nv-fieldslider/partials/single-thumb.js.map +1 -1
  127. package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js +42 -1
  128. package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js.map +1 -1
  129. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
  130. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  131. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
  132. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  133. package/dist/collection/components/nv-icon/nv-icons.js +3 -0
  134. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  135. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  136. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  137. package/dist/collection/components/nv-menu/nv-menu.js +1 -1
  138. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  139. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  140. package/dist/collection/components/nv-row/nv-row.js +1 -1
  141. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  142. package/dist/collection/components/nv-table/nv-table.js +2 -2
  143. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  144. package/dist/collection/components/nv-tooltip/nv-tooltip.js +21 -3
  145. package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -1
  146. package/dist/components/index.js +7 -3
  147. package/dist/components/index.js.map +1 -1
  148. package/dist/components/nv-accordion-item.d.ts +11 -0
  149. package/dist/components/nv-accordion-item.js +8 -0
  150. package/dist/components/nv-accordion-item.js.map +1 -0
  151. package/dist/components/nv-accordion.d.ts +11 -0
  152. package/dist/components/nv-accordion.js +242 -0
  153. package/dist/components/nv-accordion.js.map +1 -0
  154. package/dist/components/nv-alert.js +6 -4
  155. package/dist/components/nv-alert.js.map +1 -1
  156. package/dist/components/nv-avatar.js +2 -2
  157. package/dist/components/nv-badge.js +1 -1
  158. package/dist/components/nv-breadcrumb.js +3 -3
  159. package/dist/components/nv-breadcrumbs.js +1 -1
  160. package/dist/components/nv-button.js +1 -1
  161. package/dist/components/nv-calendar.js +1 -1
  162. package/dist/components/nv-col.js +1 -1
  163. package/dist/components/nv-datagrid.js +4 -4
  164. package/dist/components/nv-datagridcolumn.js +1 -1
  165. package/dist/components/nv-dialog.js +25 -11
  166. package/dist/components/nv-dialog.js.map +1 -1
  167. package/dist/components/nv-dialogfooter.js +1 -1
  168. package/dist/components/nv-dialogheader.js +1 -1
  169. package/dist/components/nv-fieldcheckbox.js +1 -1
  170. package/dist/components/nv-fielddate.js +107 -41
  171. package/dist/components/nv-fielddate.js.map +1 -1
  172. package/dist/components/nv-fielddaterange.js +12 -12
  173. package/dist/components/nv-fielddaterange.js.map +1 -1
  174. package/dist/components/nv-fielddropdown.js +8 -8
  175. package/dist/components/nv-fielddropdownitem.js +1 -1
  176. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  177. package/dist/components/nv-fieldmultiselect.js +94 -110
  178. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  179. package/dist/components/nv-fieldnumber.js +1 -1
  180. package/dist/components/nv-fieldpassword.js +6 -6
  181. package/dist/components/nv-fieldradio.js +3 -3
  182. package/dist/components/nv-fieldselect.js +8 -8
  183. package/dist/components/nv-fieldslider.js +57 -13
  184. package/dist/components/nv-fieldslider.js.map +1 -1
  185. package/dist/components/nv-fieldtext.js +1 -1
  186. package/dist/components/nv-fieldtextarea.js +3 -3
  187. package/dist/components/nv-fieldtime.js +13 -13
  188. package/dist/components/nv-icon.js +1 -1
  189. package/dist/components/nv-iconbutton.js +1 -1
  190. package/dist/components/nv-loader.js +1 -1
  191. package/dist/components/nv-menu.js +4 -4
  192. package/dist/components/nv-menuitem.js +1 -1
  193. package/dist/components/nv-popover.js +1 -1
  194. package/dist/components/nv-row.js +1 -1
  195. package/dist/components/nv-stack.js +1 -1
  196. package/dist/components/nv-table.js +2 -2
  197. package/dist/components/nv-toggle.js +2 -2
  198. package/dist/components/nv-tooltip.js +1 -1
  199. package/dist/components/{p-1daca48a.js → p-09cdd71f.js} +2 -65
  200. package/dist/components/p-09cdd71f.js.map +1 -0
  201. package/dist/components/p-15aeab4d.js +23 -0
  202. package/dist/components/p-15aeab4d.js.map +1 -0
  203. package/dist/components/{p-c07c32d2.js → p-190c8f60.js} +3 -3
  204. package/dist/components/{p-c07c32d2.js.map → p-190c8f60.js.map} +1 -1
  205. package/dist/components/p-1cbacdba.js +68 -0
  206. package/dist/components/p-1cbacdba.js.map +1 -0
  207. package/dist/components/p-230ad6c5.js +223 -0
  208. package/dist/components/p-230ad6c5.js.map +1 -0
  209. package/dist/components/{p-a189d074.js → p-316ae8e3.js} +4 -4
  210. package/dist/components/{p-a189d074.js.map → p-316ae8e3.js.map} +1 -1
  211. package/dist/components/{p-953d8b4d.js → p-4069966e.js} +8 -6
  212. package/dist/components/p-4069966e.js.map +1 -0
  213. package/dist/components/{p-f7c7a406.js → p-436a0f99.js} +6 -5
  214. package/dist/components/p-436a0f99.js.map +1 -0
  215. package/dist/components/{p-dec6fc68.js → p-4864a690.js} +2 -2
  216. package/dist/components/{p-dec6fc68.js.map → p-4864a690.js.map} +1 -1
  217. package/dist/components/{p-a29a9396.js → p-5e89eb9d.js} +7 -7
  218. package/dist/components/{p-a29a9396.js.map → p-5e89eb9d.js.map} +1 -1
  219. package/dist/components/{p-131e5140.js → p-618ae85a.js} +5 -4
  220. package/dist/components/p-618ae85a.js.map +1 -0
  221. package/dist/components/{p-df465ef2.js → p-79b38dfb.js} +3 -3
  222. package/dist/components/{p-df465ef2.js.map → p-79b38dfb.js.map} +1 -1
  223. package/dist/components/{p-a0d7e0cd.js → p-840858ed.js} +60 -51
  224. package/dist/components/p-840858ed.js.map +1 -0
  225. package/dist/components/{p-dcaf9010.js → p-8a5b0f74.js} +3 -3
  226. package/dist/components/{p-dcaf9010.js.map → p-8a5b0f74.js.map} +1 -1
  227. package/dist/components/{p-c1765831.js → p-8d45dbfe.js} +2 -2
  228. package/dist/components/{p-c1765831.js.map → p-8d45dbfe.js.map} +1 -1
  229. package/dist/components/{p-42301d8f.js → p-9a263d0e.js} +3 -23
  230. package/dist/components/p-9a263d0e.js.map +1 -0
  231. package/dist/components/{p-9f1e8ef3.js → p-9cff2fd1.js} +2 -2
  232. package/dist/components/{p-9f1e8ef3.js.map → p-9cff2fd1.js.map} +1 -1
  233. package/dist/components/{p-9e6e26cb.js → p-9ed7a440.js} +5 -5
  234. package/dist/components/{p-9e6e26cb.js.map → p-9ed7a440.js.map} +1 -1
  235. package/dist/components/{p-3f567fde.js → p-ac76a11c.js} +5 -5
  236. package/dist/components/{p-3f567fde.js.map → p-ac76a11c.js.map} +1 -1
  237. package/dist/components/{p-6277f746.js → p-ca130ad2.js} +2 -2
  238. package/dist/components/{p-6277f746.js.map → p-ca130ad2.js.map} +1 -1
  239. package/dist/components/{p-a1438b39.js → p-d2b4441a.js} +3 -3
  240. package/dist/components/{p-a1438b39.js.map → p-d2b4441a.js.map} +1 -1
  241. package/dist/components/p-f1bbb9e8.js +88 -0
  242. package/dist/components/p-f1bbb9e8.js.map +1 -0
  243. package/dist/components/{p-3f58525b.js → p-f266b533.js} +5 -5
  244. package/dist/components/{p-3f58525b.js.map → p-f266b533.js.map} +1 -1
  245. package/dist/esm/{timeline.animation-1b88f052.js → collapse.animation-16e3af45.js} +3 -23
  246. package/dist/esm/collapse.animation-16e3af45.js.map +1 -0
  247. package/dist/esm/fade.animation-71e8e34c.js +68 -0
  248. package/dist/esm/fade.animation-71e8e34c.js.map +1 -0
  249. package/dist/esm/{grow.animation-cac164da.js → grow.animation-f7b26024.js} +2 -2
  250. package/dist/esm/{grow.animation-cac164da.js.map → grow.animation-f7b26024.js.map} +1 -1
  251. package/dist/esm/index-a1936cd0.js +8 -0
  252. package/dist/esm/index.js +8 -3
  253. package/dist/esm/index.js.map +1 -1
  254. package/dist/esm/loader.js +1 -1
  255. package/dist/esm/native.js +1 -1
  256. package/dist/esm/nv-accordion-item.entry.js +177 -0
  257. package/dist/esm/nv-accordion-item.entry.js.map +1 -0
  258. package/dist/esm/nv-accordion.entry.js +190 -0
  259. package/dist/esm/nv-accordion.entry.js.map +1 -0
  260. package/dist/esm/nv-alert.entry.js +5 -3
  261. package/dist/esm/nv-alert.entry.js.map +1 -1
  262. package/dist/esm/nv-avatar.entry.js +1 -1
  263. package/dist/esm/nv-badge_2.entry.js +7 -5
  264. package/dist/esm/nv-badge_2.entry.js.map +1 -1
  265. package/dist/esm/nv-breadcrumb.entry.js +1 -1
  266. package/dist/esm/nv-breadcrumbs.entry.js +1 -1
  267. package/dist/esm/nv-button.entry.js +1 -1
  268. package/dist/esm/nv-calendar.entry.js +59 -50
  269. package/dist/esm/nv-calendar.entry.js.map +1 -1
  270. package/dist/esm/nv-col.entry.js +1 -1
  271. package/dist/esm/nv-datagrid.entry.js +2 -2
  272. package/dist/esm/nv-datagridcolumn.entry.js +1 -1
  273. package/dist/esm/nv-dialog.entry.js +19 -6
  274. package/dist/esm/nv-dialog.entry.js.map +1 -1
  275. package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
  276. package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
  277. package/dist/esm/nv-fielddate.entry.js +100 -35
  278. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  279. package/dist/esm/nv-fielddaterange.entry.js +6 -6
  280. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  281. package/dist/esm/nv-fielddropdown.entry.js +3 -3
  282. package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
  283. package/dist/esm/nv-fieldmultiselect.entry.js +85 -100
  284. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  285. package/dist/esm/nv-fieldnumber.entry.js +3 -3
  286. package/dist/esm/nv-fieldpassword.entry.js +3 -3
  287. package/dist/esm/nv-fieldradio.entry.js +3 -3
  288. package/dist/esm/nv-fieldselect.entry.js +5 -5
  289. package/dist/esm/nv-fieldslider.entry.js +53 -9
  290. package/dist/esm/nv-fieldslider.entry.js.map +1 -1
  291. package/dist/esm/nv-fieldtext.entry.js +3 -3
  292. package/dist/esm/nv-fieldtextarea.entry.js +3 -3
  293. package/dist/esm/nv-fieldtime.entry.js +9 -9
  294. package/dist/esm/nv-icon.entry.js +2 -2
  295. package/dist/esm/nv-icon.entry.js.map +1 -1
  296. package/dist/esm/nv-iconbutton_2.entry.js +2 -2
  297. package/dist/esm/nv-menu.entry.js +1 -1
  298. package/dist/esm/nv-menuitem.entry.js +1 -1
  299. package/dist/esm/nv-popover.entry.js +4 -3
  300. package/dist/esm/nv-popover.entry.js.map +1 -1
  301. package/dist/esm/nv-row.entry.js +1 -1
  302. package/dist/esm/nv-stack.entry.js +1 -1
  303. package/dist/esm/nv-table.entry.js +2 -2
  304. package/dist/esm/nv-toggle.entry.js +2 -2
  305. package/dist/esm/nv-tooltip.entry.js +4 -3
  306. package/dist/esm/nv-tooltip.entry.js.map +1 -1
  307. package/dist/esm/{fade.animation-2a077983.js → stylefire.es-74da334a.js} +2 -65
  308. package/dist/esm/stylefire.es-74da334a.js.map +1 -0
  309. package/dist/esm/timeline.animation-adf35ecb.js +23 -0
  310. package/dist/esm/timeline.animation-adf35ecb.js.map +1 -0
  311. package/dist/native/index.esm.js +1 -1
  312. package/dist/native/index.esm.js.map +1 -1
  313. package/dist/native/native.css +1 -1
  314. package/dist/native/native.esm.js +1 -1
  315. package/dist/native/native.esm.js.map +1 -1
  316. package/dist/native/{p-a0505695.entry.js → p-08452012.entry.js} +2 -2
  317. package/dist/native/p-09cdd71f.js +16 -0
  318. package/dist/native/p-09cdd71f.js.map +1 -0
  319. package/dist/native/p-0ac03708.entry.js +2 -0
  320. package/dist/native/p-0ac03708.entry.js.map +1 -0
  321. package/dist/native/p-0ada0382.entry.js +2 -0
  322. package/dist/native/p-0ada0382.entry.js.map +1 -0
  323. package/dist/native/p-1235c007.entry.js +2 -0
  324. package/dist/native/p-12963ae4.entry.js +2 -0
  325. package/dist/native/p-12963ae4.entry.js.map +1 -0
  326. package/dist/native/p-15aeab4d.js +2 -0
  327. package/dist/native/p-15aeab4d.js.map +1 -0
  328. package/dist/native/{p-b5b9190a.entry.js → p-18831490.entry.js} +2 -2
  329. package/dist/native/{p-1d98477d.entry.js → p-1ad1bff9.entry.js} +2 -2
  330. package/dist/native/p-1cbacdba.js +2 -0
  331. package/dist/native/p-1cbacdba.js.map +1 -0
  332. package/dist/native/p-1cce9b24.entry.js +2 -0
  333. package/dist/native/p-1cce9b24.entry.js.map +1 -0
  334. package/dist/native/{p-914da1e1.entry.js → p-1f932a4b.entry.js} +2 -2
  335. package/dist/native/{p-01164e86.entry.js → p-2576c1a0.entry.js} +2 -2
  336. package/dist/native/{p-2bc7d66a.entry.js → p-2d23fcea.entry.js} +2 -2
  337. package/dist/native/{p-1c1ecd38.entry.js → p-31e72603.entry.js} +2 -2
  338. package/dist/native/p-33e5037d.entry.js +2 -0
  339. package/dist/native/{p-ff0f3794.entry.js → p-4cf00884.entry.js} +2 -2
  340. package/dist/native/p-5172f17a.entry.js +2 -0
  341. package/dist/native/{p-08ca678c.entry.js → p-51a57a3a.entry.js} +2 -2
  342. package/dist/native/p-5eca22c7.entry.js +2 -0
  343. package/dist/native/{p-2006f5d4.entry.js.map → p-5eca22c7.entry.js.map} +1 -1
  344. package/dist/native/{p-c7b8b7ba.entry.js → p-609b3822.entry.js} +2 -2
  345. package/dist/native/{p-55df8bf9.entry.js → p-625be06b.entry.js} +2 -2
  346. package/dist/native/{p-9850c1d7.entry.js → p-8030c16b.entry.js} +2 -2
  347. package/dist/native/{p-6029e51b.entry.js → p-85a54ef2.entry.js} +2 -2
  348. package/dist/native/p-8d45dbfe.js +2 -0
  349. package/dist/native/p-9a263d0e.js +2 -0
  350. package/dist/native/p-9a263d0e.js.map +1 -0
  351. package/dist/native/{p-1a5d3b87.entry.js → p-9dc1c3e7.entry.js} +2 -2
  352. package/dist/native/p-a36dc25a.entry.js +2 -0
  353. package/dist/native/{p-ad128108.entry.js.map → p-a36dc25a.entry.js.map} +1 -1
  354. package/dist/native/p-a6dc9b59.entry.js +2 -0
  355. package/dist/native/p-a6dc9b59.entry.js.map +1 -0
  356. package/dist/native/{p-0410facd.entry.js → p-b829383a.entry.js} +2 -2
  357. package/dist/native/{p-abbe5d69.entry.js → p-bab6d0a5.entry.js} +2 -2
  358. package/dist/native/p-baddee4c.entry.js +7 -0
  359. package/dist/native/p-baddee4c.entry.js.map +1 -0
  360. package/dist/native/p-be67545e.entry.js +2 -0
  361. package/dist/native/p-be67545e.entry.js.map +1 -0
  362. package/dist/native/p-c2826f22.entry.js +2 -0
  363. package/dist/native/p-c2826f22.entry.js.map +1 -0
  364. package/dist/native/p-c9cde996.entry.js +2 -0
  365. package/dist/native/{p-0ec2d430.entry.js.map → p-c9cde996.entry.js.map} +1 -1
  366. package/dist/native/{p-a30206c1.entry.js → p-cf468c67.entry.js} +2 -2
  367. package/dist/native/{p-24659a85.entry.js → p-ddb0b9f6.entry.js} +2 -2
  368. package/dist/native/{p-ec87200a.entry.js → p-e19a8885.entry.js} +2 -2
  369. package/dist/native/{p-7ba03c5d.entry.js → p-e802fbb8.entry.js} +2 -2
  370. package/dist/native/p-ec92ee7a.entry.js +2 -0
  371. package/dist/native/{p-f377b285.entry.js → p-f9aa4900.entry.js} +2 -2
  372. package/dist/native/p-fca3e27d.entry.js +2 -0
  373. package/dist/native/p-fca3e27d.entry.js.map +1 -0
  374. package/dist/native/p-fe4e516b.entry.js +2 -0
  375. package/dist/native/p-fe4e516b.entry.js.map +1 -0
  376. package/dist/types/components/nv-accordion/nv-accordion.d.ts +115 -0
  377. package/dist/types/components/nv-accordion/nv-accordion.docs.d.ts +4 -0
  378. package/dist/types/components/nv-accordion-item/nv-accordion-item.d.ts +79 -0
  379. package/dist/types/components/nv-accordion-item/nv-accordion-item.docs.d.ts +4 -0
  380. package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +4 -2
  381. package/dist/types/components/nv-dialog/nv-dialog.d.ts +7 -0
  382. package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +22 -2
  383. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +13 -16
  384. package/dist/types/components/nv-fieldslider/nv-fieldslider.utils.d.ts +13 -0
  385. package/dist/types/components/nv-fieldslider/partials/range-thumb.d.ts +2 -0
  386. package/dist/types/components/nv-fieldslider/partials/single-thumb.d.ts +2 -0
  387. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  388. package/dist/types/components/nv-tooltip/nv-tooltip.d.ts +7 -0
  389. package/dist/types/components.d.ts +241 -10
  390. package/dist/vscode-data.json +84 -5
  391. package/hydrate/index.js +1116 -595
  392. package/hydrate/index.mjs +1116 -595
  393. package/package.json +7 -3
  394. package/dist/cjs/fade.animation-0d33d198.js.map +0 -1
  395. package/dist/cjs/timeline.animation-dbb9c5ea.js.map +0 -1
  396. package/dist/components/p-131e5140.js.map +0 -1
  397. package/dist/components/p-1daca48a.js.map +0 -1
  398. package/dist/components/p-42301d8f.js.map +0 -1
  399. package/dist/components/p-953d8b4d.js.map +0 -1
  400. package/dist/components/p-a0d7e0cd.js.map +0 -1
  401. package/dist/components/p-b207be02.js +0 -88
  402. package/dist/components/p-b207be02.js.map +0 -1
  403. package/dist/components/p-f7c7a406.js.map +0 -1
  404. package/dist/esm/fade.animation-2a077983.js.map +0 -1
  405. package/dist/esm/timeline.animation-1b88f052.js.map +0 -1
  406. package/dist/native/p-0ec2d430.entry.js +0 -2
  407. package/dist/native/p-14895e84.entry.js +0 -2
  408. package/dist/native/p-14895e84.entry.js.map +0 -1
  409. package/dist/native/p-1daca48a.js +0 -16
  410. package/dist/native/p-1daca48a.js.map +0 -1
  411. package/dist/native/p-2006f5d4.entry.js +0 -2
  412. package/dist/native/p-2b1e7675.entry.js +0 -2
  413. package/dist/native/p-2b1e7675.entry.js.map +0 -1
  414. package/dist/native/p-2c3fb8cc.entry.js +0 -2
  415. package/dist/native/p-2c3fb8cc.entry.js.map +0 -1
  416. package/dist/native/p-42301d8f.js +0 -2
  417. package/dist/native/p-42301d8f.js.map +0 -1
  418. package/dist/native/p-45cbe6e4.entry.js +0 -2
  419. package/dist/native/p-46428304.entry.js +0 -2
  420. package/dist/native/p-46428304.entry.js.map +0 -1
  421. package/dist/native/p-59b07b36.entry.js +0 -2
  422. package/dist/native/p-59b07b36.entry.js.map +0 -1
  423. package/dist/native/p-82c4bf56.entry.js +0 -2
  424. package/dist/native/p-82c4bf56.entry.js.map +0 -1
  425. package/dist/native/p-86ab23ea.entry.js +0 -2
  426. package/dist/native/p-ad128108.entry.js +0 -2
  427. package/dist/native/p-c1765831.js +0 -2
  428. package/dist/native/p-c92d55f9.entry.js +0 -2
  429. package/dist/native/p-c9d3de9c.entry.js +0 -2
  430. package/dist/native/p-c9d3de9c.entry.js.map +0 -1
  431. package/dist/native/p-cbca9326.entry.js +0 -2
  432. package/dist/native/p-d21b2da2.entry.js +0 -7
  433. package/dist/native/p-d21b2da2.entry.js.map +0 -1
  434. /package/dist/native/{p-a0505695.entry.js.map → p-08452012.entry.js.map} +0 -0
  435. /package/dist/native/{p-86ab23ea.entry.js.map → p-1235c007.entry.js.map} +0 -0
  436. /package/dist/native/{p-b5b9190a.entry.js.map → p-18831490.entry.js.map} +0 -0
  437. /package/dist/native/{p-1d98477d.entry.js.map → p-1ad1bff9.entry.js.map} +0 -0
  438. /package/dist/native/{p-914da1e1.entry.js.map → p-1f932a4b.entry.js.map} +0 -0
  439. /package/dist/native/{p-01164e86.entry.js.map → p-2576c1a0.entry.js.map} +0 -0
  440. /package/dist/native/{p-2bc7d66a.entry.js.map → p-2d23fcea.entry.js.map} +0 -0
  441. /package/dist/native/{p-1c1ecd38.entry.js.map → p-31e72603.entry.js.map} +0 -0
  442. /package/dist/native/{p-cbca9326.entry.js.map → p-33e5037d.entry.js.map} +0 -0
  443. /package/dist/native/{p-ff0f3794.entry.js.map → p-4cf00884.entry.js.map} +0 -0
  444. /package/dist/native/{p-c92d55f9.entry.js.map → p-5172f17a.entry.js.map} +0 -0
  445. /package/dist/native/{p-08ca678c.entry.js.map → p-51a57a3a.entry.js.map} +0 -0
  446. /package/dist/native/{p-c7b8b7ba.entry.js.map → p-609b3822.entry.js.map} +0 -0
  447. /package/dist/native/{p-55df8bf9.entry.js.map → p-625be06b.entry.js.map} +0 -0
  448. /package/dist/native/{p-9850c1d7.entry.js.map → p-8030c16b.entry.js.map} +0 -0
  449. /package/dist/native/{p-6029e51b.entry.js.map → p-85a54ef2.entry.js.map} +0 -0
  450. /package/dist/native/{p-c1765831.js.map → p-8d45dbfe.js.map} +0 -0
  451. /package/dist/native/{p-1a5d3b87.entry.js.map → p-9dc1c3e7.entry.js.map} +0 -0
  452. /package/dist/native/{p-0410facd.entry.js.map → p-b829383a.entry.js.map} +0 -0
  453. /package/dist/native/{p-abbe5d69.entry.js.map → p-bab6d0a5.entry.js.map} +0 -0
  454. /package/dist/native/{p-a30206c1.entry.js.map → p-cf468c67.entry.js.map} +0 -0
  455. /package/dist/native/{p-24659a85.entry.js.map → p-ddb0b9f6.entry.js.map} +0 -0
  456. /package/dist/native/{p-ec87200a.entry.js.map → p-e19a8885.entry.js.map} +0 -0
  457. /package/dist/native/{p-7ba03c5d.entry.js.map → p-e802fbb8.entry.js.map} +0 -0
  458. /package/dist/native/{p-45cbe6e4.entry.js.map → p-ec92ee7a.entry.js.map} +0 -0
  459. /package/dist/native/{p-f377b285.entry.js.map → p-f9aa4900.entry.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"names":["useCollapse","node","duration","nodeStyler","styler","collapse","Promise","resolve","height","getBoundingClientRect","set","overflow","animate","from","to","onUpdate","value","maxHeight","onComplete","setCollapsed","style","setExpanded","expand","scrollHeight","removeProperty","timeline","animations","start","reduce","promise","animation","then"],"sources":["src/animations/collapse.animation.ts","src/animations/timeline.animation.ts"],"sourcesContent":["import { animate } from 'popmotion';\nimport styler from 'stylefire';\n\nexport type CollapseOptions = {\n /** How long the animation should take in ms @default 200 */\n duration?: number;\n};\n\nconst useCollapse = (\n node: HTMLElement,\n { duration }: CollapseOptions = { duration: 200 },\n) => {\n const nodeStyler = styler(node);\n\n /**\n * Will set the overflow to hidden, and animate the max height to 0. Make sure\n * the element has no border or y padding set, otherwise the animation will\n * not work as expected.\n */\n function collapse() {\n return new Promise<void>(resolve => {\n const height = node.getBoundingClientRect().height;\n\n nodeStyler.set({ overflow: 'hidden' });\n\n animate({\n from: height,\n to: 0,\n duration,\n onUpdate: value => {\n nodeStyler.set({\n maxHeight: value,\n });\n },\n onComplete: () => {\n resolve();\n },\n });\n });\n }\n\n /**\n * Apply the collapsed styles without animating, useful when initial state\n * is collapsed.\n */\n function setCollapsed() {\n node.style.maxHeight = '0';\n node.style.overflow = 'hidden';\n }\n\n /**\n * Apply the expanded styles without animating, useful when initial state\n * is expanded.\n */\n function setExpanded() {\n node.style.maxHeight = '';\n node.style.overflow = '';\n }\n\n /**\n * Will set the overflow to hidden, and animate the max height to the value\n * of the scrollHeight. Make sure the element has no border or y padding set,\n * otherwise the animation will not work as expected. Once complete, the\n * max-height and overflow style properties will be removed.\n */\n function expand() {\n return new Promise<void>(resolve => {\n const scrollHeight = node.scrollHeight;\n nodeStyler.set({\n overflow: 'hidden',\n });\n\n animate({\n from: 0,\n to: scrollHeight,\n duration,\n onUpdate: value => {\n nodeStyler.set({\n maxHeight: value,\n });\n },\n onComplete: () => {\n node.style.removeProperty('max-height');\n node.style.removeProperty('overflow');\n resolve();\n },\n });\n });\n }\n\n return {\n collapse,\n expand,\n setCollapsed,\n setExpanded,\n };\n};\n\nexport { useCollapse };\n","/**\n * Will execute a series of animation promises in sequence.\n * This is useful for chaining animations where each step depends on the\n * previous one completing before starting the next.\n *\n * @param {Array<() => Promise<void>>} animations - The array of animation functions.\n * @returns {Object} - An object with a `start` method to begin the timeline.\n *\n * @example\n * const { fadeOut } = useFade(this.ref);\n * const { collapse } = useCollapse(this.ref);\n *\n * timeline(fadeOut, collapse).start();\n */\nconst timeline = (...animations: Array<() => Promise<void>>) => ({\n start: () => {\n return animations.reduce(\n (promise, animation) => promise.then(() => animation()),\n Promise.resolve(),\n );\n },\n});\n\nexport { timeline };\n"],"mappings":"iDAQMA,EAAc,CAClBC,GACEC,YAA8B,CAAEA,SAAU,QAE5C,MAAMC,EAAaC,EAAOH,GAO1B,SAASI,IACP,OAAO,IAAIC,SAAcC,IACvB,MAAMC,EAASP,EAAKQ,wBAAwBD,OAE5CL,EAAWO,IAAI,CAAEC,SAAU,WAE3BC,EAAQ,CACNC,KAAML,EACNM,GAAI,EACJZ,WACAa,SAAUC,IACRb,EAAWO,IAAI,CACbO,UAAWD,GACX,EAEJE,WAAY,KACVX,GAAS,GAEX,G,CAQN,SAASY,IACPlB,EAAKmB,MAAMH,UAAY,IACvBhB,EAAKmB,MAAMT,SAAW,Q,CAOxB,SAASU,IACPpB,EAAKmB,MAAMH,UAAY,GACvBhB,EAAKmB,MAAMT,SAAW,E,CASxB,SAASW,IACP,OAAO,IAAIhB,SAAcC,IACvB,MAAMgB,EAAetB,EAAKsB,aAC1BpB,EAAWO,IAAI,CACbC,SAAU,WAGZC,EAAQ,CACNC,KAAM,EACNC,GAAIS,EACJrB,WACAa,SAAUC,IACRb,EAAWO,IAAI,CACbO,UAAWD,GACX,EAEJE,WAAY,KACVjB,EAAKmB,MAAMI,eAAe,cAC1BvB,EAAKmB,MAAMI,eAAe,YAC1BjB,GAAS,GAEX,G,CAIN,MAAO,CACLF,WACAiB,SACAH,eACAE,cACD,E,MCjFGI,EAAW,IAAIC,KAAsC,CACzDC,MAAO,IACED,EAAWE,QAChB,CAACC,EAASC,IAAcD,EAAQE,MAAK,IAAMD,OAC3CxB,QAAQC,oB","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as e,h as c,H as a}from"./p-d0a33e64.js";const d=class{constructor(c){e(this,c);this.repeatTemplate=false}render(){return c(a,{key:"daa7b24c99857d7467f0a5ce0b69dcbeb42577e7"},c("slot",{key:"8c2fe1f1b806322cdf1c89b9243dd0d094e565eb",name:"header"}),c("slot",{key:"81ae95ccd66f88c05253fde0ec9e0d20e02e5304",name:"cell"}))}};export{d as nv_datagridcolumn};
2
- //# sourceMappingURL=p-45cbe6e4.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as e,c as r,h as t,H as i,g as o}from"./p-d0a33e64.js";import{I as n}from"./p-53aa81dd.js";import{v as a}from"./p-f5ff676c.js";import"./p-0462f723.js";const d='nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fielddate{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fielddate[fluid]:not([fluid=false]){max-width:unset}nv-fielddate[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fielddate[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fielddate[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fielddate[required]:not([required=false]) label::after{content:"*";color:var(--components-form-text-required);font-weight:700}nv-fielddate label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fielddate nv-popover{width:100%;display:block}nv-fielddate nv-popover [data-scope=popover]{padding:0;background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:auto}nv-fielddate nv-popover [slot=content]{display:block;width:100%}nv-fielddate nv-popover .datepicker-container{border:none}nv-fielddate .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;display:flex;align-items:center;gap:8px}nv-fielddate .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fielddate .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddate .input-wrapper .input-container:focus-within,nv-fielddate .input-wrapper .input-container:focus-within:hover,nv-fielddate .input-wrapper .input-container:focus,nv-fielddate .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fielddate .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fielddate .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddate .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;}nv-fielddate .input-wrapper .input-container input:focus{outline:none}nv-fielddate .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:"TT Norms Pro", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fielddate .input-wrapper .input-container input[type=password]::-ms-clear,nv-fielddate .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddate .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddate .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddate .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddate .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fielddate .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}';const s=d;const l=class{constructor(t){e(this,t);this.valueChanged=r(this,"valueChanged",7);this.popoverId=a();this.inputId=a();this.disabled=false;this.readonly=false;this.required=false;this.error=false;this.success=false;this.autofocus=false;this.value="";this.singleValue="";this.open=false;this.firstDayOfWeek=1;this.numberOfCalendars=1;this.min="";this.max="";this.locale="en-BE";this.dateFormat="YYYY-MM-DD";this.shortcutsPlacement="bottom";this.showActions=false;this.fluid=false;this.handleClickOutside=e=>{if(this.open&&this.el&&!this.el.contains(e.target)){this.open=false}};this.handleInputContainerClick=e=>{if(this.readonly||this.disabled){e.preventDefault();e.stopPropagation();return}this.inputElement.focus();const r=this.dateFormat;if(r.startsWith("DD")){this.inputElement.setSelectionRange(0,2)}else if(r.startsWith("MM")){this.inputElement.setSelectionRange(0,2)}else if(r.startsWith("YYYY")){this.inputElement.setSelectionRange(0,4)}};this.handleInput=e=>{if(this.readonly||this.disabled){e.preventDefault();return}const r=e.target;const t=this.value;this.singleValue=r.value;this.value=r.value;if(t!==r.value){this.valueChanged.emit(r.value)}};this.toggleCalendar=()=>{if(this.readonly||this.disabled){return}this.open=!this.open};this.handleFocus=e=>{if(this.readonly||this.disabled){e.preventDefault();e.target.blur();return}};this.handleCalendarValueChanged=e=>{e.stopPropagation()};this.setPopoverRef=e=>{this.popoverElement=e};this.setInputRef=e=>{this.inputElement=e}}convertToInputmaskFormat(e){switch(e){case"DD/MM/YYYY":return"dd/mm/yyyy";case"MM/DD/YYYY":return"mm/dd/yyyy";case"YYYY-MM-DD":return"yyyy-mm-dd";case"DD.MM.YYYY":return"dd.mm.yyyy";case"YYYYMMDD":return"yyyymmdd";default:return e}}connectedCallback(){document.addEventListener("click",this.handleClickOutside)}componentWillLoad(){if(this.value){this.singleValue=this.value}}componentDidLoad(){const e=this.el.querySelectorAll(".input-wrapper input");e.forEach((e=>{n({alias:"datetime",inputFormat:this.convertToInputmaskFormat(this.dateFormat),placeholder:"_".repeat(this.dateFormat.length)}).mask(e)}))}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside)}handleSingleDateChange(e){const r=e.detail;const t=this.value;this.singleValue=r;this.value=r;if(t!==r){this.valueChanged.emit(r)}if(!this.showActions){this.open=false}}handleClosePopover(){this.open=false}handleKeyDown(e){if(!this.open){if(e.key==="ArrowDown"){this.open=true;e.preventDefault();return}return}if(!this.popoverElement){console.warn("nv-fielddate -> Popover element is not defined");return}}handleValueChange(e){this.singleValue=e}render(){return t(i,{key:"4af4649cc8fdc95f2f12d1c495549a006c82c742"},(this.label&&this.label.length>0||this.el.querySelector('[slot="label"]'))&&t("label",{key:"c4905c94c62c8eb01120b30e3b5c16c2dafec20d",htmlFor:this.inputId},t("slot",{key:"b8e952b9a6acb9f136d3461514b82a6767723c3c",name:"label"},this.label)),t("nv-popover",{key:"de6620c60eb3db3c6f0f435977f257636be81a80",ref:this.setPopoverRef,id:this.popoverId,triggerMode:"controlled",placement:"bottom-start",open:this.open},t("div",{key:"e2189ad3476f3d088c07153bc4c1e63357317ded",slot:"trigger",class:"input-wrapper"},t("slot",{key:"a35e545f1379c479734719d8460d5031631f5730",name:"before-input"}),t("div",{key:"01338c24dfff69e019ff6d2344f176effb2dac06",class:"input-container",onClick:this.handleInputContainerClick},t("slot",{key:"f6552d188174e77e8f75a9b0554e3ea78c57056d",name:"leading-input"}),t("input",{key:"1b9ad6226166b6bf08afda41f0f6b789fe12dd27",id:this.inputId,ref:this.setInputRef,placeholder:this.placeholder,name:this.name,disabled:this.disabled,readOnly:this.readonly,required:this.required,autofocus:this.autofocus,value:this.singleValue,onInput:this.handleInput,onFocus:this.handleFocus,"data-scope":"date"}),this.error&&t("nv-icon",{key:"0527f051261672a8df205d26dcb253c20b3dfd4b",name:"alert-circle",class:"validation",size:"md"}),this.success&&t("nv-icon",{key:"ed83a0a0b7a88f392f16bf97f20885261f88665d",name:"circle-check",class:"validation",size:"md"}),t("nv-iconbutton",{key:"6abf3dff6a1bcc0759bea91ab3674d61f4c016c2",class:"toggle-calendar-icon",name:"calendar",size:"md",emphasis:"lower","aria-label":this.open?"Hide calendar":"Show calendar","aria-pressed":this.open.toString(),onClick:this.toggleCalendar,tabIndex:this.disabled?-1:0})),t("slot",{key:"76d584ac756b228e356a17ad36e4558f9a497ea3",name:"after-input"})),t("div",{key:"4914e6fa5046fb287bedb841f2a0b71f1f86e5a3",slot:"content"},t("nv-calendar",{key:"fcfb949ee9c378aac2d7c792ed79fcb3cbf8e987",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||this.el.querySelector('[slot="description"]'))&&t("div",{key:"52ffcb5f41161b9dc95c0fc18a252b6568817ffb",class:"description"},t("slot",{key:"91c68f28fe31f5ecfa58d80e5decb018890f18fe",name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&t("div",{key:"0c0b8c65f261c2439446dd05014d172e6b829244",hidden:!this.error,class:"error-description"},this.el.querySelector('[slot="error-description"]')?t("slot",{name:"error-description"}):this.errorDescription),t("slot",{key:"cf9410ad858faf59d7ada7ce70b18aa768e30a65"}))}get el(){return o(this)}static get watchers(){return{value:["handleValueChange"]}}};l.style=s;export{l as nv_fielddate};
2
- //# sourceMappingURL=p-46428304.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["nvFielddateCss","NvFielddateStyle0","NvFielddate","constructor","hostRef","this","popoverId","uuidv4","inputId","disabled","readonly","required","error","success","autofocus","value","singleValue","open","firstDayOfWeek","numberOfCalendars","min","max","locale","dateFormat","shortcutsPlacement","showActions","fluid","handleClickOutside","event","el","contains","target","handleInputContainerClick","preventDefault","stopPropagation","inputElement","focus","format","startsWith","setSelectionRange","handleInput","input","previousValue","valueChanged","emit","toggleCalendar","handleFocus","blur","handleCalendarValueChanged","setPopoverRef","popoverElement","setInputRef","convertToInputmaskFormat","connectedCallback","document","addEventListener","componentWillLoad","componentDidLoad","inputs","querySelectorAll","forEach","Inputmask","alias","inputFormat","placeholder","repeat","length","mask","disconnectedCallback","removeEventListener","handleSingleDateChange","detail","handleClosePopover","handleKeyDown","key","console","warn","handleValueChange","newValue","render","h","Host","label","querySelector","htmlFor","name","ref","id","triggerMode","placement","slot","class","onClick","readOnly","onInput","onFocus","size","emphasis","toString","tabIndex","shortcuts","showWeekNumbers","disabledDates","onValueChanged","description","errorDescription","hidden"],"sources":["src/components/nv-fielddate/styles/nv-fielddate.scss?tag=nv-fielddate","src/components/nv-fielddate/nv-fielddate.tsx"],"sourcesContent":["@import '../../../styles/form-field';\n\nnv-fielddate {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n width: 100%;\n display: block;\n\n [data-scope='popover'] {\n padding: 0;\n background-color: var(--components-list-dropdown-background);\n border: 1px solid var(--components-list-dropdown-border);\n width: auto;\n }\n\n [slot='content'] {\n display: block;\n width: 100%;\n }\n .datepicker-container {\n border: none\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n display: flex;\n align-items: center;\n gap: 8px;\n\n .input-container {\n @include form-field-input-container();\n\n input {\n @include form-field-input();\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\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-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 // eslint-disable-next-line @stencil-community/own-props-must-be-private\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 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 switch (format) {\n case 'DD/MM/YYYY':\n return 'dd/mm/yyyy';\n case 'MM/DD/YYYY':\n return 'mm/dd/yyyy';\n case 'YYYY-MM-DD':\n return 'yyyy-mm-dd';\n case 'DD.MM.YYYY':\n return 'dd.mm.yyyy';\n case 'YYYYMMDD':\n return 'yyyymmdd';\n default:\n return format;\n }\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 if (this.readonly || this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n this.inputElement.focus();\n // Select the first characters based on the date format\n const format = this.dateFormat;\n if (format.startsWith('DD')) {\n this.inputElement.setSelectionRange(0, 2);\n } else if (format.startsWith('MM')) {\n this.inputElement.setSelectionRange(0, 2);\n } else if (format.startsWith('YYYY')) {\n this.inputElement.setSelectionRange(0, 4);\n }\n };\n\n /**\n * Handles the input event on the input element.\n * Updates the singleValue and emits the valueChanged event.\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 const previousValue = this.value;\n this.singleValue = input.value;\n this.value = input.value;\n // Only emit valueChanged if the value actually changed\n if (previousValue !== input.value) {\n this.valueChanged.emit(input.value);\n }\n };\n\n /**\n * Toggles the opening/closing of the popover.\n */\n private toggleCalendar = () => {\n if (this.readonly || this.disabled) {\n return;\n }\n this.open = !this.open;\n };\n\n /**\n * 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\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 //#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 const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: '_'.repeat(this.dateFormat.length),\n }).mask(input);\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 value changes (unified value binding).\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\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 // 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 @Watch('value')\n handleValueChange(newValue: string) {\n this.singleValue = newValue;\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\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 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={this.placeholder}\n name={this.name}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n value={this.singleValue}\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 aria-pressed={this.open.toString()}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n 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 //#endregion RENDER\n}\n"],"mappings":"gKAAA,MAAMA,EAAiB,yhPACvB,MAAAC,EAAeD,E,MC4BFE,EAAW,MALxB,WAAAC,CAAAC,G,qDAUUC,KAAAC,UAAoBC,IAUnBF,KAAAG,QAAkBD,IA8BlBF,KAAAI,SAAoB,MAMpBJ,KAAAK,SAAoB,MAMpBL,KAAAM,SAAoB,MAMpBN,KAAAO,MAAiB,MAYjBP,KAAAQ,QAAmB,MAOnBR,KAAAS,UAAqB,MAS9BT,KAAAU,MAAgB,GAMhBV,KAAAW,YAAsB,GAMtBX,KAAAY,KAAgB,MAOPZ,KAAAa,eAAyB,EAOzBb,KAAAc,kBAA4B,EAM5Bd,KAAAe,IAAe,GAMff,KAAAgB,IAAe,GAMfhB,KAAAiB,OAAiB,QAQjBjB,KAAAkB,WAAqB,aAOrBlB,KAAAmB,mBAAkD,SAOlDnB,KAAAoB,YAAuB,MAyBvBpB,KAAAqB,MAAiB,MAgClBrB,KAAAsB,mBAAsBC,IAC5B,GAAIvB,KAAKY,MAAQZ,KAAKwB,KAAOxB,KAAKwB,GAAGC,SAASF,EAAMG,QAAiB,CACnE1B,KAAKY,KAAO,K,GAQRZ,KAAA2B,0BAA6BJ,IACnC,GAAIvB,KAAKK,U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B2E,UAAW/F,KAAK+F,UAChBC,gBAAiBhG,KAAKgG,gBACtBC,cAAejG,KAAKiG,cACpBC,eAAgBlG,KAAK2C,gCAKxB3C,KAAKmG,aAAenG,KAAKmG,YAAYtC,OAAS,GAC/C7D,KAAKwB,GAAGsD,cAAc,0BACtBH,EAAA,OAAAN,IAAA,2CAAKiB,MAAM,eACTX,EAAA,QAAAN,IAAA,2CAAMW,KAAK,eAAehF,KAAKmG,eAIjCnG,KAAKoG,kBACLpG,KAAKwB,GAAGsD,cAAc,gCACtBH,EAAA,OAAAN,IAAA,2CAAKgC,QAASrG,KAAKO,MAAO+E,MAAM,qBAC7BtF,KAAKwB,GAAGsD,cAAc,8BACrBH,EAAA,QAAMK,KAAK,sBAEXhF,KAAqB,kBAK3B2E,EAAA,QAAAN,IAAA,6C","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as e,c as t,h as i,H as s,g as o}from"./p-d0a33e64.js";import{v as r}from"./p-f5ff676c.js";const n='nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldmultiselect{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldmultiselect[fluid]:not([fluid=false]){max-width:unset}nv-fieldmultiselect[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldmultiselect[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldmultiselect[required]:not([required=false])>label::after{content:"*";color:var(--components-form-text-required);font-weight:700}nv-fieldmultiselect label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldmultiselect nv-popover{width:100%;display:block}nv-fieldmultiselect nv-popover [data-scope=popover]{width:100%;padding:var(--list-dropdown-padding);border-radius:var(--list-dropdown-radius);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border)}nv-fieldmultiselect nv-popover [slot=content]{gap:var(--list-dropdown-gap-y);display:flex;flex-direction:column}nv-fieldmultiselect nv-popover hr{color:var(--components-list-dropdown-separator)}nv-fieldmultiselect nv-popover div[slot=content]{max-height:calc(90vh - var(--list-dropdown-padding) * 2);overflow-y:auto;position:relative}nv-fieldmultiselect nv-popover div[slot=content]::-webkit-scrollbar{width:6px;height:6px}nv-fieldmultiselect nv-popover div[slot=content]::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fieldmultiselect nv-popover div[slot=content]::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fieldmultiselect .input-wrapper-multiselect{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldmultiselect .input-container-multiselect{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out;position:relative;width:100%;min-height:40px;}nv-fieldmultiselect .input-container-multiselect:hover{border-color:var(--nv-field-border-hover)}nv-fieldmultiselect .input-container-multiselect:focus-within,nv-fieldmultiselect .input-container-multiselect:focus-within:hover,nv-fieldmultiselect .input-container-multiselect:focus,nv-fieldmultiselect .input-container-multiselect:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldmultiselect .input-container-multiselect:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldmultiselect .input-container-multiselect:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldmultiselect .input-container-multiselect>nv-badge{margin-left:var(--form-field-padding-x)}nv-fieldmultiselect .input-container-multiselect input,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;width:100%;flex-grow:1;margin:0;min-height:100%;box-sizing:border-box}nv-fieldmultiselect .input-container-multiselect input:focus,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text:focus{outline:none}nv-fieldmultiselect .input-container-multiselect input::placeholder,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:"TT Norms Pro", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldmultiselect .input-container-multiselect input[type=password]::-ms-clear,nv-fieldmultiselect .input-container-multiselect input[type=password]::-ms-reveal,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text[type=password]::-ms-clear,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldmultiselect .input-container-multiselect>nv-iconbutton{border:0px;border-radius:0px}nv-fieldmultiselect .input-container-multiselect>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldmultiselect .input-container-multiselect nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldmultiselect .non-filterable-text{display:block;border-radius:var(--form-field-radius);background-color:var(--nv-field-background);color:var(--components-form-field-content-text);font-size:var(--form-field-font-size);font-weight:500;line-height:var(--form-field-line-height);box-sizing:border-box;cursor:pointer;height:100%;min-height:40px}nv-fieldmultiselect .non-filterable-text span{display:inline-block;width:100%;overflow:hidden;text-overflow:ellipsis}nv-fieldmultiselect .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldmultiselect .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}.no-results-message{text-align:center;padding:10px;color:var(--components-form-text-description-error)}.multiselect-divider{display:block;width:100%;height:1px;background-color:var(--components-list-dropdown-separator);margin:var(--list-dropdown-item-padding-y) 0;border:0}';const l=n;const a=class{constructor(o){e(this,o);this.valueChanged=t(this,"valueChanged",7);this.multiselectChange=t(this,"multiselectChange",7);this.inputId=r();this.autocomplete="off";this.required=false;this.readonly=false;this.disabled=false;this.error=false;this.maxHeight="";this.open=false;this.emptyResult="No results found";this.filterable=false;this.debounceDelay=300;this.autofocus=false;this.fluid=false;this.badgeLabel="";this.filterText="";this.selectedValues=[];this.sortedOptions=[];this.isHandlingEscape=false;this.handleBadgeCloseOptions=()=>{this.selectedValues=[];this.multiselectChange.emit(this.selectedValues);const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));e.forEach((e=>{e.checked=false;e.style.display=""}));this.options=this.options.filter((e=>!e.isDivider));this.reorderOptionsContent()};this.handleBadgeCloseSlots=()=>{this.selectedValues=[];this.multiselectChange.emit(this.selectedValues);const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));e.forEach((e=>{e.checked=false;e.style.display=""}));this.reorderSlotContent()};this.handlePopoverClose=()=>{if(this.isHandlingEscape){return}this.filterText="";if(this.filterable){this.resetFilter()}};this.handleInputBlurOptions=()=>{setTimeout((()=>{if(!this.el.contains(document.activeElement)){this.open=false;if(this.filterable){this.filterText="";this.resetFilter()}}}),150)};this.handleInputContainerClickOptions=e=>{if(this.disabled||this.readonly){return}const t=e.target;if(t.tagName==="P"||t.tagName==="SPAN"){this.open=true;const e=this.el.querySelector(".input-container");if(e){e.classList.add("focus-within");const t=()=>{e.classList.remove("focus-within")};this.popoverElement.addEventListener("hide",t)}}};this.handleInputContainerClickSlots=e=>{if(this.disabled||this.readonly){return}const t=e.target;if(t.tagName==="P"||t.tagName==="SPAN"){this.open=true;const e=this.el.querySelector(".input-container");if(e){e.classList.add("focus-within");const t=()=>{e.classList.remove("focus-within")};this.popoverElement.addEventListener("hide",t)}}};this.handleInputOptions=e=>{if(!this.filterable)return;if(this.disabled||this.readonly){return}const t=e.target;this.value=t.value;this.valueChanged.emit(this.value);if(this.debounceTimer){window.clearTimeout(this.debounceTimer)}this.debounceTimer=window.setTimeout((()=>{this.filterText=t.value.toLowerCase();this.filterItemsOption()}),this.debounceDelay)};this.handleInputSlots=e=>{if(!this.filterable)return;if(this.disabled||this.readonly)return;const t=e.target;this.value=t.value;this.valueChanged.emit(this.value);if(this.debounceTimer){window.clearTimeout(this.debounceTimer)}this.debounceTimer=window.setTimeout((()=>{this.filterText=t.value.toLowerCase();this.filterSlotsItems()}),this.debounceDelay)};this.handleInputFocusOptions=()=>{if(this.disabled||this.readonly){return}this.open=true};this.handleInputFocusSlots=()=>{if(this.disabled||this.readonly){return}this.open=true};this.handleInputBlurSlots=()=>{setTimeout((()=>{if(!this.el.contains(document.activeElement)){this.open=false;if(this.filterable){this.filterText="";this.resetFilter()}}}),150)};this.togglePopoverOptions=()=>{if(this.disabled||this.readonly){return}this.open=!this.open};this.togglePopoverSlots=()=>{if(this.disabled||this.readonly){return}this.open=!this.open};this.renderOptionsMode=()=>i(s,{"aria-label":this.label,"aria-expanded":this.open.toString()},(this.label||this.el.querySelector('[slot="label"]'))&&i("label",{htmlFor:this.inputId},i("slot",{name:"label"},this.label)),i("nv-popover",{ref:e=>this.popoverElement=e,triggerMode:"controlled",placement:"bottom-start",open:this.open},i("div",{class:"input-wrapper-multiselect",slot:"trigger"},i("slot",{name:"before-input"}),i("div",{class:"input-container-multiselect"},i("slot",{name:"leading-input"}),this.selectedValues.length>0&&i("nv-badge",{slot:"leading-input","prevent-auto-close":true,color:"10",dismissible:this.selectedValues.length>0,label:`${this.selectedValues.length} ${this.badgeLabel}`,"aria-label":`Clear all ${this.selectedValues.length} ${this.badgeLabel} items`,onCloseClicked:this.handleBadgeCloseOptions}),this.filterable||this.disabled||this.readonly?i("input",{type:"text",id:this.inputId,ref:e=>this.inputElement=e,autofocus:this.autofocus,autocomplete:this.autocomplete,placeholder:this.placeholder,name:this.name,value:this.value,required:this.required,disabled:this.disabled,readOnly:this.readonly,onInput:this.handleInputOptions,onFocus:this.handleInputFocusOptions,onBlur:this.handleInputBlurOptions,onKeyDown:this.handleKeyDown,"data-scope":"focusable"}):i("p",{id:this.inputId,class:"non-filterable-text",onClick:this.handleInputContainerClickOptions,tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleInputFocusOptions,role:"combobox","aria-expanded":this.open,"data-scope":"focusable"},i("span",null,this.value||this.placeholder)),this.error&&i("nv-icon",{name:"alert-circle",class:"validation",size:"md"}),i("nv-iconbutton",{"data-scope":"toggle-dropdown",name:this.open?"chevron-top":"chevron-down",size:"md",emphasis:"lower","aria-label":this.open?"Hide dropdown":"Show dropdown","aria-pressed":this.open.toString(),onClick:this.togglePopoverOptions})),i("slot",{name:"after-input"})),i("div",{slot:"content",role:"listbox","aria-multiselectable":"true",style:this.maxHeight?{maxHeight:this.maxHeight}:{}},i("ul",{role:"content"},this.options.map((e=>i("nv-fielddropdownitemcheck",{label:e.label,description:e.description,value:e.value,checked:this.selectedValues.includes(e.value),disabled:e.disabled}))),i("hr",{class:"multiselect-divider",style:{display:"none"}})))),this.renderDescriptions());this.renderSlotsMode=()=>i(s,{"aria-label":this.label,"aria-expanded":this.open.toString()},(this.label||this.el.querySelector('[slot="label"]'))&&i("label",{htmlFor:this.inputId},i("slot",{name:"label"},this.label)),i("nv-popover",{ref:e=>this.popoverElement=e,triggerMode:"controlled",placement:"bottom-start",open:this.open},i("div",{class:"input-wrapper-multiselect",slot:"trigger"},i("slot",{name:"before-input"}),i("div",{class:"input-container-multiselect",onClick:this.handleInputContainerClickSlots},i("slot",{name:"leading-input"}),this.selectedValues.length>0&&i("nv-badge",{slot:"leading-input","prevent-auto-close":true,color:"10",dismissible:this.selectedValues.length>0,label:`${this.selectedValues.length} ${this.badgeLabel}`,"aria-label":`Clear all ${this.selectedValues.length} ${this.badgeLabel} items`,onCloseClicked:this.handleBadgeCloseSlots}),this.filterable||this.disabled||this.readonly?i("input",{id:this.inputId,ref:e=>this.inputElement=e,autocomplete:this.autocomplete,placeholder:this.placeholder,name:this.name,value:this.value,required:this.required,disabled:this.disabled,readOnly:this.readonly,onInput:this.handleInputSlots,onFocus:this.handleInputFocusSlots,onBlur:this.handleInputBlurSlots,onKeyDown:this.handleKeyDown,"data-scope":"focusable"}):i("p",{id:this.inputId,class:"non-filterable-text",onClick:this.handleInputContainerClickSlots,tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleInputFocusSlots,role:"combobox","aria-expanded":this.open,"data-scope":"focusable"},i("span",null,this.value||this.placeholder)),this.error&&i("nv-icon",{name:"alert-circle",class:"validation",size:"md"}),i("nv-iconbutton",{"data-scope":"toggle-dropdown",name:this.open?"chevron-top":"chevron-down",size:"md",emphasis:"lower","aria-label":this.open?"Hide dropdown":"Show dropdown","aria-pressed":this.open.toString(),onClick:this.togglePopoverSlots})),i("slot",{name:"after-input"})),i("div",{slot:"content",role:"listbox","aria-multiselectable":"true",style:this.maxHeight?{maxHeight:this.maxHeight}:{}},i("slot",{name:"content"}))),this.renderDescriptions())}handleOptionsChange(e){if(!e)return;this.selectedValues=e.filter((e=>e.checked)).map((e=>e.value));this.reorderOptionsContent()}watchValueHandler(){this.setInitialSelection()}handleOpenChanged(e){e.stopPropagation();this.open=e.detail;if(this.open){if(this.filterText){this.filterItems()}}else{this.handlePopoverClose()}if(this.options){this.reorderOptionsContent()}else{this.reorderSlotContent()}}handleItemChecked(e){if(this.disabled||this.readonly){return}const{value:t,checked:i}=e.detail;if(t!==undefined&&t!==null){const e=[...this.selectedValues];const s=e.indexOf(t);if(i&&s===-1){e.push(t)}else if(!i&&s>-1){e.splice(s,1)}if(JSON.stringify(this.selectedValues)!==JSON.stringify(e)){this.selectedValues=e;requestAnimationFrame((()=>{this.multiselectChange.emit(this.selectedValues)}))}}else{console.warn("Received itemChecked event with undefined or null value")}}handleSlotChange(e){const t=e.target;if(t&&t.name==="content"){requestAnimationFrame((()=>{this.reorderSlotContent()}))}}connectedCallback(){document.addEventListener("click",this.handleClickOutside.bind(this))}componentWillLoad(){var e;if(this.options){this.handleOptionsChange(this.options)}if(!this.options){Promise.resolve().then((()=>{const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));this.selectedValues=e.filter((e=>e.hasAttribute("checked"))).map((e=>e.getAttribute("value")||""));requestAnimationFrame((()=>{this.reorderSlotContent()}))}))}if(this.options){this.sortedOptions=[...(e=this.options)!==null&&e!==void 0?e:[]]}if(this.filterable&&this.value){this.filterText=String(this.value).toLocaleLowerCase();this.filterItems()}else{this.resetFilter()}}componentDidLoad(){if(this.options){this.handleOptionsChange(this.options)}}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside.bind(this))}async getFilterText(){return this.filterText}setInitialSelection(){var e;const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const i=t.find((e=>{var t;return e.getAttribute("label")===this.value||e.getAttribute("value")===this.value||((t=e.textContent)===null||t===void 0?void 0:t.trim())===this.value}));t.forEach((e=>{e.removeAttribute("selected");e.classList.remove("selected")}));if(i){i.setAttribute("selected","true");i.classList.add("selected");this.value=i.getAttribute("label")||i.getAttribute("value")||((e=i.textContent)===null||e===void 0?void 0:e.trim())||"";if(this.inputElement){this.inputElement.value=this.value}}}async resetFilter(){const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));e.forEach((e=>{e.style.display=""}));const t=this.el.querySelector("ul");if(t){const i=t.querySelector("[data-empty]");if(i)i.remove();const s=e.filter((e=>this.selectedValues.includes(e.getAttribute("value")||"")));const o=e.filter((e=>!this.selectedValues.includes(e.getAttribute("value")||"")));if(s.length>0){this.manageDivider(t,s,o)}}}async getSelectedValues(){return this.selectedValues}reorderSlotContent(){if(this.options)return;const e=this.el.querySelector("ul");if(!e)return;e.querySelectorAll("hr.multiselect-divider").forEach((e=>e.remove()));const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck")).filter((e=>e.style.display!=="none"));const i=e.querySelector("[data-empty]");if(i){return}const s=t.filter((e=>this.selectedValues.includes(e.getAttribute("value")||"")));const o=t.filter((e=>!this.selectedValues.includes(e.getAttribute("value")||"")));s.forEach((t=>{e.appendChild(t)}));if(s.length>0&&o.length>0){const t=document.createElement("hr");t.className="multiselect-divider";e.appendChild(t)}o.forEach((t=>{e.appendChild(t)}))}reorderOptionsContent(){const e=this.el.querySelector('ul[role="content"]');if(!e)return;const t=Array.from(e.querySelectorAll("nv-fielddropdownitemcheck")).filter((e=>e.style.display!=="none"));const i=t.filter((e=>this.selectedValues.includes(e.getAttribute("value")||"")));const s=t.filter((e=>!this.selectedValues.includes(e.getAttribute("value")||"")));i.forEach((t=>e.appendChild(t)));s.forEach((t=>e.appendChild(t)));this.manageDivider(e,i,s)}filterItems(){const e=this.el.querySelector("ul");if(!e)return;const t=e.querySelector("[data-empty]");if(t){t.remove()}if(!this.filterText.trim()){if(this.options&&this.options.length>0){const t=Array.from(e.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((e=>{e.style.display=""}))}else{const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));e.forEach((e=>{e.style.display=""}))}const t=Array.from(e.querySelectorAll("nv-fielddropdownitemcheck"));const i=t.filter((e=>this.selectedValues.includes(e.getAttribute("value")||"")));const s=t.filter((e=>!this.selectedValues.includes(e.getAttribute("value")||"")));this.manageDivider(e,i,s);return}const i=this.normalizeText(this.filterText);let s=false;if(this.options&&this.options.length>0){const t=Array.from(e.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((e=>{const t=this.options.find((t=>t.value===e.getAttribute("value")));if(t&&!t.isDivider){const o=this.normalizeText(t.label).includes(i)||this.normalizeText(t.value).includes(i);e.style.display=o?"":"none";if(o)s=true}}));const o=t.filter((e=>e.style.display!=="none"));const r=o.filter((e=>this.selectedValues.includes(e.getAttribute("value")||"")));const n=o.filter((e=>!this.selectedValues.includes(e.getAttribute("value")||"")));this.manageDivider(e,r,n)}else{const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));e.forEach((e=>{const t=e.getAttribute("label")||"";const o=e.getAttribute("value")||"";const r=e.textContent||"";const n=this.normalizeText(t).includes(i)||this.normalizeText(o).includes(i)||this.normalizeText(r).includes(i);e.style.display=n?"":"none";if(n)s=true}))}if(!s){const t=document.createElement("li");t.setAttribute("data-empty","true");t.textContent=this.emptyResult;t.classList.add("no-results-message");e.appendChild(t)}this.reorderSlotContent()}filterItemsOption(){const e=this.el.querySelector("ul");if(!e)return;const t=this.normalizeText(this.filterText);let i=false;const s=Array.from(e.querySelectorAll("nv-fielddropdownitemcheck"));if(!this.filterText.trim()){this.removeEmptyMessageOption(e);s.forEach((e=>e.style.display=""));this.reorderOptionsContent();return}s.forEach((e=>{const s=e.getAttribute("label")||"";const o=e.getAttribute("value")||"";const r=this.normalizeText(s).includes(t)||this.normalizeText(o).includes(t);e.style.display=r?"":"none";if(r)i=true}));const o=s.filter((e=>e.style.display!=="none"));const r=o.filter((e=>this.selectedValues.includes(e.getAttribute("value")||"")));const n=o.filter((e=>!this.selectedValues.includes(e.getAttribute("value")||"")));this.manageDivider(e,r,n);if(!i){this.addEmptyMessageOption(e)}else{this.removeEmptyMessageOption(e)}}filterSlotsItems(){if(this.options)return;const e=this.el.querySelector("ul");if(!e)return;const t=e.querySelector("[data-empty]");if(t){t.remove()}if(!this.filterText.trim()){this.resetFilter();return}const i=this.normalizeText(this.filterText);let s=false;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));o.forEach((e=>{var t;const o=e.getAttribute("label")||"";const r=e.getAttribute("value")||"";const n=((t=e.textContent)===null||t===void 0?void 0:t.trim())||"";const l=this.normalizeText(o).includes(i)||this.normalizeText(r).includes(i)||this.normalizeText(n).includes(i);e.style.display=l?"":"none";if(l)s=true}));const r=o.filter((e=>e.style.display!=="none"));const n=r.filter((e=>this.selectedValues.includes(e.getAttribute("value")||"")));this.manageDivider(e,n,r.filter((e=>!this.selectedValues.includes(e.getAttribute("value")||""))));if(!s){const t=document.createElement("li");t.setAttribute("data-empty","true");t.textContent=this.emptyResult;t.classList.add("no-results-message");e.appendChild(t)}}normalizeText(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim()}handleClickOutside(e){if(this.el.contains(e.target)||this.inputElement&&this.inputElement.contains(e.target)){return}this.open=false}async handleKeyDown(e){if(!this.open){if(e.key==="ArrowDown"){this.open=true;if(!this.filterable){requestAnimationFrame((()=>{this.focusFirstItem()}))}e.preventDefault();return}return}const t=Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck:not([style*="display: none"])'));if(t.length===0){console.warn("No visible items found to navigate");return}let i=t.findIndex((e=>e.classList.contains("highlighted")));if(e.key==="ArrowDown"){e.preventDefault();i=i===-1?0:(i+1)%t.length;this.updateHighlightedItem(t,i)}else if(e.key==="ArrowUp"){e.preventDefault();i=i===-1?t.length-1:(i-1+t.length)%t.length;this.updateHighlightedItem(t,i)}else if(e.key==="Enter"&&i>=0){e.preventDefault();const s=t[i];const o=s.hasAttribute("checked");s.checked=!o;s.dispatchEvent(new MouseEvent("click",{view:window,bubbles:true,cancelable:true}))}else if(e.key==="Escape"){e.preventDefault();e.stopPropagation();const t=async()=>{this.isHandlingEscape=true;if(this.options){this.reorderOptionsContent()}else{this.reorderSlotContent()}await new Promise((e=>setTimeout(e,100)));setTimeout((()=>{this.isHandlingEscape=false;this.open=false}),150);if(this.inputElement){this.inputElement.blur()}};await t()}}updateHighlightedItem(e,t){e.forEach(((e,i)=>{if(i===t){e.classList.add("highlighted");e.setAttribute("tabindex","0");e.scrollIntoView({block:"nearest"});const t=e.querySelector("nv-fieldcheckbox");if(t){t.focus()}}else{e.classList.remove("highlighted");e.setAttribute("tabindex","-1")}}))}focusFirstItem(){const e=this.el.querySelector('nv-fielddropdownitemcheck:not([style*="display: none"])');if(e){e.setAttribute("tabindex","0");e.classList.add("highlighted");e.scrollIntoView({block:"nearest"});const t=e.querySelector("nv-fieldcheckbox");if(t){t.focus()}}else{console.warn("No visible first item found to focus")}}addEmptyMessageOption(e){const t=e.querySelector("[data-empty]");if(t)return;const i=document.createElement("li");i.setAttribute("data-empty","true");i.textContent=this.emptyResult;i.classList.add("no-results-message");e.appendChild(i)}removeEmptyMessageOption(e){const t=e.querySelector("[data-empty]");if(t)t.remove()}manageDivider(e,t,i){let s=e.querySelector("hr.multiselect-divider");if(!s){s=document.createElement("hr");s.className="multiselect-divider";e.appendChild(s)}const o=t.length>0&&i.length>0;if(o){const e=t[t.length-1];e.after(s);s.style.display=""}else{s.style.display="none"}}renderDescriptions(){return[(this.description||this.el.querySelector('[slot="description"]'))&&i("div",{class:"description"},i("slot",{name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&i("div",{hidden:!this.error,class:"error-description"},i("slot",{name:"error-description"},this.errorDescription))]}render(){return this.options?this.renderOptionsMode():this.renderSlotsMode()}static get formAssociated(){return true}get el(){return o(this)}static get watchers(){return{options:["handleOptionsChange"],value:["watchValueHandler"]}}};a.style=l;export{a as nv_fieldmultiselect};
2
- //# sourceMappingURL=p-59b07b36.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["nvFieldmultiselectCss","NvFieldmultiselectStyle0","NvFieldmultiselect","constructor","hostRef","this","inputId","uuidv4","autocomplete","required","readonly","disabled","error","maxHeight","open","emptyResult","filterable","debounceDelay","autofocus","fluid","badgeLabel","filterText","selectedValues","sortedOptions","isHandlingEscape","handleBadgeCloseOptions","multiselectChange","emit","items","Array","from","el","querySelectorAll","forEach","item","checked","style","display","options","filter","option","isDivider","reorderOptionsContent","handleBadgeCloseSlots","reorderSlotContent","handlePopoverClose","resetFilter","handleInputBlurOptions","setTimeout","contains","document","activeElement","handleInputContainerClickOptions","event","target","tagName","inputContainer","querySelector","classList","add","removeFocusWithin","remove","popoverElement","addEventListener","handleInputContainerClickSlots","handleInputOptions","input","value","valueChanged","debounceTimer","window","clearTimeout","toLowerCase","filterItemsOption","handleInputSlots","filterSlotsItems","handleInputFocusOptions","handleInputFocusSlots","handleInputBlurSlots","togglePopoverOptions","togglePopoverSlots","renderOptionsMode","h","Host","label","toString","htmlFor","name","ref","triggerMode","placement","class","slot","length","color","dismissible","onCloseClicked","type","id","e","inputElement","placeholder","readOnly","onInput","onFocus","onBlur","onKeyDown","handleKeyDown","onClick","tabIndex","role","size","emphasis","map","description","includes","renderDescriptions","renderSlotsMode","handleOptionsChange","newValue","watchValueHandler","setInitialSelection","handleOpenChanged","stopPropagation","detail","filterItems","handleItemChecked","undefined","newSelectedValues","valueIndex","indexOf","push","splice","JSON","stringify","requestAnimationFrame","console","warn","handleSlotChange","connectedCallback","handleClickOutside","bind","componentWillLoad","Promise","resolve","then","hasAttribute","getAttribute","_a","String","toLocaleLowerCase","componentDidLoad","disconnectedCallback","removeEventListener","getFilterText","selectedItem","find","textContent","trim","removeAttribute","setAttribute","ul","emptyMessage","selectedItems","unselectedItems","manageDivider","getSelectedValues","divider","hasEmptyMessage","appendChild","createElement","className","existingEmptyMessage","normalizedFilter","normalizeText","hasVisibleItems","opt","matchesFilter","visibleItems","visibleSelected","visibleUnselected","removeEmptyMessageOption","addEmptyMessageOption","visibleSelectedItems","text","normalize","replace","key","focusFirstItem","preventDefault","currentIndex","findIndex","updateHighlightedItem","isCurrentlyChecked","dispatchEvent","MouseEvent","view","bubbles","cancelable","handleEscape","async","blur","index","i","scrollIntoView","block","checkbox","focus","firstItem","existingMessage","shouldShowDivider","lastSelectedItem","after","errorDescription","hidden","render"],"sources":["src/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.scss?tag=nv-fieldmultiselect","src/components/nv-fieldmultiselect/nv-fieldmultiselect.tsx"],"sourcesContent":["@import '../../../styles/form-field';\n@import '../../../styles/scrollbar';\n\nnv-fieldmultiselect {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[required]:not([required='false']) {\n > label {\n @include form-field-label-required();\n }\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n @include form-field-popover();\n\n div[slot='content'] {\n @include scrollbar();\n max-height: calc(90vh - var(--list-dropdown-padding) * 2);\n overflow-y: auto;\n position: relative;\n }\n }\n\n .input-wrapper-multiselect {\n @include form-field-input-wrapper();\n width: 100%;\n }\n\n .input-container-multiselect {\n @include form-field-input-container();\n position: relative;\n width: 100%;\n min-height: 40px;\n\n > nv-badge {\n margin-left: var(--form-field-padding-x);\n }\n\n input,\n p.non-filterable-text {\n @include form-field-input();\n width: 100%;\n flex-grow: 1;\n margin: 0;\n min-height: 100%;\n box-sizing: border-box;\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n\n /* &:hover{\n border-color: var(--components-form-field-border-hover);\n }\n\n &:focus-visible,\n &:focus-within,\n &:focus,\n &.focus-within {\n border-color: var(--components-form-field-border-focus);\n box-shadow: 0px 0px 0px var(--focus-field-stroke)\n var(--nv-field-focus-box-shadow);\n } */\n }\n\n .non-filterable-text {\n display: block;\n border-radius: var(--form-field-radius);\n background-color: var(--nv-field-background);\n color: var(--components-form-field-content-text);\n font-size: var(--form-field-font-size);\n font-weight: 500;\n line-height: var(--form-field-line-height);\n box-sizing: border-box;\n cursor: pointer;\n height: 100%;\n min-height: 40px;\n\n span {\n display: inline-block;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n\n.no-results-message {\n text-align: center;\n padding: 10px;\n color: var(--components-form-text-description-error);\n}\n\n.multiselect-divider {\n display: block;\n width: 100%;\n height: 1px;\n background-color: var(--components-list-dropdown-separator);\n margin: var(--list-dropdown-item-padding-y) 0;\n border: 0;\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot content - The content of the list.\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-fieldmultiselect',\n styleUrl: 'styles/nv-fieldmultiselect.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldmultiselect {\n @Element() el: HTMLNvFieldmultiselectElement;\n private inputElement!: HTMLInputElement;\n private popoverElement!: HTMLNvPopoverElement;\n /**\n * Timer for debouncing input events.\n * Private property preferred over @State as it:\n * - Doesn't need to trigger re-renders\n * - Is purely for internal logic\n * - Improves performance by avoiding Stencil's reactivity system\n */\n private debounceTimer: number;\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 * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input's data in form submissions. It should be\n * unique within the form to avoid conflicts.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It's a crucial element for making forms clear and user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Display temporary text inside the input field.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they've used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Specifies the value of the input field.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * Marks the input field as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Display the input field's content without allowing users to change it.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Disables the input field.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Alters the input field's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the multiselect\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Defines the maximum height of the multiselect list when open.\n */\n @Prop({ reflect: true })\n readonly maxHeight: string = '';\n\n /**\n * State of the multiselect popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * The text to display when no items match the filter.\n */\n @Prop({ reflect: true })\n readonly emptyResult: string = 'No results found';\n\n /**\n * Enables or disables the filtering feature for the multiselect items.\n */\n @Prop({ reflect: true })\n readonly filterable: boolean = false;\n\n /**\n * List of options used to automatically generate dropdown items. This\n * provides an alternative to using the slot manually.\n *\n * @example\n * options=[{\n * \"label\": \"Option 1\",\n * \"value\": \"option1\",\n * },\n * {\n * \"label\": \"Option 2\",\n * \"value\": \"option2\",\n * }]\n */\n @Prop({ reflect: false, mutable: true })\n options?: {\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is a divider */\n isDivider?: boolean;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Additional description for the option */\n description?: string;\n /** Whether this option is pre-checked */\n checked?: boolean;\n }[];\n\n /**\n * Delay in milliseconds before the search is triggered when typing in the filter input.\n * @default 300\n */\n @Prop({ reflect: true })\n readonly debounceDelay: number = 300;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\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 /**\n * Text for the badge showing the number of selected items.\n */\n @Prop({ reflect: true })\n readonly badgeLabel: string = '';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n /**\n * The text entered by the user for filtering multiselect items.\n */\n @State()\n filterText: string = '';\n\n /**\n * List of selected values in the multiselect.\n */\n @State()\n selectedValues: string[] = [];\n\n /**\n * Sorted options for display.\n */\n @State()\n sortedOptions: Array<{\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is a divider */\n isDivider?: boolean;\n }> = [];\n\n @State()\n private isHandlingEscape: boolean = false;\n\n //#endregion STATE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when the selection changes in the multiselect.\n * Emits the current list of selected values.\n */\n @Event()\n multiselectChange: EventEmitter<string[]>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('options')\n handleOptionsChange(newValue: typeof this.options) {\n if (!newValue) return;\n\n this.selectedValues = newValue\n .filter(option => option.checked)\n .map(option => option.value);\n\n this.reorderOptionsContent();\n }\n\n /**\n * Emitted when the value changes.\n */\n @Watch('value')\n watchValueHandler() {\n // Handle value change and update the corresponding multiselect item if it exists\n this.setInitialSelection();\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LISTENERS\n\n /**\n * Emitted when the input loses focus.\n * @param {CustomEvent<boolean>} event - The event object containing the focus state.\n */\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n // Stop propagation to prevent the event from affecting parent components like dialogs\n event.stopPropagation();\n\n // Update `open` based on the popover state\n this.open = event.detail;\n\n if (this.open) {\n // Filter items only if there is filter text\n if (this.filterText) {\n this.filterItems();\n }\n } else {\n this.handlePopoverClose();\n }\n\n if (this.options) {\n this.reorderOptionsContent();\n } else {\n this.reorderSlotContent();\n }\n }\n\n /**\n * Listen for the `itemChecked` event emitted by child items.\n * @param {CustomEvent} event - The event object containing the selected value and its checked state.\n */\n @Listen('itemChecked')\n handleItemChecked(\n event: CustomEvent<{\n /** Value associated with the option */\n value: string;\n /** Whether this option is checked */\n checked: boolean;\n }>,\n ) {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const { value, checked } = event.detail;\n\n if (value !== undefined && value !== null) {\n const newSelectedValues = [...this.selectedValues];\n const valueIndex = newSelectedValues.indexOf(value);\n\n if (checked && valueIndex === -1) {\n newSelectedValues.push(value);\n } else if (!checked && valueIndex > -1) {\n newSelectedValues.splice(valueIndex, 1);\n }\n\n // Update the state and emit the event only if the selection has changed\n if (\n JSON.stringify(this.selectedValues) !==\n JSON.stringify(newSelectedValues)\n ) {\n this.selectedValues = newSelectedValues;\n\n // Use requestAnimationFrame to ensure the state is updated before emitting the event\n requestAnimationFrame(() => {\n this.multiselectChange.emit(this.selectedValues);\n });\n }\n } else {\n console.warn('Received itemChecked event with undefined or null value'); // Warning log\n }\n }\n\n // Add a listener for the slot content\n @Listen('slotchange')\n handleSlotChange(event: Event) {\n // Check: we only want to reorder if it's the \"content\" slot\n const slot = event.target as HTMLSlotElement;\n if (slot && slot.name === 'content') {\n // To give other platforms (VueJS, React, etc.) time to insert all their items,\n // we place the reorder in a requestAnimationFrame\n requestAnimationFrame(() => {\n this.reorderSlotContent();\n });\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n /**\n * Subscribe to click outside event.\n */\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside.bind(this));\n }\n\n /**\n * Set the mode state and handle options change.\n */\n componentWillLoad() {\n // Don't call handleOptionsChange if we are in slots mode\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n\n // Specific initialization for slots mode\n if (!this.options) {\n Promise.resolve().then(() => {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n // Initialize selectedValues with checked items\n this.selectedValues = items\n .filter(item => item.hasAttribute('checked'))\n .map(item => item.getAttribute('value') || '');\n\n // Force a reorder after initialization\n requestAnimationFrame(() => {\n this.reorderSlotContent();\n });\n });\n }\n\n // Initialize the sorted options array with the parsed options for initial rendering\n if (this.options) {\n this.sortedOptions = [...(this.options ?? [])];\n }\n\n // Apply filtering if the multiselect is filterable and there is a value\n if (this.filterable && this.value) {\n this.filterText = String(this.value).toLocaleLowerCase();\n this.filterItems();\n } else {\n // Reset visibility state of all dropdown items\n this.resetFilter();\n }\n }\n\n /**\n * Force reorder if options mode in componentDidLoad because of the initial render not trigger @watch\n */\n componentDidLoad() {\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n /**\n * Unsubscribe from click outside event.\n */\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside.bind(this));\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Retrieves the current filter text entered by the user.\n * @returns {string} The filter text.\n */\n @Method()\n async getFilterText(): Promise<string> {\n return this.filterText;\n }\n\n /**\n * Set the initial selection based on the current value and update the inputElement value.\n */\n private setInitialSelection() {\n const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitem'));\n\n const selectedItem = items.find(\n item =>\n item.getAttribute('label') === this.value ||\n item.getAttribute('value') === this.value ||\n item.textContent?.trim() === this.value,\n );\n\n // Remove 'selected' from all items first to reset the state\n items.forEach(item => {\n item.removeAttribute('selected');\n item.classList.remove('selected');\n });\n\n if (selectedItem) {\n // Add the `selected` attribute and `selected` class for visual styling\n selectedItem.setAttribute('selected', 'true');\n selectedItem.classList.add('selected');\n\n // Update the value and inputElement value to reflect the pre-selected item\n this.value =\n selectedItem.getAttribute('label') ||\n selectedItem.getAttribute('value') ||\n selectedItem.textContent?.trim() ||\n '';\n if (this.inputElement) {\n this.inputElement.value = this.value;\n }\n }\n }\n\n /**\n * Reset the filter and make all items visible.\n */\n @Method()\n async resetFilter(): Promise<void> {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n // Reset visibility state of all dropdown items\n items.forEach(item => {\n item.style.display = '';\n });\n\n // Clean up filter-related UI elements\n const ul = this.el.querySelector('ul');\n if (ul) {\n const emptyMessage = ul.querySelector('[data-empty]');\n if (emptyMessage) emptyMessage.remove();\n\n // Reorder with divider if needed\n const selectedItems = items.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const unselectedItems = items.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n\n if (selectedItems.length > 0) {\n this.manageDivider(ul as HTMLElement, selectedItems, unselectedItems);\n }\n }\n }\n\n /**\n * Returns the list of selected values.\n * @returns {string[]} The selected values.\n */\n @Method()\n async getSelectedValues(): Promise<string[]> {\n return this.selectedValues;\n }\n\n /**\n * Reorder the content of the slot.\n */\n private reorderSlotContent() {\n if (this.options) return;\n\n const ul = this.el.querySelector('ul');\n if (!ul) return;\n\n // Remove all existing <hr class=\"multiselect-divider\">\n ul.querySelectorAll('hr.multiselect-divider').forEach(divider =>\n divider.remove(),\n );\n\n // Retrieve all items (not hidden)\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n ).filter(item => item.style.display !== 'none');\n\n // If you possibly have a \"No results\" message:\n const hasEmptyMessage = ul.querySelector('[data-empty]');\n if (hasEmptyMessage) {\n // if there is a \"No results found\" message, do not reorder\n return;\n }\n\n // Separate checked vs unchecked\n const selectedItems = items.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const unselectedItems = items.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n\n // Reinsert CHECKED items FIRST\n // appendChild() moves the element without recreating it\n // this is not trigger a re-rendering of the component in the platforms\n selectedItems.forEach(item => {\n ul.appendChild(item); // <-- The <li> (or <nv-fielddropdownitemcheck>) is just \"moved\" to the end of the list\n });\n\n // Add a divider if needed\n if (selectedItems.length > 0 && unselectedItems.length > 0) {\n const divider = document.createElement('hr');\n divider.className = 'multiselect-divider';\n ul.appendChild(divider);\n }\n\n // Reinsert UNCHECKED items at the end\n unselectedItems.forEach(item => {\n ul.appendChild(item);\n });\n }\n\n /**\n * Reorder the content for options mode with async handling\n */\n private reorderOptionsContent() {\n const ul = this.el.querySelector('ul[role=\"content\"]') as HTMLElement;\n if (!ul) return;\n\n const items = Array.from(\n ul.querySelectorAll('nv-fielddropdownitemcheck'),\n ).filter(item => item.style.display !== 'none');\n\n const selectedItems = items.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const unselectedItems = items.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n\n // Reorder the elements\n selectedItems.forEach(item => ul.appendChild(item));\n unselectedItems.forEach(item => ul.appendChild(item));\n\n // Manage the divider after the reordering\n this.manageDivider(ul, selectedItems, unselectedItems);\n }\n\n /**\n * Filter multiselect items based on the text entered by the user.\n */\n private filterItems() {\n const ul = this.el.querySelector('ul');\n if (!ul) return;\n\n // Remove existing empty message if any\n const existingEmptyMessage = ul.querySelector('[data-empty]');\n if (existingEmptyMessage) {\n existingEmptyMessage.remove();\n }\n\n if (!this.filterText.trim()) {\n if (this.options && this.options.length > 0) {\n // Reset options display\n const items = Array.from(\n ul.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n items.forEach(item => {\n item.style.display = '';\n });\n } else {\n // Reset slot items display\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n items.forEach(item => {\n item.style.display = '';\n });\n }\n\n // Reorder with divider\n const items = Array.from(\n ul.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n const selectedItems = items.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const unselectedItems = items.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n this.manageDivider(ul, selectedItems, unselectedItems);\n return;\n }\n\n const normalizedFilter = this.normalizeText(this.filterText);\n let hasVisibleItems = false;\n\n if (this.options && this.options.length > 0) {\n // Filter options mode\n const items = Array.from(\n ul.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n items.forEach(item => {\n const option = this.options.find(\n opt => opt.value === item.getAttribute('value'),\n );\n if (option && !option.isDivider) {\n const matchesFilter =\n this.normalizeText(option.label).includes(normalizedFilter) ||\n this.normalizeText(option.value).includes(normalizedFilter);\n\n item.style.display = matchesFilter ? '' : 'none';\n if (matchesFilter) hasVisibleItems = true;\n }\n });\n\n // Manage the divider with the visible items\n const visibleItems = items.filter(item => item.style.display !== 'none');\n const visibleSelected = visibleItems.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const visibleUnselected = visibleItems.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n this.manageDivider(ul, visibleSelected, visibleUnselected);\n } else {\n // Filter slot items mode\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n items.forEach(item => {\n const label = item.getAttribute('label') || '';\n const value = item.getAttribute('value') || '';\n const textContent = item.textContent || '';\n\n const matchesFilter =\n this.normalizeText(label).includes(normalizedFilter) ||\n this.normalizeText(value).includes(normalizedFilter) ||\n this.normalizeText(textContent).includes(normalizedFilter);\n\n item.style.display = matchesFilter ? '' : 'none';\n if (matchesFilter) hasVisibleItems = true;\n });\n }\n\n // Add empty message if no items match the filter\n if (!hasVisibleItems) {\n const emptyMessage = document.createElement('li');\n emptyMessage.setAttribute('data-empty', 'true');\n emptyMessage.textContent = this.emptyResult;\n emptyMessage.classList.add('no-results-message');\n ul.appendChild(emptyMessage);\n }\n\n this.reorderSlotContent();\n }\n\n /**\n * Filter multiselect items in options mode.\n */\n private filterItemsOption() {\n const ul = this.el.querySelector('ul');\n if (!ul) return;\n\n const normalizedFilter = this.normalizeText(this.filterText);\n let hasVisibleItems = false;\n\n const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));\n\n // Reset items if the filter text is empty\n if (!this.filterText.trim()) {\n // Remove the empty message if it exists\n this.removeEmptyMessageOption(ul);\n items.forEach(item => (item.style.display = ''));\n this.reorderOptionsContent(); // Reorder after reset\n return;\n }\n\n // Filter the items\n items.forEach(item => {\n const label = item.getAttribute('label') || '';\n const value = item.getAttribute('value') || '';\n\n const matchesFilter =\n this.normalizeText(label).includes(normalizedFilter) ||\n this.normalizeText(value).includes(normalizedFilter);\n\n item.style.display = matchesFilter ? '' : 'none';\n if (matchesFilter) hasVisibleItems = true;\n });\n\n // Manage the divider with the visible items\n const visibleItems = items.filter(item => item.style.display !== 'none');\n const visibleSelected = visibleItems.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const visibleUnselected = visibleItems.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n\n this.manageDivider(ul, visibleSelected, visibleUnselected);\n\n // Add or remove the empty message based on the case\n if (!hasVisibleItems) {\n this.addEmptyMessageOption(ul);\n } else {\n this.removeEmptyMessageOption(ul);\n }\n }\n\n /**\n * Filter multiselect items in slots mode\n */\n private filterSlotsItems() {\n if (this.options) return;\n\n const ul = this.el.querySelector('ul');\n if (!ul) return;\n\n // Remove existing empty message if any\n const existingEmptyMessage = ul.querySelector('[data-empty]');\n if (existingEmptyMessage) {\n existingEmptyMessage.remove();\n }\n\n // If filter text is empty, reset all items visibility\n if (!this.filterText.trim()) {\n this.resetFilter();\n return;\n }\n\n const normalizedFilter = this.normalizeText(this.filterText);\n let hasVisibleItems = false;\n\n // Get all items and preserve them in the DOM\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n // Instead of removing/reordering, just hide/show items\n items.forEach(item => {\n const label = item.getAttribute('label') || '';\n const value = item.getAttribute('value') || '';\n const textContent = item.textContent?.trim() || '';\n\n const matchesFilter =\n this.normalizeText(label).includes(normalizedFilter) ||\n this.normalizeText(value).includes(normalizedFilter) ||\n this.normalizeText(textContent).includes(normalizedFilter);\n\n item.style.display = matchesFilter ? '' : 'none';\n if (matchesFilter) hasVisibleItems = true;\n });\n\n // Get visible items after filtering\n const visibleItems = items.filter(item => item.style.display !== 'none');\n const visibleSelectedItems = visibleItems.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n\n this.manageDivider(\n ul,\n visibleSelectedItems,\n visibleItems.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n ),\n );\n\n // Add empty message if no items match the filter\n if (!hasVisibleItems) {\n const emptyMessage = document.createElement('li');\n emptyMessage.setAttribute('data-empty', 'true');\n emptyMessage.textContent = this.emptyResult;\n emptyMessage.classList.add('no-results-message');\n ul.appendChild(emptyMessage);\n }\n }\n\n /**\n * Handle badge close for options mode.\n */\n private handleBadgeCloseOptions = (): void => {\n this.selectedValues = [];\n this.multiselectChange.emit(this.selectedValues);\n\n // Uncheck all elements\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n items.forEach(item => {\n item.checked = false;\n item.style.display = '';\n });\n\n // Reorder options without the divider since there are no selected elements\n this.options = this.options.filter(option => !option.isDivider);\n\n // Reorder options without the divider since there are no selected elements\n this.reorderOptionsContent();\n };\n\n /**\n * Handle badge close for slots mode.\n */\n private handleBadgeCloseSlots = (): void => {\n this.selectedValues = [];\n this.multiselectChange.emit(this.selectedValues);\n\n // Uncheck all elements\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n items.forEach(item => {\n item.checked = false;\n item.style.display = '';\n });\n\n // Reorder slot content\n this.reorderSlotContent();\n };\n\n /**\n * Normalizes text by removing accents and converting to lowercase\n * @param {string} text - The text to normalize\n * @returns {string} The normalized text\n *\n * @example\n * normalizeText(\"Café Latte\") => \"cafe latte\"\n *\n * @description\n * This function performs text normalization in three steps:\n * 1. Decomposes characters into their base form and combining characters (NFD)\n * 2. Removes all diacritical marks (accents, umlauts, etc.)\n * 3. Converts to lowercase and trims whitespace\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize} - MDN documentation on String.normalize()\n * @see {@link https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms} - More info about Unicode normalization forms\n */\n private normalizeText(text: string): string {\n return text\n .normalize('NFD') // Decompose characters into base + combining characters (e.g., é => e + ´)\n .replace(/[\\u0300-\\u036f]/g, '') // Remove all diacritical marks (Unicode range for combining characters)\n .toLowerCase() // Convert to lowercase\n .trim(); // Remove leading and trailing whitespace\n }\n\n private handleClickOutside(event: MouseEvent) {\n if (\n this.el.contains(event.target as Node) ||\n (this.inputElement && this.inputElement.contains(event.target as Node))\n ) {\n return;\n }\n this.open = false;\n }\n\n /**\n * Handle popover close\n */\n private handlePopoverClose = () => {\n // If we are handling Escape, ignore this event\n if (this.isHandlingEscape) {\n return;\n }\n\n this.filterText = '';\n\n // Reset filter if needed\n if (this.filterable) {\n this.resetFilter();\n }\n };\n\n /**\n * Handle input blur for options mode.\n */\n private handleInputBlurOptions = () => {\n setTimeout(() => {\n if (!this.el.contains(document.activeElement)) {\n // Close the popover without affecting the divider\n this.open = false;\n\n // Reset filter if needed\n if (this.filterable) {\n this.filterText = '';\n this.resetFilter();\n }\n }\n }, 150);\n };\n\n /**\n * Handle keyboard events & arrow key navigation.\n * If the multiselect is not open, opens it and focuses on the first item if the list is not filterable.\n * If the multiselect is open, handles arrow key navigation and closes it if the focus is outside the component.\n * @param {KeyboardEvent} event - The keyboard event.\n */\n @Listen('keydown', { passive: false })\n async handleKeyDown(event: KeyboardEvent) {\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n // Focus on the first item if the list is not filterable\n if (!this.filterable) {\n requestAnimationFrame(() => {\n this.focusFirstItem();\n });\n }\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n const items = Array.from(\n this.el.querySelectorAll(\n 'nv-fielddropdownitemcheck:not([style*=\"display: none\"])',\n ),\n ) as HTMLNvFielddropdownitemcheckElement[];\n\n if (items.length === 0) {\n console.warn('No visible items found to navigate');\n return;\n }\n\n let currentIndex = items.findIndex(item =>\n item.classList.contains('highlighted'),\n );\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n currentIndex =\n currentIndex === -1 ? 0 : (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex =\n currentIndex === -1\n ? items.length - 1\n : (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Enter' && currentIndex >= 0) {\n event.preventDefault();\n const selectedItem = items[currentIndex];\n\n // Toggle the checked state\n const isCurrentlyChecked = selectedItem.hasAttribute('checked');\n selectedItem.checked = !isCurrentlyChecked;\n\n // Trigger a click event to ensure proper event handling\n selectedItem.dispatchEvent(\n new MouseEvent('click', {\n view: window,\n bubbles: true,\n cancelable: true,\n }),\n );\n } else if (event.key === 'Escape') {\n event.preventDefault();\n event.stopPropagation(); // Prevent the event from propagating to the popover\n\n // Do the reorder and wait a bit before closing\n const handleEscape = async () => {\n this.isHandlingEscape = true; // Disable the hide listener\n\n if (this.options) {\n this.reorderOptionsContent();\n } else {\n this.reorderSlotContent();\n }\n\n // Wait for the reorder to be applied\n await new Promise(resolve => setTimeout(resolve, 100));\n\n // Reactivate the hide listener after a short delay\n setTimeout(() => {\n this.isHandlingEscape = false;\n this.open = false;\n }, 150);\n\n if (this.inputElement) {\n this.inputElement.blur();\n }\n };\n\n await handleEscape();\n }\n }\n\n /**\n * Updates the highlighted item in the dropdown list.\n *\n * @param {(HTMLNvFielddropdownitemElement | HTMLNvFielddropdownitemcheckElement)[]} items - The items to update.\n * @param {number} index - The index of the item to highlight.\n */\n private updateHighlightedItem(\n items: (\n | HTMLNvFielddropdownitemElement\n | HTMLNvFielddropdownitemcheckElement\n )[],\n index: number,\n ) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.setAttribute('tabindex', '0');\n item.scrollIntoView({ block: 'nearest' });\n // Focus on the nv-fieldcheckbox inside\n const checkbox = item.querySelector('nv-fieldcheckbox');\n if (checkbox) {\n (checkbox as HTMLElement).focus();\n }\n } else {\n item.classList.remove('highlighted');\n item.setAttribute('tabindex', '-1');\n }\n });\n }\n\n /**\n * Focus on the first item in the dropdown list.\n */\n private focusFirstItem() {\n const firstItem = this.el.querySelector(\n 'nv-fielddropdownitemcheck:not([style*=\"display: none\"])',\n ) as HTMLNvFielddropdownitemcheckElement;\n\n if (firstItem) {\n firstItem.setAttribute('tabindex', '0');\n firstItem.classList.add('highlighted');\n firstItem.scrollIntoView({ block: 'nearest' });\n // Focus on the nv-fieldcheckbox inside\n const checkbox = firstItem.querySelector('nv-fieldcheckbox');\n if (checkbox) {\n (checkbox as HTMLElement).focus();\n }\n } else {\n console.warn('No visible first item found to focus');\n }\n }\n\n /**\n * Handle click on the input container for options mode.\n * @param {MouseEvent} event - The click event.\n */\n private handleInputContainerClickOptions = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n /**\n * Handle click on the input container for slots mode.\n * @param {MouseEvent} event - The click event.\n */\n private handleInputContainerClickSlots = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n /**\n * Handle input change for options mode.\n * @param {Event} event - The input event.\n */\n private readonly handleInputOptions = (event: Event) => {\n if (!this.filterable) return;\n if (this.disabled || this.readonly) {\n return;\n }\n\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(this.value);\n\n // Clear any existing timer\n if (this.debounceTimer) {\n window.clearTimeout(this.debounceTimer);\n }\n\n // Set a new timer for filtering\n this.debounceTimer = window.setTimeout(() => {\n this.filterText = input.value.toLowerCase();\n this.filterItemsOption();\n }, this.debounceDelay);\n };\n\n private addEmptyMessageOption(ul: HTMLElement) {\n const existingMessage = ul.querySelector('[data-empty]');\n if (existingMessage) return;\n\n const emptyMessage = document.createElement('li');\n emptyMessage.setAttribute('data-empty', 'true');\n emptyMessage.textContent = this.emptyResult;\n emptyMessage.classList.add('no-results-message');\n ul.appendChild(emptyMessage);\n }\n\n private removeEmptyMessageOption(ul: HTMLElement) {\n const existingMessage = ul.querySelector('[data-empty]');\n if (existingMessage) existingMessage.remove();\n }\n\n /**\n * Handle input change for slots mode\n * @param {Event} event - The input event.\n */\n private readonly handleInputSlots = (event: Event) => {\n if (!this.filterable) return;\n if (this.disabled || this.readonly) return;\n\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(this.value);\n\n // Clear any existing timer\n if (this.debounceTimer) {\n window.clearTimeout(this.debounceTimer);\n }\n\n // Set a new timer for filtering\n this.debounceTimer = window.setTimeout(() => {\n this.filterText = input.value.toLowerCase();\n this.filterSlotsItems();\n }, this.debounceDelay);\n };\n\n /**\n * Handle input focus for options mode.\n */\n private handleInputFocusOptions = () => {\n if (this.disabled || this.readonly) {\n return;\n }\n this.open = true;\n };\n\n /**\n * Handle input focus for slots mode.\n */\n private handleInputFocusSlots = () => {\n if (this.disabled || this.readonly) {\n return;\n }\n this.open = true;\n };\n\n /**\n * Handle input blur for slots mode.\n */\n private handleInputBlurSlots = () => {\n setTimeout(() => {\n if (!this.el.contains(document.activeElement)) {\n // Close the popover without affecting the divider\n this.open = false;\n\n // Reset filter if needed\n if (this.filterable) {\n this.filterText = '';\n this.resetFilter();\n }\n }\n }, 150);\n };\n\n /**\n * Toggle the multiselect popover for options mode.\n */\n private togglePopoverOptions = (): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n this.open = !this.open;\n };\n\n /**\n * Toggle the multiselect popover for slots mode.\n */\n private togglePopoverSlots = (): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n this.open = !this.open;\n };\n\n private manageDivider(\n ul: HTMLElement,\n selectedItems: Element[],\n unselectedItems: Element[],\n ) {\n let divider = ul.querySelector('hr.multiselect-divider') as HTMLElement;\n if (!divider) {\n divider = document.createElement('hr');\n divider.className = 'multiselect-divider';\n ul.appendChild(divider);\n }\n\n const shouldShowDivider =\n selectedItems.length > 0 && unselectedItems.length > 0;\n\n if (shouldShowDivider) {\n // Place the divider after the last selected item\n const lastSelectedItem = selectedItems[selectedItems.length - 1];\n lastSelectedItem.after(divider);\n divider.style.display = '';\n } else {\n divider.style.display = 'none';\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n /**\n * Renders the component in options mode\n * @returns {any} The JSX for options mode\n */\n private renderOptionsMode = () => {\n return (\n <Host aria-label={this.label} aria-expanded={this.open.toString()}>\n {(this.label || 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={el => (this.popoverElement = el)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper-multiselect\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container-multiselect\">\n <slot name=\"leading-input\"></slot>\n\n {this.selectedValues.length > 0 && (\n <nv-badge\n slot=\"leading-input\"\n prevent-auto-close\n color=\"10\"\n dismissible={this.selectedValues.length > 0}\n label={`${this.selectedValues.length} ${this.badgeLabel}`}\n aria-label={`Clear all ${this.selectedValues.length} ${this.badgeLabel} items`}\n onCloseClicked={this.handleBadgeCloseOptions}\n ></nv-badge>\n )}\n\n {this.filterable || this.disabled || this.readonly ? (\n <input\n type=\"text\"\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n value={this.value}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInputOptions}\n onFocus={this.handleInputFocusOptions}\n onBlur={this.handleInputBlurOptions}\n onKeyDown={this.handleKeyDown}\n data-scope=\"focusable\"\n />\n ) : (\n <p\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClickOptions}\n tabIndex={0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocusOptions}\n role=\"combobox\"\n aria-expanded={this.open}\n data-scope=\"focusable\"\n >\n <span>{this.value || this.placeholder}</span>\n </p>\n )}\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n data-scope=\"toggle-dropdown\"\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide dropdown' : 'Show dropdown'}\n aria-pressed={this.open.toString()}\n onClick={this.togglePopoverOptions}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div\n slot=\"content\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n style={this.maxHeight ? { maxHeight: this.maxHeight } : {}}\n >\n <ul role=\"content\">\n {this.options.map(option => (\n <nv-fielddropdownitemcheck\n label={option.label}\n description={option.description}\n value={option.value}\n checked={this.selectedValues.includes(option.value)}\n disabled={option.disabled}\n ></nv-fielddropdownitemcheck>\n ))}\n <hr class=\"multiselect-divider\" style={{ display: 'none' }} />\n </ul>\n </div>\n </nv-popover>\n\n {this.renderDescriptions()}\n </Host>\n );\n };\n\n /**\n * Renders the component in slots mode\n * @returns {any} The JSX for slots mode\n */\n private renderSlotsMode = () => {\n return (\n <Host aria-label={this.label} aria-expanded={this.open.toString()}>\n {(this.label || 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={el => (this.popoverElement = el)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper-multiselect\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container-multiselect\"\n onClick={this.handleInputContainerClickSlots}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.selectedValues.length > 0 && (\n <nv-badge\n slot=\"leading-input\"\n prevent-auto-close\n color=\"10\"\n dismissible={this.selectedValues.length > 0}\n label={`${this.selectedValues.length} ${this.badgeLabel}`}\n aria-label={`Clear all ${this.selectedValues.length} ${this.badgeLabel} items`}\n onCloseClicked={this.handleBadgeCloseSlots}\n ></nv-badge>\n )}\n\n {this.filterable || this.disabled || this.readonly ? (\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n value={this.value}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInputSlots}\n onFocus={this.handleInputFocusSlots}\n onBlur={this.handleInputBlurSlots}\n onKeyDown={this.handleKeyDown}\n data-scope=\"focusable\"\n />\n ) : (\n <p\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClickSlots}\n tabIndex={0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocusSlots}\n role=\"combobox\"\n aria-expanded={this.open}\n data-scope=\"focusable\"\n >\n <span>{this.value || this.placeholder}</span>\n </p>\n )}\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n data-scope=\"toggle-dropdown\"\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide dropdown' : 'Show dropdown'}\n aria-pressed={this.open.toString()}\n onClick={this.togglePopoverSlots}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div\n slot=\"content\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n style={this.maxHeight ? { maxHeight: this.maxHeight } : {}}\n >\n <slot name=\"content\"></slot>\n </div>\n </nv-popover>\n\n {this.renderDescriptions()}\n </Host>\n );\n };\n\n /**\n * Renders description and error description sections\n * @returns {any} The JSX for descriptions\n */\n private renderDescriptions() {\n return [\n (this.description || this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n ),\n (this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n ),\n ];\n }\n\n /**\n * Main render method that decides which mode to render\n * @returns {any} The JSX for the component\n */\n render() {\n return this.options ? this.renderOptionsMode() : this.renderSlotsMode();\n }\n\n //#endregion RENDER\n /****************************************************************************/\n}\n"],"mappings":"oGAAA,MAAMA,EAAwB,qvSAC9B,MAAAC,EAAeD,E,MC+BFE,EAAkB,MAN/B,WAAAC,CAAAC,G,0GA6BWC,KAAAC,QAAkBC,IAqClBF,KAAAG,aAA2C,MAY3CH,KAAAI,SAAoB,MAMpBJ,KAAAK,SAAo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,2 +0,0 @@
1
- import{h as t,r as e,c as n,H as r,g as s}from"./p-d0a33e64.js";import{C as a,d as i,W as o}from"./p-e2d0a77d.js";import{c}from"./p-0462f723.js";var d={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(c,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",s="second",a="minute",i="hour",o="day",c="week",d="month",h="quarter",l="year",u="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},y={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),s=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(s,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),s=e.clone().add(r,d),a=n-s<0,i=e.clone().add(r+(a?-1:1),d);return+(-(r+(n-s)/(a?s-i:i-s))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:d,y:l,w:c,d:o,D:u,h:i,m:a,s,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=g;var k="$isDayjsObject",D=function(t){return t instanceof Y||!(!t||!t[k])},M=function t(e,n,r){var s;if(!e)return b;if("string"==typeof e){var a=e.toLowerCase();w[a]&&(s=a),n&&(w[a]=n,s=a);var i=e.split("-");if(!s&&i.length>1)return t(i[0])}else{var o=e.name;w[o]=e,s=o}return!r&&s&&(b=s),s||!r&&b},x=function(t,e){if(D(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new Y(n)},C=y;C.l=M,C.i=D,C.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var Y=function(){function g(t){this.$L=M(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var m=g.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(C.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var s=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],s,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],s,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return C},m.isValid=function(){return!(this.$d.toString()===f)},m.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return x(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<x(t)},m.$g=function(t,e,n){return C.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!C.u(e)||e,h=C.p(t),f=function(t,e){var s=C.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?s:s.endOf(o)},p=function(t,e){return C.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},v=this.$W,g=this.$M,m=this.$D,y="set"+(this.$u?"UTC":"");switch(h){case l:return r?f(1,0):f(31,11);case d:return r?f(1,g):f(0,g+1);case c:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return f(r?m-w:m+(6-w),g);case o:case u:return p(y+"Hours",0);case i:return p(y+"Minutes",1);case a:return p(y+"Seconds",2);case s:return p(y+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,c=C.p(t),h="set"+(this.$u?"UTC":""),f=(n={},n[o]=h+"Date",n[u]=h+"Date",n[d]=h+"Month",n[l]=h+"FullYear",n[i]=h+"Hours",n[a]=h+"Minutes",n[s]=h+"Seconds",n[r]=h+"Milliseconds",n)[c],p=c===o?this.$D+(e-this.$W):e;if(c===d||c===l){var v=this.clone().set(u,1);v.$d[f](p),v.init(),this.$d=v.set(u,Math.min(this.$D,v.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[C.p(t)]()},m.add=function(r,h){var u,f=this;r=Number(r);var p=C.p(h),v=function(t){var e=x(f);return C.w(e.date(e.date()+Math.round(t*r)),f)};if(p===d)return this.set(d,this.$M+r);if(p===l)return this.set(l,this.$y+r);if(p===o)return v(1);if(p===c)return v(7);var g=(u={},u[a]=e,u[i]=n,u[s]=t,u)[p]||1,m=this.$d.getTime()+r*g;return C.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",s=C.z(this),a=this.$H,i=this.$m,o=this.$M,c=n.weekdays,d=n.months,h=n.meridiem,l=function(t,n,s,a){return t&&(t[n]||t(e,r))||s[n].slice(0,a)},u=function(t){return C.s(a%12||12,t,"0")},p=h||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(v,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return C.s(e.$y,4,"0");case"M":return o+1;case"MM":return C.s(o+1,2,"0");case"MMM":return l(n.monthsShort,o,d,3);case"MMMM":return l(d,o);case"D":return e.$D;case"DD":return C.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return l(n.weekdaysMin,e.$W,c,2);case"ddd":return l(n.weekdaysShort,e.$W,c,3);case"dddd":return c[e.$W];case"H":return String(a);case"HH":return C.s(a,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return p(a,i,!0);case"A":return p(a,i,!1);case"m":return String(i);case"mm":return C.s(i,2,"0");case"s":return String(e.$s);case"ss":return C.s(e.$s,2,"0");case"SSS":return C.s(e.$ms,3,"0");case"Z":return s}return null}(t)||s.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,u,f){var p,v=this,g=C.p(u),m=x(r),y=(m.utcOffset()-this.utcOffset())*e,b=this-m,w=function(){return C.m(v,m)};switch(g){case l:p=w()/12;break;case d:p=w();break;case h:p=w()/3;break;case c:p=(b-y)/6048e5;break;case o:p=(b-y)/864e5;break;case i:p=b/n;break;case a:p=b/e;break;case s:p=b/t;break;default:p=b}return f?p:C.a(p)},m.daysInMonth=function(){return this.endOf(d).$D},m.$locale=function(){return w[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=M(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return C.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),S=Y.prototype;return x.prototype=S,[["$ms",r],["$s",s],["$m",a],["$H",i],["$W",o],["$M",d],["$y",l],["$D",u]].forEach((function(t){S[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,Y,x),t.$i=!0),x},x.locale=M,x.isDayjs=D,x.unix=function(t){return x(1e3*t)},x.en=w[b],x.Ls=w,x.p={},x}))})(d);const h=d.exports;var l={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(c,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},o=function(t){return(t=+t)+(t>68?1900:2e3)};var c=function(t){return function(e){this[t]=+e}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],h=function(t){var e=i[t];return e&&(e.indexOf?e:e.s.concat(e.f))},l=function(t,e){var n,r=i.meridiem;if(r){for(var s=1;s<=24;s+=1)if(t.indexOf(r(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},u={A:[a,function(t){this.afternoon=l(t,!1)}],a:[a,function(t){this.afternoon=l(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[r,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[r,c("day")],Do:[a,function(t){var e=i.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],w:[s,c("week")],ww:[r,c("week")],M:[s,c("month")],MM:[r,c("month")],MMM:[a,function(t){var e=h("months"),n=(h("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[a,function(t){var e=h("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[r,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function f(n){var r,s;r=n,s=i&&i.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var a=r&&r.toUpperCase();return n||s[r]||t[r]||s[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=a.length,c=0;c<o;c+=1){var d=a[c],h=u[d],l=h&&h[0],f=h&&h[1];a[c]=f?{regex:l,parser:f}:d.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,r=0;n<o;n+=1){var s=a[n];if("string"==typeof s)r+=s.length;else{var i=s.regex,c=s.parser,d=t.slice(r),h=i.exec(d)[0];c.call(e,h),t=t.replace(h,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(o=t.parseTwoDigitYear);var r=e.prototype,s=r.parse;r.parse=function(t){var e=t.date,r=t.utc,a=t.args;this.$u=r;var o=a[1];if("string"==typeof o){var c=!0===a[2],d=!0===a[3],h=c||d,l=a[2];d&&(l=a[2]),i=this.$locale(),!c&&l&&(i=n.Ls[l]),this.$d=function(t,e,n,r){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),a=s.year,i=s.month,o=s.day,c=s.hours,d=s.minutes,h=s.seconds,l=s.milliseconds,u=s.zone,p=s.week,v=new Date,g=o||(a||i?1:v.getDate()),m=a||v.getFullYear(),y=0;a&&!i||(y=i>0?i-1:v.getMonth());var b,w=c||0,k=d||0,D=h||0,M=l||0;return u?new Date(Date.UTC(m,y,g,w,k,D,M+60*u.offset*1e3)):n?new Date(Date.UTC(m,y,g,w,k,D,M)):(b=new Date(m,y,g,w,k,D,M),p&&(b=r(b).week(p).toDate()),b)}catch(t){return new Date("")}}(e,o,r,n),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),h&&e!=this.format(o)&&(this.$d=new Date("")),i={}}else if(o instanceof Array)for(var u=o.length,p=1;p<=u;p+=1){a[1]=o[p-1];var v=n.apply(this,a);if(v.isValid()){this.$d=v.$d,this.$L=v.$L,this.init();break}p===u&&(this.$d=new Date(""))}else s.call(this,t)}}}))})(l);const u=l.exports;var f={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(c,(function(){var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,s,a){var i=s.prototype;a.utc=function(t){var e={date:t,utc:!0,args:arguments};return new s(e)},i.utc=function(e){var n=a(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var o=i.parse;i.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var c=i.init;i.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var d=i.utcOffset;i.utcOffset=function(r,s){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?d.call(this):this.$offset;if("string"==typeof r&&(r=function(t){void 0===t&&(t="");var r=t.match(e);if(!r)return null;var s=(""+r[0]).match(n)||["-",0,0],a=s[0],i=60*+s[1]+ +s[2];return 0===i?0:"+"===a?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,o=this;if(s)return o.$offset=i,o.$u=0===r,o;if(0!==r){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(i+c,t)).$offset=i,o.$x.$localOffset=c}else o=this.utc();return o};var h=i.format;i.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,e)},i.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var l=i.toDate;i.toDate=function(t){return"s"===t&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var u=i.diff;i.diff=function(t,e,n){if(t&&this.$u===t.$u)return u.call(this,t,e,n);var r=this.local(),s=a(t).local();return u.call(r,s,e,n)}}}))})(f);const p=f.exports;var v={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(c,(function(){var t="week",e="year";return function(n,r,s){var a=r.prototype;a.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var r=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var a=s(this).startOf(e).add(1,e).date(r),i=s(this).endOf(t);if(a.isBefore(i))return 1}var o=s(this).startOf(e).date(r).startOf(t).subtract(1,"millisecond"),c=this.diff(o,t,!0);return c<0?s(this).startOf("week").week():Math.ceil(c)},a.weeks=function(t){return void 0===t&&(t=null),this.week(t)}}}))})(v);const g=v.exports;h.extend(u);h.extend(p);h.extend(g);function m(t,e){if(!t)return"";const n=e.dateFormat.includes("Z");const r=e.dateFormat==="YYYY-MM-DD[T]HH:mm:ss[Z]";if(r){return t.toISOString()}if(e.dateFormat==="Ticks"){const e=t.getTime()*1e4+621355968e9;return e.toString()}if(e.dateFormat==="X"){return h(t).unix().toString()}if(e.dateFormat==="x"){return t.getTime().toString()}return n?h(t).utc().format(e.dateFormat):h(t).format(e.dateFormat)}function y(t,e,n){if(!t||!e)return false;if(n.isUTCMode){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}else{return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}}function b(t,e,n){if(!t||!e)return false;if(n.isUTCMode){return t.getUTCFullYear()<e.getUTCFullYear()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()<e.getUTCMonth()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()<=e.getUTCDate()}else{return t.getFullYear()<e.getFullYear()||t.getFullYear()===e.getFullYear()&&t.getMonth()<e.getMonth()||t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()<=e.getDate()}}function w(t,e,n){if(!t||!e)return false;if(n.isUTCMode){return t.getUTCFullYear()>e.getUTCFullYear()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()>e.getUTCMonth()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()>=e.getUTCDate()}else{return t.getFullYear()>e.getFullYear()||t.getFullYear()===e.getFullYear()&&t.getMonth()>e.getMonth()||t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()>=e.getDate()}}function k(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()));e.setUTCDate(e.getUTCDate()+3-(e.getUTCDay()+6)%7);const n=new Date(Date.UTC(e.getUTCFullYear(),0,4));return 1+Math.round(((e.getTime()-n.getTime())/864e5-3+(n.getUTCDay()+6)%7)/7)}function D(t,e){if(t instanceof Date)return t;const n=e.includes("Z");if(typeof t==="string"&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/.test(t)){try{const e=new Date(t);if(!isNaN(e.getTime())){return e}}catch(t){console.error("Error parsing ISO date:",t)}}if(e==="X"){const e=Number(t);if(isNaN(e))return null;return n?h.unix(e).utc().toDate():h.unix(e).toDate()}if(e==="x"){const e=Number(t);if(isNaN(e))return null;return n?h(e).utc().toDate():h(e).toDate()}if(e==="Ticks"){const e=Number(t);if(isNaN(e))return null;const r=(e-621355968e9)/1e4;return n?h(r).utc().toDate():h(r).toDate()}let r;if(n){r=h.utc(t,e,true)}else{r=h(t,e,true)}if(!r.isValid()){const n=typeof t==="string"&&(t.includes("_")||t.includes("-_")||t.includes("/_")||t.includes("._"));const r=typeof t==="string"&&t.length<e.length&&/^[\d\-/.]*$/.test(t)&&t.length>0;const s=n||r;if(!s){console.error(`Parsing error:`,{dateInput:t,dateFormat:e})}return null}return r.toDate()}const M=e=>{const{date:n,dayOfMonth:r,isCurrentMonth:s,isSelected:a,isInRange:i,isStart:o,isEnd:c,isToday:d,isDisabled:h,onClick:l}=e;const u=["day",a?"selected":"",o?"range-start":"",c?"range-end":"",i?"in-range":"",h?"disabled":"",!s?"outside-month":"",d?"is-today":""].filter(Boolean).join(" ");const f=()=>{if(!h&&l){l(n)}};return t("div",{class:u,onClick:f,"aria-disabled":h},r)};const x=e=>{const{onReset:n,onConfirm:r,useSlot:s=false}=e;return t("div",{class:"datepicker-actions"},s?t("slot",{name:"actions"},t("nv-button",{emphasis:"low",size:"xs",onClick:n},"Cancel"),t("nv-button",{size:"xs",onClick:r},"OK")):t("div",null,t("nv-button",{emphasis:"low",size:"xs",onClick:n},"Cancel"),t("nv-button",{size:"xs",onClick:r},"OK")))};const C=e=>{const{weeks:n,localizedWeekText:r,selectionType:s,onWeekSelect:a,calendarIndex:i}=e;const o=t=>{if(s==="range"){const e=t.map((t=>t.date));a(e,i)}};const c=t=>()=>o(t);return t("div",{class:"week-numbers"},t("div",{class:"week-header"},r),n.map(((e,n)=>{var r;const a=((r=e.find((t=>t.date)))===null||r===void 0?void 0:r.date)||new Date;const i=k(a);const o=s==="range";return t("div",{class:`week-number ${o?"clickable":""}`,onClick:c(e),key:`week-${n}`,role:o?"button":undefined,tabindex:o?0:undefined},i)})))};const Y=e=>{const{shortcuts:n,placement:r,onShortcutClick:s}=e;if(!n||n.length===0){return null}const a=t=>()=>s(t);return t("div",{class:`shortcuts-container shortcuts-placement-${r}`},n.map(((e,n)=>t("nv-button",{key:`shortcut-${n}`,emphasis:"lower",size:"xs","aria-label":e.label,onClick:a(e)},e.label))))};const S=e=>{const{currentDate:n,months:r,numberOfCalendars:s,calendarIndex:a,monthOffset:i,onMonthChange:o,onMonthSelect:c,onYearChange:d}=e;const h=t=>()=>o(t);const l=t=>e=>c(e,t);const u=t=>e=>d(e,t);const f=(n.getUTCMonth()+i)%12;const p=n.getUTCFullYear()+Math.floor((n.getUTCMonth()+i)/12);return t("div",{class:"header"},s>1&&a===0&&t("nv-iconbutton",{class:"nav-left",emphasis:"lower",name:"chevron-left",onClick:h(-1)}),t("div",{class:"date-controls"},t("select",{class:"month-select mr-4",onChange:l(i)},r.map((e=>t("option",{key:e.value,value:e.value,selected:e.value===f},e.label)))),t("input",{type:"number",class:"year-input",min:"1950",max:"2100",value:p,onChange:u(i)})),s===1&&t("div",{class:"nav-buttons"},t("nv-iconbutton",{emphasis:"lower",name:"chevron-left",onClick:h(-1)}),t("nv-iconbutton",{emphasis:"lower",name:"chevron-right",onClick:h(1)})),s>1&&a===s-1&&t("nv-iconbutton",{emphasis:"lower",name:"chevron-right",onClick:h(1),class:"nav-right"}))};const T=e=>{const{days:n,dayNames:r,selectionType:s,selectedDate:a,startDate:i,endDate:o,isUTCMode:c,onDayClick:d,isDateInRange:h,isToday:l}=e;return t("div",{class:"days-container"},t("div",{class:"days-header"},r.map(((e,n)=>t("div",{class:"day-header",key:`day-header-${n}`},e)))),t("div",{class:"days-grid"},n.map((e=>{const n=e.date;if(!n)return null;const r=s==="single"&&y(n,a,{isUTCMode:c});const u=h(n);const f=y(n,i,{isUTCMode:c});const p=y(n,o,{isUTCMode:c});const v=l(n);return t(M,{date:n,dayOfMonth:e.dayOfMonth,isCurrentMonth:e.isCurrentMonth,isSelected:r,isInRange:u,isStart:f,isEnd:p,isToday:v,isDisabled:e.isDisabled,selectionType:s,onClick:d})}))))};const $='nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--components-calendar-background);border-radius:var(--calendar-radius);padding:var(--calendar-padding);box-shadow:0px var(--shadow-y-axis-md-1) var(--shadow-blur-md-1) var(--shadow-spread-md, 0) var(--shadow-color-opacity-0), 0px var(--shadow-y-axis-md-2) var(--shadow-blur-md-2) var(--shadow-spread-md, 0) var(--shadow-color-opacity-2);border:1px solid var(--components-calendar-border);width:auto;max-width:100%}.datepicker-container-single{max-width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:var(--calendar-gap-x);width:auto;overflow-x:hidden}.datepicker-wrapper::-webkit-scrollbar{width:6px;height:6px}.datepicker-wrapper::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}.datepicker-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:var(--calendar-padding);width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-calendar-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:start;align-items:center;margin-bottom:var(--calendar-header-margin-bottom);width:100%}.header nv-iconbutton{width:var(--calendar-header-button-size);height:var(--calendar-header-button-size)}.nav-buttons{display:flex;gap:var(--spacing-0);margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:var(--spacing-1);align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:start;flex-grow:1}.date-controls .month-select,.date-controls .year-input{background:transparent !important}.calendar-wrapper:nth-child(n+2) .datepicker-container{margin-left:42px}.calendar-grid{display:grid;grid-template-columns:auto 1fr;column-gap:var(--calendar-weeks-calendar-gap-x);position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:var(--calendar-cell-size) repeat(6, var(--calendar-cell-size));background:var(--components-calendar-weeks-background);color:var(--components-calendar-weeks-text);border-radius:var(--calendar-weeks-radius);width:var(--calendar-weeks-size);row-gap:var(--calendar-grid-gap-y)}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background-color:var(--components-calendar-weeks-background-hover);color:var(--components-calendar-weeks-text-hover);border-radius:var(--calendar-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:var(--calendar-cell-font-size)}.week-header{font-weight:700;color:var(--components-calendar-weeks-text)}.week-number{color:var(--components-calendar-cell-text)}.days-container{display:grid;grid-template-rows:auto 1fr;row-gap:var(--calendar-grid-gap-y)}.days-header{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));height:var(--calendar-cell-size)}.day-header{display:grid;place-items:center;font-size:var(--calendar-cell-font-size);color:var(--components-calendar-cell-text)}.days-grid{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));grid-template-rows:repeat(6, var(--calendar-cell-size));animation:fadeIn 0.2s ease-in;row-gap:var(--calendar-grid-gap-y);z-index:0}.day{display:grid;place-items:center;width:var(--calendar-cell-size);height:var(--calendar-cell-size);font-size:var(--calendar-cell-font-size);border-radius:var(--calendar-cell-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}.day.selected,.day.selected:hover .day.is-today.selected,.day.is-today.selected:hover{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected) !important}.day.disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.day.outside-month{color:var(--components-calendar-cell-text);opacity:var(--opacity-disabled)}.day.outside-month.selected{opacity:1 !important;color:var(--components-calendar-cell-text-selected)}.day.outside-month.in-range{opacity:0.5 !important;background-color:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range)}.day.outside-month.in-range:hover{opacity:0.7 !important;background-color:var(--components-calendar-cell-background-in-range)}.day.in-range{background:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range);border-radius:0;position:relative}.day.range-start,.day.range-start:focus,.day.range-start:hover,.day.range-end,.day.range-end:focus,.day.range-end:hover{background-color:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected) !important}.day.range-start,.day.range-end,.day.range-start.is-today,.day.range-end.is-today{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected);position:relative;border-radius:var(--radius-rounded-full)}.day.range-start:hover,.day.range-end:hover,.day.range-start.is-today:hover,.day.range-end.is-today:hover{color:var(--components-calendar-cell-text-today)}.day.range-start:before,.day.range-end:before,.day.range-start.is-today:before,.day.range-end.is-today:before{content:"";position:absolute;bottom:0;left:0;right:0;top:0;z-index:-1;background-color:var(--components-calendar-cell-background-in-range);border-radius:var(--radius-rounded-full);width:auto;height:auto}.day.range-start:has(~.range-end):before,.day.range-start:has(+.in-range):before{border-top-right-radius:0;border-bottom-right-radius:0}.day.range-end:before{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.day.outside-month.range-start,.day.outside-month.range-end{opacity:1 !important;background:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected)}.day.is-today{font-weight:700;position:relative;color:var(--components-calendar-cell-text-today)}.day.is-today.range-start,.day.is-today.range-end{color:var(--components-calendar-cell-text-selected)}.day.is-today.range-start:hover,.day.is-today.range-end:hover{color:var(--components-calendar-cell-text-today)}.day.is-today::after{content:"";position:absolute;bottom:var(--spacing-1);left:50%;transform:translateX(-50%);width:var(--calendar-cell-dot-size);height:var(--calendar-cell-dot-size);background-color:currentColor;border-radius:50%}.day.is-today.selected::after{color:var(--components-calendar-cell-text-selected)}.day.is-today.selected::after::after{background-color:var(--components-calendar-cell-dot-selected)}.calendar-footer{display:flex;gap:var(--spacing-1);justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-calendar-border);padding:var(--calendar-controls-padding-top) var(--calendar-padding) var(--calendar-padding);gap:var(--calendar-grid-gap-y);margin-top:var(--calendar-controls-margin-top)}.datepicker-actions{display:flex;justify-content:flex-end;gap:var(--spacing-1);width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:var(--spacing-1);margin-top:var(--spacing-4)}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}';const z=$;const _=class{constructor(r){e(this,r);this.singleDateChange=n(this,"singleDateChange",7);this.rangeDateChange=n(this,"rangeDateChange",7);this.valueChanged=n(this,"valueChanged",7);this.firstDayOfWeek=1;this.numberOfCalendars=1;this.value="";this.locale="en-BE";this.dateFormat="YYYY-MM-DD";this.shortcutsPlacement="bottom";this.selectionType="single";this.showActions=false;this.parsedDisabledDates=[];this.currentDate=null;this.selectedDate=null;this.startDate=null;this.endDate=null;this.months=[];this.parseUnifiedValue=t=>{if(!t){this.selectedDate=null;this.startDate=null;this.endDate=null;return}const e=t.split(",").map((t=>t.trim())).filter(Boolean);if(this.selectionType==="single"&&e.length>=1){const t=D(e[0],this.dateFormat);if(t){this.selectedDate=t;if(!this.showActions){this.singleValue=e[0]}const n=this.el.getAttribute("data-prevent-navigation")==="true";if(!n){this.currentDate=t}}else{console.warn(`Invalid date format: ${e[0]}`);this.selectedDate=null;if(!this.showActions){this.singleValue=""}}}else if(this.selectionType==="range"&&e.length>=2){const t=D(e[0],this.dateFormat);const n=D(e[1],this.dateFormat);if(t&&n){this.startDate=t;this.endDate=n;if(!this.showActions){this.rangeValue={start:e[0],end:e[1]}}const r=this.el.getAttribute("data-prevent-navigation")==="true";if(!r){this.currentDate=t}}else{console.warn(`Invalid date range format: ${e[0]}, ${e[1]}`);this.startDate=null;this.endDate=null;if(!this.showActions){this.rangeValue={start:"",end:""}}}}};this.changeMonth=t=>{const e=new Date(this.currentDate);e.setUTCMonth(e.getUTCMonth()+t);const n=this.el.querySelectorAll(".calendar-grid");n.forEach((e=>{e.classList.remove("slide-left","slide-right");const n=t>0?"slide-left":"slide-right";e.classList.add(n);setTimeout((()=>{e.classList.remove(n)}),300)}));this.currentDate=e};this.handleDateSelection=t=>{if(this.isDateDisabled(t)){return}if(this.selectionType==="single"){this.handleSingleSelection(t)}else{this.handleRangeSelection(t)}};this.handleSingleSelection=t=>{if(!t)return;const e=m(t,{dateFormat:this.dateFormat});this.selectedDate=t;this.value=e;this.valueChanged.emit(e);if(!this.showActions){this.singleValue=e;this.singleDateChange.emit(e)}};this.handleRangeSelection=t=>{if(!this.startDate||this.startDate&&this.endDate){this.startDate=t;this.endDate=null}else{this.endDate=t;if(this.startDate>this.endDate){[this.startDate,this.endDate]=[this.endDate,this.startDate]}const e=m(this.startDate,{dateFormat:this.dateFormat});const n=m(this.endDate,{dateFormat:this.dateFormat});this.value=`${e},${n}`;this.valueChanged.emit(this.value);if(!this.showActions){const t={start:e,end:n};this.rangeDateChange.emit(t);this.rangeValue=t}}};this.isDateDisabled=t=>{if(!t)return true;if(this.min){const e=D(this.min,this.dateFormat);if(e&&t<e){return true}}if(this.max){const e=D(this.max,this.dateFormat);if(e&&t>e){return true}}return this.parsedDisabledDates.some((e=>y(t,e,{isUTCMode:this.isUTCMode})))};this.isDateInRange=t=>{if(!t||!this.startDate||!this.endDate)return false;const e=D(t,this.dateFormat);const n=D(this.startDate,this.dateFormat);const r=D(this.endDate,this.dateFormat);if(isNaN(n.getTime())||isNaN(r.getTime())){return false}if(n>r)return false;return w(e,n,{isUTCMode:this.isUTCMode})&&b(e,r,{isUTCMode:this.isUTCMode})};this.getDayNames=()=>{let t;if(a[this.locale]){t=[...a[this.locale]]}else{const e=new Intl.DateTimeFormat(this.locale,{weekday:"short"});t=[...Array(7)].map(((t,n)=>e.format(new Date(2023,0,n+2)).toUpperCase()))}if(this.firstDayOfWeek===0){return[t[6],...t.slice(0,6)]}else if(this.firstDayOfWeek===1){return t}else{const e=this.firstDayOfWeek-1;return[...t.slice(e),...t.slice(0,e)]}};this.getDaysInMonth=(t=0,e=1)=>{const n=this.currentDate.getUTCFullYear();const r=this.currentDate.getUTCMonth()+t;const s=new Date(Date.UTC(n,r,1));const a=new Date(Date.UTC(n,r+1,0));const i=[];const o=s.getUTCDay();const c=(o-this.firstDayOfWeek+7)%7;if(t===0&&c>0){const t=new Date(Date.UTC(n,r,0)).getUTCDate();for(let e=c;e>0;e--){const s=new Date(Date.UTC(n,r-1,t-e+1));i.push({dayOfMonth:s.getUTCDate(),date:s,isCurrentMonth:false,isDisabled:this.isDateDisabled(s)})}}for(let t=1;t<=a.getUTCDate();t++){const e=new Date(Date.UTC(n,r,t));i.push({dayOfMonth:t,date:e,isCurrentMonth:true,isDisabled:this.isDateDisabled(e)})}if(t===e-1){const t=7-(i.length%7||7);for(let e=1;e<=t;e++){const t=new Date(Date.UTC(n,r+1,e));i.push({dayOfMonth:e,date:t,isCurrentMonth:false,isDisabled:this.isDateDisabled(t)})}}return i};this.initializeMonths=()=>{if(i[this.locale]){this.months=i[this.locale].map(((t,e)=>({value:e,label:t})));return}const t=new Intl.DateTimeFormat(this.locale,{month:"short"});this.months=Array.from({length:12},((e,n)=>({value:n,label:t.format(new Date(2e3,n,1)).toUpperCase()})))};this.getLocalizedWeekText=()=>o[this.locale]||"W";this.handleMonthChange=(t,e=0)=>{const n=t.target;const r=parseInt(n.value,10);const s=this.currentDate.getUTCMonth();const a=r-(s+e)%12;const i=new Date(this.currentDate);i.setUTCMonth(i.getUTCMonth()+a);this.currentDate=i};this.handleYearChange=(t,e=0)=>{const n=t.target;const r=parseInt(n.value,10);if(!isNaN(r)&&r>=1900&&r<=2100){const t=new Date(this.currentDate);t.setUTCFullYear(r);t.setUTCMonth(t.getUTCMonth()+e);this.currentDate=t}};this.handleWeekSelection=(t,e)=>{if(this.selectionType!=="range")return;const n=this.getDaysInMonth(e,this.numberOfCalendars);const r=t[0];const s=t[t.length-1];if(!r||!s)return;const a=n.filter((t=>t.date&&t.date>=r&&t.date<=s));const i=a.filter((t=>!this.isDateDisabled(t.date)));if(i.length>0){this.startDate=i[0].date;this.endDate=i[i.length-1].date;this.rangeDateChange.emit({start:m(this.startDate,{dateFormat:this.dateFormat}),end:m(this.endDate,{dateFormat:this.dateFormat})})}};this.isToday=t=>{const e=new Date;return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()};this.parseDisabledDates=()=>{if(!this.disabledDates){this.parsedDisabledDates=[];return}try{this.parsedDisabledDates=this.disabledDates.map((t=>D(t,this.dateFormat))).filter((t=>t!==null))}catch(t){console.error("Error parsing disabled dates:",t);this.parsedDisabledDates=[]}};this.applyShortcut=t=>{this.selectedDate=null;this.startDate=null;this.endDate=null;if(t.singleValue){const e=D(t.singleValue,this.dateFormat);this.selectedDate=e;const n=m(e,{dateFormat:this.dateFormat});this.value=n;this.valueChanged.emit(n);this.singleValue=n;this.singleDateChange.emit(n);if(!this.showActions){const t=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(t)}this.forceCalendarUpdate(e)}else{const e=D(t.rangeValue.start,this.dateFormat);const n=D(t.rangeValue.end,this.dateFormat);this.startDate=e;this.endDate=n;const r=m(e,{dateFormat:this.dateFormat});const s=m(n,{dateFormat:this.dateFormat});this.value=`${r},${s}`;this.valueChanged.emit(this.value);const a={start:r,end:s};this.rangeDateChange.emit(a);this.rangeValue=a;if(!this.showActions){const t=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(t)}this.currentDate=e}};this.forceCalendarUpdate=t=>{this.currentDate=new Date(t)};this.resetSelection=()=>{if(this.selectionType==="single"){this.selectedDate=null;this.singleValue=null;this.value="";this.singleDateChange.emit("");this.valueChanged.emit("")}else{this.startDate=null;this.endDate=null;this.rangeValue=null;this.value="";this.rangeDateChange.emit({start:"",end:""});this.valueChanged.emit("")}};this.confirmSelection=()=>{if(this.selectionType==="single"&&this.selectedDate){const t=m(this.selectedDate,{dateFormat:this.dateFormat});this.singleDateChange.emit(t);this.singleValue=t;const e=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(e)}else if(this.selectionType==="range"&&this.startDate&&this.endDate){this.rangeDateChange.emit({start:m(this.startDate,{dateFormat:this.dateFormat}),end:m(this.endDate,{dateFormat:this.dateFormat})});this.rangeValue={start:m(this.startDate,{dateFormat:this.dateFormat}),end:m(this.endDate,{dateFormat:this.dateFormat})};const t=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(t)}};this.renderHeader=(e,n)=>t(S,{currentDate:this.currentDate,months:this.months,numberOfCalendars:this.numberOfCalendars,calendarIndex:n,monthOffset:e,onMonthChange:this.changeMonth,onMonthSelect:this.handleMonthChange,onYearChange:this.handleYearChange});this.renderWeekNumbers=(e,n)=>t(C,{weeks:e,localizedWeekText:this.getLocalizedWeekText(),selectionType:this.selectionType,onWeekSelect:this.handleWeekSelection,calendarIndex:n});this.renderCalendar=(e,n)=>{const r=this.getDaysInMonth(n,this.numberOfCalendars);const s=[];for(let t=0;t<r.length;t+=7){s.push(r.slice(t,t+7))}return t("div",{class:"calendar-wrapper"},t("div",{class:"calendar-container",key:`calendar-${e}`},this.renderHeader(n,e),t("div",{class:"calendar-grid"},this.showWeekNumbers&&this.renderWeekNumbers(s,e),t(T,{days:r,dayNames:this.getDayNames(),selectionType:this.selectionType,selectedDate:this.selectedDate,startDate:this.startDate,endDate:this.endDate,isUTCMode:this.isUTCMode,onDayClick:this.handleDateSelection,isDateInRange:this.isDateInRange,isToday:this.isToday}))),e<this.numberOfCalendars-1&&t("div",{class:"calendar-separator"}))};this.renderShortcuts=()=>{if(!this.hasShortcuts){return null}return t(Y,{shortcuts:this.shortcuts,placement:this.shortcutsPlacement,onShortcutClick:this.applyShortcut})};this.renderActions=()=>t("div",{class:"datepicker-actions"},t("slot",{name:"actions"},t(x,{onReset:this.resetSelection,onConfirm:this.confirmSelection,useSlot:false})))}validateNumberOfCalendars(t){if(t<1||t>4){console.warn("numberOfCalendars must be between 1 and 4. Defaulting to 1.");this.numberOfCalendars=1}}onRangeValueChange(t){if(t&&t.start&&t.end){try{const{startDate:e,endDate:n}=this.validateDateRange(t.start,t.end);this.startDate=e;this.endDate=n;const r=this.el.getAttribute("data-prevent-navigation")==="true";if(!r){this.currentDate=e}}catch(t){console.error("Invalid rangeValue:",t)}}}handleDisabledDatesChange(){this.parseDisabledDates()}onSingleValueChange(t,e){if(this.selectionType==="single"&&t!==e&&t){const e=D(t,this.dateFormat);if(e){this.selectedDate=e;const t=this.el.getAttribute("data-prevent-navigation")==="true";if(!t){this.currentDate=e}}}}onValueChange(t,e){if(t!==e){this.parseUnifiedValue(t)}}componentWillLoad(){this.parseDisabledDates();if(this.value){this.parseUnifiedValue(this.value)}else if(this.selectionType==="single"&&this.singleValue){this.selectedDate=D(this.singleValue,this.dateFormat);this.currentDate=this.selectedDate}else if(this.selectionType==="range"&&this.rangeValue){try{if(this.rangeValue.start&&this.rangeValue.end){const{startDate:t,endDate:e,swapped:n}=this.validateDateRange(this.rangeValue.start,this.rangeValue.end);this.startDate=t;this.endDate=e;this.currentDate=t;if(n){this.rangeValue={start:m(t,{dateFormat:this.dateFormat}),end:m(e,{dateFormat:this.dateFormat})}}}}catch(t){console.error("Invalid rangeValue:",t)}}if(!this.currentDate){this.currentDate=new Date}this.initializeMonths()}get hasShortcuts(){return Boolean(this.shortcutsPlacement&&this.shortcuts)}get hasActions(){return this.showActions}get isUTCMode(){return this.dateFormat.includes("Z")}validateDateRange(t,e){try{const n=D(t,this.dateFormat);const r=D(e,this.dateFormat);if(n&&r&&n>r){console.warn(`Warning: startDate (${m(n,{dateFormat:this.dateFormat})}) is after endDate (${m(r,{dateFormat:this.dateFormat})})`);return{startDate:r,endDate:n,swapped:true}}return{startDate:n,endDate:r,swapped:false}}catch(t){console.error("Invalid date range:",t);throw t}}render(){return t(r,{key:"43d4f3ab9199e9c5f15e853f15283fa59e4a436d"},t("div",{key:"b9956225cb2c16d997aa44266af8f8c8222ea968",class:"datepicker-root"},t("div",{key:"05b63935bc5ebf500bb52d10688385f994b47fb4",class:`datepicker-container ${this.numberOfCalendars===1?"datepicker-container-single":""}`},t("div",{key:"d7af15b9ce051026cf841b3be361b32d8db41fc1",class:`datepicker-wrapper ${this.numberOfCalendars===1?"single":""}`},this.shortcutsPlacement==="left"&&this.renderShortcuts(),Array.from({length:this.numberOfCalendars},((t,e)=>this.renderCalendar(e,e))),this.shortcutsPlacement==="right"&&this.renderShortcuts()),(this.hasShortcuts&&this.shortcutsPlacement==="bottom"||this.hasActions)&&t("div",{key:"1765334bf15564bc9886b210c54bddba64c7042e",class:"datepicker-controls"},this.shortcutsPlacement==="bottom"&&this.renderShortcuts(),this.hasActions&&this.renderActions()))),t("slot",{key:"0ac3446394b8c23b859e5f0065370b95b6fd05d2"}))}get el(){return s(this)}static get watchers(){return{numberOfCalendars:["validateNumberOfCalendars"],rangeValue:["onRangeValueChange"],disabledDates:["handleDisabledDatesChange"],singleValue:["onSingleValueChange"],value:["onValueChange"]}}};_.style=z;export{_ as nv_calendar};
2
- //# sourceMappingURL=p-82c4bf56.entry.js.map