@nova-design-system/nova-webcomponents 3.0.0-beta.39 → 3.0.0-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{constants-2ae3d9eb.js → constants-79d2cdfc.js} +4 -4
- package/dist/cjs/constants-79d2cdfc.js.map +1 -0
- package/dist/cjs/dom.utils-4d43f69a.js +170 -0
- package/dist/cjs/dom.utils-4d43f69a.js.map +1 -0
- package/dist/cjs/index-5910ba06.js +0 -32
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +32 -9
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +2 -2
- package/dist/cjs/nv-badge_2.cjs.entry.js +3 -3
- package/dist/cjs/nv-base.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +34 -12
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +2 -2
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +325 -165
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -5
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +20 -9
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +17 -12
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +3 -3
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtime.cjs.entry.js +10 -10
- package/dist/cjs/nv-icon.cjs.entry.js +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton.cjs.entry.js +1 -1
- package/dist/cjs/nv-loader.cjs.entry.js +1 -1
- package/dist/cjs/nv-menu.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +267 -81
- package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -21
- package/dist/cjs/nv-tablecolumn.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -9
- package/dist/collection/components/nv-alert/nv-alert.docs.js +5 -0
- package/dist/collection/components/nv-alert/nv-alert.docs.js.map +1 -1
- package/dist/collection/components/nv-alert/nv-alert.js +51 -8
- package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
- package/dist/collection/components/nv-avatar/nv-avatar.js +1 -1
- package/dist/collection/components/nv-badge/nv-badge.js +2 -2
- package/dist/collection/components/nv-base/nv-base.js +1 -1
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
- package/dist/collection/components/nv-button/nv-button.docs.js +4 -0
- package/dist/collection/components/nv-button/nv-button.docs.js.map +1 -1
- package/dist/collection/components/nv-button/nv-button.js +54 -13
- package/dist/collection/components/nv-button/nv-button.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +1 -1
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +30 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +25 -77
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +396 -194
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +7 -16
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +6 -9
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +20 -29
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +71 -21
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js.map +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +4 -4
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
- package/dist/collection/components/nv-icon/nv-icon.js +3 -3
- package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.docs.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +3 -3
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +3 -3
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.css +30 -0
- package/dist/collection/components/nv-table/nv-table.docs.js +69 -74
- package/dist/collection/components/nv-table/nv-table.docs.js.map +1 -1
- package/dist/collection/components/nv-table/nv-table.js +349 -137
- package/dist/collection/components/nv-table/nv-table.js.map +1 -1
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js +11 -111
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js.map +1 -1
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/interfaces/ColumnConfig.js +2 -0
- package/dist/collection/interfaces/ColumnConfig.js.map +1 -0
- package/dist/collection/interfaces/actionEvent.js +2 -0
- package/dist/collection/interfaces/actionEvent.js.map +1 -0
- package/dist/collection/utils/dom.utils.js +164 -0
- package/dist/collection/utils/dom.utils.js.map +1 -0
- package/dist/collection/utils/test/class.utils.test.js +25 -0
- package/dist/collection/utils/test/class.utils.test.js.map +1 -0
- package/dist/collection/utils/test/dom.utils.test.js +102 -0
- package/dist/collection/utils/test/dom.utils.test.js.map +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/nv-alert.js +35 -11
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +3 -3
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-base.js +1 -1
- package/dist/components/nv-breadcrumb.js +3 -3
- package/dist/components/nv-breadcrumbs.js +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +6 -6
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +332 -173
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridcolumn.js +3 -7
- package/dist/components/nv-datagridcolumn.js.map +1 -1
- package/dist/components/nv-dialog.js +25 -15
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddropdown.js +8 -8
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +7 -7
- package/dist/components/nv-fieldnumber.js +4 -4
- package/dist/components/nv-fieldpassword.js +6 -6
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +6 -6
- package/dist/components/nv-fieldtext.js +4 -4
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +14 -14
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +5 -5
- package/dist/components/nv-menu.js.map +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +279 -91
- package/dist/components/nv-table.js.map +1 -1
- package/dist/components/nv-tablecolumn.js +5 -28
- package/dist/components/nv-tablecolumn.js.map +1 -1
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-659a5ae4.js → p-11cc38e0.js} +4 -4
- package/dist/components/{p-659a5ae4.js.map → p-11cc38e0.js.map} +1 -1
- package/dist/components/{p-17b6705f.js → p-1657eba4.js} +23 -16
- package/dist/components/p-1657eba4.js.map +1 -0
- package/dist/components/{p-88165c0e.js → p-33f9bdb1.js} +4 -4
- package/dist/components/{p-88165c0e.js.map → p-33f9bdb1.js.map} +1 -1
- package/dist/components/{p-f40a7e2f.js → p-4b184820.js} +3 -3
- package/dist/components/{p-f40a7e2f.js.map → p-4b184820.js.map} +1 -1
- package/dist/components/{p-48317c2c.js → p-4bb5eb79.js} +3 -3
- package/dist/components/{p-48317c2c.js.map → p-4bb5eb79.js.map} +1 -1
- package/dist/components/{p-842afd9a.js → p-69543282.js} +3 -3
- package/dist/components/{p-842afd9a.js.map → p-69543282.js.map} +1 -1
- package/dist/components/{p-fdf57d25.js → p-96605453.js} +5 -5
- package/dist/components/{p-fdf57d25.js.map → p-96605453.js.map} +1 -1
- package/dist/components/{p-33e07c91.js → p-a633892a.js} +2 -2
- package/dist/components/{p-33e07c91.js.map → p-a633892a.js.map} +1 -1
- package/dist/components/{p-fd65c51f.js → p-b316c35d.js} +2 -2
- package/dist/components/p-b316c35d.js.map +1 -0
- package/dist/components/{p-8d7a57d1.js → p-ba145f46.js} +38 -15
- package/dist/components/p-ba145f46.js.map +1 -0
- package/dist/components/p-cb34aa4f.js +167 -0
- package/dist/components/p-cb34aa4f.js.map +1 -0
- package/dist/components/{p-492ad81d.js → p-d17558a8.js} +2 -2
- package/dist/components/{p-492ad81d.js.map → p-d17558a8.js.map} +1 -1
- package/dist/components/{p-73e703a1.js → p-f201db34.js} +2 -2
- package/dist/components/{p-73e703a1.js.map → p-f201db34.js.map} +1 -1
- package/dist/components/{p-5f5e2bf2.js → p-f77c3072.js} +4 -4
- package/dist/components/p-f77c3072.js.map +1 -0
- package/dist/components/{p-83e1177b.js → p-fad78896.js} +3 -3
- package/dist/components/{p-83e1177b.js.map → p-fad78896.js.map} +1 -1
- package/dist/docs.json +352 -679
- package/dist/esm/{constants-8243d2ea.js → constants-75e6d7f0.js} +2 -2
- package/dist/esm/constants-75e6d7f0.js.map +1 -0
- package/dist/esm/dom.utils-ac71e0ef.js +167 -0
- package/dist/esm/dom.utils-ac71e0ef.js.map +1 -0
- package/dist/esm/index-fac2d5d2.js +0 -32
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-alert.entry.js +32 -9
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +2 -2
- package/dist/esm/nv-badge_2.entry.js +3 -3
- package/dist/esm/nv-base.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +34 -12
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-calendar.entry.js +2 -2
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +326 -166
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +1 -5
- package/dist/esm/nv-datagridcolumn.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +20 -9
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +17 -12
- package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
- package/dist/esm/nv-fielddropdown.entry.js +3 -3
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldpassword.entry.js +3 -3
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js +10 -10
- package/dist/esm/nv-icon.entry.js +3 -3
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton.entry.js +1 -1
- package/dist/esm/nv-loader.entry.js +1 -1
- package/dist/esm/nv-menu.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js.map +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +268 -82
- package/dist/esm/nv-table.entry.js.map +1 -1
- package/dist/esm/nv-tablecolumn.entry.js +2 -22
- package/dist/esm/nv-tablecolumn.entry.js.map +1 -1
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-e1b22ca7.entry.js → p-0a2a9f8b.entry.js} +2 -2
- package/dist/native/{p-46c9aa04.entry.js → p-12d08abc.entry.js} +2 -2
- package/dist/native/{p-63c894f0.entry.js → p-15be3d96.entry.js} +2 -2
- package/dist/native/{p-943a19a5.entry.js → p-184cd119.entry.js} +2 -2
- package/dist/native/{p-2b99e720.entry.js → p-1a3d2a74.entry.js} +2 -2
- package/dist/native/{p-bac62e20.entry.js → p-27ad7af2.entry.js} +2 -2
- package/dist/native/p-27ad7af2.entry.js.map +1 -0
- package/dist/native/p-2b2a10f9.entry.js +2 -0
- package/dist/native/p-2b2a10f9.entry.js.map +1 -0
- package/dist/native/{p-3b2c7871.entry.js → p-359f0f53.entry.js} +2 -2
- package/dist/native/p-3b65037c.entry.js +2 -0
- package/dist/native/p-3b65037c.entry.js.map +1 -0
- package/dist/native/p-3be2c9a1.entry.js +2 -0
- package/dist/native/p-4283f375.entry.js +2 -0
- package/dist/native/p-4283f375.entry.js.map +1 -0
- package/dist/native/p-487b81bd.entry.js +2 -0
- package/dist/native/p-487b81bd.entry.js.map +1 -0
- package/dist/native/{p-fa33ec18.entry.js → p-491f4605.entry.js} +2 -2
- package/dist/native/{p-39b4ec02.entry.js → p-554f7b44.entry.js} +2 -2
- package/dist/native/{p-44e7e3e8.entry.js → p-69fb1c9d.entry.js} +2 -2
- package/dist/native/{p-cba14168.entry.js → p-729c9d45.entry.js} +2 -2
- package/dist/native/{p-6acbf729.entry.js → p-78f08578.entry.js} +2 -2
- package/dist/native/p-8664ab16.entry.js +7 -0
- package/dist/native/p-8664ab16.entry.js.map +1 -0
- package/dist/native/p-8d6516a3.entry.js +2 -0
- package/dist/native/{p-4a7fa613.entry.js.map → p-8d6516a3.entry.js.map} +1 -1
- package/dist/native/p-951baf95.entry.js +2 -0
- package/dist/native/{p-b2ace8e9.entry.js → p-9795090f.entry.js} +2 -2
- package/dist/native/{p-b2ace8e9.entry.js.map → p-9795090f.entry.js.map} +1 -1
- package/dist/native/p-af60740c.entry.js +2 -0
- package/dist/native/{p-3bfd5a30.entry.js.map → p-af60740c.entry.js.map} +1 -1
- package/dist/native/{p-fd65c51f.js → p-b316c35d.js} +2 -2
- package/dist/native/{p-fd65c51f.js.map → p-b316c35d.js.map} +1 -1
- package/dist/native/p-b58c661b.entry.js +2 -0
- package/dist/native/p-b58c661b.entry.js.map +1 -0
- package/dist/native/p-b7bc918b.entry.js +2 -0
- package/dist/native/p-b7bc918b.entry.js.map +1 -0
- package/dist/native/p-cb34aa4f.js +2 -0
- package/dist/native/p-cb34aa4f.js.map +1 -0
- package/dist/native/{p-4eacd598.entry.js → p-cda56476.entry.js} +2 -2
- package/dist/native/{p-dbb89408.entry.js → p-d1bf4d77.entry.js} +2 -2
- package/dist/native/{p-b13b2663.entry.js → p-d7665a07.entry.js} +2 -2
- package/dist/native/{p-833af1bf.entry.js → p-daeb7e22.entry.js} +2 -2
- package/dist/native/{p-634b49fe.entry.js → p-e36e956b.entry.js} +2 -2
- package/dist/native/{p-afc16010.entry.js → p-e9e77494.entry.js} +2 -2
- package/dist/native/{p-0bf35abc.entry.js → p-edee1c1f.entry.js} +2 -2
- package/dist/native/{p-4db7add6.entry.js → p-f1585fc2.entry.js} +2 -2
- package/dist/native/{p-ac81e143.entry.js → p-f3579407.entry.js} +2 -2
- package/dist/native/p-fca807b4.entry.js +13 -0
- package/dist/native/p-fca807b4.entry.js.map +1 -0
- package/dist/native/{p-2151f564.entry.js → p-fde56f9c.entry.js} +2 -2
- package/dist/types/components/nv-alert/nv-alert.d.ts +14 -0
- package/dist/types/components/nv-base/nv-base.docs.d.ts +1 -1
- package/dist/types/components/nv-button/nv-button.d.ts +16 -5
- package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +48 -31
- package/dist/types/components/nv-datagridcolumn/nv-datagridcolumn.d.ts +3 -2
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +1 -7
- package/dist/types/components/nv-dialogfooter/nv-dialogfooter.d.ts +19 -10
- package/dist/types/components/nv-table/nv-table.d.ts +51 -39
- package/dist/types/components/nv-tablecolumn/nv-tablecolumn.d.ts +4 -42
- package/dist/types/components.d.ts +136 -256
- package/dist/types/interfaces/ColumnConfig.d.ts +13 -0
- package/dist/types/interfaces/actionEvent.d.ts +13 -0
- package/dist/types/utils/dom.utils.d.ts +12 -0
- package/dist/types/utils/test/class.utils.test.d.ts +1 -0
- package/dist/types/utils/test/dom.utils.test.d.ts +1 -0
- package/hydrate/index.js +958 -667
- package/hydrate/index.mjs +958 -667
- package/package.json +15 -27
- package/dist/blazor-docs.json +0 -15543
- package/dist/cjs/constants-2ae3d9eb.js.map +0 -1
- package/dist/cjs/nv-datagridbody.cjs.entry.js +0 -24
- package/dist/cjs/nv-datagridbody.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-datagriddatacell.cjs.entry.js +0 -25
- package/dist/cjs/nv-datagriddatacell.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-datagridhead.cjs.entry.js +0 -24
- package/dist/cjs/nv-datagridhead.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-datagridrow.cjs.entry.js +0 -24
- package/dist/cjs/nv-datagridrow.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-tablebody.cjs.entry.js +0 -24
- package/dist/cjs/nv-tablebody.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-tabledatacell.cjs.entry.js +0 -43
- package/dist/cjs/nv-tabledatacell.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-tablehead.cjs.entry.js +0 -24
- package/dist/cjs/nv-tablehead.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-tablerow.cjs.entry.js +0 -24
- package/dist/cjs/nv-tablerow.cjs.entry.js.map +0 -1
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.css +0 -0
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.docs.js +0 -8
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.docs.js.map +0 -1
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.js +0 -23
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.js.map +0 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.css +0 -0
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.css +0 -0
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.docs.js +0 -6
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.docs.js.map +0 -1
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.js +0 -50
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.js.map +0 -1
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.css +0 -0
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.docs.js +0 -8
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.docs.js.map +0 -1
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.js +0 -23
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.js.map +0 -1
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.css +0 -0
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.docs.js +0 -8
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.docs.js.map +0 -1
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.js +0 -23
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.js.map +0 -1
- package/dist/collection/components/nv-tablebody/nv-tablebody.css +0 -0
- package/dist/collection/components/nv-tablebody/nv-tablebody.docs.js +0 -8
- package/dist/collection/components/nv-tablebody/nv-tablebody.docs.js.map +0 -1
- package/dist/collection/components/nv-tablebody/nv-tablebody.js +0 -23
- package/dist/collection/components/nv-tablebody/nv-tablebody.js.map +0 -1
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.css +0 -0
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.css +0 -0
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.docs.js +0 -6
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.docs.js.map +0 -1
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js +0 -116
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js.map +0 -1
- package/dist/collection/components/nv-tablehead/nv-tablehead.css +0 -0
- package/dist/collection/components/nv-tablehead/nv-tablehead.docs.js +0 -8
- package/dist/collection/components/nv-tablehead/nv-tablehead.docs.js.map +0 -1
- package/dist/collection/components/nv-tablehead/nv-tablehead.js +0 -23
- package/dist/collection/components/nv-tablehead/nv-tablehead.js.map +0 -1
- package/dist/collection/components/nv-tablerow/nv-tablerow.css +0 -0
- package/dist/collection/components/nv-tablerow/nv-tablerow.docs.js +0 -8
- package/dist/collection/components/nv-tablerow/nv-tablerow.docs.js.map +0 -1
- package/dist/collection/components/nv-tablerow/nv-tablerow.js +0 -23
- package/dist/collection/components/nv-tablerow/nv-tablerow.js.map +0 -1
- package/dist/components/nv-datagridbody.d.ts +0 -11
- package/dist/components/nv-datagridbody.js +0 -38
- package/dist/components/nv-datagridbody.js.map +0 -1
- package/dist/components/nv-datagriddatacell.d.ts +0 -11
- package/dist/components/nv-datagriddatacell.js +0 -41
- package/dist/components/nv-datagriddatacell.js.map +0 -1
- package/dist/components/nv-datagridhead.d.ts +0 -11
- package/dist/components/nv-datagridhead.js +0 -38
- package/dist/components/nv-datagridhead.js.map +0 -1
- package/dist/components/nv-datagridrow.d.ts +0 -11
- package/dist/components/nv-datagridrow.js +0 -38
- package/dist/components/nv-datagridrow.js.map +0 -1
- package/dist/components/nv-tablebody.d.ts +0 -11
- package/dist/components/nv-tablebody.js +0 -38
- package/dist/components/nv-tablebody.js.map +0 -1
- package/dist/components/nv-tabledatacell.d.ts +0 -11
- package/dist/components/nv-tabledatacell.js +0 -61
- package/dist/components/nv-tabledatacell.js.map +0 -1
- package/dist/components/nv-tablehead.d.ts +0 -11
- package/dist/components/nv-tablehead.js +0 -38
- package/dist/components/nv-tablehead.js.map +0 -1
- package/dist/components/nv-tablerow.d.ts +0 -11
- package/dist/components/nv-tablerow.js +0 -38
- package/dist/components/nv-tablerow.js.map +0 -1
- package/dist/components/p-17b6705f.js.map +0 -1
- package/dist/components/p-5f5e2bf2.js.map +0 -1
- package/dist/components/p-8d7a57d1.js.map +0 -1
- package/dist/components/p-fd65c51f.js.map +0 -1
- package/dist/esm/constants-8243d2ea.js.map +0 -1
- package/dist/esm/nv-datagridbody.entry.js +0 -20
- package/dist/esm/nv-datagridbody.entry.js.map +0 -1
- package/dist/esm/nv-datagriddatacell.entry.js +0 -21
- package/dist/esm/nv-datagriddatacell.entry.js.map +0 -1
- package/dist/esm/nv-datagridhead.entry.js +0 -20
- package/dist/esm/nv-datagridhead.entry.js.map +0 -1
- package/dist/esm/nv-datagridrow.entry.js +0 -20
- package/dist/esm/nv-datagridrow.entry.js.map +0 -1
- package/dist/esm/nv-tablebody.entry.js +0 -20
- package/dist/esm/nv-tablebody.entry.js.map +0 -1
- package/dist/esm/nv-tabledatacell.entry.js +0 -39
- package/dist/esm/nv-tabledatacell.entry.js.map +0 -1
- package/dist/esm/nv-tablehead.entry.js +0 -20
- package/dist/esm/nv-tablehead.entry.js.map +0 -1
- package/dist/esm/nv-tablerow.entry.js +0 -20
- package/dist/esm/nv-tablerow.entry.js.map +0 -1
- package/dist/native/p-1bae8cdd.entry.js +0 -13
- package/dist/native/p-1bae8cdd.entry.js.map +0 -1
- package/dist/native/p-1ca72f74.entry.js +0 -2
- package/dist/native/p-1ca72f74.entry.js.map +0 -1
- package/dist/native/p-3422397d.entry.js +0 -2
- package/dist/native/p-3422397d.entry.js.map +0 -1
- package/dist/native/p-3bfd5a30.entry.js +0 -2
- package/dist/native/p-4a7fa613.entry.js +0 -2
- package/dist/native/p-51e0c5d3.entry.js +0 -2
- package/dist/native/p-51e0c5d3.entry.js.map +0 -1
- package/dist/native/p-57513eb0.entry.js +0 -2
- package/dist/native/p-57513eb0.entry.js.map +0 -1
- package/dist/native/p-5851fbed.entry.js +0 -2
- package/dist/native/p-5851fbed.entry.js.map +0 -1
- package/dist/native/p-5f1a7e6e.entry.js +0 -2
- package/dist/native/p-7211a3cb.entry.js +0 -7
- package/dist/native/p-7211a3cb.entry.js.map +0 -1
- package/dist/native/p-79765c7d.entry.js +0 -2
- package/dist/native/p-79765c7d.entry.js.map +0 -1
- package/dist/native/p-8b323a15.entry.js +0 -2
- package/dist/native/p-8b323a15.entry.js.map +0 -1
- package/dist/native/p-9c8eadde.entry.js +0 -2
- package/dist/native/p-9c8eadde.entry.js.map +0 -1
- package/dist/native/p-bac62e20.entry.js.map +0 -1
- package/dist/native/p-beab7cbd.entry.js +0 -2
- package/dist/native/p-bfb6e22c.entry.js +0 -2
- package/dist/native/p-bfb6e22c.entry.js.map +0 -1
- package/dist/native/p-c29be15d.entry.js +0 -2
- package/dist/native/p-c29be15d.entry.js.map +0 -1
- package/dist/native/p-ef9b66d4.entry.js +0 -2
- package/dist/native/p-ef9b66d4.entry.js.map +0 -1
- package/dist/native/p-f867541d.entry.js +0 -2
- package/dist/native/p-f867541d.entry.js.map +0 -1
- package/dist/native/p-f954a077.entry.js +0 -2
- package/dist/native/p-f954a077.entry.js.map +0 -1
- package/dist/native/p-ff7eea0e.entry.js +0 -2
- package/dist/native/p-ff7eea0e.entry.js.map +0 -1
- package/dist/types/components/nv-datagridbody/nv-datagridbody.d.ts +0 -7
- package/dist/types/components/nv-datagridbody/nv-datagridbody.docs.d.ts +0 -4
- package/dist/types/components/nv-datagriddatacell/nv-datagriddatacell.d.ts +0 -14
- package/dist/types/components/nv-datagriddatacell/nv-datagriddatacell.docs.d.ts +0 -4
- package/dist/types/components/nv-datagridhead/nv-datagridhead.d.ts +0 -7
- package/dist/types/components/nv-datagridhead/nv-datagridhead.docs.d.ts +0 -4
- package/dist/types/components/nv-datagridrow/nv-datagridrow.d.ts +0 -7
- package/dist/types/components/nv-datagridrow/nv-datagridrow.docs.d.ts +0 -4
- package/dist/types/components/nv-tablebody/nv-tablebody.d.ts +0 -7
- package/dist/types/components/nv-tablebody/nv-tablebody.docs.d.ts +0 -4
- package/dist/types/components/nv-tabledatacell/nv-tabledatacell.d.ts +0 -30
- package/dist/types/components/nv-tabledatacell/nv-tabledatacell.docs.d.ts +0 -4
- package/dist/types/components/nv-tablehead/nv-tablehead.d.ts +0 -7
- package/dist/types/components/nv-tablehead/nv-tablehead.docs.d.ts +0 -4
- package/dist/types/components/nv-tablerow/nv-tablerow.d.ts +0 -7
- package/dist/types/components/nv-tablerow/nv-tablerow.docs.d.ts +0 -4
- package/dist/vscode-data.json +0 -4407
- /package/dist/native/{p-e1b22ca7.entry.js.map → p-0a2a9f8b.entry.js.map} +0 -0
- /package/dist/native/{p-46c9aa04.entry.js.map → p-12d08abc.entry.js.map} +0 -0
- /package/dist/native/{p-63c894f0.entry.js.map → p-15be3d96.entry.js.map} +0 -0
- /package/dist/native/{p-943a19a5.entry.js.map → p-184cd119.entry.js.map} +0 -0
- /package/dist/native/{p-2b99e720.entry.js.map → p-1a3d2a74.entry.js.map} +0 -0
- /package/dist/native/{p-3b2c7871.entry.js.map → p-359f0f53.entry.js.map} +0 -0
- /package/dist/native/{p-beab7cbd.entry.js.map → p-3be2c9a1.entry.js.map} +0 -0
- /package/dist/native/{p-fa33ec18.entry.js.map → p-491f4605.entry.js.map} +0 -0
- /package/dist/native/{p-39b4ec02.entry.js.map → p-554f7b44.entry.js.map} +0 -0
- /package/dist/native/{p-44e7e3e8.entry.js.map → p-69fb1c9d.entry.js.map} +0 -0
- /package/dist/native/{p-cba14168.entry.js.map → p-729c9d45.entry.js.map} +0 -0
- /package/dist/native/{p-6acbf729.entry.js.map → p-78f08578.entry.js.map} +0 -0
- /package/dist/native/{p-5f1a7e6e.entry.js.map → p-951baf95.entry.js.map} +0 -0
- /package/dist/native/{p-4eacd598.entry.js.map → p-cda56476.entry.js.map} +0 -0
- /package/dist/native/{p-dbb89408.entry.js.map → p-d1bf4d77.entry.js.map} +0 -0
- /package/dist/native/{p-b13b2663.entry.js.map → p-d7665a07.entry.js.map} +0 -0
- /package/dist/native/{p-833af1bf.entry.js.map → p-daeb7e22.entry.js.map} +0 -0
- /package/dist/native/{p-634b49fe.entry.js.map → p-e36e956b.entry.js.map} +0 -0
- /package/dist/native/{p-afc16010.entry.js.map → p-e9e77494.entry.js.map} +0 -0
- /package/dist/native/{p-0bf35abc.entry.js.map → p-edee1c1f.entry.js.map} +0 -0
- /package/dist/native/{p-4db7add6.entry.js.map → p-f1585fc2.entry.js.map} +0 -0
- /package/dist/native/{p-ac81e143.entry.js.map → p-f3579407.entry.js.map} +0 -0
- /package/dist/native/{p-2151f564.entry.js.map → p-fde56f9c.entry.js.map} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -4771,6 +4771,10 @@ class NvAlert {
|
|
|
4771
4771
|
* Controls the visibility of the alert. Will animate with fade and collapse.
|
|
4772
4772
|
*/
|
|
4773
4773
|
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
4774
|
+
/**
|
|
4775
|
+
* When true, the alert will not animate when it is hidden or shown.
|
|
4776
|
+
*/
|
|
4777
|
+
this.hasNoAnimations = false;
|
|
4774
4778
|
//#endregion WATCHERS
|
|
4775
4779
|
/****************************************************************************/
|
|
4776
4780
|
//#region METHODS
|
|
@@ -4833,13 +4837,35 @@ class NvAlert {
|
|
|
4833
4837
|
*/
|
|
4834
4838
|
async handleHiddenChange(hidden) {
|
|
4835
4839
|
this.hiddenChanged.emit(hidden);
|
|
4840
|
+
await this.updateVisibility(hidden);
|
|
4841
|
+
this.hiddenChangedComplete.emit(hidden);
|
|
4842
|
+
}
|
|
4843
|
+
/**
|
|
4844
|
+
* Updates the visibility state of the alert with optional animations
|
|
4845
|
+
* @param {boolean} hidden - Whether the alert should be hidden
|
|
4846
|
+
*/
|
|
4847
|
+
async updateVisibility(hidden) {
|
|
4848
|
+
if (this.hasNoAnimations) {
|
|
4849
|
+
this.toggleHiddenClass(hidden);
|
|
4850
|
+
return;
|
|
4851
|
+
}
|
|
4836
4852
|
const { fadeIn, fadeOut } = useFade(this.ref, { duration: 150 });
|
|
4837
4853
|
const { collapse, expand } = useCollapse(this.ref, { duration: 150 });
|
|
4838
|
-
if (hidden
|
|
4854
|
+
if (hidden) {
|
|
4839
4855
|
await timeline(fadeOut, collapse).start();
|
|
4840
|
-
|
|
4856
|
+
this.toggleHiddenClass(true);
|
|
4857
|
+
}
|
|
4858
|
+
else {
|
|
4859
|
+
this.toggleHiddenClass(false);
|
|
4841
4860
|
await timeline(expand, fadeIn).start();
|
|
4842
|
-
|
|
4861
|
+
}
|
|
4862
|
+
}
|
|
4863
|
+
/**
|
|
4864
|
+
* Toggles the 'hidden' class on the element
|
|
4865
|
+
* @param {boolean} hidden - Whether to add or remove the hidden class
|
|
4866
|
+
*/
|
|
4867
|
+
toggleHiddenClass(hidden) {
|
|
4868
|
+
this.ref.classList.toggle('hidden', hidden);
|
|
4843
4869
|
}
|
|
4844
4870
|
//#endregion METHODS
|
|
4845
4871
|
/****************************************************************************/
|
|
@@ -4861,10 +4887,7 @@ class NvAlert {
|
|
|
4861
4887
|
}
|
|
4862
4888
|
}
|
|
4863
4889
|
if (this.hidden) {
|
|
4864
|
-
|
|
4865
|
-
const { setFadeOut } = useFade(this.ref);
|
|
4866
|
-
setCollapsed();
|
|
4867
|
-
setFadeOut();
|
|
4890
|
+
this.ref.classList.add('hidden');
|
|
4868
4891
|
}
|
|
4869
4892
|
}
|
|
4870
4893
|
//#endregion LIFECYCLE
|
|
@@ -4872,7 +4895,7 @@ class NvAlert {
|
|
|
4872
4895
|
//#region RENDER
|
|
4873
4896
|
render() {
|
|
4874
4897
|
var _a;
|
|
4875
|
-
return (hAsync(Host, { key: '
|
|
4898
|
+
return (hAsync(Host, { key: 'e81f265d69ba269ea5a7433465f68862cf4444d2', role: "alert", class: clsx('root', `feedback-${this.feedback}`) }, hAsync("nv-icon", { key: 'e0e21d84a214a51e0b303055e4aa280e0467dfe0', name: (_a = this.icon) !== null && _a !== void 0 ? _a : this.getDefaultIcon(), class: `icon-${this.feedback}`, size: "md" }), hAsync("div", { key: '705d079e0abe159e4398f5d53ecec0c6649bcf6d', class: "content" }, this.heading && hAsync("p", { key: 'cff1fa5c3caf736d332b2389168030b7263997c1', class: "heading" }, this.heading), this.message && hAsync("p", { key: '6f492a02c068c1ffab48aeae7dd619c1a73b1c19', class: "message" }, this.message), hAsync("slot", { key: 'e79556d3c7c10b8771e7e6262d4e4086bf895de9' })), this.dismissible && (hAsync("button", { key: '2754a1237501c458b32a84f2f3166109dba9c3e2', class: "close", type: "button", onClick: this.handleDismiss }, hAsync("nv-icon", { key: '9563b22ee4689d7e4d35ca4d882827004b334671', name: "x", size: "sm" })))));
|
|
4876
4899
|
}
|
|
4877
4900
|
get ref() { return getElement(this); }
|
|
4878
4901
|
static get watchers() { return {
|
|
@@ -4890,11 +4913,12 @@ class NvAlert {
|
|
|
4890
4913
|
"icon": [513],
|
|
4891
4914
|
"dismissible": [516],
|
|
4892
4915
|
"preventAutoClose": [516, "prevent-auto-close"],
|
|
4893
|
-
"hidden": [1540]
|
|
4916
|
+
"hidden": [1540],
|
|
4917
|
+
"hasNoAnimations": [516, "has-no-animations"]
|
|
4894
4918
|
},
|
|
4895
4919
|
"$listeners$": undefined,
|
|
4896
4920
|
"$lazyBundleId$": "-",
|
|
4897
|
-
"$attrsToReflect$": [["feedback", "feedback"], ["message", "message"], ["heading", "heading"], ["icon", "icon"], ["dismissible", "dismissible"], ["preventAutoClose", "prevent-auto-close"], ["hidden", "hidden"]]
|
|
4921
|
+
"$attrsToReflect$": [["feedback", "feedback"], ["message", "message"], ["heading", "heading"], ["icon", "icon"], ["dismissible", "dismissible"], ["preventAutoClose", "prevent-auto-close"], ["hidden", "hidden"], ["hasNoAnimations", "has-no-animations"]]
|
|
4898
4922
|
}; }
|
|
4899
4923
|
}
|
|
4900
4924
|
|
|
@@ -4955,7 +4979,7 @@ class NvAvatar {
|
|
|
4955
4979
|
/****************************************************************************/
|
|
4956
4980
|
//#region RENDER
|
|
4957
4981
|
render() {
|
|
4958
|
-
return (hAsync(Host, { key: '
|
|
4982
|
+
return (hAsync(Host, { key: '8cd1fe9e804aa11e821c0983c28eefdbe2275235', class: clsx(`avatar-${this.size}`, `avatar-color-${this.color}`), "aria-label": this.alt }, this.src ? (hAsync("img", { src: this.src, alt: this.alt })) : this.initials ? (this.trimInitials(this.initials)) : (hAsync("slot", { name: "icon" }, hAsync("nv-icon", { name: "user" })))));
|
|
4959
4983
|
}
|
|
4960
4984
|
static get style() { return NvAvatarStyle0; }
|
|
4961
4985
|
static get cmpMeta() { return {
|
|
@@ -5102,11 +5126,11 @@ class NvBadge {
|
|
|
5102
5126
|
/****************************************************************************/
|
|
5103
5127
|
//#region RENDER
|
|
5104
5128
|
render() {
|
|
5105
|
-
return (hAsync(Host, { key: '
|
|
5129
|
+
return (hAsync(Host, { key: '18d3a28777aa74117ccc68aa0c889ea716b90d56', class: clsx(`badge-${this.color}`, {
|
|
5106
5130
|
'has-close': this.dismissible,
|
|
5107
5131
|
'with-gap': this.dismissible || this.label,
|
|
5108
5132
|
'visually-hidden': this._isHidden,
|
|
5109
|
-
}) }, hAsync("slot", { key: '
|
|
5133
|
+
}) }, hAsync("slot", { key: '87ac2dd4ae3ba521d1a6b15394d79c85c1899102', name: "leading-icon" }, this.leadIcon && (hAsync("nv-icon", { key: '22fbc091fe0c861e9a6ce12e5ba1b8d0e83ca7da', slot: "leading-icon", name: this.leadIcon, size: "sm" }))), this.label && hAsync("span", { key: '040559657d6a337b2cd3ce265d2e99cdd0245324' }, this.label), this.dismissible && (hAsync("button", { key: 'd0f992bdf748be5bf63d7a3e9864f96cad4dfae7', onClick: this.handleClose, class: "close", type: "button" }, hAsync("nv-icon", { key: '60915e33efb355a5e2820507fe2365ba4e602c26', name: "x", size: "sm" })))));
|
|
5110
5134
|
}
|
|
5111
5135
|
get ref() { return getElement(this); }
|
|
5112
5136
|
static get watchers() { return {
|
|
@@ -5200,7 +5224,7 @@ class NvBaseComponent {
|
|
|
5200
5224
|
/****************************************************************************/
|
|
5201
5225
|
//#region RENDER
|
|
5202
5226
|
render() {
|
|
5203
|
-
return (hAsync(Host, { key: '
|
|
5227
|
+
return (hAsync(Host, { key: 'ee2869bb42012e8c6b185e412503b14482f58af0', style: { display: 'block' } }, hAsync("slot", { key: '2d89c30073a159339419bbec3f323abdcbf312cf' })));
|
|
5204
5228
|
}
|
|
5205
5229
|
get el() { return getElement(this); }
|
|
5206
5230
|
static get cmpMeta() { return {
|
|
@@ -5245,7 +5269,7 @@ class NvBreadcrumb {
|
|
|
5245
5269
|
/****************************************************************************/
|
|
5246
5270
|
//#region RENDER
|
|
5247
5271
|
render() {
|
|
5248
|
-
return (hAsync(Host, { key: '
|
|
5272
|
+
return (hAsync(Host, { key: '88cc0ffe7aee64066946b3f2579d0ace70a56339', role: "listitem", "aria-current": this.current ? 'location' : undefined, class: clsx({ 'visually-hidden': this.current }) }, this.type === 'collapsed' ? (hAsync("button", { ref: el => (this.popoverTrigger = el) }, "...")) : (hAsync("slot", null)), this.tooltip && (hAsync("nv-tooltip", { key: '1e1bb755b7a9466c5a174e57b562b718d7f2a78a', message: this.tooltip, triggerElement: this.popoverTrigger, placement: "top" })), this.type === 'collapsed' && (hAsync("nv-popover", { key: '91b3238143defb7b5fd71b14bb31edb8093778d2', triggerMode: "click", groupName: "breadcrumbs", triggerElement: this.popoverTrigger }, hAsync("ul", { key: '4c1851c8988b7eb1f607e422ceac1dc6b04022c5', slot: "content" }, hAsync("slot", { key: '11213bce3ff14309b0be7336f0022411a2e6721d' })))), hAsync("span", { key: '3b97cd9edbb33196c85a29afbaf5b2ac647b0912', "data-scope": "separator" }, "/")));
|
|
5249
5273
|
}
|
|
5250
5274
|
get el() { return getElement(this); }
|
|
5251
5275
|
static get style() { return NvBreadcrumbStyle0; }
|
|
@@ -5275,7 +5299,7 @@ class NvBreadcrumbs {
|
|
|
5275
5299
|
}
|
|
5276
5300
|
//#region RENDER
|
|
5277
5301
|
render() {
|
|
5278
|
-
return (hAsync(Host, { key: '
|
|
5302
|
+
return (hAsync(Host, { key: '832ca6782b23a6aa0ca9fdea78cd7b0173db66b4', role: "navigation", "aria-label": "breadcrumbs" }, hAsync("ol", { key: 'e71aaabc2c3e8912097f822e24947eeec112ea3b' }, hAsync("slot", { key: '0af6f306a8ad6ec26bbcf3bf480acb3cc4a9682a' }))));
|
|
5279
5303
|
}
|
|
5280
5304
|
static get style() { return NvBreadcrumbsStyle0; }
|
|
5281
5305
|
static get cmpMeta() { return {
|
|
@@ -5347,29 +5371,51 @@ class NvButton {
|
|
|
5347
5371
|
/**
|
|
5348
5372
|
* Sets the button type to control its function in forms. Use 'submit' to send
|
|
5349
5373
|
* form data, 'reset' to clear the form, or 'button' for a standard button
|
|
5350
|
-
* that doesn
|
|
5374
|
+
* that doesn't interact with form submission by default.
|
|
5351
5375
|
*/
|
|
5352
5376
|
this.type = 'button';
|
|
5353
5377
|
//#endregion PROPERTIES
|
|
5354
5378
|
/****************************************************************************/
|
|
5355
5379
|
//#region METHODS
|
|
5356
5380
|
/**
|
|
5357
|
-
* Handles form
|
|
5358
|
-
*
|
|
5359
|
-
*
|
|
5381
|
+
* Handles button click events, managing form actions and disabled states.
|
|
5382
|
+
* Prevents default behavior when button is disabled or loading, and
|
|
5383
|
+
* processes form submissions/resets when appropriate.
|
|
5360
5384
|
* @param {Event} event - The click event.
|
|
5361
5385
|
*/
|
|
5362
|
-
this.
|
|
5363
|
-
var _a, _b, _c, _d;
|
|
5386
|
+
this.handleButtonClick = (event) => {
|
|
5364
5387
|
if (this.loading || this.disabled) {
|
|
5365
5388
|
event.preventDefault();
|
|
5366
5389
|
return;
|
|
5367
5390
|
}
|
|
5368
|
-
if (this.type
|
|
5369
|
-
|
|
5391
|
+
if (this.form && this.type !== ButtonType.Button) {
|
|
5392
|
+
this.processFormAction();
|
|
5370
5393
|
}
|
|
5371
|
-
if (this.
|
|
5372
|
-
(
|
|
5394
|
+
else if (this.form) {
|
|
5395
|
+
console.warn('Button has a form id but is not of type submit or reset so no form action will be processed.', `Button:`, this.el);
|
|
5396
|
+
}
|
|
5397
|
+
};
|
|
5398
|
+
/**
|
|
5399
|
+
* Processes form-related actions by finding the associated form element
|
|
5400
|
+
* and triggering the appropriate action (submit/reset) based on button type.
|
|
5401
|
+
* Falls back to ElementInternals form if no explicit form ID is provided.
|
|
5402
|
+
*/
|
|
5403
|
+
this.processFormAction = () => {
|
|
5404
|
+
var _a, _b;
|
|
5405
|
+
const formElement = this.form
|
|
5406
|
+
? document.getElementById(this.form)
|
|
5407
|
+
: (_a = this.internals) === null || _a === void 0 ? void 0 : _a.form;
|
|
5408
|
+
if (!formElement) {
|
|
5409
|
+
console.warn('No form element found.', `Form ID: ${this.form || 'Not provided'}`, `Internals form:`, (_b = this.internals) === null || _b === void 0 ? void 0 : _b.form);
|
|
5410
|
+
return;
|
|
5411
|
+
}
|
|
5412
|
+
switch (this.type) {
|
|
5413
|
+
case ButtonType.Submit:
|
|
5414
|
+
formElement.requestSubmit();
|
|
5415
|
+
break;
|
|
5416
|
+
case ButtonType.Reset:
|
|
5417
|
+
formElement.reset();
|
|
5418
|
+
break;
|
|
5373
5419
|
}
|
|
5374
5420
|
};
|
|
5375
5421
|
}
|
|
@@ -5415,7 +5461,7 @@ class NvButton {
|
|
|
5415
5461
|
/****************************************************************************/
|
|
5416
5462
|
//#region RENDER
|
|
5417
5463
|
render() {
|
|
5418
|
-
return (hAsync(Host, { key: '
|
|
5464
|
+
return (hAsync(Host, { key: 'bd4fa51791ea88aeffba33f5be108807d0d31dc3', role: "button", tabindex: "0", onClick: this.handleButtonClick }, this.loading && (hAsync("nv-loader", { key: '4a48de90f85da844af2114737751619181ddbddd', size: this.size === ButtonSize.Large ? 'sm' : 'xs' })), hAsync("slot", { key: 'c48a34e20a792ff7d139488a0dc5e373f7e67c23', name: "leading-icon" }), hAsync("slot", { key: '5d151e40abf25f0089d4980e85eabfff944d3b99' }), hAsync("slot", { key: 'e0029a972441daa1abfee3a3bca5c62abf284586', name: "trailing-icon" })));
|
|
5419
5465
|
}
|
|
5420
5466
|
static get formAssociated() { return true; }
|
|
5421
5467
|
get el() { return getElement(this); }
|
|
@@ -5435,11 +5481,12 @@ class NvButton {
|
|
|
5435
5481
|
"loading": [1540],
|
|
5436
5482
|
"disabled": [1540],
|
|
5437
5483
|
"fluid": [516],
|
|
5438
|
-
"type": [513]
|
|
5484
|
+
"type": [513],
|
|
5485
|
+
"form": [513]
|
|
5439
5486
|
},
|
|
5440
5487
|
"$listeners$": [[0, "keydown", "handleKeyDown"], [0, "touchstart", "handleTouchStart"]],
|
|
5441
5488
|
"$lazyBundleId$": "-",
|
|
5442
|
-
"$attrsToReflect$": [["size", "size"], ["emphasis", "emphasis"], ["active", "active"], ["danger", "danger"], ["loading", "loading"], ["disabled", "disabled"], ["fluid", "fluid"], ["type", "type"]]
|
|
5489
|
+
"$attrsToReflect$": [["size", "size"], ["emphasis", "emphasis"], ["active", "active"], ["danger", "danger"], ["loading", "loading"], ["disabled", "disabled"], ["fluid", "fluid"], ["type", "type"], ["form", "form"]]
|
|
5443
5490
|
}; }
|
|
5444
5491
|
}
|
|
5445
5492
|
|
|
@@ -6410,7 +6457,7 @@ class NvCalendar {
|
|
|
6410
6457
|
* @slot default - Child content of the component.
|
|
6411
6458
|
*/
|
|
6412
6459
|
render() {
|
|
6413
|
-
return (hAsync(Host, { key: '
|
|
6460
|
+
return (hAsync(Host, { key: '0d9b8c85ed51f8a82b8d2159b064e480cec49df6' }, hAsync("div", { key: '558f698edfe33c50af19ac7466279185bbf5b87a', class: "datepicker-root" }, hAsync("div", { key: '9cc0b7ad17f438afb292c729af826a00501a44c5', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, hAsync("div", { key: '14d17b4e73525537060dea627ebfe6c3e84387ab', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), (this.hasShortcuts || this.hasActions) && (hAsync("div", { key: '7fe8a36601d434da834bc934bafa11c3fdbd40f8', class: "datepicker-controls" }, this.hasShortcuts && this.renderShortcuts(), this.hasActions && this.renderActions())))), hAsync("slot", { key: 'bebf0f034ee70b5abfd99b692a60ca3b4cbe09a0' })));
|
|
6414
6461
|
}
|
|
6415
6462
|
get el() { return getElement(this); }
|
|
6416
6463
|
static get watchers() { return {
|
|
@@ -6477,7 +6524,7 @@ class NvCol {
|
|
|
6477
6524
|
/****************************************************************************/
|
|
6478
6525
|
//#region RENDER
|
|
6479
6526
|
render() {
|
|
6480
|
-
return (hAsync(Host, { key: '
|
|
6527
|
+
return (hAsync(Host, { key: '416e432e3f8947b2b2040e8226da1acf03a6f965', class: clsx(this.getColSize()) }, hAsync("slot", { key: 'e860ae915f148333f471a48705677512853c6970' })));
|
|
6481
6528
|
}
|
|
6482
6529
|
static get style() { return NvColStyle0; }
|
|
6483
6530
|
static get cmpMeta() { return {
|
|
@@ -9445,16 +9492,178 @@ function getCoreRowModel() {
|
|
|
9445
9492
|
}, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => table._autoResetPageIndex()));
|
|
9446
9493
|
}
|
|
9447
9494
|
|
|
9448
|
-
|
|
9495
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9496
|
+
/**
|
|
9497
|
+
* All properties that should be excluded from the deep copy of an HTML element.
|
|
9498
|
+
*/
|
|
9499
|
+
const excludedProps = new Set([
|
|
9500
|
+
// Text and content-related properties
|
|
9501
|
+
'textContent',
|
|
9502
|
+
'innerText',
|
|
9503
|
+
'outerText',
|
|
9504
|
+
'innerHTML',
|
|
9505
|
+
'outerHTML',
|
|
9506
|
+
'text',
|
|
9507
|
+
// Form element properties
|
|
9508
|
+
'value',
|
|
9509
|
+
'defaultValue',
|
|
9510
|
+
'checked',
|
|
9511
|
+
'defaultChecked',
|
|
9512
|
+
'selectionStart',
|
|
9513
|
+
'selectionEnd',
|
|
9514
|
+
'selectionDirection',
|
|
9515
|
+
'form',
|
|
9516
|
+
'willValidate',
|
|
9517
|
+
'validity',
|
|
9518
|
+
'validationMessage',
|
|
9519
|
+
'labels',
|
|
9520
|
+
'list',
|
|
9521
|
+
'maxLength',
|
|
9522
|
+
'minLength',
|
|
9523
|
+
'valueAsDate',
|
|
9524
|
+
'valueAsNumber',
|
|
9525
|
+
// Editability and namespaces
|
|
9526
|
+
'contentEditable',
|
|
9527
|
+
'isContentEditable',
|
|
9528
|
+
'namespaceURI',
|
|
9529
|
+
// Child-related properties (handled recursively)
|
|
9530
|
+
'attributes',
|
|
9531
|
+
'children',
|
|
9532
|
+
'childNodes',
|
|
9533
|
+
'firstChild',
|
|
9534
|
+
'lastChild',
|
|
9535
|
+
// Blazor-related properties
|
|
9536
|
+
'origin',
|
|
9537
|
+
'dataset',
|
|
9538
|
+
'attributeStyleMap',
|
|
9539
|
+
'prefix',
|
|
9540
|
+
'localName',
|
|
9541
|
+
'tagName',
|
|
9542
|
+
'shadowRoot',
|
|
9543
|
+
'assignedSlot',
|
|
9544
|
+
'scrollWidth',
|
|
9545
|
+
'scrollHeight',
|
|
9546
|
+
'clientTop',
|
|
9547
|
+
'clientLeft',
|
|
9548
|
+
'clientWidth',
|
|
9549
|
+
'clientHeight',
|
|
9550
|
+
'firstElementChild',
|
|
9551
|
+
'lastElementChild',
|
|
9552
|
+
'childElementCount',
|
|
9553
|
+
'previousElementSibling',
|
|
9554
|
+
'nextElementSibling',
|
|
9555
|
+
'currentCSSZoom',
|
|
9556
|
+
'nodeType',
|
|
9557
|
+
'nodeName',
|
|
9558
|
+
'baseURI',
|
|
9559
|
+
'isConnected',
|
|
9560
|
+
'ownerDocument',
|
|
9561
|
+
'parentNode',
|
|
9562
|
+
'parentElement',
|
|
9563
|
+
'previousSibling',
|
|
9564
|
+
'nextSibling',
|
|
9565
|
+
'ELEMENT_NODE',
|
|
9566
|
+
'ATTRIBUTE_NODE',
|
|
9567
|
+
'TEXT_NODE',
|
|
9568
|
+
'CDATA_SECTION_NODE',
|
|
9569
|
+
'ENTITY_REFERENCE_NODE',
|
|
9570
|
+
'ENTITY_NODE',
|
|
9571
|
+
'PROCESSING_INSTRUCTION_NODE',
|
|
9572
|
+
'COMMENT_NODE',
|
|
9573
|
+
'DOCUMENT_NODE',
|
|
9574
|
+
'DOCUMENT_TYPE_NODE',
|
|
9575
|
+
'DOCUMENT_FRAGMENT_NODE',
|
|
9576
|
+
'NOTATION_NODE',
|
|
9577
|
+
'DOCUMENT_POSITION_DISCONNECTED',
|
|
9578
|
+
'DOCUMENT_POSITION_PRECEDING',
|
|
9579
|
+
'DOCUMENT_POSITION_FOLLOWING',
|
|
9580
|
+
'DOCUMENT_POSITION_CONTAINS',
|
|
9581
|
+
'DOCUMENT_POSITION_CONTAINED_BY',
|
|
9582
|
+
'DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC',
|
|
9583
|
+
]);
|
|
9584
|
+
/**
|
|
9585
|
+
* Deep copy an HTML element with all its attributes, properties, and child nodes.
|
|
9586
|
+
* This method is useful for creating a clone of an element that can be safely modified without affecting the original.
|
|
9587
|
+
* @param {HTMLElement} element - The HTML element to copy.
|
|
9588
|
+
* @returns {HTMLElement} - A deep copy of the HTML element.
|
|
9589
|
+
* @example const copy = deepCopyElement(document.getElementById('myElement'));
|
|
9590
|
+
*/
|
|
9591
|
+
function deepCopyElement(element) {
|
|
9592
|
+
const copy = document.createElement(element.tagName);
|
|
9593
|
+
// ✅ Copy attributes
|
|
9594
|
+
Array.from(element.attributes).forEach(attr => {
|
|
9595
|
+
copy.setAttribute(attr.name, attr.value);
|
|
9596
|
+
});
|
|
9597
|
+
// ✅ Dynamically extract relevant properties
|
|
9598
|
+
const properties = new Set();
|
|
9599
|
+
// Collect only own enumerable properties
|
|
9600
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
9601
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
9602
|
+
let proto = Object.getPrototypeOf(element);
|
|
9603
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
9604
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
9605
|
+
proto = Object.getPrototypeOf(proto);
|
|
9606
|
+
}
|
|
9607
|
+
// ✅ Filter and copy only non-function properties (methods are excluded) and non-event listeners
|
|
9608
|
+
properties.forEach(prop => {
|
|
9609
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
9610
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
9611
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
9612
|
+
) {
|
|
9613
|
+
try {
|
|
9614
|
+
copy[prop] = element[prop];
|
|
9615
|
+
}
|
|
9616
|
+
catch (error) {
|
|
9617
|
+
console.warn(`Could not copy property ${prop}:`, error.message);
|
|
9618
|
+
}
|
|
9619
|
+
}
|
|
9620
|
+
});
|
|
9621
|
+
// ✅ Copy dataset separately
|
|
9622
|
+
Object.assign(copy.dataset, element.dataset);
|
|
9623
|
+
// ✅ Handle form elements specifically
|
|
9624
|
+
if (element instanceof HTMLInputElement) {
|
|
9625
|
+
copy.value = element.value;
|
|
9626
|
+
copy.checked = element.checked;
|
|
9627
|
+
copy.defaultValue = element.defaultValue;
|
|
9628
|
+
copy.defaultChecked = element.defaultChecked;
|
|
9629
|
+
copy.selectionStart = element.selectionStart;
|
|
9630
|
+
copy.selectionEnd = element.selectionEnd;
|
|
9631
|
+
copy.selectionDirection = element.selectionDirection;
|
|
9632
|
+
}
|
|
9633
|
+
else if (element instanceof HTMLTextAreaElement) {
|
|
9634
|
+
copy.value = element.value;
|
|
9635
|
+
copy.defaultValue = element.defaultValue;
|
|
9636
|
+
copy.selectionStart = element.selectionStart;
|
|
9637
|
+
copy.selectionEnd = element.selectionEnd;
|
|
9638
|
+
copy.selectionDirection =
|
|
9639
|
+
element.selectionDirection;
|
|
9640
|
+
}
|
|
9641
|
+
else if (element instanceof HTMLSelectElement) {
|
|
9642
|
+
copy.value = element.value;
|
|
9643
|
+
copy.selectedIndex = element.selectedIndex;
|
|
9644
|
+
}
|
|
9645
|
+
// ✅ Recursively copy child nodes (prevent duplicates)
|
|
9646
|
+
element.childNodes.forEach(child => {
|
|
9647
|
+
let childCopy;
|
|
9648
|
+
if (child.nodeType === Node.ELEMENT_NODE) {
|
|
9649
|
+
childCopy = deepCopyElement(child);
|
|
9650
|
+
}
|
|
9651
|
+
else {
|
|
9652
|
+
childCopy = child.cloneNode(true);
|
|
9653
|
+
}
|
|
9654
|
+
copy.appendChild(childCopy);
|
|
9655
|
+
});
|
|
9656
|
+
return copy;
|
|
9657
|
+
}
|
|
9658
|
+
|
|
9659
|
+
const nvDatagridCss = "nv-datagrid{display:block}nv-datagrid .hidden{display:none}nv-datagrid table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-datagrid th{text-align:left;border-bottom:1px solid var(--components-datagrid-border-header);height:var(--spacing-12);padding:var(--spacing-3) var(--spacing-4);font-size:var(--font-size-md);font-weight:700;color:var(--components-datagrid-content-header)}nv-datagrid td{border-bottom:1px solid var(--components-datagrid-border-body);height:var(--spacing-12);max-height:var(--spacing-14);padding:var(--spacing-2) var(--spacing-4);font-size:var(--font-size-md);font-weight:400;color:var(--components-datagrid-content-text);white-space:nowrap;text-overflow:ellipsis}nv-datagrid tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}";
|
|
9449
9660
|
var NvDatagridStyle0 = nvDatagridCss;
|
|
9450
9661
|
|
|
9451
9662
|
/**
|
|
9452
9663
|
* A flexible data grid component powered by `@tanstack/table-core`.
|
|
9453
9664
|
* @slot default - Use this slot to insert HTML into the data grid content.
|
|
9454
|
-
* @slot head - Use this slot to insert HTML into the data grid header.
|
|
9455
9665
|
* @slot before - Use this slot to insert HTML before the data grid.
|
|
9456
9666
|
* @slot after - Use this slot to insert HTML after the data grid.
|
|
9457
|
-
* @slot body - Use this slot to insert HTML into the data grid body.
|
|
9458
9667
|
*
|
|
9459
9668
|
* @deprecated [EXPERIMENTAL]
|
|
9460
9669
|
* @experimental - This component is still under development and is not ready for use.
|
|
@@ -9462,16 +9671,23 @@ var NvDatagridStyle0 = nvDatagridCss;
|
|
|
9462
9671
|
class NvDatagrid {
|
|
9463
9672
|
constructor(hostRef) {
|
|
9464
9673
|
registerInstance(this, hostRef);
|
|
9674
|
+
this.action = createEvent(this, "action", 7);
|
|
9675
|
+
this.templateCache = new Map();
|
|
9676
|
+
this.headerTemplateCache = new Map();
|
|
9465
9677
|
/****************************************************************************/
|
|
9466
9678
|
//#region STATES
|
|
9467
9679
|
this.table = null;
|
|
9468
9680
|
this.parsedColumns = []; // Parsed array
|
|
9469
9681
|
this.parsedData = []; // Parsed array
|
|
9470
|
-
this.hasSlotHead = false;
|
|
9471
|
-
this.hasSlotBody = false;
|
|
9472
9682
|
//#endregion STATES
|
|
9473
9683
|
/****************************************************************************/
|
|
9474
9684
|
//#region PROPERTIES
|
|
9685
|
+
/**
|
|
9686
|
+
* The data to display in the data grid.
|
|
9687
|
+
* @example [{ "name": "Alice", "age": 25 }, { "name": "Bob", "age": 30 }]
|
|
9688
|
+
* @default []
|
|
9689
|
+
*/
|
|
9690
|
+
this.data = [];
|
|
9475
9691
|
/**
|
|
9476
9692
|
* The columns to display in the data grid.
|
|
9477
9693
|
* @example
|
|
@@ -9484,11 +9700,10 @@ class NvDatagrid {
|
|
|
9484
9700
|
*/
|
|
9485
9701
|
this.columns = [];
|
|
9486
9702
|
/**
|
|
9487
|
-
*
|
|
9488
|
-
* @
|
|
9489
|
-
* @default []
|
|
9703
|
+
* Fallback value to be displayed when data is not available
|
|
9704
|
+
* @default 'N/A'
|
|
9490
9705
|
*/
|
|
9491
|
-
this.
|
|
9706
|
+
this.fallbackValue = 'N/A';
|
|
9492
9707
|
/**
|
|
9493
9708
|
* The message to display when there is no data available.
|
|
9494
9709
|
* @default 'No data available'
|
|
@@ -9502,39 +9717,94 @@ class NvDatagrid {
|
|
|
9502
9717
|
}
|
|
9503
9718
|
//#endregion PROPERTIES
|
|
9504
9719
|
/****************************************************************************/
|
|
9505
|
-
//#region
|
|
9506
|
-
|
|
9507
|
-
|
|
9720
|
+
//#region METHODS
|
|
9721
|
+
/**
|
|
9722
|
+
* Caches templates for cells and headers upfront to improve performance.
|
|
9723
|
+
*/
|
|
9724
|
+
cacheTemplates() {
|
|
9725
|
+
const columns = Array.from(this.el.querySelectorAll('nv-datagridcolumn'));
|
|
9726
|
+
columns.forEach((col) => {
|
|
9727
|
+
const key = col.accessor;
|
|
9728
|
+
const cellSlot = col.querySelector('[slot="cell"]');
|
|
9729
|
+
if (cellSlot) {
|
|
9730
|
+
const element = deepCopyElement(cellSlot);
|
|
9731
|
+
this.templateCache.set(key, element);
|
|
9732
|
+
}
|
|
9733
|
+
const headerSlot = col.querySelector('[slot="header"]');
|
|
9734
|
+
if (headerSlot) {
|
|
9735
|
+
const element = deepCopyElement(headerSlot);
|
|
9736
|
+
this.headerTemplateCache.set(key, element);
|
|
9737
|
+
}
|
|
9738
|
+
else {
|
|
9739
|
+
const header = col.header;
|
|
9740
|
+
if (header) {
|
|
9741
|
+
const headerDiv = document.createElement('div');
|
|
9742
|
+
headerDiv.textContent = header;
|
|
9743
|
+
this.headerTemplateCache.set(key, headerDiv);
|
|
9744
|
+
}
|
|
9745
|
+
}
|
|
9746
|
+
});
|
|
9508
9747
|
}
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
this.parseColumnsArray(newItems, this.parsedColumns);
|
|
9748
|
+
parseDataAndColumns() {
|
|
9749
|
+
if (this.dataJson) {
|
|
9750
|
+
this.parseJsonData(this.dataJson);
|
|
9513
9751
|
}
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9752
|
+
else if (this.data && this.data.length > 0) {
|
|
9753
|
+
this.parseDataArray(this.data, this.parsedData);
|
|
9754
|
+
}
|
|
9755
|
+
if (this.columnsJson) {
|
|
9756
|
+
this.parseJsonColumns(this.columnsJson, this.parsedColumns);
|
|
9757
|
+
}
|
|
9758
|
+
else if (this.columns && this.columns.length > 0) {
|
|
9759
|
+
this.parseColumnsArray(this.columns, this.parsedColumns);
|
|
9760
|
+
}
|
|
9761
|
+
else if (this.headerTemplateCache.size > 0) {
|
|
9762
|
+
const headerKeys = Array.from(this.headerTemplateCache.keys());
|
|
9763
|
+
const arrayColumnsConfig = headerKeys.map(key => (Object.assign({}, { accessor: key, header: key ? key.charAt(0).toUpperCase() + key.slice(1) : '' })));
|
|
9764
|
+
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
9765
|
+
}
|
|
9766
|
+
else if (this.parsedData.length > 0) {
|
|
9767
|
+
const firstRow = this.parsedData[0];
|
|
9768
|
+
const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
|
|
9769
|
+
accessor: key,
|
|
9770
|
+
header: key.charAt(0).toUpperCase() + key.slice(1),
|
|
9771
|
+
}));
|
|
9772
|
+
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
9517
9773
|
}
|
|
9518
9774
|
}
|
|
9519
|
-
|
|
9520
|
-
|
|
9775
|
+
deepEqual(a, b) {
|
|
9776
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
9521
9777
|
}
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9778
|
+
/**
|
|
9779
|
+
* Parses the data array and sets the state accordingly
|
|
9780
|
+
* @param {any[]} newValue - The new value of the data array.
|
|
9781
|
+
* @param {any[]} oldValue - The old value of the data array.
|
|
9782
|
+
*/
|
|
9783
|
+
parseDataArray(newValue, oldValue) {
|
|
9784
|
+
// Ensure both are arrays for proper comparison
|
|
9785
|
+
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
9786
|
+
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
9787
|
+
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
9788
|
+
return; // Deep comparison
|
|
9530
9789
|
}
|
|
9790
|
+
this.parsedData = Array.isArray(newValue) ? newValue : [];
|
|
9531
9791
|
}
|
|
9532
|
-
|
|
9533
|
-
|
|
9792
|
+
/**
|
|
9793
|
+
* Parses the columns array and sets the state accordingly
|
|
9794
|
+
* @param {Column[]} newValue - The new value of the columns array.
|
|
9795
|
+
* @param {Column[]} oldValue - The old value of the columns array.
|
|
9796
|
+
*/
|
|
9797
|
+
parseColumnsArray(newValue, oldValue) {
|
|
9798
|
+
// Ensure both are arrays for proper comparison
|
|
9799
|
+
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
9800
|
+
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
9801
|
+
// Use a proper deep comparison function (e.g., Lodash's isEqual)
|
|
9802
|
+
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
9803
|
+
return;
|
|
9804
|
+
}
|
|
9805
|
+
// Assign only after confirming changes
|
|
9806
|
+
this.parsedColumns = safeNewValue;
|
|
9534
9807
|
}
|
|
9535
|
-
//#endregion WATCHERS
|
|
9536
|
-
/****************************************************************************/
|
|
9537
|
-
//#region METHODS
|
|
9538
9808
|
initializeTable() {
|
|
9539
9809
|
// Clear the previous table instance (if any)
|
|
9540
9810
|
this.table = null;
|
|
@@ -9569,170 +9839,268 @@ class NvDatagrid {
|
|
|
9569
9839
|
}, // Default: no column sizing info
|
|
9570
9840
|
},
|
|
9571
9841
|
};
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
const
|
|
9577
|
-
|
|
9578
|
-
// Use defined columns
|
|
9579
|
-
return validColumns.map(column => columnHelper.accessor(column.accessor, {
|
|
9580
|
-
header: column.header,
|
|
9581
|
-
cell: info => info.getValue(),
|
|
9582
|
-
}));
|
|
9583
|
-
}
|
|
9584
|
-
else if (tableOptions.data && tableOptions.data.length > 0) {
|
|
9585
|
-
// Generate columns from data keys
|
|
9586
|
-
const sampleRow = tableOptions.data[0];
|
|
9587
|
-
return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
|
|
9588
|
-
header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
9589
|
-
cell: info => info.getValue(),
|
|
9590
|
-
}));
|
|
9591
|
-
}
|
|
9592
|
-
else {
|
|
9593
|
-
// No columns and no data
|
|
9594
|
-
return [];
|
|
9595
|
-
}
|
|
9596
|
-
};
|
|
9597
|
-
const setTableData = () => {
|
|
9598
|
-
if (this.parsedData &&
|
|
9842
|
+
if (this.parsedColumns.length > 0) {
|
|
9843
|
+
// Validate and generate column definitions
|
|
9844
|
+
const validColumns = this.parsedColumns.filter(column => (column === null || column === void 0 ? void 0 : column.accessor) && (column === null || column === void 0 ? void 0 : column.header));
|
|
9845
|
+
// Update tableOptions based on parsed data and columns
|
|
9846
|
+
const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
|
|
9847
|
+
const hasData = this.parsedData &&
|
|
9599
9848
|
Array.isArray(this.parsedData) &&
|
|
9600
|
-
this.parsedData.length > 0
|
|
9601
|
-
|
|
9849
|
+
this.parsedData.length > 0;
|
|
9850
|
+
if (!hasColumns && !hasData) ;
|
|
9851
|
+
else if (hasColumns && !hasData) {
|
|
9852
|
+
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
9602
9853
|
}
|
|
9603
9854
|
else {
|
|
9604
|
-
|
|
9855
|
+
// Both columns and data are available
|
|
9856
|
+
// No columns and data is available
|
|
9857
|
+
tableOptions.data = this.getTableData();
|
|
9858
|
+
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
9605
9859
|
}
|
|
9606
|
-
};
|
|
9607
|
-
// Update tableOptions based on parsed data and columns
|
|
9608
|
-
const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
|
|
9609
|
-
const hasData = (this.parsedData &&
|
|
9610
|
-
Array.isArray(this.parsedData) &&
|
|
9611
|
-
this.parsedData.length > 0) ||
|
|
9612
|
-
this.hasSlotBody;
|
|
9613
|
-
if (!hasColumns && !hasData) ;
|
|
9614
|
-
else if (hasColumns && !hasData) {
|
|
9615
|
-
tableOptions.columns = generateColumns();
|
|
9616
|
-
}
|
|
9617
|
-
else {
|
|
9618
|
-
// Both columns and data are available
|
|
9619
|
-
// No columns and data is available
|
|
9620
|
-
tableOptions.data = setTableData();
|
|
9621
|
-
tableOptions.columns = generateColumns();
|
|
9622
9860
|
}
|
|
9623
9861
|
// Initialize the table
|
|
9624
9862
|
this.table = createTable(tableOptions);
|
|
9625
9863
|
}
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9864
|
+
// Helper function to generate column definitions
|
|
9865
|
+
generateColumns(validColumns, tableOptions) {
|
|
9866
|
+
const columnHelper = createColumnHelper();
|
|
9867
|
+
if (validColumns.length > 0) {
|
|
9868
|
+
// Use defined columns
|
|
9869
|
+
return validColumns.map(column => columnHelper.accessor(column.accessor, {
|
|
9870
|
+
header: column.header,
|
|
9871
|
+
cell: info => info.getValue(),
|
|
9872
|
+
}));
|
|
9873
|
+
}
|
|
9874
|
+
else if (tableOptions.data && tableOptions.data.length > 0) {
|
|
9875
|
+
// Generate columns from data keys
|
|
9876
|
+
const sampleRow = tableOptions.data[0];
|
|
9877
|
+
return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
|
|
9878
|
+
header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
9879
|
+
cell: info => info.getValue(),
|
|
9880
|
+
}));
|
|
9881
|
+
}
|
|
9882
|
+
else {
|
|
9883
|
+
// No columns and no data
|
|
9884
|
+
return [];
|
|
9885
|
+
}
|
|
9635
9886
|
}
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
return;
|
|
9644
|
-
|
|
9887
|
+
getTableData() {
|
|
9888
|
+
if (this.parsedData &&
|
|
9889
|
+
Array.isArray(this.parsedData) &&
|
|
9890
|
+
this.parsedData.length > 0) {
|
|
9891
|
+
return [...this.parsedData];
|
|
9892
|
+
}
|
|
9893
|
+
else {
|
|
9894
|
+
return [];
|
|
9895
|
+
}
|
|
9645
9896
|
}
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9897
|
+
renderTemplate(template, cellValue, row) {
|
|
9898
|
+
if (!template) {
|
|
9899
|
+
return null;
|
|
9900
|
+
}
|
|
9901
|
+
// Handle <template> elements correctly
|
|
9902
|
+
const templateContent = template instanceof HTMLTemplateElement ? template.content : template;
|
|
9903
|
+
const element = deepCopyElement(templateContent);
|
|
9904
|
+
// Replace placeholders in text content, attributes, and properties
|
|
9905
|
+
element.querySelectorAll('*').forEach(el => {
|
|
9906
|
+
// Replace placeholders in text content
|
|
9907
|
+
this.replacePlaceholdersTextContent(el, cellValue);
|
|
9908
|
+
// Replace placeholders in attributes
|
|
9909
|
+
this.replacePlaceholdersAttributes(el, cellValue);
|
|
9910
|
+
// Replace placeholders in properties
|
|
9911
|
+
this.replacePlaceholdersProperties(el, cellValue);
|
|
9912
|
+
});
|
|
9913
|
+
// Handle `data-bind-event`
|
|
9914
|
+
element.querySelectorAll('[data-bind-event]').forEach(el => {
|
|
9915
|
+
const bindEvent = el.getAttribute('data-bind-event') || '';
|
|
9916
|
+
const splitted = bindEvent.split(':');
|
|
9917
|
+
if (!bindEvent.includes(':') || splitted.length < 2) {
|
|
9918
|
+
console.warn('Invalid data-bind-event format:', bindEvent);
|
|
9919
|
+
return;
|
|
9920
|
+
}
|
|
9921
|
+
const eventType = splitted[0];
|
|
9922
|
+
const keyAction = splitted[1];
|
|
9923
|
+
const details = splitted.length > 2 ? splitted[2] : null;
|
|
9924
|
+
el.addEventListener(eventType, () => {
|
|
9925
|
+
var _a;
|
|
9926
|
+
const keys = (_a = details === null || details === void 0 ? void 0 : details.split(',')) !== null && _a !== void 0 ? _a : [];
|
|
9927
|
+
// Convert keys into a single object instead of an array of objects
|
|
9928
|
+
const keyValue = keys.reduce((acc, key) => {
|
|
9929
|
+
var _a;
|
|
9930
|
+
if (row === null || row === void 0 ? void 0 : row.original) {
|
|
9931
|
+
if (key in row.original) {
|
|
9932
|
+
acc[key] = (_a = row.original) === null || _a === void 0 ? void 0 : _a[key];
|
|
9933
|
+
}
|
|
9934
|
+
}
|
|
9935
|
+
return acc;
|
|
9936
|
+
}, {});
|
|
9937
|
+
const action = { keyAction, details: keyValue };
|
|
9938
|
+
this.action.emit(action);
|
|
9662
9939
|
});
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
const bodySlotRows = this.hasSlotBody
|
|
9671
|
-
? Array.from(bodySlot.querySelectorAll('nv-datagridrow'))
|
|
9672
|
-
: [];
|
|
9673
|
-
const mappedRows = bodySlotRows.map(row => {
|
|
9674
|
-
const cells = Array.from(row.querySelectorAll('nv-datagriddatacell'));
|
|
9675
|
-
return cells.map(cell => {
|
|
9676
|
-
return {
|
|
9677
|
-
accessor: cell.accessor,
|
|
9678
|
-
value: cell.innerHTML,
|
|
9679
|
-
};
|
|
9680
|
-
});
|
|
9940
|
+
});
|
|
9941
|
+
// Ensure Web Components are properly connected
|
|
9942
|
+
setTimeout(() => {
|
|
9943
|
+
element.querySelectorAll('*').forEach(child => {
|
|
9944
|
+
if (typeof child.connectedCallback === 'function') {
|
|
9945
|
+
child.connectedCallback();
|
|
9946
|
+
}
|
|
9681
9947
|
});
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
|
|
9686
|
-
|
|
9687
|
-
|
|
9948
|
+
}, 0);
|
|
9949
|
+
return (hAsync("div", { ref: el => {
|
|
9950
|
+
if (el) {
|
|
9951
|
+
el.innerHTML = ''; // Remove existing content
|
|
9952
|
+
el.appendChild(element); // Append new element
|
|
9953
|
+
}
|
|
9954
|
+
} }));
|
|
9955
|
+
}
|
|
9956
|
+
replaceKeyWithValue(key, cellValue) {
|
|
9957
|
+
var _a;
|
|
9958
|
+
// Handle undefined or null values by returning the fallback
|
|
9959
|
+
if (cellValue === undefined || cellValue === null) {
|
|
9960
|
+
return this.fallbackValue;
|
|
9961
|
+
}
|
|
9962
|
+
// If cellValue is an object, attempt to retrieve the value
|
|
9963
|
+
if (typeof cellValue === 'object') {
|
|
9964
|
+
// Handle nested key paths (e.g., "user.name")
|
|
9965
|
+
if (key.includes('.')) {
|
|
9966
|
+
const resolvedValue = key.split('.').reduce((acc, keyPart) => {
|
|
9967
|
+
if (acc && acc[keyPart] !== undefined) {
|
|
9968
|
+
return acc[keyPart];
|
|
9969
|
+
}
|
|
9970
|
+
else {
|
|
9971
|
+
return undefined;
|
|
9972
|
+
}
|
|
9973
|
+
}, cellValue);
|
|
9974
|
+
if (resolvedValue !== undefined) {
|
|
9975
|
+
return String(resolvedValue);
|
|
9976
|
+
}
|
|
9977
|
+
else {
|
|
9978
|
+
const firstLevelKey = key.split('.')[0];
|
|
9979
|
+
const rest = key.substring(firstLevelKey.length + 1);
|
|
9980
|
+
const response = this.replaceKeyWithValue(rest, cellValue);
|
|
9981
|
+
if (response !== this.fallbackValue) {
|
|
9982
|
+
return response;
|
|
9983
|
+
}
|
|
9984
|
+
}
|
|
9985
|
+
}
|
|
9986
|
+
// Handle single-level key lookup
|
|
9987
|
+
return key in cellValue ? String(cellValue[key]) : this.fallbackValue;
|
|
9688
9988
|
}
|
|
9689
|
-
|
|
9690
|
-
|
|
9989
|
+
// If cellValue is a primitive (string, number, boolean, etc.), return it as a string
|
|
9990
|
+
return (_a = cellValue === null || cellValue === void 0 ? void 0 : cellValue.toString()) !== null && _a !== void 0 ? _a : this.fallbackValue;
|
|
9991
|
+
}
|
|
9992
|
+
replacePlaceholdersTextContent(element, cellValue) {
|
|
9993
|
+
// ✅ Replace placeholders in text content
|
|
9994
|
+
element.childNodes.forEach(node => {
|
|
9995
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
9996
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
9997
|
+
}
|
|
9998
|
+
});
|
|
9999
|
+
}
|
|
10000
|
+
replacePlaceholdersAttributes(element, cellValue) {
|
|
10001
|
+
// ✅ Replace placeholders in attributes
|
|
10002
|
+
Array.from(element.attributes).forEach(attr => {
|
|
10003
|
+
if (attr.value.includes('__')) {
|
|
10004
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
10005
|
+
}
|
|
10006
|
+
});
|
|
10007
|
+
}
|
|
10008
|
+
replacePlaceholdersProperties(element, cellValue) {
|
|
10009
|
+
// ✅ Dynamically extract relevant properties
|
|
10010
|
+
const properties = new Set();
|
|
10011
|
+
// Collect only own enumerable properties
|
|
10012
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
10013
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
10014
|
+
let proto = Object.getPrototypeOf(element);
|
|
10015
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
10016
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
10017
|
+
proto = Object.getPrototypeOf(proto);
|
|
10018
|
+
}
|
|
10019
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
10020
|
+
properties.forEach(prop => {
|
|
10021
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
10022
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
10023
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
10024
|
+
) {
|
|
10025
|
+
try {
|
|
10026
|
+
const propValue = element[prop];
|
|
10027
|
+
// ✅ Replace placeholders only if the value is a string
|
|
10028
|
+
if (typeof propValue === 'string' && propValue.includes('__')) {
|
|
10029
|
+
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue)); // ✅ TypeScript safe
|
|
10030
|
+
}
|
|
10031
|
+
}
|
|
10032
|
+
catch (error) {
|
|
10033
|
+
console.warn(`Could not assign property ${prop}:`, error.message);
|
|
10034
|
+
}
|
|
10035
|
+
}
|
|
10036
|
+
});
|
|
10037
|
+
}
|
|
10038
|
+
//#endregion METHODS
|
|
10039
|
+
/****************************************************************************/
|
|
10040
|
+
//#region WATCHERS
|
|
10041
|
+
parseColumns(newValue, oldValue = []) {
|
|
10042
|
+
this.parseColumnsArray(newValue, oldValue);
|
|
10043
|
+
}
|
|
10044
|
+
parseJsonColumns(newValue, oldValue) {
|
|
10045
|
+
try {
|
|
10046
|
+
const newItems = newValue ? JSON.parse(newValue) : [];
|
|
10047
|
+
this.parseColumnsArray(newItems, oldValue);
|
|
9691
10048
|
}
|
|
9692
|
-
|
|
9693
|
-
|
|
10049
|
+
catch (e) {
|
|
10050
|
+
console.error('Invalid JSON format for columnsJson:', e.message);
|
|
10051
|
+
this.parsedColumns = [];
|
|
9694
10052
|
}
|
|
9695
|
-
|
|
9696
|
-
|
|
10053
|
+
}
|
|
10054
|
+
parseData(newValue, oldValue = []) {
|
|
10055
|
+
this.parseDataArray(newValue, oldValue);
|
|
10056
|
+
}
|
|
10057
|
+
parseJsonData(newValue) {
|
|
10058
|
+
try {
|
|
10059
|
+
const newItems = newValue ? JSON.parse(newValue) : [];
|
|
10060
|
+
this.parseDataArray(newItems, this.parsedData);
|
|
9697
10061
|
}
|
|
9698
|
-
|
|
9699
|
-
|
|
10062
|
+
catch (e) {
|
|
10063
|
+
console.error('Invalid JSON format for dataJson:', e.message);
|
|
10064
|
+
this.parsedData = [];
|
|
9700
10065
|
}
|
|
9701
10066
|
}
|
|
9702
|
-
|
|
10067
|
+
handleParsedChange() {
|
|
9703
10068
|
this.initializeTable();
|
|
9704
10069
|
}
|
|
9705
|
-
//#endregion
|
|
10070
|
+
//#endregion WATCHERS
|
|
10071
|
+
/****************************************************************************/
|
|
10072
|
+
//#region LIFECYCLE
|
|
10073
|
+
componentWillLoad() {
|
|
10074
|
+
this.cacheTemplates();
|
|
10075
|
+
this.parseDataAndColumns();
|
|
10076
|
+
}
|
|
10077
|
+
//#endregion EVENTS
|
|
9706
10078
|
/****************************************************************************/
|
|
9707
10079
|
//#region RENDER
|
|
9708
10080
|
render() {
|
|
9709
10081
|
var _a, _b, _c;
|
|
9710
|
-
const headerGroups = !this.table ||
|
|
9711
|
-
this.table === undefined ||
|
|
9712
|
-
(this.parsedColumns.length === 0 && !this.hasSlotHead)
|
|
10082
|
+
const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
|
|
9713
10083
|
? []
|
|
9714
10084
|
: (_a = this.table) === null || _a === void 0 ? void 0 : _a.getHeaderGroups();
|
|
9715
|
-
const rows = !this.table ||
|
|
9716
|
-
this.table === undefined ||
|
|
9717
|
-
(this.parsedData.length === 0 && !this.hasSlotBody)
|
|
10085
|
+
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
9718
10086
|
? []
|
|
9719
10087
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
9720
|
-
return (hAsync(Host, { key: '
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
: null)), hAsync("tbody", null, !rows || rows.length === 0 ? (hAsync("tr", null, hAsync("td", { colSpan: this.parsedColumns.length || 12 }, this.noDataMessage))) : (rows.map(row => {
|
|
10088
|
+
return (hAsync(Host, { key: '03dc8123cf740c6b5eeb59f10443a2ec1b279f28' }, hAsync("div", { key: '263fef353246dba3adb0a44b4e80ff5a4c2e97eb', class: "hidden" }, hAsync("slot", { key: '3d2f02044ad8e09fb010cb0486f63b48e1048acf' })), hAsync("slot", { key: 'e5b458c755eb6887d1fdb959b8883f4d48c5b2f9', name: "before" }), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (hAsync("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (hAsync("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (hAsync("thead", null, this.parsedColumns.length > 0 && headerGroups
|
|
10089
|
+
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (hAsync("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
10090
|
+
return (hAsync("th", { key: header.id }, header.isPlaceholder
|
|
10091
|
+
? null
|
|
10092
|
+
: this.renderTemplate(this.headerTemplateCache.get(header.id), {}) || header.column.columnDef.header));
|
|
10093
|
+
}))))
|
|
10094
|
+
: null)), hAsync("tbody", null, !rows || rows.length === 0 || this.parsedData.length === 0 ? (hAsync("tr", null, hAsync("td", { colSpan: this.parsedColumns.length || 12, class: "no-data" }, this.noDataMessage))) : (rows.map(row => {
|
|
9728
10095
|
const rowId = row.id;
|
|
9729
10096
|
const visibleCells = row === null || row === void 0 ? void 0 : row.getVisibleCells();
|
|
9730
|
-
|
|
10097
|
+
return (hAsync("tr", { key: rowId }, visibleCells.map(cell => {
|
|
10098
|
+
const cellAccessors = cell.column.id;
|
|
9731
10099
|
const cellValue = cell.getValue();
|
|
9732
|
-
return
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
}))))), hAsync("slot", { key: '
|
|
10100
|
+
return (hAsync("td", { key: cell.id, "data-row-id": rowId }, this.renderTemplate(this.templateCache.get(cellAccessors), cellValue, row) ||
|
|
10101
|
+
(cellValue !== null && cellValue !== void 0 ? cellValue : this.fallbackValue)));
|
|
10102
|
+
})));
|
|
10103
|
+
}))))), hAsync("slot", { key: 'e80f9b8a5dbda4c05b719a99c173e2f106449668', name: "after" })));
|
|
9736
10104
|
}
|
|
9737
10105
|
get el() { return getElement(this); }
|
|
9738
10106
|
static get watchers() { return {
|
|
@@ -9748,158 +10116,47 @@ class NvDatagrid {
|
|
|
9748
10116
|
"$flags$": 4,
|
|
9749
10117
|
"$tagName$": "nv-datagrid",
|
|
9750
10118
|
"$members$": {
|
|
9751
|
-
"columns": [16],
|
|
9752
|
-
"columnsJson": [513, "columns-json"],
|
|
9753
10119
|
"data": [16],
|
|
9754
|
-
"
|
|
9755
|
-
"
|
|
9756
|
-
"
|
|
9757
|
-
"
|
|
9758
|
-
"
|
|
9759
|
-
"
|
|
9760
|
-
"
|
|
9761
|
-
"
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
"$lazyBundleId$": "-",
|
|
9765
|
-
"$attrsToReflect$": [["columnsJson", "columns-json"], ["dataJson", "data-json"]]
|
|
9766
|
-
}; }
|
|
9767
|
-
}
|
|
9768
|
-
|
|
9769
|
-
const nvDatagridbodyCss = "";
|
|
9770
|
-
var NvDatagridbodyStyle0 = nvDatagridbodyCss;
|
|
9771
|
-
|
|
9772
|
-
/**
|
|
9773
|
-
* @slot default - Use this slot to insert HTML into the data grid body.
|
|
9774
|
-
*/
|
|
9775
|
-
class NvDatagridbody {
|
|
9776
|
-
constructor(hostRef) {
|
|
9777
|
-
registerInstance(this, hostRef);
|
|
9778
|
-
}
|
|
9779
|
-
/****************************************************************************/
|
|
9780
|
-
//#region RENDER
|
|
9781
|
-
render() {
|
|
9782
|
-
return (hAsync(Host, { key: '320cd537de564c4bf01fcae542ce31101bfe44b4' }, hAsync("tbody", { key: '129bbf16d0ead565084e18de18f6fff32b20bc57' }, hAsync("slot", { key: '6332b104bffa355c82823fd971d389d8cd894462' }))));
|
|
9783
|
-
}
|
|
9784
|
-
static get style() { return NvDatagridbodyStyle0; }
|
|
9785
|
-
static get cmpMeta() { return {
|
|
9786
|
-
"$flags$": 4,
|
|
9787
|
-
"$tagName$": "nv-datagridbody",
|
|
9788
|
-
"$members$": undefined,
|
|
9789
|
-
"$listeners$": undefined,
|
|
9790
|
-
"$lazyBundleId$": "-",
|
|
9791
|
-
"$attrsToReflect$": []
|
|
9792
|
-
}; }
|
|
9793
|
-
}
|
|
9794
|
-
|
|
9795
|
-
const nvDatagridcolumnCss = "";
|
|
9796
|
-
var NvDatagridcolumnStyle0 = nvDatagridcolumnCss;
|
|
9797
|
-
|
|
9798
|
-
/**
|
|
9799
|
-
* @slot default - Use this slot to insert HTML into the data grid column.
|
|
9800
|
-
*/
|
|
9801
|
-
class NvDatagridcolumn {
|
|
9802
|
-
constructor(hostRef) {
|
|
9803
|
-
registerInstance(this, hostRef);
|
|
9804
|
-
}
|
|
9805
|
-
//#endregion PROPERTIES
|
|
9806
|
-
/****************************************************************************/
|
|
9807
|
-
//#region RENDER
|
|
9808
|
-
render() {
|
|
9809
|
-
return (hAsync(Host, { key: '72c6804957273f9ee892b5117ffda50ccf6caff1' }, hAsync("th", { key: 'be6fb9d13310fdc1a4e97824696df2d74746429a' }, hAsync("slot", { key: '43747defd40c561a36ae1151be4bb5b94e84cf61' }))));
|
|
9810
|
-
}
|
|
9811
|
-
static get style() { return NvDatagridcolumnStyle0; }
|
|
9812
|
-
static get cmpMeta() { return {
|
|
9813
|
-
"$flags$": 4,
|
|
9814
|
-
"$tagName$": "nv-datagridcolumn",
|
|
9815
|
-
"$members$": {
|
|
9816
|
-
"header": [1],
|
|
9817
|
-
"accessor": [1]
|
|
9818
|
-
},
|
|
9819
|
-
"$listeners$": undefined,
|
|
9820
|
-
"$lazyBundleId$": "-",
|
|
9821
|
-
"$attrsToReflect$": []
|
|
9822
|
-
}; }
|
|
9823
|
-
}
|
|
9824
|
-
|
|
9825
|
-
const nvDatagriddatacellCss = "";
|
|
9826
|
-
var NvDatagriddatacellStyle0 = nvDatagriddatacellCss;
|
|
9827
|
-
|
|
9828
|
-
/**
|
|
9829
|
-
* @slot default - Use this slot to insert HTML into the data grid data cell.
|
|
9830
|
-
*/
|
|
9831
|
-
class NvDatagriddatacell {
|
|
9832
|
-
constructor(hostRef) {
|
|
9833
|
-
registerInstance(this, hostRef);
|
|
9834
|
-
}
|
|
9835
|
-
//#endregion PROPERTIES
|
|
9836
|
-
/****************************************************************************/
|
|
9837
|
-
//#region RENDER
|
|
9838
|
-
render() {
|
|
9839
|
-
return (hAsync(Host, { key: '808a7972c4075e1ef597d3e31e6a706a4de99479' }, hAsync("td", { key: 'af904343b51c9596d73d2d59ec32048b16f3421e' }, hAsync("slot", { key: '75ca8b01948e726e140f2def6e3931fe79bed361' }))));
|
|
9840
|
-
}
|
|
9841
|
-
static get style() { return NvDatagriddatacellStyle0; }
|
|
9842
|
-
static get cmpMeta() { return {
|
|
9843
|
-
"$flags$": 4,
|
|
9844
|
-
"$tagName$": "nv-datagriddatacell",
|
|
9845
|
-
"$members$": {
|
|
9846
|
-
"accessor": [1]
|
|
9847
|
-
},
|
|
9848
|
-
"$listeners$": undefined,
|
|
9849
|
-
"$lazyBundleId$": "-",
|
|
9850
|
-
"$attrsToReflect$": []
|
|
9851
|
-
}; }
|
|
9852
|
-
}
|
|
9853
|
-
|
|
9854
|
-
const nvDatagridheadCss = "";
|
|
9855
|
-
var NvDatagridheadStyle0 = nvDatagridheadCss;
|
|
9856
|
-
|
|
9857
|
-
/**
|
|
9858
|
-
* @slot default - Use this slot to insert HTML into the table head.
|
|
9859
|
-
*/
|
|
9860
|
-
class NvDatagridhead {
|
|
9861
|
-
constructor(hostRef) {
|
|
9862
|
-
registerInstance(this, hostRef);
|
|
9863
|
-
}
|
|
9864
|
-
/****************************************************************************/
|
|
9865
|
-
//#region RENDER
|
|
9866
|
-
render() {
|
|
9867
|
-
return (hAsync(Host, { key: 'cbb3dd0506a8ccfe2372452f8e7f1c199fc6cdf8' }, hAsync("thead", { key: 'f97f4214f934bd5fe71f6e4dd09dd3eb702fe5fa' }, hAsync("slot", { key: '88565733fe01bc8ad83849254a38f0610bcc0a50' }))));
|
|
9868
|
-
}
|
|
9869
|
-
static get style() { return NvDatagridheadStyle0; }
|
|
9870
|
-
static get cmpMeta() { return {
|
|
9871
|
-
"$flags$": 4,
|
|
9872
|
-
"$tagName$": "nv-datagridhead",
|
|
9873
|
-
"$members$": undefined,
|
|
10120
|
+
"columns": [16],
|
|
10121
|
+
"dataJson": [513, "data-json"],
|
|
10122
|
+
"columnsJson": [513, "columns-json"],
|
|
10123
|
+
"fallbackValue": [513, "fallback-value"],
|
|
10124
|
+
"noDataMessage": [513, "no-data-message"],
|
|
10125
|
+
"noColumnsNoDataMessage": [513, "no-columns-no-data-message"],
|
|
10126
|
+
"table": [32],
|
|
10127
|
+
"parsedColumns": [32],
|
|
10128
|
+
"parsedData": [32]
|
|
10129
|
+
},
|
|
9874
10130
|
"$listeners$": undefined,
|
|
9875
10131
|
"$lazyBundleId$": "-",
|
|
9876
|
-
"$attrsToReflect$": []
|
|
10132
|
+
"$attrsToReflect$": [["dataJson", "data-json"], ["columnsJson", "columns-json"], ["fallbackValue", "fallback-value"], ["noDataMessage", "no-data-message"], ["noColumnsNoDataMessage", "no-columns-no-data-message"]]
|
|
9877
10133
|
}; }
|
|
9878
10134
|
}
|
|
9879
10135
|
|
|
9880
|
-
const nvDatagridrowCss = "";
|
|
9881
|
-
var NvDatagridrowStyle0 = nvDatagridrowCss;
|
|
9882
|
-
|
|
9883
10136
|
/**
|
|
9884
|
-
* @slot
|
|
10137
|
+
* @slot header - Defines how to render the header of the column.
|
|
10138
|
+
* @slot cell - Defines how to render every cell of the column.
|
|
9885
10139
|
*/
|
|
9886
|
-
class
|
|
10140
|
+
class NvDatagridcolumn {
|
|
9887
10141
|
constructor(hostRef) {
|
|
9888
10142
|
registerInstance(this, hostRef);
|
|
9889
10143
|
}
|
|
10144
|
+
//#endregion PROPERTIES
|
|
9890
10145
|
/****************************************************************************/
|
|
9891
10146
|
//#region RENDER
|
|
9892
10147
|
render() {
|
|
9893
|
-
return (hAsync(Host, { key: '
|
|
10148
|
+
return (hAsync(Host, { key: '1a87ebe6794014751ac7c7be1cc95c50cb76866f' }, hAsync("slot", { key: 'edfdc5c83a9627a407d41f655faf7202a89abe4a', name: "header" }), hAsync("slot", { key: '45c8b495ae5fccc39faf67dabe23ed0571aaf713', name: "cell" })));
|
|
9894
10149
|
}
|
|
9895
|
-
static get style() { return NvDatagridrowStyle0; }
|
|
9896
10150
|
static get cmpMeta() { return {
|
|
9897
10151
|
"$flags$": 4,
|
|
9898
|
-
"$tagName$": "nv-
|
|
9899
|
-
"$members$":
|
|
10152
|
+
"$tagName$": "nv-datagridcolumn",
|
|
10153
|
+
"$members$": {
|
|
10154
|
+
"header": [513],
|
|
10155
|
+
"accessor": [513]
|
|
10156
|
+
},
|
|
9900
10157
|
"$listeners$": undefined,
|
|
9901
10158
|
"$lazyBundleId$": "-",
|
|
9902
|
-
"$attrsToReflect$": []
|
|
10159
|
+
"$attrsToReflect$": [["header", "header"], ["accessor", "accessor"]]
|
|
9903
10160
|
}; }
|
|
9904
10161
|
}
|
|
9905
10162
|
|
|
@@ -10483,12 +10740,6 @@ class NvDialog {
|
|
|
10483
10740
|
* If true, the dialog will be closed when the backdrop is clicked.
|
|
10484
10741
|
*/
|
|
10485
10742
|
this.clickOutside = false;
|
|
10486
|
-
/**
|
|
10487
|
-
* Controls the dialog's autofocus behavior. When false (default), the dialog will
|
|
10488
|
-
* automatically focus the first focusable element. When true, automatic focus is
|
|
10489
|
-
* disabled and you must manually set focus on an element for accessibility compliance.
|
|
10490
|
-
*/
|
|
10491
|
-
this.manualFocus = false;
|
|
10492
10743
|
/**
|
|
10493
10744
|
* If true, the dialog visibility is managed manually through methods or the open prop.
|
|
10494
10745
|
*/
|
|
@@ -10513,6 +10764,7 @@ class NvDialog {
|
|
|
10513
10764
|
* Handles the dialog close event.
|
|
10514
10765
|
*/
|
|
10515
10766
|
this.handleDialogClose = () => {
|
|
10767
|
+
this.hide();
|
|
10516
10768
|
this.close.emit();
|
|
10517
10769
|
};
|
|
10518
10770
|
this.handleClickOutside = (event) => {
|
|
@@ -10600,7 +10852,6 @@ class NvDialog {
|
|
|
10600
10852
|
}
|
|
10601
10853
|
/**
|
|
10602
10854
|
* Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.
|
|
10603
|
-
|
|
10604
10855
|
* @param {KeyboardEvent} event - The keydown event.
|
|
10605
10856
|
*/
|
|
10606
10857
|
handleKeyDown(event) {
|
|
@@ -10658,6 +10909,20 @@ class NvDialog {
|
|
|
10658
10909
|
return (child.getAttribute('slot') === 'footer' ||
|
|
10659
10910
|
child.tagName.toLowerCase() === 'nv-dialogfooter');
|
|
10660
10911
|
});
|
|
10912
|
+
// If no form ID is provided, check if there's a form and generate an ID
|
|
10913
|
+
if (!this.form) {
|
|
10914
|
+
const formElement = Array.from(this.el.children).find(child => {
|
|
10915
|
+
return child.tagName.toLowerCase() === 'form';
|
|
10916
|
+
});
|
|
10917
|
+
if (formElement) {
|
|
10918
|
+
if (!formElement.id) {
|
|
10919
|
+
formElement.id = `dialog-form-${Math.random()
|
|
10920
|
+
.toString(36)
|
|
10921
|
+
.substring(2, 11)}`;
|
|
10922
|
+
}
|
|
10923
|
+
this.form = formElement.id;
|
|
10924
|
+
}
|
|
10925
|
+
}
|
|
10661
10926
|
}
|
|
10662
10927
|
componentWillUpdate() {
|
|
10663
10928
|
this.attachEventListeners();
|
|
@@ -10666,7 +10931,8 @@ class NvDialog {
|
|
|
10666
10931
|
if (this.open) {
|
|
10667
10932
|
this.show();
|
|
10668
10933
|
}
|
|
10669
|
-
if
|
|
10934
|
+
// Check if any element already has autofocus before setting it automatically
|
|
10935
|
+
if (!this.dialogElement.querySelector('[autofocus]')) {
|
|
10670
10936
|
this.setAutofocus();
|
|
10671
10937
|
}
|
|
10672
10938
|
this.attachEventListeners();
|
|
@@ -10679,7 +10945,8 @@ class NvDialog {
|
|
|
10679
10945
|
/****************************************************************************/
|
|
10680
10946
|
//#region RENDER
|
|
10681
10947
|
render() {
|
|
10682
|
-
|
|
10948
|
+
const hasForm = this.form || this.el.querySelector('form');
|
|
10949
|
+
return (hAsync(Host, { key: '1ea0934bc4529738e27537a4145615cce3175f0c' }, hAsync("slot", { key: '2384a1131241e74eb833ced9e24b6ca99f2d95a3', name: "trigger" }), hAsync("dialog", { key: 'fe8a30812b28be1a6d0bec81d308cec838f0c0c9', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsx({ full: this.full }) }, hAsync("div", { key: '1a8865b9bf1469e2644eac4e270719b06b8fd540', class: "content" }, !this.undismissable && (hAsync("nv-button", { key: 'f2141443668d97e764cf6c70dab45332a50aafa3', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleCloseButton, "aria-label": "Close dialog" }, hAsync("nv-icon", { key: 'a3c0d521dbf597d0dbba16193264d4be7b800935', name: "x", size: "sm" }))), this.headerElement ? (hAsync("slot", { name: "header" })) : (hAsync("nv-dialogheader", { id: "dialog-header" })), hAsync("div", { key: '556df531bd5e76ac4383e1930236600b768b13f0', class: "content-body", id: "dialog-content" }, hAsync("slot", { key: '669ba9c7dc6a0dd6f2d7d5e3050c574075e728be' })), this.footerElement ? (hAsync("slot", { name: "footer" })) : (hAsync("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? ButtonType.Submit : ButtonType.Button, onNvDialogCanceled: this.handleCancelButton, undismissable: this.undismissable }))))));
|
|
10683
10950
|
}
|
|
10684
10951
|
get el() { return getElement(this); }
|
|
10685
10952
|
static get watchers() { return {
|
|
@@ -10696,7 +10963,6 @@ class NvDialog {
|
|
|
10696
10963
|
"open": [1540],
|
|
10697
10964
|
"undismissable": [516],
|
|
10698
10965
|
"clickOutside": [516, "click-outside"],
|
|
10699
|
-
"manualFocus": [516, "manual-focus"],
|
|
10700
10966
|
"controlled": [516],
|
|
10701
10967
|
"full": [516],
|
|
10702
10968
|
"show": [64],
|
|
@@ -10704,7 +10970,7 @@ class NvDialog {
|
|
|
10704
10970
|
},
|
|
10705
10971
|
"$listeners$": [[4, "keydown", "handleKeyDown"], [4, "click", "handleDocumentClick"], [5, "touchstart", "handleDocumentTouch"]],
|
|
10706
10972
|
"$lazyBundleId$": "-",
|
|
10707
|
-
"$attrsToReflect$": [["open", "open"], ["undismissable", "undismissable"], ["clickOutside", "click-outside"], ["
|
|
10973
|
+
"$attrsToReflect$": [["open", "open"], ["undismissable", "undismissable"], ["clickOutside", "click-outside"], ["controlled", "controlled"], ["full", "full"]]
|
|
10708
10974
|
}; }
|
|
10709
10975
|
}
|
|
10710
10976
|
|
|
@@ -10718,7 +10984,7 @@ class NvDialogfooter {
|
|
|
10718
10984
|
constructor(hostRef) {
|
|
10719
10985
|
registerInstance(this, hostRef);
|
|
10720
10986
|
this.nvDialogCanceled = createEvent(this, "nvDialogCanceled", 7);
|
|
10721
|
-
this.
|
|
10987
|
+
this.nvDialogPrimaryClicked = createEvent(this, "nvDialogPrimaryClicked", 7);
|
|
10722
10988
|
if (hostRef.$hostElement$["s-ei"]) {
|
|
10723
10989
|
this.internals = hostRef.$hostElement$["s-ei"];
|
|
10724
10990
|
}
|
|
@@ -10730,7 +10996,7 @@ class NvDialogfooter {
|
|
|
10730
10996
|
/****************************************************************************/
|
|
10731
10997
|
//#region PROPERTIES
|
|
10732
10998
|
/**
|
|
10733
|
-
* Disables the
|
|
10999
|
+
* Disables the primary button, preventing user interaction.
|
|
10734
11000
|
*/
|
|
10735
11001
|
this.disabled = false;
|
|
10736
11002
|
/**
|
|
@@ -10739,15 +11005,15 @@ class NvDialogfooter {
|
|
|
10739
11005
|
*/
|
|
10740
11006
|
this.undismissable = false;
|
|
10741
11007
|
/**
|
|
10742
|
-
* Sets the leading icon for the
|
|
11008
|
+
* Sets the leading icon for the primary button.
|
|
10743
11009
|
*/
|
|
10744
11010
|
this.leadingIcon = '';
|
|
10745
11011
|
/**
|
|
10746
|
-
* Sets the trailing icon for the
|
|
11012
|
+
* Sets the trailing icon for the primary button.
|
|
10747
11013
|
*/
|
|
10748
11014
|
this.trailingIcon = '';
|
|
10749
11015
|
/**
|
|
10750
|
-
* Sets the danger state for the
|
|
11016
|
+
* Sets the danger state for the primary button.
|
|
10751
11017
|
*/
|
|
10752
11018
|
this.danger = false;
|
|
10753
11019
|
/**
|
|
@@ -10755,19 +11021,23 @@ class NvDialogfooter {
|
|
|
10755
11021
|
*/
|
|
10756
11022
|
this.cancelLabel = 'Cancel';
|
|
10757
11023
|
/**
|
|
10758
|
-
* Sets the label for the
|
|
11024
|
+
* Sets the label for the primary button.
|
|
11025
|
+
*/
|
|
11026
|
+
this.primaryLabel = 'Primary';
|
|
11027
|
+
/**
|
|
11028
|
+
* Sets the type of the primary button.
|
|
10759
11029
|
*/
|
|
10760
|
-
this.
|
|
11030
|
+
this.primaryButtonType = ButtonType.Button;
|
|
10761
11031
|
//#endregion EVENTS
|
|
10762
11032
|
/****************************************************************************/
|
|
10763
11033
|
//#region METHODS
|
|
10764
11034
|
/**
|
|
10765
|
-
* Handles the
|
|
11035
|
+
* Handles the primary action when the primary button is clicked.
|
|
10766
11036
|
* @param {Event} event - The click event.
|
|
10767
11037
|
*/
|
|
10768
|
-
this.
|
|
11038
|
+
this.handlePrimary = (event) => {
|
|
10769
11039
|
event.stopPropagation();
|
|
10770
|
-
this.
|
|
11040
|
+
this.nvDialogPrimaryClicked.emit();
|
|
10771
11041
|
};
|
|
10772
11042
|
/**
|
|
10773
11043
|
* Handles the cancel action when the cancel button is clicked. This will close the dialog.
|
|
@@ -10792,7 +11062,7 @@ class NvDialogfooter {
|
|
|
10792
11062
|
/****************************************************************************/
|
|
10793
11063
|
//#region RENDER
|
|
10794
11064
|
render() {
|
|
10795
|
-
return (hAsync(Host, { key: '
|
|
11065
|
+
return (hAsync(Host, { key: 'f4e91e3a1f64bc761ea9847f361ce962a0e6e7ca' }, !this.hasSlot ? (hAsync(Fragment, null, !this.undismissable && (hAsync("nv-button", { onClick: this.handleCancel, emphasis: "low", size: "sm" }, this.cancelLabel)), hAsync("nv-button", { onClick: this.handlePrimary, disabled: this.disabled, danger: this.danger, size: "sm", emphasis: "high", form: this.form, type: this.primaryButtonType }, this.leadingIcon && (hAsync("nv-icon", { slot: "leading-icon", name: this.leadingIcon, size: "sm" })), this.primaryLabel, this.trailingIcon && (hAsync("nv-icon", { slot: "trailing-icon", name: this.trailingIcon, size: "sm" }))))) : (hAsync("slot", null))));
|
|
10796
11066
|
}
|
|
10797
11067
|
static get formAssociated() { return true; }
|
|
10798
11068
|
get el() { return getElement(this); }
|
|
@@ -10807,11 +11077,13 @@ class NvDialogfooter {
|
|
|
10807
11077
|
"trailingIcon": [513, "trailing-icon"],
|
|
10808
11078
|
"danger": [516],
|
|
10809
11079
|
"cancelLabel": [513, "cancel-label"],
|
|
10810
|
-
"
|
|
11080
|
+
"primaryLabel": [513, "primary-label"],
|
|
11081
|
+
"primaryButtonType": [513, "primary-button-type"],
|
|
11082
|
+
"form": [513]
|
|
10811
11083
|
},
|
|
10812
11084
|
"$listeners$": undefined,
|
|
10813
11085
|
"$lazyBundleId$": "-",
|
|
10814
|
-
"$attrsToReflect$": [["disabled", "disabled"], ["undismissable", "undismissable"], ["leadingIcon", "leading-icon"], ["trailingIcon", "trailing-icon"], ["danger", "danger"], ["cancelLabel", "cancel-label"], ["
|
|
11086
|
+
"$attrsToReflect$": [["disabled", "disabled"], ["undismissable", "undismissable"], ["leadingIcon", "leading-icon"], ["trailingIcon", "trailing-icon"], ["danger", "danger"], ["cancelLabel", "cancel-label"], ["primaryLabel", "primary-label"], ["primaryButtonType", "primary-button-type"], ["form", "form"]]
|
|
10815
11087
|
}; }
|
|
10816
11088
|
}
|
|
10817
11089
|
|
|
@@ -10846,7 +11118,7 @@ class NvDialogheader {
|
|
|
10846
11118
|
/****************************************************************************/
|
|
10847
11119
|
//#region RENDER
|
|
10848
11120
|
render() {
|
|
10849
|
-
return (hAsync(Host, { key: '
|
|
11121
|
+
return (hAsync(Host, { key: '1658cc6062f9a62c11a7011e36bd5f892653f691' }, !this.hasSlot ? (hAsync(Fragment, null, hAsync("div", { class: "heading" }, this.heading), hAsync("div", { class: "subheading" }, this.subheading))) : (hAsync("slot", null))));
|
|
10850
11122
|
}
|
|
10851
11123
|
get el() { return getElement(this); }
|
|
10852
11124
|
static get style() { return NvDialogheaderStyle0; }
|
|
@@ -11045,13 +11317,13 @@ class NvFieldcheckbox {
|
|
|
11045
11317
|
/****************************************************************************/
|
|
11046
11318
|
//#region RENDER
|
|
11047
11319
|
render() {
|
|
11048
|
-
return (hAsync(Host, { key: '
|
|
11320
|
+
return (hAsync(Host, { key: '9c195c41a5b753688622a7b792f03b34f0888995', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, hAsync("div", { key: '7dc85b17b9da5e9d542147e1cf143c5eae8a7745', class: "input-container" }, hAsync("input", { key: '78a90ebc8e94459a4e0070234b89c49ecac09c21', type: "checkbox", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly && !this.required, required: this.required, indeterminate: this.indeterminate, ref: el => {
|
|
11049
11321
|
if (el) {
|
|
11050
11322
|
el.indeterminate = this.indeterminate;
|
|
11051
11323
|
}
|
|
11052
|
-
} }), hAsync("span", { key: '
|
|
11053
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
11054
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
11324
|
+
} }), hAsync("span", { key: '44884aad946a96805663301ea35a27a78af7f6d7', class: "icon" }, this.checked && !this.indeterminate && (hAsync("slot", { key: 'f749fa2634f7600ba82278ffe01fa84e1fd9afaa', name: "checked-icon" }, hAsync("svg", { key: '06ebbefd80f35226f47e4f6d541728285dd7fdf3', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, hAsync("path", { key: 'b34ce01589b6153d1543fb4f626041610bfd031e', d: "M11.6667 3.5L5.25004 9.91667L2.33337 7", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.indeterminate && (hAsync("slot", { key: '5fd07ff3548a65cc644be232b9468dfcf9673dbb', name: "indeterminate-icon" }, hAsync("svg", { key: '7981beb86c15d28f3af7eea1792aca9cd86e053c', class: "indeterminate-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, hAsync("path", { key: '2de55ab02581af8da280c08b22a0e2e9b93626a2', d: "M2.9165 7H11.0832", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), hAsync("div", { key: '094133ff43fda7fbc81f0597a1e79842baaa9f3f', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '1b2c4d09b5c1531d28cc45c8beea0c910f0c8ce8', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: '5b47d609a387173f9e2f1a526908cc87032e494f', name: "label" }, this.label))), (this.description ||
|
|
11325
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '042d606ba3c4f22b469ec583423bb3fc1abf6a2e', class: "description" }, hAsync("slot", { key: 'c3de1a16b43fe2045f82068e921a2b6cc80afe3d', name: "description" }, this.description))), (this.errorDescription ||
|
|
11326
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '3cad2737d53acd275c636f8090acd993373de3dc', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'd5cb155097265a71f2ed70563a2e2e5b23c09020', name: "error-description" }, this.errorDescription))))));
|
|
11055
11327
|
}
|
|
11056
11328
|
static get formAssociated() { return true; }
|
|
11057
11329
|
get el() { return getElement(this); }
|
|
@@ -11478,9 +11750,9 @@ class NvFielddropdown {
|
|
|
11478
11750
|
/****************************************************************************/
|
|
11479
11751
|
//#region RENDER
|
|
11480
11752
|
render() {
|
|
11481
|
-
return (hAsync(Host, { key: '
|
|
11482
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
11483
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
11753
|
+
return (hAsync(Host, { key: 'b3cc49b47c0dcd67e058bef5c02bc3851905fdc1' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'e592ddf6330e6d560571cbb78a570cd27fd0a7f2', htmlFor: this.inputId }, hAsync("slot", { key: 'e394206eb57ab9d078402cc0ce5d2ed921a48ce0', name: "label" }, this.label))), hAsync("nv-popover", { key: '775efbae14c94b5e1abfcc31f309fe8cc6eec04e', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: 'cb9bbe88393f9274167b9dd9bbcc44902d196813', class: "input-wrapper", slot: "trigger" }, hAsync("slot", { key: '0e516182825b578180753e1c9d8529dabef5109c', name: "before-input" }), hAsync("div", { key: 'aa330c457419c25a40cfb93bed35a5414a5d6f49', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: 'ec5beea4918f84b72f3cac6630ade387a1856f13', name: "leading-input" }), this.isFilterable || this.disabled || this.readonly ? (hAsync("input", { id: this.inputId, type: "search", ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.getSelectedLabel(), required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onFocus: this.handleInputFocus, onKeyDown: this.handleKeyDown })) : (hAsync("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClick, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocus }, hAsync("span", null, this.getSelectedLabel() || this.value || this.placeholder))), hAsync("nv-iconbutton", { key: '84a2c30896184425581bc42878099203e9203f4f', class: "toggle-dropdown-icon", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', "aria-pressed": this.open.toString(), onClick: this.togglePopover, tabIndex: this.disabled ? -1 : 0 })), hAsync("slot", { key: '40dcd054448b5c344e1dd7991ab6364189d69060', name: "after-input" })), hAsync("div", { key: 'ed603f53b7edc59fc0c4b6575e6adeed6f904359', slot: "content" }, this.parsedOptions.length > 0 ? (hAsync("ul", null, this.parsedOptions.map(option => (hAsync("nv-fielddropdownitem", { label: option.label, value: option.value, disabled: option.disabled, selected: option.value === this.value }))))) : (hAsync("slot", { name: "content" })))), (this.description ||
|
|
11754
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '5c544bc17cfd3ddcb5f1d30f87f09cd3c9b3f253', class: "description" }, hAsync("slot", { key: 'b9cb63d0d32b0bff891b3fb2762934166dfe7e83', name: "description" }, this.description))), (this.errorDescription ||
|
|
11755
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '2fc5ba8b2441c75def091b2622d415110d10e1d9', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '511d6db8b4c200d8fe75e6916791d91b09013c40', name: "error-description" }, this.errorDescription)))));
|
|
11484
11756
|
}
|
|
11485
11757
|
static get formAssociated() { return true; }
|
|
11486
11758
|
get el() { return getElement(this); }
|
|
@@ -11584,7 +11856,7 @@ class NvFielddropdownitem {
|
|
|
11584
11856
|
/****************************************************************************/
|
|
11585
11857
|
//#region RENDER
|
|
11586
11858
|
render() {
|
|
11587
|
-
return (hAsync(Host, { key: '
|
|
11859
|
+
return (hAsync(Host, { key: 'aaa3f2ebc89268000413b1431fd69bf48a5270e0', role: "menuitem", tabindex: '-1', onClick: this.handleSelected }, hAsync("slot", { key: '5ec8b34d1642c4978290db8e741d7b61db1166ef' }), !this.composed && (hAsync("div", { key: '054bab6f0e0c1fe80666c115058d4adbbdfdef05', class: "text-wrapper" }, hAsync("span", { key: 'eaba500c4e8cdc122a368e2329134c6499fa3827', "data-scope": "text" }, this.label))), this.selected && (hAsync("nv-icon", { key: 'bdffe532360c437512485c93893c4fc0ecccb726', name: "check", "aria-hidden": "true", "data-scope": "selected" }))));
|
|
11588
11860
|
}
|
|
11589
11861
|
get el() { return getElement(this); }
|
|
11590
11862
|
static get style() { return NvFielddropdownitemStyle0; }
|
|
@@ -11638,7 +11910,7 @@ class NvFielddropdownitemcheck {
|
|
|
11638
11910
|
};
|
|
11639
11911
|
}
|
|
11640
11912
|
render() {
|
|
11641
|
-
return (hAsync(Host, { key: '
|
|
11913
|
+
return (hAsync(Host, { key: 'c76823d19d02d60e94d55c3d48b01319b68c2c9f' }, hAsync("div", { key: '09a3207064891e00c88e0443f6b709195da622ba' }, hAsync("nv-fieldcheckbox", { key: '74e188edba8f1fb69fed0a08b156a6ead4f37203', checked: this.checked, name: this.label || this.value, label: this.label || this.value, "label-placement": "after", description: this.description, disabled: this.disabled, tabindex: "-1", role: "option", onCheckedChanged: this.onFieldcheckboxChanged }))));
|
|
11642
11914
|
}
|
|
11643
11915
|
get el() { return getElement(this); }
|
|
11644
11916
|
static get style() { return NvFielddropdownitemcheckStyle0; }
|
|
@@ -12880,9 +13152,9 @@ class NvFieldnumber {
|
|
|
12880
13152
|
/****************************************************************************/
|
|
12881
13153
|
//#region RENDER
|
|
12882
13154
|
render() {
|
|
12883
|
-
return (hAsync(Host, { key: '
|
|
12884
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
12885
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13155
|
+
return (hAsync(Host, { key: 'fdc30e5567fc9f51c4fb8d09df429492ea0b884b' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'bc0e6520518b959e86c898f71fae71393b60db8c', htmlFor: this.inputId }, hAsync("slot", { key: 'b752e6e35a2b740743c2beb86d7772e55ba907f6', name: "label" }, this.label))), hAsync("div", { key: '678f82dd91a8a78ed807853472b340c0de91ede9', class: "input-wrapper" }, hAsync("slot", { key: 'd3b8c0135d8a8824057ae5079cb103d1f126eef2', name: "before-input" }), hAsync("div", { key: '03b1d5827013ab5d69e005cea6bbf37a334d3555', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: 'bab7cedd33af0e9d7cafaa6a7cd449ef37908f1a', name: "leading-input" }), hAsync("input", { key: 'ec2eec28ed7c69fb1139e753c921866df17eebab', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: "number", autofocus: this.autofocus, required: this.required, max: this.max, min: this.min, step: this.step, value: this.value, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), this.error && (hAsync("nv-icon", { key: '9f82b0d94fc47d1433cf8acf69eea1873829ccb0', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '48823ced8adaacbc1de22cfc6b6812359639e986', name: "circle-check", class: "validation", size: "md" })), hAsync("div", { key: '45619dcfafe7fe6356a8d452042eb3846a4361ec', class: "stepper-spacer" }), hAsync("div", { key: '0ec97af02cea09878bbcd0ffb1ddb18355a6d274', class: "stepper" }, hAsync("nv-icon", { key: 'ec5cb47b730a7554dc6aab838e917645471fe5b1', name: "minus", size: "md", onClick: this.handleMinus, class: clsx({ disabled: this.isMinValueReached() }) }), hAsync("nv-icon", { key: 'cefbb6b9b8b7c18f1b9bd3fd3c43a7e4b1925939', name: "plus", size: "md", onClick: this.handlePlus, class: clsx({ disabled: this.isMaxValueReached() }) }))), hAsync("slot", { key: 'ea783ef8cd3f6ae9b5fc025f5eb9e91b7d64c0a3', name: "after-input" })), (this.description ||
|
|
13156
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '56488d6b2c0fd5a171345e8e401a15a218eb2d20', class: "description" }, hAsync("slot", { key: 'bb3ee834416cd2fd3cc8f774854a2e1a279bd1c2', name: "description" }, this.description))), (this.errorDescription ||
|
|
13157
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '77827e731e549789eca0f2d23fe9c08086ad3fac', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '27f5125d4a8032a996a70d0901ef82dd888f2631', name: "error-description" }, this.errorDescription)))));
|
|
12886
13158
|
}
|
|
12887
13159
|
static get formAssociated() { return true; }
|
|
12888
13160
|
get el() { return getElement(this); }
|
|
@@ -13031,9 +13303,9 @@ class NvFieldpassword {
|
|
|
13031
13303
|
/****************************************************************************/
|
|
13032
13304
|
//#region RENDER
|
|
13033
13305
|
render() {
|
|
13034
|
-
return (hAsync(Host, { key: '
|
|
13035
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
13036
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13306
|
+
return (hAsync(Host, { key: 'd0078215ddf9b9dfffab5c7a6cd051fc0e71a1fc' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '3a70f55304ad478926e602bbbd1e63919cd4619d', htmlFor: this.inputId }, hAsync("slot", { key: 'fd5ce5778de8c3f570875db32e9b78cbc56d89fd', name: "label" }, this.label))), hAsync("div", { key: '758cd523d7725d66d05c1dbf75a3e1201e562678', class: "input-wrapper" }, hAsync("slot", { key: 'f7f24e4bd354bf8e846ab572ed11a9c7434ae4ac', name: "before-input" }), hAsync("div", { key: '836c7a610b2f933802cdd88e7409237e15052ab5', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '809458dc1e4df28b5e0469f125863a982a44f818', name: "leading-input" }), hAsync("input", { key: '974ac5f6e5376ccd4270c697aeb39ddea31795a6', id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, type: this.showPasswordState ? 'text' : 'password', inputMode: this.mode, value: this.value, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), !this.hidePasswordIcon && (hAsync("nv-iconbutton", { key: 'de837dff67b4efd185b47cfd9c6ca6747fc3f53b', class: "toggle-password-icon", name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, onKeyDown: this.handleKeyDown, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() })), (this.success || this.error) && (hAsync("nv-icon", { key: '9861347e871ba5902b2efa805327f3f047ba0483', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" }))), hAsync("slot", { key: '5d10cdaee0cce724c1d63c049f50cc72df792e45', name: "after-input" })), (this.description ||
|
|
13307
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '940bb21f81d7da297aeee0c8b3ca682e12431cea', class: "description" }, hAsync("slot", { key: 'ee8714f0b933911e6ec2681d70c3ae12457cc800', name: "description" }, this.description))), (this.errorDescription ||
|
|
13308
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'b1ebf7989bdc005d3ea420a3015581d67ef60cf5', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '1bfff83b33561185319d9426fd5e453603773240', name: "error-description" }, this.errorDescription)))));
|
|
13037
13309
|
}
|
|
13038
13310
|
static get formAssociated() { return true; }
|
|
13039
13311
|
get el() { return getElement(this); }
|
|
@@ -13160,9 +13432,9 @@ class NvFieldradio {
|
|
|
13160
13432
|
/****************************************************************************/
|
|
13161
13433
|
//#region RENDER
|
|
13162
13434
|
render() {
|
|
13163
|
-
return (hAsync(Host, { key: '
|
|
13164
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
13165
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13435
|
+
return (hAsync(Host, { key: 'bd51642504244a306b09a16d8e36bee557794573', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, hAsync("input", { key: '70968546af8a6b90109e9a5e2d3e8c86fb24a80f', type: "radio", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), hAsync("div", { key: '93f69c04ccb7d481dd8ad81dcc61599d7108f693', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '529222eccbcce06ac0b8652da8f5c5ad184b9ac0', htmlFor: this.inputId }, hAsync("slot", { key: '7d3ed6fc143809117d5487dad45dab06de2ec46d', name: "label" }, this.label))), (this.description ||
|
|
13436
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '1cbb1103296356ee3bc90b559be905514cc3ae9b', class: "description" }, hAsync("slot", { key: 'caac6f4b9d306051def069b2634f3ae06c3c0f58', name: "description" }, this.description))), (this.errorDescription ||
|
|
13437
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '359a740badd9d9d46c3316536d214634c184c26b', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'd592baab1a424e5d89c42cf8013126bcb32637df', name: "error-description" }, this.errorDescription))))));
|
|
13166
13438
|
}
|
|
13167
13439
|
static get formAssociated() { return true; }
|
|
13168
13440
|
get el() { return getElement(this); }
|
|
@@ -13542,13 +13814,13 @@ class NvFieldselect {
|
|
|
13542
13814
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
13543
13815
|
*/
|
|
13544
13816
|
render() {
|
|
13545
|
-
return (hAsync(Host, { key: '
|
|
13817
|
+
return (hAsync(Host, { key: '720d67f91c84402a441997043ed5bf32fd6d63f3' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '0a003255587db9f64b38a7bda222c1bf365d2333', htmlFor: this.inputId }, hAsync("slot", { key: '54854cf9044a7402ac4d41aa4c7ee1cf8b72ff0e', name: "label" }, this.label))), hAsync("div", { key: '2dbbdd124094b13252d4b2bf436324862e4226ce', class: "select-wrapper" }, hAsync("slot", { key: '02a2a74358fc983001c8034a7dd73511128356dd', name: "before-input" }), hAsync("div", { key: '6a365a78a60c54f131f5920b16ea22841c1099c1', class: "select-container", onClick: this.handleSelectContainerClick }, hAsync("slot", { key: '6249703d8332385f95d987020af452ee234de741', name: "leading-input" }), this.internalReadonly && (hAsync("input", { key: '781987ceb4fb01989f2e8a6e5feb71f90e6e1c54', id: this.inputId + '-readonly', type: "text", value: this.computedDisplayValue, readonly: true, class: "readonly-input", "aria-readonly": "true", "aria-label": this.label, "aria-describedby": this.error
|
|
13546
13818
|
? `${this.inputId}-error`
|
|
13547
|
-
: `${this.inputId}-description` })), hAsync("select", { key: '
|
|
13819
|
+
: `${this.inputId}-description` })), hAsync("select", { key: '54746aa4805320adce526f4bfe6185d3c4881749', id: this.inputId, ref: el => (this.selectElement = el), name: this.name, autofocus: this.autofocus, disabled: this.disabled, required: this.required, multiple: this.multiple, onChange: this.handleSelectChange, class: this.internalReadonly ? 'hidden' : '', "aria-label": this.label, "aria-describedby": this.error
|
|
13548
13820
|
? `${this.inputId}-error`
|
|
13549
|
-
: `${this.inputId}-description` }, this.parsedOptions.length > 0 ? (this.parsedOptions.map(option => (hAsync("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (hAsync("slot", null))), this.internalReadonly && (hAsync("nv-icon", { key: '
|
|
13550
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
13551
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13821
|
+
: `${this.inputId}-description` }, this.parsedOptions.length > 0 ? (this.parsedOptions.map(option => (hAsync("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (hAsync("slot", null))), this.internalReadonly && (hAsync("nv-icon", { key: '2b072550878727e58c8f797675c2fd3db51c4d5b', name: "chevron-down", class: "readonly-icon", size: "sm" })), this.error && (hAsync("nv-icon", { key: '7bfa9720857ac255ccf977cff3b8a5eeade14437', name: "alert-circle", class: "validation", size: "sm" })), this.success && (hAsync("nv-icon", { key: '5c855fcf653c01ccf4287dc3351f9ef1f10a12ef', name: "circle-check", class: "validation", size: "sm" }))), hAsync("slot", { key: '0e9d7f8704b91237a2c68cbeb5f82c95fefe02f3', name: "after-input" })), (this.description ||
|
|
13822
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '0bbd952607f60fba28aa82962a54b267351dc4ab', class: "description", id: `${this.inputId}-description` }, hAsync("slot", { key: '5471668e19066bf52c22f1880ff98007eb37fe20', name: "description" }, this.description))), (this.errorDescription ||
|
|
13823
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '780884c7f628bff8cc325d2f88daefbb534d5e4e', class: "error-description", id: `${this.inputId}-error` }, hAsync("slot", { key: 'd1471cc841b587dd691d9d8778ed5daf76dacc00', name: "error-description" }, this.errorDescription)))));
|
|
13552
13824
|
}
|
|
13553
13825
|
static get formAssociated() { return true; }
|
|
13554
13826
|
get el() { return getElement(this); }
|
|
@@ -13701,9 +13973,9 @@ class NvFieldtext {
|
|
|
13701
13973
|
/****************************************************************************/
|
|
13702
13974
|
//#region RENDER
|
|
13703
13975
|
render() {
|
|
13704
|
-
return (hAsync(Host, { key: '
|
|
13705
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
13706
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13976
|
+
return (hAsync(Host, { key: '16b0fcc5d2efec6d2a2cdb107a4c76a18baf236d' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '64cddc3489af9f3dd813e19a10cadc06f43cc325', htmlFor: this.inputId }, hAsync("slot", { key: '377157181d69756758cd51f784bbd8f84bbba765', name: "label" }, this.label))), hAsync("div", { key: '3b0ad33b4a4bd9fb500cef5161f82965a0e884ce', class: "input-wrapper" }, hAsync("slot", { key: '0672d34e2abb71a0a23188e35d46a98bf5c0d405', name: "before-input" }), hAsync("div", { key: '3277740f9d9dde997ea8f1431838864f96f1ddaf', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '73a006eecdcf88a7d45adece285fa47c33eb8e47', name: "leading-input" }), hAsync("input", { key: 'b35f4fcd9da526319eb343f8895639dce1040a4e', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: this.type, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, autofocus: this.autofocus, autocomplete: this.autocomplete, multiple: this.multiple, value: this.value, onInput: this.handleInput }), this.error && (hAsync("nv-icon", { key: '7206159be5c10148a5795e3c91e22adb334da705', name: "alert-circle", class: "validation", size: "sm" })), this.success && (hAsync("nv-icon", { key: 'f975d1defecb4ed5f492d852edb2e43c1eb0f885', name: "circle-check", class: "validation", size: "sm" }))), hAsync("slot", { key: '7f66ace5166da21da2b7b6577255d6ab740db7c7', name: "after-input" })), (this.description ||
|
|
13977
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '73d919c7d25ae8f2cedc5c6af9a6b63a1c90bdb3', class: "description" }, hAsync("slot", { key: 'a1956415fd5a6cd4f4b04cabbcfa9d6572d575dc', name: "description" }, this.description))), (this.errorDescription ||
|
|
13978
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'e290b1424a34652b74540fdc37623c5ac02854a4', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '24dfc8ab5ec1bf87053459cf44087434ebd8ccfc', name: "error-description" }, this.errorDescription)))));
|
|
13707
13979
|
}
|
|
13708
13980
|
static get formAssociated() { return true; }
|
|
13709
13981
|
get el() { return getElement(this); }
|
|
@@ -13918,9 +14190,9 @@ class NvFieldtextarea {
|
|
|
13918
14190
|
/****************************************************************************/
|
|
13919
14191
|
//#region RENDER
|
|
13920
14192
|
render() {
|
|
13921
|
-
return (hAsync(Host, { key: '
|
|
13922
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
13923
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
14193
|
+
return (hAsync(Host, { key: '6a5e087e6b7d187d50dca6abef33e8a4b479ebfa' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'acf32fe67ff1cdd151c927db09e9089a20dd6650', htmlFor: this.inputId }, hAsync("slot", { key: '7d53d924c77f95ae9684ae0b3d66215efcf16bde', name: "label" }, this.label))), hAsync("div", { key: 'bada1f842324833101d2c73c0b5a798ab10d788d', class: "textarea-wrapper" }, hAsync("div", { key: '6748ef7e5c95d73d7dbadf302b5a4dfa7030e8d6', class: "textarea-container", onClick: this.handleTextareaContainerClick }, hAsync("textarea", { key: '25927fe8fffb401181d421d14f2fb99e1d16fb1e', id: this.inputId, ref: e => (this.textareaElement = e), placeholder: this.placeholder, autofocus: this.autofocus, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, autocomplete: "off", value: this.value, onInput: this.handleTextarea, rows: this.rows, class: clsx(this.resize === 'none' && 'resize-none', this.resize === 'vertical' && 'resize-y', this.resize === 'horizontal' && 'resize-x', this.resize === 'both' && 'resize') }))), (this.description ||
|
|
14194
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'b2303204093639b126cd368aab3f3d8dc168666c', class: "description" }, hAsync("slot", { key: '5ecadb6919f664bc4ffa728a26c8797da6adef73', name: "description" }, this.description))), (this.errorDescription ||
|
|
14195
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'f0fcd7735336d1505336d2b27f4ed2d72a987dee', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '89a988c843b7890d6dfa69d7446d07c32b05fc6c', name: "error-description" }, this.errorDescription)))));
|
|
13924
14196
|
}
|
|
13925
14197
|
static get formAssociated() { return true; }
|
|
13926
14198
|
get el() { return getElement(this); }
|
|
@@ -14944,26 +15216,26 @@ class NvFieldtime {
|
|
|
14944
15216
|
}, key: `${option}-${index}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
14945
15217
|
}
|
|
14946
15218
|
render() {
|
|
14947
|
-
return (hAsync(Host, { key: '
|
|
14948
|
-
hAsync("input", { key: '
|
|
15219
|
+
return (hAsync(Host, { key: 'a8d3a40b7e058a2aeaf13513916d0b9a684177cf', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '6ba888fccf0e509c1444c76840db10ffd0bb307b', htmlFor: this.inputId }, hAsync("slot", { key: 'c765fb16582efa03de5adb973974dfa3acbb901d', name: "label" }, this.label))), hAsync("nv-popover", { key: '42d706c3cf0644e72ad59235bf934764ad72f98f', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: '35cbf342b723503d831ebcbe7505e8e602faf6e6', class: "input-wrapper", slot: "trigger" }, hAsync("slot", { key: '3aecda4f45d1d28a3d910cbc6c80a750c535f472', name: "before-input" }), hAsync("div", { key: '9e7b0f48c05f0fd3d679827e94a7671e436063fb', class: "input-container" }, hAsync("slot", { key: '9e089d23d2396c88fa255c1432f19986d899d3df', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
|
|
15220
|
+
hAsync("input", { key: '494e1b249f6d430d71892d4a86235d7556d95a23', ref: el => (this.inputElements[TimeType.Hours] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.hours, onInput: e => this.handleInputChange(e, TimeType.Hours), placeholder: this.format.includes('hh') ? 'hh' : 'HH', inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Hours), name: this.name
|
|
14949
15221
|
? `${TimeType.Hours}-${this.name}`
|
|
14950
15222
|
: TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
14951
15223
|
], this.format.includes('mm') && [
|
|
14952
|
-
hAsync("span", { key: '
|
|
14953
|
-
hAsync("input", { key: '
|
|
15224
|
+
hAsync("span", { key: 'f5c39484de41e16b9f990b1e265a33ccacefef40' }, ":"),
|
|
15225
|
+
hAsync("input", { key: '25090d6092afb1b9847ae2a5ffce78d1092e222b', ref: el => (this.inputElements[TimeType.Minutes] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.minutes, onInput: e => this.handleInputChange(e, TimeType.Minutes), placeholder: "mm", inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Minutes), name: this.name
|
|
14954
15226
|
? `${TimeType.Minutes}-${this.name}`
|
|
14955
15227
|
: TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
14956
15228
|
], this.format.includes('ss') && [
|
|
14957
|
-
hAsync("span", { key: '
|
|
14958
|
-
hAsync("input", { key: '
|
|
15229
|
+
hAsync("span", { key: 'a99d42e6e6a158202db6951e8af53d293db33539' }, ":"),
|
|
15230
|
+
hAsync("input", { key: '5784cce08f572e51fa3ed54f852a7aae61a3631e', ref: el => (this.inputElements[TimeType.Seconds] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.seconds, onInput: e => this.handleInputChange(e, TimeType.Seconds), placeholder: "ss", inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Seconds), name: this.name
|
|
14959
15231
|
? `${TimeType.Seconds}-${this.name}`
|
|
14960
15232
|
: TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
14961
|
-
], hAsync("nv-iconbutton", { key: '
|
|
15233
|
+
], hAsync("nv-iconbutton", { key: '0a15832ee80a4f951305e444fc4e569282f66a79', class: "toggle-time-icon", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', "aria-pressed": this.open.toString(), onClick: () => this.HandleDropdownIconClick() }), this.error && (hAsync("nv-icon", { key: 'e6b05cdb8f10db07fa2c7b1a8e86d4c10cf0d799', name: "alert-circle", class: "validation", size: "sm" })), this.success && (hAsync("nv-icon", { key: '59e9f8981b015a4f576a696fd1aaded07fb12753', name: "circle-check", class: "validation", size: "sm" }))), hAsync("slot", { key: '49fc827b3490cfd627562a12b4a03a5c8b09b756', name: "after-input" })), hAsync("div", { key: 'be3889f6e579b98e81f0ef9cef12370162787a68', class: "time-dropdown", slot: "content" }, hAsync("div", { key: '1a07134c83a2137a911a15ebe7c40ff9f727897a', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
|
|
14962
15234
|
this.RenderTimeOptionsColumn(TimeType.Hours), this.format.includes('mm') &&
|
|
14963
15235
|
this.RenderTimeOptionsColumn(TimeType.Minutes), this.format.includes('ss') &&
|
|
14964
15236
|
this.RenderTimeOptionsColumn(TimeType.Seconds)))), (this.description ||
|
|
14965
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
14966
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
15237
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'f2cf7dbff2676d1310f77cab254bdd3c429b4ebe', class: "description" }, hAsync("slot", { key: '4a17bc105869db3a2745685529714bcb144c539c', name: "description" }, this.description))), (this.errorDescription ||
|
|
15238
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'a1468a32174d8b2fc422d0a46ff7b6bf2c2b5785', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'dbbfb01c2b266deaadff1c323e809026ec9bf2ac', name: "error-description" }, this.errorDescription)))));
|
|
14967
15239
|
}
|
|
14968
15240
|
static get formAssociated() { return true; }
|
|
14969
15241
|
get el() { return getElement(this); }
|
|
@@ -15028,7 +15300,7 @@ class NvIcon {
|
|
|
15028
15300
|
/**
|
|
15029
15301
|
* Adjust the size of the icon to fit your design needs.
|
|
15030
15302
|
*/
|
|
15031
|
-
this.size =
|
|
15303
|
+
this.size = 'md';
|
|
15032
15304
|
}
|
|
15033
15305
|
/**
|
|
15034
15306
|
* Ensures the icon sprite is loaded into the document.
|
|
@@ -15068,7 +15340,7 @@ class NvIcon {
|
|
|
15068
15340
|
/****************************************************************************/
|
|
15069
15341
|
//#region RENDER
|
|
15070
15342
|
render() {
|
|
15071
|
-
return (hAsync(Host, { key: '
|
|
15343
|
+
return (hAsync(Host, { key: '53db08477e110c5a5c4b4073609f7608730a6756', class: clsx(this.color && `${this.color}`), role: "img", "aria-label": `${this.name}-icon` }, hAsync("svg", { key: '2eb9103b3626ff740aa1579578f284561c9bbdcd', stroke: "currentColor", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: `nv-icon-${this.size}` }, hAsync("use", { key: 'c3cc962d34a43b46efdb943733ee9fc51e5e4eab', href: `#${this.name}` }))));
|
|
15072
15344
|
}
|
|
15073
15345
|
static get style() { return NvIconStyle0; }
|
|
15074
15346
|
static get cmpMeta() { return {
|
|
@@ -15197,7 +15469,7 @@ class NvIconbutton {
|
|
|
15197
15469
|
/****************************************************************************/
|
|
15198
15470
|
//#region RENDER
|
|
15199
15471
|
render() {
|
|
15200
|
-
return (hAsync(Host, { key: '
|
|
15472
|
+
return (hAsync(Host, { key: '58e0f2e1cb0180250086f4cb68bcf8c01e192648', role: "button", type: this.type, tabindex: "0", disabled: this.disabled ? true : undefined, class: clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && hAsync("nv-loader", { key: 'b74e4504553621de583e3257387b820fd731e4ab', size: this.size }), !this.loading && hAsync("nv-icon", { key: '5cc7474666cfefe2691907cff1e2c062293dee7d', name: this.name, size: this.size }), hAsync("slot", { key: '6f084b32248d3f92ce74f630e8465218907468a0' })));
|
|
15201
15473
|
}
|
|
15202
15474
|
static get formAssociated() { return true; }
|
|
15203
15475
|
get el() { return getElement(this); }
|
|
@@ -15245,7 +15517,7 @@ class NvLoader {
|
|
|
15245
15517
|
//#region RENDER
|
|
15246
15518
|
/* <slot> empty to force rendering change */
|
|
15247
15519
|
render() {
|
|
15248
|
-
return (hAsync(Host, { key: '
|
|
15520
|
+
return (hAsync(Host, { key: '3061eccded64d25321cd49c2a03e1117779f61c0', class: clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
15249
15521
|
}
|
|
15250
15522
|
static get style() { return NvLoaderStyle0; }
|
|
15251
15523
|
static get cmpMeta() { return {
|
|
@@ -15295,7 +15567,7 @@ class NvMenu {
|
|
|
15295
15567
|
* below, to the sides). If there isn’t enough room, it will adjust its
|
|
15296
15568
|
* position on the axis to fit on the screen, so users can always see it.
|
|
15297
15569
|
*/
|
|
15298
|
-
this.placement =
|
|
15570
|
+
this.placement = 'bottom-end';
|
|
15299
15571
|
/**
|
|
15300
15572
|
* Parsed items stored in state.
|
|
15301
15573
|
*/
|
|
@@ -15477,7 +15749,7 @@ class NvMenu {
|
|
|
15477
15749
|
});
|
|
15478
15750
|
}
|
|
15479
15751
|
render() {
|
|
15480
|
-
return (hAsync(Host, { key: '
|
|
15752
|
+
return (hAsync(Host, { key: '63955f0dfd09984650fae2e67a1a52e97485c742' }, hAsync("slot", { key: 'edeaea189977961a8a77e20f6afe31ffebdebf9d', name: "trigger" }), hAsync("nv-popover", { key: '51ded6ba14423c18e9db8053c5c8048d68a3e835', ref: el => (this.popoverElement = el), triggerMode: "click", triggerElement: this.triggerElement, placement: this.placement, nested: this.nested, open: this.open }, this.parsedItems.length > 0 ? (hAsync("ul", { slot: "content" }, this.renderMenuItems(this.parsedItems))) : (hAsync("slot", { name: "content" })))));
|
|
15481
15753
|
}
|
|
15482
15754
|
get el() { return getElement(this); }
|
|
15483
15755
|
static get watchers() { return {
|
|
@@ -15552,7 +15824,7 @@ class NvMenuitem {
|
|
|
15552
15824
|
/****************************************************************************/
|
|
15553
15825
|
//#region RENDER
|
|
15554
15826
|
render() {
|
|
15555
|
-
return (hAsync(Host, { key: '
|
|
15827
|
+
return (hAsync(Host, { key: '48927594d07e47785b4f5fa3fe9c9de124639a04', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && hAsync("nv-icon", { key: '3aebb72e0253570ccac2b56df6105a2369d9eb25', name: this.icon }), hAsync("span", { key: '7fa806cb1466cd163176d9803cbb19ce82de95f6', "data-scope": "text" }, hAsync("slot", { key: '9ba63eea4a78a7f92c060235f0a2835d28ce2a51' })), this.shortcut && !this.hasSubmenu && hAsync("kbd", { key: '40d2e13a6599ed865b86af496730f7d940a6e7c6' }, this.shortcut), this.hasSubmenu && hAsync("nv-icon", { key: '11dec66dff350a59f5a3199dd6983ac578218468', name: "chevron-right" })));
|
|
15556
15828
|
}
|
|
15557
15829
|
get el() { return getElement(this); }
|
|
15558
15830
|
static get style() { return NvMenuitemStyle0; }
|
|
@@ -17921,7 +18193,7 @@ class NvPopover {
|
|
|
17921
18193
|
/****************************************************************************/
|
|
17922
18194
|
//#region RENDER
|
|
17923
18195
|
render() {
|
|
17924
|
-
return (hAsync(Host, { key: '
|
|
18196
|
+
return (hAsync(Host, { key: 'c3befa1e8d317dd2a934de3a3bc8bcf032f547f3' }, hAsync("slot", { key: 'ed004517edbd180e3e4d6f6adddc7f282a59fe64', name: "trigger" }), hAsync("div", { key: '3c55ca065c9c1f293572a297078da4296b4a5a3f', "data-scope": "popover", hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (hAsync("div", { key: 'e356e91d35f468ed1f98eb44e6974d3438f9d532', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), hAsync("slot", { key: '2a71c9727ae7e3cbf13595ffb4b9d56c6966bd46', name: "content" }))));
|
|
17925
18197
|
}
|
|
17926
18198
|
get el() { return getElement(this); }
|
|
17927
18199
|
static get watchers() { return {
|
|
@@ -17966,7 +18238,7 @@ class NvRow {
|
|
|
17966
18238
|
/****************************************************************************/
|
|
17967
18239
|
//#region RENDER
|
|
17968
18240
|
render() {
|
|
17969
|
-
return (hAsync(Host, { key: '
|
|
18241
|
+
return (hAsync(Host, { key: '9baad27eb331d2e0d68be8cb2e3dd2cacc7f913c' }, hAsync("slot", { key: 'f346a7568b71a1de72ddc7c36bbf0df21f8e9968' })));
|
|
17970
18242
|
}
|
|
17971
18243
|
static get style() { return NvRowStyle0; }
|
|
17972
18244
|
static get cmpMeta() { return {
|
|
@@ -18001,7 +18273,7 @@ class NvStack {
|
|
|
18001
18273
|
/****************************************************************************/
|
|
18002
18274
|
//#region RENDER
|
|
18003
18275
|
render() {
|
|
18004
|
-
return (hAsync(Host, { key: '
|
|
18276
|
+
return (hAsync(Host, { key: 'c8b211684fe80277d45e7c69304eb80fa0bc78d1', class: clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gutter-x-${this.gutter}`, this.gutter && this.vertical && `gutter-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, hAsync("slot", { key: 'adce599bad0bfcbbf4fde1c6e01cd605e5161ce8' })));
|
|
18005
18277
|
}
|
|
18006
18278
|
static get style() { return NvStackStyle0; }
|
|
18007
18279
|
static get cmpMeta() { return {
|
|
@@ -18020,46 +18292,42 @@ class NvStack {
|
|
|
18020
18292
|
}; }
|
|
18021
18293
|
}
|
|
18022
18294
|
|
|
18023
|
-
const nvTableCss = "nv-table table{border-collapse:collapse;border-color:inherit;text-indent:0}";
|
|
18295
|
+
const nvTableCss = "nv-table{display:block}nv-table .hidden{display:none}nv-table table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-table th{text-align:left;border-bottom:1px solid var(--components-datagrid-border-header);height:var(--spacing-12);padding:var(--spacing-3) var(--spacing-4);font-size:var(--font-size-md);font-weight:700;color:var(--components-datagrid-content-header)}nv-table td{border-bottom:1px solid var(--components-datagrid-border-body);height:var(--spacing-12);max-height:var(--spacing-14);padding:var(--spacing-2) var(--spacing-4);font-size:var(--font-size-md);font-weight:400;color:var(--components-datagrid-content-text);white-space:nowrap;text-overflow:ellipsis}nv-table tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}";
|
|
18024
18296
|
var NvTableStyle0 = nvTableCss;
|
|
18025
18297
|
|
|
18026
18298
|
/**
|
|
18027
|
-
* @slot default -
|
|
18028
|
-
* @slot head - Use this slot to insert HTML into the table header.
|
|
18299
|
+
* @slot default - Slot for the composed table columns
|
|
18029
18300
|
* @slot before - Use this slot to insert HTML before the table.
|
|
18030
18301
|
* @slot after - Use this slot to insert HTML after the table.
|
|
18031
|
-
* @slot body - Use this slot to insert HTML into the table body.
|
|
18032
|
-
*
|
|
18033
|
-
* @deprecated [EXPERIMENTAL]
|
|
18034
|
-
* @experimental - This component is still under development and is not ready for use.
|
|
18035
18302
|
*/
|
|
18036
18303
|
class NvTable {
|
|
18037
18304
|
constructor(hostRef) {
|
|
18038
18305
|
registerInstance(this, hostRef);
|
|
18306
|
+
this.action = createEvent(this, "action", 7);
|
|
18307
|
+
this.templateCache = new Map();
|
|
18308
|
+
this.headerTemplateCache = new Map();
|
|
18039
18309
|
/****************************************************************************/
|
|
18040
18310
|
//#region STATES
|
|
18041
|
-
this.parsedColumns = [];
|
|
18042
|
-
this.parsedData = [];
|
|
18043
|
-
this.
|
|
18044
|
-
this.hasSlotBody = false;
|
|
18311
|
+
this.parsedColumns = [];
|
|
18312
|
+
this.parsedData = [];
|
|
18313
|
+
this.table = null;
|
|
18045
18314
|
//#endregion STATES
|
|
18046
18315
|
/****************************************************************************/
|
|
18047
18316
|
//#region PROPERTIES
|
|
18048
18317
|
/**
|
|
18049
|
-
*
|
|
18050
|
-
* @example ['Name', 'Age', 'Email']
|
|
18051
|
-
* @default []
|
|
18318
|
+
* Data to be displayed in the table
|
|
18052
18319
|
*/
|
|
18053
|
-
this.
|
|
18320
|
+
this.data = [];
|
|
18054
18321
|
/**
|
|
18055
|
-
*
|
|
18056
|
-
* @example [{ name: 'Alice', age: 25, email: 'alice@mail.com' }, { name: 'Bob', age: 30, email: 'bob@mail.com' }]
|
|
18057
|
-
* @default []
|
|
18322
|
+
* Configuration of the columns of the table
|
|
18058
18323
|
*/
|
|
18059
|
-
this.
|
|
18324
|
+
this.columnsConfig = [];
|
|
18060
18325
|
/**
|
|
18061
|
-
*
|
|
18062
|
-
|
|
18326
|
+
* Fallback value to be displayed when data is not available
|
|
18327
|
+
*/
|
|
18328
|
+
this.fallbackValue = 'N/A';
|
|
18329
|
+
/**
|
|
18330
|
+
* Message to be displayed when no data is available
|
|
18063
18331
|
*/
|
|
18064
18332
|
this.noDataMessage = 'No data available';
|
|
18065
18333
|
/**
|
|
@@ -18070,17 +18338,239 @@ class NvTable {
|
|
|
18070
18338
|
}
|
|
18071
18339
|
//#endregion PROPERTIES
|
|
18072
18340
|
/****************************************************************************/
|
|
18341
|
+
//#region METHODS
|
|
18342
|
+
/**
|
|
18343
|
+
* Caches templates for cells and headers upfront to improve performance.
|
|
18344
|
+
*/
|
|
18345
|
+
cacheTemplates() {
|
|
18346
|
+
const columns = Array.from(this.el.querySelectorAll('nv-tablecolumn'));
|
|
18347
|
+
columns.forEach((col) => {
|
|
18348
|
+
const key = col.name;
|
|
18349
|
+
const cellSlot = col.querySelector('[slot="cell"]');
|
|
18350
|
+
if (cellSlot) {
|
|
18351
|
+
const element = deepCopyElement(cellSlot);
|
|
18352
|
+
this.templateCache.set(key, element);
|
|
18353
|
+
}
|
|
18354
|
+
const headerSlot = col.querySelector('[slot="header"]');
|
|
18355
|
+
if (headerSlot) {
|
|
18356
|
+
const element = deepCopyElement(headerSlot);
|
|
18357
|
+
this.headerTemplateCache.set(key, element);
|
|
18358
|
+
}
|
|
18359
|
+
else {
|
|
18360
|
+
const header = col.header;
|
|
18361
|
+
if (header) {
|
|
18362
|
+
const headerDiv = document.createElement('div');
|
|
18363
|
+
headerDiv.textContent = header;
|
|
18364
|
+
this.headerTemplateCache.set(key, headerDiv);
|
|
18365
|
+
}
|
|
18366
|
+
}
|
|
18367
|
+
});
|
|
18368
|
+
}
|
|
18369
|
+
parseDataAndColumns() {
|
|
18370
|
+
if (this.dataJson) {
|
|
18371
|
+
this.parseJsonData(this.dataJson);
|
|
18372
|
+
}
|
|
18373
|
+
else if (this.data && this.data.length > 0) {
|
|
18374
|
+
this.parseDataArray(this.data, this.parsedData);
|
|
18375
|
+
}
|
|
18376
|
+
if (this.columnsConfigJson) {
|
|
18377
|
+
this.parseJsonColumns(this.columnsConfigJson, this.parsedColumns);
|
|
18378
|
+
}
|
|
18379
|
+
else if (this.columnsConfig && this.columnsConfig.length > 0) {
|
|
18380
|
+
this.parseColumnsArray(this.columnsConfig, this.parsedColumns);
|
|
18381
|
+
}
|
|
18382
|
+
else if (this.headerTemplateCache.size > 0) {
|
|
18383
|
+
const headerKeys = Array.from(this.headerTemplateCache.keys());
|
|
18384
|
+
const arrayColumnsConfig = headerKeys.map(key => (Object.assign({}, { name: key, header: key ? key.charAt(0).toUpperCase() + key.slice(1) : '' })));
|
|
18385
|
+
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
18386
|
+
}
|
|
18387
|
+
else if (this.parsedData.length > 0) {
|
|
18388
|
+
const firstRow = this.parsedData[0];
|
|
18389
|
+
const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
|
|
18390
|
+
name: key,
|
|
18391
|
+
header: key.charAt(0).toUpperCase() + key.slice(1),
|
|
18392
|
+
}));
|
|
18393
|
+
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
18394
|
+
}
|
|
18395
|
+
}
|
|
18396
|
+
deepEqual(a, b) {
|
|
18397
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
18398
|
+
}
|
|
18399
|
+
/**
|
|
18400
|
+
* Parses the data array and sets the state accordingly
|
|
18401
|
+
* @param {any[]} newValue - New value of the data array
|
|
18402
|
+
* @param {any[]} oldValue - Old value of the data array
|
|
18403
|
+
* @returns {void}
|
|
18404
|
+
*/
|
|
18405
|
+
parseDataArray(newValue, oldValue) {
|
|
18406
|
+
// Ensure both are arrays for proper comparison
|
|
18407
|
+
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
18408
|
+
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
18409
|
+
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
18410
|
+
return; // Deep comparison
|
|
18411
|
+
}
|
|
18412
|
+
this.parsedData = Array.isArray(newValue) ? newValue : [];
|
|
18413
|
+
}
|
|
18414
|
+
/**
|
|
18415
|
+
* Parses the columns array and sets the state accordingly
|
|
18416
|
+
* @param {ColumnConfig[]} newValue - New value of the columns array
|
|
18417
|
+
* @param {ColumnConfig[]} oldValue - Old value of the columns array
|
|
18418
|
+
* @returns {void}
|
|
18419
|
+
*/
|
|
18420
|
+
parseColumnsArray(newValue, oldValue) {
|
|
18421
|
+
// Ensure both are arrays for proper comparison
|
|
18422
|
+
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
18423
|
+
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
18424
|
+
// Use a proper deep comparison function (e.g., Lodash's isEqual)
|
|
18425
|
+
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
18426
|
+
return;
|
|
18427
|
+
}
|
|
18428
|
+
// Assign only after confirming changes
|
|
18429
|
+
this.parsedColumns = safeNewValue;
|
|
18430
|
+
}
|
|
18431
|
+
initializeTable() {
|
|
18432
|
+
// Clear the previous table instance (if any)
|
|
18433
|
+
this.table = null;
|
|
18434
|
+
if (this.parsedColumns.length > 0) {
|
|
18435
|
+
this.table = {
|
|
18436
|
+
columns: this.parsedColumns,
|
|
18437
|
+
data: this.getTableData(),
|
|
18438
|
+
};
|
|
18439
|
+
}
|
|
18440
|
+
else {
|
|
18441
|
+
this.table = null;
|
|
18442
|
+
}
|
|
18443
|
+
}
|
|
18444
|
+
getTableData() {
|
|
18445
|
+
if (this.parsedData &&
|
|
18446
|
+
Array.isArray(this.parsedData) &&
|
|
18447
|
+
this.parsedData.length > 0) {
|
|
18448
|
+
return [...this.parsedData];
|
|
18449
|
+
}
|
|
18450
|
+
else {
|
|
18451
|
+
return [];
|
|
18452
|
+
}
|
|
18453
|
+
}
|
|
18454
|
+
// Helper function to get nested property value
|
|
18455
|
+
replaceKeyWithValue(obj, path) {
|
|
18456
|
+
var _a;
|
|
18457
|
+
return ((_a = path
|
|
18458
|
+
.split('.')
|
|
18459
|
+
.reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj)) !== null && _a !== void 0 ? _a : this.fallbackValue);
|
|
18460
|
+
}
|
|
18461
|
+
renderTemplate(template, row) {
|
|
18462
|
+
if (!template) {
|
|
18463
|
+
return null;
|
|
18464
|
+
}
|
|
18465
|
+
// Handle <template> elements correctly
|
|
18466
|
+
const templateContent = template instanceof HTMLTemplateElement ? template.content : template;
|
|
18467
|
+
const element = deepCopyElement(templateContent);
|
|
18468
|
+
// Replace placeholders in text content, attributes, and properties
|
|
18469
|
+
element.querySelectorAll('*').forEach(el => {
|
|
18470
|
+
// Replace placeholders in text content
|
|
18471
|
+
this.replacePlaceholdersTextContent(el, row);
|
|
18472
|
+
// Replace placeholders in attributes
|
|
18473
|
+
this.replacePlaceholdersAttributes(el, row);
|
|
18474
|
+
// Replace placeholders in properties
|
|
18475
|
+
this.replacePlaceholdersProperties(el, row);
|
|
18476
|
+
});
|
|
18477
|
+
// Handle `data-bind-event`
|
|
18478
|
+
element.querySelectorAll('[data-bind-event]').forEach(el => {
|
|
18479
|
+
const bindEvent = el.getAttribute('data-bind-event') || '';
|
|
18480
|
+
const splitted = bindEvent.split(':');
|
|
18481
|
+
if (!bindEvent.includes(':') || splitted.length < 2) {
|
|
18482
|
+
console.warn('Invalid data-bind-event format:', bindEvent);
|
|
18483
|
+
return;
|
|
18484
|
+
}
|
|
18485
|
+
const eventType = splitted[0];
|
|
18486
|
+
const keyAction = splitted[1];
|
|
18487
|
+
const details = splitted.length > 2 ? splitted[2] : null;
|
|
18488
|
+
el.addEventListener(eventType, () => {
|
|
18489
|
+
var _a;
|
|
18490
|
+
const keys = (_a = details === null || details === void 0 ? void 0 : details.split(',')) !== null && _a !== void 0 ? _a : [];
|
|
18491
|
+
// Convert keys into a single object instead of an array of objects
|
|
18492
|
+
const keyValue = keys.reduce((acc, key) => {
|
|
18493
|
+
acc[key] = row === null || row === void 0 ? void 0 : row[key];
|
|
18494
|
+
return acc;
|
|
18495
|
+
}, {});
|
|
18496
|
+
const action = { keyAction, details: keyValue };
|
|
18497
|
+
this.action.emit(action);
|
|
18498
|
+
});
|
|
18499
|
+
});
|
|
18500
|
+
// Ensure Web Components are properly connected
|
|
18501
|
+
setTimeout(() => {
|
|
18502
|
+
element.querySelectorAll('*').forEach(child => {
|
|
18503
|
+
if (typeof child.connectedCallback === 'function') {
|
|
18504
|
+
child.connectedCallback();
|
|
18505
|
+
}
|
|
18506
|
+
});
|
|
18507
|
+
}, 0);
|
|
18508
|
+
return (hAsync("div", { ref: el => {
|
|
18509
|
+
if (el) {
|
|
18510
|
+
el.innerHTML = ''; // Remove existing content
|
|
18511
|
+
el.appendChild(element); // Append new element
|
|
18512
|
+
}
|
|
18513
|
+
} }));
|
|
18514
|
+
}
|
|
18515
|
+
replacePlaceholdersTextContent(element, row) {
|
|
18516
|
+
// ✅ Replace placeholders in text content
|
|
18517
|
+
element.childNodes.forEach(node => {
|
|
18518
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
18519
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(row, key));
|
|
18520
|
+
}
|
|
18521
|
+
});
|
|
18522
|
+
}
|
|
18523
|
+
replacePlaceholdersAttributes(element, row) {
|
|
18524
|
+
// ✅ Replace placeholders in attributes
|
|
18525
|
+
Array.from(element.attributes).forEach(attr => {
|
|
18526
|
+
if (attr.value.includes('__')) {
|
|
18527
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(row, key));
|
|
18528
|
+
}
|
|
18529
|
+
});
|
|
18530
|
+
}
|
|
18531
|
+
replacePlaceholdersProperties(element, row) {
|
|
18532
|
+
// ✅ Dynamically extract relevant properties
|
|
18533
|
+
const properties = new Set();
|
|
18534
|
+
// Collect only own enumerable properties
|
|
18535
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
18536
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
18537
|
+
let proto = Object.getPrototypeOf(element);
|
|
18538
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
18539
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
18540
|
+
proto = Object.getPrototypeOf(proto);
|
|
18541
|
+
}
|
|
18542
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
18543
|
+
properties.forEach(prop => {
|
|
18544
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
18545
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
18546
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
18547
|
+
) {
|
|
18548
|
+
try {
|
|
18549
|
+
const value = element[prop];
|
|
18550
|
+
// ✅ Replace placeholders only if the value is a string
|
|
18551
|
+
if (typeof value === 'string' && value.includes('__')) {
|
|
18552
|
+
element[prop] = value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(row, key)); // ✅ TypeScript safe
|
|
18553
|
+
}
|
|
18554
|
+
}
|
|
18555
|
+
catch (error) {
|
|
18556
|
+
console.warn(`Could not assign property ${prop}:`, error.message);
|
|
18557
|
+
}
|
|
18558
|
+
}
|
|
18559
|
+
});
|
|
18560
|
+
}
|
|
18561
|
+
//#endregion METHODS
|
|
18562
|
+
/****************************************************************************/
|
|
18073
18563
|
//#region WATCHERS
|
|
18074
18564
|
parseColumns(newValue, oldValue) {
|
|
18075
18565
|
this.parseColumnsArray(newValue, oldValue);
|
|
18076
18566
|
}
|
|
18077
|
-
parseJsonColumns(newValue) {
|
|
18567
|
+
parseJsonColumns(newValue, oldValue) {
|
|
18078
18568
|
try {
|
|
18079
18569
|
const newItems = newValue ? JSON.parse(newValue) : [];
|
|
18080
|
-
this.parseColumnsArray(newItems,
|
|
18570
|
+
this.parseColumnsArray(newItems, oldValue);
|
|
18081
18571
|
}
|
|
18082
18572
|
catch (e) {
|
|
18083
|
-
console.error('Invalid JSON format for
|
|
18573
|
+
console.error('Invalid JSON format for columnsConfigJson:', e.message);
|
|
18084
18574
|
this.parsedColumns = [];
|
|
18085
18575
|
}
|
|
18086
18576
|
}
|
|
@@ -18097,277 +18587,86 @@ class NvTable {
|
|
|
18097
18587
|
this.parsedData = [];
|
|
18098
18588
|
}
|
|
18099
18589
|
}
|
|
18100
|
-
|
|
18101
|
-
|
|
18102
|
-
//#region METHODS
|
|
18103
|
-
/**
|
|
18104
|
-
* Parses the columns array.
|
|
18105
|
-
* @param {string[]} newValue - The new value of the columns array.
|
|
18106
|
-
* @param {string[]} oldValue - The old value of the columns array.
|
|
18107
|
-
*/
|
|
18108
|
-
parseColumnsArray(newValue, oldValue) {
|
|
18109
|
-
if (JSON.stringify(newValue) === JSON.stringify(oldValue))
|
|
18110
|
-
return; // Deep comparison
|
|
18111
|
-
this.parsedColumns = Array.isArray(newValue) ? newValue : [];
|
|
18112
|
-
}
|
|
18113
|
-
/**
|
|
18114
|
-
* Parses the data array.
|
|
18115
|
-
* @param {any[]} newValue - The new value of the data array.
|
|
18116
|
-
* @param {any[]} oldValue - The old value of the data array.
|
|
18117
|
-
*/
|
|
18118
|
-
parseDataArray(newValue, oldValue) {
|
|
18119
|
-
if (JSON.stringify(newValue) === JSON.stringify(oldValue))
|
|
18120
|
-
return; // Deep comparison
|
|
18121
|
-
this.parsedData = Array.isArray(newValue) ? newValue : [];
|
|
18590
|
+
handleParsedChange() {
|
|
18591
|
+
this.initializeTable();
|
|
18122
18592
|
}
|
|
18123
|
-
//#endregion
|
|
18593
|
+
//#endregion WATCHERS
|
|
18124
18594
|
/****************************************************************************/
|
|
18125
18595
|
//#region LIFECYCLE
|
|
18126
18596
|
componentWillLoad() {
|
|
18127
|
-
this.
|
|
18128
|
-
this.
|
|
18129
|
-
if (this.columnsJson) {
|
|
18130
|
-
this.parseJsonColumns(this.columnsJson);
|
|
18131
|
-
}
|
|
18132
|
-
else {
|
|
18133
|
-
this.parseColumns(this.columns, this.parsedColumns);
|
|
18134
|
-
}
|
|
18135
|
-
if (this.dataJson) {
|
|
18136
|
-
this.parseJsonData(this.dataJson);
|
|
18137
|
-
}
|
|
18138
|
-
else {
|
|
18139
|
-
this.parseData(this.data, this.parsedData);
|
|
18140
|
-
}
|
|
18597
|
+
this.cacheTemplates();
|
|
18598
|
+
this.parseDataAndColumns();
|
|
18141
18599
|
}
|
|
18142
|
-
//#endregion
|
|
18600
|
+
//#endregion EVENTS
|
|
18143
18601
|
/****************************************************************************/
|
|
18144
18602
|
//#region RENDER
|
|
18145
18603
|
render() {
|
|
18146
|
-
const
|
|
18147
|
-
?
|
|
18148
|
-
|
|
18149
|
-
|
|
18150
|
-
|
|
18151
|
-
|
|
18152
|
-
|
|
18153
|
-
|
|
18154
|
-
.
|
|
18155
|
-
:
|
|
18156
|
-
|
|
18157
|
-
this.
|
|
18158
|
-
|
|
18159
|
-
|
|
18160
|
-
const cells = Array.from(row.querySelectorAll('nv-tablecolumn'));
|
|
18161
|
-
return (hAsync("tr", null, cells.map(cell => (hAsync("th", { colSpan: cell.colspan, rowSpan: cell.rowspan, headers: cell.headers, scope: cell.scope, innerHTML: cell.innerHTML })))));
|
|
18162
|
-
}))) : null, hAsync("tbody", null, this.parsedData.length === 0 && bodyRows.length === 0 ? (hAsync("tr", null, hAsync("td", { colSpan: this.parsedColumns.length || 12 }, this.noDataMessage))) : this.parsedData.length > 0 ? (this.parsedData.map(row => (hAsync("tr", null, this.parsedColumns.length > 0
|
|
18163
|
-
? this.parsedColumns.map(column => (hAsync("td", null, row[column.toLowerCase()] || '')))
|
|
18164
|
-
: Object.values(row).map(value => hAsync("td", null, value)))))) : bodyRows.length > 0 ? (bodyRows.map(row => {
|
|
18165
|
-
const cells = Array.from(row.querySelectorAll('nv-tabledatacell'));
|
|
18166
|
-
return (hAsync("tr", null, cells.map(cell => (hAsync("td", { colSpan: cell.colspan, rowSpan: cell.rowspan, headers: cell.headers, innerHTML: cell.innerHTML })))));
|
|
18167
|
-
})) : null))), hAsync("slot", { key: 'd24abb3236e2d1019d2316da1d1cc2f19d33902b', name: "after" })));
|
|
18604
|
+
const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
|
|
18605
|
+
? []
|
|
18606
|
+
: this.table.columns;
|
|
18607
|
+
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
18608
|
+
? []
|
|
18609
|
+
: this.table.data;
|
|
18610
|
+
return (hAsync(Host, { key: 'b740dfd8e0db88881f7ca062eaab5b3373b236c2' }, hAsync("div", { key: '784d4b910c00ce5dc6b91768f457d0e649b70431', class: "hidden" }, hAsync("slot", { key: '0891b88350c4f4e50634870ae5bafab7f8bdb46a' })), hAsync("slot", { key: 'bc895b4327694ba7b660fce776e6ce1c1817c5dc', name: "before" }), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (hAsync("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (hAsync("table", { class: "table" }, this.parsedColumns.length > 0 && headerGroups.length > 0 && (hAsync("thead", { class: "table-header" }, hAsync("tr", null, headerGroups &&
|
|
18611
|
+
headerGroups.map(col => {
|
|
18612
|
+
return (hAsync("th", { key: col.name }, this.renderTemplate(this.headerTemplateCache.get(col.name), {}) || col.header));
|
|
18613
|
+
})))), hAsync("tbody", { class: "table-body" }, !rows || rows.length === 0 ? (hAsync("tr", null, hAsync("td", { colSpan: headerGroups.length || 12, class: "no-data" }, this.noDataMessage))) : (rows.map(row => (hAsync("tr", { key: JSON.stringify(row) }, headerGroups.map(col => {
|
|
18614
|
+
var _a;
|
|
18615
|
+
return (hAsync("td", null, this.renderTemplate(this.templateCache.get(col.name), row) ||
|
|
18616
|
+
((_a = row[col.name]) !== null && _a !== void 0 ? _a : this.fallbackValue)));
|
|
18617
|
+
})))))))), hAsync("slot", { key: 'b4b5a8442f3a6982fb6d268c8b076a4d361b933c', name: "after" })));
|
|
18168
18618
|
}
|
|
18169
18619
|
get el() { return getElement(this); }
|
|
18170
18620
|
static get watchers() { return {
|
|
18171
|
-
"
|
|
18172
|
-
"
|
|
18621
|
+
"columnsConfig": ["parseColumns"],
|
|
18622
|
+
"columnsConfigJson": ["parseJsonColumns"],
|
|
18173
18623
|
"data": ["parseData"],
|
|
18174
|
-
"dataJson": ["parseJsonData"]
|
|
18624
|
+
"dataJson": ["parseJsonData"],
|
|
18625
|
+
"parsedColumns": ["handleParsedChange"],
|
|
18626
|
+
"parsedData": ["handleParsedChange"]
|
|
18175
18627
|
}; }
|
|
18176
18628
|
static get style() { return NvTableStyle0; }
|
|
18177
18629
|
static get cmpMeta() { return {
|
|
18178
18630
|
"$flags$": 4,
|
|
18179
18631
|
"$tagName$": "nv-table",
|
|
18180
18632
|
"$members$": {
|
|
18181
|
-
"columns": [16],
|
|
18182
|
-
"columnsJson": [513, "columns-json"],
|
|
18183
18633
|
"data": [16],
|
|
18634
|
+
"columnsConfig": [16],
|
|
18184
18635
|
"dataJson": [513, "data-json"],
|
|
18185
|
-
"
|
|
18186
|
-
"
|
|
18636
|
+
"columnsConfigJson": [513, "columns-config-json"],
|
|
18637
|
+
"fallbackValue": [513, "fallback-value"],
|
|
18638
|
+
"noDataMessage": [513, "no-data-message"],
|
|
18639
|
+
"noColumnsNoDataMessage": [513, "no-columns-no-data-message"],
|
|
18187
18640
|
"parsedColumns": [32],
|
|
18188
18641
|
"parsedData": [32],
|
|
18189
|
-
"
|
|
18190
|
-
"hasSlotBody": [32]
|
|
18642
|
+
"table": [32]
|
|
18191
18643
|
},
|
|
18192
18644
|
"$listeners$": undefined,
|
|
18193
18645
|
"$lazyBundleId$": "-",
|
|
18194
|
-
"$attrsToReflect$": [["
|
|
18195
|
-
}; }
|
|
18196
|
-
}
|
|
18197
|
-
|
|
18198
|
-
const nvTablebodyCss = "";
|
|
18199
|
-
var NvTablebodyStyle0 = nvTablebodyCss;
|
|
18200
|
-
|
|
18201
|
-
/**
|
|
18202
|
-
* @slot default - Use this slot to insert HTML into the table body.
|
|
18203
|
-
*/
|
|
18204
|
-
class NvTablebody {
|
|
18205
|
-
constructor(hostRef) {
|
|
18206
|
-
registerInstance(this, hostRef);
|
|
18207
|
-
}
|
|
18208
|
-
/****************************************************************************/
|
|
18209
|
-
//#region RENDER
|
|
18210
|
-
render() {
|
|
18211
|
-
return (hAsync(Host, { key: 'cdf37e086d4194bdcb941942226d17ba38ec7dc7' }, hAsync("tbody", { key: '3a8f72860faed461685b8184aeb274eec59188ba' }, hAsync("slot", { key: 'f7450cf4858bc7452e4cb840ac7e06e5848dc75f' }))));
|
|
18212
|
-
}
|
|
18213
|
-
static get style() { return NvTablebodyStyle0; }
|
|
18214
|
-
static get cmpMeta() { return {
|
|
18215
|
-
"$flags$": 4,
|
|
18216
|
-
"$tagName$": "nv-tablebody",
|
|
18217
|
-
"$members$": undefined,
|
|
18218
|
-
"$listeners$": undefined,
|
|
18219
|
-
"$lazyBundleId$": "-",
|
|
18220
|
-
"$attrsToReflect$": []
|
|
18646
|
+
"$attrsToReflect$": [["dataJson", "data-json"], ["columnsConfigJson", "columns-config-json"], ["fallbackValue", "fallback-value"], ["noDataMessage", "no-data-message"], ["noColumnsNoDataMessage", "no-columns-no-data-message"]]
|
|
18221
18647
|
}; }
|
|
18222
18648
|
}
|
|
18223
18649
|
|
|
18224
|
-
const nvTablecolumnCss = "";
|
|
18225
|
-
var NvTablecolumnStyle0 = nvTablecolumnCss;
|
|
18226
|
-
|
|
18227
|
-
/**
|
|
18228
|
-
* @slot default - Use this slot to insert HTML into the table column.
|
|
18229
|
-
*/
|
|
18230
18650
|
class NvTablecolumn {
|
|
18231
18651
|
constructor(hostRef) {
|
|
18232
18652
|
registerInstance(this, hostRef);
|
|
18233
|
-
/**
|
|
18234
|
-
* A non-negative integer value indicating how many columns the header cell spans
|
|
18235
|
-
* or extends. The default value is 1. User agents dismiss values higher than 1000
|
|
18236
|
-
* as incorrect, defaulting such values to 1.
|
|
18237
|
-
* @default 1
|
|
18238
|
-
*/
|
|
18239
|
-
this.colspan = 1;
|
|
18240
|
-
/**
|
|
18241
|
-
* A non-negative integer value indicating how many rows the header cell spans or
|
|
18242
|
-
* extends. The default value is 1; if its value is set to 0, the header cell will
|
|
18243
|
-
* extends to the end of the table grouping section (`<thead>`, `<tbody>`, `<tfoot>`,
|
|
18244
|
-
* even if implicitly defined), that the `<th>` belongs to. Values higher than 65534
|
|
18245
|
-
* are clipped at 65534.
|
|
18246
|
-
* @default 1
|
|
18247
|
-
*/
|
|
18248
|
-
this.rowspan = 1;
|
|
18249
18653
|
}
|
|
18250
18654
|
//#endregion PROPERTIES
|
|
18251
18655
|
/****************************************************************************/
|
|
18252
18656
|
//#region RENDER
|
|
18253
18657
|
render() {
|
|
18254
|
-
return
|
|
18658
|
+
return null;
|
|
18255
18659
|
}
|
|
18256
|
-
static get style() { return NvTablecolumnStyle0; }
|
|
18257
18660
|
static get cmpMeta() { return {
|
|
18258
|
-
"$flags$":
|
|
18661
|
+
"$flags$": 0,
|
|
18259
18662
|
"$tagName$": "nv-tablecolumn",
|
|
18260
18663
|
"$members$": {
|
|
18261
|
-
"
|
|
18262
|
-
"
|
|
18263
|
-
"rowspan": [2],
|
|
18264
|
-
"headers": [1],
|
|
18265
|
-
"scope": [1]
|
|
18266
|
-
},
|
|
18267
|
-
"$listeners$": undefined,
|
|
18268
|
-
"$lazyBundleId$": "-",
|
|
18269
|
-
"$attrsToReflect$": []
|
|
18270
|
-
}; }
|
|
18271
|
-
}
|
|
18272
|
-
|
|
18273
|
-
const nvTabledatacellCss = "";
|
|
18274
|
-
var NvTabledatacellStyle0 = nvTabledatacellCss;
|
|
18275
|
-
|
|
18276
|
-
/**
|
|
18277
|
-
* @slot default - Use this slot to insert HTML into the table data cell.
|
|
18278
|
-
*/
|
|
18279
|
-
class NvTabledatacell {
|
|
18280
|
-
constructor(hostRef) {
|
|
18281
|
-
registerInstance(this, hostRef);
|
|
18282
|
-
/****************************************************************************/
|
|
18283
|
-
//#region PROPERTIES
|
|
18284
|
-
/**
|
|
18285
|
-
* Contains a non-negative integer value that indicates how many columns the data
|
|
18286
|
-
* cell spans or extends. The default value is 1. User agents dismiss values higher
|
|
18287
|
-
* than 1000 as incorrect, setting to the default value (1).
|
|
18288
|
-
* @default 1
|
|
18289
|
-
*/
|
|
18290
|
-
this.colspan = 1;
|
|
18291
|
-
/**
|
|
18292
|
-
* Contains a non-negative integer value that indicates for how many rows the data
|
|
18293
|
-
* cell spans or extends. The default value is 1; if its value is set to 0, it
|
|
18294
|
-
* extends until the end of the table grouping section (`<thead>`, `<tbody>`,
|
|
18295
|
-
* `<tfoot>`, even if implicitly defined), that the cell belongs to. Values higher
|
|
18296
|
-
* than 65534 are clipped to 65534.
|
|
18297
|
-
* @default 1
|
|
18298
|
-
*/
|
|
18299
|
-
this.rowspan = 1;
|
|
18300
|
-
}
|
|
18301
|
-
//#endregion PROPERTIES
|
|
18302
|
-
/****************************************************************************/
|
|
18303
|
-
//#region RENDER
|
|
18304
|
-
render() {
|
|
18305
|
-
return (hAsync(Host, { key: 'fa4aaa160d405696e80897cb1cb0ec051468d150' }, hAsync("td", { key: '9d25cf82d40c0416142b22c286445358316e1e64', colSpan: this.colspan, rowSpan: this.rowspan, headers: this.headers }, hAsync("slot", { key: 'ecc470509926b5641e39cc8b3ed6e96e247e41fc' }))));
|
|
18306
|
-
}
|
|
18307
|
-
static get style() { return NvTabledatacellStyle0; }
|
|
18308
|
-
static get cmpMeta() { return {
|
|
18309
|
-
"$flags$": 4,
|
|
18310
|
-
"$tagName$": "nv-tabledatacell",
|
|
18311
|
-
"$members$": {
|
|
18312
|
-
"colspan": [2],
|
|
18313
|
-
"rowspan": [2],
|
|
18314
|
-
"headers": [1]
|
|
18664
|
+
"name": [513],
|
|
18665
|
+
"header": [513]
|
|
18315
18666
|
},
|
|
18316
18667
|
"$listeners$": undefined,
|
|
18317
18668
|
"$lazyBundleId$": "-",
|
|
18318
|
-
"$attrsToReflect$": []
|
|
18319
|
-
}; }
|
|
18320
|
-
}
|
|
18321
|
-
|
|
18322
|
-
const nvTableheadCss = "";
|
|
18323
|
-
var NvTableheadStyle0 = nvTableheadCss;
|
|
18324
|
-
|
|
18325
|
-
/**
|
|
18326
|
-
* @slot default - Use this slot to insert HTML into the table head.
|
|
18327
|
-
*/
|
|
18328
|
-
class NvTablehead {
|
|
18329
|
-
constructor(hostRef) {
|
|
18330
|
-
registerInstance(this, hostRef);
|
|
18331
|
-
}
|
|
18332
|
-
/****************************************************************************/
|
|
18333
|
-
//#region RENDER
|
|
18334
|
-
render() {
|
|
18335
|
-
return (hAsync(Host, { key: '89e28d2e09f6c5521ed3a06cd3d4674b238a384c' }, hAsync("thead", { key: 'fc9629c1d7af5e96f14d7c6b05d4e42618471f07' }, hAsync("slot", { key: 'bfc72494b0f3fe32153143a9099e4917c1ab77d5' }))));
|
|
18336
|
-
}
|
|
18337
|
-
static get style() { return NvTableheadStyle0; }
|
|
18338
|
-
static get cmpMeta() { return {
|
|
18339
|
-
"$flags$": 4,
|
|
18340
|
-
"$tagName$": "nv-tablehead",
|
|
18341
|
-
"$members$": undefined,
|
|
18342
|
-
"$listeners$": undefined,
|
|
18343
|
-
"$lazyBundleId$": "-",
|
|
18344
|
-
"$attrsToReflect$": []
|
|
18345
|
-
}; }
|
|
18346
|
-
}
|
|
18347
|
-
|
|
18348
|
-
const nvTablerowCss = "";
|
|
18349
|
-
var NvTablerowStyle0 = nvTablerowCss;
|
|
18350
|
-
|
|
18351
|
-
/**
|
|
18352
|
-
* @slot default - Use this slot to insert HTML into the table row.
|
|
18353
|
-
*/
|
|
18354
|
-
class NvTablerow {
|
|
18355
|
-
constructor(hostRef) {
|
|
18356
|
-
registerInstance(this, hostRef);
|
|
18357
|
-
}
|
|
18358
|
-
/****************************************************************************/
|
|
18359
|
-
//#region RENDER
|
|
18360
|
-
render() {
|
|
18361
|
-
return (hAsync(Host, { key: '5887cd3c2bda63bc177f7faf735ebade9b0bdc49' }, hAsync("tr", { key: '4b5b73272bbb87683d04e5838e52bdd4ff7b441b' }, hAsync("slot", { key: 'bc8d620194b9e73efefe6acdf7473e481d6bdef3' }))));
|
|
18362
|
-
}
|
|
18363
|
-
static get style() { return NvTablerowStyle0; }
|
|
18364
|
-
static get cmpMeta() { return {
|
|
18365
|
-
"$flags$": 4,
|
|
18366
|
-
"$tagName$": "nv-tablerow",
|
|
18367
|
-
"$members$": undefined,
|
|
18368
|
-
"$listeners$": undefined,
|
|
18369
|
-
"$lazyBundleId$": "-",
|
|
18370
|
-
"$attrsToReflect$": []
|
|
18669
|
+
"$attrsToReflect$": [["name", "name"], ["header", "header"]]
|
|
18371
18670
|
}; }
|
|
18372
18671
|
}
|
|
18373
18672
|
|
|
@@ -18435,8 +18734,8 @@ class NvToggle {
|
|
|
18435
18734
|
/****************************************************************************/
|
|
18436
18735
|
//#region RENDER
|
|
18437
18736
|
render() {
|
|
18438
|
-
return (hAsync(Host, { key: '
|
|
18439
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
18737
|
+
return (hAsync(Host, { key: '0ea7a73c5b656d0d7f9342a9526dc00a66a94f83', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, hAsync("div", { key: 'eb294c704b9f3568e03af1817a302d2edfe24486', class: "input-container" }, hAsync("input", { key: '777b6e7172691aba435751364c5908f381390f23', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), hAsync("div", { key: '92dbdb51e8c9fc231572009d37e274e070334292', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '9d50bac5932e25c3b3c8dd04fe44e2622e22b6ac', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: 'bf6cb8ff071c11d7809580a5dee61a1dfd89c112', name: "label" }, this.label))), (this.description ||
|
|
18738
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'db77b501162725dcf3b05b3d7c4b26d0f933ac8b', class: "description" }, hAsync("slot", { key: 'a201c736b5237e88ee0d8caa3999874caa7f85f3', name: "description" }, this.description))))));
|
|
18440
18739
|
}
|
|
18441
18740
|
static get formAssociated() { return true; }
|
|
18442
18741
|
get el() { return getElement(this); }
|
|
@@ -18501,7 +18800,7 @@ class NvTooltip {
|
|
|
18501
18800
|
/****************************************************************************/
|
|
18502
18801
|
//#region RENDER
|
|
18503
18802
|
render() {
|
|
18504
|
-
return (hAsync(Host, { key: '
|
|
18803
|
+
return (hAsync(Host, { key: 'c5a2dddc41ad3379be20d7809faf4bd683ff459c' }, hAsync("slot", { key: '400d32d15407fed83e424f00338efd60528b6fb2' }), hAsync("nv-popover", { key: 'd7efd362efa204aae2fea623a5efd33d3b1429b0', triggerMode: "hover", hasArrow: true, placement: this.placement, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, hAsync("p", { key: 'a6426276d51217387c4d028bb0eb719839197d62', slot: "content" }, this.message), hAsync("slot", { key: '01f6af2ae0243f3cd6c2d1a01e6c16cd2fd16cd0', name: "content" }))));
|
|
18505
18804
|
}
|
|
18506
18805
|
get el() { return getElement(this); }
|
|
18507
18806
|
static get style() { return NvTooltipStyle0; }
|
|
@@ -18531,11 +18830,7 @@ registerComponents([
|
|
|
18531
18830
|
NvCalendar,
|
|
18532
18831
|
NvCol,
|
|
18533
18832
|
NvDatagrid,
|
|
18534
|
-
NvDatagridbody,
|
|
18535
18833
|
NvDatagridcolumn,
|
|
18536
|
-
NvDatagriddatacell,
|
|
18537
|
-
NvDatagridhead,
|
|
18538
|
-
NvDatagridrow,
|
|
18539
18834
|
NvDialog,
|
|
18540
18835
|
NvDialogfooter,
|
|
18541
18836
|
NvDialogheader,
|
|
@@ -18560,11 +18855,7 @@ registerComponents([
|
|
|
18560
18855
|
NvRow,
|
|
18561
18856
|
NvStack,
|
|
18562
18857
|
NvTable,
|
|
18563
|
-
NvTablebody,
|
|
18564
18858
|
NvTablecolumn,
|
|
18565
|
-
NvTabledatacell,
|
|
18566
|
-
NvTablehead,
|
|
18567
|
-
NvTablerow,
|
|
18568
18859
|
NvToggle,
|
|
18569
18860
|
NvTooltip,
|
|
18570
18861
|
]);
|