devexpress-richedit 24.1.12 → 24.1.13-build-25142-0103
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/bin/gulpfile.js +1 -1
- package/bin/index-custom.js +1 -1
- package/bin/localization-builder.js +1 -1
- package/bin/nspell-index.js +1 -1
- package/bin/nspell.webpack.config.js +1 -1
- package/bin/webpack-externals.js +1 -1
- package/bin/webpack.config.js +1 -1
- package/dist/dx.richedit.css +1 -1
- package/dist/dx.richedit.d.ts +1 -1
- package/dist/dx.richedit.js +858 -803
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/formats/docx/export/exporters/base/sections.d.ts +0 -1
- package/lib/client/formats/docx/export/exporters/base/sections.js +2 -10
- package/lib/client/model-api/formats/exporter.js +1 -1
- package/lib/client/model-api/sub-document.js +1 -1
- package/lib/client/utils/focus-helper.js +22 -5
- package/lib/common/commands/layout/apply-style-command.d.ts +2 -2
- package/lib/common/commands/layout/apply-style-command.js +3 -4
- package/lib/common/commands/toc/set-paragraph-level-command.js +1 -1
- package/lib/common/formats/rtf/export/exporter.d.ts +2 -3
- package/lib/common/formats/rtf/export/exporter.js +3 -3
- package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.d.ts +4 -2
- package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.js +13 -9
- package/lib/common/formats/rtf/export/exporters/table/rtf-table-exporter.d.ts +3 -2
- package/lib/common/formats/rtf/export/exporters/table/rtf-table-exporter.js +4 -4
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-nested-table-exporter-state.d.ts +2 -1
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-nested-table-exporter-state.js +2 -2
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state-base.d.ts +4 -2
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state-base.js +16 -9
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state.d.ts +2 -1
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state.js +2 -2
- package/lib/common/formats/rtf/importer-in-subdocument.d.ts +1 -2
- package/lib/common/formats/rtf/importer-in-subdocument.js +4 -3
- package/lib/common/layout/main-structures/layout-row.js +1 -2
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.d.ts +4 -1
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.js +36 -2
- package/lib/common/layout-formatter/row/tab-info.js +5 -4
- package/lib/common/layout-formatter/table/info/table-info.d.ts +0 -1
- package/lib/common/layout-formatter/table/info/table-info.js +2 -18
- package/lib/common/layout-formatter/table/size-compressor.js +9 -2
- package/lib/common/layout-formatter/table/table-alignment-applier.js +0 -2
- package/lib/common/model/borders/border-info.js +1 -1
- package/lib/common/model/character/character-properties.d.ts +1 -1
- package/lib/common/model/character/character-properties.js +14 -2
- package/lib/common/model/history/items/character-properties-history-items.d.ts +2 -1
- package/lib/common/model/history/items/character-properties-history-items.js +3 -2
- package/lib/common/model/manipulators/character-properties-manipulator.js +2 -2
- package/lib/common/model/manipulators/i-properties-manipulator.d.ts +1 -1
- package/lib/common/model/paragraph/paragraph-style.d.ts +2 -1
- package/lib/common/model/paragraph/paragraph-style.js +5 -3
- package/lib/common/model/tables/secondary-structures/table-base-structures.d.ts +2 -1
- package/lib/common/model/tables/secondary-structures/table-base-structures.js +1 -0
- package/lib/common/ui/ruler/controls/ruler.js +3 -7
- package/package.json +3 -3
@@ -53,7 +53,6 @@ export declare class TableInfo {
|
|
53
53
|
constructor(rowFormatter: RowFormatter, table: Table, tableMaxWidth: number, xPosition: number, yOffset: number, pageIndexFromWhichTableWasMoved: number | null);
|
54
54
|
static checkIsTableCannotBePlacedOnCurrentPage(rowFormatter: RowFormatter, table: Table, yOffset: number, maxWidth: number): boolean;
|
55
55
|
private init;
|
56
|
-
private getShiftHorizontalPosition;
|
57
56
|
private static getEstimatedTableWidth;
|
58
57
|
private static getRelationByColumnY;
|
59
58
|
private static getRelationByColumnX;
|
@@ -8,7 +8,7 @@ import { LayoutTableColumnInfo, LayoutTableInfo } from '../../../layout/table/la
|
|
8
8
|
import { TablePosition, TablePositionIndexes } from '../../../model/tables/main-structures/table';
|
9
9
|
import { TableCellPropertiesMergerMarginLeft, TableCellPropertiesMergerMarginRight } from '../../../model/tables/properties-mergers/table-cell-properties-merger';
|
10
10
|
import { TablePropertiesMergerShadingInfo } from '../../../model/tables/properties-mergers/table-properties-merger';
|
11
|
-
import { ConditionalTableStyleFormatting, TableLayoutType
|
11
|
+
import { ConditionalTableStyleFormatting, TableLayoutType } from '../../../model/tables/secondary-structures/table-base-structures';
|
12
12
|
import { TableWidthUnitType } from '../../../model/tables/secondary-structures/table-units';
|
13
13
|
import { BorderHelper } from '../borders/border-helper';
|
14
14
|
import { createGrid } from '../grid-engine/creator';
|
@@ -79,25 +79,9 @@ export class TableInfo {
|
|
79
79
|
tableIndent.value = 0;
|
80
80
|
}
|
81
81
|
const tableIndentInPixels = tableIndent.asNumberNoPercentType(UnitConverter.twipsToPixels);
|
82
|
-
this.xPositionStart = xPosition + tableIndentInPixels + (diff.xDiff ? diff.xDiff : -firstCellLeftMargin)
|
83
|
-
this.getShiftHorizontalPosition(xPosition);
|
82
|
+
this.xPositionStart = xPosition + tableIndentInPixels + (diff.xDiff ? diff.xDiff : -firstCellLeftMargin);
|
84
83
|
this.yPositionStart = yOffset + diff.yDiff;
|
85
84
|
}
|
86
|
-
getShiftHorizontalPosition(xPosition) {
|
87
|
-
const freeSpaceFromTable = this.columnWidth - this.grid.commonWidth;
|
88
|
-
if (freeSpaceFromTable >= 0)
|
89
|
-
return 0;
|
90
|
-
const tableAlignment = this.table.getActualTableAlignment();
|
91
|
-
if (tableAlignment == TableRowAlignment.Center) {
|
92
|
-
let result = freeSpaceFromTable / 2 - xPosition;
|
93
|
-
if (result < 0 && this.isSimpleView)
|
94
|
-
result = 0;
|
95
|
-
return result;
|
96
|
-
}
|
97
|
-
else if (tableAlignment == TableRowAlignment.Right)
|
98
|
-
return freeSpaceFromTable - xPosition;
|
99
|
-
return 0;
|
100
|
-
}
|
101
85
|
static getEstimatedTableWidth(table, maxWidth) {
|
102
86
|
const preferredWidth = table.preferredWidth;
|
103
87
|
const minWidth = 3 * table.rows[0].getTotalCellsInRowConsiderGrid();
|
@@ -11,6 +11,12 @@ export class LayoutTableSizeCompressor {
|
|
11
11
|
LayoutTableSizeCompressor.cellCompress(cell, cell.createRectangle());
|
12
12
|
}
|
13
13
|
static tableCompress(tableInfo, boundsRelativeColumn) {
|
14
|
+
const intersection = Rectangle.getIntersection(tableInfo, boundsRelativeColumn);
|
15
|
+
const headOffset = intersection.x - tableInfo.x;
|
16
|
+
if (headOffset > 0) {
|
17
|
+
tableInfo.verticalBorders.forEach(b => b.xPos -= headOffset);
|
18
|
+
tableInfo.verticalCursorBorders.forEach(b => b.xPos -= headOffset);
|
19
|
+
}
|
14
20
|
LayoutTableSizeCompressor.compress(tableInfo, boundsRelativeColumn, true, false);
|
15
21
|
const boundsRelativeTable = tableInfo.clone().moveRectangle(-tableInfo.x, -tableInfo.y);
|
16
22
|
for (let row of tableInfo.tableRows)
|
@@ -79,8 +85,9 @@ export class LayoutTableSizeCompressor {
|
|
79
85
|
}
|
80
86
|
border.length = Math.min(border.yPos + border.length, bounds.bottom) - border.yPos;
|
81
87
|
if (border.xPos < bounds.x)
|
82
|
-
|
83
|
-
|
88
|
+
border.xPos = bounds.x;
|
89
|
+
else
|
90
|
+
border.xPos = bounds.right;
|
84
91
|
border.borderInfo.width = 0;
|
85
92
|
return false;
|
86
93
|
}
|
@@ -33,8 +33,6 @@ export class TableAlignmentApplier {
|
|
33
33
|
offset = 0;
|
34
34
|
break;
|
35
35
|
}
|
36
|
-
if (offset <= 0)
|
37
|
-
return;
|
38
36
|
TableAlignmentApplier.moveAllTable(currTableColumnInfo, (rect) => rect.x += offset);
|
39
37
|
}
|
40
38
|
static applyCellsVerticalAlignment(defaultTableCellProps, grid, currTableColumnInfo, rowInfo) {
|
@@ -5,7 +5,7 @@ import { BorderLineStyle } from './enums';
|
|
5
5
|
import { LayoutBorder } from './layout-border';
|
6
6
|
export class BorderInfo {
|
7
7
|
constructor() {
|
8
|
-
this.style = BorderLineStyle.
|
8
|
+
this.style = BorderLineStyle.Nil;
|
9
9
|
this.color = ColorModelInfoCache.defaultItem;
|
10
10
|
this.width = 0;
|
11
11
|
this.offset = 0;
|
@@ -54,7 +54,7 @@ export declare class MaskedCharacterProperties extends CharacterProperties imple
|
|
54
54
|
protected calculateHash(): number;
|
55
55
|
getUseValue(value: CharacterPropertiesMask): boolean;
|
56
56
|
setUseValue(mask: CharacterPropertiesMask, value: boolean): void;
|
57
|
-
setUseValueFull(value: number): void;
|
57
|
+
setUseValueFull(value: number, onlyForDefault?: boolean): void;
|
58
58
|
getLowPartUseValue(value: number): number;
|
59
59
|
getHighPartUseValue(value: number): number;
|
60
60
|
getUseValueFull(): number;
|
@@ -5,6 +5,7 @@ import { ColorHelper } from '../color/color';
|
|
5
5
|
import { ColorModelInfo } from '../color/color-model-info';
|
6
6
|
import { ShadingInfo } from '../shadings/shading-info';
|
7
7
|
import { ShadingPattern } from '../shadings/shading-pattern';
|
8
|
+
import { CharacterPropertyDescriptor } from './character-property-descriptor';
|
8
9
|
import { CompositeFontInfo } from './composite-font-info';
|
9
10
|
import { CharacterFormattingScript, CharacterPropertiesMask, StrikeoutType, UnderlineType } from './enums';
|
10
11
|
import { LangInfo } from './lang-info';
|
@@ -143,8 +144,19 @@ export class MaskedCharacterProperties extends CharacterProperties {
|
|
143
144
|
this.useValueExt &= ~this.getHighPartUseValue(mask);
|
144
145
|
}
|
145
146
|
}
|
146
|
-
setUseValueFull(value) {
|
147
|
-
|
147
|
+
setUseValueFull(value, onlyForDefault = false) {
|
148
|
+
const lowPartUseValue = this.getLowPartUseValue(value);
|
149
|
+
if (onlyForDefault) {
|
150
|
+
CharacterPropertyDescriptor.ALL_FIELDS.forEach((desc) => {
|
151
|
+
const prop = desc.getProp(this);
|
152
|
+
const mask = desc.maskValue();
|
153
|
+
if (desc.binaryEquals(prop, desc.defaultValue))
|
154
|
+
this.setUseValue(mask, !!(mask & lowPartUseValue));
|
155
|
+
});
|
156
|
+
}
|
157
|
+
else {
|
158
|
+
this.useValue = lowPartUseValue;
|
159
|
+
}
|
148
160
|
this.useValueExt = this.getHighPartUseValue(value);
|
149
161
|
}
|
150
162
|
getLowPartUseValue(value) {
|
@@ -14,7 +14,8 @@ import { HistoryItemIntervalStateObject, HistoryItemIntervalUseStateObject } fro
|
|
14
14
|
export declare class FontUseValueHistoryItem extends IntervalBasedHistoryItem {
|
15
15
|
oldState: HistoryItemIntervalState<HistoryItemIntervalStateObject>;
|
16
16
|
newValue: number;
|
17
|
-
|
17
|
+
keepCustomFormatting: boolean;
|
18
|
+
constructor(modelManipulator: ModelManipulator, subDocInterval: SubDocumentInterval, newValue: number, keepCustomFormatting?: boolean);
|
18
19
|
redo(): void;
|
19
20
|
undo(): void;
|
20
21
|
}
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { Errors } from '@devexpress/utils/lib/errors';
|
2
2
|
import { IntervalBasedHistoryItem } from '../base/interval-based-history-item';
|
3
3
|
export class FontUseValueHistoryItem extends IntervalBasedHistoryItem {
|
4
|
-
constructor(modelManipulator, subDocInterval, newValue) {
|
4
|
+
constructor(modelManipulator, subDocInterval, newValue, keepCustomFormatting = false) {
|
5
5
|
super(modelManipulator, subDocInterval);
|
6
6
|
this.newValue = newValue;
|
7
|
+
this.keepCustomFormatting = keepCustomFormatting;
|
7
8
|
}
|
8
9
|
redo() {
|
9
|
-
this.oldState = this.modelManipulator.characterProperties.useValue.setValue(this.boundSubDocument, this.interval, this.newValue);
|
10
|
+
this.oldState = this.modelManipulator.characterProperties.useValue.setValue(this.boundSubDocument, this.interval, this.newValue, this.keepCustomFormatting);
|
10
11
|
}
|
11
12
|
undo() {
|
12
13
|
this.modelManipulator.characterProperties.useValue.restoreValue(this.boundSubDocument, this.oldState);
|
@@ -74,7 +74,7 @@ class CharacterPropertiesUseValueManipulator {
|
|
74
74
|
constructor(manipulator) {
|
75
75
|
this.manipulator = manipulator;
|
76
76
|
}
|
77
|
-
setValue(subDocument, interval, newValue) {
|
77
|
+
setValue(subDocument, interval, newValue, keepCustomFormatting = false) {
|
78
78
|
var oldState = new HistoryItemIntervalState();
|
79
79
|
if (!ControlOptions.isEnabled(subDocument.documentModel.options.characterFormatting))
|
80
80
|
return oldState;
|
@@ -84,7 +84,7 @@ class CharacterPropertiesUseValueManipulator {
|
|
84
84
|
var run = iterator.currentRun;
|
85
85
|
oldState.register(new HistoryItemIntervalStateObject(iterator.currentInterval(), run.maskedCharacterProperties.getUseValueFull()));
|
86
86
|
var properties = run.maskedCharacterProperties.clone();
|
87
|
-
properties.setUseValueFull(newValue);
|
87
|
+
properties.setUseValueFull(newValue, keepCustomFormatting);
|
88
88
|
run.setCharacterProperties(properties);
|
89
89
|
run.onCharacterPropertiesChanged();
|
90
90
|
}
|
@@ -8,7 +8,7 @@ export interface IIntervalPropertyWithUseValueManipulator<T> {
|
|
8
8
|
restoreValue(subDocument: SubDocument, state: HistoryItemIntervalState<HistoryItemIntervalUseStateObject>): any;
|
9
9
|
}
|
10
10
|
export interface IIntervalPropertyManipulator<T> {
|
11
|
-
setValue(subDocument: SubDocument, interval: FixedInterval, newValue: T): HistoryItemIntervalState<HistoryItemIntervalStateObject>;
|
11
|
+
setValue(subDocument: SubDocument, interval: FixedInterval, newValue: T, keepCustomFormatting?: boolean): HistoryItemIntervalState<HistoryItemIntervalStateObject>;
|
12
12
|
restoreValue(subDocument: SubDocument, state: HistoryItemIntervalState<HistoryItemIntervalStateObject>): any;
|
13
13
|
}
|
14
14
|
export interface IListLevelPropertyManipulator<T> {
|
@@ -48,7 +48,8 @@ export declare class TabInfo implements IEquatable<TabInfo>, ICloneable<TabInfo>
|
|
48
48
|
position: number;
|
49
49
|
isDefault: boolean;
|
50
50
|
deleted: boolean;
|
51
|
-
|
51
|
+
readonly isParagraphIndent: boolean;
|
52
|
+
constructor(position: number, alignment: TabAlign, leader: TabLeaderType, deleted: boolean, isDefault: boolean, isParagraphIndent?: boolean);
|
52
53
|
clone(): TabInfo;
|
53
54
|
equals(obj: TabInfo): boolean;
|
54
55
|
}
|
@@ -107,15 +107,16 @@ export class TabProperties {
|
|
107
107
|
}
|
108
108
|
}
|
109
109
|
export class TabInfo {
|
110
|
-
constructor(position, alignment, leader, deleted, isDefault) {
|
110
|
+
constructor(position, alignment, leader, deleted, isDefault, isParagraphIndent = false) {
|
111
111
|
this.position = position;
|
112
112
|
this.alignment = alignment;
|
113
113
|
this.leader = leader;
|
114
114
|
this.isDefault = isDefault;
|
115
115
|
this.deleted = deleted;
|
116
|
+
this.isParagraphIndent = isParagraphIndent;
|
116
117
|
}
|
117
118
|
clone() {
|
118
|
-
return new TabInfo(this.position, this.alignment, this.leader, this.deleted, this.isDefault);
|
119
|
+
return new TabInfo(this.position, this.alignment, this.leader, this.deleted, this.isDefault, this.isParagraphIndent);
|
119
120
|
}
|
120
121
|
equals(obj) {
|
121
122
|
if (!obj)
|
@@ -124,6 +125,7 @@ export class TabInfo {
|
|
124
125
|
this.leader == obj.leader &&
|
125
126
|
this.position == obj.position &&
|
126
127
|
this.deleted == obj.deleted &&
|
127
|
-
this.isDefault == obj.isDefault
|
128
|
+
this.isDefault == obj.isDefault &&
|
129
|
+
this.isParagraphIndent == obj.isParagraphIndent;
|
128
130
|
}
|
129
131
|
}
|
@@ -124,4 +124,5 @@ export var ConditionalTableStyleFormatting;
|
|
124
124
|
ConditionalTableStyleFormatting[ConditionalTableStyleFormatting["TopLeftCell"] = 4] = "TopLeftCell";
|
125
125
|
ConditionalTableStyleFormatting[ConditionalTableStyleFormatting["BottomRightCell"] = 2] = "BottomRightCell";
|
126
126
|
ConditionalTableStyleFormatting[ConditionalTableStyleFormatting["BottomLeftCell"] = 1] = "BottomLeftCell";
|
127
|
+
ConditionalTableStyleFormatting[ConditionalTableStyleFormatting["None"] = 0] = "None";
|
127
128
|
})(ConditionalTableStyleFormatting || (ConditionalTableStyleFormatting = {}));
|
@@ -41,13 +41,9 @@ export class RulerControl extends RulerBase {
|
|
41
41
|
}
|
42
42
|
adjust() {
|
43
43
|
const viewWidth = this.controls.canvas.clientWidth;
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
const paddingLeft = DomUtils.pxToInt(DomUtils.getCurrentStyle(this.controls.canvas).paddingLeft);
|
48
|
-
const pageAreaBorderWidth = (this.controls.canvas.scrollWidth - paddingLeft - this.pageWidth) / 2;
|
49
|
-
this.initialMarginLeftElement = paddingLeft + pageAreaBorderWidth - RULLER_NUMBER_CORRECTION;
|
50
|
-
}
|
44
|
+
const paddingLeft = DomUtils.pxToInt(DomUtils.getCurrentStyle(this.controls.canvas).paddingLeft);
|
45
|
+
const minValue = paddingLeft - RULLER_NUMBER_CORRECTION;
|
46
|
+
this.initialMarginLeftElement = Math.max((viewWidth - this.pageWidth - RULLER_NUMBER_CORRECTION * 2) / 2, minValue);
|
51
47
|
this.rootElement.style.left = this.calculateLeftOffset();
|
52
48
|
this.setPaddings();
|
53
49
|
this.canHandleScroll = this.controls.canvas.scrollWidth > this.controls.canvas.offsetWidth;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "devexpress-richedit",
|
3
|
-
"version": "24.1.
|
3
|
+
"version": "24.1.13-build-25142-0103",
|
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.
|
18
|
-
"devextreme-dist": "24.1.
|
17
|
+
"devextreme": "24.1.13-build-25140-1937",
|
18
|
+
"devextreme-dist": "24.1.13-build-25140-1937"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"jszip": "~3.10.1",
|