1 line
10 KiB
JSON
1 line
10 KiB
JSON
|
{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport Cell from './Cell';\nimport DescriptionsContext from './DescriptionsContext';\nfunction renderCells(items, _ref, _ref2) {\n let {\n colon,\n prefixCls,\n bordered\n } = _ref;\n let {\n component,\n type,\n showLabel,\n showContent,\n labelStyle: rootLabelStyle,\n contentStyle: rootContentStyle\n } = _ref2;\n return items.map((_ref3, index) => {\n let {\n label,\n children,\n prefixCls: itemPrefixCls = prefixCls,\n className,\n style,\n labelStyle,\n contentStyle,\n span = 1,\n key\n } = _ref3;\n if (typeof component === 'string') {\n return /*#__PURE__*/React.createElement(Cell, {\n key: `${type}-${key || index}`,\n className: className,\n style: style,\n labelStyle: Object.assign(Object.assign({}, rootLabelStyle), labelStyle),\n contentStyle: Object.assign(Object.assign({}, rootContentStyle), contentStyle),\n span: span,\n colon: colon,\n component: component,\n itemPrefixCls: itemPrefixCls,\n bordered: bordered,\n label: showLabel ? label : null,\n content: showContent ? children : null,\n type: type\n });\n }\n return [/*#__PURE__*/React.createElement(Cell, {\n key: `label-${key || index}`,\n className: className,\n style: Object.assign(Object.assign(Object.assign({}, rootLabelStyle), style), labelStyle),\n span: 1,\n colon: colon,\n component: component[0],\n itemPrefixCls: itemPrefixCls,\n bordered: bordered,\n label: label,\n type: \"label\"\n }), /*#__PURE__*/React.createElement(Cell, {\n key: `content-${key || index}`,\n className: className,\n style: Object.assign(Object.assign(Object.assign({}, rootContentStyle), style), contentStyle),\n span: span * 2 - 1,\n component: component[1],\n itemPrefixCls: itemPrefixCls,\n bordered: bordered,\n content: children,\n type: \"content\"\n })];\n });\n}\nconst Row = props => {\n const descContext = React.useContext(DescriptionsContext);\n const {\n prefixCls,\n vertical,\n row,\n index,\n bordered\n } = props;\n if (vertical) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"tr\", {\n key: `label-${index}`,\n className: `${prefixCls}-row`\n }, renderCells(row, props, Object.assign({\n component: 'th',\n type: 'label',\n showLabel: true\n }, descContext))), /*#__PURE__*/React.createElement(\"tr\", {\n key: `content-${index}`,\n className: `${prefixCls}-row`\n }, renderCells(row, props, Object.assign({\n component: 'td',\n type: 'content',\n showContent: true\n }, descContext))));\n }\n return /*#__PURE__*/React.createElement(\"tr\", {\n key: index,\n className: `${prefixCls}-row`\n }, renderCells(row, props, Object.assign({\n component: bordered ? ['th', 'td'] : 'td',\n type: 'item',\n showLabel: true,\n showContent: true\n }, descContext)));\n};\nexport default Row;","map":{"version":3,"names":["React","Cell","DescriptionsContext","renderCells","items","_ref","_ref2","colon","prefixCls","bordered","component","type","showLabel","showContent","labelStyle","rootLabelStyle","contentStyle","rootContentStyle","map","_ref3","index","label","children","itemPrefixCls","className","style","span","key","createElement","Object","assign","content","Row","props","descContext","useContext","vertical","row","Fragment"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/descriptions/Row.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport Cell from './Cell';\nimport DescriptionsContext from './DescriptionsContext';\nfunction renderCells(items, _ref, _ref2) {\n let {\n colon,\n prefixCls,\n bordered\n } = _ref;\n let {\n component,\n type,\n showLabel,\n showContent,\n labelStyle
|