@nova-design-system/nova-webcomponents 3.0.0-beta.46 → 3.0.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 (322) 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 +1 -1
  5. package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
  6. package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
  7. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  8. package/dist/cjs/nv-calendar.cjs.entry.js +48 -19
  9. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  11. package/dist/cjs/nv-datagrid.cjs.entry.js +351 -91
  12. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
  14. package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
  15. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
  16. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
  17. package/dist/cjs/nv-fielddate.cjs.entry.js +5 -5
  18. package/dist/cjs/nv-fielddaterange.cjs.entry.js +4 -4
  19. package/dist/cjs/nv-fielddropdown.cjs.entry.js +15 -29
  20. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  21. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
  22. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +28 -71
  23. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  24. package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
  25. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
  27. package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
  28. package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
  29. package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
  30. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
  31. package/dist/cjs/nv-fieldtime.cjs.entry.js +9 -9
  32. package/dist/cjs/nv-icon.cjs.entry.js +1 -1
  33. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
  34. package/dist/cjs/nv-menu.cjs.entry.js +16 -42
  35. package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
  36. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  37. package/dist/cjs/nv-popover.cjs.entry.js +1 -1
  38. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  39. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  40. package/dist/cjs/nv-stack.cjs.entry.js.map +1 -1
  41. package/dist/cjs/nv-table.cjs.entry.js +2 -2
  42. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  43. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  44. package/dist/collection/collection-manifest.json +0 -1
  45. package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
  46. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
  47. package/dist/collection/components/nv-button/nv-button.js +1 -1
  48. package/dist/collection/components/nv-calendar/nv-calendar.docs.js +0 -9
  49. package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
  50. package/dist/collection/components/nv-calendar/nv-calendar.js +48 -19
  51. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  52. package/dist/collection/components/nv-col/nv-col.js +1 -1
  53. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +542 -75
  54. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
  55. package/dist/collection/components/nv-datagrid/nv-datagrid.js +366 -95
  56. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  57. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
  58. package/dist/collection/components/nv-dialog/nv-dialog.js +1 -1
  59. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
  60. package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
  61. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
  62. package/dist/collection/components/nv-fielddate/nv-fielddate.js +5 -5
  63. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +4 -4
  64. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +8 -8
  65. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  66. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +22 -39
  67. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  68. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
  69. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  70. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +6 -6
  71. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
  72. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +35 -85
  73. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  74. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
  75. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
  76. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
  77. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  78. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
  79. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
  80. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  81. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
  82. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  83. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  84. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  85. package/dist/collection/components/nv-menu/nv-menu.docs.js +3 -3
  86. package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
  87. package/dist/collection/components/nv-menu/nv-menu.js +31 -59
  88. package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
  89. package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
  90. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  91. package/dist/collection/components/nv-row/nv-row.js +1 -1
  92. package/dist/collection/components/nv-stack/nv-stack.docs.js +7 -6
  93. package/dist/collection/components/nv-stack/nv-stack.docs.js.map +1 -1
  94. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  95. package/dist/collection/components/nv-stack/nv-stack.js.map +1 -1
  96. package/dist/collection/components/nv-table/nv-table.js +2 -2
  97. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  98. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  99. package/dist/components/nv-alert.js +1 -1
  100. package/dist/components/nv-avatar.js +1 -1
  101. package/dist/components/nv-badge.js +1 -1
  102. package/dist/components/nv-breadcrumb.js +3 -3
  103. package/dist/components/nv-breadcrumbs.js +1 -1
  104. package/dist/components/nv-button.js +1 -1
  105. package/dist/components/nv-calendar.js +1 -1
  106. package/dist/components/nv-col.js +1 -1
  107. package/dist/components/nv-datagrid.js +359 -94
  108. package/dist/components/nv-datagrid.js.map +1 -1
  109. package/dist/components/nv-datagridcolumn.js +1 -1
  110. package/dist/components/nv-dialog.js +6 -6
  111. package/dist/components/nv-dialogfooter.js +1 -1
  112. package/dist/components/nv-dialogheader.js +1 -1
  113. package/dist/components/nv-fieldcheckbox.js +1 -1
  114. package/dist/components/nv-fielddate.js +12 -12
  115. package/dist/components/nv-fielddaterange.js +11 -11
  116. package/dist/components/nv-fielddropdown.js +21 -36
  117. package/dist/components/nv-fielddropdown.js.map +1 -1
  118. package/dist/components/nv-fielddropdownitem.js +1 -1
  119. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  120. package/dist/components/nv-fieldmultiselect.js +36 -81
  121. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  122. package/dist/components/nv-fieldnumber.js +6 -6
  123. package/dist/components/nv-fieldnumber.js.map +1 -1
  124. package/dist/components/nv-fieldpassword.js +6 -6
  125. package/dist/components/nv-fieldradio.js +3 -3
  126. package/dist/components/nv-fieldselect.js +8 -8
  127. package/dist/components/nv-fieldtext.js +4 -4
  128. package/dist/components/nv-fieldtextarea.js +3 -3
  129. package/dist/components/nv-fieldtime.js +13 -13
  130. package/dist/components/nv-icon.js +1 -1
  131. package/dist/components/nv-iconbutton.js +1 -1
  132. package/dist/components/nv-loader.js +1 -1
  133. package/dist/components/nv-menu.js +21 -50
  134. package/dist/components/nv-menu.js.map +1 -1
  135. package/dist/components/nv-menuitem.js +1 -1
  136. package/dist/components/nv-popover.js +1 -1
  137. package/dist/components/nv-row.js +1 -1
  138. package/dist/components/nv-stack.js +1 -1
  139. package/dist/components/nv-stack.js.map +1 -1
  140. package/dist/components/nv-table.js +2 -2
  141. package/dist/components/nv-toggle.js +2 -2
  142. package/dist/components/nv-tooltip.js +1 -1
  143. package/dist/components/{p-d88ced51.js → p-02752770.js} +2 -2
  144. package/dist/components/{p-d88ced51.js.map → p-02752770.js.map} +1 -1
  145. package/dist/components/{p-7b89fb48.js → p-150daf68.js} +2 -2
  146. package/dist/components/{p-7b89fb48.js.map → p-150daf68.js.map} +1 -1
  147. package/dist/components/{p-56ef8131.js → p-2012b8ba.js} +3 -3
  148. package/dist/components/{p-56ef8131.js.map → p-2012b8ba.js.map} +1 -1
  149. package/dist/components/{p-8674c7af.js → p-2d9ba7d3.js} +3 -3
  150. package/dist/components/{p-8674c7af.js.map → p-2d9ba7d3.js.map} +1 -1
  151. package/dist/components/{p-5a5f11c2.js → p-373926aa.js} +2 -2
  152. package/dist/components/{p-5a5f11c2.js.map → p-373926aa.js.map} +1 -1
  153. package/dist/components/{p-dcabc6fa.js → p-4d3ec142.js} +3 -3
  154. package/dist/components/{p-dcabc6fa.js.map → p-4d3ec142.js.map} +1 -1
  155. package/dist/components/{p-91b58443.js → p-591730e7.js} +2 -2
  156. package/dist/components/{p-91b58443.js.map → p-591730e7.js.map} +1 -1
  157. package/dist/components/{p-b4768da6.js → p-6c364a23.js} +5 -5
  158. package/dist/components/{p-b4768da6.js.map → p-6c364a23.js.map} +1 -1
  159. package/dist/components/{p-f469df15.js → p-a30b55fc.js} +2 -2
  160. package/dist/components/{p-f469df15.js.map → p-a30b55fc.js.map} +1 -1
  161. package/dist/components/{p-664c5a14.js → p-b7b78e64.js} +2 -2
  162. package/dist/components/{p-664c5a14.js.map → p-b7b78e64.js.map} +1 -1
  163. package/dist/components/{p-8c5a861b.js → p-c14f6b8e.js} +3 -3
  164. package/dist/components/{p-8c5a861b.js.map → p-c14f6b8e.js.map} +1 -1
  165. package/dist/components/{p-a9e1bf70.js → p-dc3faba3.js} +4 -4
  166. package/dist/components/{p-a9e1bf70.js.map → p-dc3faba3.js.map} +1 -1
  167. package/dist/components/{p-9d6aaf76.js → p-e00cbb8a.js} +5 -5
  168. package/dist/components/{p-9d6aaf76.js.map → p-e00cbb8a.js.map} +1 -1
  169. package/dist/components/{p-a9f162a8.js → p-f331117c.js} +53 -24
  170. package/dist/components/p-f331117c.js.map +1 -0
  171. package/dist/components/{p-18bc0291.js → p-f4d86795.js} +3 -3
  172. package/dist/components/{p-18bc0291.js.map → p-f4d86795.js.map} +1 -1
  173. package/dist/esm/index-1fb7a9a6.js +0 -4
  174. package/dist/esm/loader.js +1 -1
  175. package/dist/esm/native.js +1 -1
  176. package/dist/esm/nv-badge_2.entry.js +1 -1
  177. package/dist/esm/nv-breadcrumb.entry.js +1 -1
  178. package/dist/esm/nv-breadcrumbs.entry.js +1 -1
  179. package/dist/esm/nv-button.entry.js +1 -1
  180. package/dist/esm/nv-calendar.entry.js +48 -19
  181. package/dist/esm/nv-calendar.entry.js.map +1 -1
  182. package/dist/esm/nv-col.entry.js +1 -1
  183. package/dist/esm/nv-datagrid.entry.js +351 -91
  184. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  185. package/dist/esm/nv-datagridcolumn.entry.js +1 -1
  186. package/dist/esm/nv-dialog.entry.js +1 -1
  187. package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
  188. package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
  189. package/dist/esm/nv-fielddate.entry.js +5 -5
  190. package/dist/esm/nv-fielddaterange.entry.js +4 -4
  191. package/dist/esm/nv-fielddropdown.entry.js +15 -29
  192. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  193. package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
  194. package/dist/esm/nv-fieldmultiselect.entry.js +28 -71
  195. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  196. package/dist/esm/nv-fieldnumber.entry.js +3 -3
  197. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  198. package/dist/esm/nv-fieldpassword.entry.js +3 -3
  199. package/dist/esm/nv-fieldradio.entry.js +3 -3
  200. package/dist/esm/nv-fieldselect.entry.js +5 -5
  201. package/dist/esm/nv-fieldtext.entry.js +3 -3
  202. package/dist/esm/nv-fieldtextarea.entry.js +3 -3
  203. package/dist/esm/nv-fieldtime.entry.js +9 -9
  204. package/dist/esm/nv-icon.entry.js +1 -1
  205. package/dist/esm/nv-iconbutton_2.entry.js +2 -2
  206. package/dist/esm/nv-menu.entry.js +16 -42
  207. package/dist/esm/nv-menu.entry.js.map +1 -1
  208. package/dist/esm/nv-menuitem.entry.js +1 -1
  209. package/dist/esm/nv-popover.entry.js +1 -1
  210. package/dist/esm/nv-row.entry.js +1 -1
  211. package/dist/esm/nv-stack.entry.js +1 -1
  212. package/dist/esm/nv-stack.entry.js.map +1 -1
  213. package/dist/esm/nv-table.entry.js +2 -2
  214. package/dist/esm/nv-toggle.entry.js +2 -2
  215. package/dist/esm/nv-tooltip.entry.js +1 -1
  216. package/dist/native/native.esm.js +1 -1
  217. package/dist/native/native.esm.js.map +1 -1
  218. package/dist/native/p-0245863d.entry.js +2 -0
  219. package/dist/native/{p-8946883b.entry.js → p-0ee428d5.entry.js} +2 -2
  220. package/dist/native/{p-8f7c1bb8.entry.js → p-244f56ac.entry.js} +2 -2
  221. package/dist/native/p-2691e02d.entry.js +2 -0
  222. package/dist/native/{p-aeac63ea.entry.js → p-37f0210e.entry.js} +2 -2
  223. package/dist/native/{p-000ef9c9.entry.js → p-39bb95ff.entry.js} +2 -2
  224. package/dist/native/{p-76cd466a.entry.js → p-4ae26462.entry.js} +2 -2
  225. package/dist/native/{p-75f4bfe8.entry.js → p-4d9c4618.entry.js} +2 -2
  226. package/dist/native/p-4d9c4618.entry.js.map +1 -0
  227. package/dist/native/{p-d4e48d08.entry.js → p-59e0bd2b.entry.js} +2 -2
  228. package/dist/native/{p-d4e48d08.entry.js.map → p-59e0bd2b.entry.js.map} +1 -1
  229. package/dist/native/{p-626a1372.entry.js → p-5c00f092.entry.js} +2 -2
  230. package/dist/native/p-63e6aed3.entry.js +2 -0
  231. package/dist/native/p-63e6aed3.entry.js.map +1 -0
  232. package/dist/native/{p-4fe5ebe9.entry.js → p-6b348684.entry.js} +2 -2
  233. package/dist/native/{p-aa957898.entry.js → p-6ff228da.entry.js} +2 -2
  234. package/dist/native/{p-aa957898.entry.js.map → p-6ff228da.entry.js.map} +1 -1
  235. package/dist/native/{p-74f7f404.entry.js → p-701b5557.entry.js} +2 -2
  236. package/dist/native/{p-002e7bf1.entry.js → p-7f5eb2ac.entry.js} +2 -2
  237. package/dist/native/{p-e4f84faa.entry.js → p-84a73e2a.entry.js} +2 -2
  238. package/dist/native/p-9135fdf5.entry.js +2 -0
  239. package/dist/native/p-93dc2f47.entry.js +2 -0
  240. package/dist/native/{p-7e1fa44c.entry.js.map → p-93dc2f47.entry.js.map} +1 -1
  241. package/dist/native/{p-be5f62e5.entry.js → p-9a267f16.entry.js} +2 -2
  242. package/dist/native/p-9a267f16.entry.js.map +1 -0
  243. package/dist/native/{p-60d6ffa3.entry.js → p-9d6431c7.entry.js} +2 -2
  244. package/dist/native/{p-b11fdaed.entry.js → p-b094296d.entry.js} +2 -2
  245. package/dist/native/{p-43cc98dc.entry.js → p-b2ce83ad.entry.js} +2 -2
  246. package/dist/native/{p-115ad66c.entry.js → p-bad11367.entry.js} +2 -2
  247. package/dist/native/{p-6603d939.entry.js → p-c7b201cd.entry.js} +2 -2
  248. package/dist/native/{p-4c859a14.entry.js → p-d7a76400.entry.js} +2 -2
  249. package/dist/native/p-e1a4f776.entry.js +2 -0
  250. package/dist/native/p-e1a4f776.entry.js.map +1 -0
  251. package/dist/native/p-e49bbd02.entry.js +2 -0
  252. package/dist/native/p-e49bbd02.entry.js.map +1 -0
  253. package/dist/native/{p-98030346.entry.js → p-e5de64d5.entry.js} +2 -2
  254. package/dist/native/p-eee01062.entry.js +2 -0
  255. package/dist/native/{p-3df6febe.entry.js.map → p-eee01062.entry.js.map} +1 -1
  256. package/dist/native/{p-b6164ebc.entry.js → p-f6bdc270.entry.js} +2 -2
  257. package/dist/native/{p-50dcce07.entry.js → p-f85aca27.entry.js} +2 -2
  258. package/dist/native/{p-1e5453be.entry.js → p-fa77a591.entry.js} +2 -2
  259. package/dist/native/{p-d5158e27.entry.js → p-fb5bddba.entry.js} +2 -2
  260. package/dist/types/components/nv-calendar/nv-calendar.d.ts +10 -7
  261. package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +37 -2
  262. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +16 -20
  263. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +16 -34
  264. package/dist/types/components/nv-menu/nv-menu.d.ts +46 -12
  265. package/dist/types/components.d.ts +174 -43
  266. package/dist/vscode-data.json +8 -20
  267. package/hydrate/index.js +535 -407
  268. package/hydrate/index.mjs +535 -407
  269. package/package.json +3 -2
  270. package/dist/cjs/nv-base.cjs.entry.js +0 -74
  271. package/dist/cjs/nv-base.cjs.entry.js.map +0 -1
  272. package/dist/collection/components/nv-base/nv-base.docs.js +0 -5
  273. package/dist/collection/components/nv-base/nv-base.docs.js.map +0 -1
  274. package/dist/collection/components/nv-base/nv-base.js +0 -68
  275. package/dist/collection/components/nv-base/nv-base.js.map +0 -1
  276. package/dist/components/nv-base.d.ts +0 -11
  277. package/dist/components/nv-base.js +0 -88
  278. package/dist/components/nv-base.js.map +0 -1
  279. package/dist/components/p-a9f162a8.js.map +0 -1
  280. package/dist/esm/nv-base.entry.js +0 -70
  281. package/dist/esm/nv-base.entry.js.map +0 -1
  282. package/dist/native/p-2ed9934a.entry.js +0 -2
  283. package/dist/native/p-2ed9934a.entry.js.map +0 -1
  284. package/dist/native/p-3df6febe.entry.js +0 -2
  285. package/dist/native/p-4977fcd0.entry.js +0 -2
  286. package/dist/native/p-75f4bfe8.entry.js.map +0 -1
  287. package/dist/native/p-7e1fa44c.entry.js +0 -2
  288. package/dist/native/p-b8b58064.entry.js +0 -2
  289. package/dist/native/p-be5f62e5.entry.js.map +0 -1
  290. package/dist/native/p-c6fe73a9.entry.js +0 -2
  291. package/dist/native/p-c6fe73a9.entry.js.map +0 -1
  292. package/dist/native/p-ce64d562.entry.js +0 -2
  293. package/dist/native/p-d352a8b3.entry.js +0 -2
  294. package/dist/native/p-d352a8b3.entry.js.map +0 -1
  295. package/dist/native/p-e200185a.entry.js +0 -2
  296. package/dist/native/p-e200185a.entry.js.map +0 -1
  297. package/dist/types/components/nv-base/nv-base.d.ts +0 -17
  298. package/dist/types/components/nv-base/nv-base.docs.d.ts +0 -5
  299. /package/dist/native/{p-ce64d562.entry.js.map → p-0245863d.entry.js.map} +0 -0
  300. /package/dist/native/{p-8946883b.entry.js.map → p-0ee428d5.entry.js.map} +0 -0
  301. /package/dist/native/{p-8f7c1bb8.entry.js.map → p-244f56ac.entry.js.map} +0 -0
  302. /package/dist/native/{p-4977fcd0.entry.js.map → p-2691e02d.entry.js.map} +0 -0
  303. /package/dist/native/{p-aeac63ea.entry.js.map → p-37f0210e.entry.js.map} +0 -0
  304. /package/dist/native/{p-000ef9c9.entry.js.map → p-39bb95ff.entry.js.map} +0 -0
  305. /package/dist/native/{p-76cd466a.entry.js.map → p-4ae26462.entry.js.map} +0 -0
  306. /package/dist/native/{p-626a1372.entry.js.map → p-5c00f092.entry.js.map} +0 -0
  307. /package/dist/native/{p-4fe5ebe9.entry.js.map → p-6b348684.entry.js.map} +0 -0
  308. /package/dist/native/{p-74f7f404.entry.js.map → p-701b5557.entry.js.map} +0 -0
  309. /package/dist/native/{p-002e7bf1.entry.js.map → p-7f5eb2ac.entry.js.map} +0 -0
  310. /package/dist/native/{p-e4f84faa.entry.js.map → p-84a73e2a.entry.js.map} +0 -0
  311. /package/dist/native/{p-b8b58064.entry.js.map → p-9135fdf5.entry.js.map} +0 -0
  312. /package/dist/native/{p-60d6ffa3.entry.js.map → p-9d6431c7.entry.js.map} +0 -0
  313. /package/dist/native/{p-b11fdaed.entry.js.map → p-b094296d.entry.js.map} +0 -0
  314. /package/dist/native/{p-43cc98dc.entry.js.map → p-b2ce83ad.entry.js.map} +0 -0
  315. /package/dist/native/{p-115ad66c.entry.js.map → p-bad11367.entry.js.map} +0 -0
  316. /package/dist/native/{p-6603d939.entry.js.map → p-c7b201cd.entry.js.map} +0 -0
  317. /package/dist/native/{p-4c859a14.entry.js.map → p-d7a76400.entry.js.map} +0 -0
  318. /package/dist/native/{p-98030346.entry.js.map → p-e5de64d5.entry.js.map} +0 -0
  319. /package/dist/native/{p-b6164ebc.entry.js.map → p-f6bdc270.entry.js.map} +0 -0
  320. /package/dist/native/{p-50dcce07.entry.js.map → p-f85aca27.entry.js.map} +0 -0
  321. /package/dist/native/{p-1e5453be.entry.js.map → p-fa77a591.entry.js.map} +0 -0
  322. /package/dist/native/{p-d5158e27.entry.js.map → p-fb5bddba.entry.js.map} +0 -0
