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

1 line
8.3 KiB
JSON

{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport React from 'react';\nexport function fillTimeFormat(showHour, showMinute, showSecond, showMillisecond, showMeridiem) {\n var timeFormat = '';\n\n // Base HH:mm:ss\n var cells = [];\n if (showHour) {\n cells.push(showMeridiem ? 'hh' : 'HH');\n }\n if (showMinute) {\n cells.push('mm');\n }\n if (showSecond) {\n cells.push('ss');\n }\n timeFormat = cells.join(':');\n\n // Millisecond\n if (showMillisecond) {\n timeFormat += '.SSS';\n }\n\n // Meridiem\n if (showMeridiem) {\n timeFormat += ' A';\n }\n return timeFormat;\n}\n\n/**\n * Used for `useFilledProps` since it already in the React.useMemo\n */\nfunction fillLocale(locale, showHour, showMinute, showSecond, showMillisecond, use12Hours) {\n // Not fill `monthFormat` since `locale.shortMonths` handle this\n // Not fill `cellMeridiemFormat` since AM & PM by default\n var fieldDateTimeFormat = locale.fieldDateTimeFormat,\n fieldDateFormat = locale.fieldDateFormat,\n fieldTimeFormat = locale.fieldTimeFormat,\n fieldMonthFormat = locale.fieldMonthFormat,\n fieldYearFormat = locale.fieldYearFormat,\n fieldWeekFormat = locale.fieldWeekFormat,\n fieldQuarterFormat = locale.fieldQuarterFormat,\n yearFormat = locale.yearFormat,\n cellYearFormat = locale.cellYearFormat,\n cellQuarterFormat = locale.cellQuarterFormat,\n dayFormat = locale.dayFormat,\n cellDateFormat = locale.cellDateFormat;\n var timeFormat = fillTimeFormat(showHour, showMinute, showSecond, showMillisecond, use12Hours);\n return _objectSpread(_objectSpread({}, locale), {}, {\n fieldDateTimeFormat: fieldDateTimeFormat || \"YYYY-MM-DD \".concat(timeFormat),\n fieldDateFormat: fieldDateFormat || 'YYYY-MM-DD',\n fieldTimeFormat: fieldTimeFormat || timeFormat,\n fieldMonthFormat: fieldMonthFormat || 'YYYY-MM',\n fieldYearFormat: fieldYearFormat || 'YYYY',\n fieldWeekFormat: fieldWeekFormat || 'gggg-wo',\n fieldQuarterFormat: fieldQuarterFormat || 'YYYY-[Q]Q',\n yearFormat: yearFormat || 'YYYY',\n cellYearFormat: cellYearFormat || 'YYYY',\n cellQuarterFormat: cellQuarterFormat || '[Q]Q',\n cellDateFormat: cellDateFormat || dayFormat || 'D'\n });\n}\n\n/**\n * Fill locale format as start up\n */\nexport default function useLocale(locale, showProps) {\n var showHour = showProps.showHour,\n showMinute = showProps.showMinute,\n showSecond = showProps.showSecond,\n showMillisecond = showProps.showMillisecond,\n use12Hours = showProps.use12Hours;\n return React.useMemo(function () {\n return fillLocale(locale, showHour, showMinute, showSecond, showMillisecond, use12Hours);\n }, [locale, showHour, showMinute, showSecond, showMillisecond, use12Hours]);\n}","map":{"version":3,"names":["_objectSpread","React","fillTimeFormat","showHour","showMinute","showSecond","showMillisecond","showMeridiem","timeFormat","cells","push","join","fillLocale","locale","use12Hours","fieldDateTimeFormat","fieldDateFormat","fieldTimeFormat","fieldMonthFormat","fieldYearFormat","fieldWeekFormat","fieldQuarterFormat","yearFormat","cellYearFormat","cellQuarterFormat","dayFormat","cellDateFormat","concat","useLocale","showProps","useMemo"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-picker/es/hooks/useLocale.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport React from 'react';\nexport function fillTimeFormat(showHour, showMinute, showSecond, showMillisecond, showMeridiem) {\n var timeFormat = '';\n\n // Base HH:mm:ss\n var cells = [];\n if (showHour) {\n cells.push(showMeridiem ? 'hh' : 'HH');\n }\n if (showMinute) {\n cells.push('mm');\n }\n if (showSecond) {\n cells.push('ss');\n }\n timeFormat = cells.join(':');\n\n // Millisecond\n if (showMillisecond) {\n timeFormat += '.SSS';\n }\n\n // Meridiem\n if (showMeridiem) {\n timeFormat += ' A';\n }\n return timeFormat;\n}\n\n/**\n * Used for `useFilledProps` since it already in the React.useMemo\n */\nfunction fillLocale(locale, showHour, showMinute, showSecond, showMillisecond, use12Hours) {\n // Not fill `monthFormat` since `locale.shortMonths` handle this\n // Not fill `cellMeridiemFormat` since AM & PM by default\n var fieldDateTimeFormat = locale.fieldDateTimeFormat,\n fieldDateFormat = locale.fieldDateFormat,\n fieldTimeFormat = locale.fieldTimeFormat,\n fieldMonthFormat = locale.fieldMonthFormat,\n fieldYearFormat = locale.fieldYearFormat,\n fieldWeekFormat = locale.fieldWeekFormat,\n fieldQuarterFormat = locale.fieldQuarterFormat,\n yearFormat = locale.yearFormat,\n cellYearFormat = locale.cellYearFormat,\n cellQuarterFormat = locale.cellQuarterFormat,\n dayFormat = locale.dayFormat,\n cellDateFormat = locale.cellDateFormat;\n var timeFormat = fillTimeFormat(showHour, showMinute, showSecond, showMillisecond, use12Hours);\n return _objectSpread(_objectSpread({}, locale), {}, {\n fieldDateTimeFormat: fieldDateTimeFormat || \"YYYY-MM-DD \".concat(timeFormat),\n fieldDateFormat: fieldDateFormat || 'YYYY-MM-DD',\n fieldTimeFormat: fieldTimeFormat || timeFormat,\n fieldMonthFormat: fieldMonthFormat || 'YYYY-MM',\n fieldYearFormat: fieldYearFormat || 'YYYY',\n fieldWeekFormat: fieldWeekFormat || 'gggg-wo',\n fieldQuarterFormat: fieldQuarterFormat || 'YYYY-[Q]Q',\n yearFormat: yearFormat || 'YYYY',\n cellYearFormat: cellYearFormat || 'YYYY',\n cellQuarterFormat: cellQuarterFormat || '[Q]Q',\n cellDateFormat: cellDateFormat || dayFormat || 'D'\n });\n}\n\n/**\n * Fill locale format as start up\n */\nexport default function useLocale(locale, showProps) {\n var showHour = showProps.showHour,\n showMinute = showProps.showMinute,\n showSecond = showProps.showSecond,\n showMillisecond = showProps.showMillisecond,\n use12Hours = showProps.use12Hours;\n return React.useMemo(function () {\n return fillLocale(locale, showHour, showMinute, showSecond, showMillisecond, use12Hours);\n }, [locale, showHour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