@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
|
@@ -1,1133 +0,0 @@
|
|
|
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-8348db09.js';
|
|
3
|
-
import { d as defineCustomElement$4 } from './p-2d9ba7d3.js';
|
|
4
|
-
import { d as defineCustomElement$3 } from './p-591730e7.js';
|
|
5
|
-
import { d as defineCustomElement$2 } from './p-dc3faba3.js';
|
|
6
|
-
import { d as defineCustomElement$1 } from './p-150daf68.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
|
-
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.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)}}";
|
|
47
|
-
const NvCalendarStyle0 = nvCalendarCss;
|
|
48
|
-
|
|
49
|
-
// Extend dayjs with plugins
|
|
50
|
-
dayjs.extend(customParseFormat);
|
|
51
|
-
dayjs.extend(utc);
|
|
52
|
-
dayjs.extend(weekOfYear);
|
|
53
|
-
const NvCalendar = /*@__PURE__*/ proxyCustomElement(class NvCalendar extends H {
|
|
54
|
-
constructor() {
|
|
55
|
-
super();
|
|
56
|
-
this.__registerHost();
|
|
57
|
-
this.singleDateChange = createEvent(this, "singleDateChange", 7);
|
|
58
|
-
this.rangeDateChange = createEvent(this, "rangeDateChange", 7);
|
|
59
|
-
/****************************************************************************/
|
|
60
|
-
//#region PROPERTIES
|
|
61
|
-
/**
|
|
62
|
-
* First day of the week (0 = Sunday, 1 = Monday, etc.)
|
|
63
|
-
* @default 0
|
|
64
|
-
*/
|
|
65
|
-
this.firstDayOfWeek = 0;
|
|
66
|
-
/**
|
|
67
|
-
* Number of calendars to display
|
|
68
|
-
* @default 1
|
|
69
|
-
*/
|
|
70
|
-
this.numberOfCalendars = 1;
|
|
71
|
-
/**
|
|
72
|
-
* Selected date (ISO string format)
|
|
73
|
-
* ex: "2025-03-15"
|
|
74
|
-
*/
|
|
75
|
-
this.singleValue = '';
|
|
76
|
-
/**
|
|
77
|
-
* Selected date range
|
|
78
|
-
* format: { start: ISO string, end: ISO string }
|
|
79
|
-
* ex: { start: "2025-03-15", end: "2025-03-20" }
|
|
80
|
-
*/
|
|
81
|
-
this.rangeValue = '';
|
|
82
|
-
/**
|
|
83
|
-
* Minimum date for selection (ISO string format, ex: "2025-01-01")
|
|
84
|
-
*/
|
|
85
|
-
this.min = '';
|
|
86
|
-
/**
|
|
87
|
-
* Maximum date for selection (ISO string format, ex: "2025-12-31")
|
|
88
|
-
*/
|
|
89
|
-
this.max = '';
|
|
90
|
-
/** Disabled dates (ISO string array)
|
|
91
|
-
* @default '[]'
|
|
92
|
-
*/
|
|
93
|
-
this.disabledDates = '';
|
|
94
|
-
/** Locale for date formatting
|
|
95
|
-
* @default 'en-BE'
|
|
96
|
-
*/
|
|
97
|
-
this.locale = 'en-BE';
|
|
98
|
-
/** Date format (ex: 'YYYY-MM-DD', 'DD-MM-YYYY', etc.)
|
|
99
|
-
* @default 'YYYY-MM-DD'
|
|
100
|
-
* @note If the date format is in UTC mode, the date will be displayed in UTC time.
|
|
101
|
-
* @note If the date format is not in UTC mode, the date will be displayed in the local time.
|
|
102
|
-
*/
|
|
103
|
-
this.dateFormat = 'YYYY-MM-DD';
|
|
104
|
-
/**
|
|
105
|
-
* Footer placement
|
|
106
|
-
* @default 'bottom'
|
|
107
|
-
*/
|
|
108
|
-
this.shortcutsPlacement = 'bottom';
|
|
109
|
-
/**
|
|
110
|
-
* Selection type (single date or date range)
|
|
111
|
-
* @default 'single'
|
|
112
|
-
*/
|
|
113
|
-
this.selectionType = 'single';
|
|
114
|
-
/**
|
|
115
|
-
* Show action buttons
|
|
116
|
-
* @default false
|
|
117
|
-
*/
|
|
118
|
-
this.showActions = false;
|
|
119
|
-
/**
|
|
120
|
-
* Custom actions to display in the footer
|
|
121
|
-
* JSON array of objects with the following properties:
|
|
122
|
-
* - label: string
|
|
123
|
-
* - onClick: function
|
|
124
|
-
* @default '[]'
|
|
125
|
-
*/
|
|
126
|
-
this.shortcuts = '[]';
|
|
127
|
-
/** Cache for parsed disabled dates */
|
|
128
|
-
this.parsedDisabledDates = [];
|
|
129
|
-
/** Selected date */
|
|
130
|
-
this.selectedDate = null;
|
|
131
|
-
/** Start date */
|
|
132
|
-
this.startDate = null;
|
|
133
|
-
/** End date */
|
|
134
|
-
this.endDate = null;
|
|
135
|
-
/** List of formatted months for the selector */
|
|
136
|
-
this.months = [];
|
|
137
|
-
/**
|
|
138
|
-
* Resets the current selection
|
|
139
|
-
*/
|
|
140
|
-
this.resetSelection = () => {
|
|
141
|
-
if (this.selectionType === 'single') {
|
|
142
|
-
this.selectedDate = null;
|
|
143
|
-
this.singleValue = '';
|
|
144
|
-
this.singleDateChange.emit('');
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
this.startDate = null;
|
|
148
|
-
this.endDate = null;
|
|
149
|
-
this.rangeValue = '';
|
|
150
|
-
this.rangeDateChange.emit({ start: '', end: '' });
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
/**
|
|
154
|
-
* Confirms the current selection
|
|
155
|
-
*/
|
|
156
|
-
this.confirmSelection = () => {
|
|
157
|
-
if (this.selectionType === 'single' && this.selectedDate) {
|
|
158
|
-
const dateStr = this.formatDate(this.selectedDate);
|
|
159
|
-
this.singleDateChange.emit(dateStr);
|
|
160
|
-
this.singleValue = dateStr;
|
|
161
|
-
const event = new CustomEvent('closePopover', {
|
|
162
|
-
bubbles: true,
|
|
163
|
-
composed: true,
|
|
164
|
-
});
|
|
165
|
-
this.el.dispatchEvent(event);
|
|
166
|
-
}
|
|
167
|
-
else if (this.selectionType === 'range' &&
|
|
168
|
-
this.startDate &&
|
|
169
|
-
this.endDate) {
|
|
170
|
-
this.rangeDateChange.emit({
|
|
171
|
-
start: this.formatDate(this.startDate),
|
|
172
|
-
end: this.formatDate(this.endDate),
|
|
173
|
-
});
|
|
174
|
-
this.rangeValue = JSON.stringify({
|
|
175
|
-
start: this.formatDate(this.startDate),
|
|
176
|
-
end: this.formatDate(this.endDate),
|
|
177
|
-
});
|
|
178
|
-
const event = new CustomEvent('closePopover', {
|
|
179
|
-
bubbles: true,
|
|
180
|
-
composed: true,
|
|
181
|
-
});
|
|
182
|
-
this.el.dispatchEvent(event);
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
//#endregion EVENTS
|
|
187
|
-
/****************************************************************************/
|
|
188
|
-
//#region LIFECYCLE
|
|
189
|
-
componentWillLoad() {
|
|
190
|
-
this.parseDisabledDates();
|
|
191
|
-
if (this.selectionType === 'single' && this.singleValue) {
|
|
192
|
-
this.selectedDate = this.parseDate(this.singleValue);
|
|
193
|
-
this.currentDate = this.selectedDate;
|
|
194
|
-
}
|
|
195
|
-
else if (this.selectionType === 'range' && this.rangeValue) {
|
|
196
|
-
try {
|
|
197
|
-
let parsed;
|
|
198
|
-
if (typeof this.rangeValue === 'string') {
|
|
199
|
-
parsed = JSON.parse(this.rangeValue);
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
parsed = this.rangeValue;
|
|
203
|
-
}
|
|
204
|
-
if (parsed.start && parsed.end) {
|
|
205
|
-
this.startDate = this.parseDate(parsed.start);
|
|
206
|
-
this.endDate = this.parseDate(parsed.end);
|
|
207
|
-
this.currentDate = this.startDate;
|
|
208
|
-
if (this.startDate && this.endDate && this.startDate > this.endDate) {
|
|
209
|
-
console.warn(`Warning: startDate (${this.formatDate(this.startDate)}) is after endDate (${this.formatDate(this.endDate)})`);
|
|
210
|
-
// [this.startDate, this.endDate] = [this.endDate, this.startDate];
|
|
211
|
-
throw new Error('startDate cannot be after endDate');
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
catch (error) {
|
|
216
|
-
console.error('Invalid JSON for rangeValue:', error);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
this.currentDate = new Date();
|
|
221
|
-
}
|
|
222
|
-
this.initializeMonths();
|
|
223
|
-
}
|
|
224
|
-
// componentDidLoad() {
|
|
225
|
-
// if (this.rangeValue) {
|
|
226
|
-
// this.onRangeValueChange(this.rangeValue);
|
|
227
|
-
// }
|
|
228
|
-
// }
|
|
229
|
-
//#endregion LIFECYCLE
|
|
230
|
-
/****************************************************************************/
|
|
231
|
-
//#region METHODS
|
|
232
|
-
/**
|
|
233
|
-
* Change the displayed month
|
|
234
|
-
* @param {number} offset - Month offset (-1 for previous, 1 for next)
|
|
235
|
-
*/
|
|
236
|
-
changeMonth(offset) {
|
|
237
|
-
const newDate = new Date(this.currentDate);
|
|
238
|
-
// Ensure we only move by one month at a time
|
|
239
|
-
newDate.setUTCMonth(newDate.getUTCMonth() + offset);
|
|
240
|
-
// Add the appropriate animation class
|
|
241
|
-
const containers = this.el.querySelectorAll('.calendar-grid');
|
|
242
|
-
containers.forEach(container => {
|
|
243
|
-
// Remove existing animation classes
|
|
244
|
-
container.classList.remove('slide-left', 'slide-right');
|
|
245
|
-
// Add the new animation class
|
|
246
|
-
const animationClass = offset > 0 ? 'slide-left' : 'slide-right';
|
|
247
|
-
container.classList.add(animationClass);
|
|
248
|
-
// Remove the class after the animation
|
|
249
|
-
setTimeout(() => {
|
|
250
|
-
container.classList.remove(animationClass);
|
|
251
|
-
}, 300); // 300ms corresponds to $slide-duration in the SCSS
|
|
252
|
-
});
|
|
253
|
-
this.currentDate = newDate;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Handles date selection based on the mode
|
|
257
|
-
* @param {Date} date - Selected date
|
|
258
|
-
*/
|
|
259
|
-
handleDateSelection(date) {
|
|
260
|
-
if (this.isDateDisabled(date)) {
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
if (this.selectionType === 'single') {
|
|
264
|
-
this.handleSingleSelection(date);
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
this.handleRangeSelection(date);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Handles single date selection
|
|
272
|
-
* @param {Date} date - Selected date
|
|
273
|
-
*/
|
|
274
|
-
handleSingleSelection(date) {
|
|
275
|
-
if (!date)
|
|
276
|
-
return;
|
|
277
|
-
const formattedDate = this.formatDate(date);
|
|
278
|
-
this.selectedDate = date;
|
|
279
|
-
this.singleDateChange.emit(formattedDate);
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Handles range date selection
|
|
283
|
-
* @param {Date} date - Selected date
|
|
284
|
-
*/
|
|
285
|
-
handleRangeSelection(date) {
|
|
286
|
-
if (!this.startDate || (this.startDate && this.endDate)) {
|
|
287
|
-
this.startDate = date;
|
|
288
|
-
this.endDate = null;
|
|
289
|
-
}
|
|
290
|
-
else {
|
|
291
|
-
this.endDate = date;
|
|
292
|
-
if (this.startDate > this.endDate) {
|
|
293
|
-
[this.startDate, this.endDate] = [this.endDate, this.startDate];
|
|
294
|
-
}
|
|
295
|
-
this.rangeDateChange.emit({
|
|
296
|
-
start: this.formatDate(this.startDate),
|
|
297
|
-
end: this.formatDate(this.endDate),
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Calculates the ISO week number
|
|
303
|
-
* @param {Date} date - Date to calculate
|
|
304
|
-
* @returns {number} Week number
|
|
305
|
-
*/
|
|
306
|
-
getWeekNumber(date) {
|
|
307
|
-
const startOfYear = new Date(date.getFullYear(), 0, 1);
|
|
308
|
-
const pastDaysOfYear = (date.getTime() - startOfYear.getTime()) / 86400000;
|
|
309
|
-
return Math.ceil((pastDaysOfYear + startOfYear.getDay() + 1) / 7);
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Checks if a date is disabled.
|
|
313
|
-
* Disabled if:
|
|
314
|
-
* - The date is before min (if defined)
|
|
315
|
-
* - The date is after max (if defined)
|
|
316
|
-
* - The date is in the disabledDates array
|
|
317
|
-
* @param {Date} date - Date to check
|
|
318
|
-
* @returns {boolean} true if the date is disabled
|
|
319
|
-
*/
|
|
320
|
-
isDateDisabled(date) {
|
|
321
|
-
if (!date)
|
|
322
|
-
return true;
|
|
323
|
-
// Minimum bound check
|
|
324
|
-
if (this.min) {
|
|
325
|
-
const minDate = this.parseDate(this.min);
|
|
326
|
-
if (minDate && date < minDate) {
|
|
327
|
-
return true;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
// Maximum bound check
|
|
331
|
-
if (this.max) {
|
|
332
|
-
const maxDate = this.parseDate(this.max);
|
|
333
|
-
if (maxDate && date > maxDate) {
|
|
334
|
-
return true;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
// Check disabled dates
|
|
338
|
-
return this.parsedDisabledDates.some(disabledDate => this.isSameDate(date, disabledDate));
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* Checks if a date is in the selected range
|
|
342
|
-
* @param {Date} date - Date to check
|
|
343
|
-
* @returns {boolean} true if the date is in the range
|
|
344
|
-
*/
|
|
345
|
-
isDateInRange(date) {
|
|
346
|
-
if (!date || !this.startDate || !this.endDate)
|
|
347
|
-
return false;
|
|
348
|
-
const checkDate = this.parseDate(date);
|
|
349
|
-
const startDate = this.parseDate(this.startDate);
|
|
350
|
-
const endDate = this.parseDate(this.endDate);
|
|
351
|
-
// Verify if startDate and endDate are valid
|
|
352
|
-
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
|
|
353
|
-
return false;
|
|
354
|
-
}
|
|
355
|
-
// Verify that startDate is before endDate (additional security)
|
|
356
|
-
if (startDate > endDate)
|
|
357
|
-
return false;
|
|
358
|
-
// Comparison based only on the date (year, month, day)
|
|
359
|
-
return (this.isSameOrAfter(checkDate, startDate) &&
|
|
360
|
-
this.isSameOrBefore(checkDate, endDate));
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* Retrieves the localized day names
|
|
364
|
-
* @returns {string[]} Array of short day names
|
|
365
|
-
*/
|
|
366
|
-
getDayNames() {
|
|
367
|
-
// If we have custom day names for this locale
|
|
368
|
-
if (CUSTOM_DAY_NAMES[this.locale]) {
|
|
369
|
-
const days = [...CUSTOM_DAY_NAMES[this.locale]];
|
|
370
|
-
// Reorganize the days based on the first day of the week
|
|
371
|
-
const firstDays = days.slice(0, this.firstDayOfWeek);
|
|
372
|
-
const remainingDays = days.slice(this.firstDayOfWeek);
|
|
373
|
-
return [...remainingDays, ...firstDays];
|
|
374
|
-
}
|
|
375
|
-
// Otherwise, use the default behavior
|
|
376
|
-
const formatter = new Intl.DateTimeFormat(this.locale, {
|
|
377
|
-
weekday: 'short',
|
|
378
|
-
});
|
|
379
|
-
const days = [...Array(7)].map((_, i) => formatter.format(new Date(2023, 0, i + 1)).toUpperCase());
|
|
380
|
-
// Reorganize the days based on the first day of the week
|
|
381
|
-
const firstDays = days.slice(0, this.firstDayOfWeek);
|
|
382
|
-
const remainingDays = days.slice(this.firstDayOfWeek);
|
|
383
|
-
return [...remainingDays, ...firstDays];
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* Generates the days of the current month
|
|
387
|
-
* @param {number} offset - Month offset (0 by default)
|
|
388
|
-
* @param {number} totalCalendars - Number of calendars to display (1 by default)
|
|
389
|
-
* @returns {Array<{ dayOfMonth: number | null, date: Date | null, isSelected: boolean, isDisabled: boolean }>} Array of formatted days
|
|
390
|
-
*/
|
|
391
|
-
getDaysInMonth(offset = 0, totalCalendars = 1) {
|
|
392
|
-
const year = this.currentDate.getUTCFullYear();
|
|
393
|
-
const month = this.currentDate.getUTCMonth() + offset;
|
|
394
|
-
const firstDay = new Date(Date.UTC(year, month, 1));
|
|
395
|
-
const lastDay = new Date(Date.UTC(year, month + 1, 0));
|
|
396
|
-
const days = [];
|
|
397
|
-
// Correct calculation of offset for previous month days
|
|
398
|
-
// Use getUTCDay to stay consistent with UTC timezone
|
|
399
|
-
const dayOfWeekIndex = firstDay.getUTCDay(); // 0 = Sunday, 1 = Monday, etc.
|
|
400
|
-
// Adjust based on firstDayOfWeek (if week starts on Monday, offset is different)
|
|
401
|
-
const offsetDays = (dayOfWeekIndex - this.firstDayOfWeek + 7) % 7;
|
|
402
|
-
// Add the days of the previous month for the first calendar
|
|
403
|
-
if (offset === 0 && offsetDays > 0) {
|
|
404
|
-
const prevMonthLastDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
405
|
-
for (let i = offsetDays; i > 0; i--) {
|
|
406
|
-
const date = new Date(Date.UTC(year, month - 1, prevMonthLastDay - i + 1));
|
|
407
|
-
days.push({
|
|
408
|
-
dayOfMonth: date.getUTCDate(),
|
|
409
|
-
date,
|
|
410
|
-
isCurrentMonth: false,
|
|
411
|
-
isDisabled: this.isDateDisabled(date),
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
// Add the days of the current month
|
|
416
|
-
for (let i = 1; i <= lastDay.getUTCDate(); i++) {
|
|
417
|
-
const date = new Date(Date.UTC(year, month, i));
|
|
418
|
-
days.push({
|
|
419
|
-
dayOfMonth: i,
|
|
420
|
-
date,
|
|
421
|
-
isCurrentMonth: true,
|
|
422
|
-
isDisabled: this.isDateDisabled(date),
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
// Add the days of the next month only for the last calendar
|
|
426
|
-
if (offset === totalCalendars - 1) {
|
|
427
|
-
const nextMonthDaysNeeded = 7 - (days.length % 7 || 7);
|
|
428
|
-
for (let i = 1; i <= nextMonthDaysNeeded; i++) {
|
|
429
|
-
const date = new Date(Date.UTC(year, month + 1, i));
|
|
430
|
-
days.push({
|
|
431
|
-
dayOfMonth: i,
|
|
432
|
-
date,
|
|
433
|
-
isCurrentMonth: false,
|
|
434
|
-
isDisabled: this.isDateDisabled(date),
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
return days;
|
|
439
|
-
}
|
|
440
|
-
/** Initializes the list of formatted months according to the locale */
|
|
441
|
-
initializeMonths() {
|
|
442
|
-
// If we have custom month names for this locale
|
|
443
|
-
if (CUSTOM_MONTH_NAMES[this.locale]) {
|
|
444
|
-
this.months = CUSTOM_MONTH_NAMES[this.locale].map((label, value) => ({
|
|
445
|
-
value,
|
|
446
|
-
label,
|
|
447
|
-
}));
|
|
448
|
-
return;
|
|
449
|
-
}
|
|
450
|
-
// Otherwise, use the default behavior
|
|
451
|
-
const formatter = new Intl.DateTimeFormat(this.locale, { month: 'short' });
|
|
452
|
-
this.months = Array.from({ length: 12 }, (_, i) => ({
|
|
453
|
-
value: i,
|
|
454
|
-
label: formatter.format(new Date(2000, i, 1)).toUpperCase(),
|
|
455
|
-
}));
|
|
456
|
-
}
|
|
457
|
-
/**
|
|
458
|
-
* Retrieves the localized abbreviation for "week"
|
|
459
|
-
* @returns {string} Localized abbreviation for "week"
|
|
460
|
-
*/
|
|
461
|
-
getLocalizedWeekText() {
|
|
462
|
-
return WEEK_ABBREVIATIONS[this.locale] || 'W';
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Handles month change in the selector
|
|
466
|
-
* @param {Event} event - Month change event
|
|
467
|
-
* @param {number} calendarOffset - Calendar offset (0 by default)
|
|
468
|
-
*/
|
|
469
|
-
handleMonthChange(event, calendarOffset = 0) {
|
|
470
|
-
const select = event.target;
|
|
471
|
-
const selectedMonth = parseInt(select.value, 10);
|
|
472
|
-
const currentMonth = this.currentDate.getUTCMonth();
|
|
473
|
-
// Calculate the difference considering the calendar offset
|
|
474
|
-
const monthDiff = selectedMonth - ((currentMonth + calendarOffset) % 12);
|
|
475
|
-
const newDate = new Date(this.currentDate);
|
|
476
|
-
newDate.setUTCMonth(newDate.getUTCMonth() + monthDiff);
|
|
477
|
-
this.currentDate = newDate;
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* Handles year change in the numeric entry
|
|
481
|
-
* @param {Event} event - Year change event
|
|
482
|
-
* @param {number} calendarOffset - Calendar offset (0 by default)
|
|
483
|
-
*/
|
|
484
|
-
handleYearChange(event, calendarOffset = 0) {
|
|
485
|
-
const input = event.target;
|
|
486
|
-
const year = parseInt(input.value, 10);
|
|
487
|
-
if (!isNaN(year) && year >= 1900 && year <= 2100) {
|
|
488
|
-
const newDate = new Date(this.currentDate);
|
|
489
|
-
newDate.setUTCFullYear(year);
|
|
490
|
-
newDate.setUTCMonth(newDate.getUTCMonth() + calendarOffset);
|
|
491
|
-
this.currentDate = newDate;
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* Handles week selection
|
|
496
|
-
* @param {Date[]} weekDays - Selected week days
|
|
497
|
-
* @param {number} calendarIndex - Calendar index from which the selection is made
|
|
498
|
-
*/
|
|
499
|
-
handleWeekSelection(weekDays, calendarIndex) {
|
|
500
|
-
if (this.selectionType !== 'range')
|
|
501
|
-
return;
|
|
502
|
-
const allDays = this.getDaysInMonth(calendarIndex, this.numberOfCalendars);
|
|
503
|
-
const weekStart = weekDays[0];
|
|
504
|
-
const weekEnd = weekDays[weekDays.length - 1];
|
|
505
|
-
if (!weekStart || !weekEnd)
|
|
506
|
-
return;
|
|
507
|
-
const selectedWeekDays = allDays.filter(day => day.date && day.date >= weekStart && day.date <= weekEnd);
|
|
508
|
-
const validDays = selectedWeekDays.filter(day => !this.isDateDisabled(day.date));
|
|
509
|
-
if (validDays.length > 0) {
|
|
510
|
-
this.startDate = validDays[0].date;
|
|
511
|
-
this.endDate = validDays[validDays.length - 1].date;
|
|
512
|
-
this.rangeDateChange.emit({
|
|
513
|
-
start: this.formatDate(this.startDate),
|
|
514
|
-
end: this.formatDate(this.endDate),
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Checks if a date corresponds to today
|
|
520
|
-
* @param {Date} date - Date to check
|
|
521
|
-
* @returns {boolean} true if the date is today
|
|
522
|
-
*/
|
|
523
|
-
isToday(date) {
|
|
524
|
-
const today = new Date();
|
|
525
|
-
return (date.getDate() === today.getDate() &&
|
|
526
|
-
date.getMonth() === today.getMonth() &&
|
|
527
|
-
date.getFullYear() === today.getFullYear());
|
|
528
|
-
}
|
|
529
|
-
/**
|
|
530
|
-
* Watches the changes of the number of calendars
|
|
531
|
-
* @watch numberOfCalendars
|
|
532
|
-
* @param {number} newValue - New number of calendars
|
|
533
|
-
*/
|
|
534
|
-
validateNumberOfCalendars(newValue) {
|
|
535
|
-
if (newValue < 1 || newValue > 4) {
|
|
536
|
-
console.warn('numberOfCalendars must be between 1 and 4. Defaulting to 1.');
|
|
537
|
-
this.numberOfCalendars = 1;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
/**
|
|
541
|
-
* Watches the changes of the selected date range
|
|
542
|
-
* @watch rangeValue
|
|
543
|
-
* @param {Object} newValue - New rangeValue value
|
|
544
|
-
* @param {string} newValue.start - Start date
|
|
545
|
-
* @param {string} newValue.end - End date
|
|
546
|
-
*/
|
|
547
|
-
onRangeValueChange(newValue) {
|
|
548
|
-
if (newValue) {
|
|
549
|
-
try {
|
|
550
|
-
const parsed = JSON.parse(newValue);
|
|
551
|
-
if (parsed.start && parsed.end) {
|
|
552
|
-
this.startDate = this.parseDate(parsed.start);
|
|
553
|
-
this.endDate = this.parseDate(parsed.end);
|
|
554
|
-
this.currentDate = this.parseDate(parsed.start);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
catch (error) {
|
|
558
|
-
console.error('Invalid JSON for rangeValue:', error);
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
* Watches the changes of the disabled dates
|
|
564
|
-
* @watch disabledDates
|
|
565
|
-
* @description Watches the changes of the disabled dates
|
|
566
|
-
*/
|
|
567
|
-
handleDisabledDatesChange() {
|
|
568
|
-
this.parseDisabledDates();
|
|
569
|
-
}
|
|
570
|
-
/**
|
|
571
|
-
* Watches the changes of the single value
|
|
572
|
-
* @watch singleValue
|
|
573
|
-
* @param {string} newValue - New single value
|
|
574
|
-
* @param {string} oldValue - Old single value
|
|
575
|
-
*/
|
|
576
|
-
onSingleValueChange(newValue, oldValue) {
|
|
577
|
-
if (this.selectionType === 'single' && newValue !== oldValue && newValue) {
|
|
578
|
-
const parsedDate = this.parseDate(newValue);
|
|
579
|
-
if (parsedDate) {
|
|
580
|
-
this.selectedDate = parsedDate;
|
|
581
|
-
this.currentDate = parsedDate;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
/**
|
|
586
|
-
* Convert a date string/Date to a Date without timezone offset
|
|
587
|
-
* @param {string | Date} dateInput - Date under string or Date object form
|
|
588
|
-
* @returns {Date} Date in Date form without timezone offset
|
|
589
|
-
*/
|
|
590
|
-
parseDate(dateInput) {
|
|
591
|
-
if (dateInput instanceof Date)
|
|
592
|
-
return dateInput;
|
|
593
|
-
// Attempt to automatically detect ISO 8601 format (generated by toISOString())
|
|
594
|
-
// The regex checks the standard ISO format: YYYY-MM-DDTHH:mm:ss.sssZ
|
|
595
|
-
if (typeof dateInput === 'string' &&
|
|
596
|
-
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/.test(dateInput)) {
|
|
597
|
-
try {
|
|
598
|
-
const parsedDate = new Date(dateInput);
|
|
599
|
-
if (!isNaN(parsedDate.getTime())) {
|
|
600
|
-
return parsedDate;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
catch (error) {
|
|
604
|
-
// If it fails, continue with other methods
|
|
605
|
-
console.error('Error parsing ISO date:', error);
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
// Handling Unix Seconds ("X") formats
|
|
609
|
-
if (this.dateFormat === 'X') {
|
|
610
|
-
const unixSeconds = Number(dateInput);
|
|
611
|
-
if (isNaN(unixSeconds))
|
|
612
|
-
return null;
|
|
613
|
-
return this.isUTCMode
|
|
614
|
-
? dayjs.unix(unixSeconds).utc().toDate()
|
|
615
|
-
: dayjs.unix(unixSeconds).toDate();
|
|
616
|
-
}
|
|
617
|
-
// Handling Unix Milliseconds ("x") formats
|
|
618
|
-
if (this.dateFormat === 'x') {
|
|
619
|
-
const unixMilliseconds = Number(dateInput);
|
|
620
|
-
if (isNaN(unixMilliseconds))
|
|
621
|
-
return null;
|
|
622
|
-
return this.isUTCMode
|
|
623
|
-
? dayjs(unixMilliseconds).utc().toDate()
|
|
624
|
-
: dayjs(unixMilliseconds).toDate();
|
|
625
|
-
}
|
|
626
|
-
// Handling C# Ticks format
|
|
627
|
-
if (this.dateFormat === 'Ticks') {
|
|
628
|
-
const ticks = Number(dateInput);
|
|
629
|
-
if (isNaN(ticks))
|
|
630
|
-
return null;
|
|
631
|
-
// Conversion of .NET ticks to milliseconds since Unix epoch
|
|
632
|
-
const unixMilliseconds = (ticks - 621355968000000000) / 10000;
|
|
633
|
-
return this.isUTCMode
|
|
634
|
-
? dayjs(unixMilliseconds).utc().toDate()
|
|
635
|
-
: dayjs(unixMilliseconds).toDate();
|
|
636
|
-
}
|
|
637
|
-
// For all other formats, use customParseFormat in strict mode
|
|
638
|
-
let parsed;
|
|
639
|
-
if (this.isUTCMode) {
|
|
640
|
-
parsed = dayjs.utc(dateInput, this.dateFormat, true);
|
|
641
|
-
}
|
|
642
|
-
else {
|
|
643
|
-
parsed = dayjs(dateInput, this.dateFormat, true);
|
|
644
|
-
}
|
|
645
|
-
if (!parsed.isValid()) {
|
|
646
|
-
console.error(`Parsing error:`, {
|
|
647
|
-
dateInput,
|
|
648
|
-
dateFormat: this.dateFormat,
|
|
649
|
-
});
|
|
650
|
-
return null;
|
|
651
|
-
}
|
|
652
|
-
return parsed.toDate();
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* Checks if the date format is in UTC mode
|
|
656
|
-
* @returns {boolean} true if the date format is in UTC mode
|
|
657
|
-
*/
|
|
658
|
-
get isUTCMode() {
|
|
659
|
-
return this.dateFormat.includes('Z');
|
|
660
|
-
}
|
|
661
|
-
/**
|
|
662
|
-
* Checks if the date format is ISO 8601
|
|
663
|
-
* @returns {boolean} true if the format is ISO 8601
|
|
664
|
-
*/
|
|
665
|
-
get isISO8601Format() {
|
|
666
|
-
return this.dateFormat === 'YYYY-MM-DD[T]HH:mm:ss[Z]';
|
|
667
|
-
}
|
|
668
|
-
/**
|
|
669
|
-
* Formats a date to a string according to the format
|
|
670
|
-
* @param {Date} date - Date to format
|
|
671
|
-
* @returns {string} Formatted date
|
|
672
|
-
*/
|
|
673
|
-
formatDate(date) {
|
|
674
|
-
if (!date)
|
|
675
|
-
return '';
|
|
676
|
-
// Special case for ISO 8601
|
|
677
|
-
if (this.isISO8601Format) {
|
|
678
|
-
// For the ISO 8601 format, use directly toISOString() which is standard
|
|
679
|
-
return date.toISOString();
|
|
680
|
-
}
|
|
681
|
-
// If the format is "Ticks", convert the time to C# ticks
|
|
682
|
-
if (this.dateFormat === 'Ticks') {
|
|
683
|
-
const ticks = date.getTime() * 10000 + 621355968000000000;
|
|
684
|
-
return ticks.toString();
|
|
685
|
-
}
|
|
686
|
-
// If the format is "X" (Unix Seconds)
|
|
687
|
-
if (this.dateFormat === 'X') {
|
|
688
|
-
return dayjs(date).unix().toString();
|
|
689
|
-
}
|
|
690
|
-
// If the format is "x" (Unix Milliseconds)
|
|
691
|
-
if (this.dateFormat === 'x') {
|
|
692
|
-
return date.getTime().toString();
|
|
693
|
-
}
|
|
694
|
-
// Otherwise, format according to the mode (UTC or local)
|
|
695
|
-
return this.isUTCMode
|
|
696
|
-
? dayjs(date).utc().format(this.dateFormat)
|
|
697
|
-
: dayjs(date).format(this.dateFormat);
|
|
698
|
-
}
|
|
699
|
-
/**
|
|
700
|
-
* Parse and cache the disabled dates
|
|
701
|
-
* @description Parse and cache the disabled dates
|
|
702
|
-
*/
|
|
703
|
-
parseDisabledDates() {
|
|
704
|
-
if (!this.disabledDates) {
|
|
705
|
-
this.parsedDisabledDates = [];
|
|
706
|
-
return;
|
|
707
|
-
}
|
|
708
|
-
try {
|
|
709
|
-
const disabledDatesArray = JSON.parse(this.disabledDates);
|
|
710
|
-
this.parsedDisabledDates = disabledDatesArray
|
|
711
|
-
.map(date => this.parseDate(date))
|
|
712
|
-
.filter(date => date !== null);
|
|
713
|
-
}
|
|
714
|
-
catch (error) {
|
|
715
|
-
console.error('Error parsing disabled dates:', error);
|
|
716
|
-
this.parsedDisabledDates = [];
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
/**
|
|
720
|
-
* Checks if two dates are identical
|
|
721
|
-
* @param {Date | null} date1 - First date
|
|
722
|
-
* @param {Date | null} date2 - Second date
|
|
723
|
-
* @returns {boolean} true if the dates are identical
|
|
724
|
-
*/
|
|
725
|
-
isSameDate(date1, date2) {
|
|
726
|
-
if (!date1 || !date2)
|
|
727
|
-
return false;
|
|
728
|
-
if (this.isUTCMode) {
|
|
729
|
-
return (date1.getUTCFullYear() === date2.getUTCFullYear() &&
|
|
730
|
-
date1.getUTCMonth() === date2.getUTCMonth() &&
|
|
731
|
-
date1.getUTCDate() === date2.getUTCDate());
|
|
732
|
-
}
|
|
733
|
-
else {
|
|
734
|
-
return (date1.getFullYear() === date2.getFullYear() &&
|
|
735
|
-
date1.getMonth() === date2.getMonth() &&
|
|
736
|
-
date1.getDate() === date2.getDate());
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
/**
|
|
740
|
-
* Checks if a date is identical or after another date
|
|
741
|
-
* @param {Date} date - Date to check
|
|
742
|
-
* @param {Date} compareDate - Reference date
|
|
743
|
-
* @returns {boolean} true if `date` >= `compareDate`
|
|
744
|
-
*/
|
|
745
|
-
isSameOrAfter(date, compareDate) {
|
|
746
|
-
if (this.isUTCMode) {
|
|
747
|
-
return (date.getUTCFullYear() > compareDate.getUTCFullYear() ||
|
|
748
|
-
(date.getUTCFullYear() === compareDate.getUTCFullYear() &&
|
|
749
|
-
date.getUTCMonth() > compareDate.getUTCMonth()) ||
|
|
750
|
-
(date.getUTCFullYear() === compareDate.getUTCFullYear() &&
|
|
751
|
-
date.getUTCMonth() === compareDate.getUTCMonth() &&
|
|
752
|
-
date.getUTCDate() >= compareDate.getUTCDate()));
|
|
753
|
-
}
|
|
754
|
-
else {
|
|
755
|
-
return (date.getFullYear() > compareDate.getFullYear() ||
|
|
756
|
-
(date.getFullYear() === compareDate.getFullYear() &&
|
|
757
|
-
date.getMonth() > compareDate.getMonth()) ||
|
|
758
|
-
(date.getFullYear() === compareDate.getFullYear() &&
|
|
759
|
-
date.getMonth() === compareDate.getMonth() &&
|
|
760
|
-
date.getDate() >= compareDate.getDate()));
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* Checks if a date is identical or before another date
|
|
765
|
-
* @param {Date} date - Date to check
|
|
766
|
-
* @param {Date} compareDate - Reference date
|
|
767
|
-
* @returns {boolean} true if `date` <= `compareDate`
|
|
768
|
-
*/
|
|
769
|
-
isSameOrBefore(date, compareDate) {
|
|
770
|
-
if (this.isUTCMode) {
|
|
771
|
-
return (date.getUTCFullYear() < compareDate.getUTCFullYear() ||
|
|
772
|
-
(date.getUTCFullYear() === compareDate.getUTCFullYear() &&
|
|
773
|
-
date.getUTCMonth() < compareDate.getUTCMonth()) ||
|
|
774
|
-
(date.getUTCFullYear() === compareDate.getUTCFullYear() &&
|
|
775
|
-
date.getUTCMonth() === compareDate.getUTCMonth() &&
|
|
776
|
-
date.getUTCDate() <= compareDate.getUTCDate()));
|
|
777
|
-
}
|
|
778
|
-
else {
|
|
779
|
-
return (date.getFullYear() < compareDate.getFullYear() ||
|
|
780
|
-
(date.getFullYear() === compareDate.getFullYear() &&
|
|
781
|
-
date.getMonth() < compareDate.getMonth()) ||
|
|
782
|
-
(date.getFullYear() === compareDate.getFullYear() &&
|
|
783
|
-
date.getMonth() === compareDate.getMonth() &&
|
|
784
|
-
date.getDate() <= compareDate.getDate()));
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
/**
|
|
788
|
-
* Applies a shortcut selection
|
|
789
|
-
* @param {Object} shortcut - Shortcut to apply
|
|
790
|
-
* @param {string | Date} shortcut.singleValue - Selected date value
|
|
791
|
-
* @param {Object} shortcut.rangeValue - Start and end date values
|
|
792
|
-
* @param {string | Date} shortcut.rangeValue.start - Start date value
|
|
793
|
-
* @param {string | Date} shortcut.rangeValue.end - End date value
|
|
794
|
-
* @param {string} shortcut.label - Label
|
|
795
|
-
*/
|
|
796
|
-
applyShortcut(shortcut) {
|
|
797
|
-
this.selectedDate = null;
|
|
798
|
-
this.startDate = null;
|
|
799
|
-
this.endDate = null;
|
|
800
|
-
if (shortcut.singleValue) {
|
|
801
|
-
const newDate = this.parseDate(shortcut.singleValue);
|
|
802
|
-
this.selectedDate = newDate;
|
|
803
|
-
this.singleDateChange.emit(this.formatDate(newDate));
|
|
804
|
-
this.singleValue = this.formatDate(newDate);
|
|
805
|
-
if (!this.showActions) {
|
|
806
|
-
const event = new CustomEvent('closePopover', {
|
|
807
|
-
bubbles: true,
|
|
808
|
-
composed: true,
|
|
809
|
-
});
|
|
810
|
-
this.el.dispatchEvent(event);
|
|
811
|
-
}
|
|
812
|
-
this.forceCalendarUpdate(newDate);
|
|
813
|
-
}
|
|
814
|
-
else {
|
|
815
|
-
const start = this.parseDate(shortcut.rangeValue.start);
|
|
816
|
-
const end = this.parseDate(shortcut.rangeValue.end);
|
|
817
|
-
this.startDate = start;
|
|
818
|
-
this.endDate = end;
|
|
819
|
-
this.rangeDateChange.emit({
|
|
820
|
-
start: this.formatDate(start),
|
|
821
|
-
end: this.formatDate(end),
|
|
822
|
-
});
|
|
823
|
-
this.rangeValue = JSON.stringify({
|
|
824
|
-
start: this.formatDate(start),
|
|
825
|
-
end: this.formatDate(end),
|
|
826
|
-
});
|
|
827
|
-
if (!this.showActions) {
|
|
828
|
-
const event = new CustomEvent('closePopover', {
|
|
829
|
-
bubbles: true,
|
|
830
|
-
composed: true,
|
|
831
|
-
});
|
|
832
|
-
this.el.dispatchEvent(event);
|
|
833
|
-
}
|
|
834
|
-
this.forceCalendarUpdate(end);
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
/**
|
|
838
|
-
* Method to force the complete calendar update (and fix the persistent hover problem)
|
|
839
|
-
* @param {Date} newDate - Date to force
|
|
840
|
-
*/
|
|
841
|
-
forceCalendarUpdate(newDate) {
|
|
842
|
-
this.currentDate = new Date(newDate);
|
|
843
|
-
this.currentDate = new Date(this.currentDate); // Force a re-render
|
|
844
|
-
// Reset visually the hover/touch effect
|
|
845
|
-
requestAnimationFrame(() => {
|
|
846
|
-
const days = document.querySelectorAll('.day');
|
|
847
|
-
days.forEach(el => {
|
|
848
|
-
el.classList.remove('hover', 'active', 'touched');
|
|
849
|
-
el.style.pointerEvents = 'none';
|
|
850
|
-
});
|
|
851
|
-
// Add specific touch handling (for mobile)
|
|
852
|
-
document.body.addEventListener('touchstart', this.clearTouchState, {
|
|
853
|
-
passive: true,
|
|
854
|
-
});
|
|
855
|
-
// Reset the touch state after 50ms
|
|
856
|
-
setTimeout(() => {
|
|
857
|
-
days.forEach(el => {
|
|
858
|
-
el.style.pointerEvents = '';
|
|
859
|
-
});
|
|
860
|
-
}, 50);
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
/**
|
|
864
|
-
* Function to reset the touch effect (Mobile fix)
|
|
865
|
-
*/
|
|
866
|
-
clearTouchState() {
|
|
867
|
-
document.querySelectorAll('.day').forEach(el => {
|
|
868
|
-
el.classList.remove('touched');
|
|
869
|
-
});
|
|
870
|
-
// Remove the listener after the first interaction
|
|
871
|
-
document.body.removeEventListener('touchstart', this.clearTouchState);
|
|
872
|
-
}
|
|
873
|
-
/**
|
|
874
|
-
* Handles month change with an offset
|
|
875
|
-
* @param {number} direction - Direction (-1 for previous, 1 for next)
|
|
876
|
-
* @returns {Function} Change month handler
|
|
877
|
-
*/
|
|
878
|
-
getChangeMonthHandler(direction) {
|
|
879
|
-
return () => this.changeMonth(direction);
|
|
880
|
-
}
|
|
881
|
-
/**
|
|
882
|
-
* Handles month change from an event (ex: dropdown)
|
|
883
|
-
* @param {number} offset - Month offset (0 by default)
|
|
884
|
-
* @returns {Function} Change month handler
|
|
885
|
-
*/
|
|
886
|
-
getHandleMonthChange(offset) {
|
|
887
|
-
return (event) => this.handleMonthChange(event, offset);
|
|
888
|
-
}
|
|
889
|
-
/**
|
|
890
|
-
* Handles year change from an event (ex: dropdown)
|
|
891
|
-
* @param {number} offset - Year offset (0 by default)
|
|
892
|
-
* @returns {Function} Change year handler
|
|
893
|
-
*/
|
|
894
|
-
getHandleYearChange(offset) {
|
|
895
|
-
return (event) => this.handleYearChange(event, offset);
|
|
896
|
-
}
|
|
897
|
-
/**
|
|
898
|
-
* Handles day click
|
|
899
|
-
* @param {Date} date - Date to handle
|
|
900
|
-
* @param {boolean} isDisabled - Whether the date is disabled
|
|
901
|
-
* @returns {Function} Day click handler
|
|
902
|
-
*/
|
|
903
|
-
getDayClickHandler(date, isDisabled) {
|
|
904
|
-
return isDisabled ? undefined : () => this.handleDateSelection(date);
|
|
905
|
-
}
|
|
906
|
-
/**
|
|
907
|
-
* Handles shortcut selection
|
|
908
|
-
* @param {Object} shortcut - Shortcut to handle
|
|
909
|
-
* @param {string | Date} shortcut.singleValue - Selected date value
|
|
910
|
-
* @param {Object} shortcut.rangeValue - Start and end date values
|
|
911
|
-
* @param {string | Date} shortcut.rangeValue.start - Start date value
|
|
912
|
-
* @param {string | Date} shortcut.rangeValue.end - End date value
|
|
913
|
-
* @param {string} shortcut.label - Label
|
|
914
|
-
* @returns {Function} Shortcut selection handler
|
|
915
|
-
*/
|
|
916
|
-
getShortcutHandler(shortcut) {
|
|
917
|
-
return () => this.applyShortcut(shortcut);
|
|
918
|
-
}
|
|
919
|
-
/**
|
|
920
|
-
* Handles week selection
|
|
921
|
-
* @param {Date[]} dates - Dates to handle
|
|
922
|
-
* @param {number} index - Calendar index
|
|
923
|
-
* @returns {Function} Week selection handler
|
|
924
|
-
*/
|
|
925
|
-
getWeekSelectionHandler(dates, index) {
|
|
926
|
-
return () => {
|
|
927
|
-
if (this.selectionType === 'range') {
|
|
928
|
-
this.handleWeekSelection(dates, index);
|
|
929
|
-
}
|
|
930
|
-
};
|
|
931
|
-
}
|
|
932
|
-
parsedShortcuts() {
|
|
933
|
-
try {
|
|
934
|
-
return this.shortcuts ? JSON.parse(this.shortcuts) : [];
|
|
935
|
-
}
|
|
936
|
-
catch (error) {
|
|
937
|
-
console.error('Invalid JSON for shortcuts:', error);
|
|
938
|
-
return [];
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
/**
|
|
942
|
-
* Checks if shortcuts are visible
|
|
943
|
-
* @returns {boolean} true if shortcuts are visible
|
|
944
|
-
*/
|
|
945
|
-
get hasShortcuts() {
|
|
946
|
-
return (this.shortcutsPlacement === 'bottom' && this.parsedShortcuts().length > 0);
|
|
947
|
-
}
|
|
948
|
-
/**
|
|
949
|
-
* Checks if actions are visible
|
|
950
|
-
* @returns {boolean} true if actions are visible
|
|
951
|
-
*/
|
|
952
|
-
get hasActions() {
|
|
953
|
-
return this.showActions;
|
|
954
|
-
}
|
|
955
|
-
//#endregion METHODS
|
|
956
|
-
/****************************************************************************/
|
|
957
|
-
//#region RENDER
|
|
958
|
-
/**
|
|
959
|
-
* Renders the header
|
|
960
|
-
* @param {number} offset - Month offset
|
|
961
|
-
* @param {number} index - Calendar index
|
|
962
|
-
* @returns {JSX.Element} Header
|
|
963
|
-
* @description Renders the header of the calendar
|
|
964
|
-
*/
|
|
965
|
-
renderHeader(offset, index) {
|
|
966
|
-
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() +
|
|
967
|
-
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" }))));
|
|
968
|
-
}
|
|
969
|
-
/**
|
|
970
|
-
* Renders the week numbers
|
|
971
|
-
* @param {Array<{date: Date}>} weeks - Weeks to render
|
|
972
|
-
* @param {number} index - Calendar index
|
|
973
|
-
* @returns {JSX.Element} Week numbers
|
|
974
|
-
* @description Renders the week numbers of the calendar
|
|
975
|
-
*/
|
|
976
|
-
renderWeekNumbers(
|
|
977
|
-
/** Weeks to render */
|
|
978
|
-
weeks,
|
|
979
|
-
/** Calendar index */
|
|
980
|
-
index) {
|
|
981
|
-
return (h("div", { class: "week-numbers" }, h("div", { class: "week-header" }, this.getLocalizedWeekText()), weeks.map((week, weekIndex) => {
|
|
982
|
-
var _a;
|
|
983
|
-
const dates = week.map(d => d.date);
|
|
984
|
-
return (h("div", { class: `week-number ${this.selectionType === 'range' ? 'clickable' : ''}`, onClick: this.getWeekSelectionHandler(dates, index), key: `week-${weekIndex}` }, this.getWeekNumber(((_a = week.find(d => d.date)) === null || _a === void 0 ? void 0 : _a.date) || new Date())));
|
|
985
|
-
})));
|
|
986
|
-
}
|
|
987
|
-
renderDaysGrid(
|
|
988
|
-
/** Days to render */
|
|
989
|
-
days) {
|
|
990
|
-
return (h("div", { class: "days-grid" }, days.map(day => {
|
|
991
|
-
const date = day.date;
|
|
992
|
-
if (!date)
|
|
993
|
-
return null;
|
|
994
|
-
const isSelected = this.selectionType === 'single' &&
|
|
995
|
-
this.isSameDate(date, this.selectedDate);
|
|
996
|
-
const isInRange = this.isDateInRange(date);
|
|
997
|
-
const isStart = this.isSameDate(date, this.startDate);
|
|
998
|
-
const isEnd = this.isSameDate(date, this.endDate);
|
|
999
|
-
const isToday = this.isToday(date);
|
|
1000
|
-
const isOutsideMonth = !day.isCurrentMonth;
|
|
1001
|
-
const dayClasses = [
|
|
1002
|
-
'day',
|
|
1003
|
-
isSelected ? 'selected' : '',
|
|
1004
|
-
isStart ? 'range-start' : '',
|
|
1005
|
-
isEnd ? 'range-end' : '',
|
|
1006
|
-
isInRange ? 'in-range' : '',
|
|
1007
|
-
day.isDisabled ? 'disabled' : '',
|
|
1008
|
-
isOutsideMonth ? 'outside-month' : '',
|
|
1009
|
-
isToday ? 'is-today' : '',
|
|
1010
|
-
];
|
|
1011
|
-
return (h("div", { class: dayClasses.filter(Boolean).join(' '), onClick: this.getDayClickHandler(date, day.isDisabled), "aria-disabled": day.isDisabled, key: `day-${date.toISOString()}` }, day.dayOfMonth));
|
|
1012
|
-
})));
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* Renders the calendar
|
|
1016
|
-
* @param {number} index - Calendar index
|
|
1017
|
-
* @param {number} offset - Month offset
|
|
1018
|
-
* @returns {JSX.Element} Calendar
|
|
1019
|
-
* @description Renders the calendar of the calendar
|
|
1020
|
-
*/
|
|
1021
|
-
renderCalendar(
|
|
1022
|
-
/** Calendar index */
|
|
1023
|
-
index,
|
|
1024
|
-
/** Month offset */
|
|
1025
|
-
offset) {
|
|
1026
|
-
const days = this.getDaysInMonth(offset, this.numberOfCalendars);
|
|
1027
|
-
const weeks = [];
|
|
1028
|
-
for (let i = 0; i < days.length; i += 7) {
|
|
1029
|
-
weeks.push(days.slice(i, i + 7));
|
|
1030
|
-
}
|
|
1031
|
-
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" }))));
|
|
1032
|
-
}
|
|
1033
|
-
/**
|
|
1034
|
-
* Renders the shortcuts
|
|
1035
|
-
* @returns {JSX.Element} Shortcuts
|
|
1036
|
-
* @description Renders the shortcuts of the calendar
|
|
1037
|
-
*/
|
|
1038
|
-
renderShortcuts() {
|
|
1039
|
-
if (!this.parsedShortcuts().length) {
|
|
1040
|
-
return null;
|
|
1041
|
-
}
|
|
1042
|
-
return (h("div", { class: `shortcuts-container shortcuts-placement-${this.shortcutsPlacement}` }, this.parsedShortcuts().map(shortcut => (h("nv-button", { emphasis: "lower", size: "xs", "aria-label": shortcut.label, onClick: this.getShortcutHandler(shortcut) }, shortcut.label)))));
|
|
1043
|
-
}
|
|
1044
|
-
/**
|
|
1045
|
-
* Renders the actions
|
|
1046
|
-
* @returns {JSX.Element} Actions
|
|
1047
|
-
* @description Renders the actions of the calendar
|
|
1048
|
-
* @slot actions - Child content of the component.
|
|
1049
|
-
*/
|
|
1050
|
-
renderActions() {
|
|
1051
|
-
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"))));
|
|
1052
|
-
}
|
|
1053
|
-
/**
|
|
1054
|
-
* Renders the datepicker
|
|
1055
|
-
* @returns {JSX.Element} Datepicker
|
|
1056
|
-
* @description Renders the datepicker of the calendar
|
|
1057
|
-
* @slot default - Child content of the component.
|
|
1058
|
-
*/
|
|
1059
|
-
render() {
|
|
1060
|
-
return (h(Host, { key: '89300da9f694aa926855452414e7e036f75f2de6' }, h("div", { key: '467ef9fc9d6523eec3712bf779d49fdf50c55617', class: "datepicker-root" }, h("div", { key: '990f2cb18dcad96cab0f8dfb62e6c57049475440', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, h("div", { key: 'c0dedf1007cbc6a87bd591925c9994474c876afc', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), (this.hasShortcuts || this.hasActions) && (h("div", { key: 'ef81eaf952fbe569be7e1d3ee6cb59de0e137fe4', class: "datepicker-controls" }, this.hasShortcuts && this.renderShortcuts(), this.hasActions && this.renderActions())))), h("slot", { key: 'e1281217950b5cb02952a69b081d4fcce5863b4d' })));
|
|
1061
|
-
}
|
|
1062
|
-
get el() { return this; }
|
|
1063
|
-
static get watchers() { return {
|
|
1064
|
-
"numberOfCalendars": ["validateNumberOfCalendars"],
|
|
1065
|
-
"rangeValue": ["onRangeValueChange"],
|
|
1066
|
-
"disabledDates": ["handleDisabledDatesChange"],
|
|
1067
|
-
"singleValue": ["onSingleValueChange"]
|
|
1068
|
-
}; }
|
|
1069
|
-
static get style() { return NvCalendarStyle0; }
|
|
1070
|
-
}, [4, "nv-calendar", {
|
|
1071
|
-
"firstDayOfWeek": [514, "first-day-of-week"],
|
|
1072
|
-
"numberOfCalendars": [1538, "number-of-calendars"],
|
|
1073
|
-
"singleValue": [1537, "single-value"],
|
|
1074
|
-
"rangeValue": [1537, "range-value"],
|
|
1075
|
-
"min": [513],
|
|
1076
|
-
"max": [513],
|
|
1077
|
-
"disabledDates": [513, "disabled-dates"],
|
|
1078
|
-
"locale": [513],
|
|
1079
|
-
"dateFormat": [513, "date-format"],
|
|
1080
|
-
"shortcutsPlacement": [513, "shortcuts-placement"],
|
|
1081
|
-
"selectionType": [513, "selection-type"],
|
|
1082
|
-
"showActions": [516, "show-actions"],
|
|
1083
|
-
"shortcuts": [513],
|
|
1084
|
-
"showWeekNumbers": [516, "show-week-numbers"],
|
|
1085
|
-
"currentDate": [32],
|
|
1086
|
-
"selectedDate": [32],
|
|
1087
|
-
"startDate": [32],
|
|
1088
|
-
"endDate": [32],
|
|
1089
|
-
"months": [32]
|
|
1090
|
-
}, undefined, {
|
|
1091
|
-
"numberOfCalendars": ["validateNumberOfCalendars"],
|
|
1092
|
-
"rangeValue": ["onRangeValueChange"],
|
|
1093
|
-
"disabledDates": ["handleDisabledDatesChange"],
|
|
1094
|
-
"singleValue": ["onSingleValueChange"]
|
|
1095
|
-
}]);
|
|
1096
|
-
function defineCustomElement() {
|
|
1097
|
-
if (typeof customElements === "undefined") {
|
|
1098
|
-
return;
|
|
1099
|
-
}
|
|
1100
|
-
const components = ["nv-calendar", "nv-button", "nv-icon", "nv-iconbutton", "nv-loader"];
|
|
1101
|
-
components.forEach(tagName => { switch (tagName) {
|
|
1102
|
-
case "nv-calendar":
|
|
1103
|
-
if (!customElements.get(tagName)) {
|
|
1104
|
-
customElements.define(tagName, NvCalendar);
|
|
1105
|
-
}
|
|
1106
|
-
break;
|
|
1107
|
-
case "nv-button":
|
|
1108
|
-
if (!customElements.get(tagName)) {
|
|
1109
|
-
defineCustomElement$4();
|
|
1110
|
-
}
|
|
1111
|
-
break;
|
|
1112
|
-
case "nv-icon":
|
|
1113
|
-
if (!customElements.get(tagName)) {
|
|
1114
|
-
defineCustomElement$3();
|
|
1115
|
-
}
|
|
1116
|
-
break;
|
|
1117
|
-
case "nv-iconbutton":
|
|
1118
|
-
if (!customElements.get(tagName)) {
|
|
1119
|
-
defineCustomElement$2();
|
|
1120
|
-
}
|
|
1121
|
-
break;
|
|
1122
|
-
case "nv-loader":
|
|
1123
|
-
if (!customElements.get(tagName)) {
|
|
1124
|
-
defineCustomElement$1();
|
|
1125
|
-
}
|
|
1126
|
-
break;
|
|
1127
|
-
} });
|
|
1128
|
-
}
|
|
1129
|
-
defineCustomElement();
|
|
1130
|
-
|
|
1131
|
-
export { NvCalendar as N, commonjsGlobal as c, defineCustomElement as d, getDefaultExportFromCjs as g };
|
|
1132
|
-
|
|
1133
|
-
//# sourceMappingURL=p-f331117c.js.map
|