@semcore/date-picker 4.54.9 → 4.54.10-prerelease.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.
Files changed (82) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/cjs/DatePicker.js +9 -9
  3. package/lib/cjs/DateRangeComparator.js +9 -9
  4. package/lib/cjs/DateRangePicker.js +9 -9
  5. package/lib/cjs/MonthDateRangeComparator.js +9 -9
  6. package/lib/cjs/MonthPicker.js +9 -9
  7. package/lib/cjs/MonthRangePicker.js +9 -9
  8. package/lib/cjs/components/Calendar.js +31 -31
  9. package/lib/cjs/components/DateRangeComparatorAbstract.js +37 -37
  10. package/lib/cjs/components/InputTrigger.js +40 -40
  11. package/lib/cjs/components/PickerAbstract.js +35 -35
  12. package/lib/cjs/components/RangePickerAbstract.js +36 -36
  13. package/lib/cjs/components/index.js +9 -9
  14. package/lib/cjs/utils/cronTabScheduler.js +1 -1
  15. package/lib/cjs/utils/datesIntersects.js +1 -1
  16. package/lib/cjs/utils/includesDate.js +1 -1
  17. package/lib/cjs/utils/shortDateRangeFormat.js +1 -1
  18. package/lib/es6/{DatePicker.mjs → DatePicker.js} +10 -10
  19. package/lib/es6/DatePicker.js.map +1 -0
  20. package/lib/es6/{DateRangeComparator.mjs → DateRangeComparator.js} +10 -10
  21. package/lib/es6/DateRangeComparator.js.map +1 -0
  22. package/lib/es6/{DateRangePicker.mjs → DateRangePicker.js} +10 -10
  23. package/lib/es6/DateRangePicker.js.map +1 -0
  24. package/lib/es6/{MonthDateRangeComparator.mjs → MonthDateRangeComparator.js} +10 -10
  25. package/lib/es6/MonthDateRangeComparator.js.map +1 -0
  26. package/lib/es6/{MonthPicker.mjs → MonthPicker.js} +10 -10
  27. package/lib/es6/MonthPicker.js.map +1 -0
  28. package/lib/es6/{MonthRangePicker.mjs → MonthRangePicker.js} +10 -10
  29. package/lib/es6/MonthRangePicker.js.map +1 -0
  30. package/lib/es6/components/{ButtonTrigger.mjs → ButtonTrigger.js} +1 -1
  31. package/lib/es6/components/ButtonTrigger.js.map +1 -0
  32. package/lib/es6/components/{Calendar.mjs → Calendar.js} +32 -32
  33. package/lib/es6/components/Calendar.js.map +1 -0
  34. package/lib/es6/components/{DateRangeComparatorAbstract.mjs → DateRangeComparatorAbstract.js} +38 -38
  35. package/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -0
  36. package/lib/es6/components/{InputTrigger.mjs → InputTrigger.js} +41 -41
  37. package/lib/es6/components/InputTrigger.js.map +1 -0
  38. package/lib/es6/components/{PickerAbstract.mjs → PickerAbstract.js} +36 -36
  39. package/lib/es6/components/PickerAbstract.js.map +1 -0
  40. package/lib/es6/components/{RangePickerAbstract.mjs → RangePickerAbstract.js} +37 -37
  41. package/lib/es6/components/RangePickerAbstract.js.map +1 -0
  42. package/lib/es6/components/{index.mjs → index.js} +10 -10
  43. package/lib/es6/components/index.js.map +1 -0
  44. package/lib/es6/index.d.js +2 -0
  45. package/lib/es6/index.d.js.map +1 -0
  46. package/lib/es6/{index.mjs → index.js} +1 -1
  47. package/lib/es6/index.js.map +1 -0
  48. package/lib/es6/translations/{__intergalactic-dynamic-locales.mjs → __intergalactic-dynamic-locales.js} +1 -1
  49. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -0
  50. package/lib/es6/utils/{cronTabScheduler.mjs → cronTabScheduler.js} +2 -2
  51. package/lib/es6/utils/cronTabScheduler.js.map +1 -0
  52. package/lib/es6/utils/{datesIntersects.mjs → datesIntersects.js} +2 -2
  53. package/lib/es6/utils/datesIntersects.js.map +1 -0
  54. package/lib/es6/utils/{formatDate.mjs → formatDate.js} +1 -1
  55. package/lib/es6/utils/formatDate.js.map +1 -0
  56. package/lib/es6/utils/{includesDate.mjs → includesDate.js} +2 -2
  57. package/lib/es6/utils/includesDate.js.map +1 -0
  58. package/lib/es6/utils/{shortDateRangeFormat.mjs → shortDateRangeFormat.js} +2 -2
  59. package/lib/es6/utils/shortDateRangeFormat.js.map +1 -0
  60. package/package.json +6 -6
  61. package/lib/es6/DatePicker.mjs.map +0 -1
  62. package/lib/es6/DateRangeComparator.mjs.map +0 -1
  63. package/lib/es6/DateRangePicker.mjs.map +0 -1
  64. package/lib/es6/MonthDateRangeComparator.mjs.map +0 -1
  65. package/lib/es6/MonthPicker.mjs.map +0 -1
  66. package/lib/es6/MonthRangePicker.mjs.map +0 -1
  67. package/lib/es6/components/ButtonTrigger.mjs.map +0 -1
  68. package/lib/es6/components/Calendar.mjs.map +0 -1
  69. package/lib/es6/components/DateRangeComparatorAbstract.mjs.map +0 -1
  70. package/lib/es6/components/InputTrigger.mjs.map +0 -1
  71. package/lib/es6/components/PickerAbstract.mjs.map +0 -1
  72. package/lib/es6/components/RangePickerAbstract.mjs.map +0 -1
  73. package/lib/es6/components/index.mjs.map +0 -1
  74. package/lib/es6/index.d.mjs +0 -2
  75. package/lib/es6/index.d.mjs.map +0 -1
  76. package/lib/es6/index.mjs.map +0 -1
  77. package/lib/es6/translations/__intergalactic-dynamic-locales.mjs.map +0 -1
  78. package/lib/es6/utils/cronTabScheduler.mjs.map +0 -1
  79. package/lib/es6/utils/datesIntersects.mjs.map +0 -1
  80. package/lib/es6/utils/formatDate.mjs.map +0 -1
  81. package/lib/es6/utils/includesDate.mjs.map +0 -1
  82. package/lib/es6/utils/shortDateRangeFormat.mjs.map +0 -1
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mjs","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ChangeEvent, ComponentProps } from 'react';\nimport dayjs from 'dayjs';\nimport { Flex, Box, BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';\nimport Button, { ButtonProps } from '@semcore/button';\nimport Divider from '@semcore/divider';\nimport { DropdownProps, DropdownTriggerProps } from '@semcore/dropdown';\nimport { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\nimport BaseTrigger, { BaseTriggerProps } from '@semcore/base-trigger';\nimport Input, { InputProps, InputValueProps } from '@semcore/input';\nimport { InputMaskValueProps } from '@semcore/input-mask';\nimport Checkbox from '@semcore/checkbox';\nimport { TooltipProps } from '@semcore/tooltip';\nimport Popper from '@semcore/popper';\n\nexport type DateConstructorParams = string | number | Date;\n\n/** @deprecated */\nexport interface ICalendarProps extends CalendarProps, UnknownProperties {}\nexport type CalendarProps = BoxProps & {\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Array of dates blocked for selection\n * Accepts the date or the range of dates for specifying infinity ([Date | false, Date | false]), crontab(6,7)\n * */\n disabled?: (DateConstructorParams | (DateConstructorParams | false)[] | string)[];\n /**\n * @ignore\n * */\n highlighted?: DateConstructorParams[];\n /**\n * @ignore\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: Date;\n\n renderOutdated?: boolean;\n};\n\n/** @deprecated */\nexport interface ICalendarDaysContext extends CalendarDaysContext, UnknownProperties {}\nexport type CalendarDaysContext = {\n days: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarMonthsContext extends CalendarMonthsContext, UnknownProperties {}\nexport type CalendarMonthsContext = {\n months: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarUnitProps extends CalendarUnitProps, UnknownProperties {}\nexport type CalendarUnitProps = BoxProps & {\n selected?: boolean;\n outdated?: boolean;\n disabled?: boolean;\n today?: boolean;\n startSelected?: boolean;\n endSelected?: boolean;\n highlighted?: boolean;\n startHighlighted?: boolean;\n endHighlighted?: boolean;\n date?: Date;\n children?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface ICalendarContext extends CalendarContext, UnknownProperties {}\nexport type CalendarContext = {\n getUnitProps: PropGetterFn;\n};\n\ndeclare const Calendar: Intergalactic.Component<\n 'div',\n CalendarProps,\n CalendarContext & CalendarDaysContext,\n [handlers: AbstractDatePickerHandlers]\n> & {\n Unit: Intergalactic.Component<'div', CalendarUnitProps>;\n};\n\n/** @deprecated */\nexport interface IDatePickerProps extends DatePickerProps, UnknownProperties {}\nexport type DatePickerProps = Intergalactic.InternalTypings.EfficientOmit<\n DropdownProps,\n 'disabled'\n> &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams;\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (DateConstructorParams | (DateConstructorParams | false)[] | string)[];\n /**\n * Error message when user attempts to input a disabled date\n * */\n disabledErrorText?: ((attemptedDate: Date) => string) | string | null;\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams;\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerProps extends DateRangePickerProps, UnknownProperties {}\nexport type DateRangePickerProps = Intergalactic.InternalTypings.EfficientOmit<\n DropdownProps,\n 'disabled'\n> &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams[];\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (DateConstructorParams | (DateConstructorParams | false)[] | string)[];\n /**\n * Error message when user attempts to input a disabled date\n * */\n disabledErrorText?: ((attemptedDate: Date) => string) | string | null;\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Remove the 'Reset' button\n * */\n unclearable?: boolean;\n /**\n * To be activated upon selecting the date\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Intermediate value between `highlighted` and `value` that user see before explicitly applying it.\n */\n preselectedValue?: DateConstructorParams[];\n /**\n * Normally called when user preselects a date range and when user applies this range.\n */\n onPreselectedValueChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerPeriodProps\n extends DateRangePickerPeriodProps,\n UnknownProperties {}\nexport type DateRangePickerPeriodProps = BoxProps & {\n /**\n * Current selected period\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated by clicking the button for switching the selected period.\n * */\n onChange?: (date: Date[]) => void;\n /**\n * To be activated by hovering a cursor over the button for changing the current displayed month.\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * To be activated by hovering a cursor over the button for selecting the dates.\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n};\n\n/** @deprecated */\nexport interface IDatePickerContext extends DatePickerContext, UnknownProperties {}\nexport type DatePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getTodayProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IAbstractDatePickerHandlers\n extends AbstractDatePickerHandlers,\n UnknownProperties {}\nexport type AbstractDatePickerHandlers = {\n displayedPeriod: (value: DateConstructorParams) => void;\n visible: (index: boolean) => void;\n highlighted: (list: DateConstructorParams[]) => void;\n value: (index: DateConstructorParams) => void;\n};\n\n/** @deprecated */\nexport interface IDatePickerHandlers extends DatePickerHandlers, UnknownProperties {}\nexport type DatePickerHandlers = {\n visible: (index: boolean) => void;\n};\n\n/** @deprecated */\nexport interface IInputTriggerProps extends InputTriggerProps, UnknownProperties {}\nexport type BaseInputTriggerProps = InputProps &\n TooltipProps & {\n /**\n * Date input placeholder characters\n * @default { year: 'Y'; month: 'M'; day: 'D' }\n */\n placeholders?: { year: string; month: string; day: string };\n locale?: string;\n onDisplayedPeriodChange?: (date: Date) => void;\n };\nexport type InputTriggerProps = BaseInputTriggerProps & {\n value?: Date;\n onChange?: (date: Date, event: ChangeEvent) => void;\n /** @deprecated Set `disabledErrorText={null}` on the picker Root instead */\n showError?: boolean;\n};\n\nexport type RangeInputTriggerProps = BaseInputTriggerProps & {\n value?: Date[];\n onChange?: (date: Date[], event: ChangeEvent) => void;\n};\n\n/** @deprecated */\nexport interface ISingleDateInputProps extends SingleDateInputProps, UnknownProperties {}\nexport type SingleDateInputProps = InputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDateRangeProps extends DateRangeProps, UnknownProperties {}\nexport type DateRangeProps = RangeInputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDatePickerMaskedInputProps\n extends DatePickerMaskedInputProps,\n UnknownProperties {}\nexport type DatePickerMaskedInputProps = {\n date?: Date;\n onDateChange?: (date: Date, event: ChangeEvent) => void;\n onDisplayedPeriodChange?: (date: Date) => void;\n locale?: string;\n parts?: { year: Boolean; month: Boolean; day: Boolean };\n disabledDates?: (Date | (Date | false)[] | string)[];\n};\n\ndeclare const InputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & InputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n SingleDateInput: Intergalactic.Component<'div', InputProps & SingleDateInputProps> & {\n Indicator: typeof Input.Addon;\n MaskedInput: Intergalactic.Component<'input', InputMaskValueProps & DatePickerMaskedInputProps>;\n };\n};\n\ndeclare const RangeInputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & RangeInputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n DateRange: Intergalactic.Component<'div', InputValueProps & DateRangeProps> & {\n Indicator: typeof Input.Addon;\n RangeSep: typeof Input.Addon;\n FromMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n ToMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n };\n};\n\ndeclare const DatePicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n DatePickerContext & CalendarDaysContext\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Popper.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, DatePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Today: typeof Box;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IDateRangePickerContext extends DateRangePickerContext, UnknownProperties {}\nexport type DateRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const DateRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n DateRangePickerContext & CalendarDaysContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof RangeInputTrigger;\n Popper: typeof Popper.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, DateRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthPickerContext extends MonthPickerContext, UnknownProperties {}\nexport type MonthPickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n};\n\ndeclare const MonthPicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n MonthPickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Popper.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, MonthPickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthRangePickerContext extends MonthRangePickerContext, UnknownProperties {}\nexport type MonthRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const MonthRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n MonthRangePickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof RangeInputTrigger;\n Popper: typeof Popper.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, MonthRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\nexport type DateRangeComparatorFocusRange = 'value' | 'compare';\nexport type DateRangeComparatorValue = {\n value?: DateConstructorParams[];\n compare?: DateConstructorParams[];\n};\n\nexport type DateRangeComparatorProps = Intergalactic.InternalTypings.EfficientOmit<\n DropdownProps,\n 'disabled'\n> &\n WithI18nEnhanceProps & {\n /**\n * Selected date ranges\n * */\n value?: DateRangeComparatorValue;\n /**\n * Default value for selected date ranges\n * */\n defaultValue?: DateRangeComparatorValue;\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n /**\n * Called with selected date when user clicks `Apply` button.\n * */\n onChange?: (ranges: {\n value?: DateConstructorParams[];\n compare?: DateConstructorParams[];\n }) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (DateConstructorParams | (DateConstructorParams | false)[] | string)[];\n /**\n * Error message when user attempts to input a disabled date\n * */\n disabledErrorText?: ((attemptedDate: Date) => string) | string | null;\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n compareHighlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onCompareHighlightedChange?: (date: Date[]) => void;\n /**\n * Intermediate value between `highlighted` and `value` that user see before explicitly applying it.\n */\n preselectedValue?: DateConstructorParams[];\n /**\n * Normally called when user preselects a date range and when user applies this range.\n */\n onPreselectedValueChange?: (date: Date[]) => void;\n /**\n * Intermediate value between `compareHighlighted` and `compare` that user see before explicitly applying it.\n */\n preselectedCompare?: DateConstructorParams[];\n /**\n * Normally called when user preselects a compare range and when user applies ranges.\n */\n onPreselectedCompareChange?: (date: Date[]) => void;\n /**\n * Controls that compare range input is enabled.\n */\n compareToggle?: boolean;\n /**\n * Toggles when compare range input enables or disables.\n */\n onCompareToggleChange?: (compareToggle: boolean) => void;\n /**\n * Controls which date range is focused.\n */\n focusedRange?: DateRangeComparatorFocusRange;\n /**\n * Called when user focuses or is focused on some of the date ranges.\n */\n onFocusedRangeChange?: (focusedRange: DateRangeComparatorFocusRange) => void;\n /**\n * Remove the 'Reset' button\n * */\n unclearable?: boolean;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n };\n\nexport type DateRangeComparatorContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\nexport type DateRangeComparatorTriggerProps = DropdownTriggerProps &\n BaseTriggerProps & {\n /**\n * Text between the selected date range and the compared date range when both are selected.\n * @default 'vs.'\n */\n separator?: string;\n /**\n * Trigger text when no ranges are selected.\n */\n placeholder?: string;\n };\n\ndeclare const DateRangeComparator: Intergalactic.Component<\n 'div',\n DateRangeComparatorProps,\n DateRangeComparatorContext & CalendarDaysContext\n> & {\n Popper: typeof Popper.Popper;\n Header: typeof Flex;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Apply: typeof Button;\n Reset: typeof Button;\n\n CalendarHeader: typeof Box;\n Title: typeof Box;\n\n Trigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n ValueDateRange: Intergalactic.Component<'div', InputTriggerProps>;\n CompareToggle: typeof Checkbox;\n CompareDateRange: Intergalactic.Component<'div', InputTriggerProps>;\n Body: typeof Flex;\n RangeCalendar: typeof Flex;\n Periods: typeof Flex & {\n Divider: typeof Divider;\n Column: typeof Flex;\n Options: typeof Flex;\n Controls: typeof Flex;\n };\n Footer: typeof Flex;\n};\n\ndeclare const MonthDateRangeComparator: typeof DateRangeComparator;\n\nexport {\n DatePicker,\n DateRangePicker,\n MonthPicker,\n MonthRangePicker,\n DateRangeComparator,\n MonthDateRangeComparator,\n};\n"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["default","DatePicker","DateRangePicker","DateRangeComparator","MonthPicker","MonthRangePicker","MonthDateRangeComparator"],"sources":["../../src/index.js"],"sourcesContent":["export { default as DatePicker } from './DatePicker';\nexport * from './DatePicker';\n\nexport { default as DateRangePicker } from './DateRangePicker';\n\nexport { default as DateRangeComparator } from './DateRangeComparator';\n\nexport { default as MonthPicker } from './MonthPicker';\n\nexport { default as MonthRangePicker } from './MonthRangePicker';\n\nexport { default as MonthDateRangeComparator } from './MonthDateRangeComparator';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,UAAU,QAAQ,cAAc;AACpD,cAAc,cAAc;AAE5B,SAASD,OAAO,IAAIE,eAAe,QAAQ,mBAAmB;AAE9D,SAASF,OAAO,IAAIG,mBAAmB,QAAQ,uBAAuB;AAEtE,SAASH,OAAO,IAAII,WAAW,QAAQ,eAAe;AAEtD,SAASJ,OAAO,IAAIK,gBAAgB,QAAQ,oBAAoB;AAEhE,SAASL,OAAO,IAAIM,wBAAwB,QAAQ,4BAA4B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"__intergalactic-dynamic-locales.mjs","names":["de","en","es","fr","it","ja","ko","nl","pt","ru","tr","vi","zh","pl","sv","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pt from './pt.json';\nimport ru from './ru.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\nimport pl from './pl.json';\nimport sv from './sv.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n ru,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,IAAMC,iBAAiB,GAAG;EAC/Bf,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA;AACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"cronTabScheduler.mjs","names":["cronUnitToArray","unit","includes","_unit$split","split","_unit$split2","_slicedToArray","start","end","Array","from","length","parseInt","_","idx","isValidSchedule","pattern","isValidUnit","min","max","unitValues","CRON_REG","every","item","intItem","test","isValidMonth","month","isValidWeekDay","weekDay","isValidMonthDay","monthDay","validate","validateFn","msg","console","warn","concat","patternArr","isInPeriod","date","period","dateMethod","monthInPeriod","monthDayInPeriod","weekDayInPeriod","units","testFn","some"],"sources":["../../../src/utils/cronTabScheduler.js"],"sourcesContent":["function cronUnitToArray(unit) {\n if (unit.includes('-')) {\n const [start, end] = unit.split('-');\n return Array.from(\n { length: parseInt(end, 10) - parseInt(start, 10) + 1 },\n (_, idx) => parseInt(start, 10) + idx,\n );\n }\n return unit.split(/[,\\/]/);\n}\n\nexport function isValidSchedule(pattern) {\n if (typeof pattern !== 'string') return false;\n\n function isValidUnit(unit, min, max) {\n const unitValues = cronUnitToArray(unit);\n const CRON_REG = /^\\d+$|^\\*$|^\\*\\/\\d+$/;\n return unitValues.every((item) => {\n const intItem = parseInt(item, 10);\n return !(intItem < min || intItem > max || !CRON_REG.test(item));\n });\n }\n\n function isValidMonth(month) {\n return isValidUnit(month, 1, 12);\n }\n\n function isValidWeekDay(weekDay) {\n return isValidUnit(weekDay, 1, 7);\n }\n\n function isValidMonthDay(monthDay) {\n return isValidUnit(monthDay, 1, 31);\n }\n\n function validate(pattern, validateFn, msg) {\n if (validateFn(pattern)) return true;\n\n console.warn(`DatePicker disabledSchedule: ${msg} format is invalid`);\n return false;\n }\n\n const patternArr = pattern.split(' ');\n\n if (patternArr.length < 3) return false;\n\n return patternArr.every((pattern, idx) => {\n switch (idx) {\n case 0:\n return validate(pattern, isValidMonthDay, 'day of month');\n case 1:\n return validate(pattern, isValidMonth, 'month');\n case 2:\n return validate(pattern, isValidWeekDay, 'day of week');\n default:\n return false;\n }\n });\n}\n\nexport function isInPeriod(pattern, date) {\n const patternArr = pattern.split(' ');\n\n function isInPeriod(date, period, dateMethod) {\n if (period === '*') return true;\n return date[dateMethod]() === parseInt(period, 10);\n }\n\n function monthInPeriod(date, period) {\n return isInPeriod(date, period, 'getMonth');\n }\n\n function monthDayInPeriod(date, period) {\n return isInPeriod(date, period, 'getDate');\n }\n\n function weekDayInPeriod(date, period) {\n if (period === 7) period = 0;\n return isInPeriod(date, period, 'getDay');\n }\n\n function test(units, date, testFn) {\n return units.some((unit) => testFn(date, unit));\n }\n\n return patternArr.every((unit, idx) => {\n const unitValues = cronUnitToArray(unit);\n switch (idx) {\n case 0:\n return test(unitValues, date, monthDayInPeriod);\n case 1:\n return test(unitValues, date, monthInPeriod);\n case 2:\n return test(unitValues, date, weekDayInPeriod);\n default:\n return false;\n }\n });\n}\n"],"mappings":";AAAA,SAASA,eAAeA,CAACC,IAAI,EAAE;EAC7B,IAAIA,IAAI,CAACC,QAAQ,CAAC,GAAG,CAAC,EAAE;IACtB,IAAAC,WAAA,GAAqBF,IAAI,CAACG,KAAK,CAAC,GAAG,CAAC;MAAAC,YAAA,GAAAC,cAAA,CAAAH,WAAA;MAA7BI,KAAK,GAAAF,YAAA;MAAEG,GAAG,GAAAH,YAAA;IACjB,OAAOI,KAAK,CAACC,IAAI,CACf;MAAEC,MAAM,EAAEC,QAAQ,CAACJ,GAAG,EAAE,EAAE,CAAC,GAAGI,QAAQ,CAACL,KAAK,EAAE,EAAE,CAAC,GAAG;IAAE,CAAC,EACvD,UAACM,CAAC,EAAEC,GAAG;MAAA,OAAKF,QAAQ,CAACL,KAAK,EAAE,EAAE,CAAC,GAAGO,GAAG;IAAA,EACtC;EACH;EACA,OAAOb,IAAI,CAACG,KAAK,CAAC,OAAO,CAAC;AAC5B;AAEA,OAAO,SAASW,eAAeA,CAACC,OAAO,EAAE;EACvC,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE,OAAO,KAAK;EAE7C,SAASC,WAAWA,CAAChB,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EAAK;IACrC,IAAMM,UAAU,GAAGpB,eAAe,CAACC,IAAI,CAAC;IACxC,QAAQa,GAAG;MACT,KAAK,CAAC;QACJ,OAAOW,IAAI,CAACL,UAAU,EAAEoB,IAAI,EAAEI,gBAAgB,CAAC;MACjD,KAAK,CAAC;QACJ,OAAOnB,IAAI,CAACL,UAAU,EAAEoB,IAAI,EAAEG,aAAa,CAAC;MAC9C,KAAK,CAAC;QACJ,OAAOlB,IAAI,CAACL,UAAU,EAAEoB,IAAI,EAAEK,eAAe,CAAC;MAChD;QACE,OAAO,KAAK;IAAC;EAEnB,CAAC,CAAC;AACJ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"datesIntersects.mjs","names":["isInPeriod","isValidSchedule","dayjs","MAX_DATE_TIMESTAMP","datesIntersects","_ref","unit","_ref2","_slicedToArray","dateFrom","dateTo","disabled_day","Array","isArray","_disabled_day","start","end","isBetween"],"sources":["../../../src/utils/datesIntersects.js"],"sourcesContent":["import { isInPeriod, isValidSchedule } from './cronTabScheduler';\nimport dayjs from 'dayjs';\n\nconst MAX_DATE_TIMESTAMP = 8640000000000000;\n\nexport const datesIntersects =\n ([dateFrom, dateTo], unit) =>\n (disabled_day) => {\n if (Array.isArray(disabled_day)) {\n const [start, end] = disabled_day;\n\n return (\n (dateFrom &&\n dayjs(dateFrom).isBetween(\n start || -MAX_DATE_TIMESTAMP,\n end || MAX_DATE_TIMESTAMP,\n unit,\n '[]',\n )) ||\n (dateTo &&\n dayjs(dateTo).isBetween(\n start || -MAX_DATE_TIMESTAMP,\n end || MAX_DATE_TIMESTAMP,\n unit,\n '[]',\n )) ||\n (dateFrom &&\n dateTo &&\n dayjs(start).isBetween(dayjs(dateFrom), dayjs(dateTo), unit, '[]')) ||\n (dateFrom && dateTo && dayjs(end).isBetween(dayjs(dateFrom), dayjs(dateTo), unit, '[]'))\n );\n }\n if (isValidSchedule(disabled_day)) {\n return isInPeriod(disabled_day, dateFrom) || isInPeriod(disabled_day, dateTo);\n }\n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AAIL,eAAe,CAACU,YAAY,CAAC,EAAE;MACjC,OAAOX,UAAU,CAACW,YAAY,EAAEF,QAAQ,CAAC,IAAIT,UAAU,CAACW,YAAY,EAAED,MAAM,CAAC;IAC/E;IACA,OACED,QAAQ,IACRC,MAAM,IACNR,KAAK,CAACS,YAAY,CAAC,CAACM,SAAS,CAACf,KAAK,CAACO,QAAQ,CAAC,EAAEP,KAAK,CAACQ,MAAM,CAAC,EAAEJ,IAAI,EAAE,IAAI,CAAC;EAE7E,CAAC;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatDate.mjs","names":["dayjs","DDMMYYFormattersCache","formatDDMMYY","date","locale","undefined","Intl","DateTimeFormat","day","month","year","formatter","format","toDate","MMYYYYFormattersCache","formatMMYY"],"sources":["../../../src/utils/formatDate.js"],"sourcesContent":["import dayjs from 'dayjs';\n\nconst DDMMYYFormattersCache = {};\n\nexport const formatDDMMYY = (date, locale) => {\n if (DDMMYYFormattersCache[locale] === undefined) {\n DDMMYYFormattersCache[locale] = new Intl.DateTimeFormat(locale, {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n });\n }\n\n const formatter = DDMMYYFormattersCache[locale];\n\n return formatter.format(dayjs(date).toDate());\n};\n\nconst MMYYYYFormattersCache = {};\n\nexport const formatMMYY = (date, locale) => {\n if (MMYYYYFormattersCache[locale] === undefined) {\n MMYYYYFormattersCache[locale] = new Intl.DateTimeFormat(locale, {\n month: 'long',\n year: 'numeric',\n });\n }\n\n const formatter = MMYYYYFormattersCache[locale];\n\n return formatter.format(dayjs(date).toDate());\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,IAAMC,qBAAqB,GAAG,CAAC,CAAC;AAEhC,OAAO,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAI,EAAEC,MAAM,EAAK;EAC5C,IAAIH,qBAAqB,CAACG,MAAM,CAAC,KAAKC,SAAS,EAAE;IAC/CJ,qBAAqB,CAACG,MAAM,CAAC,GAAG,IAAIE,IAAI,CAACC,cAAc,CAACH,MAAM,EAAE;MAC9DI,GAAG,EAAE,SAAS;MACdC,KAAK,EAAE,OAAO;MACdC,IAAI,EAAE;IACR,CAAC,CAAC;EACJ;EAEA,IAAMC,SAAS,GAAGV,qBAAqB,CAACG,MAAM,CAAC;EAE/C,OAAOO,SAAS,CAACC,MAAM,CAACZ,KAAK,CAACG,IAAI,CAAC,CAACU,MAAM,EAAE,CAAC;AAC/C,CAAC;AAED,IAAMC,qBAAqB,GAAG,CAAC,CAAC;AAEhC,OAAO,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAIZ,IAAI,EAAEC,MAAM,EAAK;EAC1C,IAAIU,qBAAqB,CAACV,MAAM,CAAC,KAAKC,SAAS,EAAE;IAC/CS,qBAAqB,CAACV,MAAM,CAAC,GAAG,IAAIE,IAAI,CAACC,cAAc,CAACH,MAAM,EAAE;MAC9DK,KAAK,EAAE,MAAM;MACbC,IAAI,EAAE;IACR,CAAC,CAAC;EACJ;EAEA,IAAMC,SAAS,GAAGG,qBAAqB,CAACV,MAAM,CAAC;EAE/C,OAAOO,SAAS,CAACC,MAAM,CAACZ,KAAK,CAACG,IAAI,CAAC,CAACU,MAAM,EAAE,CAAC;AAC/C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"includesDate.mjs","names":["isInPeriod","isValidSchedule","includesDate","date","unit","disabled_day","Array","isArray","MAX_DATE_TIMESTAMP","_disabled_day","_slicedToArray","start","end","isBetween","toDate","isSame"],"sources":["../../../src/utils/includesDate.js"],"sourcesContent":["import { isInPeriod, isValidSchedule } from './cronTabScheduler';\n\nexport const includesDate = (date, unit) => (disabled_day) => {\n if (Array.isArray(disabled_day)) {\n const MAX_DATE_TIMESTAMP = 8640000000000000;\n const [start, end] = disabled_day;\n return date.isBetween(start || -MAX_DATE_TIMESTAMP, end || MAX_DATE_TIMESTAMP, unit, '[]');\n }\n if (isValidSchedule(disabled_day)) {\n return isInPeriod(disabled_day, date.toDate());\n }\n return date.isSame(disabled_day, 'date');\n};\n"],"mappings":";AAAA,SAASA,UAAU,EAAEC,eAAe,QAAQ,oBAAoB;AAEhE,OAAO,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAI,EAAEC,IAAI;EAAA,OAAK,UAACC,YAAY,EAAK;IAC5D,IAAIC,KAAK,CAACC,OAAO,CAACF,YAAY,CAAC,EAAE;MAC/B,IAAMG,kBAAkB,GAAG,gBAAgB;MAC3C,IAAAC,aAAA,GAAAC,cAAA,CAAqBL,YAAY;QAA1BM,KAAK,GAAAF,aAAA;QAAEG,GAAG,GAAAH,aAAA;MACjB,OAAON,IAAI,CAACU,SAAS,CAACF,KAAK,IAAI,CAACH,kBAAkB,EAAEI,GAAG,IAAIJ,kBAAkB,EAAEJ,IAAI,EAAE,IAAI,CAAC;IAC5F;IACA,IAAIH,eAAe,CAACI,YAAY,CAAC,EAAE;MACjC,OAAOL,UAAU,CAACK,YAAY,EAAEF,IAAI,CAACW,MAAM,EAAE,CAAC;IAChD;IACA,OAAOX,IAAI,CAACY,MAAM,CAACV,YAAY,EAAE,MAAM,CAAC;EAC1C,CAAC;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"shortDateRangeFormat.mjs","names":["dayjs","getDayJSLocale","locale","includes","shortDateRangeFormat","dates","_ref","_ref$locale","options","_objectWithoutProperties","_excluded","_Intl$DateTimeFormat","Intl","DateTimeFormat","format","normalizeDates","map","date","toDate","monthsYears","month","year","length","isSimilarDay","isSimilarMonth","isSimilarYear","day","concat","getDate","getFullYear","newOptions","_excluded2"],"sources":["../../../src/utils/shortDateRangeFormat.js"],"sourcesContent":["import dayjs from 'dayjs';\n\nfunction getDayJSLocale(locale) {\n if (locale.includes('en') || locale.includes('ja')) {\n return 'en';\n }\n return 'ru';\n}\n\nexport default function shortDateRangeFormat(dates, { locale = 'en-US', ...options }) {\n const { format } = new Intl.DateTimeFormat(locale, options);\n const normalizeDates = dates.map((date) => dayjs(date).toDate());\n const monthsYears = dates.map((date) => [\n dayjs(date).date(),\n dayjs(date).month(),\n dayjs(date).year(),\n ]);\n\n if (monthsYears.length > 1) {\n const isSimilarDay = monthsYears[0][0] === monthsYears[1][0];\n const isSimilarMonth = monthsYears[0][1] === monthsYears[1][1];\n const isSimilarYear = monthsYears[0][2] === monthsYears[1][2];\n\n if (isSimilarMonth && isSimilarYear && !options.day) {\n return format(normalizeDates[0]);\n }\n if (isSimilarMonth && isSimilarYear) {\n if (getDayJSLocale(locale) === 'en') {\n if (isSimilarDay) {\n return `${new Intl.DateTimeFormat(locale, { month: options.month }).format(\n normalizeDates[0],\n )} ${normalizeDates[0].getDate()}, ${normalizeDates[0].getFullYear()}`;\n }\n return `${new Intl.DateTimeFormat(locale, { month: options.month }).format(\n normalizeDates[0],\n )} ${normalizeDates[0].getDate()}-${normalizeDates[1].getDate()}, ${normalizeDates[0].getFullYear()}`;\n }\n if (isSimilarDay) {\n return `${normalizeDates[0].getDate()} ${new Intl.DateTimeFormat(locale, {\n month: options.month,\n }).format(normalizeDates[0])} ${normalizeDates[0].getFullYear()}`;\n }\n return `${normalizeDates[0].getDate()}-${normalizeDates[1].getDate()} ${new Intl.DateTimeFormat(\n locale,\n { month: options.month },\n ).format(normalizeDates[0])} ${normalizeDates[0].getFullYear()}`;\n }\n\n if (isSimilarYear) {\n const { year, ...newOptions } = options;\n if (getDayJSLocale(locale) === 'en') {\n return `${new Intl.DateTimeFormat(locale, newOptions).format(\n normalizeDates[0],\n )}-${new Intl.DateTimeFormat(locale, newOptions).format(\n normalizeDates[1],\n )}, ${normalizeDates[0].getFullYear()}`;\n }\n return `${new Intl.DateTimeFormat(locale, newOptions).format(\n normalizeDates[0],\n )}-${new Intl.DateTimeFormat(locale, newOptions).format(\n normalizeDates[1],\n )} ${normalizeDates[0].getFullYear()}`;\n }\n\n return `${format(normalizeDates[0])}-${format(normalizeDates[1])}`;\n }\n\n return format(normalizeDates[0]);\n}\n"],"mappings":";;;AAAA,OAAOA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