makeRangeConfig.js 718 B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.makeRangeConfig = void 0;
  4. const utils_1 = require("./utils");
  5. const makeRangeConfig = (spanningCellConfig, columnsConfig) => {
  6. var _a;
  7. const { topLeft, bottomRight } = (0, utils_1.calculateRangeCoordinate)(spanningCellConfig);
  8. const cellConfig = {
  9. ...columnsConfig[topLeft.col],
  10. ...spanningCellConfig,
  11. paddingRight: (_a = spanningCellConfig.paddingRight) !== null && _a !== void 0 ? _a : columnsConfig[bottomRight.col].paddingRight,
  12. };
  13. return { ...cellConfig,
  14. bottomRight,
  15. topLeft };
  16. };
  17. exports.makeRangeConfig = makeRangeConfig;
  18. //# sourceMappingURL=makeRangeConfig.js.map