@nova-design-system/nova-webcomponents 3.0.0-beta.45 → 3.0.0-beta.47

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 (349) hide show
  1. package/dist/cjs/index-9bda5507.js +0 -4
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/native.cjs.js +1 -1
  4. package/dist/cjs/nv-badge_2.cjs.entry.js +4 -4
  5. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
  7. package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
  8. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  9. package/dist/cjs/nv-calendar.cjs.entry.js +48 -19
  10. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  12. package/dist/cjs/nv-datagrid.cjs.entry.js +378 -85
  13. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +5 -1
  15. package/dist/cjs/nv-datagridcolumn.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
  17. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
  18. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
  19. package/dist/cjs/nv-fielddate.cjs.entry.js +5 -5
  20. package/dist/cjs/nv-fielddaterange.cjs.entry.js +4 -4
  21. package/dist/cjs/nv-fielddropdown.cjs.entry.js +15 -35
  22. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  23. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
  24. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +30 -86
  25. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
  27. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  28. package/dist/cjs/nv-fieldpassword.cjs.entry.js +9 -7
  29. package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
  31. package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
  32. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  33. package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
  34. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
  35. package/dist/cjs/nv-fieldtime.cjs.entry.js +9 -9
  36. package/dist/cjs/nv-icon.cjs.entry.js +1 -1
  37. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
  38. package/dist/cjs/nv-menu.cjs.entry.js +18 -44
  39. package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
  40. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  41. package/dist/cjs/nv-popover.cjs.entry.js +1 -1
  42. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  43. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  44. package/dist/cjs/nv-stack.cjs.entry.js.map +1 -1
  45. package/dist/cjs/nv-table.cjs.entry.js +2 -2
  46. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  47. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  48. package/dist/collection/collection-manifest.json +0 -1
  49. package/dist/collection/components/nv-badge/nv-badge.js +4 -3
  50. package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
  51. package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
  52. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
  53. package/dist/collection/components/nv-button/nv-button.js +1 -1
  54. package/dist/collection/components/nv-calendar/nv-calendar.docs.js +0 -9
  55. package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
  56. package/dist/collection/components/nv-calendar/nv-calendar.js +48 -19
  57. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  58. package/dist/collection/components/nv-col/nv-col.js +1 -1
  59. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +560 -63
  60. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
  61. package/dist/collection/components/nv-datagrid/nv-datagrid.js +393 -88
  62. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  63. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +27 -1
  64. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js.map +1 -1
  65. package/dist/collection/components/nv-dialog/nv-dialog.js +1 -1
  66. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
  67. package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
  68. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
  69. package/dist/collection/components/nv-fielddate/nv-fielddate.js +5 -5
  70. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +4 -4
  71. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +8 -8
  72. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  73. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +24 -50
  74. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  75. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
  76. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  77. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +6 -6
  78. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
  79. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +37 -103
  80. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  81. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
  82. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
  83. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +9 -7
  84. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
  85. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  86. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
  87. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
  88. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
  89. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  90. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
  91. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  92. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  93. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  94. package/dist/collection/components/nv-menu/nv-menu.docs.js +3 -3
  95. package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
  96. package/dist/collection/components/nv-menu/nv-menu.js +37 -65
  97. package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
  98. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  99. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  100. package/dist/collection/components/nv-row/nv-row.js +1 -1
  101. package/dist/collection/components/nv-stack/nv-stack.docs.js +7 -6
  102. package/dist/collection/components/nv-stack/nv-stack.docs.js.map +1 -1
  103. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  104. package/dist/collection/components/nv-stack/nv-stack.js.map +1 -1
  105. package/dist/collection/components/nv-table/nv-table.js +2 -2
  106. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  107. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  108. package/dist/components/nv-alert.js +1 -1
  109. package/dist/components/nv-avatar.js +1 -1
  110. package/dist/components/nv-badge.js +1 -1
  111. package/dist/components/nv-breadcrumb.js +3 -3
  112. package/dist/components/nv-breadcrumbs.js +1 -1
  113. package/dist/components/nv-button.js +1 -1
  114. package/dist/components/nv-calendar.js +1 -1
  115. package/dist/components/nv-col.js +1 -1
  116. package/dist/components/nv-datagrid.js +386 -87
  117. package/dist/components/nv-datagrid.js.map +1 -1
  118. package/dist/components/nv-datagridcolumn.js +7 -2
  119. package/dist/components/nv-datagridcolumn.js.map +1 -1
  120. package/dist/components/nv-dialog.js +6 -6
  121. package/dist/components/nv-dialogfooter.js +1 -1
  122. package/dist/components/nv-dialogheader.js +1 -1
  123. package/dist/components/nv-fieldcheckbox.js +1 -1
  124. package/dist/components/nv-fielddate.js +12 -12
  125. package/dist/components/nv-fielddaterange.js +11 -11
  126. package/dist/components/nv-fielddropdown.js +22 -45
  127. package/dist/components/nv-fielddropdown.js.map +1 -1
  128. package/dist/components/nv-fielddropdownitem.js +1 -1
  129. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  130. package/dist/components/nv-fieldmultiselect.js +40 -100
  131. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  132. package/dist/components/nv-fieldnumber.js +6 -6
  133. package/dist/components/nv-fieldnumber.js.map +1 -1
  134. package/dist/components/nv-fieldpassword.js +12 -10
  135. package/dist/components/nv-fieldpassword.js.map +1 -1
  136. package/dist/components/nv-fieldradio.js +3 -3
  137. package/dist/components/nv-fieldselect.js +8 -8
  138. package/dist/components/nv-fieldselect.js.map +1 -1
  139. package/dist/components/nv-fieldtext.js +4 -4
  140. package/dist/components/nv-fieldtextarea.js +3 -3
  141. package/dist/components/nv-fieldtime.js +13 -13
  142. package/dist/components/nv-icon.js +1 -1
  143. package/dist/components/nv-iconbutton.js +1 -1
  144. package/dist/components/nv-loader.js +1 -1
  145. package/dist/components/nv-menu.js +23 -52
  146. package/dist/components/nv-menu.js.map +1 -1
  147. package/dist/components/nv-menuitem.js +1 -1
  148. package/dist/components/nv-popover.js +1 -1
  149. package/dist/components/nv-row.js +1 -1
  150. package/dist/components/nv-stack.js +1 -1
  151. package/dist/components/nv-stack.js.map +1 -1
  152. package/dist/components/nv-table.js +2 -2
  153. package/dist/components/nv-toggle.js +2 -2
  154. package/dist/components/nv-tooltip.js +1 -1
  155. package/dist/components/{p-4c6d8df7.js → p-02752770.js} +2 -2
  156. package/dist/components/{p-4c6d8df7.js.map → p-02752770.js.map} +1 -1
  157. package/dist/components/{p-3a3ba5b1.js → p-150daf68.js} +2 -2
  158. package/dist/components/{p-3a3ba5b1.js.map → p-150daf68.js.map} +1 -1
  159. package/dist/components/{p-ef255589.js → p-2012b8ba.js} +3 -3
  160. package/dist/components/{p-ef255589.js.map → p-2012b8ba.js.map} +1 -1
  161. package/dist/components/{p-103756d6.js → p-2d9ba7d3.js} +3 -3
  162. package/dist/components/{p-103756d6.js.map → p-2d9ba7d3.js.map} +1 -1
  163. package/dist/components/{p-0f59f38e.js → p-373926aa.js} +5 -5
  164. package/dist/components/p-373926aa.js.map +1 -0
  165. package/dist/components/{p-8ea5e3c0.js → p-4d3ec142.js} +3 -3
  166. package/dist/components/{p-8ea5e3c0.js.map → p-4d3ec142.js.map} +1 -1
  167. package/dist/components/{p-78b00756.js → p-591730e7.js} +2 -2
  168. package/dist/components/{p-78b00756.js.map → p-591730e7.js.map} +1 -1
  169. package/dist/components/{p-b5821dbb.js → p-6c364a23.js} +5 -5
  170. package/dist/components/{p-b5821dbb.js.map → p-6c364a23.js.map} +1 -1
  171. package/dist/components/{p-aeeb5b1c.js → p-a30b55fc.js} +2 -2
  172. package/dist/components/{p-aeeb5b1c.js.map → p-a30b55fc.js.map} +1 -1
  173. package/dist/components/{p-e46c2e31.js → p-b7b78e64.js} +2 -2
  174. package/dist/components/{p-e46c2e31.js.map → p-b7b78e64.js.map} +1 -1
  175. package/dist/components/{p-3561c093.js → p-c14f6b8e.js} +3 -3
  176. package/dist/components/{p-3561c093.js.map → p-c14f6b8e.js.map} +1 -1
  177. package/dist/components/{p-3b096098.js → p-dc3faba3.js} +4 -4
  178. package/dist/components/{p-3b096098.js.map → p-dc3faba3.js.map} +1 -1
  179. package/dist/components/{p-933d4d06.js → p-e00cbb8a.js} +5 -5
  180. package/dist/components/{p-933d4d06.js.map → p-e00cbb8a.js.map} +1 -1
  181. package/dist/components/{p-78e0e7b0.js → p-f331117c.js} +53 -24
  182. package/dist/components/p-f331117c.js.map +1 -0
  183. package/dist/components/{p-863974b2.js → p-f4d86795.js} +3 -3
  184. package/dist/components/{p-863974b2.js.map → p-f4d86795.js.map} +1 -1
  185. package/dist/esm/index-1fb7a9a6.js +0 -4
  186. package/dist/esm/loader.js +1 -1
  187. package/dist/esm/native.js +1 -1
  188. package/dist/esm/nv-badge_2.entry.js +4 -4
  189. package/dist/esm/nv-badge_2.entry.js.map +1 -1
  190. package/dist/esm/nv-breadcrumb.entry.js +1 -1
  191. package/dist/esm/nv-breadcrumbs.entry.js +1 -1
  192. package/dist/esm/nv-button.entry.js +1 -1
  193. package/dist/esm/nv-calendar.entry.js +48 -19
  194. package/dist/esm/nv-calendar.entry.js.map +1 -1
  195. package/dist/esm/nv-col.entry.js +1 -1
  196. package/dist/esm/nv-datagrid.entry.js +378 -85
  197. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  198. package/dist/esm/nv-datagridcolumn.entry.js +5 -1
  199. package/dist/esm/nv-datagridcolumn.entry.js.map +1 -1
  200. package/dist/esm/nv-dialog.entry.js +1 -1
  201. package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
  202. package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
  203. package/dist/esm/nv-fielddate.entry.js +5 -5
  204. package/dist/esm/nv-fielddaterange.entry.js +4 -4
  205. package/dist/esm/nv-fielddropdown.entry.js +15 -35
  206. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  207. package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
  208. package/dist/esm/nv-fieldmultiselect.entry.js +30 -86
  209. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  210. package/dist/esm/nv-fieldnumber.entry.js +3 -3
  211. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  212. package/dist/esm/nv-fieldpassword.entry.js +9 -7
  213. package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
  214. package/dist/esm/nv-fieldradio.entry.js +3 -3
  215. package/dist/esm/nv-fieldselect.entry.js +5 -5
  216. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  217. package/dist/esm/nv-fieldtext.entry.js +3 -3
  218. package/dist/esm/nv-fieldtextarea.entry.js +3 -3
  219. package/dist/esm/nv-fieldtime.entry.js +9 -9
  220. package/dist/esm/nv-icon.entry.js +1 -1
  221. package/dist/esm/nv-iconbutton_2.entry.js +2 -2
  222. package/dist/esm/nv-menu.entry.js +18 -44
  223. package/dist/esm/nv-menu.entry.js.map +1 -1
  224. package/dist/esm/nv-menuitem.entry.js +1 -1
  225. package/dist/esm/nv-popover.entry.js +1 -1
  226. package/dist/esm/nv-row.entry.js +1 -1
  227. package/dist/esm/nv-stack.entry.js +1 -1
  228. package/dist/esm/nv-stack.entry.js.map +1 -1
  229. package/dist/esm/nv-table.entry.js +2 -2
  230. package/dist/esm/nv-toggle.entry.js +2 -2
  231. package/dist/esm/nv-tooltip.entry.js +1 -1
  232. package/dist/native/native.css +1 -1
  233. package/dist/native/native.esm.js +1 -1
  234. package/dist/native/native.esm.js.map +1 -1
  235. package/dist/native/p-0245863d.entry.js +2 -0
  236. package/dist/native/{p-19fd6594.entry.js → p-0ee428d5.entry.js} +2 -2
  237. package/dist/native/p-0ee428d5.entry.js.map +1 -0
  238. package/dist/native/{p-c10e5113.entry.js → p-244f56ac.entry.js} +2 -2
  239. package/dist/native/p-2691e02d.entry.js +2 -0
  240. package/dist/native/{p-31184fdd.entry.js → p-37f0210e.entry.js} +2 -2
  241. package/dist/native/{p-31184fdd.entry.js.map → p-37f0210e.entry.js.map} +1 -1
  242. package/dist/native/{p-162f4840.entry.js → p-39bb95ff.entry.js} +2 -2
  243. package/dist/native/{p-abeda2cf.entry.js → p-4ae26462.entry.js} +2 -2
  244. package/dist/native/p-4d9c4618.entry.js +2 -0
  245. package/dist/native/p-4d9c4618.entry.js.map +1 -0
  246. package/dist/native/{p-314d2b34.entry.js → p-59e0bd2b.entry.js} +2 -2
  247. package/dist/native/{p-314d2b34.entry.js.map → p-59e0bd2b.entry.js.map} +1 -1
  248. package/dist/native/{p-e6904ae4.entry.js → p-5c00f092.entry.js} +2 -2
  249. package/dist/native/p-63e6aed3.entry.js +2 -0
  250. package/dist/native/p-63e6aed3.entry.js.map +1 -0
  251. package/dist/native/{p-40f4a6e7.entry.js → p-6b348684.entry.js} +2 -2
  252. package/dist/native/{p-442f04f9.entry.js → p-6ff228da.entry.js} +2 -2
  253. package/dist/native/{p-442f04f9.entry.js.map → p-6ff228da.entry.js.map} +1 -1
  254. package/dist/native/{p-603a99ed.entry.js → p-701b5557.entry.js} +2 -2
  255. package/dist/native/{p-2281d5ef.entry.js → p-7f5eb2ac.entry.js} +2 -2
  256. package/dist/native/{p-f5e0d5c5.entry.js → p-84a73e2a.entry.js} +2 -2
  257. package/dist/native/p-9135fdf5.entry.js +2 -0
  258. package/dist/native/p-9135fdf5.entry.js.map +1 -0
  259. package/dist/native/p-93dc2f47.entry.js +2 -0
  260. package/dist/native/{p-45577c7f.entry.js.map → p-93dc2f47.entry.js.map} +1 -1
  261. package/dist/native/{p-d9624254.entry.js → p-9a267f16.entry.js} +2 -2
  262. package/dist/native/p-9a267f16.entry.js.map +1 -0
  263. package/dist/native/{p-ecc28398.entry.js → p-9d6431c7.entry.js} +2 -2
  264. package/dist/native/p-9d6431c7.entry.js.map +1 -0
  265. package/dist/native/{p-514101d6.entry.js → p-b094296d.entry.js} +2 -2
  266. package/dist/native/{p-464ef88f.entry.js → p-b2ce83ad.entry.js} +2 -2
  267. package/dist/native/p-bad11367.entry.js +2 -0
  268. package/dist/native/{p-0172095c.entry.js → p-c7b201cd.entry.js} +2 -2
  269. package/dist/native/{p-725e0abd.entry.js → p-d7a76400.entry.js} +2 -2
  270. package/dist/native/p-e1a4f776.entry.js +2 -0
  271. package/dist/native/p-e1a4f776.entry.js.map +1 -0
  272. package/dist/native/p-e49bbd02.entry.js +2 -0
  273. package/dist/native/p-e49bbd02.entry.js.map +1 -0
  274. package/dist/native/{p-17bf1233.entry.js → p-e5de64d5.entry.js} +2 -2
  275. package/dist/native/p-eee01062.entry.js +2 -0
  276. package/dist/native/{p-e197d90b.entry.js.map → p-eee01062.entry.js.map} +1 -1
  277. package/dist/native/{p-332c5d6c.entry.js → p-f6bdc270.entry.js} +2 -2
  278. package/dist/native/{p-3af5bcc1.entry.js → p-f85aca27.entry.js} +2 -2
  279. package/dist/native/{p-7fade532.entry.js → p-fa77a591.entry.js} +2 -2
  280. package/dist/native/{p-f01a34c5.entry.js → p-fb5bddba.entry.js} +2 -2
  281. package/dist/types/components/nv-badge/nv-badge.d.ts +1 -0
  282. package/dist/types/components/nv-calendar/nv-calendar.d.ts +10 -7
  283. package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +38 -2
  284. package/dist/types/components/nv-datagridcolumn/nv-datagridcolumn.d.ts +4 -0
  285. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +17 -23
  286. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +17 -44
  287. package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +2 -0
  288. package/dist/types/components/nv-menu/nv-menu.d.ts +50 -16
  289. package/dist/types/components.d.ts +192 -45
  290. package/dist/types/nova-docs.d.ts +5 -0
  291. package/dist/vscode-data.json +43 -51
  292. package/hydrate/index.js +587 -438
  293. package/hydrate/index.mjs +587 -438
  294. package/package.json +5 -3
  295. package/dist/cjs/nv-base.cjs.entry.js +0 -74
  296. package/dist/cjs/nv-base.cjs.entry.js.map +0 -1
  297. package/dist/collection/components/nv-base/nv-base.docs.js +0 -5
  298. package/dist/collection/components/nv-base/nv-base.docs.js.map +0 -1
  299. package/dist/collection/components/nv-base/nv-base.js +0 -68
  300. package/dist/collection/components/nv-base/nv-base.js.map +0 -1
  301. package/dist/components/nv-base.d.ts +0 -11
  302. package/dist/components/nv-base.js +0 -88
  303. package/dist/components/nv-base.js.map +0 -1
  304. package/dist/components/p-0f59f38e.js.map +0 -1
  305. package/dist/components/p-78e0e7b0.js.map +0 -1
  306. package/dist/esm/nv-base.entry.js +0 -70
  307. package/dist/esm/nv-base.entry.js.map +0 -1
  308. package/dist/native/p-19fd6594.entry.js.map +0 -1
  309. package/dist/native/p-1a46cb52.entry.js +0 -2
  310. package/dist/native/p-1a46cb52.entry.js.map +0 -1
  311. package/dist/native/p-331da074.entry.js +0 -2
  312. package/dist/native/p-42d020a7.entry.js +0 -2
  313. package/dist/native/p-42d020a7.entry.js.map +0 -1
  314. package/dist/native/p-4403e3af.entry.js +0 -2
  315. package/dist/native/p-4403e3af.entry.js.map +0 -1
  316. package/dist/native/p-45577c7f.entry.js +0 -2
  317. package/dist/native/p-46aa1136.entry.js +0 -2
  318. package/dist/native/p-54b6ce07.entry.js +0 -2
  319. package/dist/native/p-54b6ce07.entry.js.map +0 -1
  320. package/dist/native/p-665db087.entry.js +0 -2
  321. package/dist/native/p-942f8e92.entry.js +0 -2
  322. package/dist/native/p-942f8e92.entry.js.map +0 -1
  323. package/dist/native/p-d9624254.entry.js.map +0 -1
  324. package/dist/native/p-e197d90b.entry.js +0 -2
  325. package/dist/native/p-ecc28398.entry.js.map +0 -1
  326. package/dist/native/p-f89b7d06.entry.js +0 -2
  327. package/dist/native/p-f89b7d06.entry.js.map +0 -1
  328. package/dist/types/components/nv-base/nv-base.d.ts +0 -17
  329. package/dist/types/components/nv-base/nv-base.docs.d.ts +0 -5
  330. /package/dist/native/{p-665db087.entry.js.map → p-0245863d.entry.js.map} +0 -0
  331. /package/dist/native/{p-c10e5113.entry.js.map → p-244f56ac.entry.js.map} +0 -0
  332. /package/dist/native/{p-46aa1136.entry.js.map → p-2691e02d.entry.js.map} +0 -0
  333. /package/dist/native/{p-162f4840.entry.js.map → p-39bb95ff.entry.js.map} +0 -0
  334. /package/dist/native/{p-abeda2cf.entry.js.map → p-4ae26462.entry.js.map} +0 -0
  335. /package/dist/native/{p-e6904ae4.entry.js.map → p-5c00f092.entry.js.map} +0 -0
  336. /package/dist/native/{p-40f4a6e7.entry.js.map → p-6b348684.entry.js.map} +0 -0
  337. /package/dist/native/{p-603a99ed.entry.js.map → p-701b5557.entry.js.map} +0 -0
  338. /package/dist/native/{p-2281d5ef.entry.js.map → p-7f5eb2ac.entry.js.map} +0 -0
  339. /package/dist/native/{p-f5e0d5c5.entry.js.map → p-84a73e2a.entry.js.map} +0 -0
  340. /package/dist/native/{p-514101d6.entry.js.map → p-b094296d.entry.js.map} +0 -0
  341. /package/dist/native/{p-464ef88f.entry.js.map → p-b2ce83ad.entry.js.map} +0 -0
  342. /package/dist/native/{p-331da074.entry.js.map → p-bad11367.entry.js.map} +0 -0
  343. /package/dist/native/{p-0172095c.entry.js.map → p-c7b201cd.entry.js.map} +0 -0
  344. /package/dist/native/{p-725e0abd.entry.js.map → p-d7a76400.entry.js.map} +0 -0
  345. /package/dist/native/{p-17bf1233.entry.js.map → p-e5de64d5.entry.js.map} +0 -0
  346. /package/dist/native/{p-332c5d6c.entry.js.map → p-f6bdc270.entry.js.map} +0 -0
  347. /package/dist/native/{p-3af5bcc1.entry.js.map → p-f85aca27.entry.js.map} +0 -0
  348. /package/dist/native/{p-7fade532.entry.js.map → p-fa77a591.entry.js.map} +0 -0
  349. /package/dist/native/{p-f01a34c5.entry.js.map → p-fb5bddba.entry.js.map} +0 -0