@@ -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
@@ -3170,13 +3229,15 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3170
3229
  this.action = createEvent(this, "action", 7);
3171
3230
  this.templateCache = new Map();
3172
3231
  this.headerTemplateCache = new Map();
3232
+ this.minPageIndex = 1;
3173
3233
  /****************************************************************************/
3174
3234
  //#region STATES
3175
3235
  this.table = null;
3176
3236
  this.parsedColumns = []; // Parsed array
3177
3237
  this.parsedData = []; // Parsed array
3178
- this.globalFilter = '';
3238
+ this.globalFilterSearchTerm = '';
3179
3239
  this.columnData = [];
3240
+ this.paginationState = null;
3180
3241
  //#endregion STATES
3181
3242
  /****************************************************************************/
3182
3243
  //#region PROPERTIES
@@ -3226,8 +3287,24 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3226
3287
  * @default false
3227
3288
  */
3228
3289
  this.autoGenerateColumns = false;
3290
+ /**
3291
+ * Whether to enable pagination for the data grid.
3292
+ * @default false
3293
+ */
3294
+ this.enablePagination = false;
3295
+ /**
3296
+ * The number of rows to display per page.
3297
+ * @default 10
3298
+ */
3299
+ this.pageSize = 10;
3300
+ /**
3301
+ * The array of page sizes to display in the pagination dropdown.
3302
+ * @default [10, 20, 30, 40, 50]
3303
+ */
3304
+ this.pageSizes = [10, 20, 30, 40, 50];
3229
3305
  this.debouncedFilter = debounce((value) => {
3230
- this.globalFilter = value;
3306
+ var _a;
3307
+ (_a = this.table) === null || _a === void 0 ? void 0 : _a.setGlobalFilter(value);
3231
3308
  }, 300);
