PromoCursed/node_modules/.cache/babel-loader/811b862ba4efe8ad0519acd7c7349198f5d28737cd6f78ca896ce15893f25af0.json

1 line
7.8 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"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