@@ -26,7 +26,7 @@ const NvCol = class {
26
26
  /****************************************************************************/
27
27
  //#region RENDER
28
28
  render() {
29
- return (h(Host, { key: 'f9a8dd28d7675648ecb3b9cf4d1e196040f4237f', class: clsx(this.getColSize()) }, h("slot", { key: '94c16b6e2df73cb21263423d378ab5fe285a7859' })));
29
+ return (h(Host, { key: '8f7112dc8ce8896d9e7265741f06b7449dd508df', class: clsx(this.getColSize()) }, h("slot", { key: '3bedff11752d04db2615a5f26d4d910d95dee76c' })));
30
30
  }
31
31
  };
32
32
  NvCol.style = NvColStyle0;
@@ -2953,6 +2953,22 @@ function getCoreRowModel() {
2953
2953
  return rowModel;
2954
2954
  }, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => table._autoResetPageIndex()));
2955
2955
  }
2956
+ function expandRows(rowModel) {
2957
+ const expandedRows = [];
2958
+ const handleRow = row => {
2959
+ var _row$subRows;
2960
+ expandedRows.push(row);
2961
+ if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getIsExpanded()) {
2962
+ row.subRows.forEach(handleRow);
2963
+ }
2964
+ };
2965
+ rowModel.rows.forEach(handleRow);
2966
+ return {
2967
+ rows: expandedRows,
2968
+ flatRows: rowModel.flatRows,
2969
+ rowsById: rowModel.rowsById
2970
+ };
2971
+ }
2956
2972
 
