@nova-design-system/nova-webcomponents 3.0.0-beta.46 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-9bda5507.js +0 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +48 -19
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +351 -91
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
- package/dist/cjs/nv-fielddate.cjs.entry.js +5 -5
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +4 -4
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +15 -29
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +28 -71
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +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 +9 -9
- package/dist/cjs/nv-icon.cjs.entry.js +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +16 -42
- package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
- package/dist/collection/components/nv-button/nv-button.js +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js +0 -9
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +48 -19
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +542 -75
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +366 -95
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +5 -5
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +4 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +8 -8
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +22 -39
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +6 -6
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +35 -85
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +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 +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.docs.js +3 -3
- package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +31 -59
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.docs.js +7 -6
- package/dist/collection/components/nv-stack/nv-stack.docs.js.map +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js.map +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +3 -3
- package/dist/components/nv-breadcrumbs.js +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +359 -94
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridcolumn.js +1 -1
- package/dist/components/nv-dialog.js +6 -6
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +12 -12
- package/dist/components/nv-fielddaterange.js +11 -11
- package/dist/components/nv-fielddropdown.js +21 -36
- package/dist/components/nv-fielddropdown.js.map +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +36 -81
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +6 -6
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +6 -6
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +8 -8
- package/dist/components/nv-fieldtext.js +4 -4
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +13 -13
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +21 -50
- package/dist/components/nv-menu.js.map +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-stack.js.map +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-d88ced51.js → p-02752770.js} +2 -2
- package/dist/components/{p-d88ced51.js.map → p-02752770.js.map} +1 -1
- package/dist/components/{p-7b89fb48.js → p-150daf68.js} +2 -2
- package/dist/components/{p-7b89fb48.js.map → p-150daf68.js.map} +1 -1
- package/dist/components/{p-56ef8131.js → p-2012b8ba.js} +3 -3
- package/dist/components/{p-56ef8131.js.map → p-2012b8ba.js.map} +1 -1
- package/dist/components/{p-8674c7af.js → p-2d9ba7d3.js} +3 -3
- package/dist/components/{p-8674c7af.js.map → p-2d9ba7d3.js.map} +1 -1
- package/dist/components/{p-5a5f11c2.js → p-373926aa.js} +2 -2
- package/dist/components/{p-5a5f11c2.js.map → p-373926aa.js.map} +1 -1
- package/dist/components/{p-dcabc6fa.js → p-4d3ec142.js} +3 -3
- package/dist/components/{p-dcabc6fa.js.map → p-4d3ec142.js.map} +1 -1
- package/dist/components/{p-91b58443.js → p-591730e7.js} +2 -2
- package/dist/components/{p-91b58443.js.map → p-591730e7.js.map} +1 -1
- package/dist/components/{p-b4768da6.js → p-6c364a23.js} +5 -5
- package/dist/components/{p-b4768da6.js.map → p-6c364a23.js.map} +1 -1
- package/dist/components/{p-f469df15.js → p-a30b55fc.js} +2 -2
- package/dist/components/{p-f469df15.js.map → p-a30b55fc.js.map} +1 -1
- package/dist/components/{p-664c5a14.js → p-b7b78e64.js} +2 -2
- package/dist/components/{p-664c5a14.js.map → p-b7b78e64.js.map} +1 -1
- package/dist/components/{p-8c5a861b.js → p-c14f6b8e.js} +3 -3
- package/dist/components/{p-8c5a861b.js.map → p-c14f6b8e.js.map} +1 -1
- package/dist/components/{p-a9e1bf70.js → p-dc3faba3.js} +4 -4
- package/dist/components/{p-a9e1bf70.js.map → p-dc3faba3.js.map} +1 -1
- package/dist/components/{p-9d6aaf76.js → p-e00cbb8a.js} +5 -5
- package/dist/components/{p-9d6aaf76.js.map → p-e00cbb8a.js.map} +1 -1
- package/dist/components/{p-a9f162a8.js → p-f331117c.js} +53 -24
- package/dist/components/p-f331117c.js.map +1 -0
- package/dist/components/{p-18bc0291.js → p-f4d86795.js} +3 -3
- package/dist/components/{p-18bc0291.js.map → p-f4d86795.js.map} +1 -1
- package/dist/esm/index-1fb7a9a6.js +0 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +48 -19
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +351 -91
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +1 -1
- package/dist/esm/nv-dialog.entry.js +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
- package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
- package/dist/esm/nv-fielddate.entry.js +5 -5
- package/dist/esm/nv-fielddaterange.entry.js +4 -4
- package/dist/esm/nv-fielddropdown.entry.js +15 -29
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +28 -71
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +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 +9 -9
- package/dist/esm/nv-icon.entry.js +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +16 -42
- package/dist/esm/nv-menu.entry.js.map +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js.map +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/p-0245863d.entry.js +2 -0
- package/dist/native/{p-8946883b.entry.js → p-0ee428d5.entry.js} +2 -2
- package/dist/native/{p-8f7c1bb8.entry.js → p-244f56ac.entry.js} +2 -2
- package/dist/native/p-2691e02d.entry.js +2 -0
- package/dist/native/{p-aeac63ea.entry.js → p-37f0210e.entry.js} +2 -2
- package/dist/native/{p-000ef9c9.entry.js → p-39bb95ff.entry.js} +2 -2
- package/dist/native/{p-76cd466a.entry.js → p-4ae26462.entry.js} +2 -2
- package/dist/native/{p-75f4bfe8.entry.js → p-4d9c4618.entry.js} +2 -2
- package/dist/native/p-4d9c4618.entry.js.map +1 -0
- package/dist/native/{p-d4e48d08.entry.js → p-59e0bd2b.entry.js} +2 -2
- package/dist/native/{p-d4e48d08.entry.js.map → p-59e0bd2b.entry.js.map} +1 -1
- package/dist/native/{p-626a1372.entry.js → p-5c00f092.entry.js} +2 -2
- package/dist/native/p-63e6aed3.entry.js +2 -0
- package/dist/native/p-63e6aed3.entry.js.map +1 -0
- package/dist/native/{p-4fe5ebe9.entry.js → p-6b348684.entry.js} +2 -2
- package/dist/native/{p-aa957898.entry.js → p-6ff228da.entry.js} +2 -2
- package/dist/native/{p-aa957898.entry.js.map → p-6ff228da.entry.js.map} +1 -1
- package/dist/native/{p-74f7f404.entry.js → p-701b5557.entry.js} +2 -2
- package/dist/native/{p-002e7bf1.entry.js → p-7f5eb2ac.entry.js} +2 -2
- package/dist/native/{p-e4f84faa.entry.js → p-84a73e2a.entry.js} +2 -2
- package/dist/native/p-9135fdf5.entry.js +2 -0
- package/dist/native/p-93dc2f47.entry.js +2 -0
- package/dist/native/{p-7e1fa44c.entry.js.map → p-93dc2f47.entry.js.map} +1 -1
- package/dist/native/{p-be5f62e5.entry.js → p-9a267f16.entry.js} +2 -2
- package/dist/native/p-9a267f16.entry.js.map +1 -0
- package/dist/native/{p-60d6ffa3.entry.js → p-9d6431c7.entry.js} +2 -2
- package/dist/native/{p-b11fdaed.entry.js → p-b094296d.entry.js} +2 -2
- package/dist/native/{p-43cc98dc.entry.js → p-b2ce83ad.entry.js} +2 -2
- package/dist/native/{p-115ad66c.entry.js → p-bad11367.entry.js} +2 -2
- package/dist/native/{p-6603d939.entry.js → p-c7b201cd.entry.js} +2 -2
- package/dist/native/{p-4c859a14.entry.js → p-d7a76400.entry.js} +2 -2
- package/dist/native/p-e1a4f776.entry.js +2 -0
- package/dist/native/p-e1a4f776.entry.js.map +1 -0
- package/dist/native/p-e49bbd02.entry.js +2 -0
- package/dist/native/p-e49bbd02.entry.js.map +1 -0
- package/dist/native/{p-98030346.entry.js → p-e5de64d5.entry.js} +2 -2
- package/dist/native/p-eee01062.entry.js +2 -0
- package/dist/native/{p-3df6febe.entry.js.map → p-eee01062.entry.js.map} +1 -1
- package/dist/native/{p-b6164ebc.entry.js → p-f6bdc270.entry.js} +2 -2
- package/dist/native/{p-50dcce07.entry.js → p-f85aca27.entry.js} +2 -2
- package/dist/native/{p-1e5453be.entry.js → p-fa77a591.entry.js} +2 -2
- package/dist/native/{p-d5158e27.entry.js → p-fb5bddba.entry.js} +2 -2
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +10 -7
- package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +37 -2
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +16 -20
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +16 -34
- package/dist/types/components/nv-menu/nv-menu.d.ts +46 -12
- package/dist/types/components.d.ts +174 -43
- package/dist/vscode-data.json +8 -20
- package/hydrate/index.js +535 -407
- package/hydrate/index.mjs +535 -407
- package/package.json +3 -2
- package/dist/cjs/nv-base.cjs.entry.js +0 -74
- package/dist/cjs/nv-base.cjs.entry.js.map +0 -1
- package/dist/collection/components/nv-base/nv-base.docs.js +0 -5
- package/dist/collection/components/nv-base/nv-base.docs.js.map +0 -1
- package/dist/collection/components/nv-base/nv-base.js +0 -68
- package/dist/collection/components/nv-base/nv-base.js.map +0 -1
- package/dist/components/nv-base.d.ts +0 -11
- package/dist/components/nv-base.js +0 -88
- package/dist/components/nv-base.js.map +0 -1
- package/dist/components/p-a9f162a8.js.map +0 -1
- package/dist/esm/nv-base.entry.js +0 -70
- package/dist/esm/nv-base.entry.js.map +0 -1
- package/dist/native/p-2ed9934a.entry.js +0 -2
- package/dist/native/p-2ed9934a.entry.js.map +0 -1
- package/dist/native/p-3df6febe.entry.js +0 -2
- package/dist/native/p-4977fcd0.entry.js +0 -2
- package/dist/native/p-75f4bfe8.entry.js.map +0 -1
- package/dist/native/p-7e1fa44c.entry.js +0 -2
- package/dist/native/p-b8b58064.entry.js +0 -2
- package/dist/native/p-be5f62e5.entry.js.map +0 -1
- package/dist/native/p-c6fe73a9.entry.js +0 -2
- package/dist/native/p-c6fe73a9.entry.js.map +0 -1
- package/dist/native/p-ce64d562.entry.js +0 -2
- package/dist/native/p-d352a8b3.entry.js +0 -2
- package/dist/native/p-d352a8b3.entry.js.map +0 -1
- package/dist/native/p-e200185a.entry.js +0 -2
- package/dist/native/p-e200185a.entry.js.map +0 -1
- package/dist/types/components/nv-base/nv-base.d.ts +0 -17
- package/dist/types/components/nv-base/nv-base.docs.d.ts +0 -5
- /package/dist/native/{p-ce64d562.entry.js.map → p-0245863d.entry.js.map} +0 -0
- /package/dist/native/{p-8946883b.entry.js.map → p-0ee428d5.entry.js.map} +0 -0
- /package/dist/native/{p-8f7c1bb8.entry.js.map → p-244f56ac.entry.js.map} +0 -0
- /package/dist/native/{p-4977fcd0.entry.js.map → p-2691e02d.entry.js.map} +0 -0
- /package/dist/native/{p-aeac63ea.entry.js.map → p-37f0210e.entry.js.map} +0 -0
- /package/dist/native/{p-000ef9c9.entry.js.map → p-39bb95ff.entry.js.map} +0 -0
- /package/dist/native/{p-76cd466a.entry.js.map → p-4ae26462.entry.js.map} +0 -0
- /package/dist/native/{p-626a1372.entry.js.map → p-5c00f092.entry.js.map} +0 -0
- /package/dist/native/{p-4fe5ebe9.entry.js.map → p-6b348684.entry.js.map} +0 -0
- /package/dist/native/{p-74f7f404.entry.js.map → p-701b5557.entry.js.map} +0 -0
- /package/dist/native/{p-002e7bf1.entry.js.map → p-7f5eb2ac.entry.js.map} +0 -0
- /package/dist/native/{p-e4f84faa.entry.js.map → p-84a73e2a.entry.js.map} +0 -0
- /package/dist/native/{p-b8b58064.entry.js.map → p-9135fdf5.entry.js.map} +0 -0
- /package/dist/native/{p-60d6ffa3.entry.js.map → p-9d6431c7.entry.js.map} +0 -0
- /package/dist/native/{p-b11fdaed.entry.js.map → p-b094296d.entry.js.map} +0 -0
- /package/dist/native/{p-43cc98dc.entry.js.map → p-b2ce83ad.entry.js.map} +0 -0
- /package/dist/native/{p-115ad66c.entry.js.map → p-bad11367.entry.js.map} +0 -0
- /package/dist/native/{p-6603d939.entry.js.map → p-c7b201cd.entry.js.map} +0 -0
- /package/dist/native/{p-4c859a14.entry.js.map → p-d7a76400.entry.js.map} +0 -0
- /package/dist/native/{p-98030346.entry.js.map → p-e5de64d5.entry.js.map} +0 -0
- /package/dist/native/{p-b6164ebc.entry.js.map → p-f6bdc270.entry.js.map} +0 -0
- /package/dist/native/{p-50dcce07.entry.js.map → p-f85aca27.entry.js.map} +0 -0
- /package/dist/native/{p-1e5453be.entry.js.map → p-fa77a591.entry.js.map} +0 -0
- /package/dist/native/{p-d5158e27.entry.js.map → p-fb5bddba.entry.js.map} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -5434,83 +5434,6 @@ class NvBadge {
|
|
|
5434
5434
|
}; }
|
|
5435
5435
|
}
|
|
5436
5436
|
|
|
5437
|
-
const classes = {
|
|
5438
|
-
'w-full': 'w-full',
|
|
5439
|
-
'wFull': 'w-full',
|
|
5440
|
-
'is-active': 'is-active',
|
|
5441
|
-
'is-selected': 'is-selected',
|
|
5442
|
-
};
|
|
5443
|
-
/**
|
|
5444
|
-
* @slot default - render children
|
|
5445
|
-
* @deprecated This is only to help with the migration from v2 to v3. It will be removed in the next major release.
|
|
5446
|
-
*/
|
|
5447
|
-
class NvBaseComponent {
|
|
5448
|
-
constructor(hostRef) {
|
|
5449
|
-
registerInstance(this, hostRef);
|
|
5450
|
-
}
|
|
5451
|
-
/****************************************************************************/
|
|
5452
|
-
//#region LIFECYCLE
|
|
5453
|
-
componentWillLoad() {
|
|
5454
|
-
this.applyClassesOnInitialRender();
|
|
5455
|
-
}
|
|
5456
|
-
componentDidLoad() {
|
|
5457
|
-
this.mutationObserver = new MutationObserver(mutations => {
|
|
5458
|
-
mutations.forEach(mutation => {
|
|
5459
|
-
if (mutation.type === 'attributes') {
|
|
5460
|
-
const target = mutation.target;
|
|
5461
|
-
Object.keys(classes).forEach(attributeName => {
|
|
5462
|
-
if (target.hasAttribute(attributeName)) {
|
|
5463
|
-
target.classList.add(classes[attributeName]);
|
|
5464
|
-
}
|
|
5465
|
-
else {
|
|
5466
|
-
target.classList.remove(classes[attributeName]);
|
|
5467
|
-
}
|
|
5468
|
-
});
|
|
5469
|
-
}
|
|
5470
|
-
});
|
|
5471
|
-
});
|
|
5472
|
-
this.observeElements();
|
|
5473
|
-
}
|
|
5474
|
-
disconnectedCallback() {
|
|
5475
|
-
if (this.mutationObserver) {
|
|
5476
|
-
this.mutationObserver.disconnect();
|
|
5477
|
-
}
|
|
5478
|
-
}
|
|
5479
|
-
//#endregion LIFECYCLE
|
|
5480
|
-
/****************************************************************************/
|
|
5481
|
-
//#region METHODS
|
|
5482
|
-
applyClassesOnInitialRender() {
|
|
5483
|
-
Object.keys(classes).forEach(attributeName => {
|
|
5484
|
-
const elements = this.el.querySelectorAll(`[${attributeName}]`);
|
|
5485
|
-
elements.forEach(element => {
|
|
5486
|
-
element.classList.add(classes[attributeName]);
|
|
5487
|
-
});
|
|
5488
|
-
});
|
|
5489
|
-
}
|
|
5490
|
-
observeElements() {
|
|
5491
|
-
this.mutationObserver.observe(this.el, {
|
|
5492
|
-
attributes: true,
|
|
5493
|
-
attributeFilter: Object.keys(classes),
|
|
5494
|
-
subtree: true,
|
|
5495
|
-
});
|
|
5496
|
-
}
|
|
5497
|
-
//#endregion METHODS
|
|
5498
|
-
/****************************************************************************/
|
|
5499
|
-
//#region RENDER
|
|
5500
|
-
render() {
|
|
5501
|
-
return (hAsync(Host, { key: 'ba3d284241a61fa30bd434f563b7e4962ea3f238', style: { display: 'block' } }, hAsync("slot", { key: '44a0f1bc5267cf7e7bd0c1d258e8d9b8020a59f3' })));
|
|
5502
|
-
}
|
|
5503
|
-
get el() { return getElement(this); }
|
|
5504
|
-
static get cmpMeta() { return {
|
|
5505
|
-
"$flags$": 4,
|
|
5506
|
-
"$tagName$": "nv-base",
|
|
5507
|
-
"$members$": undefined,
|
|
5508
|
-
"$listeners$": undefined,
|
|
5509
|
-
"$lazyBundleId$": "-",
|
|
5510
|
-
"$attrsToReflect$": []
|
|
5511
|
-
}; }
|
|
5512
|
-
}
|
|
5513
|
-
|
|
5514
5437
|
const nvBreadcrumbCss = "nv-breadcrumb{display:flex;align-items:center;color:var(--components-breadcrumb-text);font-size:var(--font-size-sm);font-style:normal;font-weight:500;line-height:var(--line-height-sm)}nv-breadcrumb.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-breadcrumb ul{display:flex;flex-direction:column;gap:var(--spacing-1-5);padding:var(--spacing-1)}nv-breadcrumb ul a,nv-breadcrumb ul button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb ul a:focus,nv-breadcrumb ul a:focus-within,nv-breadcrumb ul button:focus,nv-breadcrumb ul button:focus-within{outline:none}nv-breadcrumb ul a:focus-visible,nv-breadcrumb ul a:has(:focus-visible),nv-breadcrumb ul button:focus-visible,nv-breadcrumb ul button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb ul a:hover,nv-breadcrumb ul button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb>a,nv-breadcrumb>button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb>a:focus,nv-breadcrumb>a:focus-within,nv-breadcrumb>button:focus,nv-breadcrumb>button:focus-within{outline:none}nv-breadcrumb>a:focus-visible,nv-breadcrumb>a:has(:focus-visible),nv-breadcrumb>button:focus-visible,nv-breadcrumb>button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb>a:hover,nv-breadcrumb>button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb span[data-scope=separator]{display:inline-flex;padding-left:var(--breadcrumb-padding-y)}";
|
|
5515
5438
|
var NvBreadcrumbStyle0 = nvBreadcrumbCss;
|
|
5516
5439
|
|
|
@@ -5543,7 +5466,7 @@ class NvBreadcrumb {
|
|
|
5543
5466
|
/****************************************************************************/
|
|
5544
5467
|
//#region RENDER
|
|
5545
5468
|
render() {
|
|
5546
|
-
return (hAsync(Host, { key: '
|
|
5469
|
+
return (hAsync(Host, { key: '50f858dc015ef2cd51f54a08fa53ec88ee42ac41', 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: '1df40faa4a483d4abf8895def5db87696cf0d08e', message: this.tooltip, triggerElement: this.popoverTrigger, placement: "top" })), this.type === 'collapsed' && (hAsync("nv-popover", { key: '90174908cdcf1b3e1f8a8a82a01cfa505311c930', triggerMode: "click", groupName: "breadcrumbs", triggerElement: this.popoverTrigger }, hAsync("ul", { key: '72282abd41c80bb8edf0c6b19506be32bf5ed688', slot: "content" }, hAsync("slot", { key: '4b9c325c0d27162c4856796f6a7d7c9b39edf993' })))), hAsync("span", { key: '62316fc8efc09067a0a64d4e90e76d57b329ee81', "data-scope": "separator" }, "/")));
|
|
5547
5470
|
}
|
|
5548
5471
|
get el() { return getElement(this); }
|
|
5549
5472
|
static get style() { return NvBreadcrumbStyle0; }
|
|
@@ -5573,7 +5496,7 @@ class NvBreadcrumbs {
|
|
|
5573
5496
|
}
|
|
5574
5497
|
//#region RENDER
|
|
5575
5498
|
render() {
|
|
5576
|
-
return (hAsync(Host, { key: '
|
|
5499
|
+
return (hAsync(Host, { key: '19ad2bb41f4254a98a571cbadb50ba5ed7d29f62', role: "navigation", "aria-label": "breadcrumbs" }, hAsync("ol", { key: '11b77f0f11c6b1dc2ce5ab3f4f7b23e8ec728b61' }, hAsync("slot", { key: 'c0c683f93c6874aa5f84fb735d13c1b5eabcd951' }))));
|
|
5577
5500
|
}
|
|
5578
5501
|
static get style() { return NvBreadcrumbsStyle0; }
|
|
5579
5502
|
static get cmpMeta() { return {
|
|
@@ -5737,7 +5660,7 @@ class NvButton {
|
|
|
5737
5660
|
/****************************************************************************/
|
|
5738
5661
|
//#region RENDER
|
|
5739
5662
|
render() {
|
|
5740
|
-
return (hAsync(Host, { key: '
|
|
5663
|
+
return (hAsync(Host, { key: 'f8b20f9052d71f93eaf03f98550a7237225cadf2', role: "button", tabindex: "0", onClick: this.handleButtonClick }, this.loading && (hAsync("nv-loader", { key: 'c1cefa72ee24dad9ce16bbfe1f51e6cec6dc7fbc', size: this.size === ButtonSize.Large ? 'sm' : 'xs' })), hAsync("slot", { key: '36a311494e45ebc23b1133923a676d58e87f3800', name: "leading-icon" }), hAsync("slot", { key: 'f6fea826cda9a09f7152f4e30cc6981c89e73ebe' }), hAsync("slot", { key: 'd59c23ff85ea7efc16c69c5adbeb0e91786f1f68', name: "trailing-icon" })));
|
|
5741
5664
|
}
|
|
5742
5665
|
static get formAssociated() { return true; }
|
|
5743
5666
|
get el() { return getElement(this); }
|
|
@@ -5996,11 +5919,11 @@ class NvCalendar {
|
|
|
5996
5919
|
/**
|
|
5997
5920
|
* Change the displayed month
|
|
5998
5921
|
* @param {number} offset - Month offset (-1 for previous, 1 for next)
|
|
5999
|
-
* @param {number} calendarOffset - Month offset for the calendar (0 by default)
|
|
6000
5922
|
*/
|
|
6001
|
-
changeMonth(offset
|
|
5923
|
+
changeMonth(offset) {
|
|
6002
5924
|
const newDate = new Date(this.currentDate);
|
|
6003
|
-
|
|
5925
|
+
// Ensure we only move by one month at a time
|
|
5926
|
+
newDate.setUTCMonth(newDate.getUTCMonth() + offset);
|
|
6004
5927
|
// Add the appropriate animation class
|
|
6005
5928
|
const containers = this.el.querySelectorAll('.calendar-grid');
|
|
6006
5929
|
containers.forEach(container => {
|
|
@@ -6158,10 +6081,13 @@ class NvCalendar {
|
|
|
6158
6081
|
const firstDay = new Date(Date.UTC(year, month, 1));
|
|
6159
6082
|
const lastDay = new Date(Date.UTC(year, month + 1, 0));
|
|
6160
6083
|
const days = [];
|
|
6161
|
-
//
|
|
6162
|
-
|
|
6084
|
+
// Correct calculation of offset for previous month days
|
|
6085
|
+
// Use getUTCDay to stay consistent with UTC timezone
|
|
6086
|
+
const dayOfWeekIndex = firstDay.getUTCDay(); // 0 = Sunday, 1 = Monday, etc.
|
|
6087
|
+
// Adjust based on firstDayOfWeek (if week starts on Monday, offset is different)
|
|
6088
|
+
const offsetDays = (dayOfWeekIndex - this.firstDayOfWeek + 7) % 7;
|
|
6163
6089
|
// Add the days of the previous month for the first calendar
|
|
6164
|
-
if (offset === 0) {
|
|
6090
|
+
if (offset === 0 && offsetDays > 0) {
|
|
6165
6091
|
const prevMonthLastDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
6166
6092
|
for (let i = offsetDays; i > 0; i--) {
|
|
6167
6093
|
const date = new Date(Date.UTC(year, month - 1, prevMonthLastDay - i + 1));
|
|
@@ -6351,6 +6277,21 @@ class NvCalendar {
|
|
|
6351
6277
|
parseDate(dateInput) {
|
|
6352
6278
|
if (dateInput instanceof Date)
|
|
6353
6279
|
return dateInput;
|
|
6280
|
+
// Attempt to automatically detect ISO 8601 format (generated by toISOString())
|
|
6281
|
+
// The regex checks the standard ISO format: YYYY-MM-DDTHH:mm:ss.sssZ
|
|
6282
|
+
if (typeof dateInput === 'string' &&
|
|
6283
|
+
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/.test(dateInput)) {
|
|
6284
|
+
try {
|
|
6285
|
+
const parsedDate = new Date(dateInput);
|
|
6286
|
+
if (!isNaN(parsedDate.getTime())) {
|
|
6287
|
+
return parsedDate;
|
|
6288
|
+
}
|
|
6289
|
+
}
|
|
6290
|
+
catch (error) {
|
|
6291
|
+
// If it fails, continue with other methods
|
|
6292
|
+
console.error('Error parsing ISO date:', error);
|
|
6293
|
+
}
|
|
6294
|
+
}
|
|
6354
6295
|
// Handling Unix Seconds ("X") formats
|
|
6355
6296
|
if (this.dateFormat === 'X') {
|
|
6356
6297
|
const unixSeconds = Number(dateInput);
|
|
@@ -6397,6 +6338,20 @@ class NvCalendar {
|
|
|
6397
6338
|
}
|
|
6398
6339
|
return parsed.toDate();
|
|
6399
6340
|
}
|
|
6341
|
+
/**
|
|
6342
|
+
* Checks if the date format is in UTC mode
|
|
6343
|
+
* @returns {boolean} true if the date format is in UTC mode
|
|
6344
|
+
*/
|
|
6345
|
+
get isUTCMode() {
|
|
6346
|
+
return this.dateFormat.includes('Z');
|
|
6347
|
+
}
|
|
6348
|
+
/**
|
|
6349
|
+
* Checks if the date format is ISO 8601
|
|
6350
|
+
* @returns {boolean} true if the format is ISO 8601
|
|
6351
|
+
*/
|
|
6352
|
+
get isISO8601Format() {
|
|
6353
|
+
return this.dateFormat === 'YYYY-MM-DD[T]HH:mm:ss[Z]';
|
|
6354
|
+
}
|
|
6400
6355
|
/**
|
|
6401
6356
|
* Formats a date to a string according to the format
|
|
6402
6357
|
* @param {Date} date - Date to format
|
|
@@ -6405,6 +6360,11 @@ class NvCalendar {
|
|
|
6405
6360
|
formatDate(date) {
|
|
6406
6361
|
if (!date)
|
|
6407
6362
|
return '';
|
|
6363
|
+
// Special case for ISO 8601
|
|
6364
|
+
if (this.isISO8601Format) {
|
|
6365
|
+
// For the ISO 8601 format, use directly toISOString() which is standard
|
|
6366
|
+
return date.toISOString();
|
|
6367
|
+
}
|
|
6408
6368
|
// If the format is "Ticks", convert the time to C# ticks
|
|
6409
6369
|
if (this.dateFormat === 'Ticks') {
|
|
6410
6370
|
const ticks = date.getTime() * 10000 + 621355968000000000;
|
|
@@ -6600,11 +6560,10 @@ class NvCalendar {
|
|
|
6600
6560
|
/**
|
|
6601
6561
|
* Handles month change with an offset
|
|
6602
6562
|
* @param {number} direction - Direction (-1 for previous, 1 for next)
|
|
6603
|
-
* @param {number} offset - Month offset (0 by default)
|
|
6604
6563
|
* @returns {Function} Change month handler
|
|
6605
6564
|
*/
|
|
6606
|
-
getChangeMonthHandler(direction
|
|
6607
|
-
return () => this.changeMonth(direction
|
|
6565
|
+
getChangeMonthHandler(direction) {
|
|
6566
|
+
return () => this.changeMonth(direction);
|
|
6608
6567
|
}
|
|
6609
6568
|
/**
|
|
6610
6569
|
* Handles month change from an event (ex: dropdown)
|
|
@@ -6666,13 +6625,6 @@ class NvCalendar {
|
|
|
6666
6625
|
return [];
|
|
6667
6626
|
}
|
|
6668
6627
|
}
|
|
6669
|
-
/**
|
|
6670
|
-
* Checks if the date format is in UTC mode
|
|
6671
|
-
* @returns {boolean} true if the date format is in UTC mode
|
|
6672
|
-
*/
|
|
6673
|
-
get isUTCMode() {
|
|
6674
|
-
return this.dateFormat.includes('Z');
|
|
6675
|
-
}
|
|
6676
6628
|
/**
|
|
6677
6629
|
* Checks if shortcuts are visible
|
|
6678
6630
|
* @returns {boolean} true if shortcuts are visible
|
|
@@ -6698,8 +6650,8 @@ class NvCalendar {
|
|
|
6698
6650
|
* @description Renders the header of the calendar
|
|
6699
6651
|
*/
|
|
6700
6652
|
renderHeader(offset, index) {
|
|
6701
|
-
return (hAsync("div", { class: "header" }, this.numberOfCalendars > 1 && index === 0 && (hAsync("nv-iconbutton", { class: "nav-left", emphasis: "lower", name: "chevron-left", onClick: this.getChangeMonthHandler(-1
|
|
6702
|
-
Math.floor((this.currentDate.getUTCMonth() + offset) / 12), onChange: this.getHandleYearChange(offset) })), this.numberOfCalendars === 1 && (hAsync("div", { class: "nav-buttons" }, hAsync("nv-iconbutton", { emphasis: "lower", name: "chevron-left", onClick: this.getChangeMonthHandler(-1
|
|
6653
|
+
return (hAsync("div", { class: "header" }, this.numberOfCalendars > 1 && index === 0 && (hAsync("nv-iconbutton", { class: "nav-left", emphasis: "lower", name: "chevron-left", onClick: this.getChangeMonthHandler(-1) })), hAsync("div", { class: "date-controls" }, hAsync("select", { class: "month-select mr-4", onChange: this.getHandleMonthChange(offset) }, this.months.map(month => (hAsync("option", { key: month.value, value: month.value, selected: month.value === (this.currentDate.getUTCMonth() + offset) % 12 }, month.label)))), hAsync("input", { type: "number", class: "year-input", min: "1950", max: "2100", value: this.currentDate.getUTCFullYear() +
|
|
6654
|
+
Math.floor((this.currentDate.getUTCMonth() + offset) / 12), onChange: this.getHandleYearChange(offset) })), this.numberOfCalendars === 1 && (hAsync("div", { class: "nav-buttons" }, hAsync("nv-iconbutton", { emphasis: "lower", name: "chevron-left", onClick: this.getChangeMonthHandler(-1) }), hAsync("nv-iconbutton", { emphasis: "lower", name: "chevron-right", onClick: this.getChangeMonthHandler(1) }))), this.numberOfCalendars > 1 && index === this.numberOfCalendars - 1 && (hAsync("nv-iconbutton", { emphasis: "lower", name: "chevron-right", onClick: this.getChangeMonthHandler(1), class: "nav-right" }))));
|
|
6703
6655
|
}
|
|
6704
6656
|
/**
|
|
6705
6657
|
* Renders the week numbers
|
|
@@ -6792,7 +6744,7 @@ class NvCalendar {
|
|
|
6792
6744
|
* @slot default - Child content of the component.
|
|
6793
6745
|
*/
|
|
6794
6746
|
render() {
|
|
6795
|
-
return (hAsync(Host, { key: '
|
|
6747
|
+
return (hAsync(Host, { key: '89300da9f694aa926855452414e7e036f75f2de6' }, hAsync("div", { key: '467ef9fc9d6523eec3712bf779d49fdf50c55617', class: "datepicker-root" }, hAsync("div", { key: '990f2cb18dcad96cab0f8dfb62e6c57049475440', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, hAsync("div", { key: 'c0dedf1007cbc6a87bd591925c9994474c876afc', 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: 'ef81eaf952fbe569be7e1d3ee6cb59de0e137fe4', class: "datepicker-controls" }, this.hasShortcuts && this.renderShortcuts(), this.hasActions && this.renderActions())))), hAsync("slot", { key: 'e1281217950b5cb02952a69b081d4fcce5863b4d' })));
|
|
6796
6748
|
}
|
|
6797
6749
|
get el() { return getElement(this); }
|
|
6798
6750
|
static get watchers() { return {
|
|
@@ -6860,7 +6812,7 @@ class NvCol {
|
|
|
6860
6812
|
/****************************************************************************/
|
|
6861
6813
|
//#region RENDER
|
|
6862
6814
|
render() {
|
|
6863
|
-
return (hAsync(Host, { key: '
|
|
6815
|
+
return (hAsync(Host, { key: '8f7112dc8ce8896d9e7265741f06b7449dd508df', class: clsx(this.getColSize()) }, hAsync("slot", { key: '3bedff11752d04db2615a5f26d4d910d95dee76c' })));
|
|
6864
6816
|
}
|
|
6865
6817
|
static get style() { return NvColStyle0; }
|
|
6866
6818
|
static get cmpMeta() { return {
|
|
@@ -9827,6 +9779,22 @@ function getCoreRowModel() {
|
|
|
9827
9779
|
return rowModel;
|
|
9828
9780
|
}, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => table._autoResetPageIndex()));
|
|
9829
9781
|
}
|
|
9782
|
+
function expandRows(rowModel) {
|
|
9783
|
+
const expandedRows = [];
|
|
9784
|
+
const handleRow = row => {
|
|
9785
|
+
var _row$subRows;
|
|
9786
|
+
expandedRows.push(row);
|
|
9787
|
+
if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getIsExpanded()) {
|
|
9788
|
+
row.subRows.forEach(handleRow);
|
|
9789
|
+
}
|
|
9790
|
+
};
|
|
9791
|
+
rowModel.rows.forEach(handleRow);
|
|
9792
|
+
return {
|
|
9793
|
+
rows: expandedRows,
|
|
9794
|
+
flatRows: rowModel.flatRows,
|
|
9795
|
+
rowsById: rowModel.rowsById
|
|
9796
|
+
};
|
|
9797
|
+
}
|
|
9830
9798
|
|
|
9831
9799
|
function filterRows(rows, filterRowImpl, table) {
|
|
9832
9800
|
if (table.options.filterFromLeafRows) {
|
|
@@ -10014,6 +9982,49 @@ function getFilteredRowModel() {
|
|
|
10014
9982
|
}, getMemoOptions(table.options, 'debugTable', 'getFilteredRowModel', () => table._autoResetPageIndex()));
|
|
10015
9983
|
}
|
|
10016
9984
|
|
|
9985
|
+
function getPaginationRowModel(opts) {
|
|
9986
|
+
return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {
|
|
9987
|
+
if (!rowModel.rows.length) {
|
|
9988
|
+
return rowModel;
|
|
9989
|
+
}
|
|
9990
|
+
const {
|
|
9991
|
+
pageSize,
|
|
9992
|
+
pageIndex
|
|
9993
|
+
} = pagination;
|
|
9994
|
+
let {
|
|
9995
|
+
rows,
|
|
9996
|
+
flatRows,
|
|
9997
|
+
rowsById
|
|
9998
|
+
} = rowModel;
|
|
9999
|
+
const pageStart = pageSize * pageIndex;
|
|
10000
|
+
const pageEnd = pageStart + pageSize;
|
|
10001
|
+
rows = rows.slice(pageStart, pageEnd);
|
|
10002
|
+
let paginatedRowModel;
|
|
10003
|
+
if (!table.options.paginateExpandedRows) {
|
|
10004
|
+
paginatedRowModel = expandRows({
|
|
10005
|
+
rows,
|
|
10006
|
+
flatRows,
|
|
10007
|
+
rowsById
|
|
10008
|
+
});
|
|
10009
|
+
} else {
|
|
10010
|
+
paginatedRowModel = {
|
|
10011
|
+
rows,
|
|
10012
|
+
flatRows,
|
|
10013
|
+
rowsById
|
|
10014
|
+
};
|
|
10015
|
+
}
|
|
10016
|
+
paginatedRowModel.flatRows = [];
|
|
10017
|
+
const handleRow = row => {
|
|
10018
|
+
paginatedRowModel.flatRows.push(row);
|
|
10019
|
+
if (row.subRows.length) {
|
|
10020
|
+
row.subRows.forEach(handleRow);
|
|
10021
|
+
}
|
|
10022
|
+
};
|
|
10023
|
+
paginatedRowModel.rows.forEach(handleRow);
|
|
10024
|
+
return paginatedRowModel;
|
|
10025
|
+
}, getMemoOptions(table.options, 'debugTable'));
|
|
10026
|
+
}
|
|
10027
|
+
|
|
10017
10028
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10018
10029
|
/**
|
|
10019
10030
|
* All properties that should be excluded from the deep copy of an HTML element.
|
|
@@ -10216,13 +10227,15 @@ class NvDatagrid {
|
|
|
10216
10227
|
this.action = createEvent(this, "action", 7);
|
|
10217
10228
|
this.templateCache = new Map();
|
|
10218
10229
|
this.headerTemplateCache = new Map();
|
|
10230
|
+
this.minPageIndex = 1;
|
|
10219
10231
|
/****************************************************************************/
|
|
10220
10232
|
//#region STATES
|
|
10221
10233
|
this.table = null;
|
|
10222
10234
|
this.parsedColumns = []; // Parsed array
|
|
10223
10235
|
this.parsedData = []; // Parsed array
|
|
10224
|
-
this.
|
|
10236
|
+
this.globalFilterSearchTerm = '';
|
|
10225
10237
|
this.columnData = [];
|
|
10238
|
+
this.paginationState = null;
|
|
10226
10239
|
//#endregion STATES
|
|
10227
10240
|
/****************************************************************************/
|
|
10228
10241
|
//#region PROPERTIES
|
|
@@ -10272,8 +10285,24 @@ class NvDatagrid {
|
|
|
10272
10285
|
* @default false
|
|
10273
10286
|
*/
|
|
10274
10287
|
this.autoGenerateColumns = false;
|
|
10288
|
+
/**
|
|
10289
|
+
* Whether to enable pagination for the data grid.
|
|
10290
|
+
* @default false
|
|
10291
|
+
*/
|
|
10292
|
+
this.enablePagination = false;
|
|
10293
|
+
/**
|
|
10294
|
+
* The number of rows to display per page.
|
|
10295
|
+
* @default 10
|
|
10296
|
+
*/
|
|
10297
|
+
this.pageSize = 10;
|
|
10298
|
+
/**
|
|
10299
|
+
* The array of page sizes to display in the pagination dropdown.
|
|
10300
|
+
* @default [10, 20, 30, 40, 50]
|
|
10301
|
+
*/
|
|
10302
|
+
this.pageSizes = [10, 20, 30, 40, 50];
|
|
10275
10303
|
this.debouncedFilter = debounce$1((value) => {
|
|
10276
|
-
|
|
10304
|
+
var _a;
|
|
10305
|
+
(_a = this.table) === null || _a === void 0 ? void 0 : _a.setGlobalFilter(value);
|
|
10277
10306
|
}, 300);
|
|
10278
10307
|
/**
|
|
10279
10308
|
* Handles global filtering on input event for the search input.
|
|
@@ -10289,6 +10318,23 @@ class NvDatagrid {
|
|
|
10289
10318
|
this.debouncedFilter(value);
|
|
10290
10319
|
}
|
|
10291
10320
|
};
|
|
10321
|
+
this.flexRender = (comp, props) => {
|
|
10322
|
+
if (typeof comp === 'function') {
|
|
10323
|
+
return comp(props);
|
|
10324
|
+
}
|
|
10325
|
+
return comp;
|
|
10326
|
+
};
|
|
10327
|
+
this.handlePageIndexChange = (event) => {
|
|
10328
|
+
const target = event.target;
|
|
10329
|
+
const page = target.value ? Number(target.value) - 1 : 0;
|
|
10330
|
+
// Simply use `setPageIndex` to update the page index directly
|
|
10331
|
+
this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageIndex: page }); // This triggers the paginationState watcher
|
|
10332
|
+
};
|
|
10333
|
+
this.handlePageSizeChange = (event) => {
|
|
10334
|
+
const target = event.target;
|
|
10335
|
+
// Simply use `setPageSize` to update the page size directly
|
|
10336
|
+
this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageSize: Number(target.value) }); // This triggers the paginationState watcher
|
|
10337
|
+
};
|
|
10292
10338
|
}
|
|
10293
10339
|
//#endregion PROPERTIES
|
|
10294
10340
|
/****************************************************************************/
|
|
@@ -10390,6 +10436,7 @@ class NvDatagrid {
|
|
|
10390
10436
|
this.parsedColumns = safeNewValue;
|
|
10391
10437
|
}
|
|
10392
10438
|
initializeTable() {
|
|
10439
|
+
var _a, _b, _c, _d;
|
|
10393
10440
|
// Clear the previous table instance (if any)
|
|
10394
10441
|
this.table = null;
|
|
10395
10442
|
// Set default options for the table
|
|
@@ -10423,26 +10470,9 @@ class NvDatagrid {
|
|
|
10423
10470
|
}, // Default: no column sizing info
|
|
10424
10471
|
},
|
|
10425
10472
|
};
|
|
10426
|
-
if (this.enableGlobalFilter) {
|
|
10427
|
-
tableOptions.getFilteredRowModel = getFilteredRowModel();
|
|
10428
|
-
// Set the initial global filter value
|
|
10429
|
-
tableOptions.state.globalFilter = this.globalFilter;
|
|
10430
|
-
// Define the callback for global filter changes
|
|
10431
|
-
tableOptions.onGlobalFilterChange = value => {
|
|
10432
|
-
this.globalFilter = value;
|
|
10433
|
-
};
|
|
10434
|
-
tableOptions.globalFilterFn = (row, columnId, filterValue) => {
|
|
10435
|
-
const response = row
|
|
10436
|
-
.getValue(columnId)
|
|
10437
|
-
.toString()
|
|
10438
|
-
.toLowerCase()
|
|
10439
|
-
.includes(filterValue.toLowerCase());
|
|
10440
|
-
return response;
|
|
10441
|
-
};
|
|
10442
|
-
}
|
|
10443
10473
|
if (this.parsedColumns.length > 0) {
|
|
10444
10474
|
// Validate and generate column definitions
|
|
10445
|
-
const validColumns = this.parsedColumns.filter(column =>
|
|
10475
|
+
const validColumns = this.parsedColumns.filter(column => column === null || column === void 0 ? void 0 : column.accessor);
|
|
10446
10476
|
// Update tableOptions based on parsed data and columns
|
|
10447
10477
|
const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
|
|
10448
10478
|
const hasData = this.parsedData &&
|
|
@@ -10450,22 +10480,22 @@ class NvDatagrid {
|
|
|
10450
10480
|
this.parsedData.length > 0;
|
|
10451
10481
|
if (!hasColumns && !hasData) ;
|
|
10452
10482
|
else if (hasColumns && !hasData) {
|
|
10483
|
+
// Has columns but no data
|
|
10453
10484
|
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
10454
10485
|
}
|
|
10455
10486
|
else {
|
|
10456
10487
|
// Both columns and data are available
|
|
10457
|
-
// No columns and data is available
|
|
10458
10488
|
tableOptions.data = this.getTableData();
|
|
10459
10489
|
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
10460
10490
|
}
|
|
10461
10491
|
}
|
|
10462
10492
|
else {
|
|
10463
|
-
// No columns and data is available
|
|
10493
|
+
// No parsed columns and data is available
|
|
10464
10494
|
const hasData = this.parsedData &&
|
|
10465
10495
|
Array.isArray(this.parsedData) &&
|
|
10466
10496
|
this.parsedData.length > 0;
|
|
10467
10497
|
if (hasData) {
|
|
10468
|
-
// No columns and data is available
|
|
10498
|
+
// No parsed columns and data is available
|
|
10469
10499
|
const firstRow = this.parsedData[0];
|
|
10470
10500
|
const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
|
|
10471
10501
|
accessor: key,
|
|
@@ -10478,26 +10508,116 @@ class NvDatagrid {
|
|
|
10478
10508
|
tableOptions.columns = this.generateColumns(arrayColumnsConfig, tableOptions);
|
|
10479
10509
|
}
|
|
10480
10510
|
}
|
|
10511
|
+
if (this.enableGlobalFilter) {
|
|
10512
|
+
tableOptions.getFilteredRowModel = getFilteredRowModel();
|
|
10513
|
+
const globalFilter = this.globalFilterSearchTerm;
|
|
10514
|
+
// Set the initial global filter value
|
|
10515
|
+
tableOptions.state.globalFilter = globalFilter;
|
|
10516
|
+
// Define the callback for global filter changes
|
|
10517
|
+
tableOptions.onGlobalFilterChange = updater => {
|
|
10518
|
+
const newFilter = typeof updater === 'function'
|
|
10519
|
+
? updater(this.globalFilterSearchTerm)
|
|
10520
|
+
: updater;
|
|
10521
|
+
this.globalFilterSearchTerm = newFilter; // Will automatically trigger the searchTerm watcher and update the table
|
|
10522
|
+
};
|
|
10523
|
+
tableOptions.globalFilterFn = this.globalFilterFn;
|
|
10524
|
+
}
|
|
10525
|
+
if (this.enablePagination) {
|
|
10526
|
+
tableOptions.getPaginationRowModel = getPaginationRowModel();
|
|
10527
|
+
const pagination = {
|
|
10528
|
+
pageIndex: (_b = (_a = this.paginationState) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0,
|
|
10529
|
+
pageSize: (_d = (_c = this.paginationState) === null || _c === void 0 ? void 0 : _c.pageSize) !== null && _d !== void 0 ? _d : 10,
|
|
10530
|
+
};
|
|
10531
|
+
// Set the initial pagination value with safeguards
|
|
10532
|
+
tableOptions.state.pagination = pagination;
|
|
10533
|
+
tableOptions.onPaginationChange = updater => {
|
|
10534
|
+
const newPagination = typeof updater === 'function'
|
|
10535
|
+
? updater(this.paginationState)
|
|
10536
|
+
: updater;
|
|
10537
|
+
this.paginationState = newPagination;
|
|
10538
|
+
};
|
|
10539
|
+
}
|
|
10481
10540
|
// Initialize the table
|
|
10482
10541
|
this.table = createTable(tableOptions);
|
|
10483
10542
|
}
|
|
10543
|
+
/**
|
|
10544
|
+
* Global filter function for the table.
|
|
10545
|
+
* This function checks if the specified filter value is present in any of the row's original values,
|
|
10546
|
+
* including nested objects and arrays. It is used to filter the rows based on the global filter value,
|
|
10547
|
+
* allowing for case-insensitive matching.
|
|
10548
|
+
*
|
|
10549
|
+
* @param {Row<any>} row - The row object containing the data to be filtered.
|
|
10550
|
+
* @param {string} _columnId - The ID of the column being filtered (not used in this function).
|
|
10551
|
+
* @param {string} filterValue - The value to filter the rows by. This value is checked against the row's data.
|
|
10552
|
+
* @returns {boolean} - Returns true if the row should be included in the filtered results, false otherwise.
|
|
10553
|
+
* If the filter value is empty, all rows are included.
|
|
10554
|
+
*/
|
|
10555
|
+
globalFilterFn(row, _columnId, filterValue) {
|
|
10556
|
+
const safeFilterValue = String(filterValue).toLowerCase().trim();
|
|
10557
|
+
// If no filter value, return true for all rows
|
|
10558
|
+
if (!safeFilterValue)
|
|
10559
|
+
return true;
|
|
10560
|
+
// More robust filtering across all columns
|
|
10561
|
+
const checkValue = (value) => {
|
|
10562
|
+
if (typeof value === 'object' && value !== null) {
|
|
10563
|
+
// If it's an array, check each item
|
|
10564
|
+
if (Array.isArray(value)) {
|
|
10565
|
+
return value.some(item => checkValue(item));
|
|
10566
|
+
}
|
|
10567
|
+
// If it's an object, check each property
|
|
10568
|
+
return Object.values(value).some(val => checkValue(val));
|
|
10569
|
+
}
|
|
10570
|
+
return String(value).toLowerCase().includes(safeFilterValue);
|
|
10571
|
+
};
|
|
10572
|
+
return checkValue(row.original);
|
|
10573
|
+
}
|
|
10484
10574
|
// Helper function to generate column definitions
|
|
10485
10575
|
generateColumns(validColumns, tableOptions) {
|
|
10486
10576
|
const columnHelper = createColumnHelper();
|
|
10487
10577
|
if (validColumns.length > 0) {
|
|
10488
10578
|
// Use defined columns
|
|
10489
|
-
return validColumns.map(column =>
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10579
|
+
return validColumns.map(column => {
|
|
10580
|
+
var _a, _b;
|
|
10581
|
+
return columnHelper.accessor(column.accessor, {
|
|
10582
|
+
header: (_b = (this.renderTemplate(this.headerTemplateCache.get(column.accessor), (_a = column.header) !== null && _a !== void 0 ? _a : column.accessor, null) ||
|
|
10583
|
+
column.header)) !== null && _b !== void 0 ? _b : column.accessor,
|
|
10584
|
+
cell: (info) => {
|
|
10585
|
+
var _a, _b, _c;
|
|
10586
|
+
const value = info.getValue();
|
|
10587
|
+
const cellAccessors = column.accessor;
|
|
10588
|
+
const row = info.row;
|
|
10589
|
+
return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
|
|
10590
|
+
? value.map((item) => {
|
|
10591
|
+
var _a, _b;
|
|
10592
|
+
return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
|
|
10593
|
+
item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
|
|
10594
|
+
})
|
|
10595
|
+
: (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
|
|
10596
|
+
value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
|
|
10597
|
+
},
|
|
10598
|
+
enableGlobalFilter: this.enableGlobalFilter,
|
|
10599
|
+
});
|
|
10600
|
+
});
|
|
10494
10601
|
}
|
|
10495
10602
|
else if (tableOptions.data && tableOptions.data.length > 0) {
|
|
10496
10603
|
// Generate columns from data keys
|
|
10497
10604
|
const sampleRow = tableOptions.data[0];
|
|
10498
10605
|
return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
|
|
10499
|
-
header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
10500
|
-
cell: info =>
|
|
10606
|
+
header: this.renderTemplate(this.headerTemplateCache.get(key), key.charAt(0).toUpperCase() + key.slice(1), null) || key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
10607
|
+
cell: (info) => {
|
|
10608
|
+
var _a, _b, _c;
|
|
10609
|
+
const value = info.getValue();
|
|
10610
|
+
const cellAccessors = key;
|
|
10611
|
+
const row = info.row;
|
|
10612
|
+
return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
|
|
10613
|
+
? value.map((item) => {
|
|
10614
|
+
var _a, _b;
|
|
10615
|
+
return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
|
|
10616
|
+
item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
|
|
10617
|
+
})
|
|
10618
|
+
: (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
|
|
10619
|
+
value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
|
|
10620
|
+
},
|
|
10501
10621
|
enableGlobalFilter: this.enableGlobalFilter,
|
|
10502
10622
|
}));
|
|
10503
10623
|
}
|
|
@@ -10526,11 +10646,11 @@ class NvDatagrid {
|
|
|
10526
10646
|
// Replace placeholders in text content, attributes, and properties
|
|
10527
10647
|
element.querySelectorAll('*').forEach(el => {
|
|
10528
10648
|
// Replace placeholders in text content
|
|
10529
|
-
this.replacePlaceholdersTextContent(el, cellValue);
|
|
10649
|
+
this.replacePlaceholdersTextContent(el, cellValue, row);
|
|
10530
10650
|
// Replace placeholders in attributes
|
|
10531
|
-
this.replacePlaceholdersAttributes(el, cellValue);
|
|
10651
|
+
this.replacePlaceholdersAttributes(el, cellValue, row);
|
|
10532
10652
|
// Replace placeholders in properties
|
|
10533
|
-
this.replacePlaceholdersProperties(el, cellValue);
|
|
10653
|
+
this.replacePlaceholdersProperties(el, cellValue, row);
|
|
10534
10654
|
});
|
|
10535
10655
|
// Handle `data-bind-event`
|
|
10536
10656
|
element.querySelectorAll('[data-bind-event]').forEach(el => {
|
|
@@ -10629,51 +10749,128 @@ class NvDatagrid {
|
|
|
10629
10749
|
// If cellValue is a primitive (string, number, boolean, etc.), return it as a string
|
|
10630
10750
|
return (_a = cellValue === null || cellValue === void 0 ? void 0 : cellValue.toString()) !== null && _a !== void 0 ? _a : this.fallbackValue;
|
|
10631
10751
|
}
|
|
10632
|
-
replacePlaceholdersTextContent(element, cellValue) {
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10752
|
+
replacePlaceholdersTextContent(element, cellValue, row) {
|
|
10753
|
+
if (!cellValue) {
|
|
10754
|
+
// ✅ Replace placeholders in text content with the row original value
|
|
10755
|
+
// but first get the original value
|
|
10756
|
+
const originalValue = row.original;
|
|
10757
|
+
element.childNodes.forEach(node => {
|
|
10758
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
10759
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => {
|
|
10760
|
+
if (key in originalValue) {
|
|
10761
|
+
return this.replaceKeyWithValue(key, originalValue[key]);
|
|
10762
|
+
}
|
|
10763
|
+
else {
|
|
10764
|
+
console.warn(`Key ${key} not found in originalValue`);
|
|
10765
|
+
return '';
|
|
10766
|
+
}
|
|
10767
|
+
});
|
|
10768
|
+
}
|
|
10769
|
+
});
|
|
10770
|
+
}
|
|
10771
|
+
else {
|
|
10772
|
+
// ✅ Replace placeholders in text content
|
|
10773
|
+
element.childNodes.forEach(node => {
|
|
10774
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
10775
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
10776
|
+
}
|
|
10777
|
+
});
|
|
10778
|
+
}
|
|
10647
10779
|
}
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10780
|
+
replacePlaceholdersAttributes(element, cellValue, row) {
|
|
10781
|
+
if (!cellValue) {
|
|
10782
|
+
// ✅ Replace placeholders in attributes with the row original value
|
|
10783
|
+
// but first get the original value
|
|
10784
|
+
const originalValue = row.original;
|
|
10785
|
+
Array.from(element.attributes).forEach(attr => {
|
|
10786
|
+
if (attr.value.includes('__')) {
|
|
10787
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => {
|
|
10788
|
+
if (key in originalValue) {
|
|
10789
|
+
return this.replaceKeyWithValue(key, originalValue[key]);
|
|
10790
|
+
}
|
|
10791
|
+
else {
|
|
10792
|
+
console.warn(`Key ${key} not found in originalValue`);
|
|
10793
|
+
return '';
|
|
10794
|
+
}
|
|
10795
|
+
});
|
|
10796
|
+
}
|
|
10797
|
+
});
|
|
10658
10798
|
}
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10799
|
+
else {
|
|
10800
|
+
// ✅ Replace placeholders in attributes
|
|
10801
|
+
Array.from(element.attributes).forEach(attr => {
|
|
10802
|
+
if (attr.value.includes('__')) {
|
|
10803
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
10804
|
+
}
|
|
10805
|
+
});
|
|
10806
|
+
}
|
|
10807
|
+
}
|
|
10808
|
+
replacePlaceholdersProperties(element, cellValue, row) {
|
|
10809
|
+
if (!cellValue) {
|
|
10810
|
+
// ✅ Replace placeholders in properties with the row original value
|
|
10811
|
+
// but first get the original value
|
|
10812
|
+
const originalValue = row.original;
|
|
10813
|
+
// ✅ Dynamically extract relevant properties
|
|
10814
|
+
const properties = new Set();
|
|
10815
|
+
// Collect only own enumerable properties
|
|
10816
|
+
Object.keys(originalValue).forEach(key => properties.add(key));
|
|
10817
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
10818
|
+
let proto = Object.getPrototypeOf(originalValue);
|
|
10819
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
10820
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
10821
|
+
proto = Object.getPrototypeOf(proto);
|
|
10822
|
+
}
|
|
10823
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
10824
|
+
properties.forEach(prop => {
|
|
10825
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
10826
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
10827
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
10828
|
+
) {
|
|
10666
10829
|
const propValue = element[prop];
|
|
10667
|
-
// ✅ Replace placeholders only if the value is a string
|
|
10668
10830
|
if (typeof propValue === 'string' && propValue.includes('__')) {
|
|
10669
|
-
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) =>
|
|
10831
|
+
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => {
|
|
10832
|
+
if (key in originalValue) {
|
|
10833
|
+
return this.replaceKeyWithValue(key, originalValue[key]);
|
|
10834
|
+
}
|
|
10835
|
+
else {
|
|
10836
|
+
console.warn(`Key ${key} not found in originalValue`);
|
|
10837
|
+
return '';
|
|
10838
|
+
}
|
|
10839
|
+
});
|
|
10670
10840
|
}
|
|
10671
10841
|
}
|
|
10672
|
-
|
|
10673
|
-
|
|
10842
|
+
});
|
|
10843
|
+
}
|
|
10844
|
+
else {
|
|
10845
|
+
// ✅ Dynamically extract relevant properties
|
|
10846
|
+
const properties = new Set();
|
|
10847
|
+
// Collect only own enumerable properties
|
|
10848
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
10849
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
10850
|
+
let proto = Object.getPrototypeOf(element);
|
|
10851
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
10852
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
10853
|
+
proto = Object.getPrototypeOf(proto);
|
|
10854
|
+
}
|
|
10855
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
10856
|
+
properties.forEach(prop => {
|
|
10857
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
10858
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
10859
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
10860
|
+
) {
|
|
10861
|
+
try {
|
|
10862
|
+
const propValue = element[prop];
|
|
10863
|
+
// ✅ Replace placeholders only if the value is a string
|
|
10864
|
+
if (typeof propValue === 'string' && propValue.includes('__')) {
|
|
10865
|
+
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue)); // ✅ TypeScript safe
|
|
10866
|
+
}
|
|
10867
|
+
}
|
|
10868
|
+
catch (error) {
|
|
10869
|
+
console.warn(`Could not assign property ${prop}:`, error.message);
|
|
10870
|
+
}
|
|
10674
10871
|
}
|
|
10675
|
-
}
|
|
10676
|
-
}
|
|
10872
|
+
});
|
|
10873
|
+
}
|
|
10677
10874
|
}
|
|
10678
10875
|
//#endregion METHODS
|
|
10679
10876
|
/****************************************************************************/
|
|
@@ -10707,14 +10904,30 @@ class NvDatagrid {
|
|
|
10707
10904
|
handleParsedChange() {
|
|
10708
10905
|
this.initializeTable();
|
|
10709
10906
|
}
|
|
10710
|
-
|
|
10907
|
+
handleGlobalFilterSearchTerm(newValue) {
|
|
10711
10908
|
if (!this.table) {
|
|
10712
10909
|
console.warn('Table is not initialized yet.');
|
|
10713
10910
|
return;
|
|
10714
10911
|
}
|
|
10715
|
-
//
|
|
10716
|
-
|
|
10717
|
-
this.table.setGlobalFilter(newValue)
|
|
10912
|
+
// Not working
|
|
10913
|
+
/*// Set the global filter for the table
|
|
10914
|
+
this.table.setGlobalFilter(newValue);*/
|
|
10915
|
+
// Manually update the globalFilter state
|
|
10916
|
+
this.table.options.state.globalFilter = newValue;
|
|
10917
|
+
}
|
|
10918
|
+
handlePaginationState(newValue, oldValue) {
|
|
10919
|
+
if (!this.table) {
|
|
10920
|
+
console.warn('Table is not initialized yet.');
|
|
10921
|
+
return;
|
|
10922
|
+
}
|
|
10923
|
+
// Only update if there is a meaningful change
|
|
10924
|
+
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
|
|
10925
|
+
// Not working
|
|
10926
|
+
/*// Set the pagination for the table
|
|
10927
|
+
this.table.setPagination(newValue);*/
|
|
10928
|
+
// Manually update the pagination state
|
|
10929
|
+
this.table.options.state.pagination = newValue;
|
|
10930
|
+
}
|
|
10718
10931
|
}
|
|
10719
10932
|
//#endregion WATCHERS
|
|
10720
10933
|
/****************************************************************************/
|
|
@@ -10723,41 +10936,39 @@ class NvDatagrid {
|
|
|
10723
10936
|
this.cacheTemplates();
|
|
10724
10937
|
this.parseDataAndColumns();
|
|
10725
10938
|
this.initializeTable();
|
|
10939
|
+
if (this.enablePagination) {
|
|
10940
|
+
// Ensure a valid page size
|
|
10941
|
+
const effectivePageSize = this.pageSize > 0 ? this.pageSize : 10;
|
|
10942
|
+
this.paginationState = {
|
|
10943
|
+
pageIndex: Math.max(0, this.minPageIndex - 1),
|
|
10944
|
+
pageSize: effectivePageSize,
|
|
10945
|
+
};
|
|
10946
|
+
}
|
|
10726
10947
|
}
|
|
10727
10948
|
//#endregion EVENTS
|
|
10728
10949
|
/****************************************************************************/
|
|
10729
10950
|
//#region RENDER
|
|
10730
10951
|
render() {
|
|
10731
|
-
var _a, _b, _c, _d;
|
|
10952
|
+
var _a, _b, _c, _d, _e;
|
|
10732
10953
|
const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
|
|
10733
10954
|
? []
|
|
10734
10955
|
: (_a = this.table) === null || _a === void 0 ? void 0 : _a.getHeaderGroups();
|
|
10735
10956
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
10736
10957
|
? []
|
|
10737
10958
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
10738
|
-
return (hAsync(Host, { key: '
|
|
10959
|
+
return (hAsync(Host, { key: 'b3886397a5e6694611636d4da7d61ae5ccbe1903' }, hAsync("div", { key: '8fa71d83f4cfa79cf7fb334bcf6115e4cf253c5d', class: "hidden" }, hAsync("slot", { key: '9aad5956b5973cafc486f3a854a66ae86038ef4a' })), hAsync("slot", { key: '7a1ca93223567faffabb3473df2176cd02654247', name: "before" }), this.enableGlobalFilter && this.table && (hAsync("div", { key: '0020880c229d8ed9070c15182191e86b8b3fed1d', class: "search-container" }, hAsync("input", { key: 'cefc47330a7d770c3668d1406930b9ac50992a10', type: "text", value: (_d = this.globalFilterSearchTerm) !== null && _d !== void 0 ? _d : '', onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns...", class: "search-input", "aria-label": "Search all columns" }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (hAsync("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (hAsync("div", null, hAsync("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (hAsync("thead", null, this.parsedColumns.length > 0 && headerGroups
|
|
10739
10960
|
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (hAsync("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
10740
10961
|
return (hAsync("th", { key: header.id }, header.isPlaceholder
|
|
10741
10962
|
? null
|
|
10742
|
-
: this.
|
|
10963
|
+
: this.flexRender(header.column.columnDef.header, header.getContext())));
|
|
10743
10964
|
}))))
|
|
10744
10965
|
: 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 => {
|
|
10745
10966
|
const rowId = row.id;
|
|
10746
10967
|
const visibleCells = row === null || row === void 0 ? void 0 : row.getVisibleCells();
|
|
10747
10968
|
return (hAsync("tr", { key: rowId }, visibleCells.map(cell => {
|
|
10748
|
-
|
|
10749
|
-
const cellAccessors = cell.column.id;
|
|
10750
|
-
const cellValue = cell.getValue();
|
|
10751
|
-
return (hAsync("td", { key: cell.id, "data-row-id": rowId }, ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(cellValue)
|
|
10752
|
-
? cellValue.map((item) => {
|
|
10753
|
-
var _a;
|
|
10754
|
-
return (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
|
|
10755
|
-
item)) !== null && _a !== void 0 ? _a : this.fallbackValue;
|
|
10756
|
-
})
|
|
10757
|
-
: (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), cellValue, row) ||
|
|
10758
|
-
cellValue)) !== null && _b !== void 0 ? _b : this.fallbackValue));
|
|
10969
|
+
return (hAsync("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
10759
10970
|
})));
|
|
10760
|
-
}))))), hAsync("slot", { key: '
|
|
10971
|
+
})))), this.enablePagination && (hAsync("div", { class: "flex items-center gap-2" }, hAsync("button", { class: "border rounded p-1", disabled: !this.table.getCanPreviousPage(), onClick: this.table.firstPage }, "<<"), hAsync("button", { class: "border rounded p-1", disabled: !this.table.getCanPreviousPage(), onClick: this.table.previousPage }, "<"), hAsync("button", { class: "border rounded p-1", disabled: !this.table.getCanNextPage(), onClick: this.table.nextPage }, ">"), hAsync("button", { class: "border rounded p-1", disabled: !this.table.getCanNextPage(), onClick: this.table.lastPage }, ">>"), hAsync("span", { class: "flex items-center gap-1" }, hAsync("div", null, "Page"), hAsync("strong", null, this.table.getState().pagination.pageIndex + 1, " of", ' ', this.table.getPageCount().toLocaleString())), hAsync("span", { class: "flex items-center gap-1" }, "| Go to page:", ' ', hAsync("input", { type: "number", min: this.minPageIndex, max: this.table.getPageCount(), value: this.table.getState().pagination.pageIndex + 1, class: "border p-1 rounded w-16", "aria-label": "Go to page", onInput: this.handlePageIndexChange })), (_e = this.pageSizes) !== null && _e !== void 0 ? _e : (hAsync("select", { "aria-label": "Rows per page", onChange: this.handlePageSizeChange }, this.pageSizes.map(pageSize => (hAsync("option", { value: String(pageSize), selected: this.table.getState().pagination.pageSize === pageSize }, "Show ", pageSize))))))))), hAsync("slot", { key: '2030fdc2b38a293e749f2ffd4645987e834fee76', name: "after" })));
|
|
10761
10972
|
}
|
|
10762
10973
|
get el() { return getElement(this); }
|
|
10763
10974
|
static get watchers() { return {
|
|
@@ -10767,7 +10978,8 @@ class NvDatagrid {
|
|
|
10767
10978
|
"dataJson": ["parseJsonData"],
|
|
10768
10979
|
"parsedColumns": ["handleParsedChange"],
|
|
10769
10980
|
"parsedData": ["handleParsedChange"],
|
|
10770
|
-
"
|
|
10981
|
+
"globalFilterSearchTerm": ["handleGlobalFilterSearchTerm"],
|
|
10982
|
+
"paginationState": ["handlePaginationState"]
|
|
10771
10983
|
}; }
|
|
10772
10984
|
static get style() { return NvDatagridStyle0; }
|
|
10773
10985
|
static get cmpMeta() { return {
|
|
@@ -10783,15 +10995,19 @@ class NvDatagrid {
|
|
|
10783
10995
|
"noColumnsNoDataMessage": [513, "no-columns-no-data-message"],
|
|
10784
10996
|
"enableGlobalFilter": [516, "enable-global-filter"],
|
|
10785
10997
|
"autoGenerateColumns": [516, "auto-generate-columns"],
|
|
10998
|
+
"enablePagination": [516, "enable-pagination"],
|
|
10999
|
+
"pageSize": [514, "page-size"],
|
|
11000
|
+
"pageSizes": [16],
|
|
10786
11001
|
"table": [32],
|
|
10787
11002
|
"parsedColumns": [32],
|
|
10788
11003
|
"parsedData": [32],
|
|
10789
|
-
"
|
|
10790
|
-
"columnData": [32]
|
|
11004
|
+
"globalFilterSearchTerm": [32],
|
|
11005
|
+
"columnData": [32],
|
|
11006
|
+
"paginationState": [32]
|
|
10791
11007
|
},
|
|
10792
11008
|
"$listeners$": undefined,
|
|
10793
11009
|
"$lazyBundleId$": "-",
|
|
10794
|
-
"$attrsToReflect$": [["dataJson", "data-json"], ["columnsJson", "columns-json"], ["fallbackValue", "fallback-value"], ["noDataMessage", "no-data-message"], ["noColumnsNoDataMessage", "no-columns-no-data-message"], ["enableGlobalFilter", "enable-global-filter"], ["autoGenerateColumns", "auto-generate-columns"]]
|
|
11010
|
+
"$attrsToReflect$": [["dataJson", "data-json"], ["columnsJson", "columns-json"], ["fallbackValue", "fallback-value"], ["noDataMessage", "no-data-message"], ["noColumnsNoDataMessage", "no-columns-no-data-message"], ["enableGlobalFilter", "enable-global-filter"], ["autoGenerateColumns", "auto-generate-columns"], ["enablePagination", "enable-pagination"], ["pageSize", "page-size"]]
|
|
10795
11011
|
}; }
|
|
10796
11012
|
}
|
|
10797
11013
|
|
|
@@ -10811,7 +11027,7 @@ class NvDatagridcolumn {
|
|
|
10811
11027
|
/****************************************************************************/
|
|
10812
11028
|
//#region RENDER
|
|
10813
11029
|
render() {
|
|
10814
|
-
return (hAsync(Host, { key: '
|
|
11030
|
+
return (hAsync(Host, { key: '20839d4a0abfa07e55a49b434ad26e3ddaebb66b' }, hAsync("slot", { key: '2c1b24aef73e9be8e500d48741e4dc6a42ed6f06', name: "header" }), hAsync("slot", { key: 'cbc4bcbb080f8647c6f702e4a52411fe9be1f6ca', name: "cell" })));
|
|
10815
11031
|
}
|
|
10816
11032
|
static get cmpMeta() { return {
|
|
10817
11033
|
"$flags$": 4,
|
|
@@ -11683,7 +11899,7 @@ class NvDialog {
|
|
|
11683
11899
|
//#region RENDER
|
|
11684
11900
|
render() {
|
|
11685
11901
|
const hasForm = this.form || this.el.querySelector('form');
|
|
11686
|
-
return (hAsync(Host, { key: '
|
|
11902
|
+
return (hAsync(Host, { key: '97fcd67a39e1ade8b2c85280d98aa756e693fdaf' }, hAsync("slot", { key: 'cd2126fc88215305b1229e03c70ee8efbd4bd518', name: "trigger" }), hAsync("dialog", { key: 'f7d40530e0f0646e1d8c415c0ec341e959e142e6', 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: '44c81193f1946a1ae0819e96d0217bf986c6e99a', class: "content" }, !this.undismissable && (hAsync("nv-button", { key: '5c2cf4e7434903f72ba814af716ce93826caaa3a', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleCloseButton, "aria-label": "Close dialog" }, hAsync("nv-icon", { key: '97b57d2340aaf1cd04e49d0f4e594b2de5295809', name: "x", size: "sm" }))), this.headerElement ? (hAsync("slot", { name: "header" })) : (hAsync("nv-dialogheader", { id: "dialog-header" })), hAsync("div", { key: '27cd8b2058505be1e0ee0e380bf44582c37c525f', class: "content-body", id: "dialog-content" }, hAsync("slot", { key: 'cef88d8a7fe28518842c206761adc2fd753b2648' })), this.footerElement ? (hAsync("slot", { name: "footer" })) : (hAsync("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? ButtonType.Submit : ButtonType.Button, onDialogCanceled: this.handleCancelButton, undismissable: this.undismissable }))))));
|
|
11687
11903
|
}
|
|
11688
11904
|
get el() { return getElement(this); }
|
|
11689
11905
|
static get watchers() { return {
|
|
@@ -11799,7 +12015,7 @@ class NvDialogfooter {
|
|
|
11799
12015
|
/****************************************************************************/
|
|
11800
12016
|
//#region RENDER
|
|
11801
12017
|
render() {
|
|
11802
|
-
return (hAsync(Host, { key: '
|
|
12018
|
+
return (hAsync(Host, { key: '5756a0cc697188c3fdee2930b1c6ae7922af71cc' }, !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))));
|
|
11803
12019
|
}
|
|
11804
12020
|
static get formAssociated() { return true; }
|
|
11805
12021
|
get el() { return getElement(this); }
|
|
@@ -11855,7 +12071,7 @@ class NvDialogheader {
|
|
|
11855
12071
|
/****************************************************************************/
|
|
11856
12072
|
//#region RENDER
|
|
11857
12073
|
render() {
|
|
11858
|
-
return (hAsync(Host, { key: '
|
|
12074
|
+
return (hAsync(Host, { key: '850e2408cb7a35903be3bc51fbee000fc58f4a76' }, !this.hasSlot ? (hAsync(Fragment, null, hAsync("div", { class: "heading" }, this.heading), hAsync("div", { class: "subheading" }, this.subheading))) : (hAsync("slot", null))));
|
|
11859
12075
|
}
|
|
11860
12076
|
get el() { return getElement(this); }
|
|
11861
12077
|
static get style() { return NvDialogheaderStyle0; }
|
|
@@ -11992,13 +12208,13 @@ class NvFieldcheckbox {
|
|
|
11992
12208
|
/****************************************************************************/
|
|
11993
12209
|
//#region RENDER
|
|
11994
12210
|
render() {
|
|
11995
|
-
return (hAsync(Host, { key: '
|
|
12211
|
+
return (hAsync(Host, { key: '98f9dfdadab534193e7076f929c9820a231fecba', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, hAsync("div", { key: '5a4d02d46b7c8c8930c24f794452180d58604ffe', class: "input-container" }, hAsync("input", { key: 'f7a4002a5fb9800ed4036638773ac42c49d4ae0f', 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 => {
|
|
11996
12212
|
if (el) {
|
|
11997
12213
|
el.indeterminate = this.indeterminate;
|
|
11998
12214
|
}
|
|
11999
|
-
} }), hAsync("span", { key: '
|
|
12000
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
12001
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
12215
|
+
} }), hAsync("span", { key: '56a2547ecf96ef3f7f28054592471323497cb94f', class: "icon" }, this.checked && !this.indeterminate && (hAsync("slot", { key: 'af4e10bd52b42850c8348e0aed8c90a7e700d64a', name: "checked-icon" }, hAsync("svg", { key: '105847f526c391566cef42fa35d94fbaba0e8984', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, hAsync("path", { key: '41e221d5f3eab7a4cc88d4ed9454f198d69ec815', d: "M11.6667 3.5L5.25004 9.91667L2.33337 7", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.indeterminate && (hAsync("slot", { key: '3a1f5ffdc34a1ecdc1bb7f1b5347e1f12f5f690d', name: "indeterminate-icon" }, hAsync("svg", { key: '1b68c27172d5b6b9ba2419d278c0ac0299d7a4b7', class: "indeterminate-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, hAsync("path", { key: '7b2f4e5fe1d961fad290aade639b9807446f34ba', d: "M2.9165 7H11.0832", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), hAsync("div", { key: 'd472d7d8901ff7de37fe370bf5d637fc8ae6069d', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'c8dbda4d6f9cb757476c9a96934599171f6ea7ae', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: '3c0ec17aeb856457b63981fd0e21ead69ca3af0f', name: "label" }, this.label))), (this.description ||
|
|
12216
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'dff6c3a69496324cabcf25ae7639c98a7d908769', class: "description" }, hAsync("slot", { key: '498c8216c9a0a537f1aa2a542b3caa688b76e55d', name: "description" }, this.description))), (this.errorDescription ||
|
|
12217
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '6c584da0ad93e7f0ad62610d760c36d77b1a6fc6', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '93df382e666707cdde3133daae7aa66914215149', name: "error-description" }, this.errorDescription))))));
|
|
12002
12218
|
}
|
|
12003
12219
|
static get formAssociated() { return true; }
|
|
12004
12220
|
get el() { return getElement(this); }
|
|
@@ -16055,12 +16271,12 @@ class NvFielddate {
|
|
|
16055
16271
|
/****************************************************************************/
|
|
16056
16272
|
//#region RENDER
|
|
16057
16273
|
render() {
|
|
16058
|
-
return (hAsync(Host, { key: '
|
|
16059
|
-
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '
|
|
16274
|
+
return (hAsync(Host, { key: '817d7baa3525b53962f9afe3d1eb56d7fcbcaf0e' }, ((this.label && this.label.length > 0) ||
|
|
16275
|
+
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '00faded19c22c4883b7ef4de71d90c13c287d60d', htmlFor: this.inputId }, hAsync("slot", { key: '48b7e470d654b9f07c3eba400145b8936c9eb27e', name: "label" }, this.label))), hAsync("nv-popover", { key: '5b8e57124c0a08097874ac9ad0280908c3f2e330', ref: el => (this.popoverElement = el), id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: '902097ce5a7f208ac97f72a847d68b80cd16419a', slot: "trigger", class: "input-wrapper" }, hAsync("slot", { key: '909ff8453e9e48516582c64dae0762987cbd5986', name: "before-input" }), hAsync("div", { key: 'e62714e613e9bffc5a6a302d72cdfea75555756a', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '9d4e6bd15fe09bee974676032d4b75a73f733674', name: "leading-input" }), hAsync("input", { key: '4565589e720150706096cbdeeadefb84ee836c39', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.singleValue, onInput: this.handleInput, onFocus: this.handleFocus }), hAsync("nv-iconbutton", { key: '115ba5c4e9bbd502c51d04894a5cf88f98167231', class: "toggle-calendar-icon", name: "calendar" //{this.open ? 'chevron-top' : 'chevron-down'}
|
|
16060
16276
|
,
|
|
16061
|
-
size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', "aria-pressed": this.open.toString(), onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), hAsync("slot", { key: '
|
|
16062
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
16063
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
16277
|
+
size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', "aria-pressed": this.open.toString(), onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), hAsync("slot", { key: '3df2883ebe71fa1dd437f5dc62d82019b3550b88', name: "after-input" })), hAsync("div", { key: '61241669d9599d23f2cf024d8e65becdafe58847', slot: "content" }, hAsync("nv-calendar", { key: 'dd3c67a46e8addbf1017eaf578447a09a3dd9e66', dateFormat: this.dateFormat, singleValue: this.singleValue, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates }))), ((this.description && this.description.length > 0) ||
|
|
16278
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'f835c89363c45529512e156b313cb35f71ef5264', class: "description" }, hAsync("slot", { key: '738d49ee6e525310375eba5da057573104d3c2ed', name: "description" }, this.description))), (this.errorDescription ||
|
|
16279
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '7c5c07db1af3423efc9a1b1127c1b3cbdede0a28', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (hAsync("slot", { name: "error-description" })) : (this.errorDescription))), hAsync("slot", { key: 'ccfd311cbbb56b9b336317d0e543fc57676a60d3' })));
|
|
16064
16280
|
}
|
|
16065
16281
|
get el() { return getElement(this); }
|
|
16066
16282
|
static get watchers() { return {
|
|
@@ -16442,15 +16658,15 @@ class NvFielddaterange {
|
|
|
16442
16658
|
/****************************************************************************/
|
|
16443
16659
|
//#region RENDER
|
|
16444
16660
|
render() {
|
|
16445
|
-
return (hAsync(Host, { key: '
|
|
16446
|
-
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '
|
|
16661
|
+
return (hAsync(Host, { key: '965223047219ae767b07ccecb0a00580ea39c232' }, ((this.label && this.label.length > 0) ||
|
|
16662
|
+
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '096d6a34148da30d61686024b5891e7e15cd92e2', htmlFor: this.startInputId }, hAsync("slot", { key: 'ee6e84ef1927ad809e7dddb2f4ad5ef7380d0bca', name: "label" }, this.label))), hAsync("nv-popover", { key: '1a0549e85ab73157b379fcbcee014a7d85be9752', ref: el => (this.popoverElement = el), id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: 'd9fc4c8f379e3c1884867c87bcaa67b2da1c64ae', slot: "trigger", class: "input-wrapper" }, hAsync("slot", { key: '4189696f3e877c19d4c24b09377b2ab0ce9aa437', name: "before-input" }), hAsync("div", { key: '98025c8fc29121c736deb3042e961ef0eb1442fe', class: "input-container" }, hAsync("slot", { key: '897481f836e33fd70a7c3b083a4e9b3db87637f2', name: "leading-input" }), hAsync("div", { key: '788df58693fafaf8c78645b81d1b09a828138ccf', class: "range-inputs" }, hAsync("input", { key: '7966b844668ca4cb02ac34886b62ee24cb7b1399', id: this.startInputId, type: "text", placeholder: this.startPlaceholder, name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.shouldAutoFocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus }), hAsync("svg", { key: '67c0b68f0fb32ce122f9d4e5b1240440f3b649d0', xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "icon icon-tabler icons-tabler-outline icon-tabler-arrows-move-horizontal" }, hAsync("path", { key: 'eb68f32a768c1c48b51a45ddba3f85357b8045e6', stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), hAsync("path", { key: 'b8ccaf592dc2d36719a8418800a736b06d1c1775', d: "M18 9l3 3l-3 3" }), hAsync("path", { key: 'c4b8d8e8ffad9a339abcde63a9a0feb2ddc771d3', d: "M15 12h6" }), hAsync("path", { key: '7a28c7086d7085163ff8d885acd7434b4e5ea69a', d: "M6 9l-3 3l3 3" }), hAsync("path", { key: '39917978c25b13a270f0852818b31868f2034832', d: "M3 12h6" })), hAsync("input", { key: 'aaad42e407d1fe8e31a7e7c153e2d4cd35d8d2df', id: this.endInputId, type: "text", placeholder: this.endPlaceholder, name: this.endName, disabled: this.disabled, readOnly: this.readonly, required: this.required, value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus })), hAsync("nv-iconbutton", { key: '04701e7bdf80a869f8a5f519141ac99c0077c20b', class: "toggle-calendar-icon", name: "calendar", size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', "aria-pressed": this.open.toString(), onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), hAsync("slot", { key: 'cf1a48dcd20b4e363a746c9f26ecae8085e8ebbd', name: "after-input" })), hAsync("div", { key: 'a36a223b6d5edd30bb9a4590d059caede5412b6a', slot: "content" }, hAsync("nv-calendar", { key: '1ff22f214d648c4bb35455cf477529251c436e2d', dateFormat: this.dateFormat, rangeValue: this.startValue && this.endValue
|
|
16447
16663
|
? JSON.stringify({
|
|
16448
16664
|
start: this.startValue,
|
|
16449
16665
|
end: this.endValue,
|
|
16450
16666
|
})
|
|
16451
16667
|
: '', firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, selectionType: "range" }))), ((this.description && this.description.length > 0) ||
|
|
16452
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
16453
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
16668
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '780f82060de810eb394285f4799511d2223312a3', class: "description" }, hAsync("slot", { key: '326cbf626387738b9997f3b4d452c50ea2b3d5b2', name: "description" }, this.description))), (this.errorDescription ||
|
|
16669
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '6043f611a60f14976b8572e975621fac57b18f89', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (hAsync("slot", { name: "error-description" })) : (this.errorDescription))), hAsync("slot", { key: '129fe5bcd6c5bd9449242dc6b4f0e1c90ae31082' })));
|
|
16454
16670
|
}
|
|
16455
16671
|
get el() { return getElement(this); }
|
|
16456
16672
|
static get watchers() { return {
|
|
@@ -16578,10 +16794,6 @@ class NvFielddropdown {
|
|
|
16578
16794
|
/** The text entered by the user for filtering dropdown items. */
|
|
16579
16795
|
this.filterText = '';
|
|
16580
16796
|
this.selectedValues = new Set();
|
|
16581
|
-
/**
|
|
16582
|
-
* Options configuration for the dropdown items.
|
|
16583
|
-
*/
|
|
16584
|
-
this.parsedOptions = [];
|
|
16585
16797
|
this.handleInputContainerClick = (event) => {
|
|
16586
16798
|
if (this.disabled || this.readonly) {
|
|
16587
16799
|
return;
|
|
@@ -16624,17 +16836,17 @@ class NvFielddropdown {
|
|
|
16624
16836
|
this.open = !this.open;
|
|
16625
16837
|
};
|
|
16626
16838
|
this.getSelectedLabel = () => {
|
|
16627
|
-
var _a, _b, _c, _d, _e;
|
|
16839
|
+
var _a, _b, _c, _d, _e, _f;
|
|
16628
16840
|
if (!this.value)
|
|
16629
16841
|
return '';
|
|
16630
|
-
if (this.
|
|
16631
|
-
const matchingItem = this.
|
|
16632
|
-
return (
|
|
16842
|
+
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 1) {
|
|
16843
|
+
const matchingItem = this.options.find(option => option.value === this.value);
|
|
16844
|
+
return (_c = (_b = matchingItem === null || matchingItem === void 0 ? void 0 : matchingItem.label) !== null && _b !== void 0 ? _b : matchingItem === null || matchingItem === void 0 ? void 0 : matchingItem.value) !== null && _c !== void 0 ? _c : this.value;
|
|
16633
16845
|
}
|
|
16634
16846
|
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitem'));
|
|
16635
16847
|
const matchingItem = items.find(item => item.value === this.value);
|
|
16636
16848
|
const selectedLabel = matchingItem
|
|
16637
|
-
? (
|
|
16849
|
+
? (_f = (_d = matchingItem.label) !== null && _d !== void 0 ? _d : (_e = matchingItem.textContent) === null || _e === void 0 ? void 0 : _e.trim()) !== null && _f !== void 0 ? _f : matchingItem.value
|
|
16638
16850
|
: '';
|
|
16639
16851
|
return selectedLabel;
|
|
16640
16852
|
};
|
|
@@ -16671,23 +16883,12 @@ class NvFielddropdown {
|
|
|
16671
16883
|
}
|
|
16672
16884
|
handleOptionsChange(newValue) {
|
|
16673
16885
|
var _a;
|
|
16674
|
-
if (newValue)
|
|
16675
|
-
|
|
16676
|
-
|
|
16677
|
-
|
|
16678
|
-
|
|
16679
|
-
|
|
16680
|
-
this.value = (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value) !== null && _a !== void 0 ? _a : '';
|
|
16681
|
-
this.updateSelectedItem(this.value);
|
|
16682
|
-
}
|
|
16683
|
-
}
|
|
16684
|
-
catch (error) {
|
|
16685
|
-
console.error('nv-fielddropdown: error parsing options:', error);
|
|
16686
|
-
this.parsedOptions = [];
|
|
16687
|
-
}
|
|
16688
|
-
}
|
|
16689
|
-
else {
|
|
16690
|
-
this.parsedOptions = [];
|
|
16886
|
+
if (!newValue)
|
|
16887
|
+
return;
|
|
16888
|
+
if (!this.value) {
|
|
16889
|
+
const defaultValue = newValue.find(option => option.selected);
|
|
16890
|
+
this.value = (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value) !== null && _a !== void 0 ? _a : '';
|
|
16891
|
+
this.updateSelectedItem(this.value);
|
|
16691
16892
|
}
|
|
16692
16893
|
}
|
|
16693
16894
|
handleBlur(event) {
|
|
@@ -16842,9 +17043,10 @@ class NvFielddropdown {
|
|
|
16842
17043
|
/****************************************************************************/
|
|
16843
17044
|
//#region RENDER
|
|
16844
17045
|
render() {
|
|
16845
|
-
|
|
16846
|
-
|
|
16847
|
-
this.el.querySelector('[slot="
|
|
17046
|
+
var _a;
|
|
17047
|
+
return (hAsync(Host, { key: '6c23d4cfd361e1f40a2181db66692eb0d6326bfe', role: "combobox", "aria-expanded": this.open.toString(), "aria-haspopup": "listbox", "aria-label": this.label }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'db9a30ece9e669c70b18193b3cc7d14967a5e071', htmlFor: this.inputId }, hAsync("slot", { key: 'b7a721b25b82646d34ce141526775f24a9849f4b', name: "label" }, this.label))), hAsync("nv-popover", { key: '724756cb69b4b6ef8837e6f7f53a65eb42a43b5e', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: '0092cd2b78234ec2e0cdc70433246a2985b7e57f', class: "input-wrapper", slot: "trigger" }, hAsync("slot", { key: '519c1a407c8309861673b9eadb723edb0c70ae68', name: "before-input" }), hAsync("div", { key: 'd88af43846337d9bfd6aeb4f28ab2dc7e56de4e8', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '8e91459d89acbf7a1cde5e75c520b11b109e810d', name: "leading-input" }), this.filterable || this.disabled || this.readonly ? (hAsync("input", { "data-scope": "focusable", 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, onClick: this.handleInputFocus, onKeyDown: this.handleKeyDown })) : (hAsync("p", { "data-scope": "focusable", id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClick, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocus }, this.getSelectedLabel() || this.value || this.placeholder)), this.filterable && this.filterText && this.open && (hAsync("nv-iconbutton", { key: '55efb1100997af6b9b4ee41c489a9e628d36b749', name: "x", size: "md", emphasis: "lower", class: "clear-button", onClick: this.clearFilter, "aria-label": "Clear input" })), this.error && (hAsync("nv-icon", { key: '69cfcac7b21d0e9faf9bad7f306bab187a761758', name: "alert-circle", class: "validation", size: "md" })), hAsync("nv-iconbutton", { key: '5b773edca6a5028eb8cedb42632a9c5b6e8b3d36', "data-scope": "toggle-dropdown", 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: 'c225279e1ec938e2fbe672ce02e8d2a79cb7ff1e', name: "after-input" })), hAsync("div", { key: '94905d2f6a0b7faae17540139c0bd2458e4c98ae', slot: "content" }, ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (hAsync("ul", null, this.options.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 ||
|
|
17048
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '5d0b74de616aefa056d17cb70fab0d36ab9b41c3', class: "description" }, hAsync("slot", { key: 'bab9d8222164d2227c6024ac2bd5675142ccb964', name: "description" }, this.description))), (this.errorDescription ||
|
|
17049
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '58596e0c753e8bb90f9d21432607427b0a029d64', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '6062d632aee6e825cd2d17a22180cb24d66e2864', name: "error-description" }, this.errorDescription)))));
|
|
16848
17050
|
}
|
|
16849
17051
|
static get formAssociated() { return true; }
|
|
16850
17052
|
get el() { return getElement(this); }
|
|
@@ -16872,16 +17074,15 @@ class NvFielddropdown {
|
|
|
16872
17074
|
"disabled": [516],
|
|
16873
17075
|
"emptyResult": [513, "empty-result"],
|
|
16874
17076
|
"filterable": [516],
|
|
16875
|
-
"options": [
|
|
17077
|
+
"options": [16],
|
|
16876
17078
|
"autofocus": [516],
|
|
16877
17079
|
"filterText": [32],
|
|
16878
17080
|
"selectedValues": [32],
|
|
16879
|
-
"parsedOptions": [32],
|
|
16880
17081
|
"getFilterText": [64]
|
|
16881
17082
|
},
|
|
16882
17083
|
"$listeners$": [[0, "dropdownItemSelected", "handleDropdownItemSelected"], [0, "openChanged", "handleOpenChanged"], [2, "blur", "handleBlur"], [0, "keydown", "handleKeyDown"]],
|
|
16883
17084
|
"$lazyBundleId$": "-",
|
|
16884
|
-
"$attrsToReflect$": [["inputId", "input-id"], ["label", "label"], ["description", "description"], ["placeholder", "placeholder"], ["name", "name"], ["open", "open"], ["autocomplete", "autocomplete"], ["value", "value"], ["required", "required"], ["error", "error"], ["errorDescription", "error-description"], ["readonly", "readonly"], ["disabled", "disabled"], ["emptyResult", "empty-result"], ["filterable", "filterable"], ["
|
|
17085
|
+
"$attrsToReflect$": [["inputId", "input-id"], ["label", "label"], ["description", "description"], ["placeholder", "placeholder"], ["name", "name"], ["open", "open"], ["autocomplete", "autocomplete"], ["value", "value"], ["required", "required"], ["error", "error"], ["errorDescription", "error-description"], ["readonly", "readonly"], ["disabled", "disabled"], ["emptyResult", "empty-result"], ["filterable", "filterable"], ["autofocus", "autofocus"]]
|
|
16885
17086
|
}; }
|
|
16886
17087
|
}
|
|
16887
17088
|
|
|
@@ -16944,7 +17145,7 @@ class NvFielddropdownitem {
|
|
|
16944
17145
|
/****************************************************************************/
|
|
16945
17146
|
//#region RENDER
|
|
16946
17147
|
render() {
|
|
16947
|
-
return (hAsync(Host, { key: '
|
|
17148
|
+
return (hAsync(Host, { key: '86699901e52c35392ae5e60013f542427973a626', role: "menuitem", tabindex: '-1', onClick: this.handleSelected }, hAsync("slot", { key: 'f2d893f0692821fc0e918da9283eb174c3429173' }), !this.composed && (hAsync("div", { key: '5e62842ee3b0e79333f99a3ec8d92dd843ebd96e', class: "text-wrapper" }, hAsync("span", { key: 'baa00ac59b5d85d912f34fc16fbf82d87af849e2', "data-scope": "text" }, this.label))), this.selected && (hAsync("nv-icon", { key: 'f9a5082e4cee6b68531809f9861e3da83b3001d6', name: "check", "aria-hidden": "true", "data-scope": "selected" }))));
|
|
16948
17149
|
}
|
|
16949
17150
|
get el() { return getElement(this); }
|
|
16950
17151
|
static get style() { return NvFielddropdownitemStyle0; }
|
|
@@ -17009,7 +17210,7 @@ class NvFielddropdownitemcheck {
|
|
|
17009
17210
|
};
|
|
17010
17211
|
}
|
|
17011
17212
|
render() {
|
|
17012
|
-
return (hAsync(Host, { key: '
|
|
17213
|
+
return (hAsync(Host, { key: '93a97fb36d69bd837b27cdbfa31adc5a7a71dab4', onClick: this.handleClick }, hAsync("nv-fieldcheckbox", { key: '7afd9b55ce6911c327fae658304fa313fc908d45', 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 })));
|
|
17013
17214
|
}
|
|
17014
17215
|
get el() { return getElement(this); }
|
|
17015
17216
|
static get style() { return NvFielddropdownitemcheckStyle0; }
|
|
@@ -17098,10 +17299,6 @@ class NvFieldmultiselect {
|
|
|
17098
17299
|
* State of the multiselect popover.
|
|
17099
17300
|
*/
|
|
17100
17301
|
this.open = false;
|
|
17101
|
-
/**
|
|
17102
|
-
* Options configuration for the multiselect items.
|
|
17103
|
-
*/
|
|
17104
|
-
this.parsedOptions = [];
|
|
17105
17302
|
/**
|
|
17106
17303
|
* List of selected values in the multiselect.
|
|
17107
17304
|
*/
|
|
@@ -17119,12 +17316,6 @@ class NvFieldmultiselect {
|
|
|
17119
17316
|
* @default 300
|
|
17120
17317
|
*/
|
|
17121
17318
|
this.debounceDelay = 300;
|
|
17122
|
-
/**
|
|
17123
|
-
* State for the mode of the multiselect.
|
|
17124
|
-
* @type {'options' | 'slots'}
|
|
17125
|
-
* @default 'options'
|
|
17126
|
-
*/
|
|
17127
|
-
this.modeState = 'options'; // Default value
|
|
17128
17319
|
this.isHandlingEscape = false;
|
|
17129
17320
|
/**
|
|
17130
17321
|
* Applies focus to the input field as soon as the component is mounted. This
|
|
@@ -17145,7 +17336,7 @@ class NvFieldmultiselect {
|
|
|
17145
17336
|
item.style.display = '';
|
|
17146
17337
|
});
|
|
17147
17338
|
// Reorder options without the divider since there are no selected elements
|
|
17148
|
-
this.
|
|
17339
|
+
this.options = this.options.filter(option => !option.isDivider);
|
|
17149
17340
|
// Reorder options without the divider since there are no selected elements
|
|
17150
17341
|
this.reorderOptionsContent();
|
|
17151
17342
|
};
|
|
@@ -17173,13 +17364,6 @@ class NvFieldmultiselect {
|
|
|
17173
17364
|
return;
|
|
17174
17365
|
}
|
|
17175
17366
|
this.filterText = '';
|
|
17176
|
-
// Only reorder based on the mode
|
|
17177
|
-
if (this.modeState === 'options') {
|
|
17178
|
-
this.reorderOptionsContent();
|
|
17179
|
-
}
|
|
17180
|
-
else {
|
|
17181
|
-
this.reorderSlotContent();
|
|
17182
|
-
}
|
|
17183
17367
|
// Reset filter if needed
|
|
17184
17368
|
if (this.filterable) {
|
|
17185
17369
|
this.resetFilter();
|
|
@@ -17348,7 +17532,7 @@ class NvFieldmultiselect {
|
|
|
17348
17532
|
* @returns {any} The JSX for options mode
|
|
17349
17533
|
*/
|
|
17350
17534
|
this.renderOptionsMode = () => {
|
|
17351
|
-
return (hAsync(Host, null, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { htmlFor: this.inputId }, hAsync("slot", { name: "label" }, this.label))), hAsync("nv-popover", { ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { class: "input-wrapper-multiselect", slot: "trigger" }, hAsync("slot", { name: "before-input" }), hAsync("div", { class: "input-container-multiselect" }, hAsync("slot", { name: "leading-input" }), this.selectedValues.length > 0 && (hAsync("nv-badge", { slot: "leading-input", "prevent-auto-close": true, color: "10", dismissible: this.selectedValues.length > 0, label: `${this.selectedValues.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.selectedValues.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseOptions })), this.filterable || this.disabled || this.readonly ? (hAsync("input", { type: "text", id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.value, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputOptions, onFocus: this.handleInputFocusOptions, onBlur: this.handleInputBlurOptions, onKeyDown: this.handleKeyDown })) : (hAsync("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClickOptions, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusOptions, role: "combobox", "aria-expanded": this.open }, hAsync("span", null, this.value || this.placeholder))), this.error && (hAsync("nv-icon", { name: "alert-circle", class: "validation", size: "md" })), hAsync("nv-iconbutton", { "data-scope": "toggle-dropdown", 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.togglePopoverOptions })), hAsync("slot", { name: "after-input" })), hAsync("div", { slot: "content", role: "listbox", "aria-multiselectable": "true", style: { 'max-height': this.maxHeight, 'overflow-y': 'auto' } }, hAsync("ul", { role: "content" }, this.
|
|
17535
|
+
return (hAsync(Host, null, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { htmlFor: this.inputId }, hAsync("slot", { name: "label" }, this.label))), hAsync("nv-popover", { ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { class: "input-wrapper-multiselect", slot: "trigger" }, hAsync("slot", { name: "before-input" }), hAsync("div", { class: "input-container-multiselect" }, hAsync("slot", { name: "leading-input" }), this.selectedValues.length > 0 && (hAsync("nv-badge", { slot: "leading-input", "prevent-auto-close": true, color: "10", dismissible: this.selectedValues.length > 0, label: `${this.selectedValues.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.selectedValues.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseOptions })), this.filterable || this.disabled || this.readonly ? (hAsync("input", { type: "text", id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.value, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputOptions, onFocus: this.handleInputFocusOptions, onBlur: this.handleInputBlurOptions, onKeyDown: this.handleKeyDown })) : (hAsync("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClickOptions, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusOptions, role: "combobox", "aria-expanded": this.open }, hAsync("span", null, this.value || this.placeholder))), this.error && (hAsync("nv-icon", { name: "alert-circle", class: "validation", size: "md" })), hAsync("nv-iconbutton", { "data-scope": "toggle-dropdown", 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.togglePopoverOptions })), hAsync("slot", { name: "after-input" })), hAsync("div", { slot: "content", role: "listbox", "aria-multiselectable": "true", style: { 'max-height': this.maxHeight, 'overflow-y': 'auto' } }, hAsync("ul", { role: "content" }, this.options.map(option => (hAsync("nv-fielddropdownitemcheck", { label: option.label, description: option.description, value: option.value, checked: this.selectedValues.includes(option.value), disabled: option.disabled }))), hAsync("hr", { class: "multiselect-divider", style: { display: 'none' } })))), this.renderDescriptions()));
|
|
17352
17536
|
};
|
|
17353
17537
|
/**
|
|
17354
17538
|
* Renders the component in slots mode
|
|
@@ -17371,13 +17555,13 @@ class NvFieldmultiselect {
|
|
|
17371
17555
|
* Set the mode state and handle options change.
|
|
17372
17556
|
*/
|
|
17373
17557
|
componentWillLoad() {
|
|
17374
|
-
|
|
17558
|
+
var _a;
|
|
17375
17559
|
// Don't call handleOptionsChange if we are in slots mode
|
|
17376
|
-
if (this.
|
|
17560
|
+
if (this.options) {
|
|
17377
17561
|
this.handleOptionsChange(this.options);
|
|
17378
17562
|
}
|
|
17379
17563
|
// Specific initialization for slots mode
|
|
17380
|
-
if (this.
|
|
17564
|
+
if (!this.options) {
|
|
17381
17565
|
Promise.resolve().then(() => {
|
|
17382
17566
|
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
17383
17567
|
// Initialize selectedValues with checked items
|
|
@@ -17391,8 +17575,8 @@ class NvFieldmultiselect {
|
|
|
17391
17575
|
});
|
|
17392
17576
|
}
|
|
17393
17577
|
// Initialize the sorted options array with the parsed options for initial rendering
|
|
17394
|
-
if (this.
|
|
17395
|
-
this.sortedOptions = [...this.
|
|
17578
|
+
if (this.options) {
|
|
17579
|
+
this.sortedOptions = [...((_a = this.options) !== null && _a !== void 0 ? _a : [])];
|
|
17396
17580
|
}
|
|
17397
17581
|
// Apply filtering if the multiselect is filterable and there is a value
|
|
17398
17582
|
if (this.filterable && this.value) {
|
|
@@ -17408,10 +17592,8 @@ class NvFieldmultiselect {
|
|
|
17408
17592
|
* Force reorder if options mode in componentDidLoad because of the initial render not trigger @watch
|
|
17409
17593
|
*/
|
|
17410
17594
|
componentDidLoad() {
|
|
17411
|
-
if (this.
|
|
17412
|
-
|
|
17413
|
-
this.reorderOptionsContent();
|
|
17414
|
-
});
|
|
17595
|
+
if (this.options) {
|
|
17596
|
+
this.handleOptionsChange(this.options);
|
|
17415
17597
|
}
|
|
17416
17598
|
}
|
|
17417
17599
|
/**
|
|
@@ -17436,6 +17618,12 @@ class NvFieldmultiselect {
|
|
|
17436
17618
|
else {
|
|
17437
17619
|
this.handlePopoverClose();
|
|
17438
17620
|
}
|
|
17621
|
+
if (this.options) {
|
|
17622
|
+
this.reorderOptionsContent();
|
|
17623
|
+
}
|
|
17624
|
+
else {
|
|
17625
|
+
this.reorderSlotContent();
|
|
17626
|
+
}
|
|
17439
17627
|
}
|
|
17440
17628
|
/**
|
|
17441
17629
|
* Listen for the `itemChecked` event emitted by child items.
|
|
@@ -17469,41 +17657,13 @@ class NvFieldmultiselect {
|
|
|
17469
17657
|
console.warn('Received itemChecked event with undefined or null value'); // Warning log
|
|
17470
17658
|
}
|
|
17471
17659
|
}
|
|
17472
|
-
/**
|
|
17473
|
-
* Emitted when the options change.
|
|
17474
|
-
* @param {string | Array<{label: string, value: string, isDivider?: boolean, disabled?: boolean, description?: string, checked?: boolean}>} newValue - The new value of the options.
|
|
17475
|
-
*/
|
|
17476
17660
|
handleOptionsChange(newValue) {
|
|
17477
|
-
if (
|
|
17478
|
-
|
|
17479
|
-
|
|
17480
|
-
|
|
17481
|
-
|
|
17482
|
-
|
|
17483
|
-
this.parsedOptions = [...parsedOpts];
|
|
17484
|
-
}
|
|
17485
|
-
catch (error) {
|
|
17486
|
-
console.error('Error parsing options:', error);
|
|
17487
|
-
this.parsedOptions = [];
|
|
17488
|
-
}
|
|
17489
|
-
}
|
|
17490
|
-
else if (Array.isArray(newValue)) {
|
|
17491
|
-
this.selectedValues = newValue
|
|
17492
|
-
.filter(option => option.checked)
|
|
17493
|
-
.map(option => option.value);
|
|
17494
|
-
this.parsedOptions = [...newValue];
|
|
17495
|
-
}
|
|
17496
|
-
else {
|
|
17497
|
-
this.parsedOptions = [];
|
|
17498
|
-
}
|
|
17499
|
-
// Wait for the options to be fully loaded
|
|
17500
|
-
Promise.resolve().then(() => {
|
|
17501
|
-
requestAnimationFrame(() => {
|
|
17502
|
-
if (this.modeState === 'options') {
|
|
17503
|
-
this.reorderOptionsContent();
|
|
17504
|
-
}
|
|
17505
|
-
});
|
|
17506
|
-
});
|
|
17661
|
+
if (!newValue)
|
|
17662
|
+
return;
|
|
17663
|
+
this.selectedValues = newValue
|
|
17664
|
+
.filter(option => option.checked)
|
|
17665
|
+
.map(option => option.value);
|
|
17666
|
+
this.reorderOptionsContent();
|
|
17507
17667
|
}
|
|
17508
17668
|
/**
|
|
17509
17669
|
* Emitted when the value changes.
|
|
@@ -17600,7 +17760,7 @@ class NvFieldmultiselect {
|
|
|
17600
17760
|
* Reorder the content of the slot.
|
|
17601
17761
|
*/
|
|
17602
17762
|
reorderSlotContent() {
|
|
17603
|
-
if (this.
|
|
17763
|
+
if (this.options)
|
|
17604
17764
|
return;
|
|
17605
17765
|
const ul = this.el.querySelector('ul');
|
|
17606
17766
|
if (!ul)
|
|
@@ -17664,7 +17824,7 @@ class NvFieldmultiselect {
|
|
|
17664
17824
|
existingEmptyMessage.remove();
|
|
17665
17825
|
}
|
|
17666
17826
|
if (!this.filterText.trim()) {
|
|
17667
|
-
if (this.
|
|
17827
|
+
if (this.options && this.options.length > 0) {
|
|
17668
17828
|
// Reset options display
|
|
17669
17829
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
17670
17830
|
items.forEach(item => {
|
|
@@ -17687,11 +17847,11 @@ class NvFieldmultiselect {
|
|
|
17687
17847
|
}
|
|
17688
17848
|
const normalizedFilter = this.normalizeText(this.filterText);
|
|
17689
17849
|
let hasVisibleItems = false;
|
|
17690
|
-
if (this.
|
|
17850
|
+
if (this.options && this.options.length > 0) {
|
|
17691
17851
|
// Filter options mode
|
|
17692
17852
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
17693
17853
|
items.forEach(item => {
|
|
17694
|
-
const option = this.
|
|
17854
|
+
const option = this.options.find(opt => opt.value === item.getAttribute('value'));
|
|
17695
17855
|
if (option && !option.isDivider) {
|
|
17696
17856
|
const matchesFilter = this.normalizeText(option.label).includes(normalizedFilter) ||
|
|
17697
17857
|
this.normalizeText(option.value).includes(normalizedFilter);
|
|
@@ -17776,7 +17936,7 @@ class NvFieldmultiselect {
|
|
|
17776
17936
|
* Filter multiselect items in slots mode
|
|
17777
17937
|
*/
|
|
17778
17938
|
filterSlotsItems() {
|
|
17779
|
-
if (this.
|
|
17939
|
+
if (this.options)
|
|
17780
17940
|
return;
|
|
17781
17941
|
const ul = this.el.querySelector('ul');
|
|
17782
17942
|
if (!ul)
|
|
@@ -17912,7 +18072,7 @@ class NvFieldmultiselect {
|
|
|
17912
18072
|
// Do the reorder and wait a bit before closing
|
|
17913
18073
|
const handleEscape = async () => {
|
|
17914
18074
|
this.isHandlingEscape = true; // Disable the hide listener
|
|
17915
|
-
if (this.
|
|
18075
|
+
if (this.options) {
|
|
17916
18076
|
this.reorderOptionsContent();
|
|
17917
18077
|
}
|
|
17918
18078
|
else {
|
|
@@ -18024,9 +18184,7 @@ class NvFieldmultiselect {
|
|
|
18024
18184
|
* @returns {any} The JSX for the component
|
|
18025
18185
|
*/
|
|
18026
18186
|
render() {
|
|
18027
|
-
return this.
|
|
18028
|
-
? this.renderOptionsMode()
|
|
18029
|
-
: this.renderSlotsMode();
|
|
18187
|
+
return this.options ? this.renderOptionsMode() : this.renderSlotsMode();
|
|
18030
18188
|
}
|
|
18031
18189
|
static get formAssociated() { return true; }
|
|
18032
18190
|
get el() { return getElement(this); }
|
|
@@ -18056,14 +18214,12 @@ class NvFieldmultiselect {
|
|
|
18056
18214
|
"filterable": [516],
|
|
18057
18215
|
"value": [1537],
|
|
18058
18216
|
"open": [1540],
|
|
18059
|
-
"options": [
|
|
18217
|
+
"options": [1040],
|
|
18060
18218
|
"debounceDelay": [514, "debounce-delay"],
|
|
18061
18219
|
"autofocus": [516],
|
|
18062
|
-
"parsedOptions": [32],
|
|
18063
18220
|
"selectedValues": [32],
|
|
18064
18221
|
"sortedOptions": [32],
|
|
18065
18222
|
"filterText": [32],
|
|
18066
|
-
"modeState": [32],
|
|
18067
18223
|
"isHandlingEscape": [32],
|
|
18068
18224
|
"getFilterText": [64],
|
|
18069
18225
|
"resetFilter": [64],
|
|
@@ -18071,7 +18227,7 @@ class NvFieldmultiselect {
|
|
|
18071
18227
|
},
|
|
18072
18228
|
"$listeners$": [[0, "openChanged", "handleOpenChanged"], [0, "itemChecked", "handleItemChecked"], [0, "slotchange", "handleSlotChange"], [0, "keydown", "handleKeyDown"]],
|
|
18073
18229
|
"$lazyBundleId$": "-",
|
|
18074
|
-
"$attrsToReflect$": [["inputId", "input-id"], ["name", "name"], ["label", "label"], ["description", "description"], ["placeholder", "placeholder"], ["maxHeight", "max-height"], ["badgeLabel", "badge-label"], ["emptyResult", "empty-result"], ["required", "required"], ["error", "error"], ["errorDescription", "error-description"], ["readonly", "readonly"], ["disabled", "disabled"], ["autocomplete", "autocomplete"], ["filterable", "filterable"], ["value", "value"], ["open", "open"], ["
|
|
18230
|
+
"$attrsToReflect$": [["inputId", "input-id"], ["name", "name"], ["label", "label"], ["description", "description"], ["placeholder", "placeholder"], ["maxHeight", "max-height"], ["badgeLabel", "badge-label"], ["emptyResult", "empty-result"], ["required", "required"], ["error", "error"], ["errorDescription", "error-description"], ["readonly", "readonly"], ["disabled", "disabled"], ["autocomplete", "autocomplete"], ["filterable", "filterable"], ["value", "value"], ["open", "open"], ["debounceDelay", "debounce-delay"], ["autofocus", "autofocus"]]
|
|
18075
18231
|
}; }
|
|
18076
18232
|
}
|
|
18077
18233
|
|
|
@@ -18190,9 +18346,9 @@ class NvFieldnumber {
|
|
|
18190
18346
|
/****************************************************************************/
|
|
18191
18347
|
//#region RENDER
|
|
18192
18348
|
render() {
|
|
18193
|
-
return (hAsync(Host, { key: '
|
|
18194
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
18195
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
18349
|
+
return (hAsync(Host, { key: 'e054d1e05c0623bf3d5d78c2bafb6d096dbcbd08' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '0743432faff56e8256b2a30fab68ced0592bbf6a', htmlFor: this.inputId }, hAsync("slot", { key: '709f68c3f4bf6ade475cd6afbee5c9912c782c43', name: "label" }, this.label))), hAsync("div", { key: '5798b0faf23bc671aeda3273dcfff7c1d1ca4109', class: "input-wrapper" }, hAsync("slot", { key: '47b9f0ef000d2d98e2e3ad1c1f4191ce91c69266', name: "before-input" }), hAsync("div", { key: '082d2ab64b892cc994955b723d1ab342414061fb', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '34511207a7ebc1cc5fe8cc91d05f4fa549fda316', name: "leading-input" }), hAsync("input", { key: '20f96b319b6e7528d738bdc31152649575409dd1', 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: '2b05afbbc94bd39dd82a270511e4372536ee80ba', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '95d74e6298e49d422b19bf080d3e2de25c2ad8e2', name: "circle-check", class: "validation", size: "md" })), hAsync("div", { key: '5c665de10e9650003b127997cd6010e35d7d0b7a', class: "stepper" }, hAsync("nv-iconbutton", { key: '9702ee4778623862e67d29a56f7790af364786bf', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }), hAsync("nv-iconbutton", { key: '20fc509c42230f6768d98e4144db12afae3649ef', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }))), hAsync("slot", { key: 'd432d4e6fb8c4fd67c6c972b5c967e093cadfe68', name: "after-input" })), (this.description ||
|
|
18350
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'e1d585c32f4cff50d84f5d1b6696856c8c875ef7', class: "description" }, hAsync("slot", { key: '860b5fb8ba3e24fc728021b238b371178ae54ead', name: "description" }, this.description))), (this.errorDescription ||
|
|
18351
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'aaa707753b98415ca4e329fab9b45bfc3b42525a', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'f8c0910451550baa82663500a7c0339064720428', name: "error-description" }, this.errorDescription)))));
|
|
18196
18352
|
}
|
|
18197
18353
|
static get formAssociated() { return true; }
|
|
18198
18354
|
get el() { return getElement(this); }
|
|
@@ -18335,9 +18491,9 @@ class NvFieldpassword {
|
|
|
18335
18491
|
/****************************************************************************/
|
|
18336
18492
|
//#region RENDER
|
|
18337
18493
|
render() {
|
|
18338
|
-
return (hAsync(Host, { key: '
|
|
18339
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
18340
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
18494
|
+
return (hAsync(Host, { key: '4a6de90f24bd6607293d616d60f6d742c46b04a9' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '715f5935de3aa0f0f7b6aa9aa72c409a3875a849', htmlFor: this.inputId }, hAsync("slot", { key: 'da11187833b12acfae578024bb67d717efbafaa1', name: "label" }, this.label))), hAsync("div", { key: 'a669823e6c5aea5b4e0aacf0bfc1c8f7dbe67bab', class: "input-wrapper" }, hAsync("slot", { key: '98b2b6eaaa867228a667bec2920c640ff0b829c7', name: "before-input" }), hAsync("div", { key: 'fc896f9018563e80ea0f2aa1e2eb7992fd4a854c', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '715814e77d1ba40463253d12751129f2c0d05407', name: "leading-input" }), hAsync("input", { key: '8101af836f80da56ac9e2b859ab9fd5b6d254b91', 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.success || this.error) && (hAsync("nv-icon", { key: 'fdf5caa936a43961bd3f00f5d50635124b57ff0b', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (hAsync("nv-iconbutton", { key: '9b9e70d855fca2ea1ff2769609af05fc7d3fd1c2', name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() }))), hAsync("slot", { key: '4458e83104562509b53b05faf3a316a5502b76b7', name: "after-input" })), (this.description ||
|
|
18495
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '91dcddd8a80abccaaffda9cd583759bebf376456', class: "description" }, hAsync("slot", { key: 'fe6da6eb725b3866faf138e848f89152f0f24a00', name: "description" }, this.description))), (this.errorDescription ||
|
|
18496
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'bfe57a6b0f199c3b371a2036a7b8787f40f639a4', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '529e34f2197c64ac768df11251bb285fec1f2cd5', name: "error-description" }, this.errorDescription)))));
|
|
18341
18497
|
}
|
|
18342
18498
|
static get formAssociated() { return true; }
|
|
18343
18499
|
get el() { return getElement(this); }
|
|
@@ -18464,9 +18620,9 @@ class NvFieldradio {
|
|
|
18464
18620
|
/****************************************************************************/
|
|
18465
18621
|
//#region RENDER
|
|
18466
18622
|
render() {
|
|
18467
|
-
return (hAsync(Host, { key: '
|
|
18468
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
18469
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
18623
|
+
return (hAsync(Host, { key: 'e1a92204a7d3e07de9485873906ed57dc2f4dfb1', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, hAsync("input", { key: '8161b36c31b960a4ca4f7a1291a9cdbdd830429c', 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: '8d5ff5b5742a96dc9d1167298859a7a97347eeab', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '7417fe1c5041e20fd63abca907fd75fe7d3b49d2', htmlFor: this.inputId }, hAsync("slot", { key: 'e29a092dbd19c912c496e1ae56d9f46bcb44208c', name: "label" }, this.label))), (this.description ||
|
|
18624
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'a894108a6e5235010d18547a39daf526e066e432', class: "description" }, hAsync("slot", { key: 'c67b5b5a5d2ef1f27e69eb251e9a15c98909db85', name: "description" }, this.description))), (this.errorDescription ||
|
|
18625
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '18ea2ae58994289900f28c0e6220e113b45b2a92', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '52a10763fb7bf688e5a1de5e854aa0d80bc996f4', name: "error-description" }, this.errorDescription))))));
|
|
18470
18626
|
}
|
|
18471
18627
|
static get formAssociated() { return true; }
|
|
18472
18628
|
get el() { return getElement(this); }
|
|
@@ -18846,13 +19002,13 @@ class NvFieldselect {
|
|
|
18846
19002
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
18847
19003
|
*/
|
|
18848
19004
|
render() {
|
|
18849
|
-
return (hAsync(Host, { key: '
|
|
19005
|
+
return (hAsync(Host, { key: '38cb85c6698c5541793a1e5d34b36417cd743759' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'd81b9837c43c1a19a2d87b51cede9e7c32bda50c', htmlFor: this.inputId }, hAsync("slot", { key: '9d7c10281b117f2006ca1997f91e4e0b99fc5ab5', name: "label" }, this.label))), hAsync("div", { key: '2796a31f2aac0604054c4542564fca77c2ac4272', class: "select-wrapper" }, hAsync("slot", { key: '0407c6379597b09e1bb11ee6b43110b1d5fb98ea', name: "before-input" }), hAsync("div", { key: 'c0ae999fc017fb0352b0a1cfe2ff75e313955f23', class: "select-container", onClick: this.handleSelectContainerClick }, hAsync("slot", { key: 'ea2b63ddb3b70521b63e15efd1c3daf06c38cc0a', name: "leading-input" }), this.internalReadonly && (hAsync("input", { key: 'f543f67c0360ac315ed873eb14a93af35dd90670', 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
|
|
18850
19006
|
? `${this.inputId}-error`
|
|
18851
|
-
: `${this.inputId}-description` })), hAsync("select", { key: '
|
|
19007
|
+
: `${this.inputId}-description` })), hAsync("select", { key: 'b2ae3854c40ea798069417127cd763c8a0db040e', 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
|
|
18852
19008
|
? `${this.inputId}-error`
|
|
18853
|
-
: `${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))), hAsync("div", { key: '
|
|
18854
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
18855
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19009
|
+
: `${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))), hAsync("div", { key: 'dd59af14105272eaa77218136f5b7b0b40a5b40b', class: "select-icons" }, this.error && (hAsync("nv-icon", { key: '719e239472f6b697298682cc8d1b10933d3504ec', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '5d63d5ddbcd8f46296bc067afd45f3921f4f3917', name: "circle-check", class: "validation", size: "md" })), !this.multiple && (hAsync("nv-iconbutton", { key: '978a540682409a88ce55d2219dbeb9f2fc82cd51', name: "chevron-down", size: "md", emphasis: "lower", tabindex: -1 })))), hAsync("slot", { key: '3483846a9f38be08caaf6f2b02332caefae0cbed', name: "after-input" })), (this.description ||
|
|
19010
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '5b47c05942549b6e2238696132ab2f3c9af5b7f0', class: "description", id: `${this.inputId}-description` }, hAsync("slot", { key: '46b7f053ae343949b540240e1ec438850bb9a015', name: "description" }, this.description))), (this.errorDescription ||
|
|
19011
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '6126ab6967fc430c6a1d3ddfb191a98a8c2ecce9', class: "error-description", id: `${this.inputId}-error` }, hAsync("slot", { key: 'afc6a0443c6fe1175213d36a2c59ffefe2923eab', name: "error-description" }, this.errorDescription)))));
|
|
18856
19012
|
}
|
|
18857
19013
|
static get formAssociated() { return true; }
|
|
18858
19014
|
get el() { return getElement(this); }
|
|
@@ -19005,9 +19161,9 @@ class NvFieldtext {
|
|
|
19005
19161
|
/****************************************************************************/
|
|
19006
19162
|
//#region RENDER
|
|
19007
19163
|
render() {
|
|
19008
|
-
return (hAsync(Host, { key: '
|
|
19009
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19010
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19164
|
+
return (hAsync(Host, { key: 'e4891525becd4b0757ec380d45d9694ebc6c3318' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '1157e609be8150d014e9190dcf53f74bcee20119', htmlFor: this.inputId }, hAsync("slot", { key: '888fb12e994f6f4f47bc2be496cd74aeedb628c0', name: "label" }, this.label))), hAsync("div", { key: '0555b12dbbe5fa81f5af464d3b48c35b243aec32', class: "input-wrapper" }, hAsync("slot", { key: '5210a9b903c560775453741d8815286dbe8bbb53', name: "before-input" }), hAsync("div", { key: '7bc11232dfa46706982bf3645054a7a1f67832f9', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '87abc6976b432a3dc51246c97564108f9baccff8', name: "leading-input" }), hAsync("input", { key: 'b0c3e30bc5363f6b49ea1361005e125826184016', 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: '5e359bc40906bbf2c63eb7d196dd8294b15dd672', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '4812b31e512bf388fa84f9d35a949de5f9b86d59', name: "circle-check", class: "validation", size: "md" }))), hAsync("slot", { key: '06922c63f02470be6c74ee6ba4bf93baabd03e57', name: "after-input" })), (this.description ||
|
|
19165
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '960bcb53a55aed3e1b8cd1b193ad26f5c6b151fd', class: "description" }, hAsync("slot", { key: '07c09b8543e9b91928821a100869943de94a65a7', name: "description" }, this.description))), (this.errorDescription ||
|
|
19166
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '456d00a47f01f70938d99faa774da1a9e51b036d', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '590aef8c37efd2fa472c9b7b92fd82d29c4e6d39', name: "error-description" }, this.errorDescription)))));
|
|
19011
19167
|
}
|
|
19012
19168
|
static get formAssociated() { return true; }
|
|
19013
19169
|
get el() { return getElement(this); }
|
|
@@ -19222,9 +19378,9 @@ class NvFieldtextarea {
|
|
|
19222
19378
|
/****************************************************************************/
|
|
19223
19379
|
//#region RENDER
|
|
19224
19380
|
render() {
|
|
19225
|
-
return (hAsync(Host, { key: '
|
|
19226
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19227
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19381
|
+
return (hAsync(Host, { key: '606902cda67b3f523ab32d8e9c6fd11b6bc0f3a7' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '3167dfd5f17028ad20a82b5646ccfa788a5bbb86', htmlFor: this.inputId }, hAsync("slot", { key: 'ae98d87f3e1b7cb2864b6b7e7183d3a37c1a7e14', name: "label" }, this.label))), hAsync("div", { key: '8f25bdadd8f94938dc9b6c631b0586fc6bcbc37c', class: "textarea-wrapper" }, hAsync("div", { key: '6568df9f332e8bca84445ba596d6eceaaed64b9e', class: "textarea-container", onClick: this.handleTextareaContainerClick }, hAsync("textarea", { key: 'fca9ba5bd6925cc1a201625e5785ad451fc8849b', 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 ||
|
|
19382
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'c5c8c1999105df446a603a3e02f431ad37de4c5e', class: "description" }, hAsync("slot", { key: 'bbcea14c7585e1ff1c995eb4f21cb532a160ed40', name: "description" }, this.description))), (this.errorDescription ||
|
|
19383
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '2d43d92b5c9b93faeac45bdcfa142d4dfd70511a', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '33514ea705969b353f11c49ca65090706e6aadf8', name: "error-description" }, this.errorDescription)))));
|
|
19228
19384
|
}
|
|
19229
19385
|
static get formAssociated() { return true; }
|
|
19230
19386
|
get el() { return getElement(this); }
|
|
@@ -20248,26 +20404,26 @@ class NvFieldtime {
|
|
|
20248
20404
|
}, key: `${option}-${index}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
20249
20405
|
}
|
|
20250
20406
|
render() {
|
|
20251
|
-
return (hAsync(Host, { key: '
|
|
20252
|
-
hAsync("input", { key: '
|
|
20407
|
+
return (hAsync(Host, { key: 'fb5bc4740731089bf81ab7b24e57f24f966c5f92', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'd9f44f4ab94a13a620df743979d95b1f59572bfe', htmlFor: this.inputId }, hAsync("slot", { key: 'fbc8176ea3443511764b2993939d1110fd932a5a', name: "label" }, this.label))), hAsync("nv-popover", { key: 'ea376ec38db428db158c998e8963e27048ef03b0', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: 'fa825918cea4a64db76324f953645f6db7cb81b9', class: "input-wrapper", slot: "trigger" }, hAsync("slot", { key: '37d7fd2eae40e4f47e9b626c226d060cf5e350e2', name: "before-input" }), hAsync("div", { key: '6b73d8c9598bfaf470b5c5a455db0b08397cc8c8', class: "input-container" }, hAsync("slot", { key: '88f20151d7ccc1e3ad6f6aba4b5926cccc22c19c', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
|
|
20408
|
+
hAsync("input", { key: '292ee8c62fd248b28fb46275ba06846d69b3b602', 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
|
|
20253
20409
|
? `${TimeType.Hours}-${this.name}`
|
|
20254
20410
|
: TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
20255
20411
|
], this.format.includes('mm') && [
|
|
20256
|
-
hAsync("span", { key: '
|
|
20257
|
-
hAsync("input", { key: '
|
|
20412
|
+
hAsync("span", { key: 'c7de2283771d60e1e9f756257e34da0eefcf27f3' }, ":"),
|
|
20413
|
+
hAsync("input", { key: '521fad8cc60c9ced2ba634441b789fba15340ae7', 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
|
|
20258
20414
|
? `${TimeType.Minutes}-${this.name}`
|
|
20259
20415
|
: TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
20260
20416
|
], this.format.includes('ss') && [
|
|
20261
|
-
hAsync("span", { key: '
|
|
20262
|
-
hAsync("input", { key: '
|
|
20417
|
+
hAsync("span", { key: 'ceef993e3efdc2fa01d466033522e09ee78683b1' }, ":"),
|
|
20418
|
+
hAsync("input", { key: '9c51f0fcecb86a913e9ae4cd3c5bcfbf34ac4ab8', 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
|
|
20263
20419
|
? `${TimeType.Seconds}-${this.name}`
|
|
20264
20420
|
: TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
20265
|
-
], hAsync("nv-iconbutton", { key: '
|
|
20421
|
+
], hAsync("nv-iconbutton", { key: '7a5516b7d91dc99f6963ee9daacee9305b16dfb0', 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: 'a9a9a02e312caf25a52b91e1d4db6b6ee9d850d6', name: "alert-circle", class: "validation", size: "sm" })), this.success && (hAsync("nv-icon", { key: '93a69f343771dbdb8c6bd694ea9f5ddeeba39801', name: "circle-check", class: "validation", size: "sm" }))), hAsync("slot", { key: '678d9af754b860ac99a50d70cb9b975e79f164c9', name: "after-input" })), hAsync("div", { key: '2bd255e97d8b34b66fa0af2f209d5175e67b62a3', class: "time-dropdown", slot: "content" }, hAsync("div", { key: '017b58a9a7ccb44918a408fb680fa1c18d8f5672', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
|
|
20266
20422
|
this.RenderTimeOptionsColumn(TimeType.Hours), this.format.includes('mm') &&
|
|
20267
20423
|
this.RenderTimeOptionsColumn(TimeType.Minutes), this.format.includes('ss') &&
|
|
20268
20424
|
this.RenderTimeOptionsColumn(TimeType.Seconds)))), (this.description ||
|
|
20269
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
20270
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
20425
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '35f5fb47bfeb9cde2c3551df391cf52ccaf10c72', class: "description" }, hAsync("slot", { key: 'b450124765db5b2337f03a5f68c4a9466c80ca85', name: "description" }, this.description))), (this.errorDescription ||
|
|
20426
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '87d441f595f7ba8be04ca749235ec3918e9a80b0', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '35717f533b4a4c310f4fb805c3989398f340b8b1', name: "error-description" }, this.errorDescription)))));
|
|
20271
20427
|
}
|
|
20272
20428
|
static get formAssociated() { return true; }
|
|
20273
20429
|
get el() { return getElement(this); }
|
|
@@ -20372,7 +20528,7 @@ class NvIcon {
|
|
|
20372
20528
|
/****************************************************************************/
|
|
20373
20529
|
//#region RENDER
|
|
20374
20530
|
render() {
|
|
20375
|
-
return (hAsync(Host, { key: '
|
|
20531
|
+
return (hAsync(Host, { key: '5d5988e7c0f49781b57b86da6e46e38eeac5ddae', class: clsx(this.color && `${this.color}`), role: "img", "aria-label": `${this.name}-icon` }, hAsync("svg", { key: 'ab4007e92d6a13245293dbbb7dc746ab21cdbe33', 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: 'c9cb4fea1695e81c4e9e775c217dfb9ac3b7c9ec', href: `#${this.name}` }))));
|
|
20376
20532
|
}
|
|
20377
20533
|
static get style() { return NvIconStyle0; }
|
|
20378
20534
|
static get cmpMeta() { return {
|
|
@@ -20516,7 +20672,7 @@ class NvIconbutton {
|
|
|
20516
20672
|
/****************************************************************************/
|
|
20517
20673
|
//#region RENDER
|
|
20518
20674
|
render() {
|
|
20519
|
-
return (hAsync(Host, { key: '
|
|
20675
|
+
return (hAsync(Host, { key: 'f678bd976942aa35ae36c536fdd86cd65a43263a', 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: 'b874de8701de163c1f4235c2034a13da30279191', size: this.size }), !this.loading && hAsync("nv-icon", { key: '222ccc93e3af3dcec81308b3b90ca724ecdfa2fb', name: this.name, size: this.size }), hAsync("slot", { key: 'c7a257f7715a9320ffe46e09b59a2d570d1f052c' })));
|
|
20520
20676
|
}
|
|
20521
20677
|
static get formAssociated() { return true; }
|
|
20522
20678
|
get el() { return getElement(this); }
|
|
@@ -20564,7 +20720,7 @@ class NvLoader {
|
|
|
20564
20720
|
//#region RENDER
|
|
20565
20721
|
/* <slot> empty to force rendering change */
|
|
20566
20722
|
render() {
|
|
20567
|
-
return (hAsync(Host, { key: '
|
|
20723
|
+
return (hAsync(Host, { key: 'f3094e46eb7072534f497694d3c28030f0118acc', class: clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
20568
20724
|
}
|
|
20569
20725
|
static get style() { return NvLoaderStyle0; }
|
|
20570
20726
|
static get cmpMeta() { return {
|
|
@@ -20615,25 +20771,23 @@ class NvMenu {
|
|
|
20615
20771
|
* position on the axis to fit on the screen, so users can always see it.
|
|
20616
20772
|
*/
|
|
20617
20773
|
this.placement = 'bottom-end';
|
|
20774
|
+
//#endregion LIFECYCLE
|
|
20775
|
+
/****************************************************************************/
|
|
20776
|
+
//#region RENDER
|
|
20618
20777
|
/**
|
|
20619
|
-
*
|
|
20778
|
+
* Generates menu items from the `items` property.
|
|
20779
|
+
* @param {MenuItem[]} items - The items to display in the menu.
|
|
20780
|
+
* @returns {HTMLElement[]} The rendered items.
|
|
20620
20781
|
*/
|
|
20621
|
-
this.
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20625
|
-
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
this.parsedItems = JSON.parse(newValue);
|
|
20631
|
-
}
|
|
20632
|
-
catch (error) {
|
|
20633
|
-
console.error('Error parsing menu items:', error);
|
|
20634
|
-
this.parsedItems = [];
|
|
20635
|
-
}
|
|
20636
|
-
}
|
|
20782
|
+
this.renderMenuItems = () => {
|
|
20783
|
+
return this.items.map(item => {
|
|
20784
|
+
var _a;
|
|
20785
|
+
if (item.hasSubmenu && ((_a = item.submenuItems) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
20786
|
+
return (hAsync("nv-menu", { nested: true, placement: "right-start", items: item.submenuItems }, hAsync("nv-menuitem", { slot: "trigger", hasSubmenu: true, disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label })));
|
|
20787
|
+
}
|
|
20788
|
+
return (hAsync("nv-menuitem", { disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label }));
|
|
20789
|
+
});
|
|
20790
|
+
};
|
|
20637
20791
|
}
|
|
20638
20792
|
//#endregion PROPERTIES
|
|
20639
20793
|
/****************************************************************************/
|
|
@@ -20773,35 +20927,11 @@ class NvMenu {
|
|
|
20773
20927
|
this.triggerElement = Array.from(this.el.children).find(child => {
|
|
20774
20928
|
return child.getAttribute('slot') === 'trigger';
|
|
20775
20929
|
});
|
|
20776
|
-
// If the items attribute is provided, parse its value.
|
|
20777
|
-
if (this.items) {
|
|
20778
|
-
this.handleItemsChange(this.items);
|
|
20779
|
-
}
|
|
20780
|
-
}
|
|
20781
|
-
//#endregion LIFECYCLE
|
|
20782
|
-
/****************************************************************************/
|
|
20783
|
-
//#region RENDER
|
|
20784
|
-
/**
|
|
20785
|
-
* Generates menu items from the `items` property.
|
|
20786
|
-
* @param {MenuItem[]} items - The items to display in the menu.
|
|
20787
|
-
* @returns {HTMLElement[]} The rendered items.
|
|
20788
|
-
*/
|
|
20789
|
-
renderMenuItems(items) {
|
|
20790
|
-
return items.map(item => {
|
|
20791
|
-
var _a;
|
|
20792
|
-
if (item.hasSubmenu && ((_a = item.submenuItems) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
20793
|
-
return (hAsync("nv-menu", { nested: true, placement: "right-start", items: JSON.stringify(item.submenuItems) }, hAsync("nv-menuitem", { slot: "trigger", "has-submenu": true, disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label })));
|
|
20794
|
-
}
|
|
20795
|
-
return (hAsync("nv-menuitem", { disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label }));
|
|
20796
|
-
});
|
|
20797
20930
|
}
|
|
20798
20931
|
render() {
|
|
20799
|
-
return (hAsync(Host, { key: '
|
|
20932
|
+
return (hAsync(Host, { key: 'b66fd4f51c7f754d2d49265fe6175cc1a2c0b03a' }, hAsync("slot", { key: 'acd3dc4ad3ed94a4bcbef735049e59bf37a8f67d', name: "trigger" }), hAsync("nv-popover", { key: '28218c78f3fa21a9dcfd5ea13d3416eda11efc49', ref: el => (this.popoverElement = el), triggerMode: "click", triggerElement: this.triggerElement, placement: this.placement, nested: this.nested, open: this.open }, this.items ? (hAsync("ul", { slot: "content" }, this.renderMenuItems())) : (hAsync("slot", { name: "content" })))));
|
|
20800
20933
|
}
|
|
20801
20934
|
get el() { return getElement(this); }
|
|
20802
|
-
static get watchers() { return {
|
|
20803
|
-
"items": ["handleItemsChange"]
|
|
20804
|
-
}; }
|
|
20805
20935
|
static get style() { return NvMenuStyle0; }
|
|
20806
20936
|
static get cmpMeta() { return {
|
|
20807
20937
|
"$flags$": 4,
|
|
@@ -20811,14 +20941,13 @@ class NvMenu {
|
|
|
20811
20941
|
"nested": [516],
|
|
20812
20942
|
"disableCloseOnSelect": [516, "disable-close-on-select"],
|
|
20813
20943
|
"placement": [513],
|
|
20814
|
-
"items": [
|
|
20815
|
-
"parsedItems": [32],
|
|
20944
|
+
"items": [16],
|
|
20816
20945
|
"show": [64],
|
|
20817
20946
|
"close": [64]
|
|
20818
20947
|
},
|
|
20819
20948
|
"$listeners$": [[0, "menuitemSelected", "handleMenuItemSelect"], [0, "keydown", "handleKeydown"], [0, "openChanged", "handleOpenChanged"]],
|
|
20820
20949
|
"$lazyBundleId$": "-",
|
|
20821
|
-
"$attrsToReflect$": [["open", "open"], ["nested", "nested"], ["disableCloseOnSelect", "disable-close-on-select"], ["placement", "placement"]
|
|
20950
|
+
"$attrsToReflect$": [["open", "open"], ["nested", "nested"], ["disableCloseOnSelect", "disable-close-on-select"], ["placement", "placement"]]
|
|
20822
20951
|
}; }
|
|
20823
20952
|
}
|
|
20824
20953
|
|
|
@@ -20871,7 +21000,7 @@ class NvMenuitem {
|
|
|
20871
21000
|
/****************************************************************************/
|
|
20872
21001
|
//#region RENDER
|
|
20873
21002
|
render() {
|
|
20874
|
-
return (hAsync(Host, { key: '
|
|
21003
|
+
return (hAsync(Host, { key: 'd736bc00759cb97fe52d2d6dc091667057a5585c', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && hAsync("nv-icon", { key: 'cf29c75feedcb61d16d33433f834751c821a4256', name: this.icon }), hAsync("slot", { key: '0ebe8b2faac9981023c224e3c5cd4f131e088c0e' }), this.label && hAsync("span", { key: 'd2659aceb0ecc1cad794ae16d15432379677012c', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && hAsync("kbd", { key: '7d7772b6efda6faccafc425772c905d4aabd2ef5' }, this.shortcut), this.hasSubmenu && hAsync("nv-icon", { key: 'c756d3ceffc907fa0c37338595a7fd09f8238a7b', name: "chevron-right" })));
|
|
20875
21004
|
}
|
|
20876
21005
|
get el() { return getElement(this); }
|
|
20877
21006
|
static get style() { return NvMenuitemStyle0; }
|
|
@@ -23256,7 +23385,7 @@ class NvPopover {
|
|
|
23256
23385
|
/****************************************************************************/
|
|
23257
23386
|
//#region RENDER
|
|
23258
23387
|
render() {
|
|
23259
|
-
return (hAsync(Host, { key: '
|
|
23388
|
+
return (hAsync(Host, { key: '830051c35f7e10dfa4e31d401663bd5727ac988f' }, hAsync("slot", { key: 'a49852a712bf6ab9c8557035ca4618d007939f03', name: "trigger" }), hAsync("div", { key: '6d9cd4bd873cb92b1716a8ea88a3877a029cbe9c', "data-scope": "popover", hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (hAsync("div", { key: 'f935c9248b602aa1c39e7d28c5503a24067fb744', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), hAsync("slot", { key: '6b682de05037b2d3b60c9139c448620fab963ea1', name: "content" }))));
|
|
23260
23389
|
}
|
|
23261
23390
|
get el() { return getElement(this); }
|
|
23262
23391
|
static get watchers() { return {
|
|
@@ -23301,7 +23430,7 @@ class NvRow {
|
|
|
23301
23430
|
/****************************************************************************/
|
|
23302
23431
|
//#region RENDER
|
|
23303
23432
|
render() {
|
|
23304
|
-
return (hAsync(Host, { key: '
|
|
23433
|
+
return (hAsync(Host, { key: '7daaa109808165553e69707c72550f284e087011' }, hAsync("slot", { key: 'a00fd8c81352b485d8508f9bd68af4dd81d959e1' })));
|
|
23305
23434
|
}
|
|
23306
23435
|
static get style() { return NvRowStyle0; }
|
|
23307
23436
|
static get cmpMeta() { return {
|
|
@@ -23336,7 +23465,7 @@ class NvStack {
|
|
|
23336
23465
|
/****************************************************************************/
|
|
23337
23466
|
//#region RENDER
|
|
23338
23467
|
render() {
|
|
23339
|
-
return (hAsync(Host, { key: '
|
|
23468
|
+
return (hAsync(Host, { key: '02e184fbc9e9ddd4b02b107baf093047fa3697b0', class: clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, hAsync("slot", { key: '1a501fcc419f97f2714be822120072b49590e5ea' })));
|
|
23340
23469
|
}
|
|
23341
23470
|
static get style() { return NvStackStyle0; }
|
|
23342
23471
|
static get cmpMeta() { return {
|
|
@@ -23670,14 +23799,14 @@ class NvTable {
|
|
|
23670
23799
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
23671
23800
|
? []
|
|
23672
23801
|
: this.table.data;
|
|
23673
|
-
return (hAsync(Host, { key: '
|
|
23802
|
+
return (hAsync(Host, { key: 'b2962fba4d5a12aa660d0c0f69298c93947ef592' }, hAsync("div", { key: 'f60e5c09d57c0ccf5cb9996ca85fcc8792270b85', class: "hidden" }, hAsync("slot", { key: '9c4aefff542478535b3f342b1c75f68d717c3bf8' })), hAsync("slot", { key: 'bfd0f5406187bcad69d9ed41e2f294314a3572f1', 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 &&
|
|
23674
23803
|
headerGroups.map(col => {
|
|
23675
23804
|
return (hAsync("th", { key: col.name }, this.renderTemplate(this.headerTemplateCache.get(col.name), {}) || col.header));
|
|
23676
23805
|
})))), 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 => {
|
|
23677
23806
|
var _a;
|
|
23678
23807
|
return (hAsync("td", null, this.renderTemplate(this.templateCache.get(col.name), row) ||
|
|
23679
23808
|
((_a = row[col.name]) !== null && _a !== void 0 ? _a : this.fallbackValue)));
|
|
23680
|
-
})))))))), hAsync("slot", { key: '
|
|
23809
|
+
})))))))), hAsync("slot", { key: 'e0039c9af9506bc8f2ded8cc81bbd2667ee1f2c1', name: "after" })));
|
|
23681
23810
|
}
|
|
23682
23811
|
get el() { return getElement(this); }
|
|
23683
23812
|
static get watchers() { return {
|
|
@@ -23797,8 +23926,8 @@ class NvToggle {
|
|
|
23797
23926
|
/****************************************************************************/
|
|
23798
23927
|
//#region RENDER
|
|
23799
23928
|
render() {
|
|
23800
|
-
return (hAsync(Host, { key: '
|
|
23801
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
23929
|
+
return (hAsync(Host, { key: 'e80390a43bab3d55373f6b05db1516210f90c3b5', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, hAsync("div", { key: '66156f05cc18bb63a8625cdff72d9c177e4cf86b', class: "input-container" }, hAsync("input", { key: 'db0c2c078c23431605befb8dd972a29bfdefb16f', 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: '576df464b48fa11bf8a46bede5f1d822db569636', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'f529b009876a5de5061747f78372a66ccfdcac61', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: '3ace029242d920b783fe0038f8721b416f54633f', name: "label" }, this.label))), (this.description ||
|
|
23930
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '2eeb41266ee52ef40c1600750084fda0fac8dc6f', class: "description" }, hAsync("slot", { key: '605541594fcc7f3192766a5395c5a81f42de7728', name: "description" }, this.description))))));
|
|
23802
23931
|
}
|
|
23803
23932
|
static get formAssociated() { return true; }
|
|
23804
23933
|
get el() { return getElement(this); }
|
|
@@ -23863,7 +23992,7 @@ class NvTooltip {
|
|
|
23863
23992
|
/****************************************************************************/
|
|
23864
23993
|
//#region RENDER
|
|
23865
23994
|
render() {
|
|
23866
|
-
return (hAsync(Host, { key: '
|
|
23995
|
+
return (hAsync(Host, { key: '8309e08944469fad76997a6dfcb8b434461aa5a3' }, hAsync("slot", { key: 'f3da94e2f2f581f7b8c93f4b3e70de67e305508a' }), hAsync("nv-popover", { key: 'a28c50f59f9a781afd8a8ab60260d065dcadf96d', triggerMode: "hover", hasArrow: true, placement: this.placement, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, hAsync("p", { key: '76f63a5f220de640f4eeada8aeba97e9ead73fc9', slot: "content" }, this.message), hAsync("slot", { key: 'f55f71b357b23c29b40b9c022a5a1718c4c8c8fb', name: "content" }))));
|
|
23867
23996
|
}
|
|
23868
23997
|
get el() { return getElement(this); }
|
|
23869
23998
|
static get style() { return NvTooltipStyle0; }
|
|
@@ -23886,7 +24015,6 @@ registerComponents([
|
|
|
23886
24015
|
NvAlert,
|
|
23887
24016
|
NvAvatar,
|
|
23888
24017
|
NvBadge,
|
|
23889
|
-
NvBaseComponent,
|
|
23890
24018
|
NvBreadcrumb,
|
|
23891
24019
|
NvBreadcrumbs,
|
|
23892
24020
|
NvButton,
|