3232
3309
  /**
3233
3310
  * Handles global filtering on input event for the search input.
@@ -3243,6 +3320,23 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3243
3320
  this.debouncedFilter(value);
3244
3321
  }
3245
3322
  };
3323
+ this.flexRender = (comp, props) => {
3324
+ if (typeof comp === 'function') {
3325
+ return comp(props);
3326
+ }
3327
+ return comp;
3328
+ };
3329
+ this.handlePageIndexChange = (event) => {
3330
+ const target = event.target;
3331
+ const page = target.value ? Number(target.value) - 1 : 0;
3332
+ // Simply use `setPageIndex` to update the page index directly
3333
+ this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageIndex: page }); // This triggers the paginationState watcher
3334
+ };
3335
+ this.handlePageSizeChange = (event) => {
3336
+ const target = event.target;
3337
+ // Simply use `setPageSize` to update the page size directly
3338
+ this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageSize: Number(target.value) }); // This triggers the paginationState watcher
3339
+ };
3246
3340
  }
3247
3341
  //#endregion PROPERTIES
3248
3342
  /****************************************************************************/
@@ -3344,6 +3438,7 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3344
3438
  this.parsedColumns = safeNewValue;
3345
3439
  }
3346
3440
  initializeTable() {
3441
+ var _a, _b, _c, _d;
3347
3442
  // Clear the previous table instance (if any)
3348
3443
  this.table = null;
3349
3444
  // Set default options for the table
@@ -3377,26 +3472,9 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3377
3472
  }, // Default: no column sizing info
