devexpress-richedit 24.1.5-build-24204-0102 → 24.1.5-build-24211-0105

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.
Files changed (21) hide show
  1. package/dist/dx.richedit.js +406 -323
  2. package/dist/dx.richedit.min.js +1 -1
  3. package/lib/common/formats/html/import/importers/table.js +1 -1
  4. package/lib/common/formats/html/import/utils/paragraph-properties-utils.d.ts +1 -2
  5. package/lib/common/formats/html/import/utils/paragraph-properties-utils.js +6 -35
  6. package/lib/common/formats/html/import/utils/utils.d.ts +3 -0
  7. package/lib/common/formats/html/import/utils/utils.js +52 -3
  8. package/lib/common/formats/rtf/import/destination/numbering-list/destination-old-paragraph-numbering-base.js +5 -0
  9. package/lib/common/formats/rtf/import/destination/numbering-list/destination-old-paragraph-numbering.js +9 -1
  10. package/lib/common/formats/rtf/import/keyword-tables/keyword-table-holder.js +1 -0
  11. package/lib/common/formats/rtf/import/keyword-tables/paragraph-numbering-desc-keywords.js +3 -0
  12. package/lib/common/formats/rtf/import/model/numbering-lists/rtf-old-list-level-info.js +10 -1
  13. package/lib/common/model/manipulators/document/sub-document-inserter.js +2 -0
  14. package/lib/common/model/numbering-lists/numbering-list.js +2 -2
  15. package/lib/common/model/paragraph/paragraph-properties.d.ts +13 -0
  16. package/lib/common/model/paragraph/paragraph-properties.js +31 -0
  17. package/lib/common/model/tables/main-structures/table-cell.js +3 -1
  18. package/lib/common/model/tables/main-structures/table-row.js +3 -1
  19. package/lib/common/model/tables/secondary-structures/table-units.d.ts +2 -2
  20. package/lib/common/model/tables/secondary-structures/table-units.js +3 -3
  21. package/package.json +3 -3
@@ -36,7 +36,7 @@ export class HtmlTableTagImporter extends HtmlTagImporterBase {
36
36
  if (!(tbl.width.type == TableWidthUnitType.ModelUnits && tbl.width.value > 0))
37
37
  if (!ListUtils.unsafeAnyOf(this.rows, (row) => ListUtils.unsafeAnyOf(row.cells, (cell) => cell.preferredWidth.type == TableWidthUnitType.ModelUnits && cell.preferredWidth.value > 0))) {
38
38
  tbl.width.type = TableWidthUnitType.FiftiethsOfPercent;
39
- tbl.width.value = 100 * TableWidthUnit.MUTLIPLIER_FOR_PERCENTS;
39
+ tbl.width.value = 100 * TableWidthUnit.MULTIPLIER_FOR_PERCENTS;
40
40
  }
41
41
  this.importer.importedTablesInfo.push(tbl);
42
42
  }
