devexpress-richedit 24.1.7-build-24274-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.
- package/dist/dx.richedit.js +26 -12
- package/dist/dx.richedit.min.js +1 -1
- package/lib/client/formats/docx/import/color/open-xml-color-import-helper.js +2 -2
- package/lib/client/formats/docx/import/importers/styles-importer.js +2 -1
- package/lib/common/formats/html/import/html-importer.js +1 -1
- package/lib/common/model/color/color-model-info.d.ts +1 -1
- package/lib/common/model/color/color-model-info.js +2 -1
- package/lib/common/model/manipulators/text-manipulator/text-manipulator.js +1 -1
- package/lib/common/model/styles-manager.js +1 -0
- package/lib/common/selection/input-position.js +17 -6
- package/package.json +3 -3
@@ -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 (
|
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
|
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;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Section } from '../model/section/section';
|
1
2
|
import { SectionPropertyDescriptor } from '../model/section/section-property-descriptor';
|
2
3
|
import { InputPositionBase } from './input-position-base';
|
3
4
|
import { SearchUtils } from '@devexpress/utils/lib/utils/search';
|
@@ -18,13 +19,23 @@ export class InputPosition extends InputPositionBase {
|
|
18
19
|
}
|
19
20
|
getMergedSectionPropertiesRaw() {
|
20
21
|
if (!this.mergedSectionPropertiesRaw) {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
let sectionIndex;
|
23
|
+
let intervalEndPosition;
|
24
|
+
const sections = this.model.sections;
|
25
|
+
const pageIndex = this.selection.pageIndex;
|
26
|
+
if (pageIndex < 0) {
|
27
|
+
const interval = this.intervalsInfo.interval;
|
28
|
+
const intervalStartPosition = interval.start;
|
29
|
+
intervalEndPosition = interval.end;
|
30
|
+
sectionIndex = SearchUtils.normedInterpolationIndexOf(sections, (s) => s.startLogPosition.value, intervalStartPosition);
|
31
|
+
}
|
32
|
+
else {
|
33
|
+
const layoutPage = this.selection.layout.pages[pageIndex];
|
34
|
+
sectionIndex = Section.getPageSectionIndex(layoutPage, sections);
|
35
|
+
intervalEndPosition = layoutPage.getEndPosition();
|
36
|
+
}
|
26
37
|
this.mergedSectionPropertiesRaw = sections[sectionIndex++].sectionProperties.clone();
|
27
|
-
for (
|
38
|
+
for (let section; (section = sections[sectionIndex]) && (section.startLogPosition.value < intervalEndPosition); sectionIndex++)
|
28
39
|
InputPositionBase.mergePropertiesRaw(this.mergedSectionPropertiesRaw, section.sectionProperties, SectionPropertyDescriptor.ALL_FIELDS);
|
29
40
|
}
|
30
41
|
return this.mergedSectionPropertiesRaw;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "devexpress-richedit",
|
3
|
-
"version": "24.1.7-build-
|
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-
|
18
|
-
"devextreme-dist": "24.1.7-build-
|
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",
|