3378
3473
  },
3379
3474
  };
3380
- if (this.enableGlobalFilter) {
3381
- tableOptions.getFilteredRowModel = getFilteredRowModel();
3382
- // Set the initial global filter value
3383
- tableOptions.state.globalFilter = this.globalFilter;
3384
- // Define the callback for global filter changes
3385
- tableOptions.onGlobalFilterChange = value => {
3386
- this.globalFilter = value;
3387
- };
3388
- tableOptions.globalFilterFn = (row, columnId, filterValue) => {
3389
- const response = row
3390
- .getValue(columnId)
3391
- .toString()
3392
- .toLowerCase()
3393
- .includes(filterValue.toLowerCase());
3394
- return response;
3395
- };
3396
- }
3397
3475
  if (this.parsedColumns.length > 0) {
3398
3476
  // Validate and generate column definitions
3399
- const validColumns = this.parsedColumns.filter(column => (column === null || column === void 0 ? void 0 : column.accessor) && (column === null || column === void 0 ? void 0 : column.header));
3477
+ const validColumns = this.parsedColumns.filter(column => column === null || column === void 0 ? void 0 : column.accessor);
3400
3478
  // Update tableOptions based on parsed data and columns
3401
3479
  const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
3402
3480
  const hasData = this.parsedData &&
@@ -3404,22 +3482,22 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3404
3482
  this.parsedData.length > 0;
3405
3483
  if (!hasColumns && !hasData) ;
3406
3484
  else if (hasColumns && !hasData) {
3485
+ // Has columns but no data
3407
3486
  tableOptions.columns = this.generateColumns(validColumns, tableOptions);
3408
3487
  }
3409
3488
  else {
3410
3489
  // Both columns and data are available
3411
- // No columns and data is available
3412
3490
  tableOptions.data = this.getTableData();
3413
3491
  tableOptions.columns = this.generateColumns(validColumns, tableOptions);
3414
3492
  }
3415
3493
  }
