@nova-design-system/nova-webcomponents 3.0.0-beta.39 → 3.0.0-beta.41
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.
- package/dist/cjs/{constants-2ae3d9eb.js → constants-79d2cdfc.js} +4 -4
- package/dist/cjs/constants-79d2cdfc.js.map +1 -0
- package/dist/cjs/dom.utils-4d43f69a.js +170 -0
- package/dist/cjs/dom.utils-4d43f69a.js.map +1 -0
- package/dist/cjs/index-5910ba06.js +0 -32
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +32 -9
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +2 -2
- package/dist/cjs/nv-badge_2.cjs.entry.js +3 -3
- package/dist/cjs/nv-base.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +34 -12
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +2 -2
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +325 -165
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -5
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +20 -9
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +17 -12
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +3 -3
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtime.cjs.entry.js +10 -10
- package/dist/cjs/nv-icon.cjs.entry.js +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton.cjs.entry.js +1 -1
- package/dist/cjs/nv-loader.cjs.entry.js +1 -1
- package/dist/cjs/nv-menu.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +267 -81
- package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -21
- package/dist/cjs/nv-tablecolumn.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -9
- package/dist/collection/components/nv-alert/nv-alert.docs.js +5 -0
- package/dist/collection/components/nv-alert/nv-alert.docs.js.map +1 -1
- package/dist/collection/components/nv-alert/nv-alert.js +51 -8
- package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
- package/dist/collection/components/nv-avatar/nv-avatar.js +1 -1
- package/dist/collection/components/nv-badge/nv-badge.js +2 -2
- package/dist/collection/components/nv-base/nv-base.js +1 -1
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
- package/dist/collection/components/nv-button/nv-button.docs.js +4 -0
- package/dist/collection/components/nv-button/nv-button.docs.js.map +1 -1
- package/dist/collection/components/nv-button/nv-button.js +54 -13
- package/dist/collection/components/nv-button/nv-button.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +1 -1
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +30 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +25 -77
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +396 -194
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +7 -16
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +6 -9
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +20 -29
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +71 -21
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js.map +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +4 -4
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
- package/dist/collection/components/nv-icon/nv-icon.js +3 -3
- package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.docs.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +3 -3
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +3 -3
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.css +30 -0
- package/dist/collection/components/nv-table/nv-table.docs.js +69 -74
- package/dist/collection/components/nv-table/nv-table.docs.js.map +1 -1
- package/dist/collection/components/nv-table/nv-table.js +349 -137
- package/dist/collection/components/nv-table/nv-table.js.map +1 -1
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js +11 -111
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js.map +1 -1
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/interfaces/ColumnConfig.js +2 -0
- package/dist/collection/interfaces/ColumnConfig.js.map +1 -0
- package/dist/collection/interfaces/actionEvent.js +2 -0
- package/dist/collection/interfaces/actionEvent.js.map +1 -0
- package/dist/collection/utils/dom.utils.js +164 -0
- package/dist/collection/utils/dom.utils.js.map +1 -0
- package/dist/collection/utils/test/class.utils.test.js +25 -0
- package/dist/collection/utils/test/class.utils.test.js.map +1 -0
- package/dist/collection/utils/test/dom.utils.test.js +102 -0
- package/dist/collection/utils/test/dom.utils.test.js.map +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/nv-alert.js +35 -11
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +3 -3
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-base.js +1 -1
- package/dist/components/nv-breadcrumb.js +3 -3
- package/dist/components/nv-breadcrumbs.js +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +6 -6
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +332 -173
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridcolumn.js +3 -7
- package/dist/components/nv-datagridcolumn.js.map +1 -1
- package/dist/components/nv-dialog.js +25 -15
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddropdown.js +8 -8
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +7 -7
- package/dist/components/nv-fieldnumber.js +4 -4
- package/dist/components/nv-fieldpassword.js +6 -6
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +6 -6
- package/dist/components/nv-fieldtext.js +4 -4
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +14 -14
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +5 -5
- package/dist/components/nv-menu.js.map +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +279 -91
- package/dist/components/nv-table.js.map +1 -1
- package/dist/components/nv-tablecolumn.js +5 -28
- package/dist/components/nv-tablecolumn.js.map +1 -1
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-659a5ae4.js → p-11cc38e0.js} +4 -4
- package/dist/components/{p-659a5ae4.js.map → p-11cc38e0.js.map} +1 -1
- package/dist/components/{p-17b6705f.js → p-1657eba4.js} +23 -16
- package/dist/components/p-1657eba4.js.map +1 -0
- package/dist/components/{p-88165c0e.js → p-33f9bdb1.js} +4 -4
- package/dist/components/{p-88165c0e.js.map → p-33f9bdb1.js.map} +1 -1
- package/dist/components/{p-f40a7e2f.js → p-4b184820.js} +3 -3
- package/dist/components/{p-f40a7e2f.js.map → p-4b184820.js.map} +1 -1
- package/dist/components/{p-48317c2c.js → p-4bb5eb79.js} +3 -3
- package/dist/components/{p-48317c2c.js.map → p-4bb5eb79.js.map} +1 -1
- package/dist/components/{p-842afd9a.js → p-69543282.js} +3 -3
- package/dist/components/{p-842afd9a.js.map → p-69543282.js.map} +1 -1
- package/dist/components/{p-fdf57d25.js → p-96605453.js} +5 -5
- package/dist/components/{p-fdf57d25.js.map → p-96605453.js.map} +1 -1
- package/dist/components/{p-33e07c91.js → p-a633892a.js} +2 -2
- package/dist/components/{p-33e07c91.js.map → p-a633892a.js.map} +1 -1
- package/dist/components/{p-fd65c51f.js → p-b316c35d.js} +2 -2
- package/dist/components/p-b316c35d.js.map +1 -0
- package/dist/components/{p-8d7a57d1.js → p-ba145f46.js} +38 -15
- package/dist/components/p-ba145f46.js.map +1 -0
- package/dist/components/p-cb34aa4f.js +167 -0
- package/dist/components/p-cb34aa4f.js.map +1 -0
- package/dist/components/{p-492ad81d.js → p-d17558a8.js} +2 -2
- package/dist/components/{p-492ad81d.js.map → p-d17558a8.js.map} +1 -1
- package/dist/components/{p-73e703a1.js → p-f201db34.js} +2 -2
- package/dist/components/{p-73e703a1.js.map → p-f201db34.js.map} +1 -1
- package/dist/components/{p-5f5e2bf2.js → p-f77c3072.js} +4 -4
- package/dist/components/p-f77c3072.js.map +1 -0
- package/dist/components/{p-83e1177b.js → p-fad78896.js} +3 -3
- package/dist/components/{p-83e1177b.js.map → p-fad78896.js.map} +1 -1
- package/dist/docs.json +352 -679
- package/dist/esm/{constants-8243d2ea.js → constants-75e6d7f0.js} +2 -2
- package/dist/esm/constants-75e6d7f0.js.map +1 -0
- package/dist/esm/dom.utils-ac71e0ef.js +167 -0
- package/dist/esm/dom.utils-ac71e0ef.js.map +1 -0
- package/dist/esm/index-fac2d5d2.js +0 -32
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-alert.entry.js +32 -9
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +2 -2
- package/dist/esm/nv-badge_2.entry.js +3 -3
- package/dist/esm/nv-base.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +34 -12
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-calendar.entry.js +2 -2
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +326 -166
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +1 -5
- package/dist/esm/nv-datagridcolumn.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +20 -9
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +17 -12
- package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
- package/dist/esm/nv-fielddropdown.entry.js +3 -3
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldpassword.entry.js +3 -3
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js +10 -10
- package/dist/esm/nv-icon.entry.js +3 -3
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton.entry.js +1 -1
- package/dist/esm/nv-loader.entry.js +1 -1
- package/dist/esm/nv-menu.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js.map +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +268 -82
- package/dist/esm/nv-table.entry.js.map +1 -1
- package/dist/esm/nv-tablecolumn.entry.js +2 -22
- package/dist/esm/nv-tablecolumn.entry.js.map +1 -1
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-e1b22ca7.entry.js → p-0a2a9f8b.entry.js} +2 -2
- package/dist/native/{p-46c9aa04.entry.js → p-12d08abc.entry.js} +2 -2
- package/dist/native/{p-63c894f0.entry.js → p-15be3d96.entry.js} +2 -2
- package/dist/native/{p-943a19a5.entry.js → p-184cd119.entry.js} +2 -2
- package/dist/native/{p-2b99e720.entry.js → p-1a3d2a74.entry.js} +2 -2
- package/dist/native/{p-bac62e20.entry.js → p-27ad7af2.entry.js} +2 -2
- package/dist/native/p-27ad7af2.entry.js.map +1 -0
- package/dist/native/p-2b2a10f9.entry.js +2 -0
- package/dist/native/p-2b2a10f9.entry.js.map +1 -0
- package/dist/native/{p-3b2c7871.entry.js → p-359f0f53.entry.js} +2 -2
- package/dist/native/p-3b65037c.entry.js +2 -0
- package/dist/native/p-3b65037c.entry.js.map +1 -0
- package/dist/native/p-3be2c9a1.entry.js +2 -0
- package/dist/native/p-4283f375.entry.js +2 -0
- package/dist/native/p-4283f375.entry.js.map +1 -0
- package/dist/native/p-487b81bd.entry.js +2 -0
- package/dist/native/p-487b81bd.entry.js.map +1 -0
- package/dist/native/{p-fa33ec18.entry.js → p-491f4605.entry.js} +2 -2
- package/dist/native/{p-39b4ec02.entry.js → p-554f7b44.entry.js} +2 -2
- package/dist/native/{p-44e7e3e8.entry.js → p-69fb1c9d.entry.js} +2 -2
- package/dist/native/{p-cba14168.entry.js → p-729c9d45.entry.js} +2 -2
- package/dist/native/{p-6acbf729.entry.js → p-78f08578.entry.js} +2 -2
- package/dist/native/p-8664ab16.entry.js +7 -0
- package/dist/native/p-8664ab16.entry.js.map +1 -0
- package/dist/native/p-8d6516a3.entry.js +2 -0
- package/dist/native/{p-4a7fa613.entry.js.map → p-8d6516a3.entry.js.map} +1 -1
- package/dist/native/p-951baf95.entry.js +2 -0
- package/dist/native/{p-b2ace8e9.entry.js → p-9795090f.entry.js} +2 -2
- package/dist/native/{p-b2ace8e9.entry.js.map → p-9795090f.entry.js.map} +1 -1
- package/dist/native/p-af60740c.entry.js +2 -0
- package/dist/native/{p-3bfd5a30.entry.js.map → p-af60740c.entry.js.map} +1 -1
- package/dist/native/{p-fd65c51f.js → p-b316c35d.js} +2 -2
- package/dist/native/{p-fd65c51f.js.map → p-b316c35d.js.map} +1 -1
- package/dist/native/p-b58c661b.entry.js +2 -0
- package/dist/native/p-b58c661b.entry.js.map +1 -0
- package/dist/native/p-b7bc918b.entry.js +2 -0
- package/dist/native/p-b7bc918b.entry.js.map +1 -0
- package/dist/native/p-cb34aa4f.js +2 -0
- package/dist/native/p-cb34aa4f.js.map +1 -0
- package/dist/native/{p-4eacd598.entry.js → p-cda56476.entry.js} +2 -2
- package/dist/native/{p-dbb89408.entry.js → p-d1bf4d77.entry.js} +2 -2
- package/dist/native/{p-b13b2663.entry.js → p-d7665a07.entry.js} +2 -2
- package/dist/native/{p-833af1bf.entry.js → p-daeb7e22.entry.js} +2 -2
- package/dist/native/{p-634b49fe.entry.js → p-e36e956b.entry.js} +2 -2
- package/dist/native/{p-afc16010.entry.js → p-e9e77494.entry.js} +2 -2
- package/dist/native/{p-0bf35abc.entry.js → p-edee1c1f.entry.js} +2 -2
- package/dist/native/{p-4db7add6.entry.js → p-f1585fc2.entry.js} +2 -2
- package/dist/native/{p-ac81e143.entry.js → p-f3579407.entry.js} +2 -2
- package/dist/native/p-fca807b4.entry.js +13 -0
- package/dist/native/p-fca807b4.entry.js.map +1 -0
- package/dist/native/{p-2151f564.entry.js → p-fde56f9c.entry.js} +2 -2
- package/dist/types/components/nv-alert/nv-alert.d.ts +14 -0
- package/dist/types/components/nv-base/nv-base.docs.d.ts +1 -1
- package/dist/types/components/nv-button/nv-button.d.ts +16 -5
- package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +48 -31
- package/dist/types/components/nv-datagridcolumn/nv-datagridcolumn.d.ts +3 -2
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +1 -7
- package/dist/types/components/nv-dialogfooter/nv-dialogfooter.d.ts +19 -10
- package/dist/types/components/nv-table/nv-table.d.ts +51 -39
- package/dist/types/components/nv-tablecolumn/nv-tablecolumn.d.ts +4 -42
- package/dist/types/components.d.ts +136 -256
- package/dist/types/interfaces/ColumnConfig.d.ts +13 -0
- package/dist/types/interfaces/actionEvent.d.ts +13 -0
- package/dist/types/utils/dom.utils.d.ts +12 -0
- package/dist/types/utils/test/class.utils.test.d.ts +1 -0
- package/dist/types/utils/test/dom.utils.test.d.ts +1 -0
- package/hydrate/index.js +958 -667
- package/hydrate/index.mjs +958 -667
- package/package.json +15 -27
- package/dist/blazor-docs.json +0 -15543
- package/dist/cjs/constants-2ae3d9eb.js.map +0 -1
- package/dist/cjs/nv-datagridbody.cjs.entry.js +0 -24
- package/dist/cjs/nv-datagridbody.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-datagriddatacell.cjs.entry.js +0 -25
- package/dist/cjs/nv-datagriddatacell.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-datagridhead.cjs.entry.js +0 -24
- package/dist/cjs/nv-datagridhead.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-datagridrow.cjs.entry.js +0 -24
- package/dist/cjs/nv-datagridrow.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-tablebody.cjs.entry.js +0 -24
- package/dist/cjs/nv-tablebody.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-tabledatacell.cjs.entry.js +0 -43
- package/dist/cjs/nv-tabledatacell.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-tablehead.cjs.entry.js +0 -24
- package/dist/cjs/nv-tablehead.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-tablerow.cjs.entry.js +0 -24
- package/dist/cjs/nv-tablerow.cjs.entry.js.map +0 -1
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.css +0 -0
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.docs.js +0 -8
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.docs.js.map +0 -1
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.js +0 -23
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.js.map +0 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.css +0 -0
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.css +0 -0
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.docs.js +0 -6
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.docs.js.map +0 -1
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.js +0 -50
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.js.map +0 -1
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.css +0 -0
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.docs.js +0 -8
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.docs.js.map +0 -1
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.js +0 -23
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.js.map +0 -1
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.css +0 -0
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.docs.js +0 -8
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.docs.js.map +0 -1
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.js +0 -23
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.js.map +0 -1
- package/dist/collection/components/nv-tablebody/nv-tablebody.css +0 -0
- package/dist/collection/components/nv-tablebody/nv-tablebody.docs.js +0 -8
- package/dist/collection/components/nv-tablebody/nv-tablebody.docs.js.map +0 -1
- package/dist/collection/components/nv-tablebody/nv-tablebody.js +0 -23
- package/dist/collection/components/nv-tablebody/nv-tablebody.js.map +0 -1
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.css +0 -0
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.css +0 -0
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.docs.js +0 -6
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.docs.js.map +0 -1
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js +0 -116
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js.map +0 -1
- package/dist/collection/components/nv-tablehead/nv-tablehead.css +0 -0
- package/dist/collection/components/nv-tablehead/nv-tablehead.docs.js +0 -8
- package/dist/collection/components/nv-tablehead/nv-tablehead.docs.js.map +0 -1
- package/dist/collection/components/nv-tablehead/nv-tablehead.js +0 -23
- package/dist/collection/components/nv-tablehead/nv-tablehead.js.map +0 -1
- package/dist/collection/components/nv-tablerow/nv-tablerow.css +0 -0
- package/dist/collection/components/nv-tablerow/nv-tablerow.docs.js +0 -8
- package/dist/collection/components/nv-tablerow/nv-tablerow.docs.js.map +0 -1
- package/dist/collection/components/nv-tablerow/nv-tablerow.js +0 -23
- package/dist/collection/components/nv-tablerow/nv-tablerow.js.map +0 -1
- package/dist/components/nv-datagridbody.d.ts +0 -11
- package/dist/components/nv-datagridbody.js +0 -38
- package/dist/components/nv-datagridbody.js.map +0 -1
- package/dist/components/nv-datagriddatacell.d.ts +0 -11
- package/dist/components/nv-datagriddatacell.js +0 -41
- package/dist/components/nv-datagriddatacell.js.map +0 -1
- package/dist/components/nv-datagridhead.d.ts +0 -11
- package/dist/components/nv-datagridhead.js +0 -38
- package/dist/components/nv-datagridhead.js.map +0 -1
- package/dist/components/nv-datagridrow.d.ts +0 -11
- package/dist/components/nv-datagridrow.js +0 -38
- package/dist/components/nv-datagridrow.js.map +0 -1
- package/dist/components/nv-tablebody.d.ts +0 -11
- package/dist/components/nv-tablebody.js +0 -38
- package/dist/components/nv-tablebody.js.map +0 -1
- package/dist/components/nv-tabledatacell.d.ts +0 -11
- package/dist/components/nv-tabledatacell.js +0 -61
- package/dist/components/nv-tabledatacell.js.map +0 -1
- package/dist/components/nv-tablehead.d.ts +0 -11
- package/dist/components/nv-tablehead.js +0 -38
- package/dist/components/nv-tablehead.js.map +0 -1
- package/dist/components/nv-tablerow.d.ts +0 -11
- package/dist/components/nv-tablerow.js +0 -38
- package/dist/components/nv-tablerow.js.map +0 -1
- package/dist/components/p-17b6705f.js.map +0 -1
- package/dist/components/p-5f5e2bf2.js.map +0 -1
- package/dist/components/p-8d7a57d1.js.map +0 -1
- package/dist/components/p-fd65c51f.js.map +0 -1
- package/dist/esm/constants-8243d2ea.js.map +0 -1
- package/dist/esm/nv-datagridbody.entry.js +0 -20
- package/dist/esm/nv-datagridbody.entry.js.map +0 -1
- package/dist/esm/nv-datagriddatacell.entry.js +0 -21
- package/dist/esm/nv-datagriddatacell.entry.js.map +0 -1
- package/dist/esm/nv-datagridhead.entry.js +0 -20
- package/dist/esm/nv-datagridhead.entry.js.map +0 -1
- package/dist/esm/nv-datagridrow.entry.js +0 -20
- package/dist/esm/nv-datagridrow.entry.js.map +0 -1
- package/dist/esm/nv-tablebody.entry.js +0 -20
- package/dist/esm/nv-tablebody.entry.js.map +0 -1
- package/dist/esm/nv-tabledatacell.entry.js +0 -39
- package/dist/esm/nv-tabledatacell.entry.js.map +0 -1
- package/dist/esm/nv-tablehead.entry.js +0 -20
- package/dist/esm/nv-tablehead.entry.js.map +0 -1
- package/dist/esm/nv-tablerow.entry.js +0 -20
- package/dist/esm/nv-tablerow.entry.js.map +0 -1
- package/dist/native/p-1bae8cdd.entry.js +0 -13
- package/dist/native/p-1bae8cdd.entry.js.map +0 -1
- package/dist/native/p-1ca72f74.entry.js +0 -2
- package/dist/native/p-1ca72f74.entry.js.map +0 -1
- package/dist/native/p-3422397d.entry.js +0 -2
- package/dist/native/p-3422397d.entry.js.map +0 -1
- package/dist/native/p-3bfd5a30.entry.js +0 -2
- package/dist/native/p-4a7fa613.entry.js +0 -2
- package/dist/native/p-51e0c5d3.entry.js +0 -2
- package/dist/native/p-51e0c5d3.entry.js.map +0 -1
- package/dist/native/p-57513eb0.entry.js +0 -2
- package/dist/native/p-57513eb0.entry.js.map +0 -1
- package/dist/native/p-5851fbed.entry.js +0 -2
- package/dist/native/p-5851fbed.entry.js.map +0 -1
- package/dist/native/p-5f1a7e6e.entry.js +0 -2
- package/dist/native/p-7211a3cb.entry.js +0 -7
- package/dist/native/p-7211a3cb.entry.js.map +0 -1
- package/dist/native/p-79765c7d.entry.js +0 -2
- package/dist/native/p-79765c7d.entry.js.map +0 -1
- package/dist/native/p-8b323a15.entry.js +0 -2
- package/dist/native/p-8b323a15.entry.js.map +0 -1
- package/dist/native/p-9c8eadde.entry.js +0 -2
- package/dist/native/p-9c8eadde.entry.js.map +0 -1
- package/dist/native/p-bac62e20.entry.js.map +0 -1
- package/dist/native/p-beab7cbd.entry.js +0 -2
- package/dist/native/p-bfb6e22c.entry.js +0 -2
- package/dist/native/p-bfb6e22c.entry.js.map +0 -1
- package/dist/native/p-c29be15d.entry.js +0 -2
- package/dist/native/p-c29be15d.entry.js.map +0 -1
- package/dist/native/p-ef9b66d4.entry.js +0 -2
- package/dist/native/p-ef9b66d4.entry.js.map +0 -1
- package/dist/native/p-f867541d.entry.js +0 -2
- package/dist/native/p-f867541d.entry.js.map +0 -1
- package/dist/native/p-f954a077.entry.js +0 -2
- package/dist/native/p-f954a077.entry.js.map +0 -1
- package/dist/native/p-ff7eea0e.entry.js +0 -2
- package/dist/native/p-ff7eea0e.entry.js.map +0 -1
- package/dist/types/components/nv-datagridbody/nv-datagridbody.d.ts +0 -7
- package/dist/types/components/nv-datagridbody/nv-datagridbody.docs.d.ts +0 -4
- package/dist/types/components/nv-datagriddatacell/nv-datagriddatacell.d.ts +0 -14
- package/dist/types/components/nv-datagriddatacell/nv-datagriddatacell.docs.d.ts +0 -4
- package/dist/types/components/nv-datagridhead/nv-datagridhead.d.ts +0 -7
- package/dist/types/components/nv-datagridhead/nv-datagridhead.docs.d.ts +0 -4
- package/dist/types/components/nv-datagridrow/nv-datagridrow.d.ts +0 -7
- package/dist/types/components/nv-datagridrow/nv-datagridrow.docs.d.ts +0 -4
- package/dist/types/components/nv-tablebody/nv-tablebody.d.ts +0 -7
- package/dist/types/components/nv-tablebody/nv-tablebody.docs.d.ts +0 -4
- package/dist/types/components/nv-tabledatacell/nv-tabledatacell.d.ts +0 -30
- package/dist/types/components/nv-tabledatacell/nv-tabledatacell.docs.d.ts +0 -4
- package/dist/types/components/nv-tablehead/nv-tablehead.d.ts +0 -7
- package/dist/types/components/nv-tablehead/nv-tablehead.docs.d.ts +0 -4
- package/dist/types/components/nv-tablerow/nv-tablerow.d.ts +0 -7
- package/dist/types/components/nv-tablerow/nv-tablerow.docs.d.ts +0 -4
- package/dist/vscode-data.json +0 -4407
- /package/dist/native/{p-e1b22ca7.entry.js.map → p-0a2a9f8b.entry.js.map} +0 -0
- /package/dist/native/{p-46c9aa04.entry.js.map → p-12d08abc.entry.js.map} +0 -0
- /package/dist/native/{p-63c894f0.entry.js.map → p-15be3d96.entry.js.map} +0 -0
- /package/dist/native/{p-943a19a5.entry.js.map → p-184cd119.entry.js.map} +0 -0
- /package/dist/native/{p-2b99e720.entry.js.map → p-1a3d2a74.entry.js.map} +0 -0
- /package/dist/native/{p-3b2c7871.entry.js.map → p-359f0f53.entry.js.map} +0 -0
- /package/dist/native/{p-beab7cbd.entry.js.map → p-3be2c9a1.entry.js.map} +0 -0
- /package/dist/native/{p-fa33ec18.entry.js.map → p-491f4605.entry.js.map} +0 -0
- /package/dist/native/{p-39b4ec02.entry.js.map → p-554f7b44.entry.js.map} +0 -0
- /package/dist/native/{p-44e7e3e8.entry.js.map → p-69fb1c9d.entry.js.map} +0 -0
- /package/dist/native/{p-cba14168.entry.js.map → p-729c9d45.entry.js.map} +0 -0
- /package/dist/native/{p-6acbf729.entry.js.map → p-78f08578.entry.js.map} +0 -0
- /package/dist/native/{p-5f1a7e6e.entry.js.map → p-951baf95.entry.js.map} +0 -0
- /package/dist/native/{p-4eacd598.entry.js.map → p-cda56476.entry.js.map} +0 -0
- /package/dist/native/{p-dbb89408.entry.js.map → p-d1bf4d77.entry.js.map} +0 -0
- /package/dist/native/{p-b13b2663.entry.js.map → p-d7665a07.entry.js.map} +0 -0
- /package/dist/native/{p-833af1bf.entry.js.map → p-daeb7e22.entry.js.map} +0 -0
- /package/dist/native/{p-634b49fe.entry.js.map → p-e36e956b.entry.js.map} +0 -0
- /package/dist/native/{p-afc16010.entry.js.map → p-e9e77494.entry.js.map} +0 -0
- /package/dist/native/{p-0bf35abc.entry.js.map → p-edee1c1f.entry.js.map} +0 -0
- /package/dist/native/{p-4db7add6.entry.js.map → p-f1585fc2.entry.js.map} +0 -0
- /package/dist/native/{p-ac81e143.entry.js.map → p-f3579407.entry.js.map} +0 -0
- /package/dist/native/{p-2151f564.entry.js.map → p-fde56f9c.entry.js.map} +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5910ba06.js');
|
|
6
|
+
const dom_utils = require('./dom.utils-4d43f69a.js');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* table-core
|
|
@@ -2957,22 +2958,29 @@ function getCoreRowModel() {
|
|
|
2957
2958
|
}, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => table._autoResetPageIndex()));
|
|
2958
2959
|
}
|
|
2959
2960
|
|
|
2960
|
-
const nvDatagridCss = "nv-datagrid table{border-collapse:collapse;border-color:inherit;text-indent:0}";
|
|
2961
|
+
const nvDatagridCss = "nv-datagrid{display:block}nv-datagrid .hidden{display:none}nv-datagrid table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-datagrid th{text-align:left;border-bottom:1px solid var(--components-datagrid-border-header);height:var(--spacing-12);padding:var(--spacing-3) var(--spacing-4);font-size:var(--font-size-md);font-weight:700;color:var(--components-datagrid-content-header)}nv-datagrid td{border-bottom:1px solid var(--components-datagrid-border-body);height:var(--spacing-12);max-height:var(--spacing-14);padding:var(--spacing-2) var(--spacing-4);font-size:var(--font-size-md);font-weight:400;color:var(--components-datagrid-content-text);white-space:nowrap;text-overflow:ellipsis}nv-datagrid tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}";
|
|
2961
2962
|
const NvDatagridStyle0 = nvDatagridCss;
|
|
2962
2963
|
|
|
2963
2964
|
const NvDatagrid = class {
|
|
2964
2965
|
constructor(hostRef) {
|
|
2965
2966
|
index.registerInstance(this, hostRef);
|
|
2967
|
+
this.action = index.createEvent(this, "action", 7);
|
|
2968
|
+
this.templateCache = new Map();
|
|
2969
|
+
this.headerTemplateCache = new Map();
|
|
2966
2970
|
/****************************************************************************/
|
|
2967
2971
|
//#region STATES
|
|
2968
2972
|
this.table = null;
|
|
2969
2973
|
this.parsedColumns = []; // Parsed array
|
|
2970
2974
|
this.parsedData = []; // Parsed array
|
|
2971
|
-
this.hasSlotHead = false;
|
|
2972
|
-
this.hasSlotBody = false;
|
|
2973
2975
|
//#endregion STATES
|
|
2974
2976
|
/****************************************************************************/
|
|
2975
2977
|
//#region PROPERTIES
|
|
2978
|
+
/**
|
|
2979
|
+
* The data to display in the data grid.
|
|
2980
|
+
* @example [{ "name": "Alice", "age": 25 }, { "name": "Bob", "age": 30 }]
|
|
2981
|
+
* @default []
|
|
2982
|
+
*/
|
|
2983
|
+
this.data = [];
|
|
2976
2984
|
/**
|
|
2977
2985
|
* The columns to display in the data grid.
|
|
2978
2986
|
* @example
|
|
@@ -2985,11 +2993,10 @@ const NvDatagrid = class {
|
|
|
2985
2993
|
*/
|
|
2986
2994
|
this.columns = [];
|
|
2987
2995
|
/**
|
|
2988
|
-
*
|
|
2989
|
-
* @
|
|
2990
|
-
* @default []
|
|
2996
|
+
* Fallback value to be displayed when data is not available
|
|
2997
|
+
* @default 'N/A'
|
|
2991
2998
|
*/
|
|
2992
|
-
this.
|
|
2999
|
+
this.fallbackValue = 'N/A';
|
|
2993
3000
|
/**
|
|
2994
3001
|
* The message to display when there is no data available.
|
|
2995
3002
|
* @default 'No data available'
|
|
@@ -3003,39 +3010,94 @@ const NvDatagrid = class {
|
|
|
3003
3010
|
}
|
|
3004
3011
|
//#endregion PROPERTIES
|
|
3005
3012
|
/****************************************************************************/
|
|
3006
|
-
//#region
|
|
3007
|
-
|
|
3008
|
-
|
|
3013
|
+
//#region METHODS
|
|
3014
|
+
/**
|
|
3015
|
+
* Caches templates for cells and headers upfront to improve performance.
|
|
3016
|
+
*/
|
|
3017
|
+
cacheTemplates() {
|
|
3018
|
+
const columns = Array.from(this.el.querySelectorAll('nv-datagridcolumn'));
|
|
3019
|
+
columns.forEach((col) => {
|
|
3020
|
+
const key = col.accessor;
|
|
3021
|
+
const cellSlot = col.querySelector('[slot="cell"]');
|
|
3022
|
+
if (cellSlot) {
|
|
3023
|
+
const element = dom_utils.deepCopyElement(cellSlot);
|
|
3024
|
+
this.templateCache.set(key, element);
|
|
3025
|
+
}
|
|
3026
|
+
const headerSlot = col.querySelector('[slot="header"]');
|
|
3027
|
+
if (headerSlot) {
|
|
3028
|
+
const element = dom_utils.deepCopyElement(headerSlot);
|
|
3029
|
+
this.headerTemplateCache.set(key, element);
|
|
3030
|
+
}
|
|
3031
|
+
else {
|
|
3032
|
+
const header = col.header;
|
|
3033
|
+
if (header) {
|
|
3034
|
+
const headerDiv = document.createElement('div');
|
|
3035
|
+
headerDiv.textContent = header;
|
|
3036
|
+
this.headerTemplateCache.set(key, headerDiv);
|
|
3037
|
+
}
|
|
3038
|
+
}
|
|
3039
|
+
});
|
|
3009
3040
|
}
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
this.parseColumnsArray(newItems, this.parsedColumns);
|
|
3041
|
+
parseDataAndColumns() {
|
|
3042
|
+
if (this.dataJson) {
|
|
3043
|
+
this.parseJsonData(this.dataJson);
|
|
3014
3044
|
}
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3045
|
+
else if (this.data && this.data.length > 0) {
|
|
3046
|
+
this.parseDataArray(this.data, this.parsedData);
|
|
3047
|
+
}
|
|
3048
|
+
if (this.columnsJson) {
|
|
3049
|
+
this.parseJsonColumns(this.columnsJson, this.parsedColumns);
|
|
3050
|
+
}
|
|
3051
|
+
else if (this.columns && this.columns.length > 0) {
|
|
3052
|
+
this.parseColumnsArray(this.columns, this.parsedColumns);
|
|
3053
|
+
}
|
|
3054
|
+
else if (this.headerTemplateCache.size > 0) {
|
|
3055
|
+
const headerKeys = Array.from(this.headerTemplateCache.keys());
|
|
3056
|
+
const arrayColumnsConfig = headerKeys.map(key => (Object.assign({}, { accessor: key, header: key ? key.charAt(0).toUpperCase() + key.slice(1) : '' })));
|
|
3057
|
+
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
3058
|
+
}
|
|
3059
|
+
else if (this.parsedData.length > 0) {
|
|
3060
|
+
const firstRow = this.parsedData[0];
|
|
3061
|
+
const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
|
|
3062
|
+
accessor: key,
|
|
3063
|
+
header: key.charAt(0).toUpperCase() + key.slice(1),
|
|
3064
|
+
}));
|
|
3065
|
+
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
3018
3066
|
}
|
|
3019
3067
|
}
|
|
3020
|
-
|
|
3021
|
-
|
|
3068
|
+
deepEqual(a, b) {
|
|
3069
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
3022
3070
|
}
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3071
|
+
/**
|
|
3072
|
+
* Parses the data array and sets the state accordingly
|
|
3073
|
+
* @param {any[]} newValue - The new value of the data array.
|
|
3074
|
+
* @param {any[]} oldValue - The old value of the data array.
|
|
3075
|
+
*/
|
|
3076
|
+
parseDataArray(newValue, oldValue) {
|
|
3077
|
+
// Ensure both are arrays for proper comparison
|
|
3078
|
+
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
3079
|
+
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
3080
|
+
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
3081
|
+
return; // Deep comparison
|
|
3031
3082
|
}
|
|
3083
|
+
this.parsedData = Array.isArray(newValue) ? newValue : [];
|
|
3032
3084
|
}
|
|
3033
|
-
|
|
3034
|
-
|
|
3085
|
+
/**
|
|
3086
|
+
* Parses the columns array and sets the state accordingly
|
|
3087
|
+
* @param {Column[]} newValue - The new value of the columns array.
|
|
3088
|
+
* @param {Column[]} oldValue - The old value of the columns array.
|
|
3089
|
+
*/
|
|
3090
|
+
parseColumnsArray(newValue, oldValue) {
|
|
3091
|
+
// Ensure both are arrays for proper comparison
|
|
3092
|
+
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
3093
|
+
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
3094
|
+
// Use a proper deep comparison function (e.g., Lodash's isEqual)
|
|
3095
|
+
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
3096
|
+
return;
|
|
3097
|
+
}
|
|
3098
|
+
// Assign only after confirming changes
|
|
3099
|
+
this.parsedColumns = safeNewValue;
|
|
3035
3100
|
}
|
|
3036
|
-
//#endregion WATCHERS
|
|
3037
|
-
/****************************************************************************/
|
|
3038
|
-
//#region METHODS
|
|
3039
3101
|
initializeTable() {
|
|
3040
3102
|
// Clear the previous table instance (if any)
|
|
3041
3103
|
this.table = null;
|
|
@@ -3070,170 +3132,268 @@ const NvDatagrid = class {
|
|
|
3070
3132
|
}, // Default: no column sizing info
|
|
3071
3133
|
},
|
|
3072
3134
|
};
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
const
|
|
3078
|
-
|
|
3079
|
-
// Use defined columns
|
|
3080
|
-
return validColumns.map(column => columnHelper.accessor(column.accessor, {
|
|
3081
|
-
header: column.header,
|
|
3082
|
-
cell: info => info.getValue(),
|
|
3083
|
-
}));
|
|
3084
|
-
}
|
|
3085
|
-
else if (tableOptions.data && tableOptions.data.length > 0) {
|
|
3086
|
-
// Generate columns from data keys
|
|
3087
|
-
const sampleRow = tableOptions.data[0];
|
|
3088
|
-
return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
|
|
3089
|
-
header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
3090
|
-
cell: info => info.getValue(),
|
|
3091
|
-
}));
|
|
3092
|
-
}
|
|
3093
|
-
else {
|
|
3094
|
-
// No columns and no data
|
|
3095
|
-
return [];
|
|
3096
|
-
}
|
|
3097
|
-
};
|
|
3098
|
-
const setTableData = () => {
|
|
3099
|
-
if (this.parsedData &&
|
|
3135
|
+
if (this.parsedColumns.length > 0) {
|
|
3136
|
+
// Validate and generate column definitions
|
|
3137
|
+
const validColumns = this.parsedColumns.filter(column => (column === null || column === void 0 ? void 0 : column.accessor) && (column === null || column === void 0 ? void 0 : column.header));
|
|
3138
|
+
// Update tableOptions based on parsed data and columns
|
|
3139
|
+
const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
|
|
3140
|
+
const hasData = this.parsedData &&
|
|
3100
3141
|
Array.isArray(this.parsedData) &&
|
|
3101
|
-
this.parsedData.length > 0
|
|
3102
|
-
|
|
3142
|
+
this.parsedData.length > 0;
|
|
3143
|
+
if (!hasColumns && !hasData) ;
|
|
3144
|
+
else if (hasColumns && !hasData) {
|
|
3145
|
+
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
3103
3146
|
}
|
|
3104
3147
|
else {
|
|
3105
|
-
|
|
3148
|
+
// Both columns and data are available
|
|
3149
|
+
// No columns and data is available
|
|
3150
|
+
tableOptions.data = this.getTableData();
|
|
3151
|
+
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
3106
3152
|
}
|
|
3107
|
-
};
|
|
3108
|
-
// Update tableOptions based on parsed data and columns
|
|
3109
|
-
const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
|
|
3110
|
-
const hasData = (this.parsedData &&
|
|
3111
|
-
Array.isArray(this.parsedData) &&
|
|
3112
|
-
this.parsedData.length > 0) ||
|
|
3113
|
-
this.hasSlotBody;
|
|
3114
|
-
if (!hasColumns && !hasData) ;
|
|
3115
|
-
else if (hasColumns && !hasData) {
|
|
3116
|
-
tableOptions.columns = generateColumns();
|
|
3117
|
-
}
|
|
3118
|
-
else {
|
|
3119
|
-
// Both columns and data are available
|
|
3120
|
-
// No columns and data is available
|
|
3121
|
-
tableOptions.data = setTableData();
|
|
3122
|
-
tableOptions.columns = generateColumns();
|
|
3123
3153
|
}
|
|
3124
3154
|
// Initialize the table
|
|
3125
3155
|
this.table = createTable(tableOptions);
|
|
3126
3156
|
}
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3157
|
+
// Helper function to generate column definitions
|
|
3158
|
+
generateColumns(validColumns, tableOptions) {
|
|
3159
|
+
const columnHelper = createColumnHelper();
|
|
3160
|
+
if (validColumns.length > 0) {
|
|
3161
|
+
// Use defined columns
|
|
3162
|
+
return validColumns.map(column => columnHelper.accessor(column.accessor, {
|
|
3163
|
+
header: column.header,
|
|
3164
|
+
cell: info => info.getValue(),
|
|
3165
|
+
}));
|
|
3166
|
+
}
|
|
3167
|
+
else if (tableOptions.data && tableOptions.data.length > 0) {
|
|
3168
|
+
// Generate columns from data keys
|
|
3169
|
+
const sampleRow = tableOptions.data[0];
|
|
3170
|
+
return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
|
|
3171
|
+
header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
3172
|
+
cell: info => info.getValue(),
|
|
3173
|
+
}));
|
|
3174
|
+
}
|
|
3175
|
+
else {
|
|
3176
|
+
// No columns and no data
|
|
3177
|
+
return [];
|
|
3178
|
+
}
|
|
3136
3179
|
}
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
return;
|
|
3145
|
-
|
|
3180
|
+
getTableData() {
|
|
3181
|
+
if (this.parsedData &&
|
|
3182
|
+
Array.isArray(this.parsedData) &&
|
|
3183
|
+
this.parsedData.length > 0) {
|
|
3184
|
+
return [...this.parsedData];
|
|
3185
|
+
}
|
|
3186
|
+
else {
|
|
3187
|
+
return [];
|
|
3188
|
+
}
|
|
3146
3189
|
}
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
componentWillLoad() {
|
|
3151
|
-
this.hasSlotHead = !!this.el.querySelector('[slot="head"]');
|
|
3152
|
-
if (this.hasSlotHead) {
|
|
3153
|
-
const headSlot = this.el.querySelector('[slot="head"]');
|
|
3154
|
-
const headSlotRows = this.hasSlotHead
|
|
3155
|
-
? Array.from(headSlot.querySelectorAll('nv-datagridrow'))
|
|
3156
|
-
: [];
|
|
3157
|
-
const mappedRows = headSlotRows.map(row => {
|
|
3158
|
-
const cells = Array.from(row.querySelectorAll('nv-datagridcolumn'));
|
|
3159
|
-
return cells.map(cell => ({
|
|
3160
|
-
header: cell.getAttribute('header') || '',
|
|
3161
|
-
accessor: cell.getAttribute('accessor') || '',
|
|
3162
|
-
}));
|
|
3163
|
-
});
|
|
3164
|
-
// Flatten the nested arrays into a single array of columns
|
|
3165
|
-
const flatMappedColumns = mappedRows.flat();
|
|
3166
|
-
this.parsedColumns = flatMappedColumns;
|
|
3190
|
+
renderTemplate(template, cellValue, row) {
|
|
3191
|
+
if (!template) {
|
|
3192
|
+
return null;
|
|
3167
3193
|
}
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3194
|
+
// Handle <template> elements correctly
|
|
3195
|
+
const templateContent = template instanceof HTMLTemplateElement ? template.content : template;
|
|
3196
|
+
const element = dom_utils.deepCopyElement(templateContent);
|
|
3197
|
+
// Replace placeholders in text content, attributes, and properties
|
|
3198
|
+
element.querySelectorAll('*').forEach(el => {
|
|
3199
|
+
// Replace placeholders in text content
|
|
3200
|
+
this.replacePlaceholdersTextContent(el, cellValue);
|
|
3201
|
+
// Replace placeholders in attributes
|
|
3202
|
+
this.replacePlaceholdersAttributes(el, cellValue);
|
|
3203
|
+
// Replace placeholders in properties
|
|
3204
|
+
this.replacePlaceholdersProperties(el, cellValue);
|
|
3205
|
+
});
|
|
3206
|
+
// Handle `data-bind-event`
|
|
3207
|
+
element.querySelectorAll('[data-bind-event]').forEach(el => {
|
|
3208
|
+
const bindEvent = el.getAttribute('data-bind-event') || '';
|
|
3209
|
+
const splitted = bindEvent.split(':');
|
|
3210
|
+
if (!bindEvent.includes(':') || splitted.length < 2) {
|
|
3211
|
+
console.warn('Invalid data-bind-event format:', bindEvent);
|
|
3212
|
+
return;
|
|
3213
|
+
}
|
|
3214
|
+
const eventType = splitted[0];
|
|
3215
|
+
const keyAction = splitted[1];
|
|
3216
|
+
const details = splitted.length > 2 ? splitted[2] : null;
|
|
3217
|
+
el.addEventListener(eventType, () => {
|
|
3218
|
+
var _a;
|
|
3219
|
+
const keys = (_a = details === null || details === void 0 ? void 0 : details.split(',')) !== null && _a !== void 0 ? _a : [];
|
|
3220
|
+
// Convert keys into a single object instead of an array of objects
|
|
3221
|
+
const keyValue = keys.reduce((acc, key) => {
|
|
3222
|
+
var _a;
|
|
3223
|
+
if (row === null || row === void 0 ? void 0 : row.original) {
|
|
3224
|
+
if (key in row.original) {
|
|
3225
|
+
acc[key] = (_a = row.original) === null || _a === void 0 ? void 0 : _a[key];
|
|
3226
|
+
}
|
|
3227
|
+
}
|
|
3228
|
+
return acc;
|
|
3229
|
+
}, {});
|
|
3230
|
+
const action = { keyAction, details: keyValue };
|
|
3231
|
+
this.action.emit(action);
|
|
3232
|
+
});
|
|
3233
|
+
});
|
|
3234
|
+
// Ensure Web Components are properly connected
|
|
3235
|
+
setTimeout(() => {
|
|
3236
|
+
element.querySelectorAll('*').forEach(child => {
|
|
3237
|
+
if (typeof child.connectedCallback === 'function') {
|
|
3238
|
+
child.connectedCallback();
|
|
3239
|
+
}
|
|
3182
3240
|
});
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3241
|
+
}, 0);
|
|
3242
|
+
return (index.h("div", { ref: el => {
|
|
3243
|
+
if (el) {
|
|
3244
|
+
el.innerHTML = ''; // Remove existing content
|
|
3245
|
+
el.appendChild(element); // Append new element
|
|
3246
|
+
}
|
|
3247
|
+
} }));
|
|
3248
|
+
}
|
|
3249
|
+
replaceKeyWithValue(key, cellValue) {
|
|
3250
|
+
var _a;
|
|
3251
|
+
// Handle undefined or null values by returning the fallback
|
|
3252
|
+
if (cellValue === undefined || cellValue === null) {
|
|
3253
|
+
return this.fallbackValue;
|
|
3189
3254
|
}
|
|
3190
|
-
|
|
3191
|
-
|
|
3255
|
+
// If cellValue is an object, attempt to retrieve the value
|
|
3256
|
+
if (typeof cellValue === 'object') {
|
|
3257
|
+
// Handle nested key paths (e.g., "user.name")
|
|
3258
|
+
if (key.includes('.')) {
|
|
3259
|
+
const resolvedValue = key.split('.').reduce((acc, keyPart) => {
|
|
3260
|
+
if (acc && acc[keyPart] !== undefined) {
|
|
3261
|
+
return acc[keyPart];
|
|
3262
|
+
}
|
|
3263
|
+
else {
|
|
3264
|
+
return undefined;
|
|
3265
|
+
}
|
|
3266
|
+
}, cellValue);
|
|
3267
|
+
if (resolvedValue !== undefined) {
|
|
3268
|
+
return String(resolvedValue);
|
|
3269
|
+
}
|
|
3270
|
+
else {
|
|
3271
|
+
const firstLevelKey = key.split('.')[0];
|
|
3272
|
+
const rest = key.substring(firstLevelKey.length + 1);
|
|
3273
|
+
const response = this.replaceKeyWithValue(rest, cellValue);
|
|
3274
|
+
if (response !== this.fallbackValue) {
|
|
3275
|
+
return response;
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
}
|
|
3279
|
+
// Handle single-level key lookup
|
|
3280
|
+
return key in cellValue ? String(cellValue[key]) : this.fallbackValue;
|
|
3192
3281
|
}
|
|
3193
|
-
|
|
3194
|
-
|
|
3282
|
+
// If cellValue is a primitive (string, number, boolean, etc.), return it as a string
|
|
3283
|
+
return (_a = cellValue === null || cellValue === void 0 ? void 0 : cellValue.toString()) !== null && _a !== void 0 ? _a : this.fallbackValue;
|
|
3284
|
+
}
|
|
3285
|
+
replacePlaceholdersTextContent(element, cellValue) {
|
|
3286
|
+
// ✅ Replace placeholders in text content
|
|
3287
|
+
element.childNodes.forEach(node => {
|
|
3288
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
3289
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
3290
|
+
}
|
|
3291
|
+
});
|
|
3292
|
+
}
|
|
3293
|
+
replacePlaceholdersAttributes(element, cellValue) {
|
|
3294
|
+
// ✅ Replace placeholders in attributes
|
|
3295
|
+
Array.from(element.attributes).forEach(attr => {
|
|
3296
|
+
if (attr.value.includes('__')) {
|
|
3297
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
3298
|
+
}
|
|
3299
|
+
});
|
|
3300
|
+
}
|
|
3301
|
+
replacePlaceholdersProperties(element, cellValue) {
|
|
3302
|
+
// ✅ Dynamically extract relevant properties
|
|
3303
|
+
const properties = new Set();
|
|
3304
|
+
// Collect only own enumerable properties
|
|
3305
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
3306
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
3307
|
+
let proto = Object.getPrototypeOf(element);
|
|
3308
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
3309
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
3310
|
+
proto = Object.getPrototypeOf(proto);
|
|
3195
3311
|
}
|
|
3196
|
-
|
|
3197
|
-
|
|
3312
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
3313
|
+
properties.forEach(prop => {
|
|
3314
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
3315
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
3316
|
+
!dom_utils.excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
3317
|
+
) {
|
|
3318
|
+
try {
|
|
3319
|
+
const propValue = element[prop];
|
|
3320
|
+
// ✅ Replace placeholders only if the value is a string
|
|
3321
|
+
if (typeof propValue === 'string' && propValue.includes('__')) {
|
|
3322
|
+
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue)); // ✅ TypeScript safe
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
catch (error) {
|
|
3326
|
+
console.warn(`Could not assign property ${prop}:`, error.message);
|
|
3327
|
+
}
|
|
3328
|
+
}
|
|
3329
|
+
});
|
|
3330
|
+
}
|
|
3331
|
+
//#endregion METHODS
|
|
3332
|
+
/****************************************************************************/
|
|
3333
|
+
//#region WATCHERS
|
|
3334
|
+
parseColumns(newValue, oldValue = []) {
|
|
3335
|
+
this.parseColumnsArray(newValue, oldValue);
|
|
3336
|
+
}
|
|
3337
|
+
parseJsonColumns(newValue, oldValue) {
|
|
3338
|
+
try {
|
|
3339
|
+
const newItems = newValue ? JSON.parse(newValue) : [];
|
|
3340
|
+
this.parseColumnsArray(newItems, oldValue);
|
|
3198
3341
|
}
|
|
3199
|
-
|
|
3200
|
-
|
|
3342
|
+
catch (e) {
|
|
3343
|
+
console.error('Invalid JSON format for columnsJson:', e.message);
|
|
3344
|
+
this.parsedColumns = [];
|
|
3201
3345
|
}
|
|
3202
3346
|
}
|
|
3203
|
-
|
|
3347
|
+
parseData(newValue, oldValue = []) {
|
|
3348
|
+
this.parseDataArray(newValue, oldValue);
|
|
3349
|
+
}
|
|
3350
|
+
parseJsonData(newValue) {
|
|
3351
|
+
try {
|
|
3352
|
+
const newItems = newValue ? JSON.parse(newValue) : [];
|
|
3353
|
+
this.parseDataArray(newItems, this.parsedData);
|
|
3354
|
+
}
|
|
3355
|
+
catch (e) {
|
|
3356
|
+
console.error('Invalid JSON format for dataJson:', e.message);
|
|
3357
|
+
this.parsedData = [];
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
handleParsedChange() {
|
|
3204
3361
|
this.initializeTable();
|
|
3205
3362
|
}
|
|
3206
|
-
//#endregion
|
|
3363
|
+
//#endregion WATCHERS
|
|
3364
|
+
/****************************************************************************/
|
|
3365
|
+
//#region LIFECYCLE
|
|
3366
|
+
componentWillLoad() {
|
|
3367
|
+
this.cacheTemplates();
|
|
3368
|
+
this.parseDataAndColumns();
|
|
3369
|
+
}
|
|
3370
|
+
//#endregion EVENTS
|
|
3207
3371
|
/****************************************************************************/
|
|
3208
3372
|
//#region RENDER
|
|
3209
3373
|
render() {
|
|
3210
3374
|
var _a, _b, _c;
|
|
3211
|
-
const headerGroups = !this.table ||
|
|
3212
|
-
this.table === undefined ||
|
|
3213
|
-
(this.parsedColumns.length === 0 && !this.hasSlotHead)
|
|
3375
|
+
const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
|
|
3214
3376
|
? []
|
|
3215
3377
|
: (_a = this.table) === null || _a === void 0 ? void 0 : _a.getHeaderGroups();
|
|
3216
|
-
const rows = !this.table ||
|
|
3217
|
-
this.table === undefined ||
|
|
3218
|
-
(this.parsedData.length === 0 && !this.hasSlotBody)
|
|
3378
|
+
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
3219
3379
|
? []
|
|
3220
3380
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
3221
|
-
return (index.h(index.Host, { key: '
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
: null)), index.h("tbody", null, !rows || rows.length === 0 ? (index.h("tr", null, index.h("td", { colSpan: this.parsedColumns.length || 12 }, this.noDataMessage))) : (rows.map(row => {
|
|
3381
|
+
return (index.h(index.Host, { key: '03dc8123cf740c6b5eeb59f10443a2ec1b279f28' }, index.h("div", { key: '263fef353246dba3adb0a44b4e80ff5a4c2e97eb', class: "hidden" }, index.h("slot", { key: '3d2f02044ad8e09fb010cb0486f63b48e1048acf' })), index.h("slot", { key: 'e5b458c755eb6887d1fdb959b8883f4d48c5b2f9', name: "before" }), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", null, this.parsedColumns.length > 0 && headerGroups
|
|
3382
|
+
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (index.h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
3383
|
+
return (index.h("th", { key: header.id }, header.isPlaceholder
|
|
3384
|
+
? null
|
|
3385
|
+
: this.renderTemplate(this.headerTemplateCache.get(header.id), {}) || header.column.columnDef.header));
|
|
3386
|
+
}))))
|
|
3387
|
+
: null)), index.h("tbody", null, !rows || rows.length === 0 || this.parsedData.length === 0 ? (index.h("tr", null, index.h("td", { colSpan: this.parsedColumns.length || 12, class: "no-data" }, this.noDataMessage))) : (rows.map(row => {
|
|
3229
3388
|
const rowId = row.id;
|
|
3230
3389
|
const visibleCells = row === null || row === void 0 ? void 0 : row.getVisibleCells();
|
|
3231
|
-
|
|
3390
|
+
return (index.h("tr", { key: rowId }, visibleCells.map(cell => {
|
|
3391
|
+
const cellAccessors = cell.column.id;
|
|
3232
3392
|
const cellValue = cell.getValue();
|
|
3233
|
-
return
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
}))))), index.h("slot", { key: '
|
|
3393
|
+
return (index.h("td", { key: cell.id, "data-row-id": rowId }, this.renderTemplate(this.templateCache.get(cellAccessors), cellValue, row) ||
|
|
3394
|
+
(cellValue !== null && cellValue !== void 0 ? cellValue : this.fallbackValue)));
|
|
3395
|
+
})));
|
|
3396
|
+
}))))), index.h("slot", { key: 'e80f9b8a5dbda4c05b719a99c173e2f106449668', name: "after" })));
|
|
3237
3397
|
}
|
|
3238
3398
|
get el() { return index.getElement(this); }
|
|
3239
3399
|
static get watchers() { return {
|