@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.mjs
CHANGED
|
@@ -5430,83 +5430,6 @@ class NvBadge {
|
|
|
5430
5430
|
}; }
|
|
5431
5431
|
}
|
|
5432
5432
|
|
|
5433
|
-
const classes = {
|
|
5434
|
-
'w-full': 'w-full',
|
|
5435
|
-
'wFull': 'w-full',
|
|
5436
|
-
'is-active': 'is-active',
|
|
5437
|
-
'is-selected': 'is-selected',
|
|
5438
|
-
};
|
|
5439
|
-
/**
|
|
5440
|
-
* @slot default - render children
|
|
5441
|
-
* @deprecated This is only to help with the migration from v2 to v3. It will be removed in the next major release.
|
|
5442
|
-
*/
|
|
5443
|
-
class NvBaseComponent {
|
|
5444
|
-
constructor(hostRef) {
|
|
5445
|
-
registerInstance(this, hostRef);
|
|
5446
|
-
}
|
|
5447
|
-
/****************************************************************************/
|
|
5448
|
-
//#region LIFECYCLE
|
|
5449
|
-
componentWillLoad() {
|
|
5450
|
-
this.applyClassesOnInitialRender();
|
|
5451
|
-
}
|
|
5452
|
-
componentDidLoad() {
|
|
5453
|
-
this.mutationObserver = new MutationObserver(mutations => {
|
|
5454
|
-
mutations.forEach(mutation => {
|
|
5455
|
-
if (mutation.type === 'attributes') {
|
|
5456
|
-
const target = mutation.target;
|
|
5457
|
-
Object.keys(classes).forEach(attributeName => {
|
|
5458
|
-
if (target.hasAttribute(attributeName)) {
|
|
5459
|
-
target.classList.add(classes[attributeName]);
|
|
5460
|
-
}
|
|
5461
|
-
else {
|
|
5462
|
-
target.classList.remove(classes[attributeName]);
|
|
5463
|
-
}
|
|
5464
|
-
});
|
|
5465
|
-
}
|
|
5466
|
-
});
|
|
5467
|
-
});
|
|
5468
|
-
this.observeElements();
|
|
5469
|
-
}
|
|
5470
|
-
disconnectedCallback() {
|
|
5471
|
-
if (this.mutationObserver) {
|
|
5472
|
-
this.mutationObserver.disconnect();
|
|
5473
|
-
}
|
|
5474
|
-
}
|
|
5475
|
-
//#endregion LIFECYCLE
|
|
5476
|
-
/****************************************************************************/
|
|
5477
|
-
//#region METHODS
|
|
5478
|
-
applyClassesOnInitialRender() {
|
|
5479
|
-
Object.keys(classes).forEach(attributeName => {
|
|
5480
|
-
const elements = this.el.querySelectorAll(`[${attributeName}]`);
|
|
5481
|
-
elements.forEach(element => {
|
|
5482
|
-
element.classList.add(classes[attributeName]);
|
|
5483
|
-
});
|
|
5484
|
-
});
|
|
5485
|
-
}
|
|
5486
|
-
observeElements() {
|
|
5487
|
-
this.mutationObserver.observe(this.el, {
|
|
5488
|
-
attributes: true,
|
|
5489
|
-
attributeFilter: Object.keys(classes),
|
|
5490
|
-
subtree: true,
|
|
5491
|
-
});
|
|
5492
|
-
}
|
|
5493
|
-
//#endregion METHODS
|
|
5494
|
-
/****************************************************************************/
|
|
5495
|
-
//#region RENDER
|
|
5496
|
-
render() {
|
|
5497
|
-
return (hAsync(Host, { key: 'ba3d284241a61fa30bd434f563b7e4962ea3f238', style: { display: 'block' } }, hAsync("slot", { key: '44a0f1bc5267cf7e7bd0c1d258e8d9b8020a59f3' })));
|
|
5498
|
-
}
|
|
5499
|
-
get el() { return getElement(this); }
|
|
5500
|
-
static get cmpMeta() { return {
|
|
5501
|
-
"$flags$": 4,
|
|
5502
|
-
"$tagName$": "nv-base",
|
|
5503
|
-
"$members$": undefined,
|
|
5504
|
-
"$listeners$": undefined,
|
|
5505
|
-
"$lazyBundleId$": "-",
|
|
5506
|
-
"$attrsToReflect$": []
|
|
5507
|
-
}; }
|
|
5508
|
-
}
|
|
5509
|
-
|
|
5510
5433
|
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)}";
|
|
5511
5434
|
var NvBreadcrumbStyle0 = nvBreadcrumbCss;
|
|
5512
5435
|
|
|
@@ -5539,7 +5462,7 @@ class NvBreadcrumb {
|
|
|
5539
5462
|
/****************************************************************************/
|
|
5540
5463
|
//#region RENDER
|
|
5541
5464
|
render() {
|
|
5542
|
-
return (hAsync(Host, { key: '
|
|
5465
|
+
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" }, "/")));
|
|
5543
5466
|
}
|
|
5544
5467
|
get el() { return getElement(this); }
|
|
5545
5468
|
static get style() { return NvBreadcrumbStyle0; }
|
|
@@ -5569,7 +5492,7 @@ class NvBreadcrumbs {
|
|
|
5569
5492
|
}
|
|
5570
5493
|
//#region RENDER
|
|
5571
5494
|
render() {
|
|
5572
|
-
return (hAsync(Host, { key: '
|
|
5495
|
+
return (hAsync(Host, { key: '19ad2bb41f4254a98a571cbadb50ba5ed7d29f62', role: "navigation", "aria-label": "breadcrumbs" }, hAsync("ol", { key: '11b77f0f11c6b1dc2ce5ab3f4f7b23e8ec728b61' }, hAsync("slot", { key: 'c0c683f93c6874aa5f84fb735d13c1b5eabcd951' }))));
|
|
5573
5496
|
}
|
|
5574
5497
|
static get style() { return NvBreadcrumbsStyle0; }
|
|
5575
5498
|
static get cmpMeta() { return {
|
|
@@ -5733,7 +5656,7 @@ class NvButton {
|
|
|
5733
5656
|
/****************************************************************************/
|
|
5734
5657
|
//#region RENDER
|
|
5735
5658
|
render() {
|
|
5736
|
-
return (hAsync(Host, { key: '
|
|
5659
|
+
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" })));
|
|
5737
5660
|
}
|
|
5738
5661
|
static get formAssociated() { return true; }
|
|
5739
5662
|
get el() { return getElement(this); }
|
|
@@ -5992,11 +5915,11 @@ class NvCalendar {
|
|
|
5992
5915
|
/**
|
|
5993
5916
|
* Change the displayed month
|
|
5994
5917
|
* @param {number} offset - Month offset (-1 for previous, 1 for next)
|
|
5995
|
-
* @param {number} calendarOffset - Month offset for the calendar (0 by default)
|
|
5996
5918
|
*/
|
|
5997
|
-
changeMonth(offset
|
|
5919
|
+
changeMonth(offset) {
|
|
5998
5920
|
const newDate = new Date(this.currentDate);
|
|
5999
|
-
|
|
5921
|
+
// Ensure we only move by one month at a time
|
|
5922
|
+
newDate.setUTCMonth(newDate.getUTCMonth() + offset);
|
|
6000
5923
|
// Add the appropriate animation class
|
|
6001
5924
|
const containers = this.el.querySelectorAll('.calendar-grid');
|
|
6002
5925
|
containers.forEach(container => {
|
|
@@ -6154,10 +6077,13 @@ class NvCalendar {
|
|
|
6154
6077
|
const firstDay = new Date(Date.UTC(year, month, 1));
|
|
6155
6078
|
const lastDay = new Date(Date.UTC(year, month + 1, 0));
|
|
6156
6079
|
const days = [];
|
|
6157
|
-
//
|
|
6158
|
-
|
|
6080
|
+
// Correct calculation of offset for previous month days
|
|
6081
|
+
// Use getUTCDay to stay consistent with UTC timezone
|
|
6082
|
+
const dayOfWeekIndex = firstDay.getUTCDay(); // 0 = Sunday, 1 = Monday, etc.
|
|
6083
|
+
// Adjust based on firstDayOfWeek (if week starts on Monday, offset is different)
|
|
6084
|
+
const offsetDays = (dayOfWeekIndex - this.firstDayOfWeek + 7) % 7;
|
|
6159
6085
|
// Add the days of the previous month for the first calendar
|
|
6160
|
-
if (offset === 0) {
|
|
6086
|
+
if (offset === 0 && offsetDays > 0) {
|
|
6161
6087
|
const prevMonthLastDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
6162
6088
|
for (let i = offsetDays; i > 0; i--) {
|
|
6163
6089
|
const date = new Date(Date.UTC(year, month - 1, prevMonthLastDay - i + 1));
|
|
@@ -6347,6 +6273,21 @@ class NvCalendar {
|
|
|
6347
6273
|
parseDate(dateInput) {
|
|
6348
6274
|
if (dateInput instanceof Date)
|
|
6349
6275
|
return dateInput;
|
|
6276
|
+
// Attempt to automatically detect ISO 8601 format (generated by toISOString())
|
|
6277
|
+
// The regex checks the standard ISO format: YYYY-MM-DDTHH:mm:ss.sssZ
|
|
6278
|
+
if (typeof dateInput === 'string' &&
|
|
6279
|
+
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/.test(dateInput)) {
|
|
6280
|
+
try {
|
|
6281
|
+
const parsedDate = new Date(dateInput);
|
|
6282
|
+
if (!isNaN(parsedDate.getTime())) {
|
|
6283
|
+
return parsedDate;
|
|
6284
|
+
}
|
|
6285
|
+
}
|
|
6286
|
+
catch (error) {
|
|
6287
|
+
// If it fails, continue with other methods
|
|
6288
|
+
console.error('Error parsing ISO date:', error);
|
|
6289
|
+
}
|
|
6290
|
+
}
|
|
6350
6291
|
// Handling Unix Seconds ("X") formats
|
|
6351
6292
|
if (this.dateFormat === 'X') {
|
|
6352
6293
|
const unixSeconds = Number(dateInput);
|
|
@@ -6393,6 +6334,20 @@ class NvCalendar {
|
|
|
6393
6334
|
}
|
|
6394
6335
|
return parsed.toDate();
|
|
6395
6336
|
}
|
|
6337
|
+
/**
|
|
6338
|
+
* Checks if the date format is in UTC mode
|
|
6339
|
+
* @returns {boolean} true if the date format is in UTC mode
|
|
6340
|
+
*/
|
|
6341
|
+
get isUTCMode() {
|
|
6342
|
+
return this.dateFormat.includes('Z');
|
|
6343
|
+
}
|
|
6344
|
+
/**
|
|
6345
|
+
* Checks if the date format is ISO 8601
|
|
6346
|
+
* @returns {boolean} true if the format is ISO 8601
|
|
6347
|
+
*/
|
|
6348
|
+
get isISO8601Format() {
|
|
6349
|
+
return this.dateFormat === 'YYYY-MM-DD[T]HH:mm:ss[Z]';
|
|
6350
|
+
}
|
|
6396
6351
|
/**
|
|
6397
6352
|
* Formats a date to a string according to the format
|
|
6398
6353
|
* @param {Date} date - Date to format
|
|
@@ -6401,6 +6356,11 @@ class NvCalendar {
|
|
|
6401
6356
|
formatDate(date) {
|
|
6402
6357
|
if (!date)
|
|
6403
6358
|
return '';
|
|
6359
|
+
// Special case for ISO 8601
|
|
6360
|
+
if (this.isISO8601Format) {
|
|
6361
|
+
// For the ISO 8601 format, use directly toISOString() which is standard
|
|
6362
|
+
return date.toISOString();
|
|
6363
|
+
}
|
|
6404
6364
|
// If the format is "Ticks", convert the time to C# ticks
|
|
6405
6365
|
if (this.dateFormat === 'Ticks') {
|
|
6406
6366
|
const ticks = date.getTime() * 10000 + 621355968000000000;
|
|
@@ -6596,11 +6556,10 @@ class NvCalendar {
|
|
|
6596
6556
|
/**
|
|
6597
6557
|
* Handles month change with an offset
|
|
6598
6558
|
* @param {number} direction - Direction (-1 for previous, 1 for next)
|
|
6599
|
-
* @param {number} offset - Month offset (0 by default)
|
|
6600
6559
|
* @returns {Function} Change month handler
|
|
6601
6560
|
*/
|
|
6602
|
-
getChangeMonthHandler(direction
|
|
6603
|
-
return () => this.changeMonth(direction
|
|
6561
|
+
getChangeMonthHandler(direction) {
|
|
6562
|
+
return () => this.changeMonth(direction);
|
|
6604
6563
|
}
|
|
6605
6564
|
/**
|
|
6606
6565
|
* Handles month change from an event (ex: dropdown)
|
|
@@ -6662,13 +6621,6 @@ class NvCalendar {
|
|
|
6662
6621
|
return [];
|
|
6663
6622
|
}
|
|
6664
6623
|
}
|
|
6665
|
-
/**
|
|
6666
|
-
* Checks if the date format is in UTC mode
|
|
6667
|
-
* @returns {boolean} true if the date format is in UTC mode
|
|
6668
|
-
*/
|
|
6669
|
-
get isUTCMode() {
|
|
6670
|
-
return this.dateFormat.includes('Z');
|
|
6671
|
-
}
|
|
6672
6624
|
/**
|
|
6673
6625
|
* Checks if shortcuts are visible
|
|
6674
6626
|
* @returns {boolean} true if shortcuts are visible
|
|
@@ -6694,8 +6646,8 @@ class NvCalendar {
|
|
|
6694
6646
|
* @description Renders the header of the calendar
|
|
6695
6647
|
*/
|
|
6696
6648
|
renderHeader(offset, index) {
|
|
6697
|
-
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
|
|
6698
|
-
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
|
|
6649
|
+
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() +
|
|
6650
|
+
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" }))));
|
|
6699
6651
|
}
|
|
6700
6652
|
/**
|
|
6701
6653
|
* Renders the week numbers
|
|
@@ -6788,7 +6740,7 @@ class NvCalendar {
|
|
|
6788
6740
|
* @slot default - Child content of the component.
|
|
6789
6741
|
*/
|
|
6790
6742
|
render() {
|
|
6791
|
-
return (hAsync(Host, { key: '
|
|
6743
|
+
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' })));
|
|
6792
6744
|
}
|
|
6793
6745
|
get el() { return getElement(this); }
|
|
6794
6746
|
static get watchers() { return {
|
|
@@ -6856,7 +6808,7 @@ class NvCol {
|
|
|
6856
6808
|
/****************************************************************************/
|
|
6857
6809
|
//#region RENDER
|
|
6858
6810
|
render() {
|
|
6859
|
-
return (hAsync(Host, { key: '
|
|
6811
|
+
return (hAsync(Host, { key: '8f7112dc8ce8896d9e7265741f06b7449dd508df', class: clsx(this.getColSize()) }, hAsync("slot", { key: '3bedff11752d04db2615a5f26d4d910d95dee76c' })));
|
|
6860
6812
|
}
|
|
6861
6813
|
static get style() { return NvColStyle0; }
|
|
6862
6814
|
static get cmpMeta() { return {
|
|
@@ -9823,6 +9775,22 @@ function getCoreRowModel() {
|
|
|
9823
9775
|
return rowModel;
|
|
9824
9776
|
}, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => table._autoResetPageIndex()));
|
|
9825
9777
|
}
|
|
9778
|
+
function expandRows(rowModel) {
|
|
9779
|
+
const expandedRows = [];
|
|
9780
|
+
const handleRow = row => {
|
|
9781
|
+
var _row$subRows;
|
|
9782
|
+
expandedRows.push(row);
|
|
9783
|
+
if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getIsExpanded()) {
|
|
9784
|
+
row.subRows.forEach(handleRow);
|
|
9785
|
+
}
|
|
9786
|
+
};
|
|
9787
|
+
rowModel.rows.forEach(handleRow);
|
|
9788
|
+
return {
|
|
9789
|
+
rows: expandedRows,
|
|
9790
|
+
flatRows: rowModel.flatRows,
|
|
9791
|
+
rowsById: rowModel.rowsById
|
|
9792
|
+
};
|
|
9793
|
+
}
|
|
9826
9794
|
|
|
9827
9795
|
function filterRows(rows, filterRowImpl, table) {
|
|
9828
9796
|
if (table.options.filterFromLeafRows) {
|
|
@@ -10010,6 +9978,49 @@ function getFilteredRowModel() {
|
|
|
10010
9978
|
}, getMemoOptions(table.options, 'debugTable', 'getFilteredRowModel', () => table._autoResetPageIndex()));
|
|
10011
9979
|
}
|
|
10012
9980
|
|
|
9981
|
+
function getPaginationRowModel(opts) {
|
|
9982
|
+
return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {
|
|
9983
|
+
if (!rowModel.rows.length) {
|
|
9984
|
+
return rowModel;
|
|
9985
|
+
}
|
|
9986
|
+
const {
|
|
9987
|
+
pageSize,
|
|
9988
|
+
pageIndex
|
|
9989
|
+
} = pagination;
|
|
9990
|
+
let {
|
|
9991
|
+
rows,
|
|
9992
|
+
flatRows,
|
|
9993
|
+
rowsById
|
|
9994
|
+
} = rowModel;
|
|
9995
|
+
const pageStart = pageSize * pageIndex;
|
|
9996
|
+
const pageEnd = pageStart + pageSize;
|
|
9997
|
+
rows = rows.slice(pageStart, pageEnd);
|
|
9998
|
+
let paginatedRowModel;
|
|
9999
|
+
if (!table.options.paginateExpandedRows) {
|
|
10000
|
+
paginatedRowModel = expandRows({
|
|
10001
|
+
rows,
|
|
10002
|
+
flatRows,
|
|
10003
|
+
rowsById
|
|
10004
|
+
});
|
|
10005
|
+
} else {
|
|
10006
|
+
paginatedRowModel = {
|
|
10007
|
+
rows,
|
|
10008
|
+
flatRows,
|
|
10009
|
+
rowsById
|
|
10010
|
+
};
|
|
10011
|
+
}
|
|
10012
|
+
paginatedRowModel.flatRows = [];
|
|
10013
|
+
const handleRow = row => {
|
|
10014
|
+
paginatedRowModel.flatRows.push(row);
|
|
10015
|
+
if (row.subRows.length) {
|
|
10016
|
+
row.subRows.forEach(handleRow);
|
|
10017
|
+
}
|
|
10018
|
+
};
|
|
10019
|
+
paginatedRowModel.rows.forEach(handleRow);
|
|
10020
|
+
return paginatedRowModel;
|
|
10021
|
+
}, getMemoOptions(table.options, 'debugTable'));
|
|
10022
|
+
}
|
|
10023
|
+
|
|
10013
10024
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10014
10025
|
/**
|
|
10015
10026
|
* All properties that should be excluded from the deep copy of an HTML element.
|
|
@@ -10212,13 +10223,15 @@ class NvDatagrid {
|
|
|
10212
10223
|
this.action = createEvent(this, "action", 7);
|
|
10213
10224
|
this.templateCache = new Map();
|
|
10214
10225
|
this.headerTemplateCache = new Map();
|
|
10226
|
+
this.minPageIndex = 1;
|
|
10215
10227
|
/****************************************************************************/
|
|
10216
10228
|
//#region STATES
|
|
10217
10229
|
this.table = null;
|
|
10218
10230
|
this.parsedColumns = []; // Parsed array
|
|
10219
10231
|
this.parsedData = []; // Parsed array
|
|
10220
|
-
this.
|
|
10232
|
+
this.globalFilterSearchTerm = '';
|
|
10221
10233
|
this.columnData = [];
|
|
10234
|
+
this.paginationState = null;
|
|
10222
10235
|
//#endregion STATES
|
|
10223
10236
|
/****************************************************************************/
|
|
10224
10237
|
//#region PROPERTIES
|
|
@@ -10268,8 +10281,24 @@ class NvDatagrid {
|
|
|
10268
10281
|
* @default false
|
|
10269
10282
|
*/
|
|
10270
10283
|
this.autoGenerateColumns = false;
|
|
10284
|
+
/**
|
|
10285
|
+
* Whether to enable pagination for the data grid.
|
|
10286
|
+
* @default false
|
|
10287
|
+
*/
|
|
10288
|
+
this.enablePagination = false;
|
|
10289
|
+
/**
|
|
10290
|
+
* The number of rows to display per page.
|
|
10291
|
+
* @default 10
|
|
10292
|
+
*/
|
|
10293
|
+
this.pageSize = 10;
|
|
10294
|
+
/**
|
|
10295
|
+
* The array of page sizes to display in the pagination dropdown.
|
|
10296
|
+
* @default [10, 20, 30, 40, 50]
|
|
10297
|
+
*/
|
|
10298
|
+
this.pageSizes = [10, 20, 30, 40, 50];
|
|
10271
10299
|
this.debouncedFilter = debounce$1((value) => {
|
|
10272
|
-
|
|
10300
|
+
var _a;
|
|
10301
|
+
(_a = this.table) === null || _a === void 0 ? void 0 : _a.setGlobalFilter(value);
|
|
10273
10302
|
}, 300);
|
|
10274
10303
|
/**
|
|
10275
10304
|
* Handles global filtering on input event for the search input.
|
|
@@ -10285,6 +10314,23 @@ class NvDatagrid {
|
|
|
10285
10314
|
this.debouncedFilter(value);
|
|
10286
10315
|
}
|
|
10287
10316
|
};
|
|
10317
|
+
this.flexRender = (comp, props) => {
|
|
10318
|
+
if (typeof comp === 'function') {
|
|
10319
|
+
return comp(props);
|
|
10320
|
+
}
|
|
10321
|
+
return comp;
|
|
10322
|
+
};
|
|
10323
|
+
this.handlePageIndexChange = (event) => {
|
|
10324
|
+
const target = event.target;
|
|
10325
|
+
const page = target.value ? Number(target.value) - 1 : 0;
|
|
10326
|
+
// Simply use `setPageIndex` to update the page index directly
|
|
10327
|
+
this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageIndex: page }); // This triggers the paginationState watcher
|
|
10328
|
+
};
|
|
10329
|
+
this.handlePageSizeChange = (event) => {
|
|
10330
|
+
const target = event.target;
|
|
10331
|
+
// Simply use `setPageSize` to update the page size directly
|
|
10332
|
+
this.paginationState = Object.assign(Object.assign({}, this.paginationState), { pageSize: Number(target.value) }); // This triggers the paginationState watcher
|
|
10333
|
+
};
|
|
10288
10334
|
}
|
|
10289
10335
|
//#endregion PROPERTIES
|
|
10290
10336
|
/****************************************************************************/
|
|
@@ -10386,6 +10432,7 @@ class NvDatagrid {
|
|
|
10386
10432
|
this.parsedColumns = safeNewValue;
|
|
10387
10433
|
}
|
|
10388
10434
|
initializeTable() {
|
|
10435
|
+
var _a, _b, _c, _d;
|
|
10389
10436
|
// Clear the previous table instance (if any)
|
|
10390
10437
|
this.table = null;
|
|
10391
10438
|
// Set default options for the table
|
|
@@ -10419,26 +10466,9 @@ class NvDatagrid {
|
|
|
10419
10466
|
}, // Default: no column sizing info
|
|
10420
10467
|
},
|
|
10421
10468
|
};
|
|
10422
|
-
if (this.enableGlobalFilter) {
|
|
10423
|
-
tableOptions.getFilteredRowModel = getFilteredRowModel();
|
|
10424
|
-
// Set the initial global filter value
|
|
10425
|
-
tableOptions.state.globalFilter = this.globalFilter;
|
|
10426
|
-
// Define the callback for global filter changes
|
|
10427
|
-
tableOptions.onGlobalFilterChange = value => {
|
|
10428
|
-
this.globalFilter = value;
|
|
10429
|
-
};
|
|
10430
|
-
tableOptions.globalFilterFn = (row, columnId, filterValue) => {
|
|
10431
|
-
const response = row
|
|
10432
|
-
.getValue(columnId)
|
|
10433
|
-
.toString()
|
|
10434
|
-
.toLowerCase()
|
|
10435
|
-
.includes(filterValue.toLowerCase());
|
|
10436
|
-
return response;
|
|
10437
|
-
};
|
|
10438
|
-
}
|
|
10439
10469
|
if (this.parsedColumns.length > 0) {
|
|
10440
10470
|
// Validate and generate column definitions
|
|
10441
|
-
const validColumns = this.parsedColumns.filter(column =>
|
|
10471
|
+
const validColumns = this.parsedColumns.filter(column => column === null || column === void 0 ? void 0 : column.accessor);
|
|
10442
10472
|
// Update tableOptions based on parsed data and columns
|
|
10443
10473
|
const hasColumns = validColumns && Array.isArray(validColumns) && validColumns.length > 0;
|
|
10444
10474
|
const hasData = this.parsedData &&
|
|
@@ -10446,22 +10476,22 @@ class NvDatagrid {
|
|
|
10446
10476
|
this.parsedData.length > 0;
|
|
10447
10477
|
if (!hasColumns && !hasData) ;
|
|
10448
10478
|
else if (hasColumns && !hasData) {
|
|
10479
|
+
// Has columns but no data
|
|
10449
10480
|
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
10450
10481
|
}
|
|
10451
10482
|
else {
|
|
10452
10483
|
// Both columns and data are available
|
|
10453
|
-
// No columns and data is available
|
|
10454
10484
|
tableOptions.data = this.getTableData();
|
|
10455
10485
|
tableOptions.columns = this.generateColumns(validColumns, tableOptions);
|
|
10456
10486
|
}
|
|
10457
10487
|
}
|
|
10458
10488
|
else {
|
|
10459
|
-
// No columns and data is available
|
|
10489
|
+
// No parsed columns and data is available
|
|
10460
10490
|
const hasData = this.parsedData &&
|
|
10461
10491
|
Array.isArray(this.parsedData) &&
|
|
10462
10492
|
this.parsedData.length > 0;
|
|
10463
10493
|
if (hasData) {
|
|
10464
|
-
// No columns and data is available
|
|
10494
|
+
// No parsed columns and data is available
|
|
10465
10495
|
const firstRow = this.parsedData[0];
|
|
10466
10496
|
const arrayColumnsConfig = Object.keys(firstRow).map(key => ({
|
|
10467
10497
|
accessor: key,
|
|
@@ -10474,26 +10504,116 @@ class NvDatagrid {
|
|
|
10474
10504
|
tableOptions.columns = this.generateColumns(arrayColumnsConfig, tableOptions);
|
|
10475
10505
|
}
|
|
10476
10506
|
}
|
|
10507
|
+
if (this.enableGlobalFilter) {
|
|
10508
|
+
tableOptions.getFilteredRowModel = getFilteredRowModel();
|
|
10509
|
+
const globalFilter = this.globalFilterSearchTerm;
|
|
10510
|
+
// Set the initial global filter value
|
|
10511
|
+
tableOptions.state.globalFilter = globalFilter;
|
|
10512
|
+
// Define the callback for global filter changes
|
|
10513
|
+
tableOptions.onGlobalFilterChange = updater => {
|
|
10514
|
+
const newFilter = typeof updater === 'function'
|
|
10515
|
+
? updater(this.globalFilterSearchTerm)
|
|
10516
|
+
: updater;
|
|
10517
|
+
this.globalFilterSearchTerm = newFilter; // Will automatically trigger the searchTerm watcher and update the table
|
|
10518
|
+
};
|
|
10519
|
+
tableOptions.globalFilterFn = this.globalFilterFn;
|
|
10520
|
+
}
|
|
10521
|
+
if (this.enablePagination) {
|
|
10522
|
+
tableOptions.getPaginationRowModel = getPaginationRowModel();
|
|
10523
|
+
const pagination = {
|
|
10524
|
+
pageIndex: (_b = (_a = this.paginationState) === null || _a === void 0 ? void 0 : _a.pageIndex) !== null && _b !== void 0 ? _b : 0,
|
|
10525
|
+
pageSize: (_d = (_c = this.paginationState) === null || _c === void 0 ? void 0 : _c.pageSize) !== null && _d !== void 0 ? _d : 10,
|
|
10526
|
+
};
|
|
10527
|
+
// Set the initial pagination value with safeguards
|
|
10528
|
+
tableOptions.state.pagination = pagination;
|
|
10529
|
+
tableOptions.onPaginationChange = updater => {
|
|
10530
|
+
const newPagination = typeof updater === 'function'
|
|
10531
|
+
? updater(this.paginationState)
|
|
10532
|
+
: updater;
|
|
10533
|
+
this.paginationState = newPagination;
|
|
10534
|
+
};
|
|
10535
|
+
}
|
|
10477
10536
|
// Initialize the table
|
|
10478
10537
|
this.table = createTable(tableOptions);
|
|
10479
10538
|
}
|
|
10539
|
+
/**
|
|
10540
|
+
* Global filter function for the table.
|
|
10541
|
+
* This function checks if the specified filter value is present in any of the row's original values,
|
|
10542
|
+
* including nested objects and arrays. It is used to filter the rows based on the global filter value,
|
|
10543
|
+
* allowing for case-insensitive matching.
|
|
10544
|
+
*
|
|
10545
|
+
* @param {Row<any>} row - The row object containing the data to be filtered.
|
|
10546
|
+
* @param {string} _columnId - The ID of the column being filtered (not used in this function).
|
|
10547
|
+
* @param {string} filterValue - The value to filter the rows by. This value is checked against the row's data.
|
|
10548
|
+
* @returns {boolean} - Returns true if the row should be included in the filtered results, false otherwise.
|
|
10549
|
+
* If the filter value is empty, all rows are included.
|
|
10550
|
+
*/
|
|
10551
|
+
globalFilterFn(row, _columnId, filterValue) {
|
|
10552
|
+
const safeFilterValue = String(filterValue).toLowerCase().trim();
|
|
10553
|
+
// If no filter value, return true for all rows
|
|
10554
|
+
if (!safeFilterValue)
|
|
10555
|
+
return true;
|
|
10556
|
+
// More robust filtering across all columns
|
|
10557
|
+
const checkValue = (value) => {
|
|
10558
|
+
if (typeof value === 'object' && value !== null) {
|
|
10559
|
+
// If it's an array, check each item
|
|
10560
|
+
if (Array.isArray(value)) {
|
|
10561
|
+
return value.some(item => checkValue(item));
|
|
10562
|
+
}
|
|
10563
|
+
// If it's an object, check each property
|
|
10564
|
+
return Object.values(value).some(val => checkValue(val));
|
|
10565
|
+
}
|
|
10566
|
+
return String(value).toLowerCase().includes(safeFilterValue);
|
|
10567
|
+
};
|
|
10568
|
+
return checkValue(row.original);
|
|
10569
|
+
}
|
|
10480
10570
|
// Helper function to generate column definitions
|
|
10481
10571
|
generateColumns(validColumns, tableOptions) {
|
|
10482
10572
|
const columnHelper = createColumnHelper();
|
|
10483
10573
|
if (validColumns.length > 0) {
|
|
10484
10574
|
// Use defined columns
|
|
10485
|
-
return validColumns.map(column =>
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10575
|
+
return validColumns.map(column => {
|
|
10576
|
+
var _a, _b;
|
|
10577
|
+
return columnHelper.accessor(column.accessor, {
|
|
10578
|
+
header: (_b = (this.renderTemplate(this.headerTemplateCache.get(column.accessor), (_a = column.header) !== null && _a !== void 0 ? _a : column.accessor, null) ||
|
|
10579
|
+
column.header)) !== null && _b !== void 0 ? _b : column.accessor,
|
|
10580
|
+
cell: (info) => {
|
|
10581
|
+
var _a, _b, _c;
|
|
10582
|
+
const value = info.getValue();
|
|
10583
|
+
const cellAccessors = column.accessor;
|
|
10584
|
+
const row = info.row;
|
|
10585
|
+
return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
|
|
10586
|
+
? value.map((item) => {
|
|
10587
|
+
var _a, _b;
|
|
10588
|
+
return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
|
|
10589
|
+
item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
|
|
10590
|
+
})
|
|
10591
|
+
: (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
|
|
10592
|
+
value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
|
|
10593
|
+
},
|
|
10594
|
+
enableGlobalFilter: this.enableGlobalFilter,
|
|
10595
|
+
});
|
|
10596
|
+
});
|
|
10490
10597
|
}
|
|
10491
10598
|
else if (tableOptions.data && tableOptions.data.length > 0) {
|
|
10492
10599
|
// Generate columns from data keys
|
|
10493
10600
|
const sampleRow = tableOptions.data[0];
|
|
10494
10601
|
return Object.keys(sampleRow).map(key => columnHelper.accessor(key, {
|
|
10495
|
-
header: key.charAt(0).toUpperCase() + key.slice(1), // Capitalize key for header
|
|
10496
|
-
cell: info =>
|
|
10602
|
+
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
|
|
10603
|
+
cell: (info) => {
|
|
10604
|
+
var _a, _b, _c;
|
|
10605
|
+
const value = info.getValue();
|
|
10606
|
+
const cellAccessors = key;
|
|
10607
|
+
const row = info.row;
|
|
10608
|
+
return ((_a = this.columnData.find(x => x.accessor === cellAccessors)) === null || _a === void 0 ? void 0 : _a.repeatTemplate) && Array.isArray(value)
|
|
10609
|
+
? value.map((item) => {
|
|
10610
|
+
var _a, _b;
|
|
10611
|
+
return (_b = (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
|
|
10612
|
+
item)) !== null && _a !== void 0 ? _a : value) !== null && _b !== void 0 ? _b : this.fallbackValue;
|
|
10613
|
+
})
|
|
10614
|
+
: (_c = (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), value, row) ||
|
|
10615
|
+
value)) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : this.fallbackValue;
|
|
10616
|
+
},
|
|
10497
10617
|
enableGlobalFilter: this.enableGlobalFilter,
|
|
10498
10618
|
}));
|
|
10499
10619
|
}
|
|
@@ -10522,11 +10642,11 @@ class NvDatagrid {
|
|
|
10522
10642
|
// Replace placeholders in text content, attributes, and properties
|
|
10523
10643
|
element.querySelectorAll('*').forEach(el => {
|
|
10524
10644
|
// Replace placeholders in text content
|
|
10525
|
-
this.replacePlaceholdersTextContent(el, cellValue);
|
|
10645
|
+
this.replacePlaceholdersTextContent(el, cellValue, row);
|
|
10526
10646
|
// Replace placeholders in attributes
|
|
10527
|
-
this.replacePlaceholdersAttributes(el, cellValue);
|
|
10647
|
+
this.replacePlaceholdersAttributes(el, cellValue, row);
|
|
10528
10648
|
// Replace placeholders in properties
|
|
10529
|
-
this.replacePlaceholdersProperties(el, cellValue);
|
|
10649
|
+
this.replacePlaceholdersProperties(el, cellValue, row);
|
|
10530
10650
|
});
|
|
10531
10651
|
// Handle `data-bind-event`
|
|
10532
10652
|
element.querySelectorAll('[data-bind-event]').forEach(el => {
|
|
@@ -10625,51 +10745,128 @@ class NvDatagrid {
|
|
|
10625
10745
|
// If cellValue is a primitive (string, number, boolean, etc.), return it as a string
|
|
10626
10746
|
return (_a = cellValue === null || cellValue === void 0 ? void 0 : cellValue.toString()) !== null && _a !== void 0 ? _a : this.fallbackValue;
|
|
10627
10747
|
}
|
|
10628
|
-
replacePlaceholdersTextContent(element, cellValue) {
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10748
|
+
replacePlaceholdersTextContent(element, cellValue, row) {
|
|
10749
|
+
if (!cellValue) {
|
|
10750
|
+
// ✅ Replace placeholders in text content with the row original value
|
|
10751
|
+
// but first get the original value
|
|
10752
|
+
const originalValue = row.original;
|
|
10753
|
+
element.childNodes.forEach(node => {
|
|
10754
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
10755
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => {
|
|
10756
|
+
if (key in originalValue) {
|
|
10757
|
+
return this.replaceKeyWithValue(key, originalValue[key]);
|
|
10758
|
+
}
|
|
10759
|
+
else {
|
|
10760
|
+
console.warn(`Key ${key} not found in originalValue`);
|
|
10761
|
+
return '';
|
|
10762
|
+
}
|
|
10763
|
+
});
|
|
10764
|
+
}
|
|
10765
|
+
});
|
|
10766
|
+
}
|
|
10767
|
+
else {
|
|
10768
|
+
// ✅ Replace placeholders in text content
|
|
10769
|
+
element.childNodes.forEach(node => {
|
|
10770
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
10771
|
+
node.textContent = node.textContent.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
10772
|
+
}
|
|
10773
|
+
});
|
|
10774
|
+
}
|
|
10643
10775
|
}
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10776
|
+
replacePlaceholdersAttributes(element, cellValue, row) {
|
|
10777
|
+
if (!cellValue) {
|
|
10778
|
+
// ✅ Replace placeholders in attributes with the row original value
|
|
10779
|
+
// but first get the original value
|
|
10780
|
+
const originalValue = row.original;
|
|
10781
|
+
Array.from(element.attributes).forEach(attr => {
|
|
10782
|
+
if (attr.value.includes('__')) {
|
|
10783
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => {
|
|
10784
|
+
if (key in originalValue) {
|
|
10785
|
+
return this.replaceKeyWithValue(key, originalValue[key]);
|
|
10786
|
+
}
|
|
10787
|
+
else {
|
|
10788
|
+
console.warn(`Key ${key} not found in originalValue`);
|
|
10789
|
+
return '';
|
|
10790
|
+
}
|
|
10791
|
+
});
|
|
10792
|
+
}
|
|
10793
|
+
});
|
|
10654
10794
|
}
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10795
|
+
else {
|
|
10796
|
+
// ✅ Replace placeholders in attributes
|
|
10797
|
+
Array.from(element.attributes).forEach(attr => {
|
|
10798
|
+
if (attr.value.includes('__')) {
|
|
10799
|
+
attr.value = attr.value.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue));
|
|
10800
|
+
}
|
|
10801
|
+
});
|
|
10802
|
+
}
|
|
10803
|
+
}
|
|
10804
|
+
replacePlaceholdersProperties(element, cellValue, row) {
|
|
10805
|
+
if (!cellValue) {
|
|
10806
|
+
// ✅ Replace placeholders in properties with the row original value
|
|
10807
|
+
// but first get the original value
|
|
10808
|
+
const originalValue = row.original;
|
|
10809
|
+
// ✅ Dynamically extract relevant properties
|
|
10810
|
+
const properties = new Set();
|
|
10811
|
+
// Collect only own enumerable properties
|
|
10812
|
+
Object.keys(originalValue).forEach(key => properties.add(key));
|
|
10813
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
10814
|
+
let proto = Object.getPrototypeOf(originalValue);
|
|
10815
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
10816
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
10817
|
+
proto = Object.getPrototypeOf(proto);
|
|
10818
|
+
}
|
|
10819
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
10820
|
+
properties.forEach(prop => {
|
|
10821
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
10822
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
10823
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
10824
|
+
) {
|
|
10662
10825
|
const propValue = element[prop];
|
|
10663
|
-
// ✅ Replace placeholders only if the value is a string
|
|
10664
10826
|
if (typeof propValue === 'string' && propValue.includes('__')) {
|
|
10665
|
-
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) =>
|
|
10827
|
+
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => {
|
|
10828
|
+
if (key in originalValue) {
|
|
10829
|
+
return this.replaceKeyWithValue(key, originalValue[key]);
|
|
10830
|
+
}
|
|
10831
|
+
else {
|
|
10832
|
+
console.warn(`Key ${key} not found in originalValue`);
|
|
10833
|
+
return '';
|
|
10834
|
+
}
|
|
10835
|
+
});
|
|
10666
10836
|
}
|
|
10667
10837
|
}
|
|
10668
|
-
|
|
10669
|
-
|
|
10838
|
+
});
|
|
10839
|
+
}
|
|
10840
|
+
else {
|
|
10841
|
+
// ✅ Dynamically extract relevant properties
|
|
10842
|
+
const properties = new Set();
|
|
10843
|
+
// Collect only own enumerable properties
|
|
10844
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
10845
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
10846
|
+
let proto = Object.getPrototypeOf(element);
|
|
10847
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
10848
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
10849
|
+
proto = Object.getPrototypeOf(proto);
|
|
10850
|
+
}
|
|
10851
|
+
// ✅ Filter and copy only non-function properties and exclude irrelevant ones
|
|
10852
|
+
properties.forEach(prop => {
|
|
10853
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
10854
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
10855
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
10856
|
+
) {
|
|
10857
|
+
try {
|
|
10858
|
+
const propValue = element[prop];
|
|
10859
|
+
// ✅ Replace placeholders only if the value is a string
|
|
10860
|
+
if (typeof propValue === 'string' && propValue.includes('__')) {
|
|
10861
|
+
element[prop] = propValue.replace(/__([\w.]+)__/g, (_, key) => this.replaceKeyWithValue(key, cellValue)); // ✅ TypeScript safe
|
|
10862
|
+
}
|
|
10863
|
+
}
|
|
10864
|
+
catch (error) {
|
|
10865
|
+
console.warn(`Could not assign property ${prop}:`, error.message);
|
|
10866
|
+
}
|
|
10670
10867
|
}
|
|
10671
|
-
}
|
|
10672
|
-
}
|
|
10868
|
+
});
|
|
10869
|
+
}
|
|
10673
10870
|
}
|
|
10674
10871
|
//#endregion METHODS
|
|
10675
10872
|
/****************************************************************************/
|
|
@@ -10703,14 +10900,30 @@ class NvDatagrid {
|
|
|
10703
10900
|
handleParsedChange() {
|
|
10704
10901
|
this.initializeTable();
|
|
10705
10902
|
}
|
|
10706
|
-
|
|
10903
|
+
handleGlobalFilterSearchTerm(newValue) {
|
|
10707
10904
|
if (!this.table) {
|
|
10708
10905
|
console.warn('Table is not initialized yet.');
|
|
10709
10906
|
return;
|
|
10710
10907
|
}
|
|
10711
|
-
//
|
|
10712
|
-
|
|
10713
|
-
this.table.setGlobalFilter(newValue)
|
|
10908
|
+
// Not working
|
|
10909
|
+
/*// Set the global filter for the table
|
|
10910
|
+
this.table.setGlobalFilter(newValue);*/
|
|
10911
|
+
// Manually update the globalFilter state
|
|
10912
|
+
this.table.options.state.globalFilter = newValue;
|
|
10913
|
+
}
|
|
10914
|
+
handlePaginationState(newValue, oldValue) {
|
|
10915
|
+
if (!this.table) {
|
|
10916
|
+
console.warn('Table is not initialized yet.');
|
|
10917
|
+
return;
|
|
10918
|
+
}
|
|
10919
|
+
// Only update if there is a meaningful change
|
|
10920
|
+
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
|
|
10921
|
+
// Not working
|
|
10922
|
+
/*// Set the pagination for the table
|
|
10923
|
+
this.table.setPagination(newValue);*/
|
|
10924
|
+
// Manually update the pagination state
|
|
10925
|
+
this.table.options.state.pagination = newValue;
|
|
10926
|
+
}
|
|
10714
10927
|
}
|
|
10715
10928
|
//#endregion WATCHERS
|
|
10716
10929
|
/****************************************************************************/
|
|
@@ -10719,41 +10932,39 @@ class NvDatagrid {
|
|
|
10719
10932
|
this.cacheTemplates();
|
|
10720
10933
|
this.parseDataAndColumns();
|
|
10721
10934
|
this.initializeTable();
|
|
10935
|
+
if (this.enablePagination) {
|
|
10936
|
+
// Ensure a valid page size
|
|
10937
|
+
const effectivePageSize = this.pageSize > 0 ? this.pageSize : 10;
|
|
10938
|
+
this.paginationState = {
|
|
10939
|
+
pageIndex: Math.max(0, this.minPageIndex - 1),
|
|
10940
|
+
pageSize: effectivePageSize,
|
|
10941
|
+
};
|
|
10942
|
+
}
|
|
10722
10943
|
}
|
|
10723
10944
|
//#endregion EVENTS
|
|
10724
10945
|
/****************************************************************************/
|
|
10725
10946
|
//#region RENDER
|
|
10726
10947
|
render() {
|
|
10727
|
-
var _a, _b, _c, _d;
|
|
10948
|
+
var _a, _b, _c, _d, _e;
|
|
10728
10949
|
const headerGroups = !this.table || this.table === undefined || this.parsedColumns.length === 0
|
|
10729
10950
|
? []
|
|
10730
10951
|
: (_a = this.table) === null || _a === void 0 ? void 0 : _a.getHeaderGroups();
|
|
10731
10952
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
10732
10953
|
? []
|
|
10733
10954
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
10734
|
-
return (hAsync(Host, { key: '
|
|
10955
|
+
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
|
|
10735
10956
|
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (hAsync("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
10736
10957
|
return (hAsync("th", { key: header.id }, header.isPlaceholder
|
|
10737
10958
|
? null
|
|
10738
|
-
: this.
|
|
10959
|
+
: this.flexRender(header.column.columnDef.header, header.getContext())));
|
|
10739
10960
|
}))))
|
|
10740
10961
|
: 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 => {
|
|
10741
10962
|
const rowId = row.id;
|
|
10742
10963
|
const visibleCells = row === null || row === void 0 ? void 0 : row.getVisibleCells();
|
|
10743
10964
|
return (hAsync("tr", { key: rowId }, visibleCells.map(cell => {
|
|
10744
|
-
|
|
10745
|
-
const cellAccessors = cell.column.id;
|
|
10746
|
-
const cellValue = cell.getValue();
|
|
10747
|
-
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)
|
|
10748
|
-
? cellValue.map((item) => {
|
|
10749
|
-
var _a;
|
|
10750
|
-
return (_a = (this.renderTemplate(this.templateCache.get(cellAccessors), item, row) ||
|
|
10751
|
-
item)) !== null && _a !== void 0 ? _a : this.fallbackValue;
|
|
10752
|
-
})
|
|
10753
|
-
: (_b = (this.renderTemplate(this.templateCache.get(cellAccessors), cellValue, row) ||
|
|
10754
|
-
cellValue)) !== null && _b !== void 0 ? _b : this.fallbackValue));
|
|
10965
|
+
return (hAsync("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
10755
10966
|
})));
|
|
10756
|
-
}))))), hAsync("slot", { key: '
|
|
10967
|
+
})))), 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" })));
|
|
10757
10968
|
}
|
|
10758
10969
|
get el() { return getElement(this); }
|
|
10759
10970
|
static get watchers() { return {
|
|
@@ -10763,7 +10974,8 @@ class NvDatagrid {
|
|
|
10763
10974
|
"dataJson": ["parseJsonData"],
|
|
10764
10975
|
"parsedColumns": ["handleParsedChange"],
|
|
10765
10976
|
"parsedData": ["handleParsedChange"],
|
|
10766
|
-
"
|
|
10977
|
+
"globalFilterSearchTerm": ["handleGlobalFilterSearchTerm"],
|
|
10978
|
+
"paginationState": ["handlePaginationState"]
|
|
10767
10979
|
}; }
|
|
10768
10980
|
static get style() { return NvDatagridStyle0; }
|
|
10769
10981
|
static get cmpMeta() { return {
|
|
@@ -10779,15 +10991,19 @@ class NvDatagrid {
|
|
|
10779
10991
|
"noColumnsNoDataMessage": [513, "no-columns-no-data-message"],
|
|
10780
10992
|
"enableGlobalFilter": [516, "enable-global-filter"],
|
|
10781
10993
|
"autoGenerateColumns": [516, "auto-generate-columns"],
|
|
10994
|
+
"enablePagination": [516, "enable-pagination"],
|
|
10995
|
+
"pageSize": [514, "page-size"],
|
|
10996
|
+
"pageSizes": [16],
|
|
10782
10997
|
"table": [32],
|
|
10783
10998
|
"parsedColumns": [32],
|
|
10784
10999
|
"parsedData": [32],
|
|
10785
|
-
"
|
|
10786
|
-
"columnData": [32]
|
|
11000
|
+
"globalFilterSearchTerm": [32],
|
|
11001
|
+
"columnData": [32],
|
|
11002
|
+
"paginationState": [32]
|
|
10787
11003
|
},
|
|
10788
11004
|
"$listeners$": undefined,
|
|
10789
11005
|
"$lazyBundleId$": "-",
|
|
10790
|
-
"$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"]]
|
|
11006
|
+
"$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"]]
|
|
10791
11007
|
}; }
|
|
10792
11008
|
}
|
|
10793
11009
|
|
|
@@ -10807,7 +11023,7 @@ class NvDatagridcolumn {
|
|
|
10807
11023
|
/****************************************************************************/
|
|
10808
11024
|
//#region RENDER
|
|
10809
11025
|
render() {
|
|
10810
|
-
return (hAsync(Host, { key: '
|
|
11026
|
+
return (hAsync(Host, { key: '20839d4a0abfa07e55a49b434ad26e3ddaebb66b' }, hAsync("slot", { key: '2c1b24aef73e9be8e500d48741e4dc6a42ed6f06', name: "header" }), hAsync("slot", { key: 'cbc4bcbb080f8647c6f702e4a52411fe9be1f6ca', name: "cell" })));
|
|
10811
11027
|
}
|
|
10812
11028
|
static get cmpMeta() { return {
|
|
10813
11029
|
"$flags$": 4,
|
|
@@ -11679,7 +11895,7 @@ class NvDialog {
|
|
|
11679
11895
|
//#region RENDER
|
|
11680
11896
|
render() {
|
|
11681
11897
|
const hasForm = this.form || this.el.querySelector('form');
|
|
11682
|
-
return (hAsync(Host, { key: '
|
|
11898
|
+
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 }))))));
|
|
11683
11899
|
}
|
|
11684
11900
|
get el() { return getElement(this); }
|
|
11685
11901
|
static get watchers() { return {
|
|
@@ -11795,7 +12011,7 @@ class NvDialogfooter {
|
|
|
11795
12011
|
/****************************************************************************/
|
|
11796
12012
|
//#region RENDER
|
|
11797
12013
|
render() {
|
|
11798
|
-
return (hAsync(Host, { key: '
|
|
12014
|
+
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))));
|
|
11799
12015
|
}
|
|
11800
12016
|
static get formAssociated() { return true; }
|
|
11801
12017
|
get el() { return getElement(this); }
|
|
@@ -11851,7 +12067,7 @@ class NvDialogheader {
|
|
|
11851
12067
|
/****************************************************************************/
|
|
11852
12068
|
//#region RENDER
|
|
11853
12069
|
render() {
|
|
11854
|
-
return (hAsync(Host, { key: '
|
|
12070
|
+
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))));
|
|
11855
12071
|
}
|
|
11856
12072
|
get el() { return getElement(this); }
|
|
11857
12073
|
static get style() { return NvDialogheaderStyle0; }
|
|
@@ -11988,13 +12204,13 @@ class NvFieldcheckbox {
|
|
|
11988
12204
|
/****************************************************************************/
|
|
11989
12205
|
//#region RENDER
|
|
11990
12206
|
render() {
|
|
11991
|
-
return (hAsync(Host, { key: '
|
|
12207
|
+
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 => {
|
|
11992
12208
|
if (el) {
|
|
11993
12209
|
el.indeterminate = this.indeterminate;
|
|
11994
12210
|
}
|
|
11995
|
-
} }), hAsync("span", { key: '
|
|
11996
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
11997
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
12211
|
+
} }), 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 ||
|
|
12212
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'dff6c3a69496324cabcf25ae7639c98a7d908769', class: "description" }, hAsync("slot", { key: '498c8216c9a0a537f1aa2a542b3caa688b76e55d', name: "description" }, this.description))), (this.errorDescription ||
|
|
12213
|
+
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))))));
|
|
11998
12214
|
}
|
|
11999
12215
|
static get formAssociated() { return true; }
|
|
12000
12216
|
get el() { return getElement(this); }
|
|
@@ -16051,12 +16267,12 @@ class NvFielddate {
|
|
|
16051
16267
|
/****************************************************************************/
|
|
16052
16268
|
//#region RENDER
|
|
16053
16269
|
render() {
|
|
16054
|
-
return (hAsync(Host, { key: '
|
|
16055
|
-
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '
|
|
16270
|
+
return (hAsync(Host, { key: '817d7baa3525b53962f9afe3d1eb56d7fcbcaf0e' }, ((this.label && this.label.length > 0) ||
|
|
16271
|
+
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'}
|
|
16056
16272
|
,
|
|
16057
|
-
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: '
|
|
16058
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
16059
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
16273
|
+
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) ||
|
|
16274
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'f835c89363c45529512e156b313cb35f71ef5264', class: "description" }, hAsync("slot", { key: '738d49ee6e525310375eba5da057573104d3c2ed', name: "description" }, this.description))), (this.errorDescription ||
|
|
16275
|
+
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' })));
|
|
16060
16276
|
}
|
|
16061
16277
|
get el() { return getElement(this); }
|
|
16062
16278
|
static get watchers() { return {
|
|
@@ -16438,15 +16654,15 @@ class NvFielddaterange {
|
|
|
16438
16654
|
/****************************************************************************/
|
|
16439
16655
|
//#region RENDER
|
|
16440
16656
|
render() {
|
|
16441
|
-
return (hAsync(Host, { key: '
|
|
16442
|
-
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '
|
|
16657
|
+
return (hAsync(Host, { key: '965223047219ae767b07ccecb0a00580ea39c232' }, ((this.label && this.label.length > 0) ||
|
|
16658
|
+
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
|
|
16443
16659
|
? JSON.stringify({
|
|
16444
16660
|
start: this.startValue,
|
|
16445
16661
|
end: this.endValue,
|
|
16446
16662
|
})
|
|
16447
16663
|
: '', 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) ||
|
|
16448
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
16449
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
16664
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '780f82060de810eb394285f4799511d2223312a3', class: "description" }, hAsync("slot", { key: '326cbf626387738b9997f3b4d452c50ea2b3d5b2', name: "description" }, this.description))), (this.errorDescription ||
|
|
16665
|
+
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' })));
|
|
16450
16666
|
}
|
|
16451
16667
|
get el() { return getElement(this); }
|
|
16452
16668
|
static get watchers() { return {
|
|
@@ -16574,10 +16790,6 @@ class NvFielddropdown {
|
|
|
16574
16790
|
/** The text entered by the user for filtering dropdown items. */
|
|
16575
16791
|
this.filterText = '';
|
|
16576
16792
|
this.selectedValues = new Set();
|
|
16577
|
-
/**
|
|
16578
|
-
* Options configuration for the dropdown items.
|
|
16579
|
-
*/
|
|
16580
|
-
this.parsedOptions = [];
|
|
16581
16793
|
this.handleInputContainerClick = (event) => {
|
|
16582
16794
|
if (this.disabled || this.readonly) {
|
|
16583
16795
|
return;
|
|
@@ -16620,17 +16832,17 @@ class NvFielddropdown {
|
|
|
16620
16832
|
this.open = !this.open;
|
|
16621
16833
|
};
|
|
16622
16834
|
this.getSelectedLabel = () => {
|
|
16623
|
-
var _a, _b, _c, _d, _e;
|
|
16835
|
+
var _a, _b, _c, _d, _e, _f;
|
|
16624
16836
|
if (!this.value)
|
|
16625
16837
|
return '';
|
|
16626
|
-
if (this.
|
|
16627
|
-
const matchingItem = this.
|
|
16628
|
-
return (
|
|
16838
|
+
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 1) {
|
|
16839
|
+
const matchingItem = this.options.find(option => option.value === this.value);
|
|
16840
|
+
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;
|
|
16629
16841
|
}
|
|
16630
16842
|
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitem'));
|
|
16631
16843
|
const matchingItem = items.find(item => item.value === this.value);
|
|
16632
16844
|
const selectedLabel = matchingItem
|
|
16633
|
-
? (
|
|
16845
|
+
? (_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
|
|
16634
16846
|
: '';
|
|
16635
16847
|
return selectedLabel;
|
|
16636
16848
|
};
|
|
@@ -16667,23 +16879,12 @@ class NvFielddropdown {
|
|
|
16667
16879
|
}
|
|
16668
16880
|
handleOptionsChange(newValue) {
|
|
16669
16881
|
var _a;
|
|
16670
|
-
if (newValue)
|
|
16671
|
-
|
|
16672
|
-
|
|
16673
|
-
|
|
16674
|
-
|
|
16675
|
-
|
|
16676
|
-
this.value = (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value) !== null && _a !== void 0 ? _a : '';
|
|
16677
|
-
this.updateSelectedItem(this.value);
|
|
16678
|
-
}
|
|
16679
|
-
}
|
|
16680
|
-
catch (error) {
|
|
16681
|
-
console.error('nv-fielddropdown: error parsing options:', error);
|
|
16682
|
-
this.parsedOptions = [];
|
|
16683
|
-
}
|
|
16684
|
-
}
|
|
16685
|
-
else {
|
|
16686
|
-
this.parsedOptions = [];
|
|
16882
|
+
if (!newValue)
|
|
16883
|
+
return;
|
|
16884
|
+
if (!this.value) {
|
|
16885
|
+
const defaultValue = newValue.find(option => option.selected);
|
|
16886
|
+
this.value = (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value) !== null && _a !== void 0 ? _a : '';
|
|
16887
|
+
this.updateSelectedItem(this.value);
|
|
16687
16888
|
}
|
|
16688
16889
|
}
|
|
16689
16890
|
handleBlur(event) {
|
|
@@ -16838,9 +17039,10 @@ class NvFielddropdown {
|
|
|
16838
17039
|
/****************************************************************************/
|
|
16839
17040
|
//#region RENDER
|
|
16840
17041
|
render() {
|
|
16841
|
-
|
|
16842
|
-
|
|
16843
|
-
this.el.querySelector('[slot="
|
|
17042
|
+
var _a;
|
|
17043
|
+
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 ||
|
|
17044
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '5d0b74de616aefa056d17cb70fab0d36ab9b41c3', class: "description" }, hAsync("slot", { key: 'bab9d8222164d2227c6024ac2bd5675142ccb964', name: "description" }, this.description))), (this.errorDescription ||
|
|
17045
|
+
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)))));
|
|
16844
17046
|
}
|
|
16845
17047
|
static get formAssociated() { return true; }
|
|
16846
17048
|
get el() { return getElement(this); }
|
|
@@ -16868,16 +17070,15 @@ class NvFielddropdown {
|
|
|
16868
17070
|
"disabled": [516],
|
|
16869
17071
|
"emptyResult": [513, "empty-result"],
|
|
16870
17072
|
"filterable": [516],
|
|
16871
|
-
"options": [
|
|
17073
|
+
"options": [16],
|
|
16872
17074
|
"autofocus": [516],
|
|
16873
17075
|
"filterText": [32],
|
|
16874
17076
|
"selectedValues": [32],
|
|
16875
|
-
"parsedOptions": [32],
|
|
16876
17077
|
"getFilterText": [64]
|
|
16877
17078
|
},
|
|
16878
17079
|
"$listeners$": [[0, "dropdownItemSelected", "handleDropdownItemSelected"], [0, "openChanged", "handleOpenChanged"], [2, "blur", "handleBlur"], [0, "keydown", "handleKeyDown"]],
|
|
16879
17080
|
"$lazyBundleId$": "-",
|
|
16880
|
-
"$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"], ["
|
|
17081
|
+
"$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"]]
|
|
16881
17082
|
}; }
|
|
16882
17083
|
}
|
|
16883
17084
|
|
|
@@ -16940,7 +17141,7 @@ class NvFielddropdownitem {
|
|
|
16940
17141
|
/****************************************************************************/
|
|
16941
17142
|
//#region RENDER
|
|
16942
17143
|
render() {
|
|
16943
|
-
return (hAsync(Host, { key: '
|
|
17144
|
+
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" }))));
|
|
16944
17145
|
}
|
|
16945
17146
|
get el() { return getElement(this); }
|
|
16946
17147
|
static get style() { return NvFielddropdownitemStyle0; }
|
|
@@ -17005,7 +17206,7 @@ class NvFielddropdownitemcheck {
|
|
|
17005
17206
|
};
|
|
17006
17207
|
}
|
|
17007
17208
|
render() {
|
|
17008
|
-
return (hAsync(Host, { key: '
|
|
17209
|
+
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 })));
|
|
17009
17210
|
}
|
|
17010
17211
|
get el() { return getElement(this); }
|
|
17011
17212
|
static get style() { return NvFielddropdownitemcheckStyle0; }
|
|
@@ -17094,10 +17295,6 @@ class NvFieldmultiselect {
|
|
|
17094
17295
|
* State of the multiselect popover.
|
|
17095
17296
|
*/
|
|
17096
17297
|
this.open = false;
|
|
17097
|
-
/**
|
|
17098
|
-
* Options configuration for the multiselect items.
|
|
17099
|
-
*/
|
|
17100
|
-
this.parsedOptions = [];
|
|
17101
17298
|
/**
|
|
17102
17299
|
* List of selected values in the multiselect.
|
|
17103
17300
|
*/
|
|
@@ -17115,12 +17312,6 @@ class NvFieldmultiselect {
|
|
|
17115
17312
|
* @default 300
|
|
17116
17313
|
*/
|
|
17117
17314
|
this.debounceDelay = 300;
|
|
17118
|
-
/**
|
|
17119
|
-
* State for the mode of the multiselect.
|
|
17120
|
-
* @type {'options' | 'slots'}
|
|
17121
|
-
* @default 'options'
|
|
17122
|
-
*/
|
|
17123
|
-
this.modeState = 'options'; // Default value
|
|
17124
17315
|
this.isHandlingEscape = false;
|
|
17125
17316
|
/**
|
|
17126
17317
|
* Applies focus to the input field as soon as the component is mounted. This
|
|
@@ -17141,7 +17332,7 @@ class NvFieldmultiselect {
|
|
|
17141
17332
|
item.style.display = '';
|
|
17142
17333
|
});
|
|
17143
17334
|
// Reorder options without the divider since there are no selected elements
|
|
17144
|
-
this.
|
|
17335
|
+
this.options = this.options.filter(option => !option.isDivider);
|
|
17145
17336
|
// Reorder options without the divider since there are no selected elements
|
|
17146
17337
|
this.reorderOptionsContent();
|
|
17147
17338
|
};
|
|
@@ -17169,13 +17360,6 @@ class NvFieldmultiselect {
|
|
|
17169
17360
|
return;
|
|
17170
17361
|
}
|
|
17171
17362
|
this.filterText = '';
|
|
17172
|
-
// Only reorder based on the mode
|
|
17173
|
-
if (this.modeState === 'options') {
|
|
17174
|
-
this.reorderOptionsContent();
|
|
17175
|
-
}
|
|
17176
|
-
else {
|
|
17177
|
-
this.reorderSlotContent();
|
|
17178
|
-
}
|
|
17179
17363
|
// Reset filter if needed
|
|
17180
17364
|
if (this.filterable) {
|
|
17181
17365
|
this.resetFilter();
|
|
@@ -17344,7 +17528,7 @@ class NvFieldmultiselect {
|
|
|
17344
17528
|
* @returns {any} The JSX for options mode
|
|
17345
17529
|
*/
|
|
17346
17530
|
this.renderOptionsMode = () => {
|
|
17347
|
-
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.
|
|
17531
|
+
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()));
|
|
17348
17532
|
};
|
|
17349
17533
|
/**
|
|
17350
17534
|
* Renders the component in slots mode
|
|
@@ -17367,13 +17551,13 @@ class NvFieldmultiselect {
|
|
|
17367
17551
|
* Set the mode state and handle options change.
|
|
17368
17552
|
*/
|
|
17369
17553
|
componentWillLoad() {
|
|
17370
|
-
|
|
17554
|
+
var _a;
|
|
17371
17555
|
// Don't call handleOptionsChange if we are in slots mode
|
|
17372
|
-
if (this.
|
|
17556
|
+
if (this.options) {
|
|
17373
17557
|
this.handleOptionsChange(this.options);
|
|
17374
17558
|
}
|
|
17375
17559
|
// Specific initialization for slots mode
|
|
17376
|
-
if (this.
|
|
17560
|
+
if (!this.options) {
|
|
17377
17561
|
Promise.resolve().then(() => {
|
|
17378
17562
|
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
17379
17563
|
// Initialize selectedValues with checked items
|
|
@@ -17387,8 +17571,8 @@ class NvFieldmultiselect {
|
|
|
17387
17571
|
});
|
|
17388
17572
|
}
|
|
17389
17573
|
// Initialize the sorted options array with the parsed options for initial rendering
|
|
17390
|
-
if (this.
|
|
17391
|
-
this.sortedOptions = [...this.
|
|
17574
|
+
if (this.options) {
|
|
17575
|
+
this.sortedOptions = [...((_a = this.options) !== null && _a !== void 0 ? _a : [])];
|
|
17392
17576
|
}
|
|
17393
17577
|
// Apply filtering if the multiselect is filterable and there is a value
|
|
17394
17578
|
if (this.filterable && this.value) {
|
|
@@ -17404,10 +17588,8 @@ class NvFieldmultiselect {
|
|
|
17404
17588
|
* Force reorder if options mode in componentDidLoad because of the initial render not trigger @watch
|
|
17405
17589
|
*/
|
|
17406
17590
|
componentDidLoad() {
|
|
17407
|
-
if (this.
|
|
17408
|
-
|
|
17409
|
-
this.reorderOptionsContent();
|
|
17410
|
-
});
|
|
17591
|
+
if (this.options) {
|
|
17592
|
+
this.handleOptionsChange(this.options);
|
|
17411
17593
|
}
|
|
17412
17594
|
}
|
|
17413
17595
|
/**
|
|
@@ -17432,6 +17614,12 @@ class NvFieldmultiselect {
|
|
|
17432
17614
|
else {
|
|
17433
17615
|
this.handlePopoverClose();
|
|
17434
17616
|
}
|
|
17617
|
+
if (this.options) {
|
|
17618
|
+
this.reorderOptionsContent();
|
|
17619
|
+
}
|
|
17620
|
+
else {
|
|
17621
|
+
this.reorderSlotContent();
|
|
17622
|
+
}
|
|
17435
17623
|
}
|
|
17436
17624
|
/**
|
|
17437
17625
|
* Listen for the `itemChecked` event emitted by child items.
|
|
@@ -17465,41 +17653,13 @@ class NvFieldmultiselect {
|
|
|
17465
17653
|
console.warn('Received itemChecked event with undefined or null value'); // Warning log
|
|
17466
17654
|
}
|
|
17467
17655
|
}
|
|
17468
|
-
/**
|
|
17469
|
-
* Emitted when the options change.
|
|
17470
|
-
* @param {string | Array<{label: string, value: string, isDivider?: boolean, disabled?: boolean, description?: string, checked?: boolean}>} newValue - The new value of the options.
|
|
17471
|
-
*/
|
|
17472
17656
|
handleOptionsChange(newValue) {
|
|
17473
|
-
if (
|
|
17474
|
-
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
|
|
17478
|
-
|
|
17479
|
-
this.parsedOptions = [...parsedOpts];
|
|
17480
|
-
}
|
|
17481
|
-
catch (error) {
|
|
17482
|
-
console.error('Error parsing options:', error);
|
|
17483
|
-
this.parsedOptions = [];
|
|
17484
|
-
}
|
|
17485
|
-
}
|
|
17486
|
-
else if (Array.isArray(newValue)) {
|
|
17487
|
-
this.selectedValues = newValue
|
|
17488
|
-
.filter(option => option.checked)
|
|
17489
|
-
.map(option => option.value);
|
|
17490
|
-
this.parsedOptions = [...newValue];
|
|
17491
|
-
}
|
|
17492
|
-
else {
|
|
17493
|
-
this.parsedOptions = [];
|
|
17494
|
-
}
|
|
17495
|
-
// Wait for the options to be fully loaded
|
|
17496
|
-
Promise.resolve().then(() => {
|
|
17497
|
-
requestAnimationFrame(() => {
|
|
17498
|
-
if (this.modeState === 'options') {
|
|
17499
|
-
this.reorderOptionsContent();
|
|
17500
|
-
}
|
|
17501
|
-
});
|
|
17502
|
-
});
|
|
17657
|
+
if (!newValue)
|
|
17658
|
+
return;
|
|
17659
|
+
this.selectedValues = newValue
|
|
17660
|
+
.filter(option => option.checked)
|
|
17661
|
+
.map(option => option.value);
|
|
17662
|
+
this.reorderOptionsContent();
|
|
17503
17663
|
}
|
|
17504
17664
|
/**
|
|
17505
17665
|
* Emitted when the value changes.
|
|
@@ -17596,7 +17756,7 @@ class NvFieldmultiselect {
|
|
|
17596
17756
|
* Reorder the content of the slot.
|
|
17597
17757
|
*/
|
|
17598
17758
|
reorderSlotContent() {
|
|
17599
|
-
if (this.
|
|
17759
|
+
if (this.options)
|
|
17600
17760
|
return;
|
|
17601
17761
|
const ul = this.el.querySelector('ul');
|
|
17602
17762
|
if (!ul)
|
|
@@ -17660,7 +17820,7 @@ class NvFieldmultiselect {
|
|
|
17660
17820
|
existingEmptyMessage.remove();
|
|
17661
17821
|
}
|
|
17662
17822
|
if (!this.filterText.trim()) {
|
|
17663
|
-
if (this.
|
|
17823
|
+
if (this.options && this.options.length > 0) {
|
|
17664
17824
|
// Reset options display
|
|
17665
17825
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
17666
17826
|
items.forEach(item => {
|
|
@@ -17683,11 +17843,11 @@ class NvFieldmultiselect {
|
|
|
17683
17843
|
}
|
|
17684
17844
|
const normalizedFilter = this.normalizeText(this.filterText);
|
|
17685
17845
|
let hasVisibleItems = false;
|
|
17686
|
-
if (this.
|
|
17846
|
+
if (this.options && this.options.length > 0) {
|
|
17687
17847
|
// Filter options mode
|
|
17688
17848
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
17689
17849
|
items.forEach(item => {
|
|
17690
|
-
const option = this.
|
|
17850
|
+
const option = this.options.find(opt => opt.value === item.getAttribute('value'));
|
|
17691
17851
|
if (option && !option.isDivider) {
|
|
17692
17852
|
const matchesFilter = this.normalizeText(option.label).includes(normalizedFilter) ||
|
|
17693
17853
|
this.normalizeText(option.value).includes(normalizedFilter);
|
|
@@ -17772,7 +17932,7 @@ class NvFieldmultiselect {
|
|
|
17772
17932
|
* Filter multiselect items in slots mode
|
|
17773
17933
|
*/
|
|
17774
17934
|
filterSlotsItems() {
|
|
17775
|
-
if (this.
|
|
17935
|
+
if (this.options)
|
|
17776
17936
|
return;
|
|
17777
17937
|
const ul = this.el.querySelector('ul');
|
|
17778
17938
|
if (!ul)
|
|
@@ -17908,7 +18068,7 @@ class NvFieldmultiselect {
|
|
|
17908
18068
|
// Do the reorder and wait a bit before closing
|
|
17909
18069
|
const handleEscape = async () => {
|
|
17910
18070
|
this.isHandlingEscape = true; // Disable the hide listener
|
|
17911
|
-
if (this.
|
|
18071
|
+
if (this.options) {
|
|
17912
18072
|
this.reorderOptionsContent();
|
|
17913
18073
|
}
|
|
17914
18074
|
else {
|
|
@@ -18020,9 +18180,7 @@ class NvFieldmultiselect {
|
|
|
18020
18180
|
* @returns {any} The JSX for the component
|
|
18021
18181
|
*/
|
|
18022
18182
|
render() {
|
|
18023
|
-
return this.
|
|
18024
|
-
? this.renderOptionsMode()
|
|
18025
|
-
: this.renderSlotsMode();
|
|
18183
|
+
return this.options ? this.renderOptionsMode() : this.renderSlotsMode();
|
|
18026
18184
|
}
|
|
18027
18185
|
static get formAssociated() { return true; }
|
|
18028
18186
|
get el() { return getElement(this); }
|
|
@@ -18052,14 +18210,12 @@ class NvFieldmultiselect {
|
|
|
18052
18210
|
"filterable": [516],
|
|
18053
18211
|
"value": [1537],
|
|
18054
18212
|
"open": [1540],
|
|
18055
|
-
"options": [
|
|
18213
|
+
"options": [1040],
|
|
18056
18214
|
"debounceDelay": [514, "debounce-delay"],
|
|
18057
18215
|
"autofocus": [516],
|
|
18058
|
-
"parsedOptions": [32],
|
|
18059
18216
|
"selectedValues": [32],
|
|
18060
18217
|
"sortedOptions": [32],
|
|
18061
18218
|
"filterText": [32],
|
|
18062
|
-
"modeState": [32],
|
|
18063
18219
|
"isHandlingEscape": [32],
|
|
18064
18220
|
"getFilterText": [64],
|
|
18065
18221
|
"resetFilter": [64],
|
|
@@ -18067,7 +18223,7 @@ class NvFieldmultiselect {
|
|
|
18067
18223
|
},
|
|
18068
18224
|
"$listeners$": [[0, "openChanged", "handleOpenChanged"], [0, "itemChecked", "handleItemChecked"], [0, "slotchange", "handleSlotChange"], [0, "keydown", "handleKeyDown"]],
|
|
18069
18225
|
"$lazyBundleId$": "-",
|
|
18070
|
-
"$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"], ["
|
|
18226
|
+
"$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"]]
|
|
18071
18227
|
}; }
|
|
18072
18228
|
}
|
|
18073
18229
|
|
|
@@ -18186,9 +18342,9 @@ class NvFieldnumber {
|
|
|
18186
18342
|
/****************************************************************************/
|
|
18187
18343
|
//#region RENDER
|
|
18188
18344
|
render() {
|
|
18189
|
-
return (hAsync(Host, { key: '
|
|
18190
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
18191
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
18345
|
+
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 ||
|
|
18346
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'e1d585c32f4cff50d84f5d1b6696856c8c875ef7', class: "description" }, hAsync("slot", { key: '860b5fb8ba3e24fc728021b238b371178ae54ead', name: "description" }, this.description))), (this.errorDescription ||
|
|
18347
|
+
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)))));
|
|
18192
18348
|
}
|
|
18193
18349
|
static get formAssociated() { return true; }
|
|
18194
18350
|
get el() { return getElement(this); }
|
|
@@ -18331,9 +18487,9 @@ class NvFieldpassword {
|
|
|
18331
18487
|
/****************************************************************************/
|
|
18332
18488
|
//#region RENDER
|
|
18333
18489
|
render() {
|
|
18334
|
-
return (hAsync(Host, { key: '
|
|
18335
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
18336
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
18490
|
+
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 ||
|
|
18491
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '91dcddd8a80abccaaffda9cd583759bebf376456', class: "description" }, hAsync("slot", { key: 'fe6da6eb725b3866faf138e848f89152f0f24a00', name: "description" }, this.description))), (this.errorDescription ||
|
|
18492
|
+
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)))));
|
|
18337
18493
|
}
|
|
18338
18494
|
static get formAssociated() { return true; }
|
|
18339
18495
|
get el() { return getElement(this); }
|
|
@@ -18460,9 +18616,9 @@ class NvFieldradio {
|
|
|
18460
18616
|
/****************************************************************************/
|
|
18461
18617
|
//#region RENDER
|
|
18462
18618
|
render() {
|
|
18463
|
-
return (hAsync(Host, { key: '
|
|
18464
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
18465
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
18619
|
+
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 ||
|
|
18620
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'a894108a6e5235010d18547a39daf526e066e432', class: "description" }, hAsync("slot", { key: 'c67b5b5a5d2ef1f27e69eb251e9a15c98909db85', name: "description" }, this.description))), (this.errorDescription ||
|
|
18621
|
+
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))))));
|
|
18466
18622
|
}
|
|
18467
18623
|
static get formAssociated() { return true; }
|
|
18468
18624
|
get el() { return getElement(this); }
|
|
@@ -18842,13 +18998,13 @@ class NvFieldselect {
|
|
|
18842
18998
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
18843
18999
|
*/
|
|
18844
19000
|
render() {
|
|
18845
|
-
return (hAsync(Host, { key: '
|
|
19001
|
+
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
|
|
18846
19002
|
? `${this.inputId}-error`
|
|
18847
|
-
: `${this.inputId}-description` })), hAsync("select", { key: '
|
|
19003
|
+
: `${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
|
|
18848
19004
|
? `${this.inputId}-error`
|
|
18849
|
-
: `${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: '
|
|
18850
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
18851
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19005
|
+
: `${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 ||
|
|
19006
|
+
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 ||
|
|
19007
|
+
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)))));
|
|
18852
19008
|
}
|
|
18853
19009
|
static get formAssociated() { return true; }
|
|
18854
19010
|
get el() { return getElement(this); }
|
|
@@ -19001,9 +19157,9 @@ class NvFieldtext {
|
|
|
19001
19157
|
/****************************************************************************/
|
|
19002
19158
|
//#region RENDER
|
|
19003
19159
|
render() {
|
|
19004
|
-
return (hAsync(Host, { key: '
|
|
19005
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19006
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19160
|
+
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 ||
|
|
19161
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '960bcb53a55aed3e1b8cd1b193ad26f5c6b151fd', class: "description" }, hAsync("slot", { key: '07c09b8543e9b91928821a100869943de94a65a7', name: "description" }, this.description))), (this.errorDescription ||
|
|
19162
|
+
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)))));
|
|
19007
19163
|
}
|
|
19008
19164
|
static get formAssociated() { return true; }
|
|
19009
19165
|
get el() { return getElement(this); }
|
|
@@ -19218,9 +19374,9 @@ class NvFieldtextarea {
|
|
|
19218
19374
|
/****************************************************************************/
|
|
19219
19375
|
//#region RENDER
|
|
19220
19376
|
render() {
|
|
19221
|
-
return (hAsync(Host, { key: '
|
|
19222
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19223
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19377
|
+
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 ||
|
|
19378
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'c5c8c1999105df446a603a3e02f431ad37de4c5e', class: "description" }, hAsync("slot", { key: 'bbcea14c7585e1ff1c995eb4f21cb532a160ed40', name: "description" }, this.description))), (this.errorDescription ||
|
|
19379
|
+
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)))));
|
|
19224
19380
|
}
|
|
19225
19381
|
static get formAssociated() { return true; }
|
|
19226
19382
|
get el() { return getElement(this); }
|
|
@@ -20244,26 +20400,26 @@ class NvFieldtime {
|
|
|
20244
20400
|
}, key: `${option}-${index}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
20245
20401
|
}
|
|
20246
20402
|
render() {
|
|
20247
|
-
return (hAsync(Host, { key: '
|
|
20248
|
-
hAsync("input", { key: '
|
|
20403
|
+
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') && [
|
|
20404
|
+
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
|
|
20249
20405
|
? `${TimeType.Hours}-${this.name}`
|
|
20250
20406
|
: TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
20251
20407
|
], this.format.includes('mm') && [
|
|
20252
|
-
hAsync("span", { key: '
|
|
20253
|
-
hAsync("input", { key: '
|
|
20408
|
+
hAsync("span", { key: 'c7de2283771d60e1e9f756257e34da0eefcf27f3' }, ":"),
|
|
20409
|
+
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
|
|
20254
20410
|
? `${TimeType.Minutes}-${this.name}`
|
|
20255
20411
|
: TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
20256
20412
|
], this.format.includes('ss') && [
|
|
20257
|
-
hAsync("span", { key: '
|
|
20258
|
-
hAsync("input", { key: '
|
|
20413
|
+
hAsync("span", { key: 'ceef993e3efdc2fa01d466033522e09ee78683b1' }, ":"),
|
|
20414
|
+
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
|
|
20259
20415
|
? `${TimeType.Seconds}-${this.name}`
|
|
20260
20416
|
: TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
20261
|
-
], hAsync("nv-iconbutton", { key: '
|
|
20417
|
+
], 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') &&
|
|
20262
20418
|
this.RenderTimeOptionsColumn(TimeType.Hours), this.format.includes('mm') &&
|
|
20263
20419
|
this.RenderTimeOptionsColumn(TimeType.Minutes), this.format.includes('ss') &&
|
|
20264
20420
|
this.RenderTimeOptionsColumn(TimeType.Seconds)))), (this.description ||
|
|
20265
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
20266
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
20421
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '35f5fb47bfeb9cde2c3551df391cf52ccaf10c72', class: "description" }, hAsync("slot", { key: 'b450124765db5b2337f03a5f68c4a9466c80ca85', name: "description" }, this.description))), (this.errorDescription ||
|
|
20422
|
+
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)))));
|
|
20267
20423
|
}
|
|
20268
20424
|
static get formAssociated() { return true; }
|
|
20269
20425
|
get el() { return getElement(this); }
|
|
@@ -20368,7 +20524,7 @@ class NvIcon {
|
|
|
20368
20524
|
/****************************************************************************/
|
|
20369
20525
|
//#region RENDER
|
|
20370
20526
|
render() {
|
|
20371
|
-
return (hAsync(Host, { key: '
|
|
20527
|
+
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}` }))));
|
|
20372
20528
|
}
|
|
20373
20529
|
static get style() { return NvIconStyle0; }
|
|
20374
20530
|
static get cmpMeta() { return {
|
|
@@ -20512,7 +20668,7 @@ class NvIconbutton {
|
|
|
20512
20668
|
/****************************************************************************/
|
|
20513
20669
|
//#region RENDER
|
|
20514
20670
|
render() {
|
|
20515
|
-
return (hAsync(Host, { key: '
|
|
20671
|
+
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' })));
|
|
20516
20672
|
}
|
|
20517
20673
|
static get formAssociated() { return true; }
|
|
20518
20674
|
get el() { return getElement(this); }
|
|
@@ -20560,7 +20716,7 @@ class NvLoader {
|
|
|
20560
20716
|
//#region RENDER
|
|
20561
20717
|
/* <slot> empty to force rendering change */
|
|
20562
20718
|
render() {
|
|
20563
|
-
return (hAsync(Host, { key: '
|
|
20719
|
+
return (hAsync(Host, { key: 'f3094e46eb7072534f497694d3c28030f0118acc', class: clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
20564
20720
|
}
|
|
20565
20721
|
static get style() { return NvLoaderStyle0; }
|
|
20566
20722
|
static get cmpMeta() { return {
|
|
@@ -20611,25 +20767,23 @@ class NvMenu {
|
|
|
20611
20767
|
* position on the axis to fit on the screen, so users can always see it.
|
|
20612
20768
|
*/
|
|
20613
20769
|
this.placement = 'bottom-end';
|
|
20770
|
+
//#endregion LIFECYCLE
|
|
20771
|
+
/****************************************************************************/
|
|
20772
|
+
//#region RENDER
|
|
20614
20773
|
/**
|
|
20615
|
-
*
|
|
20774
|
+
* Generates menu items from the `items` property.
|
|
20775
|
+
* @param {MenuItem[]} items - The items to display in the menu.
|
|
20776
|
+
* @returns {HTMLElement[]} The rendered items.
|
|
20616
20777
|
*/
|
|
20617
|
-
this.
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20625
|
-
|
|
20626
|
-
this.parsedItems = JSON.parse(newValue);
|
|
20627
|
-
}
|
|
20628
|
-
catch (error) {
|
|
20629
|
-
console.error('Error parsing menu items:', error);
|
|
20630
|
-
this.parsedItems = [];
|
|
20631
|
-
}
|
|
20632
|
-
}
|
|
20778
|
+
this.renderMenuItems = () => {
|
|
20779
|
+
return this.items.map(item => {
|
|
20780
|
+
var _a;
|
|
20781
|
+
if (item.hasSubmenu && ((_a = item.submenuItems) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
20782
|
+
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 })));
|
|
20783
|
+
}
|
|
20784
|
+
return (hAsync("nv-menuitem", { disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label }));
|
|
20785
|
+
});
|
|
20786
|
+
};
|
|
20633
20787
|
}
|
|
20634
20788
|
//#endregion PROPERTIES
|
|
20635
20789
|
/****************************************************************************/
|
|
@@ -20769,35 +20923,11 @@ class NvMenu {
|
|
|
20769
20923
|
this.triggerElement = Array.from(this.el.children).find(child => {
|
|
20770
20924
|
return child.getAttribute('slot') === 'trigger';
|
|
20771
20925
|
});
|
|
20772
|
-
// If the items attribute is provided, parse its value.
|
|
20773
|
-
if (this.items) {
|
|
20774
|
-
this.handleItemsChange(this.items);
|
|
20775
|
-
}
|
|
20776
|
-
}
|
|
20777
|
-
//#endregion LIFECYCLE
|
|
20778
|
-
/****************************************************************************/
|
|
20779
|
-
//#region RENDER
|
|
20780
|
-
/**
|
|
20781
|
-
* Generates menu items from the `items` property.
|
|
20782
|
-
* @param {MenuItem[]} items - The items to display in the menu.
|
|
20783
|
-
* @returns {HTMLElement[]} The rendered items.
|
|
20784
|
-
*/
|
|
20785
|
-
renderMenuItems(items) {
|
|
20786
|
-
return items.map(item => {
|
|
20787
|
-
var _a;
|
|
20788
|
-
if (item.hasSubmenu && ((_a = item.submenuItems) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
20789
|
-
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 })));
|
|
20790
|
-
}
|
|
20791
|
-
return (hAsync("nv-menuitem", { disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label }));
|
|
20792
|
-
});
|
|
20793
20926
|
}
|
|
20794
20927
|
render() {
|
|
20795
|
-
return (hAsync(Host, { key: '
|
|
20928
|
+
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" })))));
|
|
20796
20929
|
}
|
|
20797
20930
|
get el() { return getElement(this); }
|
|
20798
|
-
static get watchers() { return {
|
|
20799
|
-
"items": ["handleItemsChange"]
|
|
20800
|
-
}; }
|
|
20801
20931
|
static get style() { return NvMenuStyle0; }
|
|
20802
20932
|
static get cmpMeta() { return {
|
|
20803
20933
|
"$flags$": 4,
|
|
@@ -20807,14 +20937,13 @@ class NvMenu {
|
|
|
20807
20937
|
"nested": [516],
|
|
20808
20938
|
"disableCloseOnSelect": [516, "disable-close-on-select"],
|
|
20809
20939
|
"placement": [513],
|
|
20810
|
-
"items": [
|
|
20811
|
-
"parsedItems": [32],
|
|
20940
|
+
"items": [16],
|
|
20812
20941
|
"show": [64],
|
|
20813
20942
|
"close": [64]
|
|
20814
20943
|
},
|
|
20815
20944
|
"$listeners$": [[0, "menuitemSelected", "handleMenuItemSelect"], [0, "keydown", "handleKeydown"], [0, "openChanged", "handleOpenChanged"]],
|
|
20816
20945
|
"$lazyBundleId$": "-",
|
|
20817
|
-
"$attrsToReflect$": [["open", "open"], ["nested", "nested"], ["disableCloseOnSelect", "disable-close-on-select"], ["placement", "placement"]
|
|
20946
|
+
"$attrsToReflect$": [["open", "open"], ["nested", "nested"], ["disableCloseOnSelect", "disable-close-on-select"], ["placement", "placement"]]
|
|
20818
20947
|
}; }
|
|
20819
20948
|
}
|
|
20820
20949
|
|
|
@@ -20867,7 +20996,7 @@ class NvMenuitem {
|
|
|
20867
20996
|
/****************************************************************************/
|
|
20868
20997
|
//#region RENDER
|
|
20869
20998
|
render() {
|
|
20870
|
-
return (hAsync(Host, { key: '
|
|
20999
|
+
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" })));
|
|
20871
21000
|
}
|
|
20872
21001
|
get el() { return getElement(this); }
|
|
20873
21002
|
static get style() { return NvMenuitemStyle0; }
|
|
@@ -23252,7 +23381,7 @@ class NvPopover {
|
|
|
23252
23381
|
/****************************************************************************/
|
|
23253
23382
|
//#region RENDER
|
|
23254
23383
|
render() {
|
|
23255
|
-
return (hAsync(Host, { key: '
|
|
23384
|
+
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" }))));
|
|
23256
23385
|
}
|
|
23257
23386
|
get el() { return getElement(this); }
|
|
23258
23387
|
static get watchers() { return {
|
|
@@ -23297,7 +23426,7 @@ class NvRow {
|
|
|
23297
23426
|
/****************************************************************************/
|
|
23298
23427
|
//#region RENDER
|
|
23299
23428
|
render() {
|
|
23300
|
-
return (hAsync(Host, { key: '
|
|
23429
|
+
return (hAsync(Host, { key: '7daaa109808165553e69707c72550f284e087011' }, hAsync("slot", { key: 'a00fd8c81352b485d8508f9bd68af4dd81d959e1' })));
|
|
23301
23430
|
}
|
|
23302
23431
|
static get style() { return NvRowStyle0; }
|
|
23303
23432
|
static get cmpMeta() { return {
|
|
@@ -23332,7 +23461,7 @@ class NvStack {
|
|
|
23332
23461
|
/****************************************************************************/
|
|
23333
23462
|
//#region RENDER
|
|
23334
23463
|
render() {
|
|
23335
|
-
return (hAsync(Host, { key: '
|
|
23464
|
+
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' })));
|
|
23336
23465
|
}
|
|
23337
23466
|
static get style() { return NvStackStyle0; }
|
|
23338
23467
|
static get cmpMeta() { return {
|
|
@@ -23666,14 +23795,14 @@ class NvTable {
|
|
|
23666
23795
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
23667
23796
|
? []
|
|
23668
23797
|
: this.table.data;
|
|
23669
|
-
return (hAsync(Host, { key: '
|
|
23798
|
+
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 &&
|
|
23670
23799
|
headerGroups.map(col => {
|
|
23671
23800
|
return (hAsync("th", { key: col.name }, this.renderTemplate(this.headerTemplateCache.get(col.name), {}) || col.header));
|
|
23672
23801
|
})))), 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 => {
|
|
23673
23802
|
var _a;
|
|
23674
23803
|
return (hAsync("td", null, this.renderTemplate(this.templateCache.get(col.name), row) ||
|
|
23675
23804
|
((_a = row[col.name]) !== null && _a !== void 0 ? _a : this.fallbackValue)));
|
|
23676
|
-
})))))))), hAsync("slot", { key: '
|
|
23805
|
+
})))))))), hAsync("slot", { key: 'e0039c9af9506bc8f2ded8cc81bbd2667ee1f2c1', name: "after" })));
|
|
23677
23806
|
}
|
|
23678
23807
|
get el() { return getElement(this); }
|
|
23679
23808
|
static get watchers() { return {
|
|
@@ -23793,8 +23922,8 @@ class NvToggle {
|
|
|
23793
23922
|
/****************************************************************************/
|
|
23794
23923
|
//#region RENDER
|
|
23795
23924
|
render() {
|
|
23796
|
-
return (hAsync(Host, { key: '
|
|
23797
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
23925
|
+
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 ||
|
|
23926
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '2eeb41266ee52ef40c1600750084fda0fac8dc6f', class: "description" }, hAsync("slot", { key: '605541594fcc7f3192766a5395c5a81f42de7728', name: "description" }, this.description))))));
|
|
23798
23927
|
}
|
|
23799
23928
|
static get formAssociated() { return true; }
|
|
23800
23929
|
get el() { return getElement(this); }
|
|
@@ -23859,7 +23988,7 @@ class NvTooltip {
|
|
|
23859
23988
|
/****************************************************************************/
|
|
23860
23989
|
//#region RENDER
|
|
23861
23990
|
render() {
|
|
23862
|
-
return (hAsync(Host, { key: '
|
|
23991
|
+
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" }))));
|
|
23863
23992
|
}
|
|
23864
23993
|
get el() { return getElement(this); }
|
|
23865
23994
|
static get style() { return NvTooltipStyle0; }
|
|
@@ -23882,7 +24011,6 @@ registerComponents([
|
|
|
23882
24011
|
NvAlert,
|
|
23883
24012
|
NvAvatar,
|
|
23884
24013
|
NvBadge,
|
|
23885
|
-
NvBaseComponent,
|
|
23886
24014
|
NvBreadcrumb,
|
|
23887
24015
|
NvBreadcrumbs,
|
|
23888
24016
|
NvButton,
|