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

1 line
15 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"data\", \"index\", \"className\", \"rowKey\", \"style\", \"extra\", \"getHeight\"];\nimport { useContext } from '@rc-component/context';\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Cell from \"../Cell\";\nimport TableContext, { responseImmutable } from \"../context/TableContext\";\nimport useRowInfo from \"../hooks/useRowInfo\";\nimport VirtualCell from \"./VirtualCell\";\nimport { StaticContext } from \"./context\";\nvar BodyLine = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var data = props.data,\n index = props.index,\n className = props.className,\n rowKey = props.rowKey,\n style = props.style,\n extra = props.extra,\n getHeight = props.getHeight,\n restProps = _objectWithoutProperties(props, _excluded);\n var record = data.record,\n indent = data.indent,\n renderIndex = data.index;\n var _useContext = useContext(TableContext, ['prefixCls', 'flattenColumns', 'fixColumn', 'componentWidth', 'scrollX']),\n scrollX = _useContext.scrollX,\n flattenColumns = _useContext.flattenColumns,\n prefixCls = _useContext.prefixCls,\n fixColumn = _useContext.fixColumn,\n componentWidth = _useContext.componentWidth;\n var _useContext2 = useContext(StaticContext, ['getComponent']),\n getComponent = _useContext2.getComponent;\n var rowInfo = useRowInfo(record, rowKey, index, indent);\n var RowComponent = getComponent(['body', 'row'], 'div');\n var cellComponent = getComponent(['body', 'cell'], 'div');\n\n // ========================== Expand ==========================\n var rowSupportExpand = rowInfo.rowSupportExpand,\n expanded = rowInfo.expanded,\n rowProps = rowInfo.rowProps,\n expandedRowRender = rowInfo.expandedRowRender,\n expandedRowClassName = rowInfo.expandedRowClassName;\n var expandRowNode;\n if (rowSupportExpand && expanded) {\n var expandContent = expandedRowRender(record, index, indent + 1, expanded);\n var computedExpandedRowClassName = expandedRowClassName === null || expandedRowClassName === void 0 ? void 0 : expandedRowClassName(record, index, indent);\n var additionalProps = {};\n if (fixColumn) {\n additionalProps = {\n style: _defineProperty({}, '--virtual-width', \"\".concat(componentWidth, \"px\"))\n };\n }\n var rowCellCls = \"\".concat(prefixCls, \"-expanded-row-cell\");\n expandRowNode = /*#__PURE__*/React.createElement(RowComponent, {\n className: classNames(\"\".concat(prefixCls, \"-expanded-row\"), \"\".concat(prefixCls, \"-expanded-row-level-\").concat(indent + 1), computedExpandedRowClassName)\n }, /*#__PURE__*/React.createElement(Cell, {\n component: cellComponent,\n prefixCls: prefixCls,\n className: classNames(rowCellCls, _defineProperty({}, \"\".concat(rowCellCls, \"-fixed\"), fixColumn)),\n additionalProps: additionalProps\n }, expandContent));\n }\n\n // ========================== Render ==========================\n var rowStyle = _objectSpread(_objectSpread({}, style), {}, {\n width: scrollX\n });\n if (extra) {\n rowStyle.position = 'absolute';\n rowStyle.pointerEvents = 'none';\n }\n var rowNode = /*#__PURE__*/React.createElement(RowComponent, _extends({}, rowProps, restProps, {\n \"data-row-key\": rowKey,\n ref: rowSupportExpand ? null : ref,\n className: classNames(className, \"\".concat(prefixCls, \"-row\"), rowProps === null || rowProps === void 0 ? void 0 : rowProps.className, _defineProperty({}, \"\".concat(prefixCls, \"-row-extra\"), extra)),\n style: _objectSpread(_objectSpread({}, rowStyle), rowProps === null || rowProps === void 0 ? void 0 : rowProps.style)\n }), flattenColumns.map(function (column, colIndex) {\n return /*#__PURE__*/React.createElement(VirtualCell, {\n key: colIndex,\n component: cellComponent,\n rowInfo: rowInfo,\n column: column,\n colIndex: colIndex,\n indent: indent,\n index: index,\n renderIndex: renderIndex,\n record: record,\n inverse: extra,\n getHeight: getHeight\n });\n }));\n if (rowSupportExpand) {\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: ref\n }, rowNode, expandRowNode);\n }\n return rowNode;\n});\nvar ResponseBodyLine = responseImmutable(BodyLine);\nif (process.env.NODE_ENV !== 'production') {\n ResponseBodyLine.displayName = 'BodyLine';\n}\nexport default ResponseBodyLine;","map":{"version":3,"names":["_extends","_objectSpread","_defineProperty","_objectWithoutProperties","_excluded","useContext","classNames","React","Cell","TableContext","responseImmutable","useRowInfo","VirtualCell","StaticContext","BodyLine","forwardRef","props","ref","data","index","className","rowKey","style","extra","getHeight","restProps","record","indent","renderIndex","_useContext","scrollX","flattenColumns","prefixCls","fixColumn","componentWidth","_useContext2","getComponent","rowInfo","RowComponent","cellComponent","rowSupportExpand","expanded","rowProps","expandedRowRender","expandedRowClassName","expandRowNode","expandContent","computedExpandedRowClassName","additionalProps","concat","rowCellCls","createElement","component","rowStyle","width","position","pointerEvents","rowNode","map","column","colIndex","key","inverse","ResponseBodyLine","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-table/es/VirtualTable/BodyLine.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"data\", \"index\", \"className\", \"rowKey\", \"style\", \"extra\", \"getHeight\"];\nimport { useContext } from '@rc-component/context';\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Cell from \"../Cell\";\nimport TableContext, { responseImmutable } from \"../context/TableContext\";\nimport useRowInfo from \"../hooks/useRowInfo\";\nimport VirtualCell from \"./VirtualCell\";\nimport { StaticContext } from \"./context\";\nvar BodyLine = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var data = props.data,\n index = props.index,\n className = props.className,\n rowKey = props.rowKey,\n style = props.style,\n extra = props.extra,\n getHeight = props.getHeight,\n restProps = _objectWithoutProperties(props, _excluded);\n var record = data.record,\n indent = data.indent,\n renderIndex = data.index;\n var _useContext = useContext(TableContext, ['prefixCls', 'flattenColumns', 'fixColumn', 'componentWidth', 'scrollX']),\n scrollX = _useContext.scrollX,\n flattenColumns = _useContext.flattenColumns,\n prefixCls = _useContext.prefixCls,\n fixColumn = _useContext.fixColumn,\n componentWidth = _useContext.componentWidth;\n var _useContext2 = useContext(StaticContext, ['getComponent']),\n getComponent = _useContext2.getComponent;\n var rowInfo = useRowInfo(record, rowKey, index, indent);\n var RowComponent = getComponent(['body', 'row'], 'div');\n var cellComponent = getComponent(['body', 'cell'], 'div');\n\n // ========================== Expand ==========================\n var rowSupportExpand = rowInfo.rowSupportExpand,\n expanded = rowInfo.expanded,\n rowProps = rowInfo.rowProps,\n expandedRowRender = rowInfo.expandedRowRender,\n expandedRowClassName = rowInfo.expandedRowClassName;\n var expandRowNode;\n if (rowSupportExpand && expanded) {\n var expandContent = expandedRowRender(record, index, indent + 1, expanded);\n var computedExpandedRowClassName = expandedRowClassName === null || expandedRowClassName === void 0 ? void 0 : expandedRowClassName(record, index, indent);\n var additionalProps = {};\n if (fixColumn) {\n additionalProps = {\n style: _defineProperty({}, '--virtual-width', \"\".concat(componentWidth, \"px\"))\n };\n }\n var rowCellCls = \"\".concat(prefixCls, \"-expanded-row-cell\");\n expandRowNode = /*#__PURE__*/React.createElement(RowComponent, {\n className: classNames(\"\".concat(prefixCls, \"-expanded-row\"), \"\".concat(prefixCls, \"-expanded-row-level-\").concat(indent + 1), computedExpandedRowClassName)\n }, /*#__PURE__*/React.createElement(Cell, {\n component: cellComponent,\n prefixCls: prefixCls,\n className: classNames(rowCellCls, _defineProperty({}, \"\".concat(rowCellCls, \"-fixed\"), fixColumn)),\n additionalProps: additionalProps\n }, expandContent));\n }\n\n // ========================== Render ==========================\n var rowStyle = _objectSpread(_objectSpread({}, style), {}, {\n width: scrollX\n });\n if (extra) {\n rowStyle.position = 'absolute';\n rowStyle.pointerEvents = 'none';\n }\n var rowNode = /*#__PURE__*/React.createElement(RowComponent, _extends({}, rowProps, restProps, {\n \"data-row-key\": rowKey,\n ref: rowSupportExpand ? null : ref,\n className: classNames(className, \"\".concat(prefixCls, \"-row\"), rowProps === null || rowProps === void 0 ? void 0 : rowProps.className, _defineProperty({}, \"\".concat(prefixCls, \"-row-extra\"), extra)),\n style: _objectSpread(_objectSpread({}, rowStyle), rowProps === null || rowProps === void 0 ? void 0 : rowProps.style)\n }), flattenColumns.map(function (column, colIndex) {\n return /*#__PURE__*/React.createElement(VirtualCell, {\n key: colIndex,\n component: cellComponent,\n rowInfo: rowInfo,\n column: column,\n colIndex: colIndex,\n indent: indent,\n index: index,\n renderIndex: renderIndex,\n record: record,\n inverse: extra,\n getHeight: getHeight\n });\n }));\n if (rowSupportExpand) {\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: ref\n }, rowNode, expandRowNode);\n }\n return rowNode;\n});\nvar ResponseBodyLine = responseImmutable(BodyLine);\nif (process.env.NODE_ENV !== 'production') {\n ResponseBodyLine.displayName = 'BodyLine';\n}\nexport default ResponseBodyLine;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,wBAAwB,MAAM,oDAAoD;AACzF,IAAIC,SAAS,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC;AACvF,SAASC,UAAU,QAAQ,uBAAuB;AAClD,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,YAAY,IAAIC,iBAAiB,QAAQ,yBAAyB;AACzE,OAAOC,UAAU,MAAM,qBAAqB;AAC5C,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,aAAa,QAAQ,WAAW;AACzC,IAAIC,QAAQ,GAAG,aAAaP,K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