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

1 line
6.4 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport Cell from \"../Cell\";\nimport TableContext from \"../context/TableContext\";\nimport { useContext } from '@rc-component/context';\nimport { getCellFixedInfo } from \"../utils/fixUtil\";\nimport { getColumnsKey } from \"../utils/valueUtil\";\nvar HeaderRow = function HeaderRow(props) {\n var cells = props.cells,\n stickyOffsets = props.stickyOffsets,\n flattenColumns = props.flattenColumns,\n RowComponent = props.rowComponent,\n CellComponent = props.cellComponent,\n onHeaderRow = props.onHeaderRow,\n index = props.index;\n var _useContext = useContext(TableContext, ['prefixCls', 'direction']),\n prefixCls = _useContext.prefixCls,\n direction = _useContext.direction;\n var rowProps;\n if (onHeaderRow) {\n rowProps = onHeaderRow(cells.map(function (cell) {\n return cell.column;\n }), index);\n }\n var columnsKey = getColumnsKey(cells.map(function (cell) {\n return cell.column;\n }));\n return /*#__PURE__*/React.createElement(RowComponent, rowProps, cells.map(function (cell, cellIndex) {\n var column = cell.column;\n var fixedInfo = getCellFixedInfo(cell.colStart, cell.colEnd, flattenColumns, stickyOffsets, direction);\n var additionalProps;\n if (column && column.onHeaderCell) {\n additionalProps = cell.column.onHeaderCell(column);\n }\n return /*#__PURE__*/React.createElement(Cell, _extends({}, cell, {\n scope: column.title ? cell.colSpan > 1 ? 'colgroup' : 'col' : null,\n ellipsis: column.ellipsis,\n align: column.align,\n component: CellComponent,\n prefixCls: prefixCls,\n key: columnsKey[cellIndex]\n }, fixedInfo, {\n additionalProps: additionalProps,\n rowType: \"header\"\n }));\n }));\n};\nif (process.env.NODE_ENV !== 'production') {\n HeaderRow.displayName = 'HeaderRow';\n}\nexport default HeaderRow;","map":{"version":3,"names":["_extends","React","Cell","TableContext","useContext","getCellFixedInfo","getColumnsKey","HeaderRow","props","cells","stickyOffsets","flattenColumns","RowComponent","rowComponent","CellComponent","cellComponent","onHeaderRow","index","_useContext","prefixCls","direction","rowProps","map","cell","column","columnsKey","createElement","cellIndex","fixedInfo","colStart","colEnd","additionalProps","onHeaderCell","scope","title","colSpan","ellipsis","align","component","key","rowType","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-table/es/Header/HeaderRow.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport Cell from \"../Cell\";\nimport TableContext from \"../context/TableContext\";\nimport { useContext } from '@rc-component/context';\nimport { getCellFixedInfo } from \"../utils/fixUtil\";\nimport { getColumnsKey } from \"../utils/valueUtil\";\nvar HeaderRow = function HeaderRow(props) {\n var cells = props.cells,\n stickyOffsets = props.stickyOffsets,\n flattenColumns = props.flattenColumns,\n RowComponent = props.rowComponent,\n CellComponent = props.cellComponent,\n onHeaderRow = props.onHeaderRow,\n index = props.index;\n var _useContext = useContext(TableContext, ['prefixCls', 'direction']),\n prefixCls = _useContext.prefixCls,\n direction = _useContext.direction;\n var rowProps;\n if (onHeaderRow) {\n rowProps = onHeaderRow(cells.map(function (cell) {\n return cell.column;\n }), index);\n }\n var columnsKey = getColumnsKey(cells.map(function (cell) {\n return cell.column;\n }));\n return /*#__PURE__*/React.createElement(RowComponent, rowProps, cells.map(function (cell, cellIndex) {\n var column = cell.column;\n var fixedInfo = getCellFixedInfo(cell.colStart, cell.colEnd, flattenColumns, stickyOffsets, direction);\n var additionalProps;\n if (column && column.onHeaderCell) {\n additionalProps = cell.column.onHeaderCell(column);\n }\n return /*#__PURE__*/React.createElement(Cell, _extends({}, cell, {\n scope: column.title ? cell.colSpan > 1 ? 'colgroup' : 'col' : null,\n ellipsis: column.ellipsis,\n align: column.align,\n component: CellComponent,\n prefixCls: prefixCls,\n key: columnsKey[cellIndex]\n }, fixedInfo, {\n additionalProps: additionalProps,\n rowType: \"header\"\n }));\n }));\n};\nif (process.env.NOD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