@nova-design-system/nova-webcomponents 3.0.0 → 3.1.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/{constants-bcd6b2e2.js → constants-8fb8ccc0.js} +14 -1
- package/dist/cjs/constants-8fb8ccc0.js.map +1 -0
- package/dist/cjs/index-9bda5507.js +4 -4
- package/dist/cjs/index.cjs.js +4 -471
- package/dist/cjs/index.cjs.js.map +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 +5 -5
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +17 -8
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +841 -842
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +376 -39
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +18 -12
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +8 -17
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +26 -28
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +12 -5
- 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 +10 -4
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +8 -4
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +8 -4
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldselect.cjs.entry.js +10 -6
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +8 -4
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +8 -4
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +15 -12
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- 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_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +3 -1
- 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 +2 -2
- 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-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/nv-alert/nv-alert.css +3 -0
- package/dist/collection/components/nv-alert/nv-alert.js +6 -11
- package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.css +181 -1
- package/dist/collection/components/nv-badge/nv-badge.docs.js +20 -1
- package/dist/collection/components/nv-badge/nv-badge.docs.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.js +39 -15
- package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +0 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.css +19 -0
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js +33 -38
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +680 -897
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js +202 -0
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -0
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +667 -0
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +98 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +103 -5
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +391 -56
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.css +29 -5
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +0 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +16 -10
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js +16 -8
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +48 -39
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +7 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js +12 -15
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +75 -64
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +13 -11
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +8 -0
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +31 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +5 -0
- 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-fieldmultiselect/nv-fieldmultiselect.css +24 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +8 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +29 -3
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +5 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +8 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +27 -3
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +5 -0
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +8 -0
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +27 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +5 -0
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +8 -0
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +29 -5
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +5 -0
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +8 -0
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +27 -3
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +23 -0
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js +8 -0
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +27 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +13 -10
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +19 -2
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +3 -470
- package/dist/collection/components/nv-icon/nv-icons.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.js +3 -1
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
- 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.js +8 -11
- package/dist/collection/components/nv-table/nv-table.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/index.js.map +1 -1
- package/dist/collection/templates/navigation.docs.js +0 -1
- package/dist/collection/templates/navigation.docs.js.map +1 -1
- package/dist/collection/utils/constants.js +11 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/components/index.js +4 -471
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-alert.js +6 -6
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +2 -2
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +400 -43
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-dialog.js +22 -16
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-fielddate.js +18 -26
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +37 -38
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +18 -10
- 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 +17 -10
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +13 -8
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +12 -7
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +14 -9
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -158
- package/dist/components/nv-fieldtext.js.map +1 -1
- package/dist/components/nv-fieldtextarea.js +10 -5
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtime.js +19 -16
- 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 +6 -4
- 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 +2 -2
- package/dist/components/nv-table.js.map +1 -1
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/p-0a0f6daf.js +187 -0
- package/dist/components/p-0a0f6daf.js.map +1 -0
- package/dist/components/{p-b7b78e64.js → p-10b37876.js} +2 -2
- package/dist/components/{p-b7b78e64.js.map → p-10b37876.js.map} +1 -1
- package/dist/components/{p-dc3faba3.js → p-10faa938.js} +4 -4
- package/dist/components/{p-dc3faba3.js.map → p-10faa938.js.map} +1 -1
- package/dist/{esm/constants-98e2dcc2.js → components/p-1f505531.js} +15 -2
- package/dist/components/p-1f505531.js.map +1 -0
- package/dist/components/{p-2012b8ba.js → p-35a70c5e.js} +2 -2
- package/dist/components/{p-2012b8ba.js.map → p-35a70c5e.js.map} +1 -1
- package/dist/components/{p-6c364a23.js → p-41c56ddc.js} +5 -5
- package/dist/components/{p-6c364a23.js.map → p-41c56ddc.js.map} +1 -1
- package/dist/components/{p-a30b55fc.js → p-608eb9da.js} +2 -2
- package/dist/components/{p-a30b55fc.js.map → p-608eb9da.js.map} +1 -1
- package/dist/components/p-76646ce9.js +88 -0
- package/dist/components/p-76646ce9.js.map +1 -0
- package/dist/components/p-854c32dc.js +1132 -0
- package/dist/components/p-854c32dc.js.map +1 -0
- package/dist/components/p-9decffb6.js +167 -0
- package/dist/components/p-9decffb6.js.map +1 -0
- package/dist/components/{p-2d9ba7d3.js → p-a2527411.js} +3 -3
- package/dist/components/{p-2d9ba7d3.js.map → p-a2527411.js.map} +1 -1
- package/dist/components/{p-f4d86795.js → p-b48d5a94.js} +3 -3
- package/dist/components/{p-f4d86795.js.map → p-b48d5a94.js.map} +1 -1
- package/dist/components/{p-4d3ec142.js → p-eb632278.js} +3 -3
- package/dist/components/{p-4d3ec142.js.map → p-eb632278.js.map} +1 -1
- package/dist/components/{p-150daf68.js → p-f5cb0a63.js} +2 -2
- package/dist/components/{p-150daf68.js.map → p-f5cb0a63.js.map} +1 -1
- package/dist/components/{p-c14f6b8e.js → p-f76bb0c3.js} +3 -3
- package/dist/components/{p-c14f6b8e.js.map → p-f76bb0c3.js.map} +1 -1
- package/dist/{components/p-8348db09.js → esm/constants-b97e736d.js} +15 -2
- package/dist/esm/constants-b97e736d.js.map +1 -0
- package/dist/esm/index-1fb7a9a6.js +4 -4
- package/dist/esm/index.js +4 -471
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-alert.entry.js +5 -5
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +17 -8
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +841 -842
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-datagrid.entry.js +376 -39
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +18 -12
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +1 -1
- package/dist/esm/nv-fielddate.entry.js +8 -17
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +26 -28
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +12 -5
- 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 +10 -4
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +8 -4
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +8 -4
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +10 -6
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +8 -4
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +8 -4
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +15 -12
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +3 -3
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +3 -1
- 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 +2 -2
- package/dist/esm/nv-table.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/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-b094296d.entry.js → p-08a75cfa.entry.js} +2 -2
- package/dist/native/{p-d5cbf5c8.entry.js → p-14c07207.entry.js} +2 -2
- package/dist/native/p-1da72182.entry.js +2 -0
- package/dist/native/p-1da72182.entry.js.map +1 -0
- package/dist/native/p-2523eead.entry.js +2 -0
- package/dist/native/p-2523eead.entry.js.map +1 -0
- package/dist/native/p-3953464e.entry.js +7 -0
- package/dist/native/p-3953464e.entry.js.map +1 -0
- package/dist/native/{p-701b5557.entry.js → p-3b7ef609.entry.js} +2 -2
- package/dist/native/{p-63e6aed3.entry.js → p-3cd77d82.entry.js} +2 -2
- package/dist/native/p-3cd77d82.entry.js.map +1 -0
- package/dist/native/p-470588c2.entry.js +13 -0
- package/dist/native/p-470588c2.entry.js.map +1 -0
- package/dist/native/p-49cac014.entry.js +2 -0
- package/dist/native/p-49cac014.entry.js.map +1 -0
- package/dist/native/p-4d164ed6.entry.js +2 -0
- package/dist/native/p-4d164ed6.entry.js.map +1 -0
- package/dist/native/p-4e635fa7.entry.js +2 -0
- package/dist/native/p-4e635fa7.entry.js.map +1 -0
- package/dist/native/p-5d21532a.entry.js +2 -0
- package/dist/native/p-5d21532a.entry.js.map +1 -0
- package/dist/native/{p-39bb95ff.entry.js → p-615947e7.entry.js} +2 -2
- package/dist/native/{p-bad11367.entry.js → p-656c56f0.entry.js} +2 -2
- package/dist/native/p-656c56f0.entry.js.map +1 -0
- package/dist/native/{p-fa77a591.entry.js → p-7042ba8a.entry.js} +2 -2
- package/dist/native/p-7e154bfd.entry.js +2 -0
- package/dist/native/p-7e154bfd.entry.js.map +1 -0
- package/dist/native/p-7eba904e.entry.js +2 -0
- package/dist/native/p-7eba904e.entry.js.map +1 -0
- package/dist/native/{p-6b348684.entry.js → p-7fd4d13d.entry.js} +2 -2
- package/dist/native/{p-fb5bddba.entry.js → p-90e6d9dd.entry.js} +2 -2
- package/dist/native/p-ae7ab110.entry.js +2 -0
- package/dist/native/p-ae7ab110.entry.js.map +1 -0
- package/dist/native/{p-f85aca27.entry.js → p-b8b6875d.entry.js} +2 -2
- package/dist/native/p-b94d9f0b.entry.js +2 -0
- package/dist/native/p-b94d9f0b.entry.js.map +1 -0
- package/dist/native/p-c0f79bac.entry.js +2 -0
- package/dist/native/p-c0f79bac.entry.js.map +1 -0
- package/dist/native/{p-6ff228da.entry.js → p-c67186f8.entry.js} +2 -2
- package/dist/native/{p-eee01062.entry.js → p-c71c6f23.entry.js} +2 -2
- package/dist/native/p-d9a52884.entry.js +2 -0
- package/dist/native/p-d9a52884.entry.js.map +1 -0
- package/dist/native/{p-d7a76400.entry.js → p-efe6a46c.entry.js} +2 -2
- package/dist/native/p-f2ef6771.entry.js +2 -0
- package/dist/native/p-f5f68992.entry.js +2 -0
- package/dist/native/p-f5f68992.entry.js.map +1 -0
- package/dist/native/{p-59768ee5.js → p-f85c08f1.js} +2 -2
- package/dist/native/p-f85c08f1.js.map +1 -0
- package/dist/native/p-fc97f071.entry.js +2 -0
- package/dist/native/p-fc97f071.entry.js.map +1 -0
- package/dist/types/components/nv-alert/nv-alert.d.ts +1 -1
- package/dist/types/components/nv-badge/nv-badge.d.ts +11 -3
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +69 -107
- package/dist/types/components/nv-calendar/nv-calendar.utils.d.ts +60 -0
- package/dist/types/components/nv-calendar/test/nv-calendar.utils.test.d.ts +1 -0
- package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +47 -10
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +4 -0
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +6 -7
- package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +13 -12
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +4 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +4 -0
- package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +4 -0
- package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +4 -0
- package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +4 -0
- package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +4 -0
- package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.d.ts +4 -0
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-table/nv-table.d.ts +13 -2
- package/dist/types/components.d.ts +269 -116
- package/dist/types/index.d.ts +0 -2
- package/dist/types/utils/constants.d.ts +9 -0
- package/dist/vscode-data.json +221 -1587
- package/hydrate/index.js +1466 -1063
- package/hydrate/index.mjs +1466 -1063
- package/package.json +1 -1
- package/dist/cjs/constants-bcd6b2e2.js.map +0 -1
- package/dist/collection/interfaces/actionEvent.js +0 -2
- package/dist/collection/interfaces/actionEvent.js.map +0 -1
- package/dist/collection/interfaces/calendarShortcut.js +0 -2
- package/dist/collection/interfaces/calendarShortcut.js.map +0 -1
- package/dist/collection/interfaces/dateRange.js +0 -2
- package/dist/collection/interfaces/dateRange.js.map +0 -1
- package/dist/components/p-373926aa.js +0 -177
- package/dist/components/p-373926aa.js.map +0 -1
- package/dist/components/p-591730e7.js +0 -88
- package/dist/components/p-591730e7.js.map +0 -1
- package/dist/components/p-8348db09.js.map +0 -1
- package/dist/components/p-f331117c.js +0 -1133
- package/dist/components/p-f331117c.js.map +0 -1
- package/dist/esm/constants-98e2dcc2.js.map +0 -1
- package/dist/native/p-0ee428d5.entry.js +0 -2
- package/dist/native/p-0ee428d5.entry.js.map +0 -1
- package/dist/native/p-2691e02d.entry.js +0 -2
- package/dist/native/p-37f0210e.entry.js +0 -2
- package/dist/native/p-37f0210e.entry.js.map +0 -1
- package/dist/native/p-4a440970.entry.js +0 -2
- package/dist/native/p-4a440970.entry.js.map +0 -1
- package/dist/native/p-4ae26462.entry.js +0 -7
- package/dist/native/p-4ae26462.entry.js.map +0 -1
- package/dist/native/p-4d9c4618.entry.js +0 -2
- package/dist/native/p-4d9c4618.entry.js.map +0 -1
- package/dist/native/p-59768ee5.js.map +0 -1
- package/dist/native/p-59e0bd2b.entry.js +0 -2
- package/dist/native/p-59e0bd2b.entry.js.map +0 -1
- package/dist/native/p-5c00f092.entry.js +0 -2
- package/dist/native/p-5c00f092.entry.js.map +0 -1
- package/dist/native/p-63e6aed3.entry.js.map +0 -1
- package/dist/native/p-7f5eb2ac.entry.js +0 -2
- package/dist/native/p-7f5eb2ac.entry.js.map +0 -1
- package/dist/native/p-84a73e2a.entry.js +0 -2
- package/dist/native/p-84a73e2a.entry.js.map +0 -1
- package/dist/native/p-93dc2f47.entry.js +0 -2
- package/dist/native/p-93dc2f47.entry.js.map +0 -1
- package/dist/native/p-9a267f16.entry.js +0 -13
- package/dist/native/p-9a267f16.entry.js.map +0 -1
- package/dist/native/p-9d6431c7.entry.js +0 -2
- package/dist/native/p-9d6431c7.entry.js.map +0 -1
- package/dist/native/p-b2ce83ad.entry.js +0 -2
- package/dist/native/p-b2ce83ad.entry.js.map +0 -1
- package/dist/native/p-bad11367.entry.js.map +0 -1
- package/dist/native/p-e1a4f776.entry.js +0 -2
- package/dist/native/p-e1a4f776.entry.js.map +0 -1
- package/dist/native/p-e49bbd02.entry.js +0 -2
- package/dist/native/p-e49bbd02.entry.js.map +0 -1
- package/dist/native/p-f6bdc270.entry.js +0 -2
- package/dist/native/p-f6bdc270.entry.js.map +0 -1
- package/dist/types/interfaces/actionEvent.d.ts +0 -13
- package/dist/types/interfaces/calendarShortcut.d.ts +0 -17
- package/dist/types/interfaces/dateRange.d.ts +0 -13
- /package/dist/native/{p-b094296d.entry.js.map → p-08a75cfa.entry.js.map} +0 -0
- /package/dist/native/{p-d5cbf5c8.entry.js.map → p-14c07207.entry.js.map} +0 -0
- /package/dist/native/{p-701b5557.entry.js.map → p-3b7ef609.entry.js.map} +0 -0
- /package/dist/native/{p-39bb95ff.entry.js.map → p-615947e7.entry.js.map} +0 -0
- /package/dist/native/{p-fa77a591.entry.js.map → p-7042ba8a.entry.js.map} +0 -0
- /package/dist/native/{p-6b348684.entry.js.map → p-7fd4d13d.entry.js.map} +0 -0
- /package/dist/native/{p-fb5bddba.entry.js.map → p-90e6d9dd.entry.js.map} +0 -0
- /package/dist/native/{p-f85aca27.entry.js.map → p-b8b6875d.entry.js.map} +0 -0
- /package/dist/native/{p-6ff228da.entry.js.map → p-c67186f8.entry.js.map} +0 -0
- /package/dist/native/{p-eee01062.entry.js.map → p-c71c6f23.entry.js.map} +0 -0
- /package/dist/native/{p-d7a76400.entry.js.map → p-efe6a46c.entry.js.map} +0 -0
- /package/dist/native/{p-2691e02d.entry.js.map → p-f2ef6771.entry.js.map} +0 -0
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9bda5507.js');
|
|
6
6
|
const dom_utils = require('./dom.utils-4d43f69a.js');
|
|
7
|
+
const constants = require('./constants-8fb8ccc0.js');
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* table-core
|
|
@@ -3203,6 +3204,92 @@ function getPaginationRowModel(opts) {
|
|
|
3203
3204
|
}, getMemoOptions(table.options, 'debugTable'));
|
|
3204
3205
|
}
|
|
3205
3206
|
|
|
3207
|
+
function getSortedRowModel() {
|
|
3208
|
+
return table => memo(() => [table.getState().sorting, table.getPreSortedRowModel()], (sorting, rowModel) => {
|
|
3209
|
+
if (!rowModel.rows.length || !(sorting != null && sorting.length)) {
|
|
3210
|
+
return rowModel;
|
|
3211
|
+
}
|
|
3212
|
+
const sortingState = table.getState().sorting;
|
|
3213
|
+
const sortedFlatRows = [];
|
|
3214
|
+
|
|
3215
|
+
// Filter out sortings that correspond to non existing columns
|
|
3216
|
+
const availableSorting = sortingState.filter(sort => {
|
|
3217
|
+
var _table$getColumn;
|
|
3218
|
+
return (_table$getColumn = table.getColumn(sort.id)) == null ? void 0 : _table$getColumn.getCanSort();
|
|
3219
|
+
});
|
|
3220
|
+
const columnInfoById = {};
|
|
3221
|
+
availableSorting.forEach(sortEntry => {
|
|
3222
|
+
const column = table.getColumn(sortEntry.id);
|
|
3223
|
+
if (!column) return;
|
|
3224
|
+
columnInfoById[sortEntry.id] = {
|
|
3225
|
+
sortUndefined: column.columnDef.sortUndefined,
|
|
3226
|
+
invertSorting: column.columnDef.invertSorting,
|
|
3227
|
+
sortingFn: column.getSortingFn()
|
|
3228
|
+
};
|
|
3229
|
+
});
|
|
3230
|
+
const sortData = rows => {
|
|
3231
|
+
// This will also perform a stable sorting using the row index
|
|
3232
|
+
// if needed.
|
|
3233
|
+
const sortedData = rows.map(row => ({
|
|
3234
|
+
...row
|
|
3235
|
+
}));
|
|
3236
|
+
sortedData.sort((rowA, rowB) => {
|
|
3237
|
+
for (let i = 0; i < availableSorting.length; i += 1) {
|
|
3238
|
+
var _sortEntry$desc;
|
|
3239
|
+
const sortEntry = availableSorting[i];
|
|
3240
|
+
const columnInfo = columnInfoById[sortEntry.id];
|
|
3241
|
+
const sortUndefined = columnInfo.sortUndefined;
|
|
3242
|
+
const isDesc = (_sortEntry$desc = sortEntry == null ? void 0 : sortEntry.desc) != null ? _sortEntry$desc : false;
|
|
3243
|
+
let sortInt = 0;
|
|
3244
|
+
|
|
3245
|
+
// All sorting ints should always return in ascending order
|
|
3246
|
+
if (sortUndefined) {
|
|
3247
|
+
const aValue = rowA.getValue(sortEntry.id);
|
|
3248
|
+
const bValue = rowB.getValue(sortEntry.id);
|
|
3249
|
+
const aUndefined = aValue === undefined;
|
|
3250
|
+
const bUndefined = bValue === undefined;
|
|
3251
|
+
if (aUndefined || bUndefined) {
|
|
3252
|
+
if (sortUndefined === 'first') return aUndefined ? -1 : 1;
|
|
3253
|
+
if (sortUndefined === 'last') return aUndefined ? 1 : -1;
|
|
3254
|
+
sortInt = aUndefined && bUndefined ? 0 : aUndefined ? sortUndefined : -sortUndefined;
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
if (sortInt === 0) {
|
|
3258
|
+
sortInt = columnInfo.sortingFn(rowA, rowB, sortEntry.id);
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
// If sorting is non-zero, take care of desc and inversion
|
|
3262
|
+
if (sortInt !== 0) {
|
|
3263
|
+
if (isDesc) {
|
|
3264
|
+
sortInt *= -1;
|
|
3265
|
+
}
|
|
3266
|
+
if (columnInfo.invertSorting) {
|
|
3267
|
+
sortInt *= -1;
|
|
3268
|
+
}
|
|
3269
|
+
return sortInt;
|
|
3270
|
+
}
|
|
3271
|
+
}
|
|
3272
|
+
return rowA.index - rowB.index;
|
|
3273
|
+
});
|
|
3274
|
+
|
|
3275
|
+
// If there are sub-rows, sort them
|
|
3276
|
+
sortedData.forEach(row => {
|
|
3277
|
+
var _row$subRows;
|
|
3278
|
+
sortedFlatRows.push(row);
|
|
3279
|
+
if ((_row$subRows = row.subRows) != null && _row$subRows.length) {
|
|
3280
|
+
row.subRows = sortData(row.subRows);
|
|
3281
|
+
}
|
|
3282
|
+
});
|
|
3283
|
+
return sortedData;
|
|
3284
|
+
};
|
|
3285
|
+
return {
|
|
3286
|
+
rows: sortData(rowModel.rows),
|
|
3287
|
+
flatRows: sortedFlatRows,
|
|
3288
|
+
rowsById: rowModel.rowsById
|
|
3289
|
+
};
|
|
3290
|
+
}, getMemoOptions(table.options, 'debugTable', 'getSortedRowModel', () => table._autoResetPageIndex()));
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3206
3293
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3207
3294
|
/**
|
|
3208
3295
|
* Debounce function to prevent multiple calls in a short
|
|
@@ -3223,13 +3310,14 @@ function debounce(func, wait) {
|
|
|
3223
3310
|
};
|
|
3224
3311
|
}
|
|
3225
3312
|
|
|
3226
|
-
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-header-border);height:var(--spacing-12);padding:var(--spacing-3) var(--spacing-4);font-size:var(--font-size-md);font-weight:700;color:var(--components-datagrid-header-text)}nv-datagrid td{border-bottom:1px solid var(--components-datagrid-body-border);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-body-text);white-space:nowrap;text-overflow:ellipsis}nv-datagrid tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}";
|
|
3313
|
+
const nvDatagridCss = "nv-datagrid{--nv-datagrid-border-default:var(\n --components-form-field-border-default\n );--nv-datagrid-border-hover:var(--components-form-field-border-hover);--nv-datagrid-border-focus:var(--components-form-field-border-default);--nv-datagrid-background-default:var(\n --components-form-field-background-default\n );--nv-datagrid-background-checked:var(\n --components-form-field-background-checked\n );--nv-datagrid-background-disabled:var(\n --components-form-field-background-disabled\n );--nv-datagrid-color-checked:var(\n --components-form-shape-foreground-default\n );--nv-datagrid-color-disabled:var(\n --components-form-shape-foreground-disabled\n );--nv-datagrid-outline-color:var(--color-focus-brand);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-header-border);height:var(--spacing-12);padding:var(--spacing-3) var(--spacing-4);font-size:var(--font-size-md);font-weight:700;color:var(--components-datagrid-header-text)}nv-datagrid td{border-bottom:1px solid var(--components-datagrid-body-border);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-body-text);white-space:nowrap;text-overflow:ellipsis}nv-datagrid tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}nv-datagrid .cursor-pointer{cursor:pointer}nv-datagrid .select-none{-webkit-user-select:none;user-select:none}nv-datagrid .search-container{display:flex}nv-datagrid .checkbox-container{position:relative;color:var(--nv-datagrid-color-checked)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--nv-datagrid-color-disabled)}nv-datagrid .checkbox-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-checkbox-size);height:var(--form-checkbox-size);flex-direction:column;align-items:flex-start;border-radius:var(--form-checkbox-radius);border-width:var(--form-checkbox-border-width);border-style:solid;border-color:var(--nv-datagrid-border-default);background:var(--nv-datagrid-background-default)}nv-datagrid .checkbox-container input[type=checkbox]:hover{border-color:var(--nv-datagrid-border-hover)}nv-datagrid .checkbox-container input[type=checkbox]:focus{border-color:var(--nv-datagrid-border-focus)}nv-datagrid .checkbox-container input[type=checkbox]:focus,nv-datagrid .checkbox-container input[type=checkbox]:focus-within{outline:none}nv-datagrid .checkbox-container input[type=checkbox]:focus-visible,nv-datagrid .checkbox-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-datagrid-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-datagrid .checkbox-container input[type=checkbox]:checked,nv-datagrid .checkbox-container input[type=checkbox]:indeterminate{background:var(--nv-datagrid-background-checked);border-color:var(--nv-datagrid-background-checked)}nv-datagrid .checkbox-container input[type=checkbox]:disabled:not([readonly]){background:var(--nv-datagrid-background-disabled);border-color:var(--nv-datagrid-border-default)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container .icon{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}nv-datagrid .checkbox-container .icon svg{width:var(--form-checkbox-icon-size);height:var(--form-checkbox-icon-size);fill:none;stroke:currentcolor;stroke-width:var(--form-checkbox-icon-stroke);flex-shrink:0}";
|
|
3227
3314
|
const NvDatagridStyle0 = nvDatagridCss;
|
|
3228
3315
|
|
|
3229
3316
|
const NvDatagrid = class {
|
|
3230
3317
|
constructor(hostRef) {
|
|
3231
3318
|
index.registerInstance(this, hostRef);
|
|
3232
3319
|
this.action = index.createEvent(this, "action", 7);
|
|
3320
|
+
this.selectedRows = index.createEvent(this, "selectedRows", 7);
|
|
3233
3321
|
this.templateCache = new Map();
|
|
3234
3322
|
this.headerTemplateCache = new Map();
|
|
3235
3323
|
this.minPageIndex = 1;
|
|
@@ -3241,6 +3329,8 @@ const NvDatagrid = class {
|
|
|
3241
3329
|
this.globalFilterSearchTerm = '';
|
|
3242
3330
|
this.columnData = [];
|
|
3243
3331
|
this.paginationState = null;
|
|
3332
|
+
this.sorting = [];
|
|
3333
|
+
this.rowSelectionState = {};
|
|
3244
3334
|
//#endregion STATES
|
|
3245
3335
|
/****************************************************************************/
|
|
3246
3336
|
//#region PROPERTIES
|
|
@@ -3276,6 +3366,12 @@ const NvDatagrid = class {
|
|
|
3276
3366
|
* @default 'No data or columns available to display.'
|
|
3277
3367
|
*/
|
|
3278
3368
|
this.noColumnsNoDataMessage = 'No data or columns available to display.';
|
|
3369
|
+
/**
|
|
3370
|
+
* Whether to automatically generate columns if none are provided.
|
|
3371
|
+
* If columns are explicitly set, this property is ignored.
|
|
3372
|
+
* @default false
|
|
3373
|
+
*/
|
|
3374
|
+
this.autoGenerateColumns = false;
|
|
3279
3375
|
/**
|
|
3280
3376
|
* Whether to enable global filtering for the data grid.
|
|
3281
3377
|
* This allows users to search across all columns for a specific value.
|
|
@@ -3285,11 +3381,9 @@ const NvDatagrid = class {
|
|
|
3285
3381
|
*/
|
|
3286
3382
|
this.enableGlobalFilter = false;
|
|
3287
3383
|
/**
|
|
3288
|
-
*
|
|
3289
|
-
* If columns are explicitly set, this property is ignored.
|
|
3290
|
-
* @default false
|
|
3384
|
+
* Position the global filter input field
|
|
3291
3385
|
*/
|
|
3292
|
-
this.
|
|
3386
|
+
this.globalFilterPosition = 'end';
|
|
3293
3387
|
/**
|
|
3294
3388
|
* Whether to enable pagination for the data grid.
|
|
3295
3389
|
* @default false
|
|
@@ -3297,6 +3391,7 @@ const NvDatagrid = class {
|
|
|
3297
3391
|
this.enablePagination = false;
|
|
3298
3392
|
/**
|
|
3299
3393
|
* The number of rows to display per page.
|
|
3394
|
+
* If the number is not present in the property pageSizes it takes the first of the list.
|
|
3300
3395
|
* @default 10
|
|
3301
3396
|
*/
|
|
3302
3397
|
this.pageSize = 10;
|
|
@@ -3305,6 +3400,15 @@ const NvDatagrid = class {
|
|
|
3305
3400
|
* @default [10, 20, 30, 40, 50]
|
|
3306
3401
|
*/
|
|
3307
3402
|
this.pageSizes = [10, 20, 30, 40, 50];
|
|
3403
|
+
/**
|
|
3404
|
+
* Whether to enable sorting for the data grid.
|
|
3405
|
+
* @default false
|
|
3406
|
+
*/
|
|
3407
|
+
this.enableSorting = false;
|
|
3408
|
+
/**
|
|
3409
|
+
* Whether to enable row selection for the data grid.
|
|
3410
|
+
*/
|
|
3411
|
+
this.enableRowSelection = false;
|
|
3308
3412
|
this.debouncedFilter = debounce((value) => {
|
|
3309
3413
|
var _a;
|
|
3310
3414
|
(_a = this.table) === null || _a === void 0 ? void 0 : _a.setGlobalFilter(value);
|
|
@@ -3337,8 +3441,32 @@ const NvDatagrid = class {
|
|
|
3337
3441
|
};
|
|
3338
3442
|
this.handlePageSizeChange = (event) => {
|
|
3339
3443
|
const target = event.target;
|
|
3444
|
+
let effectivePageSize = Number(target.value);
|
|
3445
|
+
if (!this.pageSizes.includes(effectivePageSize) && this.pageSizes) {
|
|
3446
|
+
effectivePageSize = this.pageSizes[0];
|
|
3447
|
+
}
|
|
3340
3448
|
// Simply use `setPageSize` to update the page size directly
|
|
3341
|
-
this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageSize:
|
|
3449
|
+
this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageSize: effectivePageSize }); // This triggers the paginationState watcher
|
|
3450
|
+
};
|
|
3451
|
+
this.handleSortingClick = (event, header) => {
|
|
3452
|
+
var _a;
|
|
3453
|
+
if (!header.column.getCanSort()) {
|
|
3454
|
+
return;
|
|
3455
|
+
}
|
|
3456
|
+
(_a = header.column.getToggleSortingHandler()) === null || _a === void 0 ? void 0 : _a(event);
|
|
3457
|
+
};
|
|
3458
|
+
this.getSortTitle = (header) => {
|
|
3459
|
+
if (!header.column.getCanSort())
|
|
3460
|
+
return;
|
|
3461
|
+
const nextOrder = header.column.getNextSortingOrder();
|
|
3462
|
+
switch (nextOrder) {
|
|
3463
|
+
case constants.SortingPossibility.Asc:
|
|
3464
|
+
return 'Sort ascending';
|
|
3465
|
+
case constants.SortingPossibility.Desc:
|
|
3466
|
+
return 'Sort descending';
|
|
3467
|
+
default:
|
|
3468
|
+
return 'Clear sort';
|
|
3469
|
+
}
|
|
3342
3470
|
};
|
|
3343
3471
|
}
|
|
3344
3472
|
//#endregion PROPERTIES
|
|
@@ -3529,9 +3657,14 @@ const NvDatagrid = class {
|
|
|
3529
3657
|
}
|
|
3530
3658
|
if (this.enablePagination) {
|
|
3531
3659
|
tableOptions.getPaginationRowModel = getPaginationRowModel();
|
|
3660
|
+
const pageIndex = (_b = (_a = this.paginationState) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0;
|
|
3661
|
+
let effectivePageSize = (_d = (_c = this.paginationState) === null || _c === void 0 ? void 0 : _c.pageSize) !== null && _d !== void 0 ? _d : 10;
|
|
3662
|
+
if (!this.pageSizes.includes(effectivePageSize) && this.pageSizes) {
|
|
3663
|
+
effectivePageSize = this.pageSizes[0];
|
|
3664
|
+
}
|
|
3532
3665
|
const pagination = {
|
|
3533
|
-
pageIndex:
|
|
3534
|
-
pageSize:
|
|
3666
|
+
pageIndex: pageIndex,
|
|
3667
|
+
pageSize: effectivePageSize,
|
|
3535
3668
|
};
|
|
3536
3669
|
// Set the initial pagination value with safeguards
|
|
3537
3670
|
tableOptions.state.pagination = pagination;
|
|
@@ -3542,6 +3675,33 @@ const NvDatagrid = class {
|
|
|
3542
3675
|
this.paginationState = newPagination;
|
|
3543
3676
|
};
|
|
3544
3677
|
}
|
|
3678
|
+
if (this.enableSorting) {
|
|
3679
|
+
tableOptions.getSortedRowModel = getSortedRowModel();
|
|
3680
|
+
tableOptions.enableSorting = this.enableSorting;
|
|
3681
|
+
tableOptions.state.sorting = this.sorting;
|
|
3682
|
+
tableOptions.onSortingChange = updater => {
|
|
3683
|
+
const newSorting = typeof updater === 'function' ? updater(this.sorting) : updater;
|
|
3684
|
+
this.sorting = newSorting; // Will automatically trigger the searchTerm watcher and update the table
|
|
3685
|
+
};
|
|
3686
|
+
}
|
|
3687
|
+
if (this.enableRowSelection) {
|
|
3688
|
+
tableOptions.state.rowSelection = this.rowSelectionState;
|
|
3689
|
+
tableOptions.onRowSelectionChange = updater => {
|
|
3690
|
+
const newRowSelectionState = typeof updater === 'function'
|
|
3691
|
+
? updater(this.rowSelectionState)
|
|
3692
|
+
: updater;
|
|
3693
|
+
this.rowSelectionState = newRowSelectionState;
|
|
3694
|
+
// Emit the original rows instead of IDs
|
|
3695
|
+
const selectedRows = Object.keys(newRowSelectionState)
|
|
3696
|
+
.filter(rowId => newRowSelectionState[rowId])
|
|
3697
|
+
.map(rowId => {
|
|
3698
|
+
// Assuming rowId corresponds to the index in parsedData
|
|
3699
|
+
const index = parseInt(rowId, 10); // Convert rowId to an integer index
|
|
3700
|
+
return this.parsedData[index]; // Get the original row data
|
|
3701
|
+
});
|
|
3702
|
+
this.selectedRows.emit(selectedRows); // Emit the original rows
|
|
3703
|
+
};
|
|
3704
|
+
}
|
|
3545
3705
|
// Initialize the table
|
|
3546
3706
|
this.table = createTable(tableOptions);
|
|
3547
3707
|
}
|
|
@@ -3576,14 +3736,67 @@ const NvDatagrid = class {
|
|
|
3576
3736
|
};
|
|
3577
3737
|
return checkValue(row.original);
|
|
3578
3738
|
}
|
|
3739
|
+
createIconSpan(checked, indeterminate) {
|
|
3740
|
+
const span = document.createElement('span');
|
|
3741
|
+
span.className = 'icon';
|
|
3742
|
+
if (checked && !indeterminate) {
|
|
3743
|
+
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
3744
|
+
svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
|
3745
|
+
svg.setAttribute('width', '14');
|
|
3746
|
+
svg.setAttribute('height', '14');
|
|
3747
|
+
svg.setAttribute('viewBox', '0 0 14 14');
|
|
3748
|
+
svg.setAttribute('fill', 'none');
|
|
3749
|
+
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
3750
|
+
path.setAttribute('d', 'M11.6667 3.5L5.25004 9.91667L2.33337 7');
|
|
3751
|
+
path.setAttribute('stroke-linecap', 'round');
|
|
3752
|
+
path.setAttribute('stroke-linejoin', 'round');
|
|
3753
|
+
svg.appendChild(path);
|
|
3754
|
+
span.appendChild(svg);
|
|
3755
|
+
}
|
|
3756
|
+
if (indeterminate) {
|
|
3757
|
+
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
3758
|
+
svg.classList.add('indeterminate-svg');
|
|
3759
|
+
svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
|
3760
|
+
svg.setAttribute('viewBox', '0 0 14 14');
|
|
3761
|
+
svg.setAttribute('fill', 'none');
|
|
3762
|
+
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
3763
|
+
path.setAttribute('d', 'M2.9165 7H11.0832');
|
|
3764
|
+
path.setAttribute('stroke-linecap', 'round');
|
|
3765
|
+
path.setAttribute('stroke-linejoin', 'round');
|
|
3766
|
+
svg.appendChild(path);
|
|
3767
|
+
span.appendChild(svg);
|
|
3768
|
+
}
|
|
3769
|
+
return span;
|
|
3770
|
+
}
|
|
3771
|
+
createIndeterminateCheckbox(options = {}) {
|
|
3772
|
+
const { indeterminate, checked = false, disabled = false, className = '', onChange, } = options;
|
|
3773
|
+
const input = document.createElement('input');
|
|
3774
|
+
input.type = 'checkbox';
|
|
3775
|
+
input.checked = checked;
|
|
3776
|
+
input.disabled = disabled;
|
|
3777
|
+
input.className = `${className} cursor-pointer`.trim();
|
|
3778
|
+
if (typeof indeterminate === 'boolean') {
|
|
3779
|
+
input.indeterminate = !checked && indeterminate;
|
|
3780
|
+
}
|
|
3781
|
+
if (onChange) {
|
|
3782
|
+
input.addEventListener('change', onChange);
|
|
3783
|
+
}
|
|
3784
|
+
const iconSpan = this.createIconSpan(checked, indeterminate);
|
|
3785
|
+
const container = document.createElement('div');
|
|
3786
|
+
container.className = 'checkbox-container';
|
|
3787
|
+
container.appendChild(input);
|
|
3788
|
+
container.appendChild(iconSpan);
|
|
3789
|
+
return container;
|
|
3790
|
+
}
|
|
3579
3791
|
// Helper function to generate column definitions
|
|
3580
3792
|
generateColumns(validColumns, tableOptions) {
|
|
3793
|
+
let generatedColumns = [];
|
|
3581
3794
|
const columnHelper = createColumnHelper();
|
|
3582
3795
|
if (validColumns.length > 0) {
|
|
3583
3796
|
// Use defined columns
|
|
3584
|
-
|
|
3797
|
+
generatedColumns = validColumns.map(column => {
|
|
3585
3798
|
var _a, _b;
|
|
3586
|
-
|
|
3799
|
+
const identifiedColumnDef = {
|
|
3587
3800
|
header: (_b = (this.renderTemplate(this.headerTemplateCache.get(column.accessor), (_a = column.header) !== null && _a !== void 0 ? _a : column.accessor, null) ||
|
|
3588
3801
|
column.header)) !== null && _b !== void 0 ? _b : column.accessor,
|
|
3589
3802
|
cell: (info) => {
|
|
@@ -3601,35 +3814,81 @@ const NvDatagrid = class {
|
|
|
3601
3814
|
value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
|
|
3602
3815
|
},
|
|
3603
3816
|
enableGlobalFilter: this.enableGlobalFilter,
|
|
3604
|
-
|
|
3817
|
+
enableSorting: this.enableSorting,
|
|
3818
|
+
};
|
|
3819
|
+
if (this.enableSorting) {
|
|
3820
|
+
identifiedColumnDef.sortUndefined = 'last'; // Force undefined values to the end
|
|
3821
|
+
identifiedColumnDef.sortDescFirst = false; // First sort order will be ascending (nullable values can mess up auto detection of sort order)
|
|
3822
|
+
}
|
|
3823
|
+
return columnHelper.accessor(column.accessor, identifiedColumnDef);
|
|
3605
3824
|
});
|
|
3606
3825
|
}
|
|
3607
3826
|
else if (tableOptions.data && tableOptions.data.length > 0) {
|
|
3608
3827
|
// Generate columns from data keys
|
|
3609
3828
|
const sampleRow = tableOptions.data[0];
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3829
|
+
generatedColumns = Object.keys(sampleRow).map(key => {
|
|
3830
|
+
const identifiedColumnDef = {
|
|
3831
|
+
header: this.renderTemplate(this.headerTemplateCache.get(key), key.charAt(0).toUpperCase() + key.slice(1), null) || key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
3832
|
+
cell: (info) => {
|
|
3833
|
+
var _a, _b, _c;
|
|
3834
|
+
const value = info.getValue();
|
|
3835
|
+
const cellAccessors = key;
|
|
3836
|
+
const row = info.row;
|
|
3837
|
+
return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
|
|
3838
|
+
? value.map((item) => {
|
|
3839
|
+
var _a, _b;
|
|
3840
|
+
return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
|
|
3841
|
+
item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
|
|
3842
|
+
})
|
|
3843
|
+
: (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
|
|
3844
|
+
value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
|
|
3845
|
+
},
|
|
3846
|
+
enableGlobalFilter: this.enableGlobalFilter,
|
|
3847
|
+
enableSorting: this.enableSorting,
|
|
3848
|
+
};
|
|
3849
|
+
if (this.enableSorting) {
|
|
3850
|
+
identifiedColumnDef.sortUndefined = 'last'; // Force undefined values to the end
|
|
3851
|
+
identifiedColumnDef.sortDescFirst = false; // First sort order will be ascending (nullable values can mess up auto detection of sort order)
|
|
3852
|
+
}
|
|
3853
|
+
return columnHelper.accessor(key, identifiedColumnDef);
|
|
3854
|
+
});
|
|
3628
3855
|
}
|
|
3629
|
-
else
|
|
3630
|
-
|
|
3631
|
-
|
|
3856
|
+
else ;
|
|
3857
|
+
if (this.enableRowSelection) {
|
|
3858
|
+
const rowSelection = columnHelper.accessor('select', {
|
|
3859
|
+
header: ({ table }) => {
|
|
3860
|
+
return (index.h("div", { class: "flex px-1", ref: el => {
|
|
3861
|
+
const checkbox = this.createIndeterminateCheckbox({
|
|
3862
|
+
checked: table === null || table === void 0 ? void 0 : table.getIsAllRowsSelected(),
|
|
3863
|
+
indeterminate: table === null || table === void 0 ? void 0 : table.getIsSomeRowsSelected(),
|
|
3864
|
+
onChange: table === null || table === void 0 ? void 0 : table.getToggleAllRowsSelectedHandler(),
|
|
3865
|
+
});
|
|
3866
|
+
if (el) {
|
|
3867
|
+
el.innerHTML = ''; // Remove existing content
|
|
3868
|
+
el.appendChild(checkbox); // Append new checkbox
|
|
3869
|
+
}
|
|
3870
|
+
} }));
|
|
3871
|
+
},
|
|
3872
|
+
cell: ({ row }) => {
|
|
3873
|
+
return (index.h("div", { class: "flex px-1", ref: el => {
|
|
3874
|
+
const checkbox = this.createIndeterminateCheckbox({
|
|
3875
|
+
checked: row === null || row === void 0 ? void 0 : row.getIsSelected(),
|
|
3876
|
+
disabled: !(row === null || row === void 0 ? void 0 : row.getCanSelect()),
|
|
3877
|
+
indeterminate: row === null || row === void 0 ? void 0 : row.getIsSomeSelected(),
|
|
3878
|
+
onChange: row === null || row === void 0 ? void 0 : row.getToggleSelectedHandler(),
|
|
3879
|
+
});
|
|
3880
|
+
if (el) {
|
|
3881
|
+
el.innerHTML = ''; // Remove existing content
|
|
3882
|
+
el.appendChild(checkbox); // Append new checkbox
|
|
3883
|
+
}
|
|
3884
|
+
} }));
|
|
3885
|
+
},
|
|
3886
|
+
enableGlobalFilter: false,
|
|
3887
|
+
enableSorting: false,
|
|
3888
|
+
});
|
|
3889
|
+
generatedColumns = [rowSelection, ...generatedColumns];
|
|
3632
3890
|
}
|
|
3891
|
+
return generatedColumns;
|
|
3633
3892
|
}
|
|
3634
3893
|
getTableData() {
|
|
3635
3894
|
if (this.parsedData &&
|
|
@@ -3877,6 +4136,46 @@ const NvDatagrid = class {
|
|
|
3877
4136
|
});
|
|
3878
4137
|
}
|
|
3879
4138
|
}
|
|
4139
|
+
getArrowSorting(header) {
|
|
4140
|
+
if (!header.column.getCanSort())
|
|
4141
|
+
return null;
|
|
4142
|
+
const sortState = header.column.getIsSorted();
|
|
4143
|
+
if (sortState === constants.SortingPossibility.Asc) {
|
|
4144
|
+
return (index.h("div", { class: "inline-flex align-middle" }, index.h("nv-icon", { name: "arrow-up" })));
|
|
4145
|
+
}
|
|
4146
|
+
if (sortState === constants.SortingPossibility.Desc) {
|
|
4147
|
+
return (index.h("div", { class: "inline-flex align-middle" }, index.h("nv-icon", { name: "arrow-down" })));
|
|
4148
|
+
}
|
|
4149
|
+
return null;
|
|
4150
|
+
}
|
|
4151
|
+
getHeaderCell(header) {
|
|
4152
|
+
const isSortable = header.column.getCanSort();
|
|
4153
|
+
const sortTitle = this.getSortTitle(header);
|
|
4154
|
+
const content = header.isPlaceholder
|
|
4155
|
+
? null
|
|
4156
|
+
: header.column.columnDef.header
|
|
4157
|
+
? this.flexRender(header.column.columnDef.header, header.getContext())
|
|
4158
|
+
: null; // Ensure content is not null
|
|
4159
|
+
const sortIcon = this.getArrowSorting(header);
|
|
4160
|
+
const handleClick = this.createSortingClickHandler(header);
|
|
4161
|
+
if (this.enableRowSelection) {
|
|
4162
|
+
return (index.h("th", { key: header.id }, content, " "));
|
|
4163
|
+
}
|
|
4164
|
+
const returnHtml = (index.h("th", { key: header.id }, index.h("button", { type: "button", class: isSortable
|
|
4165
|
+
? 'w-full text-left cursor-pointer select-none bg-transparent border-none p-0 m-0 focus:outline-none'
|
|
4166
|
+
: 'w-full text-left bg-transparent border-none p-0 m-0 cursor-default', onClick: handleClick, title: sortTitle }, index.h("span", { class: "inline-flex items-center gap-1" }, content, sortIcon))));
|
|
4167
|
+
return returnHtml;
|
|
4168
|
+
}
|
|
4169
|
+
// 👇 Helper method to avoid arrow function in JSX
|
|
4170
|
+
createSortingClickHandler(header) {
|
|
4171
|
+
return (e) => {
|
|
4172
|
+
this.handleSortingClick(e, header);
|
|
4173
|
+
};
|
|
4174
|
+
}
|
|
4175
|
+
getPagination() {
|
|
4176
|
+
var _a;
|
|
4177
|
+
return (this.enablePagination && (index.h("div", { class: "flex items-center gap-2" }, index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanPreviousPage(), onClick: this.table.firstPage }, "<<"), index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanPreviousPage(), onClick: this.table.previousPage }, "<"), index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanNextPage(), onClick: this.table.nextPage }, ">"), index.h("button", { class: "border rounded p-1", disabled: !this.table.getCanNextPage(), onClick: this.table.lastPage }, ">>"), index.h("span", { class: "flex items-center gap-1" }, index.h("div", null, "Page"), index.h("strong", null, this.table.getState().pagination.pageIndex + 1, " of", ' ', this.table.getPageCount().toLocaleString())), index.h("span", { class: "flex items-center gap-1" }, "| Go to page:", ' ', index.h("input", { type: "number", min: this.minPageIndex, max: this.table.getPageCount(), value: this.table.getState().pagination.pageIndex + 1, class: "border p-1 rounded w-16", "aria-label": "Go to page", onInput: this.handlePageIndexChange })), ((_a = this.pageSizes) === null || _a === void 0 ? void 0 : _a.length) > 0 && (index.h("select", { "aria-label": "Rows per page", onChange: this.handlePageSizeChange }, this.pageSizes.map(pageSize => (index.h("option", { value: String(pageSize), selected: this.table.getState().pagination.pageSize === pageSize }, "Show ", pageSize))))))));
|
|
4178
|
+
}
|
|
3880
4179
|
//#endregion METHODS
|
|
3881
4180
|
/****************************************************************************/
|
|
3882
4181
|
//#region WATCHERS
|
|
@@ -3934,6 +4233,39 @@ const NvDatagrid = class {
|
|
|
3934
4233
|
this.table.options.state.pagination = newValue;
|
|
3935
4234
|
}
|
|
3936
4235
|
}
|
|
4236
|
+
handleSorting(newValue) {
|
|
4237
|
+
if (!this.table) {
|
|
4238
|
+
console.warn('Table is not initialized yet.');
|
|
4239
|
+
return;
|
|
4240
|
+
}
|
|
4241
|
+
// Not working
|
|
4242
|
+
/*// Set the sorting for the table
|
|
4243
|
+
this.table.setSorting(newValue);*/
|
|
4244
|
+
// Manually update the sorting state
|
|
4245
|
+
this.table.options.state.sorting = newValue;
|
|
4246
|
+
}
|
|
4247
|
+
handlePageSize(newValue) {
|
|
4248
|
+
let effectivePageSize = newValue;
|
|
4249
|
+
if (!this.pageSizes.includes(effectivePageSize) && this.pageSizes) {
|
|
4250
|
+
effectivePageSize = this.pageSizes[0];
|
|
4251
|
+
}
|
|
4252
|
+
// Simply use `setPageSize` to update the page size directly
|
|
4253
|
+
this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageSize: effectivePageSize }); // This triggers the paginationState watcher
|
|
4254
|
+
}
|
|
4255
|
+
handleRowSelectionState(newValue, oldValue) {
|
|
4256
|
+
if (!this.table) {
|
|
4257
|
+
console.warn('Table is not initialized yet.');
|
|
4258
|
+
return;
|
|
4259
|
+
}
|
|
4260
|
+
// Only update if there is a meaningful change
|
|
4261
|
+
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
|
|
4262
|
+
// Not working
|
|
4263
|
+
/*// Set the rowSelection for the table
|
|
4264
|
+
this.table.setRowSelection(newValue);*/
|
|
4265
|
+
// Manually update the row selection state
|
|
4266
|
+
this.table.options.state.rowSelection = newValue;
|
|
4267
|
+
}
|
|
4268
|
+
}
|
|
3937
4269
|
//#endregion WATCHERS
|
|
3938
4270
|
/****************************************************************************/
|
|
3939
4271
|
//#region LIFECYCLE
|
|
@@ -3943,7 +4275,10 @@ const NvDatagrid = class {
|
|
|
3943
4275
|
this.initializeTable();
|
|
3944
4276
|
if (this.enablePagination) {
|
|
3945
4277
|
// Ensure a valid page size
|
|
3946
|
-
|
|
4278
|
+
let effectivePageSize = this.pageSize > 0 ? this.pageSize : 10;
|
|
4279
|
+
if (!this.pageSizes.includes(effectivePageSize) && this.pageSizes) {
|
|
4280
|
+
effectivePageSize = this.pageSizes[0];
|
|
4281
|
+
}
|
|
3947
4282
|
this.paginationState = {
|
|
3948
4283
|
pageIndex: Math.max(0, this.minPageIndex - 1),
|
|
3949
4284
|
pageSize: effectivePageSize,
|
|
@@ -3961,11 +4296,9 @@ const NvDatagrid = class {
|
|
|
3961
4296
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
3962
4297
|
? []
|
|
3963
4298
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
3964
|
-
return (index.h(index.Host, { key: '
|
|
4299
|
+
return (index.h(index.Host, { key: '7ed48645de6272bb3fed7897406e2a798021bba2' }, index.h("div", { key: '4ae6135c7ca302e06c3d26509dbf813128631a2e', class: "hidden" }, index.h("slot", { key: '3f8078b877a4e2ebe46842fc3a52d7059cb3cc68' })), index.h("slot", { key: 'c97cb30a0ce80dc8c25c2b855eb6086937dbe76b', name: "before" }), this.enableGlobalFilter && this.table && (index.h("div", { key: '68cd75ed6ecad3de049797ebfe7787f5a0b357fa', class: `search-container justify-${this.globalFilterPosition}` }, index.h("nv-fieldtext", { key: '80b4f8b50c3dda39555597a44707f3a296fbb8e6', value: this.globalFilterSearchTerm, onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns..." }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("div", null, index.h("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", null, this.parsedColumns.length > 0 && headerGroups
|
|
3965
4300
|
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (index.h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
3966
|
-
return
|
|
3967
|
-
? null
|
|
3968
|
-
: this.flexRender(header.column.columnDef.header, header.getContext())));
|
|
4301
|
+
return this.getHeaderCell(header);
|
|
3969
4302
|
}))))
|
|
3970
4303
|
: 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 => {
|
|
3971
4304
|
const rowId = row.id;
|
|
@@ -3973,7 +4306,8 @@ const NvDatagrid = class {
|
|
|
3973
4306
|
return (index.h("tr", { key: rowId }, visibleCells.map(cell => {
|
|
3974
4307
|
return (index.h("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
3975
4308
|
})));
|
|
3976
|
-
})))
|
|
4309
|
+
}))), this.table && this.enableRowSelection ? (index.h("tfoot", null, index.h("tr", null, index.h("td", { colSpan: 20 }, this.enableRowSelection && this.table ? (index.h("div", null, this.rowSelectionState &&
|
|
4310
|
+
Object.keys(this.rowSelectionState).length > 0 ? (index.h("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', ((_e = (_d = this.table.getPreFilteredRowModel()) === null || _d === void 0 ? void 0 : _d.rows) === null || _e === void 0 ? void 0 : _e.length) || 0, ' ', "Total Rows Selected")) : (index.h("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), index.h("slot", { key: 'f7209e67ff423310bb4b59b866f486ade897781a', name: "after" })));
|
|
3977
4311
|
}
|
|
3978
4312
|
get el() { return index.getElement(this); }
|
|
3979
4313
|
static get watchers() { return {
|
|
@@ -3984,7 +4318,10 @@ const NvDatagrid = class {
|
|
|
3984
4318
|
"parsedColumns": ["handleParsedChange"],
|
|
3985
4319
|
"parsedData": ["handleParsedChange"],
|
|
3986
4320
|
"globalFilterSearchTerm": ["handleGlobalFilterSearchTerm"],
|
|
3987
|
-
"paginationState": ["handlePaginationState"]
|
|
4321
|
+
"paginationState": ["handlePaginationState"],
|
|
4322
|
+
"sorting": ["handleSorting"],
|
|
4323
|
+
"pageSize": ["handlePageSize"],
|
|
4324
|
+
"rowSelectionState": ["handleRowSelectionState"]
|
|
3988
4325
|
}; }
|
|
3989
4326
|
};
|
|
3990
4327
|
NvDatagrid.style = NvDatagridStyle0;
|