devexpress-richedit 24.1.7-build-24281-0102 → 24.1.7-build-24288-0102

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.
@@ -11,7 +11,7 @@ export class OpenXmlColorImportHelper {
11
11
  if (themeValue != ThemeColorValues.None) {
12
12
  const themeColorIndex = ThemeColorIndexCalculator.calculateThemeColorIndex(themeValue);
13
13
  return themeColorIndex != ThemeColorIndexConstants.None ?
14
- ColorModelInfo.makeByThemeColorIndex(themeColorIndex, OpenXmlColorImportHelper.getTint(data, reader, 'themeTint', 'themeShade')) :
14
+ ColorModelInfo.makeByThemeColorIndex(themeColorIndex, OpenXmlColorImportHelper.getTint(data, reader, 'themeTint', 'themeShade'), themeValue) :
15
15
  ColorModelInfo.makeByThemeColorIndex(DXColor.empty);
16
16
  }
17
17
  else {
@@ -42,7 +42,7 @@ export class OpenXmlColorImportHelper {
42
42
  if (themeValue != ThemeColorValues.None) {
43
43
  const themeColorIndex = ThemeColorIndexCalculator.calculateThemeColorIndex(themeValue);
44
44
  if (themeColorIndex != ThemeColorIndexConstants.None)
45
- return ColorModelInfo.makeByThemeColorIndex(themeColorIndex, tint);
45
+ return ColorModelInfo.makeByThemeColorIndex(themeColorIndex, tint, themeValue);
46
46
  }
47
47
  return ColorModelInfo.makeByColor(data.readerHelper.getWpSTColorValue(reader, 'fill', DXColor.empty), tint);
48
48
  }
@@ -77,9 +77,10 @@ export class StyleManager {
77
77
  StringMapUtils.forEach(this.info, (info) => action(info));
78
78
  }
79
79
  addStyle(dest) {
80
+ var _a;
80
81
  if (this.currInfo.isDefault && !this.isDefaultProcessed) {
81
82
  this.isDefaultProcessed = true;
82
- if (this.defaultStyle.styleName === this.currInfo.name)
83
+ if (((_a = this.defaultStyle) === null || _a === void 0 ? void 0 : _a.styleName) === this.currInfo.name)
83
84
  this.applyProperties(dest, this.defaultStyle);
84
85
  else
85
86
  this.defaultStyle = this.addToModel(this.applyProperties(dest, this.createEmpty()));
@@ -191,7 +191,7 @@ export class HtmlImporter {
191
191
  const missTag = HtmlImporter.MapMissTablePropertiesByTagNames[ListUtils.last(this.levelInfo).tagImporter.elementTag()];
192
192
  ListUtils.forEach(this.currElementChildren, (childElement) => {
193
193
  const childElemStyle = this.getStyles(childElement);
194
- if (!Object.keys(childElemStyle).length)
194
+ if (childElement.nodeType !== Node.ELEMENT_NODE)
195
195
  return;
196
196
  for (var prop in this.getStyles(element)) {
197
197
  if (missTag && /^(border|background|marginLeft)/gi.test(prop))
@@ -9,7 +9,7 @@ export declare class ColorModelInfo implements ICloneable<ColorModelInfo>, ISupp
9
9
  static readonly auto: ColorModelInfo;
10
10
  static readonly autoColor: ColorModelInfo;
11
11
  static readonly noColor: ColorModelInfo;
12
- static makeByThemeColorIndex(themeColorIndex: number, tint?: number): ColorModelInfo;
12
+ static makeByThemeColorIndex(themeColorIndex: number, tint?: number, themeValue?: ThemeColorValues): ColorModelInfo;
13
13
  static makeByColor(color: number, tint?: number): ColorModelInfo;
14
14
  static makeByColorIndex(colorIndex: number, tint?: number): ColorModelInfo;
15
15
  static makeByColorHash(hash: string, tint?: number): ColorModelInfo;
@@ -15,10 +15,11 @@ export class ColorModelInfo {
15
15
  }
16
16
  static get nullColor() { return ColorModelInfo.makeByColor(ColorHelper.AUTOMATIC_COLOR); }
17
17
  ;
18
- static makeByThemeColorIndex(themeColorIndex, tint = 0) {
18
+ static makeByThemeColorIndex(themeColorIndex, tint = 0, themeValue = ThemeColorValues.None) {
19
19
  const result = new ColorModelInfo();
20
20
  result.themeColorIndex = themeColorIndex;
21
21
  result.tint = tint;
22
+ result.themeValue = themeValue;
22
23
  return result;
23
24
  }
24
25
  static makeByColor(color, tint = 0) {
@@ -39,7 +39,7 @@ export class TextManipulator extends RunsBaseManipulator {
39
39
  return null;
40
40
  const historyItems = history.historyItems;
41
41
  const result = history.currentIndex == historyItems.length - 1 ? this.getLastHistoryItemNode(historyItems, null, checkType) : null;
42
- return !result.empty ? result : null;
42
+ return (result === null || result === void 0 ? void 0 : result.empty) ? null : result;
43
43
  }
44
44
  getLastHistoryItemNode(historyItems, parent, checkType) {
45
45
  for (let ind = historyItems.length - 1, item; item = historyItems[ind]; ind--) {
@@ -123,6 +123,7 @@ export class StylesManager {
123
123
  }
124
124
  addTableCellStyleCore(oldStyle) {
125
125
  var newStyle = oldStyle.clone();
126
+ this.tableCellStyleNameToIndex[newStyle.styleName] = this.documentModel.tableCellStyles.push(newStyle) - 1;
126
127
  newStyle.characterProperties = this.documentModel.cache.mergedCharacterPropertiesCache.getItem(oldStyle.characterProperties);
127
128
  newStyle.tableCellProperties = this.documentModel.cache.tableCellPropertiesCache.getItem(oldStyle.tableCellProperties);
128
129
  return newStyle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devexpress-richedit",
3
- "version": "24.1.7-build-24281-0102",
3
+ "version": "24.1.7-build-24288-0102",
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.7-build-24279-1936",
18
- "devextreme-dist": "24.1.7-build-24279-1936"
17
+ "devextreme": "24.1.7-build-24286-1936",
18
+ "devextreme-dist": "24.1.7-build-24286-1936"
19
19
  },
20
20
  "dependencies": {
21
21
  "jszip": "~3.10.1",