3416
3494
  else {
3417
- // No columns and data is available
3495
+ // No parsed columns and data is available
3418
3496
  const hasData = this.parsedData &&
3419
3497
  Array.isArray(this.parsedData) &&
3420
3498
  this.parsedData.length > 0;
3421
3499
  if (hasData) {
3422
- // No columns and data is available
3500
+ // No parsed columns and data is available
3423
3501
  const firstRow = this.parsedData[0];
3424
3502
  const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
3425
3503
  accessor: key,
@@ -3432,26 +3510,116 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3432
3510
  tableOptions.columns = this.generateColumns(arrayColumnsConfig, tableOptions);
3433
3511
  }
3434
3512
  }
3513
+ if (this.enableGlobalFilter) {
3514
+ tableOptions.getFilteredRowModel = getFilteredRowModel();
3515
+ const globalFilter = this.globalFilterSearchTerm;
3516
+ // Set the initial global filter value
3517
+ tableOptions.state.globalFilter = globalFilter;
3518
+ // Define the callback for global filter changes
3519
+ tableOptions.onGlobalFilterChange = updater => {
3520
+ const newFilter = typeof updater === 'function'
3521
+ ? updater(this.globalFilterSearchTerm)
3522
+ : updater;
3523
+ this.globalFilterSearchTerm = newFilter; // Will automatically trigger the searchTerm watcher and update the table
3524
+ };
3525
+ tableOptions.globalFilterFn = this.globalFilterFn;
3526
+ }
3527
+ if (this.enablePagination) {
3528
+ tableOptions.getPaginationRowModel = getPaginationRowModel();
3529
+ const pagination = {
3530
+ pageIndex: (_b = (_a = this.paginationState) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0,
3531
+ pageSize: (_d = (_c = this.paginationState) === null || _c === void 0 ? void 0 : _c.pageSize) !== null && _d !== void 0 ? _d : 10,
3532
+ };
3533
+ // Set the initial pagination value with safeguards
3534
+ tableOptions.state.pagination = pagination;
3535
+ tableOptions.onPaginationChange = updater => {
3536
+ const newPagination = typeof updater === 'function'
3537
+ ? updater(this.paginationState)
3538
+ : updater;
3539
+ this.paginationState = newPagination;
3540
+ };
3541
+ }
3435
3542
  // Initialize the table
3436
3543
  this.table = createTable(tableOptions);
3437
3544
  }
