@nova-design-system/nova-webcomponents 3.0.0-beta.45 → 3.0.0-beta.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-9bda5507.js +0 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +4 -4
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +48 -19
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +378 -85
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +5 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
- package/dist/cjs/nv-fielddate.cjs.entry.js +5 -5
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +4 -4
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +15 -35
- 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 +30 -86
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +9 -7
- 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 +5 -5
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtime.cjs.entry.js +9 -9
- package/dist/cjs/nv-icon.cjs.entry.js +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +18 -44
- 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-stack.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/nv-badge/nv-badge.js +4 -3
- package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
- package/dist/collection/components/nv-button/nv-button.js +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js +0 -9
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +48 -19
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +560 -63
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +393 -88
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +27 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +5 -5
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +4 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +8 -8
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +24 -50
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- 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.docs.js +6 -6
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +37 -103
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +9 -7
- 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.js +5 -5
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.docs.js +3 -3
- package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +37 -65
- 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.docs.js +7 -6
- package/dist/collection/components/nv-stack/nv-stack.docs.js.map +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js.map +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +3 -3
- package/dist/components/nv-breadcrumbs.js +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +386 -87
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridcolumn.js +7 -2
- package/dist/components/nv-datagridcolumn.js.map +1 -1
- package/dist/components/nv-dialog.js +6 -6
- 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 +12 -12
- package/dist/components/nv-fielddaterange.js +11 -11
- package/dist/components/nv-fielddropdown.js +22 -45
- 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 +40 -100
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +6 -6
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +12 -10
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +8 -8
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldtext.js +4 -4
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +13 -13
- 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 +23 -52
- 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-stack.js.map +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-4c6d8df7.js → p-02752770.js} +2 -2
- package/dist/components/{p-4c6d8df7.js.map → p-02752770.js.map} +1 -1
- package/dist/components/{p-3a3ba5b1.js → p-150daf68.js} +2 -2
- package/dist/components/{p-3a3ba5b1.js.map → p-150daf68.js.map} +1 -1
- package/dist/components/{p-ef255589.js → p-2012b8ba.js} +3 -3
- package/dist/components/{p-ef255589.js.map → p-2012b8ba.js.map} +1 -1
- package/dist/components/{p-103756d6.js → p-2d9ba7d3.js} +3 -3
- package/dist/components/{p-103756d6.js.map → p-2d9ba7d3.js.map} +1 -1
- package/dist/components/{p-0f59f38e.js → p-373926aa.js} +5 -5
- package/dist/components/p-373926aa.js.map +1 -0
- package/dist/components/{p-8ea5e3c0.js → p-4d3ec142.js} +3 -3
- package/dist/components/{p-8ea5e3c0.js.map → p-4d3ec142.js.map} +1 -1
- package/dist/components/{p-78b00756.js → p-591730e7.js} +2 -2
- package/dist/components/{p-78b00756.js.map → p-591730e7.js.map} +1 -1
- package/dist/components/{p-b5821dbb.js → p-6c364a23.js} +5 -5
- package/dist/components/{p-b5821dbb.js.map → p-6c364a23.js.map} +1 -1
- package/dist/components/{p-aeeb5b1c.js → p-a30b55fc.js} +2 -2
- package/dist/components/{p-aeeb5b1c.js.map → p-a30b55fc.js.map} +1 -1
- package/dist/components/{p-e46c2e31.js → p-b7b78e64.js} +2 -2
- package/dist/components/{p-e46c2e31.js.map → p-b7b78e64.js.map} +1 -1
- package/dist/components/{p-3561c093.js → p-c14f6b8e.js} +3 -3
- package/dist/components/{p-3561c093.js.map → p-c14f6b8e.js.map} +1 -1
- package/dist/components/{p-3b096098.js → p-dc3faba3.js} +4 -4
- package/dist/components/{p-3b096098.js.map → p-dc3faba3.js.map} +1 -1
- package/dist/components/{p-933d4d06.js → p-e00cbb8a.js} +5 -5
- package/dist/components/{p-933d4d06.js.map → p-e00cbb8a.js.map} +1 -1
- package/dist/components/{p-78e0e7b0.js → p-f331117c.js} +53 -24
- package/dist/components/p-f331117c.js.map +1 -0
- package/dist/components/{p-863974b2.js → p-f4d86795.js} +3 -3
- package/dist/components/{p-863974b2.js.map → p-f4d86795.js.map} +1 -1
- package/dist/esm/index-1fb7a9a6.js +0 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +4 -4
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +48 -19
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +378 -85
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +5 -1
- package/dist/esm/nv-datagridcolumn.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
- package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
- package/dist/esm/nv-fielddate.entry.js +5 -5
- package/dist/esm/nv-fielddaterange.entry.js +4 -4
- package/dist/esm/nv-fielddropdown.entry.js +15 -35
- 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 +30 -86
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +9 -7
- 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 +5 -5
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js +9 -9
- package/dist/esm/nv-icon.entry.js +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +18 -44
- 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-stack.entry.js.map +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/p-0245863d.entry.js +2 -0
- package/dist/native/{p-19fd6594.entry.js → p-0ee428d5.entry.js} +2 -2
- package/dist/native/p-0ee428d5.entry.js.map +1 -0
- package/dist/native/{p-c10e5113.entry.js → p-244f56ac.entry.js} +2 -2
- package/dist/native/p-2691e02d.entry.js +2 -0
- package/dist/native/{p-31184fdd.entry.js → p-37f0210e.entry.js} +2 -2
- package/dist/native/{p-31184fdd.entry.js.map → p-37f0210e.entry.js.map} +1 -1
- package/dist/native/{p-162f4840.entry.js → p-39bb95ff.entry.js} +2 -2
- package/dist/native/{p-abeda2cf.entry.js → p-4ae26462.entry.js} +2 -2
- package/dist/native/p-4d9c4618.entry.js +2 -0
- package/dist/native/p-4d9c4618.entry.js.map +1 -0
- package/dist/native/{p-314d2b34.entry.js → p-59e0bd2b.entry.js} +2 -2
- package/dist/native/{p-314d2b34.entry.js.map → p-59e0bd2b.entry.js.map} +1 -1
- package/dist/native/{p-e6904ae4.entry.js → p-5c00f092.entry.js} +2 -2
- package/dist/native/p-63e6aed3.entry.js +2 -0
- package/dist/native/p-63e6aed3.entry.js.map +1 -0
- package/dist/native/{p-40f4a6e7.entry.js → p-6b348684.entry.js} +2 -2
- package/dist/native/{p-442f04f9.entry.js → p-6ff228da.entry.js} +2 -2
- package/dist/native/{p-442f04f9.entry.js.map → p-6ff228da.entry.js.map} +1 -1
- package/dist/native/{p-603a99ed.entry.js → p-701b5557.entry.js} +2 -2
- package/dist/native/{p-2281d5ef.entry.js → p-7f5eb2ac.entry.js} +2 -2
- package/dist/native/{p-f5e0d5c5.entry.js → p-84a73e2a.entry.js} +2 -2
- package/dist/native/p-9135fdf5.entry.js +2 -0
- package/dist/native/p-9135fdf5.entry.js.map +1 -0
- package/dist/native/p-93dc2f47.entry.js +2 -0
- package/dist/native/{p-45577c7f.entry.js.map → p-93dc2f47.entry.js.map} +1 -1
- package/dist/native/{p-d9624254.entry.js → p-9a267f16.entry.js} +2 -2
- package/dist/native/p-9a267f16.entry.js.map +1 -0
- package/dist/native/{p-ecc28398.entry.js → p-9d6431c7.entry.js} +2 -2
- package/dist/native/p-9d6431c7.entry.js.map +1 -0
- package/dist/native/{p-514101d6.entry.js → p-b094296d.entry.js} +2 -2
- package/dist/native/{p-464ef88f.entry.js → p-b2ce83ad.entry.js} +2 -2
- package/dist/native/p-bad11367.entry.js +2 -0
- package/dist/native/{p-0172095c.entry.js → p-c7b201cd.entry.js} +2 -2
- package/dist/native/{p-725e0abd.entry.js → p-d7a76400.entry.js} +2 -2
- package/dist/native/p-e1a4f776.entry.js +2 -0
- package/dist/native/p-e1a4f776.entry.js.map +1 -0
- package/dist/native/p-e49bbd02.entry.js +2 -0
- package/dist/native/p-e49bbd02.entry.js.map +1 -0
- package/dist/native/{p-17bf1233.entry.js → p-e5de64d5.entry.js} +2 -2
- package/dist/native/p-eee01062.entry.js +2 -0
- package/dist/native/{p-e197d90b.entry.js.map → p-eee01062.entry.js.map} +1 -1
- package/dist/native/{p-332c5d6c.entry.js → p-f6bdc270.entry.js} +2 -2
- package/dist/native/{p-3af5bcc1.entry.js → p-f85aca27.entry.js} +2 -2
- package/dist/native/{p-7fade532.entry.js → p-fa77a591.entry.js} +2 -2
- package/dist/native/{p-f01a34c5.entry.js → p-fb5bddba.entry.js} +2 -2
- package/dist/types/components/nv-badge/nv-badge.d.ts +1 -0
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +10 -7
- package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +38 -2
- package/dist/types/components/nv-datagridcolumn/nv-datagridcolumn.d.ts +4 -0
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +17 -23
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +17 -44
- package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +2 -0
- package/dist/types/components/nv-menu/nv-menu.d.ts +50 -16
- package/dist/types/components.d.ts +192 -45
- package/dist/types/nova-docs.d.ts +5 -0
- package/dist/vscode-data.json +43 -51
- package/hydrate/index.js +587 -438
- package/hydrate/index.mjs +587 -438
- package/package.json +5 -3
- package/dist/cjs/nv-base.cjs.entry.js +0 -74
- package/dist/cjs/nv-base.cjs.entry.js.map +0 -1
- package/dist/collection/components/nv-base/nv-base.docs.js +0 -5
- package/dist/collection/components/nv-base/nv-base.docs.js.map +0 -1
- package/dist/collection/components/nv-base/nv-base.js +0 -68
- package/dist/collection/components/nv-base/nv-base.js.map +0 -1
- package/dist/components/nv-base.d.ts +0 -11
- package/dist/components/nv-base.js +0 -88
- package/dist/components/nv-base.js.map +0 -1
- package/dist/components/p-0f59f38e.js.map +0 -1
- package/dist/components/p-78e0e7b0.js.map +0 -1
- package/dist/esm/nv-base.entry.js +0 -70
- package/dist/esm/nv-base.entry.js.map +0 -1
- package/dist/native/p-19fd6594.entry.js.map +0 -1
- package/dist/native/p-1a46cb52.entry.js +0 -2
- package/dist/native/p-1a46cb52.entry.js.map +0 -1
- package/dist/native/p-331da074.entry.js +0 -2
- package/dist/native/p-42d020a7.entry.js +0 -2
- package/dist/native/p-42d020a7.entry.js.map +0 -1
- package/dist/native/p-4403e3af.entry.js +0 -2
- package/dist/native/p-4403e3af.entry.js.map +0 -1
- package/dist/native/p-45577c7f.entry.js +0 -2
- package/dist/native/p-46aa1136.entry.js +0 -2
- package/dist/native/p-54b6ce07.entry.js +0 -2
- package/dist/native/p-54b6ce07.entry.js.map +0 -1
- package/dist/native/p-665db087.entry.js +0 -2
- package/dist/native/p-942f8e92.entry.js +0 -2
- package/dist/native/p-942f8e92.entry.js.map +0 -1
- package/dist/native/p-d9624254.entry.js.map +0 -1
- package/dist/native/p-e197d90b.entry.js +0 -2
- package/dist/native/p-ecc28398.entry.js.map +0 -1
- package/dist/native/p-f89b7d06.entry.js +0 -2
- package/dist/native/p-f89b7d06.entry.js.map +0 -1
- package/dist/types/components/nv-base/nv-base.d.ts +0 -17
- package/dist/types/components/nv-base/nv-base.docs.d.ts +0 -5
- /package/dist/native/{p-665db087.entry.js.map → p-0245863d.entry.js.map} +0 -0
- /package/dist/native/{p-c10e5113.entry.js.map → p-244f56ac.entry.js.map} +0 -0
- /package/dist/native/{p-46aa1136.entry.js.map → p-2691e02d.entry.js.map} +0 -0
- /package/dist/native/{p-162f4840.entry.js.map → p-39bb95ff.entry.js.map} +0 -0
- /package/dist/native/{p-abeda2cf.entry.js.map → p-4ae26462.entry.js.map} +0 -0
- /package/dist/native/{p-e6904ae4.entry.js.map → p-5c00f092.entry.js.map} +0 -0
- /package/dist/native/{p-40f4a6e7.entry.js.map → p-6b348684.entry.js.map} +0 -0
- /package/dist/native/{p-603a99ed.entry.js.map → p-701b5557.entry.js.map} +0 -0
- /package/dist/native/{p-2281d5ef.entry.js.map → p-7f5eb2ac.entry.js.map} +0 -0
- /package/dist/native/{p-f5e0d5c5.entry.js.map → p-84a73e2a.entry.js.map} +0 -0
- /package/dist/native/{p-514101d6.entry.js.map → p-b094296d.entry.js.map} +0 -0
- /package/dist/native/{p-464ef88f.entry.js.map → p-b2ce83ad.entry.js.map} +0 -0
- /package/dist/native/{p-331da074.entry.js.map → p-bad11367.entry.js.map} +0 -0
- /package/dist/native/{p-0172095c.entry.js.map → p-c7b201cd.entry.js.map} +0 -0
- /package/dist/native/{p-725e0abd.entry.js.map → p-d7a76400.entry.js.map} +0 -0
- /package/dist/native/{p-17bf1233.entry.js.map → p-e5de64d5.entry.js.map} +0 -0
- /package/dist/native/{p-332c5d6c.entry.js.map → p-f6bdc270.entry.js.map} +0 -0
- /package/dist/native/{p-3af5bcc1.entry.js.map → p-f85aca27.entry.js.map} +0 -0
- /package/dist/native/{p-7fade532.entry.js.map → p-fa77a591.entry.js.map} +0 -0
- /package/dist/native/{p-f01a34c5.entry.js.map → p-fb5bddba.entry.js.map} +0 -0
|
@@ -30,7 +30,7 @@ const NvCol = class {
|
|
|
30
30
|
/****************************************************************************/
|
|
31
31
|
//#region RENDER
|
|
32
32
|
render() {
|
|
33
|
-
return (index.h(index.Host, { key: '
|
|
33
|
+
return (index.h(index.Host, { key: '8f7112dc8ce8896d9e7265741f06b7449dd508df', class: clsx.clsx(this.getColSize()) }, index.h("slot", { key: '3bedff11752d04db2615a5f26d4d910d95dee76c' })));
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
NvCol.style = NvColStyle0;
|
|
@@ -2957,6 +2957,22 @@ function getCoreRowModel() {
|
|
|
2957
2957
|
return rowModel;
|
|
2958
2958
|
}, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => table._autoResetPageIndex()));
|
|
2959
2959
|
}
|
|
2960
|
+
function expandRows(rowModel) {
|
|
2961
|
+
const expandedRows = [];
|
|
2962
|
+
const handleRow = row => {
|
|
2963
|
+
var _row$subRows;
|
|
2964
|
+
expandedRows.push(row);
|
|
2965
|
+
if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getIsExpanded()) {
|
|
2966
|
+
row.subRows.forEach(handleRow);
|
|
2967
|
+
}
|
|
2968
|
+
};
|
|
2969
|
+
rowModel.rows.forEach(handleRow);
|
|
2970
|
+
return {
|
|
2971
|
+
rows: expandedRows,
|
|
2972
|
+
flatRows: rowModel.flatRows,
|
|
2973
|
+
rowsById: rowModel.rowsById
|
|
2974
|
+
};
|
|
2975
|
+
}
|
|
2960
2976
|
|
|
2961
2977
|
function filterRows(rows, filterRowImpl, table) {
|
|
2962
2978
|
if (table.options.filterFromLeafRows) {
|
|
@@ -3144,6 +3160,49 @@ function getFilteredRowModel() {
|
|
|
3144
3160
|
}, getMemoOptions(table.options, 'debugTable', 'getFilteredRowModel', () => table._autoResetPageIndex()));
|
|
3145
3161
|
}
|
|
3146
3162
|
|
|
3163
|
+
function getPaginationRowModel(opts) {
|
|
3164
|
+
return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {
|
|
3165
|
+
if (!rowModel.rows.length) {
|
|
3166
|
+
return rowModel;
|
|
3167
|
+
}
|
|
3168
|
+
const {
|
|
3169
|
+
pageSize,
|
|
3170
|
+
pageIndex
|
|
3171
|
+
} = pagination;
|
|
3172
|
+
let {
|
|
3173
|
+
rows,
|
|
3174
|
+
flatRows,
|
|
3175
|
+
rowsById
|
|
3176
|
+
} = rowModel;
|
|
3177
|
+
const pageStart = pageSize * pageIndex;
|
|
3178
|
+
const pageEnd = pageStart + pageSize;
|
|
3179
|
+
rows = rows.slice(pageStart, pageEnd);
|
|
3180
|
+
let paginatedRowModel;
|
|
3181
|
+
if (!table.options.paginateExpandedRows) {
|
|
3182
|
+
paginatedRowModel = expandRows({
|
|
3183
|
+
rows,
|
|
3184
|
+
flatRows,
|
|
3185
|
+
rowsById
|
|
3186
|
+
});
|
|
3187
|
+
} else {
|
|
3188
|
+
paginatedRowModel = {
|
|
3189
|
+
rows,
|
|
3190
|
+
flatRows,
|
|
3191
|
+
rowsById
|
|
3192
|
+
};
|
|
3193
|
+
}
|
|
3194
|
+
paginatedRowModel.flatRows = [];
|
|
3195
|
+
const handleRow = row => {
|
|
3196
|
+
paginatedRowModel.flatRows.push(row);
|
|
3197
|
+
if (row.subRows.length) {
|
|
3198
|
+
row.subRows.forEach(handleRow);
|
|
3199
|
+
}
|
|
3200
|
+
};
|
|
3201
|
+
paginatedRowModel.rows.forEach(handleRow);
|
|
3202
|
+
return paginatedRowModel;
|
|
3203
|
+
}, getMemoOptions(table.options, 'debugTable'));
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3147
3206
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3148
3207
|
/**
|
|
3149
3208
|
* Debounce function to prevent multiple calls in a short
|
|
@@ -3173,12 +3232,15 @@ const NvDatagrid = class {
|
|
|
3173
3232
|
this.action = index.createEvent(this, "action", 7);
|
|
3174
3233
|
this.templateCache = new Map();
|
|
3175
3234
|
this.headerTemplateCache = new Map();
|
|
3235
|
+
this.minPageIndex = 1;
|
|
3176
3236
|
/****************************************************************************/
|
|
3177
3237
|
//#region STATES
|
|
3178
3238
|
this.table = null;
|
|
3179
3239
|
this.parsedColumns = []; // Parsed array
|
|
3180
3240
|
this.parsedData = []; // Parsed array
|
|
3181
|
-
this.
|
|
3241
|
+
this.globalFilterSearchTerm = '';
|
|
3242
|
+
this.columnData = [];
|
|
3243
|
+
this.paginationState = null;
|
|
3182
3244
|
//#endregion STATES
|
|
3183
3245
|
/****************************************************************************/
|
|
3184
3246
|
//#region PROPERTIES
|
|
@@ -3228,8 +3290,24 @@ const NvDatagrid = class {
|
|
|
3228
3290
|
* @default false
|
|
3229
3291
|
*/
|
|
3230
3292
|
this.autoGenerateColumns = false;
|
|
3293
|
+
/**
|
|
3294
|
+
* Whether to enable pagination for the data grid.
|
|
3295
|
+
* @default false
|
|
3296
|
+
*/
|
|
3297
|
+
this.enablePagination = false;
|
|
3298
|
+
/**
|
|
3299
|
+
* The number of rows to display per page.
|
|
3300
|
+
* @default 10
|
|
3301
|
+
*/
|
|
3302
|
+
this.pageSize = 10;
|
|
3303
|
+
/**
|
|
3304
|
+
* The array of page sizes to display in the pagination dropdown.
|
|
3305
|
+
* @default [10, 20, 30, 40, 50]
|
|
3306
|
+
*/
|
|
3307
|
+
this.pageSizes = [10, 20, 30, 40, 50];
|
|
3231
3308
|
this.debouncedFilter = debounce((value) => {
|
|
3232
|
-
|
|
3309
|
+
var _a;
|
|
3310
|
+
(_a = this.table) === null || _a === void 0 ? void 0 : _a.setGlobalFilter(value);
|
|
3233
3311
|
}, 300);
|
|
3234
3312
|
/**
|
|
3235
3313
|
* Handles global filtering on input event for the search input.
|
|
@@ -3245,6 +3323,23 @@ const NvDatagrid = class {
|
|
|
3245
3323
|
this.debouncedFilter(value);
|
|
3246
3324
|
}
|
|
3247
3325
|
};
|
|
3326
|
+
this.flexRender = (comp, props) => {
|
|
3327
|
+
if (typeof comp === 'function') {
|
|
3328
|
+
return comp(props);
|
|
3329
|
+
}
|
|
3330
|
+
return comp;
|
|
3331
|
+
};
|
|
3332
|
+
this.handlePageIndexChange = (event) => {
|
|
3333
|
+
const target = event.target;
|
|
3334
|
+
const page = target.value ? Number(target.value) - 1 : 0;
|
|
3335
|
+
// Simply use `setPageIndex` to update the page index directly
|
|
3336
|
+
this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageIndex: page }); // This triggers the paginationState watcher
|
|
3337
|
+
};
|
|
3338
|
+
this.handlePageSizeChange = (event) => {
|
|
3339
|
+
const target = event.target;
|
|
3340
|
+
// Simply use `setPageSize` to update the page size directly
|
|
3341
|
+
this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageSize: Number(target.value) }); // This triggers the paginationState watcher
|
|
3342
|
+
};
|
|
3248
3343
|
}
|
|
3249
3344
|
//#endregion PROPERTIES
|
|
3250
3345
|
/****************************************************************************/
|
|
@@ -3254,6 +3349,7 @@ const NvDatagrid = class {
|
|
|
3254
3349
|
*/
|
|
3255
3350
|
cacheTemplates() {
|
|
3256
3351
|
const columns = Array.from(this.el.querySelectorAll('nv-datagridcolumn'));
|
|
3352
|
+
this.columnData = [];
|
|
3257
3353
|
columns.forEach((col) => {
|
|
3258
3354
|
const key = col.accessor;
|
|
3259
3355
|
const cellSlot = col.querySelector('[slot="cell"]');
|
|
@@ -3274,6 +3370,12 @@ const NvDatagrid = class {
|
|
|
3274
3370
|
this.headerTemplateCache.set(key, headerDiv);
|
|
3275
3371
|
}
|
|
3276
3372
|
}
|
|
3373
|
+
const colData = {
|
|
3374
|
+
header: col.header,
|
|
3375
|
+
accessor: col.accessor,
|
|
3376
|
+
repeatTemplate: col.hasAttribute('repeat-template'),
|
|
3377
|
+
};
|
|
3378
|
+
this.columnData.push(colData);
|
|
3277
3379
|
});
|
|
3278
3380
|
}
|
|
3279
3381
|
parseDataAndColumns() {
|
|
@@ -3339,6 +3441,7 @@ const NvDatagrid = class {
|
|
|
3339
3441
|
this.parsedColumns = safeNewValue;
|
|
3340
3442
|
}
|
|
3341
3443
|
initializeTable() {
|
|
3444
|
+
var _a, _b, _c, _d;
|
|
3342
3445
|
// Clear the previous table instance (if any)
|
|
3343
3446
|
this.table = null;
|
|
3344
3447
|
// Set default options for the table
|
|
@@ -3372,26 +3475,9 @@ const NvDatagrid = class {
|
|
|
3372
3475
|
}, // Default: no column sizing info
|
|
3373
3476
|
},
|
|
3374
3477
|
};
|
|
3375
|
-
if (this.enableGlobalFilter) {
|
|
3376
|
-
tableOptions.getFilteredRowModel = getFilteredRowModel();
|
|
3377
|
-
// Set the initial global filter value
|
|
3378
|
-
tableOptions.state.globalFilter = this.globalFilter;
|
|
3379
|
-
// Define the callback for global filter changes
|
|
3380
|
-
tableOptions.onGlobalFilterChange = value => {
|
|
3381
|
-
this.globalFilter = value;
|
|
3382
|
-
};
|
|
3383
|
-
tableOptions.globalFilterFn = (row, columnId, filterValue) => {
|
|
3384
|
-
const response = row
|
|
3385
|
-
.getValue(columnId)
|
|
3386
|
-
.toString()
|
|
3387
|
-
.toLowerCase()
|
|
3388
|
-
.includes(filterValue.toLowerCase());
|
|
3389
|
-
return response;
|
|
3390
|
-
};
|
|
3391
|
-
}
|
|
3392
3478
|
if (this.parsedColumns.length > 0) {
|
|
3393
3479
|
// Validate and generate column definitions
|
|
3394
|
-
const validColumns = this.parsedColumns.filter(column =>
|
|
3480
|
+
const validColumns = this.parsedColumns.filter(column => column === null || column === void 0 ? void 0 : column.accessor);
|
|
3395
3481
|
// Update tableOptions based on parsed data and columns
|
|
3396
3482
|
const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
|
|
3397
3483
|
const hasData = this.parsedData &&
|
|
@@ -3399,22 +3485,22 @@ const NvDatagrid = class {
|
|
|
3399
3485
|
this.parsedData.length > 0;
|
|
3400
3486
|
if (!hasColumns && !hasData) ;
|
|
3401
3487
|
else if (hasColumns && !hasData) {
|
|
3488
|
+
// Has columns but no data
|
|
3402
3489
|
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
3403
3490
|
}
|
|
3404
3491
|
else {
|
|
3405
3492
|
// Both columns and data are available
|
|
3406
|
-
// No columns and data is available
|
|
3407
3493
|
tableOptions.data = this.getTableData();
|
|
3408
3494
|
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
3409
3495
|
}
|
|
3410
3496
|
}
|
|
3411
3497
|
else {
|
|
3412
|
-
// No columns and data is available
|
|
3498
|
+
// No parsed columns and data is available
|
|
3413
3499
|
const hasData = this.parsedData &&
|
|
3414
3500
|
Array.isArray(this.parsedData) &&
|
|
3415
3501
|
this.parsedData.length > 0;
|
|
3416
3502
|
if (hasData) {
|
|
3417
|
-
// No columns and data is available
|
|
3503
|
+
// No parsed columns and data is available
|
|
3418
3504
|
const firstRow = this.parsedData[0];
|
|
3419
3505
|
const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
|
|
3420
3506
|
accessor: key,
|
|
@@ -3427,26 +3513,116 @@ const NvDatagrid = class {
|
|
|
3427
3513
|
tableOptions.columns = this.generateColumns(arrayColumnsConfig, tableOptions);
|
|
3428
3514
|
}
|
|
3429
3515
|
}
|
|
3516
|
+
if (this.enableGlobalFilter) {
|
|
3517
|
+
tableOptions.getFilteredRowModel = getFilteredRowModel();
|
|
3518
|
+
const globalFilter = this.globalFilterSearchTerm;
|
|
3519
|
+
// Set the initial global filter value
|
|
3520
|
+
tableOptions.state.globalFilter = globalFilter;
|
|
3521
|
+
// Define the callback for global filter changes
|
|
3522
|
+
tableOptions.onGlobalFilterChange = updater => {
|
|
3523
|
+
const newFilter = typeof updater === 'function'
|
|
3524
|
+
? updater(this.globalFilterSearchTerm)
|
|
3525
|
+
: updater;
|
|
3526
|
+
this.globalFilterSearchTerm = newFilter; // Will automatically trigger the searchTerm watcher and update the table
|
|
3527
|
+
};
|
|
3528
|
+
tableOptions.globalFilterFn = this.globalFilterFn;
|
|
3529
|
+
}
|
|
3530
|
+
if (this.enablePagination) {
|
|
3531
|
+
tableOptions.getPaginationRowModel = getPaginationRowModel();
|
|
3532
|
+
const pagination = {
|
|
3533
|
+
pageIndex: (_b = (_a = this.paginationState) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0,
|
|
3534
|
+
pageSize: (_d = (_c = this.paginationState) === null || _c === void 0 ? void 0 : _c.pageSize) !== null && _d !== void 0 ? _d : 10,
|
|
3535
|
+
};
|
|
3536
|
+
// Set the initial pagination value with safeguards
|
|
3537
|
+
tableOptions.state.pagination = pagination;
|
|
3538
|
+
tableOptions.onPaginationChange = updater => {
|
|
3539
|
+
const newPagination = typeof updater === 'function'
|
|
3540
|
+
? updater(this.paginationState)
|
|
3541
|
+
: updater;
|
|
3542
|
+
this.paginationState = newPagination;
|
|
3543
|
+
};
|
|
3544
|
+
}
|
|
3430
3545
|
// Initialize the table
|
|
3431
3546
|
this.table = createTable(tableOptions);
|
|
3432
3547
|
}
|
|
3548
|
+
/**
|
|
3549
|
+
* Global filter function for the table.
|
|
3550
|
+
* This function checks if the specified filter value is present in any of the row's original values,
|
|
3551
|
+
* including nested objects and arrays. It is used to filter the rows based on the global filter value,
|
|
3552
|
+
* allowing for case-insensitive matching.
|
|
3553
|
+
*
|
|
3554
|
+
* @param {Row<any>} row - The row object containing the data to be filtered.
|
|
3555
|
+
* @param {string} _columnId - The ID of the column being filtered (not used in this function).
|
|
3556
|
+
* @param {string} filterValue - The value to filter the rows by. This value is checked against the row's data.
|
|
3557
|
+
* @returns {boolean} - Returns true if the row should be included in the filtered results, false otherwise.
|
|
3558
|
+
* If the filter value is empty, all rows are included.
|
|
3559
|
+
*/
|
|
3560
|
+
globalFilterFn(row, _columnId, filterValue) {
|
|
3561
|
+
const safeFilterValue = String(filterValue).toLowerCase().trim();
|
|
3562
|
+
// If no filter value, return true for all rows
|
|
3563
|
+
if (!safeFilterValue)
|
|
3564
|
+
return true;
|
|
3565
|
+
// More robust filtering across all columns
|
|
3566
|
+
const checkValue = (value) => {
|
|
3567
|
+
if (typeof value === 'object' && value !== null) {
|
|
3568
|
+
// If it's an array, check each item
|
|
3569
|
+
if (Array.isArray(value)) {
|
|
3570
|
+
return value.some(item => checkValue(item));
|
|
3571
|
+
}
|
|
3572
|
+
// If it's an object, check each property
|
|
3573
|
+
return Object.values(value).some(val => checkValue(val));
|
|
3574
|
+
}
|
|
3575
|
+
return String(value).toLowerCase().includes(safeFilterValue);
|
|
3576
|
+
};
|
|
3577
|
+
return checkValue(row.original);
|
|
3578
|
+
}
|
|
3433
3579
|
// Helper function to generate column definitions
|
|
3434
3580
|
generateColumns(validColumns, tableOptions) {
|
|
3435
3581
|
const columnHelper = createColumnHelper();
|
|
3436
3582
|
if (validColumns.length > 0) {
|
|
3437
3583
|
// Use defined columns
|
|
3438
|
-
return validColumns.map(column =>
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3584
|
+
return validColumns.map(column => {
|
|
3585
|
+
var _a, _b;
|
|
3586
|
+
return columnHelper.accessor(column.accessor, {
|
|
3587
|
+
header: (_b = (this.renderTemplate(this.headerTemplateCache.get(column.accessor), (_a = column.header) !== null && _a !== void 0 ? _a : column.accessor, null) ||
|
|
3588
|
+
column.header)) !== null && _b !== void 0 ? _b : column.accessor,
|
|
3589
|
+
cell: (info) => {
|
|
3590
|
+
var _a, _b, _c;
|
|
3591
|
+
const value = info.getValue();
|
|
3592
|
+
const cellAccessors = column.accessor;
|
|
3593
|
+
const row = info.row;
|
|
3594
|
+
return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
|
|
3595
|
+
? value.map((item) => {
|
|
3596
|
+
var _a, _b;
|
|
3597
|
+
return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
|
|
3598
|
+
item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
|
|
3599
|
+
})
|
|
3600
|
+
: (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
|
|
3601
|
+
value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
|
|
3602
|
+
},
|
|
3603
|
+
enableGlobalFilter: this.enableGlobalFilter,
|
|
3604
|
+
});
|
|
3605
|
+
});
|
|
3443
3606
|
}
|
|
3444
3607
|
else if (tableOptions.data && tableOptions.data.length > 0) {
|
|
3445
3608
|
// Generate columns from data keys
|
|
3446
3609
|
const sampleRow = tableOptions.data[0];
|
|
3447
3610
|
return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
|
|
3448
|
-
header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
3449
|
-
cell: info =>
|
|
3611
|
+
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
|
|
3612
|
+
cell: (info) => {
|
|
3613
|
+
var _a, _b, _c;
|
|
3614
|
+
const value = info.getValue();
|
|
3615
|
+
const cellAccessors = key;
|
|
3616
|
+
const row = info.row;
|
|
3617
|
+
return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
|
|
3618
|
+
? value.map((item) => {
|
|
3619
|
+
var _a, _b;
|
|
3620
|
+
return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
|
|
3621
|
+
item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
|
|
3622
|
+
})
|
|
3623
|
+
: (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
|
|
3624
|
+
value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
|
|
3625
|
+
},
|
|
3450
3626
|
enableGlobalFilter: this.enableGlobalFilter,
|
|
3451
3627
|
}));
|
|
3452
3628
|
}
|
|
@@ -3475,11 +3651,11 @@ const NvDatagrid = class {
|
|
|
3475
3651
|
// Replace placeholders in text content, attributes, and properties
|
|
3476
3652
|
element.querySelectorAll('*').forEach(el => {
|
|
3477
3653
|
// Replace placeholders in text content
|
|
3478
|
-
this.replacePlaceholdersTextContent(el, cellValue);
|
|
3654
|
+
this.replacePlaceholdersTextContent(el, cellValue, row);
|
|
3479
3655
|
// Replace placeholders in attributes
|
|
3480
|
-
this.replacePlaceholdersAttributes(el, cellValue);
|
|
3656
|
+
this.replacePlaceholdersAttributes(el, cellValue, row);
|
|
3481
3657
|
// Replace placeholders in properties
|
|
3482
|
-
this.replacePlaceholdersProperties(el, cellValue);
|
|
3658
|
+
this.replacePlaceholdersProperties(el, cellValue, row);
|
|
3483
3659
|
});
|
|
3484
3660
|
// Handle `data-bind-event`
|
|
3485
3661
|
element.querySelectorAll('[data-bind-event]').forEach(el => {
|
|
@@ -3555,56 +3731,151 @@ const NvDatagrid = class {
|
|
|
3555
3731
|
}
|
|
3556
3732
|
}
|
|
3557
3733
|
// Handle single-level key lookup
|
|
3558
|
-
|
|
3734
|
+
if (key in cellValue) {
|
|
3735
|
+
return String(cellValue[key]);
|
|
3736
|
+
}
|
|
3737
|
+
else if (Array.isArray(cellValue)) {
|
|
3738
|
+
// Handle array of objects
|
|
3739
|
+
const response = cellValue.map((item) => {
|
|
3740
|
+
if (typeof item !== 'object') {
|
|
3741
|
+
return item.toString();
|
|
3742
|
+
}
|
|
3743
|
+
else if (key in item) {
|
|
3744
|
+
return item[key];
|
|
3745
|
+
}
|
|
3746
|
+
else {
|
|
3747
|
+
return item.toString();
|
|
3748
|
+
}
|
|
3749
|
+
});
|
|
3750
|
+
return response.join(', ');
|
|
3751
|
+
}
|
|
3752
|
+
return this.fallbackValue;
|
|
3559
3753
|
}
|
|
3560
3754
|
// If cellValue is a primitive (string, number, boolean, etc.), return it as a string
|
|
3561
3755
|
return (_a = cellValue === null || cellValue === void 0 ? void 0 : cellValue.toString()) !== null && _a !== void 0 ? _a : this.fallbackValue;
|
|
3562
3756
|
}
|
|
3563
|
-
replacePlaceholdersTextContent(element, cellValue) {
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3757
|
+
replacePlaceholdersTextContent(element, cellValue, row) {
|
|
3758
|
+
if (!cellValue) {
|
|
3759
|
+
// ✅ Replace placeholders in text content with the row original value
|
|
3760
|
+
// but first get the original value
|
|
3761
|
+
const originalValue = row.original;
|
|
3762
|
+
element.childNodes.forEach(node => {
|
|
3763
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
3764
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => {
|
|
3765
|
+
if (key in originalValue) {
|
|
3766
|
+
return this.replaceKeyWithValue(key, originalValue[key]);
|
|
3767
|
+
}
|
|
3768
|
+
else {
|
|
3769
|
+
console.warn(`Key ${key} not found in originalValue`);
|
|
3770
|
+
return '';
|
|
3771
|
+
}
|
|
3772
|
+
});
|
|
3773
|
+
}
|
|
3774
|
+
});
|
|
3775
|
+
}
|
|
3776
|
+
else {
|
|
3777
|
+
// ✅ Replace placeholders in text content
|
|
3778
|
+
element.childNodes.forEach(node => {
|
|
3779
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
3780
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
3781
|
+
}
|
|
3782
|
+
});
|
|
3783
|
+
}
|
|
3570
3784
|
}
|
|
3571
|
-
replacePlaceholdersAttributes(element, cellValue) {
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3785
|
+
replacePlaceholdersAttributes(element, cellValue, row) {
|
|
3786
|
+
if (!cellValue) {
|
|
3787
|
+
// ✅ Replace placeholders in attributes with the row original value
|
|
3788
|
+
// but first get the original value
|
|
3789
|
+
const originalValue = row.original;
|
|
3790
|
+
Array.from(element.attributes).forEach(attr => {
|
|
3791
|
+
if (attr.value.includes('__')) {
|
|
3792
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => {
|
|
3793
|
+
if (key in originalValue) {
|
|
3794
|
+
return this.replaceKeyWithValue(key, originalValue[key]);
|
|
3795
|
+
}
|
|
3796
|
+
else {
|
|
3797
|
+
console.warn(`Key ${key} not found in originalValue`);
|
|
3798
|
+
return '';
|
|
3799
|
+
}
|
|
3800
|
+
});
|
|
3801
|
+
}
|
|
3802
|
+
});
|
|
3803
|
+
}
|
|
3804
|
+
else {
|
|
3805
|
+
// ✅ Replace placeholders in attributes
|
|
3806
|
+
Array.from(element.attributes).forEach(attr => {
|
|
3807
|
+
if (attr.value.includes('__')) {
|
|
3808
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
3809
|
+
}
|
|
3810
|
+
});
|
|
3811
|
+
}
|
|
3578
3812
|
}
|
|
3579
|
-
replacePlaceholdersProperties(element, cellValue) {
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
Object.keys(
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3813
|
+
replacePlaceholdersProperties(element, cellValue, row) {
|
|
3814
|
+
if (!cellValue) {
|
|
3815
|
+
// ✅ Replace placeholders in properties with the row original value
|
|
3816
|
+
// but first get the original value
|
|
3817
|
+
const originalValue = row.original;
|
|
3818
|
+
// ✅ Dynamically extract relevant properties
|
|
3819
|
+
const properties = new Set();
|
|
3820
|
+
// Collect only own enumerable properties
|
|
3821
|
+
Object.keys(originalValue).forEach(key => properties.add(key));
|
|
3822
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
3823
|
+
let proto = Object.getPrototypeOf(originalValue);
|
|
3824
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
3825
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
3826
|
+
proto = Object.getPrototypeOf(proto);
|
|
3827
|
+
}
|
|
3828
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
3829
|
+
properties.forEach(prop => {
|
|
3830
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
3831
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
3832
|
+
!dom_utils.excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
3833
|
+
) {
|
|
3597
3834
|
const propValue = element[prop];
|
|
3598
|
-
// ✅ Replace placeholders only if the value is a string
|
|
3599
3835
|
if (typeof propValue === 'string' && propValue.includes('__')) {
|
|
3600
|
-
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) =>
|
|
3836
|
+
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => {
|
|
3837
|
+
if (key in originalValue) {
|
|
3838
|
+
return this.replaceKeyWithValue(key, originalValue[key]);
|
|
3839
|
+
}
|
|
3840
|
+
else {
|
|
3841
|
+
console.warn(`Key ${key} not found in originalValue`);
|
|
3842
|
+
return '';
|
|
3843
|
+
}
|
|
3844
|
+
});
|
|
3601
3845
|
}
|
|
3602
3846
|
}
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3847
|
+
});
|
|
3848
|
+
}
|
|
3849
|
+
else {
|
|
3850
|
+
// ✅ Dynamically extract relevant properties
|
|
3851
|
+
const properties = new Set();
|
|
3852
|
+
// Collect only own enumerable properties
|
|
3853
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
3854
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
3855
|
+
let proto = Object.getPrototypeOf(element);
|
|
3856
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
3857
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
3858
|
+
proto = Object.getPrototypeOf(proto);
|
|
3606
3859
|
}
|
|
3607
|
-
|
|
3860
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
3861
|
+
properties.forEach(prop => {
|
|
3862
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
3863
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
3864
|
+
!dom_utils.excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
3865
|
+
) {
|
|
3866
|
+
try {
|
|
3867
|
+
const propValue = element[prop];
|
|
3868
|
+
// ✅ Replace placeholders only if the value is a string
|
|
3869
|
+
if (typeof propValue === 'string' && propValue.includes('__')) {
|
|
3870
|
+
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue)); // ✅ TypeScript safe
|
|
3871
|
+
}
|
|
3872
|
+
}
|
|
3873
|
+
catch (error) {
|
|
3874
|
+
console.warn(`Could not assign property ${prop}:`, error.message);
|
|
3875
|
+
}
|
|
3876
|
+
}
|
|
3877
|
+
});
|
|
3878
|
+
}
|
|
3608
3879
|
}
|
|
3609
3880
|
//#endregion METHODS
|
|
3610
3881
|
/****************************************************************************/
|
|
@@ -3638,14 +3909,30 @@ const NvDatagrid = class {
|
|
|
3638
3909
|
handleParsedChange() {
|
|
3639
3910
|
this.initializeTable();
|
|
3640
3911
|
}
|
|
3641
|
-
|
|
3912
|
+
handleGlobalFilterSearchTerm(newValue) {
|
|
3642
3913
|
if (!this.table) {
|
|
3643
3914
|
console.warn('Table is not initialized yet.');
|
|
3644
3915
|
return;
|
|
3645
3916
|
}
|
|
3646
|
-
//
|
|
3647
|
-
|
|
3648
|
-
this.table.setGlobalFilter(newValue)
|
|
3917
|
+
// Not working
|
|
3918
|
+
/*// Set the global filter for the table
|
|
3919
|
+
this.table.setGlobalFilter(newValue);*/
|
|
3920
|
+
// Manually update the globalFilter state
|
|
3921
|
+
this.table.options.state.globalFilter = newValue;
|
|
3922
|
+
}
|
|
3923
|
+
handlePaginationState(newValue, oldValue) {
|
|
3924
|
+
if (!this.table) {
|
|
3925
|
+
console.warn('Table is not initialized yet.');
|
|
3926
|
+
return;
|
|
3927
|
+
}
|
|
3928
|
+
// Only update if there is a meaningful change
|
|
3929
|
+
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
|
|
3930
|
+
// Not working
|
|
3931
|
+
/*// Set the pagination for the table
|
|
3932
|
+
this.table.setPagination(newValue);*/
|
|
3933
|
+
// Manually update the pagination state
|
|
3934
|
+
this.table.options.state.pagination = newValue;
|
|
3935
|
+
}
|
|
3649
3936
|
}
|
|
3650
3937
|
//#endregion WATCHERS
|
|
3651
3938
|
/****************************************************************************/
|
|
@@ -3654,34 +3941,39 @@ const NvDatagrid = class {
|
|
|
3654
3941
|
this.cacheTemplates();
|
|
3655
3942
|
this.parseDataAndColumns();
|
|
3656
3943
|
this.initializeTable();
|
|
3944
|
+
if (this.enablePagination) {
|
|
3945
|
+
// Ensure a valid page size
|
|
3946
|
+
const effectivePageSize = this.pageSize > 0 ? this.pageSize : 10;
|
|
3947
|
+
this.paginationState = {
|
|
3948
|
+
pageIndex: Math.max(0, this.minPageIndex - 1),
|
|
3949
|
+
pageSize: effectivePageSize,
|
|
3950
|
+
};
|
|
3951
|
+
}
|
|
3657
3952
|
}
|
|
3658
3953
|
//#endregion EVENTS
|
|
3659
3954
|
/****************************************************************************/
|
|
3660
3955
|
//#region RENDER
|
|
3661
3956
|
render() {
|
|
3662
|
-
var _a, _b, _c, _d;
|
|
3957
|
+
var _a, _b, _c, _d, _e;
|
|
3663
3958
|
const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
|
|
3664
3959
|
? []
|
|
3665
3960
|
: (_a = this.table) === null || _a === void 0 ? void 0 : _a.getHeaderGroups();
|
|
3666
3961
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
3667
3962
|
? []
|
|
3668
3963
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
3669
|
-
return (index.h(index.Host, { key: '
|
|
3964
|
+
return (index.h(index.Host, { key: 'b3886397a5e6694611636d4da7d61ae5ccbe1903' }, index.h("div", { key: '8fa71d83f4cfa79cf7fb334bcf6115e4cf253c5d', class: "hidden" }, index.h("slot", { key: '9aad5956b5973cafc486f3a854a66ae86038ef4a' })), index.h("slot", { key: '7a1ca93223567faffabb3473df2176cd02654247', name: "before" }), this.enableGlobalFilter && this.table && (index.h("div", { key: '0020880c229d8ed9070c15182191e86b8b3fed1d', class: "search-container" }, index.h("input", { key: 'cefc47330a7d770c3668d1406930b9ac50992a10', type: "text", value: (_d = this.globalFilterSearchTerm) !== null && _d !== void 0 ? _d : '', onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns...", class: "search-input", "aria-label": "Search all columns" }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (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
|
|
3670
3965
|
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (index.h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
3671
3966
|
return (index.h("th", { key: header.id }, header.isPlaceholder
|
|
3672
3967
|
? null
|
|
3673
|
-
: this.
|
|
3968
|
+
: this.flexRender(header.column.columnDef.header, header.getContext())));
|
|
3674
3969
|
}))))
|
|
3675
3970
|
: 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 => {
|
|
3676
3971
|
const rowId = row.id;
|
|
3677
3972
|
const visibleCells = row === null || row === void 0 ? void 0 : row.getVisibleCells();
|
|
3678
3973
|
return (index.h("tr", { key: rowId }, visibleCells.map(cell => {
|
|
3679
|
-
|
|
3680
|
-
const cellValue = cell.getValue();
|
|
3681
|
-
return (index.h("td", { key: cell.id, "data-row-id": rowId }, this.renderTemplate(this.templateCache.get(cellAccessors), cellValue, row) ||
|
|
3682
|
-
(cellValue !== null && cellValue !== void 0 ? cellValue : this.fallbackValue)));
|
|
3974
|
+
return (index.h("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
3683
3975
|
})));
|
|
3684
|
-
}))))), index.h("slot", { key: '
|
|
3976
|
+
})))), 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 })), (_e = this.pageSizes) !== null && _e !== void 0 ? _e : (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))))))))), index.h("slot", { key: '2030fdc2b38a293e749f2ffd4645987e834fee76', name: "after" })));
|
|
3685
3977
|
}
|
|
3686
3978
|
get el() { return index.getElement(this); }
|
|
3687
3979
|
static get watchers() { return {
|
|
@@ -3691,7 +3983,8 @@ const NvDatagrid = class {
|
|
|
3691
3983
|
"dataJson": ["parseJsonData"],
|
|
3692
3984
|
"parsedColumns": ["handleParsedChange"],
|
|
3693
3985
|
"parsedData": ["handleParsedChange"],
|
|
3694
|
-
"
|
|
3986
|
+
"globalFilterSearchTerm": ["handleGlobalFilterSearchTerm"],
|
|
3987
|
+
"paginationState": ["handlePaginationState"]
|
|
3695
3988
|
}; }
|
|
3696
3989
|
};
|
|
3697
3990
|
NvDatagrid.style = NvDatagridStyle0;
|