@nova-design-system/nova-webcomponents 3.21.0 → 3.22.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/{grow.animation-f1cef0ad.js → grow.animation-69832995.js} +29 -1
- package/dist/cjs/grow.animation-69832995.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -3
- 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-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +53 -19
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
- package/dist/cjs/nv-fielddate.cjs.entry.js +14 -17
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +7 -9
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +14 -5
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldslider.cjs.entry.js +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 +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-notification.cjs.entry.js +1 -1
- package/dist/cjs/nv-notificationcontainer.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +10 -11
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-split.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +1 -1
- package/dist/cjs/nv-tableheader.cjs.entry.js +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.css +29 -22
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +14 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +47 -21
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +20 -17
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +7 -9
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +13 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +24 -18
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitem/styles/nv-fielddropdownitem.css +5 -3
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +3 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
- package/dist/collection/components/nv-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 +3 -3
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/collection/components/nv-notification/nv-notification.js +1 -1
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-split/nv-split.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +1 -1
- package/dist/collection/components/nv-tableheader/nv-tableheader.js +1 -1
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +4 -4
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +2 -2
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-datagrid.js +2 -2
- package/dist/components/nv-dialog.js +57 -23
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +19 -22
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +11 -13
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +19 -10
- package/dist/components/nv-fielddropdown.js.map +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +8 -8
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +6 -6
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +8 -8
- package/dist/components/nv-fieldslider.js +7 -7
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +7 -7
- 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-notification.js +2 -2
- package/dist/components/nv-notificationcontainer.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-split.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +1 -1
- package/dist/components/nv-tableheader.js +4 -4
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-togglebutton.js +1 -1
- package/dist/components/nv-togglebuttongroup.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-61382072.js → p-20a1c769.js} +2 -2
- package/dist/components/{p-61382072.js.map → p-20a1c769.js.map} +1 -1
- package/dist/components/{p-a6c29711.js → p-2d7d3aa2.js} +3 -3
- package/dist/components/{p-a6c29711.js.map → p-2d7d3aa2.js.map} +1 -1
- package/dist/components/{p-429e01f3.js → p-583b3d89.js} +2 -2
- package/dist/components/{p-429e01f3.js.map → p-583b3d89.js.map} +1 -1
- package/dist/components/{p-c4d20cc9.js → p-5f78a78f.js} +3 -3
- package/dist/components/{p-c4d20cc9.js.map → p-5f78a78f.js.map} +1 -1
- package/dist/components/{p-4799b6c3.js → p-62f91b46.js} +3 -4
- package/dist/components/p-62f91b46.js.map +1 -0
- package/dist/components/{p-5c6b5444.js → p-7214f13f.js} +4 -4
- package/dist/components/{p-5c6b5444.js.map → p-7214f13f.js.map} +1 -1
- package/dist/components/{p-0bfe8a47.js → p-743b3452.js} +2 -2
- package/dist/components/{p-0bfe8a47.js.map → p-743b3452.js.map} +1 -1
- package/dist/components/{p-00347aae.js → p-94ad267c.js} +5 -5
- package/dist/components/{p-00347aae.js.map → p-94ad267c.js.map} +1 -1
- package/dist/components/{p-222136c2.js → p-996438a2.js} +2 -2
- package/dist/components/{p-222136c2.js.map → p-996438a2.js.map} +1 -1
- package/dist/components/{p-4697bd56.js → p-996ed843.js} +27 -2
- package/dist/components/p-996ed843.js.map +1 -0
- package/dist/components/{p-2062ba39.js → p-af663ff5.js} +2 -2
- package/dist/components/{p-2062ba39.js.map → p-af663ff5.js.map} +1 -1
- package/dist/components/{p-c69f5a37.js → p-bcf9d309.js} +5 -5
- package/dist/components/{p-c69f5a37.js.map → p-bcf9d309.js.map} +1 -1
- package/dist/components/{p-d1d4cc45.js → p-cc77f8fe.js} +7 -7
- package/dist/components/{p-d1d4cc45.js.map → p-cc77f8fe.js.map} +1 -1
- package/dist/components/{p-8ce28cff.js → p-d9c1cd97.js} +4 -4
- package/dist/components/{p-8ce28cff.js.map → p-d9c1cd97.js.map} +1 -1
- package/dist/components/{p-0d5ed1d7.js → p-e1f82896.js} +5 -5
- package/dist/components/{p-0d5ed1d7.js.map → p-e1f82896.js.map} +1 -1
- package/dist/components/{p-643d7802.js → p-f68c8fff.js} +3 -3
- package/dist/components/{p-643d7802.js.map → p-f68c8fff.js.map} +1 -1
- package/dist/components/{p-86588fba.js → p-f6ffffd9.js} +4 -4
- package/dist/components/{p-86588fba.js.map → p-f6ffffd9.js.map} +1 -1
- package/dist/esm/{grow.animation-03fa5c19.js → grow.animation-24ad5cf8.js} +27 -2
- package/dist/esm/grow.animation-24ad5cf8.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-dialog.entry.js +51 -17
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
- package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
- package/dist/esm/nv-fielddate.entry.js +14 -17
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +7 -9
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +14 -5
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +2 -2
- package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldpassword.entry.js +3 -3
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldslider.entry.js +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 +3 -3
- package/dist/esm/nv-icon.entry.js +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-notification.entry.js +1 -1
- package/dist/esm/nv-notificationcontainer.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +2 -3
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-split.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +1 -1
- package/dist/esm/nv-tableheader.entry.js +1 -1
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-togglebutton.entry.js +1 -1
- package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/{p-c4baad6e.entry.js → p-023f36b6.entry.js} +2 -2
- package/dist/native/{p-2b4cf4b8.entry.js → p-07b12aa5.entry.js} +2 -2
- package/dist/native/{p-4de8697c.entry.js → p-104a9828.entry.js} +2 -2
- package/dist/native/{p-859bf9ad.entry.js → p-1ee225be.entry.js} +2 -2
- package/dist/native/p-1ee225be.entry.js.map +1 -0
- package/dist/native/p-21dde805.entry.js +2 -0
- package/dist/native/{p-56ed7306.entry.js → p-242cdeac.entry.js} +2 -2
- package/dist/native/{p-587d94f3.entry.js → p-2895ad03.entry.js} +2 -2
- package/dist/native/{p-b4382c94.entry.js → p-2d363bd9.entry.js} +2 -2
- package/dist/native/{p-b02c896a.entry.js → p-2e1b4e19.entry.js} +2 -2
- package/dist/native/{p-a2f58133.entry.js → p-2fb1974e.entry.js} +2 -2
- package/dist/native/p-32c16132.entry.js +2 -0
- package/dist/native/p-32c16132.entry.js.map +1 -0
- package/dist/native/{p-9950e075.entry.js → p-3df31ed5.entry.js} +2 -2
- package/dist/native/{p-533e2530.entry.js → p-44f4e0ae.entry.js} +2 -2
- package/dist/native/{p-c901693d.entry.js → p-4bf63654.entry.js} +2 -2
- package/dist/native/{p-ae5be175.entry.js → p-7ac9af42.entry.js} +2 -2
- package/dist/native/{p-973f5db2.entry.js → p-7b7bbac7.entry.js} +2 -2
- package/dist/native/{p-6a418ec4.entry.js → p-93d80b03.entry.js} +2 -2
- package/dist/native/p-996ed843.js +2 -0
- package/dist/native/p-996ed843.js.map +1 -0
- package/dist/native/{p-fa3e588e.entry.js → p-9e36eebc.entry.js} +2 -2
- package/dist/native/{p-2a7f80f4.entry.js → p-a4a0021c.entry.js} +2 -2
- package/dist/native/{p-17666092.entry.js → p-a6d8d9a1.entry.js} +2 -2
- package/dist/native/{p-eb74feb7.entry.js → p-a9a7f1b8.entry.js} +2 -2
- package/dist/native/p-ad5e12d2.entry.js +2 -0
- package/dist/native/{p-e6f24210.entry.js.map → p-ad5e12d2.entry.js.map} +1 -1
- package/dist/native/{p-fffbd3c1.entry.js → p-aefd32f0.entry.js} +2 -2
- package/dist/native/p-b3d6e9f4.entry.js +2 -0
- package/dist/native/{p-c9fea0df.entry.js.map → p-b3d6e9f4.entry.js.map} +1 -1
- package/dist/native/p-b860d0d3.entry.js +7 -0
- package/dist/native/p-b860d0d3.entry.js.map +1 -0
- package/dist/native/{p-9c432751.entry.js → p-b97f392a.entry.js} +2 -2
- package/dist/native/{p-d63689da.entry.js → p-bd91e0bb.entry.js} +2 -2
- package/dist/native/p-bd91e0bb.entry.js.map +1 -0
- package/dist/native/{p-a026654f.entry.js → p-c37ab530.entry.js} +2 -2
- package/dist/native/{p-bd9bf6a1.entry.js → p-d22a503b.entry.js} +2 -2
- package/dist/native/{p-f3c73492.entry.js → p-da76357c.entry.js} +2 -2
- package/dist/native/{p-d0db5e72.entry.js → p-dac1537a.entry.js} +2 -2
- package/dist/native/p-e688c905.entry.js +2 -0
- package/dist/native/{p-218135b1.entry.js.map → p-e688c905.entry.js.map} +1 -1
- package/dist/native/{p-0177409b.entry.js → p-e887bbf5.entry.js} +2 -2
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +4 -2
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +1 -1
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +1 -0
- package/hydrate/index.js +138 -103
- package/hydrate/index.mjs +138 -103
- package/package.json +1 -1
- package/dist/cjs/events.utils-52846a7d.js +0 -32
- package/dist/cjs/events.utils-52846a7d.js.map +0 -1
- package/dist/cjs/grow.animation-f1cef0ad.js.map +0 -1
- package/dist/components/p-4697bd56.js.map +0 -1
- package/dist/components/p-4799b6c3.js.map +0 -1
- package/dist/components/p-d429a343.js +0 -28
- package/dist/components/p-d429a343.js.map +0 -1
- package/dist/esm/events.utils-fe1d907f.js +0 -28
- package/dist/esm/events.utils-fe1d907f.js.map +0 -1
- package/dist/esm/grow.animation-03fa5c19.js.map +0 -1
- package/dist/native/p-144d0f8a.entry.js +0 -2
- package/dist/native/p-144d0f8a.entry.js.map +0 -1
- package/dist/native/p-218135b1.entry.js +0 -2
- package/dist/native/p-44ba73dc.entry.js +0 -7
- package/dist/native/p-44ba73dc.entry.js.map +0 -1
- package/dist/native/p-4697bd56.js +0 -2
- package/dist/native/p-4697bd56.js.map +0 -1
- package/dist/native/p-57420a2f.entry.js +0 -2
- package/dist/native/p-859bf9ad.entry.js.map +0 -1
- package/dist/native/p-c9fea0df.entry.js +0 -2
- package/dist/native/p-d429a343.js +0 -2
- package/dist/native/p-d429a343.js.map +0 -1
- package/dist/native/p-d63689da.entry.js.map +0 -1
- package/dist/native/p-e6f24210.entry.js +0 -2
- /package/dist/native/{p-c4baad6e.entry.js.map → p-023f36b6.entry.js.map} +0 -0
- /package/dist/native/{p-2b4cf4b8.entry.js.map → p-07b12aa5.entry.js.map} +0 -0
- /package/dist/native/{p-4de8697c.entry.js.map → p-104a9828.entry.js.map} +0 -0
- /package/dist/native/{p-57420a2f.entry.js.map → p-21dde805.entry.js.map} +0 -0
- /package/dist/native/{p-56ed7306.entry.js.map → p-242cdeac.entry.js.map} +0 -0
- /package/dist/native/{p-587d94f3.entry.js.map → p-2895ad03.entry.js.map} +0 -0
- /package/dist/native/{p-b4382c94.entry.js.map → p-2d363bd9.entry.js.map} +0 -0
- /package/dist/native/{p-b02c896a.entry.js.map → p-2e1b4e19.entry.js.map} +0 -0
- /package/dist/native/{p-a2f58133.entry.js.map → p-2fb1974e.entry.js.map} +0 -0
- /package/dist/native/{p-9950e075.entry.js.map → p-3df31ed5.entry.js.map} +0 -0
- /package/dist/native/{p-533e2530.entry.js.map → p-44f4e0ae.entry.js.map} +0 -0
- /package/dist/native/{p-c901693d.entry.js.map → p-4bf63654.entry.js.map} +0 -0
- /package/dist/native/{p-ae5be175.entry.js.map → p-7ac9af42.entry.js.map} +0 -0
- /package/dist/native/{p-973f5db2.entry.js.map → p-7b7bbac7.entry.js.map} +0 -0
- /package/dist/native/{p-6a418ec4.entry.js.map → p-93d80b03.entry.js.map} +0 -0
- /package/dist/native/{p-fa3e588e.entry.js.map → p-9e36eebc.entry.js.map} +0 -0
- /package/dist/native/{p-2a7f80f4.entry.js.map → p-a4a0021c.entry.js.map} +0 -0
- /package/dist/native/{p-17666092.entry.js.map → p-a6d8d9a1.entry.js.map} +0 -0
- /package/dist/native/{p-eb74feb7.entry.js.map → p-a9a7f1b8.entry.js.map} +0 -0
- /package/dist/native/{p-fffbd3c1.entry.js.map → p-aefd32f0.entry.js.map} +0 -0
- /package/dist/native/{p-9c432751.entry.js.map → p-b97f392a.entry.js.map} +0 -0
- /package/dist/native/{p-a026654f.entry.js.map → p-c37ab530.entry.js.map} +0 -0
- /package/dist/native/{p-bd9bf6a1.entry.js.map → p-d22a503b.entry.js.map} +0 -0
- /package/dist/native/{p-f3c73492.entry.js.map → p-da76357c.entry.js.map} +0 -0
- /package/dist/native/{p-d0db5e72.entry.js.map → p-dac1537a.entry.js.map} +0 -0
- /package/dist/native/{p-0177409b.entry.js.map → p-e887bbf5.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nv-fielddate.entry.js","mappings":";;;;;AAAA,MAAM,cAAc,GAAG,4iQAA4iQ,CAAC;AACpkQ,0BAAe,cAAc;;MC8ChB,WAAW;IALxB;;;QAUU,cAAS,GAAWA,EAAM,EAAE,CAAC;;;;;;;QAU5B,YAAO,GAAWA,EAAM,EAAE,CAAC;;;;QA8B3B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,UAAK,GAAY,KAAK,CAAC;;;;QAYvB,YAAO,GAAY,KAAK,CAAC;;;;QAOzB,cAAS,GAAY,KAAK,CAAC;;;;;QAOpC,UAAK,GAAW,EAAE,CAAC;;;;QAMnB,gBAAW,GAAW,EAAE,CAAC;;;;QAMzB,SAAI,GAAY,KAAK,CAAC;;;;;QAOb,mBAAc,GAAW,CAAC,CAAC;;;;;QAO3B,sBAAiB,GAAW,CAAC,CAAC;;;;QAM9B,QAAG,GAAY,EAAE,CAAC;;;;QAMlB,QAAG,GAAY,EAAE,CAAC;;;;QAMlB,WAAM,GAAW,OAAO,CAAC;;;;;;QAQzB,eAAU,GAAW,YAAY,CAAC;;;;;QAOlC,uBAAkB,GAAgC,QAAQ,CAAC;;;;;QAO3D,gBAAW,GAAY,KAAK,CAAC;;;;QAyB7B,UAAK,GAAY,KAAK,CAAC;;;;;QAgCxB,uBAAkB,GAA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E,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IAChD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,IAClD,YAAM,IAAI,EAAC,mBAAmB,GAAQ,KAEtC,IAAI,CAAC,gBAAgB,CACtB,CACG,CACP,EAED,8DAAa,CACR,EACP;KACH;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/nv-fielddate/styles/nv-fielddate.scss?tag=nv-fielddate","src/components/nv-fielddate/nv-fielddate.tsx"],"sourcesContent":["@import '../../../styles/form-field';\n\nnv-fielddate {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n width: 100%;\n display: block;\n\n [data-scope='popover'] {\n padding: 0;\n background-color: var(--components-list-dropdown-background);\n border: 1px solid var(--components-list-dropdown-border);\n width: auto;\n }\n\n [slot='content'] {\n display: block;\n width: 100%;\n }\n .datepicker-container {\n border: none\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n display: flex;\n align-items: center;\n gap: 8px;\n\n .input-container {\n @include form-field-input-container();\n\n input {\n @include form-field-input();\n font-feature-settings: 'tnum';\n font-family: \"TTNorms Pro Mono\", monospace;\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n Method,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * Extends HTMLInputElement to include the inputmask property.\n */\ninterface HTMLInputElementWithInputmask extends HTMLInputElement {\n /**\n * The inputmask instance that provides masking functionality.\n */\n inputmask?: {\n /**\n * Removes the inputmask instance.\n */\n remove?: () => void;\n };\n}\n\n/**\n * A field date component that combines an input with a calendar popover.\n *\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddate',\n styleUrl: 'styles/nv-fielddate.scss',\n shadow: false,\n})\nexport class NvFielddate {\n @Element() el: HTMLNvFielddateElement;\n private inputElement!: HTMLInputElement;\n\n private popoverElement!: HTMLNvPopoverElement;\n private popoverId: string = uuidv4();\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the input field.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Name attribute for the input.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Disables the input field.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets the input field as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the input (date in string format).\n * @bind value\n */\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the input date in string format.\n */\n @State()\n singleValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 1\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 1;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n * @note If the date format is in UTC mode, the date will be displayed in UTC time.\n * @note If the date format is not in UTC mode, the date will be displayed in the local time.\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n * @default true\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format.\n * @returns {string} Format adapted for Inputmask.\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The click event.\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Focuses the input when the input container is clicked.\n * @param {MouseEvent} event - The click event.\n */\n private handleInputContainerClick = (event: MouseEvent) => {\n // Stop propagation to prevent closing parent dialogs\n event.stopPropagation();\n\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n this.inputElement.focus();\n };\n\n /**\n * Handles the input event on the input element.\n * Updates internal state to keep UI in sync - events are only emitted on completion or clear.\n * @param {Event} event - The input event.\n */\n private handleInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update singleValue to keep state in sync\n this.singleValue = input.value;\n\n // Only emit event when input is cleared\n if (input.value === '') {\n this.value = '';\n this.valueChanged.emit('');\n }\n };\n\n /**\n * Handles focus events on the input element.\n * @param {FocusEvent} event - The focus event.\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n this.open = true;\n };\n\n /**\n * Prevents the valueChanged event from the calendar from propagating up.\n * @param {CustomEvent} event - The valueChanged event from nv-calendar.\n */\n private handleCalendarValueChanged = (event: CustomEvent) => {\n event.stopPropagation();\n };\n\n /**\n * Sets the reference to the popover element.\n * @param {HTMLNvPopoverElement} el - The popover element.\n */\n private setPopoverRef = (el: HTMLNvPopoverElement) => {\n this.popoverElement = el;\n };\n\n /**\n * Sets the reference to the input element.\n * @param {HTMLInputElement} el - The input element.\n */\n private setInputRef = (el: HTMLInputElement) => {\n this.inputElement = el;\n };\n\n /**\n * Toggles the opening/closing of the popover.\n * @param {MouseEvent} event - The click event.\n */\n private toggleCalendar = (event: MouseEvent) => {\n if (this.readonly || this.disabled) {\n return;\n }\n // Stop propagation to prevent closing parent dialogs\n event.stopPropagation();\n this.open = !this.open;\n };\n\n /**\n * Clears the current selection and resets the field to its initial state.\n * This method can be called programmatically to reset the field.\n */\n @Method()\n async clear(): Promise<void> {\n // Reset internal state\n this.singleValue = '';\n this.value = '';\n\n // Reset the input element value\n if (this.inputElement) {\n this.inputElement.value = '';\n // Remove the input mask and reinitialize if needed\n if ((this.inputElement as HTMLInputElementWithInputmask).inputmask) {\n (this.inputElement as HTMLInputElementWithInputmask).inputmask.remove();\n }\n }\n\n // Emit events to notify about the change\n this.valueChanged.emit('');\n\n // Close the popover if open\n this.open = false;\n }\n\n private updateMask() {\n if (!this.inputElement) return;\n (this.inputElement as HTMLInputElementWithInputmask).inputmask?.remove?.();\n\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: true,\n clearMaskOnLostFocus: !this.open,\n postValidation: true,\n oncomplete: (e: CustomEvent) => {\n const newValue = (e.target as HTMLInputElement)?.value;\n // Only emit if the value actually changed\n if (this.value !== newValue) {\n this.singleValue = newValue;\n this.value = newValue;\n this.valueChanged.emit(newValue);\n }\n },\n });\n inputMask.mask(this.inputElement);\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n this.singleValue = this.value;\n }\n }\n\n componentDidLoad() {\n this.updateMask();\n\n // Set the initial value after applying the mask\n if (this.inputElement.name === this.name && this.singleValue) {\n requestAnimationFrame(() => {\n this.inputElement.value = this.singleValue;\n const event = new CustomEvent('input', { bubbles: true });\n this.inputElement.dispatchEvent(event);\n });\n }\n }\n\n componentDidRender() {\n // Only set value on initial render when there's no existing value in the input\n if (this.singleValue && this.inputElement && !this.inputElement.value) {\n requestAnimationFrame(() => {\n this.inputElement.value = this.singleValue;\n this.inputElement.setAttribute('value', this.singleValue);\n });\n }\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n if (\n this.inputElement &&\n (this.inputElement as HTMLInputElementWithInputmask).inputmask\n ) {\n (this.inputElement as HTMLInputElementWithInputmask).inputmask.remove();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the value changes (unified value binding).\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.singleValue = newValue;\n // Only set input value if it's different from current input value\n // This prevents interfering with user typing\n if (this.inputElement && this.inputElement.value !== newValue) {\n this.inputElement.value = newValue;\n }\n }\n\n @Watch('open')\n handleOpenChange(newOpen: boolean) {\n this.updateMask();\n\n // Additional side effect for external control, e.g., focus calendar if opened externally\n if (newOpen && this.popoverElement) {\n // Focus first selectable date\n const firstDate = this.popoverElement.querySelector(\n 'nv-calendar [data-date]',\n );\n if (firstDate) (firstDate as HTMLElement).focus();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LISTENERS\n\n /**\n * Handles the single date selection event from nv-calendar.\n * Updates the input value and closes the popover.\n * @param {CustomEvent} event - The event from nv-calendar.\n */\n @Listen('singleDateChange')\n handleSingleDateChange(event: CustomEvent) {\n const value: string = event.detail;\n const previousValue = this.value;\n this.singleValue = value;\n this.value = value;\n\n // Set the input value directly when calendar is used\n if (this.inputElement) {\n this.inputElement.value = value;\n }\n\n // Only emit valueChanged if the value actually changed\n if (previousValue !== value) {\n this.valueChanged.emit(value);\n }\n if (!this.showActions) {\n this.open = false;\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.open = false;\n return;\n }\n\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n // Verify if the popover element is defined\n if (!this.popoverElement) {\n console.warn('nv-fielddate -> Popover element is not defined');\n return;\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={this.setPopoverRef}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n strategy=\"fixed\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={this.setInputRef}\n placeholder={\n this.placeholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.name}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n data-scope=\"date\"\n />\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\" //{this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n dateFormat={this.dateFormat}\n singleValue={this.singleValue}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n onValueChanged={this.handleCalendarValueChanged}\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
|
|
1
|
+
{"file":"nv-fielddate.entry.js","mappings":";;;;;AAAA,MAAM,cAAc,GAAG,4iQAA4iQ,CAAC;AACpkQ,0BAAe,cAAc;;MC8ChB,WAAW;IALxB;;;QAUU,cAAS,GAAWA,EAAM,EAAE,CAAC;;;;;;;QAU5B,YAAO,GAAW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AS,EAAE,IAAI,CAAC,SAAS,EACzB,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,cAAc,EAAE,IAAI,CAAC,0BAA0B,GAClC,CACX,CACK,EAEZ,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;YAChD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,IACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IAChD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,IAClD,YAAM,IAAI,EAAC,mBAAmB,GAAQ,KAEtC,IAAI,CAAC,gBAAgB,CACtB,CACG,CACP,EAED,8DAAa,CACR,EACP;KACH;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/nv-fielddate/styles/nv-fielddate.scss?tag=nv-fielddate","src/components/nv-fielddate/nv-fielddate.tsx"],"sourcesContent":["@import '../../../styles/form-field';\n\nnv-fielddate {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n width: 100%;\n display: block;\n\n [data-scope='popover'] {\n padding: 0;\n background-color: var(--components-list-dropdown-background);\n border: 1px solid var(--components-list-dropdown-border);\n width: auto;\n }\n\n [slot='content'] {\n display: block;\n width: 100%;\n }\n .datepicker-container {\n border: none\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n display: flex;\n align-items: center;\n gap: 8px;\n\n .input-container {\n @include form-field-input-container();\n\n input {\n @include form-field-input();\n font-feature-settings: 'tnum';\n font-family: \"TTNorms Pro Mono\", monospace;\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n Method,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * Extends HTMLInputElement to include the inputmask property.\n */\ninterface HTMLInputElementWithInputmask extends HTMLInputElement {\n /**\n * The inputmask instance that provides masking functionality.\n */\n inputmask?: {\n /**\n * Removes the inputmask instance.\n */\n remove?: () => void;\n };\n}\n\n/**\n * A field date component that combines an input with a calendar popover.\n *\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddate',\n styleUrl: 'styles/nv-fielddate.scss',\n shadow: false,\n})\nexport class NvFielddate {\n @Element() el: HTMLNvFielddateElement;\n private inputElement!: HTMLInputElement;\n\n private popoverElement!: HTMLNvPopoverElement;\n private popoverId: string = uuidv4();\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the input field.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Name attribute for the input.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Disables the input field.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets the input field as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the input (date in string format).\n * @bind value\n */\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the input date in string format.\n */\n @State()\n singleValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 1\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 1;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n * @note If the date format is in UTC mode, the date will be displayed in UTC time.\n * @note If the date format is not in UTC mode, the date will be displayed in the local time.\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n * @default true\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format.\n * @returns {string} Format adapted for Inputmask.\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The click event.\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (!(event.target instanceof Node)) return;\n if (!this.el?.contains(event.target)) this.open = false;\n };\n\n /**\n * Focuses the input when the input container is clicked.\n * @param {MouseEvent} event - The click event.\n */\n private handleInputContainerClick = (event: MouseEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n this.inputElement.focus();\n };\n\n /**\n * Handles the input event on the input element.\n * Updates internal state to keep UI in sync - events are only emitted on completion or clear.\n * @param {Event} event - The input event.\n */\n private handleInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update singleValue to keep state in sync\n this.singleValue = input.value;\n\n // Only emit event when input is cleared\n if (input.value === '') {\n this.value = '';\n this.valueChanged.emit('');\n }\n };\n\n /**\n * Handles focus events on the input element.\n * @param {FocusEvent} event - The focus event.\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n this.open = true;\n };\n\n /**\n * Prevents the valueChanged event from the calendar from propagating up.\n * @param {CustomEvent} event - The valueChanged event from nv-calendar.\n */\n private handleCalendarValueChanged = (event: CustomEvent) => {\n event.stopPropagation();\n };\n\n /**\n * Sets the reference to the popover element.\n * @param {HTMLNvPopoverElement} el - The popover element.\n */\n private setPopoverRef = (el: HTMLNvPopoverElement) => {\n this.popoverElement = el;\n };\n\n /**\n * Sets the reference to the input element.\n * @param {HTMLInputElement} el - The input element.\n */\n private setInputRef = (el: HTMLInputElement) => {\n this.inputElement = el;\n };\n\n /**\n * Toggles the opening/closing of the popover.\n * @param {MouseEvent} event - The click event.\n */\n private toggleCalendar = () => {\n if (this.readonly || this.disabled) {\n return;\n }\n this.open = !this.open;\n };\n\n /**\n * Clears the current selection and resets the field to its initial state.\n * This method can be called programmatically to reset the field.\n */\n @Method()\n async clear(): Promise<void> {\n // Reset internal state\n this.singleValue = '';\n this.value = '';\n\n // Reset the input element value\n if (this.inputElement) {\n this.inputElement.value = '';\n // Remove the input mask and reinitialize if needed\n if ((this.inputElement as HTMLInputElementWithInputmask).inputmask) {\n (this.inputElement as HTMLInputElementWithInputmask).inputmask.remove();\n }\n }\n\n // Emit events to notify about the change\n this.valueChanged.emit('');\n\n // Close the popover if open\n this.open = false;\n }\n\n private updateMask() {\n if (!this.inputElement) return;\n (this.inputElement as HTMLInputElementWithInputmask).inputmask?.remove?.();\n\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: true,\n clearMaskOnLostFocus: !this.open,\n postValidation: true,\n oncomplete: (e: CustomEvent) => {\n const newValue = (e.target as HTMLInputElement)?.value;\n // Only emit if the value actually changed\n if (this.value !== newValue) {\n this.singleValue = newValue;\n this.value = newValue;\n this.valueChanged.emit(newValue);\n }\n },\n });\n inputMask.mask(this.inputElement);\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (this.value) {\n this.singleValue = this.value;\n }\n }\n\n componentDidLoad() {\n this.updateMask();\n\n // Set the initial value after applying the mask\n if (this.inputElement.name === this.name && this.singleValue) {\n requestAnimationFrame(() => {\n this.inputElement.value = this.singleValue;\n const event = new CustomEvent('input', { bubbles: true });\n this.inputElement.dispatchEvent(event);\n });\n }\n }\n\n componentDidRender() {\n // Only set value on initial render when there's no existing value in the input\n if (this.singleValue && this.inputElement && !this.inputElement.value) {\n requestAnimationFrame(() => {\n this.inputElement.value = this.singleValue;\n this.inputElement.setAttribute('value', this.singleValue);\n });\n }\n }\n\n disconnectedCallback() {\n if (\n this.inputElement &&\n (this.inputElement as HTMLInputElementWithInputmask).inputmask\n ) {\n (this.inputElement as HTMLInputElementWithInputmask).inputmask.remove();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the value changes (unified value binding).\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.singleValue = newValue;\n // Only set input value if it's different from current input value\n // This prevents interfering with user typing\n if (this.inputElement && this.inputElement.value !== newValue) {\n this.inputElement.value = newValue;\n }\n }\n\n @Watch('open')\n handleOpenChange(newOpen: boolean) {\n this.updateMask();\n\n // Additional side effect for external control, e.g., focus calendar if opened externally\n if (newOpen && this.popoverElement) {\n // Focus first selectable date\n const firstDate = this.popoverElement.querySelector(\n 'nv-calendar [data-date]',\n );\n if (firstDate) (firstDate as HTMLElement).focus();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LISTENERS\n\n /**\n * Handles the single date selection event from nv-calendar.\n * Updates the input value and closes the popover.\n * @param {CustomEvent} event - The event from nv-calendar.\n */\n @Listen('singleDateChange')\n handleSingleDateChange(event: CustomEvent) {\n const value: string = event.detail;\n const previousValue = this.value;\n this.singleValue = value;\n this.value = value;\n\n // Set the input value directly when calendar is used\n if (this.inputElement) {\n this.inputElement.value = value;\n }\n\n // Only emit valueChanged if the value actually changed\n if (previousValue !== value) {\n this.valueChanged.emit(value);\n }\n if (!this.showActions) {\n this.open = false;\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: MouseEvent) {\n this.handleClickOutside(event);\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.open = false;\n return;\n }\n\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n // Verify if the popover element is defined\n if (!this.popoverElement) {\n console.warn('nv-fielddate -> Popover element is not defined');\n return;\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={this.setPopoverRef}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={this.setInputRef}\n placeholder={\n this.placeholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.name}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n data-scope=\"date\"\n />\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\" //{this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n dateFormat={this.dateFormat}\n singleValue={this.singleValue}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n onValueChanged={this.handleCalendarValueChanged}\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
|
|
@@ -223,12 +223,10 @@ const NvFielddaterange = class {
|
|
|
223
223
|
* Toggles the opening/closing of the popover.
|
|
224
224
|
* @param {MouseEvent} event - The click event.
|
|
225
225
|
*/
|
|
226
|
-
this.toggleCalendar = (
|
|
226
|
+
this.toggleCalendar = () => {
|
|
227
227
|
if (this.readonly || this.disabled) {
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
|
-
// Stop propagation to prevent closing parent dialogs
|
|
231
|
-
event.stopPropagation();
|
|
232
230
|
this.open = !this.open;
|
|
233
231
|
};
|
|
234
232
|
}
|
|
@@ -518,12 +516,12 @@ const NvFielddaterange = class {
|
|
|
518
516
|
/****************************************************************************/
|
|
519
517
|
//#region RENDER
|
|
520
518
|
render() {
|
|
521
|
-
return (h(Host, { key: '
|
|
522
|
-
this.el.querySelector('[slot="label"]')) && (h("label", { key: '
|
|
523
|
-
this.convertToInputmaskFormat(this.dateFormat), name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), h("div", { key: '
|
|
524
|
-
this.convertToInputmaskFormat(this.dateFormat), name: this.endName, disabled: this.disabled, readOnly: this.readonly, required: this.required, value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus, "data-scope": "date-range" })), this.error && (h("nv-icon", { key: '
|
|
525
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
526
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
519
|
+
return (h(Host, { key: '9f0ce8b2e6579ea6225dfbac7cb75cf78ea0c5f5' }, ((this.label && this.label.length > 0) ||
|
|
520
|
+
this.el.querySelector('[slot="label"]')) && (h("label", { key: '9adfefaeda1116c4b3dfa297529aa77a48b66cfe', htmlFor: this.startInputId }, h("slot", { key: '819fcfcf8ee7b649e3271d9c8ae24a4b70a60c81', name: "label" }, this.label))), h("nv-popover", { key: 'f689f4796b739ca1651cb812c428663e5935fa64', ref: el => (this.popoverElement = el), id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { key: 'c5f3174c497a74205a4ab5e289ededbc2ab6ca3f', slot: "trigger", class: "input-wrapper" }, h("slot", { key: '08e0703992304fe911a2ff4eef74023c8832629b', name: "before-input" }), h("div", { key: '9bc9c65f34a2de1c9f8054ccc038258982033e1b', class: "input-container" }, h("slot", { key: '47dbf93940e9c452d20b67b81fb7abd9b807af0d', name: "leading-input" }), h("div", { key: 'ea4587f7c5013cbd8d7e093aa85532438c18b5ab', class: "range-inputs" }, h("input", { key: '544297b36fb3646178c663d6aaa22c2cd3e0616b', id: this.startInputId, type: "text", placeholder: this.startPlaceholder ||
|
|
521
|
+
this.convertToInputmaskFormat(this.dateFormat), name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), h("div", { key: '15862aa6acde78f9da8433ded18b5a9ca8508ff5', class: "range-separator" }), h("input", { key: 'f481feb34af3f5581f2d97bafaa126f306aae12b', id: this.endInputId, type: "text", placeholder: this.endPlaceholder ||
|
|
522
|
+
this.convertToInputmaskFormat(this.dateFormat), name: this.endName, disabled: this.disabled, readOnly: this.readonly, required: this.required, value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus, "data-scope": "date-range" })), this.error && (h("nv-icon", { key: '9a4a155d4e6ab389406ad14cc29e8fa25e578ce9', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '19969e5286a666fceb583de8901191595329f380', name: "circle-check", class: "validation", size: "md" })), h("nv-iconbutton", { key: '76a17a3d44ce189128467997434e34e82d607363', class: "toggle-calendar-icon", name: "calendar", size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), h("slot", { key: '53c374d1628c396015f7006ad63c294932d5e78e', name: "after-input" })), h("div", { key: 'f5d53344987a39a54ac933cc94c802212b98c651', slot: "content" }, h("nv-calendar", { key: '4992731905d118e806a9a22df0413bdfb350f61e', ref: el => (this.calendarElement = el), dateFormat: this.dateFormat, value: this.value, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, selectionType: "range", "data-prevent-navigation": "true" }))), ((this.description && this.description.length > 0) ||
|
|
523
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '396e2f1e53b4e7cd6233993c10aac1b1001d6a3c', class: "description" }, h("slot", { key: 'fccf3a987ed03560d8eb8a3657ca3ce9f291493c', name: "description" }, this.description))), (this.errorDescription ||
|
|
524
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'e76e336e460ed64a05fd1748859f159ce3b74120', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (h("slot", { name: "error-description" })) : (this.errorDescription))), h("slot", { key: 'be76d31f0eeaf50e589f0ab317e04bd3be3d9ba4' })));
|
|
527
525
|
}
|
|
528
526
|
get el() { return getElement(this); }
|
|
529
527
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nv-fielddaterange.entry.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,m1TAAm1T,CAAC;AACh3T,+BAAe,mBAAmB;;MC4CrB,gBAAgB;IAL7B;;;;QASU,cAAS,GAAWA,EAAM,EAAE,CAAC;;;;;;;QAW5B,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E,IAAI,CAAC,SAAS,EACzB,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,aAAa,EAAC,OAAO,6BACG,MAAM,GACjB,CACX,CACK,EAEZ,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;YAChD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,IACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IAChD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,IAClD,YAAM,IAAI,EAAC,mBAAmB,GAAQ,KAEtC,IAAI,CAAC,gBAAgB,CACtB,CACG,CACP,EAED,8DAAa,CACR,EACP;KACH;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/nv-fielddaterange/styles/nv-fielddaterange.scss?tag=nv-fielddaterange","src/components/nv-fielddaterange/nv-fielddaterange.tsx"],"sourcesContent":["@import '../../../styles/form-field';\n@import './mixins';\n\nnv-fielddaterange {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n width: 100%;\n display: block;\n\n [data-scope='popover'] {\n padding: 0;\n background-color: var(--components-list-dropdown-background);\n border: 1px solid var(--components-list-dropdown-border);\n width: auto;\n z-index: 2;\n }\n\n [slot='content'] {\n display: block;\n width: 100%;\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n display: flex;\n align-items: center;\n gap: 8px;\n\n .input-container {\n @include form-field-input-container();\n\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n box-shadow: none;\n border-color: var(--nv-field-border-default);\n }\n\n input {\n @include form-field-input();\n width: 100%;\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n outline: var(--focus-outline-stroke) solid var(--nv-field-border-focus);\n outline-offset: 0px;\n & ~ .range-separator {\n background-color: transparent;\n }\n }\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n\n .range-inputs {\n display: flex;\n align-items: center;\n gap: 0;\n width: 100%;\n &:focus-within {\n z-index: 1;\n }\n\n input {\n flex: 1;\n border: none;\n outline: none;\n padding: 0;\n font-size: var(--form-field-font-size);\n color: var(--components-form-field-content-text);\n background: transparent;\n min-width: 0; // to avoid overflow\n\n &::placeholder {\n color: var(--components-form-field-content-placeholder);\n }\n\n &:disabled {\n cursor: not-allowed;\n color: var(--components-form-field-content-text);\n background-color: var(--components-form-field-background-disabled);\n }\n }\n\n .range-separator {\n @include range-separator();\n }\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n Method,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * Extends HTMLInputElement to include the inputmask property.\n */\ninterface HTMLInputElementWithInputmask extends HTMLInputElement {\n /**\n * The inputmask instance that provides masking functionality.\n */\n inputmask?: {\n /**\n * Removes the inputmask instance.\n */\n remove: () => void;\n };\n}\n\n/**\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddaterange',\n styleUrl: 'styles/nv-fielddaterange.scss',\n shadow: false,\n})\nexport class NvFielddaterange {\n @Element() el!: HTMLNvFielddaterangeElement;\n private popoverElement!: HTMLNvPopoverElement;\n private calendarElement!: HTMLNvCalendarElement;\n private popoverId: string = uuidv4();\n private contentRef?: HTMLDivElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the start input field.\n */\n @Prop({ reflect: true })\n readonly startPlaceholder: string;\n\n /**\n * Placeholder for the end input field.\n */\n @Prop({ reflect: true })\n readonly endPlaceholder: string;\n\n /**\n * Name attribute for the start input.\n */\n @Prop({ reflect: true })\n readonly startName: string;\n\n /**\n * Name attribute for the end input.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Disables both input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets both input fields as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks both input fields as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the start input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the date range (in string format).\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the start date in string format.\n */\n @State()\n startValue: string = '';\n\n /**\n * The current value of the end date in string format.\n */\n @State()\n endValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 2\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 2;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Parses the unified value prop and synchronizes with internal state\n * @param {string} value - Value to parse\n */\n private parseUnifiedValue = (value: string): void => {\n if (!value) {\n // Reset all selections\n this.startValue = '';\n this.endValue = '';\n return;\n }\n\n const values = value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n\n if (values.length >= 2) {\n this.startValue = values[0];\n this.endValue = values[1];\n }\n };\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format to convert\n * @returns {string} The converted format for Inputmask\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format YYYY-MM-DD\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The mouse event\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Handles the input event on the start input element.\n * Updates internal state and calendar navigation without emitting events.\n * @param {Event} event - The input event\n */\n private handleStartInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update startValue to keep state in sync\n this.startValue = input.value;\n\n // Update calendar value for navigation (without triggering events)\n if (this.calendarElement && input.value) {\n // Temporarily enable navigation for keyboard input\n this.calendarElement.removeAttribute('data-prevent-navigation');\n\n // Update calendar's rangeValue to allow navigation\n const currentValue = `${input.value},${this.endValue}`;\n if (this.calendarElement.value !== currentValue) {\n this.calendarElement.value = currentValue;\n }\n\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles the input event on the end input element.\n * Updates internal state and calendar navigation without emitting events.\n * @param {Event} event - The input event\n */\n private handleEndInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update endValue to keep state in sync\n this.endValue = input.value;\n\n // Update calendar value for navigation (without triggering events)\n if (this.calendarElement && input.value) {\n // Temporarily enable navigation for keyboard input\n this.calendarElement.removeAttribute('data-prevent-navigation');\n\n // Update calendar's rangeValue to allow navigation\n const currentValue = `${this.startValue},${input.value}`;\n if (this.calendarElement.value !== currentValue) {\n this.calendarElement.value = currentValue;\n }\n\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles focus events on the input elements.\n * @param {FocusEvent} event - The focus event\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n // Enable navigation on focus\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n }\n\n this.open = true;\n\n // Restore navigation prevention after opening\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 300);\n };\n\n /**\n * Toggles the opening/closing of the popover.\n * @param {MouseEvent} event - The click event.\n */\n private toggleCalendar = (event: MouseEvent) => {\n if (this.readonly || this.disabled) {\n return;\n }\n // Stop propagation to prevent closing parent dialogs\n event.stopPropagation();\n this.open = !this.open;\n };\n\n /**\n * Clears the current selection and resets the date range field to its initial state.\n * This method can be called programmatically to reset the field.\n */\n @Method()\n async clear(): Promise<void> {\n // Reset internal state\n this.startValue = '';\n this.endValue = '';\n this.value = '';\n\n // Reset both input elements\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n // Remove input mask if exists\n if ((input as HTMLInputElementWithInputmask).inputmask) {\n (input as HTMLInputElementWithInputmask).inputmask.remove();\n }\n });\n\n // Emit events to notify about the change\n this.valueChanged.emit('');\n this.dateRangeChange.emit({ start: '', end: '' });\n\n // Close the popover if open\n this.open = false;\n\n // Clear the calendar if it exists\n if (this.calendarElement) {\n this.calendarElement.clear();\n }\n }\n\n private updateMask() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n (input as HTMLInputElementWithInputmask).inputmask?.remove?.();\n\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: true,\n clearMaskOnLostFocus: !this.open,\n postValidation: true,\n oncleared: (e: CustomEvent) => {\n const input = e.target as HTMLInputElement;\n if (input.id === this.startInputId) {\n this.startValue = '';\n }\n if (input.id === this.endInputId) {\n this.endValue = '';\n }\n },\n oncomplete: (e: CustomEvent) => {\n const input = e.target as HTMLInputElement;\n\n // Update the corresponding state based on which input completed\n if (input.id === this.startInputId) {\n this.startValue = input.value;\n } else if (input.id === this.endInputId) {\n this.endValue = input.value;\n }\n\n // Update unified value\n const newValue = `${this.startValue},${this.endValue}`;\n\n // Only emit if both dates are filled and value changed\n if (this.startValue && this.endValue && this.value !== newValue) {\n this.value = newValue;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n },\n });\n inputMask.mask(input);\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n // Use the unified parsing method\n this.parseUnifiedValue(this.value);\n }\n }\n\n componentDidLoad() {\n this.updateMask();\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n // Set the value after applying the mask\n if (input.name === this.startName && this.startValue) {\n requestAnimationFrame(() => {\n input.value = this.startValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n } else if (input.name === this.endName && this.endValue) {\n requestAnimationFrame(() => {\n input.value = this.endValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n }\n });\n }\n\n componentDidRender() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const value =\n input.name === this.startName\n ? this.startValue\n : this.endName\n ? this.endValue\n : '';\n if (value) {\n // Make sure the value is defined both as a property and attribute\n requestAnimationFrame(() => {\n input.value = value;\n input.setAttribute('value', value);\n });\n }\n });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the date range changes.\n */\n @Event()\n dateRangeChange: EventEmitter<\n HTMLNvCalendarElementEventMap['rangeDateChange']\n >;\n\n /**\n * Emitted when the unified value changes\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Handles the range date selection event from nv-calendar.\n * Stops propagation to prevent duplicate events with handleCalendarValueChanged.\n * @param {CustomEvent<DateRange>} event - The custom event\n */\n @Listen('rangeDateChange')\n handleRangeDateChange(\n event: CustomEvent<HTMLNvCalendarElementEventMap['rangeDateChange']>,\n ) {\n // Stop propagation to prevent this from being handled by handleCalendarValueChanged\n event.stopPropagation();\n\n const { start, end } = event.detail || {};\n\n // Check that both dates are defined\n if (start && end) {\n this.startValue = start;\n this.endValue = end;\n\n // Update unified value prop (like nv-calendar)\n const newValue = `${start},${end}`;\n if (this.value !== newValue) {\n this.value = newValue;\n this.valueChanged.emit(this.value);\n }\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n\n if (!this.showActions) {\n this.open = false;\n }\n }\n }\n\n /**\n * Handles the unified value change event from nv-calendar\n * Note: This might not be called if rangeDateChange stops propagation first.\n * @param {CustomEvent<string>} event - The custom event\n */\n @Listen('valueChanged')\n handleCalendarValueChanged(event: CustomEvent<string>) {\n // Only handle events from the calendar, not from self\n if (event.target === this.el) {\n return;\n }\n\n // Stop propagation to prevent parent components from receiving calendar events\n event.stopPropagation();\n\n const newValue = event.detail || '';\n\n if (newValue !== this.value) {\n this.value = newValue;\n this.valueChanged.emit(newValue);\n\n // Parse and update internal state\n this.parseUnifiedValue(newValue);\n\n // Legacy support - emit dateRangeChange\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('applyDateRange')\n handleApplyDateRange() {\n this.open = false;\n }\n\n /**\n * Handles the reset event from the calendar's cancel button\n * @param {CustomEvent} event - The event emitted by the calendar\n */\n @Listen('singleDateChange')\n @Listen('rangeDateChange')\n handleDateReset(event: CustomEvent) {\n const isResetSingle =\n event.type === 'singleDateChange' && event.detail === '';\n const isResetRange =\n event.type === 'rangeDateChange' &&\n event.detail &&\n event.detail.start === '' &&\n event.detail.end === '';\n\n if (isResetSingle || isResetRange) {\n this.startValue = '';\n this.endValue = '';\n\n // Update unified value prop\n this.value = '';\n this.valueChanged.emit('');\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n });\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: '', end: '' });\n }\n }\n\n /**\n * Handles keyboard events.\n * @param {KeyboardEvent} event - The keyboard event\n */\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.open = false;\n return;\n }\n\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n event.preventDefault();\n return;\n }\n return;\n }\n\n if (!this.popoverElement) {\n console.warn('nv-fielddaterange -> Popover element is not defined');\n return;\n }\n }\n\n @Watch('value')\n handleValueChange(newValue: string) {\n // Use the unified parsing method instead of JSON.parse\n this.parseUnifiedValue(newValue);\n }\n\n @Watch('open')\n onOpenChanged(newValue: boolean) {\n this.updateMask();\n if (this.contentRef) {\n if (newValue) {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = '0px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n });\n } else {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = '0px';\n });\n }\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n strategy=\"fixed\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\">\n <slot name=\"leading-input\"></slot>\n\n <div class=\"range-inputs\">\n <input\n id={this.startInputId}\n type=\"text\"\n placeholder={\n this.startPlaceholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.startName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n value={this.startValue}\n onInput={this.handleStartInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n\n <div class=\"range-separator\"></div>\n\n <input\n id={this.endInputId}\n type=\"text\"\n placeholder={\n this.endPlaceholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.endName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n value={this.endValue}\n onInput={this.handleEndInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n </div>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\"\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n ref={el => (this.calendarElement = el as HTMLNvCalendarElement)}\n dateFormat={this.dateFormat}\n value={this.value}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n selectionType=\"range\"\n data-prevent-navigation=\"true\"\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"version":3}
|
|
1
|
+
{"file":"nv-fielddaterange.entry.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,m1TAAm1T,CAAC;AACh3T,+BAAe,mBAAmB;;MC4CrB,gBAAgB;IAL7B;;;;QASU,cAAS,GAAWA,EAAM,EAAE,CAAC;;;;;;;QAW5B,iBAAY,GAAWA,EAAM,EAAE,CAAC;;;;;QAOhC,eAAU,GAAWA,EAAM,EAAE,CAAC;;;;QA0C9B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,UAAK,GAAY,KAAK,CAAC;;;;QAYvB,YAAO,GAAY,KAAK,CAAC;;;;QAOzB,cAAS,GAAY,KAAK,CAAC;;;;;QAOpC,UAAK,GAAW,EAAE,CAAC;;;;QAMnB,eAAU,GAAW,EAAE,CAAC;;;;QAMxB,aAAQ,GAAW,EAAE,CAAC;;;;QAMtB,SAAI,GAAY,KAAK,CAAC;;;;;QAOb,mBAAc,GAAW,CAAC,CAAC;;;;;QAO3B,sBAAiB,GAAW,CAAC,CAAC;;;;QAM9B,QAAG,GAAY,EAAE,CAAC;;;;QAMlB,QAAG,GAAY,EAAE,CAAC;;;;QAMlB,WAAM,GAAW,OAAO,CAAC;;;;QAMzB,eAAU,GAAW,YAAY,CAAC;;;;;QAOlC,uBAAkB,GAAgC,QAAQ,CAAC;;;;;QAO3D,gBAAW,GAAY,KAAK,CAAC;;;;QAwB7B,UAAK,GAAY,KAAK,CAAC;;;;;;;;QAUxB,sBAAiB,GAAG,CAAC,KAAa;YACxC,IAAI,CAAC,KA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,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EACzC,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,aAAa,EAAC,OAAO,6BACG,MAAM,GACjB,CACX,CACK,EAEZ,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;YAChD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,IACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IAChD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,IAClD,YAAM,IAAI,EAAC,mBAAmB,GAAQ,KAEtC,IAAI,CAAC,gBAAgB,CACtB,CACG,CACP,EAED,8DAAa,CACR,EACP;KACH;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/nv-fielddaterange/styles/nv-fielddaterange.scss?tag=nv-fielddaterange","src/components/nv-fielddaterange/nv-fielddaterange.tsx"],"sourcesContent":["@import '../../../styles/form-field';\n@import './mixins';\n\nnv-fielddaterange {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n width: 100%;\n display: block;\n\n [data-scope='popover'] {\n padding: 0;\n background-color: var(--components-list-dropdown-background);\n border: 1px solid var(--components-list-dropdown-border);\n width: auto;\n z-index: 2;\n }\n\n [slot='content'] {\n display: block;\n width: 100%;\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n display: flex;\n align-items: center;\n gap: 8px;\n\n .input-container {\n @include form-field-input-container();\n\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n box-shadow: none;\n border-color: var(--nv-field-border-default);\n }\n\n input {\n @include form-field-input();\n width: 100%;\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n outline: var(--focus-outline-stroke) solid var(--nv-field-border-focus);\n outline-offset: 0px;\n & ~ .range-separator {\n background-color: transparent;\n }\n }\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n\n .range-inputs {\n display: flex;\n align-items: center;\n gap: 0;\n width: 100%;\n &:focus-within {\n z-index: 1;\n }\n\n input {\n flex: 1;\n border: none;\n outline: none;\n padding: 0;\n font-size: var(--form-field-font-size);\n color: var(--components-form-field-content-text);\n background: transparent;\n min-width: 0; // to avoid overflow\n\n &::placeholder {\n color: var(--components-form-field-content-placeholder);\n }\n\n &:disabled {\n cursor: not-allowed;\n color: var(--components-form-field-content-text);\n background-color: var(--components-form-field-background-disabled);\n }\n }\n\n .range-separator {\n @include range-separator();\n }\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n Method,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * Extends HTMLInputElement to include the inputmask property.\n */\ninterface HTMLInputElementWithInputmask extends HTMLInputElement {\n /**\n * The inputmask instance that provides masking functionality.\n */\n inputmask?: {\n /**\n * Removes the inputmask instance.\n */\n remove: () => void;\n };\n}\n\n/**\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddaterange',\n styleUrl: 'styles/nv-fielddaterange.scss',\n shadow: false,\n})\nexport class NvFielddaterange {\n @Element() el!: HTMLNvFielddaterangeElement;\n private popoverElement!: HTMLNvPopoverElement;\n private calendarElement!: HTMLNvCalendarElement;\n private popoverId: string = uuidv4();\n private contentRef?: HTMLDivElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the start input field.\n */\n @Prop({ reflect: true })\n readonly startPlaceholder: string;\n\n /**\n * Placeholder for the end input field.\n */\n @Prop({ reflect: true })\n readonly endPlaceholder: string;\n\n /**\n * Name attribute for the start input.\n */\n @Prop({ reflect: true })\n readonly startName: string;\n\n /**\n * Name attribute for the end input.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Disables both input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets both input fields as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks both input fields as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the start input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the date range (in string format).\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the start date in string format.\n */\n @State()\n startValue: string = '';\n\n /**\n * The current value of the end date in string format.\n */\n @State()\n endValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 2\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 2;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Parses the unified value prop and synchronizes with internal state\n * @param {string} value - Value to parse\n */\n private parseUnifiedValue = (value: string): void => {\n if (!value) {\n // Reset all selections\n this.startValue = '';\n this.endValue = '';\n return;\n }\n\n const values = value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n\n if (values.length >= 2) {\n this.startValue = values[0];\n this.endValue = values[1];\n }\n };\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format to convert\n * @returns {string} The converted format for Inputmask\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format YYYY-MM-DD\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The mouse event\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Handles the input event on the start input element.\n * Updates internal state and calendar navigation without emitting events.\n * @param {Event} event - The input event\n */\n private handleStartInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update startValue to keep state in sync\n this.startValue = input.value;\n\n // Update calendar value for navigation (without triggering events)\n if (this.calendarElement && input.value) {\n // Temporarily enable navigation for keyboard input\n this.calendarElement.removeAttribute('data-prevent-navigation');\n\n // Update calendar's rangeValue to allow navigation\n const currentValue = `${input.value},${this.endValue}`;\n if (this.calendarElement.value !== currentValue) {\n this.calendarElement.value = currentValue;\n }\n\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles the input event on the end input element.\n * Updates internal state and calendar navigation without emitting events.\n * @param {Event} event - The input event\n */\n private handleEndInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n\n // Always update endValue to keep state in sync\n this.endValue = input.value;\n\n // Update calendar value for navigation (without triggering events)\n if (this.calendarElement && input.value) {\n // Temporarily enable navigation for keyboard input\n this.calendarElement.removeAttribute('data-prevent-navigation');\n\n // Update calendar's rangeValue to allow navigation\n const currentValue = `${this.startValue},${input.value}`;\n if (this.calendarElement.value !== currentValue) {\n this.calendarElement.value = currentValue;\n }\n\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles focus events on the input elements.\n * @param {FocusEvent} event - The focus event\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n // Enable navigation on focus\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n }\n\n this.open = true;\n\n // Restore navigation prevention after opening\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 300);\n };\n\n /**\n * Toggles the opening/closing of the popover.\n * @param {MouseEvent} event - The click event.\n */\n private toggleCalendar = () => {\n if (this.readonly || this.disabled) {\n return;\n }\n this.open = !this.open;\n };\n\n /**\n * Clears the current selection and resets the date range field to its initial state.\n * This method can be called programmatically to reset the field.\n */\n @Method()\n async clear(): Promise<void> {\n // Reset internal state\n this.startValue = '';\n this.endValue = '';\n this.value = '';\n\n // Reset both input elements\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n // Remove input mask if exists\n if ((input as HTMLInputElementWithInputmask).inputmask) {\n (input as HTMLInputElementWithInputmask).inputmask.remove();\n }\n });\n\n // Emit events to notify about the change\n this.valueChanged.emit('');\n this.dateRangeChange.emit({ start: '', end: '' });\n\n // Close the popover if open\n this.open = false;\n\n // Clear the calendar if it exists\n if (this.calendarElement) {\n this.calendarElement.clear();\n }\n }\n\n private updateMask() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n (input as HTMLInputElementWithInputmask).inputmask?.remove?.();\n\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: true,\n clearMaskOnLostFocus: !this.open,\n postValidation: true,\n oncleared: (e: CustomEvent) => {\n const input = e.target as HTMLInputElement;\n if (input.id === this.startInputId) {\n this.startValue = '';\n }\n if (input.id === this.endInputId) {\n this.endValue = '';\n }\n },\n oncomplete: (e: CustomEvent) => {\n const input = e.target as HTMLInputElement;\n\n // Update the corresponding state based on which input completed\n if (input.id === this.startInputId) {\n this.startValue = input.value;\n } else if (input.id === this.endInputId) {\n this.endValue = input.value;\n }\n\n // Update unified value\n const newValue = `${this.startValue},${this.endValue}`;\n\n // Only emit if both dates are filled and value changed\n if (this.startValue && this.endValue && this.value !== newValue) {\n this.value = newValue;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n },\n });\n inputMask.mask(input);\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n // Use the unified parsing method\n this.parseUnifiedValue(this.value);\n }\n }\n\n componentDidLoad() {\n this.updateMask();\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n // Set the value after applying the mask\n if (input.name === this.startName && this.startValue) {\n requestAnimationFrame(() => {\n input.value = this.startValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n } else if (input.name === this.endName && this.endValue) {\n requestAnimationFrame(() => {\n input.value = this.endValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n }\n });\n }\n\n componentDidRender() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const value =\n input.name === this.startName\n ? this.startValue\n : this.endName\n ? this.endValue\n : '';\n if (value) {\n // Make sure the value is defined both as a property and attribute\n requestAnimationFrame(() => {\n input.value = value;\n input.setAttribute('value', value);\n });\n }\n });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the date range changes.\n */\n @Event()\n dateRangeChange: EventEmitter<\n HTMLNvCalendarElementEventMap['rangeDateChange']\n >;\n\n /**\n * Emitted when the unified value changes\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Handles the range date selection event from nv-calendar.\n * Stops propagation to prevent duplicate events with handleCalendarValueChanged.\n * @param {CustomEvent<DateRange>} event - The custom event\n */\n @Listen('rangeDateChange')\n handleRangeDateChange(\n event: CustomEvent<HTMLNvCalendarElementEventMap['rangeDateChange']>,\n ) {\n // Stop propagation to prevent this from being handled by handleCalendarValueChanged\n event.stopPropagation();\n\n const { start, end } = event.detail || {};\n\n // Check that both dates are defined\n if (start && end) {\n this.startValue = start;\n this.endValue = end;\n\n // Update unified value prop (like nv-calendar)\n const newValue = `${start},${end}`;\n if (this.value !== newValue) {\n this.value = newValue;\n this.valueChanged.emit(this.value);\n }\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n\n if (!this.showActions) {\n this.open = false;\n }\n }\n }\n\n /**\n * Handles the unified value change event from nv-calendar\n * Note: This might not be called if rangeDateChange stops propagation first.\n * @param {CustomEvent<string>} event - The custom event\n */\n @Listen('valueChanged')\n handleCalendarValueChanged(event: CustomEvent<string>) {\n // Only handle events from the calendar, not from self\n if (event.target === this.el) {\n return;\n }\n\n // Stop propagation to prevent parent components from receiving calendar events\n event.stopPropagation();\n\n const newValue = event.detail || '';\n\n if (newValue !== this.value) {\n this.value = newValue;\n this.valueChanged.emit(newValue);\n\n // Parse and update internal state\n this.parseUnifiedValue(newValue);\n\n // Legacy support - emit dateRangeChange\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('applyDateRange')\n handleApplyDateRange() {\n this.open = false;\n }\n\n /**\n * Handles the reset event from the calendar's cancel button\n * @param {CustomEvent} event - The event emitted by the calendar\n */\n @Listen('singleDateChange')\n @Listen('rangeDateChange')\n handleDateReset(event: CustomEvent) {\n const isResetSingle =\n event.type === 'singleDateChange' && event.detail === '';\n const isResetRange =\n event.type === 'rangeDateChange' &&\n event.detail &&\n event.detail.start === '' &&\n event.detail.end === '';\n\n if (isResetSingle || isResetRange) {\n this.startValue = '';\n this.endValue = '';\n\n // Update unified value prop\n this.value = '';\n this.valueChanged.emit('');\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n });\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: '', end: '' });\n }\n }\n\n /**\n * Handles keyboard events.\n * @param {KeyboardEvent} event - The keyboard event\n */\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.open = false;\n return;\n }\n\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n event.preventDefault();\n return;\n }\n return;\n }\n\n if (!this.popoverElement) {\n console.warn('nv-fielddaterange -> Popover element is not defined');\n return;\n }\n }\n\n @Watch('value')\n handleValueChange(newValue: string) {\n // Use the unified parsing method instead of JSON.parse\n this.parseUnifiedValue(newValue);\n }\n\n @Watch('open')\n onOpenChanged(newValue: boolean) {\n this.updateMask();\n if (this.contentRef) {\n if (newValue) {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = '0px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n });\n } else {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = '0px';\n });\n }\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\">\n <slot name=\"leading-input\"></slot>\n\n <div class=\"range-inputs\">\n <input\n id={this.startInputId}\n type=\"text\"\n placeholder={\n this.startPlaceholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.startName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n value={this.startValue}\n onInput={this.handleStartInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n\n <div class=\"range-separator\"></div>\n\n <input\n id={this.endInputId}\n type=\"text\"\n placeholder={\n this.endPlaceholder ||\n this.convertToInputmaskFormat(this.dateFormat)\n }\n name={this.endName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n value={this.endValue}\n onInput={this.handleEndInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n </div>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\"\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n ref={el => (this.calendarElement = el as HTMLNvCalendarElement)}\n dateFormat={this.dateFormat}\n value={this.value}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n selectionType=\"range\"\n data-prevent-navigation=\"true\"\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-dc2723f3.js';
|
|
2
2
|
import { v as v4 } from './v4-a79185f4.js';
|
|
3
3
|
|
|
4
|
-
const nvFielddropdownCss = "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-fielddropdown{--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-fielddropdown[fluid]:not([fluid=false]){max-width:unset}nv-fielddropdown[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-fielddropdown[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-fielddropdown[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fielddropdown[hidden]:not([hidden=false]) label{display:none}nv-fielddropdown label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fielddropdown nv-popover{width:100%;display:block}nv-fielddropdown 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-fielddropdown nv-popover [slot=content]{gap:var(--list-dropdown-gap-y);display:flex;flex-direction:column}nv-fielddropdown nv-popover hr{color:var(--components-list-dropdown-separator)}nv-fielddropdown nv-popover div[slot=content]{max-height:calc(90vh - var(--list-dropdown-padding) * 2);overflow-y:auto;position:relative}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar{width:6px;height:6px}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fielddropdown .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fielddropdown .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out;position:relative;width:100%;min-height:40px}nv-fielddropdown .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddropdown .input-container:focus-within,nv-fielddropdown .input-container:focus-within:hover,nv-fielddropdown .input-container:focus,nv-fielddropdown .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fielddropdown .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fielddropdown .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddropdown .input-container input[type=search]::-webkit-search-decoration,nv-fielddropdown .input-container input[type=search]::-webkit-search-cancel-button,nv-fielddropdown .input-container input[type=search]::-webkit-search-results-button,nv-fielddropdown .input-container input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}nv-fielddropdown .input-container input,nv-fielddropdown .input-container 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:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%;}nv-fielddropdown .input-container input:focus,nv-fielddropdown .input-container p.non-filterable-text:focus{outline:none}nv-fielddropdown .input-container input::placeholder,nv-fielddropdown .input-container p.non-filterable-text::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fielddropdown .input-container input[type=password]::-ms-clear,nv-fielddropdown .input-container input[type=password]::-ms-reveal,nv-fielddropdown .input-container p.non-filterable-text[type=password]::-ms-clear,nv-fielddropdown .input-container p.non-filterable-text[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddropdown .input-container
|
|
4
|
+
const nvFielddropdownCss = "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-fielddropdown{--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-fielddropdown[fluid]:not([fluid=false]){max-width:unset}nv-fielddropdown[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-fielddropdown[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-fielddropdown[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fielddropdown[hidden]:not([hidden=false]) label{display:none}nv-fielddropdown label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fielddropdown nv-popover{width:100%;display:block}nv-fielddropdown nv-popover [data-scope=popover]{min-width:100%;width:max-content;max-width:400px;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-fielddropdown nv-popover [slot=content]{gap:var(--list-dropdown-gap-y);display:flex;flex-direction:column}nv-fielddropdown nv-popover hr{color:var(--components-list-dropdown-separator)}nv-fielddropdown nv-popover div[slot=content]{max-height:calc(90vh - var(--list-dropdown-padding) * 2);overflow-y:auto;position:relative}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar{width:6px;height:6px}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fielddropdown .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fielddropdown .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out;position:relative;width:100%;min-height:40px}nv-fielddropdown .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddropdown .input-container:focus-within,nv-fielddropdown .input-container:focus-within:hover,nv-fielddropdown .input-container:focus,nv-fielddropdown .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fielddropdown .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fielddropdown .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddropdown .input-container input[type=search]::-webkit-search-decoration,nv-fielddropdown .input-container input[type=search]::-webkit-search-cancel-button,nv-fielddropdown .input-container input[type=search]::-webkit-search-results-button,nv-fielddropdown .input-container input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}nv-fielddropdown .input-container input,nv-fielddropdown .input-container 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:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%;}nv-fielddropdown .input-container input:focus,nv-fielddropdown .input-container p.non-filterable-text:focus{outline:none}nv-fielddropdown .input-container input::placeholder,nv-fielddropdown .input-container p.non-filterable-text::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fielddropdown .input-container input[type=password]::-ms-clear,nv-fielddropdown .input-container input[type=password]::-ms-reveal,nv-fielddropdown .input-container p.non-filterable-text[type=password]::-ms-clear,nv-fielddropdown .input-container p.non-filterable-text[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddropdown .input-container p.non-filterable-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;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:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);box-sizing:border-box;cursor:pointer;height:100%;min-height:40px}nv-fielddropdown .input-container p.non-filterable-text span{display:inline-block;width:100%;overflow:hidden;text-overflow:ellipsis}nv-fielddropdown .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddropdown .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddropdown .input-container>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}nv-fielddropdown .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddropdown .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fielddropdown .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), 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)}";
|
|
5
5
|
const NvFielddropdownStyle0 = nvFielddropdownCss;
|
|
6
6
|
|
|
7
7
|
const NvFielddropdown = class {
|
|
@@ -264,7 +264,9 @@ const NvFielddropdown = class {
|
|
|
264
264
|
this.open = !this.open;
|
|
265
265
|
}
|
|
266
266
|
setFilterInputToSelectedValue() {
|
|
267
|
-
if (!this.filterable)
|
|
267
|
+
if (!this.filterable && !this.disabled && !this.readonly)
|
|
268
|
+
return;
|
|
269
|
+
if (!this.inputElement)
|
|
268
270
|
return;
|
|
269
271
|
if (!this.value)
|
|
270
272
|
return (this.inputElement.value = '');
|
|
@@ -357,14 +359,21 @@ const NvFielddropdown = class {
|
|
|
357
359
|
disconnectedCallback() {
|
|
358
360
|
clearTimeout(this.debounceTimer);
|
|
359
361
|
}
|
|
362
|
+
componentDidRender() {
|
|
363
|
+
// Make sure to show the value when the field is disabled or readonly
|
|
364
|
+
// as we switch to an input instead of a p in that case
|
|
365
|
+
if (!this.filterable && (this.disabled || this.readonly)) {
|
|
366
|
+
this.inputElement.value = this.getSelectedLabel();
|
|
367
|
+
}
|
|
368
|
+
}
|
|
360
369
|
//#endregion LIFECYCLE
|
|
361
370
|
/****************************************************************************/
|
|
362
371
|
//#region RENDER
|
|
363
372
|
render() {
|
|
364
373
|
var _a;
|
|
365
|
-
return (h(Host, { key: '
|
|
366
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
367
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
374
|
+
return (h(Host, { key: '349904a9bf07fb37c44f0b73c95ae736efb6a3b2', role: "combobox", "aria-expanded": this.open.toString(), "aria-haspopup": "listbox", "aria-label": this.label }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'c5f8bb31012cac1c671fdca7b77325b28b7f0fad', htmlFor: this.inputId, onClick: this.syncToggleDropdown.bind(this) }, h("slot", { key: 'cec5527d93c3742abbe5cb26d452a0ce061998dc', name: "label" }, this.label))), h("nv-popover", { key: '6b5c8d8fc0fe2615ac2703e78faa91a4c8e0f792', triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { key: 'f07d22a294703544be6687e11b880d01a29c1629', class: "input-wrapper", slot: "trigger" }, h("slot", { key: '4067e496595f3647c6ab30a858011f38da9fe039', name: "before-input" }), h("div", { key: 'e13bf4e23b508a3ce621a677509c2052ce6ee146', class: "input-container" }, h("slot", { key: '8f26a1ab3d0c7405e4bc16acfcd6ab7f27336816', name: "leading-input" }), this.filterable || this.disabled || this.readonly ? (h("input", { "data-scope": "focusable", id: this.inputId, type: "search", ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleFilterInput })) : (h("p", { "data-scope": "focusable", id: this.inputId, ref: el => (this.selectElement = el), class: "non-filterable-text", tabIndex: this.disabled ? -1 : 0 }, this.getSelectedLabel() || this.value || this.placeholder)), this.filterable && this.filterText && (h("nv-iconbutton", { key: '715fe5388001e7d005ee4c57f6ea699b2b507dbb', name: "x", size: "md", emphasis: "lower", class: "clear-button", onClick: this.clearFilter.bind(this), "aria-label": "Clear input" })), this.error && (h("nv-icon", { key: '18d825c0bfd9b6bf528dbf34f7e7a2f90678fa87', name: "alert-circle", class: "validation", size: "md" })), h("nv-iconbutton", { key: 'aee8efcaeb022ca3ef73bbd3085755817e6fae12', "data-scope": "toggle-dropdown", ref: el => (this.toggleElement = el), name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', onClick: this.syncToggleDropdown.bind(this), tabIndex: this.disabled ? -1 : 0 })), h("slot", { key: '403e224fadcb71ad15574a100b9892f3b8bfa209', name: "after-input" })), h("div", { key: 'b154f9f5bb6b8bc73c2c0fdfeae096586ca43275', slot: "content", style: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("ul", { key: 'ae92bb94df44b545ce83644fe3cb4b312f7d3147' }, this.options.map(option => (h("nv-fielddropdownitem", { label: option.label, value: option.value, disabled: option.disabled, selected: option.value === this.value }))))), h("slot", { key: '8f8a76ba2cfd23cbff34a579222a2e1f8a635142', name: "content" }))), (this.description ||
|
|
375
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: 'c3b288a86fd98c0cf61bf671524f2a5c0d8ccd47', class: "description" }, h("slot", { key: '212e58e32660ef43042c418c09b828ed388f4017', name: "description" }, this.description))), (this.errorDescription ||
|
|
376
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '0baf91460aac3f2ba5b2d41721fc44c5eeb2f6aa', hidden: !this.error, class: "error-description" }, h("slot", { key: '134681ffcf2a86b86bac60ff0ebabbba4e89b380', name: "error-description" }, this.errorDescription)))));
|
|
368
377
|
}
|
|
369
378
|
static get formAssociated() { return true; }
|
|
370
379
|
get el() { return getElement(this); }
|