3545
+ /**
3546
+ * Global filter function for the table.
3547
+ * This function checks if the specified filter value is present in any of the row's original values,
3548
+ * including nested objects and arrays. It is used to filter the rows based on the global filter value,
3549
+ * allowing for case-insensitive matching.
3550
+ *
3551
+ * @param {Row<any>} row - The row object containing the data to be filtered.
3552
+ * @param {string} _columnId - The ID of the column being filtered (not used in this function).
3553
+ * @param {string} filterValue - The value to filter the rows by. This value is checked against the row's data.
3554
+ * @returns {boolean} - Returns true if the row should be included in the filtered results, false otherwise.
3555
+ * If the filter value is empty, all rows are included.
3556
+ */
3557
+ globalFilterFn(row, _columnId, filterValue) {
3558
+ const safeFilterValue = String(filterValue).toLowerCase().trim();
3559
+ // If no filter value, return true for all rows
3560
+ if (!safeFilterValue)
3561
+ return true;
3562
+ // More robust filtering across all columns
3563
+ const checkValue = (value) => {
3564
+ if (typeof value === 'object' && value !== null) {
3565
+ // If it's an array, check each item
3566
+ if (Array.isArray(value)) {
3567
+ return value.some(item => checkValue(item));
3568
+ }
3569
+ // If it's an object, check each property
3570
+ return Object.values(value).some(val => checkValue(val));
3571
+ }
3572
+ return String(value).toLowerCase().includes(safeFilterValue);
3573
+ };
3574
+ return checkValue(row.original);
3575
+ }
3438
3576
  // Helper function to generate column definitions
3439
3577
  generateColumns(validColumns, tableOptions) {
3440
3578
  const columnHelper = createColumnHelper();
3441
3579
  if (validColumns.length > 0) {
3442
3580
  // Use defined columns
3443
- return validColumns.map(column => columnHelper.accessor(column.accessor, {
3444
- header: column.header,
3445
- cell: info => info.getValue(),
3446
- enableGlobalFilter: this.enableGlobalFilter,
3447
- }));
3581
+ return validColumns.map(column => {
3582
+ var _a, _b;
3583
+ return columnHelper.accessor(column.accessor, {
3584
+ header: (_b = (this.renderTemplate(this.headerTemplateCache.get(column.accessor), (_a = column.header) !== null && _a !== void 0 ? _a : column.accessor, null) ||
3585
+ column.header)) !== null && _b !== void 0 ? _b : column.accessor,
3586
+ cell: (info) => {
3587
+ var _a, _b, _c;
3588
+ const value = info.getValue();
3589
+ const cellAccessors = column.accessor;
3590
+ const row = info.row;
3591
+ return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
3592
+ ? value.map((item) => {
3593
+ var _a, _b;
3594
+ return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
3595
+ item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
3596
+ })
3597
+ : (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
3598
+ value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
3599
+ },
3600
+ enableGlobalFilter: this.enableGlobalFilter,
3601
+ });
3602
+ });
3448
3603
  }
3449
3604
  else if (tableOptions.data && tableOptions.data.length > 0) {
3450
3605
  // Generate columns from data keys
3451
3606
  const sampleRow = tableOptions.data[0];
3452
3607
  return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
3453
- header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
3454
- cell: info => info.getValue(),
3608
+ 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
3609
+ cell: (info) => {
3610
+ var _a, _b, _c;
3611
+ const value = info.getValue();
3612
+ const cellAccessors = key;
3613
+ const row = info.row;
3614
+ return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
3615
+ ? value.map((item) => {
3616
+ var _a, _b;
3617
+ return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
3618
+ item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
3619
+ })
3620
+ : (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
3621
+ value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
3622
+ },
3455
3623
  enableGlobalFilter: this.enableGlobalFilter,
3456
3624
  }));
3457
3625
  }
@@ -3480,11 +3648,11 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3480
3648
  // Replace placeholders in text content, attributes, and properties
3481
3649
  element.querySelectorAll('*').forEach(el => {
3482
3650
  // Replace placeholders in text content
3483
- this.replacePlaceholdersTextContent(el, cellValue);
3651
+ this.replacePlaceholdersTextContent(el, cellValue, row);
3484
3652
  // Replace placeholders in attributes
3485
- this.replacePlaceholdersAttributes(el, cellValue);
3653
+ this.replacePlaceholdersAttributes(el, cellValue, row);
3486
3654
  // Replace placeholders in properties
3487
- this.replacePlaceholdersProperties(el, cellValue);
3655
+ this.replacePlaceholdersProperties(el, cellValue, row);
3488
3656
  });
3489
3657
  // Handle `data-bind-event`
