@nova-design-system/nova-webcomponents 3.0.0 → 3.2.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 (532) hide show
  1. package/dist/cjs/{constants-bcd6b2e2.js → constants-8fb8ccc0.js} +14 -1
  2. package/dist/cjs/constants-8fb8ccc0.js.map +1 -0
  3. package/dist/cjs/{index-9bda5507.js → index-108ddff0.js} +22 -6
  4. package/dist/cjs/index-108ddff0.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +5 -471
  6. package/dist/cjs/index.cjs.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/native.cjs.js +2 -2
  9. package/dist/cjs/nv-alert.cjs.entry.js +6 -6
  10. package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nv-avatar.cjs.entry.js +2 -2
  12. package/dist/cjs/nv-badge_2.cjs.entry.js +18 -9
  13. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
  15. package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
  16. package/dist/cjs/nv-button.cjs.entry.js +2 -2
  17. package/dist/cjs/nv-calendar.cjs.entry.js +821 -843
  18. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  19. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  20. package/dist/cjs/nv-datagrid.cjs.entry.js +423 -94
  21. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  22. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +2 -2
  23. package/dist/cjs/nv-datagridcolumn.cjs.entry.js.map +1 -1
  24. package/dist/cjs/nv-dialog.cjs.entry.js +19 -13
  25. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
  27. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
  28. package/dist/cjs/nv-fielddate.cjs.entry.js +9 -18
  29. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nv-fielddaterange.cjs.entry.js +85 -32
  31. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  32. package/dist/cjs/nv-fielddropdown.cjs.entry.js +88 -57
  33. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  34. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -2
  35. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +122 -104
  36. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  37. package/dist/cjs/nv-fieldnumber.cjs.entry.js +9 -5
  38. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  39. package/dist/cjs/nv-fieldpassword.cjs.entry.js +9 -5
  40. package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
  41. package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
  42. package/dist/cjs/nv-fieldselect.cjs.entry.js +11 -7
  43. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  44. package/dist/cjs/nv-fieldslider.cjs.entry.js +663 -0
  45. package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -0
  46. package/dist/cjs/nv-fieldtext.cjs.entry.js +9 -5
  47. package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
  48. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +9 -5
  49. package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
  50. package/dist/cjs/nv-fieldtime.cjs.entry.js +16 -13
  51. package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
  52. package/dist/cjs/nv-icon.cjs.entry.js +4 -4
  53. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  54. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +3 -3
  55. package/dist/cjs/nv-menu.cjs.entry.js +4 -2
  56. package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
  57. package/dist/cjs/nv-menuitem.cjs.entry.js +2 -2
  58. package/dist/cjs/nv-popover.cjs.entry.js +2 -2
  59. package/dist/cjs/nv-row.cjs.entry.js +2 -2
  60. package/dist/cjs/nv-stack.cjs.entry.js +2 -2
  61. package/dist/cjs/nv-table.cjs.entry.js +3 -3
  62. package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
  63. package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
  64. package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
  65. package/dist/cjs/nv-tooltip.cjs.entry.js +3 -3
  66. package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
  67. package/dist/collection/collection-manifest.json +1 -0
  68. package/dist/collection/components/nv-alert/nv-alert.css +3 -0
  69. package/dist/collection/components/nv-alert/nv-alert.js +6 -11
  70. package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
  71. package/dist/collection/components/nv-badge/nv-badge.css +181 -1
  72. package/dist/collection/components/nv-badge/nv-badge.docs.js +20 -1
  73. package/dist/collection/components/nv-badge/nv-badge.docs.js.map +1 -1
  74. package/dist/collection/components/nv-badge/nv-badge.js +39 -15
  75. package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
  76. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +0 -1
  77. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
  78. package/dist/collection/components/nv-calendar/nv-calendar.css +25 -2
  79. package/dist/collection/components/nv-calendar/nv-calendar.docs.js +33 -38
  80. package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
  81. package/dist/collection/components/nv-calendar/nv-calendar.js +659 -897
  82. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  83. package/dist/collection/components/nv-calendar/nv-calendar.utils.js +202 -0
  84. package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -0
  85. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +667 -0
  86. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -0
  87. package/dist/collection/components/nv-datagrid/nv-datagrid.css +98 -0
  88. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +232 -51
  89. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
  90. package/dist/collection/components/nv-datagrid/nv-datagrid.js +437 -160
  91. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  92. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +20 -1
  93. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js.map +1 -1
  94. package/dist/collection/components/nv-dialog/nv-dialog.css +29 -5
  95. package/dist/collection/components/nv-dialog/nv-dialog.docs.js +0 -1
  96. package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
  97. package/dist/collection/components/nv-dialog/nv-dialog.js +16 -10
  98. package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
  99. package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js +16 -8
  100. package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js.map +1 -1
  101. package/dist/collection/components/nv-fielddate/nv-fielddate.js +48 -39
  102. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  103. package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +14 -1
  104. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js +12 -15
  105. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js.map +1 -1
  106. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +147 -68
  107. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  108. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +20 -12
  109. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +16 -0
  110. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  111. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +197 -103
  112. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  113. package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +36 -1
  114. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
  115. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  116. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +8 -1
  117. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
  118. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +228 -190
  119. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  120. package/dist/collection/components/nv-fieldmultiselect/{nv-fieldmultiselect.css → styles/nv-fieldmultiselect.css} +36 -1
  121. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +12 -1
  122. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +8 -0
  123. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
  124. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +27 -3
  125. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
  126. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +12 -1
  127. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +8 -0
  128. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
  129. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +27 -3
  130. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
  131. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  132. package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +12 -1
  133. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +8 -0
  134. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
  135. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +29 -5
  136. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
  137. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +264 -0
  138. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -0
  139. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +1035 -0
  140. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -0
  141. package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js +77 -0
  142. package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js.map +1 -0
  143. package/dist/collection/components/nv-fieldslider/partials/field-input.js +33 -0
  144. package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -0
  145. package/dist/collection/components/nv-fieldslider/partials/range-thumb.js +34 -0
  146. package/dist/collection/components/nv-fieldslider/partials/range-thumb.js.map +1 -0
  147. package/dist/collection/components/nv-fieldslider/partials/single-thumb.js +18 -0
  148. package/dist/collection/components/nv-fieldslider/partials/single-thumb.js.map +1 -0
  149. package/dist/collection/components/nv-fieldslider/partials/tick-marks.js +18 -0
  150. package/dist/collection/components/nv-fieldslider/partials/tick-marks.js.map +1 -0
  151. package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +267 -0
  152. package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js +159 -0
  153. package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js.map +1 -0
  154. package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +20 -1
  155. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +17 -1
  156. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
  157. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +28 -3
  158. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
  159. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +30 -1
  160. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js +8 -0
  161. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js.map +1 -1
  162. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +27 -3
  163. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
  164. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +13 -10
  165. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
  166. package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +26 -3
  167. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  168. package/dist/collection/components/nv-icon/nv-icons.js +4 -470
  169. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  170. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  171. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  172. package/dist/collection/components/nv-menu/nv-menu.js +3 -1
  173. package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
  174. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  175. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  176. package/dist/collection/components/nv-row/nv-row.js +1 -1
  177. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  178. package/dist/collection/components/nv-table/nv-table.js +8 -11
  179. package/dist/collection/components/nv-table/nv-table.js.map +1 -1
  180. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  181. package/dist/collection/components/nv-tooltip/nv-tooltip.css +1 -0
  182. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  183. package/dist/collection/index.js.map +1 -1
  184. package/dist/collection/interfaces/Column.js.map +1 -1
  185. package/dist/collection/templates/navigation.docs.js +0 -1
  186. package/dist/collection/templates/navigation.docs.js.map +1 -1
  187. package/dist/collection/utils/constants.js +11 -0
  188. package/dist/collection/utils/constants.js.map +1 -1
  189. package/dist/components/index.js +6 -472
  190. package/dist/components/index.js.map +1 -1
  191. package/dist/components/nv-alert.js +7 -7
  192. package/dist/components/nv-alert.js.map +1 -1
  193. package/dist/components/nv-avatar.js +3 -3
  194. package/dist/components/nv-badge.js +1 -1
  195. package/dist/components/nv-breadcrumb.js +3 -3
  196. package/dist/components/nv-breadcrumbs.js +1 -1
  197. package/dist/components/nv-button.js +1 -1
  198. package/dist/components/nv-calendar.js +1 -1
  199. package/dist/components/nv-col.js +1 -1
  200. package/dist/components/nv-datagrid.js +447 -102
  201. package/dist/components/nv-datagrid.js.map +1 -1
  202. package/dist/components/nv-datagridcolumn.js +4 -3
  203. package/dist/components/nv-datagridcolumn.js.map +1 -1
  204. package/dist/components/nv-dialog.js +24 -18
  205. package/dist/components/nv-dialog.js.map +1 -1
  206. package/dist/components/nv-dialogfooter.js +1 -1
  207. package/dist/components/nv-dialogheader.js +1 -1
  208. package/dist/components/nv-fieldcheckbox.js +1 -1
  209. package/dist/components/nv-fielddate.js +19 -27
  210. package/dist/components/nv-fielddate.js.map +1 -1
  211. package/dist/components/nv-fielddaterange.js +99 -44
  212. package/dist/components/nv-fielddaterange.js.map +1 -1
  213. package/dist/components/nv-fielddropdown.js +103 -69
  214. package/dist/components/nv-fielddropdown.js.map +1 -1
  215. package/dist/components/nv-fielddropdownitem.js +1 -1
  216. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  217. package/dist/components/nv-fieldmultiselect.js +139 -120
  218. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  219. package/dist/components/nv-fieldnumber.js +14 -9
  220. package/dist/components/nv-fieldnumber.js.map +1 -1
  221. package/dist/components/nv-fieldpassword.js +13 -8
  222. package/dist/components/nv-fieldpassword.js.map +1 -1
  223. package/dist/components/nv-fieldradio.js +4 -4
  224. package/dist/components/nv-fieldselect.js +15 -10
  225. package/dist/components/nv-fieldselect.js.map +1 -1
  226. package/dist/components/nv-fieldslider.d.ts +11 -0
  227. package/dist/components/nv-fieldslider.js +726 -0
  228. package/dist/components/nv-fieldslider.js.map +1 -0
  229. package/dist/components/nv-fieldtext.js +1 -158
  230. package/dist/components/nv-fieldtext.js.map +1 -1
  231. package/dist/components/nv-fieldtextarea.js +11 -6
  232. package/dist/components/nv-fieldtextarea.js.map +1 -1
  233. package/dist/components/nv-fieldtime.js +20 -17
  234. package/dist/components/nv-fieldtime.js.map +1 -1
  235. package/dist/components/nv-icon.js +1 -1
  236. package/dist/components/nv-iconbutton.js +1 -1
  237. package/dist/components/nv-loader.js +1 -1
  238. package/dist/components/nv-menu.js +7 -5
  239. package/dist/components/nv-menu.js.map +1 -1
  240. package/dist/components/nv-menuitem.js +1 -1
  241. package/dist/components/nv-popover.js +1 -1
  242. package/dist/components/nv-row.js +2 -2
  243. package/dist/components/nv-stack.js +2 -2
  244. package/dist/components/nv-table.js +3 -3
  245. package/dist/components/nv-table.js.map +1 -1
  246. package/dist/components/nv-tablecolumn.js +1 -1
  247. package/dist/components/nv-toggle.js +3 -3
  248. package/dist/components/nv-tooltip.js +1 -1
  249. package/dist/components/{p-dc3faba3.js → p-04cb3a6f.js} +5 -5
  250. package/dist/components/{p-dc3faba3.js.map → p-04cb3a6f.js.map} +1 -1
  251. package/dist/components/p-07a89754.js +187 -0
  252. package/dist/components/p-07a89754.js.map +1 -0
  253. package/dist/components/{p-b7b78e64.js → p-0ab80d95.js} +3 -3
  254. package/dist/components/{p-b7b78e64.js.map → p-0ab80d95.js.map} +1 -1
  255. package/dist/components/{p-8348db09.js → p-1f505531.js} +15 -2
  256. package/dist/components/p-1f505531.js.map +1 -0
  257. package/dist/components/{p-02752770.js → p-33e231f4.js} +2 -2
  258. package/dist/components/{p-02752770.js.map → p-33e231f4.js.map} +1 -1
  259. package/dist/components/p-4656efae.js +1111 -0
  260. package/dist/components/p-4656efae.js.map +1 -0
  261. package/dist/components/{p-2012b8ba.js → p-581e67cc.js} +4 -4
  262. package/dist/components/{p-2012b8ba.js.map → p-581e67cc.js.map} +1 -1
  263. package/dist/components/{p-1c45c0f2.js → p-679e0fa9.js} +16 -4
  264. package/dist/components/p-679e0fa9.js.map +1 -0
  265. package/dist/components/p-76a30bf1.js +88 -0
  266. package/dist/components/p-76a30bf1.js.map +1 -0
  267. package/dist/components/{p-150daf68.js → p-83c8873a.js} +3 -3
  268. package/dist/components/{p-150daf68.js.map → p-83c8873a.js.map} +1 -1
  269. package/dist/components/{p-c14f6b8e.js → p-c0a91091.js} +5 -5
  270. package/dist/components/p-c0a91091.js.map +1 -0
  271. package/dist/components/{p-6c364a23.js → p-cbdc2c8b.js} +6 -6
  272. package/dist/components/{p-6c364a23.js.map → p-cbdc2c8b.js.map} +1 -1
  273. package/dist/components/{p-2d9ba7d3.js → p-cbe9521f.js} +4 -4
  274. package/dist/components/{p-2d9ba7d3.js.map → p-cbe9521f.js.map} +1 -1
  275. package/dist/components/{p-a30b55fc.js → p-d19b41d2.js} +2 -2
  276. package/dist/components/{p-a30b55fc.js.map → p-d19b41d2.js.map} +1 -1
  277. package/dist/components/{p-4d3ec142.js → p-d63f1cbe.js} +4 -4
  278. package/dist/components/{p-4d3ec142.js.map → p-d63f1cbe.js.map} +1 -1
  279. package/dist/components/{p-e00cbb8a.js → p-dd2273a3.js} +2 -2
  280. package/dist/components/{p-e00cbb8a.js.map → p-dd2273a3.js.map} +1 -1
  281. package/dist/components/p-f0a5e7e4.js +167 -0
  282. package/dist/components/p-f0a5e7e4.js.map +1 -0
  283. package/dist/components/{p-f4d86795.js → p-f1859ddc.js} +4 -4
  284. package/dist/components/{p-f4d86795.js.map → p-f1859ddc.js.map} +1 -1
  285. package/dist/esm/{constants-98e2dcc2.js → constants-b97e736d.js} +15 -2
  286. package/dist/esm/constants-b97e736d.js.map +1 -0
  287. package/dist/esm/{index-1fb7a9a6.js → index-8f0e5f19.js} +22 -6
  288. package/dist/esm/index-8f0e5f19.js.map +1 -0
  289. package/dist/esm/index.js +5 -471
  290. package/dist/esm/index.js.map +1 -1
  291. package/dist/esm/loader.js +3 -3
  292. package/dist/esm/native.js +3 -3
  293. package/dist/esm/nv-alert.entry.js +6 -6
  294. package/dist/esm/nv-alert.entry.js.map +1 -1
  295. package/dist/esm/nv-avatar.entry.js +2 -2
  296. package/dist/esm/nv-badge_2.entry.js +18 -9
  297. package/dist/esm/nv-badge_2.entry.js.map +1 -1
  298. package/dist/esm/nv-breadcrumb.entry.js +1 -1
  299. package/dist/esm/nv-breadcrumbs.entry.js +1 -1
  300. package/dist/esm/nv-button.entry.js +2 -2
  301. package/dist/esm/nv-calendar.entry.js +821 -843
  302. package/dist/esm/nv-calendar.entry.js.map +1 -1
  303. package/dist/esm/nv-col.entry.js +1 -1
  304. package/dist/esm/nv-datagrid.entry.js +423 -94
  305. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  306. package/dist/esm/nv-datagridcolumn.entry.js +2 -2
  307. package/dist/esm/nv-datagridcolumn.entry.js.map +1 -1
  308. package/dist/esm/nv-dialog.entry.js +19 -13
  309. package/dist/esm/nv-dialog.entry.js.map +1 -1
  310. package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
  311. package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
  312. package/dist/esm/nv-fielddate.entry.js +9 -18
  313. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  314. package/dist/esm/nv-fielddaterange.entry.js +85 -32
  315. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  316. package/dist/esm/nv-fielddropdown.entry.js +88 -57
  317. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  318. package/dist/esm/nv-fielddropdownitem.entry.js +2 -2
  319. package/dist/esm/nv-fieldmultiselect.entry.js +122 -104
  320. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  321. package/dist/esm/nv-fieldnumber.entry.js +9 -5
  322. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  323. package/dist/esm/nv-fieldpassword.entry.js +9 -5
  324. package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
  325. package/dist/esm/nv-fieldradio.entry.js +4 -4
  326. package/dist/esm/nv-fieldselect.entry.js +11 -7
  327. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  328. package/dist/esm/nv-fieldslider.entry.js +659 -0
  329. package/dist/esm/nv-fieldslider.entry.js.map +1 -0
  330. package/dist/esm/nv-fieldtext.entry.js +9 -5
  331. package/dist/esm/nv-fieldtext.entry.js.map +1 -1
  332. package/dist/esm/nv-fieldtextarea.entry.js +9 -5
  333. package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
  334. package/dist/esm/nv-fieldtime.entry.js +16 -13
  335. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  336. package/dist/esm/nv-icon.entry.js +4 -4
  337. package/dist/esm/nv-icon.entry.js.map +1 -1
  338. package/dist/esm/nv-iconbutton_2.entry.js +3 -3
  339. package/dist/esm/nv-menu.entry.js +4 -2
  340. package/dist/esm/nv-menu.entry.js.map +1 -1
  341. package/dist/esm/nv-menuitem.entry.js +2 -2
  342. package/dist/esm/nv-popover.entry.js +2 -2
  343. package/dist/esm/nv-row.entry.js +2 -2
  344. package/dist/esm/nv-stack.entry.js +2 -2
  345. package/dist/esm/nv-table.entry.js +3 -3
  346. package/dist/esm/nv-table.entry.js.map +1 -1
  347. package/dist/esm/nv-tablecolumn.entry.js +1 -1
  348. package/dist/esm/nv-toggle.entry.js +3 -3
  349. package/dist/esm/nv-tooltip.entry.js +3 -3
  350. package/dist/esm/nv-tooltip.entry.js.map +1 -1
  351. package/dist/native/index.esm.js +1 -1
  352. package/dist/native/index.esm.js.map +1 -1
  353. package/dist/native/native.css +1 -1
  354. package/dist/native/native.esm.js +1 -1
  355. package/dist/native/native.esm.js.map +1 -1
  356. package/dist/native/{p-6b348684.entry.js → p-0323daf6.entry.js} +2 -2
  357. package/dist/native/{p-d5cbf5c8.entry.js → p-05d95d4d.entry.js} +2 -2
  358. package/dist/native/{p-fb5bddba.entry.js → p-0ec1e2e3.entry.js} +2 -2
  359. package/dist/native/{p-c7b201cd.entry.js → p-16a4cdf3.entry.js} +2 -2
  360. package/dist/native/p-19fb0fd0.entry.js +2 -0
  361. package/dist/native/p-19fb0fd0.entry.js.map +1 -0
  362. package/dist/native/p-1e3d3374.entry.js +2 -0
  363. package/dist/native/{p-9135fdf5.entry.js.map → p-1e3d3374.entry.js.map} +1 -1
  364. package/dist/native/p-21e7132f.entry.js +2 -0
  365. package/dist/native/p-21e7132f.entry.js.map +1 -0
  366. package/dist/native/p-221b8f72.entry.js +2 -0
  367. package/dist/native/p-221b8f72.entry.js.map +1 -0
  368. package/dist/native/p-2805f9f2.entry.js +2 -0
  369. package/dist/native/p-2805f9f2.entry.js.map +1 -0
  370. package/dist/native/p-3f2b6a22.entry.js +2 -0
  371. package/dist/native/p-3f2b6a22.entry.js.map +1 -0
  372. package/dist/native/{p-0245863d.entry.js → p-407fc32d.entry.js} +2 -2
  373. package/dist/native/{p-63e6aed3.entry.js → p-4c0d81b0.entry.js} +2 -2
  374. package/dist/native/p-4c0d81b0.entry.js.map +1 -0
  375. package/dist/native/{p-39bb95ff.entry.js → p-519b4819.entry.js} +2 -2
  376. package/dist/native/{p-fa77a591.entry.js → p-5382eab2.entry.js} +2 -2
  377. package/dist/native/p-5ba3fc3c.entry.js +2 -0
  378. package/dist/native/p-5ba3fc3c.entry.js.map +1 -0
  379. package/dist/native/{p-bad11367.entry.js → p-60b204ac.entry.js} +2 -2
  380. package/dist/native/p-60b204ac.entry.js.map +1 -0
  381. package/dist/native/p-7092a675.entry.js +2 -0
  382. package/dist/native/p-711a7778.js +3 -0
  383. package/dist/native/p-711a7778.js.map +1 -0
  384. package/dist/native/p-759c9ce4.entry.js +2 -0
  385. package/dist/native/p-759c9ce4.entry.js.map +1 -0
  386. package/dist/native/{p-d7a76400.entry.js → p-7c676f2c.entry.js} +2 -2
  387. package/dist/native/p-7c6edd1c.entry.js +2 -0
  388. package/dist/native/p-7c6edd1c.entry.js.map +1 -0
  389. package/dist/native/p-987c79d8.entry.js +2 -0
  390. package/dist/native/p-987c79d8.entry.js.map +1 -0
  391. package/dist/native/{p-f85aca27.entry.js → p-9fba8663.entry.js} +2 -2
  392. package/dist/native/{p-b094296d.entry.js → p-a2c0f1a7.entry.js} +2 -2
  393. package/dist/native/p-aa86af25.entry.js +2 -0
  394. package/dist/native/p-aa86af25.entry.js.map +1 -0
  395. package/dist/native/p-adc96c3a.entry.js +2 -0
  396. package/dist/native/p-adc96c3a.entry.js.map +1 -0
  397. package/dist/native/p-b0fc08e7.entry.js +2 -0
  398. package/dist/native/p-b0fc08e7.entry.js.map +1 -0
  399. package/dist/native/{p-6ff228da.entry.js → p-c930adb7.entry.js} +2 -2
  400. package/dist/native/{p-701b5557.entry.js → p-cfe0a6c6.entry.js} +2 -2
  401. package/dist/native/p-d07ab618.entry.js +2 -0
  402. package/dist/native/p-dac0089b.entry.js +2 -0
  403. package/dist/native/p-dac0089b.entry.js.map +1 -0
  404. package/dist/native/p-de2c07a6.entry.js +13 -0
  405. package/dist/native/p-de2c07a6.entry.js.map +1 -0
  406. package/dist/native/p-ed488498.entry.js +7 -0
  407. package/dist/native/p-ed488498.entry.js.map +1 -0
  408. package/dist/native/p-ef76178b.entry.js +2 -0
  409. package/dist/native/p-ef76178b.entry.js.map +1 -0
  410. package/dist/native/{p-e5de64d5.entry.js → p-f0ddf60b.entry.js} +2 -2
  411. package/dist/native/p-f39803d9.entry.js +2 -0
  412. package/dist/native/p-f39803d9.entry.js.map +1 -0
  413. package/dist/native/{p-59768ee5.js → p-f85c08f1.js} +2 -2
  414. package/dist/native/p-f85c08f1.js.map +1 -0
  415. package/dist/native/p-fb897f7d.entry.js +2 -0
  416. package/dist/native/p-fb897f7d.entry.js.map +1 -0
  417. package/dist/native/{p-244f56ac.entry.js → p-fc3bea07.entry.js} +2 -2
  418. package/dist/types/components/nv-alert/nv-alert.d.ts +1 -1
  419. package/dist/types/components/nv-badge/nv-badge.d.ts +11 -3
  420. package/dist/types/components/nv-calendar/nv-calendar.d.ts +70 -112
  421. package/dist/types/components/nv-calendar/nv-calendar.utils.d.ts +60 -0
  422. package/dist/types/components/nv-calendar/test/nv-calendar.utils.test.d.ts +1 -0
  423. package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +47 -26
  424. package/dist/types/components/nv-datagridcolumn/nv-datagridcolumn.d.ts +4 -0
  425. package/dist/types/components/nv-dialog/nv-dialog.d.ts +4 -0
  426. package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +6 -7
  427. package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +23 -12
  428. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +51 -26
  429. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +65 -55
  430. package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +4 -0
  431. package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +4 -0
  432. package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +4 -0
  433. package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +230 -0
  434. package/dist/types/components/nv-fieldslider/nv-fieldslider.docs.d.ts +4 -0
  435. package/dist/types/components/nv-fieldslider/nv-fieldslider.utils.d.ts +46 -0
  436. package/dist/types/components/nv-fieldslider/partials/field-input.d.ts +45 -0
  437. package/dist/types/components/nv-fieldslider/partials/range-thumb.d.ts +37 -0
  438. package/dist/types/components/nv-fieldslider/partials/single-thumb.d.ts +35 -0
  439. package/dist/types/components/nv-fieldslider/partials/tick-marks.d.ts +28 -0
  440. package/dist/types/components/nv-fieldslider/test/nv-fieldslider.utils.test.d.ts +1 -0
  441. package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +5 -0
  442. package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.d.ts +4 -0
  443. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  444. package/dist/types/components/nv-table/nv-table.d.ts +13 -2
  445. package/dist/types/components.d.ts +656 -154
  446. package/dist/types/index.d.ts +0 -2
  447. package/dist/types/interfaces/Column.d.ts +5 -1
  448. package/dist/types/utils/constants.d.ts +9 -0
  449. package/dist/vscode-data.json +292 -1546
  450. package/hydrate/index.js +2715 -1533
  451. package/hydrate/index.mjs +2715 -1533
  452. package/package.json +6 -2
  453. package/dist/cjs/constants-bcd6b2e2.js.map +0 -1
  454. package/dist/cjs/index-9bda5507.js.map +0 -1
  455. package/dist/collection/interfaces/actionEvent.js +0 -2
  456. package/dist/collection/interfaces/actionEvent.js.map +0 -1
  457. package/dist/collection/interfaces/calendarShortcut.js +0 -2
  458. package/dist/collection/interfaces/calendarShortcut.js.map +0 -1
  459. package/dist/collection/interfaces/dateRange.js +0 -2
  460. package/dist/collection/interfaces/dateRange.js.map +0 -1
  461. package/dist/components/p-1c45c0f2.js.map +0 -1
  462. package/dist/components/p-373926aa.js +0 -177
  463. package/dist/components/p-373926aa.js.map +0 -1
  464. package/dist/components/p-591730e7.js +0 -88
  465. package/dist/components/p-591730e7.js.map +0 -1
  466. package/dist/components/p-8348db09.js.map +0 -1
  467. package/dist/components/p-c14f6b8e.js.map +0 -1
  468. package/dist/components/p-f331117c.js +0 -1133
  469. package/dist/components/p-f331117c.js.map +0 -1
  470. package/dist/esm/constants-98e2dcc2.js.map +0 -1
  471. package/dist/esm/index-1fb7a9a6.js.map +0 -1
  472. package/dist/native/p-0ee428d5.entry.js +0 -2
  473. package/dist/native/p-0ee428d5.entry.js.map +0 -1
  474. package/dist/native/p-2691e02d.entry.js +0 -2
  475. package/dist/native/p-37f0210e.entry.js +0 -2
  476. package/dist/native/p-37f0210e.entry.js.map +0 -1
  477. package/dist/native/p-4a440970.entry.js +0 -2
  478. package/dist/native/p-4a440970.entry.js.map +0 -1
  479. package/dist/native/p-4ae26462.entry.js +0 -7
  480. package/dist/native/p-4ae26462.entry.js.map +0 -1
  481. package/dist/native/p-4d9c4618.entry.js +0 -2
  482. package/dist/native/p-4d9c4618.entry.js.map +0 -1
  483. package/dist/native/p-4dc1d036.entry.js +0 -2
  484. package/dist/native/p-59768ee5.js.map +0 -1
  485. package/dist/native/p-59e0bd2b.entry.js +0 -2
  486. package/dist/native/p-59e0bd2b.entry.js.map +0 -1
  487. package/dist/native/p-5c00f092.entry.js +0 -2
  488. package/dist/native/p-5c00f092.entry.js.map +0 -1
  489. package/dist/native/p-63e6aed3.entry.js.map +0 -1
  490. package/dist/native/p-7f5eb2ac.entry.js +0 -2
  491. package/dist/native/p-7f5eb2ac.entry.js.map +0 -1
  492. package/dist/native/p-84a73e2a.entry.js +0 -2
  493. package/dist/native/p-84a73e2a.entry.js.map +0 -1
  494. package/dist/native/p-9135fdf5.entry.js +0 -2
  495. package/dist/native/p-93dc2f47.entry.js +0 -2
  496. package/dist/native/p-93dc2f47.entry.js.map +0 -1
  497. package/dist/native/p-9a267f16.entry.js +0 -13
  498. package/dist/native/p-9a267f16.entry.js.map +0 -1
  499. package/dist/native/p-9d6431c7.entry.js +0 -2
  500. package/dist/native/p-9d6431c7.entry.js.map +0 -1
  501. package/dist/native/p-ab002252.js +0 -3
  502. package/dist/native/p-ab002252.js.map +0 -1
  503. package/dist/native/p-b2ce83ad.entry.js +0 -2
  504. package/dist/native/p-b2ce83ad.entry.js.map +0 -1
  505. package/dist/native/p-bad11367.entry.js.map +0 -1
  506. package/dist/native/p-e1a4f776.entry.js +0 -2
  507. package/dist/native/p-e1a4f776.entry.js.map +0 -1
  508. package/dist/native/p-e49bbd02.entry.js +0 -2
  509. package/dist/native/p-e49bbd02.entry.js.map +0 -1
  510. package/dist/native/p-eee01062.entry.js +0 -2
  511. package/dist/native/p-eee01062.entry.js.map +0 -1
  512. package/dist/native/p-f6bdc270.entry.js +0 -2
  513. package/dist/native/p-f6bdc270.entry.js.map +0 -1
  514. package/dist/types/interfaces/actionEvent.d.ts +0 -13
  515. package/dist/types/interfaces/calendarShortcut.d.ts +0 -17
  516. package/dist/types/interfaces/dateRange.d.ts +0 -13
  517. /package/dist/native/{p-6b348684.entry.js.map → p-0323daf6.entry.js.map} +0 -0
  518. /package/dist/native/{p-d5cbf5c8.entry.js.map → p-05d95d4d.entry.js.map} +0 -0
  519. /package/dist/native/{p-fb5bddba.entry.js.map → p-0ec1e2e3.entry.js.map} +0 -0
  520. /package/dist/native/{p-c7b201cd.entry.js.map → p-16a4cdf3.entry.js.map} +0 -0
  521. /package/dist/native/{p-0245863d.entry.js.map → p-407fc32d.entry.js.map} +0 -0
  522. /package/dist/native/{p-39bb95ff.entry.js.map → p-519b4819.entry.js.map} +0 -0
  523. /package/dist/native/{p-fa77a591.entry.js.map → p-5382eab2.entry.js.map} +0 -0
  524. /package/dist/native/{p-2691e02d.entry.js.map → p-7092a675.entry.js.map} +0 -0
  525. /package/dist/native/{p-d7a76400.entry.js.map → p-7c676f2c.entry.js.map} +0 -0
  526. /package/dist/native/{p-f85aca27.entry.js.map → p-9fba8663.entry.js.map} +0 -0
  527. /package/dist/native/{p-b094296d.entry.js.map → p-a2c0f1a7.entry.js.map} +0 -0
  528. /package/dist/native/{p-6ff228da.entry.js.map → p-c930adb7.entry.js.map} +0 -0
  529. /package/dist/native/{p-701b5557.entry.js.map → p-cfe0a6c6.entry.js.map} +0 -0
  530. /package/dist/native/{p-4dc1d036.entry.js.map → p-d07ab618.entry.js.map} +0 -0
  531. /package/dist/native/{p-e5de64d5.entry.js.map → p-f0ddf60b.entry.js.map} +0 -0
  532. /package/dist/native/{p-244f56ac.entry.js.map → p-fc3bea07.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as e,c as t,h as i,a as s,g as n}from"./p-ab002252.js";import{a as o}from"./p-a5c8eee9.js";import{T as r}from"./p-59768ee5.js";import{v as l}from"./p-f5ff676c.js";const d='nv-fieldtime{--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}nv-fieldtime[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-fieldtime[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)}nv-fieldtime[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-fieldtime[required]:not([required=false]) label::after{content:"*";color:var(--components-form-text-required);font-weight:700}nv-fieldtime 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-fieldtime nv-popover{width:100%;display:block}nv-fieldtime nv-popover [data-scope=popover]{padding:var(--list-dropdown-padding);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:100%}nv-fieldtime .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldtime .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;display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%;min-height:40px;gap:0;padding-left:var(--form-field-padding-x)}nv-fieldtime .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtime .input-container:focus-within,nv-fieldtime .input-container:focus-within:hover,nv-fieldtime .input-container:focus,nv-fieldtime .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-fieldtime .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-fieldtime .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtime .input-container input.time-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%;min-width:24px;flex:0 0 24px;text-align:center;padding:0;margin:0}nv-fieldtime .input-container input.time-input:focus{outline:none}nv-fieldtime .input-container input.time-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-fieldtime .input-container input.time-input::-webkit-inner-spin-button,nv-fieldtime .input-container input.time-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}nv-fieldtime .input-container span{width:100%;text-align:center;min-width:24px;flex:0 0 24px;padding:0 4px;color:var(--components-form-field-content-text)}nv-fieldtime .input-container>nv-iconbutton{border:0px;border-radius:0px;margin-left:auto}nv-fieldtime .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldtime .input-container nv-icon.validation{color:var(--nv-field-border-default);position:absolute;right:50px;top:50%;transform:translateY(-50%)}nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus-within{border-color:var(--color-focus-brand);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--color-focus-brand)}nv-fieldtime .description{align-self:stretch;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-fieldtime .error-description{align-self:stretch;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)}nv-fieldtime hr{border:none;border-top:1px solid var(--dropdown-divider-color, #ccc);margin:0.5rem 0}nv-fieldtime .time-dropdown{width:100%}nv-fieldtime .time-dropdown .time-columns{display:flex;justify-content:flex-start;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column{flex:1;text-align:center;max-height:200px;overflow-y:auto;scroll-behavior:smooth}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar{width:4px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-thumb{border-radius:4px}nv-fieldtime .time-dropdown .time-columns .time-column:last-child{border-right:none}nv-fieldtime .time-dropdown .time-columns .time-column .time-option{padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);text-align:center;cursor:pointer;transition:background-color 0.2s;height:40px;border-radius:var(--list-dropdown-item-radius);display:flex;justify-content:center;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:hover{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-list-dropdown-item-label-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus,nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus-within{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-list-dropdown-item-label-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.selected{background-color:var(--components-list-dropdown-item-background-active);color:var(--components-list-dropdown-item-label-active);border-width:1px;border-style:solid;border-color:var(--components-list-dropdown-item-border-active)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.highlighted{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}';const a=d;const f=class{constructor(i){e(this,i);this.valueChanged=t(this,"valueChanged",7);this.inputElements={};this.inputZeroAdded={};this.typeFocused=r.Hours;this.hours="00";this.minutes="00";this.seconds="00";this.inputId=l();this.readonly=false;this.disabled=false;this.required=false;this.success=false;this.error=false;this.format="HH:mm:ss";this.open=false;this.step=6e4;this.autofocus=false}handleOpenChanged(e){this.open=e.detail}handleKeyDown(e){var t,i,s,n;if(!this.open){if(e.key==="ArrowDown"){this.open=true;e.preventDefault();return}return}if(!this.popoverElement){console.warn("nv-fieldtime -> Popover element is not defined");return}const o=`.time-column.time-column-${this.typeFocused} div`;const l=Array.from(this.el.querySelectorAll(o));if(l.length===0){console.warn("nv-fieldtime -> No dropdown items found to navigate");return}let d=l.findIndex((e=>e.classList.contains("highlighted")));if(e.key==="ArrowDown"){e.preventDefault();d=(d+1)%l.length;this.updateHighlightedItem(l,d)}else if(e.key==="ArrowUp"){e.preventDefault();d=(d-1+l.length)%l.length;this.updateHighlightedItem(l,d)}else if(e.key==="Enter"&&d>=0){e.preventDefault();l[d].click();if(this.typeFocused===r.Hours){(t=this.inputElements[r.Minutes])===null||t===void 0?void 0:t.focus();(i=this.inputElements[r.Minutes])===null||i===void 0?void 0:i.select()}else if(this.typeFocused===r.Minutes||this.typeFocused===r.Seconds){(s=this.inputElements[r.Seconds])===null||s===void 0?void 0:s.focus();(n=this.inputElements[r.Seconds])===null||n===void 0?void 0:n.select()}}else if(e.key==="Escape"){e.preventDefault();if(this.inputElements[r.Hours]){this.inputElements[r.Hours].blur()}}}handleValueChange(e){this.valueChanged.emit(e)}handleInputChange(e,t){const i=e.target;const s=i.value.replace(/[^0-9]/g,"");switch(t){case r.Hours:this.handleHoursChange(s,t);break;case r.Minutes:this.handleMinutesChange(s,t);break;case r.Seconds:this.handleSecondsChange(s,t);break}const n=this.reconstructTime();this.value=n}handleHoursChange(e,t){var i,s,n,o;const l=this.format.startsWith("HH");const d=l?24:12;let a=false;const f=this.parseHour(this.max,this.format)||(this.format.startsWith("hh")?"12":"24");const h=this.parseHour(this.min,this.format)||"00";if(e.length===1){this.inputZeroAdded[t]=true;const i=e.padStart(2,"0");if(f&&parseInt(i,10)>parseInt(f,10)){if(h&&parseInt(i,10)<parseInt(h,10)){this.hours=h}else{this.hours="00";a=true}}else{if(h&&parseInt(i,10)<parseInt(h,10)){this.hours=h}else{this.hours=i}}}else if(this.inputZeroAdded[t]){this.inputZeroAdded[t]=false;const i=e.slice(1,3).padStart(2,"0");const s=parseInt(i,10)||0;if(s>=d){if(h&&parseInt(i,10)<parseInt(h,10)){this.hours=h}else{this.hours="00";a=true}}else{if(f&&parseInt(i,10)>parseInt(f,10)){if(h&&parseInt(i,10)<parseInt(h,10)){this.hours=h}else{this.hours="00";a=true}}else{if(h&&parseInt(i,10)<parseInt(h,10)){this.hours=h}else{this.hours=i}}}}else if(e.length>2){if(e.startsWith("00")){this.inputZeroAdded[t]=true;const i=e.slice(1,3).padStart(2,"0");if(f&&parseInt(i,10)>parseInt(f,10)){if(h&&parseInt(i,10)<parseInt(h,10)){this.hours=h}else{this.hours="00";a=true}}else{if(h&&parseInt(i,10)<parseInt(h,10)){this.hours=h}else{this.hours=i}}}else{const t=e.slice(1,3).padStart(2,"0");const i=parseInt(t,10)||0;if(i>=d){if(h&&parseInt(t,10)<parseInt(h,10)){this.hours=h;a=true}else{this.hours="00";a=true}}else{if(f&&i>parseInt(f,10)){if(h&&parseInt(t,10)<parseInt(h,10)){this.hours=h}else{this.hours="00";a=true}}else{if(h&&i<parseInt(h,10)){this.hours=h}else{this.hours=i.toString()}}}}}else{const t=e.padStart(2,"0");const i=parseInt(t,10)||0;if(i>=d){if(h&&parseInt(t,10)<parseInt(h,10)){this.hours=h}else{this.hours="00";a=true}}else{if(f&&i>parseInt(f,10)){this.hours="00";a=true}else{if(h&&i<parseInt(h,10)){this.hours=h}else{this.hours=i.toString()}}}}if(this.hours.length===2&&!this.inputZeroAdded[t]&&!a){(i=this.inputElements[r.Minutes])===null||i===void 0?void 0:i.focus();(s=this.inputElements[r.Minutes])===null||s===void 0?void 0:s.select()}else if(a){(n=this.inputElements[r.Hours])===null||n===void 0?void 0:n.focus();(o=this.inputElements[r.Hours])===null||o===void 0?void 0:o.select()}}handleMinutesChange(e,t){var i,s,n,o,l,d;const a=60;let f=false;const h=(i=this.parseMinute(this.min))!==null&&i!==void 0?i:0;const c=(s=this.parseMinute(this.max))!==null&&s!==void 0?s:59;if(e.length===1){this.inputZeroAdded[t]=true;const i=e.padStart(2,"0");if(c&&parseInt(i,10)>c){if(h&&parseInt(i,10)<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes="00";f=true}}else{if(h&&parseInt(i,10)<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes=i}}}else if(this.inputZeroAdded[t]){this.inputZeroAdded[t]=false;const i=e.slice(1,3).padStart(2,"0");const s=parseInt(i,10)||0;if(s>=a){if(h&&parseInt(i,10)<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes="00";f=true}}else{if(c&&s>c){if(h&&parseInt(i,10)<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes="00";f=true}}else{if(h&&s<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes=i}}}}else if(e.length>2){if(e.startsWith("00")){this.inputZeroAdded[t]=true;const i=e.slice(1,3).padStart(2,"0");if(c&&parseInt(i,10)>c){if(h&&parseInt(i,10)<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes="00";f=true}}else{if(h&&parseInt(i,10)<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes=i}}}else{const t=e.slice(1,3).padStart(2,"0");const i=parseInt(t,10)||0;if(i>=a){if(h&&parseInt(t,10)<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes="00";f=true}}else{if(c&&i>c){if(h&&parseInt(t,10)<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes="00";f=true}}else{if(h&&i<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes=i.toString()}}}}}else{const t=e.padStart(2,"0");const i=parseInt(t,10)||0;if(i>=a){if(h&&parseInt(t,10)<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes="00";f=true}}else{if(c&&i>c){if(h&&parseInt(t,10)<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes="00";f=true}}else{if(h&&i<h){this.minutes=h.toString().padStart(2,"0")}else{this.minutes=i.toString()}}}}if(this.minutes.length===2&&!this.inputZeroAdded[t]&&!f){(n=this.inputElements[r.Seconds])===null||n===void 0?void 0:n.focus();(o=this.inputElements[r.Seconds])===null||o===void 0?void 0:o.select()}else if(f){(l=this.inputElements[r.Minutes])===null||l===void 0?void 0:l.focus();(d=this.inputElements[r.Minutes])===null||d===void 0?void 0:d.select()}}handleSecondsChange(e,t){var i,s,n,o;const l=60;let d=false;const a=(i=this.parseSecond(this.min))!==null&&i!==void 0?i:0;const f=(s=this.parseSecond(this.max))!==null&&s!==void 0?s:59;if(e.length===1){this.inputZeroAdded[t]=true;const i=e.padStart(2,"0");if(f&&parseInt(i,10)>f){if(a&&parseInt(i,10)<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds="00";d=true}}else{if(a&&parseInt(i,10)<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds=i}}}else if(this.inputZeroAdded[t]){this.inputZeroAdded[t]=false;const i=e.slice(1,3).padStart(2,"0");const s=parseInt(i,10)||0;if(s>=l){if(a&&parseInt(i,10)<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds="00";d=true}}else{if(f&&s>f){if(a&&parseInt(i,10)<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds="00";d=true}}else{if(a&&s<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds=i}}}}else if(e.length>2){const t=e.slice(1,3).padStart(2,"0");const i=parseInt(t,10)||0;if(i>=l){if(a&&parseInt(t,10)<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds="00";d=true}}else{if(f&&i>f){if(a&&parseInt(t,10)<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds="00";d=true}}else{if(a&&i<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds=i.toString()}}}}else{const t=e.padStart(2,"0");const i=parseInt(t,10)||0;if(i>=l){if(a&&parseInt(t,10)<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds="00";d=true}}else{if(f&&i>f){if(a&&parseInt(t,10)<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds="00";d=true}}else{if(a&&i<a){this.seconds=a.toString().padStart(2,"0")}else{this.seconds=i.toString()}}}}if(d){(n=this.inputElements[r.Seconds])===null||n===void 0?void 0:n.focus();(o=this.inputElements[r.Seconds])===null||o===void 0?void 0:o.select()}}parseTime(e){if(!e){return}const t=e.replace(/[^0-9]/g,"").padStart(6,"0");const i=t.slice(0,2);const s=t.slice(2,4);const n=t.slice(4,6);const o=this.parseHour(this.min,this.format)||i;const r=this.parseMinute(this.min)||s;const l=this.parseSecond(this.min)||n;this.hours=o.padStart(2,"0");this.minutes=r.toString().padStart(2,"0");this.seconds=l.toString().padStart(2,"0")}reconstructTime(){if(this.format==="HH"||this.format==="hh"){return this.hours}else if(this.format==="HH:mm"||this.format==="hh:mm"){return`${this.hours}:${this.minutes}`}else if(this.format==="HH:mm:ss"||this.format==="hh:mm:ss"){return`${this.hours}:${this.minutes}:${this.seconds}`}else{return`${this.hours}:${this.minutes}:${this.seconds}`}}handleFocus(e){var t,i,s,n;if(this.readonly||this.disabled){return}if(!this.open){this.open=true}if(((t=this.inputElements[e])===null||t===void 0?void 0:t.value.length)===0||((i=this.inputElements[e])===null||i===void 0?void 0:i.value)==="00"){(s=this.inputElements[e])===null||s===void 0?void 0:s.focus();(n=this.inputElements[e])===null||n===void 0?void 0:n.select()}this.typeFocused=e}HandleDropdownIconClick(){var e,t,i,s,n,o;if(this.disabled||this.readonly){return}if(this.open&&this.inputElements[r.Hours]){this.open=false}else if(this.open&&this.inputElements[r.Minutes]){this.open=false}else if(this.open&&this.inputElements[r.Seconds]){this.open=false}else if(!this.open&&this.inputElements[r.Hours]){(e=this.inputElements[r.Hours])===null||e===void 0?void 0:e.focus();(t=this.inputElements[r.Hours])===null||t===void 0?void 0:t.select()}else if(!this.open&&this.inputElements[r.Minutes]){(i=this.inputElements[r.Minutes])===null||i===void 0?void 0:i.focus();(s=this.inputElements[r.Minutes])===null||s===void 0?void 0:s.select()}else if(!this.open&&this.inputElements[r.Seconds]){(n=this.inputElements[r.Seconds])===null||n===void 0?void 0:n.focus();(o=this.inputElements[r.Seconds])===null||o===void 0?void 0:o.select()}else{console.warn("nv-fieldtime -> No input elements found to focus or to blur")}}updateHighlightedItem(e,t){e.forEach(((e,i)=>{if(i===t){e.classList.add("highlighted");e.setAttribute("tabindex","0");e.focus();e.scrollIntoView({block:"nearest"})}else{e.classList.remove("highlighted");e.setAttribute("tabindex","-1")}}))}handleTimeOptionClick(e,t){const i=parseInt(e.target.textContent||"0",10);if(t===r.Hours){this.hours=i.toString().padStart(2,"0")}else if(t===r.Minutes){this.minutes=i.toString().padStart(2,"0")}else if(t===r.Seconds){this.seconds=i.toString().padStart(2,"0")}const s=this.reconstructTime();this.value=s}handleInputBlur(){setTimeout((()=>{if(!this.el.contains(document.activeElement)){if(this.open){this.open=false}}}),150)}handleClickOutside(e){const t=e.target;if(this.el.contains(t)||Object.values(this.inputElements).some((e=>e.contains(t)))){return}if(this.open){this.open=false}}handleScroll(e,t){const i=e.target;const s=i.scrollTop;const n=i.clientHeight;const o=i.scrollHeight;const r=40;const l=this.generateTimeOptions(t);const d=l.length*r;if(s+n>=o-r||s<=0){i.scrollTop=d}}generateTimeOptions(e){const t=this.step/1e3;if(t===0){return["00"]}switch(e){case r.Hours:return this.generateHourOptions(t);case r.Minutes:return this.generateMinuteOptions(t);case r.Seconds:return this.generateSecondOptions(t);default:return[]}}generateHourOptions(e){const t=Math.max(1,Math.floor(e/3600));const i=this.parseHour(this.max,this.format)||(this.format.startsWith("hh")?"12":"24");const s=this.parseHour(this.min,this.format)||"00";const n=parseInt(i,10);const o=parseInt(s,10);const r=[];for(let e=o;e<n;e+=t){r.push(e.toString().padStart(2,"0"))}return r}parseHour(e,t){if(!e)return null;const[i]=e.split(":");const s=parseInt(i,10);if(isNaN(s))return null;if(t.startsWith("hh"))return s>0&&s<=12?i.padStart(2,"0"):null;return s>=0&&s<=24?i.padStart(2,"0"):null}generateMinuteOptions(e){var t,i;const s=Math.max(1,Math.floor(e%3600/60));const n=(t=this.parseMinute(this.min))!==null&&t!==void 0?t:0;const o=(i=this.parseMinute(this.max))!==null&&i!==void 0?i:59;if(n===0&&o===0)return["00"];const r=[];for(let e=n;e<=o;e+=s){r.push(e.toString().padStart(2,"0"))}return r}parseMinute(e){if(!e)return null;const t=e.split(":");if(t.length<2)return null;const i=parseInt(t[1],10);return isNaN(i)||i<0||i>=60?null:i}generateSecondOptions(e){var t,i;const s=Math.max(1,e%60);const n=(t=this.parseSecond(this.min))!==null&&t!==void 0?t:0;const o=(i=this.parseSecond(this.max))!==null&&i!==void 0?i:59;if(n===0&&o===0)return["00"];const r=[];for(let e=n;e<=o;e+=s){r.push(e.toString().padStart(2,"0"))}return r}parseSecond(e){if(!e)return null;const t=e.split(":");if(t.length<3)return null;const i=parseInt(t[2],10);return isNaN(i)||i<0||i>=60?null:i}generateInfiniteTimeOptions(e){const t=this.generateTimeOptions(e);const i=t.length;const s=Math.ceil(300/i);return Array(s).fill(t).flat()}getCurrentTime(){const e=new Date;return e.toLocaleTimeString()}updateColumnHighlight(e,t){const i=Array.from(this.el.querySelectorAll(e));const s=i.findIndex((e=>e.textContent===t));this.updateHighlightedItem(i,s)}handleHostClick(e){var t,i;if(this.disabled||this.readonly){return}const s=e.target;if(s.closest("nv-iconbutton")){return}if(!this.open){if(this.inputElements){(t=this.inputElements[r.Hours])===null||t===void 0?void 0:t.focus();(i=this.inputElements[r.Hours])===null||i===void 0?void 0:i.select()}e.preventDefault()}}componentWillLoad(){document.addEventListener("click",this.handleClickOutside.bind(this));if(this.value){this.parseTime(this.value)}else{const e=this.parseHour(this.min,this.format)||"00";const t=this.parseMinute(this.min)||0;const i=this.parseSecond(this.min)||0;this.hours=e.padStart(2,"0");this.minutes=t.toString().padStart(2,"0");this.seconds=i.toString().padStart(2,"0")}}connectedCallback(){document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside.bind(this))}componentDidLoad(){if(!this.value){const e=this.getCurrentTime();let[t,i,s]=e.split(":");let n,o;if(s.includes(" ")){[n,o]=s.split(" ")}else{n=s}let r=parseInt(t,10);if(o){if(o==="PM"&&r<12){r+=12}else if(o==="AM"&&r===12){r=0}}if(this.format.startsWith("hh")){if(r===0){t="12"}else if(r>12){t=(r-12).toString()}else{t=r.toString()}}else{t=r.toString()}t=t.padStart(2,"0");i=i.padStart(2,"0");n=n.padStart(2,"0");const l=`.time-column.time-column-hours div`;this.updateColumnHighlight(l,t);const d=`.time-column.time-column-minutes div`;this.updateColumnHighlight(d,i);const a=`.time-column.time-column-seconds div`;this.updateColumnHighlight(a,n)}}RenderTimeOptionsColumn(e){return i("div",{class:`time-column time-column-${e}`,onScroll:t=>this.handleScroll(t,e)},this.generateInfiniteTimeOptions(e).map(((t,s)=>i("div",{class:{"time-option":true,selected:e===r.Hours&&t===this.hours||e===r.Minutes&&t===this.minutes||e===r.Seconds&&t===this.seconds},key:`${t}-${s}`,onClick:t=>this.handleTimeOptionClick(t,e)},t))))}render(){return i(s,{key:"fb5bc4740731089bf81ab7b24e57f24f966c5f92",onclick:e=>this.handleHostClick(e)},(this.label||this.el.querySelector('[slot="label"]'))&&i("label",{key:"d9f44f4ab94a13a620df743979d95b1f59572bfe",htmlFor:this.inputId},i("slot",{key:"fbc8176ea3443511764b2993939d1110fd932a5a",name:"label"},this.label)),i("nv-popover",{key:"ea376ec38db428db158c998e8963e27048ef03b0",ref:e=>this.popoverElement=e,triggerMode:"controlled",placement:"bottom-start",open:this.open},i("div",{key:"fa825918cea4a64db76324f953645f6db7cb81b9",class:"input-wrapper",slot:"trigger"},i("slot",{key:"37d7fd2eae40e4f47e9b626c226d060cf5e350e2",name:"before-input"}),i("div",{key:"6b73d8c9598bfaf470b5c5a455db0b08397cc8c8",class:"input-container"},i("slot",{key:"88f20151d7ccc1e3ad6f6aba4b5926cccc22c19c",name:"leading-input"}),o(this.format,"HH")&&[i("input",{key:"292ee8c62fd248b28fb46275ba06846d69b3b602",ref:e=>this.inputElements[r.Hours]=e,type:"number",autofocus:this.autofocus,class:"time-input",pattern:"[0-9]*",maxlength:"3",value:this.hours,onInput:e=>this.handleInputChange(e,r.Hours),placeholder:this.format.includes("hh")?"hh":"HH",inputMode:"numeric",onFocus:()=>this.handleFocus(r.Hours),name:this.name?`${r.Hours}-${this.name}`:r.Hours,id:this.inputId,readonly:this.readonly,disabled:this.disabled,required:this.required,onKeyDown:e=>this.handleKeyDown(e),onBlur:()=>this.handleInputBlur()})],this.format.includes("mm")&&[i("span",{key:"c7de2283771d60e1e9f756257e34da0eefcf27f3"},":"),i("input",{key:"521fad8cc60c9ced2ba634441b789fba15340ae7",ref:e=>this.inputElements[r.Minutes]=e,type:"number",autofocus:this.autofocus,class:"time-input",pattern:"[0-9]*",maxlength:"3",value:this.minutes,onInput:e=>this.handleInputChange(e,r.Minutes),placeholder:"mm",inputMode:"numeric",onFocus:()=>this.handleFocus(r.Minutes),name:this.name?`${r.Minutes}-${this.name}`:r.Minutes,id:`${this.inputId}-minutes`,readonly:this.readonly,disabled:this.disabled,required:this.required,onKeyDown:e=>this.handleKeyDown(e),onBlur:()=>this.handleInputBlur()})],this.format.includes("ss")&&[i("span",{key:"ceef993e3efdc2fa01d466033522e09ee78683b1"},":"),i("input",{key:"9c51f0fcecb86a913e9ae4cd3c5bcfbf34ac4ab8",ref:e=>this.inputElements[r.Seconds]=e,type:"number",autofocus:this.autofocus,class:"time-input",pattern:"[0-9]*",maxlength:"3",value:this.seconds,onInput:e=>this.handleInputChange(e,r.Seconds),placeholder:"ss",inputMode:"numeric",onFocus:()=>this.handleFocus(r.Seconds),name:this.name?`${r.Seconds}-${this.name}`:r.Seconds,id:`${this.inputId}-seconds`,readonly:this.readonly,disabled:this.disabled,required:this.required,onKeyDown:e=>this.handleKeyDown(e),onBlur:()=>this.handleInputBlur()})],i("nv-iconbutton",{key:"7a5516b7d91dc99f6963ee9daacee9305b16dfb0",name:this.open?"chevron-top":"chevron-down",size:"md",emphasis:"lower","aria-label":this.open?"Hide time picker":"Show time picker","aria-pressed":this.open.toString(),onClick:()=>this.HandleDropdownIconClick()}),this.error&&i("nv-icon",{key:"a9a9a02e312caf25a52b91e1d4db6b6ee9d850d6",name:"alert-circle",class:"validation",size:"sm"}),this.success&&i("nv-icon",{key:"93a69f343771dbdb8c6bd694ea9f5ddeeba39801",name:"circle-check",class:"validation",size:"sm"})),i("slot",{key:"678d9af754b860ac99a50d70cb9b975e79f164c9",name:"after-input"})),i("div",{key:"2bd255e97d8b34b66fa0af2f209d5175e67b62a3",class:"time-dropdown",slot:"content"},i("div",{key:"017b58a9a7ccb44918a408fb680fa1c18d8f5672",class:"time-columns"},o(this.format,"HH")&&this.RenderTimeOptionsColumn(r.Hours),this.format.includes("mm")&&this.RenderTimeOptionsColumn(r.Minutes),this.format.includes("ss")&&this.RenderTimeOptionsColumn(r.Seconds)))),(this.description||this.el.querySelector('[slot="description"]'))&&i("div",{key:"35f5fb47bfeb9cde2c3551df391cf52ccaf10c72",class:"description"},i("slot",{key:"b450124765db5b2337f03a5f68c4a9466c80ca85",name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&i("div",{key:"87d441f595f7ba8be04ca749235ec3918e9a80b0",hidden:!this.error,class:"error-description"},i("slot",{key:"35717f533b4a4c310f4fb805c3989398f340b8b1",name:"error-description"},this.errorDescription)))}static get formAssociated(){return true}get el(){return n(this)}static get watchers(){return{value:["handleValueChange"]}}};f.style=a;export{f as nv_fieldtime};
2
- //# sourceMappingURL=p-b2ce83ad.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["nvFieldtimeCss","NvFieldtimeStyle0","NvFieldtime","constructor","hostRef","this","inputElements","inputZeroAdded","typeFocused","TimeType","Hours","hours","minutes","seconds","inputId","uuidv4","readonly","disabled","required","success","error","format","open","step","autofocus","handleOpenChanged","event","detail","handleKeyDown","key","preventDefault","popoverElement","console","warn","stringSelector","items","Array","from","el","querySelectorAll","length","currentIndex","findIndex","item","classList","contains","updateHighlightedItem","click","_a","Minutes","focus","_b","select","Seconds","_c","_d","blur","handleValueChange","newValue","valueChanged","emit","handleInputChange","e","type","inputElement","target","inputValue","value","replace","handleHoursChange","handleMinutesChange","handleSecondsChange","currentValue","reconstructTime","isHHFormat","startsWith","maxHours","reputedToZero","maxHour","parseHour","max","minHour","min","newInputValue","padStart","parseInt","slice","parsedNewInputValue","toString","maxMinutes","minMinute","parseMinute","maxMinute","_e","_f","maxSeconds","minSecond","parseSecond","maxSecond","parseTime","timeString","cleanedTime","hour","minute","second","handleFocus","HandleDropdownIconClick","index","forEach","i","add","setAttribute","scrollIntoView","block","remove","handleTimeOptionClick","option","textContent","handleInputBlur","setTimeout","document","activeElement","handleClickOutside","Object","values","some","input","handleScroll","scrollTop","containerHeight","clientHeight","scrollHeight","itemHeight","options","generateTimeOptions","singleSetHeight","stepInSeconds","generateHourOptions","generateMinuteOptions","generateSecondOptions","hourStep","Math","floor","maxHourValue","minHourValue","push","hourStr","split","isNaN","minuteStep","parts","secondStep","generateInfiniteTimeOptions","totalOptions","repetitions","ceil","fill","flat","getCurrentTime","currentTime","Date","toLocaleTimeString","updateColumnHighlight","selector","x","handleHostClick","targetElement","closest","componentWillLoad","addEventListener","bind","connectedCallback","disconnectedCallback","removeEventListener","componentDidLoad","secondAmPm","amPm","includes","parsedHour","hourSelector","minuteSelector","secondSelector","RenderTimeOptionsColumn","h","class","onScroll","map","selected","onClick","render","Host","onclick","label","querySelector","htmlFor","name","ref","triggerMode","placement","slot","startsWithIgnoreCase","pattern","maxlength","onInput","placeholder","inputMode","onFocus","id","onKeyDown","onBlur","size","emphasis","description","errorDescription","hidden"],"sources":["src/components/nv-fieldtime/styles/nv-fieldtime.scss?tag=nv-fieldtime","src/components/nv-fieldtime/nv-fieldtime.tsx"],"sourcesContent":["@use './mixins' as *;\n@import '../../../styles/form-field';\n\nnv-fieldtime {\n @include form-field-variables();\n @include form-field-root();\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 @include apply-popover-style;\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n width: 100%;\n }\n\n .input-container {\n @include form-field-input-container();\n @include flex-container(flex-start);\n position: relative;\n width: 100%;\n min-height: 40px;\n gap: 0;\n padding-left: var(--form-field-padding-x);\n\n input.time-input {\n @include form-field-input();\n @include apply-input-styles();\n }\n\n span {\n width: 100%;\n text-align: center;\n min-width: 24px;\n flex: 0 0 24px;\n padding: 0 4px;\n color: var(--components-form-field-content-text);\n }\n\n > nv-iconbutton {\n @include form-field-action();\n margin-left: auto;\n }\n\n nv-icon.validation {\n @include form-field-icon();\n @include icon-position(50px);\n }\n\n &:focus,\n &:focus-within {\n @include apply-focus-styles;\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n\n hr {\n border: none;\n border-top: 1px solid var(--dropdown-divider-color, #ccc);\n margin: 0.5rem 0;\n }\n\n .time-dropdown {\n width: 100%;\n\n .time-columns {\n @include flex-container;\n\n .time-column {\n flex: 1;\n text-align: center;\n @include scrollable(200px);\n\n &:last-child {\n border-right: none;\n }\n\n .time-option {\n padding: var(--list-dropdown-item-padding-y)\n var(--list-dropdown-item-padding-x);\n text-align: center;\n cursor: pointer;\n transition: background-color 0.2s;\n height: 40px;\n border-radius: var(--list-dropdown-item-radius);\n @include flex-container(center);\n\n &:hover {\n background-color: var(\n --components-list-dropdown-item-background-hover\n );\n color: var(--components-list-dropdown-item-label-hover);\n }\n\n @include state-focus(\n var(--components-list-dropdown-item-background-hover),\n var(--components-list-dropdown-item-label-hover)\n );\n\n &.selected {\n background-color: var(\n --components-list-dropdown-item-background-active\n );\n color: var(--components-list-dropdown-item-label-active);\n @include bordered-element(\n 1px,\n var(--components-list-dropdown-item-border-active)\n );\n }\n\n &.highlighted {\n background-color: var(\n --components-list-dropdown-item-background-hover\n );\n color: var(--components-menu-contextual-item-content-hover);\n }\n }\n }\n }\n }\n}\n","/* eslint-disable react/jsx-no-bind */\nimport {\n Component,\n Host,\n h,\n State,\n Element,\n Event,\n EventEmitter,\n Prop,\n Watch,\n Listen,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { startsWithIgnoreCase } from '../../utils/string.utils';\nimport { TimeType } from '../../utils/constants';\n\n/**\n * @slot label - Content to be placed as the label, will override the label prop.\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 leading-input - Content to be placed before the input text, within the input container.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n */\n@Component({\n tag: 'nv-fieldtime',\n styleUrl: 'styles/nv-fieldtime.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldtime {\n @Element() el: HTMLNvFieldtimeElement;\n\n // Input elements for hours, minutes, and seconds\n private inputElements: { [key: string]: HTMLInputElement } = {};\n\n private inputZeroAdded: { [key: string]: boolean } = {};\n\n private popoverElement!: HTMLNvPopoverElement;\n\n private typeFocused: TimeType = TimeType.Hours;\n\n /****************************************************************************/\n //#region STATES\n\n @State()\n hours: string = '00';\n @State()\n minutes: string = '00';\n @State()\n seconds: string = '00';\n\n //#endregion STATES\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * The current value of the time input in the specified format.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * Lets you define the text that explains what users should enter in the time\n * input field. It's a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\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 * Display the input field's content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won't be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * The disabled prop lets you turn off the input field so that users can't\n * interact with it. When disabled, the field is grayed out and won't respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\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.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: 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 time\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Specifies the time format to be used.\n * Available formats:\n * - HH: 24-hour format (00-23)\n * - HH:mm: 24-hour format with minutes (00:00-23:59)\n * - HH:mm:ss: 24-hour format with minutes and seconds (00:00:00-23:59:59)\n * - hh: 12-hour format (01-12)\n * - hh:mm: 12-hour format with minutes (01:00-12:59)\n * - hh:mm:ss: 12-hour format with minutes and seconds (01:00:00-12:59:59)\n */\n @Prop({ reflect: true })\n readonly format: 'HH' | 'HH:mm' | 'HH:mm:ss' | 'hh' | 'hh:mm' | 'hh:mm:ss' =\n 'HH:mm:ss';\n\n /**\n * Add helpful hints or extra information under the time input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * State of the time picker popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * The step interval in milliseconds for time increments/decrements.\n * This affects how the time changes when using arrow keys or spinners.\n */\n @Prop({ reflect: true })\n readonly step: number = 60000; // In secondes\n\n /**\n * The maximum time value that can be selected.\n */\n @Prop({ reflect: true })\n readonly max: string;\n\n /**\n * The minimum time value that can be selected.\n */\n @Prop({ reflect: true })\n readonly min: string;\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 //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emit an event when the time value changes.\n * The event detail contains the new time value (HH, HH:mm or HH:mm:ss).\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region LISTENERS\n\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n this.open = event.detail; // Update `open` based on the popover state\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-fieldtime -> Popover element is not defined');\n return;\n }\n\n const stringSelector = `.time-column.time-column-${this.typeFocused} div`;\n const items = Array.from(\n this.el.querySelectorAll<HTMLElement>(stringSelector),\n );\n\n // Verify if there are items to navigate\n if (items.length === 0) {\n console.warn('nv-fieldtime -> No dropdown 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 = (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex = (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Enter' && currentIndex >= 0) {\n event.preventDefault();\n items[currentIndex].click();\n\n if (this.typeFocused === TimeType.Hours) {\n this.inputElements[TimeType.Minutes]?.focus();\n this.inputElements[TimeType.Minutes]?.select();\n } else if (\n this.typeFocused === TimeType.Minutes ||\n this.typeFocused === TimeType.Seconds\n ) {\n this.inputElements[TimeType.Seconds]?.focus();\n this.inputElements[TimeType.Seconds]?.select();\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n\n if (this.inputElements[TimeType.Hours]) {\n this.inputElements[TimeType.Hours].blur();\n }\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.valueChanged.emit(newValue);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleInputChange(e: InputEvent, type: TimeType): void {\n const inputElement = e.target as HTMLInputElement;\n const inputValue = inputElement.value.replace(/[^0-9]/g, ''); // Only keep numeric input\n\n // Update the time value based on the type\n switch (type) {\n case TimeType.Hours:\n this.handleHoursChange(inputValue, type);\n break;\n case TimeType.Minutes:\n this.handleMinutesChange(inputValue, type);\n break;\n case TimeType.Seconds:\n this.handleSecondsChange(inputValue, type);\n break;\n }\n\n // Reconstruct time from inputs\n const currentValue = this.reconstructTime();\n\n this.value = currentValue;\n }\n\n private handleHoursChange(inputValue: string, type: TimeType): void {\n const isHHFormat = this.format.startsWith('HH');\n const maxHours = isHHFormat ? 24 : 12;\n let reputedToZero = false;\n const maxHour =\n this.parseHour(this.max, this.format) ||\n (this.format.startsWith('hh') ? '12' : '24');\n const minHour = this.parseHour(this.min, this.format) || '00';\n\n if (inputValue.length === 1) {\n this.inputZeroAdded[type] = true;\n\n const newInputValue = inputValue.padStart(2, '0');\n\n if (maxHour && parseInt(newInputValue, 10) > parseInt(maxHour, 10)) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = newInputValue;\n }\n }\n } else if (this.inputZeroAdded[type]) {\n this.inputZeroAdded[type] = false;\n\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxHours) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (maxHour && parseInt(newInputValue, 10) > parseInt(maxHour, 10)) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = newInputValue;\n }\n }\n }\n } else if (inputValue.length > 2) {\n if (inputValue.startsWith('00')) {\n this.inputZeroAdded[type] = true;\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n\n if (maxHour && parseInt(newInputValue, 10) > parseInt(maxHour, 10)) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = newInputValue;\n }\n }\n } else {\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxHours) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n reputedToZero = true;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (maxHour && parsedNewInputValue > parseInt(maxHour, 10)) {\n if (\n minHour &&\n parseInt(newInputValue, 10) < parseInt(minHour, 10)\n ) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (minHour && parsedNewInputValue < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = parsedNewInputValue.toString();\n }\n }\n }\n }\n } else {\n const newInputValue = inputValue.padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxHours) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (maxHour && parsedNewInputValue > parseInt(maxHour, 10)) {\n this.hours = '00';\n reputedToZero = true;\n } else {\n if (minHour && parsedNewInputValue < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = parsedNewInputValue.toString();\n }\n }\n }\n }\n\n if (\n this.hours.length === 2 &&\n !this.inputZeroAdded[type] &&\n !reputedToZero\n ) {\n this.inputElements[TimeType.Minutes]?.focus();\n this.inputElements[TimeType.Minutes]?.select();\n } else if (reputedToZero) {\n this.inputElements[TimeType.Hours]?.focus();\n this.inputElements[TimeType.Hours]?.select();\n }\n }\n\n private handleMinutesChange(inputValue: string, type: TimeType): void {\n const maxMinutes = 60;\n let reputedToZero = false;\n const minMinute = this.parseMinute(this.min) ?? 0;\n const maxMinute = this.parseMinute(this.max) ?? 59;\n\n if (inputValue.length === 1) {\n this.inputZeroAdded[type] = true;\n\n const newInputValue = inputValue.padStart(2, '0');\n\n if (maxMinute && parseInt(newInputValue, 10) > maxMinute) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = newInputValue;\n }\n }\n } else if (this.inputZeroAdded[type]) {\n this.inputZeroAdded[type] = false;\n\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxMinutes) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (maxMinute && parsedNewInputValue > maxMinute) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (minMinute && parsedNewInputValue < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = newInputValue;\n }\n }\n }\n } else if (inputValue.length > 2) {\n if (inputValue.startsWith('00')) {\n this.inputZeroAdded[type] = true;\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n\n if (maxMinute && parseInt(newInputValue, 10) > maxMinute) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = newInputValue;\n }\n }\n } else {\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxMinutes) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (maxMinute && parsedNewInputValue > maxMinute) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (minMinute && parsedNewInputValue < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = parsedNewInputValue.toString();\n }\n }\n }\n }\n } else {\n const newInputValue = inputValue.padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxMinutes) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (maxMinute && parsedNewInputValue > maxMinute) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (minMinute && parsedNewInputValue < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = parsedNewInputValue.toString();\n }\n }\n }\n }\n\n if (\n this.minutes.length === 2 &&\n !this.inputZeroAdded[type] &&\n !reputedToZero\n ) {\n this.inputElements[TimeType.Seconds]?.focus();\n this.inputElements[TimeType.Seconds]?.select();\n } else if (reputedToZero) {\n this.inputElements[TimeType.Minutes]?.focus();\n this.inputElements[TimeType.Minutes]?.select();\n }\n }\n\n private handleSecondsChange(inputValue: string, type: TimeType): void {\n const maxSeconds = 60;\n let reputedToZero = false;\n const minSecond = this.parseSecond(this.min) ?? 0;\n const maxSecond = this.parseSecond(this.max) ?? 59;\n\n if (inputValue.length === 1) {\n this.inputZeroAdded[type] = true;\n const newInputValue = inputValue.padStart(2, '0');\n\n if (maxSecond && parseInt(newInputValue, 10) > maxSecond) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = newInputValue;\n }\n }\n } else if (this.inputZeroAdded[type]) {\n this.inputZeroAdded[type] = false;\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxSeconds) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (maxSecond && parsedNewInputValue > maxSecond) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (minSecond && parsedNewInputValue < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = newInputValue;\n }\n }\n }\n } else if (inputValue.length > 2) {\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxSeconds) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (maxSecond && parsedNewInputValue > maxSecond) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (minSecond && parsedNewInputValue < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = parsedNewInputValue.toString();\n }\n }\n }\n } else {\n const newInputValue = inputValue.padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxSeconds) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (maxSecond && parsedNewInputValue > maxSecond) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (minSecond && parsedNewInputValue < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = parsedNewInputValue.toString();\n }\n }\n }\n }\n\n if (reputedToZero) {\n this.inputElements[TimeType.Seconds]?.focus();\n this.inputElements[TimeType.Seconds]?.select();\n }\n }\n\n // Parse a continuous time string (e.g., \"123456\") into hours, minutes, and seconds\n private parseTime(timeString: string): void {\n if (!timeString) {\n return;\n }\n\n const cleanedTime = timeString.replace(/[^0-9]/g, '').padStart(6, '0');\n const hour = cleanedTime.slice(0, 2);\n const minute = cleanedTime.slice(2, 4);\n const second = cleanedTime.slice(4, 6);\n\n const minHour = this.parseHour(this.min, this.format) || hour;\n const minMinute = this.parseMinute(this.min) || minute;\n const minSecond = this.parseSecond(this.min) || second;\n\n this.hours = minHour.padStart(2, '0');\n this.minutes = minMinute.toString().padStart(2, '0');\n this.seconds = minSecond.toString().padStart(2, '0');\n }\n\n private reconstructTime(): string {\n if (this.format === 'HH' || this.format === 'hh') {\n return this.hours;\n } else if (this.format === 'HH:mm' || this.format === 'hh:mm') {\n return `${this.hours}:${this.minutes}`;\n } else if (this.format === 'HH:mm:ss' || this.format === 'hh:mm:ss') {\n return `${this.hours}:${this.minutes}:${this.seconds}`;\n } else {\n return `${this.hours}:${this.minutes}:${this.seconds}`;\n }\n }\n\n private handleFocus(type: TimeType): void {\n if (this.readonly || this.disabled) {\n return;\n }\n\n if (!this.open) {\n this.open = true; // Force the popover to open\n }\n\n // Refocus on the input if it loses focus and is empty\n if (\n this.inputElements[type]?.value.length === 0 ||\n this.inputElements[type]?.value === '00'\n ) {\n this.inputElements[type]?.focus();\n this.inputElements[type]?.select();\n }\n\n this.typeFocused = type;\n }\n\n private HandleDropdownIconClick(): void {\n if (this.disabled || this.readonly) {\n return; // Do not toggle if disabled or read-only\n }\n\n if (this.open && this.inputElements[TimeType.Hours]) {\n this.open = false; // Close the popover if it is open\n } else if (this.open && this.inputElements[TimeType.Minutes]) {\n this.open = false; // Close the popover if it is open\n } else if (this.open && this.inputElements[TimeType.Seconds]) {\n this.open = false; // Close the popover if it is open\n } else if (!this.open && this.inputElements[TimeType.Hours]) {\n this.inputElements[TimeType.Hours]?.focus(); // Focus will open the popover\n this.inputElements[TimeType.Hours]?.select();\n } else if (!this.open && this.inputElements[TimeType.Minutes]) {\n this.inputElements[TimeType.Minutes]?.focus(); // Focus will open the popover\n this.inputElements[TimeType.Minutes]?.select();\n } else if (!this.open && this.inputElements[TimeType.Seconds]) {\n this.inputElements[TimeType.Seconds]?.focus(); // Focus will open the popover\n this.inputElements[TimeType.Seconds]?.select();\n } else {\n console.warn(\n 'nv-fieldtime -> No input elements found to focus or to blur',\n );\n }\n }\n\n private updateHighlightedItem(items: HTMLElement[], index: number) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.setAttribute('tabindex', '0');\n item.focus(); // Forcer le focus ici\n item.scrollIntoView({ block: 'nearest' });\n } else {\n item.classList.remove('highlighted');\n item.setAttribute('tabindex', '-1');\n }\n });\n }\n\n private handleTimeOptionClick(event: MouseEvent, type: TimeType): void {\n const option = parseInt(\n (event.target as HTMLElement).textContent || '0',\n 10,\n );\n\n if (type === TimeType.Hours) {\n this.hours = option.toString().padStart(2, '0');\n } else if (type === TimeType.Minutes) {\n this.minutes = option.toString().padStart(2, '0');\n } else if (type === TimeType.Seconds) {\n this.seconds = option.toString().padStart(2, '0');\n }\n\n const reconstructTime = this.reconstructTime();\n this.value = reconstructTime;\n }\n\n private handleInputBlur(): void {\n // Use a delay to check if the focus is still within the popover\n setTimeout(() => {\n if (!this.el.contains(document.activeElement)) {\n if (this.open) {\n this.open = false; // Close the popover if the focus is outside the component\n }\n }\n }, 150);\n }\n\n private handleClickOutside(event: MouseEvent) {\n const target = event.target as Node;\n\n // Check if the click is inside the component or any of the input elements\n if (\n this.el.contains(target) ||\n Object.values(this.inputElements).some(input => input.contains(target))\n ) {\n return;\n }\n\n if (this.open) {\n this.open = false; // Close the popover if the click is outside\n }\n }\n\n private handleScroll(e: Event, type: TimeType): void {\n const target = e.target as HTMLElement;\n const scrollTop = target.scrollTop;\n const containerHeight = target.clientHeight;\n const scrollHeight = target.scrollHeight;\n\n // Define the height of each item, this could be dynamic if the height varies\n const itemHeight = 40; // Consider making this configurable or dynamic\n const options = this.generateTimeOptions(type); // Generates the list of time options\n const singleSetHeight = options.length * itemHeight;\n\n // Check if the scroll is near the bottom or top and reset to the first set\n if (\n scrollTop + containerHeight >= scrollHeight - itemHeight ||\n scrollTop <= 0\n ) {\n target.scrollTop = singleSetHeight; // Reset to the first set from the bottom\n }\n }\n\n private generateTimeOptions(type: TimeType) {\n // Convert the step in seconds\n const stepInSeconds = this.step / 1000;\n\n // Handle edge case for zero step\n if (stepInSeconds === 0) {\n return ['00']; // Just return the default value\n }\n\n // Generate the time options based on the type\n switch (type) {\n case TimeType.Hours:\n return this.generateHourOptions(stepInSeconds);\n\n case TimeType.Minutes:\n return this.generateMinuteOptions(stepInSeconds);\n\n case TimeType.Seconds:\n return this.generateSecondOptions(stepInSeconds);\n\n default:\n return [];\n }\n }\n\n private generateHourOptions(stepInSeconds: number): string[] {\n const hourStep = Math.max(1, Math.floor(stepInSeconds / 3600)); // Prevent step < 1\n const maxHour =\n this.parseHour(this.max, this.format) ||\n (this.format.startsWith('hh') ? '12' : '24');\n const minHour = this.parseHour(this.min, this.format) || '00';\n\n const maxHourValue = parseInt(maxHour, 10);\n const minHourValue = parseInt(minHour, 10);\n const values: string[] = [];\n\n for (let i = minHourValue; i < maxHourValue; i += hourStep) {\n values.push(i.toString().padStart(2, '0'));\n }\n\n return values;\n }\n\n private parseHour(value: string | null, format: string): string | null {\n if (!value) return null;\n const [hourStr] = value.split(':');\n const hour = parseInt(hourStr, 10);\n if (isNaN(hour)) return null;\n if (format.startsWith('hh'))\n return hour > 0 && hour <= 12 ? hourStr.padStart(2, '0') : null;\n return hour >= 0 && hour <= 24 ? hourStr.padStart(2, '0') : null;\n }\n\n private generateMinuteOptions(stepInSeconds: number): string[] {\n const minuteStep = Math.max(1, Math.floor((stepInSeconds % 3600) / 60)); // Ensure step >= 1\n const minMinute = this.parseMinute(this.min) ?? 0;\n const maxMinute = this.parseMinute(this.max) ?? 59;\n\n if (minMinute === 0 && maxMinute === 0) return ['00']; // Handle edge case for zero seconds\n\n const values: string[] = [];\n\n for (let i = minMinute; i <= maxMinute; i += minuteStep) {\n values.push(i.toString().padStart(2, '0'));\n }\n\n return values;\n }\n\n private parseMinute(value: string | null): number | null {\n if (!value) return null;\n const parts = value.split(':');\n if (parts.length < 2) return null; // Expect at least \"hh:mm\"\n const minute = parseInt(parts[1], 10);\n return isNaN(minute) || minute < 0 || minute >= 60 ? null : minute;\n }\n\n private generateSecondOptions(stepInSeconds: number): string[] {\n const secondStep = Math.max(1, stepInSeconds % 60); // Ensure step >= 1\n const minSecond = this.parseSecond(this.min) ?? 0;\n const maxSecond = this.parseSecond(this.max) ?? 59;\n\n if (minSecond === 0 && maxSecond === 0) return ['00']; // Handle edge case for zero seconds\n\n const values: string[] = [];\n\n for (let i = minSecond; i <= maxSecond; i += secondStep) {\n values.push(i.toString().padStart(2, '0'));\n }\n\n return values;\n }\n\n private parseSecond(value: string | null): number | null {\n if (!value) return null;\n const parts = value.split(':');\n if (parts.length < 3) return null; // Expect \"hh:mm:ss\" or \"HH:mm:ss\"\n const second = parseInt(parts[2], 10);\n return isNaN(second) || second < 0 || second >= 60 ? null : second;\n }\n\n private generateInfiniteTimeOptions(type: TimeType): string[] {\n const options = this.generateTimeOptions(type);\n const totalOptions = options.length;\n\n // Dynamically calculate repetitions based on a target number of items (e.g., 300 items)\n const repetitions = Math.ceil(300 / totalOptions);\n return Array(repetitions).fill(options).flat();\n }\n\n private getCurrentTime(): string {\n const currentTime = new Date();\n return currentTime.toLocaleTimeString(); // Returns the time in the locale's format\n }\n\n private updateColumnHighlight(selector, value): void {\n const items = Array.from(this.el.querySelectorAll<HTMLElement>(selector));\n\n const index = items.findIndex(x => x.textContent === value);\n this.updateHighlightedItem(items, index);\n }\n\n private handleHostClick(event: MouseEvent): void {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const targetElement = event.target as HTMLElement;\n\n // Check if the click target or its ancestors are inside an nv-iconbutton element\n if (targetElement.closest('nv-iconbutton')) {\n return; // Handle icon button click separately\n }\n\n if (!this.open) {\n if (this.inputElements) {\n this.inputElements[TimeType.Hours]?.focus();\n this.inputElements[TimeType.Hours]?.select();\n }\n\n event.preventDefault();\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n document.addEventListener('click', this.handleClickOutside.bind(this));\n\n // If an initial value is passed, parse it\n if (this.value) {\n this.parseTime(this.value);\n } else {\n const minHour = this.parseHour(this.min, this.format) || '00';\n const minMinute = this.parseMinute(this.min) || 0;\n const minSecond = this.parseSecond(this.min) || 0;\n\n this.hours = minHour.padStart(2, '0');\n this.minutes = minMinute.toString().padStart(2, '0');\n this.seconds = minSecond.toString().padStart(2, '0');\n }\n }\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside.bind(this));\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside.bind(this));\n }\n\n componentDidLoad() {\n if (!this.value) {\n const currentTime = this.getCurrentTime();\n\n // Split time into components\n // eslint-disable-next-line prefer-const\n let [hour, minute, secondAmPm] = currentTime.split(':');\n let second, amPm;\n\n // Check if AM/PM is present and split accordingly\n if (secondAmPm.includes(' ')) {\n [second, amPm] = secondAmPm.split(' ');\n } else {\n second = secondAmPm;\n }\n\n // Parse hour as integer for calculations\n let parsedHour = parseInt(hour, 10);\n\n // Convert hour to 24-hour format based on AM/PM (if present)\n if (amPm) {\n if (amPm === 'PM' && parsedHour < 12) {\n parsedHour += 12; // Convert PM to 24-hour\n } else if (amPm === 'AM' && parsedHour === 12) {\n parsedHour = 0; // Midnight in 24-hour format\n }\n }\n\n // Adjust for 12-hour format if necessary\n if (this.format.startsWith('hh')) {\n if (parsedHour === 0) {\n hour = '12'; // Midnight in 12-hour format\n } else if (parsedHour > 12) {\n hour = (parsedHour - 12).toString(); // Convert 24-hour to 12-hour\n } else {\n hour = parsedHour.toString();\n }\n } else {\n hour = parsedHour.toString(); // Use 24-hour format directly\n }\n\n // Pad hour, minute, and second to ensure two digits\n hour = hour.padStart(2, '0');\n minute = minute.padStart(2, '0');\n second = second.padStart(2, '0');\n\n // Update highlighted items for hours\n const hourSelector = `.time-column.time-column-hours div`;\n this.updateColumnHighlight(hourSelector, hour);\n\n // Update highlighted items for minutes\n const minuteSelector = `.time-column.time-column-minutes div`;\n this.updateColumnHighlight(minuteSelector, minute);\n\n // Update highlighted items for seconds\n const secondSelector = `.time-column.time-column-seconds div`;\n this.updateColumnHighlight(secondSelector, second);\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n private RenderTimeOptionsColumn(type: TimeType): HTMLElement {\n return (\n <div\n class={`time-column time-column-${type}`}\n onScroll={e => this.handleScroll(e, type)}\n >\n {/* Hours */}\n {this.generateInfiniteTimeOptions(type).map((option, index) => (\n <div\n class={{\n 'time-option': true,\n 'selected':\n (type === TimeType.Hours && option === this.hours) ||\n (type === TimeType.Minutes && option === this.minutes) ||\n (type === TimeType.Seconds && option === this.seconds),\n }}\n key={`${option}-${index}`}\n onClick={e => this.handleTimeOptionClick(e, type)}\n >\n {option}\n </div>\n ))}\n </div>\n );\n }\n\n render() {\n return (\n <Host onclick={e => this.handleHostClick(e)}>\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 as HTMLNvPopoverElement)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\">\n <slot name=\"leading-input\"></slot>\n {/* Input fields for hours, minutes, and seconds */}\n {/* Hours */}\n {startsWithIgnoreCase(this.format, 'HH') && [\n <input\n ref={el => (this.inputElements[TimeType.Hours] = el)}\n type=\"number\"\n autofocus={this.autofocus}\n class=\"time-input\"\n pattern=\"[0-9]*\"\n maxlength=\"3\"\n value={this.hours}\n onInput={e => this.handleInputChange(e, TimeType.Hours)}\n placeholder={this.format.includes('hh') ? 'hh' : 'HH'}\n inputMode=\"numeric\"\n onFocus={() => this.handleFocus(TimeType.Hours)}\n name={\n this.name\n ? `${TimeType.Hours}-${this.name}`\n : TimeType.Hours\n }\n id={this.inputId}\n readonly={this.readonly}\n disabled={this.disabled}\n required={this.required}\n onKeyDown={e => this.handleKeyDown(e)} // Handle arrow keys\n onBlur={() => this.handleInputBlur()}\n />,\n ]}\n {/* Minutes */}\n {this.format.includes('mm') && [\n <span>:</span>,\n <input\n ref={el => (this.inputElements[TimeType.Minutes] = el)}\n type=\"number\"\n autofocus={this.autofocus}\n class=\"time-input\"\n pattern=\"[0-9]*\"\n maxlength=\"3\"\n value={this.minutes}\n onInput={e => this.handleInputChange(e, TimeType.Minutes)}\n placeholder=\"mm\"\n inputMode=\"numeric\"\n onFocus={() => this.handleFocus(TimeType.Minutes)}\n name={\n this.name\n ? `${TimeType.Minutes}-${this.name}`\n : TimeType.Minutes\n }\n id={`${this.inputId}-minutes`}\n readonly={this.readonly}\n disabled={this.disabled}\n required={this.required}\n onKeyDown={e => this.handleKeyDown(e)} // Handle arrow keys\n onBlur={() => this.handleInputBlur()}\n />,\n ]}\n {/* Seconds */}\n {this.format.includes('ss') && [\n <span>:</span>,\n\n <input\n ref={el => (this.inputElements[TimeType.Seconds] = el)}\n type=\"number\"\n autofocus={this.autofocus}\n class=\"time-input\"\n pattern=\"[0-9]*\"\n maxlength=\"3\"\n value={this.seconds}\n onInput={e => this.handleInputChange(e, TimeType.Seconds)}\n placeholder=\"ss\"\n inputMode=\"numeric\"\n onFocus={() => this.handleFocus(TimeType.Seconds)}\n name={\n this.name\n ? `${TimeType.Seconds}-${this.name}`\n : TimeType.Seconds\n }\n id={`${this.inputId}-seconds`}\n readonly={this.readonly}\n disabled={this.disabled}\n required={this.required}\n onKeyDown={e => this.handleKeyDown(e)} // Handle arrow keys\n onBlur={() => this.handleInputBlur()}\n />,\n ]}\n\n <nv-iconbutton\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide time picker' : 'Show time picker'}\n aria-pressed={this.open.toString()}\n onClick={() => this.HandleDropdownIconClick()}\n />\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"sm\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"sm\" />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div class=\"time-dropdown\" slot=\"content\">\n <div class=\"time-columns\">\n {startsWithIgnoreCase(this.format, 'HH') &&\n this.RenderTimeOptionsColumn(TimeType.Hours)}\n {this.format.includes('mm') &&\n this.RenderTimeOptionsColumn(TimeType.Minutes)}\n {this.format.includes('ss') &&\n this.RenderTimeOptionsColumn(TimeType.Seconds)}\n </div>\n </div>\n </nv-popover>\n\n {(this.description ||\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 <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":"4KAAA,MAAMA,EAAiB,o3PACvB,MAAAC,EAAeD,E,MC8BFE,EAAW,MANxB,WAAAC,CAAAC,G,qDAUUC,KAAAC,cAAqD,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O,mBAAqB,mBAAkB,eACjDjB,KAAKiB,KAAKkE,WACxBoG,QAAS,IAAMvL,KAAKqG,4BAGrBrG,KAAKe,OACJmK,EAAA,WAAA1J,IAAA,2CAASsK,KAAK,eAAeX,MAAM,aAAa0B,KAAK,OAEtD7M,KAAKc,SACJoK,EAAA,WAAA1J,IAAA,2CAASsK,KAAK,eAAeX,MAAM,aAAa0B,KAAK,QAIzD3B,EAAA,QAAA1J,IAAA,2CAAMsK,KAAK,iBAGbZ,EAAA,OAAA1J,IAAA,2CAAK2J,MAAM,gBAAgBe,KAAK,WAC9BhB,EAAA,OAAA1J,IAAA,2CAAK2J,MAAM,gBACRgB,EAAqBnM,KAAKgB,OAAQ,OACjChB,KAAKiL,wBAAwB7K,EAASC,OACvCL,KAAKgB,OAAO4J,SAAS,OACpB5K,KAAKiL,wBAAwB7K,EAASwC,SACvC5C,KAAKgB,OAAO4J,SAAS,OACpB5K,KAAKiL,wBAAwB7K,EAAS4C,aAK5ChD,KAAK+M,aACL/M,KAAKiC,GAAG2J,cAAc,0BACtBV,EAAA,OAAA1J,IAAA,2CAAK2J,MAAM,eACTD,EAAA,QAAA1J,IAAA,2CAAMsK,KAAK,eAAe9L,KAAK+M,eAIjC/M,KAAKgN,kBACLhN,KAAKiC,GAAG2J,cAAc,gCACtBV,EAAA,OAAA1J,IAAA,2CAAKyL,QAASjN,KAAKe,MAAOoK,MAAM,qBAC9BD,EAAA,QAAA1J,IAAA,2CAAMsK,KAAK,qBAAqB9L,KAAKgN,mB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["nvTableCss","NvTableStyle0","NvTable","constructor","hostRef","this","templateCache","Map","headerTemplateCache","parsedColumns","parsedData","table","data","columnsConfig","fallbackValue","noDataMessage","noColumnsNoDataMessage","cacheTemplates","columns","Array","from","el","querySelectorAll","forEach","col","key","name","cellSlot","querySelector","element","deepCopyElement","set","headerSlot","header","headerDiv","document","createElement","textContent","parseDataAndColumns","dataJson","parseJsonData","length","parseDataArray","columnsConfigJson","parseJsonColumns","parseColumnsArray","size","headerKeys","keys","arrayColumnsConfig","map","Object","assign","charAt","toUpperCase","slice","firstRow","deepEqual","a","b","JSON","stringify","newValue","oldValue","safeNewValue","isArray","safeOldValue","initializeTable","getTableData","replaceKeyWithValue","obj","path","_a","split","reduce","acc","undefined","renderTemplate","template","row","templateContent","HTMLTemplateElement","content","replacePlaceholdersTextContent","replacePlaceholdersAttributes","replacePlaceholdersProperties","bindEvent","getAttribute","splitted","includes","console","warn","eventType","keyAction","details","addEventListener","keyValue","action","emit","setTimeout","child","connectedCallback","h","ref","innerHTML","appendChild","childNodes","node","nodeType","Node","TEXT_NODE","replace","_","attributes","attr","value","properties","Set","add","proto","getPrototypeOf","HTMLElement","prototype","prop","startsWith","excludedProps","has","error","message","parseColumns","newItems","parse","e","parseData","handleParsedChange","componentWillLoad","render","headerGroups","rows","Host","class","get","colSpan"],"sources":["src/components/nv-table/nv-table.scss?tag=nv-table","src/components/nv-table/nv-table.tsx"],"sourcesContent":["@mixin root-styles() {\n display: block;\n}\n\nnv-table {\n @include root-styles();\n\n .hidden {\n display: none;\n }\n\n table {\n border-collapse: collapse;\n border-color: inherit;\n text-indent: 0;\n width: 100%;\n }\n th {\n text-align: left;\n border-bottom: 1px solid var(--components-datagrid-header-border);\n height: var(--spacing-12);\n padding: var(--spacing-3) var(--spacing-4);\n font-size: var(--font-size-md);\n font-weight: 700;\n color: var(--components-datagrid-header-text);\n }\n td {\n border-bottom: 1px solid var(--components-datagrid-body-border);\n height: var(--spacing-12);\n max-height: var(--spacing-14);\n padding: var(--spacing-2) var(--spacing-4);\n font-size: var(--font-size-md);\n font-weight: 400;\n color: var(--components-datagrid-body-text);\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n tbody > tr:hover {\n background: var(--color-interaction-container-neutral-background-hover);\n }\n}\n\n// https://tailwindcss.com/docs/table-layout","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n Component,\n Host,\n Prop,\n State,\n h,\n Element,\n Watch,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { ColumnConfig } from '../../interfaces/ColumnConfig';\nimport { ActionEvent } from '../../interfaces/actionEvent';\nimport { deepCopyElement, excludedProps } from '../../utils/dom.utils';\n\n/**\n * Helper interface to define the table structure\n */\ninterface Table {\n /**\n * Configuration of the columns of the table\n */\n columns: ColumnConfig[];\n\n /**\n * Data to be displayed in the table\n */\n data: any[];\n}\n\n/**\n * @slot default - Slot for the composed table columns\n * @slot before - Use this slot to insert HTML before the table.\n * @slot after - Use this slot to insert HTML after the table.\n */\n@Component({\n tag: 'nv-table',\n styleUrl: 'nv-table.scss',\n shadow: false,\n})\nexport class NvTable {\n @Element() el: HTMLNvTableElement;\n\n private readonly templateCache = new Map<string, Element>();\n private readonly headerTemplateCache = new Map<string, Element>();\n\n /****************************************************************************/\n //#region STATES\n\n @State()\n parsedColumns: ColumnConfig[] = [];\n\n @State()\n parsedData: any[] = [];\n\n @State()\n private table: Table = null;\n\n //#endregion STATES\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Data to be displayed in the table\n */\n @Prop({ reflect: true })\n readonly data: any[] = [];\n\n /**\n * Configuration of the columns of the table\n */\n @Prop({ reflect: true })\n readonly columnsConfig: ColumnConfig[] = [];\n\n /**\n * Data to be displayed in the table\n */\n @Prop({ reflect: true })\n readonly dataJson?: string;\n\n /**\n * Configuration of the columns of the table\n */\n @Prop({ reflect: true })\n readonly columnsConfigJson?: string;\n\n /**\n * Fallback value to be displayed when data is not available\n */\n @Prop({ reflect: true })\n readonly fallbackValue: string = 'N/A';\n\n /**\n * Message to be displayed when no data is available\n */\n @Prop({ reflect: true })\n readonly noDataMessage: string = 'No data available';\n\n /**\n * The message to display when there are no columns or data available.\n * @default 'No data or columns available to display.'\n */\n @Prop({ reflect: true })\n readonly noColumnsNoDataMessage: string =\n 'No data or columns available to display.';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Caches templates for cells and headers upfront to improve performance.\n */\n private cacheTemplates() {\n const columns = Array.from(this.el.querySelectorAll('nv-tablecolumn'));\n\n columns.forEach((col: HTMLNvTablecolumnElement) => {\n const key = col.name;\n const cellSlot = col.querySelector('[slot=\"cell\"]');\n\n if (cellSlot) {\n const element = deepCopyElement(cellSlot as HTMLElement);\n this.templateCache.set(key, element);\n }\n\n const headerSlot = col.querySelector('[slot=\"header\"]');\n\n if (headerSlot) {\n const element = deepCopyElement(headerSlot as HTMLElement);\n this.headerTemplateCache.set(key, element);\n } else {\n const header = col.header;\n\n if (header) {\n const headerDiv = document.createElement('div');\n headerDiv.textContent = header;\n this.headerTemplateCache.set(key, headerDiv);\n }\n }\n });\n }\n\n private parseDataAndColumns() {\n if (this.dataJson) {\n this.parseJsonData(this.dataJson);\n } else if (this.data && this.data.length > 0) {\n this.parseDataArray(this.data, this.parsedData);\n }\n\n if (this.columnsConfigJson) {\n this.parseJsonColumns(this.columnsConfigJson, this.parsedColumns);\n } else if (this.columnsConfig && this.columnsConfig.length > 0) {\n this.parseColumnsArray(this.columnsConfig, this.parsedColumns);\n } else if (this.headerTemplateCache.size > 0) {\n const headerKeys = Array.from(this.headerTemplateCache.keys());\n const arrayColumnsConfig = headerKeys.map<ColumnConfig>(key => ({\n ...{}, // Ensure no prototype inheritance\n name: key,\n header: key ? key.charAt(0).toUpperCase() + key.slice(1) : '',\n }));\n\n this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);\n } else if (this.parsedData.length > 0) {\n const firstRow = this.parsedData[0];\n const arrayColumnsConfig = Object.keys(firstRow).map<ColumnConfig>(\n key => ({\n name: key,\n header: key.charAt(0).toUpperCase() + key.slice(1),\n }),\n );\n\n this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);\n }\n }\n\n private deepEqual(a: any, b: any): boolean {\n return JSON.stringify(a) === JSON.stringify(b);\n }\n\n /**\n * Parses the data array and sets the state accordingly\n * @param {any[]} newValue - New value of the data array\n * @param {any[]} oldValue - Old value of the data array\n * @returns {void}\n */\n private parseDataArray(newValue: any[], oldValue: any[]) {\n // Ensure both are arrays for proper comparison\n const safeNewValue = Array.isArray(newValue) ? newValue : [];\n const safeOldValue = Array.isArray(oldValue) ? oldValue : [];\n\n if (this.deepEqual(safeNewValue, safeOldValue)) {\n return; // Deep comparison\n }\n\n this.parsedData = Array.isArray(newValue) ? newValue : [];\n }\n\n /**\n * Parses the columns array and sets the state accordingly\n * @param {ColumnConfig[]} newValue - New value of the columns array\n * @param {ColumnConfig[]} oldValue - Old value of the columns array\n * @returns {void}\n */\n private parseColumnsArray(\n newValue: ColumnConfig[] | null | undefined,\n oldValue: ColumnConfig[] | null | undefined,\n ) {\n // Ensure both are arrays for proper comparison\n const safeNewValue = Array.isArray(newValue) ? newValue : [];\n const safeOldValue = Array.isArray(oldValue) ? oldValue : [];\n\n // Use a proper deep comparison function (e.g., Lodash's isEqual)\n if (this.deepEqual(safeNewValue, safeOldValue)) {\n return;\n }\n\n // Assign only after confirming changes\n this.parsedColumns = safeNewValue;\n }\n\n private initializeTable() {\n // Clear the previous table instance (if any)\n this.table = null;\n\n if (this.parsedColumns.length > 0) {\n this.table = {\n columns: this.parsedColumns,\n data: this.getTableData(),\n };\n } else {\n this.table = null;\n }\n }\n\n private getTableData(): any[] {\n if (\n this.parsedData &&\n Array.isArray(this.parsedData) &&\n this.parsedData.length > 0\n ) {\n return [...this.parsedData];\n } else {\n return [];\n }\n }\n\n // Helper function to get nested property value\n private replaceKeyWithValue(obj: any, path: string) {\n return (\n path\n .split('.')\n .reduce(\n (acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined),\n obj,\n ) ?? this.fallbackValue\n );\n }\n\n private renderTemplate(template: Element | undefined, row: any) {\n if (!template) {\n return null;\n }\n\n // Handle <template> elements correctly\n const templateContent =\n template instanceof HTMLTemplateElement ? template.content : template;\n const element = deepCopyElement(templateContent as HTMLElement);\n\n // Replace placeholders in text content, attributes, and properties\n element.querySelectorAll('*').forEach(el => {\n // Replace placeholders in text content\n this.replacePlaceholdersTextContent(el, row);\n\n // Replace placeholders in attributes\n this.replacePlaceholdersAttributes(el, row);\n\n // Replace placeholders in properties\n this.replacePlaceholdersProperties(el, row);\n });\n\n // Handle `data-bind-event`\n element.querySelectorAll('[data-bind-event]').forEach(el => {\n const bindEvent = el.getAttribute('data-bind-event') || '';\n const splitted = bindEvent.split(':');\n\n if (!bindEvent.includes(':') || splitted.length < 2) {\n console.warn('Invalid data-bind-event format:', bindEvent);\n return;\n }\n\n const eventType = splitted[0];\n const keyAction = splitted[1];\n const details = splitted.length > 2 ? splitted[2] : null;\n\n el.addEventListener(eventType, () => {\n const keys = details?.split(',') ?? [];\n\n // Convert keys into a single object instead of an array of objects\n const keyValue = keys.reduce((acc, key) => {\n acc[key] = row?.[key];\n return acc;\n }, {} as Record<string, any>);\n\n const action: ActionEvent = { keyAction, details: keyValue };\n\n this.action.emit(action);\n });\n });\n\n // Ensure Web Components are properly connected\n setTimeout(() => {\n element.querySelectorAll('*').forEach(child => {\n if (typeof (child as any).connectedCallback === 'function') {\n (child as any).connectedCallback();\n }\n });\n }, 0);\n\n return (\n <div\n ref={el => {\n if (el) {\n el.innerHTML = ''; // Remove existing content\n el.appendChild(element); // Append new element\n }\n }}\n ></div>\n );\n }\n\n private replacePlaceholdersTextContent(element: Element, row: any) {\n // ✅ Replace placeholders in text content\n element.childNodes.forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n node.textContent = node.textContent.replace(/__([\\w.]+)__/g, (_, key) =>\n this.replaceKeyWithValue(row, key),\n );\n }\n });\n }\n\n private replacePlaceholdersAttributes(element: Element, row: any) {\n // ✅ Replace placeholders in attributes\n Array.from(element.attributes).forEach(attr => {\n if (attr.value.includes('__')) {\n attr.value = attr.value.replace(/__([\\w.]+)__/g, (_, key) =>\n this.replaceKeyWithValue(row, key),\n );\n }\n });\n }\n\n private replacePlaceholdersProperties(element: Element, row: any) {\n // ✅ Dynamically extract relevant properties\n const properties = new Set<string>();\n\n // Collect only own enumerable properties\n Object.keys(element).forEach(key => properties.add(key));\n\n // Collect inherited properties from prototypes (HTMLElement -> Element -> Node)\n let proto = Object.getPrototypeOf(element);\n while (proto && proto !== HTMLElement.prototype) {\n Object.keys(proto).forEach(key => properties.add(key));\n proto = Object.getPrototypeOf(proto);\n }\n\n // ✅ Filter and copy only non-function properties and exclude irrelevant ones\n properties.forEach(prop => {\n if (\n typeof (element as any)[prop] !== 'function' && // Ignore methods\n !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)\n !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props\n ) {\n try {\n const value = element[prop];\n\n // ✅ Replace placeholders only if the value is a string\n if (typeof value === 'string' && value.includes('__')) {\n element[prop] = value.replace(/__([\\w.]+)__/g, (_, key: string) =>\n this.replaceKeyWithValue(row, key),\n ) as any; // ✅ TypeScript safe\n }\n } catch (error) {\n console.warn(`Could not assign property ${prop}:`, error.message);\n }\n }\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('columnsConfig')\n parseColumns(newValue: ColumnConfig[], oldValue: ColumnConfig[]) {\n this.parseColumnsArray(newValue, oldValue);\n }\n\n @Watch('columnsConfigJson')\n parseJsonColumns(newValue: string | undefined, oldValue: ColumnConfig[]) {\n try {\n const newItems = newValue ? JSON.parse(newValue) : [];\n\n this.parseColumnsArray(newItems, oldValue);\n } catch (e) {\n console.error('Invalid JSON format for columnsConfigJson:', e.message);\n this.parsedColumns = [];\n }\n }\n\n @Watch('data')\n parseData(newValue: any[], oldValue: any[]) {\n this.parseDataArray(newValue, oldValue);\n }\n\n @Watch('dataJson')\n parseJsonData(newValue: string | undefined) {\n try {\n const newItems = newValue ? JSON.parse(newValue) : [];\n\n this.parseDataArray(newItems, this.parsedData);\n } catch (e) {\n console.error('Invalid JSON format for dataJson:', e.message);\n this.parsedData = [];\n }\n }\n\n @Watch('parsedColumns')\n @Watch('parsedData')\n handleParsedChange() {\n this.initializeTable();\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.cacheTemplates();\n\n this.parseDataAndColumns();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n @Event()\n action: EventEmitter<ActionEvent>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n const headerGroups =\n !this.table || this.table === undefined || this.parsedColumns.length === 0\n ? []\n : this.table.columns;\n\n const rows =\n !this.table || this.table === undefined || this.parsedData.length === 0\n ? []\n : this.table.data;\n\n return (\n <Host>\n <div class=\"hidden\">\n <slot></slot>\n </div>\n\n <slot name=\"before\"></slot>\n\n {this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (\n <div class=\"no-data\">{this.noColumnsNoDataMessage}</div>\n ) : (\n <table class=\"table\">\n {this.parsedColumns.length > 0 && headerGroups.length > 0 && (\n <thead class=\"table-header\">\n <tr>\n {headerGroups &&\n headerGroups.map(col => {\n return (\n <th key={col.name}>\n {this.renderTemplate(\n this.headerTemplateCache.get(col.name),\n {},\n ) || col.header}\n </th>\n );\n })}\n </tr>\n </thead>\n )}\n <tbody class=\"table-body\">\n {!rows || rows.length === 0 ? (\n <tr>\n <td colSpan={headerGroups.length || 12} class=\"no-data\">\n {this.noDataMessage}\n </td>\n </tr>\n ) : (\n rows.map(row => (\n <tr key={JSON.stringify(row)}>\n {headerGroups.map(col => (\n <td>\n {this.renderTemplate(\n this.templateCache.get(col.name),\n row,\n ) ||\n (row[col.name] ?? this.fallbackValue)}\n </td>\n ))}\n </tr>\n ))\n )}\n </tbody>\n </table>\n )}\n\n <slot name=\"after\"></slot>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"],"mappings":"sGAAA,MAAMA,EAAa,sxBACnB,MAAAC,EAAeD,E,MCwCFE,EAAO,MALpB,WAAAC,CAAAC,G,yCAQmBC,KAAAC,cAAgB,IAAIC,IACpBF,KAAAG,oBAAsB,IAAID,IAM3CF,KAAAI,cAAgC,GAGhCJ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ACVvI,KAAKI,cAAcgC,OAAS,GAAKgG,EAAahG,OAAS,GACtD6D,EAAA,SAAOsC,MAAM,gBACXtC,EAAA,UACGmC,GACCA,EAAavF,KAAI1B,GAEb8E,EAAA,MAAI7E,IAAKD,EAAIE,MACVrB,KAAKwE,eACJxE,KAAKG,oBAAoBqI,IAAIrH,EAAIE,MACjC,KACGF,EAAIS,YAOvBqE,EAAA,SAAOsC,MAAM,eACTF,GAAQA,EAAKjG,SAAW,EACxB6D,EAAA,UACEA,EAAA,MAAIwC,QAASL,EAAahG,QAAU,GAAImG,MAAM,WAC3CvI,KAAKU,gBAIV2H,EAAKxF,KAAI6B,GACPuB,EAAA,MAAI7E,IAAKmC,KAAKC,UAAUkB,IACrB0D,EAAavF,KAAI1B,I,MAAO,OACvB8E,EAAA,UACGjG,KAAKwE,eACJxE,KAAKC,cAAcuI,IAAIrH,EAAIE,MAC3BqD,MAECP,EAAAO,EAAIvD,EAAIE,SAAK,MAAA8C,SAAA,EAAAA,EAAInE,KAAKS,eACtB,SASnBwF,EAAA,QAAA7E,IAAA,2CAAMC,KAAK,U","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as e,c as o,h as i,a as t,g as r}from"./p-ab002252.js";import{v as n}from"./p-f5ff676c.js";const d='nv-fielddropdown{--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}nv-fielddropdown[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-fielddropdown[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)}nv-fielddropdown[required]:not([required=false]) label::after{content:"*";color:var(--components-form-text-required);font-weight:700}nv-fielddropdown[hidden]:not([hidden=false]) label{display:none}nv-fielddropdown 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-fielddropdown nv-popover{width:100%;display:block}nv-fielddropdown 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-fielddropdown nv-popover [slot=content]{gap:var(--list-dropdown-gap-y);display:flex;flex-direction:column}nv-fielddropdown nv-popover hr{color:var(--components-list-dropdown-separator)}nv-fielddropdown .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fielddropdown .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;position:relative;width:100%;min-height:40px}nv-fielddropdown .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddropdown .input-container:focus-within,nv-fielddropdown .input-container:focus-within:hover,nv-fielddropdown .input-container:focus,nv-fielddropdown .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-fielddropdown .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-fielddropdown .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddropdown .input-container input[type=search]::-webkit-search-decoration,nv-fielddropdown .input-container input[type=search]::-webkit-search-cancel-button,nv-fielddropdown .input-container input[type=search]::-webkit-search-results-button,nv-fielddropdown .input-container input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}nv-fielddropdown .input-container input,nv-fielddropdown .input-container 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)}nv-fielddropdown .input-container input:focus,nv-fielddropdown .input-container p.non-filterable-text:focus{outline:none}nv-fielddropdown .input-container input::placeholder,nv-fielddropdown .input-container 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-fielddropdown .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddropdown .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddropdown .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddropdown .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-fielddropdown .non-filterable-text span{display:inline-block;width:100%;overflow:hidden;text-overflow:ellipsis}nv-fielddropdown .description{align-self:stretch;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-fielddropdown .error-description{align-self:stretch;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(i){e(this,i);this.valueChanged=o(this,"valueChanged",7);this.dropdownItemSelected=o(this,"dropdownItemSelected",7);this.inputId=n();this.open=false;this.autocomplete="off";this.required=false;this.error=false;this.readonly=false;this.disabled=false;this.emptyResult="No results found";this.filterable=false;this.autofocus=false;this.filterText="";this.selectedValues=new Set;this.handleInputContainerClick=e=>{if(this.disabled||this.readonly){return}const o=e.target;if(o.tagName==="P"||o.tagName==="SPAN"){this.open=true;const e=this.el.querySelector(".input-container");if(e){e.classList.add("focus-within");const o=()=>{e.classList.remove("focus-within")};this.popoverElement.addEventListener("hide",o)}}};this.handleInput=e=>{if(!this.filterable)return;if(this.disabled||this.readonly){return}const o=e.target;this.open=true;this.filterText=o.value.toLowerCase();this.filterItems()};this.handleInputFocus=()=>{if(this.disabled||this.readonly)return;this.open=true};this.togglePopover=()=>{if(this.disabled||this.readonly)return;this.open=!this.open};this.getSelectedLabel=()=>{var e,o,i,t,r,n;if(!this.value)return"";if(((e=this.options)===null||e===void 0?void 0:e.length)>1){const e=this.options.find((e=>e.value===this.value));return(i=(o=e===null||e===void 0?void 0:e.label)!==null&&o!==void 0?o:e===null||e===void 0?void 0:e.value)!==null&&i!==void 0?i:this.value}const d=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const s=d.find((e=>e.value===this.value));const l=s?(n=(t=s.label)!==null&&t!==void 0?t:(r=s.textContent)===null||r===void 0?void 0:r.trim())!==null&&n!==void 0?n:s.value:"";return l};this.clearFilter=()=>{if(!this.filterable)return;this.filterText="";this.inputElement.value=this.getSelectedLabel();this.inputElement.focus();this.filterItems()}}handleDropdownItemSelected(e){if(this.disabled||this.readonly)return;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));o.forEach((o=>{if(o!==e.target){o.removeAttribute("selected")}else{o.setAttribute("selected","true")}}));this.clearFilter();this.value=e.detail.value;this.open=false}handleOpenChanged(e){this.open=e.detail}watchValueHandler(e){this.valueChanged.emit(e)}handleOptionsChange(e){var o;if(!e)return;if(!this.value){const i=e.find((e=>e.selected));this.value=(o=i===null||i===void 0?void 0:i.value)!==null&&o!==void 0?o:"";this.updateSelectedItem(this.value)}}handleBlur(e){const o=e.relatedTarget;if(!(o instanceof Node)||!this.el.contains(o)){this.open=false;if(this.inputElement){this.filterText="";this.inputElement.value=this.getSelectedLabel();setTimeout((()=>{this.filterItems()}),200)}}}handleKeyDown(e){if(!this.el)return;if(!this.open){if(e.key==="ArrowDown"){this.open=true;e.preventDefault();return}return}const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem:not([disabled]):not([hidden])"));let i=o.findIndex((e=>e.classList.contains("highlighted")));if(e.key==="ArrowDown"){e.preventDefault();i=(i+1)%o.length;this.updateHighlightedItem(o,i)}else if(e.key==="ArrowUp"){e.preventDefault();i=(i-1+o.length)%o.length;this.updateHighlightedItem(o,i)}else if(e.key==="Escape"){e.preventDefault();this.open=false}}async getFilterText(){return this.filterText}filterItems(){var e;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const i=this.el.querySelector("nv-fielddropdownitem[data-empty]");if(i){i.remove()}let t=false;o.forEach((e=>{var o,i;const r=((o=e.textContent)===null||o===void 0?void 0:o.toLowerCase())||"";const n=((i=e.value)===null||i===void 0?void 0:i.toLowerCase())||"";const d=n.includes(this.filterText)||r.includes(this.filterText);if(d)e.removeAttribute("hidden");else e.setAttribute("hidden","");if(d){t=true}}));if(!t){const o=document.createElement("nv-fielddropdownitem");o.setAttribute("data-empty","true");o.setAttribute("disabled","true");o.textContent=this.emptyResult;(e=this.el.querySelector('ul[slot="content"]'))===null||e===void 0?void 0:e.appendChild(o)}}resetFilter(){const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));e.forEach((e=>{e.style.display=""}))}updateHighlightedItem(e,o){e.forEach(((e,i)=>{if(i===o){e.classList.add("highlighted");e.focus();e.scrollIntoView({block:"nearest"})}else{e.classList.remove("highlighted")}}))}updateSelectedItem(e){if(!e)return;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const i=o.find((o=>{var i;const t=o.getAttribute("label");const r=o.getAttribute("value");const n=(i=o.textContent)===null||i===void 0?void 0:i.trim();return t===e||r===e||n===e}));o.forEach((e=>{if(e===i){e.setAttribute("selected","")}else{e.removeAttribute("selected")}}))}componentWillLoad(){this.resetFilter();if(this.filterable&&this.filterText){this.filterItems()}if(this.options){this.handleOptionsChange(this.options)}}componentDidLoad(){if(this.value){this.updateSelectedItem(this.value)}if(this.inputElement){this.inputElement.value=this.getSelectedLabel()}}render(){var e;return i(t,{key:"6c23d4cfd361e1f40a2181db66692eb0d6326bfe",role:"combobox","aria-expanded":this.open.toString(),"aria-haspopup":"listbox","aria-label":this.label},(this.label||this.el.querySelector('[slot="label"]'))&&i("label",{key:"db9a30ece9e669c70b18193b3cc7d14967a5e071",htmlFor:this.inputId},i("slot",{key:"b7a721b25b82646d34ce141526775f24a9849f4b",name:"label"},this.label)),i("nv-popover",{key:"724756cb69b4b6ef8837e6f7f53a65eb42a43b5e",ref:e=>this.popoverElement=e,triggerMode:"controlled",placement:"bottom-start",open:this.open},i("div",{key:"0092cd2b78234ec2e0cdc70433246a2985b7e57f",class:"input-wrapper",slot:"trigger"},i("slot",{key:"519c1a407c8309861673b9eadb723edb0c70ae68",name:"before-input"}),i("div",{key:"d88af43846337d9bfd6aeb4f28ab2dc7e56de4e8",class:"input-container",onClick:this.handleInputContainerClick},i("slot",{key:"8e91459d89acbf7a1cde5e75c520b11b109e810d",name:"leading-input"}),this.filterable||this.disabled||this.readonly?i("input",{"data-scope":"focusable",id:this.inputId,type:"search",ref:e=>this.inputElement=e,autofocus:this.autofocus,autocomplete:this.autocomplete,placeholder:this.placeholder,name:this.name,value:this.getSelectedLabel(),required:this.required,disabled:this.disabled,readOnly:this.readonly,onInput:this.handleInput,onFocus:this.handleInputFocus,onClick:this.handleInputFocus,onKeyDown:this.handleKeyDown}):i("p",{"data-scope":"focusable",id:this.inputId,class:"non-filterable-text",onClick:this.handleInputContainerClick,tabIndex:this.disabled?-1:0,onKeyDown:this.handleKeyDown,onFocus:this.handleInputFocus},this.getSelectedLabel()||this.value||this.placeholder),this.filterable&&this.filterText&&this.open&&i("nv-iconbutton",{key:"55efb1100997af6b9b4ee41c489a9e628d36b749",name:"x",size:"md",emphasis:"lower",class:"clear-button",onClick:this.clearFilter,"aria-label":"Clear input"}),this.error&&i("nv-icon",{key:"69cfcac7b21d0e9faf9bad7f306bab187a761758",name:"alert-circle",class:"validation",size:"md"}),i("nv-iconbutton",{key:"5b773edca6a5028eb8cedb42632a9c5b6e8b3d36","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.togglePopover,tabIndex:this.disabled?-1:0})),i("slot",{key:"c225279e1ec938e2fbe672ce02e8d2a79cb7ff1e",name:"after-input"})),i("div",{key:"94905d2f6a0b7faae17540139c0bd2458e4c98ae",slot:"content"},((e=this.options)===null||e===void 0?void 0:e.length)>0?i("ul",null,this.options.map((e=>i("nv-fielddropdownitem",{label:e.label,value:e.value,disabled:e.disabled,selected:e.value===this.value})))):i("slot",{name:"content"}))),(this.description||this.el.querySelector('[slot="description"]'))&&i("div",{key:"5d0b74de616aefa056d17cb70fab0d36ab9b41c3",class:"description"},i("slot",{key:"bab9d8222164d2227c6024ac2bd5675142ccb964",name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&i("div",{key:"58596e0c753e8bb90f9d21432607427b0a029d64",hidden:!this.error,class:"error-description"},i("slot",{key:"6062d632aee6e825cd2d17a22180cb24d66e2864",name:"error-description"},this.errorDescription)))}static get formAssociated(){return true}get el(){return r(this)}static get watchers(){return{value:["watchValueHandler"],options:["handleOptionsChange"]}}};l.style=s;export{l as nv_fielddropdown};
2
- //# sourceMappingURL=p-e1a4f776.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["nvFielddropdownCss","NvFielddropdownStyle0","NvFielddropdown","constructor","hostRef","this","inputId","uuidv4","open","autocomplete","required","error","readonly","disabled","emptyResult","filterable","autofocus","filterText","selectedValues","Set","handleInputContainerClick","event","target","tagName","inputContainer","el","querySelector","classList","add","removeFocusWithin","remove","popoverElement","addEventListener","handleInput","input","value","toLowerCase","filterItems","handleInputFocus","togglePopover","getSelectedLabel","_a","options","length","matchingItem","find","option","_c","_b","label","items","Array","from","querySelectorAll","item","selectedLabel","_f","_d","_e","textContent","trim","clearFilter","inputElement","focus","handleDropdownItemSelected","forEach","removeAttribute","setAttribute","detail","handleOpenChanged","watchValueHandler","newValue","valueChanged","emit","handleOptionsChange","defaultValue","selected","updateSelectedItem","handleBlur","relatedTarget","Node","contains","setTimeout","handleKeyDown","key","preventDefault","currentIndex","findIndex","updateHighlightedItem","getFilterText","existingEmptyItem","hasVisibleItems","shouldShow","includes","emptyItem","document","createElement","appendChild","resetFilter","style","display","index","i","scrollIntoView","block","itemLabel","getAttribute","itemValue","itemText","componentWillLoad","componentDidLoad","render","h","Host","role","toString","htmlFor","name","ref","triggerMode","placement","class","slot","onClick","id","type","e","placeholder","readOnly","onInput","onFocus","onKeyDown","tabIndex","size","emphasis","map","description","errorDescription","hidden"],"sources":["src/components/nv-fielddropdown/styles/nv-fielddropdown.scss?tag=nv-fielddropdown","src/components/nv-fielddropdown/nv-fielddropdown.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n@import '../../../styles/form-field';\n\nnv-fielddropdown {\n @include form-field-variables();\n @include form-field-root();\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']) label {\n @include form-field-label-required();\n }\n\n &[hidden]:not([hidden='false']) label {\n display: none;\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n @include form-field-popover();\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n @include input-wrapper-styles();\n }\n\n .input-container {\n @include form-field-input-container();\n @include input-container-styles();\n\n input[type=\"search\"]::-webkit-search-decoration,\n input[type=\"search\"]::-webkit-search-cancel-button,\n input[type=\"search\"]::-webkit-search-results-button,\n input[type=\"search\"]::-webkit-search-results-decoration {\n -webkit-appearance:none;\n }\n\n input,\n p.non-filterable-text {\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 .non-filterable-text {\n @include non-filterable-text-styles();\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 Host,\n h,\n Element,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot content - Use a <ul></ul> tag for the slot, and place <nv-dropdownitem> elements inside.\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-fielddropdown',\n styleUrl: 'styles/nv-fielddropdown.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFielddropdown {\n @Element() el: HTMLNvFielddropdownElement;\n private inputElement: HTMLInputElement;\n private popoverElement!: HTMLNvPopoverElement;\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 * 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\n * 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. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It's a great way to provide examples or suggestions directly\n * in the field before they start typing.\n * The placeholder is displayed only when the filterable option is enabled.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\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 * State of the dropdown popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\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, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input's value is managed by the component's state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: 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 dropdown\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Display the input field's content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won't be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * The disabled prop lets you turn off the input field so that users can't\n * type in it. When disabled, the field is grayed out and won't respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: 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 dropdown 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 * \"selected\": true,\n * },\n * {\n * \"label\": \"Option 2\",\n * \"value\": \"option2\",\n * }]\n */\n @Prop({ reflect: false })\n readonly 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 disabled */\n disabled?: boolean;\n /** Whether this option is pre-selected */\n selected?: boolean;\n }[];\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 //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n /** The text entered by the user for filtering dropdown items. */\n @State()\n filterText: string = '';\n\n @State()\n selectedValues: Set<string> = new Set();\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 an item is clicked.\n */\n @Event()\n dropdownItemSelected: EventEmitter<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >;\n\n @Listen('dropdownItemSelected')\n handleDropdownItemSelected(\n event: CustomEvent<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >,\n ) {\n if (this.disabled || this.readonly) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n if (item !== event.target) {\n item.removeAttribute('selected');\n } else {\n item.setAttribute('selected', 'true');\n }\n });\n\n this.clearFilter();\n this.value = event.detail.value;\n this.open = false;\n }\n\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n this.open = event.detail; // Update `open` based on the popover state\n }\n\n @Watch('value')\n watchValueHandler(newValue: typeof this.value) {\n this.valueChanged.emit(newValue);\n }\n\n @Watch('options')\n handleOptionsChange(newValue: typeof this.options) {\n if (!newValue) return;\n if (!this.value) {\n const defaultValue = newValue.find(option => option.selected);\n this.value = defaultValue?.value ?? '';\n this.updateSelectedItem(this.value);\n }\n }\n\n @Listen('blur', { capture: true })\n handleBlur(event: FocusEvent) {\n const target = event.relatedTarget;\n if (!(target instanceof Node) || !this.el.contains(target)) {\n this.open = false;\n\n if (this.inputElement) {\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n setTimeout(() => {\n this.filterItems();\n }, 200);\n }\n }\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.el) return;\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 const items = Array.from(\n this.el.querySelectorAll(\n 'nv-fielddropdownitem:not([disabled]):not([hidden])',\n ),\n ) as HTMLNvFielddropdownitemElement[];\n\n let currentIndex = items.findIndex(item =>\n item.classList.contains('highlighted'),\n );\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n currentIndex = (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex = (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.open = false;\n }\n }\n\n //#endregion EVENTS\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 private handleInputContainerClick = (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 // Simulate focus to trigger \"focus-within\" style\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n // Remove the \"focus-within\" class after a delay or when the popover is closed\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n // Or remove the class when the popover is closed\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n private handleInput = (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.open = true;\n this.filterText = input.value.toLowerCase();\n this.filterItems();\n };\n\n /**\n * Filter dropdown items based on the text entered by the user.\n * If no items are found, display a message indicating no results.\n */\n private filterItems() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n // Remove the \"no results found\" item if it exists\n const existingEmptyItem = this.el.querySelector(\n 'nv-fielddropdownitem[data-empty]',\n );\n if (existingEmptyItem) {\n existingEmptyItem.remove();\n }\n\n let hasVisibleItems = false;\n\n // Iterate over all items and adjust their visibility\n items.forEach(item => {\n const textContent = item.textContent?.toLowerCase() || ''; // Get the textual content of the slot\n const value = item.value?.toLowerCase() || ''; // Get the value of the `value` attribute\n\n // Check if the filtered text is present either in the value or in the textual content\n const shouldShow =\n value.includes(this.filterText) ||\n textContent.includes(this.filterText);\n\n if (shouldShow) item.removeAttribute('hidden');\n else item.setAttribute('hidden', '');\n\n if (shouldShow) {\n hasVisibleItems = true;\n }\n });\n\n // If no items are visible, add the \"no results found\" item\n if (!hasVisibleItems) {\n const emptyItem = document.createElement('nv-fielddropdownitem');\n emptyItem.setAttribute('data-empty', 'true');\n emptyItem.setAttribute('disabled', 'true');\n emptyItem.textContent = this.emptyResult;\n this.el.querySelector('ul[slot=\"content\"]')?.appendChild(emptyItem);\n }\n }\n\n /** Reset the filter and make all items visible. */\n private resetFilter() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n item.style.display = '';\n });\n }\n\n private handleInputFocus = () => {\n if (this.disabled || this.readonly) return;\n this.open = true;\n };\n\n private togglePopover = () => {\n if (this.disabled || this.readonly) return;\n this.open = !this.open;\n };\n\n private updateHighlightedItem(\n items: HTMLNvFielddropdownitemElement[],\n index: number,\n ) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.focus();\n item.scrollIntoView({ block: 'nearest' });\n } else {\n item.classList.remove('highlighted');\n }\n });\n }\n\n private getSelectedLabel = (): string => {\n if (!this.value) return '';\n\n if (this.options?.length > 1) {\n const matchingItem = this.options.find(\n option => option.value === this.value,\n );\n return matchingItem?.label ?? matchingItem?.value ?? this.value;\n }\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => item.value === this.value);\n\n const selectedLabel = matchingItem\n ? matchingItem.label ??\n matchingItem.textContent?.trim() ??\n matchingItem.value\n : '';\n\n return selectedLabel;\n };\n\n private clearFilter = () => {\n if (!this.filterable) return;\n\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n this.inputElement.focus();\n this.filterItems();\n };\n\n private updateSelectedItem(value: string) {\n if (!value) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => {\n const itemLabel = item.getAttribute('label');\n const itemValue = item.getAttribute('value');\n const itemText = item.textContent?.trim();\n return itemLabel === value || itemValue === value || itemText === value;\n });\n\n items.forEach(item => {\n if (item === matchingItem) {\n item.setAttribute('selected', '');\n } else {\n item.removeAttribute('selected');\n }\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.resetFilter();\n\n if (this.filterable && this.filterText) {\n this.filterItems();\n }\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n componentDidLoad() {\n if (this.value) {\n this.updateSelectedItem(this.value);\n }\n if (this.inputElement) {\n this.inputElement.value = this.getSelectedLabel();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"combobox\"\n aria-expanded={this.open.toString()}\n aria-haspopup=\"listbox\"\n aria-label={this.label}\n >\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper\" slot=\"trigger\">\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 {this.filterable || this.disabled || this.readonly ? (\n <input\n data-scope=\"focusable\"\n id={this.inputId}\n type=\"search\"\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.getSelectedLabel()}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onFocus={this.handleInputFocus}\n onClick={this.handleInputFocus}\n onKeyDown={this.handleKeyDown}\n />\n ) : (\n <p\n data-scope=\"focusable\"\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClick}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocus}\n >\n {this.getSelectedLabel() || this.value || this.placeholder}\n </p>\n )}\n\n {this.filterable && this.filterText && this.open && (\n <nv-iconbutton\n name=\"x\"\n size=\"md\"\n emphasis=\"lower\"\n class=\"clear-button\"\n onClick={this.clearFilter}\n aria-label=\"Clear input\"\n />\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.togglePopover}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n {this.options?.length > 0 ? (\n <ul>\n {this.options.map(option => (\n <nv-fielddropdownitem\n label={option.label}\n value={option.value}\n disabled={option.disabled}\n selected={option.value === this.value}\n />\n ))}\n </ul>\n ) : (\n <slot name=\"content\"></slot>\n )}\n </div>\n </nv-popover>\n\n {(this.description ||\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 <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"mappings":"oGAAA,MAAMA,EAAqB,qnMAC3B,MAAAC,EAAeD,E,MC+BFE,EAAe,MAN5B,WAAAC,CAAAC,G,gHAqBWC,KAAAC,QAAkBC,IAwC3BF,KAAAG,KAAgB,MASPH,KAAAI,aAA2C,MAe3CJ,KAAAK,SAAoB,MAQpBL,KAAAM,MAAiB,MAgBjBN,KAAAO,SAAoB,MAQpBP,KAAAQ,SAAoB,MAMpBR,KAAAS,YAAsB,mBAMtBT,KAAAU,WAAsB,MAoCtBV,KAAAW,UAAqB,MAQ9BX,KAAAY,WAAqB,GAGrBZ,KAAAa,eAA8B,IAAIC,IAoI1Bd,KAAA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KmI,aACLnI,KAAKoB,GAAGC,cAAc,0BACtBsF,EAAA,OAAA5B,IAAA,2CAAKqC,MAAM,eACTT,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,eAAehH,KAAKmI,eAIjCnI,KAAKoI,kBACLpI,KAAKoB,GAAGC,cAAc,gCACtBsF,EAAA,OAAA5B,IAAA,2CAAKsD,QAASrI,KAAKM,MAAO8G,MAAM,qBAC9BT,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,qBAAqBhH,KAAKoI,mB","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as i,a as s,g as o}from"./p-ab002252.js";import{v as n}from"./p-f5ff676c.js";const r='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}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)}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 .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%;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>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{align-self:stretch;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{align-self:stretch;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=r;const a=class{constructor(o){t(this,o);this.valueChanged=e(this,"valueChanged",7);this.multiselectChange=e(this,"multiselectChange",7);this.inputId=n();this.maxHeight="200px";this.badgeLabel="";this.emptyResult="No results found";this.required=false;this.error=false;this.readonly=false;this.disabled=false;this.autocomplete="off";this.filterable=false;this.open=false;this.selectedValues=[];this.sortedOptions=[];this.filterText="";this.debounceDelay=300;this.isHandlingEscape=false;this.autofocus=false;this.handleBadgeCloseOptions=()=>{this.selectedValues=[];this.multiselectChange.emit(this.selectedValues);const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((t=>{t.checked=false;t.style.display=""}));this.options=this.options.filter((t=>!t.isDivider));this.reorderOptionsContent()};this.handleBadgeCloseSlots=()=>{this.selectedValues=[];this.multiselectChange.emit(this.selectedValues);const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((t=>{t.checked=false;t.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=t=>{if(this.disabled||this.readonly){return}const e=t.target;if(e.tagName==="P"||e.tagName==="SPAN"){this.open=true;const t=this.el.querySelector(".input-container");if(t){t.classList.add("focus-within");const e=()=>{t.classList.remove("focus-within")};this.popoverElement.addEventListener("hide",e)}}};this.handleInputContainerClickSlots=t=>{if(this.disabled||this.readonly){return}const e=t.target;if(e.tagName==="P"||e.tagName==="SPAN"){this.open=true;const t=this.el.querySelector(".input-container");if(t){t.classList.add("focus-within");const e=()=>{t.classList.remove("focus-within")};this.popoverElement.addEventListener("hide",e)}}};this.handleInputOptions=t=>{if(!this.filterable)return;if(this.disabled||this.readonly){return}const e=t.target;this.value=e.value;this.valueChanged.emit(this.value);if(this.debounceTimer){window.clearTimeout(this.debounceTimer)}this.debounceTimer=window.setTimeout((()=>{this.filterText=e.value.toLowerCase();this.filterItemsOption()}),this.debounceDelay)};this.handleInputSlots=t=>{if(!this.filterable)return;if(this.disabled||this.readonly)return;const e=t.target;this.value=e.value;this.valueChanged.emit(this.value);if(this.debounceTimer){window.clearTimeout(this.debounceTimer)}this.debounceTimer=window.setTimeout((()=>{this.filterText=e.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,null,(this.label||this.el.querySelector('[slot="label"]'))&&i("label",{htmlFor:this.inputId},i("slot",{name:"label"},this.label)),i("nv-popover",{ref:t=>this.popoverElement=t,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:t=>this.inputElement=t,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}):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},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:{"max-height":this.maxHeight,"overflow-y":"auto"}},i("ul",{role:"content"},this.options.map((t=>i("nv-fielddropdownitemcheck",{label:t.label,description:t.description,value:t.value,checked:this.selectedValues.includes(t.value),disabled:t.disabled}))),i("hr",{class:"multiselect-divider",style:{display:"none"}})))),this.renderDescriptions());this.renderSlotsMode=()=>i(s,null,(this.label||this.el.querySelector('[slot="label"]'))&&i("label",{htmlFor:this.inputId},i("slot",{name:"label"},this.label)),i("nv-popover",{ref:t=>this.popoverElement=t,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:t=>this.inputElement=t,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}):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},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:{"max-height":this.maxHeight,"overflow-y":"auto"}},i("slot",{name:"content"}))),this.renderDescriptions())}connectedCallback(){document.addEventListener("click",this.handleClickOutside.bind(this))}componentWillLoad(){var t;if(this.options){this.handleOptionsChange(this.options)}if(!this.options){Promise.resolve().then((()=>{const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));this.selectedValues=t.filter((t=>t.hasAttribute("checked"))).map((t=>t.getAttribute("value")||""));requestAnimationFrame((()=>{this.reorderSlotContent()}))}))}if(this.options){this.sortedOptions=[...(t=this.options)!==null&&t!==void 0?t:[]]}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))}handleOpenChanged(t){this.open=t.detail;if(this.open){if(this.filterText){this.filterItems()}}else{this.handlePopoverClose()}if(this.options){this.reorderOptionsContent()}else{this.reorderSlotContent()}}handleItemChecked(t){if(this.disabled||this.readonly){return}const{value:e,checked:i}=t.detail;if(e!==undefined&&e!==null){const t=[...this.selectedValues];const s=t.indexOf(e);if(i&&s===-1){t.push(e)}else if(!i&&s>-1){t.splice(s,1)}if(JSON.stringify(this.selectedValues)!==JSON.stringify(t)){this.selectedValues=t;requestAnimationFrame((()=>{this.multiselectChange.emit(this.selectedValues)}))}}else{console.warn("Received itemChecked event with undefined or null value")}}handleOptionsChange(t){if(!t)return;this.selectedValues=t.filter((t=>t.checked)).map((t=>t.value));this.reorderOptionsContent()}watchValueHandler(){this.setInitialSelection()}handleSlotChange(t){const e=t.target;if(e&&e.name==="content"){requestAnimationFrame((()=>{this.reorderSlotContent()}))}}async getFilterText(){return this.filterText}setInitialSelection(){var t;const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const i=e.find((t=>{var e;return t.getAttribute("label")===this.value||t.getAttribute("value")===this.value||((e=t.textContent)===null||e===void 0?void 0:e.trim())===this.value}));e.forEach((t=>{t.removeAttribute("selected");t.classList.remove("selected")}));if(i){i.setAttribute("selected","true");i.classList.add("selected");this.value=i.getAttribute("label")||i.getAttribute("value")||((t=i.textContent)===null||t===void 0?void 0:t.trim())||"";if(this.inputElement){this.inputElement.value=this.value}}}async resetFilter(){const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((t=>{t.style.display=""}));const e=this.el.querySelector("ul");if(e){const i=e.querySelector("[data-empty]");if(i)i.remove();const s=t.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const o=t.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));if(s.length>0){this.manageDivider(e,s,o)}}}async getSelectedValues(){return this.selectedValues}reorderSlotContent(){if(this.options)return;const t=this.el.querySelector("ul");if(!t)return;t.querySelectorAll("hr.multiselect-divider").forEach((t=>t.remove()));const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck")).filter((t=>t.style.display!=="none"));const i=t.querySelector("[data-empty]");if(i){return}const s=e.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const o=e.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));s.forEach((e=>{t.appendChild(e)}));if(s.length>0&&o.length>0){const e=document.createElement("hr");e.className="multiselect-divider";t.appendChild(e)}o.forEach((e=>{t.appendChild(e)}))}reorderOptionsContent(){const t=this.el.querySelector('ul[role="content"]');if(!t)return;const e=Array.from(t.querySelectorAll("nv-fielddropdownitemcheck")).filter((t=>t.style.display!=="none"));const i=e.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const s=e.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));i.forEach((e=>t.appendChild(e)));s.forEach((e=>t.appendChild(e)));this.manageDivider(t,i,s)}filterItems(){const t=this.el.querySelector("ul");if(!t)return;const e=t.querySelector("[data-empty]");if(e){e.remove()}if(!this.filterText.trim()){if(this.options&&this.options.length>0){const e=Array.from(t.querySelectorAll("nv-fielddropdownitemcheck"));e.forEach((t=>{t.style.display=""}))}else{const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((t=>{t.style.display=""}))}const e=Array.from(t.querySelectorAll("nv-fielddropdownitemcheck"));const i=e.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const s=e.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));this.manageDivider(t,i,s);return}const i=this.normalizeText(this.filterText);let s=false;if(this.options&&this.options.length>0){const e=Array.from(t.querySelectorAll("nv-fielddropdownitemcheck"));e.forEach((t=>{const e=this.options.find((e=>e.value===t.getAttribute("value")));if(e&&!e.isDivider){const o=this.normalizeText(e.label).includes(i)||this.normalizeText(e.value).includes(i);t.style.display=o?"":"none";if(o)s=true}}));const o=e.filter((t=>t.style.display!=="none"));const n=o.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const r=o.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));this.manageDivider(t,n,r)}else{const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((t=>{const e=t.getAttribute("label")||"";const o=t.getAttribute("value")||"";const n=t.textContent||"";const r=this.normalizeText(e).includes(i)||this.normalizeText(o).includes(i)||this.normalizeText(n).includes(i);t.style.display=r?"":"none";if(r)s=true}))}if(!s){const e=document.createElement("li");e.setAttribute("data-empty","true");e.textContent=this.emptyResult;e.classList.add("no-results-message");t.appendChild(e)}this.reorderSlotContent()}filterItemsOption(){const t=this.el.querySelector("ul");if(!t)return;const e=this.normalizeText(this.filterText);let i=false;const s=Array.from(t.querySelectorAll("nv-fielddropdownitemcheck"));if(!this.filterText.trim()){this.removeEmptyMessageOption(t);s.forEach((t=>t.style.display=""));this.reorderOptionsContent();return}s.forEach((t=>{const s=t.getAttribute("label")||"";const o=t.getAttribute("value")||"";const n=this.normalizeText(s).includes(e)||this.normalizeText(o).includes(e);t.style.display=n?"":"none";if(n)i=true}));const o=s.filter((t=>t.style.display!=="none"));const n=o.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const r=o.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));this.manageDivider(t,n,r);if(!i){this.addEmptyMessageOption(t)}else{this.removeEmptyMessageOption(t)}}filterSlotsItems(){if(this.options)return;const t=this.el.querySelector("ul");if(!t)return;const e=t.querySelector("[data-empty]");if(e){e.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((t=>{var e;const o=t.getAttribute("label")||"";const n=t.getAttribute("value")||"";const r=((e=t.textContent)===null||e===void 0?void 0:e.trim())||"";const l=this.normalizeText(o).includes(i)||this.normalizeText(n).includes(i)||this.normalizeText(r).includes(i);t.style.display=l?"":"none";if(l)s=true}));const n=o.filter((t=>t.style.display!=="none"));const r=n.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));this.manageDivider(t,r,n.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||""))));if(!s){const e=document.createElement("li");e.setAttribute("data-empty","true");e.textContent=this.emptyResult;e.classList.add("no-results-message");t.appendChild(e)}}normalizeText(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim()}handleClickOutside(t){if(this.el.contains(t.target)||this.inputElement&&this.inputElement.contains(t.target)){return}this.open=false}async handleKeyDown(t){if(!this.open){if(t.key==="ArrowDown"){this.open=true;if(!this.filterable){requestAnimationFrame((()=>{this.focusFirstItem()}))}t.preventDefault();return}return}const e=Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck:not([style*="display: none"])'));if(e.length===0){console.warn("No visible items found to navigate");return}let i=e.findIndex((t=>t.classList.contains("highlighted")));if(t.key==="ArrowDown"){t.preventDefault();i=i===-1?0:(i+1)%e.length;this.updateHighlightedItem(e,i)}else if(t.key==="ArrowUp"){t.preventDefault();i=i===-1?e.length-1:(i-1+e.length)%e.length;this.updateHighlightedItem(e,i)}else if(t.key==="Enter"&&i>=0){t.preventDefault();const s=e[i];const o=s.hasAttribute("checked");s.checked=!o;s.dispatchEvent(new MouseEvent("click",{view:window,bubbles:true,cancelable:true}))}else if(t.key==="Escape"){t.preventDefault();t.stopPropagation();const e=async()=>{this.isHandlingEscape=true;if(this.options){this.reorderOptionsContent()}else{this.reorderSlotContent()}await new Promise((t=>setTimeout(t,100)));setTimeout((()=>{this.isHandlingEscape=false;this.open=false}),150);if(this.inputElement){this.inputElement.blur()}};await e()}}updateHighlightedItem(t,e){t.forEach(((t,i)=>{if(i===e){t.classList.add("highlighted");t.setAttribute("tabindex","0");t.scrollIntoView({block:"nearest"});const e=t.querySelector("nv-fieldcheckbox");if(e){e.focus()}}else{t.classList.remove("highlighted");t.setAttribute("tabindex","-1")}}))}focusFirstItem(){const t=this.el.querySelector('nv-fielddropdownitemcheck:not([style*="display: none"])');if(t){t.setAttribute("tabindex","0");t.classList.add("highlighted");t.scrollIntoView({block:"nearest"});const e=t.querySelector("nv-fieldcheckbox");if(e){e.focus()}}else{console.warn("No visible first item found to focus")}}addEmptyMessageOption(t){const e=t.querySelector("[data-empty]");if(e)return;const i=document.createElement("li");i.setAttribute("data-empty","true");i.textContent=this.emptyResult;i.classList.add("no-results-message");t.appendChild(i)}removeEmptyMessageOption(t){const e=t.querySelector("[data-empty]");if(e)e.remove()}manageDivider(t,e,i){let s=t.querySelector("hr.multiselect-divider");if(!s){s=document.createElement("hr");s.className="multiselect-divider";t.appendChild(s)}const o=e.length>0&&i.length>0;if(o){const t=e[e.length-1];t.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-e49bbd02.entry.js.map