UNPKG

devexpress-reporting

Version:

DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.

48 lines (47 loc) 1.9 kB
/** * DevExpress HTML/JS Reporting (viewer\exportOptions\docxExportOptionsPreview.js) * Version: 24.2.7 * Build date: Apr 29, 2025 * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * License: https://www.devexpress.com/Support/EULAs/universal.xml */ import { pageRange, docxTableLayout, rasterizeImages, rasterizationResolution, exportPageBreaks, exportWatermarks, docxExportMode } from '../../common/exportOptions/metadata'; import { keepRowHeight } from '../../common/exportOptions/rtfMetaData'; import { docxDocumentOptions, allowFloatingPictures } from '../../common/exportOptions/metadata'; import { DocxExportOptions, } from '../../common/exportOptions/docxExportOptions'; import { docxExportModeMergedPreview, excludeModesForMergedDocuments } from './metadata'; const docxExportOptionsSerializationInfoPreview = [ pageRange, docxTableLayout, keepRowHeight, rasterizeImages, rasterizationResolution, exportPageBreaks, exportWatermarks, allowFloatingPictures, docxDocumentOptions, ]; export class DocxExportOptionsPreview extends DocxExportOptions { static toJson(value, serializer, refs) { return serializer.serialize(value, value.getInfo(), refs); } getInfo() { const variableInfo = this._getVariableInfo(); return variableInfo.concat(docxExportOptionsSerializationInfoPreview); } _getVariableInfo() { return [docxExportMode]; } } export class DocxExportOptionsMergedPreview extends DocxExportOptionsPreview { _getVariableInfo() { return [docxExportModeMergedPreview]; } isPropertyDisabled(name) { return super.isPropertyDisabled(name) || name === docxExportModeMergedPreview.propertyName; } constructor(model, serializer) { super(model, serializer); this._set('docxExportMode', excludeModesForMergedDocuments); } }