3490
3658
  element.querySelectorAll('[data-bind-event]').forEach(el => {
@@ -3583,51 +3751,128 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3583
3751
  // If cellValue is a primitive (string, number, boolean, etc.), return it as a string
3584
3752
  return (_a = cellValue === null || cellValue === void 0 ? void 0 : cellValue.toString()) !== null && _a !== void 0 ? _a : this.fallbackValue;
3585
3753
  }
3586
- replacePlaceholdersTextContent(element, cellValue) {
3587
- // Replace placeholders in text content
3588
- element.childNodes.forEach(node => {
3589
- if (node.nodeType === Node.TEXT_NODE) {
3590
- node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
3591
- }
3592
- });
3754
+ replacePlaceholdersTextContent(element, cellValue, row) {
3755
+ if (!cellValue) {
3756
+ // Replace placeholders in text content with the row original value
3757
+ // but first get the original value
3758
+ const originalValue = row.original;
3759
+ element.childNodes.forEach(node => {
3760
+ if (node.nodeType === Node.TEXT_NODE) {
3761
+ node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => {
3762
+ if (key in originalValue) {
3763
+ return this.replaceKeyWithValue(key, originalValue[key]);
3764
+ }
3765
+ else {
3766
+ console.warn(`Key ${key} not found in originalValue`);
3767
+ return '';
3768
+ }
3769
+ });
3770
+ }
3771
+ });
3772
+ }
3773
+ else {
3774
+ // ✅ Replace placeholders in text content
3775
+ element.childNodes.forEach(node => {
3776
+ if (node.nodeType === Node.TEXT_NODE) {
3777
+ node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
3778
+ }
3779
+ });
3780
+ }
3593
3781
  }
3594
- replacePlaceholdersAttributes(element, cellValue) {
3595
- // Replace placeholders in attributes
3596
- Array.from(element.attributes).forEach(attr => {
3597
- if (attr.value.includes('__')) {
3598
- attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
3599
- }
3600
- });
3782
+ replacePlaceholdersAttributes(element, cellValue, row) {
3783
+ if (!cellValue) {
3784
+ // ✅ Replace placeholders in attributes with the row original value
3785
+ // but first get the original value
3786
+ const originalValue = row.original;
3787
+ Array.from(element.attributes).forEach(attr => {
3788
+ if (attr.value.includes('__')) {
3789
+ attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => {
3790
+ if (key in originalValue) {
3791
+ return this.replaceKeyWithValue(key, originalValue[key]);
3792
+ }
3793
+ else {
3794
+ console.warn(`Key ${key} not found in originalValue`);
3795
+ return '';
3796
+ }
3797
+ });
3798
+ }
3799
+ });
3800
+ }
3801
+ else {
3802
+ // ✅ Replace placeholders in attributes
3803
+ Array.from(element.attributes).forEach(attr => {
3804
+ if (attr.value.includes('__')) {
3805
+ attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
3806
+ }
3807
+ });
3808
+ }
3601
3809
  }
3602
- replacePlaceholdersProperties(element, cellValue) {
3603
- // Dynamically extract relevant properties
3604
- const properties = new Set();
3605
- // Collect only own enumerable properties
3606
- Object.keys(element).forEach(key => properties.add(key));
3607
- // Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
3608
- let proto = Object.getPrototypeOf(element);
3609
- while (proto && proto !== H.prototype) {
3610
- Object.keys(proto).forEach(key => properties.add(key));
3611
- proto = Object.getPrototypeOf(proto);
3612
- }
3613
- // Filter and copy only non-function properties and exclude irrelevant ones
3614
- properties.forEach(prop => {
3615
- if (typeof element[prop] !== 'function' && // Ignore methods
3616
- !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
3617
- !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
3618
- ) {
3619
- try {
3810
+ replacePlaceholdersProperties(element, cellValue, row) {
3811
+ if (!cellValue) {
3812
+ // ✅ Replace placeholders in properties with the row original value
3813
+ // but first get the original value
3814
+ const originalValue = row.original;
3815
+ // Dynamically extract relevant properties
3816
+ const properties = new Set();
3817
+ // Collect only own enumerable properties
3818
+ Object.keys(originalValue).forEach(key => properties.add(key));
3819
+ // Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
3820
+ let proto = Object.getPrototypeOf(originalValue);
3821
+ while (proto && proto !== H.prototype) {
3822
+ Object.keys(proto).forEach(key => properties.add(key));
3823
+ proto = Object.getPrototypeOf(proto);
3824
+ }
3825
+ // Filter and copy only non-function properties and exclude irrelevant ones
3826
+ properties.forEach(prop => {
3827
+ if (typeof element[prop] !== 'function' && // Ignore methods
3828
+ !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
3829
+ !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
3830
+ ) {
3620
3831
  const propValue = element[prop];
3621
- // ✅ Replace placeholders only if the value is a string
3622
3832
  if (typeof propValue === 'string' && propValue.includes('__')) {
3623
- element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue)); // ✅ TypeScript safe
3833
+ element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => {
3834
+ if (key in originalValue) {
3835
+ return this.replaceKeyWithValue(key, originalValue[key]);
3836
+ }
3837
+ else {
3838
+ console.warn(`Key ${key} not found in originalValue`);
3839
+ return '';
3840
+ }
3841
+ });
3624
3842
  }
3625
3843
  }
3626
- catch (error) {
3627
- console.warn(`Could not assign property ${prop}:`, error.message);
3628
- }
3844
+ });
3845
+ }
3846
+ else {
3847
+ // ✅ Dynamically extract relevant properties
3848
+ const properties = new Set();
3849
+ // Collect only own enumerable properties
3850
+ Object.keys(element).forEach(key => properties.add(key));
3851
+ // Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
3852
+ let proto = Object.getPrototypeOf(element);
3853
+ while (proto && proto !== H.prototype) {
3854
+ Object.keys(proto).forEach(key => properties.add(key));
3855
+ proto = Object.getPrototypeOf(proto);
3629
3856
  }
3630
- });
3857
+ // ✅ Filter and copy only non-function properties and exclude irrelevant ones
3858
+ properties.forEach(prop => {
3859
+ if (typeof element[prop] !== 'function' && // Ignore methods
3860
+ !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
3861
+ !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
3862
+ ) {
3863
+ try {
3864
+ const propValue = element[prop];
3865
+ // ✅ Replace placeholders only if the value is a string
3866
+ if (typeof propValue === 'string' && propValue.includes('__')) {
3867
+ element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue)); // ✅ TypeScript safe
3868
+ }
3869
+ }
3870
+ catch (error) {
3871
+ console.warn(`Could not assign property ${prop}:`, error.message);
3872
+ }
3873
+ }
3874
+ });
3875
+ }
3631
3876
  }
3632
3877
  //#endregion METHODS
3633
3878
  /****************************************************************************/
@@ -3661,14 +3906,30 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3661
3906
  handleParsedChange() {
3662
3907
  this.initializeTable();
3663
3908
  }
3664
- handleGlobalFilter(newValue) {
3909
+ handleGlobalFilterSearchTerm(newValue) {
3910
+ if (!this.table) {
3911
+ console.warn('Table is not initialized yet.');
3912
+ return;
3913
+ }
3914
+ // Not working
3915
+ /*// Set the global filter for the table
3916
+ this.table.setGlobalFilter(newValue);*/
3917
+ // Manually update the globalFilter state
3918
+ this.table.options.state.globalFilter = newValue;
3919
+ }
3920
+ handlePaginationState(newValue, oldValue) {
3665
3921
  if (!this.table) {
3666
3922
  console.warn('Table is not initialized yet.');
3667
3923
  return;
3668
3924
  }
3669
- // 🚨 Manually update state before calling filter
3670
- this.table.options.state = Object.assign(Object.assign({}, this.table.options.state), { globalFilter: newValue });
3671
- this.table.setGlobalFilter(newValue);
3925
+ // Only update if there is a meaningful change
3926
+ if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
3927
+ // Not working
3928
+ /*// Set the pagination for the table
3929
+ this.table.setPagination(newValue);*/
3930
+ // Manually update the pagination state
3931
+ this.table.options.state.pagination = newValue;
3932
+ }
3672
3933
  }
