PromoCursed/node_modules/.cache/babel-loader/0a3dff3b5fd8f6d8159efeba602e2e5a37bb09cc837507efc24d0aff84fbac93.json
2024-08-20 23:25:37 +04:00

1 line
29 KiB
JSON

{"ast":null,"code":"import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport { useEvent, useMergedState } from 'rc-util';\nimport * as React from 'react';\nimport useSyncState from \"../../hooks/useSyncState\";\nimport { formatValue, isSame, isSameTimestamp } from \"../../utils/dateUtil\";\nimport { fillIndex } from \"../../utils/miscUtil\";\nimport useLockEffect from \"./useLockEffect\";\nvar EMPTY_VALUE = [];\n\n// Submit Logic:\n// * ✅ Value:\n// * merged value using controlled value, if not, use stateValue\n// * When merged value change, [1] resync calendar value and submit value\n// * ✅ Calender Value:\n// * 💻 When user typing is validate, change the calendar value\n// * 🌅 When user click on the panel, change the calendar value\n// * Submit Value:\n// * 💻 When user blur the input, flush calendar value to submit value\n// * 🌅 When user click on the panel is no needConfirm, flush calendar value to submit value\n// * 🌅 When user click on the panel is needConfirm and click OK, flush calendar value to submit value\n// * Blur logic & close logic:\n// * ✅ For value, always try flush submit\n// * ✅ If `needConfirm`, reset as [1]\n// * Else (`!needConfirm`)\n// * If has another index field, active another index\n// * ✅ Flush submit:\n// * If all the start & end field is confirmed or all blur or panel closed\n// * Update `needSubmit` mark to true\n// * trigger onChange by `needSubmit` and update stateValue\n\nfunction useUtil(generateConfig, locale, formatList) {\n var getDateTexts = function getDateTexts(dates) {\n return dates.map(function (date) {\n return formatValue(date, {\n generateConfig: generateConfig,\n locale: locale,\n format: formatList[0]\n });\n });\n };\n var isSameDates = function isSameDates(source, target) {\n var maxLen = Math.max(source.length, target.length);\n var diffIndex = -1;\n for (var i = 0; i < maxLen; i += 1) {\n var prev = source[i] || null;\n var next = target[i] || null;\n if (prev !== next && !isSameTimestamp(generateConfig, prev, next)) {\n diffIndex = i;\n break;\n }\n }\n return [diffIndex < 0, diffIndex !== 0];\n };\n return [getDateTexts, isSameDates];\n}\nfunction orderDates(dates, generateConfig) {\n return _toConsumableArray(dates).sort(function (a, b) {\n return generateConfig.isAfter(a, b) ? 1 : -1;\n });\n}\n\n/**\n * Used for internal value management.\n * It should always use `mergedValue` in render logic\n */\nexport function useCalendarValue(mergedValue) {\n var _useSyncState = useSyncState(mergedValue),\n _useSyncState2 = _slicedToArray(_useSyncState, 2),\n calendarValue = _useSyncState2[0],\n setCalendarValue = _useSyncState2[1];\n\n /** Sync calendarValue & submitValue back with value */\n var syncWithValue = useEvent(function () {\n setCalendarValue(mergedValue);\n });\n React.useEffect(function () {\n syncWithValue();\n }, [mergedValue]);\n return [calendarValue, setCalendarValue];\n}\n\n/**\n * Control the internal `value` align with prop `value` and provide a temp `calendarValue` for ui.\n * `calendarValue` will be reset when blur & focus & open.\n */\nexport function useInnerValue(generateConfig, locale, formatList, /** Used for RangePicker. `true` means [DateType, DateType] or will be DateType[] */\nrangeValue,\n/**\n * Trigger order when trigger calendar value change.\n * This should only used in SinglePicker with `multiple` mode.\n * So when `rangeValue` is `true`, order will be ignored.\n */\norder, defaultValue, value, onCalendarChange, onOk) {\n // This is the root value which will sync with controlled or uncontrolled value\n var _useMergedState = useMergedState(defaultValue, {\n value: value\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n innerValue = _useMergedState2[0],\n setInnerValue = _useMergedState2[1];\n var mergedValue = innerValue || EMPTY_VALUE;\n\n // ========================= Inner Values =========================\n var _useCalendarValue = useCalendarValue(mergedValue),\n _useCalendarValue2 = _slicedToArray(_useCalendarValue, 2),\n calendarValue = _useCalendarValue2[0],\n setCalendarValue = _useCalendarValue2[1];\n\n // ============================ Change ============================\n var _useUtil = useUtil(generateConfig, locale, formatList),\n _useUtil2 = _slicedToArray(_useUtil, 2),\n getDateTexts = _useUtil2[0],\n isSameDates = _useUtil2[1];\n var triggerCalendarChange = useEvent(function (nextCalendarValues) {\n var clone = _toConsumableArray(nextCalendarValues);\n if (rangeValue) {\n for (var i = 0; i < 2; i += 1) {\n clone[i] = clone[i] || null;\n }\n } else if (order) {\n clone = orderDates(clone.filter(function (date) {\n return date;\n }), generateConfig);\n }\n\n // Update merged value\n var _isSameDates = isSameDates(calendarValue(), clone),\n _isSameDates2 = _slicedToArray(_isSameDates, 2),\n isSameMergedDates = _isSameDates2[0],\n isSameStart = _isSameDates2[1];\n if (!isSameMergedDates) {\n setCalendarValue(clone);\n\n // Trigger calendar change event\n if (onCalendarChange) {\n var cellTexts = getDateTexts(clone);\n onCalendarChange(clone, cellTexts, {\n range: isSameStart ? 'end' : 'start'\n });\n }\n }\n });\n var triggerOk = function triggerOk() {\n if (onOk) {\n onOk(calendarValue());\n }\n };\n return [mergedValue, setInnerValue, calendarValue, triggerCalendarChange, triggerOk];\n}\nexport default function useRangeValue(info, mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, disabled, formatList, focused, open, isInvalidateDate) {\n var generateConfig = info.generateConfig,\n locale = info.locale,\n picker = info.picker,\n onChange = info.onChange,\n allowEmpty = info.allowEmpty,\n order = info.order;\n var orderOnChange = disabled.some(function (d) {\n return d;\n }) ? false : order;\n\n // ============================= Util =============================\n var _useUtil3 = useUtil(generateConfig, locale, formatList),\n _useUtil4 = _slicedToArray(_useUtil3, 2),\n getDateTexts = _useUtil4[0],\n isSameDates = _useUtil4[1];\n\n // ============================ Values ============================\n // Used for trigger `onChange` event.\n // Record current value which is wait for submit.\n var _useSyncState3 = useSyncState(mergedValue),\n _useSyncState4 = _slicedToArray(_useSyncState3, 2),\n submitValue = _useSyncState4[0],\n setSubmitValue = _useSyncState4[1];\n\n /** Sync calendarValue & submitValue back with value */\n var syncWithValue = useEvent(function () {\n setSubmitValue(mergedValue);\n });\n React.useEffect(function () {\n syncWithValue();\n }, [mergedValue]);\n\n // ============================ Submit ============================\n var triggerSubmit = useEvent(function (nextValue) {\n var isNullValue = nextValue === null;\n var clone = _toConsumableArray(nextValue || submitValue());\n\n // Fill null value\n if (isNullValue) {\n var maxLen = Math.max(disabled.length, clone.length);\n for (var i = 0; i < maxLen; i += 1) {\n if (!disabled[i]) {\n clone[i] = null;\n }\n }\n }\n\n // Only when exist value to sort\n if (orderOnChange && clone[0] && clone[1]) {\n clone = orderDates(clone, generateConfig);\n }\n\n // Sync `calendarValue`\n triggerCalendarChange(clone);\n\n // ========= Validate check =========\n var _clone = clone,\n _clone2 = _slicedToArray(_clone, 2),\n start = _clone2[0],\n end = _clone2[1];\n\n // >>> Empty\n var startEmpty = !start;\n var endEmpty = !end;\n var validateEmptyDateRange = allowEmpty ?\n // Validate empty start\n (!startEmpty || allowEmpty[0]) && (\n // Validate empty end\n !endEmpty || allowEmpty[1]) : true;\n\n // >>> Order\n var validateOrder = !order || startEmpty || endEmpty || isSame(generateConfig, locale, start, end, picker) || generateConfig.isAfter(end, start);\n\n // >>> Invalid\n var validateDates =\n // Validate start\n (!start || !isInvalidateDate(start, {\n activeIndex: 0\n })) && (\n // Validate end\n !end || !isInvalidateDate(end, {\n from: start,\n activeIndex: 1\n }));\n\n // >>> Result\n var allPassed =\n // Null value is from clear button\n isNullValue ||\n // Normal check\n validateEmptyDateRange && validateOrder && validateDates;\n if (allPassed) {\n // Sync value with submit value\n setInnerValue(clone);\n var _isSameDates3 = isSameDates(clone, mergedValue),\n _isSameDates4 = _slicedToArray(_isSameDates3, 1),\n isSameMergedDates = _isSameDates4[0];\n\n // Trigger `onChange` if needed\n if (onChange && !isSameMergedDates) {\n onChange(\n // Return null directly if all date are empty\n isNullValue && clone.every(function (val) {\n return !val;\n }) ? null : clone, getDateTexts(clone));\n }\n }\n return allPassed;\n });\n\n // ========================= Flush Submit =========================\n var flushSubmit = useEvent(function (index, needTriggerChange) {\n var nextSubmitValue = fillIndex(submitValue(), index, getCalendarValue()[index]);\n setSubmitValue(nextSubmitValue);\n if (needTriggerChange) {\n triggerSubmit();\n }\n });\n\n // ============================ Effect ============================\n // All finished action trigger after 2 frames\n var interactiveFinished = !focused && !open;\n useLockEffect(!interactiveFinished, function () {\n if (interactiveFinished) {\n // Always try to trigger submit first\n triggerSubmit();\n\n // Trigger calendar change since this is a effect reset\n // https://github.com/ant-design/ant-design/issues/22351\n triggerCalendarChange(mergedValue);\n\n // Sync with value anyway\n syncWithValue();\n }\n }, 2);\n\n // ============================ Return ============================\n return [flushSubmit, triggerSubmit];\n}","map":{"version":3,"names":["_slicedToArray","_toConsumableArray","useEvent","useMergedState","React","useSyncState","formatValue","isSame","isSameTimestamp","fillIndex","useLockEffect","EMPTY_VALUE","useUtil","generateConfig","locale","formatList","getDateTexts","dates","map","date","format","isSameDates","source","target","maxLen","Math","max","length","diffIndex","i","prev","next","orderDates","sort","a","b","isAfter","useCalendarValue","mergedValue","_useSyncState","_useSyncState2","calendarValue","setCalendarValue","syncWithValue","useEffect","useInnerValue","rangeValue","order","defaultValue","value","onCalendarChange","onOk","_useMergedState","_useMergedState2","innerValue","setInnerValue","_useCalendarValue","_useCalendarValue2","_useUtil","_useUtil2","triggerCalendarChange","nextCalendarValues","clone","filter","_isSameDates","_isSameDates2","isSameMergedDates","isSameStart","cellTexts","range","triggerOk","useRangeValue","info","getCalendarValue","disabled","focused","open","isInvalidateDate","picker","onChange","allowEmpty","orderOnChange","some","d","_useUtil3","_useUtil4","_useSyncState3","_useSyncState4","submitValue","setSubmitValue","triggerSubmit","nextValue","isNullValue","_clone","_clone2","start","end","startEmpty","endEmpty","validateEmptyDateRange","validateOrder","validateDates","activeIndex","from","allPassed","_isSameDates3","_isSameDates4","every","val","flushSubmit","index","needTriggerChange","nextSubmitValue","interactiveFinished"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-picker/es/PickerInput/hooks/useRangeValue.js"],"sourcesContent":["import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport { useEvent, useMergedState } from 'rc-util';\nimport * as React from 'react';\nimport useSyncState from \"../../hooks/useSyncState\";\nimport { formatValue, isSame, isSameTimestamp } from \"../../utils/dateUtil\";\nimport { fillIndex } from \"../../utils/miscUtil\";\nimport useLockEffect from \"./useLockEffect\";\nvar EMPTY_VALUE = [];\n\n// Submit Logic:\n// * ✅ Value:\n// * merged value using controlled value, if not, use stateValue\n// * When merged value change, [1] resync calendar value and submit value\n// * ✅ Calender Value:\n// * 💻 When user typing is validate, change the calendar value\n// * 🌅 When user click on the panel, change the calendar value\n// * Submit Value:\n// * 💻 When user blur the input, flush calendar value to submit value\n// * 🌅 When user click on the panel is no needConfirm, flush calendar value to submit value\n// * 🌅 When user click on the panel is needConfirm and click OK, flush calendar value to submit value\n// * Blur logic & close logic:\n// * ✅ For value, always try flush submit\n// * ✅ If `needConfirm`, reset as [1]\n// * Else (`!needConfirm`)\n// * If has another index field, active another index\n// * ✅ Flush submit:\n// * If all the start & end field is confirmed or all blur or panel closed\n// * Update `needSubmit` mark to true\n// * trigger onChange by `needSubmit` and update stateValue\n\nfunction useUtil(generateConfig, locale, formatList) {\n var getDateTexts = function getDateTexts(dates) {\n return dates.map(function (date) {\n return formatValue(date, {\n generateConfig: generateConfig,\n locale: locale,\n format: formatList[0]\n });\n });\n };\n var isSameDates = function isSameDates(source, target) {\n var maxLen = Math.max(source.length, target.length);\n var diffIndex = -1;\n for (var i = 0; i < maxLen; i += 1) {\n var prev = source[i] || null;\n var next = target[i] || null;\n if (prev !== next && !isSameTimestamp(generateConfig, prev, next)) {\n diffIndex = i;\n break;\n }\n }\n return [diffIndex < 0, diffIndex !== 0];\n };\n return [getDateTexts, isSameDates];\n}\nfunction orderDates(dates, generateConfig) {\n return _toConsumableArray(dates).sort(function (a, b) {\n return generateConfig.isAfter(a, b) ? 1 : -1;\n });\n}\n\n/**\n * Used for internal value management.\n * It should always use `mergedValue` in render logic\n */\nexport function useCalendarValue(mergedValue) {\n var _useSyncState = useSyncState(mergedValue),\n _useSyncState2 = _slicedToArray(_useSyncState, 2),\n calendarValue = _useSyncState2[0],\n setCalendarValue = _useSyncState2[1];\n\n /** Sync calendarValue & submitValue back with value */\n var syncWithValue = useEvent(function () {\n setCalendarValue(mergedValue);\n });\n React.useEffect(function () {\n syncWithValue();\n }, [mergedValue]);\n return [calendarValue, setCalendarValue];\n}\n\n/**\n * Control the internal `value` align with prop `value` and provide a temp `calendarValue` for ui.\n * `calendarValue` will be reset when blur & focus & open.\n */\nexport function useInnerValue(generateConfig, locale, formatList, /** Used for RangePicker. `true` means [DateType, DateType] or will be DateType[] */\nrangeValue,\n/**\n * Trigger order when trigger calendar value change.\n * This should only used in SinglePicker with `multiple` mode.\n * So when `rangeValue` is `true`, order will be ignored.\n */\norder, defaultValue, value, onCalendarChange, onOk) {\n // This is the root value which will sync with controlled or uncontrolled value\n var _useMergedState = useMergedState(defaultValue, {\n value: value\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n innerValue = _useMergedState2[0],\n setInnerValue = _useMergedState2[1];\n var mergedValue = innerValue || EMPTY_VALUE;\n\n // ========================= Inner Values =========================\n var _useCalendarValue = useCalendarValue(mergedValue),\n _useCalendarValue2 = _slicedToArray(_useCalendarValue, 2),\n calendarValue = _useCalendarValue2[0],\n setCalendarValue = _useCalendarValue2[1];\n\n // ============================ Change ============================\n var _useUtil = useUtil(generateConfig, locale, formatList),\n _useUtil2 = _slicedToArray(_useUtil, 2),\n getDateTexts = _useUtil2[0],\n isSameDates = _useUtil2[1];\n var triggerCalendarChange = useEvent(function (nextCalendarValues) {\n var clone = _toConsumableArray(nextCalendarValues);\n if (rangeValue) {\n for (var i = 0; i < 2; i += 1) {\n clone[i] = clone[i] || null;\n }\n } else if (order) {\n clone = orderDates(clone.filter(function (date) {\n return date;\n }), generateConfig);\n }\n\n // Update merged value\n var _isSameDates = isSameDates(calendarValue(), clone),\n _isSameDates2 = _slicedToArray(_isSameDates, 2),\n isSameMergedDates = _isSameDates2[0],\n isSameStart = _isSameDates2[1];\n if (!isSameMergedDates) {\n setCalendarValue(clone);\n\n // Trigger calendar change event\n if (onCalendarChange) {\n var cellTexts = getDateTexts(clone);\n onCalendarChange(clone, cellTexts, {\n range: isSameStart ? 'end' : 'start'\n });\n }\n }\n });\n var triggerOk = function triggerOk() {\n if (onOk) {\n onOk(calendarValue());\n }\n };\n return [mergedValue, setInnerValue, calendarValue, triggerCalendarChange, triggerOk];\n}\nexport default function useRangeValue(info, mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, disabled, formatList, focused, open, isInvalidateDate) {\n var generateConfig = info.generateConfig,\n locale = info.locale,\n picker = info.picker,\n onChange = info.onChange,\n allowEmpty = info.allowEmpty,\n order = info.order;\n var orderOnChange = disabled.some(function (d) {\n return d;\n }) ? false : order;\n\n // ============================= Util =============================\n var _useUtil3 = useUtil(generateConfig, locale, formatList),\n _useUtil4 = _slicedToArray(_useUtil3, 2),\n getDateTexts = _useUtil4[0],\n isSameDates = _useUtil4[1];\n\n // ============================ Values ============================\n // Used for trigger `onChange` event.\n // Record current value which is wait for submit.\n var _useSyncState3 = useSyncState(mergedValue),\n _useSyncState4 = _slicedToArray(_useSyncState3, 2),\n submitValue = _useSyncState4[0],\n setSubmitValue = _useSyncState4[1];\n\n /** Sync calendarValue & submitValue back with value */\n var syncWithValue = useEvent(function () {\n setSubmitValue(mergedValue);\n });\n React.useEffect(function () {\n syncWithValue();\n }, [mergedValue]);\n\n // ============================ Submit ============================\n var triggerSubmit = useEvent(function (nextValue) {\n var isNullValue = nextValue === null;\n var clone = _toConsumableArray(nextValue || submitValue());\n\n // Fill null value\n if (isNullValue) {\n var maxLen = Math.max(disabled.length, clone.length);\n for (var i = 0; i < maxLen; i += 1) {\n if (!disabled[i]) {\n clone[i] = null;\n }\n }\n }\n\n // Only when exist value to sort\n if (orderOnChange && clone[0] && clone[1]) {\n clone = orderDates(clone, generateConfig);\n }\n\n // Sync `calendarValue`\n triggerCalendarChange(clone);\n\n // ========= Validate check =========\n var _clone = clone,\n _clone2 = _slicedToArray(_clone, 2),\n start = _clone2[0],\n end = _clone2[1];\n\n // >>> Empty\n var startEmpty = !start;\n var endEmpty = !end;\n var validateEmptyDateRange = allowEmpty ?\n // Validate empty start\n (!startEmpty || allowEmpty[0]) && (\n // Validate empty end\n !endEmpty || allowEmpty[1]) : true;\n\n // >>> Order\n var validateOrder = !order || startEmpty || endEmpty || isSame(generateConfig, locale, start, end, picker) || generateConfig.isAfter(end, start);\n\n // >>> Invalid\n var validateDates =\n // Validate start\n (!start || !isInvalidateDate(start, {\n activeIndex: 0\n })) && (\n // Validate end\n !end || !isInvalidateDate(end, {\n from: start,\n activeIndex: 1\n }));\n\n // >>> Result\n var allPassed =\n // Null value is from clear button\n isNullValue ||\n // Normal check\n validateEmptyDateRange && validateOrder && validateDates;\n if (allPassed) {\n // Sync value with submit value\n setInnerValue(clone);\n var _isSameDates3 = isSameDates(clone, mergedValue),\n _isSameDates4 = _slicedToArray(_isSameDates3, 1),\n isSameMergedDates = _isSameDates4[0];\n\n // Trigger `onChange` if needed\n if (onChange && !isSameMergedDates) {\n onChange(\n // Return null directly if all date are empty\n isNullValue && clone.every(function (val) {\n return !val;\n }) ? null : clone, getDateTexts(clone));\n }\n }\n return allPassed;\n });\n\n // ========================= Flush Submit =========================\n var flushSubmit = useEvent(function (index, needTriggerChange) {\n var nextSubmitValue = fillIndex(submitValue(), index, getCalendarValue()[index]);\n setSubmitValue(nextSubmitValue);\n if (needTriggerChange) {\n triggerSubmit();\n }\n });\n\n // ============================ Effect ============================\n // All finished action trigger after 2 frames\n var interactiveFinished = !focused && !open;\n useLockEffect(!interactiveFinished, function () {\n if (interactiveFinished) {\n // Always try to trigger submit first\n triggerSubmit();\n\n // Trigger calendar change since this is a effect reset\n // https://github.com/ant-design/ant-design/issues/22351\n triggerCalendarChange(mergedValue);\n\n // Sync with value anyway\n syncWithValue();\n }\n }, 2);\n\n // ============================ Return ============================\n return [flushSubmit, triggerSubmit];\n}"],"mappings":"AAAA,OAAOA,cAAc,MAAM,0CAA0C;AACrE,OAAOC,kBAAkB,MAAM,8CAA8C;AA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