38f7cd731e9fd49ea360f64cd2f953cd.json
10.9 KB
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\nimport * as React from 'react';\nimport Cell from './Cell';\n\nfunction renderCells(items, _ref, _ref2) {\n var colon = _ref.colon,\n prefixCls = _ref.prefixCls,\n bordered = _ref.bordered;\n var component = _ref2.component,\n type = _ref2.type,\n showLabel = _ref2.showLabel,\n showContent = _ref2.showContent;\n return items.map(function (_ref3, index) {\n var _ref3$props = _ref3.props,\n label = _ref3$props.label,\n children = _ref3$props.children,\n _ref3$props$prefixCls = _ref3$props.prefixCls,\n itemPrefixCls = _ref3$props$prefixCls === void 0 ? prefixCls : _ref3$props$prefixCls,\n className = _ref3$props.className,\n style = _ref3$props.style,\n labelStyle = _ref3$props.labelStyle,\n contentStyle = _ref3$props.contentStyle,\n _ref3$props$span = _ref3$props.span,\n span = _ref3$props$span === void 0 ? 1 : _ref3$props$span,\n key = _ref3.key;\n\n if (typeof component === 'string') {\n return /*#__PURE__*/React.createElement(Cell, {\n key: \"\".concat(type, \"-\").concat(key || index),\n className: className,\n style: style,\n labelStyle: labelStyle,\n contentStyle: 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 });\n }\n\n return [/*#__PURE__*/React.createElement(Cell, {\n key: \"label-\".concat(key || index),\n className: className,\n style: _extends(_extends({}, style), labelStyle),\n span: 1,\n colon: colon,\n component: component[0],\n itemPrefixCls: itemPrefixCls,\n bordered: bordered,\n label: label\n }), /*#__PURE__*/React.createElement(Cell, {\n key: \"content-\".concat(key || index),\n className: className,\n style: _extends(_extends({}, style), contentStyle),\n span: span * 2 - 1,\n component: component[1],\n itemPrefixCls: itemPrefixCls,\n bordered: bordered,\n content: children\n })];\n });\n}\n\nvar Row = function Row(props) {\n var prefixCls = props.prefixCls,\n vertical = props.vertical,\n row = props.row,\n index = props.index,\n bordered = props.bordered;\n\n if (vertical) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"tr\", {\n key: \"label-\".concat(index),\n className: \"\".concat(prefixCls, \"-row\")\n }, renderCells(row, props, {\n component: 'th',\n type: 'label',\n showLabel: true\n })), /*#__PURE__*/React.createElement(\"tr\", {\n key: \"content-\".concat(index),\n className: \"\".concat(prefixCls, \"-row\")\n }, renderCells(row, props, {\n component: 'td',\n type: 'content',\n showContent: true\n })));\n }\n\n return /*#__PURE__*/React.createElement(\"tr\", {\n key: index,\n className: \"\".concat(prefixCls, \"-row\")\n }, renderCells(row, props, {\n component: bordered ? ['th', 'td'] : 'td',\n type: 'item',\n showLabel: true,\n showContent: true\n }));\n};\n\nexport default Row;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/descriptions/Row.js"],"names":["_extends","React","Cell","renderCells","items","_ref","_ref2","colon","prefixCls","bordered","component","type","showLabel","showContent","map","_ref3","index","_ref3$props","props","label","children","_ref3$props$prefixCls","itemPrefixCls","className","style","labelStyle","contentStyle","_ref3$props$span","span","key","createElement","concat","content","Row","vertical","row","Fragment"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,gCAArB;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;AAEA,SAASC,WAAT,CAAqBC,KAArB,EAA4BC,IAA5B,EAAkCC,KAAlC,EAAyC;AACvC,MAAIC,KAAK,GAAGF,IAAI,CAACE,KAAjB;AAAA,MACIC,SAAS,GAAGH,IAAI,CAACG,SADrB;AAAA,MAEIC,QAAQ,GAAGJ,IAAI,CAACI,QAFpB;AAGA,MAAIC,SAAS,GAAGJ,KAAK,CAACI,SAAtB;AAAA,MACIC,IAAI,GAAGL,KAAK,CAACK,IADjB;AAAA,MAEIC,SAAS,GAAGN,KAAK,CAACM,SAFtB;AAAA,MAGIC,WAAW,GAAGP,KAAK,CAACO,WAHxB;AAIA,SAAOT,KAAK,CAACU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,EAAEb,KADuC;AAE5CO,IAAAA,SAAS,EAAE,GAAGQ,MAAH,CAAUvB,SAAV,EAAqB,MAArB;AAFiC,GAA1B,EAGjBL,WAAW,CAACgC,GAAD,EAAMjB,KAAN,EAAa;AACzBR,IAAAA,SAAS,EAAED,QAAQ,GAAG,CAAC,IAAD,EAAO,IAAP,CAAH,GAAkB,IADZ;AAEzBE,IAAAA,IAAI,EAAE,MAFmB;AAGzBC,IAAAA,SAAS,EAAE,IAHc;AAIzBC,IAAAA,WAAW,EAAE;AAJY,GAAb,CAHM,CAApB;AASD,CAlCD;;AAoCA,eAAeoB,GAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport * as React from 'react';\nimport Cell from './Cell';\n\nfunction renderCells(items, _ref, _ref2) {\n var colon = _ref.colon,\n prefixCls = _ref.prefixCls,\n bordered = _ref.bordered;\n var component = _ref2.component,\n type = _ref2.type,\n showLabel = _ref2.showLabel,\n showContent = _ref2.showContent;\n return items.map(function (_ref3, index) {\n var _ref3$props = _ref3.props,\n label = _ref3$props.label,\n children = _ref3$props.children,\n _ref3$props$prefixCls = _ref3$props.prefixCls,\n itemPrefixCls = _ref3$props$prefixCls === void 0 ? prefixCls : _ref3$props$prefixCls,\n className = _ref3$props.className,\n style = _ref3$props.style,\n labelStyle = _ref3$props.labelStyle,\n contentStyle = _ref3$props.contentStyle,\n _ref3$props$span = _ref3$props.span,\n span = _ref3$props$span === void 0 ? 1 : _ref3$props$span,\n key = _ref3.key;\n\n if (typeof component === 'string') {\n return /*#__PURE__*/React.createElement(Cell, {\n key: \"\".concat(type, \"-\").concat(key || index),\n className: className,\n style: style,\n labelStyle: labelStyle,\n contentStyle: 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 });\n }\n\n return [/*#__PURE__*/React.createElement(Cell, {\n key: \"label-\".concat(key || index),\n className: className,\n style: _extends(_extends({}, style), labelStyle),\n span: 1,\n colon: colon,\n component: component[0],\n itemPrefixCls: itemPrefixCls,\n bordered: bordered,\n label: label\n }), /*#__PURE__*/React.createElement(Cell, {\n key: \"content-\".concat(key || index),\n className: className,\n style: _extends(_extends({}, style), contentStyle),\n span: span * 2 - 1,\n component: component[1],\n itemPrefixCls: itemPrefixCls,\n bordered: bordered,\n content: children\n })];\n });\n}\n\nvar Row = function Row(props) {\n var prefixCls = props.prefixCls,\n vertical = props.vertical,\n row = props.row,\n index = props.index,\n bordered = props.bordered;\n\n if (vertical) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"tr\", {\n key: \"label-\".concat(index),\n className: \"\".concat(prefixCls, \"-row\")\n }, renderCells(row, props, {\n component: 'th',\n type: 'label',\n showLabel: true\n })), /*#__PURE__*/React.createElement(\"tr\", {\n key: \"content-\".concat(index),\n className: \"\".concat(prefixCls, \"-row\")\n }, renderCells(row, props, {\n component: 'td',\n type: 'content',\n showContent: true\n })));\n }\n\n return /*#__PURE__*/React.createElement(\"tr\", {\n key: index,\n className: \"\".concat(prefixCls, \"-row\")\n }, renderCells(row, props, {\n component: bordered ? ['th', 'td'] : 'td',\n type: 'item',\n showLabel: true,\n showContent: true\n }));\n};\n\nexport default Row;"]},"metadata":{},"sourceType":"module"}