3673
3934
  //#endregion WATCHERS
3674
3935
  /****************************************************************************/
@@ -3677,41 +3938,39 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3677
3938
  this.cacheTemplates();
3678
3939
  this.parseDataAndColumns();
3679
3940
  this.initializeTable();
3941
+ if (this.enablePagination) {
3942
+ // Ensure a valid page size
3943
+ const effectivePageSize = this.pageSize > 0 ? this.pageSize : 10;
3944
+ this.paginationState = {
3945
+ pageIndex: Math.max(0, this.minPageIndex - 1),
3946
+ pageSize: effectivePageSize,
3947
+ };
3948
+ }
3680
3949
  }
3681
3950
  //#endregion EVENTS
3682
3951
  /****************************************************************************/
3683
3952
  //#region RENDER
3684
3953
  render() {
3685
- var _a, _b, _c, _d;
3954
+ var _a, _b, _c, _d, _e;
3686
3955
  const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
3687
3956
  ? []
3688
3957
  : (_a = this.table) === null || _a === void 0 ? void 0 : _a.getHeaderGroups();
3689
3958
  const rows = !this.table || this.table === undefined || this.parsedData.length === 0
3690
3959
  ? []
3691
3960
  : (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
3692
- return (h(Host, { key: '94163c2c73d03dca35795bfb536c5743cb3aa0dc' }, h("div", { key: '022776844872a4a6fcf9d7bdc71651e946e83724', class: "hidden" }, h("slot", { key: 'a479cfc2b5ee53aa83450ec784451625e1ae7667' })), h("slot", { key: '9beeb16975a685d8ce05981923c999ab2ffa004e', name: "before" }), this.enableGlobalFilter && this.table && (h("div", { key: '57efcd1ee55fae941a0071000dc665ee76615f32', class: "search-container" }, h("input", { key: 'd7352618ce123a7c14d8ebcc0b228136ae2df66a', 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
3961
+ 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
3693
3962
  ? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
3694
3963
  return (h("th", { key: header.id }, header.isPlaceholder
3695
3964
  ? null
3696
- : this.renderTemplate(this.headerTemplateCache.get(header.id), {}) || header.column.columnDef.header));
3965
+ : this.flexRender(header.column.columnDef.header, header.getContext())));
3697
3966
  }))))
3698
3967
  : 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 => {
3699
3968
  const rowId = row.id;
3700
3969
  const visibleCells = row === null || row === void 0 ? void 0 : row.getVisibleCells();
3701
3970
  return (h("tr", { key: rowId }, visibleCells.map(cell => {
3702
- var _a, _b;
3703
- const cellAccessors = cell.column.id;
3704
- const cellValue = cell.getValue();
3705
- return (h("td", { key: cell.id, "data-row-id": rowId }, ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(cellValue)
3706
- ? cellValue.map((item) => {
3707
- var _a;
3708
- return (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
3709
- item)) !== null && _a !== void 0 ? _a : this.fallbackValue;
3710
- })
3711
- : (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), cellValue, row) ||
3712
- cellValue)) !== null && _b !== void 0 ? _b : this.fallbackValue));
3971
+ return (h("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
3713
3972
  })));
3714
- }))))), h("slot", { key: '15815f259d3936559c89ff943dc349f99fda34fa', name: "after" })));
3973
+ })))), 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" })));
3715
3974
  }
3716
3975
  get el() { return this; }
3717
3976
  static get watchers() { return {
@@ -3721,7 +3980,8 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3721
3980
  "dataJson": ["parseJsonData"],
3722
3981
  "parsedColumns": ["handleParsedChange"],
3723
3982
  "parsedData": ["handleParsedChange"],
3724
- "globalFilter": ["handleGlobalFilter"]
3983
+ "globalFilterSearchTerm": ["handleGlobalFilterSearchTerm"],
3984
+ "paginationState": ["handlePaginationState"]
3725
3985
  }; }
3726
3986
  static get style() { return NvDatagridStyle0; }
3727
3987
  }, [4, "nv-datagrid", {
@@ -3734,11 +3994,15 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3734
3994
  "noColumnsNoDataMessage": [513, "no-columns-no-data-message"],
3735
3995
  "enableGlobalFilter": [516, "enable-global-filter"],
3736
3996
  "autoGenerateColumns": [516, "auto-generate-columns"],
3997
+ "enablePagination": [516, "enable-pagination"],
3998
+ "pageSize": [514, "page-size"],
3999
+ "pageSizes": [16],
3737
4000
  "table": [32],
3738
4001
  "parsedColumns": [32],
3739
4002
  "parsedData": [32],
3740
- "globalFilter": [32],
3741
- "columnData": [32]
4003
+ "globalFilterSearchTerm": [32],
4004
+ "columnData": [32],
4005
+ "paginationState": [32]
3742
4006
  }, undefined, {
3743
4007
  "columns": ["parseColumns"],
3744
4008
  "columnsJson": ["parseJsonColumns"],
@@ -3746,7 +4010,8 @@ const NvDatagrid$1 = /*@__PURE__*/ proxyCustomElement(class NvDatagrid extends H
3746
4010
  "dataJson": ["parseJsonData"],
3747
4011
  "parsedColumns": ["handleParsedChange"],
3748
4012
  "parsedData": ["handleParsedChange"],
3749
- "globalFilter": ["handleGlobalFilter"]
4013
+ "globalFilterSearchTerm": ["handleGlobalFilterSearchTerm"],
4014
+ "paginationState": ["handlePaginationState"]
3750
4015
  }]);
3751
4016
  function defineCustomElement$1() {
3752
4017
  if (typeof customElements === "undefined") {