PromoCursed/node_modules/.cache/babel-loader/361707c95046fb840c58f7fd16db902a10d732dd2b35f9ff8e3443f7402df825.json

1 line
28 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport { forwardRef, useContext, useImperativeHandle } from 'react';\nimport CalendarOutlined from \"@ant-design/icons/es/icons/CalendarOutlined\";\nimport ClockCircleOutlined from \"@ant-design/icons/es/icons/ClockCircleOutlined\";\nimport classNames from 'classnames';\nimport RCPicker from 'rc-picker';\nimport ContextIsolator from '../../_util/ContextIsolator';\nimport { useZIndex } from '../../_util/hooks/useZIndex';\nimport { getMergedStatus, getStatusClassNames } from '../../_util/statusUtils';\nimport { devUseWarning } from '../../_util/warning';\nimport { ConfigContext } from '../../config-provider';\nimport DisabledContext from '../../config-provider/DisabledContext';\nimport useCSSVarCls from '../../config-provider/hooks/useCSSVarCls';\nimport useSize from '../../config-provider/hooks/useSize';\nimport { FormItemInputContext } from '../../form/context';\nimport useVariant from '../../form/hooks/useVariants';\nimport { useLocale } from '../../locale';\nimport { useCompactItemContext } from '../../space/Compact';\nimport enUS from '../locale/en_US';\nimport useStyle from '../style';\nimport { getPlaceholder, transPlacement2DropdownAlign, useIcons } from '../util';\nimport { MONTH, MONTHPICKER, QUARTER, QUARTERPICKER, TIME, TIMEPICKER, WEEK, WEEKPICKER, YEAR, YEARPICKER } from './constant';\nimport useComponents from './useComponents';\nconst generatePicker = generateConfig => {\n const getPicker = (picker, displayName) => {\n const consumerName = displayName === TIMEPICKER ? 'timePicker' : 'datePicker';\n const Picker = /*#__PURE__*/forwardRef((props, ref) => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n getPopupContainer: customizeGetPopupContainer,\n components,\n style,\n className,\n rootClassName,\n size: customizeSize,\n bordered,\n placement,\n placeholder,\n popupClassName,\n dropdownClassName,\n disabled: customDisabled,\n status: customStatus,\n variant: customVariant,\n onCalendarChange\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"getPopupContainer\", \"components\", \"style\", \"className\", \"rootClassName\", \"size\", \"bordered\", \"placement\", \"placeholder\", \"popupClassName\", \"dropdownClassName\", \"disabled\", \"status\", \"variant\", \"onCalendarChange\"]);\n const {\n getPrefixCls,\n direction,\n getPopupContainer,\n // Consume different styles according to different names\n [consumerName]: consumerStyle\n } = useContext(ConfigContext);\n const prefixCls = getPrefixCls('picker', customizePrefixCls);\n const {\n compactSize,\n compactItemClassnames\n } = useCompactItemContext(prefixCls, direction);\n const innerRef = React.useRef(null);\n const [variant, enableVariantCls] = useVariant('datePicker', customVariant, bordered);\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n useImperativeHandle(ref, () => innerRef.current);\n const additionalProps = {\n showToday: true\n };\n const mergedPicker = picker || props.picker;\n const rootPrefixCls = getPrefixCls();\n // ==================== Legacy =====================\n const {\n onSelect,\n multiple\n } = restProps;\n const hasLegacyOnSelect = onSelect && picker === 'time' && !multiple;\n const onInternalCalendarCh