@nova-design-system/nova-webcomponents 3.9.1 → 3.10.1-beta.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/{constants-8fb8ccc0.js → constants-3b6beb66.js} +15 -1
- package/dist/cjs/constants-3b6beb66.js.map +1 -0
- package/dist/cjs/index-c56424e5.js +12 -0
- package/dist/cjs/index.cjs.js +7 -1
- 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 +1 -1
- package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +2 -2
- 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 +8 -2
- 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-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +2 -2
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-buttongroup.cjs.entry.js +198 -0
- package/dist/cjs/nv-buttongroup.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-calendar.cjs.entry.js +114 -37
- 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 +4 -4
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +2 -2
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +6 -6
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +6 -6
- 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 +432 -42
- 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 +4 -4
- package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldslider.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtime.cjs.entry.js +10 -10
- package/dist/cjs/nv-icon.cjs.entry.js +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +3 -3
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
- 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 +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 +3 -3
- package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-togglebutton.cjs.entry.js +58 -0
- package/dist/cjs/nv-togglebutton.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +172 -0
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +1 -1
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
- package/dist/collection/components/nv-alert/nv-alert.css +6 -0
- package/dist/collection/components/nv-badge/nv-badge.css +21 -0
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.css +2 -0
- package/dist/collection/components/nv-button/styles/nv-button.css +8 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js +43 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js.map +1 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.js +217 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.js.map +1 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.utils.js +86 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.utils.js.map +1 -0
- package/dist/collection/components/nv-buttongroup/styles/nv-buttongroup.css +73 -0
- package/dist/collection/components/nv-buttongroup/test/nv-buttongroup.utils.test.js +312 -0
- package/dist/collection/components/nv-buttongroup/test/nv-buttongroup.utils.test.js.map +1 -0
- package/dist/collection/components/nv-calendar/nv-calendar.css +9 -0
- package/dist/collection/components/nv-calendar/nv-calendar.js +37 -24
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js +68 -0
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js +5 -3
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/day-cell.js +4 -9
- package/dist/collection/components/nv-calendar/partials/day-cell.js.map +1 -1
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +1 -0
- 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.js +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +1 -0
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +6 -6
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +6 -6
- 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 +7 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +885 -122
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +616 -104
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +70 -16
- 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.css +1 -0
- 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-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-icon/nv-icons.js +6 -0
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +4 -0
- 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 +2 -2
- 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.css +1 -0
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.docs.js +6 -0
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.docs.js.map +1 -0
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +191 -0
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js.map +1 -0
- package/dist/collection/components/nv-togglebutton/styles/nv-togglebutton.css +135 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +56 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +324 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js.map +1 -0
- package/dist/collection/components/nv-togglebuttongroup/styles/nv-togglebuttongroup.css +45 -0
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/utils/constants.js +12 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/components/index.js +7 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +4 -4
- package/dist/components/nv-alert.js +3 -3
- 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-breadcrumb.js.map +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-buttongroup.d.ts +11 -0
- package/dist/components/nv-buttongroup.js +221 -0
- package/dist/components/nv-buttongroup.js.map +1 -0
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +6 -6
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridcolumn.js +1 -1
- package/dist/components/nv-dialog.js +7 -7
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +12 -12
- package/dist/components/nv-fielddaterange.js +12 -12
- 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 +454 -56
- 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 +4 -4
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +8 -8
- package/dist/components/nv-fieldslider.js +7 -7
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +14 -14
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +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 +3 -3
- package/dist/components/nv-toggle.js.map +1 -1
- package/dist/components/nv-togglebutton.d.ts +11 -0
- package/dist/components/nv-togglebutton.js +78 -0
- package/dist/components/nv-togglebutton.js.map +1 -0
- package/dist/components/nv-togglebuttongroup.d.ts +11 -0
- package/dist/components/nv-togglebuttongroup.js +196 -0
- package/dist/components/nv-togglebuttongroup.js.map +1 -0
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-68ff562f.js → p-0ffb4785.js} +5 -5
- package/dist/components/{p-68ff562f.js.map → p-0ffb4785.js.map} +1 -1
- package/dist/components/{p-8067d283.js → p-195f46f3.js} +2 -2
- package/dist/components/{p-8067d283.js.map → p-195f46f3.js.map} +1 -1
- package/dist/components/{p-e4e1a926.js → p-1bb737fa.js} +3 -3
- package/dist/components/{p-e4e1a926.js.map → p-1bb737fa.js.map} +1 -1
- package/dist/components/{p-db4ba1d9.js → p-2db5d1ab.js} +7 -7
- package/dist/components/{p-db4ba1d9.js.map → p-2db5d1ab.js.map} +1 -1
- package/dist/components/{p-ba87d9d5.js → p-2ef4fb88.js} +3 -3
- package/dist/components/{p-ba87d9d5.js.map → p-2ef4fb88.js.map} +1 -1
- package/dist/components/{p-f1df2634.js → p-32e8e42e.js} +2 -2
- package/dist/components/{p-f1df2634.js.map → p-32e8e42e.js.map} +1 -1
- package/dist/components/{p-6de6866c.js → p-45a625fb.js} +6 -6
- package/dist/components/{p-6de6866c.js.map → p-45a625fb.js.map} +1 -1
- package/dist/components/{p-025b8a78.js → p-50d0db7b.js} +5 -5
- package/dist/components/{p-025b8a78.js.map → p-50d0db7b.js.map} +1 -1
- package/dist/components/{p-ed6686a1.js → p-51876ca1.js} +2 -2
- package/dist/components/{p-ed6686a1.js.map → p-51876ca1.js.map} +1 -1
- package/dist/components/p-8011513c.js +189 -0
- package/dist/components/{p-60064345.js.map → p-8011513c.js.map} +1 -1
- package/dist/components/{p-82e5674c.js → p-8aee1010.js} +116 -38
- package/dist/components/p-8aee1010.js.map +1 -0
- package/dist/components/{p-79e6b6a2.js → p-9fdaea9a.js} +5 -5
- package/dist/components/p-9fdaea9a.js.map +1 -0
- package/dist/components/{p-6460318d.js → p-a1fe0a5d.js} +4 -4
- package/dist/components/p-a1fe0a5d.js.map +1 -0
- package/dist/components/{p-1f505531.js → p-a3ddec4c.js} +15 -1
- package/dist/components/p-a3ddec4c.js.map +1 -0
- package/dist/components/{p-0143cee0.js → p-a5002d14.js} +6 -6
- package/dist/components/{p-0143cee0.js.map → p-a5002d14.js.map} +1 -1
- package/dist/components/{p-30f970c3.js → p-b659b999.js} +3 -3
- package/dist/components/{p-30f970c3.js.map → p-b659b999.js.map} +1 -1
- package/dist/components/{p-5d5668f0.js → p-cf06032d.js} +4 -4
- package/dist/components/{p-5d5668f0.js.map → p-cf06032d.js.map} +1 -1
- package/dist/components/{p-e104c58a.js → p-ec4558aa.js} +9 -3
- package/dist/components/p-ec4558aa.js.map +1 -0
- package/dist/components/{p-dfd2d4f0.js → p-fda58a76.js} +2 -2
- package/dist/components/{p-dfd2d4f0.js.map → p-fda58a76.js.map} +1 -1
- package/dist/esm/{constants-4faa1fae.js → constants-23aaef7b.js} +15 -1
- package/dist/esm/constants-23aaef7b.js.map +1 -0
- package/dist/esm/index-a1936cd0.js +12 -0
- package/dist/esm/index.js +7 -1
- 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 +1 -1
- package/dist/esm/nv-accordion-item.entry.js.map +1 -1
- package/dist/esm/nv-alert.entry.js +2 -2
- 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 +8 -2
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js.map +1 -1
- package/dist/esm/nv-button.entry.js +2 -2
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-buttongroup.entry.js +194 -0
- package/dist/esm/nv-buttongroup.entry.js.map +1 -0
- package/dist/esm/nv-calendar.entry.js +114 -37
- 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 +4 -4
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +1 -1
- package/dist/esm/nv-dialog.entry.js +2 -2
- package/dist/esm/nv-dialogfooter_2.entry.js +3 -3
- package/dist/esm/nv-fieldcheckbox.entry.js +5 -5
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddate.entry.js +6 -6
- package/dist/esm/nv-fielddaterange.entry.js +6 -6
- 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 +433 -43
- 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 +4 -4
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldslider.entry.js +3 -3
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js +10 -10
- package/dist/esm/nv-icon.entry.js +3 -3
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +3 -3
- package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
- 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 +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 +3 -3
- package/dist/esm/nv-toggle.entry.js.map +1 -1
- package/dist/esm/nv-togglebutton.entry.js +54 -0
- package/dist/esm/nv-togglebutton.entry.js.map +1 -0
- package/dist/esm/nv-togglebuttongroup.entry.js +168 -0
- package/dist/esm/nv-togglebuttongroup.entry.js.map +1 -0
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/p-019d164d.entry.js +2 -0
- package/dist/native/p-019d164d.entry.js.map +1 -0
- package/dist/native/{p-2a6783ca.entry.js → p-0da8f0d1.entry.js} +2 -2
- package/dist/native/{p-2a6783ca.entry.js.map → p-0da8f0d1.entry.js.map} +1 -1
- package/dist/native/p-0ef94dae.entry.js +2 -0
- package/dist/native/{p-1ad1bff9.entry.js.map → p-0ef94dae.entry.js.map} +1 -1
- package/dist/native/p-184032cb.entry.js +2 -0
- package/dist/native/{p-a73fa60a.entry.js.map → p-184032cb.entry.js.map} +1 -1
- package/dist/native/p-2197ffdf.entry.js +2 -0
- package/dist/native/{p-fa81b77f.entry.js.map → p-2197ffdf.entry.js.map} +1 -1
- package/dist/native/p-234cfa2e.entry.js +2 -0
- package/dist/native/{p-3f139780.entry.js → p-2d647761.entry.js} +2 -2
- package/dist/native/{p-ff248eb8.entry.js → p-348c6bb4.entry.js} +2 -2
- package/dist/native/p-397c0fca.entry.js +2 -0
- package/dist/native/{p-51a57a3a.entry.js.map → p-397c0fca.entry.js.map} +1 -1
- package/dist/native/{p-55cd3d62.entry.js → p-3da64006.entry.js} +2 -2
- package/dist/native/p-3ed84cd9.entry.js +2 -0
- package/dist/native/{p-fcd52432.entry.js.map → p-3ed84cd9.entry.js.map} +1 -1
- package/dist/native/{p-3ff7a912.entry.js → p-3fcaac6d.entry.js} +2 -2
- package/dist/native/{p-b7ec9a1b.entry.js → p-4302824a.entry.js} +2 -2
- package/dist/native/p-43071c3b.entry.js +2 -0
- package/dist/native/p-44dd9a4c.entry.js +2 -0
- package/dist/native/p-44dd9a4c.entry.js.map +1 -0
- package/dist/native/p-464bb197.entry.js +2 -0
- package/dist/native/p-464bb197.entry.js.map +1 -0
- package/dist/native/{p-916acbd3.entry.js → p-49504fd6.entry.js} +2 -2
- package/dist/native/p-4f4ed012.entry.js +2 -0
- package/dist/native/p-4f4ed012.entry.js.map +1 -0
- package/dist/native/{p-bc77cac1.entry.js → p-553778e6.entry.js} +2 -2
- package/dist/native/p-553778e6.entry.js.map +1 -0
- package/dist/native/{p-bee62b2b.entry.js → p-5f0776cb.entry.js} +2 -2
- package/dist/native/p-62032cd9.entry.js +2 -0
- package/dist/native/p-62032cd9.entry.js.map +1 -0
- package/dist/native/{p-11012998.entry.js → p-676447d7.entry.js} +3 -3
- package/dist/native/{p-16ef7dd4.entry.js → p-681f2bac.entry.js} +2 -2
- package/dist/native/{p-4b15cff3.entry.js → p-7f0d576b.entry.js} +2 -2
- package/dist/native/{p-68edb2e8.entry.js → p-85f8f11a.entry.js} +2 -2
- package/dist/native/{p-0e005d95.entry.js → p-888ad58e.entry.js} +2 -2
- package/dist/native/{p-34bf336f.entry.js → p-92931ab8.entry.js} +2 -2
- package/dist/native/{p-f00a4552.entry.js → p-94dc9c41.entry.js} +2 -2
- package/dist/native/p-9991116a.entry.js +2 -0
- package/dist/native/p-9991116a.entry.js.map +1 -0
- package/dist/native/{p-85a54ef2.entry.js → p-9c5d6827.entry.js} +2 -2
- package/dist/native/{p-08452012.entry.js → p-9f451b8a.entry.js} +3 -3
- package/dist/native/{p-08452012.entry.js.map → p-9f451b8a.entry.js.map} +1 -1
- package/dist/native/{p-1f932a4b.entry.js → p-aacd8789.entry.js} +2 -2
- package/dist/native/p-ac5496e7.entry.js +2 -0
- package/dist/native/{p-9ea3d30d.entry.js → p-ad2cc829.entry.js} +2 -2
- package/dist/native/{p-67c34b8c.entry.js → p-b58fb522.entry.js} +2 -2
- package/dist/native/p-ba9906b7.entry.js +2 -0
- package/dist/native/{p-64cb38e6.entry.js.map → p-ba9906b7.entry.js.map} +1 -1
- package/dist/native/{p-f540db71.entry.js → p-dd023fd6.entry.js} +2 -2
- package/dist/native/p-f033c4ce.entry.js +2 -0
- package/dist/native/p-f033c4ce.entry.js.map +1 -0
- package/dist/native/{p-051db87c.entry.js → p-fb672f90.entry.js} +2 -2
- package/dist/native/p-fc9564b3.js +2 -0
- package/dist/native/p-fc9564b3.js.map +1 -0
- package/dist/types/components/nv-buttongroup/nv-buttongroup.d.ts +50 -0
- package/dist/types/components/nv-buttongroup/nv-buttongroup.docs.d.ts +4 -0
- package/dist/types/components/nv-buttongroup/nv-buttongroup.utils.d.ts +25 -0
- package/dist/types/components/nv-buttongroup/test/nv-buttongroup.utils.test.d.ts +1 -0
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +11 -1
- package/dist/types/components/nv-calendar/nv-calendar.utils.d.ts +31 -0
- package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +11 -1
- package/dist/types/components/nv-calendar/partials/day-cell.d.ts +7 -1
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +2 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +119 -23
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-togglebutton/nv-togglebutton.d.ts +46 -0
- package/dist/types/components/nv-togglebutton/nv-togglebutton.docs.d.ts +4 -0
- package/dist/types/components/nv-togglebuttongroup/nv-togglebuttongroup.d.ts +80 -0
- package/dist/types/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.d.ts +4 -0
- package/dist/types/components.d.ts +289 -2
- package/dist/types/utils/constants.d.ts +10 -0
- package/dist/vscode-data.json +189 -0
- package/hydrate/index.js +1119 -169
- package/hydrate/index.mjs +1119 -169
- package/package.json +14 -2
- package/dist/cjs/constants-8fb8ccc0.js.map +0 -1
- package/dist/components/p-1f505531.js.map +0 -1
- package/dist/components/p-60064345.js +0 -189
- package/dist/components/p-6460318d.js.map +0 -1
- package/dist/components/p-79e6b6a2.js.map +0 -1
- package/dist/components/p-82e5674c.js.map +0 -1
- package/dist/components/p-e104c58a.js.map +0 -1
- package/dist/esm/constants-4faa1fae.js.map +0 -1
- package/dist/native/p-10ce53ea.entry.js +0 -2
- package/dist/native/p-1ad1bff9.entry.js +0 -2
- package/dist/native/p-4a533dd8.entry.js +0 -2
- package/dist/native/p-4a533dd8.entry.js.map +0 -1
- package/dist/native/p-51a57a3a.entry.js +0 -2
- package/dist/native/p-64cb38e6.entry.js +0 -2
- package/dist/native/p-73c08f3b.entry.js +0 -2
- package/dist/native/p-73c08f3b.entry.js.map +0 -1
- package/dist/native/p-a36dc25a.entry.js +0 -2
- package/dist/native/p-a36dc25a.entry.js.map +0 -1
- package/dist/native/p-a50f3850.entry.js +0 -2
- package/dist/native/p-a73fa60a.entry.js +0 -2
- package/dist/native/p-b3f9db23.entry.js +0 -2
- package/dist/native/p-b3f9db23.entry.js.map +0 -1
- package/dist/native/p-bc77cac1.entry.js.map +0 -1
- package/dist/native/p-e2d0a77d.js +0 -2
- package/dist/native/p-e2d0a77d.js.map +0 -1
- package/dist/native/p-ec92ee7a.entry.js +0 -2
- package/dist/native/p-fa81b77f.entry.js +0 -2
- package/dist/native/p-fcd52432.entry.js +0 -2
- /package/dist/native/{p-ec92ee7a.entry.js.map → p-234cfa2e.entry.js.map} +0 -0
- /package/dist/native/{p-3f139780.entry.js.map → p-2d647761.entry.js.map} +0 -0
- /package/dist/native/{p-ff248eb8.entry.js.map → p-348c6bb4.entry.js.map} +0 -0
- /package/dist/native/{p-55cd3d62.entry.js.map → p-3da64006.entry.js.map} +0 -0
- /package/dist/native/{p-3ff7a912.entry.js.map → p-3fcaac6d.entry.js.map} +0 -0
- /package/dist/native/{p-b7ec9a1b.entry.js.map → p-4302824a.entry.js.map} +0 -0
- /package/dist/native/{p-10ce53ea.entry.js.map → p-43071c3b.entry.js.map} +0 -0
- /package/dist/native/{p-916acbd3.entry.js.map → p-49504fd6.entry.js.map} +0 -0
- /package/dist/native/{p-bee62b2b.entry.js.map → p-5f0776cb.entry.js.map} +0 -0
- /package/dist/native/{p-11012998.entry.js.map → p-676447d7.entry.js.map} +0 -0
- /package/dist/native/{p-16ef7dd4.entry.js.map → p-681f2bac.entry.js.map} +0 -0
- /package/dist/native/{p-4b15cff3.entry.js.map → p-7f0d576b.entry.js.map} +0 -0
- /package/dist/native/{p-68edb2e8.entry.js.map → p-85f8f11a.entry.js.map} +0 -0
- /package/dist/native/{p-0e005d95.entry.js.map → p-888ad58e.entry.js.map} +0 -0
- /package/dist/native/{p-34bf336f.entry.js.map → p-92931ab8.entry.js.map} +0 -0
- /package/dist/native/{p-f00a4552.entry.js.map → p-94dc9c41.entry.js.map} +0 -0
- /package/dist/native/{p-85a54ef2.entry.js.map → p-9c5d6827.entry.js.map} +0 -0
- /package/dist/native/{p-1f932a4b.entry.js.map → p-aacd8789.entry.js.map} +0 -0
- /package/dist/native/{p-a50f3850.entry.js.map → p-ac5496e7.entry.js.map} +0 -0
- /package/dist/native/{p-9ea3d30d.entry.js.map → p-ad2cc829.entry.js.map} +0 -0
- /package/dist/native/{p-67c34b8c.entry.js.map → p-b58fb522.entry.js.map} +0 -0
- /package/dist/native/{p-f540db71.entry.js.map → p-dd023fd6.entry.js.map} +0 -0
- /package/dist/native/{p-051db87c.entry.js.map → p-fb672f90.entry.js.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-aff3ed68.js';
|
|
2
|
-
import { d as defineCustomElement$8 } from './p-
|
|
3
|
-
import { d as defineCustomElement$7 } from './p-
|
|
4
|
-
import { d as defineCustomElement$6 } from './p-
|
|
5
|
-
import { d as defineCustomElement$5 } from './p-
|
|
6
|
-
import { d as defineCustomElement$4 } from './p-
|
|
7
|
-
import { d as defineCustomElement$3 } from './p-
|
|
8
|
-
import { d as defineCustomElement$2 } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment, d as Host } from './p-aff3ed68.js';
|
|
2
|
+
import { d as defineCustomElement$8 } from './p-8011513c.js';
|
|
3
|
+
import { d as defineCustomElement$7 } from './p-a5002d14.js';
|
|
4
|
+
import { d as defineCustomElement$6 } from './p-ec4558aa.js';
|
|
5
|
+
import { d as defineCustomElement$5 } from './p-a1fe0a5d.js';
|
|
6
|
+
import { d as defineCustomElement$4 } from './p-50d0db7b.js';
|
|
7
|
+
import { d as defineCustomElement$3 } from './p-fda58a76.js';
|
|
8
|
+
import { d as defineCustomElement$2 } from './p-195f46f3.js';
|
|
9
9
|
import { v as v4 } from './p-f5ff676c.js';
|
|
10
10
|
|
|
11
|
-
const nvFieldmultiselectCss = "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-fieldmultiselect{--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-fieldmultiselect[fluid]:not([fluid=false]){max-width:unset}nv-fieldmultiselect[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-fieldmultiselect[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-fieldmultiselect[required]:not([required=false])>label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldmultiselect 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-fieldmultiselect nv-popover{width:100%;display:block}nv-fieldmultiselect nv-popover [data-scope=popover]{width:100%;padding:var(--list-dropdown-padding);border-radius:var(--list-dropdown-radius);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border)}nv-fieldmultiselect nv-popover [slot=content]{gap:var(--list-dropdown-gap-y);display:flex;flex-direction:column}nv-fieldmultiselect nv-popover hr{color:var(--components-list-dropdown-separator)}nv-fieldmultiselect nv-popover div[slot=content]{max-height:calc(90vh - var(--list-dropdown-padding) * 2);overflow-y:auto;position:relative}nv-fieldmultiselect nv-popover div[slot=content]::-webkit-scrollbar{width:6px;height:6px}nv-fieldmultiselect nv-popover div[slot=content]::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fieldmultiselect nv-popover div[slot=content]::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fieldmultiselect .input-wrapper-multiselect{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldmultiselect .input-container-multiselect{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;position:relative;width:100%;min-height:40px;}nv-fieldmultiselect .input-container-multiselect:hover{border-color:var(--nv-field-border-hover)}nv-fieldmultiselect .input-container-multiselect:focus-within,nv-fieldmultiselect .input-container-multiselect:focus-within:hover,nv-fieldmultiselect .input-container-multiselect:focus,nv-fieldmultiselect .input-container-multiselect: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-fieldmultiselect .input-container-multiselect:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldmultiselect .input-container-multiselect:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldmultiselect .input-container-multiselect>nv-badge{margin-left:var(--form-field-padding-x)}nv-fieldmultiselect .input-container-multiselect input,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text{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%;width:100%;flex-grow:1;margin:0;min-height:100%;box-sizing:border-box}nv-fieldmultiselect .input-container-multiselect input:focus,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text:focus{outline:none}nv-fieldmultiselect .input-container-multiselect input::placeholder,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text::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-fieldmultiselect .input-container-multiselect input[type=password]::-ms-clear,nv-fieldmultiselect .input-container-multiselect input[type=password]::-ms-reveal,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text[type=password]::-ms-clear,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldmultiselect .input-container-multiselect>nv-iconbutton{border:0px;border-radius:0px}nv-fieldmultiselect .input-container-multiselect>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldmultiselect .input-container-multiselect nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldmultiselect .non-filterable-text{display:block;border-radius:var(--form-field-radius);background-color:var(--nv-field-background);color:var(--components-form-field-content-text);font-size:var(--form-field-font-size);font-weight:500;line-height:var(--form-field-line-height);box-sizing:border-box;cursor:pointer;height:100%;min-height:40px}nv-fieldmultiselect .non-filterable-text span{display:inline-block;width:100%;overflow:hidden;text-overflow:ellipsis}nv-fieldmultiselect .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-fieldmultiselect .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)}.no-results-message{text-align:center;padding:10px;color:var(--components-form-text-description-error)}.multiselect-divider{display:block;width:100%;height:1px;background-color:var(--components-list-dropdown-separator);margin:var(--list-dropdown-item-padding-y) 0;border:0}";
|
|
11
|
+
const nvFieldmultiselectCss = "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-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-fieldmultiselect{--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-fieldmultiselect[fluid]:not([fluid=false]){max-width:unset}nv-fieldmultiselect[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-fieldmultiselect[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-fieldmultiselect[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldmultiselect 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-fieldmultiselect nv-popover{width:100%;display:block}nv-fieldmultiselect nv-popover [data-scope=popover]{width:100%;padding:var(--list-dropdown-padding);border-radius:var(--list-dropdown-radius);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border)}nv-fieldmultiselect nv-popover [slot=content]{gap:var(--list-dropdown-gap-y);display:flex;flex-direction:column}nv-fieldmultiselect nv-popover hr{color:var(--components-list-dropdown-separator)}nv-fieldmultiselect nv-popover div[slot=content]{max-height:calc(90vh - var(--list-dropdown-padding) * 2);overflow-y:auto;position:relative}nv-fieldmultiselect nv-popover div[slot=content]::-webkit-scrollbar{width:6px;height:6px}nv-fieldmultiselect nv-popover div[slot=content]::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fieldmultiselect nv-popover div[slot=content]::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fieldmultiselect .input-wrapper-multiselect{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldmultiselect .input-container-multiselect{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;position:relative;width:100%;min-height:40px}nv-fieldmultiselect .input-container-multiselect:hover{border-color:var(--nv-field-border-hover)}nv-fieldmultiselect .input-container-multiselect:focus-within,nv-fieldmultiselect .input-container-multiselect:focus-within:hover,nv-fieldmultiselect .input-container-multiselect:focus,nv-fieldmultiselect .input-container-multiselect: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-fieldmultiselect .input-container-multiselect:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldmultiselect .input-container-multiselect:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldmultiselect .input-container-multiselect>nv-badge{margin-left:var(--form-field-padding-x)}nv-fieldmultiselect .input-container-multiselect input,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text{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%;width:100%;flex-grow:1;margin:0;min-height:100%;box-sizing:border-box}nv-fieldmultiselect .input-container-multiselect input:focus,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text:focus{outline:none}nv-fieldmultiselect .input-container-multiselect input::placeholder,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text::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-fieldmultiselect .input-container-multiselect input[type=password]::-ms-clear,nv-fieldmultiselect .input-container-multiselect input[type=password]::-ms-reveal,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text[type=password]::-ms-clear,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldmultiselect .input-container-multiselect>nv-iconbutton{border:0px;border-radius:0px}nv-fieldmultiselect .input-container-multiselect>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldmultiselect .input-container-multiselect nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldmultiselect .non-filterable-text{display:block;border-radius:var(--form-field-radius);background-color:var(--nv-field-background);color:var(--components-form-field-content-text);font-size:var(--form-field-font-size);font-weight:500;line-height:var(--form-field-line-height);box-sizing:border-box;cursor:pointer;height:100%;min-height:40px}nv-fieldmultiselect .non-filterable-text span{display:inline-block;width:100%;overflow:hidden;text-overflow:ellipsis}nv-fieldmultiselect .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-fieldmultiselect .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)}.no-results-message{cursor:not-allowed;background-color:unset;color:var(--components-menu-contextual-item-content-disabled);padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x)}.multiselect-divider{display:block;width:100%;height:1px;background-color:var(--components-list-dropdown-separator);margin:var(--list-dropdown-item-padding-y) 0;border:0}.select-all-container{position:sticky;top:0;background-color:var(--components-list-dropdown-background);border-bottom:1px solid var(--components-list-dropdown-separator);padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);z-index:10;margin-bottom:0}.select-all-container .select-all-header{display:flex;align-items:center;gap:var(--form-field-gap)}.select-all-container .select-all-header nv-fieldcheckbox{flex:1;margin:0}.select-all-container .select-all-header nv-iconbutton,.select-all-container .select-all-header nv-button{flex-shrink:0;margin-left:auto}.select-all-container .select-all-header nv-button{justify-content:center}";
|
|
12
12
|
const NvFieldmultiselectStyle0 = nvFieldmultiselectCss;
|
|
13
13
|
|
|
14
14
|
const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmultiselect extends H {
|
|
@@ -17,8 +17,7 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
17
17
|
this.__registerHost();
|
|
18
18
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
19
19
|
this.filterTextChanged = createEvent(this, "filterTextChanged", 7);
|
|
20
|
-
|
|
21
|
-
//#region PROPERTIES
|
|
20
|
+
this.isBulkOperation = false;
|
|
22
21
|
/**
|
|
23
22
|
* Sets the ID for the input element and the for attribute of the associated
|
|
24
23
|
* label. If no ID is provided, a random one will be automatically generated
|
|
@@ -33,11 +32,6 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
33
32
|
* always type in fresh data.
|
|
34
33
|
*/
|
|
35
34
|
this.autocomplete = 'off';
|
|
36
|
-
/**
|
|
37
|
-
* Specifies the selected values of the multiselect field.
|
|
38
|
-
* This is the canonical value for the component and is used for form submission.
|
|
39
|
-
*/
|
|
40
|
-
this.value = [];
|
|
41
35
|
/**
|
|
42
36
|
* Marks the input field as required.
|
|
43
37
|
*/
|
|
@@ -65,13 +59,22 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
65
59
|
*/
|
|
66
60
|
this.open = false;
|
|
67
61
|
/**
|
|
68
|
-
*
|
|
62
|
+
* Allows the field to stretch and fill the entire width of its container.
|
|
69
63
|
*/
|
|
70
|
-
this.
|
|
64
|
+
this.fluid = false;
|
|
65
|
+
/**
|
|
66
|
+
* Specifies the selected values of the multiselect field.
|
|
67
|
+
* This is the canonical value for the component and is used for form submission.
|
|
68
|
+
*/
|
|
69
|
+
this.value = [];
|
|
71
70
|
/**
|
|
72
71
|
* Enables or disables the filtering feature for the multiselect items.
|
|
73
72
|
*/
|
|
74
73
|
this.filterable = false;
|
|
74
|
+
/**
|
|
75
|
+
* The text to display when no items match the filter.
|
|
76
|
+
*/
|
|
77
|
+
this.emptyResult = 'No results found';
|
|
75
78
|
/**
|
|
76
79
|
* Delay in milliseconds before the search is triggered when typing in the filter input.
|
|
77
80
|
* @default 300
|
|
@@ -83,10 +86,6 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
83
86
|
* element.
|
|
84
87
|
*/
|
|
85
88
|
this.autofocus = false;
|
|
86
|
-
/**
|
|
87
|
-
* Allows the field to stretch and fill the entire width of its container.
|
|
88
|
-
*/
|
|
89
|
-
this.fluid = false;
|
|
90
89
|
/**
|
|
91
90
|
* Text for the badge showing the number of selected items.
|
|
92
91
|
*/
|
|
@@ -95,6 +94,18 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
95
94
|
* The text entered by the user for filtering multiselect items.
|
|
96
95
|
*/
|
|
97
96
|
this.filterText = '';
|
|
97
|
+
/**
|
|
98
|
+
* Enables or disables the "Select All / Deselect All" toggle functionality.
|
|
99
|
+
*/
|
|
100
|
+
this.enableSelectAll = false;
|
|
101
|
+
/**
|
|
102
|
+
* Text for the "Select All" button.
|
|
103
|
+
*/
|
|
104
|
+
this.selectAllLabel = 'Select/deselect all';
|
|
105
|
+
/**
|
|
106
|
+
* Text for the "Deselect All" button.
|
|
107
|
+
*/
|
|
108
|
+
this.deselectAllLabel = 'Select/deselect all';
|
|
98
109
|
//#endregion PROPERTIES
|
|
99
110
|
/****************************************************************************/
|
|
100
111
|
//#region STATE
|
|
@@ -103,10 +114,25 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
103
114
|
*/
|
|
104
115
|
this.sortedOptions = [];
|
|
105
116
|
this.isHandlingEscape = false;
|
|
117
|
+
/**
|
|
118
|
+
* Indicates whether the current filter has visible results.
|
|
119
|
+
* Used to control the visibility of the "Select All" button.
|
|
120
|
+
*/
|
|
121
|
+
this.hasFilterResults = true;
|
|
122
|
+
/**
|
|
123
|
+
* Controls the visibility of the select all section.
|
|
124
|
+
*/
|
|
125
|
+
this.isSelectAllSectionVisible = true;
|
|
126
|
+
// Add the flag to the class
|
|
127
|
+
this.preventBlurClose = false;
|
|
128
|
+
this.handleMouseDownPreventBlur = () => {
|
|
129
|
+
this.preventBlurClose = true;
|
|
130
|
+
};
|
|
106
131
|
/**
|
|
107
132
|
* Handle badge close for options mode.
|
|
108
133
|
*/
|
|
109
134
|
this.handleBadgeCloseOptions = () => {
|
|
135
|
+
console.info('handleBadgeCloseOptions:', this.value);
|
|
110
136
|
this.value = [];
|
|
111
137
|
this.valueChanged.emit(this.value);
|
|
112
138
|
// Uncheck all elements
|
|
@@ -124,6 +150,7 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
124
150
|
* Handle badge close for slots mode.
|
|
125
151
|
*/
|
|
126
152
|
this.handleBadgeCloseSlots = () => {
|
|
153
|
+
console.info('handleBadgeCloseSlots:', this.value);
|
|
127
154
|
this.value = [];
|
|
128
155
|
this.valueChanged.emit(this.value);
|
|
129
156
|
// Uncheck all elements
|
|
@@ -132,8 +159,11 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
132
159
|
item.checked = false;
|
|
133
160
|
item.style.display = '';
|
|
134
161
|
});
|
|
135
|
-
//
|
|
136
|
-
|
|
162
|
+
// Force DOM update before reordering
|
|
163
|
+
requestAnimationFrame(() => {
|
|
164
|
+
// Reorder slot content
|
|
165
|
+
this.reorderSlotContent();
|
|
166
|
+
});
|
|
137
167
|
};
|
|
138
168
|
/**
|
|
139
169
|
* Handle popover close
|
|
@@ -155,12 +185,17 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
155
185
|
this.filterText = '';
|
|
156
186
|
this.filterTextChanged.emit('');
|
|
157
187
|
this.resetFilter();
|
|
188
|
+
this.hasFilterResults = true;
|
|
158
189
|
};
|
|
159
190
|
/**
|
|
160
191
|
* Handle input blur for options mode.
|
|
161
192
|
*/
|
|
162
193
|
this.handleInputBlurOptions = () => {
|
|
163
194
|
setTimeout(() => {
|
|
195
|
+
if (this.preventBlurClose) {
|
|
196
|
+
this.preventBlurClose = false;
|
|
197
|
+
return; // Don't close the popover
|
|
198
|
+
}
|
|
164
199
|
if (!this.el.contains(document.activeElement)) {
|
|
165
200
|
// Close the popover without affecting the divider
|
|
166
201
|
this.open = false;
|
|
@@ -279,6 +314,11 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
279
314
|
*/
|
|
280
315
|
this.handleInputBlurSlots = () => {
|
|
281
316
|
setTimeout(() => {
|
|
317
|
+
// Honor preventBlurClose to avoid closing when interacting inside the popover
|
|
318
|
+
if (this.preventBlurClose) {
|
|
319
|
+
this.preventBlurClose = false;
|
|
320
|
+
return; // Don't close the popover
|
|
321
|
+
}
|
|
282
322
|
if (!this.el.contains(document.activeElement)) {
|
|
283
323
|
// Close the popover without affecting the divider
|
|
284
324
|
this.open = false;
|
|
@@ -307,6 +347,120 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
307
347
|
}
|
|
308
348
|
this.open = !this.open;
|
|
309
349
|
};
|
|
350
|
+
/**
|
|
351
|
+
* Toggles the selection state of all non-disabled options in options mode.
|
|
352
|
+
* Respects filtering by only selecting/deselecting visible items.
|
|
353
|
+
* @param {boolean} selectAll - Whether to select all items (true) or deselect all (false)
|
|
354
|
+
*/
|
|
355
|
+
this.toggleSelectAllOptions = (selectAll) => {
|
|
356
|
+
if (!this.options)
|
|
357
|
+
return;
|
|
358
|
+
this.isBulkOperation = true; // Set flag to suppress individual emissions
|
|
359
|
+
try {
|
|
360
|
+
// Get visible and enabled option values from DOM
|
|
361
|
+
const visibleOptionValues = this.getVisibleEnabledOptionItems();
|
|
362
|
+
console.info('[SelectAll][Options] toggleSelectAllOptions called. selectAll:', selectAll, 'visibleOptionValues:', visibleOptionValues, 'Current value:', this.value);
|
|
363
|
+
if (selectAll) {
|
|
364
|
+
// Select all visible options - merge with existing selections
|
|
365
|
+
this.value = [...new Set([...this.value, ...visibleOptionValues])];
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
// Deselect only the visible options, keep others that might be filtered out
|
|
369
|
+
this.value = this.value.filter(val => !visibleOptionValues.includes(val));
|
|
370
|
+
}
|
|
371
|
+
console.info('[SelectAll][Options] New value after toggle:', this.value);
|
|
372
|
+
// Emit the change event
|
|
373
|
+
this.valueChanged.emit(this.value);
|
|
374
|
+
// Synchronize child components
|
|
375
|
+
this.syncChildComponents();
|
|
376
|
+
// Reorder content to move selected items to top
|
|
377
|
+
this.reorderOptionsContent();
|
|
378
|
+
}
|
|
379
|
+
finally {
|
|
380
|
+
// Defer reset to next frame to ensure any async child emissions are ignored
|
|
381
|
+
requestAnimationFrame(() => {
|
|
382
|
+
this.isBulkOperation = false; // Reset flag
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Toggles the selection state of all non-disabled slot items.
|
|
388
|
+
* @param {boolean} selectAll - Whether to select all items (true) or deselect all (false)
|
|
389
|
+
*/
|
|
390
|
+
this.toggleSelectAllSlots = (selectAll) => {
|
|
391
|
+
if (this.options)
|
|
392
|
+
return; // Only for slots mode
|
|
393
|
+
this.isBulkOperation = true; // Set flag to suppress individual emissions
|
|
394
|
+
try {
|
|
395
|
+
// Get visible and enabled items
|
|
396
|
+
const items = this.getVisibleEnabledSlotItems();
|
|
397
|
+
console.info('[SelectAll][Slots] toggleSelectAllSlots called. selectAll:', selectAll, 'visible slot items:', items.map(item => item.getAttribute('value') || item.getAttribute('label')), 'Current value:', this.value);
|
|
398
|
+
if (selectAll) {
|
|
399
|
+
// Select all visible items
|
|
400
|
+
const allActiveValues = items
|
|
401
|
+
.map(item => item.getAttribute('value') || item.getAttribute('label') || '')
|
|
402
|
+
.filter(value => value !== '');
|
|
403
|
+
this.value = [...new Set([...this.value, ...allActiveValues])];
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
// Deselect only the visible items, keep others that might be filtered out
|
|
407
|
+
const visibleValues = items
|
|
408
|
+
.map(item => item.getAttribute('value') || item.getAttribute('label') || '')
|
|
409
|
+
.filter(value => value !== '');
|
|
410
|
+
this.value = this.value.filter(val => !visibleValues.includes(val));
|
|
411
|
+
}
|
|
412
|
+
console.info('[SelectAll][Slots] New value after toggle:', this.value);
|
|
413
|
+
// Emit the change event
|
|
414
|
+
this.valueChanged.emit(this.value);
|
|
415
|
+
// Force synchronization with a small delay to ensure DOM is updated
|
|
416
|
+
requestAnimationFrame(() => {
|
|
417
|
+
this.syncChildComponents();
|
|
418
|
+
this.reorderSlotContent();
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
finally {
|
|
422
|
+
// Defer reset to next frame to ensure any async child emissions are ignored
|
|
423
|
+
requestAnimationFrame(() => {
|
|
424
|
+
this.isBulkOperation = false; // Reset flag
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
/**
|
|
429
|
+
* Handle click on the select all checkbox in options mode.
|
|
430
|
+
* @param {Event} event - The click event.
|
|
431
|
+
*/
|
|
432
|
+
this.handleSelectAllCheckboxOptionsClick = (event) => {
|
|
433
|
+
event.stopPropagation();
|
|
434
|
+
event.preventDefault();
|
|
435
|
+
console.info('[handleSelectAllCheckboxOptionsClick] event:', event);
|
|
436
|
+
const currentState = this.getSelectAllCheckboxStateOptions();
|
|
437
|
+
console.info('[SelectAll][Options] Checkbox clicked. Current state:', currentState, 'Current value:', this.value);
|
|
438
|
+
// Logic to handle the indeterminate state
|
|
439
|
+
// - unchecked → select all
|
|
440
|
+
// - indeterminate → select all (clicking on indeterminate will change to checked)
|
|
441
|
+
// - checked → deselect all
|
|
442
|
+
const shouldSelectAll = currentState === 'unchecked' || currentState === 'indeterminate';
|
|
443
|
+
console.info('[SelectAll][Options] shouldSelectAll:', shouldSelectAll);
|
|
444
|
+
this.toggleSelectAllOptions(shouldSelectAll);
|
|
445
|
+
};
|
|
446
|
+
/**
|
|
447
|
+
* Handle click on the select all checkbox in slots mode.
|
|
448
|
+
* @param {Event} event - The click event.
|
|
449
|
+
*/
|
|
450
|
+
this.handleSelectAllCheckboxSlotsClick = (event) => {
|
|
451
|
+
event.stopPropagation();
|
|
452
|
+
event.preventDefault();
|
|
453
|
+
console.info('[handleSelectAllCheckboxSlotsClick] event:', event);
|
|
454
|
+
const currentState = this.getSelectAllCheckboxStateSlots();
|
|
455
|
+
console.info('[SelectAll][Slots] Checkbox clicked. Current state:', currentState, 'Current value:', this.value);
|
|
456
|
+
// Logic to handle the indeterminate state
|
|
457
|
+
// - unchecked → select all
|
|
458
|
+
// - indeterminate → select all (clicking on indeterminate will change to checked)
|
|
459
|
+
// - checked → deselect all
|
|
460
|
+
const shouldSelectAll = currentState === 'unchecked' || currentState === 'indeterminate';
|
|
461
|
+
console.info('[SelectAll][Slots] shouldSelectAll:', shouldSelectAll);
|
|
462
|
+
this.toggleSelectAllSlots(shouldSelectAll);
|
|
463
|
+
};
|
|
310
464
|
//#endregion METHODS
|
|
311
465
|
/****************************************************************************/
|
|
312
466
|
//#region RENDER
|
|
@@ -315,35 +469,76 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
315
469
|
* @returns {any} The JSX for options mode
|
|
316
470
|
*/
|
|
317
471
|
this.renderOptionsMode = () => {
|
|
318
|
-
return (h(Host, { "aria-label": this.label
|
|
472
|
+
return (h(Host, { "aria-label": this.label }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { htmlFor: this.inputId }, h("slot", { name: "label" }, this.label))), h("nv-popover", { ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { class: "input-wrapper-multiselect", slot: "trigger" }, h("slot", { name: "before-input" }), h("div", { class: "input-container-multiselect" }, h("slot", { name: "leading-input" }), this.value.length > 0 && (h("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 ? (h("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", "aria-label": this.label, "aria-controls": `${this.inputId}-listbox` })) : (h(Fragment, null, h("input", { id: this.inputId, type: "text", style: {
|
|
473
|
+
position: 'absolute',
|
|
474
|
+
opacity: '0',
|
|
475
|
+
width: '0',
|
|
476
|
+
height: '0',
|
|
477
|
+
pointerEvents: 'none',
|
|
478
|
+
}, tabIndex: -1, "aria-hidden": "true", autoComplete: this.autocomplete, name: this.name, onFocus: this.handleInputFocusOptions }), h("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClickOptions, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusOptions, "aria-label": this.label, "aria-controls": `${this.inputId}-listbox`, "data-scope": "focusable", role: "button" }, h("span", null, this.placeholder)))), this.error && (h("nv-icon", { name: "alert-circle", class: "validation", size: "md" })), this.filterable && this.filterText.length > 0 && (h("nv-iconbutton", { "data-scope": "clear-filter", name: "x", size: "md", emphasis: "lower", "aria-label": "Clear filter text", tabindex: "-1", title: "Clear filter text", onMouseDown: this.handleMouseDownPreventBlur, onClick: this.clearFilterText })), h("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', title: this.open ? 'Hide dropdown' : 'Show dropdown', onMouseDown: this.handleMouseDownPreventBlur, onClick: this.togglePopoverOptions })), h("slot", { name: "after-input" })), h("div", { id: `${this.inputId}-listbox`, slot: "content", style: this.maxHeight ? { maxHeight: this.maxHeight } : {}, onMouseDown: this.handleMouseDownPreventBlur }, this.shouldShowToggleAllOptionsButton() && (h("div", { class: "select-all-container" }, h("div", { class: "select-all-header" }, this.isSelectAllSectionVisible && (h("nv-fieldcheckbox", { checked: this.getSelectAllCheckboxStateOptions() === 'checked', indeterminate: this.getSelectAllCheckboxStateOptions() ===
|
|
479
|
+
'indeterminate', label: this.getSelectAllCheckboxStateOptions() === 'unchecked'
|
|
480
|
+
? this.selectAllLabel
|
|
481
|
+
: this.deselectAllLabel, onMouseDown: this.handleMouseDownPreventBlur, onClick: this.handleSelectAllCheckboxOptionsClick }))))), h("ul", { role: "listbox", "aria-multiselectable": "true" }, this.options.map(option => (h("nv-fielddropdownitemcheck", { role: "option", label: option.label, description: option.description, value: option.value, checked: this.value.includes(option.value), disabled: option.disabled })))))), this.renderDescriptions()));
|
|
319
482
|
};
|
|
320
483
|
/**
|
|
321
484
|
* Renders the component in slots mode
|
|
322
485
|
* @returns {any} The JSX for slots mode
|
|
323
486
|
*/
|
|
324
487
|
this.renderSlotsMode = () => {
|
|
325
|
-
return (h(Host, { "aria-label": this.label
|
|
488
|
+
return (h(Host, { "aria-label": this.label }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { htmlFor: this.inputId }, h("slot", { name: "label" }, this.label))), h("nv-popover", { ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { class: "input-wrapper-multiselect", slot: "trigger" }, h("slot", { name: "before-input" }), h("div", { class: "input-container-multiselect", onClick: this.handleInputContainerClickSlots }, h("slot", { name: "leading-input" }), this.value.length > 0 && (h("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 ? (h("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", "aria-label": this.label, "aria-controls": `${this.inputId}-listbox` })) : (h(Fragment, null, h("input", { id: this.inputId, type: "text", style: {
|
|
489
|
+
position: 'absolute',
|
|
490
|
+
opacity: '0',
|
|
491
|
+
width: '0',
|
|
492
|
+
height: '0',
|
|
493
|
+
pointerEvents: 'none',
|
|
494
|
+
}, tabIndex: -1, "aria-hidden": "true", autoComplete: this.autocomplete, name: this.name, onFocus: this.handleInputFocusSlots }), h("p", { id: this.inputId, class: "non-filterable-text", "aria-label": this.label, onClick: this.handleInputContainerClickSlots, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusSlots, "aria-controls": `${this.inputId}-listbox`, "data-scope": "focusable", role: "button" }, h("span", null, this.placeholder)))), this.error && (h("nv-icon", { name: "alert-circle", class: "validation", size: "md" })), this.filterable && this.filterText.length > 0 && (h("nv-iconbutton", { name: "x", size: "md", emphasis: "lower", tabindex: "-1", onMouseDown: this.handleMouseDownPreventBlur, onClick: this.clearFilterText, "aria-label": "Clear filter text" })), h("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', title: this.open ? 'Hide dropdown' : 'Show dropdown', onMouseDown: this.handleMouseDownPreventBlur, onClick: this.togglePopoverSlots })), h("slot", { name: "after-input" })), h("div", { id: `${this.inputId}-listbox`, slot: "content", style: this.maxHeight ? { maxHeight: this.maxHeight } : {}, onMouseDown: this.handleMouseDownPreventBlur }, this.shouldShowToggleAllSlotButton() && (h("div", { class: "select-all-container" }, h("div", { class: "select-all-header" }, this.isSelectAllSectionVisible && (h("nv-fieldcheckbox", { checked: this.getSelectAllCheckboxStateSlots() === 'checked', indeterminate: this.getSelectAllCheckboxStateSlots() ===
|
|
495
|
+
'indeterminate', label: this.getSelectAllCheckboxStateSlots() === 'unchecked'
|
|
496
|
+
? this.selectAllLabel
|
|
497
|
+
: this.deselectAllLabel, onMouseDown: this.handleMouseDownPreventBlur, onClick: this.handleSelectAllCheckboxSlotsClick }))))), h("slot", { name: "content" }))), this.renderDescriptions()));
|
|
326
498
|
};
|
|
327
499
|
}
|
|
328
500
|
//#endregion EVENTS
|
|
329
501
|
/****************************************************************************/
|
|
330
502
|
//#region WATCHERS
|
|
331
503
|
handleOptionsChange(newValue) {
|
|
504
|
+
console.info('[Watch:options] newValue:', newValue);
|
|
505
|
+
console.info('[Watch:options] current value before update:', this.value);
|
|
332
506
|
if (!newValue)
|
|
333
507
|
return;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
508
|
+
// If the parent has set a value prop, use it. Otherwise, derive from checked options.
|
|
509
|
+
// (Assume: if value is undefined, it's not set by parent; if it's an array, it's set.)
|
|
510
|
+
if (this.value === undefined || this.value.length === 0) {
|
|
511
|
+
this.value = newValue
|
|
512
|
+
.filter(option => option.checked)
|
|
513
|
+
.map(option => option.value);
|
|
514
|
+
console.info('[Watch:options] updated value from checked options:', this.value);
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
// If value is set, ensure checked states in options match value
|
|
518
|
+
newValue.forEach(option => {
|
|
519
|
+
option.checked = this.value.includes(option.value);
|
|
520
|
+
});
|
|
521
|
+
console.info('[Watch:options] options checked state synced to value:', newValue);
|
|
522
|
+
}
|
|
337
523
|
this.reorderOptionsContent();
|
|
338
524
|
}
|
|
339
|
-
/**
|
|
340
|
-
* Emitted when the value changes.
|
|
341
|
-
*/
|
|
342
525
|
watchValueHandler() {
|
|
526
|
+
console.info('[Watch:value] Value changed:', this.value, 'isBulkOperation:', this.isBulkOperation);
|
|
527
|
+
// Skip processing during bulk operations
|
|
528
|
+
if (this.isBulkOperation) {
|
|
529
|
+
console.info('[Watch:value] Skipping syncChildComponents and options update due to bulk operation');
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
343
532
|
// Synchronize child components when value changes programmatically
|
|
344
533
|
if (this.el && this.el.isConnected) {
|
|
345
534
|
this.syncChildComponents();
|
|
346
535
|
}
|
|
536
|
+
// Also, update options checked state if options exist
|
|
537
|
+
if (this.options) {
|
|
538
|
+
this.options.forEach(option => {
|
|
539
|
+
option.checked = this.value.includes(option.value);
|
|
540
|
+
});
|
|
541
|
+
}
|
|
347
542
|
}
|
|
348
543
|
//#endregion WATCHERS
|
|
349
544
|
/****************************************************************************/
|
|
@@ -378,32 +573,38 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
378
573
|
* @param {CustomEvent} event - The event object containing the selected value and its checked state.
|
|
379
574
|
*/
|
|
380
575
|
handleItemChecked(event) {
|
|
381
|
-
if (this.disabled || this.readonly) {
|
|
576
|
+
if (this.disabled || this.readonly || this.isBulkOperation) {
|
|
577
|
+
// Skip processing itemChecked events during bulk operations
|
|
578
|
+
console.info('[Event:itemChecked] Skipped due to bulk operation or disabled/readonly', event.detail);
|
|
382
579
|
return;
|
|
383
580
|
}
|
|
384
581
|
const { value, checked } = event.detail;
|
|
582
|
+
console.info('[Event:itemChecked] value:', value, 'checked:', checked, 'current value:', this.value);
|
|
385
583
|
if (value !== undefined && value !== null) {
|
|
386
584
|
const newValue = [...this.value];
|
|
387
585
|
const valueIndex = newValue.indexOf(value);
|
|
586
|
+
let hasChanged = false;
|
|
388
587
|
if (checked && valueIndex === -1) {
|
|
389
588
|
newValue.push(value);
|
|
589
|
+
hasChanged = true;
|
|
390
590
|
}
|
|
391
591
|
else if (!checked && valueIndex > -1) {
|
|
392
592
|
newValue.splice(valueIndex, 1);
|
|
593
|
+
hasChanged = true;
|
|
594
|
+
}
|
|
595
|
+
console.info('[Event:itemChecked] newValue after update:', newValue);
|
|
596
|
+
if (hasChanged) {
|
|
597
|
+
this.value = newValue;
|
|
598
|
+
this.valueChanged.emit(this.value);
|
|
599
|
+
this.syncChildComponents();
|
|
393
600
|
}
|
|
394
|
-
// Always update the state and emit the event when an item is checked/unchecked
|
|
395
|
-
this.value = newValue;
|
|
396
|
-
this.valueChanged.emit(this.value);
|
|
397
|
-
// Update the checked state of all items to ensure consistency
|
|
398
|
-
this.syncChildComponents();
|
|
399
601
|
// Preserve the filter text in the input
|
|
400
602
|
if (this.filterable && this.inputElement) {
|
|
401
|
-
// Keep the current filter text in the input
|
|
402
603
|
this.inputElement.value = this.filterText;
|
|
403
604
|
}
|
|
404
605
|
}
|
|
405
606
|
else {
|
|
406
|
-
console.warn('Received itemChecked event with undefined or null value'); // Warning log
|
|
607
|
+
console.warn('[Event:itemChecked] Received itemChecked event with undefined or null value'); // Warning log
|
|
407
608
|
}
|
|
408
609
|
}
|
|
409
610
|
// Add a listener for the slot content
|
|
@@ -425,19 +626,27 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
425
626
|
* Subscribe to click outside event.
|
|
426
627
|
*/
|
|
427
628
|
connectedCallback() {
|
|
428
|
-
|
|
629
|
+
console.info('[Lifecycle] connectedCallback - value:', this.value);
|
|
630
|
+
// Bind once and reuse the same reference for add/remove to avoid leaks
|
|
631
|
+
if (!this._boundHandleClickOutside) {
|
|
632
|
+
this._boundHandleClickOutside = this.handleClickOutside.bind(this);
|
|
633
|
+
}
|
|
634
|
+
document.addEventListener('click', this._boundHandleClickOutside);
|
|
429
635
|
}
|
|
430
636
|
/**
|
|
431
637
|
* Set the mode state and handle options change.
|
|
432
638
|
*/
|
|
433
639
|
componentWillLoad() {
|
|
434
640
|
var _a;
|
|
641
|
+
console.info('[Lifecycle] componentWillLoad - value:', this.value, 'options:', this.options);
|
|
435
642
|
// Don't call handleOptionsChange if we are in slots mode
|
|
436
643
|
if (this.options) {
|
|
437
644
|
this.handleOptionsChange(this.options);
|
|
438
645
|
}
|
|
439
646
|
// Specific initialization for slots mode
|
|
440
647
|
if (!this.options) {
|
|
648
|
+
// Initialize value from checked slotted children
|
|
649
|
+
this.initializeValueFromSlots();
|
|
441
650
|
// Use a microtask to ensure DOM is ready
|
|
442
651
|
Promise.resolve().then(() => {
|
|
443
652
|
// Synchronize child components
|
|
@@ -456,22 +665,33 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
456
665
|
if (!this.filterText) {
|
|
457
666
|
this.resetFilter();
|
|
458
667
|
}
|
|
668
|
+
// Initialize filter results state
|
|
669
|
+
this.hasFilterResults = true;
|
|
459
670
|
}
|
|
460
671
|
/**
|
|
461
672
|
* Force reorder if options mode in componentDidLoad because of the initial render not trigger @watch
|
|
462
673
|
*/
|
|
463
674
|
componentDidLoad() {
|
|
675
|
+
console.info('[Lifecycle] componentDidLoad - value:', this.value, 'options:', this.options);
|
|
464
676
|
if (this.options) {
|
|
465
677
|
this.handleOptionsChange(this.options);
|
|
466
678
|
}
|
|
467
679
|
// Final synchronization of child components after everything is loaded
|
|
468
680
|
this.syncChildComponents();
|
|
681
|
+
// For slots mode, ensure value is initialized from checked children if not already
|
|
682
|
+
if (!this.options) {
|
|
683
|
+
this.initializeValueFromSlots();
|
|
684
|
+
this.syncChildComponents();
|
|
685
|
+
}
|
|
469
686
|
}
|
|
470
687
|
/**
|
|
471
688
|
* Unsubscribe from click outside event.
|
|
472
689
|
*/
|
|
473
690
|
disconnectedCallback() {
|
|
474
|
-
|
|
691
|
+
console.info('[Lifecycle] disconnectedCallback - value:', this.value);
|
|
692
|
+
if (this._boundHandleClickOutside) {
|
|
693
|
+
document.removeEventListener('click', this._boundHandleClickOutside);
|
|
694
|
+
}
|
|
475
695
|
}
|
|
476
696
|
//#endregion LIFECYCLE
|
|
477
697
|
/****************************************************************************/
|
|
@@ -505,14 +725,67 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
505
725
|
this.manageDivider(ul, selectedItems, unselectedItems);
|
|
506
726
|
}
|
|
507
727
|
}
|
|
728
|
+
// Reset filter results state
|
|
729
|
+
this.hasFilterResults = true;
|
|
508
730
|
}
|
|
509
731
|
/**
|
|
510
732
|
* Returns the list of selected values.
|
|
511
733
|
* @returns {string[]} The selected values.
|
|
512
734
|
*/
|
|
513
735
|
async getSelectedValues() {
|
|
736
|
+
console.info('getSelectedValues:', this.value);
|
|
514
737
|
return this.value;
|
|
515
738
|
}
|
|
739
|
+
/**
|
|
740
|
+
* Select all visible and enabled items.
|
|
741
|
+
* Works for both options and slots mode.
|
|
742
|
+
* @returns {Promise<void>}
|
|
743
|
+
*/
|
|
744
|
+
async selectAll() {
|
|
745
|
+
if (this.disabled || this.readonly)
|
|
746
|
+
return;
|
|
747
|
+
if (this.options) {
|
|
748
|
+
this.toggleSelectAllOptions(true);
|
|
749
|
+
}
|
|
750
|
+
else {
|
|
751
|
+
this.toggleSelectAllSlots(true);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Deselect all visible and enabled items.
|
|
756
|
+
* Works for both options and slots mode.
|
|
757
|
+
* @returns {Promise<void>}
|
|
758
|
+
*/
|
|
759
|
+
async deselectAll() {
|
|
760
|
+
if (this.disabled || this.readonly)
|
|
761
|
+
return;
|
|
762
|
+
if (this.options) {
|
|
763
|
+
this.toggleSelectAllOptions(false);
|
|
764
|
+
}
|
|
765
|
+
else {
|
|
766
|
+
this.toggleSelectAllSlots(false);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Toggle selection state of all visible and enabled items.
|
|
771
|
+
* If all items are selected, deselects all. Otherwise, selects all.
|
|
772
|
+
* Works for both options and slots mode.
|
|
773
|
+
* @returns {Promise<void>}
|
|
774
|
+
*/
|
|
775
|
+
async toggleSelectAll() {
|
|
776
|
+
if (this.disabled || this.readonly)
|
|
777
|
+
return;
|
|
778
|
+
const currentState = this.options
|
|
779
|
+
? this.getSelectAllCheckboxStateOptions()
|
|
780
|
+
: this.getSelectAllCheckboxStateSlots();
|
|
781
|
+
const shouldSelectAll = currentState === 'unchecked' || currentState === 'indeterminate';
|
|
782
|
+
if (this.options) {
|
|
783
|
+
this.toggleSelectAllOptions(shouldSelectAll);
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
this.toggleSelectAllSlots(shouldSelectAll);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
516
789
|
/**
|
|
517
790
|
* Reorder the content of the slot.
|
|
518
791
|
*/
|
|
@@ -556,7 +829,7 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
556
829
|
* Reorder the content for options mode with async handling
|
|
557
830
|
*/
|
|
558
831
|
reorderOptionsContent() {
|
|
559
|
-
const ul = this.el.querySelector('ul
|
|
832
|
+
const ul = this.el.querySelector('ul');
|
|
560
833
|
if (!ul)
|
|
561
834
|
return;
|
|
562
835
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck')).filter(item => item.style.display !== 'none');
|
|
@@ -664,6 +937,7 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
664
937
|
this.removeEmptyMessageOption(ul);
|
|
665
938
|
items.forEach(item => (item.style.display = ''));
|
|
666
939
|
this.reorderOptionsContent(); // Reorder after reset
|
|
940
|
+
this.hasFilterResults = true; // Reset filter means we have results
|
|
667
941
|
return;
|
|
668
942
|
}
|
|
669
943
|
// Filter the items
|
|
@@ -676,6 +950,8 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
676
950
|
if (matchesFilter)
|
|
677
951
|
hasVisibleItems = true;
|
|
678
952
|
});
|
|
953
|
+
// Update the filter results state
|
|
954
|
+
this.hasFilterResults = hasVisibleItems;
|
|
679
955
|
// Manage the divider with the visible items
|
|
680
956
|
const visibleItems = items.filter(item => item.style.display !== 'none');
|
|
681
957
|
const visibleSelected = visibleItems.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
@@ -706,6 +982,7 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
706
982
|
// If filter text is empty, reset all items visibility
|
|
707
983
|
if (!this.filterText.trim()) {
|
|
708
984
|
this.resetFilter();
|
|
985
|
+
this.hasFilterResults = true; // Reset filter means we have results
|
|
709
986
|
return;
|
|
710
987
|
}
|
|
711
988
|
const normalizedFilter = this.normalizeText(this.filterText);
|
|
@@ -725,6 +1002,8 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
725
1002
|
if (matchesFilter)
|
|
726
1003
|
hasVisibleItems = true;
|
|
727
1004
|
});
|
|
1005
|
+
// Update the filter results state
|
|
1006
|
+
this.hasFilterResults = hasVisibleItems;
|
|
728
1007
|
// Get visible items after filtering
|
|
729
1008
|
const visibleItems = items.filter(item => item.style.display !== 'none');
|
|
730
1009
|
const visibleSelectedItems = visibleItems.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
@@ -935,18 +1214,129 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
935
1214
|
return;
|
|
936
1215
|
}
|
|
937
1216
|
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
1217
|
+
console.info('[syncChildComponents] value:', this.value);
|
|
938
1218
|
items.forEach(item => {
|
|
939
1219
|
// Get the effective value: use explicit value if present, otherwise use label
|
|
940
1220
|
const itemValue = item.getAttribute('value') || item.getAttribute('label') || '';
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1221
|
+
const shouldBeChecked = this.value.includes(itemValue);
|
|
1222
|
+
console.info('[syncChildComponents] itemValue:', itemValue, 'shouldBeChecked:', shouldBeChecked, 'item.checked(before):', item.checked);
|
|
1223
|
+
// Only update if the checked state differs to avoid triggering unnecessary events
|
|
1224
|
+
if (item.checked !== shouldBeChecked) {
|
|
1225
|
+
// Set attribute and property, but avoid triggering itemChecked during bulk
|
|
1226
|
+
if (this.isBulkOperation) {
|
|
1227
|
+
// Directly update the DOM attribute to avoid triggering the setter
|
|
1228
|
+
if (shouldBeChecked) {
|
|
1229
|
+
item.setAttribute('checked', '');
|
|
1230
|
+
}
|
|
1231
|
+
else {
|
|
1232
|
+
item.removeAttribute('checked');
|
|
1233
|
+
}
|
|
1234
|
+
// Update internal state without emitting events (assumes nv-fielddropdownitemcheck respects this)
|
|
1235
|
+
item.checked = shouldBeChecked;
|
|
1236
|
+
}
|
|
1237
|
+
else {
|
|
1238
|
+
item.checked = shouldBeChecked;
|
|
1239
|
+
}
|
|
948
1240
|
}
|
|
1241
|
+
console.info('[syncChildComponents] itemValue:', itemValue, 'item.checked(after):', item.checked);
|
|
1242
|
+
});
|
|
1243
|
+
}
|
|
1244
|
+
/**
|
|
1245
|
+
* Gets visible and enabled slot items using consistent logic.
|
|
1246
|
+
* @returns {Element[]} Array of visible and enabled items
|
|
1247
|
+
*/
|
|
1248
|
+
getVisibleEnabledSlotItems() {
|
|
1249
|
+
const allItems = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
1250
|
+
return allItems.filter(item => {
|
|
1251
|
+
const isHidden = item.style.display === 'none';
|
|
1252
|
+
const isDisabled = item.hasAttribute('disabled');
|
|
1253
|
+
return !isHidden && !isDisabled;
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Gets visible and enabled option items by checking DOM elements.
|
|
1258
|
+
* @returns {string[]} Array of visible and enabled option values
|
|
1259
|
+
*/
|
|
1260
|
+
getVisibleEnabledOptionItems() {
|
|
1261
|
+
const allItems = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
1262
|
+
const visibleItems = allItems.filter(item => {
|
|
1263
|
+
const isHidden = item.style.display === 'none';
|
|
1264
|
+
const isDisabled = item.hasAttribute('disabled');
|
|
1265
|
+
return !isHidden && !isDisabled;
|
|
949
1266
|
});
|
|
1267
|
+
return visibleItems
|
|
1268
|
+
.map(item => item.getAttribute('value') || '')
|
|
1269
|
+
.filter(value => value !== '');
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* Determines if the toggle all button should be shown in options mode.
|
|
1273
|
+
* @returns {boolean} True if there are visible items and no "No results found" message
|
|
1274
|
+
*/
|
|
1275
|
+
shouldShowToggleAllOptionsButton() {
|
|
1276
|
+
if (!this.options)
|
|
1277
|
+
return false; // Only for options mode
|
|
1278
|
+
return this.enableSelectAll && this.hasFilterResults;
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
* Gets the checkbox state for the select all checkbox in options mode.
|
|
1282
|
+
* @returns {'checked' | 'unchecked' | 'indeterminate'} The checkbox state
|
|
1283
|
+
*/
|
|
1284
|
+
getSelectAllCheckboxStateOptions() {
|
|
1285
|
+
if (!this.options)
|
|
1286
|
+
return 'unchecked';
|
|
1287
|
+
// Get visible and enabled option values from DOM
|
|
1288
|
+
const visibleOptionValues = this.getVisibleEnabledOptionItems();
|
|
1289
|
+
if (visibleOptionValues.length === 0)
|
|
1290
|
+
return 'unchecked';
|
|
1291
|
+
const selectedVisibleOptions = visibleOptionValues.filter(value => this.value.includes(value));
|
|
1292
|
+
if (selectedVisibleOptions.length === 0)
|
|
1293
|
+
return 'unchecked';
|
|
1294
|
+
if (selectedVisibleOptions.length === visibleOptionValues.length)
|
|
1295
|
+
return 'checked';
|
|
1296
|
+
return 'indeterminate';
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* Gets the checkbox state for the select all checkbox in slots mode.
|
|
1300
|
+
* @returns {'checked' | 'unchecked' | 'indeterminate'} The checkbox state
|
|
1301
|
+
*/
|
|
1302
|
+
getSelectAllCheckboxStateSlots() {
|
|
1303
|
+
if (this.options)
|
|
1304
|
+
return 'unchecked';
|
|
1305
|
+
// Get all visible and enabled items
|
|
1306
|
+
const items = this.getVisibleEnabledSlotItems();
|
|
1307
|
+
if (items.length === 0)
|
|
1308
|
+
return 'unchecked';
|
|
1309
|
+
const selectedItems = items.filter(item => {
|
|
1310
|
+
const itemValue = item.getAttribute('value') || item.getAttribute('label') || '';
|
|
1311
|
+
return itemValue !== '' && this.value.includes(itemValue);
|
|
1312
|
+
});
|
|
1313
|
+
if (selectedItems.length === 0)
|
|
1314
|
+
return 'unchecked';
|
|
1315
|
+
if (selectedItems.length === items.length)
|
|
1316
|
+
return 'checked';
|
|
1317
|
+
return 'indeterminate';
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* Determines if the toggle all button should be shown in slots mode.
|
|
1321
|
+
* @returns {boolean} True if there are visible items and no "No results found" message
|
|
1322
|
+
*/
|
|
1323
|
+
shouldShowToggleAllSlotButton() {
|
|
1324
|
+
if (this.options)
|
|
1325
|
+
return false; // Only for slots mode
|
|
1326
|
+
return this.enableSelectAll && this.hasFilterResults;
|
|
1327
|
+
}
|
|
1328
|
+
/**
|
|
1329
|
+
* Initializes the value array from checked slotted nv-fielddropdownitemcheck elements (slots mode only).
|
|
1330
|
+
*/
|
|
1331
|
+
initializeValueFromSlots() {
|
|
1332
|
+
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
1333
|
+
// Values from checked slot children
|
|
1334
|
+
const checkedValues = items
|
|
1335
|
+
.filter(item => item.hasAttribute('checked'))
|
|
1336
|
+
.map(item => item.getAttribute('value') || item.getAttribute('label') || '');
|
|
1337
|
+
// Combine with current this.value (set by code), ensuring uniqueness
|
|
1338
|
+
this.value = Array.from(new Set([...(this.value || []), ...checkedValues]));
|
|
1339
|
+
console.info('[initializeValueFromSlots] checkedValues:', checkedValues, 'combined value:', this.value);
|
|
950
1340
|
}
|
|
951
1341
|
/**
|
|
952
1342
|
* Renders description and error description sections
|
|
@@ -974,13 +1364,12 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
974
1364
|
}; }
|
|
975
1365
|
static get style() { return NvFieldmultiselectStyle0; }
|
|
976
1366
|
}, [68, "nv-fieldmultiselect", {
|
|
1367
|
+
"label": [513],
|
|
977
1368
|
"inputId": [513, "input-id"],
|
|
978
1369
|
"name": [513],
|
|
979
|
-
"label": [513],
|
|
980
1370
|
"description": [513],
|
|
981
1371
|
"placeholder": [513],
|
|
982
1372
|
"autocomplete": [513],
|
|
983
|
-
"value": [1040],
|
|
984
1373
|
"required": [516],
|
|
985
1374
|
"readonly": [516],
|
|
986
1375
|
"disabled": [516],
|
|
@@ -988,19 +1377,28 @@ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmulti
|
|
|
988
1377
|
"errorDescription": [513, "error-description"],
|
|
989
1378
|
"maxHeight": [513, "max-height"],
|
|
990
1379
|
"open": [1540],
|
|
991
|
-
"
|
|
992
|
-
"filterable": [516],
|
|
1380
|
+
"fluid": [516],
|
|
993
1381
|
"options": [1040],
|
|
1382
|
+
"value": [1040],
|
|
1383
|
+
"filterable": [516],
|
|
1384
|
+
"emptyResult": [513, "empty-result"],
|
|
994
1385
|
"debounceDelay": [514, "debounce-delay"],
|
|
995
1386
|
"autofocus": [516],
|
|
996
|
-
"fluid": [516],
|
|
997
1387
|
"badgeLabel": [513, "badge-label"],
|
|
998
1388
|
"filterText": [1537, "filter-text"],
|
|
1389
|
+
"enableSelectAll": [516, "enable-select-all"],
|
|
1390
|
+
"selectAllLabel": [513, "select-all-label"],
|
|
1391
|
+
"deselectAllLabel": [513, "deselect-all-label"],
|
|
999
1392
|
"sortedOptions": [32],
|
|
1000
1393
|
"isHandlingEscape": [32],
|
|
1394
|
+
"hasFilterResults": [32],
|
|
1395
|
+
"isSelectAllSectionVisible": [32],
|
|
1001
1396
|
"getFilterText": [64],
|
|
1002
1397
|
"resetFilter": [64],
|
|
1003
|
-
"getSelectedValues": [64]
|
|
1398
|
+
"getSelectedValues": [64],
|
|
1399
|
+
"selectAll": [64],
|
|
1400
|
+
"deselectAll": [64],
|
|
1401
|
+
"toggleSelectAll": [64]
|
|
1004
1402
|
}, [[0, "openChanged", "handleOpenChanged"], [0, "itemChecked", "handleItemChecked"], [0, "slotchange", "handleSlotChange"], [0, "keydown", "handleKeyDown"]], {
|
|
1005
1403
|
"options": ["handleOptionsChange"],
|
|
1006
1404
|
"value": ["watchValueHandler"]
|