UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

44 lines (41 loc) 1.39 kB
/** * DevExtreme (cjs/__internal/exporter/jspdf/common/normalizeOptions.js) * Version: 25.2.5 * Build date: Fri Feb 20 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.normalizeBoundaryValue = normalizeBoundaryValue; exports.normalizeRowsInfo = normalizeRowsInfo; var _type = require("../../../../core/utils/type"); function normalizeBoundaryValue(value) { if ((0, _type.isNumeric)(value)) { return { top: value, right: value, bottom: value, left: value } } return { top: (null === value || void 0 === value ? void 0 : value.top) ?? 0, right: (null === value || void 0 === value ? void 0 : value.right) ?? 0, bottom: (null === value || void 0 === value ? void 0 : value.bottom) ?? 0, left: (null === value || void 0 === value ? void 0 : value.left) ?? 0 } } function normalizeRowsInfo(rowsInfo) { rowsInfo.forEach((row => { row.cells.forEach((_ref => { let { pdfCell: pdfCell } = _ref; pdfCell.padding = normalizeBoundaryValue(pdfCell.padding) })) })) }