@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.mjs
CHANGED
|
@@ -4767,6 +4767,10 @@ class NvAlert {
|
|
|
4767
4767
|
* Controls the visibility of the alert. Will animate with fade and collapse.
|
|
4768
4768
|
*/
|
|
4769
4769
|
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
4770
|
+
/**
|
|
4771
|
+
* When true, the alert will not animate when it is hidden or shown.
|
|
4772
|
+
*/
|
|
4773
|
+
this.hasNoAnimations = false;
|
|
4770
4774
|
//#endregion WATCHERS
|
|
4771
4775
|
/****************************************************************************/
|
|
4772
4776
|
//#region METHODS
|
|
@@ -4829,13 +4833,35 @@ class NvAlert {
|
|
|
4829
4833
|
*/
|
|
4830
4834
|
async handleHiddenChange(hidden) {
|
|
4831
4835
|
this.hiddenChanged.emit(hidden);
|
|
4836
|
+
await this.updateVisibility(hidden);
|
|
4837
|
+
this.hiddenChangedComplete.emit(hidden);
|
|
4838
|
+
}
|
|
4839
|
+
/**
|
|
4840
|
+
* Updates the visibility state of the alert with optional animations
|
|
4841
|
+
* @param {boolean} hidden - Whether the alert should be hidden
|
|
4842
|
+
*/
|
|
4843
|
+
async updateVisibility(hidden) {
|
|
4844
|
+
if (this.hasNoAnimations) {
|
|
4845
|
+
this.toggleHiddenClass(hidden);
|
|
4846
|
+
return;
|
|
4847
|
+
}
|
|
4832
4848
|
const { fadeIn, fadeOut } = useFade(this.ref, { duration: 150 });
|
|
4833
4849
|
const { collapse, expand } = useCollapse(this.ref, { duration: 150 });
|
|
4834
|
-
if (hidden
|
|
4850
|
+
if (hidden) {
|
|
4835
4851
|
await timeline(fadeOut, collapse).start();
|
|
4836
|
-
|
|
4852
|
+
this.toggleHiddenClass(true);
|
|
4853
|
+
}
|
|
4854
|
+
else {
|
|
4855
|
+
this.toggleHiddenClass(false);
|
|
4837
4856
|
await timeline(expand, fadeIn).start();
|
|
4838
|
-
|
|
4857
|
+
}
|
|
4858
|
+
}
|
|
4859
|
+
/**
|
|
4860
|
+
* Toggles the 'hidden' class on the element
|
|
4861
|
+
* @param {boolean} hidden - Whether to add or remove the hidden class
|
|
4862
|
+
*/
|
|
4863
|
+
toggleHiddenClass(hidden) {
|
|
4864
|
+
this.ref.classList.toggle('hidden', hidden);
|
|
4839
4865
|
}
|
|
4840
4866
|
//#endregion METHODS
|
|
4841
4867
|
/****************************************************************************/
|
|
@@ -4857,10 +4883,7 @@ class NvAlert {
|
|
|
4857
4883
|
}
|
|
4858
4884
|
}
|
|
4859
4885
|
if (this.hidden) {
|
|
4860
|
-
|
|
4861
|
-
const { setFadeOut } = useFade(this.ref);
|
|
4862
|
-
setCollapsed();
|
|
4863
|
-
setFadeOut();
|
|
4886
|
+
this.ref.classList.add('hidden');
|
|
4864
4887
|
}
|
|
4865
4888
|
}
|
|
4866
4889
|
//#endregion LIFECYCLE
|
|
@@ -4868,7 +4891,7 @@ class NvAlert {
|
|
|
4868
4891
|
//#region RENDER
|
|
4869
4892
|
render() {
|
|
4870
4893
|
var _a;
|
|
4871
|
-
return (hAsync(Host, { key: '
|
|
4894
|
+
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" })))));
|
|
4872
4895
|
}
|
|
4873
4896
|
get ref() { return getElement(this); }
|
|
4874
4897
|
static get watchers() { return {
|
|
@@ -4886,11 +4909,12 @@ class NvAlert {
|
|
|
4886
4909
|
"icon": [513],
|
|
4887
4910
|
"dismissible": [516],
|
|
4888
4911
|
"preventAutoClose": [516, "prevent-auto-close"],
|
|
4889
|
-
"hidden": [1540]
|
|
4912
|
+
"hidden": [1540],
|
|
4913
|
+
"hasNoAnimations": [516, "has-no-animations"]
|
|
4890
4914
|
},
|
|
4891
4915
|
"$listeners$": undefined,
|
|
4892
4916
|
"$lazyBundleId$": "-",
|
|
4893
|
-
"$attrsToReflect$": [["feedback", "feedback"], ["message", "message"], ["heading", "heading"], ["icon", "icon"], ["dismissible", "dismissible"], ["preventAutoClose", "prevent-auto-close"], ["hidden", "hidden"]]
|
|
4917
|
+
"$attrsToReflect$": [["feedback", "feedback"], ["message", "message"], ["heading", "heading"], ["icon", "icon"], ["dismissible", "dismissible"], ["preventAutoClose", "prevent-auto-close"], ["hidden", "hidden"], ["hasNoAnimations", "has-no-animations"]]
|
|
4894
4918
|
}; }
|
|
4895
4919
|
}
|
|
4896
4920
|
|
|
@@ -4951,7 +4975,7 @@ class NvAvatar {
|
|
|
4951
4975
|
/****************************************************************************/
|
|
4952
4976
|
//#region RENDER
|
|
4953
4977
|
render() {
|
|
4954
|
-
return (hAsync(Host, { key: '
|
|
4978
|
+
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" })))));
|
|
4955
4979
|
}
|
|
4956
4980
|
static get style() { return NvAvatarStyle0; }
|
|
4957
4981
|
static get cmpMeta() { return {
|
|
@@ -5098,11 +5122,11 @@ class NvBadge {
|
|
|
5098
5122
|
/****************************************************************************/
|
|
5099
5123
|
//#region RENDER
|
|
5100
5124
|
render() {
|
|
5101
|
-
return (hAsync(Host, { key: '
|
|
5125
|
+
return (hAsync(Host, { key: '18d3a28777aa74117ccc68aa0c889ea716b90d56', class: clsx(`badge-${this.color}`, {
|
|
5102
5126
|
'has-close': this.dismissible,
|
|
5103
5127
|
'with-gap': this.dismissible || this.label,
|
|
5104
5128
|
'visually-hidden': this._isHidden,
|
|
5105
|
-
}) }, hAsync("slot", { key: '
|
|
5129
|
+
}) }, 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" })))));
|
|
5106
5130
|
}
|
|
5107
5131
|
get ref() { return getElement(this); }
|
|
5108
5132
|
static get watchers() { return {
|
|
@@ -5196,7 +5220,7 @@ class NvBaseComponent {
|
|
|
5196
5220
|
/****************************************************************************/
|
|
5197
5221
|
//#region RENDER
|
|
5198
5222
|
render() {
|
|
5199
|
-
return (hAsync(Host, { key: '
|
|
5223
|
+
return (hAsync(Host, { key: 'ee2869bb42012e8c6b185e412503b14482f58af0', style: { display: 'block' } }, hAsync("slot", { key: '2d89c30073a159339419bbec3f323abdcbf312cf' })));
|
|
5200
5224
|
}
|
|
5201
5225
|
get el() { return getElement(this); }
|
|
5202
5226
|
static get cmpMeta() { return {
|
|
@@ -5241,7 +5265,7 @@ class NvBreadcrumb {
|
|
|
5241
5265
|
/****************************************************************************/
|
|
5242
5266
|
//#region RENDER
|
|
5243
5267
|
render() {
|
|
5244
|
-
return (hAsync(Host, { key: '
|
|
5268
|
+
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" }, "/")));
|
|
5245
5269
|
}
|
|
5246
5270
|
get el() { return getElement(this); }
|
|
5247
5271
|
static get style() { return NvBreadcrumbStyle0; }
|
|
@@ -5271,7 +5295,7 @@ class NvBreadcrumbs {
|
|
|
5271
5295
|
}
|
|
5272
5296
|
//#region RENDER
|
|
5273
5297
|
render() {
|
|
5274
|
-
return (hAsync(Host, { key: '
|
|
5298
|
+
return (hAsync(Host, { key: '832ca6782b23a6aa0ca9fdea78cd7b0173db66b4', role: "navigation", "aria-label": "breadcrumbs" }, hAsync("ol", { key: 'e71aaabc2c3e8912097f822e24947eeec112ea3b' }, hAsync("slot", { key: '0af6f306a8ad6ec26bbcf3bf480acb3cc4a9682a' }))));
|
|
5275
5299
|
}
|
|
5276
5300
|
static get style() { return NvBreadcrumbsStyle0; }
|
|
5277
5301
|
static get cmpMeta() { return {
|
|
@@ -5343,29 +5367,51 @@ class NvButton {
|
|
|
5343
5367
|
/**
|
|
5344
5368
|
* Sets the button type to control its function in forms. Use 'submit' to send
|
|
5345
5369
|
* form data, 'reset' to clear the form, or 'button' for a standard button
|
|
5346
|
-
* that doesn
|
|
5370
|
+
* that doesn't interact with form submission by default.
|
|
5347
5371
|
*/
|
|
5348
5372
|
this.type = 'button';
|
|
5349
5373
|
//#endregion PROPERTIES
|
|
5350
5374
|
/****************************************************************************/
|
|
5351
5375
|
//#region METHODS
|
|
5352
5376
|
/**
|
|
5353
|
-
* Handles form
|
|
5354
|
-
*
|
|
5355
|
-
*
|
|
5377
|
+
* Handles button click events, managing form actions and disabled states.
|
|
5378
|
+
* Prevents default behavior when button is disabled or loading, and
|
|
5379
|
+
* processes form submissions/resets when appropriate.
|
|
5356
5380
|
* @param {Event} event - The click event.
|
|
5357
5381
|
*/
|
|
5358
|
-
this.
|
|
5359
|
-
var _a, _b, _c, _d;
|
|
5382
|
+
this.handleButtonClick = (event) => {
|
|
5360
5383
|
if (this.loading || this.disabled) {
|
|
5361
5384
|
event.preventDefault();
|
|
5362
5385
|
return;
|
|
5363
5386
|
}
|
|
5364
|
-
if (this.type
|
|
5365
|
-
|
|
5387
|
+
if (this.form && this.type !== ButtonType.Button) {
|
|
5388
|
+
this.processFormAction();
|
|
5366
5389
|
}
|
|
5367
|
-
if (this.
|
|
5368
|
-
(
|
|
5390
|
+
else if (this.form) {
|
|
5391
|
+
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);
|
|
5392
|
+
}
|
|
5393
|
+
};
|
|
5394
|
+
/**
|
|
5395
|
+
* Processes form-related actions by finding the associated form element
|
|
5396
|
+
* and triggering the appropriate action (submit/reset) based on button type.
|
|
5397
|
+
* Falls back to ElementInternals form if no explicit form ID is provided.
|
|
5398
|
+
*/
|
|
5399
|
+
this.processFormAction = () => {
|
|
5400
|
+
var _a, _b;
|
|
5401
|
+
const formElement = this.form
|
|
5402
|
+
? document.getElementById(this.form)
|
|
5403
|
+
: (_a = this.internals) === null || _a === void 0 ? void 0 : _a.form;
|
|
5404
|
+
if (!formElement) {
|
|
5405
|
+
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);
|
|
5406
|
+
return;
|
|
5407
|
+
}
|
|
5408
|
+
switch (this.type) {
|
|
5409
|
+
case ButtonType.Submit:
|
|
5410
|
+
formElement.requestSubmit();
|
|
5411
|
+
break;
|
|
5412
|
+
case ButtonType.Reset:
|
|
5413
|
+
formElement.reset();
|
|
5414
|
+
break;
|
|
5369
5415
|
}
|
|
5370
5416
|
};
|
|
5371
5417
|
}
|
|
@@ -5411,7 +5457,7 @@ class NvButton {
|
|
|
5411
5457
|
/****************************************************************************/
|
|
5412
5458
|
//#region RENDER
|
|
5413
5459
|
render() {
|
|
5414
|
-
return (hAsync(Host, { key: '
|
|
5460
|
+
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" })));
|
|
5415
5461
|
}
|
|
5416
5462
|
static get formAssociated() { return true; }
|
|
5417
5463
|
get el() { return getElement(this); }
|
|
@@ -5431,11 +5477,12 @@ class NvButton {
|
|
|
5431
5477
|
"loading": [1540],
|
|
5432
5478
|
"disabled": [1540],
|
|
5433
5479
|
"fluid": [516],
|
|
5434
|
-
"type": [513]
|
|
5480
|
+
"type": [513],
|
|
5481
|
+
"form": [513]
|
|
5435
5482
|
},
|
|
5436
5483
|
"$listeners$": [[0, "keydown", "handleKeyDown"], [0, "touchstart", "handleTouchStart"]],
|
|
5437
5484
|
"$lazyBundleId$": "-",
|
|
5438
|
-
"$attrsToReflect$": [["size", "size"], ["emphasis", "emphasis"], ["active", "active"], ["danger", "danger"], ["loading", "loading"], ["disabled", "disabled"], ["fluid", "fluid"], ["type", "type"]]
|
|
5485
|
+
"$attrsToReflect$": [["size", "size"], ["emphasis", "emphasis"], ["active", "active"], ["danger", "danger"], ["loading", "loading"], ["disabled", "disabled"], ["fluid", "fluid"], ["type", "type"], ["form", "form"]]
|
|
5439
5486
|
}; }
|
|
5440
5487
|
}
|
|
5441
5488
|
|
|
@@ -6406,7 +6453,7 @@ class NvCalendar {
|
|
|
6406
6453
|
* @slot default - Child content of the component.
|
|
6407
6454
|
*/
|
|
6408
6455
|
render() {
|
|
6409
|
-
return (hAsync(Host, { key: '
|
|
6456
|
+
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' })));
|
|
6410
6457
|
}
|
|
6411
6458
|
get el() { return getElement(this); }
|
|
6412
6459
|
static get watchers() { return {
|
|
@@ -6473,7 +6520,7 @@ class NvCol {
|
|
|
6473
6520
|
/****************************************************************************/
|
|
6474
6521
|
//#region RENDER
|
|
6475
6522
|
render() {
|
|
6476
|
-
return (hAsync(Host, { key: '
|
|
6523
|
+
return (hAsync(Host, { key: '416e432e3f8947b2b2040e8226da1acf03a6f965', class: clsx(this.getColSize()) }, hAsync("slot", { key: 'e860ae915f148333f471a48705677512853c6970' })));
|
|
6477
6524
|
}
|
|
6478
6525
|
static get style() { return NvColStyle0; }
|
|
6479
6526
|
static get cmpMeta() { return {
|
|
@@ -9441,16 +9488,178 @@ function getCoreRowModel() {
|
|
|
9441
9488
|
}, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => table._autoResetPageIndex()));
|
|
9442
9489
|
}
|
|
9443
9490
|
|
|
9444
|
-
|
|
9491
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9492
|
+
/**
|
|
9493
|
+
* All properties that should be excluded from the deep copy of an HTML element.
|
|
9494
|
+
*/
|
|
9495
|
+
const excludedProps = new Set([
|
|
9496
|
+
// Text and content-related properties
|
|
9497
|
+
'textContent',
|
|
9498
|
+
'innerText',
|
|
9499
|
+
'outerText',
|
|
9500
|
+
'innerHTML',
|
|
9501
|
+
'outerHTML',
|
|
9502
|
+
'text',
|
|
9503
|
+
// Form element properties
|
|
9504
|
+
'value',
|
|
9505
|
+
'defaultValue',
|
|
9506
|
+
'checked',
|
|
9507
|
+
'defaultChecked',
|
|
9508
|
+
'selectionStart',
|
|
9509
|
+
'selectionEnd',
|
|
9510
|
+
'selectionDirection',
|
|
9511
|
+
'form',
|
|
9512
|
+
'willValidate',
|
|
9513
|
+
'validity',
|
|
9514
|
+
'validationMessage',
|
|
9515
|
+
'labels',
|
|
9516
|
+
'list',
|
|
9517
|
+
'maxLength',
|
|
9518
|
+
'minLength',
|
|
9519
|
+
'valueAsDate',
|
|
9520
|
+
'valueAsNumber',
|
|
9521
|
+
// Editability and namespaces
|
|
9522
|
+
'contentEditable',
|
|
9523
|
+
'isContentEditable',
|
|
9524
|
+
'namespaceURI',
|
|
9525
|
+
// Child-related properties (handled recursively)
|
|
9526
|
+
'attributes',
|
|
9527
|
+
'children',
|
|
9528
|
+
'childNodes',
|
|
9529
|
+
'firstChild',
|
|
9530
|
+
'lastChild',
|
|
9531
|
+
// Blazor-related properties
|
|
9532
|
+
'origin',
|
|
9533
|
+
'dataset',
|
|
9534
|
+
'attributeStyleMap',
|
|
9535
|
+
'prefix',
|
|
9536
|
+
'localName',
|
|
9537
|
+
'tagName',
|
|
9538
|
+
'shadowRoot',
|
|
9539
|
+
'assignedSlot',
|
|
9540
|
+
'scrollWidth',
|
|
9541
|
+
'scrollHeight',
|
|
9542
|
+
'clientTop',
|
|
9543
|
+
'clientLeft',
|
|
9544
|
+
'clientWidth',
|
|
9545
|
+
'clientHeight',
|
|
9546
|
+
'firstElementChild',
|
|
9547
|
+
'lastElementChild',
|
|
9548
|
+
'childElementCount',
|
|
9549
|
+
'previousElementSibling',
|
|
9550
|
+
'nextElementSibling',
|
|
9551
|
+
'currentCSSZoom',
|
|
9552
|
+
'nodeType',
|
|
9553
|
+
'nodeName',
|
|
9554
|
+
'baseURI',
|
|
9555
|
+
'isConnected',
|
|
9556
|
+
'ownerDocument',
|
|
9557
|
+
'parentNode',
|
|
9558
|
+
'parentElement',
|
|
9559
|
+
'previousSibling',
|
|
9560
|
+
'nextSibling',
|
|
9561
|
+
'ELEMENT_NODE',
|
|
9562
|
+
'ATTRIBUTE_NODE',
|
|
9563
|
+
'TEXT_NODE',
|
|
9564
|
+
'CDATA_SECTION_NODE',
|
|
9565
|
+
'ENTITY_REFERENCE_NODE',
|
|
9566
|
+
'ENTITY_NODE',
|
|
9567
|
+
'PROCESSING_INSTRUCTION_NODE',
|
|
9568
|
+
'COMMENT_NODE',
|
|
9569
|
+
'DOCUMENT_NODE',
|
|
9570
|
+
'DOCUMENT_TYPE_NODE',
|
|
9571
|
+
'DOCUMENT_FRAGMENT_NODE',
|
|
9572
|
+
'NOTATION_NODE',
|
|
9573
|
+
'DOCUMENT_POSITION_DISCONNECTED',
|
|
9574
|
+
'DOCUMENT_POSITION_PRECEDING',
|
|
9575
|
+
'DOCUMENT_POSITION_FOLLOWING',
|
|
9576
|
+
'DOCUMENT_POSITION_CONTAINS',
|
|
9577
|
+
'DOCUMENT_POSITION_CONTAINED_BY',
|
|
9578
|
+
'DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC',
|
|
9579
|
+
]);
|
|
9580
|
+
/**
|
|
9581
|
+
* Deep copy an HTML element with all its attributes, properties, and child nodes.
|
|
9582
|
+
* This method is useful for creating a clone of an element that can be safely modified without affecting the original.
|
|
9583
|
+
* @param {HTMLElement} element - The HTML element to copy.
|
|
9584
|
+
* @returns {HTMLElement} - A deep copy of the HTML element.
|
|
9585
|
+
* @example const copy = deepCopyElement(document.getElementById('myElement'));
|
|
9586
|
+
*/
|
|
9587
|
+
function deepCopyElement(element) {
|
|
9588
|
+
const copy = document.createElement(element.tagName);
|
|
9589
|
+
// ✅ Copy attributes
|
|
9590
|
+
Array.from(element.attributes).forEach(attr => {
|
|
9591
|
+
copy.setAttribute(attr.name, attr.value);
|
|
9592
|
+
});
|
|
9593
|
+
// ✅ Dynamically extract relevant properties
|
|
9594
|
+
const properties = new Set();
|
|
9595
|
+
// Collect only own enumerable properties
|
|
9596
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
9597
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
9598
|
+
let proto = Object.getPrototypeOf(element);
|
|
9599
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
9600
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
9601
|
+
proto = Object.getPrototypeOf(proto);
|
|
9602
|
+
}
|
|
9603
|
+
// ✅ Filter and copy only non-function properties (methods are excluded) and non-event listeners
|
|
9604
|
+
properties.forEach(prop => {
|
|
9605
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
9606
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
9607
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
9608
|
+
) {
|
|
9609
|
+
try {
|
|
9610
|
+
copy[prop] = element[prop];
|
|
9611
|
+
}
|
|
9612
|
+
catch (error) {
|
|
9613
|
+
console.warn(`Could not copy property ${prop}:`, error.message);
|
|
9614
|
+
}
|
|
9615
|
+
}
|
|
9616
|
+
});
|
|
9617
|
+
// ✅ Copy dataset separately
|
|
9618
|
+
Object.assign(copy.dataset, element.dataset);
|
|
9619
|
+
// ✅ Handle form elements specifically
|
|
9620
|
+
if (element instanceof HTMLInputElement) {
|
|
9621
|
+
copy.value = element.value;
|
|
9622
|
+
copy.checked = element.checked;
|
|
9623
|
+
copy.defaultValue = element.defaultValue;
|
|
9624
|
+
copy.defaultChecked = element.defaultChecked;
|
|
9625
|
+
copy.selectionStart = element.selectionStart;
|
|
9626
|
+
copy.selectionEnd = element.selectionEnd;
|
|
9627
|
+
copy.selectionDirection = element.selectionDirection;
|
|
9628
|
+
}
|
|
9629
|
+
else if (element instanceof HTMLTextAreaElement) {
|
|
9630
|
+
copy.value = element.value;
|
|
9631
|
+
copy.defaultValue = element.defaultValue;
|
|
9632
|
+
copy.selectionStart = element.selectionStart;
|
|
9633
|
+
copy.selectionEnd = element.selectionEnd;
|
|
9634
|
+
copy.selectionDirection =
|
|
9635
|
+
element.selectionDirection;
|
|
9636
|
+
}
|
|
9637
|
+
else if (element instanceof HTMLSelectElement) {
|
|
9638
|
+
copy.value = element.value;
|
|
9639
|
+
copy.selectedIndex = element.selectedIndex;
|
|
9640
|
+
}
|
|
9641
|
+
// ✅ Recursively copy child nodes (prevent duplicates)
|
|
9642
|
+
element.childNodes.forEach(child => {
|
|
9643
|
+
let childCopy;
|
|
9644
|
+
if (child.nodeType === Node.ELEMENT_NODE) {
|
|
9645
|
+
childCopy = deepCopyElement(child);
|
|
9646
|
+
}
|
|
9647
|
+
else {
|
|
9648
|
+
childCopy = child.cloneNode(true);
|
|
9649
|
+
}
|
|
9650
|
+
copy.appendChild(childCopy);
|
|
9651
|
+
});
|
|
9652
|
+
return copy;
|
|
9653
|
+
}
|
|
9654
|
+
|
|
9655
|
+
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)}";
|
|
9445
9656
|
var NvDatagridStyle0 = nvDatagridCss;
|
|
9446
9657
|
|
|
9447
9658
|
/**
|
|
9448
9659
|
* A flexible data grid component powered by `@tanstack/table-core`.
|
|
9449
9660
|
* @slot default - Use this slot to insert HTML into the data grid content.
|
|
9450
|
-
* @slot head - Use this slot to insert HTML into the data grid header.
|
|
9451
9661
|
* @slot before - Use this slot to insert HTML before the data grid.
|
|
9452
9662
|
* @slot after - Use this slot to insert HTML after the data grid.
|
|
9453
|
-
* @slot body - Use this slot to insert HTML into the data grid body.
|
|
9454
9663
|
*
|
|
9455
9664
|
* @deprecated [EXPERIMENTAL]
|
|
9456
9665
|
* @experimental - This component is still under development and is not ready for use.
|
|
@@ -9458,16 +9667,23 @@ var NvDatagridStyle0 = nvDatagridCss;
|
|
|
9458
9667
|
class NvDatagrid {
|
|
9459
9668
|
constructor(hostRef) {
|
|
9460
9669
|
registerInstance(this, hostRef);
|
|
9670
|
+
this.action = createEvent(this, "action", 7);
|
|
9671
|
+
this.templateCache = new Map();
|
|
9672
|
+
this.headerTemplateCache = new Map();
|
|
9461
9673
|
/****************************************************************************/
|
|
9462
9674
|
//#region STATES
|
|
9463
9675
|
this.table = null;
|
|
9464
9676
|
this.parsedColumns = []; // Parsed array
|
|
9465
9677
|
this.parsedData = []; // Parsed array
|
|
9466
|
-
this.hasSlotHead = false;
|
|
9467
|
-
this.hasSlotBody = false;
|
|
9468
9678
|
//#endregion STATES
|
|
9469
9679
|
/****************************************************************************/
|
|
9470
9680
|
//#region PROPERTIES
|
|
9681
|
+
/**
|
|
9682
|
+
* The data to display in the data grid.
|
|
9683
|
+
* @example [{ "name": "Alice", "age": 25 }, { "name": "Bob", "age": 30 }]
|
|
9684
|
+
* @default []
|
|
9685
|
+
*/
|
|
9686
|
+
this.data = [];
|
|
9471
9687
|
/**
|
|
9472
9688
|
* The columns to display in the data grid.
|
|
9473
9689
|
* @example
|
|
@@ -9480,11 +9696,10 @@ class NvDatagrid {
|
|
|
9480
9696
|
*/
|
|
9481
9697
|
this.columns = [];
|
|
9482
9698
|
/**
|
|
9483
|
-
*
|
|
9484
|
-
* @
|
|
9485
|
-
* @default []
|
|
9699
|
+
* Fallback value to be displayed when data is not available
|
|
9700
|
+
* @default 'N/A'
|
|
9486
9701
|
*/
|
|
9487
|
-
this.
|
|
9702
|
+
this.fallbackValue = 'N/A';
|
|
9488
9703
|
/**
|
|
9489
9704
|
* The message to display when there is no data available.
|
|
9490
9705
|
* @default 'No data available'
|
|
@@ -9498,39 +9713,94 @@ class NvDatagrid {
|
|
|
9498
9713
|
}
|
|
9499
9714
|
//#endregion PROPERTIES
|
|
9500
9715
|
/****************************************************************************/
|
|
9501
|
-
//#region
|
|
9502
|
-
|
|
9503
|
-
|
|
9716
|
+
//#region METHODS
|
|
9717
|
+
/**
|
|
9718
|
+
* Caches templates for cells and headers upfront to improve performance.
|
|
9719
|
+
*/
|
|
9720
|
+
cacheTemplates() {
|
|
9721
|
+
const columns = Array.from(this.el.querySelectorAll('nv-datagridcolumn'));
|
|
9722
|
+
columns.forEach((col) => {
|
|
9723
|
+
const key = col.accessor;
|
|
9724
|
+
const cellSlot = col.querySelector('[slot="cell"]');
|
|
9725
|
+
if (cellSlot) {
|
|
9726
|
+
const element = deepCopyElement(cellSlot);
|
|
9727
|
+
this.templateCache.set(key, element);
|
|
9728
|
+
}
|
|
9729
|
+
const headerSlot = col.querySelector('[slot="header"]');
|
|
9730
|
+
if (headerSlot) {
|
|
9731
|
+
const element = deepCopyElement(headerSlot);
|
|
9732
|
+
this.headerTemplateCache.set(key, element);
|
|
9733
|
+
}
|
|
9734
|
+
else {
|
|
9735
|
+
const header = col.header;
|
|
9736
|
+
if (header) {
|
|
9737
|
+
const headerDiv = document.createElement('div');
|
|
9738
|
+
headerDiv.textContent = header;
|
|
9739
|
+
this.headerTemplateCache.set(key, headerDiv);
|
|
9740
|
+
}
|
|
9741
|
+
}
|
|
9742
|
+
});
|
|
9504
9743
|
}
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
this.parseColumnsArray(newItems, this.parsedColumns);
|
|
9744
|
+
parseDataAndColumns() {
|
|
9745
|
+
if (this.dataJson) {
|
|
9746
|
+
this.parseJsonData(this.dataJson);
|
|
9509
9747
|
}
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9748
|
+
else if (this.data && this.data.length > 0) {
|
|
9749
|
+
this.parseDataArray(this.data, this.parsedData);
|
|
9750
|
+
}
|
|
9751
|
+
if (this.columnsJson) {
|
|
9752
|
+
this.parseJsonColumns(this.columnsJson, this.parsedColumns);
|
|
9753
|
+
}
|
|
9754
|
+
else if (this.columns && this.columns.length > 0) {
|
|
9755
|
+
this.parseColumnsArray(this.columns, this.parsedColumns);
|
|
9756
|
+
}
|
|
9757
|
+
else if (this.headerTemplateCache.size > 0) {
|
|
9758
|
+
const headerKeys = Array.from(this.headerTemplateCache.keys());
|
|
9759
|
+
const arrayColumnsConfig = headerKeys.map(key => (Object.assign({}, { accessor: key, header: key ? key.charAt(0).toUpperCase() + key.slice(1) : '' })));
|
|
9760
|
+
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
9761
|
+
}
|
|
9762
|
+
else if (this.parsedData.length > 0) {
|
|
9763
|
+
const firstRow = this.parsedData[0];
|
|
9764
|
+
const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
|
|
9765
|
+
accessor: key,
|
|
9766
|
+
header: key.charAt(0).toUpperCase() + key.slice(1),
|
|
9767
|
+
}));
|
|
9768
|
+
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
9513
9769
|
}
|
|
9514
9770
|
}
|
|
9515
|
-
|
|
9516
|
-
|
|
9771
|
+
deepEqual(a, b) {
|
|
9772
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
9517
9773
|
}
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9774
|
+
/**
|
|
9775
|
+
* Parses the data array and sets the state accordingly
|
|
9776
|
+
* @param {any[]} newValue - The new value of the data array.
|
|
9777
|
+
* @param {any[]} oldValue - The old value of the data array.
|
|
9778
|
+
*/
|
|
9779
|
+
parseDataArray(newValue, oldValue) {
|
|
9780
|
+
// Ensure both are arrays for proper comparison
|
|
9781
|
+
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
9782
|
+
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
9783
|
+
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
9784
|
+
return; // Deep comparison
|
|
9526
9785
|
}
|
|
9786
|
+
this.parsedData = Array.isArray(newValue) ? newValue : [];
|
|
9527
9787
|
}
|
|
9528
|
-
|
|
9529
|
-
|
|
9788
|
+
/**
|
|
9789
|
+
* Parses the columns array and sets the state accordingly
|
|
9790
|
+
* @param {Column[]} newValue - The new value of the columns array.
|
|
9791
|
+
* @param {Column[]} oldValue - The old value of the columns array.
|
|
9792
|
+
*/
|
|
9793
|
+
parseColumnsArray(newValue, oldValue) {
|
|
9794
|
+
// Ensure both are arrays for proper comparison
|
|
9795
|
+
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
9796
|
+
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
9797
|
+
// Use a proper deep comparison function (e.g., Lodash's isEqual)
|
|
9798
|
+
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
9799
|
+
return;
|
|
9800
|
+
}
|
|
9801
|
+
// Assign only after confirming changes
|
|
9802
|
+
this.parsedColumns = safeNewValue;
|
|
9530
9803
|
}
|
|
9531
|
-
//#endregion WATCHERS
|
|
9532
|
-
/****************************************************************************/
|
|
9533
|
-
//#region METHODS
|
|
9534
9804
|
initializeTable() {
|
|
9535
9805
|
// Clear the previous table instance (if any)
|
|
9536
9806
|
this.table = null;
|
|
@@ -9565,170 +9835,268 @@ class NvDatagrid {
|
|
|
9565
9835
|
}, // Default: no column sizing info
|
|
9566
9836
|
},
|
|
9567
9837
|
};
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
const
|
|
9573
|
-
|
|
9574
|
-
// Use defined columns
|
|
9575
|
-
return validColumns.map(column => columnHelper.accessor(column.accessor, {
|
|
9576
|
-
header: column.header,
|
|
9577
|
-
cell: info => info.getValue(),
|
|
9578
|
-
}));
|
|
9579
|
-
}
|
|
9580
|
-
else if (tableOptions.data && tableOptions.data.length > 0) {
|
|
9581
|
-
// Generate columns from data keys
|
|
9582
|
-
const sampleRow = tableOptions.data[0];
|
|
9583
|
-
return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
|
|
9584
|
-
header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
9585
|
-
cell: info => info.getValue(),
|
|
9586
|
-
}));
|
|
9587
|
-
}
|
|
9588
|
-
else {
|
|
9589
|
-
// No columns and no data
|
|
9590
|
-
return [];
|
|
9591
|
-
}
|
|
9592
|
-
};
|
|
9593
|
-
const setTableData = () => {
|
|
9594
|
-
if (this.parsedData &&
|
|
9838
|
+
if (this.parsedColumns.length > 0) {
|
|
9839
|
+
// Validate and generate column definitions
|
|
9840
|
+
const validColumns = this.parsedColumns.filter(column => (column === null || column === void 0 ? void 0 : column.accessor) && (column === null || column === void 0 ? void 0 : column.header));
|
|
9841
|
+
// Update tableOptions based on parsed data and columns
|
|
9842
|
+
const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
|
|
9843
|
+
const hasData = this.parsedData &&
|
|
9595
9844
|
Array.isArray(this.parsedData) &&
|
|
9596
|
-
this.parsedData.length > 0
|
|
9597
|
-
|
|
9845
|
+
this.parsedData.length > 0;
|
|
9846
|
+
if (!hasColumns && !hasData) ;
|
|
9847
|
+
else if (hasColumns && !hasData) {
|
|
9848
|
+
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
9598
9849
|
}
|
|
9599
9850
|
else {
|
|
9600
|
-
|
|
9851
|
+
// Both columns and data are available
|
|
9852
|
+
// No columns and data is available
|
|
9853
|
+
tableOptions.data = this.getTableData();
|
|
9854
|
+
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
9601
9855
|
}
|
|
9602
|
-
};
|
|
9603
|
-
// Update tableOptions based on parsed data and columns
|
|
9604
|
-
const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
|
|
9605
|
-
const hasData = (this.parsedData &&
|
|
9606
|
-
Array.isArray(this.parsedData) &&
|
|
9607
|
-
this.parsedData.length > 0) ||
|
|
9608
|
-
this.hasSlotBody;
|
|
9609
|
-
if (!hasColumns && !hasData) ;
|
|
9610
|
-
else if (hasColumns && !hasData) {
|
|
9611
|
-
tableOptions.columns = generateColumns();
|
|
9612
|
-
}
|
|
9613
|
-
else {
|
|
9614
|
-
// Both columns and data are available
|
|
9615
|
-
// No columns and data is available
|
|
9616
|
-
tableOptions.data = setTableData();
|
|
9617
|
-
tableOptions.columns = generateColumns();
|
|
9618
9856
|
}
|
|
9619
9857
|
// Initialize the table
|
|
9620
9858
|
this.table = createTable(tableOptions);
|
|
9621
9859
|
}
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9860
|
+
// Helper function to generate column definitions
|
|
9861
|
+
generateColumns(validColumns, tableOptions) {
|
|
9862
|
+
const columnHelper = createColumnHelper();
|
|
9863
|
+
if (validColumns.length > 0) {
|
|
9864
|
+
// Use defined columns
|
|
9865
|
+
return validColumns.map(column => columnHelper.accessor(column.accessor, {
|
|
9866
|
+
header: column.header,
|
|
9867
|
+
cell: info => info.getValue(),
|
|
9868
|
+
}));
|
|
9869
|
+
}
|
|
9870
|
+
else if (tableOptions.data && tableOptions.data.length > 0) {
|
|
9871
|
+
// Generate columns from data keys
|
|
9872
|
+
const sampleRow = tableOptions.data[0];
|
|
9873
|
+
return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
|
|
9874
|
+
header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
9875
|
+
cell: info => info.getValue(),
|
|
9876
|
+
}));
|
|
9877
|
+
}
|
|
9878
|
+
else {
|
|
9879
|
+
// No columns and no data
|
|
9880
|
+
return [];
|
|
9881
|
+
}
|
|
9631
9882
|
}
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
return;
|
|
9640
|
-
|
|
9883
|
+
getTableData() {
|
|
9884
|
+
if (this.parsedData &&
|
|
9885
|
+
Array.isArray(this.parsedData) &&
|
|
9886
|
+
this.parsedData.length > 0) {
|
|
9887
|
+
return [...this.parsedData];
|
|
9888
|
+
}
|
|
9889
|
+
else {
|
|
9890
|
+
return [];
|
|
9891
|
+
}
|
|
9641
9892
|
}
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9893
|
+
renderTemplate(template, cellValue, row) {
|
|
9894
|
+
if (!template) {
|
|
9895
|
+
return null;
|
|
9896
|
+
}
|
|
9897
|
+
// Handle <template> elements correctly
|
|
9898
|
+
const templateContent = template instanceof HTMLTemplateElement ? template.content : template;
|
|
9899
|
+
const element = deepCopyElement(templateContent);
|
|
9900
|
+
// Replace placeholders in text content, attributes, and properties
|
|
9901
|
+
element.querySelectorAll('*').forEach(el => {
|
|
9902
|
+
// Replace placeholders in text content
|
|
9903
|
+
this.replacePlaceholdersTextContent(el, cellValue);
|
|
9904
|
+
// Replace placeholders in attributes
|
|
9905
|
+
this.replacePlaceholdersAttributes(el, cellValue);
|
|
9906
|
+
// Replace placeholders in properties
|
|
9907
|
+
this.replacePlaceholdersProperties(el, cellValue);
|
|
9908
|
+
});
|
|
9909
|
+
// Handle `data-bind-event`
|
|
9910
|
+
element.querySelectorAll('[data-bind-event]').forEach(el => {
|
|
9911
|
+
const bindEvent = el.getAttribute('data-bind-event') || '';
|
|
9912
|
+
const splitted = bindEvent.split(':');
|
|
9913
|
+
if (!bindEvent.includes(':') || splitted.length < 2) {
|
|
9914
|
+
console.warn('Invalid data-bind-event format:', bindEvent);
|
|
9915
|
+
return;
|
|
9916
|
+
}
|
|
9917
|
+
const eventType = splitted[0];
|
|
9918
|
+
const keyAction = splitted[1];
|
|
9919
|
+
const details = splitted.length > 2 ? splitted[2] : null;
|
|
9920
|
+
el.addEventListener(eventType, () => {
|
|
9921
|
+
var _a;
|
|
9922
|
+
const keys = (_a = details === null || details === void 0 ? void 0 : details.split(',')) !== null && _a !== void 0 ? _a : [];
|
|
9923
|
+
// Convert keys into a single object instead of an array of objects
|
|
9924
|
+
const keyValue = keys.reduce((acc, key) => {
|
|
9925
|
+
var _a;
|
|
9926
|
+
if (row === null || row === void 0 ? void 0 : row.original) {
|
|
9927
|
+
if (key in row.original) {
|
|
9928
|
+
acc[key] = (_a = row.original) === null || _a === void 0 ? void 0 : _a[key];
|
|
9929
|
+
}
|
|
9930
|
+
}
|
|
9931
|
+
return acc;
|
|
9932
|
+
}, {});
|
|
9933
|
+
const action = { keyAction, details: keyValue };
|
|
9934
|
+
this.action.emit(action);
|
|
9658
9935
|
});
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
const bodySlotRows = this.hasSlotBody
|
|
9667
|
-
? Array.from(bodySlot.querySelectorAll('nv-datagridrow'))
|
|
9668
|
-
: [];
|
|
9669
|
-
const mappedRows = bodySlotRows.map(row => {
|
|
9670
|
-
const cells = Array.from(row.querySelectorAll('nv-datagriddatacell'));
|
|
9671
|
-
return cells.map(cell => {
|
|
9672
|
-
return {
|
|
9673
|
-
accessor: cell.accessor,
|
|
9674
|
-
value: cell.innerHTML,
|
|
9675
|
-
};
|
|
9676
|
-
});
|
|
9936
|
+
});
|
|
9937
|
+
// Ensure Web Components are properly connected
|
|
9938
|
+
setTimeout(() => {
|
|
9939
|
+
element.querySelectorAll('*').forEach(child => {
|
|
9940
|
+
if (typeof child.connectedCallback === 'function') {
|
|
9941
|
+
child.connectedCallback();
|
|
9942
|
+
}
|
|
9677
9943
|
});
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9944
|
+
}, 0);
|
|
9945
|
+
return (hAsync("div", { ref: el => {
|
|
9946
|
+
if (el) {
|
|
9947
|
+
el.innerHTML = ''; // Remove existing content
|
|
9948
|
+
el.appendChild(element); // Append new element
|
|
9949
|
+
}
|
|
9950
|
+
} }));
|
|
9951
|
+
}
|
|
9952
|
+
replaceKeyWithValue(key, cellValue) {
|
|
9953
|
+
var _a;
|
|
9954
|
+
// Handle undefined or null values by returning the fallback
|
|
9955
|
+
if (cellValue === undefined || cellValue === null) {
|
|
9956
|
+
return this.fallbackValue;
|
|
9957
|
+
}
|
|
9958
|
+
// If cellValue is an object, attempt to retrieve the value
|
|
9959
|
+
if (typeof cellValue === 'object') {
|
|
9960
|
+
// Handle nested key paths (e.g., "user.name")
|
|
9961
|
+
if (key.includes('.')) {
|
|
9962
|
+
const resolvedValue = key.split('.').reduce((acc, keyPart) => {
|
|
9963
|
+
if (acc && acc[keyPart] !== undefined) {
|
|
9964
|
+
return acc[keyPart];
|
|
9965
|
+
}
|
|
9966
|
+
else {
|
|
9967
|
+
return undefined;
|
|
9968
|
+
}
|
|
9969
|
+
}, cellValue);
|
|
9970
|
+
if (resolvedValue !== undefined) {
|
|
9971
|
+
return String(resolvedValue);
|
|
9972
|
+
}
|
|
9973
|
+
else {
|
|
9974
|
+
const firstLevelKey = key.split('.')[0];
|
|
9975
|
+
const rest = key.substring(firstLevelKey.length + 1);
|
|
9976
|
+
const response = this.replaceKeyWithValue(rest, cellValue);
|
|
9977
|
+
if (response !== this.fallbackValue) {
|
|
9978
|
+
return response;
|
|
9979
|
+
}
|
|
9980
|
+
}
|
|
9981
|
+
}
|
|
9982
|
+
// Handle single-level key lookup
|
|
9983
|
+
return key in cellValue ? String(cellValue[key]) : this.fallbackValue;
|
|
9684
9984
|
}
|
|
9685
|
-
|
|
9686
|
-
|
|
9985
|
+
// If cellValue is a primitive (string, number, boolean, etc.), return it as a string
|
|
9986
|
+
return (_a = cellValue === null || cellValue === void 0 ? void 0 : cellValue.toString()) !== null && _a !== void 0 ? _a : this.fallbackValue;
|
|
9987
|
+
}
|
|
9988
|
+
replacePlaceholdersTextContent(element, cellValue) {
|
|
9989
|
+
// ✅ Replace placeholders in text content
|
|
9990
|
+
element.childNodes.forEach(node => {
|
|
9991
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
9992
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
9993
|
+
}
|
|
9994
|
+
});
|
|
9995
|
+
}
|
|
9996
|
+
replacePlaceholdersAttributes(element, cellValue) {
|
|
9997
|
+
// ✅ Replace placeholders in attributes
|
|
9998
|
+
Array.from(element.attributes).forEach(attr => {
|
|
9999
|
+
if (attr.value.includes('__')) {
|
|
10000
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
10001
|
+
}
|
|
10002
|
+
});
|
|
10003
|
+
}
|
|
10004
|
+
replacePlaceholdersProperties(element, cellValue) {
|
|
10005
|
+
// ✅ Dynamically extract relevant properties
|
|
10006
|
+
const properties = new Set();
|
|
10007
|
+
// Collect only own enumerable properties
|
|
10008
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
10009
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
10010
|
+
let proto = Object.getPrototypeOf(element);
|
|
10011
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
10012
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
10013
|
+
proto = Object.getPrototypeOf(proto);
|
|
10014
|
+
}
|
|
10015
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
10016
|
+
properties.forEach(prop => {
|
|
10017
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
10018
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
10019
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
10020
|
+
) {
|
|
10021
|
+
try {
|
|
10022
|
+
const propValue = element[prop];
|
|
10023
|
+
// ✅ Replace placeholders only if the value is a string
|
|
10024
|
+
if (typeof propValue === 'string' && propValue.includes('__')) {
|
|
10025
|
+
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue)); // ✅ TypeScript safe
|
|
10026
|
+
}
|
|
10027
|
+
}
|
|
10028
|
+
catch (error) {
|
|
10029
|
+
console.warn(`Could not assign property ${prop}:`, error.message);
|
|
10030
|
+
}
|
|
10031
|
+
}
|
|
10032
|
+
});
|
|
10033
|
+
}
|
|
10034
|
+
//#endregion METHODS
|
|
10035
|
+
/****************************************************************************/
|
|
10036
|
+
//#region WATCHERS
|
|
10037
|
+
parseColumns(newValue, oldValue = []) {
|
|
10038
|
+
this.parseColumnsArray(newValue, oldValue);
|
|
10039
|
+
}
|
|
10040
|
+
parseJsonColumns(newValue, oldValue) {
|
|
10041
|
+
try {
|
|
10042
|
+
const newItems = newValue ? JSON.parse(newValue) : [];
|
|
10043
|
+
this.parseColumnsArray(newItems, oldValue);
|
|
9687
10044
|
}
|
|
9688
|
-
|
|
9689
|
-
|
|
10045
|
+
catch (e) {
|
|
10046
|
+
console.error('Invalid JSON format for columnsJson:', e.message);
|
|
10047
|
+
this.parsedColumns = [];
|
|
9690
10048
|
}
|
|
9691
|
-
|
|
9692
|
-
|
|
10049
|
+
}
|
|
10050
|
+
parseData(newValue, oldValue = []) {
|
|
10051
|
+
this.parseDataArray(newValue, oldValue);
|
|
10052
|
+
}
|
|
10053
|
+
parseJsonData(newValue) {
|
|
10054
|
+
try {
|
|
10055
|
+
const newItems = newValue ? JSON.parse(newValue) : [];
|
|
10056
|
+
this.parseDataArray(newItems, this.parsedData);
|
|
9693
10057
|
}
|
|
9694
|
-
|
|
9695
|
-
|
|
10058
|
+
catch (e) {
|
|
10059
|
+
console.error('Invalid JSON format for dataJson:', e.message);
|
|
10060
|
+
this.parsedData = [];
|
|
9696
10061
|
}
|
|
9697
10062
|
}
|
|
9698
|
-
|
|
10063
|
+
handleParsedChange() {
|
|
9699
10064
|
this.initializeTable();
|
|
9700
10065
|
}
|
|
9701
|
-
//#endregion
|
|
10066
|
+
//#endregion WATCHERS
|
|
10067
|
+
/****************************************************************************/
|
|
10068
|
+
//#region LIFECYCLE
|
|
10069
|
+
componentWillLoad() {
|
|
10070
|
+
this.cacheTemplates();
|
|
10071
|
+
this.parseDataAndColumns();
|
|
10072
|
+
}
|
|
10073
|
+
//#endregion EVENTS
|
|
9702
10074
|
/****************************************************************************/
|
|
9703
10075
|
//#region RENDER
|
|
9704
10076
|
render() {
|
|
9705
10077
|
var _a, _b, _c;
|
|
9706
|
-
const headerGroups = !this.table ||
|
|
9707
|
-
this.table === undefined ||
|
|
9708
|
-
(this.parsedColumns.length === 0 && !this.hasSlotHead)
|
|
10078
|
+
const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
|
|
9709
10079
|
? []
|
|
9710
10080
|
: (_a = this.table) === null || _a === void 0 ? void 0 : _a.getHeaderGroups();
|
|
9711
|
-
const rows = !this.table ||
|
|
9712
|
-
this.table === undefined ||
|
|
9713
|
-
(this.parsedData.length === 0 && !this.hasSlotBody)
|
|
10081
|
+
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
9714
10082
|
? []
|
|
9715
10083
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
9716
|
-
return (hAsync(Host, { key: '
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
: null)), hAsync("tbody", null, !rows || rows.length === 0 ? (hAsync("tr", null, hAsync("td", { colSpan: this.parsedColumns.length || 12 }, this.noDataMessage))) : (rows.map(row => {
|
|
10084
|
+
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
|
|
10085
|
+
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (hAsync("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
10086
|
+
return (hAsync("th", { key: header.id }, header.isPlaceholder
|
|
10087
|
+
? null
|
|
10088
|
+
: this.renderTemplate(this.headerTemplateCache.get(header.id), {}) || header.column.columnDef.header));
|
|
10089
|
+
}))))
|
|
10090
|
+
: 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 => {
|
|
9724
10091
|
const rowId = row.id;
|
|
9725
10092
|
const visibleCells = row === null || row === void 0 ? void 0 : row.getVisibleCells();
|
|
9726
|
-
|
|
10093
|
+
return (hAsync("tr", { key: rowId }, visibleCells.map(cell => {
|
|
10094
|
+
const cellAccessors = cell.column.id;
|
|
9727
10095
|
const cellValue = cell.getValue();
|
|
9728
|
-
return
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
}))))), hAsync("slot", { key: '
|
|
10096
|
+
return (hAsync("td", { key: cell.id, "data-row-id": rowId }, this.renderTemplate(this.templateCache.get(cellAccessors), cellValue, row) ||
|
|
10097
|
+
(cellValue !== null && cellValue !== void 0 ? cellValue : this.fallbackValue)));
|
|
10098
|
+
})));
|
|
10099
|
+
}))))), hAsync("slot", { key: 'e80f9b8a5dbda4c05b719a99c173e2f106449668', name: "after" })));
|
|
9732
10100
|
}
|
|
9733
10101
|
get el() { return getElement(this); }
|
|
9734
10102
|
static get watchers() { return {
|
|
@@ -9744,158 +10112,47 @@ class NvDatagrid {
|
|
|
9744
10112
|
"$flags$": 4,
|
|
9745
10113
|
"$tagName$": "nv-datagrid",
|
|
9746
10114
|
"$members$": {
|
|
9747
|
-
"columns": [16],
|
|
9748
|
-
"columnsJson": [513, "columns-json"],
|
|
9749
10115
|
"data": [16],
|
|
9750
|
-
"
|
|
9751
|
-
"
|
|
9752
|
-
"
|
|
9753
|
-
"
|
|
9754
|
-
"
|
|
9755
|
-
"
|
|
9756
|
-
"
|
|
9757
|
-
"
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
"$lazyBundleId$": "-",
|
|
9761
|
-
"$attrsToReflect$": [["columnsJson", "columns-json"], ["dataJson", "data-json"]]
|
|
9762
|
-
}; }
|
|
9763
|
-
}
|
|
9764
|
-
|
|
9765
|
-
const nvDatagridbodyCss = "";
|
|
9766
|
-
var NvDatagridbodyStyle0 = nvDatagridbodyCss;
|
|
9767
|
-
|
|
9768
|
-
/**
|
|
9769
|
-
* @slot default - Use this slot to insert HTML into the data grid body.
|
|
9770
|
-
*/
|
|
9771
|
-
class NvDatagridbody {
|
|
9772
|
-
constructor(hostRef) {
|
|
9773
|
-
registerInstance(this, hostRef);
|
|
9774
|
-
}
|
|
9775
|
-
/****************************************************************************/
|
|
9776
|
-
//#region RENDER
|
|
9777
|
-
render() {
|
|
9778
|
-
return (hAsync(Host, { key: '320cd537de564c4bf01fcae542ce31101bfe44b4' }, hAsync("tbody", { key: '129bbf16d0ead565084e18de18f6fff32b20bc57' }, hAsync("slot", { key: '6332b104bffa355c82823fd971d389d8cd894462' }))));
|
|
9779
|
-
}
|
|
9780
|
-
static get style() { return NvDatagridbodyStyle0; }
|
|
9781
|
-
static get cmpMeta() { return {
|
|
9782
|
-
"$flags$": 4,
|
|
9783
|
-
"$tagName$": "nv-datagridbody",
|
|
9784
|
-
"$members$": undefined,
|
|
9785
|
-
"$listeners$": undefined,
|
|
9786
|
-
"$lazyBundleId$": "-",
|
|
9787
|
-
"$attrsToReflect$": []
|
|
9788
|
-
}; }
|
|
9789
|
-
}
|
|
9790
|
-
|
|
9791
|
-
const nvDatagridcolumnCss = "";
|
|
9792
|
-
var NvDatagridcolumnStyle0 = nvDatagridcolumnCss;
|
|
9793
|
-
|
|
9794
|
-
/**
|
|
9795
|
-
* @slot default - Use this slot to insert HTML into the data grid column.
|
|
9796
|
-
*/
|
|
9797
|
-
class NvDatagridcolumn {
|
|
9798
|
-
constructor(hostRef) {
|
|
9799
|
-
registerInstance(this, hostRef);
|
|
9800
|
-
}
|
|
9801
|
-
//#endregion PROPERTIES
|
|
9802
|
-
/****************************************************************************/
|
|
9803
|
-
//#region RENDER
|
|
9804
|
-
render() {
|
|
9805
|
-
return (hAsync(Host, { key: '72c6804957273f9ee892b5117ffda50ccf6caff1' }, hAsync("th", { key: 'be6fb9d13310fdc1a4e97824696df2d74746429a' }, hAsync("slot", { key: '43747defd40c561a36ae1151be4bb5b94e84cf61' }))));
|
|
9806
|
-
}
|
|
9807
|
-
static get style() { return NvDatagridcolumnStyle0; }
|
|
9808
|
-
static get cmpMeta() { return {
|
|
9809
|
-
"$flags$": 4,
|
|
9810
|
-
"$tagName$": "nv-datagridcolumn",
|
|
9811
|
-
"$members$": {
|
|
9812
|
-
"header": [1],
|
|
9813
|
-
"accessor": [1]
|
|
9814
|
-
},
|
|
9815
|
-
"$listeners$": undefined,
|
|
9816
|
-
"$lazyBundleId$": "-",
|
|
9817
|
-
"$attrsToReflect$": []
|
|
9818
|
-
}; }
|
|
9819
|
-
}
|
|
9820
|
-
|
|
9821
|
-
const nvDatagriddatacellCss = "";
|
|
9822
|
-
var NvDatagriddatacellStyle0 = nvDatagriddatacellCss;
|
|
9823
|
-
|
|
9824
|
-
/**
|
|
9825
|
-
* @slot default - Use this slot to insert HTML into the data grid data cell.
|
|
9826
|
-
*/
|
|
9827
|
-
class NvDatagriddatacell {
|
|
9828
|
-
constructor(hostRef) {
|
|
9829
|
-
registerInstance(this, hostRef);
|
|
9830
|
-
}
|
|
9831
|
-
//#endregion PROPERTIES
|
|
9832
|
-
/****************************************************************************/
|
|
9833
|
-
//#region RENDER
|
|
9834
|
-
render() {
|
|
9835
|
-
return (hAsync(Host, { key: '808a7972c4075e1ef597d3e31e6a706a4de99479' }, hAsync("td", { key: 'af904343b51c9596d73d2d59ec32048b16f3421e' }, hAsync("slot", { key: '75ca8b01948e726e140f2def6e3931fe79bed361' }))));
|
|
9836
|
-
}
|
|
9837
|
-
static get style() { return NvDatagriddatacellStyle0; }
|
|
9838
|
-
static get cmpMeta() { return {
|
|
9839
|
-
"$flags$": 4,
|
|
9840
|
-
"$tagName$": "nv-datagriddatacell",
|
|
9841
|
-
"$members$": {
|
|
9842
|
-
"accessor": [1]
|
|
9843
|
-
},
|
|
9844
|
-
"$listeners$": undefined,
|
|
9845
|
-
"$lazyBundleId$": "-",
|
|
9846
|
-
"$attrsToReflect$": []
|
|
9847
|
-
}; }
|
|
9848
|
-
}
|
|
9849
|
-
|
|
9850
|
-
const nvDatagridheadCss = "";
|
|
9851
|
-
var NvDatagridheadStyle0 = nvDatagridheadCss;
|
|
9852
|
-
|
|
9853
|
-
/**
|
|
9854
|
-
* @slot default - Use this slot to insert HTML into the table head.
|
|
9855
|
-
*/
|
|
9856
|
-
class NvDatagridhead {
|
|
9857
|
-
constructor(hostRef) {
|
|
9858
|
-
registerInstance(this, hostRef);
|
|
9859
|
-
}
|
|
9860
|
-
/****************************************************************************/
|
|
9861
|
-
//#region RENDER
|
|
9862
|
-
render() {
|
|
9863
|
-
return (hAsync(Host, { key: 'cbb3dd0506a8ccfe2372452f8e7f1c199fc6cdf8' }, hAsync("thead", { key: 'f97f4214f934bd5fe71f6e4dd09dd3eb702fe5fa' }, hAsync("slot", { key: '88565733fe01bc8ad83849254a38f0610bcc0a50' }))));
|
|
9864
|
-
}
|
|
9865
|
-
static get style() { return NvDatagridheadStyle0; }
|
|
9866
|
-
static get cmpMeta() { return {
|
|
9867
|
-
"$flags$": 4,
|
|
9868
|
-
"$tagName$": "nv-datagridhead",
|
|
9869
|
-
"$members$": undefined,
|
|
10116
|
+
"columns": [16],
|
|
10117
|
+
"dataJson": [513, "data-json"],
|
|
10118
|
+
"columnsJson": [513, "columns-json"],
|
|
10119
|
+
"fallbackValue": [513, "fallback-value"],
|
|
10120
|
+
"noDataMessage": [513, "no-data-message"],
|
|
10121
|
+
"noColumnsNoDataMessage": [513, "no-columns-no-data-message"],
|
|
10122
|
+
"table": [32],
|
|
10123
|
+
"parsedColumns": [32],
|
|
10124
|
+
"parsedData": [32]
|
|
10125
|
+
},
|
|
9870
10126
|
"$listeners$": undefined,
|
|
9871
10127
|
"$lazyBundleId$": "-",
|
|
9872
|
-
"$attrsToReflect$": []
|
|
10128
|
+
"$attrsToReflect$": [["dataJson", "data-json"], ["columnsJson", "columns-json"], ["fallbackValue", "fallback-value"], ["noDataMessage", "no-data-message"], ["noColumnsNoDataMessage", "no-columns-no-data-message"]]
|
|
9873
10129
|
}; }
|
|
9874
10130
|
}
|
|
9875
10131
|
|
|
9876
|
-
const nvDatagridrowCss = "";
|
|
9877
|
-
var NvDatagridrowStyle0 = nvDatagridrowCss;
|
|
9878
|
-
|
|
9879
10132
|
/**
|
|
9880
|
-
* @slot
|
|
10133
|
+
* @slot header - Defines how to render the header of the column.
|
|
10134
|
+
* @slot cell - Defines how to render every cell of the column.
|
|
9881
10135
|
*/
|
|
9882
|
-
class
|
|
10136
|
+
class NvDatagridcolumn {
|
|
9883
10137
|
constructor(hostRef) {
|
|
9884
10138
|
registerInstance(this, hostRef);
|
|
9885
10139
|
}
|
|
10140
|
+
//#endregion PROPERTIES
|
|
9886
10141
|
/****************************************************************************/
|
|
9887
10142
|
//#region RENDER
|
|
9888
10143
|
render() {
|
|
9889
|
-
return (hAsync(Host, { key: '
|
|
10144
|
+
return (hAsync(Host, { key: '1a87ebe6794014751ac7c7be1cc95c50cb76866f' }, hAsync("slot", { key: 'edfdc5c83a9627a407d41f655faf7202a89abe4a', name: "header" }), hAsync("slot", { key: '45c8b495ae5fccc39faf67dabe23ed0571aaf713', name: "cell" })));
|
|
9890
10145
|
}
|
|
9891
|
-
static get style() { return NvDatagridrowStyle0; }
|
|
9892
10146
|
static get cmpMeta() { return {
|
|
9893
10147
|
"$flags$": 4,
|
|
9894
|
-
"$tagName$": "nv-
|
|
9895
|
-
"$members$":
|
|
10148
|
+
"$tagName$": "nv-datagridcolumn",
|
|
10149
|
+
"$members$": {
|
|
10150
|
+
"header": [513],
|
|
10151
|
+
"accessor": [513]
|
|
10152
|
+
},
|
|
9896
10153
|
"$listeners$": undefined,
|
|
9897
10154
|
"$lazyBundleId$": "-",
|
|
9898
|
-
"$attrsToReflect$": []
|
|
10155
|
+
"$attrsToReflect$": [["header", "header"], ["accessor", "accessor"]]
|
|
9899
10156
|
}; }
|
|
9900
10157
|
}
|
|
9901
10158
|
|
|
@@ -10479,12 +10736,6 @@ class NvDialog {
|
|
|
10479
10736
|
* If true, the dialog will be closed when the backdrop is clicked.
|
|
10480
10737
|
*/
|
|
10481
10738
|
this.clickOutside = false;
|
|
10482
|
-
/**
|
|
10483
|
-
* Controls the dialog's autofocus behavior. When false (default), the dialog will
|
|
10484
|
-
* automatically focus the first focusable element. When true, automatic focus is
|
|
10485
|
-
* disabled and you must manually set focus on an element for accessibility compliance.
|
|
10486
|
-
*/
|
|
10487
|
-
this.manualFocus = false;
|
|
10488
10739
|
/**
|
|
10489
10740
|
* If true, the dialog visibility is managed manually through methods or the open prop.
|
|
10490
10741
|
*/
|
|
@@ -10509,6 +10760,7 @@ class NvDialog {
|
|
|
10509
10760
|
* Handles the dialog close event.
|
|
10510
10761
|
*/
|
|
10511
10762
|
this.handleDialogClose = () => {
|
|
10763
|
+
this.hide();
|
|
10512
10764
|
this.close.emit();
|
|
10513
10765
|
};
|
|
10514
10766
|
this.handleClickOutside = (event) => {
|
|
@@ -10596,7 +10848,6 @@ class NvDialog {
|
|
|
10596
10848
|
}
|
|
10597
10849
|
/**
|
|
10598
10850
|
* Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.
|
|
10599
|
-
|
|
10600
10851
|
* @param {KeyboardEvent} event - The keydown event.
|
|
10601
10852
|
*/
|
|
10602
10853
|
handleKeyDown(event) {
|
|
@@ -10654,6 +10905,20 @@ class NvDialog {
|
|
|
10654
10905
|
return (child.getAttribute('slot') === 'footer' ||
|
|
10655
10906
|
child.tagName.toLowerCase() === 'nv-dialogfooter');
|
|
10656
10907
|
});
|
|
10908
|
+
// If no form ID is provided, check if there's a form and generate an ID
|
|
10909
|
+
if (!this.form) {
|
|
10910
|
+
const formElement = Array.from(this.el.children).find(child => {
|
|
10911
|
+
return child.tagName.toLowerCase() === 'form';
|
|
10912
|
+
});
|
|
10913
|
+
if (formElement) {
|
|
10914
|
+
if (!formElement.id) {
|
|
10915
|
+
formElement.id = `dialog-form-${Math.random()
|
|
10916
|
+
.toString(36)
|
|
10917
|
+
.substring(2, 11)}`;
|
|
10918
|
+
}
|
|
10919
|
+
this.form = formElement.id;
|
|
10920
|
+
}
|
|
10921
|
+
}
|
|
10657
10922
|
}
|
|
10658
10923
|
componentWillUpdate() {
|
|
10659
10924
|
this.attachEventListeners();
|
|
@@ -10662,7 +10927,8 @@ class NvDialog {
|
|
|
10662
10927
|
if (this.open) {
|
|
10663
10928
|
this.show();
|
|
10664
10929
|
}
|
|
10665
|
-
if
|
|
10930
|
+
// Check if any element already has autofocus before setting it automatically
|
|
10931
|
+
if (!this.dialogElement.querySelector('[autofocus]')) {
|
|
10666
10932
|
this.setAutofocus();
|
|
10667
10933
|
}
|
|
10668
10934
|
this.attachEventListeners();
|
|
@@ -10675,7 +10941,8 @@ class NvDialog {
|
|
|
10675
10941
|
/****************************************************************************/
|
|
10676
10942
|
//#region RENDER
|
|
10677
10943
|
render() {
|
|
10678
|
-
|
|
10944
|
+
const hasForm = this.form || this.el.querySelector('form');
|
|
10945
|
+
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 }))))));
|
|
10679
10946
|
}
|
|
10680
10947
|
get el() { return getElement(this); }
|
|
10681
10948
|
static get watchers() { return {
|
|
@@ -10692,7 +10959,6 @@ class NvDialog {
|
|
|
10692
10959
|
"open": [1540],
|
|
10693
10960
|
"undismissable": [516],
|
|
10694
10961
|
"clickOutside": [516, "click-outside"],
|
|
10695
|
-
"manualFocus": [516, "manual-focus"],
|
|
10696
10962
|
"controlled": [516],
|
|
10697
10963
|
"full": [516],
|
|
10698
10964
|
"show": [64],
|
|
@@ -10700,7 +10966,7 @@ class NvDialog {
|
|
|
10700
10966
|
},
|
|
10701
10967
|
"$listeners$": [[4, "keydown", "handleKeyDown"], [4, "click", "handleDocumentClick"], [5, "touchstart", "handleDocumentTouch"]],
|
|
10702
10968
|
"$lazyBundleId$": "-",
|
|
10703
|
-
"$attrsToReflect$": [["open", "open"], ["undismissable", "undismissable"], ["clickOutside", "click-outside"], ["
|
|
10969
|
+
"$attrsToReflect$": [["open", "open"], ["undismissable", "undismissable"], ["clickOutside", "click-outside"], ["controlled", "controlled"], ["full", "full"]]
|
|
10704
10970
|
}; }
|
|
10705
10971
|
}
|
|
10706
10972
|
|
|
@@ -10714,7 +10980,7 @@ class NvDialogfooter {
|
|
|
10714
10980
|
constructor(hostRef) {
|
|
10715
10981
|
registerInstance(this, hostRef);
|
|
10716
10982
|
this.nvDialogCanceled = createEvent(this, "nvDialogCanceled", 7);
|
|
10717
|
-
this.
|
|
10983
|
+
this.nvDialogPrimaryClicked = createEvent(this, "nvDialogPrimaryClicked", 7);
|
|
10718
10984
|
if (hostRef.$hostElement$["s-ei"]) {
|
|
10719
10985
|
this.internals = hostRef.$hostElement$["s-ei"];
|
|
10720
10986
|
}
|
|
@@ -10726,7 +10992,7 @@ class NvDialogfooter {
|
|
|
10726
10992
|
/****************************************************************************/
|
|
10727
10993
|
//#region PROPERTIES
|
|
10728
10994
|
/**
|
|
10729
|
-
* Disables the
|
|
10995
|
+
* Disables the primary button, preventing user interaction.
|
|
10730
10996
|
*/
|
|
10731
10997
|
this.disabled = false;
|
|
10732
10998
|
/**
|
|
@@ -10735,15 +11001,15 @@ class NvDialogfooter {
|
|
|
10735
11001
|
*/
|
|
10736
11002
|
this.undismissable = false;
|
|
10737
11003
|
/**
|
|
10738
|
-
* Sets the leading icon for the
|
|
11004
|
+
* Sets the leading icon for the primary button.
|
|
10739
11005
|
*/
|
|
10740
11006
|
this.leadingIcon = '';
|
|
10741
11007
|
/**
|
|
10742
|
-
* Sets the trailing icon for the
|
|
11008
|
+
* Sets the trailing icon for the primary button.
|
|
10743
11009
|
*/
|
|
10744
11010
|
this.trailingIcon = '';
|
|
10745
11011
|
/**
|
|
10746
|
-
* Sets the danger state for the
|
|
11012
|
+
* Sets the danger state for the primary button.
|
|
10747
11013
|
*/
|
|
10748
11014
|
this.danger = false;
|
|
10749
11015
|
/**
|
|
@@ -10751,19 +11017,23 @@ class NvDialogfooter {
|
|
|
10751
11017
|
*/
|
|
10752
11018
|
this.cancelLabel = 'Cancel';
|
|
10753
11019
|
/**
|
|
10754
|
-
* Sets the label for the
|
|
11020
|
+
* Sets the label for the primary button.
|
|
11021
|
+
*/
|
|
11022
|
+
this.primaryLabel = 'Primary';
|
|
11023
|
+
/**
|
|
11024
|
+
* Sets the type of the primary button.
|
|
10755
11025
|
*/
|
|
10756
|
-
this.
|
|
11026
|
+
this.primaryButtonType = ButtonType.Button;
|
|
10757
11027
|
//#endregion EVENTS
|
|
10758
11028
|
/****************************************************************************/
|
|
10759
11029
|
//#region METHODS
|
|
10760
11030
|
/**
|
|
10761
|
-
* Handles the
|
|
11031
|
+
* Handles the primary action when the primary button is clicked.
|
|
10762
11032
|
* @param {Event} event - The click event.
|
|
10763
11033
|
*/
|
|
10764
|
-
this.
|
|
11034
|
+
this.handlePrimary = (event) => {
|
|
10765
11035
|
event.stopPropagation();
|
|
10766
|
-
this.
|
|
11036
|
+
this.nvDialogPrimaryClicked.emit();
|
|
10767
11037
|
};
|
|
10768
11038
|
/**
|
|
10769
11039
|
* Handles the cancel action when the cancel button is clicked. This will close the dialog.
|
|
@@ -10788,7 +11058,7 @@ class NvDialogfooter {
|
|
|
10788
11058
|
/****************************************************************************/
|
|
10789
11059
|
//#region RENDER
|
|
10790
11060
|
render() {
|
|
10791
|
-
return (hAsync(Host, { key: '
|
|
11061
|
+
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))));
|
|
10792
11062
|
}
|
|
10793
11063
|
static get formAssociated() { return true; }
|
|
10794
11064
|
get el() { return getElement(this); }
|
|
@@ -10803,11 +11073,13 @@ class NvDialogfooter {
|
|
|
10803
11073
|
"trailingIcon": [513, "trailing-icon"],
|
|
10804
11074
|
"danger": [516],
|
|
10805
11075
|
"cancelLabel": [513, "cancel-label"],
|
|
10806
|
-
"
|
|
11076
|
+
"primaryLabel": [513, "primary-label"],
|
|
11077
|
+
"primaryButtonType": [513, "primary-button-type"],
|
|
11078
|
+
"form": [513]
|
|
10807
11079
|
},
|
|
10808
11080
|
"$listeners$": undefined,
|
|
10809
11081
|
"$lazyBundleId$": "-",
|
|
10810
|
-
"$attrsToReflect$": [["disabled", "disabled"], ["undismissable", "undismissable"], ["leadingIcon", "leading-icon"], ["trailingIcon", "trailing-icon"], ["danger", "danger"], ["cancelLabel", "cancel-label"], ["
|
|
11082
|
+
"$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"]]
|
|
10811
11083
|
}; }
|
|
10812
11084
|
}
|
|
10813
11085
|
|
|
@@ -10842,7 +11114,7 @@ class NvDialogheader {
|
|
|
10842
11114
|
/****************************************************************************/
|
|
10843
11115
|
//#region RENDER
|
|
10844
11116
|
render() {
|
|
10845
|
-
return (hAsync(Host, { key: '
|
|
11117
|
+
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))));
|
|
10846
11118
|
}
|
|
10847
11119
|
get el() { return getElement(this); }
|
|
10848
11120
|
static get style() { return NvDialogheaderStyle0; }
|
|
@@ -11041,13 +11313,13 @@ class NvFieldcheckbox {
|
|
|
11041
11313
|
/****************************************************************************/
|
|
11042
11314
|
//#region RENDER
|
|
11043
11315
|
render() {
|
|
11044
|
-
return (hAsync(Host, { key: '
|
|
11316
|
+
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 => {
|
|
11045
11317
|
if (el) {
|
|
11046
11318
|
el.indeterminate = this.indeterminate;
|
|
11047
11319
|
}
|
|
11048
|
-
} }), hAsync("span", { key: '
|
|
11049
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
11050
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
11320
|
+
} }), 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 ||
|
|
11321
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '042d606ba3c4f22b469ec583423bb3fc1abf6a2e', class: "description" }, hAsync("slot", { key: 'c3de1a16b43fe2045f82068e921a2b6cc80afe3d', name: "description" }, this.description))), (this.errorDescription ||
|
|
11322
|
+
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))))));
|
|
11051
11323
|
}
|
|
11052
11324
|
static get formAssociated() { return true; }
|
|
11053
11325
|
get el() { return getElement(this); }
|
|
@@ -11474,9 +11746,9 @@ class NvFielddropdown {
|
|
|
11474
11746
|
/****************************************************************************/
|
|
11475
11747
|
//#region RENDER
|
|
11476
11748
|
render() {
|
|
11477
|
-
return (hAsync(Host, { key: '
|
|
11478
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
11479
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
11749
|
+
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 ||
|
|
11750
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '5c544bc17cfd3ddcb5f1d30f87f09cd3c9b3f253', class: "description" }, hAsync("slot", { key: 'b9cb63d0d32b0bff891b3fb2762934166dfe7e83', name: "description" }, this.description))), (this.errorDescription ||
|
|
11751
|
+
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)))));
|
|
11480
11752
|
}
|
|
11481
11753
|
static get formAssociated() { return true; }
|
|
11482
11754
|
get el() { return getElement(this); }
|
|
@@ -11580,7 +11852,7 @@ class NvFielddropdownitem {
|
|
|
11580
11852
|
/****************************************************************************/
|
|
11581
11853
|
//#region RENDER
|
|
11582
11854
|
render() {
|
|
11583
|
-
return (hAsync(Host, { key: '
|
|
11855
|
+
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" }))));
|
|
11584
11856
|
}
|
|
11585
11857
|
get el() { return getElement(this); }
|
|
11586
11858
|
static get style() { return NvFielddropdownitemStyle0; }
|
|
@@ -11634,7 +11906,7 @@ class NvFielddropdownitemcheck {
|
|
|
11634
11906
|
};
|
|
11635
11907
|
}
|
|
11636
11908
|
render() {
|
|
11637
|
-
return (hAsync(Host, { key: '
|
|
11909
|
+
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 }))));
|
|
11638
11910
|
}
|
|
11639
11911
|
get el() { return getElement(this); }
|
|
11640
11912
|
static get style() { return NvFielddropdownitemcheckStyle0; }
|
|
@@ -12876,9 +13148,9 @@ class NvFieldnumber {
|
|
|
12876
13148
|
/****************************************************************************/
|
|
12877
13149
|
//#region RENDER
|
|
12878
13150
|
render() {
|
|
12879
|
-
return (hAsync(Host, { key: '
|
|
12880
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
12881
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13151
|
+
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 ||
|
|
13152
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '56488d6b2c0fd5a171345e8e401a15a218eb2d20', class: "description" }, hAsync("slot", { key: 'bb3ee834416cd2fd3cc8f774854a2e1a279bd1c2', name: "description" }, this.description))), (this.errorDescription ||
|
|
13153
|
+
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)))));
|
|
12882
13154
|
}
|
|
12883
13155
|
static get formAssociated() { return true; }
|
|
12884
13156
|
get el() { return getElement(this); }
|
|
@@ -13027,9 +13299,9 @@ class NvFieldpassword {
|
|
|
13027
13299
|
/****************************************************************************/
|
|
13028
13300
|
//#region RENDER
|
|
13029
13301
|
render() {
|
|
13030
|
-
return (hAsync(Host, { key: '
|
|
13031
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
13032
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13302
|
+
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 ||
|
|
13303
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '940bb21f81d7da297aeee0c8b3ca682e12431cea', class: "description" }, hAsync("slot", { key: 'ee8714f0b933911e6ec2681d70c3ae12457cc800', name: "description" }, this.description))), (this.errorDescription ||
|
|
13304
|
+
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)))));
|
|
13033
13305
|
}
|
|
13034
13306
|
static get formAssociated() { return true; }
|
|
13035
13307
|
get el() { return getElement(this); }
|
|
@@ -13156,9 +13428,9 @@ class NvFieldradio {
|
|
|
13156
13428
|
/****************************************************************************/
|
|
13157
13429
|
//#region RENDER
|
|
13158
13430
|
render() {
|
|
13159
|
-
return (hAsync(Host, { key: '
|
|
13160
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
13161
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13431
|
+
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 ||
|
|
13432
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '1cbb1103296356ee3bc90b559be905514cc3ae9b', class: "description" }, hAsync("slot", { key: 'caac6f4b9d306051def069b2634f3ae06c3c0f58', name: "description" }, this.description))), (this.errorDescription ||
|
|
13433
|
+
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))))));
|
|
13162
13434
|
}
|
|
13163
13435
|
static get formAssociated() { return true; }
|
|
13164
13436
|
get el() { return getElement(this); }
|
|
@@ -13538,13 +13810,13 @@ class NvFieldselect {
|
|
|
13538
13810
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
13539
13811
|
*/
|
|
13540
13812
|
render() {
|
|
13541
|
-
return (hAsync(Host, { key: '
|
|
13813
|
+
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
|
|
13542
13814
|
? `${this.inputId}-error`
|
|
13543
|
-
: `${this.inputId}-description` })), hAsync("select", { key: '
|
|
13815
|
+
: `${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
|
|
13544
13816
|
? `${this.inputId}-error`
|
|
13545
|
-
: `${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: '
|
|
13546
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
13547
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13817
|
+
: `${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 ||
|
|
13818
|
+
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 ||
|
|
13819
|
+
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)))));
|
|
13548
13820
|
}
|
|
13549
13821
|
static get formAssociated() { return true; }
|
|
13550
13822
|
get el() { return getElement(this); }
|
|
@@ -13697,9 +13969,9 @@ class NvFieldtext {
|
|
|
13697
13969
|
/****************************************************************************/
|
|
13698
13970
|
//#region RENDER
|
|
13699
13971
|
render() {
|
|
13700
|
-
return (hAsync(Host, { key: '
|
|
13701
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
13702
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13972
|
+
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 ||
|
|
13973
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '73d919c7d25ae8f2cedc5c6af9a6b63a1c90bdb3', class: "description" }, hAsync("slot", { key: 'a1956415fd5a6cd4f4b04cabbcfa9d6572d575dc', name: "description" }, this.description))), (this.errorDescription ||
|
|
13974
|
+
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)))));
|
|
13703
13975
|
}
|
|
13704
13976
|
static get formAssociated() { return true; }
|
|
13705
13977
|
get el() { return getElement(this); }
|
|
@@ -13914,9 +14186,9 @@ class NvFieldtextarea {
|
|
|
13914
14186
|
/****************************************************************************/
|
|
13915
14187
|
//#region RENDER
|
|
13916
14188
|
render() {
|
|
13917
|
-
return (hAsync(Host, { key: '
|
|
13918
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
13919
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
14189
|
+
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 ||
|
|
14190
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'b2303204093639b126cd368aab3f3d8dc168666c', class: "description" }, hAsync("slot", { key: '5ecadb6919f664bc4ffa728a26c8797da6adef73', name: "description" }, this.description))), (this.errorDescription ||
|
|
14191
|
+
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)))));
|
|
13920
14192
|
}
|
|
13921
14193
|
static get formAssociated() { return true; }
|
|
13922
14194
|
get el() { return getElement(this); }
|
|
@@ -14940,26 +15212,26 @@ class NvFieldtime {
|
|
|
14940
15212
|
}, key: `${option}-${index}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
14941
15213
|
}
|
|
14942
15214
|
render() {
|
|
14943
|
-
return (hAsync(Host, { key: '
|
|
14944
|
-
hAsync("input", { key: '
|
|
15215
|
+
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') && [
|
|
15216
|
+
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
|
|
14945
15217
|
? `${TimeType.Hours}-${this.name}`
|
|
14946
15218
|
: TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
14947
15219
|
], this.format.includes('mm') && [
|
|
14948
|
-
hAsync("span", { key: '
|
|
14949
|
-
hAsync("input", { key: '
|
|
15220
|
+
hAsync("span", { key: 'f5c39484de41e16b9f990b1e265a33ccacefef40' }, ":"),
|
|
15221
|
+
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
|
|
14950
15222
|
? `${TimeType.Minutes}-${this.name}`
|
|
14951
15223
|
: TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
14952
15224
|
], this.format.includes('ss') && [
|
|
14953
|
-
hAsync("span", { key: '
|
|
14954
|
-
hAsync("input", { key: '
|
|
15225
|
+
hAsync("span", { key: 'a99d42e6e6a158202db6951e8af53d293db33539' }, ":"),
|
|
15226
|
+
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
|
|
14955
15227
|
? `${TimeType.Seconds}-${this.name}`
|
|
14956
15228
|
: TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
14957
|
-
], hAsync("nv-iconbutton", { key: '
|
|
15229
|
+
], 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') &&
|
|
14958
15230
|
this.RenderTimeOptionsColumn(TimeType.Hours), this.format.includes('mm') &&
|
|
14959
15231
|
this.RenderTimeOptionsColumn(TimeType.Minutes), this.format.includes('ss') &&
|
|
14960
15232
|
this.RenderTimeOptionsColumn(TimeType.Seconds)))), (this.description ||
|
|
14961
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
14962
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
15233
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'f2cf7dbff2676d1310f77cab254bdd3c429b4ebe', class: "description" }, hAsync("slot", { key: '4a17bc105869db3a2745685529714bcb144c539c', name: "description" }, this.description))), (this.errorDescription ||
|
|
15234
|
+
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)))));
|
|
14963
15235
|
}
|
|
14964
15236
|
static get formAssociated() { return true; }
|
|
14965
15237
|
get el() { return getElement(this); }
|
|
@@ -15024,7 +15296,7 @@ class NvIcon {
|
|
|
15024
15296
|
/**
|
|
15025
15297
|
* Adjust the size of the icon to fit your design needs.
|
|
15026
15298
|
*/
|
|
15027
|
-
this.size =
|
|
15299
|
+
this.size = 'md';
|
|
15028
15300
|
}
|
|
15029
15301
|
/**
|
|
15030
15302
|
* Ensures the icon sprite is loaded into the document.
|
|
@@ -15064,7 +15336,7 @@ class NvIcon {
|
|
|
15064
15336
|
/****************************************************************************/
|
|
15065
15337
|
//#region RENDER
|
|
15066
15338
|
render() {
|
|
15067
|
-
return (hAsync(Host, { key: '
|
|
15339
|
+
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}` }))));
|
|
15068
15340
|
}
|
|
15069
15341
|
static get style() { return NvIconStyle0; }
|
|
15070
15342
|
static get cmpMeta() { return {
|
|
@@ -15193,7 +15465,7 @@ class NvIconbutton {
|
|
|
15193
15465
|
/****************************************************************************/
|
|
15194
15466
|
//#region RENDER
|
|
15195
15467
|
render() {
|
|
15196
|
-
return (hAsync(Host, { key: '
|
|
15468
|
+
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' })));
|
|
15197
15469
|
}
|
|
15198
15470
|
static get formAssociated() { return true; }
|
|
15199
15471
|
get el() { return getElement(this); }
|
|
@@ -15241,7 +15513,7 @@ class NvLoader {
|
|
|
15241
15513
|
//#region RENDER
|
|
15242
15514
|
/* <slot> empty to force rendering change */
|
|
15243
15515
|
render() {
|
|
15244
|
-
return (hAsync(Host, { key: '
|
|
15516
|
+
return (hAsync(Host, { key: '3061eccded64d25321cd49c2a03e1117779f61c0', class: clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
15245
15517
|
}
|
|
15246
15518
|
static get style() { return NvLoaderStyle0; }
|
|
15247
15519
|
static get cmpMeta() { return {
|
|
@@ -15291,7 +15563,7 @@ class NvMenu {
|
|
|
15291
15563
|
* below, to the sides). If there isn’t enough room, it will adjust its
|
|
15292
15564
|
* position on the axis to fit on the screen, so users can always see it.
|
|
15293
15565
|
*/
|
|
15294
|
-
this.placement =
|
|
15566
|
+
this.placement = 'bottom-end';
|
|
15295
15567
|
/**
|
|
15296
15568
|
* Parsed items stored in state.
|
|
15297
15569
|
*/
|
|
@@ -15473,7 +15745,7 @@ class NvMenu {
|
|
|
15473
15745
|
});
|
|
15474
15746
|
}
|
|
15475
15747
|
render() {
|
|
15476
|
-
return (hAsync(Host, { key: '
|
|
15748
|
+
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" })))));
|
|
15477
15749
|
}
|
|
15478
15750
|
get el() { return getElement(this); }
|
|
15479
15751
|
static get watchers() { return {
|
|
@@ -15548,7 +15820,7 @@ class NvMenuitem {
|
|
|
15548
15820
|
/****************************************************************************/
|
|
15549
15821
|
//#region RENDER
|
|
15550
15822
|
render() {
|
|
15551
|
-
return (hAsync(Host, { key: '
|
|
15823
|
+
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" })));
|
|
15552
15824
|
}
|
|
15553
15825
|
get el() { return getElement(this); }
|
|
15554
15826
|
static get style() { return NvMenuitemStyle0; }
|
|
@@ -17917,7 +18189,7 @@ class NvPopover {
|
|
|
17917
18189
|
/****************************************************************************/
|
|
17918
18190
|
//#region RENDER
|
|
17919
18191
|
render() {
|
|
17920
|
-
return (hAsync(Host, { key: '
|
|
18192
|
+
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" }))));
|
|
17921
18193
|
}
|
|
17922
18194
|
get el() { return getElement(this); }
|
|
17923
18195
|
static get watchers() { return {
|
|
@@ -17962,7 +18234,7 @@ class NvRow {
|
|
|
17962
18234
|
/****************************************************************************/
|
|
17963
18235
|
//#region RENDER
|
|
17964
18236
|
render() {
|
|
17965
|
-
return (hAsync(Host, { key: '
|
|
18237
|
+
return (hAsync(Host, { key: '9baad27eb331d2e0d68be8cb2e3dd2cacc7f913c' }, hAsync("slot", { key: 'f346a7568b71a1de72ddc7c36bbf0df21f8e9968' })));
|
|
17966
18238
|
}
|
|
17967
18239
|
static get style() { return NvRowStyle0; }
|
|
17968
18240
|
static get cmpMeta() { return {
|
|
@@ -17997,7 +18269,7 @@ class NvStack {
|
|
|
17997
18269
|
/****************************************************************************/
|
|
17998
18270
|
//#region RENDER
|
|
17999
18271
|
render() {
|
|
18000
|
-
return (hAsync(Host, { key: '
|
|
18272
|
+
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' })));
|
|
18001
18273
|
}
|
|
18002
18274
|
static get style() { return NvStackStyle0; }
|
|
18003
18275
|
static get cmpMeta() { return {
|
|
@@ -18016,46 +18288,42 @@ class NvStack {
|
|
|
18016
18288
|
}; }
|
|
18017
18289
|
}
|
|
18018
18290
|
|
|
18019
|
-
const nvTableCss = "nv-table table{border-collapse:collapse;border-color:inherit;text-indent:0}";
|
|
18291
|
+
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)}";
|
|
18020
18292
|
var NvTableStyle0 = nvTableCss;
|
|
18021
18293
|
|
|
18022
18294
|
/**
|
|
18023
|
-
* @slot default -
|
|
18024
|
-
* @slot head - Use this slot to insert HTML into the table header.
|
|
18295
|
+
* @slot default - Slot for the composed table columns
|
|
18025
18296
|
* @slot before - Use this slot to insert HTML before the table.
|
|
18026
18297
|
* @slot after - Use this slot to insert HTML after the table.
|
|
18027
|
-
* @slot body - Use this slot to insert HTML into the table body.
|
|
18028
|
-
*
|
|
18029
|
-
* @deprecated [EXPERIMENTAL]
|
|
18030
|
-
* @experimental - This component is still under development and is not ready for use.
|
|
18031
18298
|
*/
|
|
18032
18299
|
class NvTable {
|
|
18033
18300
|
constructor(hostRef) {
|
|
18034
18301
|
registerInstance(this, hostRef);
|
|
18302
|
+
this.action = createEvent(this, "action", 7);
|
|
18303
|
+
this.templateCache = new Map();
|
|
18304
|
+
this.headerTemplateCache = new Map();
|
|
18035
18305
|
/****************************************************************************/
|
|
18036
18306
|
//#region STATES
|
|
18037
|
-
this.parsedColumns = [];
|
|
18038
|
-
this.parsedData = [];
|
|
18039
|
-
this.
|
|
18040
|
-
this.hasSlotBody = false;
|
|
18307
|
+
this.parsedColumns = [];
|
|
18308
|
+
this.parsedData = [];
|
|
18309
|
+
this.table = null;
|
|
18041
18310
|
//#endregion STATES
|
|
18042
18311
|
/****************************************************************************/
|
|
18043
18312
|
//#region PROPERTIES
|
|
18044
18313
|
/**
|
|
18045
|
-
*
|
|
18046
|
-
* @example ['Name', 'Age', 'Email']
|
|
18047
|
-
* @default []
|
|
18314
|
+
* Data to be displayed in the table
|
|
18048
18315
|
*/
|
|
18049
|
-
this.
|
|
18316
|
+
this.data = [];
|
|
18050
18317
|
/**
|
|
18051
|
-
*
|
|
18052
|
-
* @example [{ name: 'Alice', age: 25, email: 'alice@mail.com' }, { name: 'Bob', age: 30, email: 'bob@mail.com' }]
|
|
18053
|
-
* @default []
|
|
18318
|
+
* Configuration of the columns of the table
|
|
18054
18319
|
*/
|
|
18055
|
-
this.
|
|
18320
|
+
this.columnsConfig = [];
|
|
18056
18321
|
/**
|
|
18057
|
-
*
|
|
18058
|
-
|
|
18322
|
+
* Fallback value to be displayed when data is not available
|
|
18323
|
+
*/
|
|
18324
|
+
this.fallbackValue = 'N/A';
|
|
18325
|
+
/**
|
|
18326
|
+
* Message to be displayed when no data is available
|
|
18059
18327
|
*/
|
|
18060
18328
|
this.noDataMessage = 'No data available';
|
|
18061
18329
|
/**
|
|
@@ -18066,17 +18334,239 @@ class NvTable {
|
|
|
18066
18334
|
}
|
|
18067
18335
|
//#endregion PROPERTIES
|
|
18068
18336
|
/****************************************************************************/
|
|
18337
|
+
//#region METHODS
|
|
18338
|
+
/**
|
|
18339
|
+
* Caches templates for cells and headers upfront to improve performance.
|
|
18340
|
+
*/
|
|
18341
|
+
cacheTemplates() {
|
|
18342
|
+
const columns = Array.from(this.el.querySelectorAll('nv-tablecolumn'));
|
|
18343
|
+
columns.forEach((col) => {
|
|
18344
|
+
const key = col.name;
|
|
18345
|
+
const cellSlot = col.querySelector('[slot="cell"]');
|
|
18346
|
+
if (cellSlot) {
|
|
18347
|
+
const element = deepCopyElement(cellSlot);
|
|
18348
|
+
this.templateCache.set(key, element);
|
|
18349
|
+
}
|
|
18350
|
+
const headerSlot = col.querySelector('[slot="header"]');
|
|
18351
|
+
if (headerSlot) {
|
|
18352
|
+
const element = deepCopyElement(headerSlot);
|
|
18353
|
+
this.headerTemplateCache.set(key, element);
|
|
18354
|
+
}
|
|
18355
|
+
else {
|
|
18356
|
+
const header = col.header;
|
|
18357
|
+
if (header) {
|
|
18358
|
+
const headerDiv = document.createElement('div');
|
|
18359
|
+
headerDiv.textContent = header;
|
|
18360
|
+
this.headerTemplateCache.set(key, headerDiv);
|
|
18361
|
+
}
|
|
18362
|
+
}
|
|
18363
|
+
});
|
|
18364
|
+
}
|
|
18365
|
+
parseDataAndColumns() {
|
|
18366
|
+
if (this.dataJson) {
|
|
18367
|
+
this.parseJsonData(this.dataJson);
|
|
18368
|
+
}
|
|
18369
|
+
else if (this.data && this.data.length > 0) {
|
|
18370
|
+
this.parseDataArray(this.data, this.parsedData);
|
|
18371
|
+
}
|
|
18372
|
+
if (this.columnsConfigJson) {
|
|
18373
|
+
this.parseJsonColumns(this.columnsConfigJson, this.parsedColumns);
|
|
18374
|
+
}
|
|
18375
|
+
else if (this.columnsConfig && this.columnsConfig.length > 0) {
|
|
18376
|
+
this.parseColumnsArray(this.columnsConfig, this.parsedColumns);
|
|
18377
|
+
}
|
|
18378
|
+
else if (this.headerTemplateCache.size > 0) {
|
|
18379
|
+
const headerKeys = Array.from(this.headerTemplateCache.keys());
|
|
18380
|
+
const arrayColumnsConfig = headerKeys.map(key => (Object.assign({}, { name: key, header: key ? key.charAt(0).toUpperCase() + key.slice(1) : '' })));
|
|
18381
|
+
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
18382
|
+
}
|
|
18383
|
+
else if (this.parsedData.length > 0) {
|
|
18384
|
+
const firstRow = this.parsedData[0];
|
|
18385
|
+
const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
|
|
18386
|
+
name: key,
|
|
18387
|
+
header: key.charAt(0).toUpperCase() + key.slice(1),
|
|
18388
|
+
}));
|
|
18389
|
+
this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);
|
|
18390
|
+
}
|
|
18391
|
+
}
|
|
18392
|
+
deepEqual(a, b) {
|
|
18393
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
18394
|
+
}
|
|
18395
|
+
/**
|
|
18396
|
+
* Parses the data array and sets the state accordingly
|
|
18397
|
+
* @param {any[]} newValue - New value of the data array
|
|
18398
|
+
* @param {any[]} oldValue - Old value of the data array
|
|
18399
|
+
* @returns {void}
|
|
18400
|
+
*/
|
|
18401
|
+
parseDataArray(newValue, oldValue) {
|
|
18402
|
+
// Ensure both are arrays for proper comparison
|
|
18403
|
+
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
18404
|
+
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
18405
|
+
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
18406
|
+
return; // Deep comparison
|
|
18407
|
+
}
|
|
18408
|
+
this.parsedData = Array.isArray(newValue) ? newValue : [];
|
|
18409
|
+
}
|
|
18410
|
+
/**
|
|
18411
|
+
* Parses the columns array and sets the state accordingly
|
|
18412
|
+
* @param {ColumnConfig[]} newValue - New value of the columns array
|
|
18413
|
+
* @param {ColumnConfig[]} oldValue - Old value of the columns array
|
|
18414
|
+
* @returns {void}
|
|
18415
|
+
*/
|
|
18416
|
+
parseColumnsArray(newValue, oldValue) {
|
|
18417
|
+
// Ensure both are arrays for proper comparison
|
|
18418
|
+
const safeNewValue = Array.isArray(newValue) ? newValue : [];
|
|
18419
|
+
const safeOldValue = Array.isArray(oldValue) ? oldValue : [];
|
|
18420
|
+
// Use a proper deep comparison function (e.g., Lodash's isEqual)
|
|
18421
|
+
if (this.deepEqual(safeNewValue, safeOldValue)) {
|
|
18422
|
+
return;
|
|
18423
|
+
}
|
|
18424
|
+
// Assign only after confirming changes
|
|
18425
|
+
this.parsedColumns = safeNewValue;
|
|
18426
|
+
}
|
|
18427
|
+
initializeTable() {
|
|
18428
|
+
// Clear the previous table instance (if any)
|
|
18429
|
+
this.table = null;
|
|
18430
|
+
if (this.parsedColumns.length > 0) {
|
|
18431
|
+
this.table = {
|
|
18432
|
+
columns: this.parsedColumns,
|
|
18433
|
+
data: this.getTableData(),
|
|
18434
|
+
};
|
|
18435
|
+
}
|
|
18436
|
+
else {
|
|
18437
|
+
this.table = null;
|
|
18438
|
+
}
|
|
18439
|
+
}
|
|
18440
|
+
getTableData() {
|
|
18441
|
+
if (this.parsedData &&
|
|
18442
|
+
Array.isArray(this.parsedData) &&
|
|
18443
|
+
this.parsedData.length > 0) {
|
|
18444
|
+
return [...this.parsedData];
|
|
18445
|
+
}
|
|
18446
|
+
else {
|
|
18447
|
+
return [];
|
|
18448
|
+
}
|
|
18449
|
+
}
|
|
18450
|
+
// Helper function to get nested property value
|
|
18451
|
+
replaceKeyWithValue(obj, path) {
|
|
18452
|
+
var _a;
|
|
18453
|
+
return ((_a = path
|
|
18454
|
+
.split('.')
|
|
18455
|
+
.reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj)) !== null && _a !== void 0 ? _a : this.fallbackValue);
|
|
18456
|
+
}
|
|
18457
|
+
renderTemplate(template, row) {
|
|
18458
|
+
if (!template) {
|
|
18459
|
+
return null;
|
|
18460
|
+
}
|
|
18461
|
+
// Handle <template> elements correctly
|
|
18462
|
+
const templateContent = template instanceof HTMLTemplateElement ? template.content : template;
|
|
18463
|
+
const element = deepCopyElement(templateContent);
|
|
18464
|
+
// Replace placeholders in text content, attributes, and properties
|
|
18465
|
+
element.querySelectorAll('*').forEach(el => {
|
|
18466
|
+
// Replace placeholders in text content
|
|
18467
|
+
this.replacePlaceholdersTextContent(el, row);
|
|
18468
|
+
// Replace placeholders in attributes
|
|
18469
|
+
this.replacePlaceholdersAttributes(el, row);
|
|
18470
|
+
// Replace placeholders in properties
|
|
18471
|
+
this.replacePlaceholdersProperties(el, row);
|
|
18472
|
+
});
|
|
18473
|
+
// Handle `data-bind-event`
|
|
18474
|
+
element.querySelectorAll('[data-bind-event]').forEach(el => {
|
|
18475
|
+
const bindEvent = el.getAttribute('data-bind-event') || '';
|
|
18476
|
+
const splitted = bindEvent.split(':');
|
|
18477
|
+
if (!bindEvent.includes(':') || splitted.length < 2) {
|
|
18478
|
+
console.warn('Invalid data-bind-event format:', bindEvent);
|
|
18479
|
+
return;
|
|
18480
|
+
}
|
|
18481
|
+
const eventType = splitted[0];
|
|
18482
|
+
const keyAction = splitted[1];
|
|
18483
|
+
const details = splitted.length > 2 ? splitted[2] : null;
|
|
18484
|
+
el.addEventListener(eventType, () => {
|
|
18485
|
+
var _a;
|
|
18486
|
+
const keys = (_a = details === null || details === void 0 ? void 0 : details.split(',')) !== null && _a !== void 0 ? _a : [];
|
|
18487
|
+
// Convert keys into a single object instead of an array of objects
|
|
18488
|
+
const keyValue = keys.reduce((acc, key) => {
|
|
18489
|
+
acc[key] = row === null || row === void 0 ? void 0 : row[key];
|
|
18490
|
+
return acc;
|
|
18491
|
+
}, {});
|
|
18492
|
+
const action = { keyAction, details: keyValue };
|
|
18493
|
+
this.action.emit(action);
|
|
18494
|
+
});
|
|
18495
|
+
});
|
|
18496
|
+
// Ensure Web Components are properly connected
|
|
18497
|
+
setTimeout(() => {
|
|
18498
|
+
element.querySelectorAll('*').forEach(child => {
|
|
18499
|
+
if (typeof child.connectedCallback === 'function') {
|
|
18500
|
+
child.connectedCallback();
|
|
18501
|
+
}
|
|
18502
|
+
});
|
|
18503
|
+
}, 0);
|
|
18504
|
+
return (hAsync("div", { ref: el => {
|
|
18505
|
+
if (el) {
|
|
18506
|
+
el.innerHTML = ''; // Remove existing content
|
|
18507
|
+
el.appendChild(element); // Append new element
|
|
18508
|
+
}
|
|
18509
|
+
} }));
|
|
18510
|
+
}
|
|
18511
|
+
replacePlaceholdersTextContent(element, row) {
|
|
18512
|
+
// ✅ Replace placeholders in text content
|
|
18513
|
+
element.childNodes.forEach(node => {
|
|
18514
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
18515
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(row, key));
|
|
18516
|
+
}
|
|
18517
|
+
});
|
|
18518
|
+
}
|
|
18519
|
+
replacePlaceholdersAttributes(element, row) {
|
|
18520
|
+
// ✅ Replace placeholders in attributes
|
|
18521
|
+
Array.from(element.attributes).forEach(attr => {
|
|
18522
|
+
if (attr.value.includes('__')) {
|
|
18523
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(row, key));
|
|
18524
|
+
}
|
|
18525
|
+
});
|
|
18526
|
+
}
|
|
18527
|
+
replacePlaceholdersProperties(element, row) {
|
|
18528
|
+
// ✅ Dynamically extract relevant properties
|
|
18529
|
+
const properties = new Set();
|
|
18530
|
+
// Collect only own enumerable properties
|
|
18531
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
18532
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
18533
|
+
let proto = Object.getPrototypeOf(element);
|
|
18534
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
18535
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
18536
|
+
proto = Object.getPrototypeOf(proto);
|
|
18537
|
+
}
|
|
18538
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
18539
|
+
properties.forEach(prop => {
|
|
18540
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
18541
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
18542
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
18543
|
+
) {
|
|
18544
|
+
try {
|
|
18545
|
+
const value = element[prop];
|
|
18546
|
+
// ✅ Replace placeholders only if the value is a string
|
|
18547
|
+
if (typeof value === 'string' && value.includes('__')) {
|
|
18548
|
+
element[prop] = value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(row, key)); // ✅ TypeScript safe
|
|
18549
|
+
}
|
|
18550
|
+
}
|
|
18551
|
+
catch (error) {
|
|
18552
|
+
console.warn(`Could not assign property ${prop}:`, error.message);
|
|
18553
|
+
}
|
|
18554
|
+
}
|
|
18555
|
+
});
|
|
18556
|
+
}
|
|
18557
|
+
//#endregion METHODS
|
|
18558
|
+
/****************************************************************************/
|
|
18069
18559
|
//#region WATCHERS
|
|
18070
18560
|
parseColumns(newValue, oldValue) {
|
|
18071
18561
|
this.parseColumnsArray(newValue, oldValue);
|
|
18072
18562
|
}
|
|
18073
|
-
parseJsonColumns(newValue) {
|
|
18563
|
+
parseJsonColumns(newValue, oldValue) {
|
|
18074
18564
|
try {
|
|
18075
18565
|
const newItems = newValue ? JSON.parse(newValue) : [];
|
|
18076
|
-
this.parseColumnsArray(newItems,
|
|
18566
|
+
this.parseColumnsArray(newItems, oldValue);
|
|
18077
18567
|
}
|
|
18078
18568
|
catch (e) {
|
|
18079
|
-
console.error('Invalid JSON format for
|
|
18569
|
+
console.error('Invalid JSON format for columnsConfigJson:', e.message);
|
|
18080
18570
|
this.parsedColumns = [];
|
|
18081
18571
|
}
|
|
18082
18572
|
}
|
|
@@ -18093,277 +18583,86 @@ class NvTable {
|
|
|
18093
18583
|
this.parsedData = [];
|
|
18094
18584
|
}
|
|
18095
18585
|
}
|
|
18096
|
-
|
|
18097
|
-
|
|
18098
|
-
//#region METHODS
|
|
18099
|
-
/**
|
|
18100
|
-
* Parses the columns array.
|
|
18101
|
-
* @param {string[]} newValue - The new value of the columns array.
|
|
18102
|
-
* @param {string[]} oldValue - The old value of the columns array.
|
|
18103
|
-
*/
|
|
18104
|
-
parseColumnsArray(newValue, oldValue) {
|
|
18105
|
-
if (JSON.stringify(newValue) === JSON.stringify(oldValue))
|
|
18106
|
-
return; // Deep comparison
|
|
18107
|
-
this.parsedColumns = Array.isArray(newValue) ? newValue : [];
|
|
18108
|
-
}
|
|
18109
|
-
/**
|
|
18110
|
-
* Parses the data array.
|
|
18111
|
-
* @param {any[]} newValue - The new value of the data array.
|
|
18112
|
-
* @param {any[]} oldValue - The old value of the data array.
|
|
18113
|
-
*/
|
|
18114
|
-
parseDataArray(newValue, oldValue) {
|
|
18115
|
-
if (JSON.stringify(newValue) === JSON.stringify(oldValue))
|
|
18116
|
-
return; // Deep comparison
|
|
18117
|
-
this.parsedData = Array.isArray(newValue) ? newValue : [];
|
|
18586
|
+
handleParsedChange() {
|
|
18587
|
+
this.initializeTable();
|
|
18118
18588
|
}
|
|
18119
|
-
//#endregion
|
|
18589
|
+
//#endregion WATCHERS
|
|
18120
18590
|
/****************************************************************************/
|
|
18121
18591
|
//#region LIFECYCLE
|
|
18122
18592
|
componentWillLoad() {
|
|
18123
|
-
this.
|
|
18124
|
-
this.
|
|
18125
|
-
if (this.columnsJson) {
|
|
18126
|
-
this.parseJsonColumns(this.columnsJson);
|
|
18127
|
-
}
|
|
18128
|
-
else {
|
|
18129
|
-
this.parseColumns(this.columns, this.parsedColumns);
|
|
18130
|
-
}
|
|
18131
|
-
if (this.dataJson) {
|
|
18132
|
-
this.parseJsonData(this.dataJson);
|
|
18133
|
-
}
|
|
18134
|
-
else {
|
|
18135
|
-
this.parseData(this.data, this.parsedData);
|
|
18136
|
-
}
|
|
18593
|
+
this.cacheTemplates();
|
|
18594
|
+
this.parseDataAndColumns();
|
|
18137
18595
|
}
|
|
18138
|
-
//#endregion
|
|
18596
|
+
//#endregion EVENTS
|
|
18139
18597
|
/****************************************************************************/
|
|
18140
18598
|
//#region RENDER
|
|
18141
18599
|
render() {
|
|
18142
|
-
const
|
|
18143
|
-
?
|
|
18144
|
-
|
|
18145
|
-
|
|
18146
|
-
|
|
18147
|
-
|
|
18148
|
-
|
|
18149
|
-
|
|
18150
|
-
.
|
|
18151
|
-
:
|
|
18152
|
-
|
|
18153
|
-
this.
|
|
18154
|
-
|
|
18155
|
-
|
|
18156
|
-
const cells = Array.from(row.querySelectorAll('nv-tablecolumn'));
|
|
18157
|
-
return (hAsync("tr", null, cells.map(cell => (hAsync("th", { colSpan: cell.colspan, rowSpan: cell.rowspan, headers: cell.headers, scope: cell.scope, innerHTML: cell.innerHTML })))));
|
|
18158
|
-
}))) : 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
|
|
18159
|
-
? this.parsedColumns.map(column => (hAsync("td", null, row[column.toLowerCase()] || '')))
|
|
18160
|
-
: Object.values(row).map(value => hAsync("td", null, value)))))) : bodyRows.length > 0 ? (bodyRows.map(row => {
|
|
18161
|
-
const cells = Array.from(row.querySelectorAll('nv-tabledatacell'));
|
|
18162
|
-
return (hAsync("tr", null, cells.map(cell => (hAsync("td", { colSpan: cell.colspan, rowSpan: cell.rowspan, headers: cell.headers, innerHTML: cell.innerHTML })))));
|
|
18163
|
-
})) : null))), hAsync("slot", { key: 'd24abb3236e2d1019d2316da1d1cc2f19d33902b', name: "after" })));
|
|
18600
|
+
const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
|
|
18601
|
+
? []
|
|
18602
|
+
: this.table.columns;
|
|
18603
|
+
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
18604
|
+
? []
|
|
18605
|
+
: this.table.data;
|
|
18606
|
+
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 &&
|
|
18607
|
+
headerGroups.map(col => {
|
|
18608
|
+
return (hAsync("th", { key: col.name }, this.renderTemplate(this.headerTemplateCache.get(col.name), {}) || col.header));
|
|
18609
|
+
})))), 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 => {
|
|
18610
|
+
var _a;
|
|
18611
|
+
return (hAsync("td", null, this.renderTemplate(this.templateCache.get(col.name), row) ||
|
|
18612
|
+
((_a = row[col.name]) !== null && _a !== void 0 ? _a : this.fallbackValue)));
|
|
18613
|
+
})))))))), hAsync("slot", { key: 'b4b5a8442f3a6982fb6d268c8b076a4d361b933c', name: "after" })));
|
|
18164
18614
|
}
|
|
18165
18615
|
get el() { return getElement(this); }
|
|
18166
18616
|
static get watchers() { return {
|
|
18167
|
-
"
|
|
18168
|
-
"
|
|
18617
|
+
"columnsConfig": ["parseColumns"],
|
|
18618
|
+
"columnsConfigJson": ["parseJsonColumns"],
|
|
18169
18619
|
"data": ["parseData"],
|
|
18170
|
-
"dataJson": ["parseJsonData"]
|
|
18620
|
+
"dataJson": ["parseJsonData"],
|
|
18621
|
+
"parsedColumns": ["handleParsedChange"],
|
|
18622
|
+
"parsedData": ["handleParsedChange"]
|
|
18171
18623
|
}; }
|
|
18172
18624
|
static get style() { return NvTableStyle0; }
|
|
18173
18625
|
static get cmpMeta() { return {
|
|
18174
18626
|
"$flags$": 4,
|
|
18175
18627
|
"$tagName$": "nv-table",
|
|
18176
18628
|
"$members$": {
|
|
18177
|
-
"columns": [16],
|
|
18178
|
-
"columnsJson": [513, "columns-json"],
|
|
18179
18629
|
"data": [16],
|
|
18630
|
+
"columnsConfig": [16],
|
|
18180
18631
|
"dataJson": [513, "data-json"],
|
|
18181
|
-
"
|
|
18182
|
-
"
|
|
18632
|
+
"columnsConfigJson": [513, "columns-config-json"],
|
|
18633
|
+
"fallbackValue": [513, "fallback-value"],
|
|
18634
|
+
"noDataMessage": [513, "no-data-message"],
|
|
18635
|
+
"noColumnsNoDataMessage": [513, "no-columns-no-data-message"],
|
|
18183
18636
|
"parsedColumns": [32],
|
|
18184
18637
|
"parsedData": [32],
|
|
18185
|
-
"
|
|
18186
|
-
"hasSlotBody": [32]
|
|
18638
|
+
"table": [32]
|
|
18187
18639
|
},
|
|
18188
18640
|
"$listeners$": undefined,
|
|
18189
18641
|
"$lazyBundleId$": "-",
|
|
18190
|
-
"$attrsToReflect$": [["
|
|
18191
|
-
}; }
|
|
18192
|
-
}
|
|
18193
|
-
|
|
18194
|
-
const nvTablebodyCss = "";
|
|
18195
|
-
var NvTablebodyStyle0 = nvTablebodyCss;
|
|
18196
|
-
|
|
18197
|
-
/**
|
|
18198
|
-
* @slot default - Use this slot to insert HTML into the table body.
|
|
18199
|
-
*/
|
|
18200
|
-
class NvTablebody {
|
|
18201
|
-
constructor(hostRef) {
|
|
18202
|
-
registerInstance(this, hostRef);
|
|
18203
|
-
}
|
|
18204
|
-
/****************************************************************************/
|
|
18205
|
-
//#region RENDER
|
|
18206
|
-
render() {
|
|
18207
|
-
return (hAsync(Host, { key: 'cdf37e086d4194bdcb941942226d17ba38ec7dc7' }, hAsync("tbody", { key: '3a8f72860faed461685b8184aeb274eec59188ba' }, hAsync("slot", { key: 'f7450cf4858bc7452e4cb840ac7e06e5848dc75f' }))));
|
|
18208
|
-
}
|
|
18209
|
-
static get style() { return NvTablebodyStyle0; }
|
|
18210
|
-
static get cmpMeta() { return {
|
|
18211
|
-
"$flags$": 4,
|
|
18212
|
-
"$tagName$": "nv-tablebody",
|
|
18213
|
-
"$members$": undefined,
|
|
18214
|
-
"$listeners$": undefined,
|
|
18215
|
-
"$lazyBundleId$": "-",
|
|
18216
|
-
"$attrsToReflect$": []
|
|
18642
|
+
"$attrsToReflect$": [["dataJson", "data-json"], ["columnsConfigJson", "columns-config-json"], ["fallbackValue", "fallback-value"], ["noDataMessage", "no-data-message"], ["noColumnsNoDataMessage", "no-columns-no-data-message"]]
|
|
18217
18643
|
}; }
|
|
18218
18644
|
}
|
|
18219
18645
|
|
|
18220
|
-
const nvTablecolumnCss = "";
|
|
18221
|
-
var NvTablecolumnStyle0 = nvTablecolumnCss;
|
|
18222
|
-
|
|
18223
|
-
/**
|
|
18224
|
-
* @slot default - Use this slot to insert HTML into the table column.
|
|
18225
|
-
*/
|
|
18226
18646
|
class NvTablecolumn {
|
|
18227
18647
|
constructor(hostRef) {
|
|
18228
18648
|
registerInstance(this, hostRef);
|
|
18229
|
-
/**
|
|
18230
|
-
* A non-negative integer value indicating how many columns the header cell spans
|
|
18231
|
-
* or extends. The default value is 1. User agents dismiss values higher than 1000
|
|
18232
|
-
* as incorrect, defaulting such values to 1.
|
|
18233
|
-
* @default 1
|
|
18234
|
-
*/
|
|
18235
|
-
this.colspan = 1;
|
|
18236
|
-
/**
|
|
18237
|
-
* A non-negative integer value indicating how many rows the header cell spans or
|
|
18238
|
-
* extends. The default value is 1; if its value is set to 0, the header cell will
|
|
18239
|
-
* extends to the end of the table grouping section (`<thead>`, `<tbody>`, `<tfoot>`,
|
|
18240
|
-
* even if implicitly defined), that the `<th>` belongs to. Values higher than 65534
|
|
18241
|
-
* are clipped at 65534.
|
|
18242
|
-
* @default 1
|
|
18243
|
-
*/
|
|
18244
|
-
this.rowspan = 1;
|
|
18245
18649
|
}
|
|
18246
18650
|
//#endregion PROPERTIES
|
|
18247
18651
|
/****************************************************************************/
|
|
18248
18652
|
//#region RENDER
|
|
18249
18653
|
render() {
|
|
18250
|
-
return
|
|
18654
|
+
return null;
|
|
18251
18655
|
}
|
|
18252
|
-
static get style() { return NvTablecolumnStyle0; }
|
|
18253
18656
|
static get cmpMeta() { return {
|
|
18254
|
-
"$flags$":
|
|
18657
|
+
"$flags$": 0,
|
|
18255
18658
|
"$tagName$": "nv-tablecolumn",
|
|
18256
18659
|
"$members$": {
|
|
18257
|
-
"
|
|
18258
|
-
"
|
|
18259
|
-
"rowspan": [2],
|
|
18260
|
-
"headers": [1],
|
|
18261
|
-
"scope": [1]
|
|
18262
|
-
},
|
|
18263
|
-
"$listeners$": undefined,
|
|
18264
|
-
"$lazyBundleId$": "-",
|
|
18265
|
-
"$attrsToReflect$": []
|
|
18266
|
-
}; }
|
|
18267
|
-
}
|
|
18268
|
-
|
|
18269
|
-
const nvTabledatacellCss = "";
|
|
18270
|
-
var NvTabledatacellStyle0 = nvTabledatacellCss;
|
|
18271
|
-
|
|
18272
|
-
/**
|
|
18273
|
-
* @slot default - Use this slot to insert HTML into the table data cell.
|
|
18274
|
-
*/
|
|
18275
|
-
class NvTabledatacell {
|
|
18276
|
-
constructor(hostRef) {
|
|
18277
|
-
registerInstance(this, hostRef);
|
|
18278
|
-
/****************************************************************************/
|
|
18279
|
-
//#region PROPERTIES
|
|
18280
|
-
/**
|
|
18281
|
-
* Contains a non-negative integer value that indicates how many columns the data
|
|
18282
|
-
* cell spans or extends. The default value is 1. User agents dismiss values higher
|
|
18283
|
-
* than 1000 as incorrect, setting to the default value (1).
|
|
18284
|
-
* @default 1
|
|
18285
|
-
*/
|
|
18286
|
-
this.colspan = 1;
|
|
18287
|
-
/**
|
|
18288
|
-
* Contains a non-negative integer value that indicates for how many rows the data
|
|
18289
|
-
* cell spans or extends. The default value is 1; if its value is set to 0, it
|
|
18290
|
-
* extends until the end of the table grouping section (`<thead>`, `<tbody>`,
|
|
18291
|
-
* `<tfoot>`, even if implicitly defined), that the cell belongs to. Values higher
|
|
18292
|
-
* than 65534 are clipped to 65534.
|
|
18293
|
-
* @default 1
|
|
18294
|
-
*/
|
|
18295
|
-
this.rowspan = 1;
|
|
18296
|
-
}
|
|
18297
|
-
//#endregion PROPERTIES
|
|
18298
|
-
/****************************************************************************/
|
|
18299
|
-
//#region RENDER
|
|
18300
|
-
render() {
|
|
18301
|
-
return (hAsync(Host, { key: 'fa4aaa160d405696e80897cb1cb0ec051468d150' }, hAsync("td", { key: '9d25cf82d40c0416142b22c286445358316e1e64', colSpan: this.colspan, rowSpan: this.rowspan, headers: this.headers }, hAsync("slot", { key: 'ecc470509926b5641e39cc8b3ed6e96e247e41fc' }))));
|
|
18302
|
-
}
|
|
18303
|
-
static get style() { return NvTabledatacellStyle0; }
|
|
18304
|
-
static get cmpMeta() { return {
|
|
18305
|
-
"$flags$": 4,
|
|
18306
|
-
"$tagName$": "nv-tabledatacell",
|
|
18307
|
-
"$members$": {
|
|
18308
|
-
"colspan": [2],
|
|
18309
|
-
"rowspan": [2],
|
|
18310
|
-
"headers": [1]
|
|
18660
|
+
"name": [513],
|
|
18661
|
+
"header": [513]
|
|
18311
18662
|
},
|
|
18312
18663
|
"$listeners$": undefined,
|
|
18313
18664
|
"$lazyBundleId$": "-",
|
|
18314
|
-
"$attrsToReflect$": []
|
|
18315
|
-
}; }
|
|
18316
|
-
}
|
|
18317
|
-
|
|
18318
|
-
const nvTableheadCss = "";
|
|
18319
|
-
var NvTableheadStyle0 = nvTableheadCss;
|
|
18320
|
-
|
|
18321
|
-
/**
|
|
18322
|
-
* @slot default - Use this slot to insert HTML into the table head.
|
|
18323
|
-
*/
|
|
18324
|
-
class NvTablehead {
|
|
18325
|
-
constructor(hostRef) {
|
|
18326
|
-
registerInstance(this, hostRef);
|
|
18327
|
-
}
|
|
18328
|
-
/****************************************************************************/
|
|
18329
|
-
//#region RENDER
|
|
18330
|
-
render() {
|
|
18331
|
-
return (hAsync(Host, { key: '89e28d2e09f6c5521ed3a06cd3d4674b238a384c' }, hAsync("thead", { key: 'fc9629c1d7af5e96f14d7c6b05d4e42618471f07' }, hAsync("slot", { key: 'bfc72494b0f3fe32153143a9099e4917c1ab77d5' }))));
|
|
18332
|
-
}
|
|
18333
|
-
static get style() { return NvTableheadStyle0; }
|
|
18334
|
-
static get cmpMeta() { return {
|
|
18335
|
-
"$flags$": 4,
|
|
18336
|
-
"$tagName$": "nv-tablehead",
|
|
18337
|
-
"$members$": undefined,
|
|
18338
|
-
"$listeners$": undefined,
|
|
18339
|
-
"$lazyBundleId$": "-",
|
|
18340
|
-
"$attrsToReflect$": []
|
|
18341
|
-
}; }
|
|
18342
|
-
}
|
|
18343
|
-
|
|
18344
|
-
const nvTablerowCss = "";
|
|
18345
|
-
var NvTablerowStyle0 = nvTablerowCss;
|
|
18346
|
-
|
|
18347
|
-
/**
|
|
18348
|
-
* @slot default - Use this slot to insert HTML into the table row.
|
|
18349
|
-
*/
|
|
18350
|
-
class NvTablerow {
|
|
18351
|
-
constructor(hostRef) {
|
|
18352
|
-
registerInstance(this, hostRef);
|
|
18353
|
-
}
|
|
18354
|
-
/****************************************************************************/
|
|
18355
|
-
//#region RENDER
|
|
18356
|
-
render() {
|
|
18357
|
-
return (hAsync(Host, { key: '5887cd3c2bda63bc177f7faf735ebade9b0bdc49' }, hAsync("tr", { key: '4b5b73272bbb87683d04e5838e52bdd4ff7b441b' }, hAsync("slot", { key: 'bc8d620194b9e73efefe6acdf7473e481d6bdef3' }))));
|
|
18358
|
-
}
|
|
18359
|
-
static get style() { return NvTablerowStyle0; }
|
|
18360
|
-
static get cmpMeta() { return {
|
|
18361
|
-
"$flags$": 4,
|
|
18362
|
-
"$tagName$": "nv-tablerow",
|
|
18363
|
-
"$members$": undefined,
|
|
18364
|
-
"$listeners$": undefined,
|
|
18365
|
-
"$lazyBundleId$": "-",
|
|
18366
|
-
"$attrsToReflect$": []
|
|
18665
|
+
"$attrsToReflect$": [["name", "name"], ["header", "header"]]
|
|
18367
18666
|
}; }
|
|
18368
18667
|
}
|
|
18369
18668
|
|
|
@@ -18431,8 +18730,8 @@ class NvToggle {
|
|
|
18431
18730
|
/****************************************************************************/
|
|
18432
18731
|
//#region RENDER
|
|
18433
18732
|
render() {
|
|
18434
|
-
return (hAsync(Host, { key: '
|
|
18435
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
18733
|
+
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 ||
|
|
18734
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'db77b501162725dcf3b05b3d7c4b26d0f933ac8b', class: "description" }, hAsync("slot", { key: 'a201c736b5237e88ee0d8caa3999874caa7f85f3', name: "description" }, this.description))))));
|
|
18436
18735
|
}
|
|
18437
18736
|
static get formAssociated() { return true; }
|
|
18438
18737
|
get el() { return getElement(this); }
|
|
@@ -18497,7 +18796,7 @@ class NvTooltip {
|
|
|
18497
18796
|
/****************************************************************************/
|
|
18498
18797
|
//#region RENDER
|
|
18499
18798
|
render() {
|
|
18500
|
-
return (hAsync(Host, { key: '
|
|
18799
|
+
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" }))));
|
|
18501
18800
|
}
|
|
18502
18801
|
get el() { return getElement(this); }
|
|
18503
18802
|
static get style() { return NvTooltipStyle0; }
|
|
@@ -18527,11 +18826,7 @@ registerComponents([
|
|
|
18527
18826
|
NvCalendar,
|
|
18528
18827
|
NvCol,
|
|
18529
18828
|
NvDatagrid,
|
|
18530
|
-
NvDatagridbody,
|
|
18531
18829
|
NvDatagridcolumn,
|
|
18532
|
-
NvDatagriddatacell,
|
|
18533
|
-
NvDatagridhead,
|
|
18534
|
-
NvDatagridrow,
|
|
18535
18830
|
NvDialog,
|
|
18536
18831
|
NvDialogfooter,
|
|
18537
18832
|
NvDialogheader,
|
|
@@ -18556,11 +18851,7 @@ registerComponents([
|
|
|
18556
18851
|
NvRow,
|
|
18557
18852
|
NvStack,
|
|
18558
18853
|
NvTable,
|
|
18559
|
-
NvTablebody,
|
|
18560
18854
|
NvTablecolumn,
|
|
18561
|
-
NvTabledatacell,
|
|
18562
|
-
NvTablehead,
|
|
18563
|
-
NvTablerow,
|
|
18564
18855
|
NvToggle,
|
|
18565
18856
|
NvTooltip,
|
|
18566
18857
|
]);
|