define(["require", "exports", "@syncfusion/ej2-base"], function (require, exports, ej2_base_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ExcelExportHelper = (function () {
function ExcelExportHelper(parent) {
this.parent = parent;
}
ExcelExportHelper.prototype.updateThemeStyle = function (themestyle, style) {
return ej2_base_1.extend(style, themestyle);
};
ExcelExportHelper.prototype.getCaptionThemeStyle = function (theme, styles) {
var style = this.updateThemeStyle(theme.caption, styles);
return style;
};
ExcelExportHelper.prototype.getHeaderThemeStyle = function (theme, styles) {
var style = this.updateThemeStyle(theme.header, styles);
return style;
};
ExcelExportHelper.prototype.getRecordThemeStyle = function (theme, styles) {
var style = this.updateThemeStyle(theme.record, styles);
return style;
};
ExcelExportHelper.prototype.setImage = function (args, colIndex, rowIndex, rowHeight) {
var excelImage = {
image: args.image.base64, row: rowIndex, column: colIndex + 1,
lastRow: rowIndex, lastColumn: colIndex + 1
};
if (args.image.width && args.image.height) {
excelImage.width = args.image.width;
excelImage.height = args.image.height;
}
this.parent.excelExportModule.images.push(excelImage);
var height = rowHeight > args.image.height ? rowHeight : args.image.height;
return height || 50;
};
return ExcelExportHelper;
}());
exports.ExcelExportHelper = ExcelExportHelper;
});
|