2957
2973
  function filterRows(rows, filterRowImpl, table) {
2958
2974
  if (table.options.filterFromLeafRows) {
@@ -3140,6 +3156,49 @@ function getFilteredRowModel() {
3140
3156
  }, getMemoOptions(table.options, 'debugTable', 'getFilteredRowModel', () => table._autoResetPageIndex()));
3141
3157
  }
3142
3158
 
3159
+ function getPaginationRowModel(opts) {
3160
+ return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {
3161
+ if (!rowModel.rows.length) {
3162
+ return rowModel;
3163
+ }
3164
+ const {
3165
+ pageSize,
3166
+ pageIndex
3167
+ } = pagination;
3168
+ let {
3169
+ rows,
3170
+ flatRows,
3171
+ rowsById
3172
+ } = rowModel;
3173
+ const pageStart = pageSize * pageIndex;
3174
+ const pageEnd = pageStart + pageSize;
3175
+ rows = rows.slice(pageStart, pageEnd);
3176
+ let paginatedRowModel;
3177
+ if (!table.options.paginateExpandedRows) {
3178
+ paginatedRowModel = expandRows({
3179
+ rows,
3180
+ flatRows,
3181
+ rowsById
3182
+ });
3183
+ } else {
3184
+ paginatedRowModel = {
3185
+ rows,
3186
+ flatRows,
3187
+ rowsById
3188
+ };
3189
+ }
3190
+ paginatedRowModel.flatRows = [];
3191
+ const handleRow = row => {
3192
+ paginatedRowModel.flatRows.push(row);
3193
+ if (row.subRows.length) {
3194
+ row.subRows.forEach(handleRow);
3195
+ }
3196
+ };
3197
+ paginatedRowModel.rows.forEach(handleRow);
3198
+ return paginatedRowModel;
3199
+ }, getMemoOptions(table.options, 'debugTable'));
3200
+ }
3201
+
3143
3202
  /* eslint-disable @typescript-eslint/no-explicit-any */
