@nova-design-system/nova-webcomponents 3.5.0 → 3.6.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/{timeline.animation-dbb9c5ea.js → collapse.animation-a129dc3f.js} +5 -26
- package/dist/cjs/collapse.animation-a129dc3f.js.map +1 -0
- package/dist/cjs/fade.animation-644b5c4d.js +70 -0
- package/dist/cjs/fade.animation-644b5c4d.js.map +1 -0
- package/dist/cjs/{grow.animation-a1f0bc22.js → grow.animation-6d003803.js} +5 -5
- package/dist/cjs/{grow.animation-a1f0bc22.js.map → grow.animation-6d003803.js.map} +1 -1
- package/dist/cjs/index-c56424e5.js +8 -0
- package/dist/cjs/index.cjs.js +6 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-accordion-item.cjs.entry.js +181 -0
- package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-accordion.cjs.entry.js +194 -0
- package/dist/cjs/nv-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-alert.cjs.entry.js +6 -4
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +9 -7
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +59 -50
- 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 +2 -2
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +19 -6
- package/dist/cjs/nv-dialog.cjs.entry.js.map +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 +100 -35
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +4 -4
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +3 -3
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +85 -100
- 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-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-fieldslider.cjs.entry.js +53 -9
- package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtime.cjs.entry.js +9 -9
- package/dist/cjs/nv-icon.cjs.entry.js +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +4 -3
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +3 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/{fade.animation-0d33d198.js → stylefire.es-717e022a.js} +1 -65
- package/dist/cjs/stylefire.es-717e022a.js.map +1 -0
- package/dist/cjs/timeline.animation-155e8839.js +25 -0
- package/dist/cjs/timeline.animation-155e8839.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js +146 -0
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js.map +1 -0
- package/dist/collection/components/nv-accordion/nv-accordion.js +342 -0
- package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -0
- package/dist/collection/components/nv-accordion/styles/nv-accordion.css +15 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.docs.js +6 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.docs.js.map +1 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +353 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -0
- package/dist/collection/components/nv-accordion-item/styles/nv-accordion-item.css +66 -0
- package/dist/collection/components/nv-alert/nv-alert.js +1 -1
- package/dist/collection/components/nv-avatar/nv-avatar.js +1 -1
- package/dist/collection/components/nv-badge/nv-badge.js +2 -2
- package/dist/collection/components/nv-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.css +5 -0
- package/dist/collection/components/nv-calendar/nv-calendar.js +55 -27
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js +0 -20
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js +3 -2
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -1
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +5 -31
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -1
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +2 -2
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.css +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +38 -5
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +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 +102 -34
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +2 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +4 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +3 -3
- 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 +36 -26
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +117 -115
- 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-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-fieldslider/nv-fieldslider.js +3 -3
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js +45 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/partials/range-thumb.js +4 -4
- package/dist/collection/components/nv-fieldslider/partials/range-thumb.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/partials/single-thumb.js +3 -3
- package/dist/collection/components/nv-fieldslider/partials/single-thumb.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js +42 -1
- package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +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.js +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 +21 -3
- package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -1
- package/dist/components/index.js +4 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.d.ts +11 -0
- package/dist/components/nv-accordion-item.js +8 -0
- package/dist/components/nv-accordion-item.js.map +1 -0
- package/dist/components/nv-accordion.d.ts +11 -0
- package/dist/components/nv-accordion.js +242 -0
- package/dist/components/nv-accordion.js.map +1 -0
- package/dist/components/nv-alert.js +6 -4
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +2 -2
- 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 +4 -4
- package/dist/components/nv-datagridcolumn.js +1 -1
- package/dist/components/nv-dialog.js +25 -11
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +107 -41
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +10 -10
- package/dist/components/nv-fielddropdown.js +8 -8
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +94 -110
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +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-fieldslider.js +57 -13
- package/dist/components/nv-fieldslider.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- 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 +4 -4
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-1daca48a.js → p-09cdd71f.js} +2 -65
- package/dist/components/p-09cdd71f.js.map +1 -0
- package/dist/components/p-15aeab4d.js +23 -0
- package/dist/components/p-15aeab4d.js.map +1 -0
- package/dist/components/{p-44f0039b.js → p-190c8f60.js} +3 -3
- package/dist/components/{p-44f0039b.js.map → p-190c8f60.js.map} +1 -1
- package/dist/components/p-1cbacdba.js +68 -0
- package/dist/components/p-1cbacdba.js.map +1 -0
- package/dist/components/p-230ad6c5.js +223 -0
- package/dist/components/p-230ad6c5.js.map +1 -0
- package/dist/components/{p-05c19c9a.js → p-316ae8e3.js} +4 -4
- package/dist/components/{p-05c19c9a.js.map → p-316ae8e3.js.map} +1 -1
- package/dist/components/{p-00ac701f.js → p-4069966e.js} +8 -6
- package/dist/components/p-4069966e.js.map +1 -0
- package/dist/components/{p-5bee0141.js → p-436a0f99.js} +6 -5
- package/dist/components/p-436a0f99.js.map +1 -0
- package/dist/components/{p-918bb719.js → p-4864a690.js} +2 -2
- package/dist/components/{p-918bb719.js.map → p-4864a690.js.map} +1 -1
- package/dist/components/{p-4badc1d2.js → p-5e89eb9d.js} +7 -7
- package/dist/components/{p-4badc1d2.js.map → p-5e89eb9d.js.map} +1 -1
- package/dist/components/{p-001c888b.js → p-618ae85a.js} +5 -4
- package/dist/components/p-618ae85a.js.map +1 -0
- package/dist/components/{p-d56b30ab.js → p-79b38dfb.js} +3 -3
- package/dist/components/{p-d56b30ab.js.map → p-79b38dfb.js.map} +1 -1
- package/dist/components/{p-a0d7e0cd.js → p-840858ed.js} +60 -51
- package/dist/components/p-840858ed.js.map +1 -0
- package/dist/components/{p-cebdbb40.js → p-8a5b0f74.js} +3 -3
- package/dist/components/{p-cebdbb40.js.map → p-8a5b0f74.js.map} +1 -1
- package/dist/components/{p-c1765831.js → p-8d45dbfe.js} +2 -2
- package/dist/components/{p-c1765831.js.map → p-8d45dbfe.js.map} +1 -1
- package/dist/components/{p-42301d8f.js → p-9a263d0e.js} +3 -23
- package/dist/components/p-9a263d0e.js.map +1 -0
- package/dist/components/{p-9f1e8ef3.js → p-9cff2fd1.js} +2 -2
- package/dist/components/{p-9f1e8ef3.js.map → p-9cff2fd1.js.map} +1 -1
- package/dist/components/{p-9e6e26cb.js → p-9ed7a440.js} +5 -5
- package/dist/components/{p-9e6e26cb.js.map → p-9ed7a440.js.map} +1 -1
- package/dist/components/{p-970cd9b1.js → p-ac76a11c.js} +5 -5
- package/dist/components/{p-970cd9b1.js.map → p-ac76a11c.js.map} +1 -1
- package/dist/components/{p-6277f746.js → p-ca130ad2.js} +2 -2
- package/dist/components/{p-6277f746.js.map → p-ca130ad2.js.map} +1 -1
- package/dist/components/{p-e8c083e3.js → p-d2b4441a.js} +3 -3
- package/dist/components/{p-e8c083e3.js.map → p-d2b4441a.js.map} +1 -1
- package/dist/components/{p-e072f051.js → p-f1bbb9e8.js} +2 -2
- package/dist/components/{p-e072f051.js.map → p-f1bbb9e8.js.map} +1 -1
- package/dist/components/{p-919b5237.js → p-f266b533.js} +5 -5
- package/dist/components/{p-919b5237.js.map → p-f266b533.js.map} +1 -1
- package/dist/esm/{timeline.animation-1b88f052.js → collapse.animation-16e3af45.js} +3 -23
- package/dist/esm/collapse.animation-16e3af45.js.map +1 -0
- package/dist/esm/fade.animation-71e8e34c.js +68 -0
- package/dist/esm/fade.animation-71e8e34c.js.map +1 -0
- package/dist/esm/{grow.animation-cac164da.js → grow.animation-f7b26024.js} +2 -2
- package/dist/esm/{grow.animation-cac164da.js.map → grow.animation-f7b26024.js.map} +1 -1
- package/dist/esm/index-a1936cd0.js +8 -0
- package/dist/esm/index.js +5 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-accordion-item.entry.js +177 -0
- package/dist/esm/nv-accordion-item.entry.js.map +1 -0
- package/dist/esm/nv-accordion.entry.js +190 -0
- package/dist/esm/nv-accordion.entry.js.map +1 -0
- package/dist/esm/nv-alert.entry.js +5 -3
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +7 -5
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +59 -50
- 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 +2 -2
- package/dist/esm/nv-datagridcolumn.entry.js +1 -1
- package/dist/esm/nv-dialog.entry.js +19 -6
- package/dist/esm/nv-dialog.entry.js.map +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 +100 -35
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +4 -4
- package/dist/esm/nv-fielddropdown.entry.js +3 -3
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +85 -100
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldpassword.entry.js +3 -3
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldslider.entry.js +53 -9
- package/dist/esm/nv-fieldslider.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js +9 -9
- package/dist/esm/nv-icon.entry.js +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +4 -3
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +4 -3
- package/dist/esm/nv-tooltip.entry.js.map +1 -1
- package/dist/esm/{fade.animation-2a077983.js → stylefire.es-74da334a.js} +2 -65
- package/dist/esm/stylefire.es-74da334a.js.map +1 -0
- package/dist/esm/timeline.animation-adf35ecb.js +23 -0
- package/dist/esm/timeline.animation-adf35ecb.js.map +1 -0
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-a0505695.entry.js → p-08452012.entry.js} +2 -2
- package/dist/native/p-09cdd71f.js +16 -0
- package/dist/native/p-09cdd71f.js.map +1 -0
- package/dist/native/p-0ac03708.entry.js +2 -0
- package/dist/native/p-0ac03708.entry.js.map +1 -0
- package/dist/native/p-0ada0382.entry.js +2 -0
- package/dist/native/p-0ada0382.entry.js.map +1 -0
- package/dist/native/p-1235c007.entry.js +2 -0
- package/dist/native/p-12963ae4.entry.js +2 -0
- package/dist/native/p-12963ae4.entry.js.map +1 -0
- package/dist/native/p-15aeab4d.js +2 -0
- package/dist/native/p-15aeab4d.js.map +1 -0
- package/dist/native/{p-b5b9190a.entry.js → p-18831490.entry.js} +2 -2
- package/dist/native/{p-1d98477d.entry.js → p-1ad1bff9.entry.js} +2 -2
- package/dist/native/p-1cbacdba.js +2 -0
- package/dist/native/p-1cbacdba.js.map +1 -0
- package/dist/native/p-1cce9b24.entry.js +2 -0
- package/dist/native/p-1cce9b24.entry.js.map +1 -0
- package/dist/native/{p-914da1e1.entry.js → p-1f932a4b.entry.js} +2 -2
- package/dist/native/{p-6ea1c78b.entry.js → p-2576c1a0.entry.js} +2 -2
- package/dist/native/{p-19f484a0.entry.js → p-2d23fcea.entry.js} +2 -2
- package/dist/native/{p-e9962dac.entry.js → p-31e72603.entry.js} +2 -2
- package/dist/native/p-33e5037d.entry.js +2 -0
- package/dist/native/{p-b9c7b644.entry.js → p-4cf00884.entry.js} +2 -2
- package/dist/native/p-5172f17a.entry.js +2 -0
- package/dist/native/{p-08ca678c.entry.js → p-51a57a3a.entry.js} +2 -2
- package/dist/native/p-5eca22c7.entry.js +2 -0
- package/dist/native/{p-82568ec7.entry.js.map → p-5eca22c7.entry.js.map} +1 -1
- package/dist/native/{p-dd6b1d79.entry.js → p-609b3822.entry.js} +2 -2
- package/dist/native/{p-e293b3fe.entry.js → p-625be06b.entry.js} +2 -2
- package/dist/native/{p-a983e6a0.entry.js → p-8030c16b.entry.js} +2 -2
- package/dist/native/{p-6029e51b.entry.js → p-85a54ef2.entry.js} +2 -2
- package/dist/native/p-8d45dbfe.js +2 -0
- package/dist/native/p-9a263d0e.js +2 -0
- package/dist/native/p-9a263d0e.js.map +1 -0
- package/dist/native/{p-1a5d3b87.entry.js → p-9dc1c3e7.entry.js} +2 -2
- package/dist/native/p-a36dc25a.entry.js +2 -0
- package/dist/native/{p-ad128108.entry.js.map → p-a36dc25a.entry.js.map} +1 -1
- package/dist/native/p-a6dc9b59.entry.js +2 -0
- package/dist/native/p-a6dc9b59.entry.js.map +1 -0
- package/dist/native/{p-003b6377.entry.js → p-b829383a.entry.js} +2 -2
- package/dist/native/{p-af1e6035.entry.js → p-bab6d0a5.entry.js} +2 -2
- package/dist/native/p-baddee4c.entry.js +7 -0
- package/dist/native/p-baddee4c.entry.js.map +1 -0
- package/dist/native/p-be67545e.entry.js +2 -0
- package/dist/native/p-be67545e.entry.js.map +1 -0
- package/dist/native/{p-dd256ea3.entry.js → p-c2826f22.entry.js} +2 -2
- package/dist/native/p-c9cde996.entry.js +2 -0
- package/dist/native/{p-d4bf2587.entry.js.map → p-c9cde996.entry.js.map} +1 -1
- package/dist/native/{p-54198779.entry.js → p-cf468c67.entry.js} +2 -2
- package/dist/native/{p-a5c72bd3.entry.js → p-ddb0b9f6.entry.js} +2 -2
- package/dist/native/{p-2d98d4f0.entry.js → p-e19a8885.entry.js} +2 -2
- package/dist/native/{p-1e0df2d3.entry.js → p-e802fbb8.entry.js} +2 -2
- package/dist/native/p-ec92ee7a.entry.js +2 -0
- package/dist/native/{p-5b06f4b5.entry.js → p-f9aa4900.entry.js} +2 -2
- package/dist/native/{p-be9aeed4.entry.js → p-fca3e27d.entry.js} +2 -2
- package/dist/native/p-fe4e516b.entry.js +2 -0
- package/dist/native/p-fe4e516b.entry.js.map +1 -0
- package/dist/types/components/nv-accordion/nv-accordion.d.ts +115 -0
- package/dist/types/components/nv-accordion/nv-accordion.docs.d.ts +4 -0
- package/dist/types/components/nv-accordion-item/nv-accordion-item.d.ts +79 -0
- package/dist/types/components/nv-accordion-item/nv-accordion-item.docs.d.ts +4 -0
- package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +4 -2
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +7 -0
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +22 -2
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +13 -16
- package/dist/types/components/nv-fieldslider/nv-fieldslider.utils.d.ts +13 -0
- package/dist/types/components/nv-fieldslider/partials/range-thumb.d.ts +2 -0
- package/dist/types/components/nv-fieldslider/partials/single-thumb.d.ts +2 -0
- package/dist/types/components/nv-tooltip/nv-tooltip.d.ts +7 -0
- package/dist/types/components.d.ts +241 -10
- package/dist/vscode-data.json +75 -5
- package/hydrate/index.js +1113 -592
- package/hydrate/index.mjs +1113 -592
- package/package.json +1 -1
- package/dist/cjs/fade.animation-0d33d198.js.map +0 -1
- package/dist/cjs/timeline.animation-dbb9c5ea.js.map +0 -1
- package/dist/components/p-001c888b.js.map +0 -1
- package/dist/components/p-00ac701f.js.map +0 -1
- package/dist/components/p-1daca48a.js.map +0 -1
- package/dist/components/p-42301d8f.js.map +0 -1
- package/dist/components/p-5bee0141.js.map +0 -1
- package/dist/components/p-a0d7e0cd.js.map +0 -1
- package/dist/esm/fade.animation-2a077983.js.map +0 -1
- package/dist/esm/timeline.animation-1b88f052.js.map +0 -1
- package/dist/native/p-0493c51a.entry.js +0 -2
- package/dist/native/p-1daca48a.js +0 -16
- package/dist/native/p-1daca48a.js.map +0 -1
- package/dist/native/p-42301d8f.js +0 -2
- package/dist/native/p-42301d8f.js.map +0 -1
- package/dist/native/p-45cbe6e4.entry.js +0 -2
- package/dist/native/p-46428304.entry.js +0 -2
- package/dist/native/p-46428304.entry.js.map +0 -1
- package/dist/native/p-58f4dc0e.entry.js +0 -2
- package/dist/native/p-58f4dc0e.entry.js.map +0 -1
- package/dist/native/p-59b07b36.entry.js +0 -2
- package/dist/native/p-59b07b36.entry.js.map +0 -1
- package/dist/native/p-82568ec7.entry.js +0 -2
- package/dist/native/p-82c4bf56.entry.js +0 -2
- package/dist/native/p-82c4bf56.entry.js.map +0 -1
- package/dist/native/p-86ab23ea.entry.js +0 -2
- package/dist/native/p-ad128108.entry.js +0 -2
- package/dist/native/p-bee972c7.entry.js +0 -2
- package/dist/native/p-c1765831.js +0 -2
- package/dist/native/p-d21b2da2.entry.js +0 -7
- package/dist/native/p-d21b2da2.entry.js.map +0 -1
- package/dist/native/p-d4bf2587.entry.js +0 -2
- package/dist/native/p-eaf51f2c.entry.js +0 -2
- package/dist/native/p-eaf51f2c.entry.js.map +0 -1
- /package/dist/native/{p-a0505695.entry.js.map → p-08452012.entry.js.map} +0 -0
- /package/dist/native/{p-86ab23ea.entry.js.map → p-1235c007.entry.js.map} +0 -0
- /package/dist/native/{p-b5b9190a.entry.js.map → p-18831490.entry.js.map} +0 -0
- /package/dist/native/{p-1d98477d.entry.js.map → p-1ad1bff9.entry.js.map} +0 -0
- /package/dist/native/{p-914da1e1.entry.js.map → p-1f932a4b.entry.js.map} +0 -0
- /package/dist/native/{p-6ea1c78b.entry.js.map → p-2576c1a0.entry.js.map} +0 -0
- /package/dist/native/{p-19f484a0.entry.js.map → p-2d23fcea.entry.js.map} +0 -0
- /package/dist/native/{p-e9962dac.entry.js.map → p-31e72603.entry.js.map} +0 -0
- /package/dist/native/{p-0493c51a.entry.js.map → p-33e5037d.entry.js.map} +0 -0
- /package/dist/native/{p-b9c7b644.entry.js.map → p-4cf00884.entry.js.map} +0 -0
- /package/dist/native/{p-bee972c7.entry.js.map → p-5172f17a.entry.js.map} +0 -0
- /package/dist/native/{p-08ca678c.entry.js.map → p-51a57a3a.entry.js.map} +0 -0
- /package/dist/native/{p-dd6b1d79.entry.js.map → p-609b3822.entry.js.map} +0 -0
- /package/dist/native/{p-e293b3fe.entry.js.map → p-625be06b.entry.js.map} +0 -0
- /package/dist/native/{p-a983e6a0.entry.js.map → p-8030c16b.entry.js.map} +0 -0
- /package/dist/native/{p-6029e51b.entry.js.map → p-85a54ef2.entry.js.map} +0 -0
- /package/dist/native/{p-c1765831.js.map → p-8d45dbfe.js.map} +0 -0
- /package/dist/native/{p-1a5d3b87.entry.js.map → p-9dc1c3e7.entry.js.map} +0 -0
- /package/dist/native/{p-003b6377.entry.js.map → p-b829383a.entry.js.map} +0 -0
- /package/dist/native/{p-af1e6035.entry.js.map → p-bab6d0a5.entry.js.map} +0 -0
- /package/dist/native/{p-dd256ea3.entry.js.map → p-c2826f22.entry.js.map} +0 -0
- /package/dist/native/{p-54198779.entry.js.map → p-cf468c67.entry.js.map} +0 -0
- /package/dist/native/{p-a5c72bd3.entry.js.map → p-ddb0b9f6.entry.js.map} +0 -0
- /package/dist/native/{p-2d98d4f0.entry.js.map → p-e19a8885.entry.js.map} +0 -0
- /package/dist/native/{p-1e0df2d3.entry.js.map → p-e802fbb8.entry.js.map} +0 -0
- /package/dist/native/{p-45cbe6e4.entry.js.map → p-ec92ee7a.entry.js.map} +0 -0
- /package/dist/native/{p-5b06f4b5.entry.js.map → p-f9aa4900.entry.js.map} +0 -0
- /package/dist/native/{p-be9aeed4.entry.js.map → p-fca3e27d.entry.js.map} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -2725,263 +2725,209 @@ var registerHost = (elm, cmpMeta) => {
|
|
|
2725
2725
|
};
|
|
2726
2726
|
var styles = /* @__PURE__ */ new Map();
|
|
2727
2727
|
|
|
2728
|
-
|
|
2728
|
+
const nvAccordionCss = "nv-accordion{display:block;border:var(--spacing-px) solid var(--color-content-low-border);border-radius:var(--radius-rounded-lg)}nv-accordion .nv-accordion__footer{padding:var(--spacing-3);background:var(--color-level-05-background);border-radius:0 0 var(--radius-rounded-lg) var(--radius-rounded-lg);margin-top:calc(var(--spacing-px) * -1);border-top:var(--spacing-px) solid var(--color-content-low-border)}nv-accordion .nv-accordion__footer:empty{display:none}";
|
|
2729
|
+
var NvAccordionStyle0 = nvAccordionCss;
|
|
2729
2730
|
|
|
2730
|
-
|
|
2731
|
-
(
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
}
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
(
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
(
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
}
|
|
2789
|
-
|
|
2790
|
-
(
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
}
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
}
|
|
2862
|
-
|
|
2863
|
-
(
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
}
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
'
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
'Feb',
|
|
2931
|
-
'Mär',
|
|
2932
|
-
'Apr',
|
|
2933
|
-
'Mai',
|
|
2934
|
-
'Jun',
|
|
2935
|
-
'Jul',
|
|
2936
|
-
'Aug',
|
|
2937
|
-
'Sep',
|
|
2938
|
-
'Okt',
|
|
2939
|
-
'Nov',
|
|
2940
|
-
'Dez',
|
|
2941
|
-
],
|
|
2942
|
-
'en-BE': [
|
|
2943
|
-
'Jan',
|
|
2944
|
-
'Feb',
|
|
2945
|
-
'Mar',
|
|
2946
|
-
'Apr',
|
|
2947
|
-
'May',
|
|
2948
|
-
'Jun',
|
|
2949
|
-
'Jul',
|
|
2950
|
-
'Aug',
|
|
2951
|
-
'Sep',
|
|
2952
|
-
'Oct',
|
|
2953
|
-
'Nov',
|
|
2954
|
-
'Dec',
|
|
2955
|
-
],
|
|
2956
|
-
'en-US': [
|
|
2957
|
-
'Jan',
|
|
2958
|
-
'Feb',
|
|
2959
|
-
'Mar',
|
|
2960
|
-
'Apr',
|
|
2961
|
-
'May',
|
|
2962
|
-
'Jun',
|
|
2963
|
-
'Jul',
|
|
2964
|
-
'Aug',
|
|
2965
|
-
'Sep',
|
|
2966
|
-
'Oct',
|
|
2967
|
-
'Nov',
|
|
2968
|
-
'Dec',
|
|
2969
|
-
],
|
|
2970
|
-
'en-GB': [
|
|
2971
|
-
'Jan',
|
|
2972
|
-
'Feb',
|
|
2973
|
-
'Mar',
|
|
2974
|
-
'Apr',
|
|
2975
|
-
'May',
|
|
2976
|
-
'Jun',
|
|
2977
|
-
'Jul',
|
|
2978
|
-
'Aug',
|
|
2979
|
-
'Sep',
|
|
2980
|
-
'Oct',
|
|
2981
|
-
'Nov',
|
|
2982
|
-
'Dec',
|
|
2983
|
-
],
|
|
2984
|
-
};
|
|
2731
|
+
/**
|
|
2732
|
+
* @slot default - Slot for custom content (optional, ignored if data is provided)
|
|
2733
|
+
*/
|
|
2734
|
+
class NvAccordion {
|
|
2735
|
+
constructor(hostRef) {
|
|
2736
|
+
registerInstance(this, hostRef);
|
|
2737
|
+
this.nvChange = createEvent(this, "nvChange", 7);
|
|
2738
|
+
/**
|
|
2739
|
+
* Expansion mode: 'accordion' (single open) or 'multi' (multiple open)
|
|
2740
|
+
*/
|
|
2741
|
+
this.mode = 'accordion';
|
|
2742
|
+
//#endregion PROPERTIES
|
|
2743
|
+
/****************************************************************************/
|
|
2744
|
+
//#region STATE
|
|
2745
|
+
/**
|
|
2746
|
+
* Internal index of open items (not exposed)
|
|
2747
|
+
*/
|
|
2748
|
+
this.internalOpenIndexes = [];
|
|
2749
|
+
/**
|
|
2750
|
+
* Parsed data from data prop
|
|
2751
|
+
*/
|
|
2752
|
+
this.parsedData = [];
|
|
2753
|
+
// Synchronization openIndexes <-> internalOpenIndexes
|
|
2754
|
+
this.itemToggleHandlers = [];
|
|
2755
|
+
}
|
|
2756
|
+
//#endregion EVENTS
|
|
2757
|
+
/****************************************************************************/
|
|
2758
|
+
//#region METHODS
|
|
2759
|
+
/**
|
|
2760
|
+
* Opens an item by its index (Public API)
|
|
2761
|
+
* @param {number} index Index of the item to open
|
|
2762
|
+
*/
|
|
2763
|
+
async open(index) {
|
|
2764
|
+
this.toggleItem(index, true);
|
|
2765
|
+
}
|
|
2766
|
+
/**
|
|
2767
|
+
* Closes an item by its index (Public API)
|
|
2768
|
+
* @param {number} index Index of the item to close
|
|
2769
|
+
*/
|
|
2770
|
+
async close(index) {
|
|
2771
|
+
this.toggleItem(index, false);
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* Toggles an item's state (internal)
|
|
2775
|
+
* @param {number} index Item index
|
|
2776
|
+
* @param {boolean} [forceOpen] Force open (true) or close (false)
|
|
2777
|
+
*/
|
|
2778
|
+
toggleItem(index, forceOpen) {
|
|
2779
|
+
let openIndexes = this.openIndexes !== undefined
|
|
2780
|
+
? [...this.openIndexes]
|
|
2781
|
+
: [...(this.internalOpenIndexes || [])];
|
|
2782
|
+
const isOpen = openIndexes.includes(index);
|
|
2783
|
+
if (this.mode === 'accordion') {
|
|
2784
|
+
openIndexes = forceOpen === false || isOpen ? [] : [index];
|
|
2785
|
+
}
|
|
2786
|
+
else {
|
|
2787
|
+
if (forceOpen === false) {
|
|
2788
|
+
openIndexes = openIndexes.filter(i => i !== index);
|
|
2789
|
+
}
|
|
2790
|
+
else if (!isOpen) {
|
|
2791
|
+
openIndexes.push(index);
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
this.internalOpenIndexes = openIndexes;
|
|
2795
|
+
this.nvChange.emit({ openIndexes });
|
|
2796
|
+
if (this.openIndexes !== undefined) {
|
|
2797
|
+
this.openIndexes =
|
|
2798
|
+
this.mode === 'accordion'
|
|
2799
|
+
? [openIndexes[0]].filter(x => x !== undefined)
|
|
2800
|
+
: [...openIndexes];
|
|
2801
|
+
}
|
|
2802
|
+
// Update child elements state - for both data and slot usage
|
|
2803
|
+
this.updateChildrenState();
|
|
2804
|
+
}
|
|
2805
|
+
/**
|
|
2806
|
+
* Updates the open state of child elements based on internalOpenIndexes
|
|
2807
|
+
*/
|
|
2808
|
+
async updateChildrenState() {
|
|
2809
|
+
// Force a re-render by updating the state
|
|
2810
|
+
this.internalOpenIndexes = [...(this.internalOpenIndexes || [])];
|
|
2811
|
+
}
|
|
2812
|
+
/**
|
|
2813
|
+
* Listens to itemToggle events from nv-accordion-item elements
|
|
2814
|
+
* @param {CustomEvent<boolean>} event Event emitted by nv-accordion-item
|
|
2815
|
+
*/
|
|
2816
|
+
onItemToggle(event) {
|
|
2817
|
+
// Ignore if using data (handled by itemToggleHandlers)
|
|
2818
|
+
if (this.parsedData && this.parsedData.length > 0)
|
|
2819
|
+
return;
|
|
2820
|
+
// Find the index of the item that emitted the event
|
|
2821
|
+
const items = Array.from(this.el.querySelectorAll('nv-accordion-item'));
|
|
2822
|
+
const targetItem = event.target;
|
|
2823
|
+
const index = items.indexOf(targetItem);
|
|
2824
|
+
if (index !== -1) {
|
|
2825
|
+
// If the event comes from an item that is opening, handle accordion mode
|
|
2826
|
+
if (event.detail === true) {
|
|
2827
|
+
if (this.mode === 'accordion') {
|
|
2828
|
+
// Close all other items
|
|
2829
|
+
items.forEach((item, i) => {
|
|
2830
|
+
if (i !== index && item.open) {
|
|
2831
|
+
item.open = false;
|
|
2832
|
+
}
|
|
2833
|
+
});
|
|
2834
|
+
this.internalOpenIndexes = [index];
|
|
2835
|
+
}
|
|
2836
|
+
else {
|
|
2837
|
+
// Add index to internalOpenIndexes if not already present
|
|
2838
|
+
if (!this.internalOpenIndexes.includes(index)) {
|
|
2839
|
+
this.internalOpenIndexes = [...this.internalOpenIndexes, index];
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
}
|
|
2843
|
+
else {
|
|
2844
|
+
// If the item is closing, remove it from internalOpenIndexes
|
|
2845
|
+
this.internalOpenIndexes = this.internalOpenIndexes.filter(i => i !== index);
|
|
2846
|
+
}
|
|
2847
|
+
// Emit nvChange event
|
|
2848
|
+
this.nvChange.emit({ openIndexes: this.internalOpenIndexes });
|
|
2849
|
+
if (this.openIndexes !== undefined) {
|
|
2850
|
+
this.openIndexes =
|
|
2851
|
+
this.mode === 'accordion'
|
|
2852
|
+
? [this.internalOpenIndexes[0]].filter(x => x !== undefined)
|
|
2853
|
+
: [...this.internalOpenIndexes];
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2857
|
+
//#endregion METHODS
|
|
2858
|
+
/****************************************************************************/
|
|
2859
|
+
//#region WATCHERS
|
|
2860
|
+
dataChanged() {
|
|
2861
|
+
this.parseData();
|
|
2862
|
+
}
|
|
2863
|
+
parseData() {
|
|
2864
|
+
if (typeof this.data === 'string') {
|
|
2865
|
+
try {
|
|
2866
|
+
this.parsedData = JSON.parse(this.data);
|
|
2867
|
+
}
|
|
2868
|
+
catch (e) {
|
|
2869
|
+
console.error('nv-accordion: Failed to parse data prop.', e);
|
|
2870
|
+
this.parsedData = [];
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
else {
|
|
2874
|
+
this.parsedData = this.data || [];
|
|
2875
|
+
}
|
|
2876
|
+
if (this.parsedData) {
|
|
2877
|
+
this.itemToggleHandlers = this.parsedData.map((_, i) => () => this.toggleItem(i));
|
|
2878
|
+
}
|
|
2879
|
+
}
|
|
2880
|
+
componentWillLoad() {
|
|
2881
|
+
this.parseData();
|
|
2882
|
+
if (this.openIndexes !== undefined) {
|
|
2883
|
+
this.internalOpenIndexes = [...this.openIndexes];
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
componentDidLoad() {
|
|
2887
|
+
// If using direct child elements, initialize their state
|
|
2888
|
+
if (!this.parsedData || this.parsedData.length === 0) {
|
|
2889
|
+
this.updateChildrenState();
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2892
|
+
componentWillUpdate() {
|
|
2893
|
+
if (this.openIndexes !== undefined) {
|
|
2894
|
+
this.internalOpenIndexes = [...this.openIndexes];
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
//#endregion WATCHERS
|
|
2898
|
+
/****************************************************************************/
|
|
2899
|
+
//#region LIFECYCLE
|
|
2900
|
+
//#endregion LIFECYCLE
|
|
2901
|
+
/****************************************************************************/
|
|
2902
|
+
//#region RENDER
|
|
2903
|
+
render() {
|
|
2904
|
+
return (hAsync(Host, { key: '5dcc9ea52a404dff7c4bb176b8a9781019e64bd3', role: "list", class: "nv-accordion" }, this.parsedData && this.parsedData.length > 0 ? (this.parsedData.map((item, i) => {
|
|
2905
|
+
var _a;
|
|
2906
|
+
return (hAsync("nv-accordion-item", { key: (_a = item.id) !== null && _a !== void 0 ? _a : i, itemtitle: item.title, disabled: item.disabled, open: (this.internalOpenIndexes || []).includes(i), onItemToggle: this.itemToggleHandlers[i] }, item.subtitle ? (hAsync("div", { slot: "header" }, hAsync("div", { class: "nv-accordion-item__header-content" }, hAsync("span", { class: "nv-accordion-item__title" }, item.title), hAsync("span", { class: "nv-accordion-item__subtitle" }, item.subtitle)))) : null, hAsync("div", { slot: "content" }, item.content), item.footer && hAsync("div", { slot: "footer" }, item.footer)));
|
|
2907
|
+
})) : (hAsync("slot", null))));
|
|
2908
|
+
}
|
|
2909
|
+
get el() { return getElement(this); }
|
|
2910
|
+
static get watchers() { return {
|
|
2911
|
+
"data": ["dataChanged"]
|
|
2912
|
+
}; }
|
|
2913
|
+
static get style() { return NvAccordionStyle0; }
|
|
2914
|
+
static get cmpMeta() { return {
|
|
2915
|
+
"$flags$": 4,
|
|
2916
|
+
"$tagName$": "nv-accordion",
|
|
2917
|
+
"$members$": {
|
|
2918
|
+
"data": [513],
|
|
2919
|
+
"mode": [513],
|
|
2920
|
+
"openIndexes": [1040],
|
|
2921
|
+
"internalOpenIndexes": [32],
|
|
2922
|
+
"parsedData": [32],
|
|
2923
|
+
"open": [64],
|
|
2924
|
+
"close": [64]
|
|
2925
|
+
},
|
|
2926
|
+
"$listeners$": [[0, "itemToggle", "onItemToggle"]],
|
|
2927
|
+
"$lazyBundleId$": "-",
|
|
2928
|
+
"$attrsToReflect$": [["data", "data"], ["mode", "mode"]]
|
|
2929
|
+
}; }
|
|
2930
|
+
}
|
|
2985
2931
|
|
|
2986
2932
|
/******************************************************************************
|
|
2987
2933
|
Copyright (c) Microsoft Corporation.
|
|
@@ -4961,79 +4907,532 @@ const useGrow = (node, { duration = 200, amount = 0.8, hasFade = true } = {}) =>
|
|
|
4961
4907
|
});
|
|
4962
4908
|
});
|
|
4963
4909
|
}
|
|
4964
|
-
/**
|
|
4965
|
-
* Applies the growOut styles without animating, useful when the initial
|
|
4966
|
-
* state is hidden.
|
|
4967
|
-
*/
|
|
4968
|
-
function setGrowOut() {
|
|
4969
|
-
node.style.transform = `scale(${amount})`;
|
|
4970
|
-
if (hasFade) {
|
|
4971
|
-
node.style.opacity = '0';
|
|
4910
|
+
/**
|
|
4911
|
+
* Applies the growOut styles without animating, useful when the initial
|
|
4912
|
+
* state is hidden.
|
|
4913
|
+
*/
|
|
4914
|
+
function setGrowOut() {
|
|
4915
|
+
node.style.transform = `scale(${amount})`;
|
|
4916
|
+
if (hasFade) {
|
|
4917
|
+
node.style.opacity = '0';
|
|
4918
|
+
}
|
|
4919
|
+
}
|
|
4920
|
+
/**
|
|
4921
|
+
* Applies the growIn styles without animating, useful when the initial
|
|
4922
|
+
* state is visible.
|
|
4923
|
+
*/
|
|
4924
|
+
function setGrowIn() {
|
|
4925
|
+
node.style.transform = `scale(1)`;
|
|
4926
|
+
if (hasFade) {
|
|
4927
|
+
node.style.opacity = '1';
|
|
4928
|
+
}
|
|
4929
|
+
}
|
|
4930
|
+
/**
|
|
4931
|
+
* Will animate the scale and optionally the opacity to make the element shrink and fade out,
|
|
4932
|
+
* leaving the scale and opacity styles on the element.
|
|
4933
|
+
*/
|
|
4934
|
+
function growOut() {
|
|
4935
|
+
return new Promise(resolve => {
|
|
4936
|
+
animate({
|
|
4937
|
+
from: { opacity: 1, scale: 1 },
|
|
4938
|
+
to: { opacity: hasFade ? 0 : 1, scale: amount },
|
|
4939
|
+
duration,
|
|
4940
|
+
onUpdate(latest) {
|
|
4941
|
+
const updates = {
|
|
4942
|
+
scale: latest.scale,
|
|
4943
|
+
};
|
|
4944
|
+
if (hasFade) {
|
|
4945
|
+
updates['opacity'] = latest.opacity;
|
|
4946
|
+
}
|
|
4947
|
+
nodeStyler.set(updates);
|
|
4948
|
+
},
|
|
4949
|
+
onComplete() {
|
|
4950
|
+
resolve();
|
|
4951
|
+
},
|
|
4952
|
+
});
|
|
4953
|
+
});
|
|
4954
|
+
}
|
|
4955
|
+
return {
|
|
4956
|
+
growIn,
|
|
4957
|
+
growOut,
|
|
4958
|
+
setGrowOut,
|
|
4959
|
+
setGrowIn,
|
|
4960
|
+
};
|
|
4961
|
+
};
|
|
4962
|
+
|
|
4963
|
+
/**
|
|
4964
|
+
* Will execute a series of animation promises in sequence.
|
|
4965
|
+
* This is useful for chaining animations where each step depends on the
|
|
4966
|
+
* previous one completing before starting the next.
|
|
4967
|
+
*
|
|
4968
|
+
* @param {Array<() => Promise<void>>} animations - The array of animation functions.
|
|
4969
|
+
* @returns {Object} - An object with a `start` method to begin the timeline.
|
|
4970
|
+
*
|
|
4971
|
+
* @example
|
|
4972
|
+
* const { fadeOut } = useFade(this.ref);
|
|
4973
|
+
* const { collapse } = useCollapse(this.ref);
|
|
4974
|
+
*
|
|
4975
|
+
* timeline(fadeOut, collapse).start();
|
|
4976
|
+
*/
|
|
4977
|
+
const timeline = (...animations) => ({
|
|
4978
|
+
start: () => {
|
|
4979
|
+
return animations.reduce((promise, animation) => promise.then(() => animation()), Promise.resolve());
|
|
4980
|
+
},
|
|
4981
|
+
});
|
|
4982
|
+
|
|
4983
|
+
const nvAccordionItemCss = "nv-accordion-item{display:block;border-bottom:var(--spacing-px) solid var(--color-content-low-border)}nv-accordion-item:last-child{border-bottom:none}nv-accordion-item .nv-accordion-item__header{cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding:var(--spacing-4)}nv-accordion-item .nv-accordion-item__header .nv-accordion-item__chevron{margin-left:var(--spacing-2);flex-shrink:0}nv-accordion-item .nv-accordion-item__header .nv-accordion-item__header-content{display:flex;flex-direction:column;gap:var(--spacing-0-5);flex:1;min-width:0}nv-accordion-item .nv-accordion-item__header .nv-accordion-item__title{color:var(--color-content-high-text);font-size:var(--font-size-lg);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--line-height-lg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nv-accordion-item .nv-accordion-item__header .nv-accordion-item__subtitle{color:var(--color-content-low-text);font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--line-height-base);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nv-accordion-item .nv-accordion-item__content{background:var(--color-level-10-background)}nv-accordion-item .nv-accordion-item__content .nv-accordion-item__content-inner{padding:var(--spacing-4);color:var(--color-content-low-text);font-size:var(--font-size-md);font-style:normal;font-weight:500;line-height:var(--line-height-base);}nv-accordion-item.is-disabled{opacity:var(--opacity-disabled);pointer-events:none}nv-accordion-item.is-open .nv-accordion-item__header{border-bottom:var(--spacing-px) solid var(--color-content-low-border)}";
|
|
4984
|
+
var NvAccordionItemStyle0 = nvAccordionItemCss;
|
|
4985
|
+
|
|
4986
|
+
/**
|
|
4987
|
+
* Accordion item element for nv-accordion.
|
|
4988
|
+
*
|
|
4989
|
+
* @slot header - Custom header (replaces itemtitle/subtitle)
|
|
4990
|
+
* @slot content - Main content (expandable area)
|
|
4991
|
+
*/
|
|
4992
|
+
class NvAccordionItem {
|
|
4993
|
+
constructor(hostRef) {
|
|
4994
|
+
registerInstance(this, hostRef);
|
|
4995
|
+
this.itemToggle = createEvent(this, "itemToggle", 7);
|
|
4996
|
+
/** Open or closed */
|
|
4997
|
+
this.open = false;
|
|
4998
|
+
/** Disables the item */
|
|
4999
|
+
this.disabled = false;
|
|
5000
|
+
/** Parent expansion mode (accordion or multi) */
|
|
5001
|
+
this.mode = 'accordion';
|
|
5002
|
+
//#endregion EVENTS
|
|
5003
|
+
/****************************************************************************/
|
|
5004
|
+
//#region STATE
|
|
5005
|
+
/** Internal state for open/close rendering */
|
|
5006
|
+
this.currentOpenState = false;
|
|
5007
|
+
/**
|
|
5008
|
+
* Controls if the panel has been initialized for animations
|
|
5009
|
+
*/
|
|
5010
|
+
this.isInitialized = false;
|
|
5011
|
+
/**
|
|
5012
|
+
* Animation in progress
|
|
5013
|
+
*/
|
|
5014
|
+
this.isAnimating = false;
|
|
5015
|
+
/**
|
|
5016
|
+
* Handler for header click
|
|
5017
|
+
*/
|
|
5018
|
+
this.handleHeaderClick = () => {
|
|
5019
|
+
this.toggle();
|
|
5020
|
+
};
|
|
5021
|
+
/**
|
|
5022
|
+
* Handler for iconbutton click
|
|
5023
|
+
* @param {Event} e - Click event
|
|
5024
|
+
*/
|
|
5025
|
+
this.handleIconClick = (e) => {
|
|
5026
|
+
e.stopPropagation(); // Prevent header click from triggering
|
|
5027
|
+
this.toggle();
|
|
5028
|
+
};
|
|
5029
|
+
/**
|
|
5030
|
+
* Handler for keyboard events on iconbutton
|
|
5031
|
+
* @param {KeyboardEvent} e - Keyboard event
|
|
5032
|
+
*/
|
|
5033
|
+
this.handleHeaderKeyDown = (e) => {
|
|
5034
|
+
if (this.disabled)
|
|
5035
|
+
return;
|
|
5036
|
+
switch (e.key) {
|
|
5037
|
+
case 'Enter':
|
|
5038
|
+
case ' ':
|
|
5039
|
+
e.preventDefault();
|
|
5040
|
+
this.toggle();
|
|
5041
|
+
break;
|
|
5042
|
+
case 'ArrowDown':
|
|
5043
|
+
e.preventDefault();
|
|
5044
|
+
if (!this.open) {
|
|
5045
|
+
this.open = true;
|
|
5046
|
+
this.itemToggle.emit(this.open);
|
|
5047
|
+
this.updateVisibility(this.open);
|
|
5048
|
+
}
|
|
5049
|
+
break;
|
|
5050
|
+
case 'ArrowUp':
|
|
5051
|
+
e.preventDefault();
|
|
5052
|
+
if (this.open) {
|
|
5053
|
+
this.open = false;
|
|
5054
|
+
this.itemToggle.emit(this.open);
|
|
5055
|
+
this.updateVisibility(this.open);
|
|
5056
|
+
}
|
|
5057
|
+
break;
|
|
5058
|
+
}
|
|
5059
|
+
};
|
|
5060
|
+
}
|
|
5061
|
+
//#endregion STATE
|
|
5062
|
+
/****************************************************************************/
|
|
5063
|
+
//#region WATCHERS
|
|
5064
|
+
async onOpenChanged(newValue, oldValue) {
|
|
5065
|
+
this.currentOpenState = newValue; // Synchronize internal state
|
|
5066
|
+
// Skip initial render
|
|
5067
|
+
if (oldValue === undefined) {
|
|
5068
|
+
return;
|
|
5069
|
+
}
|
|
5070
|
+
await this.updateVisibility(newValue);
|
|
5071
|
+
}
|
|
5072
|
+
//#endregion WATCHERS
|
|
5073
|
+
/****************************************************************************/
|
|
5074
|
+
//#region ANIMATIONS
|
|
5075
|
+
/**
|
|
5076
|
+
* Updates the visibility state with Nova animation system
|
|
5077
|
+
* @param {boolean} open - Whether the accordion item should be open
|
|
5078
|
+
*/
|
|
5079
|
+
async updateVisibility(open) {
|
|
5080
|
+
if (!this.contentRef)
|
|
5081
|
+
return;
|
|
5082
|
+
this.isAnimating = true;
|
|
5083
|
+
const { collapse, expand } = useCollapse(this.contentRef, {
|
|
5084
|
+
duration: 200,
|
|
5085
|
+
});
|
|
5086
|
+
if (open) {
|
|
5087
|
+
// Expand with animation
|
|
5088
|
+
await expand();
|
|
5089
|
+
}
|
|
5090
|
+
else {
|
|
5091
|
+
// Collapse with animation
|
|
5092
|
+
await collapse();
|
|
5093
|
+
}
|
|
5094
|
+
this.isAnimating = false;
|
|
5095
|
+
}
|
|
5096
|
+
//#endregion ANIMATIONS
|
|
5097
|
+
/****************************************************************************/
|
|
5098
|
+
//#region LIFECYCLE
|
|
5099
|
+
componentWillLoad() {
|
|
5100
|
+
this.currentOpenState = this.open; // Initial synchronization
|
|
5101
|
+
}
|
|
5102
|
+
componentDidLoad() {
|
|
5103
|
+
if (this.contentRef) {
|
|
5104
|
+
const { setExpanded, setCollapsed } = useCollapse(this.contentRef);
|
|
5105
|
+
if (this.open) {
|
|
5106
|
+
// If open by default on initial load, set expanded state without animation
|
|
5107
|
+
setExpanded();
|
|
5108
|
+
}
|
|
5109
|
+
else {
|
|
5110
|
+
// If closed by default, set collapsed state without animation
|
|
5111
|
+
setCollapsed();
|
|
5112
|
+
}
|
|
5113
|
+
}
|
|
5114
|
+
}
|
|
5115
|
+
disconnectedCallback() {
|
|
5116
|
+
if (this.mutationObserver) {
|
|
5117
|
+
this.mutationObserver.disconnect();
|
|
4972
5118
|
}
|
|
4973
5119
|
}
|
|
5120
|
+
//#endregion LIFECYCLE
|
|
5121
|
+
/****************************************************************************/
|
|
5122
|
+
//#region METHODS
|
|
4974
5123
|
/**
|
|
4975
|
-
*
|
|
4976
|
-
* state is visible.
|
|
5124
|
+
* Toggle open/close (Public API)
|
|
4977
5125
|
*/
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
5126
|
+
async toggle() {
|
|
5127
|
+
if (!this.disabled && !this.isAnimating) {
|
|
5128
|
+
this.open = !this.open;
|
|
5129
|
+
this.itemToggle.emit(this.open);
|
|
5130
|
+
// Force animation update directly instead of relying on watcher
|
|
5131
|
+
await this.updateVisibility(this.open);
|
|
4982
5132
|
}
|
|
4983
5133
|
}
|
|
4984
5134
|
/**
|
|
4985
|
-
*
|
|
4986
|
-
*
|
|
5135
|
+
* Get the chevron icon name based on open state
|
|
5136
|
+
* @returns {string} The icon name to display in the chevron button
|
|
4987
5137
|
*/
|
|
4988
|
-
|
|
4989
|
-
return
|
|
4990
|
-
animate({
|
|
4991
|
-
from: { opacity: 1, scale: 1 },
|
|
4992
|
-
to: { opacity: hasFade ? 0 : 1, scale: amount },
|
|
4993
|
-
duration,
|
|
4994
|
-
onUpdate(latest) {
|
|
4995
|
-
const updates = {
|
|
4996
|
-
scale: latest.scale,
|
|
4997
|
-
};
|
|
4998
|
-
if (hasFade) {
|
|
4999
|
-
updates['opacity'] = latest.opacity;
|
|
5000
|
-
}
|
|
5001
|
-
nodeStyler.set(updates);
|
|
5002
|
-
},
|
|
5003
|
-
onComplete() {
|
|
5004
|
-
resolve();
|
|
5005
|
-
},
|
|
5006
|
-
});
|
|
5007
|
-
});
|
|
5138
|
+
get chevronIconName() {
|
|
5139
|
+
return this.open ? 'chevron-top' : 'chevron-down';
|
|
5008
5140
|
}
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5141
|
+
//#endregion METHODS
|
|
5142
|
+
/****************************************************************************/
|
|
5143
|
+
//#region RENDER
|
|
5144
|
+
render() {
|
|
5145
|
+
return (hAsync(Host, { key: 'fd0200c1d78b3e3ae7361783dbba14d55732e7cf', class: {
|
|
5146
|
+
'nv-accordion-item': true,
|
|
5147
|
+
'is-open': this.open,
|
|
5148
|
+
'is-disabled': this.disabled,
|
|
5149
|
+
'is-animating': this.isAnimating,
|
|
5150
|
+
}, role: "listitem", "aria-expanded": this.open ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, hAsync("div", { key: '471cc5dc8ec8a3fff592b5b443a82270aea9a477', class: "nv-accordion-item__header", onClick: this.handleHeaderClick, "aria-controls": "content" }, hAsync("slot", { key: 'dacf57578644d0ff3d6c5cf55c382c9c04a6fdf4', name: "header" }, hAsync("div", { key: 'd0e23a45fd43046f4dcebcc9cece8c2650cdaf9e', class: "nv-accordion-item__header-content" }, this.itemtitle && (hAsync("span", { key: '061068f7afa0d25d3273868d70d9f55c336d93d7', class: "nv-accordion-item__title" }, this.itemtitle)), this.subtitle && (hAsync("span", { key: '1ba3c4754c95d6fbe97fb4111dba06543879e400', class: "nv-accordion-item__subtitle" }, this.subtitle)))), hAsync("nv-iconbutton", { key: '834c4aa3111a8619f4c974e87899d0dfa6d14280', emphasis: "low", size: "sm", shape: "square", name: this.chevronIconName, tabindex: this.disabled ? -1 : 0, onClick: this.handleIconClick, onKeyDown: this.handleHeaderKeyDown, "aria-expanded": this.open ? 'true' : 'false', "aria-controls": "content", "aria-label": this.open ? 'Fermer la section' : 'Ouvrir la section' })), hAsync("div", { key: '79ba605179905a7a58a642a2c5d1f0bdf90d67ae', id: "content", class: "nv-accordion-item__content", "aria-hidden": !this.open ? 'true' : 'false', ref: el => (this.contentRef = el) }, hAsync("div", { key: '6ca4b0d9acd5262a4a041ad9d59bbace5cc7850d', class: "nv-accordion-item__content-inner" }, hAsync("slot", { key: '85c288666cf3b13abcd1ee1dbaced7ceb9ff9e6e', name: "content" })))));
|
|
5151
|
+
}
|
|
5152
|
+
get el() { return getElement(this); }
|
|
5153
|
+
static get watchers() { return {
|
|
5154
|
+
"open": ["onOpenChanged"]
|
|
5155
|
+
}; }
|
|
5156
|
+
static get style() { return NvAccordionItemStyle0; }
|
|
5157
|
+
static get cmpMeta() { return {
|
|
5158
|
+
"$flags$": 4,
|
|
5159
|
+
"$tagName$": "nv-accordion-item",
|
|
5160
|
+
"$members$": {
|
|
5161
|
+
"itemtitle": [513],
|
|
5162
|
+
"subtitle": [513],
|
|
5163
|
+
"open": [1540],
|
|
5164
|
+
"disabled": [516],
|
|
5165
|
+
"maxContentHeight": [514, "max-content-height"],
|
|
5166
|
+
"mode": [513],
|
|
5167
|
+
"currentOpenState": [32],
|
|
5168
|
+
"isInitialized": [32],
|
|
5169
|
+
"isAnimating": [32],
|
|
5170
|
+
"toggle": [64]
|
|
5171
|
+
},
|
|
5172
|
+
"$listeners$": undefined,
|
|
5173
|
+
"$lazyBundleId$": "-",
|
|
5174
|
+
"$attrsToReflect$": [["itemtitle", "itemtitle"], ["subtitle", "subtitle"], ["open", "open"], ["disabled", "disabled"], ["maxContentHeight", "max-content-height"], ["mode", "mode"]]
|
|
5175
|
+
}; }
|
|
5176
|
+
}
|
|
5177
|
+
|
|
5178
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
5179
|
+
|
|
5180
|
+
var FeedbackColors;
|
|
5181
|
+
(function (FeedbackColors) {
|
|
5182
|
+
FeedbackColors["Information"] = "information";
|
|
5183
|
+
FeedbackColors["Warning"] = "warning";
|
|
5184
|
+
FeedbackColors["Success"] = "success";
|
|
5185
|
+
FeedbackColors["Error"] = "error";
|
|
5186
|
+
FeedbackColors["Neutral"] = "neutral";
|
|
5187
|
+
})(FeedbackColors || (FeedbackColors = {}));
|
|
5188
|
+
var DeprecatedSemanticColors;
|
|
5189
|
+
(function (DeprecatedSemanticColors) {
|
|
5190
|
+
DeprecatedSemanticColors["Neutral"] = "neutral";
|
|
5191
|
+
DeprecatedSemanticColors["Primary"] = "primary";
|
|
5192
|
+
DeprecatedSemanticColors["Secondary"] = "secondary";
|
|
5193
|
+
DeprecatedSemanticColors["Success"] = "success";
|
|
5194
|
+
DeprecatedSemanticColors["Error"] = "error";
|
|
5195
|
+
})(DeprecatedSemanticColors || (DeprecatedSemanticColors = {}));
|
|
5196
|
+
var SemanticSizes;
|
|
5197
|
+
(function (SemanticSizes) {
|
|
5198
|
+
SemanticSizes["ExtraSmall"] = "xs";
|
|
5199
|
+
SemanticSizes["Small"] = "sm";
|
|
5200
|
+
SemanticSizes["Medium"] = "md";
|
|
5201
|
+
SemanticSizes["Large"] = "lg";
|
|
5202
|
+
SemanticSizes["ExtraLarge"] = "xl";
|
|
5203
|
+
})(SemanticSizes || (SemanticSizes = {}));
|
|
5204
|
+
var ButtonSize;
|
|
5205
|
+
(function (ButtonSize) {
|
|
5206
|
+
ButtonSize["ExtraSmall"] = "xs";
|
|
5207
|
+
ButtonSize["Small"] = "sm";
|
|
5208
|
+
ButtonSize["Medium"] = "md";
|
|
5209
|
+
ButtonSize["Large"] = "lg";
|
|
5210
|
+
})(ButtonSize || (ButtonSize = {}));
|
|
5211
|
+
var ButtonEmphasis;
|
|
5212
|
+
(function (ButtonEmphasis) {
|
|
5213
|
+
ButtonEmphasis["High"] = "high";
|
|
5214
|
+
ButtonEmphasis["Medium"] = "medium";
|
|
5215
|
+
ButtonEmphasis["Low"] = "low";
|
|
5216
|
+
ButtonEmphasis["Lower"] = "lower";
|
|
5217
|
+
})(ButtonEmphasis || (ButtonEmphasis = {}));
|
|
5218
|
+
var ButtonType;
|
|
5219
|
+
(function (ButtonType) {
|
|
5220
|
+
ButtonType["Submit"] = "submit";
|
|
5221
|
+
ButtonType["Reset"] = "reset";
|
|
5222
|
+
ButtonType["Button"] = "button";
|
|
5223
|
+
})(ButtonType || (ButtonType = {}));
|
|
5224
|
+
var IconButtonShape;
|
|
5225
|
+
(function (IconButtonShape) {
|
|
5226
|
+
IconButtonShape["Square"] = "square";
|
|
5227
|
+
IconButtonShape["Rounded"] = "rounded";
|
|
5228
|
+
})(IconButtonShape || (IconButtonShape = {}));
|
|
5229
|
+
var LoaderColors;
|
|
5230
|
+
(function (LoaderColors) {
|
|
5231
|
+
LoaderColors["High"] = "brand";
|
|
5232
|
+
LoaderColors["Low"] = "white";
|
|
5233
|
+
})(LoaderColors || (LoaderColors = {}));
|
|
5234
|
+
var LabelPlacement;
|
|
5235
|
+
(function (LabelPlacement) {
|
|
5236
|
+
LabelPlacement["Before"] = "before";
|
|
5237
|
+
LabelPlacement["After"] = "after";
|
|
5238
|
+
})(LabelPlacement || (LabelPlacement = {}));
|
|
5239
|
+
var TextInputAutocomplete;
|
|
5240
|
+
(function (TextInputAutocomplete) {
|
|
5241
|
+
TextInputAutocomplete["On"] = "on";
|
|
5242
|
+
TextInputAutocomplete["Off"] = "off";
|
|
5243
|
+
TextInputAutocomplete["Section"] = "section-*";
|
|
5244
|
+
TextInputAutocomplete["Shipping"] = "shipping";
|
|
5245
|
+
TextInputAutocomplete["Billing"] = "billing";
|
|
5246
|
+
TextInputAutocomplete["Home"] = "home";
|
|
5247
|
+
TextInputAutocomplete["Work"] = "work";
|
|
5248
|
+
TextInputAutocomplete["Mobile"] = "mobile";
|
|
5249
|
+
TextInputAutocomplete["Fax"] = "fax";
|
|
5250
|
+
TextInputAutocomplete["Pager"] = "pager";
|
|
5251
|
+
TextInputAutocomplete["Tel"] = "tel";
|
|
5252
|
+
TextInputAutocomplete["TelCountryCode"] = "tel-country-code";
|
|
5253
|
+
TextInputAutocomplete["TelNational"] = "tel-national";
|
|
5254
|
+
TextInputAutocomplete["TelAreaCode"] = "tel-area-code";
|
|
5255
|
+
TextInputAutocomplete["TelLocal"] = "tel-local";
|
|
5256
|
+
TextInputAutocomplete["TelLocalPrefix"] = "tel-local-prefix";
|
|
5257
|
+
TextInputAutocomplete["TelLocalSuffix"] = "tel-local-suffix";
|
|
5258
|
+
TextInputAutocomplete["TelExtension"] = "tel-extension";
|
|
5259
|
+
TextInputAutocomplete["Email"] = "email";
|
|
5260
|
+
TextInputAutocomplete["IMProtocol"] = "impp";
|
|
5261
|
+
TextInputAutocomplete["Name"] = "name";
|
|
5262
|
+
TextInputAutocomplete["HonorificPrefix"] = "honorific-prefix";
|
|
5263
|
+
TextInputAutocomplete["GivenName"] = "given-name";
|
|
5264
|
+
TextInputAutocomplete["AdditionalName"] = "additional-name";
|
|
5265
|
+
TextInputAutocomplete["FamilyName"] = "family-name";
|
|
5266
|
+
TextInputAutocomplete["HonorificSuffix"] = "honorific-suffix";
|
|
5267
|
+
TextInputAutocomplete["Nickname"] = "nickname";
|
|
5268
|
+
TextInputAutocomplete["Username"] = "username";
|
|
5269
|
+
TextInputAutocomplete["NewPassword"] = "new-password";
|
|
5270
|
+
TextInputAutocomplete["CurrentPassword"] = "current-password";
|
|
5271
|
+
TextInputAutocomplete["OneTimeCode"] = "one-time-code";
|
|
5272
|
+
TextInputAutocomplete["OrganizationTitle"] = "organization-title";
|
|
5273
|
+
TextInputAutocomplete["Organization"] = "organization";
|
|
5274
|
+
TextInputAutocomplete["StreetAddress"] = "street-address";
|
|
5275
|
+
TextInputAutocomplete["AddressLine1"] = "address-line1";
|
|
5276
|
+
TextInputAutocomplete["AddressLine2"] = "address-line2";
|
|
5277
|
+
TextInputAutocomplete["AddressLine3"] = "address-line3";
|
|
5278
|
+
TextInputAutocomplete["AddressLevel4"] = "address-level4";
|
|
5279
|
+
TextInputAutocomplete["AddressLevel3"] = "address-level3";
|
|
5280
|
+
TextInputAutocomplete["AddressLevel2"] = "address-level2";
|
|
5281
|
+
TextInputAutocomplete["AddressLevel1"] = "address-level1";
|
|
5282
|
+
TextInputAutocomplete["Country"] = "country";
|
|
5283
|
+
TextInputAutocomplete["CountryName"] = "country-name";
|
|
5284
|
+
TextInputAutocomplete["PostalCode"] = "postal-code";
|
|
5285
|
+
TextInputAutocomplete["CCName"] = "cc-name";
|
|
5286
|
+
TextInputAutocomplete["CCGivenName"] = "cc-given-name";
|
|
5287
|
+
TextInputAutocomplete["CCAdditionalName"] = "cc-additional-name";
|
|
5288
|
+
TextInputAutocomplete["CCFamilyName"] = "cc-family-name";
|
|
5289
|
+
TextInputAutocomplete["CCNumber"] = "cc-number";
|
|
5290
|
+
TextInputAutocomplete["CCExp"] = "cc-exp";
|
|
5291
|
+
TextInputAutocomplete["CCExpMonth"] = "cc-exp-month";
|
|
5292
|
+
TextInputAutocomplete["CCExpYear"] = "cc-exp-year";
|
|
5293
|
+
TextInputAutocomplete["CCCSC"] = "cc-csc";
|
|
5294
|
+
TextInputAutocomplete["CCType"] = "cc-type";
|
|
5295
|
+
TextInputAutocomplete["TransactionCurrency"] = "transaction-currency";
|
|
5296
|
+
TextInputAutocomplete["TransactionAmount"] = "transaction-amount";
|
|
5297
|
+
TextInputAutocomplete["Language"] = "language";
|
|
5298
|
+
TextInputAutocomplete["Bday"] = "bday";
|
|
5299
|
+
TextInputAutocomplete["BdayDay"] = "bday-day";
|
|
5300
|
+
TextInputAutocomplete["BdayMonth"] = "bday-month";
|
|
5301
|
+
TextInputAutocomplete["BdayYear"] = "bday-year";
|
|
5302
|
+
TextInputAutocomplete["Sex"] = "sex";
|
|
5303
|
+
TextInputAutocomplete["Url"] = "url";
|
|
5304
|
+
TextInputAutocomplete["Photo"] = "photo";
|
|
5305
|
+
})(TextInputAutocomplete || (TextInputAutocomplete = {}));
|
|
5306
|
+
var TimeType;
|
|
5307
|
+
(function (TimeType) {
|
|
5308
|
+
TimeType["Hours"] = "hours";
|
|
5309
|
+
TimeType["Minutes"] = "minutes";
|
|
5310
|
+
TimeType["Seconds"] = "seconds";
|
|
5311
|
+
})(TimeType || (TimeType = {}));
|
|
5312
|
+
var GlobalFilterPosition;
|
|
5313
|
+
(function (GlobalFilterPosition) {
|
|
5314
|
+
GlobalFilterPosition["End"] = "end";
|
|
5315
|
+
GlobalFilterPosition["Start"] = "start";
|
|
5316
|
+
GlobalFilterPosition["Center"] = "center";
|
|
5317
|
+
})(GlobalFilterPosition || (GlobalFilterPosition = {}));
|
|
5318
|
+
var SortingPossibility;
|
|
5319
|
+
(function (SortingPossibility) {
|
|
5320
|
+
SortingPossibility["Asc"] = "asc";
|
|
5321
|
+
SortingPossibility["Desc"] = "desc";
|
|
5322
|
+
})(SortingPossibility || (SortingPossibility = {}));
|
|
5323
|
+
const WEEK_ABBREVIATIONS = {
|
|
5324
|
+
'fr-FR': 'Sem', // Semaine
|
|
5325
|
+
'fr-BE': 'Sem', // Semaine
|
|
5326
|
+
'nl-BE': 'W', // Week
|
|
5327
|
+
'en-BE': 'W', // Week
|
|
5328
|
+
'en-US': 'W', // Week
|
|
5329
|
+
'en-GB': 'W', // Week
|
|
5330
|
+
'es-ES': 'Sem', // Semana
|
|
5331
|
+
'de-DE': 'KW', // Kalenderwoche
|
|
5332
|
+
'it-IT': 'Set', // Settimana
|
|
5333
|
+
'pt-PT': 'Sem', // Semana
|
|
5334
|
+
'nl-NL': 'W', // Week
|
|
5335
|
+
'pl-PL': 'Tyd', // Tydzień
|
|
5336
|
+
'ru-RU': 'Нед', // Неделя
|
|
5337
|
+
'ja-JP': '週', // Shū
|
|
5338
|
+
'zh-CN': '周', // Zhōu
|
|
5339
|
+
'ko-KR': '주', // Ju
|
|
5340
|
+
};
|
|
5341
|
+
const CUSTOM_DAY_NAMES = {
|
|
5342
|
+
'fr-BE': ['Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa', 'Di'],
|
|
5343
|
+
'nl-BE': ['Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za', 'Zo'],
|
|
5344
|
+
'de-DE': ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'],
|
|
5345
|
+
'en-BE': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
5346
|
+
'en-US': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
5347
|
+
'en-GB': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
5348
|
+
};
|
|
5349
|
+
const CUSTOM_MONTH_NAMES = {
|
|
5350
|
+
'fr-BE': [
|
|
5351
|
+
'Jan',
|
|
5352
|
+
'Fev',
|
|
5353
|
+
'Mar',
|
|
5354
|
+
'Avr',
|
|
5355
|
+
'Mai',
|
|
5356
|
+
'Jun',
|
|
5357
|
+
'Jul',
|
|
5358
|
+
'Aou',
|
|
5359
|
+
'Sep',
|
|
5360
|
+
'Oct',
|
|
5361
|
+
'Nov',
|
|
5362
|
+
'Dec',
|
|
5363
|
+
],
|
|
5364
|
+
'nl-BE': [
|
|
5365
|
+
'Jan',
|
|
5366
|
+
'Feb',
|
|
5367
|
+
'Maa',
|
|
5368
|
+
'Apr',
|
|
5369
|
+
'Mei',
|
|
5370
|
+
'Jun',
|
|
5371
|
+
'Jul',
|
|
5372
|
+
'Aug',
|
|
5373
|
+
'Sep',
|
|
5374
|
+
'Okt',
|
|
5375
|
+
'Nov',
|
|
5376
|
+
'Dec',
|
|
5377
|
+
],
|
|
5378
|
+
'de-DE': [
|
|
5379
|
+
'Jan',
|
|
5380
|
+
'Feb',
|
|
5381
|
+
'Mär',
|
|
5382
|
+
'Apr',
|
|
5383
|
+
'Mai',
|
|
5384
|
+
'Jun',
|
|
5385
|
+
'Jul',
|
|
5386
|
+
'Aug',
|
|
5387
|
+
'Sep',
|
|
5388
|
+
'Okt',
|
|
5389
|
+
'Nov',
|
|
5390
|
+
'Dez',
|
|
5391
|
+
],
|
|
5392
|
+
'en-BE': [
|
|
5393
|
+
'Jan',
|
|
5394
|
+
'Feb',
|
|
5395
|
+
'Mar',
|
|
5396
|
+
'Apr',
|
|
5397
|
+
'May',
|
|
5398
|
+
'Jun',
|
|
5399
|
+
'Jul',
|
|
5400
|
+
'Aug',
|
|
5401
|
+
'Sep',
|
|
5402
|
+
'Oct',
|
|
5403
|
+
'Nov',
|
|
5404
|
+
'Dec',
|
|
5405
|
+
],
|
|
5406
|
+
'en-US': [
|
|
5407
|
+
'Jan',
|
|
5408
|
+
'Feb',
|
|
5409
|
+
'Mar',
|
|
5410
|
+
'Apr',
|
|
5411
|
+
'May',
|
|
5412
|
+
'Jun',
|
|
5413
|
+
'Jul',
|
|
5414
|
+
'Aug',
|
|
5415
|
+
'Sep',
|
|
5416
|
+
'Oct',
|
|
5417
|
+
'Nov',
|
|
5418
|
+
'Dec',
|
|
5419
|
+
],
|
|
5420
|
+
'en-GB': [
|
|
5421
|
+
'Jan',
|
|
5422
|
+
'Feb',
|
|
5423
|
+
'Mar',
|
|
5424
|
+
'Apr',
|
|
5425
|
+
'May',
|
|
5426
|
+
'Jun',
|
|
5427
|
+
'Jul',
|
|
5428
|
+
'Aug',
|
|
5429
|
+
'Sep',
|
|
5430
|
+
'Oct',
|
|
5431
|
+
'Nov',
|
|
5432
|
+
'Dec',
|
|
5433
|
+
],
|
|
5015
5434
|
};
|
|
5016
5435
|
|
|
5017
|
-
/**
|
|
5018
|
-
* Will execute a series of animation promises in sequence.
|
|
5019
|
-
* This is useful for chaining animations where each step depends on the
|
|
5020
|
-
* previous one completing before starting the next.
|
|
5021
|
-
*
|
|
5022
|
-
* @param {Array<() => Promise<void>>} animations - The array of animation functions.
|
|
5023
|
-
* @returns {Object} - An object with a `start` method to begin the timeline.
|
|
5024
|
-
*
|
|
5025
|
-
* @example
|
|
5026
|
-
* const { fadeOut } = useFade(this.ref);
|
|
5027
|
-
* const { collapse } = useCollapse(this.ref);
|
|
5028
|
-
*
|
|
5029
|
-
* timeline(fadeOut, collapse).start();
|
|
5030
|
-
*/
|
|
5031
|
-
const timeline = (...animations) => ({
|
|
5032
|
-
start: () => {
|
|
5033
|
-
return animations.reduce((promise, animation) => promise.then(() => animation()), Promise.resolve());
|
|
5034
|
-
},
|
|
5035
|
-
});
|
|
5036
|
-
|
|
5037
5436
|
const nvAlertCss = "nv-alert{display:flex !important;align-items:flex-start;position:relative;gap:var(--alert-gap-x);border-radius:var(--alert-radius);font-family:\"TT Norms Pro\", \"Montserrat\", sans-serif}nv-alert>nv-icon{margin-left:var(--alert-icon-position-x);margin-top:var(--alert-icon-position-y)}nv-alert.hidden{display:none !important}nv-alert.feedback-information{background-color:var(--components-alert-information-background);border:1px solid var(--components-alert-information-border) !important}nv-alert.feedback-information>.close:focus,nv-alert.feedback-information>.close:focus-within{outline:none}nv-alert.feedback-information>.close:focus-visible,nv-alert.feedback-information>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-information-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-warning{background-color:var(--components-alert-warning-background);border:1px solid var(--components-alert-warning-border) !important}nv-alert.feedback-warning>.close:focus,nv-alert.feedback-warning>.close:focus-within{outline:none}nv-alert.feedback-warning>.close:focus-visible,nv-alert.feedback-warning>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-warning-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-error{background-color:var(--components-alert-error-background);border:1px solid var(--components-alert-error-border) !important}nv-alert.feedback-error>.close:focus,nv-alert.feedback-error>.close:focus-within{outline:none}nv-alert.feedback-error>.close:focus-visible,nv-alert.feedback-error>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-error-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-success{background-color:var(--components-alert-success-background);border:1px solid var(--components-alert-success-border) !important}nv-alert.feedback-success>.close:focus,nv-alert.feedback-success>.close:focus-within{outline:none}nv-alert.feedback-success>.close:focus-visible,nv-alert.feedback-success>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-success-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-neutral{background-color:var(--components-alert-neutral-background);border:1px solid var(--components-alert-neutral-border) !important}nv-alert.feedback-neutral>.close:focus,nv-alert.feedback-neutral>.close:focus-within{outline:none}nv-alert.feedback-neutral>.close:focus-visible,nv-alert.feedback-neutral>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-neutral-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert>nv-icon.icon-information{color:var(--components-alert-information-icon)}nv-alert>nv-icon.icon-warning{color:var(--components-alert-warning-icon)}nv-alert>nv-icon.icon-error{color:var(--components-alert-error-icon)}nv-alert>nv-icon.icon-success{color:var(--components-alert-success-icon)}nv-alert>nv-icon.icon-neutral{color:var(--components-alert-neutral-icon)}nv-alert>.content{display:flex;padding:var(--alert-padding);padding-left:0;flex-direction:column;gap:var(--alert-gap-y)}nv-alert>.content>.heading{color:var(--components-alert-content-title);font-size:var(--alert-heading-font-size);line-height:var(--alert-heading-line-height);font-weight:var(--alert-heading-font-weight)}nv-alert>.content>.message{color:var(--components-alert-content-description);font-size:var(--alert-message-font-size);line-height:var(--alert-message-line-height)}nv-alert>.close{border-radius:var(--alert-radius);position:absolute;display:flex;top:var(--alert-icon-position-y);right:var(--alert-icon-position-x);padding:0;border:none;background:none;cursor:pointer}";
|
|
5038
5437
|
var NvAlertStyle0 = nvAlertCss;
|
|
5039
5438
|
|
|
@@ -5191,7 +5590,7 @@ class NvAlert {
|
|
|
5191
5590
|
//#region RENDER
|
|
5192
5591
|
render() {
|
|
5193
5592
|
var _a;
|
|
5194
|
-
return (hAsync(Host, { key: '
|
|
5593
|
+
return (hAsync(Host, { key: 'f0e75ac2c38aced1dcf76cb1d5f03becefbee71d', role: "alert", class: clsx('root', `feedback-${this.feedback}`) }, hAsync("nv-icon", { key: '19f7fcf452d62277ab436acd20c285f44fbaecd4', name: (_a = this.icon) !== null && _a !== void 0 ? _a : this.getDefaultIcon(), class: `icon-${this.feedback}`, size: "md" }), hAsync("div", { key: '8e656ffd0bce63bd33d92b97df21389af265e182', class: "content" }, this.heading && hAsync("p", { key: '0aa928e8ee8605d735f890bc67128563ce3ad379', class: "heading" }, this.heading), this.message && hAsync("p", { key: '690d9928646d25a636b2bb04eb65eee40c402f52', class: "message" }, this.message), hAsync("slot", { key: '86309f093688dbb81ff805f1c9137b200541e905' })), this.dismissible && (hAsync("button", { key: '387695ff1e23a7e289cf58c51042ccc561d451ad', class: "close", type: "button", onClick: this.handleDismiss }, hAsync("nv-icon", { key: '788b99b4c56fc8c936a67ac48d2db37fdcca7631', name: "x", size: "sm" })))));
|
|
5195
5594
|
}
|
|
5196
5595
|
get ref() { return getElement(this); }
|
|
5197
5596
|
static get watchers() { return {
|
|
@@ -5275,7 +5674,7 @@ class NvAvatar {
|
|
|
5275
5674
|
/****************************************************************************/
|
|
5276
5675
|
//#region RENDER
|
|
5277
5676
|
render() {
|
|
5278
|
-
return (hAsync(Host, { key: '
|
|
5677
|
+
return (hAsync(Host, { key: '127d470eb9121f611f9e18f029ab9ef15a4a49df', class: clsx(`avatar-${this.size}`, `avatar-color-${this.color}`), "aria-label": this.alt }, this.src ? (hAsync("img", { src: this.src, alt: this.alt })) : this.initials ? (this.trimInitials(this.initials)) : (hAsync("slot", { name: "icon" }, hAsync("nv-icon", { name: "user" })))));
|
|
5279
5678
|
}
|
|
5280
5679
|
static get style() { return NvAvatarStyle0; }
|
|
5281
5680
|
static get cmpMeta() { return {
|
|
@@ -5431,12 +5830,12 @@ class NvBadge {
|
|
|
5431
5830
|
/****************************************************************************/
|
|
5432
5831
|
//#region RENDER
|
|
5433
5832
|
render() {
|
|
5434
|
-
return (hAsync(Host, { key: '
|
|
5833
|
+
return (hAsync(Host, { key: '435c5bb1f565c8bd95cca5c6828157c80f60aa39', class: clsx(`badge-${this.color}`, {
|
|
5435
5834
|
'has-close': this.dismissible,
|
|
5436
5835
|
'with-gap': this.dismissible || this.label,
|
|
5437
5836
|
'visually-hidden': this._isHidden,
|
|
5438
5837
|
'is-icon-only': this.isIconOnly,
|
|
5439
|
-
}) }, hAsync("slot", { key: '
|
|
5838
|
+
}) }, hAsync("slot", { key: '271dc833471e026af5088f48227639682e661e97', name: "leading-icon" }, this.leadIcon && hAsync("nv-icon", { key: 'e578eabf4c5a09e61e28c3839b943804acdf88e8', name: this.leadIcon, size: "sm" })), hAsync("span", { key: '24d16a21b2b4499be712f9b747c9ab63c5e6ca0c', class: clsx({ 'visually-hidden': this.isIconOnly }) }, this.label, hAsync("slot", { key: '3e3827620e6ade8be256ce7dd0b8bb949f36f2d5' })), this.dismissible && (hAsync("button", { key: '90ed9ec1b71815554b963b0eafeb5536578700cf', onClick: this.handleClose, class: "close", type: "button" }, hAsync("nv-icon", { key: 'df426e5d88c2bf02e7aa83c179c05db4795f03db', name: "x", size: "sm" })))));
|
|
5440
5839
|
}
|
|
5441
5840
|
get ref() { return getElement(this); }
|
|
5442
5841
|
static get watchers() { return {
|
|
@@ -5499,7 +5898,7 @@ class NvBreadcrumb {
|
|
|
5499
5898
|
/****************************************************************************/
|
|
5500
5899
|
//#region RENDER
|
|
5501
5900
|
render() {
|
|
5502
|
-
return (hAsync(Host, { key: '
|
|
5901
|
+
return (hAsync(Host, { key: 'b0cfdee987585488bd49734900ee421b081e6df4', 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: '970d9552c3f81bffd86889fc2ff169f73810507b', message: this.tooltip, triggerElement: this.popoverTrigger, placement: "top" })), this.type === 'collapsed' && (hAsync("nv-popover", { key: '1b14ce172db49aaeb199d6801978f96204ba05a1', triggerMode: "click", groupName: "breadcrumbs", triggerElement: this.popoverTrigger }, hAsync("ul", { key: 'b984309f9290bb4bcfed796200ffaad6e52a2b93', slot: "content" }, hAsync("slot", { key: '189408f75e689b98b4cf9397074dbaefaecece9a' })))), hAsync("span", { key: '62a4bed098620043b69f1e7dcf51db7de035f5fc', "data-scope": "separator" }, "/")));
|
|
5503
5902
|
}
|
|
5504
5903
|
get el() { return getElement(this); }
|
|
5505
5904
|
static get style() { return NvBreadcrumbStyle0; }
|
|
@@ -5529,7 +5928,7 @@ class NvBreadcrumbs {
|
|
|
5529
5928
|
}
|
|
5530
5929
|
//#region RENDER
|
|
5531
5930
|
render() {
|
|
5532
|
-
return (hAsync(Host, { key: '
|
|
5931
|
+
return (hAsync(Host, { key: '4337fe5161c0ce444001e1b92221f3adac26e4bf', role: "navigation", "aria-label": "breadcrumbs" }, hAsync("ol", { key: '00d470eadfe879be525a4a4b7ec3368601a0697c' }, hAsync("slot", { key: '2d012f152b49f33f399aa14dfb18a4c39265128c' }))));
|
|
5533
5932
|
}
|
|
5534
5933
|
static get style() { return NvBreadcrumbsStyle0; }
|
|
5535
5934
|
static get cmpMeta() { return {
|
|
@@ -5693,7 +6092,7 @@ class NvButton {
|
|
|
5693
6092
|
/****************************************************************************/
|
|
5694
6093
|
//#region RENDER
|
|
5695
6094
|
render() {
|
|
5696
|
-
return (hAsync(Host, { key: '
|
|
6095
|
+
return (hAsync(Host, { key: '54c0b3351f4d8a180058a03e61a562882fb98498', role: "button", tabindex: "0", onClick: this.handleButtonClick }, this.loading && (hAsync("nv-loader", { key: '21315e4af4111bcf47c67e65a9a58a1d7121a43e', size: this.size === ButtonSize.Large ? 'sm' : 'xs' })), hAsync("slot", { key: 'f37683ddaa2c11c5b7accfc99429c930f5a3dcf6', name: "leading-icon" }), hAsync("slot", { key: 'd17ebe7505d9027c6c58f930a8ea9b097561cead' }), hAsync("slot", { key: '2cd6c9756cc7540417041adf5830b734291b2ab5', name: "trailing-icon" })));
|
|
5697
6096
|
}
|
|
5698
6097
|
static get formAssociated() { return true; }
|
|
5699
6098
|
get el() { return getElement(this); }
|
|
@@ -5958,26 +6357,6 @@ function parseDate(dateInput, dateFormat) {
|
|
|
5958
6357
|
parsed = dayjs(dateInput, dateFormat, true);
|
|
5959
6358
|
}
|
|
5960
6359
|
if (!parsed.isValid()) {
|
|
5961
|
-
// Check if the date input contains placeholder characters (incomplete input from Inputmask)
|
|
5962
|
-
// This specifically targets partial dates being typed with placeholder characters
|
|
5963
|
-
const hasPlaceholderChars = typeof dateInput === 'string' &&
|
|
5964
|
-
(dateInput.includes('_') ||
|
|
5965
|
-
dateInput.includes('-_') ||
|
|
5966
|
-
dateInput.includes('/_') ||
|
|
5967
|
-
dateInput.includes('._'));
|
|
5968
|
-
// Check if it looks like a partial date being typed (starts with valid pattern)
|
|
5969
|
-
const looksLikePartialDate = typeof dateInput === 'string' &&
|
|
5970
|
-
dateInput.length < dateFormat.length &&
|
|
5971
|
-
/^[\d\-/.]*$/.test(dateInput) && // Only contains digits and date separators
|
|
5972
|
-
dateInput.length > 0;
|
|
5973
|
-
const isIncompleteInput = hasPlaceholderChars || looksLikePartialDate;
|
|
5974
|
-
// Only log error if it's not an incomplete input (to avoid spam during typing)
|
|
5975
|
-
if (!isIncompleteInput) {
|
|
5976
|
-
console.error(`Parsing error:`, {
|
|
5977
|
-
dateInput,
|
|
5978
|
-
dateFormat: dateFormat,
|
|
5979
|
-
});
|
|
5980
|
-
}
|
|
5981
6360
|
return null;
|
|
5982
6361
|
}
|
|
5983
6362
|
return parsed.toDate();
|
|
@@ -6140,8 +6519,9 @@ const CalendarGrid = props => {
|
|
|
6140
6519
|
hAsync("div", { class: "days-header" }, dayNames.map((day, index) => (hAsync("div", { class: "day-header", key: `day-header-${index}` }, day)))),
|
|
6141
6520
|
hAsync("div", { class: "days-grid" }, days.map(day => {
|
|
6142
6521
|
const date = day.date;
|
|
6143
|
-
if (!date)
|
|
6144
|
-
return
|
|
6522
|
+
if (!date || !day.dayOfMonth) {
|
|
6523
|
+
return hAsync("div", { class: "day-cell is-disabled is-empty" });
|
|
6524
|
+
}
|
|
6145
6525
|
const isSelected = selectionType === 'single' &&
|
|
6146
6526
|
isSameDate(date, selectedDate, { isUTCMode });
|
|
6147
6527
|
const isInRange = isDateInRange(date);
|
|
@@ -6152,7 +6532,7 @@ const CalendarGrid = props => {
|
|
|
6152
6532
|
}))));
|
|
6153
6533
|
};
|
|
6154
6534
|
|
|
6155
|
-
const nvCalendarCss = "nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--components-calendar-background);border-radius:var(--calendar-radius);padding:var(--calendar-padding);box-shadow:0px var(--shadow-y-axis-md-1) var(--shadow-blur-md-1) var(--shadow-spread-md, 0) var(--shadow-color-opacity-0), 0px var(--shadow-y-axis-md-2) var(--shadow-blur-md-2) var(--shadow-spread-md, 0) var(--shadow-color-opacity-2);border:1px solid var(--components-calendar-border);width:auto;max-width:100%}.datepicker-container-single{max-width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:var(--calendar-gap-x);width:auto;overflow-x:hidden}.datepicker-wrapper::-webkit-scrollbar{width:6px;height:6px}.datepicker-wrapper::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}.datepicker-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:var(--calendar-padding);width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-calendar-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:start;align-items:center;margin-bottom:var(--calendar-header-margin-bottom);width:100%}.header nv-iconbutton{width:var(--calendar-header-button-size);height:var(--calendar-header-button-size)}.nav-buttons{display:flex;gap:var(--spacing-0);margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:var(--spacing-1);align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:start;flex-grow:1}.date-controls .month-select,.date-controls .year-input{background:transparent !important}.calendar-wrapper:nth-child(n+2) .datepicker-container{margin-left:42px}.calendar-grid{display:grid;grid-template-columns:auto 1fr;column-gap:var(--calendar-weeks-calendar-gap-x);position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:var(--calendar-cell-size) repeat(6, var(--calendar-cell-size));background:var(--components-calendar-weeks-background);color:var(--components-calendar-weeks-text);border-radius:var(--calendar-weeks-radius);width:var(--calendar-weeks-size);row-gap:var(--calendar-grid-gap-y)}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background-color:var(--components-calendar-weeks-background-hover);color:var(--components-calendar-weeks-text-hover);border-radius:var(--calendar-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:var(--calendar-cell-font-size)}.week-header{font-weight:700;color:var(--components-calendar-weeks-text)}.week-number{color:var(--components-calendar-cell-text)}.days-container{display:grid;grid-template-rows:auto 1fr;row-gap:var(--calendar-grid-gap-y)}.days-header{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));height:var(--calendar-cell-size)}.day-header{display:grid;place-items:center;font-size:var(--calendar-cell-font-size);color:var(--components-calendar-cell-text)}.days-grid{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));grid-template-rows:repeat(6, var(--calendar-cell-size));animation:fadeIn 0.2s ease-in;row-gap:var(--calendar-grid-gap-y);z-index:0}.day{display:grid;place-items:center;width:var(--calendar-cell-size);height:var(--calendar-cell-size);font-size:var(--calendar-cell-font-size);border-radius:var(--calendar-cell-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}.day.selected,.day.selected:hover .day.is-today.selected,.day.is-today.selected:hover{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected) !important}.day.disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.day.outside-month{color:var(--components-calendar-cell-text);opacity:var(--opacity-disabled)}.day.outside-month.selected{opacity:1 !important;color:var(--components-calendar-cell-text-selected)}.day.outside-month.in-range{opacity:0.5 !important;background-color:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range)}.day.outside-month.in-range:hover{opacity:0.7 !important;background-color:var(--components-calendar-cell-background-in-range)}.day.in-range{background:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range);border-radius:0;position:relative}.day.range-start,.day.range-start:focus,.day.range-start:hover,.day.range-end,.day.range-end:focus,.day.range-end:hover{background-color:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected) !important}.day.range-start,.day.range-end,.day.range-start.is-today,.day.range-end.is-today{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected);position:relative;border-radius:var(--radius-rounded-full)}.day.range-start:hover,.day.range-end:hover,.day.range-start.is-today:hover,.day.range-end.is-today:hover{color:var(--components-calendar-cell-text-today)}.day.range-start:before,.day.range-end:before,.day.range-start.is-today:before,.day.range-end.is-today:before{content:\"\";position:absolute;bottom:0;left:0;right:0;top:0;z-index:-1;background-color:var(--components-calendar-cell-background-in-range);border-radius:var(--radius-rounded-full);width:auto;height:auto}.day.range-start:has(~.range-end):before,.day.range-start:has(+.in-range):before{border-top-right-radius:0;border-bottom-right-radius:0}.day.range-end:before{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.day.outside-month.range-start,.day.outside-month.range-end{opacity:1 !important;background:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected)}.day.is-today{font-weight:700;position:relative;color:var(--components-calendar-cell-text-today)}.day.is-today.range-start,.day.is-today.range-end{color:var(--components-calendar-cell-text-selected)}.day.is-today.range-start:hover,.day.is-today.range-end:hover{color:var(--components-calendar-cell-text-today)}.day.is-today::after{content:\"\";position:absolute;bottom:var(--spacing-1);left:50%;transform:translateX(-50%);width:var(--calendar-cell-dot-size);height:var(--calendar-cell-dot-size);background-color:currentColor;border-radius:50%}.day.is-today.selected::after{color:var(--components-calendar-cell-text-selected)}.day.is-today.selected::after::after{background-color:var(--components-calendar-cell-dot-selected)}.calendar-footer{display:flex;gap:var(--spacing-1);justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-calendar-border);padding:var(--calendar-controls-padding-top) var(--calendar-padding) var(--calendar-padding);gap:var(--calendar-grid-gap-y);margin-top:var(--calendar-controls-margin-top)}.datepicker-actions{display:flex;justify-content:flex-end;gap:var(--spacing-1);width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:var(--spacing-1);margin-top:var(--spacing-4)}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}";
|
|
6535
|
+
const nvCalendarCss = "nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--components-calendar-background);border-radius:var(--calendar-radius);padding:var(--calendar-padding);box-shadow:0px var(--shadow-y-axis-md-1) var(--shadow-blur-md-1) var(--shadow-spread-md, 0) var(--shadow-color-opacity-0), 0px var(--shadow-y-axis-md-2) var(--shadow-blur-md-2) var(--shadow-spread-md, 0) var(--shadow-color-opacity-2);border:1px solid var(--components-calendar-border);width:auto;max-width:100%}.datepicker-container-single{max-width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:var(--calendar-gap-x);width:auto;overflow-x:hidden}.datepicker-wrapper::-webkit-scrollbar{width:6px;height:6px}.datepicker-wrapper::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}.datepicker-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:var(--calendar-padding);width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-calendar-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:start;align-items:center;margin-bottom:var(--calendar-header-margin-bottom);width:100%}.header nv-iconbutton{width:var(--calendar-header-button-size);height:var(--calendar-header-button-size)}.nav-buttons{display:flex;gap:var(--spacing-0);margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:var(--spacing-1);align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:start;flex-grow:1}.date-controls .month-select,.date-controls .year-input{background:transparent !important}.calendar-wrapper:nth-child(n+2) .datepicker-container{margin-left:42px}.calendar-grid{display:grid;grid-template-columns:auto 1fr;column-gap:var(--calendar-weeks-calendar-gap-x);position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:var(--calendar-cell-size) repeat(6, var(--calendar-cell-size));background:var(--components-calendar-weeks-background);color:var(--components-calendar-weeks-text);border-radius:var(--calendar-weeks-radius);width:var(--calendar-weeks-size);row-gap:var(--calendar-grid-gap-y)}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background-color:var(--components-calendar-weeks-background-hover);color:var(--components-calendar-weeks-text-hover);border-radius:var(--calendar-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:var(--calendar-cell-font-size)}.week-header{font-weight:700;color:var(--components-calendar-weeks-text)}.week-number{color:var(--components-calendar-cell-text)}.days-container{display:grid;grid-template-rows:auto 1fr;row-gap:var(--calendar-grid-gap-y)}.days-header{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));height:var(--calendar-cell-size)}.day-header{display:grid;place-items:center;font-size:var(--calendar-cell-font-size);color:var(--components-calendar-cell-text)}.days-grid{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));grid-template-rows:repeat(6, var(--calendar-cell-size));animation:fadeIn 0.2s ease-in;row-gap:var(--calendar-grid-gap-y);z-index:0}.day{display:grid;place-items:center;width:var(--calendar-cell-size);height:var(--calendar-cell-size);font-size:var(--calendar-cell-font-size);border-radius:var(--calendar-cell-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}.day.selected,.day.selected:hover .day.is-today.selected,.day.is-today.selected:hover{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected) !important}.day.disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.day.is-empty{pointer-events:none;background-color:transparent;border-color:transparent}.day.outside-month{color:var(--components-calendar-cell-text);opacity:var(--opacity-disabled)}.day.outside-month.selected{opacity:1 !important;color:var(--components-calendar-cell-text-selected)}.day.outside-month.in-range{opacity:0.5 !important;background-color:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range)}.day.outside-month.in-range:hover{opacity:0.7 !important;background-color:var(--components-calendar-cell-background-in-range)}.day.in-range{background:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range);border-radius:0;position:relative}.day.range-start,.day.range-start:focus,.day.range-start:hover,.day.range-end,.day.range-end:focus,.day.range-end:hover{background-color:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected) !important}.day.range-start,.day.range-end,.day.range-start.is-today,.day.range-end.is-today{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected);position:relative;border-radius:var(--radius-rounded-full)}.day.range-start:hover,.day.range-end:hover,.day.range-start.is-today:hover,.day.range-end.is-today:hover{color:var(--components-calendar-cell-text-today)}.day.range-start:before,.day.range-end:before,.day.range-start.is-today:before,.day.range-end.is-today:before{content:\"\";position:absolute;bottom:0;left:0;right:0;top:0;z-index:-1;background-color:var(--components-calendar-cell-background-in-range);border-radius:var(--radius-rounded-full);width:auto;height:auto}.day.range-start:has(~.range-end):before,.day.range-start:has(+.in-range):before{border-top-right-radius:0;border-bottom-right-radius:0}.day.range-end:before{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.day.outside-month.range-start,.day.outside-month.range-end{opacity:1 !important;background:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected)}.day.is-today{font-weight:700;position:relative;color:var(--components-calendar-cell-text-today)}.day.is-today.range-start,.day.is-today.range-end{color:var(--components-calendar-cell-text-selected)}.day.is-today.range-start:hover,.day.is-today.range-end:hover{color:var(--components-calendar-cell-text-today)}.day.is-today::after{content:\"\";position:absolute;bottom:var(--spacing-1);left:50%;transform:translateX(-50%);width:var(--calendar-cell-dot-size);height:var(--calendar-cell-dot-size);background-color:currentColor;border-radius:50%}.day.is-today.selected::after{color:var(--components-calendar-cell-text-selected)}.day.is-today.selected::after::after{background-color:var(--components-calendar-cell-dot-selected)}.calendar-footer{display:flex;gap:var(--spacing-1);justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-calendar-border);padding:var(--calendar-controls-padding-top) var(--calendar-padding) var(--calendar-padding);gap:var(--calendar-grid-gap-y);margin-top:var(--calendar-controls-margin-top)}.datepicker-actions{display:flex;justify-content:flex-end;gap:var(--spacing-1);width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:var(--spacing-1);margin-top:var(--spacing-4)}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}";
|
|
6156
6536
|
var NvCalendarStyle0 = nvCalendarCss;
|
|
6157
6537
|
|
|
6158
6538
|
/**
|
|
@@ -6474,7 +6854,7 @@ class NvCalendar {
|
|
|
6474
6854
|
* @param {number} totalCalendars - Number of calendars to display (1 by default)
|
|
6475
6855
|
* @returns {Array<{ dayOfMonth: number | null, date: Date | null, isSelected: boolean, isDisabled: boolean }>} Array of formatted days
|
|
6476
6856
|
*/
|
|
6477
|
-
this.getDaysInMonth = (offset = 0
|
|
6857
|
+
this.getDaysInMonth = (offset = 0) => {
|
|
6478
6858
|
const year = this.currentDate.getUTCFullYear();
|
|
6479
6859
|
const month = this.currentDate.getUTCMonth() + offset;
|
|
6480
6860
|
const firstDay = new Date(Date.UTC(year, month, 1));
|
|
@@ -6485,17 +6865,31 @@ class NvCalendar {
|
|
|
6485
6865
|
const dayOfWeekIndex = firstDay.getUTCDay(); // 0 = Sunday, 1 = Monday, etc.
|
|
6486
6866
|
// Adjust based on firstDayOfWeek (if week starts on Monday, offset is different)
|
|
6487
6867
|
const offsetDays = (dayOfWeekIndex - this.firstDayOfWeek + 7) % 7;
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
date,
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6868
|
+
const showPrevMonthDays = this.numberOfCalendars === 1 ||
|
|
6869
|
+
(this.numberOfCalendars > 1 && offset === 0);
|
|
6870
|
+
// Add the days of the previous month
|
|
6871
|
+
if (offsetDays > 0) {
|
|
6872
|
+
if (showPrevMonthDays) {
|
|
6873
|
+
const prevMonthLastDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
6874
|
+
for (let i = offsetDays; i > 0; i--) {
|
|
6875
|
+
const date = new Date(Date.UTC(year, month - 1, prevMonthLastDay - i + 1));
|
|
6876
|
+
days.push({
|
|
6877
|
+
dayOfMonth: date.getUTCDate(),
|
|
6878
|
+
date,
|
|
6879
|
+
isCurrentMonth: false,
|
|
6880
|
+
isDisabled: this.isDateDisabled(date),
|
|
6881
|
+
});
|
|
6882
|
+
}
|
|
6883
|
+
}
|
|
6884
|
+
else {
|
|
6885
|
+
for (let i = 0; i < offsetDays; i++) {
|
|
6886
|
+
days.push({
|
|
6887
|
+
dayOfMonth: null,
|
|
6888
|
+
date: null,
|
|
6889
|
+
isCurrentMonth: false,
|
|
6890
|
+
isDisabled: true,
|
|
6891
|
+
});
|
|
6892
|
+
}
|
|
6499
6893
|
}
|
|
6500
6894
|
}
|
|
6501
6895
|
// Add the days of the current month
|
|
@@ -6508,17 +6902,31 @@ class NvCalendar {
|
|
|
6508
6902
|
isDisabled: this.isDateDisabled(date),
|
|
6509
6903
|
});
|
|
6510
6904
|
}
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
date,
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6905
|
+
const showNextMonthDays = this.numberOfCalendars === 1 ||
|
|
6906
|
+
(this.numberOfCalendars > 1 && offset === this.numberOfCalendars - 1);
|
|
6907
|
+
// Add the days of the next month to fill the grid
|
|
6908
|
+
const nextMonthDaysNeeded = 7 - (days.length % 7 || 7);
|
|
6909
|
+
if (nextMonthDaysNeeded < 7) {
|
|
6910
|
+
if (showNextMonthDays) {
|
|
6911
|
+
for (let i = 1; i <= nextMonthDaysNeeded; i++) {
|
|
6912
|
+
const date = new Date(Date.UTC(year, month + 1, i));
|
|
6913
|
+
days.push({
|
|
6914
|
+
dayOfMonth: i,
|
|
6915
|
+
date,
|
|
6916
|
+
isCurrentMonth: false,
|
|
6917
|
+
isDisabled: this.isDateDisabled(date),
|
|
6918
|
+
});
|
|
6919
|
+
}
|
|
6920
|
+
}
|
|
6921
|
+
else {
|
|
6922
|
+
for (let i = 0; i < nextMonthDaysNeeded; i++) {
|
|
6923
|
+
days.push({
|
|
6924
|
+
dayOfMonth: null,
|
|
6925
|
+
date: null,
|
|
6926
|
+
isCurrentMonth: false,
|
|
6927
|
+
isDisabled: true,
|
|
6928
|
+
});
|
|
6929
|
+
}
|
|
6522
6930
|
}
|
|
6523
6931
|
}
|
|
6524
6932
|
return days;
|
|
@@ -6585,7 +6993,7 @@ class NvCalendar {
|
|
|
6585
6993
|
this.handleWeekSelection = (weekDays, calendarIndex) => {
|
|
6586
6994
|
if (this.selectionType !== 'range')
|
|
6587
6995
|
return;
|
|
6588
|
-
const allDays = this.getDaysInMonth(calendarIndex
|
|
6996
|
+
const allDays = this.getDaysInMonth(calendarIndex);
|
|
6589
6997
|
const weekStart = weekDays[0];
|
|
6590
6998
|
const weekEnd = weekDays[weekDays.length - 1];
|
|
6591
6999
|
if (!weekStart || !weekEnd)
|
|
@@ -6798,7 +7206,7 @@ class NvCalendar {
|
|
|
6798
7206
|
index,
|
|
6799
7207
|
/** Month offset */
|
|
6800
7208
|
offset) => {
|
|
6801
|
-
const days = this.getDaysInMonth(offset
|
|
7209
|
+
const days = this.getDaysInMonth(offset);
|
|
6802
7210
|
const weeks = [];
|
|
6803
7211
|
for (let i = 0; i < days.length; i += 7) {
|
|
6804
7212
|
weeks.push(days.slice(i, i + 7));
|
|
@@ -7002,8 +7410,8 @@ class NvCalendar {
|
|
|
7002
7410
|
* @slot default - Child content of the component.
|
|
7003
7411
|
*/
|
|
7004
7412
|
render() {
|
|
7005
|
-
return (hAsync(Host, { key: '
|
|
7006
|
-
this.hasActions) && (hAsync("div", { key: '
|
|
7413
|
+
return (hAsync(Host, { key: '089a80ab34e2bc3f31432437787578f6367fde7c' }, hAsync("div", { key: '9537a1a20798d8ff3cf53972154a4d7fb0156daf', class: "datepicker-root" }, hAsync("div", { key: '17a4630c184001b5fbea941540ee01b0bbf8b58d', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, hAsync("div", { key: '8d56891ebb52b251a013d6a640d472900b9b62e8', 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.shortcutsPlacement === 'bottom') ||
|
|
7414
|
+
this.hasActions) && (hAsync("div", { key: 'a7f53681fb23a9b80b8141de19c4decaec5e887b', class: "datepicker-controls" }, this.shortcutsPlacement === 'bottom' && this.renderShortcuts(), this.hasActions && this.renderActions())))), hAsync("slot", { key: '943aca0d1a5b2db40f59dfd8973d26b52b9ed312' })));
|
|
7007
7415
|
}
|
|
7008
7416
|
get el() { return getElement(this); }
|
|
7009
7417
|
static get watchers() { return {
|
|
@@ -7073,7 +7481,7 @@ class NvCol {
|
|
|
7073
7481
|
/****************************************************************************/
|
|
7074
7482
|
//#region RENDER
|
|
7075
7483
|
render() {
|
|
7076
|
-
return (hAsync(Host, { key: '
|
|
7484
|
+
return (hAsync(Host, { key: 'e258bc3e01d3bd35bf64f14241c70ae044fac132', class: clsx(this.getColSize()) }, hAsync("slot", { key: 'd36caf0fde38eae6cd37b62fb4c02e3de6b7225e' })));
|
|
7077
7485
|
}
|
|
7078
7486
|
static get style() { return NvColStyle0; }
|
|
7079
7487
|
static get cmpMeta() { return {
|
|
@@ -11574,7 +11982,7 @@ class NvDatagrid {
|
|
|
11574
11982
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
11575
11983
|
? []
|
|
11576
11984
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
11577
|
-
return (hAsync(Host, { key: '
|
|
11985
|
+
return (hAsync(Host, { key: 'b149279b85a3138e5be62b2f431a82fe5056b996' }, hAsync("div", { key: '84ffd6a613a7e51539f0bc7e5ddff16a1769af5a', class: "hidden" }, hAsync("slot", { key: 'cabafd2aab117816742972bd4eb6e7122c333ee9' })), hAsync("slot", { key: '17a26ba154ddc2dea82f7576878107ede55a2043', name: "before" }), this.enableGlobalFilter && this.table && (hAsync("div", { key: '822bb793cad6266810571dbb2c087c9e2b68958d', class: `search-container justify-${this.globalFilterPosition}` }, hAsync("nv-fieldtext", { key: 'b9fd668a09b602ded195e4d10b79ae3d06c9a0f6', value: this.globalFilterSearchTerm, onInput: this.handleGlobalFilteringOnInput, placeholder: "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
|
|
11578
11986
|
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (hAsync("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
11579
11987
|
return this.getHeaderCell(header);
|
|
11580
11988
|
}))))
|
|
@@ -11585,7 +11993,7 @@ class NvDatagrid {
|
|
|
11585
11993
|
return (hAsync("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
11586
11994
|
})));
|
|
11587
11995
|
}))), this.table && this.enableRowSelection ? (hAsync("tfoot", null, hAsync("tr", null, hAsync("td", { colSpan: 20 }, this.enableRowSelection && this.table ? (hAsync("div", null, this.rowSelectionState &&
|
|
11588
|
-
Object.keys(this.rowSelectionState).length > 0 ? (hAsync("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', ((_e = (_d = this.table.getPreFilteredRowModel()) === null || _d === void 0 ? void 0 : _d.rows) === null || _e === void 0 ? void 0 : _e.length) || 0, ' ', "Total Rows Selected")) : (hAsync("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), hAsync("slot", { key: '
|
|
11996
|
+
Object.keys(this.rowSelectionState).length > 0 ? (hAsync("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', ((_e = (_d = this.table.getPreFilteredRowModel()) === null || _d === void 0 ? void 0 : _d.rows) === null || _e === void 0 ? void 0 : _e.length) || 0, ' ', "Total Rows Selected")) : (hAsync("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), hAsync("slot", { key: 'f509745423857527f2983c5cce1289441cc1f7c7', name: "after" })));
|
|
11589
11997
|
}
|
|
11590
11998
|
get el() { return getElement(this); }
|
|
11591
11999
|
static get watchers() { return {
|
|
@@ -11650,7 +12058,7 @@ class NvDatagridcolumn {
|
|
|
11650
12058
|
/****************************************************************************/
|
|
11651
12059
|
//#region RENDER
|
|
11652
12060
|
render() {
|
|
11653
|
-
return (hAsync(Host, { key: '
|
|
12061
|
+
return (hAsync(Host, { key: '49c4b8807b26a76cf26e9ac9567a5bca7de0aee7' }, hAsync("slot", { key: '9e6c8b69a92fe4caec10025c941e39f1266b4f93', name: "header" }), hAsync("slot", { key: '992fa9c1d00fe8ed65df5ad2157b78140d2794a0', name: "cell" })));
|
|
11654
12062
|
}
|
|
11655
12063
|
static get cmpMeta() { return {
|
|
11656
12064
|
"$flags$": 4,
|
|
@@ -12282,7 +12690,7 @@ function v4(options, buf, offset) {
|
|
|
12282
12690
|
return unsafeStringify(rnds);
|
|
12283
12691
|
}
|
|
12284
12692
|
|
|
12285
|
-
const nvDialogCss = "dialog{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:400px;width:fit-content;max-width:clamp(90vw, min(90vw, 960px), 960px);margin:auto;max-height:90vh;overflow:hidden;box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}dialog.full{width:90vw}dialog::backdrop{opacity:var(--components-overlay-opacity);background:var(--components-overlay-background)}dialog .content{display:flex;flex-direction:column;align-items:flex-start;height:fit-content;max-height:90vh;overflow:hidden}dialog .content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}dialog .content .content-body{overflow:auto;box-sizing:border-box;padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);scrollbar-gutter:stable both-edges;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:400;line-height:var(--line-height-base);color:var(--color-content-medium-text)}dialog .content .content-body::-webkit-scrollbar{width:6px;height:6px}dialog .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}dialog .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}";
|
|
12693
|
+
const nvDialogCss = "dialog{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:min(90vw, 400px);width:fit-content;max-width:clamp(90vw, min(90vw, 960px), 960px);margin:auto;max-height:90vh;overflow:hidden;box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}dialog.full{width:90vw}dialog::backdrop{opacity:var(--components-overlay-opacity);background:var(--components-overlay-background)}dialog .content{display:flex;flex-direction:column;align-items:flex-start;height:fit-content;max-height:90vh;overflow:hidden}dialog .content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}dialog .content .content-body{overflow:auto;box-sizing:border-box;padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);scrollbar-gutter:stable both-edges;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:400;line-height:var(--line-height-base);color:var(--color-content-medium-text)}dialog .content .content-body::-webkit-scrollbar{width:6px;height:6px}dialog .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}dialog .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}";
|
|
12286
12694
|
var NvDialogStyle0 = nvDialogCss;
|
|
12287
12695
|
|
|
12288
12696
|
/**
|
|
@@ -12317,6 +12725,11 @@ class NvDialog {
|
|
|
12317
12725
|
* If true, the dialog takes full width styling.
|
|
12318
12726
|
*/
|
|
12319
12727
|
this.full = false;
|
|
12728
|
+
/**
|
|
12729
|
+
* Controls whether the dialog should automatically focus the first focusable element when opened.
|
|
12730
|
+
* When disabled, prevents unwanted tooltip triggers on dialog open.
|
|
12731
|
+
*/
|
|
12732
|
+
this.autofocus = false;
|
|
12320
12733
|
/**
|
|
12321
12734
|
* Handles the close button click.
|
|
12322
12735
|
*/
|
|
@@ -12424,15 +12837,23 @@ class NvDialog {
|
|
|
12424
12837
|
}
|
|
12425
12838
|
/**
|
|
12426
12839
|
* Prevents the body from scrolling when the dialog is open.
|
|
12840
|
+
* Compensates for scrollbar width to prevent layout shift.
|
|
12427
12841
|
*/
|
|
12428
12842
|
preventScroll() {
|
|
12429
|
-
|
|
12843
|
+
// Calculate scrollbar width
|
|
12844
|
+
const scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
12845
|
+
// Apply overflow hidden and padding compensation
|
|
12846
|
+
document.documentElement.style.overflow = 'hidden';
|
|
12847
|
+
document.documentElement.style.paddingRight = `${scrollBarWidth}px`;
|
|
12430
12848
|
}
|
|
12431
12849
|
/**
|
|
12432
12850
|
* Allows the body to scroll when the dialog is closed.
|
|
12851
|
+
* Removes the applied overflow and padding styles.
|
|
12433
12852
|
*/
|
|
12434
12853
|
allowScroll() {
|
|
12435
|
-
|
|
12854
|
+
// Remove the applied styles
|
|
12855
|
+
document.documentElement.style.removeProperty('overflow');
|
|
12856
|
+
document.documentElement.style.removeProperty('padding-right');
|
|
12436
12857
|
}
|
|
12437
12858
|
ensureFormId(formElement) {
|
|
12438
12859
|
if (!formElement.id) {
|
|
@@ -12509,8 +12930,8 @@ class NvDialog {
|
|
|
12509
12930
|
if (this.open) {
|
|
12510
12931
|
this.show();
|
|
12511
12932
|
}
|
|
12512
|
-
//
|
|
12513
|
-
if (!this.dialogElement.querySelector('[autofocus]')) {
|
|
12933
|
+
// Only set autofocus if the prop is true and no element already has autofocus
|
|
12934
|
+
if (this.autofocus && !this.dialogElement.querySelector('[autofocus]')) {
|
|
12514
12935
|
this.setAutofocus();
|
|
12515
12936
|
}
|
|
12516
12937
|
this.attachEventListeners();
|
|
@@ -12529,7 +12950,7 @@ class NvDialog {
|
|
|
12529
12950
|
//#region RENDER
|
|
12530
12951
|
render() {
|
|
12531
12952
|
const hasForm = this.form || this.el.querySelector('form');
|
|
12532
|
-
return (hAsync(Host, { key: '
|
|
12953
|
+
return (hAsync(Host, { key: '8e4a46dd7749656670d5b8eb167aae2108644375' }, hAsync("slot", { key: '954980e2b451c9f5c0e4f09df76c62c1f04ab01e', name: "trigger" }), hAsync("dialog", { key: '8541ad521ae348d26764756e45c668f7aab5c278', 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: 'cd07e78da6f5cb3abd14640b941629bff034ec63', class: "content" }, !this.undismissable && (hAsync("nv-button", { key: '5b610a9d30acd450a273e9dc10a4a29bdf85d58c', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleCloseButton, "aria-label": "Close dialog" }, hAsync("nv-icon", { key: '4e5841c525221c6c23c699deaeefa7492f57e091', name: "x", size: "sm" }))), this.headerElement ? (hAsync("slot", { name: "header" })) : (hAsync("nv-dialogheader", { id: "dialog-header" })), hAsync("div", { key: 'f09fd0f7013b1c2c912ed7958a8a9cab0016858b', class: "content-body", id: "dialog-content" }, hAsync("slot", { key: 'c3c196c3e8f40acbb29f3fa89d1620e7beaad10c' })), this.footerElement ? (hAsync("slot", { name: "footer" })) : (hAsync("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? ButtonType.Submit : ButtonType.Button, onDialogCanceled: this.handleCancelButton, undismissable: this.undismissable }))))));
|
|
12533
12954
|
}
|
|
12534
12955
|
get el() { return getElement(this); }
|
|
12535
12956
|
static get watchers() { return {
|
|
@@ -12548,12 +12969,13 @@ class NvDialog {
|
|
|
12548
12969
|
"clickOutside": [516, "click-outside"],
|
|
12549
12970
|
"controlled": [516],
|
|
12550
12971
|
"full": [516],
|
|
12972
|
+
"autofocus": [516],
|
|
12551
12973
|
"show": [64],
|
|
12552
12974
|
"close": [64]
|
|
12553
12975
|
},
|
|
12554
12976
|
"$listeners$": [[4, "keydown", "handleKeyDown"], [4, "click", "handleDocumentClick"], [5, "touchstart", "handleDocumentTouch"]],
|
|
12555
12977
|
"$lazyBundleId$": "-",
|
|
12556
|
-
"$attrsToReflect$": [["open", "open"], ["undismissable", "undismissable"], ["clickOutside", "click-outside"], ["controlled", "controlled"], ["full", "full"]]
|
|
12978
|
+
"$attrsToReflect$": [["open", "open"], ["undismissable", "undismissable"], ["clickOutside", "click-outside"], ["controlled", "controlled"], ["full", "full"], ["autofocus", "autofocus"]]
|
|
12557
12979
|
}; }
|
|
12558
12980
|
}
|
|
12559
12981
|
|
|
@@ -12645,7 +13067,7 @@ class NvDialogfooter {
|
|
|
12645
13067
|
/****************************************************************************/
|
|
12646
13068
|
//#region RENDER
|
|
12647
13069
|
render() {
|
|
12648
|
-
return (hAsync(Host, { key: '
|
|
13070
|
+
return (hAsync(Host, { key: '278895398ddd9fd6aaf6da3d0cbcad12d628f908' }, !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))));
|
|
12649
13071
|
}
|
|
12650
13072
|
static get formAssociated() { return true; }
|
|
12651
13073
|
get el() { return getElement(this); }
|
|
@@ -12701,7 +13123,7 @@ class NvDialogheader {
|
|
|
12701
13123
|
/****************************************************************************/
|
|
12702
13124
|
//#region RENDER
|
|
12703
13125
|
render() {
|
|
12704
|
-
return (hAsync(Host, { key: '
|
|
13126
|
+
return (hAsync(Host, { key: '2ace10c91041456a36909763b62a2adeede183c7' }, !this.hasSlot ? (hAsync(Fragment, null, hAsync("div", { class: "heading" }, this.heading), hAsync("div", { class: "subheading" }, this.subheading))) : (hAsync("slot", null))));
|
|
12705
13127
|
}
|
|
12706
13128
|
get el() { return getElement(this); }
|
|
12707
13129
|
static get style() { return NvDialogheaderStyle0; }
|
|
@@ -12838,13 +13260,13 @@ class NvFieldcheckbox {
|
|
|
12838
13260
|
/****************************************************************************/
|
|
12839
13261
|
//#region RENDER
|
|
12840
13262
|
render() {
|
|
12841
|
-
return (hAsync(Host, { key: '
|
|
13263
|
+
return (hAsync(Host, { key: 'cfb710b2af0ea4442d1c2011d8414c6987a98117', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, hAsync("div", { key: 'a463fa87357a91d71941a265d3daf735abf3a36f', class: "input-container" }, hAsync("input", { key: '0dd7db02107246b427a1e78d8c36068debff85bd', 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 => {
|
|
12842
13264
|
if (el) {
|
|
12843
13265
|
el.indeterminate = this.indeterminate;
|
|
12844
13266
|
}
|
|
12845
|
-
} }), hAsync("span", { key: '
|
|
12846
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
12847
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13267
|
+
} }), hAsync("span", { key: 'a7ee7c812df54bbf91ac6c92e786d4895faa29d4', class: "icon" }, this.checked && !this.indeterminate && (hAsync("slot", { key: 'fe06ae9b2416f08c1889c86d47d0207af6ded057', name: "checked-icon" }, hAsync("svg", { key: '96a1c7a8113f160e4c9fc4ec23ad28f1359151b4', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, hAsync("path", { key: '37c61f5f7cda8c91f1f5d44781b8326c216eca2a', d: "M11.6667 3.5L5.25004 9.91667L2.33337 7", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.indeterminate && (hAsync("slot", { key: '276fcac2c23f7f278aa1576fa1f79393263812a6', name: "indeterminate-icon" }, hAsync("svg", { key: 'fcc8e138e98413b0e30e7744f7eeb1e72ca69876', class: "indeterminate-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, hAsync("path", { key: 'd6b6146dc3d3ff52939d644439f8eb92ba9aad64', d: "M2.9165 7H11.0832", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), hAsync("div", { key: 'a13aa3a0a671e6442e0c46c267596deb494d4da9', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '2c2aa68889b6cdd278a99872364336c54f71e96a', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: 'edd654aa92145a0f24fb56b447c8f6d7839fb329', name: "label" }, this.label))), (this.description ||
|
|
13268
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '1c4fe0f3c27aa59ed6059c91abb7ad060f21baf5', class: "description" }, hAsync("slot", { key: '109955006fefe62ec784bd5d6f3642efc732eb51', name: "description" }, this.description))), (this.errorDescription ||
|
|
13269
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'b86fae37461b9afca6168b8d049293efb395828f', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '6225f886e6aee38026a4aaf93644a76e70b7ee01', name: "error-description" }, this.errorDescription))))));
|
|
12848
13270
|
}
|
|
12849
13271
|
static get formAssociated() { return true; }
|
|
12850
13272
|
get el() { return getElement(this); }
|
|
@@ -16637,10 +17059,12 @@ var inputmask = {exports: {}};
|
|
|
16637
17059
|
|
|
16638
17060
|
var Inputmask = /*@__PURE__*/getDefaultExportFromCjs(inputmask.exports);
|
|
16639
17061
|
|
|
16640
|
-
const nvFielddateCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fielddate{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fielddate[fluid]:not([fluid=false]){max-width:unset}nv-fielddate[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fielddate[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fielddate[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fielddate[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fielddate label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fielddate nv-popover{width:100%;display:block}nv-fielddate nv-popover [data-scope=popover]{padding:0;background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:auto}nv-fielddate nv-popover [slot=content]{display:block;width:100%}nv-fielddate nv-popover .datepicker-container{border:none}nv-fielddate .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;display:flex;align-items:center;gap:8px}nv-fielddate .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fielddate .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddate .input-wrapper .input-container:focus-within,nv-fielddate .input-wrapper .input-container:focus-within:hover,nv-fielddate .input-wrapper .input-container:focus,nv-fielddate .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fielddate .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fielddate .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddate .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;}nv-fielddate .input-wrapper .input-container input:focus{outline:none}nv-fielddate .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fielddate .input-wrapper .input-container input[type=password]::-ms-clear,nv-fielddate .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddate .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddate .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddate .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddate .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fielddate .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
17062
|
+
const nvFielddateCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fielddate{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fielddate[fluid]:not([fluid=false]){max-width:unset}nv-fielddate[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fielddate[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fielddate[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fielddate[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fielddate label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fielddate nv-popover{width:100%;display:block}nv-fielddate nv-popover [data-scope=popover]{padding:0;background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:auto}nv-fielddate nv-popover [slot=content]{display:block;width:100%}nv-fielddate nv-popover .datepicker-container{border:none}nv-fielddate .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;display:flex;align-items:center;gap:8px}nv-fielddate .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fielddate .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddate .input-wrapper .input-container:focus-within,nv-fielddate .input-wrapper .input-container:focus-within:hover,nv-fielddate .input-wrapper .input-container:focus,nv-fielddate .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fielddate .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fielddate .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddate .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;font-feature-settings:\"tnum\";font-family:\"TTNorms Pro Mono\", monospace}nv-fielddate .input-wrapper .input-container input:focus{outline:none}nv-fielddate .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fielddate .input-wrapper .input-container input[type=password]::-ms-clear,nv-fielddate .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddate .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddate .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddate .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddate .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fielddate .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
16641
17063
|
var NvFielddateStyle0 = nvFielddateCss;
|
|
16642
17064
|
|
|
16643
17065
|
/**
|
|
17066
|
+
* A field date component that combines an input with a calendar popover.
|
|
17067
|
+
*
|
|
16644
17068
|
* @slot default - Child content of the component.
|
|
16645
17069
|
* @slot leading-input - Content to be placed before the input text, within the input container.
|
|
16646
17070
|
* @slot before-input - Content to be placed before the input text, outside the input container.
|
|
@@ -16764,10 +17188,7 @@ class NvFielddate {
|
|
|
16764
17188
|
this.inputElement.focus();
|
|
16765
17189
|
// Select the first characters based on the date format
|
|
16766
17190
|
const format = this.dateFormat;
|
|
16767
|
-
if (format.startsWith('DD')) {
|
|
16768
|
-
this.inputElement.setSelectionRange(0, 2);
|
|
16769
|
-
}
|
|
16770
|
-
else if (format.startsWith('MM')) {
|
|
17191
|
+
if (format.startsWith('DD') || format.startsWith('MM')) {
|
|
16771
17192
|
this.inputElement.setSelectionRange(0, 2);
|
|
16772
17193
|
}
|
|
16773
17194
|
else if (format.startsWith('YYYY')) {
|
|
@@ -16794,13 +17215,66 @@ class NvFielddate {
|
|
|
16794
17215
|
}
|
|
16795
17216
|
};
|
|
16796
17217
|
/**
|
|
16797
|
-
*
|
|
17218
|
+
* Initializes the input mask.
|
|
16798
17219
|
*/
|
|
16799
|
-
this.
|
|
16800
|
-
|
|
17220
|
+
this.initializeInputMask = () => {
|
|
17221
|
+
this.currentPlaceholder = '';
|
|
17222
|
+
if (this.inputElement.inputmask) {
|
|
16801
17223
|
return;
|
|
16802
17224
|
}
|
|
16803
|
-
|
|
17225
|
+
const inputMask = new Inputmask({
|
|
17226
|
+
alias: 'datetime',
|
|
17227
|
+
inputFormat: this.convertToInputmaskFormat(this.dateFormat),
|
|
17228
|
+
placeholder: ' ',
|
|
17229
|
+
prefillYear: false,
|
|
17230
|
+
clearIncomplete: false,
|
|
17231
|
+
showMaskOnHover: false,
|
|
17232
|
+
showMaskOnFocus: false,
|
|
17233
|
+
clearMaskOnLostFocus: false,
|
|
17234
|
+
insertMode: true,
|
|
17235
|
+
rightAlign: false,
|
|
17236
|
+
oncomplete: function (e) {
|
|
17237
|
+
const input = e.target;
|
|
17238
|
+
const event = new CustomEvent('input', { bubbles: true });
|
|
17239
|
+
input.dispatchEvent(event);
|
|
17240
|
+
},
|
|
17241
|
+
});
|
|
17242
|
+
inputMask.mask(this.inputElement);
|
|
17243
|
+
// Set the value after applying the mask
|
|
17244
|
+
if (this.inputElement.name === this.name && this.singleValue) {
|
|
17245
|
+
requestAnimationFrame(() => {
|
|
17246
|
+
this.inputElement.value = this.singleValue;
|
|
17247
|
+
const event = new CustomEvent('input', { bubbles: true });
|
|
17248
|
+
this.inputElement.dispatchEvent(event);
|
|
17249
|
+
});
|
|
17250
|
+
}
|
|
17251
|
+
};
|
|
17252
|
+
/**
|
|
17253
|
+
* Handles keydown events on the input before the mask is initialized.
|
|
17254
|
+
* Initializes the mask on the first number input.
|
|
17255
|
+
* @param {KeyboardEvent} event - The keyboard event.
|
|
17256
|
+
*/
|
|
17257
|
+
this.handleKeydownBeforeMask = (event) => {
|
|
17258
|
+
const allowedKeys = [
|
|
17259
|
+
'Backspace',
|
|
17260
|
+
'Delete',
|
|
17261
|
+
'Tab',
|
|
17262
|
+
'ArrowLeft',
|
|
17263
|
+
'ArrowRight',
|
|
17264
|
+
'ArrowUp',
|
|
17265
|
+
'ArrowDown',
|
|
17266
|
+
'Home',
|
|
17267
|
+
'End',
|
|
17268
|
+
];
|
|
17269
|
+
if (/\d/.test(event.key)) {
|
|
17270
|
+
this.initializeInputMask();
|
|
17271
|
+
this.inputElement.removeEventListener('keydown', this.handleKeydownBeforeMask);
|
|
17272
|
+
}
|
|
17273
|
+
else if (!allowedKeys.includes(event.key) &&
|
|
17274
|
+
!event.metaKey &&
|
|
17275
|
+
!event.ctrlKey) {
|
|
17276
|
+
event.preventDefault();
|
|
17277
|
+
}
|
|
16804
17278
|
};
|
|
16805
17279
|
/**
|
|
16806
17280
|
* Handles focus events on the input element.
|
|
@@ -16812,6 +17286,16 @@ class NvFielddate {
|
|
|
16812
17286
|
event.target.blur();
|
|
16813
17287
|
return;
|
|
16814
17288
|
}
|
|
17289
|
+
if (!this.inputElement.inputmask) {
|
|
17290
|
+
this.inputElement.addEventListener('keydown', this.handleKeydownBeforeMask);
|
|
17291
|
+
}
|
|
17292
|
+
this.open = true;
|
|
17293
|
+
};
|
|
17294
|
+
/**
|
|
17295
|
+
* Handles blur events on the input element.
|
|
17296
|
+
*/
|
|
17297
|
+
this.handleBlur = () => {
|
|
17298
|
+
this.inputElement.removeEventListener('keydown', this.handleKeydownBeforeMask);
|
|
16815
17299
|
};
|
|
16816
17300
|
/**
|
|
16817
17301
|
* Prevents the valueChanged event from the calendar from propagating up.
|
|
@@ -16834,6 +17318,15 @@ class NvFielddate {
|
|
|
16834
17318
|
this.setInputRef = (el) => {
|
|
16835
17319
|
this.inputElement = el;
|
|
16836
17320
|
};
|
|
17321
|
+
/**
|
|
17322
|
+
* Toggles the opening/closing of the popover.
|
|
17323
|
+
*/
|
|
17324
|
+
this.toggleCalendar = () => {
|
|
17325
|
+
if (this.readonly || this.disabled) {
|
|
17326
|
+
return;
|
|
17327
|
+
}
|
|
17328
|
+
this.open = !this.open;
|
|
17329
|
+
};
|
|
16837
17330
|
}
|
|
16838
17331
|
//#endregion PROPERTIES
|
|
16839
17332
|
/****************************************************************************/
|
|
@@ -16844,20 +17337,18 @@ class NvFielddate {
|
|
|
16844
17337
|
* @returns {string} Format adapted for Inputmask.
|
|
16845
17338
|
*/
|
|
16846
17339
|
convertToInputmaskFormat(format) {
|
|
16847
|
-
|
|
16848
|
-
|
|
16849
|
-
|
|
16850
|
-
case 'MM/DD/YYYY':
|
|
16851
|
-
return 'mm/dd/yyyy';
|
|
16852
|
-
case 'YYYY-MM-DD':
|
|
16853
|
-
return 'yyyy-mm-dd';
|
|
16854
|
-
case 'DD.MM.YYYY':
|
|
16855
|
-
return 'dd.mm.yyyy';
|
|
16856
|
-
case 'YYYYMMDD':
|
|
16857
|
-
return 'yyyymmdd';
|
|
16858
|
-
default:
|
|
16859
|
-
return format;
|
|
17340
|
+
// If the format is not specified, use the default format
|
|
17341
|
+
if (!format) {
|
|
17342
|
+
return 'dd/mm/yyyy';
|
|
16860
17343
|
}
|
|
17344
|
+
const formatMap = {
|
|
17345
|
+
'DD/MM/YYYY': 'dd/mm/yyyy',
|
|
17346
|
+
'MM/DD/YYYY': 'mm/dd/yyyy',
|
|
17347
|
+
'YYYY-MM-DD': 'yyyy-mm-dd',
|
|
17348
|
+
'DD.MM.YYYY': 'dd.mm.yyyy',
|
|
17349
|
+
'YYYYMMDD': 'yyyymmdd',
|
|
17350
|
+
};
|
|
17351
|
+
return formatMap[format] || 'dd/mm/yyyy';
|
|
16861
17352
|
}
|
|
16862
17353
|
//#endregion METHODS
|
|
16863
17354
|
/****************************************************************************/
|
|
@@ -16869,19 +17360,17 @@ class NvFielddate {
|
|
|
16869
17360
|
if (this.value) {
|
|
16870
17361
|
this.singleValue = this.value;
|
|
16871
17362
|
}
|
|
17363
|
+
this.currentPlaceholder = this.placeholder || this.dateFormat;
|
|
16872
17364
|
}
|
|
16873
17365
|
componentDidLoad() {
|
|
16874
|
-
|
|
16875
|
-
inputs.forEach((input) => {
|
|
16876
|
-
Inputmask({
|
|
16877
|
-
alias: 'datetime',
|
|
16878
|
-
inputFormat: this.convertToInputmaskFormat(this.dateFormat),
|
|
16879
|
-
placeholder: '_'.repeat(this.dateFormat.length),
|
|
16880
|
-
}).mask(input);
|
|
16881
|
-
});
|
|
17366
|
+
// Inputmask is now initialized on the first keypress
|
|
16882
17367
|
}
|
|
16883
17368
|
disconnectedCallback() {
|
|
16884
17369
|
document.removeEventListener('click', this.handleClickOutside);
|
|
17370
|
+
if (this.inputElement &&
|
|
17371
|
+
this.inputElement.inputmask) {
|
|
17372
|
+
this.inputElement.inputmask.remove();
|
|
17373
|
+
}
|
|
16885
17374
|
}
|
|
16886
17375
|
/**
|
|
16887
17376
|
* Handles the single date selection event from nv-calendar.
|
|
@@ -16926,12 +17415,12 @@ class NvFielddate {
|
|
|
16926
17415
|
/****************************************************************************/
|
|
16927
17416
|
//#region RENDER
|
|
16928
17417
|
render() {
|
|
16929
|
-
return (hAsync(Host, { key: '
|
|
16930
|
-
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '
|
|
17418
|
+
return (hAsync(Host, { key: 'c9f29e6997cf07a03f43e3cc2d8263201829c9c4' }, ((this.label && this.label.length > 0) ||
|
|
17419
|
+
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '0c12a1773e75621cb7f2c6fbd944405cb444a9e6', htmlFor: this.inputId }, hAsync("slot", { key: '0fdd5a226a5db7ac15be968f42e375f89031235f', name: "label" }, this.label))), hAsync("nv-popover", { key: 'dd0dcf5576026e0b565db34d2a2eafd9e6188127', ref: this.setPopoverRef, id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: 'a4c7623e8d72ecc847567be060e8c3db04879062', slot: "trigger", class: "input-wrapper" }, hAsync("slot", { key: 'e270dac5a26904db3d0966871bc10d7c68064e87', name: "before-input" }), hAsync("div", { key: '8d277b89e591249910c9eeae754837ce079de47f', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '964769b29c4d9119365bf59255180e84ae32b195', name: "leading-input" }), hAsync("input", { key: '41f0f565b4854e7907a5a8972d5ce265e587b7f0', id: this.inputId, ref: this.setInputRef, placeholder: this.currentPlaceholder, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.singleValue, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, "data-scope": "date" }), this.error && (hAsync("nv-icon", { key: '32d5ffac3789d9b3598811605eccfb1207c4e850', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '4e88c90987c12199512d77c24205bc2f67c3b8d1', name: "circle-check", class: "validation", size: "md" })), hAsync("nv-iconbutton", { key: 'e169bdd9742569cdcdc087d29ee13f9c097907a9', class: "toggle-calendar-icon", name: "calendar" //{this.open ? 'chevron-top' : 'chevron-down'}
|
|
16931
17420
|
,
|
|
16932
|
-
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: '
|
|
16933
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
16934
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
17421
|
+
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: '897e5ba6a908c96fdc55bdd522be3f04e9dd14f8', name: "after-input" })), hAsync("div", { key: '6fcb101108ea4536654c2e6204416f899c9f0a04', slot: "content" }, hAsync("nv-calendar", { key: 'd4d7c823ad832ed1c8430b041eacaa1db5633a9f', 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, onValueChanged: this.handleCalendarValueChanged }))), ((this.description && this.description.length > 0) ||
|
|
17422
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'f76d5dde2222f39883b59a86fe4237818040e03c', class: "description" }, hAsync("slot", { key: 'de07e1ee885a5804b352dba6a37898bba500b731', name: "description" }, this.description))), (this.errorDescription ||
|
|
17423
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'b7dbb4406ee38548f8751f9425a800577f3a3cb2', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (hAsync("slot", { name: "error-description" })) : (this.errorDescription))), hAsync("slot", { key: 'a0170ef43d415238e57f29f985329e40f8ed0c2a' })));
|
|
16935
17424
|
}
|
|
16936
17425
|
get el() { return getElement(this); }
|
|
16937
17426
|
static get watchers() { return {
|
|
@@ -16968,6 +17457,7 @@ class NvFielddate {
|
|
|
16968
17457
|
"disabledDates": [16],
|
|
16969
17458
|
"fluid": [516],
|
|
16970
17459
|
"singleValue": [32],
|
|
17460
|
+
"currentPlaceholder": [32],
|
|
16971
17461
|
"open": [32]
|
|
16972
17462
|
},
|
|
16973
17463
|
"$listeners$": [[0, "singleDateChange", "handleSingleDateChange"], [0, "closePopover", "handleClosePopover"], [0, "keydown", "handleKeyDown"]],
|
|
@@ -17425,10 +17915,10 @@ class NvFielddaterange {
|
|
|
17425
17915
|
/****************************************************************************/
|
|
17426
17916
|
//#region RENDER
|
|
17427
17917
|
render() {
|
|
17428
|
-
return (hAsync(Host, { key: '
|
|
17429
|
-
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '
|
|
17430
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
17431
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
17918
|
+
return (hAsync(Host, { key: 'b2033314494faca72c310df329eab3918fe6935e' }, ((this.label && this.label.length > 0) ||
|
|
17919
|
+
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '22e0af3e24bada8d859bcf42de0dfcedff9f5988', htmlFor: this.startInputId }, hAsync("slot", { key: '8eb3e4e1a4c67c0d9cd014aa2c73b6fc2ecb1a8f', name: "label" }, this.label))), hAsync("nv-popover", { key: 'f9c722e792ba69738df080975f78ea3dfeb40f07', ref: el => (this.popoverElement = el), id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: '805c98d4a9e1defc74c0b751691e413dfbcfa736', slot: "trigger", class: "input-wrapper" }, hAsync("slot", { key: 'd84ddf0a0732a68392c79baab9cde23be6b1b27e', name: "before-input" }), hAsync("div", { key: '4f3cfab2e9a83dacc0f950bc319192b568f90258', class: "input-container" }, hAsync("slot", { key: '2d8dd5e11369dc9bd1894e299f96b41806295568', name: "leading-input" }), hAsync("div", { key: 'b60b40b275099441071b130bed7d097e8c1dcbcb', class: "range-inputs" }, hAsync("input", { key: 'b7c647676fa5e48d51e7b7f1cf83e4a0275805ec', id: this.startInputId, type: "text", placeholder: this.startPlaceholder, name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), hAsync("div", { key: '3e63ececeeff713f51db0a47e3d3b4f305e6fc66', class: "range-separator" }), hAsync("input", { key: '1c54a2e3f43ad077bfe9e9b17886300d06840bfd', 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, "data-scope": "date-range" })), this.error && (hAsync("nv-icon", { key: '971b363f7fafbaeba65a161c1d7792d2bcacacf6', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '0f498b287b4c9ad9f83a0d380c522441b8afdf6e', name: "circle-check", class: "validation", size: "md" })), hAsync("nv-iconbutton", { key: '257549f7c201391c083f28f1b89ffa3a439f268c', 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: '7be106f2f1500839e899d6f9c6f3705398cadd1a', name: "after-input" })), hAsync("div", { key: 'd2c56635c83628f37f0c1ec127bfeaca5fb78b90', slot: "content" }, hAsync("nv-calendar", { key: '4ec9eea45e030463c2df0115a0cfd6453da66f01', ref: el => (this.calendarElement = el), dateFormat: this.dateFormat, value: this.value, 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", "data-prevent-navigation": "true" }))), ((this.description && this.description.length > 0) ||
|
|
17920
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'a624ba699b3b7a7bb4d26725fe451ecd5df1f5a2', class: "description" }, hAsync("slot", { key: 'f2c3666075730a248e57c748b32df33a59f3777e', name: "description" }, this.description))), (this.errorDescription ||
|
|
17921
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'e2c1f8816b896d00e2c4ba8b32bc28380630ecad', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (hAsync("slot", { name: "error-description" })) : (this.errorDescription))), hAsync("slot", { key: 'cee75865d222324b8d7f3144ba2facaefcaf1d35' })));
|
|
17432
17922
|
}
|
|
17433
17923
|
get el() { return getElement(this); }
|
|
17434
17924
|
static get watchers() { return {
|
|
@@ -17839,9 +18329,9 @@ class NvFielddropdown {
|
|
|
17839
18329
|
//#region RENDER
|
|
17840
18330
|
render() {
|
|
17841
18331
|
var _a;
|
|
17842
|
-
return (hAsync(Host, { key: '
|
|
17843
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
17844
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
18332
|
+
return (hAsync(Host, { key: 'a4de1529678c493e92022229993443c93533f0a4', role: "combobox", "aria-expanded": this.open.toString(), "aria-haspopup": "listbox", "aria-label": this.label }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '6bf4ff6df1b4c62304ac623bea21554779b1bcfa', htmlFor: this.inputId }, hAsync("slot", { key: '10bd19c28259c033ad2b8c9601655da9723bdbd0', name: "label" }, this.label))), hAsync("nv-popover", { key: 'fc85eb3c9d72a90f47c6fcfbbf6f6cc234fa8df1', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: '6a7f4be2cdfd6399ce79f4cd7b0dc9abfd3a1c74', class: "input-wrapper", slot: "trigger" }, hAsync("slot", { key: '97e82c45801d338456d81601fb147e235dd604d4', name: "before-input" }), hAsync("div", { key: 'd6f3d6ca42acc7c14689fedac22328c53d2a61af', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: 'd48c3800aa174716eb4bf4a81e545fabeb73d187', 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: 'f01cf253ba3f31ff0269ecdf36d7d1e3249039a8', name: "x", size: "md", emphasis: "lower", class: "clear-button", onClick: this.clearFilter, "aria-label": "Clear input" })), this.error && (hAsync("nv-icon", { key: '10b828451cf4a177a3580d2d01080036a25e9692', name: "alert-circle", class: "validation", size: "md" })), hAsync("nv-iconbutton", { key: '94edaa4e3ce5f80021db58bc5fa087424d4bf7d3', "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: '25e76d6ecfcff7514d2dfb970387f2af23506b40', name: "after-input" })), hAsync("div", { key: '58c6e1de57d31f1827e9bf24da62f5801f8c99b9', slot: "content", style: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, ((_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 ||
|
|
18333
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '5a35ceee27f3a2ab41742f396f450b8783832742', class: "description" }, hAsync("slot", { key: 'ff012c2168c6ab6808de46a1f26f2f186fbe452f', name: "description" }, this.description))), (this.errorDescription ||
|
|
18334
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '9c668e1c484c4caf45fa9e38dbca4dae0e93fea3', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'ec9c91da75b1ec899ef68a569e6dd0a271b0307b', name: "error-description" }, this.errorDescription)))));
|
|
17845
18335
|
}
|
|
17846
18336
|
static get formAssociated() { return true; }
|
|
17847
18337
|
get el() { return getElement(this); }
|
|
@@ -17943,7 +18433,7 @@ class NvFielddropdownitem {
|
|
|
17943
18433
|
/****************************************************************************/
|
|
17944
18434
|
//#region RENDER
|
|
17945
18435
|
render() {
|
|
17946
|
-
return (hAsync(Host, { key: '
|
|
18436
|
+
return (hAsync(Host, { key: '9006514e798c91bf3d447f6e74f80afc8831813c', role: "menuitem", tabindex: '-1', onClick: this.handleSelected }, hAsync("slot", { key: '9344d00bbdaf5fd8e7676ccaf770621925a465b9' }), !this.composed && (hAsync("div", { key: '2f64fb5f87cf35dcc7ddf4b9d28c0811c7143c1d', class: "text-wrapper" }, hAsync("span", { key: 'c7a17a07092e2cfa9698e885f1ecfcf1fff1a38b', "data-scope": "text" }, this.label))), this.selected && (hAsync("nv-icon", { key: '44e8e60b72270c11633fd439ba3c5b3c67e08270', name: "check", "aria-hidden": "true", "data-scope": "selected" }))));
|
|
17947
18437
|
}
|
|
17948
18438
|
get el() { return getElement(this); }
|
|
17949
18439
|
static get style() { return NvFielddropdownitemStyle0; }
|
|
@@ -18008,7 +18498,7 @@ class NvFielddropdownitemcheck {
|
|
|
18008
18498
|
};
|
|
18009
18499
|
}
|
|
18010
18500
|
render() {
|
|
18011
|
-
return (hAsync(Host, { key: '
|
|
18501
|
+
return (hAsync(Host, { key: '69cd9636b76fa1c5f49f9c67b6d0989d9967d0cf', onClick: this.handleClick }, hAsync("nv-fieldcheckbox", { key: 'b0e2035c3ff1a3a2d8f2922c9fe2e6edcfad00d4', 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 })));
|
|
18012
18502
|
}
|
|
18013
18503
|
get el() { return getElement(this); }
|
|
18014
18504
|
static get style() { return NvFielddropdownitemcheckStyle0; }
|
|
@@ -18045,7 +18535,7 @@ class NvFieldmultiselect {
|
|
|
18045
18535
|
constructor(hostRef) {
|
|
18046
18536
|
registerInstance(this, hostRef);
|
|
18047
18537
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
18048
|
-
this.
|
|
18538
|
+
this.filterTextChanged = createEvent(this, "filterTextChanged", 7);
|
|
18049
18539
|
/****************************************************************************/
|
|
18050
18540
|
//#region PROPERTIES
|
|
18051
18541
|
/**
|
|
@@ -18062,6 +18552,11 @@ class NvFieldmultiselect {
|
|
|
18062
18552
|
* always type in fresh data.
|
|
18063
18553
|
*/
|
|
18064
18554
|
this.autocomplete = 'off';
|
|
18555
|
+
/**
|
|
18556
|
+
* Specifies the selected values of the multiselect field.
|
|
18557
|
+
* This is the canonical value for the component and is used for form submission.
|
|
18558
|
+
*/
|
|
18559
|
+
this.value = [];
|
|
18065
18560
|
/**
|
|
18066
18561
|
* Marks the input field as required.
|
|
18067
18562
|
*/
|
|
@@ -18115,17 +18610,13 @@ class NvFieldmultiselect {
|
|
|
18115
18610
|
* Text for the badge showing the number of selected items.
|
|
18116
18611
|
*/
|
|
18117
18612
|
this.badgeLabel = '';
|
|
18118
|
-
//#endregion PROPERTIES
|
|
18119
|
-
/****************************************************************************/
|
|
18120
|
-
//#region STATE
|
|
18121
18613
|
/**
|
|
18122
18614
|
* The text entered by the user for filtering multiselect items.
|
|
18123
18615
|
*/
|
|
18124
18616
|
this.filterText = '';
|
|
18125
|
-
|
|
18126
|
-
|
|
18127
|
-
|
|
18128
|
-
this.selectedValues = [];
|
|
18617
|
+
//#endregion PROPERTIES
|
|
18618
|
+
/****************************************************************************/
|
|
18619
|
+
//#region STATE
|
|
18129
18620
|
/**
|
|
18130
18621
|
* Sorted options for display.
|
|
18131
18622
|
*/
|
|
@@ -18135,8 +18626,8 @@ class NvFieldmultiselect {
|
|
|
18135
18626
|
* Handle badge close for options mode.
|
|
18136
18627
|
*/
|
|
18137
18628
|
this.handleBadgeCloseOptions = () => {
|
|
18138
|
-
this.
|
|
18139
|
-
this.
|
|
18629
|
+
this.value = [];
|
|
18630
|
+
this.valueChanged.emit(this.value);
|
|
18140
18631
|
// Uncheck all elements
|
|
18141
18632
|
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
18142
18633
|
items.forEach(item => {
|
|
@@ -18152,8 +18643,8 @@ class NvFieldmultiselect {
|
|
|
18152
18643
|
* Handle badge close for slots mode.
|
|
18153
18644
|
*/
|
|
18154
18645
|
this.handleBadgeCloseSlots = () => {
|
|
18155
|
-
this.
|
|
18156
|
-
this.
|
|
18646
|
+
this.value = [];
|
|
18647
|
+
this.valueChanged.emit(this.value);
|
|
18157
18648
|
// Uncheck all elements
|
|
18158
18649
|
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
18159
18650
|
items.forEach(item => {
|
|
@@ -18171,8 +18662,7 @@ class NvFieldmultiselect {
|
|
|
18171
18662
|
if (this.isHandlingEscape) {
|
|
18172
18663
|
return;
|
|
18173
18664
|
}
|
|
18174
|
-
|
|
18175
|
-
// Reset filter if needed
|
|
18665
|
+
// Reset filter if needed, but preserve the filter text
|
|
18176
18666
|
if (this.filterable) {
|
|
18177
18667
|
this.resetFilter();
|
|
18178
18668
|
}
|
|
@@ -18185,9 +18675,8 @@ class NvFieldmultiselect {
|
|
|
18185
18675
|
if (!this.el.contains(document.activeElement)) {
|
|
18186
18676
|
// Close the popover without affecting the divider
|
|
18187
18677
|
this.open = false;
|
|
18188
|
-
// Reset filter if needed
|
|
18678
|
+
// Reset filter if needed, but preserve the filter text
|
|
18189
18679
|
if (this.filterable) {
|
|
18190
|
-
this.filterText = '';
|
|
18191
18680
|
this.resetFilter();
|
|
18192
18681
|
}
|
|
18193
18682
|
}
|
|
@@ -18246,15 +18735,14 @@ class NvFieldmultiselect {
|
|
|
18246
18735
|
return;
|
|
18247
18736
|
}
|
|
18248
18737
|
const input = event.target;
|
|
18249
|
-
this.
|
|
18250
|
-
this.
|
|
18738
|
+
this.filterText = input.value;
|
|
18739
|
+
this.filterTextChanged.emit(this.filterText);
|
|
18251
18740
|
// Clear any existing timer
|
|
18252
18741
|
if (this.debounceTimer) {
|
|
18253
18742
|
window.clearTimeout(this.debounceTimer);
|
|
18254
18743
|
}
|
|
18255
18744
|
// Set a new timer for filtering
|
|
18256
18745
|
this.debounceTimer = window.setTimeout(() => {
|
|
18257
|
-
this.filterText = input.value.toLowerCase();
|
|
18258
18746
|
this.filterItemsOption();
|
|
18259
18747
|
}, this.debounceDelay);
|
|
18260
18748
|
};
|
|
@@ -18268,15 +18756,14 @@ class NvFieldmultiselect {
|
|
|
18268
18756
|
if (this.disabled || this.readonly)
|
|
18269
18757
|
return;
|
|
18270
18758
|
const input = event.target;
|
|
18271
|
-
this.
|
|
18272
|
-
this.
|
|
18759
|
+
this.filterText = input.value;
|
|
18760
|
+
this.filterTextChanged.emit(this.filterText);
|
|
18273
18761
|
// Clear any existing timer
|
|
18274
18762
|
if (this.debounceTimer) {
|
|
18275
18763
|
window.clearTimeout(this.debounceTimer);
|
|
18276
18764
|
}
|
|
18277
18765
|
// Set a new timer for filtering
|
|
18278
18766
|
this.debounceTimer = window.setTimeout(() => {
|
|
18279
|
-
this.filterText = input.value.toLowerCase();
|
|
18280
18767
|
this.filterSlotsItems();
|
|
18281
18768
|
}, this.debounceDelay);
|
|
18282
18769
|
};
|
|
@@ -18306,9 +18793,8 @@ class NvFieldmultiselect {
|
|
|
18306
18793
|
if (!this.el.contains(document.activeElement)) {
|
|
18307
18794
|
// Close the popover without affecting the divider
|
|
18308
18795
|
this.open = false;
|
|
18309
|
-
// Reset filter if needed
|
|
18796
|
+
// Reset filter if needed, but preserve the filter text
|
|
18310
18797
|
if (this.filterable) {
|
|
18311
|
-
this.filterText = '';
|
|
18312
18798
|
this.resetFilter();
|
|
18313
18799
|
}
|
|
18314
18800
|
}
|
|
@@ -18340,14 +18826,14 @@ class NvFieldmultiselect {
|
|
|
18340
18826
|
* @returns {any} The JSX for options mode
|
|
18341
18827
|
*/
|
|
18342
18828
|
this.renderOptionsMode = () => {
|
|
18343
|
-
return (hAsync(Host, { "aria-label": this.label, "aria-expanded": this.open.toString() }, (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.
|
|
18829
|
+
return (hAsync(Host, { "aria-label": this.label, "aria-expanded": this.open.toString() }, (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.value.length > 0 && (hAsync("nv-badge", { slot: "leading-input", "prevent-auto-close": true, color: "10", dismissible: this.value.length > 0, label: `${this.value.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.value.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.filterText, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputOptions, onFocus: this.handleInputFocusOptions, onBlur: this.handleInputBlurOptions, onKeyDown: this.handleKeyDown, "data-scope": "focusable" })) : (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, "data-scope": "focusable" }, hAsync("span", null, 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: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, hAsync("ul", { role: "content" }, this.options.map(option => (hAsync("nv-fielddropdownitemcheck", { label: option.label, description: option.description, value: option.value, checked: this.value.includes(option.value), disabled: option.disabled }))), hAsync("hr", { class: "multiselect-divider", style: { display: 'none' } })))), this.renderDescriptions()));
|
|
18344
18830
|
};
|
|
18345
18831
|
/**
|
|
18346
18832
|
* Renders the component in slots mode
|
|
18347
18833
|
* @returns {any} The JSX for slots mode
|
|
18348
18834
|
*/
|
|
18349
18835
|
this.renderSlotsMode = () => {
|
|
18350
|
-
return (hAsync(Host, { "aria-label": this.label, "aria-expanded": this.open.toString() }, (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", onClick: this.handleInputContainerClickSlots }, hAsync("slot", { name: "leading-input" }), this.
|
|
18836
|
+
return (hAsync(Host, { "aria-label": this.label, "aria-expanded": this.open.toString() }, (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", onClick: this.handleInputContainerClickSlots }, hAsync("slot", { name: "leading-input" }), this.value.length > 0 && (hAsync("nv-badge", { slot: "leading-input", "prevent-auto-close": true, color: "10", dismissible: this.value.length > 0, label: `${this.value.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.value.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseSlots })), this.filterable || this.disabled || this.readonly ? (hAsync("input", { id: this.inputId, ref: e => (this.inputElement = e), autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.filterText, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputSlots, onFocus: this.handleInputFocusSlots, onBlur: this.handleInputBlurSlots, onKeyDown: this.handleKeyDown, "data-scope": "focusable" })) : (hAsync("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClickSlots, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusSlots, role: "combobox", "aria-expanded": this.open, "data-scope": "focusable" }, hAsync("span", null, 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.togglePopoverSlots })), hAsync("slot", { name: "after-input" })), hAsync("div", { slot: "content", role: "listbox", "aria-multiselectable": "true", style: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, hAsync("slot", { name: "content" }))), this.renderDescriptions()));
|
|
18351
18837
|
};
|
|
18352
18838
|
}
|
|
18353
18839
|
//#endregion EVENTS
|
|
@@ -18356,7 +18842,7 @@ class NvFieldmultiselect {
|
|
|
18356
18842
|
handleOptionsChange(newValue) {
|
|
18357
18843
|
if (!newValue)
|
|
18358
18844
|
return;
|
|
18359
|
-
this.
|
|
18845
|
+
this.value = newValue
|
|
18360
18846
|
.filter(option => option.checked)
|
|
18361
18847
|
.map(option => option.value);
|
|
18362
18848
|
this.reorderOptionsContent();
|
|
@@ -18365,8 +18851,10 @@ class NvFieldmultiselect {
|
|
|
18365
18851
|
* Emitted when the value changes.
|
|
18366
18852
|
*/
|
|
18367
18853
|
watchValueHandler() {
|
|
18368
|
-
//
|
|
18369
|
-
this.
|
|
18854
|
+
// Synchronize child components when value changes programmatically
|
|
18855
|
+
if (this.el && this.el.isConnected) {
|
|
18856
|
+
this.syncChildComponents();
|
|
18857
|
+
}
|
|
18370
18858
|
}
|
|
18371
18859
|
//#endregion WATCHERS
|
|
18372
18860
|
/****************************************************************************/
|
|
@@ -18406,22 +18894,23 @@ class NvFieldmultiselect {
|
|
|
18406
18894
|
}
|
|
18407
18895
|
const { value, checked } = event.detail;
|
|
18408
18896
|
if (value !== undefined && value !== null) {
|
|
18409
|
-
const
|
|
18410
|
-
const valueIndex =
|
|
18897
|
+
const newValue = [...this.value];
|
|
18898
|
+
const valueIndex = newValue.indexOf(value);
|
|
18411
18899
|
if (checked && valueIndex === -1) {
|
|
18412
|
-
|
|
18900
|
+
newValue.push(value);
|
|
18413
18901
|
}
|
|
18414
18902
|
else if (!checked && valueIndex > -1) {
|
|
18415
|
-
|
|
18903
|
+
newValue.splice(valueIndex, 1);
|
|
18416
18904
|
}
|
|
18417
|
-
//
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18905
|
+
// Always update the state and emit the event when an item is checked/unchecked
|
|
18906
|
+
this.value = newValue;
|
|
18907
|
+
this.valueChanged.emit(this.value);
|
|
18908
|
+
// Update the checked state of all items to ensure consistency
|
|
18909
|
+
this.syncChildComponents();
|
|
18910
|
+
// Preserve the filter text in the input
|
|
18911
|
+
if (this.filterable && this.inputElement) {
|
|
18912
|
+
// Keep the current filter text in the input
|
|
18913
|
+
this.inputElement.value = this.filterText;
|
|
18425
18914
|
}
|
|
18426
18915
|
}
|
|
18427
18916
|
else {
|
|
@@ -18460,12 +18949,10 @@ class NvFieldmultiselect {
|
|
|
18460
18949
|
}
|
|
18461
18950
|
// Specific initialization for slots mode
|
|
18462
18951
|
if (!this.options) {
|
|
18952
|
+
// Use a microtask to ensure DOM is ready
|
|
18463
18953
|
Promise.resolve().then(() => {
|
|
18464
|
-
|
|
18465
|
-
|
|
18466
|
-
this.selectedValues = items
|
|
18467
|
-
.filter(item => item.hasAttribute('checked'))
|
|
18468
|
-
.map(item => item.getAttribute('value') || '');
|
|
18954
|
+
// Synchronize child components
|
|
18955
|
+
this.syncChildComponents();
|
|
18469
18956
|
// Force a reorder after initialization
|
|
18470
18957
|
requestAnimationFrame(() => {
|
|
18471
18958
|
this.reorderSlotContent();
|
|
@@ -18476,13 +18963,8 @@ class NvFieldmultiselect {
|
|
|
18476
18963
|
if (this.options) {
|
|
18477
18964
|
this.sortedOptions = [...((_a = this.options) !== null && _a !== void 0 ? _a : [])];
|
|
18478
18965
|
}
|
|
18479
|
-
//
|
|
18480
|
-
if (this.
|
|
18481
|
-
this.filterText = String(this.value).toLocaleLowerCase();
|
|
18482
|
-
this.filterItems();
|
|
18483
|
-
}
|
|
18484
|
-
else {
|
|
18485
|
-
// Reset visibility state of all dropdown items
|
|
18966
|
+
// Reset filter if needed
|
|
18967
|
+
if (!this.filterText) {
|
|
18486
18968
|
this.resetFilter();
|
|
18487
18969
|
}
|
|
18488
18970
|
}
|
|
@@ -18493,6 +18975,8 @@ class NvFieldmultiselect {
|
|
|
18493
18975
|
if (this.options) {
|
|
18494
18976
|
this.handleOptionsChange(this.options);
|
|
18495
18977
|
}
|
|
18978
|
+
// Final synchronization of child components after everything is loaded
|
|
18979
|
+
this.syncChildComponents();
|
|
18496
18980
|
}
|
|
18497
18981
|
/**
|
|
18498
18982
|
* Unsubscribe from click outside event.
|
|
@@ -18510,38 +18994,6 @@ class NvFieldmultiselect {
|
|
|
18510
18994
|
async getFilterText() {
|
|
18511
18995
|
return this.filterText;
|
|
18512
18996
|
}
|
|
18513
|
-
/**
|
|
18514
|
-
* Set the initial selection based on the current value and update the inputElement value.
|
|
18515
|
-
*/
|
|
18516
|
-
setInitialSelection() {
|
|
18517
|
-
var _a;
|
|
18518
|
-
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitem'));
|
|
18519
|
-
const selectedItem = items.find(item => {
|
|
18520
|
-
var _a;
|
|
18521
|
-
return item.getAttribute('label') === this.value ||
|
|
18522
|
-
item.getAttribute('value') === this.value ||
|
|
18523
|
-
((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === this.value;
|
|
18524
|
-
});
|
|
18525
|
-
// Remove 'selected' from all items first to reset the state
|
|
18526
|
-
items.forEach(item => {
|
|
18527
|
-
item.removeAttribute('selected');
|
|
18528
|
-
item.classList.remove('selected');
|
|
18529
|
-
});
|
|
18530
|
-
if (selectedItem) {
|
|
18531
|
-
// Add the `selected` attribute and `selected` class for visual styling
|
|
18532
|
-
selectedItem.setAttribute('selected', 'true');
|
|
18533
|
-
selectedItem.classList.add('selected');
|
|
18534
|
-
// Update the value and inputElement value to reflect the pre-selected item
|
|
18535
|
-
this.value =
|
|
18536
|
-
selectedItem.getAttribute('label') ||
|
|
18537
|
-
selectedItem.getAttribute('value') ||
|
|
18538
|
-
((_a = selectedItem.textContent) === null || _a === void 0 ? void 0 : _a.trim()) ||
|
|
18539
|
-
'';
|
|
18540
|
-
if (this.inputElement) {
|
|
18541
|
-
this.inputElement.value = this.value;
|
|
18542
|
-
}
|
|
18543
|
-
}
|
|
18544
|
-
}
|
|
18545
18997
|
/**
|
|
18546
18998
|
* Reset the filter and make all items visible.
|
|
18547
18999
|
*/
|
|
@@ -18558,8 +19010,8 @@ class NvFieldmultiselect {
|
|
|
18558
19010
|
if (emptyMessage)
|
|
18559
19011
|
emptyMessage.remove();
|
|
18560
19012
|
// Reorder with divider if needed
|
|
18561
|
-
const selectedItems = items.filter(item => this.
|
|
18562
|
-
const unselectedItems = items.filter(item => !this.
|
|
19013
|
+
const selectedItems = items.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19014
|
+
const unselectedItems = items.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18563
19015
|
if (selectedItems.length > 0) {
|
|
18564
19016
|
this.manageDivider(ul, selectedItems, unselectedItems);
|
|
18565
19017
|
}
|
|
@@ -18570,7 +19022,7 @@ class NvFieldmultiselect {
|
|
|
18570
19022
|
* @returns {string[]} The selected values.
|
|
18571
19023
|
*/
|
|
18572
19024
|
async getSelectedValues() {
|
|
18573
|
-
return this.
|
|
19025
|
+
return this.value;
|
|
18574
19026
|
}
|
|
18575
19027
|
/**
|
|
18576
19028
|
* Reorder the content of the slot.
|
|
@@ -18592,8 +19044,8 @@ class NvFieldmultiselect {
|
|
|
18592
19044
|
return;
|
|
18593
19045
|
}
|
|
18594
19046
|
// Separate checked vs unchecked
|
|
18595
|
-
const selectedItems = items.filter(item => this.
|
|
18596
|
-
const unselectedItems = items.filter(item => !this.
|
|
19047
|
+
const selectedItems = items.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19048
|
+
const unselectedItems = items.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18597
19049
|
// Reinsert CHECKED items FIRST
|
|
18598
19050
|
// appendChild() moves the element without recreating it
|
|
18599
19051
|
// this is not trigger a re-rendering of the component in the platforms
|
|
@@ -18619,8 +19071,8 @@ class NvFieldmultiselect {
|
|
|
18619
19071
|
if (!ul)
|
|
18620
19072
|
return;
|
|
18621
19073
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck')).filter(item => item.style.display !== 'none');
|
|
18622
|
-
const selectedItems = items.filter(item => this.
|
|
18623
|
-
const unselectedItems = items.filter(item => !this.
|
|
19074
|
+
const selectedItems = items.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19075
|
+
const unselectedItems = items.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18624
19076
|
// Reorder the elements
|
|
18625
19077
|
selectedItems.forEach(item => ul.appendChild(item));
|
|
18626
19078
|
unselectedItems.forEach(item => ul.appendChild(item));
|
|
@@ -18656,8 +19108,8 @@ class NvFieldmultiselect {
|
|
|
18656
19108
|
}
|
|
18657
19109
|
// Reorder with divider
|
|
18658
19110
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
18659
|
-
const selectedItems = items.filter(item => this.
|
|
18660
|
-
const unselectedItems = items.filter(item => !this.
|
|
19111
|
+
const selectedItems = items.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19112
|
+
const unselectedItems = items.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18661
19113
|
this.manageDivider(ul, selectedItems, unselectedItems);
|
|
18662
19114
|
return;
|
|
18663
19115
|
}
|
|
@@ -18678,8 +19130,8 @@ class NvFieldmultiselect {
|
|
|
18678
19130
|
});
|
|
18679
19131
|
// Manage the divider with the visible items
|
|
18680
19132
|
const visibleItems = items.filter(item => item.style.display !== 'none');
|
|
18681
|
-
const visibleSelected = visibleItems.filter(item => this.
|
|
18682
|
-
const visibleUnselected = visibleItems.filter(item => !this.
|
|
19133
|
+
const visibleSelected = visibleItems.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19134
|
+
const visibleUnselected = visibleItems.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18683
19135
|
this.manageDivider(ul, visibleSelected, visibleUnselected);
|
|
18684
19136
|
}
|
|
18685
19137
|
else {
|
|
@@ -18737,8 +19189,8 @@ class NvFieldmultiselect {
|
|
|
18737
19189
|
});
|
|
18738
19190
|
// Manage the divider with the visible items
|
|
18739
19191
|
const visibleItems = items.filter(item => item.style.display !== 'none');
|
|
18740
|
-
const visibleSelected = visibleItems.filter(item => this.
|
|
18741
|
-
const visibleUnselected = visibleItems.filter(item => !this.
|
|
19192
|
+
const visibleSelected = visibleItems.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19193
|
+
const visibleUnselected = visibleItems.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18742
19194
|
this.manageDivider(ul, visibleSelected, visibleUnselected);
|
|
18743
19195
|
// Add or remove the empty message based on the case
|
|
18744
19196
|
if (!hasVisibleItems) {
|
|
@@ -18786,8 +19238,8 @@ class NvFieldmultiselect {
|
|
|
18786
19238
|
});
|
|
18787
19239
|
// Get visible items after filtering
|
|
18788
19240
|
const visibleItems = items.filter(item => item.style.display !== 'none');
|
|
18789
|
-
const visibleSelectedItems = visibleItems.filter(item => this.
|
|
18790
|
-
this.manageDivider(ul, visibleSelectedItems, visibleItems.filter(item => !this.
|
|
19241
|
+
const visibleSelectedItems = visibleItems.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19242
|
+
this.manageDivider(ul, visibleSelectedItems, visibleItems.filter(item => !this.value.includes(item.getAttribute('value') || '')));
|
|
18791
19243
|
// Add empty message if no items match the filter
|
|
18792
19244
|
if (!hasVisibleItems) {
|
|
18793
19245
|
const emptyMessage = document.createElement('li');
|
|
@@ -18984,6 +19436,29 @@ class NvFieldmultiselect {
|
|
|
18984
19436
|
divider.style.display = 'none';
|
|
18985
19437
|
}
|
|
18986
19438
|
}
|
|
19439
|
+
/**
|
|
19440
|
+
* Synchronizes the checked state of all child nv-fielddropdownitemcheck components
|
|
19441
|
+
* with the current selectedValues state.
|
|
19442
|
+
*/
|
|
19443
|
+
syncChildComponents() {
|
|
19444
|
+
// Early return if element is not ready
|
|
19445
|
+
if (!this.el || !this.el.isConnected) {
|
|
19446
|
+
return;
|
|
19447
|
+
}
|
|
19448
|
+
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
19449
|
+
items.forEach(item => {
|
|
19450
|
+
// Get the effective value: use explicit value if present, otherwise use label
|
|
19451
|
+
const itemValue = item.getAttribute('value') || item.getAttribute('label') || '';
|
|
19452
|
+
if (this.value.includes(itemValue)) {
|
|
19453
|
+
item.setAttribute('checked', '');
|
|
19454
|
+
item.checked = true;
|
|
19455
|
+
}
|
|
19456
|
+
else {
|
|
19457
|
+
item.removeAttribute('checked');
|
|
19458
|
+
item.checked = false;
|
|
19459
|
+
}
|
|
19460
|
+
});
|
|
19461
|
+
}
|
|
18987
19462
|
/**
|
|
18988
19463
|
* Renders description and error description sections
|
|
18989
19464
|
* @returns {any} The JSX for descriptions
|
|
@@ -19019,7 +19494,7 @@ class NvFieldmultiselect {
|
|
|
19019
19494
|
"description": [513],
|
|
19020
19495
|
"placeholder": [513],
|
|
19021
19496
|
"autocomplete": [513],
|
|
19022
|
-
"value": [
|
|
19497
|
+
"value": [1040],
|
|
19023
19498
|
"required": [516],
|
|
19024
19499
|
"readonly": [516],
|
|
19025
19500
|
"disabled": [516],
|
|
@@ -19034,8 +19509,7 @@ class NvFieldmultiselect {
|
|
|
19034
19509
|
"autofocus": [516],
|
|
19035
19510
|
"fluid": [516],
|
|
19036
19511
|
"badgeLabel": [513, "badge-label"],
|
|
19037
|
-
"filterText": [
|
|
19038
|
-
"selectedValues": [32],
|
|
19512
|
+
"filterText": [1537, "filter-text"],
|
|
19039
19513
|
"sortedOptions": [32],
|
|
19040
19514
|
"isHandlingEscape": [32],
|
|
19041
19515
|
"getFilterText": [64],
|
|
@@ -19044,7 +19518,7 @@ class NvFieldmultiselect {
|
|
|
19044
19518
|
},
|
|
19045
19519
|
"$listeners$": [[0, "openChanged", "handleOpenChanged"], [0, "itemChecked", "handleItemChecked"], [0, "slotchange", "handleSlotChange"], [0, "keydown", "handleKeyDown"]],
|
|
19046
19520
|
"$lazyBundleId$": "-",
|
|
19047
|
-
"$attrsToReflect$": [["inputId", "input-id"], ["name", "name"], ["label", "label"], ["description", "description"], ["placeholder", "placeholder"], ["autocomplete", "autocomplete"], ["
|
|
19521
|
+
"$attrsToReflect$": [["inputId", "input-id"], ["name", "name"], ["label", "label"], ["description", "description"], ["placeholder", "placeholder"], ["autocomplete", "autocomplete"], ["required", "required"], ["readonly", "readonly"], ["disabled", "disabled"], ["error", "error"], ["errorDescription", "error-description"], ["maxHeight", "max-height"], ["open", "open"], ["emptyResult", "empty-result"], ["filterable", "filterable"], ["debounceDelay", "debounce-delay"], ["autofocus", "autofocus"], ["fluid", "fluid"], ["badgeLabel", "badge-label"], ["filterText", "filter-text"]]
|
|
19048
19522
|
}; }
|
|
19049
19523
|
}
|
|
19050
19524
|
|
|
@@ -19168,9 +19642,9 @@ class NvFieldnumber {
|
|
|
19168
19642
|
/****************************************************************************/
|
|
19169
19643
|
//#region RENDER
|
|
19170
19644
|
render() {
|
|
19171
|
-
return (hAsync(Host, { key: '
|
|
19172
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19173
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19645
|
+
return (hAsync(Host, { key: '908571e657b876e4bf13d2cd88c74ed56375a4a9' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'd46ff199fa0211227293ebab6159ee98916e4845', htmlFor: this.inputId }, hAsync("slot", { key: '0e825e862bfadb313b723898d0732efb36f001c0', name: "label" }, this.label))), hAsync("div", { key: 'e001c956494a7b3c90cb713540b9300f6482cbb7', class: "input-wrapper" }, hAsync("slot", { key: '07f53c5fafcd308609b4ecfb721b9b0f791d5bf5', name: "before-input" }), hAsync("div", { key: '266fe99cc757c5646aa4bcbf262d7f6eb21fa507', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: 'f80e50ffa553656b26c80be179fd5bda8fd7234e', name: "leading-input" }), hAsync("input", { key: '3fb53e266a44118a464f5fffef5019d900f25668', 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 }), hAsync("slot", { key: '9769d9b13676f8022eb7771869876125e7d13ea2', name: "trailing-input" }), this.error && (hAsync("nv-icon", { key: 'feedeb1dfcf9a5b8c3e6f4e355af64db5e108125', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '6f3819ea3bad57b373e24e5b167887c2175534ce', name: "circle-check", class: "validation", size: "md" })), hAsync("div", { key: 'ab83ad88264a5295f8239b308af7b61c04095b8c', class: "stepper" }, hAsync("nv-iconbutton", { key: '67bf2dc34cab126f8ebb8ad1368d326ce4e448c9', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }), hAsync("nv-iconbutton", { key: '2ae711f4ff770049fb9b9afa4075b02a5d41d881', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }))), hAsync("slot", { key: 'f59664d1200b6e1e300cac52ceaee03b1be68cea', name: "after-input" })), (this.description ||
|
|
19646
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '10cefd1d1e86d33456b6800d5d1f3f5c7a10a16c', class: "description" }, hAsync("slot", { key: 'a8544e2917993f7fa45200e51e983277c6f0b393', name: "description" }, this.description))), (this.errorDescription ||
|
|
19647
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '95ffb42b6014514a51102b0bfa60887ff3394362', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '47d19a9cf2de2cdd2f23a5cf7a74943f9de8cb7e', name: "error-description" }, this.errorDescription)))));
|
|
19174
19648
|
}
|
|
19175
19649
|
static get formAssociated() { return true; }
|
|
19176
19650
|
get el() { return getElement(this); }
|
|
@@ -19318,9 +19792,9 @@ class NvFieldpassword {
|
|
|
19318
19792
|
/****************************************************************************/
|
|
19319
19793
|
//#region RENDER
|
|
19320
19794
|
render() {
|
|
19321
|
-
return (hAsync(Host, { key: '
|
|
19322
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19323
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19795
|
+
return (hAsync(Host, { key: 'a14a4df5990def8c1b76e191dc3480c2eee73446' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'b3f8d2a9b98afbd9ba7e932a4fd2639855bce785', htmlFor: this.inputId }, hAsync("slot", { key: 'af896d231a0c0b5b5ce921e24f98b32702fe0058', name: "label" }, this.label))), hAsync("div", { key: '6047dabbbb95967bf4afb01144a5f2af98677caf', class: "input-wrapper" }, hAsync("slot", { key: 'eb36d6c886f7efc91508b97a4cb11c43d7e7809b', name: "before-input" }), hAsync("div", { key: 'f9de2896f8d7a29d700e9c7f586f5190c48b0304', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '3203cc62507460372c3babcede4071cf4a068122', name: "leading-input" }), hAsync("input", { key: 'bef15c1b3da5f949e4a55644dbea6499f398f71a', 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: 'b23cac5c39ea1a428831583075d2e631eb13c231', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (hAsync("nv-iconbutton", { key: '9a6a4900981781239b40e7106974e0d520dbf76a', 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: 'e3be0e70cad0f581b7fb0bee13046dcbf3d01791', name: "after-input" })), (this.description ||
|
|
19796
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'a0613b0fc5f68e82a3bff9a7943c33fd89fad6c8', class: "description" }, hAsync("slot", { key: '7f74f1207e31772ff485927d3c0334185bb14e77', name: "description" }, this.description))), (this.errorDescription ||
|
|
19797
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '1fba0209bef041b3582bc36dc3b603c6b3a24088', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '16c86655cc33bf47d1d4c388bcc4ac6272aa7714', name: "error-description" }, this.errorDescription)))));
|
|
19324
19798
|
}
|
|
19325
19799
|
static get formAssociated() { return true; }
|
|
19326
19800
|
get el() { return getElement(this); }
|
|
@@ -19448,9 +19922,9 @@ class NvFieldradio {
|
|
|
19448
19922
|
/****************************************************************************/
|
|
19449
19923
|
//#region RENDER
|
|
19450
19924
|
render() {
|
|
19451
|
-
return (hAsync(Host, { key: '
|
|
19452
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19453
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19925
|
+
return (hAsync(Host, { key: 'abfa20ef5921ee52cbe6c3ea92b27bbd4e81a116', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, hAsync("input", { key: 'ffa244c2692f3f4b3781df6ed3916139763d3253', 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: '661ccebfcd608d3d5a819144c1048b7b612d93ad', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '0764fffd0b6c961d3149130fd92fc3e5be4617d4', htmlFor: this.inputId }, hAsync("slot", { key: '5b5c107074f406864f889187a73c3b6c25b5ad36', name: "label" }, this.label))), (this.description ||
|
|
19926
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '68bb23249fc70db7346e4deb1924e24fd0e43133', class: "description" }, hAsync("slot", { key: 'fee77e49f6a48f592eba370f8e842cc3c51a9569', name: "description" }, this.description))), (this.errorDescription ||
|
|
19927
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '0544f59d2446dd3d1137839643222ae1d32236a2', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '655fbb4ca21e3001425dcfbb6d9188586e0548ca', name: "error-description" }, this.errorDescription))))));
|
|
19454
19928
|
}
|
|
19455
19929
|
static get formAssociated() { return true; }
|
|
19456
19930
|
get el() { return getElement(this); }
|
|
@@ -19834,13 +20308,13 @@ class NvFieldselect {
|
|
|
19834
20308
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
19835
20309
|
*/
|
|
19836
20310
|
render() {
|
|
19837
|
-
return (hAsync(Host, { key: '
|
|
20311
|
+
return (hAsync(Host, { key: 'd7c179e0ad3bdc22afa4a4ad8b84cc0d7403e3f9' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '545ba543c78e93bb790fca363325d40052899b53', htmlFor: this.inputId }, hAsync("slot", { key: '5141dc2bda9b312682fe7adcf2ad8ae23a720696', name: "label" }, this.label))), hAsync("div", { key: '791b9ed3213a44b2222613e54e21ec5f7814625f', class: "select-wrapper" }, hAsync("slot", { key: '51590cb6c8152955ffef574caaa5858064652cf8', name: "before-input" }), hAsync("div", { key: '030cfcb568435a8518d2680bee21b6e66c0955eb', class: "select-container", onClick: this.handleSelectContainerClick }, hAsync("slot", { key: '9eb92fb0b383a2b08ef8ba61baf8340f6ecb12a6', name: "leading-input" }), this.internalReadonly && (hAsync("input", { key: 'fe4debae13d4258fe5e6a6d273e7384ef7071f35', 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
|
|
19838
20312
|
? `${this.inputId}-error`
|
|
19839
|
-
: `${this.inputId}-description` })), hAsync("select", { key: '
|
|
20313
|
+
: `${this.inputId}-description` })), hAsync("select", { key: '767c5c8f1a0f34aa645d49e7b09b0cfb230d5e3c', 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
|
|
19840
20314
|
? `${this.inputId}-error`
|
|
19841
|
-
: `${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: '
|
|
19842
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19843
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
20315
|
+
: `${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: '911644aa7ded450918f6424ebd8ce9dc4b6ed1d6', class: "select-icons" }, this.error && (hAsync("nv-icon", { key: 'd5ae32439983916d17346fdce50d51e73d429c23', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '783f0d7f1d4a0bbcbd8cff9416e5c3f61408061a', name: "circle-check", class: "validation", size: "md" })), !this.multiple && (hAsync("nv-iconbutton", { key: '252cd65b1e9437aa89161c6342f4f107ad330136', name: "chevron-down", size: "md", emphasis: "lower", tabindex: -1 })))), hAsync("slot", { key: '8e1088c34086ee58b240acb99c25fa113517e76c', name: "after-input" })), (this.description ||
|
|
20316
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '7c521ab944ec72bec68c32c33400eb3c3a7c32bc', class: "description", id: `${this.inputId}-description` }, hAsync("slot", { key: 'dab0be52dc34f499575775f9131c51c4cd7fd290', name: "description" }, this.description))), (this.errorDescription ||
|
|
20317
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '00d9ce6b2a5fb946575e54cc3bf2fd83acc83290', class: "error-description", id: `${this.inputId}-error` }, hAsync("slot", { key: '0e1027874f6e2b275ca354e2d64c0289ca961a0c', name: "error-description" }, this.errorDescription)))));
|
|
19844
20318
|
}
|
|
19845
20319
|
static get formAssociated() { return true; }
|
|
19846
20320
|
get el() { return getElement(this); }
|
|
@@ -19886,6 +20360,18 @@ class NvFieldselect {
|
|
|
19886
20360
|
/**
|
|
19887
20361
|
* Utility functions for nv-fieldslider.
|
|
19888
20362
|
*/
|
|
20363
|
+
/**
|
|
20364
|
+
* Gets the number of decimal places in a number.
|
|
20365
|
+
* @param {number} num - The number to check
|
|
20366
|
+
* @returns {number} The number of decimal places
|
|
20367
|
+
*/
|
|
20368
|
+
function getDecimalPlaces(num) {
|
|
20369
|
+
if (Number.isInteger(num))
|
|
20370
|
+
return 0;
|
|
20371
|
+
const str = num.toString();
|
|
20372
|
+
const decimalPart = str.split('.')[1];
|
|
20373
|
+
return decimalPart ? decimalPart.length : 0;
|
|
20374
|
+
}
|
|
19889
20375
|
/**
|
|
19890
20376
|
* Clamp a value between min and max.
|
|
19891
20377
|
* @param {number} value - The value to clamp
|
|
@@ -19918,7 +20404,26 @@ function valueToPercent(value, min, max) {
|
|
|
19918
20404
|
*/
|
|
19919
20405
|
function snapToStep(value, min, max, step) {
|
|
19920
20406
|
const clamped = clamp$1(value, min, max);
|
|
19921
|
-
const
|
|
20407
|
+
const decimalPlaces = getDecimalPlaces(step);
|
|
20408
|
+
// To avoid floating point issues in calculations, we can work with integers
|
|
20409
|
+
// by multiplying all values by a power of 10 based on decimal places
|
|
20410
|
+
if (decimalPlaces > 0) {
|
|
20411
|
+
const multiplier = Math.pow(10, decimalPlaces);
|
|
20412
|
+
// Convert to integer-based calculation
|
|
20413
|
+
const scaledValue = Math.round((clamped - min) * multiplier);
|
|
20414
|
+
const scaledStep = Math.round(step * multiplier);
|
|
20415
|
+
// Round to nearest step using integer math
|
|
20416
|
+
const roundedSteps = Math.round(scaledValue / scaledStep);
|
|
20417
|
+
// Calculate snapped value and scale back down
|
|
20418
|
+
const scaledSnapped = roundedSteps * scaledStep;
|
|
20419
|
+
const snapped = min + scaledSnapped / multiplier;
|
|
20420
|
+
// Format to correct decimal places to ensure precision
|
|
20421
|
+
return clamp$1(parseFloat(snapped.toFixed(decimalPlaces)), min, max);
|
|
20422
|
+
}
|
|
20423
|
+
// For integer steps, use the original method
|
|
20424
|
+
const stepsFromMin = (clamped - min) / step;
|
|
20425
|
+
const roundedSteps = Math.round(stepsFromMin);
|
|
20426
|
+
const snapped = min + roundedSteps * step;
|
|
19922
20427
|
return clamp$1(snapped, min, max);
|
|
19923
20428
|
}
|
|
19924
20429
|
/**
|
|
@@ -19959,6 +20464,19 @@ function snapToTicks(value, ticks) {
|
|
|
19959
20464
|
}
|
|
19960
20465
|
return closestTick;
|
|
19961
20466
|
}
|
|
20467
|
+
/**
|
|
20468
|
+
* Format a numeric value for display, preserving trailing zeros based on step precision
|
|
20469
|
+
* @param {number} value - The value to format
|
|
20470
|
+
* @param {number} step - The step size that determines decimal precision
|
|
20471
|
+
* @returns {string} Formatted value string with appropriate decimal places
|
|
20472
|
+
*/
|
|
20473
|
+
function formatValueForDisplay(value, step) {
|
|
20474
|
+
const decimalPlaces = getDecimalPlaces(step);
|
|
20475
|
+
if (decimalPlaces > 0) {
|
|
20476
|
+
return value.toFixed(decimalPlaces);
|
|
20477
|
+
}
|
|
20478
|
+
return String(value);
|
|
20479
|
+
}
|
|
19962
20480
|
|
|
19963
20481
|
/**
|
|
19964
20482
|
* Renders single thumb in standard mode.
|
|
@@ -19966,7 +20484,7 @@ function snapToTicks(value, ticks) {
|
|
|
19966
20484
|
* @returns {JSX.Element} JSX element representing the thumb
|
|
19967
20485
|
*/
|
|
19968
20486
|
const SingleThumb = props => {
|
|
19969
|
-
const { value, min, max, rawPosition, isDragging, snap, disabled, readonly, onKeyDown, labelBeforeValue, labelAfterValue, } = props;
|
|
20487
|
+
const { value, min, max, step, rawPosition, isDragging, snap, disabled, readonly, onKeyDown, labelBeforeValue, labelAfterValue, } = props;
|
|
19970
20488
|
// Use raw position for visual display during dragging, but the snapped value otherwise
|
|
19971
20489
|
let displayPosition = value;
|
|
19972
20490
|
if (isDragging && !snap) {
|
|
@@ -19976,7 +20494,7 @@ const SingleThumb = props => {
|
|
|
19976
20494
|
return (hAsync("div", { class: "thumb", style: { left: `${percent}%` }, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-disabled": disabled ? 'true' : undefined, "aria-readonly": readonly ? 'true' : undefined, tabindex: disabled ? -1 : 0, onKeyDown: onKeyDown },
|
|
19977
20495
|
hAsync("div", { class: "thumb-tooltip" },
|
|
19978
20496
|
labelBeforeValue && (hAsync("span", { class: "label-before" }, labelBeforeValue)),
|
|
19979
|
-
|
|
20497
|
+
formatValueForDisplay(value, step),
|
|
19980
20498
|
labelAfterValue && hAsync("span", { class: "label-after" }, labelAfterValue))));
|
|
19981
20499
|
};
|
|
19982
20500
|
|
|
@@ -19986,7 +20504,7 @@ const SingleThumb = props => {
|
|
|
19986
20504
|
* @returns {JSX.Element[]} Array of JSX elements representing the range slider thumbs
|
|
19987
20505
|
*/
|
|
19988
20506
|
const RangeThumb = props => {
|
|
19989
|
-
const { rangeValue, rawRangePosition, activeDragThumb, isDragging, snap, min, max, disabled, readonly, onKeyDown, labelBeforeValue, labelAfterValue, } = props;
|
|
20507
|
+
const { rangeValue, rawRangePosition, activeDragThumb, isDragging, snap, min, max, step, disabled, readonly, onKeyDown, labelBeforeValue, labelAfterValue, } = props;
|
|
19990
20508
|
const [leftValue, rightValue] = rangeValue;
|
|
19991
20509
|
// Use raw positions for visual display during dragging, but the snapped values otherwise
|
|
19992
20510
|
let displayLeftPosition = leftValue;
|
|
@@ -20010,12 +20528,12 @@ const RangeThumb = props => {
|
|
|
20010
20528
|
hAsync("div", { class: "thumb thumb-left", style: { left: `${leftPercent}%` }, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": leftValue, "aria-disabled": disabled ? 'true' : undefined, "aria-readonly": readonly ? 'true' : undefined, "data-thumb": "left", tabindex: disabled ? -1 : 0, onKeyDown: onKeyDown },
|
|
20011
20529
|
hAsync("div", { class: "thumb-tooltip" },
|
|
20012
20530
|
labelBeforeValue && (hAsync("span", { class: "label-before" }, labelBeforeValue)),
|
|
20013
|
-
|
|
20531
|
+
formatValueForDisplay(leftValue, step),
|
|
20014
20532
|
labelAfterValue && hAsync("span", { class: "label-after" }, labelAfterValue))),
|
|
20015
20533
|
hAsync("div", { class: "thumb thumb-right", style: { left: `${rightPercent}%` }, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": rightValue, "aria-disabled": disabled ? 'true' : undefined, "aria-readonly": readonly ? 'true' : undefined, "data-thumb": "right", tabindex: disabled ? -1 : 0, onKeyDown: onKeyDown },
|
|
20016
20534
|
hAsync("div", { class: "thumb-tooltip" },
|
|
20017
20535
|
labelBeforeValue && (hAsync("span", { class: "label-before" }, labelBeforeValue)),
|
|
20018
|
-
|
|
20536
|
+
formatValueForDisplay(rightValue, step),
|
|
20019
20537
|
labelAfterValue && hAsync("span", { class: "label-after" }, labelAfterValue))),
|
|
20020
20538
|
];
|
|
20021
20539
|
};
|
|
@@ -20524,11 +21042,11 @@ class NvFieldslider {
|
|
|
20524
21042
|
/****************************************************************************/
|
|
20525
21043
|
//#region RENDER
|
|
20526
21044
|
render() {
|
|
20527
|
-
return (hAsync(Host, { key: '
|
|
21045
|
+
return (hAsync(Host, { key: '5bb5a06e9742f87d098da76260ee269ef4ea06d5' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'dd6e12d6c6379e07c4f9964984b3458a71ce6e6f', htmlFor: this.startInputId }, hAsync("slot", { key: '6229200586d90f4f21604d411f473e6df66527c4', name: "label" }, this.label))), hAsync("div", { key: '44f60b538c83d9074a5d06b5a39c1e62e5aa5c55', class: "slider-container" }, this.range ? (hAsync(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 0, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : null, hAsync("div", { key: '4ec60f07b203b6836649a709027fdace39468c41', class: "track-container" }, hAsync("div", { key: '4fcc799c962bf17e582fa5daf51a9c986d2d5901', class: "track", onPointerDown: this.onTrackInteraction }, this.range ? (hAsync(RangeThumb, { rangeValue: this.rangeValueInternal, rawRangePosition: this.rawRangePosition, activeDragThumb: this.activeDragThumb, isDragging: this.isDragging, snap: this.snap, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue })) : (hAsync(SingleThumb, { value: this.valueInternal, min: this.min, max: this.max, step: this.step, rawPosition: this.rawPosition, isDragging: this.isDragging, snap: this.snap, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue }))), hAsync(TickMarks, { key: '95b75deb4c7d0142f575af39fafe7b913c315ed5', ticks: this.internalTicks, min: this.min, max: this.max })), this.range ? (hAsync(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 1, inputId: this.endInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : (hAsync(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name }))), (this.success ||
|
|
20528
21046
|
this.description ||
|
|
20529
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
21047
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '4b86941f66df96014d4710e6f1f79523a4f332f3', class: "description" }, this.success && (hAsync("nv-icon", { key: 'b53792e0fe60354cdfb2e34dbf54fd87df10050c', name: "circle-check", class: "validation", size: "md" })), hAsync("slot", { key: '149788e0ce96516b812370b247ddd59de555bf90', name: "description" }, this.description))), (this.error ||
|
|
20530
21048
|
this.errorDescription ||
|
|
20531
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
21049
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '11814ba28092b2ded30f6b15362b0eb9e67c20a0', class: "error-description", hidden: !this.error }, this.error && (hAsync("nv-icon", { key: '86b555aa52f4295932d80947737116c3f6c0ce99', name: "alert-circle", class: "validation", size: "md" })), hAsync("slot", { key: '334739920eb67abc49b2bdb942d0a2f65a925460', name: "error-description" }, this.errorDescription)))));
|
|
20532
21050
|
}
|
|
20533
21051
|
static get formAssociated() { return true; }
|
|
20534
21052
|
get el() { return getElement(this); }
|
|
@@ -20703,9 +21221,9 @@ class NvFieldtext {
|
|
|
20703
21221
|
/****************************************************************************/
|
|
20704
21222
|
//#region RENDER
|
|
20705
21223
|
render() {
|
|
20706
|
-
return (hAsync(Host, { key: '
|
|
20707
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
20708
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
21224
|
+
return (hAsync(Host, { key: 'aa009c45d11efe9fef7ae0acfb701e25db7d3004' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '90aedd9dc50b1485b76e4bb6df2f5ea017eee9f4', htmlFor: this.inputId }, hAsync("slot", { key: '3d7c37806fd01f1bb4c1d1d67372ce257d1b382d', name: "label" }, this.label))), hAsync("div", { key: 'd399c53383708363c986c8f02f0f0a3b48bb4c39', class: "input-wrapper" }, hAsync("slot", { key: '19b8cb3165c3ff0523c257ad0fc53f0df7413685', name: "before-input" }), hAsync("div", { key: '3564795cf1775f2113c9a35d1865f84358be3144', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: 'b9b0b3b44f8474ba4f0c46552bb9c3a83fa0d7d2', name: "leading-input" }), hAsync("input", { key: '39687f0583e734b03262aac593ab50ffad7957fd', 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 }), hAsync("slot", { key: '0faf9e99190d1d7e4295a454d2b89a31c728a38f', name: "trailing-input" }), this.error && (hAsync("nv-icon", { key: 'fe4646f13b1fba38883f1e03ea6c1ba274c9aa47', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '1e51b8182acc3b049ad608ddefd8c1631efbef94', name: "circle-check", class: "validation", size: "md" }))), hAsync("slot", { key: '65bf5da97918592f3d8ebc63d134ddc4723188a1', name: "after-input" })), (this.description ||
|
|
21225
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'c3f771bc7f641612baead1d82f8bcf8d8586a152', class: "description" }, hAsync("slot", { key: '27df5104927ce680472aff0054e4ae5c3a9727c6', name: "description" }, this.description))), (this.errorDescription ||
|
|
21226
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '8126a6159a24b68a9fa7f017aa289269f63035d4', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'd7cebdf0101cbed1d898c2bcc73581387ddb23b9', name: "error-description" }, this.errorDescription)))));
|
|
20709
21227
|
}
|
|
20710
21228
|
static get formAssociated() { return true; }
|
|
20711
21229
|
get el() { return getElement(this); }
|
|
@@ -20925,9 +21443,9 @@ class NvFieldtextarea {
|
|
|
20925
21443
|
/****************************************************************************/
|
|
20926
21444
|
//#region RENDER
|
|
20927
21445
|
render() {
|
|
20928
|
-
return (hAsync(Host, { key: '
|
|
20929
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
20930
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
21446
|
+
return (hAsync(Host, { key: 'a0e5cd4a7cf3dbfc928a08518b9ea031ae995e0a' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'bb327648d74c5340f7069afd5d3afd8cfbe816e8', htmlFor: this.inputId }, hAsync("slot", { key: '778cd6b79f71b4751e08b754f127da9460c104f0', name: "label" }, this.label))), hAsync("div", { key: '21e2126f2115b1de134e4d2acfa3a9b7eba713c0', class: "textarea-wrapper" }, hAsync("div", { key: '12b431b44cc6c8402a4af3fc5180ef95464571c4', class: "textarea-container", onClick: this.handleTextareaContainerClick }, hAsync("textarea", { key: 'dbb7bf5fc51aa93993eb485b8650837e892747ed', 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 ||
|
|
21447
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'd4758f3b173c84d5b7785c790832f794fae21504', class: "description" }, hAsync("slot", { key: 'def8fe57e0dd229fc31ba5372663b9053ef6a3d0', name: "description" }, this.description))), (this.errorDescription ||
|
|
21448
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '5f6f6bce639a3690cd51d208be62bacdf5779f10', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'e0d185195a4c18d2a3627c554c4ce70a52db77d7', name: "error-description" }, this.errorDescription)))));
|
|
20931
21449
|
}
|
|
20932
21450
|
static get formAssociated() { return true; }
|
|
20933
21451
|
get el() { return getElement(this); }
|
|
@@ -21955,26 +22473,26 @@ class NvFieldtime {
|
|
|
21955
22473
|
}, key: `${option}-${index}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
21956
22474
|
}
|
|
21957
22475
|
render() {
|
|
21958
|
-
return (hAsync(Host, { key: '
|
|
21959
|
-
hAsync("input", { key: '
|
|
22476
|
+
return (hAsync(Host, { key: '9779298ba2b38f3987af0cfa03250f0e9a99b9f8', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'e2a9108cbc9d28d14aad58dc2e857e54ae39f09f', htmlFor: this.inputId }, hAsync("slot", { key: '94e26cbf12ac61bc32de87a32a91eca65da6461c', name: "label" }, this.label))), hAsync("nv-popover", { key: '9d3b59e19a11a7cdebfc03eef6278f87f6f440e4', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: '2651f57c27384c367d29543f390ace075a08225f', class: "input-wrapper", slot: "trigger" }, hAsync("slot", { key: '2df5c90ff04b28ab426929729e94948aa6491b2a', name: "before-input" }), hAsync("div", { key: 'bb490ebb175df4e579f0add8113e28dd7c29e866', class: "input-container" }, hAsync("slot", { key: 'b09f37a743d0b3dc12a8de0d39641571e9d7090b', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
|
|
22477
|
+
hAsync("input", { key: 'bd97f546da7231ad6ae40799a797da2368e89213', 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
|
|
21960
22478
|
? `${TimeType.Hours}-${this.name}`
|
|
21961
22479
|
: TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
21962
22480
|
], this.format.includes('mm') && [
|
|
21963
|
-
hAsync("span", { key: '
|
|
21964
|
-
hAsync("input", { key: '
|
|
22481
|
+
hAsync("span", { key: 'd1e8a8938b214717f178d462976afd91f582eb50' }, ":"),
|
|
22482
|
+
hAsync("input", { key: '720445f3892535abd7d81fdbf38f7941a66a01a5', 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
|
|
21965
22483
|
? `${TimeType.Minutes}-${this.name}`
|
|
21966
22484
|
: TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
21967
22485
|
], this.format.includes('ss') && [
|
|
21968
|
-
hAsync("span", { key: '
|
|
21969
|
-
hAsync("input", { key: '
|
|
22486
|
+
hAsync("span", { key: 'e8b19bdd054f792a48df56a2ad884d9ec3f96dc0' }, ":"),
|
|
22487
|
+
hAsync("input", { key: 'd2020d37b004a15912791d804daeeee2aadadb70', 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
|
|
21970
22488
|
? `${TimeType.Seconds}-${this.name}`
|
|
21971
22489
|
: TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
21972
|
-
], hAsync("nv-iconbutton", { key: '
|
|
22490
|
+
], hAsync("nv-iconbutton", { key: '96e3cbee01387385f1ed16bd5e7a1b639fae592f', 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: '6ef9a8a535914394e7a8a9e82f55e9ac82655161', name: "alert-circle", class: "validation", size: "sm" })), this.success && (hAsync("nv-icon", { key: 'ab1313914251a15de716d60a4f60afe91c949d7a', name: "circle-check", class: "validation", size: "sm" }))), hAsync("slot", { key: 'cf346d219445fc595419e834302d03d30a5dcf97', name: "after-input" })), hAsync("div", { key: '8cfe562d283109f305db84b843c68ad1535fed6b', class: "time-dropdown", slot: "content" }, hAsync("div", { key: '9690c5733e3fcd0ae22743e4c572d9a5ff2d1bff', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
|
|
21973
22491
|
this.RenderTimeOptionsColumn(TimeType.Hours), this.format.includes('mm') &&
|
|
21974
22492
|
this.RenderTimeOptionsColumn(TimeType.Minutes), this.format.includes('ss') &&
|
|
21975
22493
|
this.RenderTimeOptionsColumn(TimeType.Seconds)))), (this.description ||
|
|
21976
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
21977
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
22494
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '6671a07feeac69f2d9374dd25b00c6d7a7258bbd', class: "description" }, hAsync("slot", { key: '2ebc81fa182462a44a62d075c187b94bfe16ad96', name: "description" }, this.description))), (this.errorDescription ||
|
|
22495
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'f1815ed7f65eaf25fd69d56de613c01be842d147', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '028896c0e9bffa83f2429a77e1dfaace6f8a07d8', name: "error-description" }, this.errorDescription)))));
|
|
21978
22496
|
}
|
|
21979
22497
|
static get formAssociated() { return true; }
|
|
21980
22498
|
get el() { return getElement(this); }
|
|
@@ -22079,7 +22597,7 @@ class NvIcon {
|
|
|
22079
22597
|
/****************************************************************************/
|
|
22080
22598
|
//#region RENDER
|
|
22081
22599
|
render() {
|
|
22082
|
-
return (hAsync(Host, { key: '
|
|
22600
|
+
return (hAsync(Host, { key: 'a3219e9be865e466fef36c8135ab14604e20fe40', class: clsx(this.color && `${this.color}`), role: "img", "aria-label": `${this.name}-icon` }, hAsync("svg", { key: '29cfc530d71369210b1bbd896760e19f7811c557', 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: 'f601f44101684971c1286b9f6214d5dcdaa7e66e', href: `#${this.name}` }))));
|
|
22083
22601
|
}
|
|
22084
22602
|
static get style() { return NvIconStyle0; }
|
|
22085
22603
|
static get cmpMeta() { return {
|
|
@@ -22223,7 +22741,7 @@ class NvIconbutton {
|
|
|
22223
22741
|
/****************************************************************************/
|
|
22224
22742
|
//#region RENDER
|
|
22225
22743
|
render() {
|
|
22226
|
-
return (hAsync(Host, { key: '
|
|
22744
|
+
return (hAsync(Host, { key: '789d2f8b19178efb5e2998386670cfcbe239efed', 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: '4f09a5b6fee239e01856aa7ed90e9af0f13a69dc', size: this.size }), !this.loading && hAsync("nv-icon", { key: '44649863d33226aafad217dfbaba4cd56865b86d', name: this.name, size: this.size }), hAsync("slot", { key: 'e5483a758287d3e3843774a0581cd1db6da172e3' })));
|
|
22227
22745
|
}
|
|
22228
22746
|
static get formAssociated() { return true; }
|
|
22229
22747
|
get el() { return getElement(this); }
|
|
@@ -22271,7 +22789,7 @@ class NvLoader {
|
|
|
22271
22789
|
//#region RENDER
|
|
22272
22790
|
/* <slot> empty to force rendering change */
|
|
22273
22791
|
render() {
|
|
22274
|
-
return (hAsync(Host, { key: '
|
|
22792
|
+
return (hAsync(Host, { key: 'dad18e0ecc71ae0305fa1f287a336e8fa0da6889', class: clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
22275
22793
|
}
|
|
22276
22794
|
static get style() { return NvLoaderStyle0; }
|
|
22277
22795
|
static get cmpMeta() { return {
|
|
@@ -22482,7 +23000,7 @@ class NvMenu {
|
|
|
22482
23000
|
});
|
|
22483
23001
|
}
|
|
22484
23002
|
render() {
|
|
22485
|
-
return (hAsync(Host, { key: '
|
|
23003
|
+
return (hAsync(Host, { key: '287ae16bc4971d1d7811bd80384e93b8b7017945' }, hAsync("slot", { key: 'f09fa7b923d4f66e7fb8bebcfd943daf843eec38', name: "trigger" }), hAsync("nv-popover", { key: '757ff04ef461eb60c061bd28914f82fc59437e82', 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" })))));
|
|
22486
23004
|
}
|
|
22487
23005
|
get el() { return getElement(this); }
|
|
22488
23006
|
static get style() { return NvMenuStyle0; }
|
|
@@ -22553,7 +23071,7 @@ class NvMenuitem {
|
|
|
22553
23071
|
/****************************************************************************/
|
|
22554
23072
|
//#region RENDER
|
|
22555
23073
|
render() {
|
|
22556
|
-
return (hAsync(Host, { key: '
|
|
23074
|
+
return (hAsync(Host, { key: 'c008da503776b85bec237b25e321e4bba02d153f', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && hAsync("nv-icon", { key: '66341d40e68409b4c0ab6595a67eed1e4354d6ba', name: this.icon }), hAsync("slot", { key: 'e3960af26ffbc703a5702981e948013179b1a83b' }), this.label && hAsync("span", { key: '9633388dcbad3080b54b83845ced54f9b9d05061', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && hAsync("kbd", { key: 'da358858336a86a7a49bbd4a52b5f628aadc1c29' }, this.shortcut), this.hasSubmenu && hAsync("nv-icon", { key: '36a85c271a5dbe2c41eefac33209e5d9a909ae04', name: "chevron-right" })));
|
|
22557
23075
|
}
|
|
22558
23076
|
get el() { return getElement(this); }
|
|
22559
23077
|
static get style() { return NvMenuitemStyle0; }
|
|
@@ -24938,7 +25456,7 @@ class NvPopover {
|
|
|
24938
25456
|
/****************************************************************************/
|
|
24939
25457
|
//#region RENDER
|
|
24940
25458
|
render() {
|
|
24941
|
-
return (hAsync(Host, { key: '
|
|
25459
|
+
return (hAsync(Host, { key: '843ac572358b402d6338945d671446fec1c51a6d' }, hAsync("slot", { key: '090f01aea3932cb95357985766a20112c63c4992', name: "trigger" }), hAsync("div", { key: '737822dd1539381bb485a389670f09a071441365', "data-scope": "popover", hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (hAsync("div", { key: '9d268df3f0e1df7b2a2264154143c3db14619661', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), hAsync("slot", { key: '432aae053b25d2e7d6594203ad0ff3ecee26c059', name: "content" }))));
|
|
24942
25460
|
}
|
|
24943
25461
|
get el() { return getElement(this); }
|
|
24944
25462
|
static get watchers() { return {
|
|
@@ -24983,7 +25501,7 @@ class NvRow {
|
|
|
24983
25501
|
/****************************************************************************/
|
|
24984
25502
|
//#region RENDER
|
|
24985
25503
|
render() {
|
|
24986
|
-
return (hAsync(Host, { key: '
|
|
25504
|
+
return (hAsync(Host, { key: '20e40e37c82b00712ed3d60d46d460f5f877e10a' }, hAsync("slot", { key: '80ba27becb4d56ff0785054597d88c728fb3eca5' })));
|
|
24987
25505
|
}
|
|
24988
25506
|
static get style() { return NvRowStyle0; }
|
|
24989
25507
|
static get cmpMeta() { return {
|
|
@@ -25018,7 +25536,7 @@ class NvStack {
|
|
|
25018
25536
|
/****************************************************************************/
|
|
25019
25537
|
//#region RENDER
|
|
25020
25538
|
render() {
|
|
25021
|
-
return (hAsync(Host, { key: '
|
|
25539
|
+
return (hAsync(Host, { key: '24cca0f7101de5f37d30884983da28a839df9bee', 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: '3521e5dd684d2c6185fd434711ae85a6ea0b68ab' })));
|
|
25022
25540
|
}
|
|
25023
25541
|
static get style() { return NvStackStyle0; }
|
|
25024
25542
|
static get cmpMeta() { return {
|
|
@@ -25355,14 +25873,14 @@ class NvTable {
|
|
|
25355
25873
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
25356
25874
|
? []
|
|
25357
25875
|
: this.table.data;
|
|
25358
|
-
return (hAsync(Host, { key: '
|
|
25876
|
+
return (hAsync(Host, { key: '0e7b7e03592f9f68b9158e8374986986e0f155d4' }, hAsync("div", { key: 'eeebf671dde65fcd725fbbe78099816d1c07c65f', class: "hidden" }, hAsync("slot", { key: '2ac114cec120874bb0f7bf6ddde9ec9c88d978cf' })), hAsync("slot", { key: 'b8dea8ff4c987b679ab78e73c4b7698a608c1ee3', 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 &&
|
|
25359
25877
|
headerGroups.map(col => {
|
|
25360
25878
|
return (hAsync("th", { key: col.name }, this.renderTemplate(this.headerTemplateCache.get(col.name), {}) || col.header));
|
|
25361
25879
|
})))), 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 => {
|
|
25362
25880
|
var _a;
|
|
25363
25881
|
return (hAsync("td", null, this.renderTemplate(this.templateCache.get(col.name), row) ||
|
|
25364
25882
|
((_a = row[col.name]) !== null && _a !== void 0 ? _a : this.fallbackValue)));
|
|
25365
|
-
})))))))), hAsync("slot", { key: '
|
|
25883
|
+
})))))))), hAsync("slot", { key: '4dc0404a05946bc942f65af599fea186166cde9c', name: "after" })));
|
|
25366
25884
|
}
|
|
25367
25885
|
get el() { return getElement(this); }
|
|
25368
25886
|
static get watchers() { return {
|
|
@@ -25482,8 +26000,8 @@ class NvToggle {
|
|
|
25482
26000
|
/****************************************************************************/
|
|
25483
26001
|
//#region RENDER
|
|
25484
26002
|
render() {
|
|
25485
|
-
return (hAsync(Host, { key: '
|
|
25486
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
26003
|
+
return (hAsync(Host, { key: '9b3a2c50180d17241f514ebfecb2d959d6aaf263', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, hAsync("div", { key: '70420566c51bb19c3ef9b8718ba0069bd739fd26', class: "input-container" }, hAsync("input", { key: '5c1cfd0858a14cf1854de5a09b2daa55c4e781ba', 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: 'f4678a7ed5a7e58397aadfe5155b95a395f39fba', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '4d25373b9c782d3016da002d1fa22dd551a1597a', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: 'f297abef15befddc6b180edffe3ab7b0bb39d223', name: "label" }, this.label))), (this.description ||
|
|
26004
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '97f2b1045c5152fb66da582c7fcf2975cbe10e68', class: "description" }, hAsync("slot", { key: 'fae238400ac3a106079a7e361d179598a99363a4', name: "description" }, this.description))))));
|
|
25487
26005
|
}
|
|
25488
26006
|
static get formAssociated() { return true; }
|
|
25489
26007
|
get el() { return getElement(this); }
|
|
@@ -25522,6 +26040,7 @@ var NvTooltipStyle0 = nvTooltipCss;
|
|
|
25522
26040
|
class NvTooltip {
|
|
25523
26041
|
constructor(hostRef) {
|
|
25524
26042
|
registerInstance(this, hostRef);
|
|
26043
|
+
this.openChanged = createEvent(this, "openChanged", 7);
|
|
25525
26044
|
/**
|
|
25526
26045
|
* Decides where the tooltip shows up next to the element it’s linked to
|
|
25527
26046
|
* (above, below, to the sides). If there isn’t enough room, it will adjust
|
|
@@ -25535,7 +26054,7 @@ class NvTooltip {
|
|
|
25535
26054
|
*/
|
|
25536
26055
|
this.enterDelay = 0;
|
|
25537
26056
|
}
|
|
25538
|
-
//#endregion
|
|
26057
|
+
//#endregion EVENTS
|
|
25539
26058
|
/****************************************************************************/
|
|
25540
26059
|
//#region LIFECYCLE
|
|
25541
26060
|
componentWillLoad() {
|
|
@@ -25548,7 +26067,7 @@ class NvTooltip {
|
|
|
25548
26067
|
/****************************************************************************/
|
|
25549
26068
|
//#region RENDER
|
|
25550
26069
|
render() {
|
|
25551
|
-
return (hAsync(Host, { key: '
|
|
26070
|
+
return (hAsync(Host, { key: 'eb3e25818bb1e57340ac169d1c40a0e4e9c56668' }, hAsync("slot", { key: '7937859bff530ff10a0de9076a77c92afa9ec9e7' }), hAsync("nv-popover", { key: 'e825c93c7d90f5598416f1f081c95517c7a27883', triggerMode: "hover", hasArrow: true, placement: this.placement, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, hAsync("p", { key: '5a5987e3a04f02be104e5f8fcca2f40b75938a97', slot: "content" }, this.message), hAsync("slot", { key: 'd7efc512e29969e7c8c1a693f2fb15f9319e1fa8', name: "content" }))));
|
|
25552
26071
|
}
|
|
25553
26072
|
get el() { return getElement(this); }
|
|
25554
26073
|
static get style() { return NvTooltipStyle0; }
|
|
@@ -25568,6 +26087,8 @@ class NvTooltip {
|
|
|
25568
26087
|
}
|
|
25569
26088
|
|
|
25570
26089
|
registerComponents([
|
|
26090
|
+
NvAccordion,
|
|
26091
|
+
NvAccordionItem,
|
|
25571
26092
|
NvAlert,
|
|
25572
26093
|
NvAvatar,
|
|
25573
26094
|
NvBadge,
|