@quidgest/ui 0.16.74 → 0.17.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/json/api.json +38 -48
- package/dist/ui.css +234 -1361
- package/dist/ui.esm.js +5373 -12098
- package/dist/ui.js +28 -28
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +917 -1390
- package/dist/ui.scss +220 -42
- package/esm/components/QAccordion/QAccordion.d.ts +1 -1
- package/esm/components/QAccordion/QAccordion.d.ts.map +1 -1
- package/esm/components/QAccordion/QAccordionItem.d.ts +1 -1
- package/esm/components/QAccordion/QAccordionItem.d.ts.map +1 -1
- package/esm/components/QAvatar/QAvatar.d.ts +1 -1
- package/esm/components/QAvatar/QAvatar.d.ts.map +1 -1
- package/esm/components/QAvatar/QAvatar.vue.js +15 -15
- package/esm/components/QBadge/QBadge.d.ts +2 -2
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/index.d.ts +3 -3
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts +1 -1
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts.map +1 -1
- package/esm/components/QButton/QButton.d.ts +2 -2
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/index.d.ts +3 -3
- package/esm/components/QButtonGroup/QButtonGroup.d.ts +1 -1
- package/esm/components/QButtonGroup/QButtonGroup.d.ts.map +1 -1
- package/esm/components/QCard/QCard.d.ts +1 -1
- package/esm/components/QCard/QCard.d.ts.map +1 -1
- package/esm/components/QCarousel/QCarousel.d.ts +1 -1
- package/esm/components/QCarousel/QCarousel.d.ts.map +1 -1
- package/esm/components/QCarousel/QCarousel.vue.js +127 -127
- package/esm/components/QCheckbox/QCheckbox.d.ts +1 -1
- package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.vue.js +29 -27
- package/esm/components/QCheckbox/index.d.ts +3 -0
- package/esm/components/QCheckbox/index.d.ts.map +1 -1
- package/esm/components/QCheckbox/types.d.ts +6 -0
- package/esm/components/QCheckbox/types.d.ts.map +1 -1
- package/esm/components/QCollapsible/QCollapsible.d.ts +1 -1
- package/esm/components/QCollapsible/QCollapsible.d.ts.map +1 -1
- package/esm/components/QCollapsible/QCollapsible.vue.js +42 -42
- package/esm/components/QColorPicker/QColorPicker.d.ts +1 -1
- package/esm/components/QColorPicker/QColorPicker.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +91 -117
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +34 -34
- package/esm/components/QCombobox/index.d.ts +105 -138
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts +398 -7
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +1298 -154
- package/esm/components/QDateTimePicker/constants.d.ts +58 -0
- package/esm/components/QDateTimePicker/constants.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/constants.js +84 -7
- package/esm/components/QDateTimePicker/index.d.ts +210 -24
- package/esm/components/QDateTimePicker/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/types.d.ts +33 -23
- package/esm/components/QDateTimePicker/types.d.ts.map +1 -1
- package/esm/components/QDefaultsProvider/QDefaultsProvider.d.ts +1 -1
- package/esm/components/QDefaultsProvider/QDefaultsProvider.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.d.ts +1 -1
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialogProvider.d.ts +1 -1
- package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
- package/esm/components/QDialog/QDialogProvider.vue.js +2 -3
- package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts +1 -1
- package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -1
- package/esm/components/QDivider/QDivider.d.ts +1 -1
- package/esm/components/QDivider/QDivider.d.ts.map +1 -1
- package/esm/components/QDivider/QDivider.vue.js +2 -2
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +2 -2
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +38 -44
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +11 -11
- package/esm/components/QDropdownMenu/index.d.ts +3 -3
- package/esm/components/QField/QField.d.ts +1 -1
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QFileUpload/QFileUpload.d.ts +1 -1
- package/esm/components/QFileUpload/QFileUpload.d.ts.map +1 -1
- package/esm/components/QFocusWrap/QFocusWrap.d.ts +1 -1
- package/esm/components/QFocusWrap/QFocusWrap.d.ts.map +1 -1
- package/esm/components/QGrid/QCol.d.ts +1 -1
- package/esm/components/QGrid/QCol.d.ts.map +1 -1
- package/esm/components/QGrid/QContainer.d.ts +1 -1
- package/esm/components/QGrid/QContainer.d.ts.map +1 -1
- package/esm/components/QGrid/QRow.d.ts +1 -1
- package/esm/components/QGrid/QRow.d.ts.map +1 -1
- package/esm/components/QGroupBox/QGroupBox.d.ts +1 -1
- package/esm/components/QGroupBox/QGroupBox.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.d.ts +1 -1
- package/esm/components/QIcon/QIcon.d.ts.map +1 -1
- package/esm/components/QIcon/QIconFont.d.ts +1 -1
- package/esm/components/QIcon/QIconFont.d.ts.map +1 -1
- package/esm/components/QIcon/QIconImg.d.ts +1 -1
- package/esm/components/QIcon/QIconImg.d.ts.map +1 -1
- package/esm/components/QIcon/QIconSvg.d.ts +1 -1
- package/esm/components/QIcon/QIconSvg.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.d.ts +1 -1
- package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/esm/components/QLabel/QLabel.d.ts +1 -1
- package/esm/components/QLabel/QLabel.d.ts.map +1 -1
- package/esm/components/QLineLoader/QLineLoader.d.ts +1 -1
- package/esm/components/QLineLoader/QLineLoader.d.ts.map +1 -1
- package/esm/components/QList/QList.d.ts +18 -20
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +17 -16
- package/esm/components/QList/QListItem.d.ts +2 -2
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +50 -49
- package/esm/components/QList/QListItemGroup.d.ts.map +1 -1
- package/esm/components/QList/index.d.ts +18 -19
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QList/types.d.ts +6 -0
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QMeter/QMeter.d.ts +1 -1
- package/esm/components/QMeter/QMeter.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.d.ts +8 -8
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +67 -70
- package/esm/components/QOverlay/index.d.ts +6 -6
- package/esm/components/QPasswordField/QPasswordField.d.ts +25 -33
- package/esm/components/QPasswordField/QPasswordField.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordFieldMessages.d.ts +1 -1
- package/esm/components/QPasswordField/QPasswordFieldMessages.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.d.ts +1 -1
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +13 -13
- package/esm/components/QPasswordField/index.d.ts +12 -16
- package/esm/components/QPasswordField/index.d.ts.map +1 -1
- package/esm/components/QPopover/QPopover.d.ts +1 -1
- package/esm/components/QPopover/QPopover.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyList.d.ts +1 -1
- package/esm/components/QPropertyList/QPropertyList.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyList.vue.js +3 -3
- package/esm/components/QPropertyList/QPropertyListGroup.d.ts +1 -1
- package/esm/components/QPropertyList/QPropertyListGroup.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListGroup.vue.js +8 -8
- package/esm/components/QPropertyList/QPropertyListPanel.d.ts +1 -1
- package/esm/components/QPropertyList/QPropertyListPanel.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListRow.d.ts +2 -2
- package/esm/components/QPropertyList/QPropertyListRow.d.ts.map +1 -1
- package/esm/components/QPropertyList/index.d.ts +1 -1
- package/esm/components/QPropertyList/index.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioButton.d.ts +1 -1
- package/esm/components/QRadioGroup/QRadioButton.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioButton.vue.js +26 -26
- package/esm/components/QRadioGroup/QRadioGroup.d.ts +1 -1
- package/esm/components/QRadioGroup/QRadioGroup.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar.d.ts +1 -1
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.d.ts +197 -65
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +411 -311
- package/esm/components/QSelect/index.d.ts +98 -32
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +12 -12
- package/esm/components/QSidebar/QSidebarAnchor.d.ts +5 -9
- package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarAnchor.vue.js +8 -8
- package/esm/components/QSidebar/QSidebarPanel.d.ts +1 -1
- package/esm/components/QSidebar/QSidebarPanel.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarPanel.vue.js +23 -23
- package/esm/components/QSkeletonLoader/QSkeletonLoader.d.ts +1 -1
- package/esm/components/QSkeletonLoader/QSkeletonLoader.d.ts.map +1 -1
- package/esm/components/QSkeletonLoader/QSkeletonLoader.vue.js +3 -3
- package/esm/components/QSpinnerLoader/QSpinnerLoader.d.ts +1 -1
- package/esm/components/QSpinnerLoader/QSpinnerLoader.d.ts.map +1 -1
- package/esm/components/QSwitch/QSwitch.d.ts +1 -1
- package/esm/components/QSwitch/QSwitch.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.d.ts +1 -1
- package/esm/components/QTextArea/QTextArea.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.d.ts +14 -18
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +31 -33
- package/esm/components/QTextField/index.d.ts +9 -11
- package/esm/components/QTextField/index.d.ts.map +1 -1
- package/esm/components/QThemeProvider/QThemeProvider.d.ts +1 -1
- package/esm/components/QThemeProvider/QThemeProvider.d.ts.map +1 -1
- package/esm/components/QToast/QToast.d.ts +2 -2
- package/esm/components/QToast/QToast.d.ts.map +1 -1
- package/esm/components/QToast/QToaster.d.ts +1 -1
- package/esm/components/QToast/QToaster.d.ts.map +1 -1
- package/esm/components/QToast/index.d.ts +3 -3
- package/esm/components/QToggle/QToggle.d.ts +1 -1
- package/esm/components/QToggle/QToggle.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroup.d.ts +1 -1
- package/esm/components/QToggleGroup/QToggleGroup.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroupItem.d.ts +1 -1
- package/esm/components/QToggleGroup/QToggleGroupItem.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.d.ts +1 -1
- package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
- package/esm/components/__internal__/QChevron/QChevron.d.ts +1 -1
- package/esm/components/__internal__/QChevron/QChevron.d.ts.map +1 -1
- package/esm/components/__internal__/QClearButton/QClearButton.d.ts +1 -1
- package/esm/components/__internal__/QClearButton/QClearButton.d.ts.map +1 -1
- package/esm/composables/useInputMask/index.d.ts +50 -0
- package/esm/composables/useInputMask/index.d.ts.map +1 -0
- package/esm/composables/useInputMask/index.js +420 -0
- package/esm/utils/date.d.ts +190 -0
- package/esm/utils/date.d.ts.map +1 -0
- package/esm/utils/date.js +479 -0
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.d.ts.map +1 -1
- package/esm/utils/index.js +41 -18
- package/package.json +2 -4
- package/esm/composables/maska.d.ts +0 -28
- package/esm/composables/maska.d.ts.map +0 -1
- package/esm/composables/maska.js +0 -26
- package/esm/utils/date/date.d.ts +0 -9
- package/esm/utils/date/date.d.ts.map +0 -1
- package/esm/utils/date/date.js +0 -91
- package/esm/utils/date/index.d.ts +0 -4
- package/esm/utils/date/index.d.ts.map +0 -1
- package/esm/utils/date/tokens.d.ts +0 -49
- package/esm/utils/date/tokens.d.ts.map +0 -1
- package/esm/utils/date/tokens.js +0 -243
- package/esm/utils/time.js +0 -14
- package/esm/vendors/@vuepic/vue-datepicker/dist/vue-datepicker.js +0 -5150
- package/esm/vendors/date-fns/_lib/addLeadingZeros.js +0 -7
- package/esm/vendors/date-fns/_lib/defaultOptions.js +0 -7
- package/esm/vendors/date-fns/_lib/format/formatters.js +0 -583
- package/esm/vendors/date-fns/_lib/format/lightFormatters.js +0 -59
- package/esm/vendors/date-fns/_lib/format/longFormatters.js +0 -52
- package/esm/vendors/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -18
- package/esm/vendors/date-fns/_lib/normalizeDates.js +0 -11
- package/esm/vendors/date-fns/_lib/normalizeInterval.js +0 -8
- package/esm/vendors/date-fns/_lib/protectedTokens.js +0 -20
- package/esm/vendors/date-fns/add.js +0 -20
- package/esm/vendors/date-fns/addDays.js +0 -10
- package/esm/vendors/date-fns/addHours.js +0 -9
- package/esm/vendors/date-fns/addMilliseconds.js +0 -9
- package/esm/vendors/date-fns/addMonths.js +0 -20
- package/esm/vendors/date-fns/addQuarters.js +0 -8
- package/esm/vendors/date-fns/addYears.js +0 -8
- package/esm/vendors/date-fns/compareAsc.js +0 -9
- package/esm/vendors/date-fns/constants.js +0 -9
- package/esm/vendors/date-fns/constructFrom.js +0 -8
- package/esm/vendors/date-fns/differenceInCalendarDays.js +0 -16
- package/esm/vendors/date-fns/differenceInCalendarYears.js +0 -13
- package/esm/vendors/date-fns/differenceInYears.js +0 -17
- package/esm/vendors/date-fns/eachDayOfInterval.js +0 -17
- package/esm/vendors/date-fns/eachQuarterOfInterval.js +0 -18
- package/esm/vendors/date-fns/endOfQuarter.js +0 -9
- package/esm/vendors/date-fns/endOfWeek.js +0 -11
- package/esm/vendors/date-fns/endOfYear.js +0 -9
- package/esm/vendors/date-fns/format.js +0 -59
- package/esm/vendors/date-fns/getDay.js +0 -8
- package/esm/vendors/date-fns/getDayOfYear.js +0 -11
- package/esm/vendors/date-fns/getDaysInMonth.js +0 -10
- package/esm/vendors/date-fns/getDefaultOptions.js +0 -8
- package/esm/vendors/date-fns/getHours.js +0 -8
- package/esm/vendors/date-fns/getISODay.js +0 -9
- package/esm/vendors/date-fns/getISOWeek.js +0 -12
- package/esm/vendors/date-fns/getISOWeekYear.js +0 -15
- package/esm/vendors/date-fns/getMinutes.js +0 -8
- package/esm/vendors/date-fns/getMonth.js +0 -8
- package/esm/vendors/date-fns/getQuarter.js +0 -9
- package/esm/vendors/date-fns/getSeconds.js +0 -8
- package/esm/vendors/date-fns/getWeek.js +0 -12
- package/esm/vendors/date-fns/getWeekYear.js +0 -17
- package/esm/vendors/date-fns/getYear.js +0 -8
- package/esm/vendors/date-fns/isAfter.js +0 -8
- package/esm/vendors/date-fns/isBefore.js +0 -8
- package/esm/vendors/date-fns/isDate.js +0 -7
- package/esm/vendors/date-fns/isEqual.js +0 -8
- package/esm/vendors/date-fns/isSameQuarter.js +0 -14
- package/esm/vendors/date-fns/isValid.js +0 -9
- package/esm/vendors/date-fns/locale/_lib/buildFormatLongFn.js +0 -9
- package/esm/vendors/date-fns/locale/_lib/buildLocalizeFn.js +0 -18
- package/esm/vendors/date-fns/locale/_lib/buildMatchFn.js +0 -31
- package/esm/vendors/date-fns/locale/_lib/buildMatchPatternFn.js +0 -15
- package/esm/vendors/date-fns/locale/en-US/_lib/formatDistance.js +0 -70
- package/esm/vendors/date-fns/locale/en-US/_lib/formatLong.js +0 -33
- package/esm/vendors/date-fns/locale/en-US/_lib/formatRelative.js +0 -11
- package/esm/vendors/date-fns/locale/en-US/_lib/localize.js +0 -155
- package/esm/vendors/date-fns/locale/en-US/_lib/match.js +0 -110
- package/esm/vendors/date-fns/locale/en-US.js +0 -21
- package/esm/vendors/date-fns/parse/_lib/Parser.js +0 -22
- package/esm/vendors/date-fns/parse/_lib/Setter.js +0 -41
- package/esm/vendors/date-fns/parse/_lib/constants.js +0 -49
- package/esm/vendors/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -49
- package/esm/vendors/date-fns/parse/_lib/parsers/AMPMParser.js +0 -49
- package/esm/vendors/date-fns/parse/_lib/parsers/DateParser.js +0 -61
- package/esm/vendors/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -51
- package/esm/vendors/date-fns/parse/_lib/parsers/DayParser.js +0 -49
- package/esm/vendors/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -49
- package/esm/vendors/date-fns/parse/_lib/parsers/EraParser.js +0 -33
- package/esm/vendors/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -21
- package/esm/vendors/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -22
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -32
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -32
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -33
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -33
- package/esm/vendors/date-fns/parse/_lib/parsers/ISODayParser.js +0 -105
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -48
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -48
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -49
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -40
- package/esm/vendors/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -80
- package/esm/vendors/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -48
- package/esm/vendors/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -69
- package/esm/vendors/date-fns/parse/_lib/parsers/MinuteParser.js +0 -32
- package/esm/vendors/date-fns/parse/_lib/parsers/MonthParser.js +0 -77
- package/esm/vendors/date-fns/parse/_lib/parsers/QuarterParser.js +0 -75
- package/esm/vendors/date-fns/parse/_lib/parsers/SecondParser.js +0 -32
- package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -80
- package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -77
- package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -75
- package/esm/vendors/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -22
- package/esm/vendors/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -22
- package/esm/vendors/date-fns/parse/_lib/parsers/YearParser.js +0 -49
- package/esm/vendors/date-fns/parse/_lib/parsers.js +0 -67
- package/esm/vendors/date-fns/parse/_lib/utils.js +0 -103
- package/esm/vendors/date-fns/parse.js +0 -89
- package/esm/vendors/date-fns/set.js +0 -11
- package/esm/vendors/date-fns/setDay.js +0 -12
- package/esm/vendors/date-fns/setHours.js +0 -9
- package/esm/vendors/date-fns/setISODay.js +0 -11
- package/esm/vendors/date-fns/setISOWeek.js +0 -10
- package/esm/vendors/date-fns/setMilliseconds.js +0 -9
- package/esm/vendors/date-fns/setMinutes.js +0 -9
- package/esm/vendors/date-fns/setMonth.js +0 -13
- package/esm/vendors/date-fns/setSeconds.js +0 -9
- package/esm/vendors/date-fns/setWeek.js +0 -10
- package/esm/vendors/date-fns/setYear.js +0 -10
- package/esm/vendors/date-fns/startOfDay.js +0 -9
- package/esm/vendors/date-fns/startOfISOWeek.js +0 -8
- package/esm/vendors/date-fns/startOfISOWeekYear.js +0 -11
- package/esm/vendors/date-fns/startOfMonth.js +0 -9
- package/esm/vendors/date-fns/startOfQuarter.js +0 -9
- package/esm/vendors/date-fns/startOfWeek.js +0 -11
- package/esm/vendors/date-fns/startOfWeekYear.js +0 -13
- package/esm/vendors/date-fns/startOfYear.js +0 -9
- package/esm/vendors/date-fns/sub.js +0 -19
- package/esm/vendors/date-fns/subDays.js +0 -8
- package/esm/vendors/date-fns/subMonths.js +0 -8
- package/esm/vendors/date-fns/subYears.js +0 -8
- package/esm/vendors/date-fns/toDate.js +0 -8
- package/esm/vendors/date-fns/transpose.js +0 -18
- package/esm/vendors/maska/dist/maska.js +0 -179
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import { watch as W } from "vue";
|
|
2
|
+
function $(e) {
|
|
3
|
+
return typeof e == "function" ? e() : e;
|
|
4
|
+
}
|
|
5
|
+
function Z(e, i) {
|
|
6
|
+
W(
|
|
7
|
+
e,
|
|
8
|
+
(t, n, r) => {
|
|
9
|
+
const s = H(t);
|
|
10
|
+
if (!s) return;
|
|
11
|
+
const f = (u) => {
|
|
12
|
+
const l = u.target;
|
|
13
|
+
if (l.readOnly || l.disabled) return;
|
|
14
|
+
const h = $(i), a = l.value, c = l.selectionStart ?? a.length, d = y(a, h);
|
|
15
|
+
if (a !== d) {
|
|
16
|
+
const m = R(a, d, c);
|
|
17
|
+
l.value = d, l.setSelectionRange(m, m), l.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
18
|
+
}
|
|
19
|
+
}, o = (u) => {
|
|
20
|
+
const l = u.target;
|
|
21
|
+
if (l.readOnly || l.disabled) return;
|
|
22
|
+
const h = $(i), a = v(h);
|
|
23
|
+
if (u.ctrlKey || u.metaKey || u.altKey || ["ArrowLeft", "ArrowRight", "Delete", "Tab", "Enter"].includes(u.key))
|
|
24
|
+
return;
|
|
25
|
+
if (u.key === "Backspace") {
|
|
26
|
+
B(u, l, a, h);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (u.key.length !== 1) return;
|
|
30
|
+
const c = l.selectionStart ?? 0, d = l.selectionEnd ?? 0;
|
|
31
|
+
if (h.includes("W")) return;
|
|
32
|
+
if (c === d && c < l.value.length) {
|
|
33
|
+
const p = T(
|
|
34
|
+
l.value,
|
|
35
|
+
c,
|
|
36
|
+
u.key,
|
|
37
|
+
a,
|
|
38
|
+
h
|
|
39
|
+
);
|
|
40
|
+
if (p) {
|
|
41
|
+
u.preventDefault(), l.value = p.value, l.setSelectionRange(p.cursor, p.cursor), l.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const m = z(a, c);
|
|
46
|
+
if (m === void 0) {
|
|
47
|
+
if (S(
|
|
48
|
+
u.key,
|
|
49
|
+
h,
|
|
50
|
+
c,
|
|
51
|
+
l.value,
|
|
52
|
+
c
|
|
53
|
+
))
|
|
54
|
+
return;
|
|
55
|
+
u.preventDefault();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (m === "p") {
|
|
59
|
+
const p = D(l.value, h, c), g = u.key.toUpperCase();
|
|
60
|
+
if (p === "AM" || p === "PM") {
|
|
61
|
+
u.preventDefault();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (!p && (g === "A" || g === "P")) {
|
|
65
|
+
u.preventDefault();
|
|
66
|
+
const M = C(l.value, h), N = M >= 0 ? l.value.slice(0, M) : l.value, E = y(`${N}${g}M`, h);
|
|
67
|
+
l.value = E, l.setSelectionRange(E.length, E.length), l.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
b(u.key, p) || u.preventDefault();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
!I(u.key, m) && !S(u.key, h, c, l.value, c) && u.preventDefault();
|
|
74
|
+
};
|
|
75
|
+
s.addEventListener("input", f), s.addEventListener("keydown", o), r(() => {
|
|
76
|
+
s.removeEventListener("input", f), s.removeEventListener("keydown", o);
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
{ flush: "post" }
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
function H(e) {
|
|
83
|
+
return e instanceof HTMLInputElement ? e : typeof e == "object" && e !== null && "value" in e && e.value instanceof HTMLInputElement ? e.value : null;
|
|
84
|
+
}
|
|
85
|
+
function y(e, i) {
|
|
86
|
+
let t = "", n = 0, r = 0;
|
|
87
|
+
for (; r < i.length && n < e.length; ) {
|
|
88
|
+
const s = i[r], f = e[n];
|
|
89
|
+
if (s === "!") {
|
|
90
|
+
const o = i[r + 1];
|
|
91
|
+
if (!o) break;
|
|
92
|
+
f === o ? (t += o, n++) : t += o, r += 2;
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
if (s === "#" || s === "n")
|
|
96
|
+
if (/\d/.test(f))
|
|
97
|
+
t += f, n++;
|
|
98
|
+
else {
|
|
99
|
+
n++;
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
else if (s === "A" || s === "a")
|
|
103
|
+
if (x(f))
|
|
104
|
+
t += s === "A" ? f.toUpperCase() : f.toLowerCase(), n++;
|
|
105
|
+
else {
|
|
106
|
+
n++;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
else if (s === "p") {
|
|
110
|
+
const o = A(e, n);
|
|
111
|
+
if (o.consumed === 0) break;
|
|
112
|
+
n += o.consumed, o.text && (t += o.text), r++;
|
|
113
|
+
continue;
|
|
114
|
+
} else if (s === "W") {
|
|
115
|
+
const o = i[r + 1];
|
|
116
|
+
let u = !1;
|
|
117
|
+
for (; n < e.length; ) {
|
|
118
|
+
const l = e[n];
|
|
119
|
+
if (o && l === o && u) break;
|
|
120
|
+
if (x(l)) {
|
|
121
|
+
t += l, n++, u = !0;
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
if (o && l === o) break;
|
|
125
|
+
n++;
|
|
126
|
+
}
|
|
127
|
+
} else if (f === s)
|
|
128
|
+
t += s, n++;
|
|
129
|
+
else if (/\d/.test(f))
|
|
130
|
+
t += s;
|
|
131
|
+
else if (S(f, i, r + 1, e, n)) {
|
|
132
|
+
t += s, r++;
|
|
133
|
+
continue;
|
|
134
|
+
} else
|
|
135
|
+
n++;
|
|
136
|
+
r++;
|
|
137
|
+
}
|
|
138
|
+
return t;
|
|
139
|
+
}
|
|
140
|
+
function R(e, i, t) {
|
|
141
|
+
const n = (e.slice(0, t).match(/[\da-z]/gi) ?? []).length;
|
|
142
|
+
if (n === 0) return 0;
|
|
143
|
+
let r = 0;
|
|
144
|
+
for (let s = 0; s < i.length; s++)
|
|
145
|
+
if (/[\da-z]/i.test(i[s] ?? "") && (r++, r === n))
|
|
146
|
+
return s + 1;
|
|
147
|
+
return i.length;
|
|
148
|
+
}
|
|
149
|
+
function O(e, i) {
|
|
150
|
+
var s, f, o;
|
|
151
|
+
const t = i.match(
|
|
152
|
+
/yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|SSS|S|a|'(?:''|[^'])*'|./g
|
|
153
|
+
) ?? [];
|
|
154
|
+
let n = e, r = 0;
|
|
155
|
+
for (const u of t) {
|
|
156
|
+
if (u.startsWith("'")) {
|
|
157
|
+
const g = u.slice(1, -1).replace(/''/g, "'");
|
|
158
|
+
r += g.length;
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
const l = u === "yyyy" ? 4 : u === "yy" ? 2 : u === "SSS" ? 3 : u === "S" ? 1 : [
|
|
162
|
+
"MM",
|
|
163
|
+
"dd",
|
|
164
|
+
"HH",
|
|
165
|
+
"hh",
|
|
166
|
+
"mm",
|
|
167
|
+
"ss",
|
|
168
|
+
"M",
|
|
169
|
+
"d",
|
|
170
|
+
"H",
|
|
171
|
+
"h",
|
|
172
|
+
"m",
|
|
173
|
+
"s"
|
|
174
|
+
].includes(u) ? 2 : 0;
|
|
175
|
+
if (l === 0) {
|
|
176
|
+
if (u === "a") {
|
|
177
|
+
const g = n.slice(r), M = g.match(/^\s*(AM|PM)/i);
|
|
178
|
+
r += ((s = M == null ? void 0 : M[0]) == null ? void 0 : s.length) ?? (g.startsWith(" ") ? 1 : u.length);
|
|
179
|
+
} else
|
|
180
|
+
r += u.length;
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
const a = ((o = (f = n.slice(r).match(/^\d+/)) == null ? void 0 : f[0]) == null ? void 0 : o.slice(0, l)) ?? "";
|
|
184
|
+
if (!a) continue;
|
|
185
|
+
const c = r + a.length;
|
|
186
|
+
if (!(a.length === l || c < n.length && !/\d/.test(n[c]))) continue;
|
|
187
|
+
const m = Number.parseInt(a, 10);
|
|
188
|
+
if (Number.isNaN(m)) continue;
|
|
189
|
+
const p = V(u, a, m);
|
|
190
|
+
n = `${n.slice(0, r)}${p}${n.slice(c)}`, r += p.length;
|
|
191
|
+
}
|
|
192
|
+
return U(n, t);
|
|
193
|
+
}
|
|
194
|
+
function L(e, i = 2) {
|
|
195
|
+
return String(e).padStart(i, "0");
|
|
196
|
+
}
|
|
197
|
+
function V(e, i, t) {
|
|
198
|
+
let n = t;
|
|
199
|
+
return (e === "MM" || e === "M") && (n = Math.min(12, Math.max(1, t))), (e === "dd" || e === "d") && (n = Math.min(31, Math.max(1, t))), (e === "HH" || e === "H") && (n = Math.min(23, Math.max(0, t))), (e === "hh" || e === "h") && (n = Math.min(12, Math.max(1, t))), (e === "mm" || e === "m" || e === "ss" || e === "s") && (n = Math.min(59, Math.max(0, t))), i.length > 1 ? L(n, i.length) : n === 0 && (e === "hh" || e === "h" || e === "MM" || e === "M" || e === "dd" || e === "d") ? "1" : String(n);
|
|
200
|
+
}
|
|
201
|
+
function U(e, i) {
|
|
202
|
+
var h, a;
|
|
203
|
+
let t = null, n = null, r = -1, s = 0, f = null, o = 0;
|
|
204
|
+
for (const c of i) {
|
|
205
|
+
if (c.startsWith("'")) {
|
|
206
|
+
o += c.slice(1, -1).replace(/''/g, "'").length;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
const d = c === "yyyy" ? 4 : c === "yy" || ["MM", "dd", "M", "d"].includes(c) ? 2 : 0;
|
|
210
|
+
if (d === 0) {
|
|
211
|
+
o += c.length;
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
const m = ((a = (h = e.slice(o).match(/^\d+/)) == null ? void 0 : h[0]) == null ? void 0 : a.slice(0, d)) ?? "";
|
|
215
|
+
if (!m) continue;
|
|
216
|
+
const p = o + m.length;
|
|
217
|
+
if (!(m.length === d || p < e.length && !/\d/.test(e[p]))) continue;
|
|
218
|
+
const M = Number.parseInt(m, 10);
|
|
219
|
+
Number.isNaN(M) || ((c === "MM" || c === "M") && (t = Math.min(12, Math.max(1, M))), c === "yyyy" && (n = M), c === "yy" && (n = M < 50 ? 2e3 + M : 1900 + M), (c === "dd" || c === "d") && (r = o, s = m.length, f = Math.max(1, M)), o = p);
|
|
220
|
+
}
|
|
221
|
+
if (r < 0 || f === null) return e;
|
|
222
|
+
const u = k(t, n);
|
|
223
|
+
if (f <= u) return e;
|
|
224
|
+
const l = s > 1 ? L(u, s) : String(u);
|
|
225
|
+
return `${e.slice(0, r)}${l}${e.slice(r + s)}`;
|
|
226
|
+
}
|
|
227
|
+
function k(e, i) {
|
|
228
|
+
if (!e || [1, 3, 5, 7, 8, 10, 12].includes(e)) return 31;
|
|
229
|
+
if ([4, 6, 9, 11].includes(e)) return 30;
|
|
230
|
+
const t = i ?? (/* @__PURE__ */ new Date()).getFullYear();
|
|
231
|
+
return t % 4 === 0 && t % 100 !== 0 || t % 400 === 0 ? 29 : 28;
|
|
232
|
+
}
|
|
233
|
+
function v(e) {
|
|
234
|
+
const i = [];
|
|
235
|
+
for (let t = 0; t < e.length; t++) {
|
|
236
|
+
if (e[t] === "!") {
|
|
237
|
+
t + 1 < e.length && (i.push(e[t + 1]), t++);
|
|
238
|
+
continue;
|
|
239
|
+
}
|
|
240
|
+
i.push(e[t]);
|
|
241
|
+
}
|
|
242
|
+
return i;
|
|
243
|
+
}
|
|
244
|
+
function z(e, i) {
|
|
245
|
+
const t = w(e, i);
|
|
246
|
+
return t === void 0 ? void 0 : e[t];
|
|
247
|
+
}
|
|
248
|
+
function w(e, i) {
|
|
249
|
+
for (let t = i; t < e.length; t++) {
|
|
250
|
+
const n = e[t];
|
|
251
|
+
if (n === "#" || n === "n" || n === "A" || n === "a" || n === "W" || n === "p")
|
|
252
|
+
return t;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function T(e, i, t, n, r) {
|
|
256
|
+
const s = w(n, i);
|
|
257
|
+
if (s === void 0 || s >= e.length) return null;
|
|
258
|
+
const f = n[s];
|
|
259
|
+
if (!f) return null;
|
|
260
|
+
if (f === "p") {
|
|
261
|
+
const c = D(e, r, s);
|
|
262
|
+
if (!b(t, c)) return null;
|
|
263
|
+
} else if (!I(t, f))
|
|
264
|
+
return null;
|
|
265
|
+
const o = f === "A" ? t.toUpperCase() : f === "a" ? t.toLowerCase() : f === "p" ? t.toUpperCase() : t, u = `${e.slice(0, s)}${o}${e.slice(s + 1)}`, l = y(u, r);
|
|
266
|
+
if (l.length !== e.length) return null;
|
|
267
|
+
const a = w(n, s + 1) ?? l.length;
|
|
268
|
+
return { value: l, cursor: a };
|
|
269
|
+
}
|
|
270
|
+
function B(e, i, t, n) {
|
|
271
|
+
const r = i.selectionStart, s = i.selectionEnd;
|
|
272
|
+
if (r === null || s === null || r !== s || r <= 0) return;
|
|
273
|
+
const f = C(i.value, n);
|
|
274
|
+
if (f >= 0 && r > f) {
|
|
275
|
+
e.preventDefault();
|
|
276
|
+
const c = F(i.value, f);
|
|
277
|
+
let d = f;
|
|
278
|
+
d > 0 && i.value[d - 1] === " " && (d -= 1);
|
|
279
|
+
const m = `${i.value.slice(0, d)}${i.value.slice(c)}`, p = y(m, n);
|
|
280
|
+
i.value = p, i.setSelectionRange(d, d), i.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
if (f >= 0 && r === f && r > 0 && i.value[r - 1] === " ") {
|
|
284
|
+
e.preventDefault();
|
|
285
|
+
const c = `${i.value.slice(0, r - 1)}${i.value.slice(r)}`, d = y(c, n);
|
|
286
|
+
i.value = d, i.setSelectionRange(r - 1, r - 1), i.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
const o = t[r - 1];
|
|
290
|
+
if (o === void 0 || !(o !== "#" && o !== "n" && o !== "A" && o !== "a" && o !== "W" && o !== "p")) return;
|
|
291
|
+
let l = r - 1;
|
|
292
|
+
for (; l > 0; ) {
|
|
293
|
+
const c = t[l - 1];
|
|
294
|
+
if (c === "#" || c === "n" || c === "A" || c === "a" || c === "W") {
|
|
295
|
+
l -= 1;
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
l -= 1;
|
|
299
|
+
}
|
|
300
|
+
e.preventDefault();
|
|
301
|
+
const h = `${i.value.slice(0, l)}${i.value.slice(r)}`, a = y(h, n);
|
|
302
|
+
i.value = a, i.setSelectionRange(l, l), i.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
303
|
+
}
|
|
304
|
+
function A(e, i) {
|
|
305
|
+
let t = i;
|
|
306
|
+
for (; t < e.length && e[t] === " "; ) t += 1;
|
|
307
|
+
let n = "", r = t;
|
|
308
|
+
for (; r < e.length && /[A-Za-z]/.test(e[r] ?? ""); ) {
|
|
309
|
+
const s = (e[r] ?? "").toUpperCase();
|
|
310
|
+
if (n.length === 0) {
|
|
311
|
+
if (s === "A" || s === "P") {
|
|
312
|
+
n = `${s}M`, r += 1, r < e.length && (e[r] ?? "").toUpperCase() === "M" && (r += 1);
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
} else if (n.length === 1 && s === "M") {
|
|
316
|
+
n += "M", r += 1;
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
r += 1;
|
|
320
|
+
}
|
|
321
|
+
for (; r < e.length && /[A-Za-z]/.test(e[r] ?? ""); ) r += 1;
|
|
322
|
+
return { consumed: r - i, text: n };
|
|
323
|
+
}
|
|
324
|
+
function F(e, i) {
|
|
325
|
+
return i + A(e, i).consumed;
|
|
326
|
+
}
|
|
327
|
+
function C(e, i) {
|
|
328
|
+
let t = 0, n = 0;
|
|
329
|
+
for (; n < i.length; ) {
|
|
330
|
+
const r = i[n];
|
|
331
|
+
if (r === "p") return t;
|
|
332
|
+
if (r === "!") {
|
|
333
|
+
const s = i[n + 1];
|
|
334
|
+
s && e[t] === s && (t += 1), n += 2;
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
if (r === "#" || r === "n") {
|
|
338
|
+
if (/\d/.test(e[t] ?? "")) {
|
|
339
|
+
t += 1, n += 1;
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
return -1;
|
|
343
|
+
}
|
|
344
|
+
if (r === "A" || r === "a") {
|
|
345
|
+
if (x(e[t] ?? "")) {
|
|
346
|
+
t += 1, n += 1;
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
return -1;
|
|
350
|
+
}
|
|
351
|
+
if (r === "W") {
|
|
352
|
+
const s = i[n + 1];
|
|
353
|
+
if (x(e[t] ?? "") && e[t] !== s) {
|
|
354
|
+
t += 1;
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
357
|
+
n += 1;
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
if (e[t] === r) {
|
|
361
|
+
t += 1, n += 1;
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
if (r === " " && i[n + 1] === "p") {
|
|
365
|
+
const s = e[t];
|
|
366
|
+
if ((s === void 0 || s === " " || /[A-Za-z]/.test(s)) && (n += 1, i[n] === "p"))
|
|
367
|
+
return t;
|
|
368
|
+
}
|
|
369
|
+
return -1;
|
|
370
|
+
}
|
|
371
|
+
return -1;
|
|
372
|
+
}
|
|
373
|
+
function D(e, i, t) {
|
|
374
|
+
const n = C(e, i);
|
|
375
|
+
return n < 0 || t <= n ? "" : A(e.slice(0, t), n).text;
|
|
376
|
+
}
|
|
377
|
+
function b(e, i) {
|
|
378
|
+
const t = i.toUpperCase();
|
|
379
|
+
if (t === "AM" || t === "PM") return !1;
|
|
380
|
+
const n = e.toUpperCase();
|
|
381
|
+
return i ? t.length === 1 && (t === "A" || t === "P") ? n === "M" : !1 : n === "A" || n === "P";
|
|
382
|
+
}
|
|
383
|
+
function I(e, i) {
|
|
384
|
+
return i === "#" || i === "n" ? /\d/.test(e) : i === "p" ? b(e, "") : i === "A" || i === "a" || i === "W" ? x(e) : e === i;
|
|
385
|
+
}
|
|
386
|
+
function K(e, i) {
|
|
387
|
+
let t = i;
|
|
388
|
+
for (; t < e.length; ) {
|
|
389
|
+
const n = e[t];
|
|
390
|
+
if (n === "!") {
|
|
391
|
+
t += 2;
|
|
392
|
+
continue;
|
|
393
|
+
}
|
|
394
|
+
if (n === "#" || n === "n" || n === "A" || n === "a" || n === "W" || n === "p")
|
|
395
|
+
return t;
|
|
396
|
+
t += 1;
|
|
397
|
+
}
|
|
398
|
+
return -1;
|
|
399
|
+
}
|
|
400
|
+
function S(e, i, t, n, r) {
|
|
401
|
+
const s = K(i, t);
|
|
402
|
+
if (s < 0) return !1;
|
|
403
|
+
const f = i[s];
|
|
404
|
+
if (!f || f === "!") return !1;
|
|
405
|
+
if (f === "p") {
|
|
406
|
+
const o = n !== void 0 && r !== void 0 ? D(n, i, r) : "";
|
|
407
|
+
return b(e, o);
|
|
408
|
+
}
|
|
409
|
+
return I(e, f);
|
|
410
|
+
}
|
|
411
|
+
function x(e) {
|
|
412
|
+
return /[\p{L}\s.'-]/u.test(e);
|
|
413
|
+
}
|
|
414
|
+
export {
|
|
415
|
+
y as applyMask,
|
|
416
|
+
O as clampNumericSegments,
|
|
417
|
+
T as overwriteMaskedChar,
|
|
418
|
+
R as resolveCursorPosition,
|
|
419
|
+
Z as useInputMask
|
|
420
|
+
};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a date format pattern to an input mask pattern.
|
|
3
|
+
* Supports numeric, textual, weekday, meridiem, milliseconds and quoted literal tokens.
|
|
4
|
+
* @param format Date format pattern (e.g. `dd/MM/yyyy HH:mm`).
|
|
5
|
+
* @returns Mask string consumed by `useInputMask`.
|
|
6
|
+
* @example
|
|
7
|
+
* convertDatePatternToMask('dd/MM/yyyy') => '##/##/####'
|
|
8
|
+
* convertDatePatternToMask('HH:mm:ss') => '##:##:##'
|
|
9
|
+
*/
|
|
10
|
+
export declare function convertDatePatternToMask(format: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Checks if the format string includes time components.
|
|
13
|
+
* @param format Date/time format pattern.
|
|
14
|
+
* @returns `true` when format includes any of `H`, `h`, `m`, `s`, or `a`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatUsesTime(format: string): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Checks if the format string includes seconds components.
|
|
19
|
+
* @param format Date/time format pattern.
|
|
20
|
+
* @returns `true` when format includes seconds token (`s`/`ss`).
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatUsesSeconds(format: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Checks if the format uses 12-hour format.
|
|
25
|
+
* @param format Date/time format pattern.
|
|
26
|
+
* @returns `true` when format includes `h` or `a`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function uses12HourFormat(format: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Checks if the format is time-only.
|
|
31
|
+
* @param format Date/time format pattern.
|
|
32
|
+
* @returns `true` when no date tokens are present and time tokens are present.
|
|
33
|
+
*/
|
|
34
|
+
export declare function isTimeOnlyFormat(format: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Pads a number with leading zeros.
|
|
37
|
+
* @param num Number (or numeric string) to pad.
|
|
38
|
+
* @param length Target minimum string length.
|
|
39
|
+
* @returns Left-zero-padded string value.
|
|
40
|
+
*/
|
|
41
|
+
export declare function padNumber(num: number | string, length?: number): string;
|
|
42
|
+
/**
|
|
43
|
+
* Completes trailing partial numeric segments with zero defaults.
|
|
44
|
+
* Partial digits are right-padded; missing suffix segments use zero-filled defaults.
|
|
45
|
+
* @param dateStr Partial user input.
|
|
46
|
+
* @param format Date/time format pattern.
|
|
47
|
+
* @returns Completed string suitable for `parseDate`, or `null` when completion is not possible.
|
|
48
|
+
* @example
|
|
49
|
+
* completePartialDateInput('11/11/1987 1', 'dd/MM/yyyy HH:mm:ss') => '11/11/1987 10:00:00'
|
|
50
|
+
*/
|
|
51
|
+
export declare function completePartialDateInput(dateStr: string, format: string): string | null;
|
|
52
|
+
/**
|
|
53
|
+
* Whether user input includes digits in the time portion of the format.
|
|
54
|
+
* @param dateStr Raw user input.
|
|
55
|
+
* @param format Date/time format pattern.
|
|
56
|
+
*/
|
|
57
|
+
export declare function inputIncludesTimePortion(dateStr: string, format: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Parses a date string, completing trailing partial numeric segments when needed.
|
|
60
|
+
* @param dateStr Input string to parse.
|
|
61
|
+
* @param format Format pattern expected in `dateStr`.
|
|
62
|
+
* @param labels Optional localized text resolvers for month/weekday parsing.
|
|
63
|
+
* @returns Parsed `Date` instance or `null` when parsing fails.
|
|
64
|
+
*/
|
|
65
|
+
export declare function parseDateWithCompletion(dateStr: string, format: string, labels?: DateParserLabels): Date | null;
|
|
66
|
+
/**
|
|
67
|
+
* Checks if a year is a leap year.
|
|
68
|
+
* @param year Full year number (e.g. `2026`).
|
|
69
|
+
* @returns `true` if year is leap according to Gregorian rules.
|
|
70
|
+
*/
|
|
71
|
+
export declare function isLeapYear(year: number): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Gets the number of days in a month.
|
|
74
|
+
* @param month Zero-based month index (`0` = January).
|
|
75
|
+
* @param year Full year number.
|
|
76
|
+
* @returns Number of days in the month (28-31).
|
|
77
|
+
*/
|
|
78
|
+
export declare function getDaysInMonth(month: number, year: number): number;
|
|
79
|
+
/**
|
|
80
|
+
* Gets the first day of the week for a given date.
|
|
81
|
+
* @param date Input date.
|
|
82
|
+
* @returns Weekday index (`0` = Sunday, `6` = Saturday).
|
|
83
|
+
*/
|
|
84
|
+
export declare function getFirstDayOfWeek(date: Date): number;
|
|
85
|
+
/**
|
|
86
|
+
* Checks if two dates are the same day.
|
|
87
|
+
* @param date1 First date to compare.
|
|
88
|
+
* @param date2 Second date to compare.
|
|
89
|
+
* @returns `true` when year/month/day are equal.
|
|
90
|
+
*/
|
|
91
|
+
export declare function isSameDay(date1: Date, date2: Date): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Checks if a date is between two dates.
|
|
94
|
+
* @param date Date to evaluate.
|
|
95
|
+
* @param startDate Range start (exclusive).
|
|
96
|
+
* @param endDate Range end (exclusive).
|
|
97
|
+
* @returns `true` when `date` is strictly between start and end.
|
|
98
|
+
*/
|
|
99
|
+
export declare function isBetween(date: Date, startDate: Date, endDate: Date): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Formats a date according to a format string.
|
|
102
|
+
*/
|
|
103
|
+
export type DateFormatterLabels = {
|
|
104
|
+
/**
|
|
105
|
+
* Returns month label for zero-based month index.
|
|
106
|
+
* @param month Zero-based month index (`0` = January).
|
|
107
|
+
* @param short Whether short/abbreviated text is requested.
|
|
108
|
+
* @returns Localized month label.
|
|
109
|
+
*/
|
|
110
|
+
getMonthName?: (month: number, short: boolean) => string;
|
|
111
|
+
/**
|
|
112
|
+
* Returns weekday label for Sunday-based weekday index (0-6).
|
|
113
|
+
* @param weekday Sunday-based weekday index (`0` = Sunday).
|
|
114
|
+
* @param short Whether short/abbreviated text is requested.
|
|
115
|
+
* @returns Localized weekday label.
|
|
116
|
+
*/
|
|
117
|
+
getWeekdayName?: (weekday: number, short: boolean) => string;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Optional parsing label resolvers used by `parseDate`.
|
|
121
|
+
*/
|
|
122
|
+
export type DateParserLabels = {
|
|
123
|
+
/**
|
|
124
|
+
* Resolves month index from a textual month name.
|
|
125
|
+
* Should return zero-based month index or `null` when unknown.
|
|
126
|
+
*/
|
|
127
|
+
getMonthIndex?: (monthName: string, short: boolean) => number | null;
|
|
128
|
+
/**
|
|
129
|
+
* Resolves weekday index from a textual weekday name.
|
|
130
|
+
* Should return Sunday-based weekday index or `null` when unknown.
|
|
131
|
+
*/
|
|
132
|
+
getWeekdayIndex?: (weekdayName: string, short: boolean) => number | null;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Formats a date according to a format string.
|
|
136
|
+
* Supports numeric and textual date/time tokens and quoted literals.
|
|
137
|
+
* @param date Source date to format.
|
|
138
|
+
* @param format Date format pattern.
|
|
139
|
+
* @param labels Optional localized text resolvers for month/weekday names.
|
|
140
|
+
* @returns Formatted date string.
|
|
141
|
+
*/
|
|
142
|
+
export declare function formatDate(date: Date, format: string, labels?: DateFormatterLabels): string;
|
|
143
|
+
/**
|
|
144
|
+
* Parses a date string according to a format string.
|
|
145
|
+
* Supports quoted literals, milliseconds, meridiem, and textual month/weekday tokens.
|
|
146
|
+
* @param dateStr Input string to parse.
|
|
147
|
+
* @param format Format pattern expected in `dateStr`.
|
|
148
|
+
* @param labels Optional localized text resolvers for month/weekday parsing.
|
|
149
|
+
* @returns Parsed `Date` instance or `null` when parsing fails.
|
|
150
|
+
*/
|
|
151
|
+
export declare function parseDate(dateStr: string, format: string, labels?: DateParserLabels): Date | null;
|
|
152
|
+
/**
|
|
153
|
+
* Gets the start of a day (00:00:00).
|
|
154
|
+
* @param date Source date.
|
|
155
|
+
* @returns New date at `00:00:00.000` for the same calendar day.
|
|
156
|
+
*/
|
|
157
|
+
export declare function getStartOfDay(date: Date): Date;
|
|
158
|
+
/**
|
|
159
|
+
* Gets the end of a day (23:59:59).
|
|
160
|
+
* @param date Source date.
|
|
161
|
+
* @returns New date at `23:59:59.999` for the same calendar day.
|
|
162
|
+
*/
|
|
163
|
+
export declare function getEndOfDay(date: Date): Date;
|
|
164
|
+
/**
|
|
165
|
+
* Adds days to a date.
|
|
166
|
+
* @param date Source date.
|
|
167
|
+
* @param days Number of days to add (can be negative).
|
|
168
|
+
* @returns New date shifted by the requested amount of days.
|
|
169
|
+
*/
|
|
170
|
+
export declare function addDays(date: Date, days: number): Date;
|
|
171
|
+
/**
|
|
172
|
+
* Adds months to a date.
|
|
173
|
+
* @param date Source date.
|
|
174
|
+
* @param months Number of months to add (can be negative).
|
|
175
|
+
* @returns New date shifted by the requested amount of months.
|
|
176
|
+
*/
|
|
177
|
+
export declare function addMonths(date: Date, months: number): Date;
|
|
178
|
+
/**
|
|
179
|
+
* Gets the first day of a month.
|
|
180
|
+
* @param date Any date within the target month.
|
|
181
|
+
* @returns New date set to the first day of that month.
|
|
182
|
+
*/
|
|
183
|
+
export declare function getFirstDayOfMonth(date: Date): Date;
|
|
184
|
+
/**
|
|
185
|
+
* Gets the last day of a month.
|
|
186
|
+
* @param date Any date within the target month.
|
|
187
|
+
* @returns New date set to the last day of that month.
|
|
188
|
+
*/
|
|
189
|
+
export declare function getLastDayOfMonth(date: Date): Date;
|
|
190
|
+
//# sourceMappingURL=date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"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"}
|