PromoCursed/node_modules/.cache/babel-loader/2deeda11dc658b23492940cc69d6c37358b6d1ea2a8d8f9ad000e72e1b55113a.json

1 line
65 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useEvent, useMergedState } from 'rc-util';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport omit from \"rc-util/es/omit\";\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport PickerTrigger from \"../PickerTrigger\";\nimport { pickTriggerProps } from \"../PickerTrigger/util\";\nimport { fillIndex, getFromDate, toArray } from \"../utils/miscUtil\";\nimport PickerContext from \"./context\";\nimport useCellRender from \"./hooks/useCellRender\";\nimport useFieldsInvalidate from \"./hooks/useFieldsInvalidate\";\nimport useFilledProps from \"./hooks/useFilledProps\";\nimport useOpen from \"./hooks/useOpen\";\nimport usePickerRef from \"./hooks/usePickerRef\";\nimport usePresets from \"./hooks/usePresets\";\nimport useRangeActive from \"./hooks/useRangeActive\";\nimport useRangeDisabledDate from \"./hooks/useRangeDisabledDate\";\nimport useRangePickerValue from \"./hooks/useRangePickerValue\";\nimport useRangeValue, { useInnerValue } from \"./hooks/useRangeValue\";\nimport useShowNow from \"./hooks/useShowNow\";\nimport Popup from \"./Popup\";\nimport RangeSelector from \"./Selector/RangeSelector\";\nfunction separateConfig(config, defaultConfig) {\n var singleConfig = config !== null && config !== void 0 ? config : defaultConfig;\n if (Array.isArray(singleConfig)) {\n return singleConfig;\n }\n return [singleConfig, singleConfig];\n}\n\n/** Used for change event, it should always be not undefined */\n\nfunction getActiveRange(activeIndex) {\n return activeIndex === 1 ? 'end' : 'start';\n}\nfunction RangePicker(props, ref) {\n // ========================= Prop =========================\n var _useFilledProps = useFilledProps(props, function () {\n var disabled = props.disabled,\n allowEmpty = props.allowEmpty;\n var mergedDisabled = separateConfig(disabled, false);\n var mergedAllowEmpty = separateConfig(allowEmpty, false);\n return {\n disabled: mergedDisabled,\n allowEmpty: mergedAllowEmpty\n };\n }),\n _useFilledProps2 = _slicedToArray(_useFilledProps, 6),\n filledProps = _useFilledProps2[0],\n internalPicker = _useFilledProps2[1],\n complexPicker = _useFilledProps2[2],\n formatList = _useFilledProps2[3],\n maskFormat = _useFilledProps2[4],\n isInvalidateDate = _useFilledProps2[5];\n var prefixCls = filledProps.prefixCls,\n styles = filledProps.styles,\n classNames = filledProps.classNames,\n placement = filledProps.placement,\n defaultValue = filledProps.defaultValue,\n value = filledProps.value,\n needConfirm = filledProps.needConfirm,\n onKeyDown = filledProps.onKeyDown,\n disabled = filledProps.disabled,\n allowEmpty = filledProps.allowEmpty,\n disabledDate = filledProps.disabledDate,\n minDate = filledProps.minDate,\n maxDate = filledProps.maxDate,\n defaultOpen = filledProps.defaultOpen,\n open = filledProps.open,\n onOpenChange = filledProps.onOpenChange,\n locale = filledProps.locale,\n generateConfig = filledProps.generateConfig,\n picker = filledProps.picker,\n showNow = filledProps.showNow,\n showToday = filledProps.showToday,\n showTime = filledProps.showTime,\n mode = filledProps.mode,\n onPanelChange = filledProps.onPanelChange,\n onCalendarChange = filledProps.onCalendarChange,\n onOk = filledProps.onOk,\n defaultPickerValue = filledProps.defaultPickerValue,\n pickerValue = filledProps.pickerValue,\n onPickerValueChange = filledProps.onPickerValueChange,\n inputReadOnly = filledProps.inputReadOnly,\n suffixIcon = filledProps.suffixIcon,\n onFocus = filledProps.onFocus,\n onBlur = filledProps.onBlur,\n presets = fi