@povio/ui 2.3.0 → 2.3.2-rc.1
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/assets/icons/AlignCenter.js +26 -11
- package/dist/assets/icons/AlignLeft.js +26 -11
- package/dist/assets/icons/AlignLeftRight.js +26 -11
- package/dist/assets/icons/AlignRight.js +26 -11
- package/dist/assets/icons/ArrowDropDown.js +26 -11
- package/dist/assets/icons/ArrowDropUp.js +26 -11
- package/dist/assets/icons/ArrowLeft.js +26 -11
- package/dist/assets/icons/ArrowRight.js +26 -11
- package/dist/assets/icons/Bold.js +26 -11
- package/dist/assets/icons/BulletedList.js +26 -11
- package/dist/assets/icons/Calendar.js +28 -13
- package/dist/assets/icons/Check.js +28 -13
- package/dist/assets/icons/CheckCircle.js +26 -11
- package/dist/assets/icons/CheckboxCheckmark.js +29 -14
- package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
- package/dist/assets/icons/ChevronDown.js +28 -13
- package/dist/assets/icons/ChevronLeft.js +28 -13
- package/dist/assets/icons/ChevronRight.js +28 -13
- package/dist/assets/icons/ChevronUp.js +28 -13
- package/dist/assets/icons/ChevronsLeft.js +28 -13
- package/dist/assets/icons/ChevronsRight.js +28 -13
- package/dist/assets/icons/Clock.js +26 -11
- package/dist/assets/icons/Close.js +26 -11
- package/dist/assets/icons/DateTime.js +35 -14
- package/dist/assets/icons/DragIndicator.js +26 -11
- package/dist/assets/icons/File.js +28 -13
- package/dist/assets/icons/Highlight.js +26 -11
- package/dist/assets/icons/HighlightOn.js +49 -15
- package/dist/assets/icons/Home.js +26 -11
- package/dist/assets/icons/Info.js +37 -16
- package/dist/assets/icons/Italic.js +26 -11
- package/dist/assets/icons/Link.js +26 -11
- package/dist/assets/icons/Menu.js +26 -11
- package/dist/assets/icons/NumberedList.js +26 -11
- package/dist/assets/icons/PointerHorizontal.js +26 -11
- package/dist/assets/icons/PointerVertical.js +26 -11
- package/dist/assets/icons/Search.js +26 -11
- package/dist/assets/icons/Send.js +28 -13
- package/dist/assets/icons/Strikethrough.js +26 -11
- package/dist/assets/icons/TextColor.js +48 -14
- package/dist/assets/icons/Today.js +26 -11
- package/dist/assets/icons/Underlined.js +28 -13
- package/dist/assets/icons/Upload.js +35 -14
- package/dist/assets/icons/Visibility.js +26 -11
- package/dist/assets/icons/VisibilityOff.js +26 -11
- package/dist/assets/icons/WarningFilled.js +28 -13
- package/dist/components/Breadcrumbs/Breadcrumbs.js +207 -56
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +32 -9
- package/dist/components/Menu/MenuMobile.js +97 -38
- package/dist/components/Menu/MenuPopover.js +105 -29
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +55 -17
- package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
- package/dist/components/buttons/TextButton/TextButton.js +30 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/inputs/Checkbox/checkbox.cva.js +4 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +11 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +364 -76
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +11 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +452 -167
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +269 -57
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +6 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +605 -130
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +332 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +3 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +301 -102
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +3 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +146 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +249 -93
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.js +311 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +12 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +382 -138
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +96 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +81 -27
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
- package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +210 -65
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +4 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +7 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +13 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +14 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +117 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +39 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +85 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +87 -44
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
- package/dist/components/inputs/File/shared/InputUploadFilled.js +50 -9
- package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +25 -5
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
- package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +6 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +11 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +450 -95
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +575 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +4 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +421 -91
- package/dist/components/inputs/Input/shared/InputContent.js +192 -59
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
- package/dist/components/inputs/Inputs/InputItem.js +69 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -60
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +17 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +42 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +213 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +34 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +36 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +104 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +224 -18
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +330 -116
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +12 -5
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +7 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +24 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +3 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +37 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +80 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +528 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -75
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.js +214 -37
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
- package/dist/components/inputs/Toggle/toggle.cva.js +4 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +21 -11
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +89 -10
- package/dist/components/inputs/shared/StaticInput.d.ts +38 -0
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +10 -0
- package/dist/components/inputs/shared/input.cva.js +54 -14
- package/dist/components/inputs/shared/label.cva.js +2 -2
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +4 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +14 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +100 -0
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +104 -31
- package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +122 -25
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
- package/dist/components/overlays/Drawer/Drawer.js +62 -20
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +83 -27
- package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/segment/Segment.js +218 -57
- package/dist/components/segment/SegmentItem.js +67 -10
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Toast/Toast.js +21 -13
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +28 -27
- package/dist/components/text/Link/Link.js +19 -7
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +23 -9
- package/dist/config/router.context.js +42 -16
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.d.ts +21 -7
- package/dist/config/uiConfig.context.js +68 -15
- package/dist/config/uiStyle.context.d.ts +27 -4
- package/dist/config/uiStyle.context.js +15 -5
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +3 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.js +101 -30
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +57 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +7 -0
- package/dist/index.js +4 -2
- package/dist/tw-ui-plugin.js +8 -1
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +134 -22
- package/dist/utils/dom.utils.js +1 -1
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/package.json +1 -1
|
@@ -1,13 +1,21 @@
|
|
|
1
|
+
import { UIStyle } from "../../../../config/uiStyle.context.js";
|
|
1
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
3
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
4
|
import "../../../../config/i18n.js";
|
|
4
5
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
6
|
+
import { datePickerInputContentRow } from "../shared/datePickerInput.cva.js";
|
|
7
|
+
import { renderDatePickerTodayIcon } from "../shared/datePickerTodayIcon.js";
|
|
5
8
|
import { DatePickerInput } from "../shared/DatePickerInput.js";
|
|
6
9
|
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
7
10
|
import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
11
|
+
import { getStaticDateRangeSegments } from "../shared/staticDateTimeSegments.js";
|
|
8
12
|
import { FormField } from "../../FormField/FormField.js";
|
|
9
13
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
14
|
+
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
15
|
+
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
16
|
+
import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
|
|
10
17
|
import { RangeCalendar } from "../shared/RangeCalendar.js";
|
|
18
|
+
import { c } from "react/compiler-runtime";
|
|
11
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
20
|
import { clsx } from "clsx";
|
|
13
21
|
import { useCallback, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
@@ -16,33 +24,48 @@ import { useDateRangePicker, useLocale as useLocale$1 } from "react-aria";
|
|
|
16
24
|
import { mergeRefs } from "@react-aria/utils";
|
|
17
25
|
import { useTranslation } from "react-i18next";
|
|
18
26
|
import { Controller } from "react-hook-form";
|
|
19
|
-
import { createCalendar, endOfMonth, endOfWeek, endOfYear,
|
|
27
|
+
import { createCalendar, endOfMonth, endOfWeek, endOfYear, startOfMonth, startOfWeek, startOfYear, toCalendarDate, today } from "@internationalized/date";
|
|
20
28
|
import { DateTime } from "luxon";
|
|
21
29
|
import { useDateRangePickerState, useRangeCalendarState } from "react-stately";
|
|
22
30
|
//#region src/components/inputs/DateTime/DateRangePicker/DateRangePicker.tsx
|
|
31
|
+
var DATE_PICKER_TIME_ZONE = "UTC";
|
|
23
32
|
var DateRangePickerBase = (props) => {
|
|
24
33
|
const ui = UIConfig.useConfig();
|
|
25
34
|
const { t } = useTranslation();
|
|
26
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, value, disableDropdown, className, hideSidebar, placeholder, inputClassName, hideLabel
|
|
35
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, hideSidebar, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, ...rest } = props;
|
|
36
|
+
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
37
|
+
const variant = variantProp ?? ui.input.variant;
|
|
38
|
+
const as = asProp ?? ui.input.as;
|
|
39
|
+
const size = sizeProp ?? ui.input.size;
|
|
40
|
+
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
41
|
+
const todayIcon = todayIconProp ?? ui.dateInput.todayIcon;
|
|
42
|
+
const todayIconButtonSize = todayIconButtonSizeProp ?? ui.dateInput.todayIconButtonSize;
|
|
43
|
+
const todayIconPlacement = todayIconPlacementProp ?? ui.dateInput.todayIconPlacement;
|
|
44
|
+
const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
|
|
45
|
+
const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
|
|
46
|
+
const autoFixYear = autoFixYearProp ?? ui.dateInput.autoFixYear;
|
|
47
|
+
const fireBlurOnChange = fireBlurOnChangeProp ?? ui.dateInput.fireBlurOnChange;
|
|
27
48
|
const [validationRangeError, setValidationRangeError] = useState();
|
|
28
49
|
const datePickerInputRef = useRef(null);
|
|
29
50
|
const dateRangePickerRef = useMemo(() => ({ get current() {
|
|
30
51
|
return datePickerInputRef.current?.getContainer?.() || null;
|
|
31
52
|
} }), []);
|
|
53
|
+
const normalizedValue = value ?? null;
|
|
32
54
|
const dialogState = useDateRangePickerState({
|
|
33
55
|
...rest,
|
|
34
|
-
value,
|
|
56
|
+
value: normalizedValue,
|
|
35
57
|
shouldCloseOnSelect: false,
|
|
36
58
|
shouldForceLeadingZeros
|
|
37
59
|
});
|
|
38
60
|
const state = useDateRangePickerState({
|
|
39
61
|
...rest,
|
|
40
62
|
shouldForceLeadingZeros,
|
|
41
|
-
value,
|
|
63
|
+
value: normalizedValue,
|
|
42
64
|
onChange: (newValue) => {
|
|
43
65
|
if (isValidRange(newValue)) return;
|
|
44
66
|
onChange?.(newValue);
|
|
45
67
|
handleCalendarStatesChange(newValue);
|
|
68
|
+
if (fireBlurOnChange) debouncedBlur(newValue);
|
|
46
69
|
},
|
|
47
70
|
shouldCloseOnSelect: false
|
|
48
71
|
});
|
|
@@ -57,9 +80,16 @@ var DateRangePickerBase = (props) => {
|
|
|
57
80
|
shouldForceLeadingZeros
|
|
58
81
|
}, dialogState, dateRangePickerRef);
|
|
59
82
|
const { locale } = useLocale$1();
|
|
60
|
-
useImperativeHandle(ref, () => ({
|
|
61
|
-
|
|
62
|
-
|
|
83
|
+
useImperativeHandle(ref, () => ({
|
|
84
|
+
clear: () => {
|
|
85
|
+
datePickerInputRef.current?.clear();
|
|
86
|
+
},
|
|
87
|
+
getContainer: () => datePickerInputRef.current?.getContainer?.() ?? null
|
|
88
|
+
}));
|
|
89
|
+
const handleBlur = (newValue_0) => {
|
|
90
|
+
onBlur?.({ target: { value: newValue_0 } });
|
|
91
|
+
};
|
|
92
|
+
const { callback: debouncedBlur } = useDebounceCallback(handleBlur, { delay: 500 });
|
|
63
93
|
const formFieldProps = {
|
|
64
94
|
error: error || validationRangeError,
|
|
65
95
|
label,
|
|
@@ -88,7 +118,7 @@ var DateRangePickerBase = (props) => {
|
|
|
88
118
|
createCalendar,
|
|
89
119
|
pageBehavior: "single",
|
|
90
120
|
visibleDuration: { months: 1 },
|
|
91
|
-
defaultFocusedValue: today(
|
|
121
|
+
defaultFocusedValue: today(DATE_PICKER_TIME_ZONE).add({ months: 1 }),
|
|
92
122
|
minValue: void 0,
|
|
93
123
|
maxValue: void 0
|
|
94
124
|
});
|
|
@@ -110,10 +140,10 @@ var DateRangePickerBase = (props) => {
|
|
|
110
140
|
className: headerClassName,
|
|
111
141
|
labelProps
|
|
112
142
|
};
|
|
113
|
-
const isValidRange = useCallback((
|
|
114
|
-
if (
|
|
115
|
-
const startDate =
|
|
116
|
-
if (
|
|
143
|
+
const isValidRange = useCallback((newValue_1) => {
|
|
144
|
+
if (newValue_1?.start && newValue_1?.end) {
|
|
145
|
+
const startDate = newValue_1.start;
|
|
146
|
+
if (newValue_1.end.compare(startDate) < 0) {
|
|
117
147
|
setValidationRangeError(t(($) => $.ui.datePicker.errors.endDateBeforeStart, { ns: "ui" }));
|
|
118
148
|
return true;
|
|
119
149
|
}
|
|
@@ -121,20 +151,20 @@ var DateRangePickerBase = (props) => {
|
|
|
121
151
|
} else setValidationRangeError(void 0);
|
|
122
152
|
return false;
|
|
123
153
|
}, [t]);
|
|
124
|
-
const handleCalendarStatesChange = (
|
|
125
|
-
if (
|
|
126
|
-
if (isValidRange(
|
|
127
|
-
dialogState.setValue(
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
leftCalendarState.setFocusedDate(
|
|
131
|
-
if (
|
|
132
|
-
else rightCalendarState.setFocusedDate(
|
|
133
|
-
leftCalendarState.setValue(
|
|
134
|
-
rightCalendarState.setValue(
|
|
154
|
+
const handleCalendarStatesChange = (newValue_2) => {
|
|
155
|
+
if (newValue_2) {
|
|
156
|
+
if (isValidRange(newValue_2)) return;
|
|
157
|
+
dialogState.setValue(newValue_2);
|
|
158
|
+
const startDate_0 = newValue_2.start;
|
|
159
|
+
const endDate_0 = newValue_2.end;
|
|
160
|
+
leftCalendarState.setFocusedDate(startDate_0);
|
|
161
|
+
if (startDate_0.year === endDate_0.year && startDate_0.month === endDate_0.month) rightCalendarState.setFocusedDate(startDate_0.add({ months: 1 }));
|
|
162
|
+
else rightCalendarState.setFocusedDate(endDate_0);
|
|
163
|
+
leftCalendarState.setValue(newValue_2);
|
|
164
|
+
rightCalendarState.setValue(newValue_2);
|
|
135
165
|
setRangeSelection({
|
|
136
|
-
start:
|
|
137
|
-
end:
|
|
166
|
+
start: newValue_2.start,
|
|
167
|
+
end: newValue_2.end,
|
|
138
168
|
isSelecting: false
|
|
139
169
|
});
|
|
140
170
|
setHoverDate(null);
|
|
@@ -158,27 +188,27 @@ var DateRangePickerBase = (props) => {
|
|
|
158
188
|
setHoverDate(date);
|
|
159
189
|
});
|
|
160
190
|
}, []);
|
|
161
|
-
const handleDateHover = useCallback((
|
|
162
|
-
if (rangeSelection.isSelecting && rangeSelection.start) throttledSetHoverDate(
|
|
191
|
+
const handleDateHover = useCallback((date_0) => {
|
|
192
|
+
if (rangeSelection.isSelecting && rangeSelection.start) throttledSetHoverDate(date_0);
|
|
163
193
|
}, [
|
|
164
194
|
rangeSelection.isSelecting,
|
|
165
195
|
rangeSelection.start,
|
|
166
196
|
throttledSetHoverDate
|
|
167
197
|
]);
|
|
168
|
-
const handleDateSelection = useCallback((
|
|
198
|
+
const handleDateSelection = useCallback((date_1, calendarSide) => {
|
|
169
199
|
if (calendarSide) {
|
|
170
200
|
const currentVisibleMonth = (calendarSide === "left" ? leftCalendarState : rightCalendarState).visibleRange.start;
|
|
171
|
-
if (
|
|
172
|
-
leftCalendarState.setFocusedDate(
|
|
173
|
-
rightCalendarState.setFocusedDate(
|
|
201
|
+
if (date_1.month !== currentVisibleMonth.month || date_1.year !== currentVisibleMonth.year) if (calendarSide === "left") {
|
|
202
|
+
leftCalendarState.setFocusedDate(date_1);
|
|
203
|
+
rightCalendarState.setFocusedDate(date_1.add({ months: 1 }));
|
|
174
204
|
} else {
|
|
175
|
-
rightCalendarState.setFocusedDate(
|
|
176
|
-
leftCalendarState.setFocusedDate(
|
|
205
|
+
rightCalendarState.setFocusedDate(date_1);
|
|
206
|
+
leftCalendarState.setFocusedDate(date_1.subtract({ months: 1 }));
|
|
177
207
|
}
|
|
178
208
|
}
|
|
179
209
|
if (!rangeSelection.isSelecting || !rangeSelection.start) {
|
|
180
210
|
setRangeSelection({
|
|
181
|
-
start:
|
|
211
|
+
start: date_1,
|
|
182
212
|
end: null,
|
|
183
213
|
isSelecting: true
|
|
184
214
|
});
|
|
@@ -187,7 +217,7 @@ var DateRangePickerBase = (props) => {
|
|
|
187
217
|
rightCalendarState.setValue(null);
|
|
188
218
|
} else {
|
|
189
219
|
const { start } = rangeSelection;
|
|
190
|
-
const end =
|
|
220
|
+
const end = date_1;
|
|
191
221
|
const finalStart = start.compare(end) <= 0 ? start : end;
|
|
192
222
|
const finalEnd = start.compare(end) <= 0 ? end : start;
|
|
193
223
|
const newRange = {
|
|
@@ -211,16 +241,16 @@ var DateRangePickerBase = (props) => {
|
|
|
211
241
|
rightCalendarState,
|
|
212
242
|
dialogState
|
|
213
243
|
]);
|
|
214
|
-
const handleKeyboardNavigation = useCallback((event,
|
|
215
|
-
const
|
|
216
|
-
const otherState =
|
|
244
|
+
const handleKeyboardNavigation = useCallback((event, date_2, calendarSide_0) => {
|
|
245
|
+
const currentState_0 = calendarSide_0 === "left" ? leftCalendarState : rightCalendarState;
|
|
246
|
+
const otherState = calendarSide_0 === "left" ? rightCalendarState : leftCalendarState;
|
|
217
247
|
let shouldPreventDefault = false;
|
|
218
248
|
switch (event.key) {
|
|
219
249
|
case "ArrowRight": {
|
|
220
|
-
const nextDate =
|
|
221
|
-
const
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
250
|
+
const nextDate = date_2.add({ days: 1 });
|
|
251
|
+
const currentMonth_2 = currentState_0.visibleRange.start;
|
|
252
|
+
const otherMonth_2 = otherState.visibleRange.start;
|
|
253
|
+
if (calendarSide_0 === "left" && nextDate.month !== currentMonth_2.month) if (nextDate.year === otherMonth_2.year && nextDate.month === otherMonth_2.month) {
|
|
224
254
|
otherState.setFocusedDate(nextDate);
|
|
225
255
|
shouldPreventDefault = true;
|
|
226
256
|
} else {
|
|
@@ -230,10 +260,10 @@ var DateRangePickerBase = (props) => {
|
|
|
230
260
|
break;
|
|
231
261
|
}
|
|
232
262
|
case "ArrowLeft": {
|
|
233
|
-
const prevDate =
|
|
234
|
-
const
|
|
235
|
-
const
|
|
236
|
-
if (
|
|
263
|
+
const prevDate = date_2.subtract({ days: 1 });
|
|
264
|
+
const currentMonth_1 = currentState_0.visibleRange.start;
|
|
265
|
+
const otherMonth_1 = otherState.visibleRange.start;
|
|
266
|
+
if (calendarSide_0 === "right" && prevDate.month !== currentMonth_1.month) if (prevDate.year === otherMonth_1.year && prevDate.month === otherMonth_1.month) {
|
|
237
267
|
otherState.setFocusedDate(prevDate);
|
|
238
268
|
shouldPreventDefault = true;
|
|
239
269
|
} else {
|
|
@@ -243,10 +273,10 @@ var DateRangePickerBase = (props) => {
|
|
|
243
273
|
break;
|
|
244
274
|
}
|
|
245
275
|
case "ArrowDown": {
|
|
246
|
-
const nextWeekDate =
|
|
247
|
-
const
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
276
|
+
const nextWeekDate = date_2.add({ weeks: 1 });
|
|
277
|
+
const currentMonth_0 = currentState_0.visibleRange.start;
|
|
278
|
+
const otherMonth_0 = otherState.visibleRange.start;
|
|
279
|
+
if (calendarSide_0 === "left" && nextWeekDate.month !== currentMonth_0.month) if (nextWeekDate.year === otherMonth_0.year && nextWeekDate.month === otherMonth_0.month) {
|
|
250
280
|
otherState.setFocusedDate(nextWeekDate);
|
|
251
281
|
shouldPreventDefault = true;
|
|
252
282
|
} else {
|
|
@@ -256,10 +286,10 @@ var DateRangePickerBase = (props) => {
|
|
|
256
286
|
break;
|
|
257
287
|
}
|
|
258
288
|
case "ArrowUp": {
|
|
259
|
-
const prevWeekDate =
|
|
260
|
-
const currentMonth =
|
|
289
|
+
const prevWeekDate = date_2.subtract({ weeks: 1 });
|
|
290
|
+
const currentMonth = currentState_0.visibleRange.start;
|
|
261
291
|
const otherMonth = otherState.visibleRange.start;
|
|
262
|
-
if (
|
|
292
|
+
if (calendarSide_0 === "right" && prevWeekDate.month !== currentMonth.month) if (prevWeekDate.year === otherMonth.year && prevWeekDate.month === otherMonth.month) {
|
|
263
293
|
otherState.setFocusedDate(prevWeekDate);
|
|
264
294
|
shouldPreventDefault = true;
|
|
265
295
|
} else {
|
|
@@ -270,7 +300,7 @@ var DateRangePickerBase = (props) => {
|
|
|
270
300
|
}
|
|
271
301
|
case "Enter":
|
|
272
302
|
case " ":
|
|
273
|
-
handleDateSelection(
|
|
303
|
+
handleDateSelection(date_2);
|
|
274
304
|
shouldPreventDefault = true;
|
|
275
305
|
break;
|
|
276
306
|
case "Escape":
|
|
@@ -294,14 +324,14 @@ var DateRangePickerBase = (props) => {
|
|
|
294
324
|
rightCalendarState,
|
|
295
325
|
handleDateSelection
|
|
296
326
|
]);
|
|
297
|
-
const syncCalendarStates = useCallback((
|
|
298
|
-
if (isValidRange(
|
|
299
|
-
leftCalendarState.setValue(
|
|
300
|
-
rightCalendarState.setValue(
|
|
301
|
-
dialogState.setValue(
|
|
302
|
-
if (
|
|
303
|
-
start:
|
|
304
|
-
end:
|
|
327
|
+
const syncCalendarStates = useCallback((newValue_3) => {
|
|
328
|
+
if (isValidRange(newValue_3)) return;
|
|
329
|
+
leftCalendarState.setValue(newValue_3);
|
|
330
|
+
rightCalendarState.setValue(newValue_3);
|
|
331
|
+
dialogState.setValue(newValue_3);
|
|
332
|
+
if (newValue_3) setRangeSelection({
|
|
333
|
+
start: newValue_3.start,
|
|
334
|
+
end: newValue_3.end,
|
|
305
335
|
isSelecting: false
|
|
306
336
|
});
|
|
307
337
|
else setRangeSelection({
|
|
@@ -321,11 +351,14 @@ var DateRangePickerBase = (props) => {
|
|
|
321
351
|
start: rangeSelection.start,
|
|
322
352
|
end: rangeSelection.end
|
|
323
353
|
} : dialogState.value;
|
|
324
|
-
if (valueToApply)
|
|
354
|
+
if (valueToApply) {
|
|
355
|
+
state.setValue(valueToApply);
|
|
356
|
+
if (fireBlurOnChange) handleBlur(valueToApply);
|
|
357
|
+
}
|
|
325
358
|
state.toggle();
|
|
326
359
|
};
|
|
327
360
|
const onTodayPress = () => {
|
|
328
|
-
const todayDate = today(
|
|
361
|
+
const todayDate = today(DATE_PICKER_TIME_ZONE);
|
|
329
362
|
leftCalendarState.setFocusedDate(todayDate);
|
|
330
363
|
rightCalendarState.setFocusedDate(todayDate.add({ months: 1 }));
|
|
331
364
|
syncCalendarStates({
|
|
@@ -333,6 +366,9 @@ var DateRangePickerBase = (props) => {
|
|
|
333
366
|
end: todayDate
|
|
334
367
|
});
|
|
335
368
|
};
|
|
369
|
+
const onInputClear = () => {
|
|
370
|
+
onChange?.(null);
|
|
371
|
+
};
|
|
336
372
|
const onOpenChange = (isOpen) => {
|
|
337
373
|
state.toggle();
|
|
338
374
|
if (!isOpen) {
|
|
@@ -340,11 +376,11 @@ var DateRangePickerBase = (props) => {
|
|
|
340
376
|
dialogState.setValue(state.value);
|
|
341
377
|
leftCalendarState.setValue(state.value);
|
|
342
378
|
rightCalendarState.setValue(state.value);
|
|
343
|
-
const
|
|
344
|
-
const
|
|
345
|
-
leftCalendarState.setFocusedDate(
|
|
346
|
-
if (
|
|
347
|
-
else rightCalendarState.setFocusedDate(
|
|
379
|
+
const startDate_1 = state.value.start || today(DATE_PICKER_TIME_ZONE);
|
|
380
|
+
const endDate_1 = state.value.end || today(DATE_PICKER_TIME_ZONE).add({ months: 1 });
|
|
381
|
+
leftCalendarState.setFocusedDate(startDate_1);
|
|
382
|
+
if (startDate_1.year === endDate_1.year && startDate_1.month === endDate_1.month) rightCalendarState.setFocusedDate(startDate_1.add({ months: 1 }));
|
|
383
|
+
else rightCalendarState.setFocusedDate(endDate_1);
|
|
348
384
|
setRangeSelection({
|
|
349
385
|
start: state.value.start,
|
|
350
386
|
end: state.value.end,
|
|
@@ -353,87 +389,87 @@ var DateRangePickerBase = (props) => {
|
|
|
353
389
|
}
|
|
354
390
|
}
|
|
355
391
|
};
|
|
356
|
-
const
|
|
392
|
+
const todayDate_0 = today(DATE_PICKER_TIME_ZONE);
|
|
357
393
|
const getThisWeekRange = () => {
|
|
358
394
|
return {
|
|
359
|
-
start: startOfWeek(
|
|
360
|
-
end: endOfWeek(
|
|
395
|
+
start: startOfWeek(todayDate_0, locale),
|
|
396
|
+
end: endOfWeek(todayDate_0, locale)
|
|
361
397
|
};
|
|
362
398
|
};
|
|
363
399
|
const getLastWeekRange = () => {
|
|
364
|
-
const thisWeekStart = startOfWeek(
|
|
400
|
+
const thisWeekStart = startOfWeek(todayDate_0, locale);
|
|
365
401
|
return {
|
|
366
402
|
start: thisWeekStart.subtract({ weeks: 1 }),
|
|
367
403
|
end: thisWeekStart.subtract({ days: 1 })
|
|
368
404
|
};
|
|
369
405
|
};
|
|
370
406
|
const getThisAndLastWeekRange = () => {
|
|
371
|
-
const thisWeekEnd = endOfWeek(
|
|
407
|
+
const thisWeekEnd = endOfWeek(todayDate_0, locale);
|
|
372
408
|
return {
|
|
373
|
-
start: startOfWeek(
|
|
409
|
+
start: startOfWeek(todayDate_0, locale).subtract({ weeks: 1 }),
|
|
374
410
|
end: thisWeekEnd
|
|
375
411
|
};
|
|
376
412
|
};
|
|
377
413
|
const getThisMonthRange = () => {
|
|
378
414
|
return {
|
|
379
|
-
start: startOfMonth(
|
|
380
|
-
end: endOfMonth(
|
|
415
|
+
start: startOfMonth(todayDate_0),
|
|
416
|
+
end: endOfMonth(todayDate_0)
|
|
381
417
|
};
|
|
382
418
|
};
|
|
383
419
|
const getThisAndLastMonthRange = () => {
|
|
384
|
-
const thisMonthEnd = endOfMonth(
|
|
420
|
+
const thisMonthEnd = endOfMonth(todayDate_0);
|
|
385
421
|
return {
|
|
386
|
-
start: startOfMonth(
|
|
422
|
+
start: startOfMonth(todayDate_0).subtract({ months: 1 }),
|
|
387
423
|
end: thisMonthEnd
|
|
388
424
|
};
|
|
389
425
|
};
|
|
390
426
|
const presets = [
|
|
391
427
|
{
|
|
392
|
-
label: t(($) =>
|
|
428
|
+
label: t(($_0) => $_0.ui.datePicker.presets.thisWeek, { ns: "ui" }),
|
|
393
429
|
getValue: getThisWeekRange
|
|
394
430
|
},
|
|
395
431
|
{
|
|
396
|
-
label: t(($) =>
|
|
432
|
+
label: t(($_1) => $_1.ui.datePicker.presets.lastWeek, { ns: "ui" }),
|
|
397
433
|
getValue: getLastWeekRange
|
|
398
434
|
},
|
|
399
435
|
{
|
|
400
|
-
label: t(($) =>
|
|
436
|
+
label: t(($_2) => $_2.ui.datePicker.presets.thisAndLastWeek, { ns: "ui" }),
|
|
401
437
|
getValue: getThisAndLastWeekRange
|
|
402
438
|
},
|
|
403
439
|
{
|
|
404
|
-
label: t(($) =>
|
|
440
|
+
label: t(($_3) => $_3.ui.datePicker.presets.thisMonth, { ns: "ui" }),
|
|
405
441
|
getValue: getThisMonthRange
|
|
406
442
|
},
|
|
407
443
|
{
|
|
408
|
-
label: t(($) =>
|
|
444
|
+
label: t(($_4) => $_4.ui.datePicker.presets.thisAndLastMonth, { ns: "ui" }),
|
|
409
445
|
getValue: getThisAndLastMonthRange
|
|
410
446
|
},
|
|
411
447
|
{
|
|
412
|
-
label: t(($) =>
|
|
448
|
+
label: t(($_5) => $_5.ui.datePicker.presets.thisYear, { ns: "ui" }),
|
|
413
449
|
getValue: () => ({
|
|
414
|
-
start: startOfYear(
|
|
415
|
-
end:
|
|
450
|
+
start: startOfYear(todayDate_0),
|
|
451
|
+
end: todayDate_0
|
|
416
452
|
})
|
|
417
453
|
},
|
|
418
454
|
{
|
|
419
|
-
label: t(($) =>
|
|
455
|
+
label: t(($_6) => $_6.ui.datePicker.presets.lastYear, { ns: "ui" }),
|
|
420
456
|
getValue: () => ({
|
|
421
|
-
start: startOfYear(
|
|
422
|
-
end: endOfYear(
|
|
457
|
+
start: startOfYear(todayDate_0.subtract({ years: 1 })),
|
|
458
|
+
end: endOfYear(todayDate_0.subtract({ years: 1 }))
|
|
423
459
|
})
|
|
424
460
|
},
|
|
425
461
|
{
|
|
426
|
-
label: t(($) =>
|
|
462
|
+
label: t(($_7) => $_7.ui.datePicker.presets.thisAndLastYear, { ns: "ui" }),
|
|
427
463
|
getValue: () => ({
|
|
428
|
-
start: startOfYear(
|
|
429
|
-
end:
|
|
464
|
+
start: startOfYear(todayDate_0.subtract({ years: 1 })),
|
|
465
|
+
end: todayDate_0
|
|
430
466
|
})
|
|
431
467
|
},
|
|
432
468
|
{
|
|
433
|
-
label: t(($) =>
|
|
469
|
+
label: t(($_8) => $_8.ui.datePicker.presets.soFar, { ns: "ui" }),
|
|
434
470
|
getValue: () => ({
|
|
435
|
-
start: startOfYear(
|
|
436
|
-
end:
|
|
471
|
+
start: startOfYear(todayDate_0),
|
|
472
|
+
end: todayDate_0
|
|
437
473
|
})
|
|
438
474
|
}
|
|
439
475
|
];
|
|
@@ -441,12 +477,12 @@ var DateRangePickerBase = (props) => {
|
|
|
441
477
|
setActivePreset(preset.label);
|
|
442
478
|
const presetValue = preset.getValue();
|
|
443
479
|
syncCalendarStates(presetValue);
|
|
444
|
-
const
|
|
445
|
-
leftCalendarState.setFocusedDate(
|
|
446
|
-
const
|
|
447
|
-
if ((
|
|
480
|
+
const startDate_2 = presetValue.start;
|
|
481
|
+
leftCalendarState.setFocusedDate(startDate_2);
|
|
482
|
+
const endDate_2 = presetValue.end;
|
|
483
|
+
if ((endDate_2.year - startDate_2.year) * 12 + (endDate_2.month - startDate_2.month) > 2) rightCalendarState.setFocusedDate(endDate_2);
|
|
448
484
|
else {
|
|
449
|
-
const rightCalendarMonth =
|
|
485
|
+
const rightCalendarMonth = startDate_2.add({ months: 1 });
|
|
450
486
|
rightCalendarState.setFocusedDate(rightCalendarMonth);
|
|
451
487
|
}
|
|
452
488
|
};
|
|
@@ -458,14 +494,30 @@ var DateRangePickerBase = (props) => {
|
|
|
458
494
|
...formFieldProps,
|
|
459
495
|
as,
|
|
460
496
|
labelProps,
|
|
461
|
-
className: clsx("relative inline-flex w-full flex-col text-left", className),
|
|
497
|
+
className: clsx("group relative inline-flex w-full flex-col text-left", className),
|
|
462
498
|
tabIndex: as === "inline" ? -1 : void 0,
|
|
463
499
|
children: [/* @__PURE__ */ jsx(DatePickerInput, {
|
|
464
500
|
ref: mergeRefs(ref, datePickerInputRef),
|
|
465
501
|
as,
|
|
466
502
|
groupProps,
|
|
467
|
-
fieldProps:
|
|
468
|
-
|
|
503
|
+
fieldProps: {
|
|
504
|
+
...startFieldProps,
|
|
505
|
+
onBlur: (event_0) => {
|
|
506
|
+
startFieldProps.onBlur?.(event_0);
|
|
507
|
+
handleBlur(state.value);
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
endFieldProps: {
|
|
511
|
+
...endFieldProps,
|
|
512
|
+
onBlur: (event_1) => {
|
|
513
|
+
endFieldProps.onBlur?.(event_1);
|
|
514
|
+
handleBlur(state.value);
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
fieldValue: normalizedValue?.start ?? null,
|
|
518
|
+
endFieldValue: normalizedValue?.end ?? null,
|
|
519
|
+
isValueControlled: true,
|
|
520
|
+
hasValue: normalizedValue?.start != null || normalizedValue?.end != null,
|
|
469
521
|
buttonProps,
|
|
470
522
|
isDisabled,
|
|
471
523
|
isInvalid: !!error,
|
|
@@ -475,27 +527,32 @@ var DateRangePickerBase = (props) => {
|
|
|
475
527
|
isClearable,
|
|
476
528
|
headerProps,
|
|
477
529
|
todayIcon,
|
|
530
|
+
todayIconButtonSize,
|
|
531
|
+
todayIconPlacement,
|
|
478
532
|
isDirty,
|
|
479
533
|
disableManualEntry,
|
|
534
|
+
autoFixYear,
|
|
480
535
|
placeholder,
|
|
481
536
|
className: inputClassName,
|
|
482
537
|
onOpenDropdown: () => state.toggle(),
|
|
483
|
-
|
|
538
|
+
timeZone: DATE_PICKER_TIME_ZONE,
|
|
539
|
+
fireBlurOnChange,
|
|
540
|
+
onClear: onInputClear
|
|
484
541
|
}), /* @__PURE__ */ jsx(DateTimeDialog, {
|
|
485
542
|
hideSidebar,
|
|
486
543
|
sidebar: /* @__PURE__ */ jsx("div", {
|
|
487
544
|
className: "flex w-full flex-row overflow-auto border-elevation-outline-default-1 border-solid [-ms-overflow-style:none] [scrollbar-width:none] md:w-[156px] md:flex-col md:border-r [&::-webkit-scrollbar]:hidden",
|
|
488
|
-
children: presets.map((
|
|
489
|
-
onClick: () => selectPreset(
|
|
490
|
-
className: clsx("w-full px-2 py-1 text-left md:px-list-side-item-left md:py-list-height-item", activePreset !==
|
|
545
|
+
children: presets.map((preset_0) => /* @__PURE__ */ jsx(Button, {
|
|
546
|
+
onClick: () => selectPreset(preset_0),
|
|
547
|
+
className: clsx("w-full px-2 py-1 text-left md:px-list-side-item-left md:py-list-height-item", activePreset !== preset_0.label && "text-interactive-text-secondary-idle hover:text-interactive-text-secondary-hover", activePreset === preset_0.label && "bg-interactive-contained-primary-idle text-interactive-text-secondary-idle-inverted"),
|
|
491
548
|
children: /* @__PURE__ */ jsx(Typography, {
|
|
492
549
|
size: "label-2",
|
|
493
550
|
sizeMobile: "label-3",
|
|
494
551
|
as: "span",
|
|
495
552
|
className: "whitespace-nowrap",
|
|
496
|
-
children:
|
|
553
|
+
children: preset_0.label
|
|
497
554
|
})
|
|
498
|
-
},
|
|
555
|
+
}, preset_0.label))
|
|
499
556
|
}),
|
|
500
557
|
footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
|
|
501
558
|
isDisabled,
|
|
@@ -530,69 +587,297 @@ var DateRangePickerBase = (props) => {
|
|
|
530
587
|
})
|
|
531
588
|
});
|
|
532
589
|
};
|
|
533
|
-
var
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
590
|
+
var DateRangePickerInner = (t0) => {
|
|
591
|
+
const $ = c(25);
|
|
592
|
+
const { fullIso: t1, minValue, maxValue, renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
593
|
+
const fullIso = t1 === void 0 ? true : t1;
|
|
594
|
+
const ui = UIConfig.useConfig();
|
|
595
|
+
const datePickerInputContentRowCva = UIStyle.useCva("datePickerInput.contentRowCva", datePickerInputContentRow);
|
|
596
|
+
const { locale } = useLocale$1();
|
|
597
|
+
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
598
|
+
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
599
|
+
const inputRef = useRef(null);
|
|
600
|
+
const { renderRealInput } = useStaticInputHandoff({
|
|
601
|
+
inputRef,
|
|
602
|
+
renderInput,
|
|
603
|
+
setRenderInput,
|
|
604
|
+
getFocusTarget: _temp
|
|
605
|
+
});
|
|
606
|
+
const normalizedValue = props.value ?? null;
|
|
607
|
+
let t2;
|
|
608
|
+
if ($[0] !== fullIso) {
|
|
609
|
+
t2 = (range) => {
|
|
610
|
+
if (!range?.start || !range?.end) return null;
|
|
611
|
+
if (fullIso) return {
|
|
612
|
+
start: DateTimeUtils.fromCalendarDateToUTCISO(range.start),
|
|
613
|
+
end: DateTimeUtils.fromCalendarDateToUTCISO(range.end, { endOfDay: true })
|
|
614
|
+
};
|
|
615
|
+
const startDate = DateTimeUtils.fromDateValueToLocal(range.start, "UTC");
|
|
616
|
+
const endDate = DateTimeUtils.fromDateValueToLocal(range.end, "UTC");
|
|
617
|
+
return {
|
|
618
|
+
start: DateTime.fromJSDate(startDate, { zone: "UTC" }).toISODate(),
|
|
619
|
+
end: DateTime.fromJSDate(endDate, { zone: "UTC" }).toISODate()
|
|
620
|
+
};
|
|
539
621
|
};
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
622
|
+
$[0] = fullIso;
|
|
623
|
+
$[1] = t2;
|
|
624
|
+
} else t2 = $[1];
|
|
625
|
+
const formatDateRange = t2;
|
|
626
|
+
let t3;
|
|
627
|
+
if ($[2] !== fullIso) {
|
|
628
|
+
t3 = (formattedRange) => {
|
|
629
|
+
if (!formattedRange?.start || !formattedRange?.end) return null;
|
|
630
|
+
if (fullIso) return {
|
|
631
|
+
start: DateTimeUtils.fromUTCISOToCalendarDate(formattedRange.start),
|
|
632
|
+
end: DateTimeUtils.fromUTCISOToCalendarDate(formattedRange.end)
|
|
633
|
+
};
|
|
634
|
+
const startDate_0 = DateTime.fromISO(formattedRange.start, { zone: "UTC" }).toJSDate();
|
|
635
|
+
const endDate_0 = DateTime.fromISO(formattedRange.end, { zone: "UTC" }).toJSDate();
|
|
636
|
+
const startZonedDateTime = DateTimeUtils.fromLocalToZonedDateTime(startDate_0, "UTC");
|
|
637
|
+
const endZonedDateTime = DateTimeUtils.fromLocalToZonedDateTime(endDate_0, "UTC");
|
|
638
|
+
return {
|
|
639
|
+
start: toCalendarDate(startZonedDateTime),
|
|
640
|
+
end: toCalendarDate(endZonedDateTime)
|
|
641
|
+
};
|
|
545
642
|
};
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
643
|
+
$[2] = fullIso;
|
|
644
|
+
$[3] = t3;
|
|
645
|
+
} else t3 = $[3];
|
|
646
|
+
const parseDateRange = t3;
|
|
647
|
+
let t4;
|
|
648
|
+
if ($[4] !== fullIso) {
|
|
649
|
+
t4 = (formattedDate) => {
|
|
650
|
+
if (formattedDate == null) return null;
|
|
651
|
+
if (fullIso) return DateTimeUtils.fromUTCISOToCalendarDate(formattedDate);
|
|
652
|
+
const date = DateTime.fromISO(formattedDate, { zone: "UTC" }).toJSDate();
|
|
653
|
+
return toCalendarDate(DateTimeUtils.fromLocalToZonedDateTime(date, "UTC"));
|
|
552
654
|
};
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
655
|
+
$[4] = fullIso;
|
|
656
|
+
$[5] = t4;
|
|
657
|
+
} else t4 = $[5];
|
|
658
|
+
const parseCalendarDate = t4;
|
|
659
|
+
let t5;
|
|
660
|
+
if ($[6] !== minValue || $[7] !== parseCalendarDate) {
|
|
661
|
+
t5 = typeof minValue === "string" ? parseCalendarDate(minValue) : minValue;
|
|
662
|
+
$[6] = minValue;
|
|
663
|
+
$[7] = parseCalendarDate;
|
|
664
|
+
$[8] = t5;
|
|
665
|
+
} else t5 = $[8];
|
|
666
|
+
let t6;
|
|
667
|
+
if ($[9] !== maxValue || $[10] !== parseCalendarDate) {
|
|
668
|
+
t6 = typeof maxValue === "string" ? parseCalendarDate(maxValue) : maxValue;
|
|
669
|
+
$[9] = maxValue;
|
|
670
|
+
$[10] = parseCalendarDate;
|
|
671
|
+
$[11] = t6;
|
|
672
|
+
} else t6 = $[11];
|
|
673
|
+
let t7;
|
|
674
|
+
if ($[12] !== t5 || $[13] !== t6) {
|
|
675
|
+
t7 = {
|
|
676
|
+
minValue: t5,
|
|
677
|
+
maxValue: t6
|
|
560
678
|
};
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
const
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
679
|
+
$[12] = t5;
|
|
680
|
+
$[13] = t6;
|
|
681
|
+
$[14] = t7;
|
|
682
|
+
} else t7 = $[14];
|
|
683
|
+
const dateLimits = t7;
|
|
684
|
+
if (!renderInput) {
|
|
685
|
+
const startDateValue = parseCalendarDate(normalizedValue?.start ?? null);
|
|
686
|
+
const endDateValue = parseCalendarDate(normalizedValue?.end ?? null);
|
|
687
|
+
const hasProvidedRangeValue = !!(normalizedValue?.start || normalizedValue?.end);
|
|
688
|
+
const as = props.as ?? ui.input.as;
|
|
689
|
+
const size = props.size ?? ui.input.size;
|
|
690
|
+
const isDisabled = isFormControlDisabled || !!props.isDisabled;
|
|
691
|
+
const todayIcon = props.todayIcon ?? ui.dateInput.todayIcon;
|
|
692
|
+
const todayIconButtonSize = props.todayIconButtonSize ?? ui.dateInput.todayIconButtonSize;
|
|
693
|
+
const todayIconPlacement = props.todayIconPlacement ?? ui.dateInput.todayIconPlacement;
|
|
694
|
+
const staticTodayIcon = renderDatePickerTodayIcon(todayIcon, {
|
|
695
|
+
isDisabled,
|
|
696
|
+
renderStatic: true,
|
|
697
|
+
size: todayIconButtonSize
|
|
698
|
+
});
|
|
699
|
+
const disableManualEntry = props.disableManualEntry ?? ui.dateInput.disableManualEntry;
|
|
700
|
+
const showDropdown = !props.disableDropdown || disableManualEntry;
|
|
701
|
+
const staticSegments = getStaticDateRangeSegments({
|
|
702
|
+
start: startDateValue,
|
|
703
|
+
end: endDateValue,
|
|
704
|
+
locale,
|
|
705
|
+
shouldForceLeadingZeros,
|
|
706
|
+
isDisabled,
|
|
707
|
+
hidePlaceholder: as === "floating" && !hasProvidedRangeValue,
|
|
708
|
+
disableManualEntry,
|
|
709
|
+
placeholder: props.placeholder
|
|
710
|
+
});
|
|
711
|
+
return /* @__PURE__ */ jsx(InputFrame, {
|
|
712
|
+
...props,
|
|
713
|
+
isDisabled,
|
|
714
|
+
className: clsx("group relative inline-flex w-full flex-col text-left", props.className),
|
|
715
|
+
inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
|
|
716
|
+
contentClassName: "pr-0!",
|
|
717
|
+
contentWrapperClassName: datePickerInputContentRowCva({ size }),
|
|
718
|
+
labelPlacement: "content-row",
|
|
719
|
+
dataAttributes: {
|
|
720
|
+
dataIsEmpty: !hasProvidedRangeValue,
|
|
721
|
+
dataIsFilled: hasProvidedRangeValue,
|
|
722
|
+
dataIsDirty: props.isDirty,
|
|
723
|
+
dataIsRequired: props.isRequired,
|
|
724
|
+
dataIsDisabled: isDisabled,
|
|
725
|
+
dataDisabled: isDisabled,
|
|
726
|
+
dataInvalid: !!props.error,
|
|
727
|
+
dataHasSelection: hasProvidedRangeValue
|
|
728
|
+
},
|
|
729
|
+
renderStatic: true,
|
|
730
|
+
onStaticInteract: renderRealInput,
|
|
731
|
+
actionContent: staticTodayIcon,
|
|
732
|
+
actionContentPlacement: todayIconPlacement === "fieldLabel" ? "content-row" : "content-wrapper",
|
|
733
|
+
showClear: hasProvidedRangeValue,
|
|
734
|
+
wrapContentAndTrailing: true,
|
|
735
|
+
contentAndTrailingClassName: "gap-2!",
|
|
736
|
+
trailingClassName: "py-0! pl-0!",
|
|
737
|
+
action: showDropdown ? {
|
|
738
|
+
icon: ui.dateInput.calendarIcon,
|
|
739
|
+
onClick: _temp2,
|
|
740
|
+
altText: ""
|
|
741
|
+
} : void 0,
|
|
742
|
+
children: staticSegments
|
|
588
743
|
});
|
|
589
744
|
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
745
|
+
const T0 = DateRangePickerBase;
|
|
746
|
+
const t8 = mergeRefs(props.ref, inputRef);
|
|
747
|
+
const t9 = parseDateRange(normalizedValue);
|
|
748
|
+
let t10;
|
|
749
|
+
if ($[15] !== formatDateRange || $[16] !== props) {
|
|
750
|
+
t10 = (value) => props.onChange?.(formatDateRange(value));
|
|
751
|
+
$[15] = formatDateRange;
|
|
752
|
+
$[16] = props;
|
|
753
|
+
$[17] = t10;
|
|
754
|
+
} else t10 = $[17];
|
|
755
|
+
let t11;
|
|
756
|
+
if ($[18] !== T0 || $[19] !== dateLimits || $[20] !== props || $[21] !== t10 || $[22] !== t8 || $[23] !== t9) {
|
|
757
|
+
t11 = /* @__PURE__ */ jsx(T0, {
|
|
758
|
+
...props,
|
|
759
|
+
...dateLimits,
|
|
760
|
+
ref: t8,
|
|
761
|
+
value: t9,
|
|
762
|
+
onChange: t10
|
|
763
|
+
});
|
|
764
|
+
$[18] = T0;
|
|
765
|
+
$[19] = dateLimits;
|
|
766
|
+
$[20] = props;
|
|
767
|
+
$[21] = t10;
|
|
768
|
+
$[22] = t8;
|
|
769
|
+
$[23] = t9;
|
|
770
|
+
$[24] = t11;
|
|
771
|
+
} else t11 = $[24];
|
|
772
|
+
return t11;
|
|
773
|
+
};
|
|
774
|
+
var DateRangePicker = (t0) => {
|
|
775
|
+
const $ = c(30);
|
|
776
|
+
let maxValue;
|
|
777
|
+
let minValue;
|
|
778
|
+
let props;
|
|
779
|
+
let renderStaticInput;
|
|
780
|
+
let t1;
|
|
781
|
+
if ($[0] !== t0) {
|
|
782
|
+
({fullIso: t1, minValue, maxValue, renderStaticInput, ...props} = t0);
|
|
783
|
+
$[0] = t0;
|
|
784
|
+
$[1] = maxValue;
|
|
785
|
+
$[2] = minValue;
|
|
786
|
+
$[3] = props;
|
|
787
|
+
$[4] = renderStaticInput;
|
|
788
|
+
$[5] = t1;
|
|
789
|
+
} else {
|
|
790
|
+
maxValue = $[1];
|
|
791
|
+
minValue = $[2];
|
|
792
|
+
props = $[3];
|
|
793
|
+
renderStaticInput = $[4];
|
|
794
|
+
t1 = $[5];
|
|
795
|
+
}
|
|
796
|
+
const fullIso = t1 === void 0 ? true : t1;
|
|
797
|
+
if ("formControl" in props && props.formControl) {
|
|
798
|
+
let formControl;
|
|
799
|
+
let innerProps;
|
|
800
|
+
let ref;
|
|
801
|
+
if ($[6] !== props) {
|
|
802
|
+
({formControl, ref, ...innerProps} = props);
|
|
803
|
+
$[6] = props;
|
|
804
|
+
$[7] = formControl;
|
|
805
|
+
$[8] = innerProps;
|
|
806
|
+
$[9] = ref;
|
|
807
|
+
} else {
|
|
808
|
+
formControl = $[7];
|
|
809
|
+
innerProps = $[8];
|
|
810
|
+
ref = $[9];
|
|
811
|
+
}
|
|
812
|
+
const controlWithOptions = formControl.control;
|
|
813
|
+
let t2;
|
|
814
|
+
if ($[10] !== controlWithOptions._options?.disabled || $[11] !== fullIso || $[12] !== innerProps || $[13] !== maxValue || $[14] !== minValue || $[15] !== props.error || $[16] !== props.isDisabled || $[17] !== ref || $[18] !== renderStaticInput) {
|
|
815
|
+
t2 = (t3) => {
|
|
816
|
+
const { field, fieldState: t4 } = t3;
|
|
817
|
+
const { error, isDirty } = t4;
|
|
818
|
+
return /* @__PURE__ */ jsx(DateRangePickerInner, {
|
|
819
|
+
...innerProps,
|
|
820
|
+
ref: mergeRefs(ref, field.ref),
|
|
821
|
+
value: field.value ?? null,
|
|
822
|
+
onChange: field.onChange,
|
|
823
|
+
onBlur: field.onBlur,
|
|
824
|
+
isDirty,
|
|
825
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
826
|
+
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
827
|
+
error: props.error ?? error?.message,
|
|
828
|
+
fullIso,
|
|
829
|
+
minValue,
|
|
830
|
+
maxValue,
|
|
831
|
+
renderStaticInput
|
|
832
|
+
});
|
|
833
|
+
};
|
|
834
|
+
$[10] = controlWithOptions._options?.disabled;
|
|
835
|
+
$[11] = fullIso;
|
|
836
|
+
$[12] = innerProps;
|
|
837
|
+
$[13] = maxValue;
|
|
838
|
+
$[14] = minValue;
|
|
839
|
+
$[15] = props.error;
|
|
840
|
+
$[16] = props.isDisabled;
|
|
841
|
+
$[17] = ref;
|
|
842
|
+
$[18] = renderStaticInput;
|
|
843
|
+
$[19] = t2;
|
|
844
|
+
} else t2 = $[19];
|
|
845
|
+
let t3;
|
|
846
|
+
if ($[20] !== formControl.control || $[21] !== formControl.name || $[22] !== t2) {
|
|
847
|
+
t3 = /* @__PURE__ */ jsx(Controller, {
|
|
848
|
+
control: formControl.control,
|
|
849
|
+
name: formControl.name,
|
|
850
|
+
render: t2
|
|
851
|
+
});
|
|
852
|
+
$[20] = formControl.control;
|
|
853
|
+
$[21] = formControl.name;
|
|
854
|
+
$[22] = t2;
|
|
855
|
+
$[23] = t3;
|
|
856
|
+
} else t3 = $[23];
|
|
857
|
+
return t3;
|
|
858
|
+
}
|
|
859
|
+
let t2;
|
|
860
|
+
if ($[24] !== fullIso || $[25] !== maxValue || $[26] !== minValue || $[27] !== props || $[28] !== renderStaticInput) {
|
|
861
|
+
t2 = /* @__PURE__ */ jsx(DateRangePickerInner, {
|
|
862
|
+
...props,
|
|
863
|
+
fullIso,
|
|
864
|
+
minValue,
|
|
865
|
+
maxValue,
|
|
866
|
+
renderStaticInput
|
|
867
|
+
});
|
|
868
|
+
$[24] = fullIso;
|
|
869
|
+
$[25] = maxValue;
|
|
870
|
+
$[26] = minValue;
|
|
871
|
+
$[27] = props;
|
|
872
|
+
$[28] = renderStaticInput;
|
|
873
|
+
$[29] = t2;
|
|
874
|
+
} else t2 = $[29];
|
|
875
|
+
return t2;
|
|
596
876
|
};
|
|
877
|
+
function _temp(input) {
|
|
878
|
+
const container = input.getContainer?.() ?? input;
|
|
879
|
+
return container instanceof HTMLElement ? container.querySelector("input, button, [tabindex]:not([tabindex='-1'])") : null;
|
|
880
|
+
}
|
|
881
|
+
function _temp2() {}
|
|
597
882
|
//#endregion
|
|
598
883
|
export { DateRangePicker };
|