@zkochan/table
Version:
Formats data into a string table.
18 lines • 681 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeRangeConfig = void 0;
const utils_1 = require("./utils");
const makeRangeConfig = (spanningCellConfig, columnsConfig) => {
const { topLeft, bottomRight } = (0, utils_1.calculateRangeCoordinate)(spanningCellConfig);
const cellConfig = {
...columnsConfig[topLeft.col],
...spanningCellConfig,
paddingRight: spanningCellConfig.paddingRight ??
columnsConfig[bottomRight.col].paddingRight,
};
return { ...cellConfig,
bottomRight,
topLeft };
};
exports.makeRangeConfig = makeRangeConfig;
//# sourceMappingURL=makeRangeConfig.js.map