@@ -4,7 +4,7 @@ export declare class HtmlImporterMaskedParagraphProperties {
4
4
  private result;
5
5
  private elementStyle;
6
6
  private element;
7
- import(colorProvider: ColorProvider, element: HTMLElement, isTableCellTag: boolean): MaskedParagraphProperties;
7
+ import(colorProvider: ColorProvider, element: HTMLElement, isTableCellTag?: boolean): MaskedParagraphProperties;
8
8
  private importAlignment;
9
9
  private importFirstLineIndent;
10
10
  private importLeftIndent;
@@ -13,7 +13,6 @@ export declare class HtmlImporterMaskedParagraphProperties {
13
13
  private importSpacingAfter;
14
14
  private importBackColor;
15
15
  private importLineSpacing;
16
- private setSpacingAsMultiple;
17
16
  private importTopBorder;
18
17
  private importRightBorder;
19
18
  private importBottomBorder;
@@ -1,17 +1,14 @@
1
- import { Errors } from '@devexpress/utils/lib/errors';
2
1
  import { AttrUtils } from '@devexpress/utils/lib/utils/attr';
3
2
  import { DomUtils } from '@devexpress/utils/lib/utils/dom';
4
- import { MathUtils } from '@devexpress/utils/lib/utils/math';
5
3
  import { ColorUtils } from '@devexpress/utils/lib/utils/color';
6
4
  import { MapCreator } from '../../../../utils/map-creator';
7
5
  import { BorderLineStyle } from '../../../../model/borders/enums';
8
- import { MaskedParagraphProperties, ParagraphAlignment, ParagraphFirstLineIndent, ParagraphLineSpacingType, ParagraphPropertiesMask } from '../../../../model/paragraph/paragraph-properties';
9
- import { TableWidthUnit, TableWidthUnitType } from '../../../../model/tables/secondary-structures/table-units';
6
+ import { MaskedParagraphProperties, ParagraphAlignment, ParagraphFirstLineIndent, ParagraphPropertiesMask, } from '../../../../model/paragraph/paragraph-properties';
10
7
  import { ShadingInfo } from '../../../../model/shadings/shading-info';
11
8
  import { ColorModelInfo } from '../../../../model/color/color-model-info';
12
9
  import { HtmlImportUtils } from './utils';
13
10
  export class HtmlImporterMaskedParagraphProperties {
14
- import(colorProvider, element, isTableCellTag) {
11
+ import(colorProvider, element, isTableCellTag = false) {
15
12
  this.result = new MaskedParagraphProperties();
16
13
  this.element = element;
17
14
  this.elementStyle = element.style;
@@ -92,36 +89,10 @@ export class HtmlImporterMaskedParagraphProperties {
92
89
  this.result.setUseValue(ParagraphPropertiesMask.UseBeforeAutoSpacing, true);
93
90
  this.result.setUseValue(ParagraphPropertiesMask.UseAfterAutoSpacing, true);
94
91
  const stringLineHeight = this.elementStyle.lineHeight;
95
- const height = HtmlImportUtils.getTableWidthUnit(stringLineHeight);
96
- if (height == null) {
97
- this.setSpacingAsMultiple(parseFloat(stringLineHeight));
98
- return;
99
- }
100
- switch (height.type) {
101
- case TableWidthUnitType.FiftiethsOfPercent:
102
- this.setSpacingAsMultiple(height.value / TableWidthUnit.MAX_PERCENT_WIDTH);
103
- break;
104
- case TableWidthUnitType.ModelUnits:
105
- this.result.lineSpacing = height.value;
106
- this.result.lineSpacingType = this.elementStyle["mso-line-height-rule"] == "exactly" ?
107
- ParagraphLineSpacingType.Exactly :
108
- ParagraphLineSpacingType.AtLeast;
109
- break;
110
- case TableWidthUnitType.Nil:
111
- case TableWidthUnitType.Auto:
112
- break;
113
- default: throw new Error(Errors.InternalException);
114
- }
115
- }
116
- setSpacingAsMultiple(multipleValue) {
117
- if (!multipleValue || isNaN(multipleValue))
118
- return;
119
- this.result.lineSpacing = multipleValue;
120
- this.result.lineSpacingType =
121
- MathUtils.numberCloseTo(multipleValue, 1.5) ? ParagraphLineSpacingType.Sesquialteral :
122
- (MathUtils.numberCloseTo(multipleValue, 2) ? ParagraphLineSpacingType.Double :
123
- (MathUtils.numberCloseTo(multipleValue, 1) ? ParagraphLineSpacingType.Single :
124
- ParagraphLineSpacingType.Multiple));
92
+ const lineHeightRule = this.elementStyle["mso-line-height-rule"];
93
+ const lineSpacing = HtmlImportUtils.getLineSpacing(stringLineHeight, lineHeightRule);
94
+ this.result.lineSpacing = lineSpacing.value;
95
+ this.result.lineSpacingType = lineSpacing.type;
125
96
  }
126
97
  importTopBorder(colorProvider, calculatedStyle) {
127
98
  const borderTopInfo = HtmlImportUtils.getBorderInfo(colorProvider, calculatedStyle.borderTopWidth, calculatedStyle.borderTopStyle, calculatedStyle.borderTopColor);
@@ -3,6 +3,7 @@ import { TableBordersBase } from '../../../../model/borders/table-border-base';
3
3
  import { ColorProvider } from '../../../../model/color/color-provider';
4
4
  import { IMaskedProperties } from '../../../../model/interfaces';
5
5
  import { TableWidthUnit } from '../../../../model/tables/secondary-structures/table-units';
6
+ import { LineSpacingUnit } from '../../../../../common/model/paragraph/paragraph-properties';
6
7
  export declare class HtmlImportUtils {
7
8
  static getTableWidthUnit(stringValue: string): TableWidthUnit;
8
9
  static getValueInTwips(stringValue: string): number;
@@ -13,4 +14,6 @@ export declare class HtmlImportUtils {
13
14
  static getPropertyByMap<T>(map: {
14
15
  [key: string]: T;
15
16
  }, elementBy: string, defaultValue: T): T;
17
+ static getLineSpacing(value: string, lineHeightRule?: string): LineSpacingUnit;
18
+ private static getLineSpacingAsMultiple;
16
19
  }
@@ -5,6 +5,9 @@ import { ColorHelper } from '../../../../model/color/color';
5
5
  import { TableWidthUnit, TableWidthUnitType } from '../../../../model/tables/secondary-structures/table-units';
6
6
  import { UnitConverter } from '@devexpress/utils/lib/class/unit-converter';
7
7
  import { ColorUtils } from '@devexpress/utils/lib/utils/color';
8
+ import { LineSpacingUnit } from '../../../../../common/model/paragraph/paragraph-properties';
9
+ import { MathUtils } from '@devexpress/utils/lib/utils/math';
10
+ import { Errors } from '@devexpress/utils/lib/errors';
8
11
  export class HtmlImportUtils {
9
12
  static getTableWidthUnit(stringValue) {
10
13
  if (!stringValue)
@@ -16,7 +19,7 @@ export class HtmlImportUtils {
16
19
  return null;
17
20
  switch (unitType) {
18
21
  case "%":
19
- return new TableWidthUnit().init(numberValue * TableWidthUnit.MUTLIPLIER_FOR_PERCENTS, TableWidthUnitType.FiftiethsOfPercent);
22
+ return new TableWidthUnit().init(numberValue * TableWidthUnit.MULTIPLIER_FOR_PERCENTS, TableWidthUnitType.FiftiethsOfPercent);
20
23
  case "px":
21
24
  return new TableWidthUnit().init(UnitConverter.pixelsToTwips(numberValue), TableWidthUnitType.ModelUnits);
22
25
  case "in":
@@ -72,8 +75,54 @@ export class HtmlImportUtils {
72
75
  HtmlImportUtils.importBorder(colorProvider, props, borders, leftMask, (brds, brd) => brds.left = brd, style.borderLeftWidth, style.borderLeftStyle, style.borderLeftColor);
73
76
  }
74
77
  static getPropertyByMap(map, elementBy, defaultValue) {
75
- const mapedElement = map[elementBy];
76
- return mapedElement !== undefined ? mapedElement : defaultValue;
78
+ const mappedElement = map[elementBy];
79
+ return mappedElement !== undefined ? mappedElement : defaultValue;
80
+ }
81
+ static getLineSpacing(value, lineHeightRule = '') {
82
+ if (value.toLowerCase() === 'normal')
83
+ return LineSpacingUnit.createSingle();
84
+ if (/^\d+(\.\d+)?$/.test(value)) {
85
+ const numberValue = parseFloat(value);
86
+ switch (numberValue) {
87
+ case 1:
88
+ return LineSpacingUnit.createSingle();
89
+ case 1.5:
90
+ return LineSpacingUnit.createSesquialteral();
91
+ case 2:
92
+ return LineSpacingUnit.createDouble();
93
+ default:
94
+ return LineSpacingUnit.createMultiple(numberValue);
95
+ }
96
+ }
97
+ const height = HtmlImportUtils.getTableWidthUnit(value);
98
+ if (height == null)
99
+ return HtmlImportUtils.getLineSpacingAsMultiple(parseFloat(value));
100
+ switch (height.type) {
101
+ case TableWidthUnitType.FiftiethsOfPercent:
102
+ return this.getLineSpacingAsMultiple(height.value / TableWidthUnit.MAX_PERCENT_WIDTH);
103
+ case TableWidthUnitType.ModelUnits:
104
+ if (lineHeightRule === 'exactly')
105
+ return LineSpacingUnit.createExactly(height.value);
106
+ else
107
+ return LineSpacingUnit.createAtLeast(height.value);
108
+ case TableWidthUnitType.Nil:
109
+ case TableWidthUnitType.Auto:
110
+ return LineSpacingUnit.createSingle();
111
+ default:
112
+ throw new Error(Errors.InternalException);
113
+ }
114
+ }
115
+ static getLineSpacingAsMultiple(multipleValue) {
116
+ if (!multipleValue || isNaN(multipleValue))
117
+ return LineSpacingUnit.createSingle();
118
+ if (MathUtils.numberCloseTo(multipleValue, 1))
119
+ return LineSpacingUnit.createSingle();
120
+ else if (MathUtils.numberCloseTo(multipleValue, 1.5))
121
+ return LineSpacingUnit.createSesquialteral();
122
+ else if (MathUtils.numberCloseTo(multipleValue, 2))
123
+ return LineSpacingUnit.createDouble();
124
+ else
125
+ return LineSpacingUnit.createMultiple(multipleValue);
77
126
  }
78
127
  }
79
128
  HtmlImportUtils.MapBorderStyleToType = new MapCreator()
@@ -8,6 +8,11 @@ import { TextBeforeDestination } from '../base/text-before-destination';
8
8
  import { DestinationSubDocument } from '../sub-document/destination-sub-document';
9
9
  import { DestinationType } from '../utils/destination-type';
10
10
  export class DestinationOldParagraphNumberingBase extends DestinationBase {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.textBefore = '';
14
+ this.textAfter = '';
15
+ }
11
16
  get destinationType() { return DestinationType.DestinationOldParagraphNumberingBase; }
12
17
  get controlCharHT() { return null; }
13
18
  static setNumberingListFormat(importer, format) {
@@ -110,6 +110,8 @@ export class DestinationOldParagraphNumbering extends DestinationOldParagraphNum
110
110
  const levelInfo = this.importer.importers.numbering.oldListLevelInfoCollection.getByIndex(i + 1);
111
111
  const level = abstractNumberingList.levels[i];
112
112
  const firstLineIndent = levelInfo.indent;
113
+ const listLevelProperties = level.getListLevelProperties().clone();
114
+ level.setListLevelProperties(listLevelProperties);
113
115
  this.setFirstLineIndent(abstractNumberingList.levels[i], firstLineIndent);
114
116
  level.getCharacterProperties().copyFrom(this.importer.importers.character.characterFormatting.coreProperties);
115
117
  let formatString = `${levelInfo.textBefore}{${i}}${levelInfo.textAfter}`;
@@ -128,6 +130,8 @@ export class DestinationOldParagraphNumbering extends DestinationOldParagraphNum
128
130
  documentModel.abstractNumberingLists.push(abstractNumberingList);
129
131
  for (let i = 0; i < abstractNumberingList.levels.length; i++) {
130
132
  const level = abstractNumberingList.levels[i];
133
+ const listLevelProperties = level.getListLevelProperties().clone();
134
+ level.setListLevelProperties(listLevelProperties);
131
135
  level.getCharacterProperties().copyFrom(this.importer.importers.character.characterFormatting.coreProperties);
132
136
  level.getListLevelProperties().format = NumberingFormat.Bullet;
133
137
  const firstLineIndent = levelOffset * i + this.importer.importers.paragraph.paragraphFormatting.coreProperties.firstLineIndent;
@@ -148,6 +152,8 @@ export class DestinationOldParagraphNumbering extends DestinationOldParagraphNum
148
152
  documentModel.abstractNumberingLists.push(abstractNumberingList);
149
153
  for (let i = 0; i < abstractNumberingList.levels.length; i++) {
150
154
  const level = abstractNumberingList.levels[i];
155
+ const listLevelProperties = level.getListLevelProperties().clone();
156
+ level.setListLevelProperties(listLevelProperties);
151
157
  level.getCharacterProperties().copyFrom(this.importer.importers.character.characterFormatting.coreProperties);
152
158
  const firstLineIndent = this.importer.importers.paragraph.paragraphFormatting.coreProperties.firstLineIndent + 150 * i;
153
159
  this.setFirstLineIndent(level, firstLineIndent);
@@ -258,7 +264,9 @@ export class DestinationOldParagraphNumbering extends DestinationOldParagraphNum
258
264
  return this.multiLevelListIndex >= NumberingListIndexConstants.minValue;
259
265
  }
260
266
  areSameInfo(existingListLevelInfo, rtfOldListLevelInfo) {
261
- return existingListLevelInfo.textAfter == rtfOldListLevelInfo.textAfter && existingListLevelInfo.textBefore == rtfOldListLevelInfo.textBefore;
267
+ return existingListLevelInfo.textAfter === rtfOldListLevelInfo.textAfter
268
+ && existingListLevelInfo.textBefore === rtfOldListLevelInfo.textBefore
269
+ && existingListLevelInfo.listLevelProperties.format === rtfOldListLevelInfo.listLevelProperties.format;
262
270
  }
263
271
  isSimpleList() {
264
272
  return this.simpleList;
@@ -248,6 +248,7 @@ export class KeywordTableHolder {
248
248
  .append(characterPropertiesKeywords)
249
249
  .get())
250
250
  .add(DestinationType.DestinationOldSectionNumberingLevel, paragraphNumberingDescKeywords)
251
+ .add(DestinationType.DestinationOldParagraphNumbering, paragraphNumberingDescKeywords)
251
252
  .add(DestinationType.InfoDestination, new MapCreator()
252
253
  .add("password", InfoDestination.onLegacyPasswordHash)
253
254
  .add("passwordhash", InfoDestination.onPasswordHash)
@@ -1,4 +1,5 @@
1
1
  import { MapCreator } from '../../../../utils/map-creator';
2
+ import { DestinationOldParagraphNumbering } from '../destination/numbering-list/destination-old-paragraph-numbering';
2
3
  import { DestinationOldParagraphNumberingBase } from '../destination/numbering-list/destination-old-paragraph-numbering-base';
3
4
  import { DestinationSubDocument } from '../destination/sub-document/destination-sub-document';
4
5
  export const paragraphNumberingDescKeywords = new MapCreator()
@@ -41,4 +42,6 @@ export const paragraphNumberingDescKeywords = new MapCreator()
41
42
  .add("pnqr", DestinationOldParagraphNumberingBase.onRightAlignmentKeyword)
42
43
  .add("pntxtb", DestinationOldParagraphNumberingBase.onTextBeforeKeyword)
43
44
  .add("pntxta", DestinationOldParagraphNumberingBase.onTextAfterKeyword)
45
+ .add("pnlvlbody", DestinationOldParagraphNumbering.onSimpleNumberingKeyword)
46
+ .add("pnlvlblt", DestinationOldParagraphNumbering.onBulletedParagraphKeyword)
44
47
  .get();
@@ -13,8 +13,17 @@ export class RtfOldListLevelInfo {
13
13
  this.indent = 0;
14
14
  }
15
15
  clone() {
16
- return null;
16
+ const result = new RtfOldListLevelInfo();
17
+ result.copyFrom(this);
18
+ return result;
17
19
  }
18
20
  copyFrom(_obj) {
21
+ this.skipNumbering = _obj.skipNumbering;
22
+ this.includeInformationFromPreviousLevel = _obj.includeInformationFromPreviousLevel;
23
+ this.characterProperties = _obj.characterProperties.clone();
24
+ this.listLevelProperties = _obj.listLevelProperties.clone();
25
+ this.textBefore = _obj.textBefore;
26
+ this.textAfter = _obj.textAfter;
27
+ this.indent = _obj.indent;
19
28
  }
20
29
  }
@@ -172,9 +172,11 @@ export class SubDocumentInserter {
172
172
  for (const targetRow of targetTable.rows) {
173
173
  targetRow.properties = this.getTableRowProperties(targetRow.properties);
174
174
  targetRow.tablePropertiesException = this.getTableProperties(targetRow.tablePropertiesException);
175
+ targetRow.conditionalFormatting = targetRow.conditionalFormatting;
175
176
  for (const targetCell of targetRow.cells) {
176
177
  targetCell.properties = this.getTableCellProperties(targetCell.properties);
177
178
  targetCell.style = this.getTableCellStyle(targetCell.style);
179
+ targetCell.conditionalFormatting = targetCell.conditionalFormatting;
178
180
  }
179
181
  }
180
182
  return targetTable;
@@ -84,8 +84,8 @@ export class AbstractNumberingList extends NumberingListBase {
84
84
  return this.documentModel.abstractNumberingListsIdProvider.getNextId();
85
85
  }
86
86
  createLevel(_index) {
87
- var characterProperties = MaskedCharacterProperties.createDefault(this.documentModel);
88
- var paragraphProperties = MaskedParagraphProperties.createDefault(this.documentModel);
87
+ const characterProperties = MaskedCharacterProperties.createDefault(this.documentModel);
88
+ const paragraphProperties = MaskedParagraphProperties.createDefault(this.documentModel);
89
89
  return new ListLevel(this.documentModel, characterProperties, paragraphProperties, new ListLevelProperties());
90
90
  }
91
91
  copyLevelsFrom(levels) {
@@ -138,3 +138,16 @@ export declare class MaskedParagraphProperties extends ParagraphProperties imple
138
138
  static createDefault(model: DocumentModel): MaskedParagraphProperties;
139
139
  setValue<T>(desc: IParagraphPropertyDescriptor<T>, value: T): void;
140
140
  }
141
+ export declare class LineSpacingUnit implements ICloneable<LineSpacingUnit> {
142
+ value: number;
143
+ type: ParagraphLineSpacingType;
144
+ init(value: number, type: ParagraphLineSpacingType): LineSpacingUnit;
145
+ clone(): LineSpacingUnit;
146
+ static create(value: number, type: ParagraphLineSpacingType): LineSpacingUnit;
147
+ static createSingle(): LineSpacingUnit;
148
+ static createSesquialteral(): LineSpacingUnit;
149
+ static createDouble(): LineSpacingUnit;
150
+ static createMultiple(value: number): LineSpacingUnit;
151
+ static createExactly(value: number): LineSpacingUnit;
152
+ static createAtLeast(value: number): LineSpacingUnit;
153
+ }
@@ -301,3 +301,34 @@ export class MaskedParagraphProperties extends ParagraphProperties {
301
301
  this.setUseValue(desc.maskValue(), true);
302
302
  }
303
303
  }
304
+ export class LineSpacingUnit {
305
+ init(value, type) {
306
+ this.value = value;
307
+ this.type = type;
308
+ return this;
309
+ }
310
+ clone() {
311
+ return new LineSpacingUnit().init(this.value, this.type);
312
+ }
313
+ static create(value, type) {
314
+ return new LineSpacingUnit().init(value, type);
315
+ }
316
+ static createSingle() {
317
+ return new LineSpacingUnit().init(1, ParagraphLineSpacingType.Single);
318
+ }
319
+ static createSesquialteral() {
320
+ return new LineSpacingUnit().init(1.5, ParagraphLineSpacingType.Sesquialteral);
321
+ }
322
+ static createDouble() {
323
+ return new LineSpacingUnit().init(2, ParagraphLineSpacingType.Double);
324
+ }
325
+ static createMultiple(value) {
326
+ return new LineSpacingUnit().init(value, ParagraphLineSpacingType.Multiple);
327
+ }
328
+ static createExactly(value) {
329
+ return new LineSpacingUnit().init(value, ParagraphLineSpacingType.Exactly);
330
+ }
331
+ static createAtLeast(value) {
332
+ return new LineSpacingUnit().init(value, ParagraphLineSpacingType.AtLeast);
333
+ }
334
+ }
@@ -79,12 +79,14 @@ export class TableCell {
79
79
  return new TableCellPropertiesMergerShadingInfo().getProperty(this.properties, this.parentRow.parentTable.style, this.conditionalFormatting, defaultTableProperties);
80
80
  }
81
81
  clone(subDocument, parentRow) {
82
- const result = new TableCell(parentRow, subDocument.documentModel.cache.tableCellPropertiesCache.getItem(this.properties));
82
+ const properties = subDocument.documentModel.cache.tableCellPropertiesCache.getItem(this.properties);
83
+ const result = new TableCell(parentRow, properties);
83
84
  result.preferredWidth = this.preferredWidth.clone();
84
85
  result.columnSpan = this.columnSpan;
85
86
  result.verticalMerging = this.verticalMerging;
86
87
  result.startParagraphPosition = subDocument.positionManager.registerPosition(this.startParagraphPosition.value);
87
88
  result.endParagrapPosition = subDocument.positionManager.registerPosition(this.endParagrapPosition.value);
89
+ result.conditionalFormatting = this.conditionalFormatting;
88
90
  return result;
89
91
  }
90
92
  }
@@ -49,7 +49,8 @@ export class TableRow {
49
49
  return cells;
50
50
  }
51
51
  clone(subDocument, parentTable) {
52
- const result = new TableRow(parentTable, subDocument.documentModel.cache.tableRowPropertiesCache.getItem(this.properties));
52
+ const properties = subDocument.documentModel.cache.tableRowPropertiesCache.getItem(this.properties);
53
+ const result = new TableRow(parentTable, properties);
53
54
  result.parentTable = parentTable;
54
55
  result.cells = ListUtils.map(this.cells, r => r.clone(subDocument, result));
55
56
  result.widthBefore = this.widthBefore.clone();
@@ -58,6 +59,7 @@ export class TableRow {
58
59
  result.gridAfter = this.gridAfter;
59
60
  result.height = this.height.clone();
60
61
  result.tablePropertiesException = this.tablePropertiesException.clone();
62
+ result.conditionalFormatting = this.conditionalFormatting;
61
63
  return result;
62
64
  }
63
65
  }
@@ -8,13 +8,13 @@ export declare class TableCustomUnit<ValueTypeVariants> implements IEquatable<Ta
8
8
  }
9
9
  export declare class TableWidthUnit extends TableCustomUnit<TableWidthUnitType> implements ICloneable<TableWidthUnit> {
10
10
  static MAX_PERCENT_WIDTH: number;
11
- static MUTLIPLIER_FOR_PERCENTS: number;
11
+ static MULTIPLIER_FOR_PERCENTS: number;
12
12
  static createDefault(): TableWidthUnit;
13
13
  static create(value: number, type: TableWidthUnitType): TableWidthUnit;
14
14
  init(value: number, type: TableWidthUnitType): TableWidthUnit;
15
15
  clone(): TableWidthUnit;
16
16
  asNumberNoPercentType(converter: SimpleConverter<number>): number;
17
- asNumber(avaliableWidth: number, converter: SimpleConverter<number>): number;
17
+ asNumber(availableWidth: number, converter: SimpleConverter<number>): number;
18
18
  divide(n: number): void;
19
19
  }
20
20
  export declare class TableHeightUnit extends TableCustomUnit<TableHeightUnitType> implements ICloneable<TableHeightUnit> {
@@ -40,7 +40,7 @@ export class TableWidthUnit extends TableCustomUnit {
40
40
  return 0;
41
41
  }
42
42
  }
43
- asNumber(avaliableWidth, converter) {
43
+ asNumber(availableWidth, converter) {
44
44
  switch (this.type) {
45
45
  case TableWidthUnitType.Nil:
46
46
  case TableWidthUnitType.Auto:
@@ -48,7 +48,7 @@ export class TableWidthUnit extends TableCustomUnit {
48
48
  case TableWidthUnitType.ModelUnits:
49
49
  return converter(this.value);
50
50
  case TableWidthUnitType.FiftiethsOfPercent:
51
- return avaliableWidth * this.value / TableWidthUnit.MAX_PERCENT_WIDTH;
51
+ return availableWidth * this.value / TableWidthUnit.MAX_PERCENT_WIDTH;
52
52
  }
53
53
  }
54
54
  divide(n) {
@@ -57,7 +57,7 @@ export class TableWidthUnit extends TableCustomUnit {
57
57
  }
58
58
  }
59
59
  TableWidthUnit.MAX_PERCENT_WIDTH = 5000;
60
- TableWidthUnit.MUTLIPLIER_FOR_PERCENTS = 50;
60
+ TableWidthUnit.MULTIPLIER_FOR_PERCENTS = 50;
61
61
  export class TableHeightUnit extends TableCustomUnit {
62
62
  init(value, type) {
63
63
  this.value = Math.floor(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devexpress-richedit",
3
- "version": "24.1.5-build-24204-0102",
3
+ "version": "24.1.5-build-24211-0105",
4
4
  "homepage": "https://www.devexpress.com/",
5
5
  "bugs": "https://www.devexpress.com/support/",
6
6
  "author": "Developer Express Inc.",
@@ -14,8 +14,8 @@
14
14
  "build-nspell": "webpack --mode production --config=bin/nspell.webpack.config.js"
15
15
  },
16
16
  "peerDependencies": {
17
- "devextreme": "24.1.5-build-24202-1936",
18
- "devextreme-dist": "24.1.5-build-24202-1936"
17
+ "devextreme": "24.1.5-build-24209-1937",
18
+ "devextreme-dist": "24.1.5-build-24209-1937"
19
19
  },
20
20
  "dependencies": {
21
21
  "jszip": "~3.10.1",