@nova-design-system/nova-webcomponents 3.15.0 → 3.17.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.
- package/dist/cjs/{index-c56424e5.js → index-93d3b2f8.js} +9 -6
- package/dist/cjs/index-93d3b2f8.js.map +1 -0
- package/dist/cjs/index.cjs.js +6 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/native.cjs.js +2 -2
- package/dist/cjs/nv-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-accordion.cjs.entry.js +6 -6
- package/dist/cjs/nv-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +2 -2
- 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-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/nv-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +3 -9
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-buttongroup.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +177 -10
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +32 -29
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +51 -26
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +68 -42
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +33 -7
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +187 -156
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldslider.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +25 -12
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menu.cjs.entry.js +24 -9
- 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-notification.cjs.entry.js +2 -2
- package/dist/cjs/nv-notification.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-notificationcontainer.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +67 -61
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-split.cjs.entry.js +339 -0
- package/dist/cjs/nv-split.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-stack.cjs.entry.js +2 -2
- package/dist/cjs/nv-table.cjs.entry.js +216 -310
- package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/nv-accordion/nv-accordion.js +12 -9
- package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -1
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
- package/dist/collection/components/nv-accordion-item/styles/nv-accordion-item.css +1 -1
- package/dist/collection/components/nv-alert/nv-alert.css +1 -1
- package/dist/collection/components/nv-avatar/nv-avatar.css +1 -1
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.css +1 -1
- package/dist/collection/components/nv-button/nv-button.js +1 -13
- package/dist/collection/components/nv-button/nv-button.js.map +1 -1
- package/dist/collection/components/nv-button/styles/nv-button.css +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +2 -2
- package/dist/collection/components/nv-dialog/nv-dialog.css +2 -2
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +13 -0
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +30 -27
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.css +4 -4
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +3 -3
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +49 -24
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +8 -8
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +66 -43
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +8 -8
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +26 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +32 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +9 -9
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +186 -153
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +9 -9
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +8 -8
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +8 -8
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.css +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +12 -12
- package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +7 -7
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +8 -8
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +9 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +8 -8
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +22 -0
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +24 -9
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +8 -8
- package/dist/collection/components/nv-icon/nv-icons.js +6 -1
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +2 -2
- package/dist/collection/components/nv-menu/nv-menu.docs.js +7 -0
- package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +26 -8
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/collection/components/nv-notification/styles/nv-notification.css +2 -2
- package/dist/collection/components/nv-popover/nv-popover.docs.js +11 -0
- package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +66 -60
- package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
- package/dist/collection/components/nv-split/nv-split.docs.js +41 -0
- package/dist/collection/components/nv-split/nv-split.docs.js.map +1 -0
- package/dist/collection/components/nv-split/nv-split.js +549 -0
- package/dist/collection/components/nv-split/nv-split.js.map +1 -0
- package/dist/collection/components/nv-split/styles/nv-split.css +96 -0
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.docs.js +16 -155
- package/dist/collection/components/nv-table/nv-table.docs.js.map +1 -1
- package/dist/collection/components/nv-table/nv-table.js +68 -496
- package/dist/collection/components/nv-table/nv-table.js.map +1 -1
- package/dist/collection/components/nv-table/nv-table.utils.js +175 -0
- package/dist/collection/components/nv-table/nv-table.utils.js.map +1 -0
- package/dist/collection/components/nv-table/styles/nv-table.css +84 -0
- package/dist/collection/components/nv-table/test/nv-table.utils.test.js +604 -0
- package/dist/collection/components/nv-table/test/nv-table.utils.test.js.map +1 -0
- package/dist/collection/components/nv-toggle/nv-toggle.css +3 -3
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +1 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -3
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js.map +1 -1
- package/dist/components/index.js +7 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +10 -10
- package/dist/components/nv-accordion.js.map +1 -1
- package/dist/components/nv-alert.js +3 -3
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +3 -3
- package/dist/components/nv-avatar.js.map +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +4 -4
- package/dist/components/nv-breadcrumb.js.map +1 -1
- package/dist/components/nv-breadcrumbs.js +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-buttongroup.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +174 -7
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridcolumn.js +1 -1
- package/dist/components/nv-dialog.js +37 -34
- 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-fielddate.js +57 -32
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +74 -48
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +40 -13
- package/dist/components/nv-fielddropdown.js.map +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +196 -164
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +5 -5
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +2 -2
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +5 -5
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldslider.js +6 -6
- package/dist/components/nv-fieldslider.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +2 -2
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtime.js +31 -17
- package/dist/components/nv-fieldtime.js.map +1 -1
- 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 +30 -13
- package/dist/components/nv-menu.js.map +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-notification.js +3 -3
- package/dist/components/nv-notification.js.map +1 -1
- package/dist/components/nv-notificationcontainer.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/{nv-tablecolumn.d.ts → nv-split.d.ts} +4 -4
- package/dist/components/nv-split.js +366 -0
- package/dist/components/nv-split.js.map +1 -0
- package/dist/components/nv-stack.js +2 -2
- package/dist/components/nv-table.js +216 -328
- package/dist/components/nv-table.js.map +1 -1
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-toggle.js.map +1 -1
- package/dist/components/nv-togglebutton.js +1 -1
- package/dist/components/nv-togglebuttongroup.js +2 -2
- package/dist/components/nv-togglebuttongroup.js.map +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-00cbf2a1.js → p-0d5ed1d7.js} +3 -3
- package/dist/components/p-0d5ed1d7.js.map +1 -0
- package/dist/components/{p-54161bad.js → p-0e6f41c7.js} +2 -2
- package/dist/components/{p-54161bad.js.map → p-0e6f41c7.js.map} +1 -1
- package/dist/components/{p-0c42fafb.js → p-0fd23531.js} +6 -6
- package/dist/components/{p-0c42fafb.js.map → p-0fd23531.js.map} +1 -1
- package/dist/components/{p-a823b8e9.js → p-1639703f.js} +2 -2
- package/dist/components/{p-a823b8e9.js.map → p-1639703f.js.map} +1 -1
- package/dist/components/{p-e5c62ea8.js → p-2cc83e0c.js} +3 -3
- package/dist/components/{p-e5c62ea8.js.map → p-2cc83e0c.js.map} +1 -1
- package/dist/components/{p-3763c9c4.js → p-31478080.js} +3 -3
- package/dist/components/{p-3763c9c4.js.map → p-31478080.js.map} +1 -1
- package/dist/components/{p-178fa27e.js → p-378e3127.js} +6 -6
- package/dist/components/{p-178fa27e.js.map → p-378e3127.js.map} +1 -1
- package/dist/components/{p-51876ca1.js → p-429e01f3.js} +3 -3
- package/dist/components/p-429e01f3.js.map +1 -0
- package/dist/components/p-47d499b4.js +88 -0
- package/dist/components/p-47d499b4.js.map +1 -0
- package/dist/components/{p-aff3ed68.js → p-5829b9f7.js} +5 -2
- package/dist/components/p-5829b9f7.js.map +1 -0
- package/dist/components/{p-ee8944f3.js → p-63595ea1.js} +68 -62
- package/dist/components/p-63595ea1.js.map +1 -0
- package/dist/components/{p-1af3591a.js → p-6f2b257e.js} +3 -3
- package/dist/components/{p-1af3591a.js.map → p-6f2b257e.js.map} +1 -1
- package/dist/components/{p-4fc01a78.js → p-7112612c.js} +5 -5
- package/dist/components/p-7112612c.js.map +1 -0
- package/dist/components/{p-7426b20f.js → p-715e5235.js} +3 -3
- package/dist/components/{p-7426b20f.js.map → p-715e5235.js.map} +1 -1
- package/dist/components/{p-31e262bd.js → p-7b5102c8.js} +5 -5
- package/dist/components/{p-31e262bd.js.map → p-7b5102c8.js.map} +1 -1
- package/dist/components/{p-fda58a76.js → p-98429fd7.js} +2 -2
- package/dist/components/{p-fda58a76.js.map → p-98429fd7.js.map} +1 -1
- package/dist/components/p-9e7468e3.js +185 -0
- package/dist/components/p-9e7468e3.js.map +1 -0
- package/dist/components/{p-75200cc0.js → p-df5d76a5.js} +3 -3
- package/dist/components/{p-75200cc0.js.map → p-df5d76a5.js.map} +1 -1
- package/dist/components/{p-51459a44.js → p-f2bac2aa.js} +4 -4
- package/dist/components/{p-51459a44.js.map → p-f2bac2aa.js.map} +1 -1
- package/dist/esm/{index-a1936cd0.js → index-dc2723f3.js} +9 -6
- package/dist/esm/index-dc2723f3.js.map +1 -0
- package/dist/esm/index.js +6 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/native.js +3 -3
- package/dist/esm/nv-accordion-item.entry.js +2 -2
- package/dist/esm/nv-accordion-item.entry.js.map +1 -1
- package/dist/esm/nv-accordion.entry.js +6 -6
- package/dist/esm/nv-accordion.entry.js.map +1 -1
- package/dist/esm/nv-alert.entry.js +2 -2
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +2 -2
- package/dist/esm/nv-avatar.entry.js.map +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +2 -2
- package/dist/esm/nv-breadcrumb.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +3 -9
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-buttongroup.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +1 -1
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +172 -5
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +1 -1
- package/dist/esm/nv-dialog.entry.js +32 -29
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
- package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +2 -2
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddate.entry.js +51 -26
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +68 -42
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +33 -7
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +187 -156
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +2 -2
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +2 -2
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +2 -2
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +2 -2
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldslider.entry.js +2 -2
- package/dist/esm/nv-fieldslider.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +2 -2
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +2 -2
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +25 -12
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
- package/dist/esm/nv-menu.entry.js +24 -9
- package/dist/esm/nv-menu.entry.js.map +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-notification.entry.js +2 -2
- package/dist/esm/nv-notification.entry.js.map +1 -1
- package/dist/esm/nv-notificationcontainer.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +67 -61
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-split.entry.js +335 -0
- package/dist/esm/nv-split.entry.js.map +1 -0
- package/dist/esm/nv-stack.entry.js +2 -2
- package/dist/esm/nv-table.entry.js +216 -310
- package/dist/esm/nv-table.entry.js.map +1 -1
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js.map +1 -1
- package/dist/esm/nv-togglebutton.entry.js +1 -1
- package/dist/esm/nv-togglebuttongroup.entry.js +2 -2
- package/dist/esm/nv-togglebuttongroup.entry.js.map +1 -1
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +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-107e80c6.entry.js +2 -0
- package/dist/native/p-107e80c6.entry.js.map +1 -0
- package/dist/native/{p-5c697133.entry.js → p-112d096c.entry.js} +2 -2
- package/dist/native/p-14e622e1.entry.js +2 -0
- package/dist/native/p-14e622e1.entry.js.map +1 -0
- package/dist/native/p-217de553.entry.js +2 -0
- package/dist/native/p-217de553.entry.js.map +1 -0
- package/dist/native/{p-85f8f11a.entry.js → p-230af58a.entry.js} +2 -2
- package/dist/native/p-2364aefa.entry.js +2 -0
- package/dist/native/p-2364aefa.entry.js.map +1 -0
- package/dist/native/p-23ee0384.entry.js +2 -0
- package/dist/native/{p-29f68e07.entry.js.map → p-23ee0384.entry.js.map} +1 -1
- package/dist/native/p-26513cbd.entry.js +2 -0
- package/dist/native/p-26513cbd.entry.js.map +1 -0
- package/dist/native/p-278613a3.entry.js +2 -0
- package/dist/native/{p-6cb6679b.entry.js.map → p-278613a3.entry.js.map} +1 -1
- package/dist/native/p-2dfd786f.entry.js +2 -0
- package/dist/native/{p-29df974e.entry.js.map → p-2dfd786f.entry.js.map} +1 -1
- package/dist/native/{p-d0a33e64.js → p-3060df80.js} +3 -3
- package/dist/native/p-3060df80.js.map +1 -0
- package/dist/native/p-4dc7483d.entry.js +2 -0
- package/dist/native/{p-c7b7ffaf.entry.js.map → p-4dc7483d.entry.js.map} +1 -1
- package/dist/native/p-4eaf417d.entry.js +13 -0
- package/dist/native/p-4eaf417d.entry.js.map +1 -0
- package/dist/native/p-5039ceb8.entry.js +2 -0
- package/dist/native/p-5039ceb8.entry.js.map +1 -0
- package/dist/native/{p-08322093.entry.js → p-52d2c0ae.entry.js} +2 -2
- package/dist/native/p-638967bf.entry.js +2 -0
- package/dist/native/p-638967bf.entry.js.map +1 -0
- package/dist/native/{p-19090193.entry.js → p-647a0765.entry.js} +2 -2
- package/dist/native/p-68dc02be.entry.js +2 -0
- package/dist/native/p-68dc02be.entry.js.map +1 -0
- package/dist/native/p-6d427897.entry.js +2 -0
- package/dist/native/{p-92931ab8.entry.js.map → p-6d427897.entry.js.map} +1 -1
- package/dist/native/{p-1504e28b.entry.js → p-701b48a4.entry.js} +2 -2
- package/dist/native/p-7c9bf981.entry.js +2 -0
- package/dist/native/p-835abdb9.entry.js +2 -0
- package/dist/native/{p-f5120223.entry.js.map → p-835abdb9.entry.js.map} +1 -1
- package/dist/native/{p-464bb197.entry.js → p-83765537.entry.js} +2 -2
- package/dist/native/p-88f9fca5.entry.js +2 -0
- package/dist/native/p-88f9fca5.entry.js.map +1 -0
- package/dist/native/{p-d2c9247b.entry.js → p-8e423742.entry.js} +3 -3
- package/dist/native/{p-d2c9247b.entry.js.map → p-8e423742.entry.js.map} +1 -1
- package/dist/native/{p-d882f417.entry.js → p-91fab6c2.entry.js} +2 -2
- package/dist/native/p-91fab6c2.entry.js.map +1 -0
- package/dist/native/p-95184ea2.entry.js +2 -0
- package/dist/native/p-95184ea2.entry.js.map +1 -0
- package/dist/native/p-9613087c.entry.js +2 -0
- package/dist/native/{p-2781637d.entry.js.map → p-9613087c.entry.js.map} +1 -1
- package/dist/native/{p-94dc9c41.entry.js → p-9d7e099f.entry.js} +2 -2
- package/dist/native/p-a6fc987a.entry.js +2 -0
- package/dist/native/p-a6fc987a.entry.js.map +1 -0
- package/dist/native/{p-1235c007.entry.js → p-acabac31.entry.js} +2 -2
- package/dist/native/p-acada158.entry.js +2 -0
- package/dist/native/p-acada158.entry.js.map +1 -0
- package/dist/native/p-b06f0e61.entry.js +2 -0
- package/dist/native/p-b06f0e61.entry.js.map +1 -0
- package/dist/native/p-b4c15f25.entry.js +2 -0
- package/dist/native/p-b4c15f25.entry.js.map +1 -0
- package/dist/native/{p-74b129e9.entry.js → p-bcf41cd0.entry.js} +2 -2
- package/dist/native/{p-c66565f8.entry.js → p-cb0293ec.entry.js} +2 -2
- package/dist/native/p-ce97ce24.entry.js +2 -0
- package/dist/native/p-ce97ce24.entry.js.map +1 -0
- package/dist/native/p-d0db5e72.entry.js +2 -0
- package/dist/native/p-d0db5e72.entry.js.map +1 -0
- package/dist/native/p-d7f444fb.entry.js +2 -0
- package/dist/native/p-d7f444fb.entry.js.map +1 -0
- package/dist/native/p-d878e90a.entry.js +2 -0
- package/dist/native/p-d878e90a.entry.js.map +1 -0
- package/dist/native/{p-e2c99ce2.entry.js → p-d94bf052.entry.js} +2 -2
- package/dist/native/p-ddc41f1f.entry.js +2 -0
- package/dist/native/p-ddc41f1f.entry.js.map +1 -0
- package/dist/native/p-f30e0be6.entry.js +2 -0
- package/dist/native/p-f30e0be6.entry.js.map +1 -0
- package/dist/native/p-f3c73492.entry.js +2 -0
- package/dist/native/{p-b32d0a5a.entry.js.map → p-f3c73492.entry.js.map} +1 -1
- package/dist/native/{p-9c5d6827.entry.js → p-fa78d8eb.entry.js} +2 -2
- package/dist/types/components/nv-accordion/nv-accordion.d.ts +2 -4
- package/dist/types/components/nv-button/nv-button.d.ts +0 -1
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +9 -8
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +6 -3
- package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +5 -4
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +3 -1
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +12 -11
- package/dist/types/components/nv-fieldtime/nv-fieldtime.d.ts +1 -0
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-menu/nv-menu.d.ts +4 -1
- package/dist/types/components/nv-popover/nv-popover.d.ts +10 -8
- package/dist/types/components/nv-split/nv-split.d.ts +128 -0
- package/dist/types/components/nv-split/nv-split.docs.d.ts +4 -0
- package/dist/types/components/nv-table/nv-table.d.ts +6 -87
- package/dist/types/components/nv-table/nv-table.utils.d.ts +129 -0
- package/dist/types/components/nv-table/test/nv-table.utils.test.d.ts +1 -0
- package/dist/types/components/nv-togglebuttongroup/nv-togglebuttongroup.d.ts +0 -2
- package/dist/types/components.d.ts +102 -200
- package/dist/vscode-data.json +43 -41
- package/hydrate/index.js +1148 -783
- package/hydrate/index.mjs +1148 -783
- package/package.json +10 -10
- package/dist/cjs/dom.utils-4d43f69a.js +0 -170
- package/dist/cjs/dom.utils-4d43f69a.js.map +0 -1
- package/dist/cjs/index-c56424e5.js.map +0 -1
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +0 -21
- package/dist/cjs/nv-tablecolumn.cjs.entry.js.map +0 -1
- package/dist/collection/components/nv-table/nv-table.css +0 -35
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.docs.js +0 -6
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.docs.js.map +0 -1
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js +0 -52
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js.map +0 -1
- package/dist/components/nv-tablecolumn.js +0 -38
- package/dist/components/nv-tablecolumn.js.map +0 -1
- package/dist/components/p-00cbf2a1.js.map +0 -1
- package/dist/components/p-4fc01a78.js.map +0 -1
- package/dist/components/p-51876ca1.js.map +0 -1
- package/dist/components/p-5d14ba3f.js +0 -88
- package/dist/components/p-5d14ba3f.js.map +0 -1
- package/dist/components/p-95857e4f.js +0 -191
- package/dist/components/p-95857e4f.js.map +0 -1
- package/dist/components/p-aff3ed68.js.map +0 -1
- package/dist/components/p-cb34aa4f.js +0 -167
- package/dist/components/p-cb34aa4f.js.map +0 -1
- package/dist/components/p-ee8944f3.js.map +0 -1
- package/dist/esm/dom.utils-ac71e0ef.js +0 -167
- package/dist/esm/dom.utils-ac71e0ef.js.map +0 -1
- package/dist/esm/index-a1936cd0.js.map +0 -1
- package/dist/esm/nv-tablecolumn.entry.js +0 -17
- package/dist/esm/nv-tablecolumn.entry.js.map +0 -1
- package/dist/native/p-0a99c6fb.entry.js +0 -2
- package/dist/native/p-0a99c6fb.entry.js.map +0 -1
- package/dist/native/p-1ad1bff9.entry.js +0 -2
- package/dist/native/p-1ad1bff9.entry.js.map +0 -1
- package/dist/native/p-1c83f540.entry.js +0 -2
- package/dist/native/p-1c83f540.entry.js.map +0 -1
- package/dist/native/p-224b1a01.entry.js +0 -2
- package/dist/native/p-224b1a01.entry.js.map +0 -1
- package/dist/native/p-234cfa2e.entry.js +0 -2
- package/dist/native/p-2781637d.entry.js +0 -2
- package/dist/native/p-29df974e.entry.js +0 -2
- package/dist/native/p-29f68e07.entry.js +0 -2
- package/dist/native/p-45506c37.entry.js +0 -2
- package/dist/native/p-45506c37.entry.js.map +0 -1
- package/dist/native/p-48774d0c.entry.js +0 -13
- package/dist/native/p-48774d0c.entry.js.map +0 -1
- package/dist/native/p-4ec61dec.entry.js +0 -2
- package/dist/native/p-4ec61dec.entry.js.map +0 -1
- package/dist/native/p-5f0776cb.entry.js +0 -2
- package/dist/native/p-5f0776cb.entry.js.map +0 -1
- package/dist/native/p-6c7a9a21.entry.js +0 -2
- package/dist/native/p-6c7a9a21.entry.js.map +0 -1
- package/dist/native/p-6cb6679b.entry.js +0 -2
- package/dist/native/p-6d13a851.entry.js +0 -2
- package/dist/native/p-6d13a851.entry.js.map +0 -1
- package/dist/native/p-87784622.entry.js +0 -2
- package/dist/native/p-87784622.entry.js.map +0 -1
- package/dist/native/p-92931ab8.entry.js +0 -2
- package/dist/native/p-9a46baa9.entry.js +0 -2
- package/dist/native/p-9a46baa9.entry.js.map +0 -1
- package/dist/native/p-a34beedf.entry.js +0 -2
- package/dist/native/p-a34beedf.entry.js.map +0 -1
- package/dist/native/p-a69dbcef.entry.js +0 -2
- package/dist/native/p-a69dbcef.entry.js.map +0 -1
- package/dist/native/p-b32d0a5a.entry.js +0 -2
- package/dist/native/p-bc01787b.entry.js +0 -2
- package/dist/native/p-bc01787b.entry.js.map +0 -1
- package/dist/native/p-c7b7ffaf.entry.js +0 -2
- package/dist/native/p-cb34aa4f.js +0 -2
- package/dist/native/p-cb34aa4f.js.map +0 -1
- package/dist/native/p-cea942b9.entry.js +0 -2
- package/dist/native/p-cea942b9.entry.js.map +0 -1
- package/dist/native/p-d0a33e64.js.map +0 -1
- package/dist/native/p-d0ef1bbb.entry.js +0 -2
- package/dist/native/p-d0ef1bbb.entry.js.map +0 -1
- package/dist/native/p-d882f417.entry.js.map +0 -1
- package/dist/native/p-dd023fd6.entry.js +0 -2
- package/dist/native/p-dd023fd6.entry.js.map +0 -1
- package/dist/native/p-e765a624.entry.js +0 -2
- package/dist/native/p-e765a624.entry.js.map +0 -1
- package/dist/native/p-f0cbfb3d.entry.js +0 -2
- package/dist/native/p-f0cbfb3d.entry.js.map +0 -1
- package/dist/native/p-f5120223.entry.js +0 -2
- package/dist/native/p-fa177c39.entry.js +0 -2
- package/dist/native/p-fa177c39.entry.js.map +0 -1
- package/dist/types/components/nv-tablecolumn/nv-tablecolumn.d.ts +0 -13
- package/dist/types/components/nv-tablecolumn/nv-tablecolumn.docs.d.ts +0 -4
- /package/dist/native/{p-5c697133.entry.js.map → p-112d096c.entry.js.map} +0 -0
- /package/dist/native/{p-85f8f11a.entry.js.map → p-230af58a.entry.js.map} +0 -0
- /package/dist/native/{p-08322093.entry.js.map → p-52d2c0ae.entry.js.map} +0 -0
- /package/dist/native/{p-19090193.entry.js.map → p-647a0765.entry.js.map} +0 -0
- /package/dist/native/{p-1504e28b.entry.js.map → p-701b48a4.entry.js.map} +0 -0
- /package/dist/native/{p-234cfa2e.entry.js.map → p-7c9bf981.entry.js.map} +0 -0
- /package/dist/native/{p-464bb197.entry.js.map → p-83765537.entry.js.map} +0 -0
- /package/dist/native/{p-94dc9c41.entry.js.map → p-9d7e099f.entry.js.map} +0 -0
- /package/dist/native/{p-1235c007.entry.js.map → p-acabac31.entry.js.map} +0 -0
- /package/dist/native/{p-74b129e9.entry.js.map → p-bcf41cd0.entry.js.map} +0 -0
- /package/dist/native/{p-c66565f8.entry.js.map → p-cb0293ec.entry.js.map} +0 -0
- /package/dist/native/{p-e2c99ce2.entry.js.map → p-d94bf052.entry.js.map} +0 -0
- /package/dist/native/{p-9c5d6827.entry.js.map → p-fa78d8eb.entry.js.map} +0 -0
|
@@ -1,531 +1,103 @@
|
|
|
1
|
-
/* eslint-disable @
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/* eslint-disable @stencil-community/prefer-vdom-listener */
|
|
2
|
+
// Useful link for styling help ->
|
|
3
|
+
// https://css-tricks.com/complete-guide-table-element/
|
|
4
|
+
import { Host, h } from "@stencil/core";
|
|
5
|
+
import { TABLE_CONSTANTS, getHandleWidthForCurrentPointer, getClosestTableCell, getPointerOffsetInCell, isInResizeHandle, createResizeState, isValidResizeState, updateCellWidthFromResize, setPointerCapture, releasePointerCapture, setUserSelectPrevention, getCellWidth, } from "./nv-table.utils";
|
|
4
6
|
/**
|
|
5
|
-
* @slot default -
|
|
6
|
-
* @slot before - Use this slot to insert HTML before the table.
|
|
7
|
-
* @slot after - Use this slot to insert HTML after the table.
|
|
8
|
-
*
|
|
9
|
-
* @deprecated [EXPERIMENTAL]
|
|
10
|
-
* @experimental - This component is used as a base for the nv-datagrid component. Do not use it directly.
|
|
7
|
+
* @slot default - Child content of the component.
|
|
11
8
|
*/
|
|
12
9
|
export class NvTable {
|
|
13
10
|
constructor() {
|
|
14
|
-
this.
|
|
15
|
-
this.headerTemplateCache = new Map();
|
|
16
|
-
/****************************************************************************/
|
|
17
|
-
//#region STATES
|
|
18
|
-
this.parsedColumns = [];
|
|
19
|
-
this.parsedData = [];
|
|
20
|
-
this.table = null;
|
|
21
|
-
//#endregion STATES
|
|
22
|
-
/****************************************************************************/
|
|
23
|
-
//#region PROPERTIES
|
|
24
|
-
/**
|
|
25
|
-
* Data to be displayed in the table
|
|
26
|
-
*/
|
|
27
|
-
this.data = [];
|
|
28
|
-
/**
|
|
29
|
-
* Configuration of the columns of the table
|
|
30
|
-
*/
|
|
31
|
-
this.columnsConfig = [];
|
|
32
|
-
/**
|
|
33
|
-
* Fallback value to be displayed when data is not available
|
|
34
|
-
*/
|
|
35
|
-
this.fallbackValue = 'N/A';
|
|
36
|
-
/**
|
|
37
|
-
* Message to be displayed when no data is available
|
|
38
|
-
*/
|
|
39
|
-
this.noDataMessage = 'No data available';
|
|
40
|
-
/**
|
|
41
|
-
* The message to display when there are no columns or data available.
|
|
42
|
-
* @default 'No data or columns available to display.'
|
|
43
|
-
*/
|
|
44
|
-
this.noColumnsNoDataMessage = 'No data or columns available to display.';
|
|
11
|
+
this.resizeState = null;
|
|
45
12
|
}
|
|
13
|
+
/****************************************************************************/
|
|
14
|
+
//#region PROPERTIES
|
|
46
15
|
//#endregion PROPERTIES
|
|
47
16
|
/****************************************************************************/
|
|
48
17
|
//#region METHODS
|
|
49
|
-
/**
|
|
50
|
-
* Caches templates for cells and headers upfront to improve performance.
|
|
51
|
-
*/
|
|
52
|
-
cacheTemplates() {
|
|
53
|
-
const columns = Array.from(this.el.querySelectorAll('nv-tablecolumn'));
|
|
54
|
-
columns.forEach((col) => {
|
|
55
|
-
const key = col.name;
|
|
56
|
-
const cellSlot = col.querySelector('[slot="cell"]');
|
|
57
|
-
if (cellSlot) {
|
|
58
|
-
const element = deepCopyElement(cellSlot);
|
|
59
|
-
this.templateCache.set(key, element);
|
|
60
|
-
}
|
|
61
|
-
const headerSlot = col.querySelector('[slot="header"]');
|
|
62
|
-
if (headerSlot) {
|
|
63
|
-
const element = deepCopyElement(headerSlot);
|
|
64
|
-
this.headerTemplateCache.set(key, element);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
const header = col.header;
|
|
68
|
-
if (header) {
|
|
69
|
-
const headerDiv = document.createElement('div');
|
|
70
|
-
headerDiv.textContent = header;
|
|
71
|
-
this.headerTemplateCache.set(key, headerDiv);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
parseDataAndColumns() {
|
|
77
|
-
if (this.dataJson) {
|
|
78
|
-
this.parseJsonData(this.dataJson);
|
|
79
|
-
}
|
|
80
|
-
else if (this.data && this.data.length > 0) {
|
|
81
|
-
this.parseDataArray(this.data, this.parsedData);
|
|
82
|
-
}
|
|
83
|
-
if (this.columnsConfigJson) {
|
|
84
|
-
this.parseJsonColumns(this.columnsConfigJson, this.parsedColumns);
|
|
85
|
-
}
|
|
86
|
-
else if (this.columnsConfig && this.columnsConfig.length > 0) {
|
|
87
|
-
this.parseColumnsArray(this.columnsConfig, this.parsedColumns);
|
|
88
|
-
}
|
|
89
|
-
else if (this.headerTemplateCache.size > 0) {
|
|
90
|
-
const headerKeys = Array.from(this.headerTemplateCache.keys());
|
|
91
|
-
const arrayColumnsConfig = headerKeys.map(key => (Object.assign({}, { name: key, header: key ? key.charAt(0).toUpperCase() + key.slice(1) : '' })));
|
|
92
|
-
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
93
|
-
}
|
|
94
|
-
else if (this.parsedData.length > 0) {
|
|
95
|
-
const firstRow = this.parsedData[0];
|
|
96
|
-
const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
|
|
97
|
-
name: key,
|
|
98
|
-
header: key.charAt(0).toUpperCase() + key.slice(1),
|
|
99
|
-
}));
|
|
100
|
-
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
deepEqual(a, b) {
|
|
104
|
-
return JSON.stringify(a) === JSON.stringify(b);
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Parses the data array and sets the state accordingly
|
|
108
|
-
* @param {any[]} newValue - New value of the data array
|
|
109
|
-
* @param {any[]} oldValue - Old value of the data array
|
|
110
|
-
* @returns {void}
|
|
111
|
-
*/
|
|
112
|
-
parseDataArray(newValue, oldValue) {
|
|
113
|
-
// Ensure both are arrays for proper comparison
|
|
114
|
-
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
115
|
-
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
116
|
-
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
117
|
-
return; // Deep comparison
|
|
118
|
-
}
|
|
119
|
-
this.parsedData = Array.isArray(newValue) ? newValue : [];
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Parses the columns array and sets the state accordingly
|
|
123
|
-
* @param {ColumnConfig[]} newValue - New value of the columns array
|
|
124
|
-
* @param {ColumnConfig[]} oldValue - Old value of the columns array
|
|
125
|
-
* @returns {void}
|
|
126
|
-
*/
|
|
127
|
-
parseColumnsArray(newValue, oldValue) {
|
|
128
|
-
// Ensure both are arrays for proper comparison
|
|
129
|
-
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
130
|
-
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
131
|
-
// Use a proper deep comparison function (e.g., Lodash's isEqual)
|
|
132
|
-
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
// Assign only after confirming changes
|
|
136
|
-
this.parsedColumns = safeNewValue;
|
|
137
|
-
}
|
|
138
|
-
initializeTable() {
|
|
139
|
-
// Clear the previous table instance (if any)
|
|
140
|
-
this.table = null;
|
|
141
|
-
if (this.parsedColumns.length > 0) {
|
|
142
|
-
this.table = {
|
|
143
|
-
columns: this.parsedColumns,
|
|
144
|
-
data: this.getTableData(),
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
this.table = null;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
getTableData() {
|
|
152
|
-
if (this.parsedData &&
|
|
153
|
-
Array.isArray(this.parsedData) &&
|
|
154
|
-
this.parsedData.length > 0) {
|
|
155
|
-
return [...this.parsedData];
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
return [];
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
// Helper function to get nested property value
|
|
162
|
-
replaceKeyWithValue(obj, path) {
|
|
163
|
-
var _a;
|
|
164
|
-
return ((_a = path
|
|
165
|
-
.split('.')
|
|
166
|
-
.reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj)) !== null && _a !== void 0 ? _a : this.fallbackValue);
|
|
167
|
-
}
|
|
168
|
-
renderTemplate(template, row) {
|
|
169
|
-
if (!template) {
|
|
170
|
-
return null;
|
|
171
|
-
}
|
|
172
|
-
// Handle <template> elements correctly
|
|
173
|
-
const templateContent = template instanceof HTMLTemplateElement ? template.content : template;
|
|
174
|
-
const element = deepCopyElement(templateContent);
|
|
175
|
-
// Replace placeholders in text content, attributes, and properties
|
|
176
|
-
element.querySelectorAll('*').forEach(el => {
|
|
177
|
-
// Replace placeholders in text content
|
|
178
|
-
this.replacePlaceholdersTextContent(el, row);
|
|
179
|
-
// Replace placeholders in attributes
|
|
180
|
-
this.replacePlaceholdersAttributes(el, row);
|
|
181
|
-
// Replace placeholders in properties
|
|
182
|
-
this.replacePlaceholdersProperties(el, row);
|
|
183
|
-
});
|
|
184
|
-
// Handle `data-bind-event`
|
|
185
|
-
element.querySelectorAll('[data-bind-event]').forEach(el => {
|
|
186
|
-
const bindEvent = el.getAttribute('data-bind-event') || '';
|
|
187
|
-
const splitted = bindEvent.split(':');
|
|
188
|
-
if (!bindEvent.includes(':') || splitted.length < 2) {
|
|
189
|
-
console.warn('Invalid data-bind-event format:', bindEvent);
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
const eventType = splitted[0];
|
|
193
|
-
const keyAction = splitted[1];
|
|
194
|
-
const details = splitted.length > 2 ? splitted[2] : null;
|
|
195
|
-
el.addEventListener(eventType, () => {
|
|
196
|
-
var _a;
|
|
197
|
-
const keys = (_a = details === null || details === void 0 ? void 0 : details.split(',')) !== null && _a !== void 0 ? _a : [];
|
|
198
|
-
// Convert keys into a single object instead of an array of objects
|
|
199
|
-
const keyValue = keys.reduce((acc, key) => {
|
|
200
|
-
acc[key] = row === null || row === void 0 ? void 0 : row[key];
|
|
201
|
-
return acc;
|
|
202
|
-
}, {});
|
|
203
|
-
const action = { keyAction, details: keyValue };
|
|
204
|
-
this.action.emit(action);
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
// Ensure Web Components are properly connected
|
|
208
|
-
setTimeout(() => {
|
|
209
|
-
element.querySelectorAll('*').forEach(child => {
|
|
210
|
-
if (typeof child.connectedCallback === 'function') {
|
|
211
|
-
child.connectedCallback();
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
}, 0);
|
|
215
|
-
return (h("div", { ref: el => {
|
|
216
|
-
if (el) {
|
|
217
|
-
el.innerHTML = ''; // Remove existing content
|
|
218
|
-
el.appendChild(element); // Append new element
|
|
219
|
-
}
|
|
220
|
-
} }));
|
|
221
|
-
}
|
|
222
|
-
replacePlaceholdersTextContent(element, row) {
|
|
223
|
-
// ✅ Replace placeholders in text content
|
|
224
|
-
element.childNodes.forEach(node => {
|
|
225
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
226
|
-
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(row, key));
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
replacePlaceholdersAttributes(element, row) {
|
|
231
|
-
// ✅ Replace placeholders in attributes
|
|
232
|
-
Array.from(element.attributes).forEach(attr => {
|
|
233
|
-
if (attr.value.includes('__')) {
|
|
234
|
-
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(row, key));
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
replacePlaceholdersProperties(element, row) {
|
|
239
|
-
// ✅ Dynamically extract relevant properties
|
|
240
|
-
const properties = new Set();
|
|
241
|
-
// Collect only own enumerable properties
|
|
242
|
-
Object.keys(element).forEach(key => properties.add(key));
|
|
243
|
-
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
244
|
-
let proto = Object.getPrototypeOf(element);
|
|
245
|
-
while (proto && proto !== HTMLElement.prototype) {
|
|
246
|
-
Object.keys(proto).forEach(key => properties.add(key));
|
|
247
|
-
proto = Object.getPrototypeOf(proto);
|
|
248
|
-
}
|
|
249
|
-
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
250
|
-
properties.forEach(prop => {
|
|
251
|
-
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
252
|
-
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
253
|
-
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
254
|
-
) {
|
|
255
|
-
try {
|
|
256
|
-
const value = element[prop];
|
|
257
|
-
// ✅ Replace placeholders only if the value is a string
|
|
258
|
-
if (typeof value === 'string' && value.includes('__')) {
|
|
259
|
-
element[prop] = value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(row, key)); // ✅ TypeScript safe
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
catch (error) {
|
|
263
|
-
console.warn(`Could not assign property ${prop}:`, error.message);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
18
|
//#endregion METHODS
|
|
269
19
|
/****************************************************************************/
|
|
270
|
-
//#region
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
this.parsedData = [];
|
|
295
|
-
}
|
|
20
|
+
//#region LISTENERS
|
|
21
|
+
onPointerDown(ev) {
|
|
22
|
+
const th = getClosestTableCell(ev.target);
|
|
23
|
+
if (!th)
|
|
24
|
+
return;
|
|
25
|
+
// Skip resize if the cell has data-no-resize attribute
|
|
26
|
+
if (th.hasAttribute('data-no-resize'))
|
|
27
|
+
return;
|
|
28
|
+
const offsetX = getPointerOffsetInCell(ev, th);
|
|
29
|
+
const handleWidth = getHandleWidthForCurrentPointer();
|
|
30
|
+
const cellWidth = getCellWidth(th);
|
|
31
|
+
// Start only if we're in the resize handle area
|
|
32
|
+
if (!isInResizeHandle(offsetX, cellWidth, handleWidth))
|
|
33
|
+
return;
|
|
34
|
+
this.resizeState = createResizeState(th, ev);
|
|
35
|
+
// Capture so move/up still fire even if the finger leaves the th
|
|
36
|
+
setPointerCapture(th, ev.pointerId);
|
|
37
|
+
// Prevent scrolling/selection during drag
|
|
38
|
+
setUserSelectPrevention(true);
|
|
39
|
+
}
|
|
40
|
+
onPointerMove(ev) {
|
|
41
|
+
if (!isValidResizeState(this.resizeState, ev))
|
|
42
|
+
return;
|
|
43
|
+
updateCellWidthFromResize(this.resizeState, ev, TABLE_CONSTANTS.MIN_W);
|
|
296
44
|
}
|
|
297
|
-
|
|
298
|
-
this.
|
|
45
|
+
onPointerUp(ev) {
|
|
46
|
+
if (!isValidResizeState(this.resizeState, ev))
|
|
47
|
+
return;
|
|
48
|
+
releasePointerCapture(this.resizeState.resizingCell, this.resizeState.pointerId);
|
|
49
|
+
this.resizeState = null;
|
|
50
|
+
setUserSelectPrevention(false);
|
|
299
51
|
}
|
|
300
|
-
//#endregion
|
|
52
|
+
//#endregion LISTENERS
|
|
301
53
|
/****************************************************************************/
|
|
302
54
|
//#region LIFECYCLE
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}
|
|
55
|
+
//#endregion LIFECYCLE
|
|
56
|
+
/****************************************************************************/
|
|
57
|
+
//#region EVENTS
|
|
307
58
|
//#endregion EVENTS
|
|
308
59
|
/****************************************************************************/
|
|
309
60
|
//#region RENDER
|
|
310
61
|
render() {
|
|
311
|
-
|
|
312
|
-
? []
|
|
313
|
-
: this.table.columns;
|
|
314
|
-
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
315
|
-
? []
|
|
316
|
-
: this.table.data;
|
|
317
|
-
return (h(Host, { key: '08082f0800c32a59606968aa2a80cfa3c2f07960' }, h("div", { key: 'f55f5409f45d90ef072abb09006ef6366e7e8c95', class: "hidden" }, h("slot", { key: '0b5326e8c7c6f97f419819744a132335d4435bb4' })), h("slot", { key: '07d4538957b466ed332cd598e2c132d85a801979', name: "before" }), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (h("table", { class: "table" }, this.parsedColumns.length > 0 && headerGroups.length > 0 && (h("thead", { class: "table-header" }, h("tr", null, headerGroups &&
|
|
318
|
-
headerGroups.map(col => {
|
|
319
|
-
return (h("th", { key: col.name }, this.renderTemplate(this.headerTemplateCache.get(col.name), {}) || col.header));
|
|
320
|
-
})))), h("tbody", { class: "table-body" }, !rows || rows.length === 0 ? (h("tr", null, h("td", { colSpan: headerGroups.length || 12, class: "no-data" }, this.noDataMessage))) : (rows.map(row => (h("tr", { key: JSON.stringify(row) }, headerGroups.map(col => {
|
|
321
|
-
var _a;
|
|
322
|
-
return (h("td", null, this.renderTemplate(this.templateCache.get(col.name), row) ||
|
|
323
|
-
((_a = row[col.name]) !== null && _a !== void 0 ? _a : this.fallbackValue)));
|
|
324
|
-
})))))))), h("slot", { key: '1f505261da2c2e05511940ec90f7375981cb0823', name: "after" })));
|
|
62
|
+
return (h(Host, { key: '16b564cc29e8987d8b3fda3a84c0b19882a733bd' }, h("slot", { key: '1305cbc6d29caa60df55bfa01a39a3417a27ec01' })));
|
|
325
63
|
}
|
|
326
64
|
static get is() { return "nv-table"; }
|
|
327
65
|
static get originalStyleUrls() {
|
|
328
66
|
return {
|
|
329
|
-
"$": ["nv-table.scss"]
|
|
67
|
+
"$": ["styles/nv-table.scss"]
|
|
330
68
|
};
|
|
331
69
|
}
|
|
332
70
|
static get styleUrls() {
|
|
333
71
|
return {
|
|
334
|
-
"$": ["nv-table.css"]
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
static get properties() {
|
|
338
|
-
return {
|
|
339
|
-
"data": {
|
|
340
|
-
"type": "unknown",
|
|
341
|
-
"mutable": false,
|
|
342
|
-
"complexType": {
|
|
343
|
-
"original": "any[]",
|
|
344
|
-
"resolved": "any[]",
|
|
345
|
-
"references": {}
|
|
346
|
-
},
|
|
347
|
-
"required": false,
|
|
348
|
-
"optional": false,
|
|
349
|
-
"docs": {
|
|
350
|
-
"tags": [],
|
|
351
|
-
"text": "Data to be displayed in the table"
|
|
352
|
-
},
|
|
353
|
-
"getter": false,
|
|
354
|
-
"setter": false,
|
|
355
|
-
"defaultValue": "[]"
|
|
356
|
-
},
|
|
357
|
-
"columnsConfig": {
|
|
358
|
-
"type": "unknown",
|
|
359
|
-
"mutable": false,
|
|
360
|
-
"complexType": {
|
|
361
|
-
"original": "ColumnConfig[]",
|
|
362
|
-
"resolved": "ColumnConfig[]",
|
|
363
|
-
"references": {
|
|
364
|
-
"ColumnConfig": {
|
|
365
|
-
"location": "import",
|
|
366
|
-
"path": "../../interfaces/ColumnConfig",
|
|
367
|
-
"id": "src/interfaces/ColumnConfig.tsx::ColumnConfig"
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
},
|
|
371
|
-
"required": false,
|
|
372
|
-
"optional": false,
|
|
373
|
-
"docs": {
|
|
374
|
-
"tags": [],
|
|
375
|
-
"text": "Configuration of the columns of the table"
|
|
376
|
-
},
|
|
377
|
-
"getter": false,
|
|
378
|
-
"setter": false,
|
|
379
|
-
"defaultValue": "[]"
|
|
380
|
-
},
|
|
381
|
-
"dataJson": {
|
|
382
|
-
"type": "string",
|
|
383
|
-
"mutable": false,
|
|
384
|
-
"complexType": {
|
|
385
|
-
"original": "string",
|
|
386
|
-
"resolved": "string",
|
|
387
|
-
"references": {}
|
|
388
|
-
},
|
|
389
|
-
"required": false,
|
|
390
|
-
"optional": true,
|
|
391
|
-
"docs": {
|
|
392
|
-
"tags": [],
|
|
393
|
-
"text": "Data to be displayed in the table"
|
|
394
|
-
},
|
|
395
|
-
"getter": false,
|
|
396
|
-
"setter": false,
|
|
397
|
-
"attribute": "data-json",
|
|
398
|
-
"reflect": true
|
|
399
|
-
},
|
|
400
|
-
"columnsConfigJson": {
|
|
401
|
-
"type": "string",
|
|
402
|
-
"mutable": false,
|
|
403
|
-
"complexType": {
|
|
404
|
-
"original": "string",
|
|
405
|
-
"resolved": "string",
|
|
406
|
-
"references": {}
|
|
407
|
-
},
|
|
408
|
-
"required": false,
|
|
409
|
-
"optional": true,
|
|
410
|
-
"docs": {
|
|
411
|
-
"tags": [],
|
|
412
|
-
"text": "Configuration of the columns of the table"
|
|
413
|
-
},
|
|
414
|
-
"getter": false,
|
|
415
|
-
"setter": false,
|
|
416
|
-
"attribute": "columns-config-json",
|
|
417
|
-
"reflect": true
|
|
418
|
-
},
|
|
419
|
-
"fallbackValue": {
|
|
420
|
-
"type": "string",
|
|
421
|
-
"mutable": false,
|
|
422
|
-
"complexType": {
|
|
423
|
-
"original": "string",
|
|
424
|
-
"resolved": "string",
|
|
425
|
-
"references": {}
|
|
426
|
-
},
|
|
427
|
-
"required": false,
|
|
428
|
-
"optional": false,
|
|
429
|
-
"docs": {
|
|
430
|
-
"tags": [],
|
|
431
|
-
"text": "Fallback value to be displayed when data is not available"
|
|
432
|
-
},
|
|
433
|
-
"getter": false,
|
|
434
|
-
"setter": false,
|
|
435
|
-
"attribute": "fallback-value",
|
|
436
|
-
"reflect": true,
|
|
437
|
-
"defaultValue": "'N/A'"
|
|
438
|
-
},
|
|
439
|
-
"noDataMessage": {
|
|
440
|
-
"type": "string",
|
|
441
|
-
"mutable": false,
|
|
442
|
-
"complexType": {
|
|
443
|
-
"original": "string",
|
|
444
|
-
"resolved": "string",
|
|
445
|
-
"references": {}
|
|
446
|
-
},
|
|
447
|
-
"required": false,
|
|
448
|
-
"optional": false,
|
|
449
|
-
"docs": {
|
|
450
|
-
"tags": [],
|
|
451
|
-
"text": "Message to be displayed when no data is available"
|
|
452
|
-
},
|
|
453
|
-
"getter": false,
|
|
454
|
-
"setter": false,
|
|
455
|
-
"attribute": "no-data-message",
|
|
456
|
-
"reflect": true,
|
|
457
|
-
"defaultValue": "'No data available'"
|
|
458
|
-
},
|
|
459
|
-
"noColumnsNoDataMessage": {
|
|
460
|
-
"type": "string",
|
|
461
|
-
"mutable": false,
|
|
462
|
-
"complexType": {
|
|
463
|
-
"original": "string",
|
|
464
|
-
"resolved": "string",
|
|
465
|
-
"references": {}
|
|
466
|
-
},
|
|
467
|
-
"required": false,
|
|
468
|
-
"optional": false,
|
|
469
|
-
"docs": {
|
|
470
|
-
"tags": [{
|
|
471
|
-
"name": "default",
|
|
472
|
-
"text": "'No data or columns available to display.'"
|
|
473
|
-
}],
|
|
474
|
-
"text": "The message to display when there are no columns or data available."
|
|
475
|
-
},
|
|
476
|
-
"getter": false,
|
|
477
|
-
"setter": false,
|
|
478
|
-
"attribute": "no-columns-no-data-message",
|
|
479
|
-
"reflect": true,
|
|
480
|
-
"defaultValue": "'No data or columns available to display.'"
|
|
481
|
-
}
|
|
72
|
+
"$": ["styles/nv-table.css"]
|
|
482
73
|
};
|
|
483
74
|
}
|
|
484
|
-
static get
|
|
485
|
-
|
|
486
|
-
"parsedColumns": {},
|
|
487
|
-
"parsedData": {},
|
|
488
|
-
"table": {}
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
static get events() {
|
|
492
|
-
return [{
|
|
493
|
-
"method": "action",
|
|
494
|
-
"name": "action",
|
|
495
|
-
"bubbles": true,
|
|
496
|
-
"cancelable": true,
|
|
497
|
-
"composed": true,
|
|
498
|
-
"docs": {
|
|
499
|
-
"tags": [],
|
|
500
|
-
"text": "*************************************************************************"
|
|
501
|
-
},
|
|
502
|
-
"complexType": {
|
|
503
|
-
"original": "{\n /**\n * Key action to be performed\n */\n keyAction: string;\n\n /**\n * Details of the action to be performed\n */\n details: any;\n }",
|
|
504
|
-
"resolved": "{ keyAction: string; details: any; }",
|
|
505
|
-
"references": {}
|
|
506
|
-
}
|
|
507
|
-
}];
|
|
508
|
-
}
|
|
509
|
-
static get elementRef() { return "el"; }
|
|
510
|
-
static get watchers() {
|
|
75
|
+
static get elementRef() { return "host"; }
|
|
76
|
+
static get listeners() {
|
|
511
77
|
return [{
|
|
512
|
-
"
|
|
513
|
-
"
|
|
514
|
-
|
|
515
|
-
"
|
|
516
|
-
"
|
|
517
|
-
}, {
|
|
518
|
-
"propName": "data",
|
|
519
|
-
"methodName": "parseData"
|
|
78
|
+
"name": "pointerdown",
|
|
79
|
+
"method": "onPointerDown",
|
|
80
|
+
"target": undefined,
|
|
81
|
+
"capture": false,
|
|
82
|
+
"passive": true
|
|
520
83
|
}, {
|
|
521
|
-
"
|
|
522
|
-
"
|
|
84
|
+
"name": "pointermove",
|
|
85
|
+
"method": "onPointerMove",
|
|
86
|
+
"target": "window",
|
|
87
|
+
"capture": false,
|
|
88
|
+
"passive": true
|
|
523
89
|
}, {
|
|
524
|
-
"
|
|
525
|
-
"
|
|
90
|
+
"name": "pointerup",
|
|
91
|
+
"method": "onPointerUp",
|
|
92
|
+
"target": "window",
|
|
93
|
+
"capture": false,
|
|
94
|
+
"passive": true
|
|
526
95
|
}, {
|
|
527
|
-
"
|
|
528
|
-
"
|
|
96
|
+
"name": "pointercancel",
|
|
97
|
+
"method": "onPointerUp",
|
|
98
|
+
"target": "window",
|
|
99
|
+
"capture": false,
|
|
100
|
+
"passive": true
|
|
529
101
|
}];
|
|
530
102
|
}
|
|
531
103
|
}
|