3144
3203
  /**
3145
3204
  * Debounce function to prevent multiple calls in a short
@@ -3169,12 +3228,15 @@ const NvDatagrid = class {
3169
3228
  this.action = createEvent(this, "action", 7);
3170
3229
  this.templateCache = new Map();
3171
3230
  this.headerTemplateCache = new Map();
3231
+ this.minPageIndex = 1;
3172
3232
  /****************************************************************************/
3173
3233
  //#region STATES
3174
3234
  this.table = null;
3175
3235
  this.parsedColumns = []; // Parsed array
3176
3236
  this.parsedData = []; // Parsed array
3177
- this.globalFilter = '';
3237
+ this.globalFilterSearchTerm = '';
3238
+ this.columnData = [];
3239
+ this.paginationState = null;
3178
3240
  //#endregion STATES
3179
3241
  /****************************************************************************/
3180
3242
  //#region PROPERTIES
@@ -3224,8 +3286,24 @@ const NvDatagrid = class {
3224
3286
  * @default false
3225
3287
  */
3226
3288
  this.autoGenerateColumns = false;
3289
+ /**
3290
+ * Whether to enable pagination for the data grid.
3291
+ * @default false
3292
+ */
3293
+ this.enablePagination = false;
3294
+ /**
3295
+ * The number of rows to display per page.
3296
+ * @default 10
3297
+ */
3298
+ this.pageSize = 10;
3299
+ /**
3300
+ * The array of page sizes to display in the pagination dropdown.
3301
+ * @default [10, 20, 30, 40, 50]
3302
+ */
3303
+ this.pageSizes = [10, 20, 30, 40, 50];
3227
3304
  this.debouncedFilter = debounce((value) => {
3228
- this.globalFilter = value;
3305
+ var _a;
3306
+ (_a = this.table) === null || _a === void 0 ? void 0 : _a.setGlobalFilter(value);
3229
3307
  }, 300);
3230
3308
  /**
3231
3309
  * Handles global filtering on input event for the search input.
@@ -3241,6 +3319,23 @@ const NvDatagrid = class {
3241
3319
  this.debouncedFilter(value);
3242
3320
  }
3243
3321
  };
3322
+ this.flexRender = (comp, props) => {
3323
+ if (typeof comp === 'function') {
3324
+ return comp(props);
3325
+ }
3326
+ return comp;
3327
+ };
3328
+ this.handlePageIndexChange = (event) => {
3329
+ const target = event.target;
3330
+ const page = target.value ? Number(target.value) - 1 : 0;
3331
+ // Simply use `setPageIndex` to update the page index directly
3332
+ this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageIndex: page }); // This triggers the paginationState watcher
3333
+ };
3334
+ this.handlePageSizeChange = (event) => {
3335
+ const target = event.target;
3336
+ // Simply use `setPageSize` to update the page size directly
3337
+ this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageSize: Number(target.value) }); // This triggers the paginationState watcher
3338
+ };
3244
3339
  }
3245
3340
  //#endregion PROPERTIES
3246
3341
  /****************************************************************************/
@@ -3250,6 +3345,7 @@ const NvDatagrid = class {
3250
3345
  */
3251
3346
  cacheTemplates() {
3252
3347
  const columns = Array.from(this.el.querySelectorAll('nv-datagridcolumn'));
3348
+ this.columnData = [];
3253
3349
  columns.forEach((col) => {
3254
3350
  const key = col.accessor;
3255
3351
  const cellSlot = col.querySelector('[slot="cell"]');
@@ -3270,6 +3366,12 @@ const NvDatagrid = class {
3270
3366
  this.headerTemplateCache.set(key, headerDiv);
3271
3367
  }
3272
3368
  }
3369
+ const colData = {
3370
+ header: col.header,
3371
+ accessor: col.accessor,
3372
+ repeatTemplate: col.hasAttribute('repeat-template'),
3373
+ };
3374
+ this.columnData.push(colData);
3273
3375
  });
3274
3376
  }
3275
3377
  parseDataAndColumns() {
@@ -3335,6 +3437,7 @@ const NvDatagrid = class {
3335
3437
  this.parsedColumns = safeNewValue;
3336
3438
  }
3337
3439
  initializeTable() {
3440
+ var _a, _b, _c, _d;
3338
3441
  // Clear the previous table instance (if any)
3339
3442
  this.table = null;
3340
3443
  // Set default options for the table
@@ -3368,26 +3471,9 @@ const NvDatagrid = class {
3368
3471
  }, // Default: no column sizing info
3369
3472
  },
3370
3473
  };
3371
- if (this.enableGlobalFilter) {
3372
- tableOptions.getFilteredRowModel = getFilteredRowModel();
3373
- // Set the initial global filter value
3374
- tableOptions.state.globalFilter = this.globalFilter;
3375
- // Define the callback for global filter changes
3376
- tableOptions.onGlobalFilterChange = value => {
3377
- this.globalFilter = value;
3378
- };
3379
- tableOptions.globalFilterFn = (row, columnId, filterValue) => {
3380
- const response = row
3381
- .getValue(columnId)
3382
- .toString()
3383
- .toLowerCase()
3384
- .includes(filterValue.toLowerCase());
3385
- return response;
3386
- };
3387
- }
3388
3474
  if (this.parsedColumns.length > 0) {
3389
3475
  // Validate and generate column definitions
3390
- const validColumns = this.parsedColumns.filter(column => (column === null || column === void 0 ? void 0 : column.accessor) && (column === null || column === void 0 ? void 0 : column.header));
3476
+ const validColumns = this.parsedColumns.filter(column => column === null || column === void 0 ? void 0 : column.accessor);
3391
3477
  // Update tableOptions based on parsed data and columns
3392
3478
  const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
3393
3479
  const hasData = this.parsedData &&
@@ -3395,22 +3481,22 @@ const NvDatagrid = class {
3395
3481
  this.parsedData.length > 0;
3396
3482
  if (!hasColumns && !hasData) ;
3397
3483
  else if (hasColumns && !hasData) {
3484
+ // Has columns but no data
3398
3485
  tableOptions.columns = this.generateColumns(validColumns, tableOptions);
3399
3486
  }
3400
3487
  else {
3401
3488
  // Both columns and data are available
3402
- // No columns and data is available
3403
3489
  tableOptions.data = this.getTableData();
3404
3490
  tableOptions.columns = this.generateColumns(validColumns, tableOptions);
3405
3491
  }
3406
3492
  }
3407
3493
  else {
3408
- // No columns and data is available
3494
+ // No parsed columns and data is available
3409
3495
  const hasData = this.parsedData &&
3410
3496
  Array.isArray(this.parsedData) &&
3411
3497
  this.parsedData.length > 0;
3412
3498
  if (hasData) {
3413
- // No columns and data is available
3499
+ // No parsed columns and data is available
3414
3500
  const firstRow = this.parsedData[0];
3415
3501
  const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
3416
3502
  accessor: key,
@@ -3423,26 +3509,116 @@ const NvDatagrid = class {
3423
3509
  tableOptions.columns = this.generateColumns(arrayColumnsConfig, tableOptions);
3424
3510
  }
3425
3511
  }
3512
+ if (this.enableGlobalFilter) {
3513
+ tableOptions.getFilteredRowModel = getFilteredRowModel();
3514
+ const globalFilter = this.globalFilterSearchTerm;
3515
+ // Set the initial global filter value
3516
+ tableOptions.state.globalFilter = globalFilter;
3517
+ // Define the callback for global filter changes
3518
+ tableOptions.onGlobalFilterChange = updater => {
3519
+ const newFilter = typeof updater === 'function'
3520
+ ? updater(this.globalFilterSearchTerm)
3521
+ : updater;
3522
+ this.globalFilterSearchTerm = newFilter; // Will automatically trigger the searchTerm watcher and update the table
3523
+ };
3524
+ tableOptions.globalFilterFn = this.globalFilterFn;
3525
+ }
3526
+ if (this.enablePagination) {
3527
+ tableOptions.getPaginationRowModel = getPaginationRowModel();
3528
+ const pagination = {
3529
+ pageIndex: (_b = (_a = this.paginationState) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0,
3530
+ pageSize: (_d = (_c = this.paginationState) === null || _c === void 0 ? void 0 : _c.pageSize) !== null && _d !== void 0 ? _d : 10,
3531
+ };
3532
+ // Set the initial pagination value with safeguards
3533
+ tableOptions.state.pagination = pagination;
3534
+ tableOptions.onPaginationChange = updater => {
3535
+ const newPagination = typeof updater === 'function'
3536
+ ? updater(this.paginationState)
3537
+ : updater;
3538
+ this.paginationState = newPagination;
3539
+ };
3540
+ }
3426
3541
  // Initialize the table
3427
3542
  this.table = createTable(tableOptions);
3428
3543
  }
3544
+ /**
3545
+ * Global filter function for the table.
3546
+ * This function checks if the specified filter value is present in any of the row's original values,
3547
+ * including nested objects and arrays. It is used to filter the rows based on the global filter value,
3548
+ * allowing for case-insensitive matching.
3549
+ *
3550
+ * @param {Row<any>} row - The row object containing the data to be filtered.
3551
+ * @param {string} _columnId - The ID of the column being filtered (not used in this function).
3552
+ * @param {string} filterValue - The value to filter the rows by. This value is checked against the row's data.
3553
+ * @returns {boolean} - Returns true if the row should be included in the filtered results, false otherwise.
3554
+ * If the filter value is empty, all rows are included.
3555
+ */
3556
+ globalFilterFn(row, _columnId, filterValue) {
3557
+ const safeFilterValue = String(filterValue).toLowerCase().trim();
3558
+ // If no filter value, return true for all rows
3559
+ if (!safeFilterValue)
3560
+ return true;
3561
+ // More robust filtering across all columns
3562
+ const checkValue = (value) => {
3563
+ if (typeof value === 'object' && value !== null) {
3564
+ // If it's an array, check each item
3565
+ if (Array.isArray(value)) {
3566
+ return value.some(item => checkValue(item));
3567
+ }
3568
+ // If it's an object, check each property
3569
+ return Object.values(value).some(val => checkValue(val));
3570
+ }
3571
+ return String(value).toLowerCase().includes(safeFilterValue);
3572
+ };
3573
+ return checkValue(row.original);
3574
+ }
3429
3575
  // Helper function to generate column definitions
3430
3576
  generateColumns(validColumns, tableOptions) {
3431
3577
  const columnHelper = createColumnHelper();
3432
3578
  if (validColumns.length > 0) {
3433
3579
  // Use defined columns
3434
- return validColumns.map(column => columnHelper.accessor(column.accessor, {
3435
- header: column.header,
3436
- cell: info => info.getValue(),
3437
- enableGlobalFilter: this.enableGlobalFilter,
3438
- }));
3580
+ return validColumns.map(column => {
3581
+ var _a, _b;
3582
+ return columnHelper.accessor(column.accessor, {
3583
+ header: (_b = (this.renderTemplate(this.headerTemplateCache.get(column.accessor), (_a = column.header) !== null && _a !== void 0 ? _a : column.accessor, null) ||
3584
+ column.header)) !== null && _b !== void 0 ? _b : column.accessor,
3585
+ cell: (info) => {
3586
+ var _a, _b, _c;
3587
+ const value = info.getValue();
3588
+ const cellAccessors = column.accessor;
3589
+ const row = info.row;
3590
+ return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
3591
+ ? value.map((item) => {
3592
+ var _a, _b;
3593
+ return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
3594
+ item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
3595
+ })
3596
+ : (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
3597
+ value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
3598
+ },
3599
+ enableGlobalFilter: this.enableGlobalFilter,
3600
+ });
3601
+ });
3439
3602
  }
3440
3603
  else if (tableOptions.data && tableOptions.data.length > 0) {
3441
3604
  // Generate columns from data keys
3442
3605
  const sampleRow = tableOptions.data[0];
3443
3606
  return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
3444
- header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
3445
- cell: info => info.getValue(),
3607
+ header: this.renderTemplate(this.headerTemplateCache.get(key), key.charAt(0).toUpperCase() + key.slice(1), null) || key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
3608
+ cell: (info) => {
3609
+ var _a, _b, _c;
3610
+ const value = info.getValue();
3611
+ const cellAccessors = key;
3612
+ const row = info.row;
3613
+ return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
3614
+ ? value.map((item) => {
3615
+ var _a, _b;
3616
+ return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
3617
+ item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
3618
+ })
3619
+ : (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
3620
+ value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
3621
+ },
3446
3622
  enableGlobalFilter: this.enableGlobalFilter,
3447
3623
  }));
3448
3624
  }
@@ -3471,11 +3647,11 @@ const NvDatagrid = class {
3471
3647
  // Replace placeholders in text content, attributes, and properties
3472
3648
  element.querySelectorAll('*').forEach(el => {
3473
3649
  // Replace placeholders in text content
3474
- this.replacePlaceholdersTextContent(el, cellValue);
3650
+ this.replacePlaceholdersTextContent(el, cellValue, row);
3475
3651
  // Replace placeholders in attributes
3476
- this.replacePlaceholdersAttributes(el, cellValue);
3652
+ this.replacePlaceholdersAttributes(el, cellValue, row);
3477
3653
  // Replace placeholders in properties
3478
- this.replacePlaceholdersProperties(el, cellValue);
3654
+ this.replacePlaceholdersProperties(el, cellValue, row);
3479
3655
  });
3480
3656
  // Handle `data-bind-event`
3481
3657
  element.querySelectorAll('[data-bind-event]').forEach(el => {
@@ -3551,56 +3727,151 @@ const NvDatagrid = class {
3551
3727
  }
3552
3728
  }
3553
3729
  // Handle single-level key lookup
3554
- return key in cellValue ? String(cellValue[key]) : this.fallbackValue;
3730
+ if (key in cellValue) {
3731
+ return String(cellValue[key]);
3732
+ }
3733
+ else if (Array.isArray(cellValue)) {
3734
+ // Handle array of objects
3735
+ const response = cellValue.map((item) => {
3736
+ if (typeof item !== 'object') {
3737
+ return item.toString();
3738
+ }
3739
+ else if (key in item) {
3740
+ return item[key];
3741
+ }
3742
+ else {
3743
+ return item.toString();
3744
+ }
3745
+ });
3746
+ return response.join(', ');
3747
+ }
3748
+ return this.fallbackValue;
3555
3749
  }
3556
3750
  // If cellValue is a primitive (string, number, boolean, etc.), return it as a string
3557
3751
  return (_a = cellValue === null || cellValue === void 0 ? void 0 : cellValue.toString()) !== null && _a !== void 0 ? _a : this.fallbackValue;
3558
3752
  }
3559
- replacePlaceholdersTextContent(element, cellValue) {
3560
- // Replace placeholders in text content
3561
- element.childNodes.forEach(node => {
3562
- if (node.nodeType === Node.TEXT_NODE) {
3563
- node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
3564
- }
3565
- });
3753
+ replacePlaceholdersTextContent(element, cellValue, row) {
3754
+ if (!cellValue) {
3755
+ // Replace placeholders in text content with the row original value
3756
+ // but first get the original value
3757
+ const originalValue = row.original;
3758
+ element.childNodes.forEach(node => {
3759
+ if (node.nodeType === Node.TEXT_NODE) {
3760
+ node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => {
3761
+ if (key in originalValue) {
3762
+ return this.replaceKeyWithValue(key, originalValue[key]);
3763
+ }
3764
+ else {
3765
+ console.warn(`Key ${key} not found in originalValue`);
3766
+ return '';
3767
+ }
3768
+ });
3769
+ }
3770
+ });
3771
+ }
3772
+ else {
3773
+ // ✅ Replace placeholders in text content
3774
+ element.childNodes.forEach(node => {
3775
+ if (node.nodeType === Node.TEXT_NODE) {
3776
+ node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
3777
+ }
3778
+ });
3779
+ }
3566
3780
  }
3567
- replacePlaceholdersAttributes(element, cellValue) {
3568
- // Replace placeholders in attributes
3569
- Array.from(element.attributes).forEach(attr => {
3570
- if (attr.value.includes('__')) {
3571
- attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
3572
- }
3573
- });
3781
+ replacePlaceholdersAttributes(element, cellValue, row) {
3782
+ if (!cellValue) {
3783
+ // ✅ Replace placeholders in attributes with the row original value
3784
+ // but first get the original value
3785
+ const originalValue = row.original;
3786
+ Array.from(element.attributes).forEach(attr => {
3787
+ if (attr.value.includes('__')) {
3788
+ attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => {
3789
+ if (key in originalValue) {
3790
+ return this.replaceKeyWithValue(key, originalValue[key]);
3791
+ }
3792
+ else {
3793
+ console.warn(`Key ${key} not found in originalValue`);
3794
+ return '';
3795
+ }
3796
+ });
3797
+ }
3798
+ });
3799
+ }
3800
+ else {
3801
+ // ✅ Replace placeholders in attributes
3802
+ Array.from(element.attributes).forEach(attr => {
3803
+ if (attr.value.includes('__')) {
3804
+ attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
3805
+ }
3806
+ });
3807
+ }
3574
3808
  }
3575
- replacePlaceholdersProperties(element, cellValue) {
3576
- // Dynamically extract relevant properties
3577
- const properties = new Set();
3578
- // Collect only own enumerable properties
3579
- Object.keys(element).forEach(key => properties.add(key));
3580
- // Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
3581
- let proto = Object.getPrototypeOf(element);
3582
- while (proto && proto !== HTMLElement.prototype) {
3583
- Object.keys(proto).forEach(key => properties.add(key));
3584
- proto = Object.getPrototypeOf(proto);
3585
- }
3586
- // Filter and copy only non-function properties and exclude irrelevant ones
3587
- properties.forEach(prop => {
3588
- if (typeof element[prop] !== 'function' && // Ignore methods
3589
- !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
3590
- !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
3591
- ) {
3592
- try {
3809
+ replacePlaceholdersProperties(element, cellValue, row) {
3810
+ if (!cellValue) {
3811
+ // ✅ Replace placeholders in properties with the row original value
3812
+ // but first get the original value
3813
+ const originalValue = row.original;
3814
+ // Dynamically extract relevant properties
3815
+ const properties = new Set();
3816
+ // Collect only own enumerable properties
3817
+ Object.keys(originalValue).forEach(key => properties.add(key));
3818
+ // Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
3819
+ let proto = Object.getPrototypeOf(originalValue);
3820
+ while (proto && proto !== HTMLElement.prototype) {
3821
+ Object.keys(proto).forEach(key => properties.add(key));
3822
+ proto = Object.getPrototypeOf(proto);
3823
+ }
3824
+ // Filter and copy only non-function properties and exclude irrelevant ones
3825
+ properties.forEach(prop => {
3826
+ if (typeof element[prop] !== 'function' && // Ignore methods
3827
+ !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
3828
+ !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
3829
+ ) {
3593
3830
  const propValue = element[prop];
3594
- // ✅ Replace placeholders only if the value is a string
3595
3831
  if (typeof propValue === 'string' && propValue.includes('__')) {
3596
- element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue)); // ✅ TypeScript safe
3832
+ element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => {
3833
+ if (key in originalValue) {
3834
+ return this.replaceKeyWithValue(key, originalValue[key]);
3835
+ }
3836
+ else {
3837
+ console.warn(`Key ${key} not found in originalValue`);
3838
+ return '';
3839
+ }
3840
+ });
3597
3841
  }
3598
3842
  }
3599
- catch (error) {
3600
- console.warn(`Could not assign property ${prop}:`, error.message);
3601
- }
3843
+ });
3844
+ }
3845
+ else {
3846
+ // ✅ Dynamically extract relevant properties
3847
+ const properties = new Set();
3848
+ // Collect only own enumerable properties
3849
+ Object.keys(element).forEach(key => properties.add(key));
3850
+ // Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
3851
+ let proto = Object.getPrototypeOf(element);
3852
+ while (proto && proto !== HTMLElement.prototype) {
3853
+ Object.keys(proto).forEach(key => properties.add(key));
3854
+ proto = Object.getPrototypeOf(proto);
3602
3855
  }
3603
- });
3856
+ // ✅ Filter and copy only non-function properties and exclude irrelevant ones
3857
+ properties.forEach(prop => {
3858
+ if (typeof element[prop] !== 'function' && // Ignore methods
3859
+ !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
3860
+ !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
3861
+ ) {
3862
+ try {
3863
+ const propValue = element[prop];
3864
+ // ✅ Replace placeholders only if the value is a string
3865
+ if (typeof propValue === 'string' && propValue.includes('__')) {
3866
+ element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue)); // ✅ TypeScript safe
3867
+ }
3868
+ }
3869
+ catch (error) {
3870
+ console.warn(`Could not assign property ${prop}:`, error.message);
3871
+ }
3872
+ }
3873
+ });
3874
+ }
3604
3875
  }
3605
3876
  //#endregion METHODS
3606
3877
  /****************************************************************************/
@@ -3634,14 +3905,30 @@ const NvDatagrid = class {
3634
3905
  handleParsedChange() {
3635
3906
  this.initializeTable();
3636
3907
  }
3637
- handleGlobalFilter(newValue) {
3908
+ handleGlobalFilterSearchTerm(newValue) {
3638
3909
  if (!this.table) {
3639
3910
  console.warn('Table is not initialized yet.');
3640
3911
  return;
3641
3912
  }
3642
- // 🚨 Manually update state before calling filter
3643
- this.table.options.state = Object.assign(Object.assign({}, this.table.options.state), { globalFilter: newValue });
3644
- this.table.setGlobalFilter(newValue);
3913
+ // Not working
3914
+ /*// Set the global filter for the table
3915
+ this.table.setGlobalFilter(newValue);*/
3916
+ // Manually update the globalFilter state
3917
+ this.table.options.state.globalFilter = newValue;
3918
+ }
3919
+ handlePaginationState(newValue, oldValue) {
3920
+ if (!this.table) {
3921
+ console.warn('Table is not initialized yet.');
3922
+ return;
3923
+ }
3924
+ // Only update if there is a meaningful change
3925
+ if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
3926
+ // Not working
3927
+ /*// Set the pagination for the table
3928
+ this.table.setPagination(newValue);*/
3929
+ // Manually update the pagination state
3930
+ this.table.options.state.pagination = newValue;
3931
+ }
3645
3932
  }
3646
3933
  //#endregion WATCHERS
3647
3934
  /****************************************************************************/
@@ -3650,34 +3937,39 @@ const NvDatagrid = class {
3650
3937
  this.cacheTemplates();
3651
3938
  this.parseDataAndColumns();
3652
3939
  this.initializeTable();
3940
+ if (this.enablePagination) {
3941
+ // Ensure a valid page size
3942
+ const effectivePageSize = this.pageSize > 0 ? this.pageSize : 10;
3943
+ this.paginationState = {
3944
+ pageIndex: Math.max(0, this.minPageIndex - 1),
3945
+ pageSize: effectivePageSize,
3946
+ };
3947
+ }
3653
3948
  }
3654
3949
  //#endregion EVENTS
3655
3950
  /****************************************************************************/
3656
3951
  //#region RENDER
3657
3952
  render() {
3658
- var _a, _b, _c, _d;
3953
+ var _a, _b, _c, _d, _e;
3659
3954
  const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
3660
3955
  ? []
3661
3956
  : (_a = this.table) === null || _a === void 0 ? void 0 : _a.getHeaderGroups();
3662
3957
  const rows = !this.table || this.table === undefined || this.parsedData.length === 0
3663
3958
  ? []
3664
3959
  : (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
3665
- return (h(Host, { key: '6768db58f6a19cbb64e2206957ca27c18c408e46' }, h("div", { key: 'e262922097ae61025e13f8fe685ed7b38063e82c', class: "hidden" }, h("slot", { key: '9025f410bc3e6b409d6225a53a97d13aa3629200' })), h("slot", { key: '684876205d7092a4edf325c8897e97a491b77c6a', name: "before" }), this.enableGlobalFilter && this.table && (h("div", { key: 'b2fe6dd4a97d978617d404134286e6048eb8ddc2', class: "search-container" }, h("input", { key: '82c5d3b73b0bff0c2415ad896a6a4504bb1bb92c', type: "text", value: (_d = this.globalFilter) !== null && _d !== void 0 ? _d : '', onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns...", class: "search-input", "aria-label": "Search all columns" }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (h("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (h("thead", null, this.parsedColumns.length > 0 && headerGroups
3960
+ return (h(Host, { key: 'b3886397a5e6694611636d4da7d61ae5ccbe1903' }, h("div", { key: '8fa71d83f4cfa79cf7fb334bcf6115e4cf253c5d', class: "hidden" }, h("slot", { key: '9aad5956b5973cafc486f3a854a66ae86038ef4a' })), h("slot", { key: '7a1ca93223567faffabb3473df2176cd02654247', name: "before" }), this.enableGlobalFilter && this.table && (h("div", { key: '0020880c229d8ed9070c15182191e86b8b3fed1d', class: "search-container" }, h("input", { key: 'cefc47330a7d770c3668d1406930b9ac50992a10', type: "text", value: (_d = this.globalFilterSearchTerm) !== null && _d !== void 0 ? _d : '', onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns...", class: "search-input", "aria-label": "Search all columns" }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (h("div", null, h("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (h("thead", null, this.parsedColumns.length > 0 && headerGroups
3666
3961
  ? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
3667
3962
  return (h("th", { key: header.id }, header.isPlaceholder
3668
3963
  ? null
3669
- : this.renderTemplate(this.headerTemplateCache.get(header.id), {}) || header.column.columnDef.header));
3964
+ : this.flexRender(header.column.columnDef.header, header.getContext())));
3670
3965
  }))))
3671
3966
  : null)), h("tbody", null, !rows || rows.length === 0 || this.parsedData.length === 0 ? (h("tr", null, h("td", { colSpan: this.parsedColumns.length || 12, class: "no-data" }, this.noDataMessage))) : (rows.map(row => {
3672
3967
  const rowId = row.id;
3673
3968
  const visibleCells = row === null || row === void 0 ? void 0 : row.getVisibleCells();
3674
3969
  return (h("tr", { key: rowId }, visibleCells.map(cell => {
3675
- const cellAccessors = cell.column.id;
3676
- const cellValue = cell.getValue();
3677
- return (h("td", { key: cell.id, "data-row-id": rowId }, this.renderTemplate(this.templateCache.get(cellAccessors), cellValue, row) ||
3678
- (cellValue !== null && cellValue !== void 0 ? cellValue : this.fallbackValue)));
3970
+ return (h("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
3679
3971
  })));
3680
- }))))), h("slot", { key: '4bda5737d7917a508b97cf38b764000f8c5d368d', name: "after" })));
3972
+ })))), this.enablePagination && (h("div", { class: "flex items-center gap-2" }, h("button", { class: "border rounded p-1", disabled: !this.table.getCanPreviousPage(), onClick: this.table.firstPage }, "<<"), h("button", { class: "border rounded p-1", disabled: !this.table.getCanPreviousPage(), onClick: this.table.previousPage }, "<"), h("button", { class: "border rounded p-1", disabled: !this.table.getCanNextPage(), onClick: this.table.nextPage }, ">"), h("button", { class: "border rounded p-1", disabled: !this.table.getCanNextPage(), onClick: this.table.lastPage }, ">>"), h("span", { class: "flex items-center gap-1" }, h("div", null, "Page"), h("strong", null, this.table.getState().pagination.pageIndex + 1, " of", ' ', this.table.getPageCount().toLocaleString())), h("span", { class: "flex items-center gap-1" }, "| Go to page:", ' ', h("input", { type: "number", min: this.minPageIndex, max: this.table.getPageCount(), value: this.table.getState().pagination.pageIndex + 1, class: "border p-1 rounded w-16", "aria-label": "Go to page", onInput: this.handlePageIndexChange })), (_e = this.pageSizes) !== null && _e !== void 0 ? _e : (h("select", { "aria-label": "Rows per page", onChange: this.handlePageSizeChange }, this.pageSizes.map(pageSize => (h("option", { value: String(pageSize), selected: this.table.getState().pagination.pageSize === pageSize }, "Show ", pageSize))))))))), h("slot", { key: '2030fdc2b38a293e749f2ffd4645987e834fee76', name: "after" })));
3681
3973
  }
3682
3974
  get el() { return getElement(this); }
3683
3975
  static get watchers() { return {
@@ -3687,7 +3979,8 @@ const NvDatagrid = class {
3687
3979
  "dataJson": ["parseJsonData"],
3688
3980
  "parsedColumns": ["handleParsedChange"],
3689
3981
  "parsedData": ["handleParsedChange"],
3690
- "globalFilter": ["handleGlobalFilter"]
3982
+ "globalFilterSearchTerm": ["handleGlobalFilterSearchTerm"],
3983
+ "paginationState": ["handlePaginationState"]
3691
3984
  }; }
3692
3985
  };
3693
3986
  NvDatagrid.style = NvDatagridStyle0;