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

1 line
7.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"ast":null,"code":"import classNames from 'classnames';\nimport Overflow from 'rc-overflow';\nimport * as React from 'react';\nexport default function MultipleDates(props) {\n var prefixCls = props.prefixCls,\n value = props.value,\n onRemove = props.onRemove,\n _props$removeIcon = props.removeIcon,\n removeIcon = _props$removeIcon === void 0 ? '×' : _props$removeIcon,\n formatDate = props.formatDate,\n disabled = props.disabled,\n maxTagCount = props.maxTagCount,\n placeholder = props.placeholder;\n var selectorCls = \"\".concat(prefixCls, \"-selector\");\n var selectionCls = \"\".concat(prefixCls, \"-selection\");\n var overflowCls = \"\".concat(selectionCls, \"-overflow\");\n\n // ========================= Item =========================\n function renderSelector(content, onClose) {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(selectionCls, \"-item\")),\n title: typeof content === 'string' ? content : null\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(selectionCls, \"-item-content\")\n }, content), !disabled && onClose && /*#__PURE__*/React.createElement(\"span\", {\n onMouseDown: function onMouseDown(e) {\n e.preventDefault();\n },\n onClick: onClose,\n className: \"\".concat(selectionCls, \"-item-remove\")\n }, removeIcon));\n }\n function renderItem(date) {\n var displayLabel = formatDate(date);\n var onClose = function onClose(event) {\n if (event) event.stopPropagation();\n onRemove(date);\n };\n return renderSelector(displayLabel, onClose);\n }\n\n // ========================= Rest =========================\n function renderRest(omittedValues) {\n var content = \"+ \".concat(omittedValues.length, \" ...\");\n return renderSelector(content);\n }\n\n // ======================== Render ========================\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: selectorCls\n }, /*#__PURE__*/React.createElement(Overflow, {\n prefixCls: overflowCls,\n data: value,\n renderItem: renderItem,\n renderRest: renderRest\n // suffix={inputNode}\n ,\n\n itemKey: function itemKey(date) {\n return formatDate(date);\n },\n maxCount: maxTagCount\n }), !value.length && /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-selection-placeholder\")\n }, placeholder));\n}","map":{"version":3,"names":["classNames","Overflow","React","MultipleDates","props","prefixCls","value","onRemove","_props$removeIcon","removeIcon","formatDate","disabled","maxTagCount","placeholder","selectorCls","concat","selectionCls","overflowCls","renderSelector","content","onClose","createElement","className","title","onMouseDown","e","preventDefault","onClick","renderItem","date","displayLabel","event","stopPropagation","renderRest","omittedValues","length","data","itemKey","maxCount"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-picker/es/PickerInput/Selector/SingleSelector/MultipleDates.js"],"sourcesContent":["import classNames from 'classnames';\nimport Overflow from 'rc-overflow';\nimport * as React from 'react';\nexport default function MultipleDates(props) {\n var prefixCls = props.prefixCls,\n value = props.value,\n onRemove = props.onRemove,\n _props$removeIcon = props.removeIcon,\n removeIcon = _props$removeIcon === void 0 ? '×' : _props$removeIcon,\n formatDate = props.formatDate,\n disabled = props.disabled,\n maxTagCount = props.maxTagCount,\n placeholder = props.placeholder;\n var selectorCls = \"\".concat(prefixCls, \"-selector\");\n var selectionCls = \"\".concat(prefixCls, \"-selection\");\n var overflowCls = \"\".concat(selectionCls, \"-overflow\");\n\n // ========================= Item =========================\n function renderSelector(content, onClose) {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(selectionCls, \"-item\")),\n title: typeof content === 'string' ? content : null\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(selectionCls, \"-item-content\")\n }, content), !disabled && onClose && /*#__PURE__*/React.createElement(\"span\", {\n onMouseDown: function onMouseDown(e) {\n e.preventDefault();\n },\n onClick: onClose,\n className: \"\".concat(selectionCls, \"-item-remove\")\n }, removeIcon));\n }\n function renderItem(date) {\n var displayLabel = formatDate(date);\n var onClose = function onClose(event) {\n if (event) event.stopPropagation();\n onRemove(date);\n };\n return renderSelector(displayLabel, onClose);\n }\n\n // ========================= Rest =========================\n function renderRest(omittedValues) {\n var content = \"+ \".concat(omittedValues.length, \" ...\");\n return renderSelector(content);\n }\n\n // ======================== Render ========================\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: selectorCls\n }, /*#__PURE__*/React.createElement(Overflow, {\n prefixCls: overflowCls,\n data: value,\n renderItem: renderItem,\n renderRest: renderRest\n // suffix={inputNode}\n ,\n itemKey: function itemKey(date) {\n return formatDate(date);\n },\n maxCount: maxTagCount\n }), !value.length && /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-selection-placeholder\")\n }, placeholder));\n}"],"mappings":"AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,eAAe,SAASC,aAAaA,CAACC,KAAK,EAAE;EAC3C,IAAIC,SAAS,GAAGD,KAAK,CAACC,SAAS;IAC7BC,KAAK,GAAGF,KAAK,CAACE,KAAK;IACnBC,QAAQ,GAAGH,KAAK,CAACG,QAAQ;IACzBC,iBAAiB,GAAGJ,KAAK,CAACK,UAAU;IACpCA,UAAU,GAAGD,iBAAiB,KAAK,KAAK,CAAC,GAAG,GAAG,GAAGA,iBAAiB;IACnEE,UAAU,GAAGN,KAAK,CAACM,UAAU;IAC7BC,QAAQ,GAAGP,KAAK,CAACO,QAAQ;IACzBC,WAAW,GAAGR,KAAK,CAACQ,WAAW;IAC/BC,WAAW,GAAGT,KAAK,CAACS,WAAW;EACjC,IAAIC,WAAW,GAAG,EAAE,CAACC,MAAM,CAACV,SAAS,EAAE,WAAW,CAAC;EACnD,IAAIW,YAAY,GAAG,EAAE,CAACD,MAAM,CAACV,SAAS,EAAE,YAAY,CAAC;EACrD,IAAIY,WAAW,GAAG,EAAE,CAACF,MAAM,CAACC,YAAY,EAAE,WAAW,CAAC;;EAEt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