devexpress-richedit 24.1.12-build-25107-0103 → 24.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dx.richedit.js +57 -30
- package/dist/dx.richedit.min.js +1 -1
- package/lib/client/client-rich-edit.js +2 -2
- package/lib/client/commands/mail-merge-command.js +2 -1
- package/lib/client/formats/docx/export/data.d.ts +5 -1
- package/lib/client/formats/docx/export/data.js +3 -2
- package/lib/client/formats/docx/export/exporter.d.ts +2 -3
- package/lib/client/formats/docx/export/exporter.js +3 -3
- package/lib/client/formats/docx/export/exporters/base/table/table.d.ts +1 -1
- package/lib/client/formats/docx/export/exporters/base/table/table.js +4 -4
- package/lib/client/formats/docx/import/destination/paragraph-properties/properties/paragraph-spacing-destination.js +6 -4
- package/lib/client/model-api/formats/exporter.js +1 -1
- package/lib/common/formats/i-document-exporter.d.ts +3 -0
- package/lib/common/layout/document-layout.d.ts +3 -0
- package/lib/common/layout/document-layout.js +6 -0
- package/lib/common/layout/main-structures/layout-page-area.d.ts +3 -0
- package/lib/common/layout/main-structures/layout-page-area.js +6 -0
- package/lib/common/layout/main-structures/layout-page.d.ts +3 -0
- package/lib/common/layout/main-structures/layout-page.js +8 -0
- package/lib/common/layout-formatter/floating/position-calculators/horizontal.d.ts +1 -0
- package/lib/common/layout-formatter/floating/position-calculators/horizontal.js +16 -12
- package/lib/common/layout-formatter/row/states.js +0 -2
- package/lib/common/rich-edit-core.js +1 -0
- package/package.json +3 -3
package/dist/dx.richedit.js
CHANGED
@@ -32115,6 +32115,14 @@ class LayoutPage extends rectangle.Rectangle {
|
|
32115
32115
|
this.anchoredObjectHolder = new PageAnchoredObjectHolder(this);
|
32116
32116
|
this.tableAnchoredObjectsHolder = new TableAnchoredObjectsHolder();
|
32117
32117
|
}
|
32118
|
+
get grids() {
|
32119
|
+
const result = new Map();
|
32120
|
+
for (let pageArea of this.mainSubDocumentPageAreas)
|
32121
|
+
pageArea.grids.forEach((grid, table) => result.set(table, grid));
|
32122
|
+
for (let pageArea of Object.values(this.otherPageAreas))
|
32123
|
+
pageArea.grids.forEach((grid, table) => result.set(table, grid));
|
32124
|
+
return result;
|
32125
|
+
}
|
32118
32126
|
setRenderLevelCalculator(anchorObjectsPositionInfo, compatibilityMode) {
|
32119
32127
|
this.renderLevelCalculator = new RenderLevelCalculator();
|
32120
32128
|
this.renderLevelCalculator.calcLevels(this.anchoredObjectHolder, anchorObjectsPositionInfo, compatibilityMode);
|
@@ -70460,6 +70468,12 @@ class DocumentLayout {
|
|
70460
70468
|
this.anchorObjectsPositionInfo = anchorObjectsPositionInfo;
|
70461
70469
|
this.setEmptyLayout(ColorHelper.NO_COLOR);
|
70462
70470
|
}
|
70471
|
+
get grids() {
|
70472
|
+
return this.pages.reduce((res, page) => {
|
70473
|
+
page.grids.forEach((grid, table) => res.set(table, grid));
|
70474
|
+
return res;
|
70475
|
+
}, new Map());
|
70476
|
+
}
|
70463
70477
|
setEmptyLayout(pageColor) {
|
70464
70478
|
this.pages = [];
|
70465
70479
|
this.validPageCount = 0;
|
@@ -81456,10 +81470,12 @@ class ParagraphSpacingDestination extends ParagraphFormattingLeafElementDestinat
|
|
81456
81470
|
const spacingBefore = this.data.readerHelper.getWpSTIntegerValue(reader, 'before', constants.Constants.MIN_SAFE_INTEGER);
|
81457
81471
|
if (spacingBefore >= 0)
|
81458
81472
|
this.paragraphProperties.setValue(ParagraphPropertyDescriptor.spacingBefore, spacingBefore);
|
81459
|
-
this.
|
81460
|
-
|
81461
|
-
|
81462
|
-
|
81473
|
+
const beforeAutoSpacing = this.data.readerHelper.getWpSTOnOffValue(reader, 'beforeAutospacing', null);
|
81474
|
+
if (spacingBefore == -1 || beforeAutoSpacing != null)
|
81475
|
+
this.paragraphProperties.setValue(ParagraphPropertyDescriptor.beforeAutoSpacing, spacingBefore == -1 || beforeAutoSpacing);
|
81476
|
+
const afterAutoSpacing = this.data.readerHelper.getWpSTOnOffValue(reader, 'afterAutospacing', null);
|
81477
|
+
if (spacingAfter == -1 || afterAutoSpacing != null)
|
81478
|
+
this.paragraphProperties.setValue(ParagraphPropertyDescriptor.afterAutoSpacing, spacingAfter == -1 || afterAutoSpacing);
|
81463
81479
|
const lineSpacing = this.data.readerHelper.getWpSTIntegerValue(reader, 'line', constants.Constants.MIN_SAFE_INTEGER);
|
81464
81480
|
if (lineSpacing != constants.Constants.MIN_SAFE_INTEGER && lineSpacing > 0) {
|
81465
81481
|
const attribute = new WordProcessingMLValue('lineRule', 'line-rule');
|
@@ -90299,6 +90315,7 @@ class EffectExtent {
|
|
90299
90315
|
|
90300
90316
|
|
90301
90317
|
|
90318
|
+
|
90302
90319
|
class TableExporter extends BaseExporter {
|
90303
90320
|
constructor() {
|
90304
90321
|
super(...arguments);
|
@@ -90328,10 +90345,9 @@ class TableExporter extends BaseExporter {
|
|
90328
90345
|
}
|
90329
90346
|
}
|
90330
90347
|
getTableGrid(table) {
|
90331
|
-
|
90332
|
-
|
90333
|
-
|
90334
|
-
return colGrid;
|
90348
|
+
var _a, _b;
|
90349
|
+
const grid = this.data.grids.get(table);
|
90350
|
+
return ((_b = (_a = grid === null || grid === void 0 ? void 0 : grid.columns) === null || _a === void 0 ? void 0 : _a.width) === null || _b === void 0 ? void 0 : _b.map(unit_converter/* UnitConverter */.u.pixelsToTwips)) || [];
|
90335
90351
|
}
|
90336
90352
|
initNewTables(newIndexes, allowInitNextTable) {
|
90337
90353
|
for (let levelIndex = this.tableIndexes.length; levelIndex < newIndexes.length; levelIndex++) {
|
@@ -90836,11 +90852,12 @@ class IdGenerator {
|
|
90836
90852
|
|
90837
90853
|
|
90838
90854
|
class data_Data {
|
90839
|
-
constructor(
|
90855
|
+
constructor(exportModelOptions, options) {
|
90840
90856
|
this.drawingElementId = 1;
|
90841
90857
|
this.exportSubDocumentsList = [];
|
90842
90858
|
this.relationExporters = [];
|
90843
|
-
this.model = model;
|
90859
|
+
this.model = exportModelOptions.modelManager.model;
|
90860
|
+
this.grids = exportModelOptions.grids;
|
90844
90861
|
this.options = options;
|
90845
90862
|
this.constants = new DocxConstants();
|
90846
90863
|
this.writerStack = new stack/* Stack */.K();
|
@@ -91629,10 +91646,10 @@ class EndNoteExporter extends NoteExporter {
|
|
91629
91646
|
|
91630
91647
|
|
91631
91648
|
class DocxExporter {
|
91632
|
-
constructor(
|
91633
|
-
this.modelManipulator = modelManipulator;
|
91649
|
+
constructor(exportModelOptions, options) {
|
91650
|
+
this.modelManipulator = exportModelOptions.modelManager.modelManipulator;
|
91634
91651
|
this.options = options;
|
91635
|
-
this.data = new data_Data(
|
91652
|
+
this.data = new data_Data(exportModelOptions, options);
|
91636
91653
|
}
|
91637
91654
|
exportToBlob(callback) {
|
91638
91655
|
this.modelManipulator.picture.loader.ensureAllPicturesLoaded(this.options.ensurePictureLoadedTimeout, (_loaded) => {
|
@@ -91739,7 +91756,7 @@ function exportModelToBlob(exportModelOptions, callback) {
|
|
91739
91756
|
function getExporter(exportModelOptions) {
|
91740
91757
|
const { modelManipulator } = exportModelOptions.modelManager;
|
91741
91758
|
switch (exportModelOptions.documentFormat) {
|
91742
|
-
case DocumentFormat.OpenXml: return new DocxExporter(
|
91759
|
+
case DocumentFormat.OpenXml: return new DocxExporter(exportModelOptions, new DocxExportOptions());
|
91743
91760
|
case DocumentFormat.Rtf: return new RtfExporter(modelManipulator, new RtfDocumentExporterOptions());
|
91744
91761
|
case DocumentFormat.PlainText: return new TxtExporter(modelManipulator, new DocumentExporterOptions());
|
91745
91762
|
case DocumentFormat.Html: return new HtmlDocumentExporter(exportModelOptions, new DocumentExporterOptions());
|
@@ -92251,7 +92268,7 @@ class AnchorObjectHorizontalPositionCalculator extends AnchorObjectPositionCalcu
|
|
92251
92268
|
alignment(type, alignment) {
|
92252
92269
|
switch (type) {
|
92253
92270
|
case AnchorObjectHorizontalPositionType.Character:
|
92254
|
-
return this.getAlignPosition(alignment, 0);
|
92271
|
+
return this.getAnchorXPosition() + this.getAlignPosition(alignment, 0);
|
92255
92272
|
case AnchorObjectHorizontalPositionType.Column:
|
92256
92273
|
return this.isRelativeCell ?
|
92257
92274
|
this.relativeColumnPos() + this.lp.row.tableCellInfo.x +
|
@@ -92300,17 +92317,8 @@ class AnchorObjectHorizontalPositionCalculator extends AnchorObjectPositionCalcu
|
|
92300
92317
|
return this.isRelativeCell ? this.relativeColumnPos() + this.lp.row.tableCellInfo.x : 0;
|
92301
92318
|
case AnchorObjectHorizontalPositionType.Column:
|
92302
92319
|
return this.isRelativeCell ? this.relativeColumnPos() + this.lp.row.tableCellInfo.x + this.leftCellMargin : this.relativeColumnPos();
|
92303
|
-
case AnchorObjectHorizontalPositionType.Character:
|
92304
|
-
|
92305
|
-
const ancBoxAbsPos = this.obj.rowOffset;
|
92306
|
-
const boxIndex = search.SearchUtils.normedInterpolationIndexOf(this.lp.row.boxes, (box) => rowAbsPos + box.rowOffset, ancBoxAbsPos);
|
92307
|
-
const box = this.lp.row.boxes[boxIndex];
|
92308
|
-
if (!box)
|
92309
|
-
return this.lp.getLayoutX(null, DocumentLayoutDetailsLevel.Row);
|
92310
|
-
const symbolCount = Math.max(0, ancBoxAbsPos - rowAbsPos - box.rowOffset);
|
92311
|
-
return this.lp.getLayoutX(null, DocumentLayoutDetailsLevel.Row) + box.x +
|
92312
|
-
box.getCharOffsetXInPixels(this.manager.measurer, symbolCount);
|
92313
|
-
}
|
92320
|
+
case AnchorObjectHorizontalPositionType.Character:
|
92321
|
+
return this.getAnchorXPosition();
|
92314
92322
|
case AnchorObjectHorizontalPositionType.Margin:
|
92315
92323
|
return this.isRelativeCell ? this.relativeColumnPos() + this.lp.row.tableCellInfo.x + this.leftCellMargin :
|
92316
92324
|
this.manager.boundsCalculator.marginLeft;
|
@@ -92327,6 +92335,19 @@ class AnchorObjectHorizontalPositionCalculator extends AnchorObjectPositionCalcu
|
|
92327
92335
|
throw new Error(errors/* Errors */.D.InternalException);
|
92328
92336
|
}
|
92329
92337
|
}
|
92338
|
+
getAnchorXPosition() {
|
92339
|
+
const rowAbsPos = this.lp.getLogPosition(DocumentLayoutDetailsLevel.Row);
|
92340
|
+
const ancBoxAbsPos = this.obj.rowOffset;
|
92341
|
+
let boxIndex = search.SearchUtils.normedInterpolationIndexOf(this.lp.row.boxes, (box) => rowAbsPos + box.rowOffset, ancBoxAbsPos);
|
92342
|
+
if (boxIndex < 0)
|
92343
|
+
boxIndex = 0;
|
92344
|
+
const box = this.lp.row.boxes[boxIndex];
|
92345
|
+
if (!box)
|
92346
|
+
return this.lp.getLayoutX(null, DocumentLayoutDetailsLevel.Row);
|
92347
|
+
const symbolCount = Math.max(0, ancBoxAbsPos - rowAbsPos - box.rowOffset);
|
92348
|
+
return this.lp.getLayoutX(null, DocumentLayoutDetailsLevel.Row) + box.x +
|
92349
|
+
box.getCharOffsetXInPixels(this.manager.measurer, symbolCount);
|
92350
|
+
}
|
92330
92351
|
bookLayout() {
|
92331
92352
|
return this.alignment(this.anchorInfo.horizontalPositionType, AnchorObjectHorizontalPositionCalculator.mapBookLayoutALignmentType[this.anchorInfo.horizontalPositionAlignment]);
|
92332
92353
|
}
|
@@ -92557,6 +92578,12 @@ class LayoutPageArea extends rectangle.Rectangle {
|
|
92557
92578
|
this.columns = [];
|
92558
92579
|
this.subDocument = subDocument;
|
92559
92580
|
}
|
92581
|
+
get grids() {
|
92582
|
+
return this.columns.reduce((res, column) => {
|
92583
|
+
column.tablesInfo.forEach(tableInfo => res.set(tableInfo.logicInfo.grid.table, tableInfo.logicInfo.grid));
|
92584
|
+
return res;
|
92585
|
+
}, new Map());
|
92586
|
+
}
|
92560
92587
|
getEndPosition() {
|
92561
92588
|
return this.pageOffset + utils_list.ListUtils.last(this.columns).getEndPosition();
|
92562
92589
|
}
|
@@ -95400,8 +95427,6 @@ class RowBaseFormatterState {
|
|
95400
95427
|
this.rowFormatter.finishRow();
|
95401
95428
|
}
|
95402
95429
|
addAnchorObject() {
|
95403
|
-
if (!this.rowFormatter.wordHolder.pushBoxes())
|
95404
|
-
return;
|
95405
95430
|
this.rowFormatter.addAnchorObject();
|
95406
95431
|
}
|
95407
95432
|
addTextBox() {
|
@@ -115559,6 +115584,7 @@ class RichEditCore {
|
|
115559
115584
|
pictureRenderer: this.viewManager.renderer,
|
115560
115585
|
uiUnitConverter: this.uiUnitConverter,
|
115561
115586
|
lastMaxNumPages: this.layout.lastMaxNumPages,
|
115587
|
+
grids: this.layout.grids,
|
115562
115588
|
pageIndex: this.selection.pageIndex,
|
115563
115589
|
sessionGuid: this.sessionGuid,
|
115564
115590
|
clientGuid: this.clientGuid,
|
@@ -136904,7 +136930,8 @@ class MailMergeCommand extends CommandBase {
|
|
136904
136930
|
return true;
|
136905
136931
|
}
|
136906
136932
|
executeCore(_state, options) {
|
136907
|
-
const
|
136933
|
+
const exportModelOptions = this.control.getExportModelOptions();
|
136934
|
+
const docxExporter = new DocxExporter(exportModelOptions, new DocxExportOptions());
|
136908
136935
|
docxExporter.exportToBlob((blob) => {
|
136909
136936
|
const docxImporter = new Importer(new ImporterOptions());
|
136910
136937
|
docxImporter.importFromFile(blob, this.control.modelManager.richOptions, (documentModel, formatImagesImporter) => {
|
@@ -141673,7 +141700,7 @@ class ClientRichEdit {
|
|
141673
141700
|
this.contextMenuSettings = settings.contextMenuSettings;
|
141674
141701
|
this.fullScreenHelper = new FullScreenHelper(element);
|
141675
141702
|
if (true)
|
141676
|
-
external_DevExpress_config_default()(JSON.parse(atob('
|
141703
|
+
external_DevExpress_config_default()(JSON.parse(atob('eyJsaWNlbnNlS2V5IjoiZXdvZ0lDSm1iM0p0WVhRaU9pQXhMQW9nSUNKcGJuUmxjbTVoYkZWellXZGxTV1FpT2lBaVREZzBkbWxZYUZOS1MyWnRRams0U0VOTVkxTTRNaUlLZlE9PS53SkN1UVJhY3dIaU9DMEdWZFBPVlNacDJsRThrcTdTbUZTTWpIMXgvamxEMnowbzQvYWFkVm9zK1g2ZzlwSDZaYjdUUXdOdlZvQkduRUNwblB2M0ZaOUV4eWlkK3pybUxITE8yZnIyVzFTOEJOWE1YaE1mSlNPdjJ3aCs5SDBSd2lMejJxUT09In0=')));
|
141677
141704
|
this.prepareElement(element, settings);
|
141678
141705
|
this.initDefaultFontsAndStyles();
|
141679
141706
|
this.initBars(settings.ribbon, settings.fonts);
|