@nova-design-system/nova-webcomponents 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{constants-bcd6b2e2.js → constants-8fb8ccc0.js} +14 -1
- package/dist/cjs/constants-8fb8ccc0.js.map +1 -0
- package/dist/cjs/index-9bda5507.js +4 -4
- package/dist/cjs/index.cjs.js +4 -471
- 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-alert.cjs.entry.js +5 -5
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +17 -8
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +841 -842
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +376 -39
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +18 -12
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +8 -17
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +26 -28
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +12 -5
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +10 -4
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +8 -4
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +8 -4
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldselect.cjs.entry.js +10 -6
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +8 -4
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +8 -4
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +15 -12
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +3 -1
- package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/nv-alert/nv-alert.css +3 -0
- package/dist/collection/components/nv-alert/nv-alert.js +6 -11
- package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.css +181 -1
- package/dist/collection/components/nv-badge/nv-badge.docs.js +20 -1
- package/dist/collection/components/nv-badge/nv-badge.docs.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.js +39 -15
- package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +0 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.css +19 -0
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js +33 -38
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +680 -897
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js +202 -0
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -0
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +667 -0
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +98 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +103 -5
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +391 -56
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.css +29 -5
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +0 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +16 -10
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js +16 -8
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +48 -39
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +7 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js +12 -15
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +75 -64
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +13 -11
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +8 -0
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +31 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +5 -0
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +24 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +8 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +29 -3
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +5 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +8 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +27 -3
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +5 -0
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +8 -0
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +27 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +5 -0
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +8 -0
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +29 -5
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +5 -0
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +8 -0
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +27 -3
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +23 -0
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js +8 -0
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +27 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +13 -10
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +19 -2
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +3 -470
- package/dist/collection/components/nv-icon/nv-icons.js.map +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 +3 -1
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +8 -11
- package/dist/collection/components/nv-table/nv-table.js.map +1 -1
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/templates/navigation.docs.js +0 -1
- package/dist/collection/templates/navigation.docs.js.map +1 -1
- package/dist/collection/utils/constants.js +11 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/components/index.js +4 -471
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-alert.js +6 -6
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +2 -2
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +400 -43
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-dialog.js +22 -16
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-fielddate.js +18 -26
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +37 -38
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +18 -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 +17 -10
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +13 -8
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +12 -7
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +14 -9
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -158
- package/dist/components/nv-fieldtext.js.map +1 -1
- package/dist/components/nv-fieldtextarea.js +10 -5
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtime.js +19 -16
- package/dist/components/nv-fieldtime.js.map +1 -1
- 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 +6 -4
- package/dist/components/nv-menu.js.map +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-table.js.map +1 -1
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/p-0a0f6daf.js +187 -0
- package/dist/components/p-0a0f6daf.js.map +1 -0
- package/dist/components/{p-b7b78e64.js → p-10b37876.js} +2 -2
- package/dist/components/{p-b7b78e64.js.map → p-10b37876.js.map} +1 -1
- package/dist/components/{p-dc3faba3.js → p-10faa938.js} +4 -4
- package/dist/components/{p-dc3faba3.js.map → p-10faa938.js.map} +1 -1
- package/dist/{esm/constants-98e2dcc2.js → components/p-1f505531.js} +15 -2
- package/dist/components/p-1f505531.js.map +1 -0
- package/dist/components/{p-2012b8ba.js → p-35a70c5e.js} +2 -2
- package/dist/components/{p-2012b8ba.js.map → p-35a70c5e.js.map} +1 -1
- package/dist/components/{p-6c364a23.js → p-41c56ddc.js} +5 -5
- package/dist/components/{p-6c364a23.js.map → p-41c56ddc.js.map} +1 -1
- package/dist/components/{p-a30b55fc.js → p-608eb9da.js} +2 -2
- package/dist/components/{p-a30b55fc.js.map → p-608eb9da.js.map} +1 -1
- package/dist/components/p-76646ce9.js +88 -0
- package/dist/components/p-76646ce9.js.map +1 -0
- package/dist/components/p-854c32dc.js +1132 -0
- package/dist/components/p-854c32dc.js.map +1 -0
- package/dist/components/p-9decffb6.js +167 -0
- package/dist/components/p-9decffb6.js.map +1 -0
- package/dist/components/{p-2d9ba7d3.js → p-a2527411.js} +3 -3
- package/dist/components/{p-2d9ba7d3.js.map → p-a2527411.js.map} +1 -1
- package/dist/components/{p-f4d86795.js → p-b48d5a94.js} +3 -3
- package/dist/components/{p-f4d86795.js.map → p-b48d5a94.js.map} +1 -1
- package/dist/components/{p-4d3ec142.js → p-eb632278.js} +3 -3
- package/dist/components/{p-4d3ec142.js.map → p-eb632278.js.map} +1 -1
- package/dist/components/{p-150daf68.js → p-f5cb0a63.js} +2 -2
- package/dist/components/{p-150daf68.js.map → p-f5cb0a63.js.map} +1 -1
- package/dist/components/{p-c14f6b8e.js → p-f76bb0c3.js} +3 -3
- package/dist/components/{p-c14f6b8e.js.map → p-f76bb0c3.js.map} +1 -1
- package/dist/{components/p-8348db09.js → esm/constants-b97e736d.js} +15 -2
- package/dist/esm/constants-b97e736d.js.map +1 -0
- package/dist/esm/index-1fb7a9a6.js +4 -4
- package/dist/esm/index.js +4 -471
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-alert.entry.js +5 -5
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +17 -8
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +841 -842
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-datagrid.entry.js +376 -39
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +18 -12
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +1 -1
- package/dist/esm/nv-fielddate.entry.js +8 -17
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +26 -28
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +12 -5
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +10 -4
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +8 -4
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +8 -4
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +10 -6
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +8 -4
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +8 -4
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +15 -12
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +3 -3
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +3 -1
- package/dist/esm/nv-menu.entry.js.map +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-table.entry.js.map +1 -1
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-b094296d.entry.js → p-08a75cfa.entry.js} +2 -2
- package/dist/native/{p-d5cbf5c8.entry.js → p-14c07207.entry.js} +2 -2
- package/dist/native/p-1da72182.entry.js +2 -0
- package/dist/native/p-1da72182.entry.js.map +1 -0
- package/dist/native/p-2523eead.entry.js +2 -0
- package/dist/native/p-2523eead.entry.js.map +1 -0
- package/dist/native/p-3953464e.entry.js +7 -0
- package/dist/native/p-3953464e.entry.js.map +1 -0
- package/dist/native/{p-701b5557.entry.js → p-3b7ef609.entry.js} +2 -2
- package/dist/native/{p-63e6aed3.entry.js → p-3cd77d82.entry.js} +2 -2
- package/dist/native/p-3cd77d82.entry.js.map +1 -0
- package/dist/native/p-470588c2.entry.js +13 -0
- package/dist/native/p-470588c2.entry.js.map +1 -0
- package/dist/native/p-49cac014.entry.js +2 -0
- package/dist/native/p-49cac014.entry.js.map +1 -0
- package/dist/native/p-4d164ed6.entry.js +2 -0
- package/dist/native/p-4d164ed6.entry.js.map +1 -0
- package/dist/native/p-4e635fa7.entry.js +2 -0
- package/dist/native/p-4e635fa7.entry.js.map +1 -0
- package/dist/native/p-5d21532a.entry.js +2 -0
- package/dist/native/p-5d21532a.entry.js.map +1 -0
- package/dist/native/{p-39bb95ff.entry.js → p-615947e7.entry.js} +2 -2
- package/dist/native/{p-bad11367.entry.js → p-656c56f0.entry.js} +2 -2
- package/dist/native/p-656c56f0.entry.js.map +1 -0
- package/dist/native/{p-fa77a591.entry.js → p-7042ba8a.entry.js} +2 -2
- package/dist/native/p-7e154bfd.entry.js +2 -0
- package/dist/native/p-7e154bfd.entry.js.map +1 -0
- package/dist/native/p-7eba904e.entry.js +2 -0
- package/dist/native/p-7eba904e.entry.js.map +1 -0
- package/dist/native/{p-6b348684.entry.js → p-7fd4d13d.entry.js} +2 -2
- package/dist/native/{p-fb5bddba.entry.js → p-90e6d9dd.entry.js} +2 -2
- package/dist/native/p-ae7ab110.entry.js +2 -0
- package/dist/native/p-ae7ab110.entry.js.map +1 -0
- package/dist/native/{p-f85aca27.entry.js → p-b8b6875d.entry.js} +2 -2
- package/dist/native/p-b94d9f0b.entry.js +2 -0
- package/dist/native/p-b94d9f0b.entry.js.map +1 -0
- package/dist/native/p-c0f79bac.entry.js +2 -0
- package/dist/native/p-c0f79bac.entry.js.map +1 -0
- package/dist/native/{p-6ff228da.entry.js → p-c67186f8.entry.js} +2 -2
- package/dist/native/{p-eee01062.entry.js → p-c71c6f23.entry.js} +2 -2
- package/dist/native/p-d9a52884.entry.js +2 -0
- package/dist/native/p-d9a52884.entry.js.map +1 -0
- package/dist/native/{p-d7a76400.entry.js → p-efe6a46c.entry.js} +2 -2
- package/dist/native/p-f2ef6771.entry.js +2 -0
- package/dist/native/p-f5f68992.entry.js +2 -0
- package/dist/native/p-f5f68992.entry.js.map +1 -0
- package/dist/native/{p-59768ee5.js → p-f85c08f1.js} +2 -2
- package/dist/native/p-f85c08f1.js.map +1 -0
- package/dist/native/p-fc97f071.entry.js +2 -0
- package/dist/native/p-fc97f071.entry.js.map +1 -0
- package/dist/types/components/nv-alert/nv-alert.d.ts +1 -1
- package/dist/types/components/nv-badge/nv-badge.d.ts +11 -3
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +69 -107
- package/dist/types/components/nv-calendar/nv-calendar.utils.d.ts +60 -0
- package/dist/types/components/nv-calendar/test/nv-calendar.utils.test.d.ts +1 -0
- package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +47 -10
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +4 -0
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +6 -7
- package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +13 -12
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +4 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +4 -0
- package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +4 -0
- package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +4 -0
- package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +4 -0
- package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +4 -0
- package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.d.ts +4 -0
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-table/nv-table.d.ts +13 -2
- package/dist/types/components.d.ts +269 -116
- package/dist/types/index.d.ts +0 -2
- package/dist/types/utils/constants.d.ts +9 -0
- package/dist/vscode-data.json +221 -1587
- package/hydrate/index.js +1466 -1063
- package/hydrate/index.mjs +1466 -1063
- package/package.json +1 -1
- package/dist/cjs/constants-bcd6b2e2.js.map +0 -1
- package/dist/collection/interfaces/actionEvent.js +0 -2
- package/dist/collection/interfaces/actionEvent.js.map +0 -1
- package/dist/collection/interfaces/calendarShortcut.js +0 -2
- package/dist/collection/interfaces/calendarShortcut.js.map +0 -1
- package/dist/collection/interfaces/dateRange.js +0 -2
- package/dist/collection/interfaces/dateRange.js.map +0 -1
- package/dist/components/p-373926aa.js +0 -177
- package/dist/components/p-373926aa.js.map +0 -1
- package/dist/components/p-591730e7.js +0 -88
- package/dist/components/p-591730e7.js.map +0 -1
- package/dist/components/p-8348db09.js.map +0 -1
- package/dist/components/p-f331117c.js +0 -1133
- package/dist/components/p-f331117c.js.map +0 -1
- package/dist/esm/constants-98e2dcc2.js.map +0 -1
- package/dist/native/p-0ee428d5.entry.js +0 -2
- package/dist/native/p-0ee428d5.entry.js.map +0 -1
- package/dist/native/p-2691e02d.entry.js +0 -2
- package/dist/native/p-37f0210e.entry.js +0 -2
- package/dist/native/p-37f0210e.entry.js.map +0 -1
- package/dist/native/p-4a440970.entry.js +0 -2
- package/dist/native/p-4a440970.entry.js.map +0 -1
- package/dist/native/p-4ae26462.entry.js +0 -7
- package/dist/native/p-4ae26462.entry.js.map +0 -1
- package/dist/native/p-4d9c4618.entry.js +0 -2
- package/dist/native/p-4d9c4618.entry.js.map +0 -1
- package/dist/native/p-59768ee5.js.map +0 -1
- package/dist/native/p-59e0bd2b.entry.js +0 -2
- package/dist/native/p-59e0bd2b.entry.js.map +0 -1
- package/dist/native/p-5c00f092.entry.js +0 -2
- package/dist/native/p-5c00f092.entry.js.map +0 -1
- package/dist/native/p-63e6aed3.entry.js.map +0 -1
- package/dist/native/p-7f5eb2ac.entry.js +0 -2
- package/dist/native/p-7f5eb2ac.entry.js.map +0 -1
- package/dist/native/p-84a73e2a.entry.js +0 -2
- package/dist/native/p-84a73e2a.entry.js.map +0 -1
- package/dist/native/p-93dc2f47.entry.js +0 -2
- package/dist/native/p-93dc2f47.entry.js.map +0 -1
- package/dist/native/p-9a267f16.entry.js +0 -13
- package/dist/native/p-9a267f16.entry.js.map +0 -1
- package/dist/native/p-9d6431c7.entry.js +0 -2
- package/dist/native/p-9d6431c7.entry.js.map +0 -1
- package/dist/native/p-b2ce83ad.entry.js +0 -2
- package/dist/native/p-b2ce83ad.entry.js.map +0 -1
- package/dist/native/p-bad11367.entry.js.map +0 -1
- package/dist/native/p-e1a4f776.entry.js +0 -2
- package/dist/native/p-e1a4f776.entry.js.map +0 -1
- package/dist/native/p-e49bbd02.entry.js +0 -2
- package/dist/native/p-e49bbd02.entry.js.map +0 -1
- package/dist/native/p-f6bdc270.entry.js +0 -2
- package/dist/native/p-f6bdc270.entry.js.map +0 -1
- package/dist/types/interfaces/actionEvent.d.ts +0 -13
- package/dist/types/interfaces/calendarShortcut.d.ts +0 -17
- package/dist/types/interfaces/dateRange.d.ts +0 -13
- /package/dist/native/{p-b094296d.entry.js.map → p-08a75cfa.entry.js.map} +0 -0
- /package/dist/native/{p-d5cbf5c8.entry.js.map → p-14c07207.entry.js.map} +0 -0
- /package/dist/native/{p-701b5557.entry.js.map → p-3b7ef609.entry.js.map} +0 -0
- /package/dist/native/{p-39bb95ff.entry.js.map → p-615947e7.entry.js.map} +0 -0
- /package/dist/native/{p-fa77a591.entry.js.map → p-7042ba8a.entry.js.map} +0 -0
- /package/dist/native/{p-6b348684.entry.js.map → p-7fd4d13d.entry.js.map} +0 -0
- /package/dist/native/{p-fb5bddba.entry.js.map → p-90e6d9dd.entry.js.map} +0 -0
- /package/dist/native/{p-f85aca27.entry.js.map → p-b8b6875d.entry.js.map} +0 -0
- /package/dist/native/{p-6ff228da.entry.js.map → p-c67186f8.entry.js.map} +0 -0
- /package/dist/native/{p-eee01062.entry.js.map → p-c71c6f23.entry.js.map} +0 -0
- /package/dist/native/{p-d7a76400.entry.js.map → p-efe6a46c.entry.js.map} +0 -0
- /package/dist/native/{p-2691e02d.entry.js.map → p-f2ef6771.entry.js.map} +0 -0
|
@@ -0,0 +1,1132 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-1c45c0f2.js';
|
|
2
|
+
import { C as CUSTOM_DAY_NAMES, b as CUSTOM_MONTH_NAMES, W as WEEK_ABBREVIATIONS } from './p-1f505531.js';
|
|
3
|
+
import { d as defineCustomElement$4 } from './p-a2527411.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './p-76646ce9.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './p-10faa938.js';
|
|
6
|
+
import { d as defineCustomElement$1 } from './p-f5cb0a63.js';
|
|
7
|
+
|
|
8
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
|
+
|
|
10
|
+
function getDefaultExportFromCjs (x) {
|
|
11
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
var dayjs_min = {exports: {}};
|
|
15
|
+
|
|
16
|
+
(function (module, exports) {
|
|
17
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
18
|
+
}(dayjs_min));
|
|
19
|
+
|
|
20
|
+
const dayjs = dayjs_min.exports;
|
|
21
|
+
|
|
22
|
+
var customParseFormat$1 = {exports: {}};
|
|
23
|
+
|
|
24
|
+
(function (module, exports) {
|
|
25
|
+
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return (e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t;}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,!1);}],a:[o,function(e){this.afternoon=d(e,!0);}],Q:[n,function(e){this.month=3*(e-1)+1;}],S:[n,function(e){this.milliseconds=100*+e;}],SS:[r,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e);}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else {var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if("string"==typeof a){var f=!0===o[2],h=!0===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={};}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""));}else i.call(this,e);};}}));
|
|
26
|
+
}(customParseFormat$1));
|
|
27
|
+
|
|
28
|
+
const customParseFormat = customParseFormat$1.exports;
|
|
29
|
+
|
|
30
|
+
var utc$1 = {exports: {}};
|
|
31
|
+
|
|
32
|
+
(function (module, exports) {
|
|
33
|
+
!function(t,i){module.exports=i();}(commonjsGlobal,(function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t);};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds();}else r.call(this);};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(i);if(!s)return null;var f=(""+s[0]).match(e)||["-",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:"+"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r;}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return !!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return "s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)};}}));
|
|
34
|
+
}(utc$1));
|
|
35
|
+
|
|
36
|
+
const utc = utc$1.exports;
|
|
37
|
+
|
|
38
|
+
var weekOfYear$1 = {exports: {}};
|
|
39
|
+
|
|
40
|
+
(function (module, exports) {
|
|
41
|
+
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e="week",t="year";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),o=this.diff(a,e,!0);return o<0?r(this).startOf("week").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)};}}));
|
|
42
|
+
}(weekOfYear$1));
|
|
43
|
+
|
|
44
|
+
const weekOfYear = weekOfYear$1.exports;
|
|
45
|
+
|
|
46
|
+
dayjs.extend(customParseFormat);
|
|
47
|
+
dayjs.extend(utc);
|
|
48
|
+
dayjs.extend(weekOfYear);
|
|
49
|
+
/**
|
|
50
|
+
* Formats a date to a string according to the format
|
|
51
|
+
* @param {Date} date - Date to format
|
|
52
|
+
* @returns {string} Formatted date
|
|
53
|
+
* @param {Object} options - Additional options
|
|
54
|
+
* @param {string} options.dateFormat - Date format (ex: 'YYYY-MM-DD', 'DD-MM-YYYY', etc.)
|
|
55
|
+
*/
|
|
56
|
+
function formatDate(date, options) {
|
|
57
|
+
if (!date)
|
|
58
|
+
return '';
|
|
59
|
+
const isUTCMode = options.dateFormat.includes('Z');
|
|
60
|
+
const isISO8601Format = options.dateFormat === 'YYYY-MM-DD[T]HH:mm:ss[Z]';
|
|
61
|
+
// Special case for ISO 8601
|
|
62
|
+
if (isISO8601Format) {
|
|
63
|
+
// For the ISO 8601 format, use directly toISOString() which is standard
|
|
64
|
+
return date.toISOString();
|
|
65
|
+
}
|
|
66
|
+
// If the format is "Ticks", convert the time to C# ticks
|
|
67
|
+
if (options.dateFormat === 'Ticks') {
|
|
68
|
+
const ticks = date.getTime() * 10000 + 621355968000000000;
|
|
69
|
+
return ticks.toString();
|
|
70
|
+
}
|
|
71
|
+
// If the format is "X" (Unix Seconds)
|
|
72
|
+
if (options.dateFormat === 'X') {
|
|
73
|
+
return dayjs(date).unix().toString();
|
|
74
|
+
}
|
|
75
|
+
// If the format is "x" (Unix Milliseconds)
|
|
76
|
+
if (options.dateFormat === 'x') {
|
|
77
|
+
return date.getTime().toString();
|
|
78
|
+
}
|
|
79
|
+
// Otherwise, format according to the mode (UTC or local)
|
|
80
|
+
return isUTCMode
|
|
81
|
+
? dayjs(date).utc().format(options.dateFormat)
|
|
82
|
+
: dayjs(date).format(options.dateFormat);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Checks if two dates are identical
|
|
86
|
+
* @param {Date | null} date - First date
|
|
87
|
+
* @param {Date | null} compareDate - Second date
|
|
88
|
+
* @param {Object} options - Additional options
|
|
89
|
+
* @param {boolean} options.isUTCMode - Whether the dates are in UTC mode
|
|
90
|
+
* @returns {boolean} true if the dates are identical
|
|
91
|
+
*/
|
|
92
|
+
function isSameDate(date, compareDate, options) {
|
|
93
|
+
if (!date || !compareDate)
|
|
94
|
+
return false;
|
|
95
|
+
if (options.isUTCMode) {
|
|
96
|
+
return (date.getUTCFullYear() === compareDate.getUTCFullYear() &&
|
|
97
|
+
date.getUTCMonth() === compareDate.getUTCMonth() &&
|
|
98
|
+
date.getUTCDate() === compareDate.getUTCDate());
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
return (date.getFullYear() === compareDate.getFullYear() &&
|
|
102
|
+
date.getMonth() === compareDate.getMonth() &&
|
|
103
|
+
date.getDate() === compareDate.getDate());
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Checks if a date is identical or before another date
|
|
108
|
+
* @param {Date} date - Date to check
|
|
109
|
+
* @param {Date} compareDate - Reference date
|
|
110
|
+
* @param {Object} options - Additional options
|
|
111
|
+
* @param {boolean} options.isUTCMode - Whether the dates are in UTC mode
|
|
112
|
+
* @returns {boolean} true if `date` <= `compareDate`
|
|
113
|
+
*/
|
|
114
|
+
function isSameOrBefore(date, compareDate, options) {
|
|
115
|
+
if (!date || !compareDate)
|
|
116
|
+
return false;
|
|
117
|
+
if (options.isUTCMode) {
|
|
118
|
+
return (date.getUTCFullYear() < compareDate.getUTCFullYear() ||
|
|
119
|
+
(date.getUTCFullYear() === compareDate.getUTCFullYear() &&
|
|
120
|
+
date.getUTCMonth() < compareDate.getUTCMonth()) ||
|
|
121
|
+
(date.getUTCFullYear() === compareDate.getUTCFullYear() &&
|
|
122
|
+
date.getUTCMonth() === compareDate.getUTCMonth() &&
|
|
123
|
+
date.getUTCDate() <= compareDate.getUTCDate()));
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
return (date.getFullYear() < compareDate.getFullYear() ||
|
|
127
|
+
(date.getFullYear() === compareDate.getFullYear() &&
|
|
128
|
+
date.getMonth() < compareDate.getMonth()) ||
|
|
129
|
+
(date.getFullYear() === compareDate.getFullYear() &&
|
|
130
|
+
date.getMonth() === compareDate.getMonth() &&
|
|
131
|
+
date.getDate() <= compareDate.getDate()));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Checks if a date is identical or after another date
|
|
136
|
+
* @param {Date} date - Date to check
|
|
137
|
+
* @param {Date} compareDate - Reference date
|
|
138
|
+
* @param {Object} options - Additional options
|
|
139
|
+
* @param {boolean} options.isUTCMode - Whether the dates are in UTC mode
|
|
140
|
+
* @returns {boolean} true if `date` >= `compareDate`
|
|
141
|
+
*/
|
|
142
|
+
function isSameOrAfter(date, compareDate, options) {
|
|
143
|
+
if (!date || !compareDate)
|
|
144
|
+
return false;
|
|
145
|
+
if (options.isUTCMode) {
|
|
146
|
+
return (date.getUTCFullYear() > compareDate.getUTCFullYear() ||
|
|
147
|
+
(date.getUTCFullYear() === compareDate.getUTCFullYear() &&
|
|
148
|
+
date.getUTCMonth() > compareDate.getUTCMonth()) ||
|
|
149
|
+
(date.getUTCFullYear() === compareDate.getUTCFullYear() &&
|
|
150
|
+
date.getUTCMonth() === compareDate.getUTCMonth() &&
|
|
151
|
+
date.getUTCDate() >= compareDate.getUTCDate()));
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
return (date.getFullYear() > compareDate.getFullYear() ||
|
|
155
|
+
(date.getFullYear() === compareDate.getFullYear() &&
|
|
156
|
+
date.getMonth() > compareDate.getMonth()) ||
|
|
157
|
+
(date.getFullYear() === compareDate.getFullYear() &&
|
|
158
|
+
date.getMonth() === compareDate.getMonth() &&
|
|
159
|
+
date.getDate() >= compareDate.getDate()));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Calculates the ISO week number
|
|
164
|
+
* @param {Date} date - Date to calculate
|
|
165
|
+
* @returns {number} Week number
|
|
166
|
+
*/
|
|
167
|
+
function getWeekNumber(date) {
|
|
168
|
+
const startOfYear = new Date(date.getFullYear(), 0, 1);
|
|
169
|
+
const pastDaysOfYear = (date.getTime() - startOfYear.getTime()) / 86400000;
|
|
170
|
+
return Math.ceil((pastDaysOfYear + startOfYear.getDay() + 1) / 7);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Convert a date string/Date to a Date without timezone offset
|
|
174
|
+
* @param {string | Date} dateInput - Date under string or Date object form
|
|
175
|
+
* @param {string} dateFormat - Date format (ex: 'YYYY-MM-DD', 'DD-MM-YYYY', etc.)
|
|
176
|
+
* @returns {Date} Date in Date form without timezone offset
|
|
177
|
+
*/
|
|
178
|
+
function parseDate(dateInput, dateFormat) {
|
|
179
|
+
if (dateInput instanceof Date)
|
|
180
|
+
return dateInput;
|
|
181
|
+
const isUTCMode = dateFormat.includes('Z');
|
|
182
|
+
// Attempt to automatically detect ISO 8601 format (generated by toISOString())
|
|
183
|
+
// The regex checks the standard ISO format: YYYY-MM-DDTHH:mm:ss.sssZ
|
|
184
|
+
if (typeof dateInput === 'string' &&
|
|
185
|
+
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/.test(dateInput)) {
|
|
186
|
+
try {
|
|
187
|
+
const parsedDate = new Date(dateInput);
|
|
188
|
+
if (!isNaN(parsedDate.getTime())) {
|
|
189
|
+
return parsedDate;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
// If it fails, continue with other methods
|
|
194
|
+
console.error('Error parsing ISO date:', error);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// Handling Unix Seconds ("X") formats
|
|
198
|
+
if (dateFormat === 'X') {
|
|
199
|
+
const unixSeconds = Number(dateInput);
|
|
200
|
+
if (isNaN(unixSeconds))
|
|
201
|
+
return null;
|
|
202
|
+
return isUTCMode
|
|
203
|
+
? dayjs.unix(unixSeconds).utc().toDate()
|
|
204
|
+
: dayjs.unix(unixSeconds).toDate();
|
|
205
|
+
}
|
|
206
|
+
// Handling Unix Milliseconds ("x") formats
|
|
207
|
+
if (dateFormat === 'x') {
|
|
208
|
+
const unixMilliseconds = Number(dateInput);
|
|
209
|
+
if (isNaN(unixMilliseconds))
|
|
210
|
+
return null;
|
|
211
|
+
return isUTCMode
|
|
212
|
+
? dayjs(unixMilliseconds).utc().toDate()
|
|
213
|
+
: dayjs(unixMilliseconds).toDate();
|
|
214
|
+
}
|
|
215
|
+
// Handling C# Ticks format
|
|
216
|
+
if (dateFormat === 'Ticks') {
|
|
217
|
+
const ticks = Number(dateInput);
|
|
218
|
+
if (isNaN(ticks))
|
|
219
|
+
return null;
|
|
220
|
+
// Conversion of .NET ticks to milliseconds since Unix epoch
|
|
221
|
+
const unixMilliseconds = (ticks - 621355968000000000) / 10000;
|
|
222
|
+
return isUTCMode
|
|
223
|
+
? dayjs(unixMilliseconds).utc().toDate()
|
|
224
|
+
: dayjs(unixMilliseconds).toDate();
|
|
225
|
+
}
|
|
226
|
+
// For all other formats, use customParseFormat in strict mode
|
|
227
|
+
let parsed;
|
|
228
|
+
if (isUTCMode) {
|
|
229
|
+
parsed = dayjs.utc(dateInput, dateFormat, true);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
parsed = dayjs(dateInput, dateFormat, true);
|
|
233
|
+
}
|
|
234
|
+
if (!parsed.isValid()) {
|
|
235
|
+
console.error(`Parsing error:`, {
|
|
236
|
+
dateInput,
|
|
237
|
+
dateFormat: dateFormat,
|
|
238
|
+
});
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
return parsed.toDate();
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const nvCalendarCss = "nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--components-calendar-background);border-radius:var(--calendar-radius);padding:var(--calendar-padding);box-shadow:0px var(--shadow-y-axis-md-1) var(--shadow-blur-md-1) var(--shadow-spread-md, 0) var(--shadow-color-opacity-0), 0px var(--shadow-y-axis-md-2) var(--shadow-blur-md-2) var(--shadow-spread-md, 0) var(--shadow-color-opacity-2);border:1px solid var(--components-calendar-border);width:auto;max-width:100%}.datepicker-container-single{max-width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:var(--calendar-gap-x);width:auto;overflow-x:hidden}.datepicker-wrapper::-webkit-scrollbar{width:6px;height:6px}.datepicker-wrapper::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}.datepicker-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:var(--calendar-padding);width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-calendar-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:start;align-items:center;margin-bottom:var(--calendar-header-margin-bottom);width:100%}.header nv-iconbutton{width:var(--calendar-header-button-size);height:var(--calendar-header-button-size)}.nav-buttons{display:flex;gap:var(--spacing-0);margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:var(--spacing-1);align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:start;flex-grow:1}.date-controls .month-select,.date-controls .year-input{background:transparent !important}.calendar-wrapper:nth-child(n+2) .datepicker-container{margin-left:42px}.calendar-grid{display:grid;grid-template-columns:auto 1fr;column-gap:var(--calendar-weeks-calendar-gap-x);position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:var(--calendar-cell-size) repeat(6, var(--calendar-cell-size));background:var(--components-calendar-weeks-background);color:var(--components-calendar-weeks-text);border-radius:var(--calendar-weeks-radius);width:var(--calendar-weeks-size);row-gap:var(--calendar-grid-gap-y)}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background-color:var(--components-calendar-weeks-background-hover);color:var(--components-calendar-weeks-text-hover);border-radius:var(--calendar-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:var(--calendar-cell-font-size)}.week-header{font-weight:700;color:var(--components-calendar-weeks-text)}.week-number{color:var(--components-calendar-cell-text)}.days-container{display:grid;grid-template-rows:auto 1fr;row-gap:var(--calendar-grid-gap-y)}.days-header{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));height:var(--calendar-cell-size)}.day-header{display:grid;place-items:center;font-size:var(--calendar-cell-font-size);color:var(--components-calendar-cell-text)}.days-grid{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));grid-template-rows:repeat(6, var(--calendar-cell-size));animation:fadeIn 0.2s ease-in;row-gap:var(--calendar-grid-gap-y);z-index:0}.day{display:grid;place-items:center;width:var(--calendar-cell-size);height:var(--calendar-cell-size);font-size:var(--calendar-cell-font-size);border-radius:var(--calendar-cell-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}.day.selected,.day.selected:hover .day.is-today.selected,.day.is-today.selected:hover{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected) !important}.day.disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.day.outside-month{color:var(--components-calendar-cell-text);opacity:var(--opacity-disabled)}.day.outside-month.selected{opacity:1 !important;color:var(--components-calendar-cell-text-selected)}.day.outside-month.in-range{opacity:1 !important;background-color:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range)}.day.in-range{background:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range);border-radius:0;position:relative}.day.range-start,.day.range-start:focus,.day.range-start:hover,.day.range-end,.day.range-end:focus,.day.range-end:hover{background-color:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected) !important}.day.range-start,.day.range-end,.day.range-start.is-today,.day.range-end.is-today{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected);position:relative;border-radius:var(--radius-rounded-full)}.day.range-start:hover,.day.range-end:hover,.day.range-start.is-today:hover,.day.range-end.is-today:hover{color:var(--components-calendar-cell-text-today)}.day.range-start:before,.day.range-end:before,.day.range-start.is-today:before,.day.range-end.is-today:before{content:\"\";position:absolute;bottom:0;left:0;right:0;top:0;z-index:-1;background-color:var(--components-calendar-cell-background-in-range);border-radius:var(--radius-rounded-full);width:auto;height:auto}.day.range-start:has(~.range-end):before,.day.range-start:has(+.in-range):before{border-top-right-radius:0;border-bottom-right-radius:0}.day.range-end:before{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.day.outside-month.range-start,.day.outside-month.range-end{background:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected);opacity:1 !important}.day.is-today{font-weight:700;position:relative;color:var(--components-calendar-cell-text-today)}.day.is-today.range-start,.day.is-today.range-end{color:var(--components-calendar-cell-text-selected)}.day.is-today.range-start:hover,.day.is-today.range-end:hover{color:var(--components-calendar-cell-text-today)}.day.is-today::after{content:\"\";position:absolute;bottom:var(--spacing-1);left:50%;transform:translateX(-50%);width:var(--calendar-cell-dot-size);height:var(--calendar-cell-dot-size);background-color:currentColor;border-radius:50%}.day.is-today.selected::after{color:var(--components-calendar-cell-text-selected)}.day.is-today.selected::after::after{background-color:var(--components-calendar-cell-dot-selected)}.calendar-footer{display:flex;gap:var(--spacing-1);justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-calendar-border);padding:var(--calendar-controls-padding-top) var(--calendar-padding) var(--calendar-padding);gap:var(--calendar-grid-gap-y);margin-top:var(--calendar-controls-margin-top)}.datepicker-actions{display:flex;justify-content:flex-end;gap:var(--spacing-1);width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:var(--spacing-1);margin-top:var(--spacing-4)}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}";
|
|
245
|
+
const NvCalendarStyle0 = nvCalendarCss;
|
|
246
|
+
|
|
247
|
+
const NvCalendar = /*@__PURE__*/ proxyCustomElement(class NvCalendar extends H {
|
|
248
|
+
constructor() {
|
|
249
|
+
super();
|
|
250
|
+
this.__registerHost();
|
|
251
|
+
this.singleDateChange = createEvent(this, "singleDateChange", 7);
|
|
252
|
+
this.rangeDateChange = createEvent(this, "rangeDateChange", 7);
|
|
253
|
+
/****************************************************************************/
|
|
254
|
+
//#region PROPERTIES
|
|
255
|
+
/**
|
|
256
|
+
* First day of the week (0 = Sunday, 1 = Monday, etc.)
|
|
257
|
+
* @default 0
|
|
258
|
+
*/
|
|
259
|
+
this.firstDayOfWeek = 0;
|
|
260
|
+
/**
|
|
261
|
+
* Number of calendars to display
|
|
262
|
+
* @default 1
|
|
263
|
+
*/
|
|
264
|
+
this.numberOfCalendars = 1;
|
|
265
|
+
/**
|
|
266
|
+
* Locale for date formatting
|
|
267
|
+
* @default 'en-BE'
|
|
268
|
+
*/
|
|
269
|
+
this.locale = 'en-BE';
|
|
270
|
+
/**
|
|
271
|
+
* Date format (ex: 'YYYY-MM-DD', 'DD-MM-YYYY', etc.)
|
|
272
|
+
* @default 'YYYY-MM-DD'
|
|
273
|
+
* @note If the date format is in UTC mode, the date will be displayed in UTC time.
|
|
274
|
+
* @note If the date format is not in UTC mode, the date will be displayed in the local time.
|
|
275
|
+
*/
|
|
276
|
+
this.dateFormat = 'YYYY-MM-DD';
|
|
277
|
+
/**
|
|
278
|
+
* Footer placement
|
|
279
|
+
* @default 'bottom'
|
|
280
|
+
*/
|
|
281
|
+
this.shortcutsPlacement = 'bottom';
|
|
282
|
+
/**
|
|
283
|
+
* Selection type (single date or date range)
|
|
284
|
+
* @default 'single'
|
|
285
|
+
*/
|
|
286
|
+
this.selectionType = 'single';
|
|
287
|
+
/**
|
|
288
|
+
* Show action buttons
|
|
289
|
+
*/
|
|
290
|
+
this.showActions = false;
|
|
291
|
+
/** Cache for parsed disabled dates */
|
|
292
|
+
this.parsedDisabledDates = [];
|
|
293
|
+
//#endregion PROPERTIES
|
|
294
|
+
/****************************************************************************/
|
|
295
|
+
//#region STATE
|
|
296
|
+
this.currentDate = null;
|
|
297
|
+
this.selectedDate = null;
|
|
298
|
+
this.startDate = null;
|
|
299
|
+
this.endDate = null;
|
|
300
|
+
/** List of formatted months for the selector */
|
|
301
|
+
this.months = [];
|
|
302
|
+
/**
|
|
303
|
+
* Change the displayed month
|
|
304
|
+
* @param {number} offset - Month offset (-1 for previous, 1 for next)
|
|
305
|
+
*/
|
|
306
|
+
this.changeMonth = (offset) => {
|
|
307
|
+
const newDate = new Date(this.currentDate);
|
|
308
|
+
// Ensure we only move by one month at a time
|
|
309
|
+
newDate.setUTCMonth(newDate.getUTCMonth() + offset);
|
|
310
|
+
// Add the appropriate animation class
|
|
311
|
+
const containers = this.el.querySelectorAll('.calendar-grid');
|
|
312
|
+
containers.forEach(container => {
|
|
313
|
+
// Remove existing animation classes
|
|
314
|
+
container.classList.remove('slide-left', 'slide-right');
|
|
315
|
+
// Add the new animation class
|
|
316
|
+
const animationClass = offset > 0 ? 'slide-left' : 'slide-right';
|
|
317
|
+
container.classList.add(animationClass);
|
|
318
|
+
// Remove the class after the animation
|
|
319
|
+
setTimeout(() => {
|
|
320
|
+
container.classList.remove(animationClass);
|
|
321
|
+
}, 300); // 300ms corresponds to $slide-duration in the SCSS
|
|
322
|
+
});
|
|
323
|
+
this.currentDate = newDate;
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* Handles date selection based on the mode
|
|
327
|
+
* @param {Date} date - Selected date
|
|
328
|
+
*/
|
|
329
|
+
this.handleDateSelection = (date) => {
|
|
330
|
+
if (this.isDateDisabled(date)) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
if (this.selectionType === 'single') {
|
|
334
|
+
this.handleSingleSelection(date);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
this.handleRangeSelection(date);
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Handles single date selection
|
|
342
|
+
* @param {Date} date - Selected date
|
|
343
|
+
*/
|
|
344
|
+
this.handleSingleSelection = (date) => {
|
|
345
|
+
if (!date)
|
|
346
|
+
return;
|
|
347
|
+
const formattedDate = formatDate(date, { dateFormat: this.dateFormat });
|
|
348
|
+
this.selectedDate = date;
|
|
349
|
+
this.singleDateChange.emit(formattedDate);
|
|
350
|
+
};
|
|
351
|
+
/**
|
|
352
|
+
* Handles range date selection
|
|
353
|
+
* @param {Date} date - Selected date
|
|
354
|
+
*/
|
|
355
|
+
this.handleRangeSelection = (date) => {
|
|
356
|
+
if (!this.startDate || (this.startDate && this.endDate)) {
|
|
357
|
+
this.startDate = date;
|
|
358
|
+
this.endDate = null;
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
this.endDate = date;
|
|
362
|
+
if (this.startDate > this.endDate) {
|
|
363
|
+
[this.startDate, this.endDate] = [this.endDate, this.startDate];
|
|
364
|
+
}
|
|
365
|
+
this.rangeDateChange.emit({
|
|
366
|
+
start: formatDate(this.startDate, { dateFormat: this.dateFormat }),
|
|
367
|
+
end: formatDate(this.endDate, { dateFormat: this.dateFormat }),
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
/**
|
|
372
|
+
* Checks if a date is disabled.
|
|
373
|
+
* Disabled if:
|
|
374
|
+
* - The date is before min (if defined)
|
|
375
|
+
* - The date is after max (if defined)
|
|
376
|
+
* - The date is in the disabledDates array
|
|
377
|
+
* @param {Date} date - Date to check
|
|
378
|
+
* @returns {boolean} true if the date is disabled
|
|
379
|
+
*/
|
|
380
|
+
this.isDateDisabled = (date) => {
|
|
381
|
+
if (!date)
|
|
382
|
+
return true;
|
|
383
|
+
// Minimum bound check
|
|
384
|
+
if (this.min) {
|
|
385
|
+
const minDate = parseDate(this.min, this.dateFormat);
|
|
386
|
+
if (minDate && date < minDate) {
|
|
387
|
+
return true;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
// Maximum bound check
|
|
391
|
+
if (this.max) {
|
|
392
|
+
const maxDate = parseDate(this.max, this.dateFormat);
|
|
393
|
+
if (maxDate && date > maxDate) {
|
|
394
|
+
return true;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
// Check disabled dates
|
|
398
|
+
return this.parsedDisabledDates.some(disabledDate => isSameDate(date, disabledDate, { isUTCMode: this.isUTCMode }));
|
|
399
|
+
};
|
|
400
|
+
/**
|
|
401
|
+
* Checks if a date is in the selected range
|
|
402
|
+
* @param {Date} date - Date to check
|
|
403
|
+
* @returns {boolean} true if the date is in the range
|
|
404
|
+
*/
|
|
405
|
+
this.isDateInRange = (date) => {
|
|
406
|
+
if (!date || !this.startDate || !this.endDate)
|
|
407
|
+
return false;
|
|
408
|
+
const checkDate = parseDate(date, this.dateFormat);
|
|
409
|
+
const startDate = parseDate(this.startDate, this.dateFormat);
|
|
410
|
+
const endDate = parseDate(this.endDate, this.dateFormat);
|
|
411
|
+
// Verify if startDate and endDate are valid
|
|
412
|
+
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
|
|
413
|
+
return false;
|
|
414
|
+
}
|
|
415
|
+
// Verify that startDate is before endDate (additional security)
|
|
416
|
+
if (startDate > endDate)
|
|
417
|
+
return false;
|
|
418
|
+
// Comparison based only on the date (year, month, day)
|
|
419
|
+
return (isSameOrAfter(checkDate, startDate, { isUTCMode: this.isUTCMode }) &&
|
|
420
|
+
isSameOrBefore(checkDate, endDate, { isUTCMode: this.isUTCMode }));
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* Retrieves the localized day names
|
|
424
|
+
* @returns {string[]} Array of short day names
|
|
425
|
+
*/
|
|
426
|
+
this.getDayNames = () => {
|
|
427
|
+
// If we have custom day names for this locale
|
|
428
|
+
if (CUSTOM_DAY_NAMES[this.locale]) {
|
|
429
|
+
const days = [...CUSTOM_DAY_NAMES[this.locale]];
|
|
430
|
+
// Reorganize the days based on the first day of the week
|
|
431
|
+
const firstDays = days.slice(0, this.firstDayOfWeek);
|
|
432
|
+
const remainingDays = days.slice(this.firstDayOfWeek);
|
|
433
|
+
return [...remainingDays, ...firstDays];
|
|
434
|
+
}
|
|
435
|
+
// Otherwise, use the default behavior
|
|
436
|
+
const formatter = new Intl.DateTimeFormat(this.locale, {
|
|
437
|
+
weekday: 'short',
|
|
438
|
+
});
|
|
439
|
+
const days = [...Array(7)].map((_, i) => formatter.format(new Date(2023, 0, i + 1)).toUpperCase());
|
|
440
|
+
// Reorganize the days based on the first day of the week
|
|
441
|
+
const firstDays = days.slice(0, this.firstDayOfWeek);
|
|
442
|
+
const remainingDays = days.slice(this.firstDayOfWeek);
|
|
443
|
+
return [...remainingDays, ...firstDays];
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* Generates the days of the current month
|
|
447
|
+
* @param {number} offset - Month offset (0 by default)
|
|
448
|
+
* @param {number} totalCalendars - Number of calendars to display (1 by default)
|
|
449
|
+
* @returns {Array<{ dayOfMonth: number | null, date: Date | null, isSelected: boolean, isDisabled: boolean }>} Array of formatted days
|
|
450
|
+
*/
|
|
451
|
+
this.getDaysInMonth = (offset = 0, totalCalendars = 1) => {
|
|
452
|
+
const year = this.currentDate.getUTCFullYear();
|
|
453
|
+
const month = this.currentDate.getUTCMonth() + offset;
|
|
454
|
+
const firstDay = new Date(Date.UTC(year, month, 1));
|
|
455
|
+
const lastDay = new Date(Date.UTC(year, month + 1, 0));
|
|
456
|
+
const days = [];
|
|
457
|
+
// Correct calculation of offset for previous month days
|
|
458
|
+
// Use getUTCDay to stay consistent with UTC timezone
|
|
459
|
+
const dayOfWeekIndex = firstDay.getUTCDay(); // 0 = Sunday, 1 = Monday, etc.
|
|
460
|
+
// Adjust based on firstDayOfWeek (if week starts on Monday, offset is different)
|
|
461
|
+
const offsetDays = (dayOfWeekIndex - this.firstDayOfWeek + 7) % 7;
|
|
462
|
+
// Add the days of the previous month for the first calendar
|
|
463
|
+
if (offset === 0 && offsetDays > 0) {
|
|
464
|
+
const prevMonthLastDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
465
|
+
for (let i = offsetDays; i > 0; i--) {
|
|
466
|
+
const date = new Date(Date.UTC(year, month - 1, prevMonthLastDay - i + 1));
|
|
467
|
+
days.push({
|
|
468
|
+
dayOfMonth: date.getUTCDate(),
|
|
469
|
+
date,
|
|
470
|
+
isCurrentMonth: false,
|
|
471
|
+
isDisabled: this.isDateDisabled(date),
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
// Add the days of the current month
|
|
476
|
+
for (let i = 1; i <= lastDay.getUTCDate(); i++) {
|
|
477
|
+
const date = new Date(Date.UTC(year, month, i));
|
|
478
|
+
days.push({
|
|
479
|
+
dayOfMonth: i,
|
|
480
|
+
date,
|
|
481
|
+
isCurrentMonth: true,
|
|
482
|
+
isDisabled: this.isDateDisabled(date),
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
// Add the days of the next month only for the last calendar
|
|
486
|
+
if (offset === totalCalendars - 1) {
|
|
487
|
+
const nextMonthDaysNeeded = 7 - (days.length % 7 || 7);
|
|
488
|
+
for (let i = 1; i <= nextMonthDaysNeeded; i++) {
|
|
489
|
+
const date = new Date(Date.UTC(year, month + 1, i));
|
|
490
|
+
days.push({
|
|
491
|
+
dayOfMonth: i,
|
|
492
|
+
date,
|
|
493
|
+
isCurrentMonth: false,
|
|
494
|
+
isDisabled: this.isDateDisabled(date),
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
return days;
|
|
499
|
+
};
|
|
500
|
+
/** Initializes the list of formatted months according to the locale */
|
|
501
|
+
this.initializeMonths = () => {
|
|
502
|
+
// If we have custom month names for this locale
|
|
503
|
+
if (CUSTOM_MONTH_NAMES[this.locale]) {
|
|
504
|
+
this.months = CUSTOM_MONTH_NAMES[this.locale].map((label, value) => ({
|
|
505
|
+
value,
|
|
506
|
+
label,
|
|
507
|
+
}));
|
|
508
|
+
return;
|
|
509
|
+
}
|
|
510
|
+
// Otherwise, use the default behavior
|
|
511
|
+
const formatter = new Intl.DateTimeFormat(this.locale, { month: 'short' });
|
|
512
|
+
this.months = Array.from({ length: 12 }, (_, i) => ({
|
|
513
|
+
value: i,
|
|
514
|
+
label: formatter.format(new Date(2000, i, 1)).toUpperCase(),
|
|
515
|
+
}));
|
|
516
|
+
};
|
|
517
|
+
/**
|
|
518
|
+
* Retrieves the localized abbreviation for "week"
|
|
519
|
+
* @returns {string} Localized abbreviation for "week"
|
|
520
|
+
*/
|
|
521
|
+
this.getLocalizedWeekText = () => {
|
|
522
|
+
return WEEK_ABBREVIATIONS[this.locale] || 'W';
|
|
523
|
+
};
|
|
524
|
+
/**
|
|
525
|
+
* Handles month change in the selector
|
|
526
|
+
* @param {Event} event - Month change event
|
|
527
|
+
* @param {number} calendarOffset - Calendar offset (0 by default)
|
|
528
|
+
*/
|
|
529
|
+
this.handleMonthChange = (event, calendarOffset = 0) => {
|
|
530
|
+
const select = event.target;
|
|
531
|
+
const selectedMonth = parseInt(select.value, 10);
|
|
532
|
+
const currentMonth = this.currentDate.getUTCMonth();
|
|
533
|
+
// Calculate the difference considering the calendar offset
|
|
534
|
+
const monthDiff = selectedMonth - ((currentMonth + calendarOffset) % 12);
|
|
535
|
+
const newDate = new Date(this.currentDate);
|
|
536
|
+
newDate.setUTCMonth(newDate.getUTCMonth() + monthDiff);
|
|
537
|
+
this.currentDate = newDate;
|
|
538
|
+
};
|
|
539
|
+
/**
|
|
540
|
+
* Handles year change in the numeric entry
|
|
541
|
+
* @param {Event} event - Year change event
|
|
542
|
+
* @param {number} calendarOffset - Calendar offset (0 by default)
|
|
543
|
+
*/
|
|
544
|
+
this.handleYearChange = (event, calendarOffset = 0) => {
|
|
545
|
+
const input = event.target;
|
|
546
|
+
const year = parseInt(input.value, 10);
|
|
547
|
+
if (!isNaN(year) && year >= 1900 && year <= 2100) {
|
|
548
|
+
const newDate = new Date(this.currentDate);
|
|
549
|
+
newDate.setUTCFullYear(year);
|
|
550
|
+
newDate.setUTCMonth(newDate.getUTCMonth() + calendarOffset);
|
|
551
|
+
this.currentDate = newDate;
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
/**
|
|
555
|
+
* Handles week selection
|
|
556
|
+
* @param {Date[]} weekDays - Selected week days
|
|
557
|
+
* @param {number} calendarIndex - Calendar index from which the selection is made
|
|
558
|
+
*/
|
|
559
|
+
this.handleWeekSelection = (weekDays, calendarIndex) => {
|
|
560
|
+
if (this.selectionType !== 'range')
|
|
561
|
+
return;
|
|
562
|
+
const allDays = this.getDaysInMonth(calendarIndex, this.numberOfCalendars);
|
|
563
|
+
const weekStart = weekDays[0];
|
|
564
|
+
const weekEnd = weekDays[weekDays.length - 1];
|
|
565
|
+
if (!weekStart || !weekEnd)
|
|
566
|
+
return;
|
|
567
|
+
const selectedWeekDays = allDays.filter(day => day.date && day.date >= weekStart && day.date <= weekEnd);
|
|
568
|
+
const validDays = selectedWeekDays.filter(day => !this.isDateDisabled(day.date));
|
|
569
|
+
if (validDays.length > 0) {
|
|
570
|
+
this.startDate = validDays[0].date;
|
|
571
|
+
this.endDate = validDays[validDays.length - 1].date;
|
|
572
|
+
this.rangeDateChange.emit({
|
|
573
|
+
start: formatDate(this.startDate, { dateFormat: this.dateFormat }),
|
|
574
|
+
end: formatDate(this.endDate, { dateFormat: this.dateFormat }),
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
};
|
|
578
|
+
/**
|
|
579
|
+
* Checks if a date corresponds to today
|
|
580
|
+
* @param {Date} date - Date to check
|
|
581
|
+
* @returns {boolean} true if the date is today
|
|
582
|
+
*/
|
|
583
|
+
this.isToday = (date) => {
|
|
584
|
+
const today = new Date();
|
|
585
|
+
return (date.getDate() === today.getDate() &&
|
|
586
|
+
date.getMonth() === today.getMonth() &&
|
|
587
|
+
date.getFullYear() === today.getFullYear());
|
|
588
|
+
};
|
|
589
|
+
/**
|
|
590
|
+
* Parse and cache the disabled dates
|
|
591
|
+
* @description Parse and cache the disabled dates
|
|
592
|
+
*/
|
|
593
|
+
this.parseDisabledDates = () => {
|
|
594
|
+
if (!this.disabledDates) {
|
|
595
|
+
this.parsedDisabledDates = [];
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
try {
|
|
599
|
+
this.parsedDisabledDates = this.disabledDates
|
|
600
|
+
.map(date => parseDate(date, this.dateFormat))
|
|
601
|
+
.filter(date => date !== null);
|
|
602
|
+
}
|
|
603
|
+
catch (error) {
|
|
604
|
+
console.error('Error parsing disabled dates:', error);
|
|
605
|
+
this.parsedDisabledDates = [];
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
* Applies a shortcut selection
|
|
610
|
+
* @param {Object} shortcut - Shortcut to apply
|
|
611
|
+
* @param {string | Date} shortcut.singleValue - Selected date value
|
|
612
|
+
* @param {Object} shortcut.rangeValue - Start and end date values
|
|
613
|
+
* @param {string | Date} shortcut.rangeValue.start - Start date value
|
|
614
|
+
* @param {string | Date} shortcut.rangeValue.end - End date value
|
|
615
|
+
* @param {string} shortcut.label - Label
|
|
616
|
+
*/
|
|
617
|
+
this.applyShortcut = (shortcut) => {
|
|
618
|
+
this.selectedDate = null;
|
|
619
|
+
this.startDate = null;
|
|
620
|
+
this.endDate = null;
|
|
621
|
+
if (shortcut.singleValue) {
|
|
622
|
+
const newDate = parseDate(shortcut.singleValue, this.dateFormat);
|
|
623
|
+
this.selectedDate = newDate;
|
|
624
|
+
this.singleDateChange.emit(formatDate(newDate, { dateFormat: this.dateFormat }));
|
|
625
|
+
this.singleValue = formatDate(newDate, { dateFormat: this.dateFormat });
|
|
626
|
+
if (!this.showActions) {
|
|
627
|
+
const event = new CustomEvent('closePopover', {
|
|
628
|
+
bubbles: true,
|
|
629
|
+
composed: true,
|
|
630
|
+
});
|
|
631
|
+
this.el.dispatchEvent(event);
|
|
632
|
+
}
|
|
633
|
+
this.forceCalendarUpdate(newDate);
|
|
634
|
+
}
|
|
635
|
+
else {
|
|
636
|
+
const start = parseDate(shortcut.rangeValue.start, this.dateFormat);
|
|
637
|
+
const end = parseDate(shortcut.rangeValue.end, this.dateFormat);
|
|
638
|
+
this.startDate = start;
|
|
639
|
+
this.endDate = end;
|
|
640
|
+
this.rangeDateChange.emit({
|
|
641
|
+
start: formatDate(start, { dateFormat: this.dateFormat }),
|
|
642
|
+
end: formatDate(end, { dateFormat: this.dateFormat }),
|
|
643
|
+
});
|
|
644
|
+
this.rangeValue = {
|
|
645
|
+
start: formatDate(start, { dateFormat: this.dateFormat }),
|
|
646
|
+
end: formatDate(end, { dateFormat: this.dateFormat }),
|
|
647
|
+
};
|
|
648
|
+
if (!this.showActions) {
|
|
649
|
+
const event = new CustomEvent('closePopover', {
|
|
650
|
+
bubbles: true,
|
|
651
|
+
composed: true,
|
|
652
|
+
});
|
|
653
|
+
this.el.dispatchEvent(event);
|
|
654
|
+
}
|
|
655
|
+
this.forceCalendarUpdate(end);
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
/**
|
|
659
|
+
* Method to force the complete calendar update (and fix the persistent hover problem)
|
|
660
|
+
* @param {Date} newDate - Date to force
|
|
661
|
+
*/
|
|
662
|
+
this.forceCalendarUpdate = newDate => {
|
|
663
|
+
this.currentDate = new Date(newDate);
|
|
664
|
+
this.currentDate = new Date(this.currentDate); // Force a re-render
|
|
665
|
+
// Reset visually the hover/touch effect
|
|
666
|
+
requestAnimationFrame(() => {
|
|
667
|
+
const days = document.querySelectorAll('.day');
|
|
668
|
+
days.forEach(el => {
|
|
669
|
+
el.classList.remove('hover', 'active', 'touched');
|
|
670
|
+
el.style.pointerEvents = 'none';
|
|
671
|
+
});
|
|
672
|
+
// Add specific touch handling (for mobile)
|
|
673
|
+
document.body.addEventListener('touchstart', this.clearTouchState, {
|
|
674
|
+
passive: true,
|
|
675
|
+
});
|
|
676
|
+
// Reset the touch state after 50ms
|
|
677
|
+
setTimeout(() => {
|
|
678
|
+
days.forEach(el => {
|
|
679
|
+
el.style.pointerEvents = '';
|
|
680
|
+
});
|
|
681
|
+
}, 50);
|
|
682
|
+
});
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* Function to reset the touch effect (Mobile fix)
|
|
686
|
+
*/
|
|
687
|
+
this.clearTouchState = () => {
|
|
688
|
+
document.querySelectorAll('.day').forEach(el => {
|
|
689
|
+
el.classList.remove('touched');
|
|
690
|
+
});
|
|
691
|
+
// Remove the listener after the first interaction
|
|
692
|
+
document.body.removeEventListener('touchstart', this.clearTouchState);
|
|
693
|
+
};
|
|
694
|
+
/**
|
|
695
|
+
* Handles month change with an offset
|
|
696
|
+
* @param {number} direction - Direction (-1 for previous, 1 for next)
|
|
697
|
+
* @returns {Function} Change month handler
|
|
698
|
+
*/
|
|
699
|
+
this.getChangeMonthHandler = (direction) => {
|
|
700
|
+
return () => this.changeMonth(direction);
|
|
701
|
+
};
|
|
702
|
+
/**
|
|
703
|
+
* Handles month change from an event (ex: dropdown)
|
|
704
|
+
* @param {number} offset - Month offset (0 by default)
|
|
705
|
+
* @returns {Function} Change month handler
|
|
706
|
+
*/
|
|
707
|
+
this.getHandleMonthChange = (offset) => {
|
|
708
|
+
return (event) => this.handleMonthChange(event, offset);
|
|
709
|
+
};
|
|
710
|
+
/**
|
|
711
|
+
* Handles year change from an event (ex: dropdown)
|
|
712
|
+
* @param {number} offset - Year offset (0 by default)
|
|
713
|
+
* @returns {Function} Change year handler
|
|
714
|
+
*/
|
|
715
|
+
this.getHandleYearChange = (offset) => {
|
|
716
|
+
return (event) => this.handleYearChange(event, offset);
|
|
717
|
+
};
|
|
718
|
+
/**
|
|
719
|
+
* Handles day click
|
|
720
|
+
* @param {Date} date - Date to handle
|
|
721
|
+
* @param {boolean} isDisabled - Whether the date is disabled
|
|
722
|
+
* @returns {Function} Day click handler
|
|
723
|
+
*/
|
|
724
|
+
this.getDayClickHandler = (date, isDisabled) => {
|
|
725
|
+
return isDisabled ? undefined : () => this.handleDateSelection(date);
|
|
726
|
+
};
|
|
727
|
+
/**
|
|
728
|
+
* Handles shortcut selection
|
|
729
|
+
* @param {Object} shortcut - Shortcut to handle
|
|
730
|
+
* @param {string | Date} shortcut.singleValue - Selected date value
|
|
731
|
+
* @param {Object} shortcut.rangeValue - Start and end date values
|
|
732
|
+
* @param {string | Date} shortcut.rangeValue.start - Start date value
|
|
733
|
+
* @param {string | Date} shortcut.rangeValue.end - End date value
|
|
734
|
+
* @param {string} shortcut.label - Label
|
|
735
|
+
* @returns {Function} Shortcut selection handler
|
|
736
|
+
*/
|
|
737
|
+
this.getShortcutHandler = (shortcut) => {
|
|
738
|
+
return () => this.applyShortcut(shortcut);
|
|
739
|
+
};
|
|
740
|
+
/**
|
|
741
|
+
* Handles week selection
|
|
742
|
+
* @param {Date[]} dates - Dates to handle
|
|
743
|
+
* @param {number} index - Calendar index
|
|
744
|
+
* @returns {Function} Week selection handler
|
|
745
|
+
*/
|
|
746
|
+
this.getWeekSelectionHandler = (dates, index) => {
|
|
747
|
+
return () => {
|
|
748
|
+
if (this.selectionType === 'range') {
|
|
749
|
+
this.handleWeekSelection(dates, index);
|
|
750
|
+
}
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
/**
|
|
754
|
+
* Resets the current selection
|
|
755
|
+
*/
|
|
756
|
+
this.resetSelection = () => {
|
|
757
|
+
if (this.selectionType === 'single') {
|
|
758
|
+
this.selectedDate = null;
|
|
759
|
+
this.singleValue = null;
|
|
760
|
+
this.singleDateChange.emit('');
|
|
761
|
+
}
|
|
762
|
+
else {
|
|
763
|
+
this.startDate = null;
|
|
764
|
+
this.endDate = null;
|
|
765
|
+
this.rangeValue = null;
|
|
766
|
+
this.rangeDateChange.emit({ start: '', end: '' });
|
|
767
|
+
}
|
|
768
|
+
};
|
|
769
|
+
/**
|
|
770
|
+
* Confirms the current selection
|
|
771
|
+
*/
|
|
772
|
+
this.confirmSelection = () => {
|
|
773
|
+
if (this.selectionType === 'single' && this.selectedDate) {
|
|
774
|
+
const dateStr = formatDate(this.selectedDate, {
|
|
775
|
+
dateFormat: this.dateFormat,
|
|
776
|
+
});
|
|
777
|
+
this.singleDateChange.emit(dateStr);
|
|
778
|
+
this.singleValue = dateStr;
|
|
779
|
+
const event = new CustomEvent('closePopover', {
|
|
780
|
+
bubbles: true,
|
|
781
|
+
composed: true,
|
|
782
|
+
});
|
|
783
|
+
this.el.dispatchEvent(event);
|
|
784
|
+
}
|
|
785
|
+
else if (this.selectionType === 'range' &&
|
|
786
|
+
this.startDate &&
|
|
787
|
+
this.endDate) {
|
|
788
|
+
this.rangeDateChange.emit({
|
|
789
|
+
start: formatDate(this.startDate, { dateFormat: this.dateFormat }),
|
|
790
|
+
end: formatDate(this.endDate, { dateFormat: this.dateFormat }),
|
|
791
|
+
});
|
|
792
|
+
this.rangeValue = {
|
|
793
|
+
start: formatDate(this.startDate, { dateFormat: this.dateFormat }),
|
|
794
|
+
end: formatDate(this.endDate, { dateFormat: this.dateFormat }),
|
|
795
|
+
};
|
|
796
|
+
const event = new CustomEvent('closePopover', {
|
|
797
|
+
bubbles: true,
|
|
798
|
+
composed: true,
|
|
799
|
+
});
|
|
800
|
+
this.el.dispatchEvent(event);
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
//#endregion METHODS
|
|
804
|
+
/****************************************************************************/
|
|
805
|
+
//#region RENDER
|
|
806
|
+
/**
|
|
807
|
+
* Renders the header
|
|
808
|
+
* @param {number} offset - Month offset
|
|
809
|
+
* @param {number} index - Calendar index
|
|
810
|
+
* @returns {JSX.Element} Header
|
|
811
|
+
* @description Renders the header of the calendar
|
|
812
|
+
*/
|
|
813
|
+
this.renderHeader = (offset, index) => {
|
|
814
|
+
return (h("div", { class: "header" }, this.numberOfCalendars > 1 && index === 0 && (h("nv-iconbutton", { class: "nav-left", emphasis: "lower", name: "chevron-left", onClick: this.getChangeMonthHandler(-1) })), h("div", { class: "date-controls" }, h("select", { class: "month-select mr-4", onChange: this.getHandleMonthChange(offset) }, this.months.map(month => (h("option", { key: month.value, value: month.value, selected: month.value === (this.currentDate.getUTCMonth() + offset) % 12 }, month.label)))), h("input", { type: "number", class: "year-input", min: "1950", max: "2100", value: this.currentDate.getUTCFullYear() +
|
|
815
|
+
Math.floor((this.currentDate.getUTCMonth() + offset) / 12), onChange: this.getHandleYearChange(offset) })), this.numberOfCalendars === 1 && (h("div", { class: "nav-buttons" }, h("nv-iconbutton", { emphasis: "lower", name: "chevron-left", onClick: this.getChangeMonthHandler(-1) }), h("nv-iconbutton", { emphasis: "lower", name: "chevron-right", onClick: this.getChangeMonthHandler(1) }))), this.numberOfCalendars > 1 && index === this.numberOfCalendars - 1 && (h("nv-iconbutton", { emphasis: "lower", name: "chevron-right", onClick: this.getChangeMonthHandler(1), class: "nav-right" }))));
|
|
816
|
+
};
|
|
817
|
+
/**
|
|
818
|
+
* Renders the week numbers
|
|
819
|
+
* @param {Array<{date: Date}>} weeks - Weeks to render
|
|
820
|
+
* @param {number} index - Calendar index
|
|
821
|
+
* @returns {JSX.Element} Week numbers
|
|
822
|
+
* @description Renders the week numbers of the calendar
|
|
823
|
+
*/
|
|
824
|
+
this.renderWeekNumbers = (
|
|
825
|
+
/** Weeks to render */
|
|
826
|
+
weeks,
|
|
827
|
+
/** Calendar index */
|
|
828
|
+
index) => {
|
|
829
|
+
return (h("div", { class: "week-numbers" }, h("div", { class: "week-header" }, this.getLocalizedWeekText()), weeks.map((week, weekIndex) => {
|
|
830
|
+
var _a;
|
|
831
|
+
const dates = week.map(d => d.date);
|
|
832
|
+
return (h("div", { class: `week-number ${this.selectionType === 'range' ? 'clickable' : ''}`, onClick: this.getWeekSelectionHandler(dates, index), key: `week-${weekIndex}` }, getWeekNumber(((_a = week.find(d => d.date)) === null || _a === void 0 ? void 0 : _a.date) || new Date())));
|
|
833
|
+
})));
|
|
834
|
+
};
|
|
835
|
+
this.renderDaysGrid = (
|
|
836
|
+
/** Days to render */
|
|
837
|
+
days) => {
|
|
838
|
+
return (h("div", { class: "days-grid" }, days.map(day => {
|
|
839
|
+
const date = day.date;
|
|
840
|
+
if (!date)
|
|
841
|
+
return null;
|
|
842
|
+
const isSelected = this.selectionType === 'single' &&
|
|
843
|
+
isSameDate(date, this.selectedDate, { isUTCMode: this.isUTCMode });
|
|
844
|
+
const isInRange = this.isDateInRange(date);
|
|
845
|
+
const isStart = isSameDate(date, this.startDate, {
|
|
846
|
+
isUTCMode: this.isUTCMode,
|
|
847
|
+
});
|
|
848
|
+
const isEnd = isSameDate(date, this.endDate, {
|
|
849
|
+
isUTCMode: this.isUTCMode,
|
|
850
|
+
});
|
|
851
|
+
const isToday = this.isToday(date);
|
|
852
|
+
const isOutsideMonth = !day.isCurrentMonth;
|
|
853
|
+
const dayClasses = [
|
|
854
|
+
'day',
|
|
855
|
+
isSelected ? 'selected' : '',
|
|
856
|
+
isStart ? 'range-start' : '',
|
|
857
|
+
isEnd ? 'range-end' : '',
|
|
858
|
+
isInRange ? 'in-range' : '',
|
|
859
|
+
day.isDisabled ? 'disabled' : '',
|
|
860
|
+
isOutsideMonth ? 'outside-month' : '',
|
|
861
|
+
isToday ? 'is-today' : '',
|
|
862
|
+
];
|
|
863
|
+
return (h("div", { class: dayClasses.filter(Boolean).join(' '), onClick: this.getDayClickHandler(date, day.isDisabled), "aria-disabled": day.isDisabled, key: `day-${date.toISOString()}` }, day.dayOfMonth));
|
|
864
|
+
})));
|
|
865
|
+
};
|
|
866
|
+
/**
|
|
867
|
+
* Renders the calendar
|
|
868
|
+
* @param {number} index - Calendar index
|
|
869
|
+
* @param {number} offset - Month offset
|
|
870
|
+
* @returns {JSX.Element} Calendar
|
|
871
|
+
* @description Renders the calendar of the calendar
|
|
872
|
+
*/
|
|
873
|
+
this.renderCalendar = (
|
|
874
|
+
/** Calendar index */
|
|
875
|
+
index,
|
|
876
|
+
/** Month offset */
|
|
877
|
+
offset) => {
|
|
878
|
+
const days = this.getDaysInMonth(offset, this.numberOfCalendars);
|
|
879
|
+
const weeks = [];
|
|
880
|
+
for (let i = 0; i < days.length; i += 7) {
|
|
881
|
+
weeks.push(days.slice(i, i + 7));
|
|
882
|
+
}
|
|
883
|
+
return (h("div", { class: "calendar-wrapper" }, h("div", { class: "calendar-container", key: `calendar-${index}` }, this.renderHeader(offset, index), h("div", { class: "calendar-grid" }, this.showWeekNumbers && this.renderWeekNumbers(weeks, index), h("div", { class: "days-container" }, h("div", { class: "days-header" }, this.getDayNames().map(day => (h("div", { class: "day-header" }, day)))), this.renderDaysGrid(days)))), index < this.numberOfCalendars - 1 && (h("div", { class: "calendar-separator" }))));
|
|
884
|
+
};
|
|
885
|
+
/**
|
|
886
|
+
* Renders the shortcuts
|
|
887
|
+
* @returns {JSX.Element} Shortcuts
|
|
888
|
+
* @description Renders the shortcuts of the calendar
|
|
889
|
+
*/
|
|
890
|
+
this.renderShortcuts = () => {
|
|
891
|
+
if (!this.hasShortcuts) {
|
|
892
|
+
return null;
|
|
893
|
+
}
|
|
894
|
+
return (h("div", { class: `shortcuts-container shortcuts-placement-${this.shortcutsPlacement}` }, this.shortcuts.map(shortcut => (h("nv-button", { emphasis: "lower", size: "xs", "aria-label": shortcut.label, onClick: this.getShortcutHandler(shortcut) }, shortcut.label)))));
|
|
895
|
+
};
|
|
896
|
+
/**
|
|
897
|
+
* Renders the actions
|
|
898
|
+
* @returns {JSX.Element} Actions
|
|
899
|
+
* @description Renders the actions of the calendar
|
|
900
|
+
* @slot actions - Child content of the component.
|
|
901
|
+
*/
|
|
902
|
+
this.renderActions = () => {
|
|
903
|
+
return (h("div", { class: "datepicker-actions" }, h("slot", { name: "actions" }, h("nv-button", { emphasis: "low", size: "xs", onClick: this.resetSelection }, "Cancel"), h("nv-button", { size: "xs", onClick: this.confirmSelection }, "OK"))));
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
//#endregion EVENTS
|
|
907
|
+
/****************************************************************************/
|
|
908
|
+
//#region WATCHERS
|
|
909
|
+
/**
|
|
910
|
+
* Watches the changes of the number of calendars
|
|
911
|
+
* @param {number} newValue - New number of calendars
|
|
912
|
+
*/
|
|
913
|
+
validateNumberOfCalendars(newValue) {
|
|
914
|
+
if (newValue < 1 || newValue > 4) {
|
|
915
|
+
console.warn('numberOfCalendars must be between 1 and 4. Defaulting to 1.');
|
|
916
|
+
this.numberOfCalendars = 1;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Watches the changes of the selected date range
|
|
921
|
+
* @param {Object} newValue - New rangeValue value
|
|
922
|
+
* @param {string} newValue.start - Start date
|
|
923
|
+
* @param {string} newValue.end - End date
|
|
924
|
+
*/
|
|
925
|
+
onRangeValueChange(newValue) {
|
|
926
|
+
if (newValue && newValue.start && newValue.end) {
|
|
927
|
+
try {
|
|
928
|
+
const { startDate, endDate } = this.validateDateRange(newValue.start, newValue.end);
|
|
929
|
+
this.startDate = startDate;
|
|
930
|
+
this.endDate = endDate;
|
|
931
|
+
this.currentDate = startDate;
|
|
932
|
+
}
|
|
933
|
+
catch (error) {
|
|
934
|
+
console.error('Invalid rangeValue:', error);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Watches the changes of the disabled dates
|
|
940
|
+
* @description Watches the changes of the disabled dates
|
|
941
|
+
*/
|
|
942
|
+
handleDisabledDatesChange() {
|
|
943
|
+
this.parseDisabledDates();
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* Watches the changes of the single value
|
|
947
|
+
* @param {string} newValue - New single value
|
|
948
|
+
* @param {string} oldValue - Old single value
|
|
949
|
+
*/
|
|
950
|
+
onSingleValueChange(newValue, oldValue) {
|
|
951
|
+
if (this.selectionType === 'single' && newValue !== oldValue && newValue) {
|
|
952
|
+
const parsedDate = parseDate(newValue, this.dateFormat);
|
|
953
|
+
if (parsedDate) {
|
|
954
|
+
this.selectedDate = parsedDate;
|
|
955
|
+
this.currentDate = parsedDate;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
//#endregion WATCHERS
|
|
960
|
+
/****************************************************************************/
|
|
961
|
+
//#region LIFECYCLE
|
|
962
|
+
componentWillLoad() {
|
|
963
|
+
this.parseDisabledDates();
|
|
964
|
+
if (this.selectionType === 'single' && this.singleValue) {
|
|
965
|
+
this.selectedDate = parseDate(this.singleValue, this.dateFormat);
|
|
966
|
+
this.currentDate = this.selectedDate;
|
|
967
|
+
}
|
|
968
|
+
else if (this.selectionType === 'range' && this.rangeValue) {
|
|
969
|
+
try {
|
|
970
|
+
if (this.rangeValue.start && this.rangeValue.end) {
|
|
971
|
+
const { startDate, endDate, swapped } = this.validateDateRange(this.rangeValue.start, this.rangeValue.end);
|
|
972
|
+
this.startDate = startDate;
|
|
973
|
+
this.endDate = endDate;
|
|
974
|
+
this.currentDate = startDate;
|
|
975
|
+
if (swapped) {
|
|
976
|
+
// If dates were swapped, update the rangeValue property
|
|
977
|
+
this.rangeValue = {
|
|
978
|
+
start: formatDate(startDate, { dateFormat: this.dateFormat }),
|
|
979
|
+
end: formatDate(endDate, { dateFormat: this.dateFormat }),
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
catch (error) {
|
|
985
|
+
console.error('Invalid rangeValue:', error);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
this.currentDate = new Date();
|
|
990
|
+
}
|
|
991
|
+
this.initializeMonths();
|
|
992
|
+
}
|
|
993
|
+
//#endregion LIFECYCLE
|
|
994
|
+
/****************************************************************************/
|
|
995
|
+
//#region METHODS
|
|
996
|
+
/**
|
|
997
|
+
* Checks if shortcuts are visible
|
|
998
|
+
* @returns {boolean} true if shortcuts are visible
|
|
999
|
+
*/
|
|
1000
|
+
get hasShortcuts() {
|
|
1001
|
+
return Boolean(this.shortcutsPlacement && this.shortcuts);
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* Checks if actions are visible
|
|
1005
|
+
* @returns {boolean} true if actions are visible
|
|
1006
|
+
*/
|
|
1007
|
+
get hasActions() {
|
|
1008
|
+
return this.showActions;
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Checks if the date format is in UTC mode
|
|
1012
|
+
* @returns {boolean} true if the date format is in UTC mode
|
|
1013
|
+
*/
|
|
1014
|
+
get isUTCMode() {
|
|
1015
|
+
return this.dateFormat.includes('Z');
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* Validates and processes a date range, warning if start is after end
|
|
1019
|
+
* @param {string} startDateStr - Start date in ISO string format
|
|
1020
|
+
* @param {string} endDateStr - End date in ISO string format
|
|
1021
|
+
* @returns {object} Object containing the validated start and end dates
|
|
1022
|
+
*/
|
|
1023
|
+
validateDateRange(startDateStr, endDateStr) {
|
|
1024
|
+
try {
|
|
1025
|
+
const startDate = parseDate(startDateStr, this.dateFormat);
|
|
1026
|
+
const endDate = parseDate(endDateStr, this.dateFormat);
|
|
1027
|
+
if (startDate && endDate && startDate > endDate) {
|
|
1028
|
+
console.warn(`Warning: startDate (${formatDate(startDate, {
|
|
1029
|
+
dateFormat: this.dateFormat,
|
|
1030
|
+
})}) is after endDate (${formatDate(endDate, {
|
|
1031
|
+
dateFormat: this.dateFormat,
|
|
1032
|
+
})})`);
|
|
1033
|
+
// Return dates in correct order, with swapped flag
|
|
1034
|
+
return {
|
|
1035
|
+
startDate: endDate,
|
|
1036
|
+
endDate: startDate,
|
|
1037
|
+
swapped: true,
|
|
1038
|
+
};
|
|
1039
|
+
}
|
|
1040
|
+
return {
|
|
1041
|
+
startDate,
|
|
1042
|
+
endDate,
|
|
1043
|
+
swapped: false,
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
catch (error) {
|
|
1047
|
+
console.error('Invalid date range:', error);
|
|
1048
|
+
throw error; // Re-throw to let the caller handle it
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Renders the datepicker
|
|
1053
|
+
* @returns {JSX.Element} Datepicker
|
|
1054
|
+
* @description Renders the datepicker of the calendar
|
|
1055
|
+
* @slot default - Child content of the component.
|
|
1056
|
+
*/
|
|
1057
|
+
render() {
|
|
1058
|
+
return (h(Host, { key: 'd265f105851253b5aa2a40e055f8e51b5cb6b553' }, h("div", { key: 'c6e1ea923b17f7684243598109e4cffc767248d7', class: "datepicker-root" }, h("div", { key: '5fc4cfbf3f6d823c500408d0f81f5f15d3e654d7', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, h("div", { key: '035dac25c8b8090e1a3a0ac2493865907f665da9', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), ((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||
|
|
1059
|
+
this.hasActions) && (h("div", { key: '91c21c945ab53acda631a8c50fb1437665fce030', class: "datepicker-controls" }, this.shortcutsPlacement === 'bottom' && this.renderShortcuts(), this.hasActions && this.renderActions())))), h("slot", { key: '3799c412c842e406715c235d3288022c2a734ed2' })));
|
|
1060
|
+
}
|
|
1061
|
+
get el() { return this; }
|
|
1062
|
+
static get watchers() { return {
|
|
1063
|
+
"numberOfCalendars": ["validateNumberOfCalendars"],
|
|
1064
|
+
"rangeValue": ["onRangeValueChange"],
|
|
1065
|
+
"disabledDates": ["handleDisabledDatesChange"],
|
|
1066
|
+
"singleValue": ["onSingleValueChange"]
|
|
1067
|
+
}; }
|
|
1068
|
+
static get style() { return NvCalendarStyle0; }
|
|
1069
|
+
}, [4, "nv-calendar", {
|
|
1070
|
+
"firstDayOfWeek": [514, "first-day-of-week"],
|
|
1071
|
+
"numberOfCalendars": [1538, "number-of-calendars"],
|
|
1072
|
+
"singleValue": [1537, "single-value"],
|
|
1073
|
+
"rangeValue": [1040],
|
|
1074
|
+
"min": [513],
|
|
1075
|
+
"max": [513],
|
|
1076
|
+
"disabledDates": [16],
|
|
1077
|
+
"locale": [513],
|
|
1078
|
+
"dateFormat": [513, "date-format"],
|
|
1079
|
+
"shortcutsPlacement": [513, "shortcuts-placement"],
|
|
1080
|
+
"selectionType": [513, "selection-type"],
|
|
1081
|
+
"showActions": [516, "show-actions"],
|
|
1082
|
+
"shortcuts": [16],
|
|
1083
|
+
"showWeekNumbers": [516, "show-week-numbers"],
|
|
1084
|
+
"currentDate": [32],
|
|
1085
|
+
"selectedDate": [32],
|
|
1086
|
+
"startDate": [32],
|
|
1087
|
+
"endDate": [32],
|
|
1088
|
+
"months": [32]
|
|
1089
|
+
}, undefined, {
|
|
1090
|
+
"numberOfCalendars": ["validateNumberOfCalendars"],
|
|
1091
|
+
"rangeValue": ["onRangeValueChange"],
|
|
1092
|
+
"disabledDates": ["handleDisabledDatesChange"],
|
|
1093
|
+
"singleValue": ["onSingleValueChange"]
|
|
1094
|
+
}]);
|
|
1095
|
+
function defineCustomElement() {
|
|
1096
|
+
if (typeof customElements === "undefined") {
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
const components = ["nv-calendar", "nv-button", "nv-icon", "nv-iconbutton", "nv-loader"];
|
|
1100
|
+
components.forEach(tagName => { switch (tagName) {
|
|
1101
|
+
case "nv-calendar":
|
|
1102
|
+
if (!customElements.get(tagName)) {
|
|
1103
|
+
customElements.define(tagName, NvCalendar);
|
|
1104
|
+
}
|
|
1105
|
+
break;
|
|
1106
|
+
case "nv-button":
|
|
1107
|
+
if (!customElements.get(tagName)) {
|
|
1108
|
+
defineCustomElement$4();
|
|
1109
|
+
}
|
|
1110
|
+
break;
|
|
1111
|
+
case "nv-icon":
|
|
1112
|
+
if (!customElements.get(tagName)) {
|
|
1113
|
+
defineCustomElement$3();
|
|
1114
|
+
}
|
|
1115
|
+
break;
|
|
1116
|
+
case "nv-iconbutton":
|
|
1117
|
+
if (!customElements.get(tagName)) {
|
|
1118
|
+
defineCustomElement$2();
|
|
1119
|
+
}
|
|
1120
|
+
break;
|
|
1121
|
+
case "nv-loader":
|
|
1122
|
+
if (!customElements.get(tagName)) {
|
|
1123
|
+
defineCustomElement$1();
|
|
1124
|
+
}
|
|
1125
|
+
break;
|
|
1126
|
+
} });
|
|
1127
|
+
}
|
|
1128
|
+
defineCustomElement();
|
|
1129
|
+
|
|
1130
|
+
export { NvCalendar as N, commonjsGlobal as c, defineCustomElement as d, getDefaultExportFromCjs as g };
|
|
1131
|
+
|
|
1132
|
+
//# sourceMappingURL=p-854c32dc.js.map
|