devexpress-richedit 25.1.3 → 25.1.4-build-25191-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/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.d.ts +1 -1
- package/dist/dx.richedit.js +253 -218
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/commands/mail-merge-command.js +3 -2
- package/lib/client/commands/open-document-command.js +4 -0
- package/lib/client/formats/docx/export/exporters/relations/base.js +2 -2
- package/lib/client/formats/docx/import/destination/numbering/numberings-destination.js +1 -1
- package/lib/client/formats/docx/import/destination/runs/text-destination.js +1 -1
- package/lib/client/model-api/images/image-enums.js +1 -0
- package/lib/client/model-api/table/enums.js +4 -0
- package/lib/client/public/commands/enum.js +1 -0
- package/lib/client/public/ribbon/item-ids.js +1 -0
- package/lib/client/public/rich-edit.d.ts +5 -5
- package/lib/client/ribbon/toolbar-items/index.d.ts +1 -1
- package/lib/client/ribbon/toolbar-items/toolbar-item-template-creators/index.d.ts +7 -7
- package/lib/common/canvas/canvas-scroll-manager.js +1 -1
- package/lib/common/commands/dialogs/dialog-layout-options-command.js +0 -3
- package/lib/common/commands/floating-objects/floating-object-drag-drop-change-position-command.js +0 -3
- package/lib/common/commands/layout/toggle-show-hidden-symbols-command.js +0 -3
- package/lib/common/formats/html/export/html-export.d.ts +8 -0
- package/lib/common/formats/html/export/html-export.js +49 -26
- package/lib/common/formats/html/import/containers/runs.d.ts +2 -1
- package/lib/common/formats/html/import/containers/runs.js +2 -1
- package/lib/common/formats/html/import/html-importer.d.ts +0 -1
- package/lib/common/formats/html/import/html-importer.js +2 -3
- package/lib/common/formats/html/import/html-model-inserter.js +4 -0
- package/lib/common/formats/html/import/importers/list-base.js +2 -1
- package/lib/common/formats/rtf/utils/list-level-display-text-helper.js +2 -2
- package/lib/common/input-controller.js +1 -1
- package/lib/common/layout/main-structures/layout-row.d.ts +1 -2
- package/lib/common/layout/main-structures/layout-row.js +0 -1
- package/lib/common/layout-formatter/row/result.js +1 -1
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.d.ts +1 -0
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.js +2 -2
- package/lib/common/layout-formatter/row/size-engine/row-sizes-manager.d.ts +2 -0
- package/lib/common/layout-formatter/row/size-engine/row-sizes-manager.js +2 -0
- package/lib/common/layout-formatter/row/states.js +1 -1
- package/lib/common/layout-formatter/row/tab-info.d.ts +2 -1
- package/lib/common/layout-formatter/row/tab-info.js +40 -40
- package/lib/common/model/fields/parsers/field-code-parser-doc-variable.d.ts +1 -1
- package/lib/common/model/fields/parsers/field-code-parser.d.ts +1 -1
- package/lib/common/model/paragraph/paragraph-style.d.ts +1 -0
- package/lib/common/model/paragraph/paragraph-style.js +3 -0
- package/lib/common/scroll/canvas-states.d.ts +4 -4
- package/lib/common/scroll/model-states.d.ts +5 -5
- package/package.json +3 -3
- package/lib/client/formats/docx/import/destination/field/field-data-destination.d.ts +0 -0
- package/lib/client/formats/docx/import/destination/field/field-data-destination.js +0 -0
- package/lib/client/formats/docx/import/destination/field/form-field-destination.d.ts +0 -0
- package/lib/client/formats/docx/import/destination/field/form-field-destination.js +0 -0
- package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-mark-run-properties-destination.d.ts +0 -0
- package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-mark-run-properties-destination.js +0 -0
- package/lib/common/formats/rtf/import/properties-normalization/tmp.d.ts +0 -0
- package/lib/common/formats/rtf/import/properties-normalization/tmp.js +0 -0
- package/lib/common/layout-formatter/box/generator/multi-dimension-iterator.d.ts +0 -0
- package/lib/common/layout-formatter/box/generator/multi-dimension-iterator.js +0 -0
- package/lib/common/layout-formatter/table/layout-row-index-helper.d.ts +0 -0
- package/lib/common/layout-formatter/table/layout-row-index-helper.js +0 -0
@@ -14,7 +14,8 @@ export declare class RowTabInfo {
|
|
14
14
|
constructor(rowFormatter: RowFormatter, paragraphHorizontalBoundsStart: number);
|
15
15
|
restart(): void;
|
16
16
|
shiftBoxesAfterLastTab(): void;
|
17
|
-
|
17
|
+
tryAddTabBox(): boolean;
|
18
|
+
private addTabBox;
|
18
19
|
private calculateActualTabWidth;
|
19
20
|
private calcLastVisibleBoxRightBounds;
|
20
21
|
private getFinalCustomTabWidth;
|
@@ -7,7 +7,6 @@ import { SearchUtils } from '@devexpress/utils/lib/utils/search';
|
|
7
7
|
import { StringUtils } from '@devexpress/utils/lib/utils/string';
|
8
8
|
import { LayoutBoxType } from '../../layout/main-structures/layout-boxes/layout-box';
|
9
9
|
import { TabLeaderType } from '../../layout/main-structures/layout-boxes/layout-tab-space-box';
|
10
|
-
import { LayoutRowStateFlags } from '../../layout/main-structures/layout-row';
|
11
10
|
import { TabAlign } from '../../model/paragraph/paragraph';
|
12
11
|
import { ParagraphFirstLineIndent } from '../../model/paragraph/paragraph-properties';
|
13
12
|
import { TabInfo } from '../../model/paragraph/paragraph-style';
|
@@ -61,52 +60,46 @@ export class RowTabInfo {
|
|
61
60
|
}
|
62
61
|
this.restart();
|
63
62
|
}
|
64
|
-
|
65
|
-
const box = this.rowFormatter.currBox;
|
63
|
+
tryAddTabBox() {
|
66
64
|
this.shiftBoxesAfterLastTab();
|
67
65
|
let tabPosition = this.getNextCustomTabPosition(this.currInterval.startOfFreeSpace);
|
68
|
-
const isCustomNonLeftTabPosition = tabPosition && !
|
66
|
+
const isCustomNonLeftTabPosition = tabPosition && !tabPosition.isLeftAlignment;
|
69
67
|
let tabXPosRelativePage = tabPosition ? tabPosition.position : this.getNextDefaultTabPosition(this.currInterval.startOfFreeSpace);
|
70
68
|
if (tabXPosRelativePage > this.currInterval.end) {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
tabXPosRelativePage = tabPosition ? tabPosition.position : this.getNextDefaultTabPosition(this.currInterval.startOfFreeSpace);
|
79
|
-
}
|
69
|
+
if (this.rowFormatter.manager.model.compatibilitySettings.compatibilityMode < CompatibilityMode.Word2013 && tabPosition && !tabPosition.isParagraphIndent) {
|
70
|
+
const interval = this.rowFormatter.rowSizesManager.rowFormattingInfo.outerHorizontalRowContentBounds;
|
71
|
+
interval.length = Number.MAX_SAFE_INTEGER - interval.start;
|
72
|
+
this.rowFormatter.rowSizesManager.isInfinityWidth = true;
|
73
|
+
this.rowFormatter.rowSizesManager.rowFormattingInfo.recalculate(interval);
|
74
|
+
this.row.width = Number.MAX_SAFE_INTEGER;
|
75
|
+
return this.tryAddTabBox();
|
80
76
|
}
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
if (lastInterval.end < this.rowFormatter.paragraphHorizontalBounds.end) {
|
88
|
-
if (this.rowFormatter.manager.model.compatibilitySettings.compatibilityMode < CompatibilityMode.Word2013 && tabPosition && !tabPosition.isParagraphIndent) {
|
89
|
-
const interval = this.rowFormatter.rowSizesManager.rowFormattingInfo.outerHorizontalRowContentBounds;
|
90
|
-
interval.length = Number.MAX_SAFE_INTEGER - interval.start;
|
91
|
-
this.rowFormatter.rowSizesManager.rowFormattingInfo.recalculate(interval);
|
92
|
-
this.row.width = Number.MAX_SAFE_INTEGER;
|
93
|
-
this.row.flags.set(LayoutRowStateFlags.InfinityWidth, true);
|
94
|
-
return this.addTabBox();
|
95
|
-
}
|
96
|
-
else if (tabBox.right < this.rowFormatter.paragraphHorizontalBounds.end) {
|
97
|
-
const delta = this.rowFormatter.paragraphHorizontalBounds.end - lastInterval.end;
|
98
|
-
let canIncrease = !isCustomNonLeftTabPosition;
|
99
|
-
if (canIncrease && this.rowFormatter.rowSizesManager.rowFormattingInfo.isFloatingIntersectRow) {
|
100
|
-
canIncrease = !IntervalAlgorithms.getIntersection(new FixedInterval(lastInterval.end, delta), ListUtils.last(this.rowFormatter.rowSizesManager.rowFormattingInfo.busyIntervals));
|
77
|
+
else {
|
78
|
+
let ind = this.rowFormatter.rowSizesManager.rowFormattingInfo.indexOfIntervalContainsPositon(tabXPosRelativePage);
|
79
|
+
if (ind != this.rowFormatter.rowSizesManager.rowFormattingInfo.currIndex) {
|
80
|
+
if (isCustomNonLeftTabPosition) {
|
81
|
+
this.addTabBox(tabPosition, this.currInterval.end);
|
82
|
+
return true;
|
101
83
|
}
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
this.
|
106
|
-
return this.addTabBox();
|
84
|
+
else {
|
85
|
+
this.rowFormatter.rowSizesManager.finishLogicalRow(ind, this.currInterval.end);
|
86
|
+
tabPosition = this.getNextCustomTabPosition(this.currInterval.startOfFreeSpace);
|
87
|
+
return this.tryAddTabBox();
|
107
88
|
}
|
108
89
|
}
|
109
90
|
}
|
91
|
+
const extraSpace = this.rowFormatter.paragraphHorizontalBounds.end - this.currInterval.end;
|
92
|
+
if (extraSpace > 0) {
|
93
|
+
let canIncrease = !isCustomNonLeftTabPosition;
|
94
|
+
if (canIncrease && this.rowFormatter.rowSizesManager.rowFormattingInfo.isFloatingIntersectRow)
|
95
|
+
canIncrease = !IntervalAlgorithms.getIntersection(new FixedInterval(this.currInterval.end, extraSpace), ListUtils.last(this.rowFormatter.rowSizesManager.rowFormattingInfo.busyIntervals));
|
96
|
+
if (canIncrease) {
|
97
|
+
this.currInterval.end = this.rowFormatter.paragraphHorizontalBounds.end;
|
98
|
+
this.currInterval.avaliableWidth += extraSpace;
|
99
|
+
this.row.width += extraSpace;
|
100
|
+
return this.tryAddTabBox();
|
101
|
+
}
|
102
|
+
}
|
110
103
|
if (!this.row.isEmpty() && !isCustomNonLeftTabPosition)
|
111
104
|
return false;
|
112
105
|
if (this.rowFormatter.rowSizesManager.rowFormattingInfo.isFloatingIntersectRow && !isCustomNonLeftTabPosition) {
|
@@ -114,13 +107,20 @@ export class RowTabInfo {
|
|
114
107
|
this.rowFormatter.rowSizesManager.restartAllRow(false);
|
115
108
|
while (EnumUtils.isAnyOf(this.rowFormatter.currBox.getType(), LayoutBoxType.AnchorPicture, LayoutBoxType.AnchorTextBox))
|
116
109
|
this.rowFormatter.setBoxInfo(true);
|
117
|
-
return this.
|
110
|
+
return this.tryAddTabBox();
|
118
111
|
}
|
119
112
|
}
|
113
|
+
this.addTabBox(tabPosition, tabXPosRelativePage);
|
114
|
+
return true;
|
115
|
+
}
|
116
|
+
addTabBox(tabPosition, tabXPosRelativePage) {
|
117
|
+
const box = this.rowFormatter.currBox;
|
118
|
+
box.x = this.currInterval.startOfFreeSpace;
|
119
|
+
box.width = (!tabPosition || tabPosition.isLeftAlignment) ? tabXPosRelativePage - box.x : 0;
|
120
|
+
const tabBox = box.getLayoutTabBox(tabPosition ? tabPosition.leader : TabLeaderType.None);
|
120
121
|
this.rowFormatter.rowSizesManager.addTabBox(tabBox);
|
121
122
|
this.lastTabPosition = tabPosition ? tabPosition : new TabInfo(tabXPosRelativePage, TabAlign.Left, TabLeaderType.None, false, false);
|
122
123
|
this.lastTabBoxIndex = this.row.boxes.length - 1;
|
123
|
-
return true;
|
124
124
|
}
|
125
125
|
calculateActualTabWidth(prevTabBox) {
|
126
126
|
const prevTabBoxXPos = prevTabBox.x;
|
@@ -9,6 +9,6 @@ export declare class FieldCodeParserDocVariable extends FieldCodeParser {
|
|
9
9
|
protected insertDefaultText(): boolean;
|
10
10
|
protected placeRequest(): boolean;
|
11
11
|
protected getRequestData(): FieldRequestData;
|
12
|
-
|
12
|
+
getFormattedResult(value: string): string;
|
13
13
|
protected applyResponse(response: any): boolean;
|
14
14
|
}
|
@@ -80,7 +80,7 @@ export declare abstract class FieldCodeParser {
|
|
80
80
|
getMailMergeType(): FieldMailMergeType;
|
81
81
|
handleSwitch(newSwitch: FieldSwitch): boolean;
|
82
82
|
handleParameter(newParameter: FieldParameter): boolean;
|
83
|
-
|
83
|
+
getFormattedResult(value: number | string): string;
|
84
84
|
private capitalizesFirstLetterOfFirstWord;
|
85
85
|
private capitalizesFirstLetterOfEachWord;
|
86
86
|
private replaceCharacter;
|
@@ -48,6 +48,7 @@ export declare abstract class TabInfoBase<T extends TabInfoBase<T>> implements I
|
|
48
48
|
deleted: boolean;
|
49
49
|
isDefault: boolean;
|
50
50
|
constructor(alignment: TabAlign, leader: TabLeaderType, deleted: boolean, isDefault: boolean);
|
51
|
+
get isLeftAlignment(): boolean;
|
51
52
|
equals(obj: T): boolean;
|
52
53
|
abstract clone(): T;
|
53
54
|
}
|
@@ -2,6 +2,8 @@ import { SearchUtils } from '@devexpress/utils/lib/utils/search';
|
|
2
2
|
import { NumberingList } from '../numbering-lists/numbering-list';
|
3
3
|
import { ParagraphPropertiesMerger } from '../properties-merger/paragraph-properties-merger';
|
4
4
|
import { StyleBase } from '../style-base';
|
5
|
+
import { TabAlign } from './paragraph';
|
6
|
+
import { EnumUtils } from '@devexpress/utils/lib/utils/enum';
|
5
7
|
export class ParagraphStyle extends StyleBase {
|
6
8
|
constructor(styleName, localizedName, deleted, hidden, semihidden, isDefault, maskedCharacterProperties, maskedParagraphProperties, tabs, autoUpdate, numberingListIndex, listLevelIndex, base64EncodedImage, id) {
|
7
9
|
super(styleName, localizedName, deleted, hidden, semihidden, isDefault, base64EncodedImage, id);
|
@@ -113,6 +115,7 @@ export class TabInfoBase {
|
|
113
115
|
this.deleted = deleted;
|
114
116
|
this.isDefault = isDefault;
|
115
117
|
}
|
118
|
+
get isLeftAlignment() { return EnumUtils.isAnyOf(this.alignment, TabAlign.Left, TabAlign.Numbering); }
|
116
119
|
equals(obj) {
|
117
120
|
if (!obj)
|
118
121
|
return false;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { LayoutPosition } from '../layout/layout-position';
|
2
|
-
import {
|
2
|
+
import { GetVerticalOffset, RelativePosition } from './model-states';
|
3
3
|
export interface ICanvasState {
|
4
4
|
lp: LayoutPosition;
|
5
|
-
getVerticalOffset:
|
5
|
+
getVerticalOffset: GetVerticalOffset;
|
6
6
|
relativePosition: RelativePosition;
|
7
7
|
}
|
8
8
|
export declare class CanvasState implements ICanvasState {
|
9
9
|
lp: LayoutPosition;
|
10
|
-
getVerticalOffset:
|
10
|
+
getVerticalOffset: GetVerticalOffset;
|
11
11
|
relativePosition: RelativePosition;
|
12
|
-
constructor(lp: LayoutPosition, relativePosition: RelativePosition, getVerticalOffset:
|
12
|
+
constructor(lp: LayoutPosition, relativePosition: RelativePosition, getVerticalOffset: GetVerticalOffset);
|
13
13
|
}
|
@@ -4,7 +4,7 @@ import { ScrollTopInfo } from '../canvas/canvas-manager';
|
|
4
4
|
import { CanvasSizeInfo } from '../canvas/canvas-size-info';
|
5
5
|
import { Selection } from '../selection/selection';
|
6
6
|
import { ICanvasState } from './canvas-states';
|
7
|
-
export type
|
7
|
+
export type GetVerticalOffset = (sizes: CanvasSizeInfo) => number;
|
8
8
|
export declare enum RelativePosition {
|
9
9
|
Top = 0,
|
10
10
|
Bottom = 1,
|
@@ -25,7 +25,7 @@ export interface IModelStateByModelPosition_RelativePosition {
|
|
25
25
|
useStdRelativePosition(): IModelStateByModelPosition_VerticalOffset;
|
26
26
|
}
|
27
27
|
export interface IModelStateByModelPosition_VerticalOffset {
|
28
|
-
setVerticalOffset(callback:
|
28
|
+
setVerticalOffset(callback: GetVerticalOffset): IModelState;
|
29
29
|
useStdOffset(): IModelState;
|
30
30
|
}
|
31
31
|
export interface IModelState {
|
@@ -33,7 +33,7 @@ export interface IModelState {
|
|
33
33
|
}
|
34
34
|
export declare class ModelStateByModelPosition implements IModelStateByModelPosition_ModelPosition, IModelStateByModelPosition_VerticalOffset, IModelStateByModelPosition_RelativePosition, IModelState {
|
35
35
|
protected modelPosition: number;
|
36
|
-
protected getVerticalOffset:
|
36
|
+
protected getVerticalOffset: GetVerticalOffset;
|
37
37
|
protected relativePosition: RelativePosition;
|
38
38
|
private _subDocument;
|
39
39
|
readonly endOfLine: boolean;
|
@@ -43,7 +43,7 @@ export declare class ModelStateByModelPosition implements IModelStateByModelPosi
|
|
43
43
|
getModelPosition(): number;
|
44
44
|
setModelPosition(modelPosition: number): IModelStateByModelPosition_RelativePosition;
|
45
45
|
useCurrentPosition(selection: Selection): IModelStateByModelPosition_RelativePosition;
|
46
|
-
setVerticalOffset(getVerticalOffset:
|
46
|
+
setVerticalOffset(getVerticalOffset: GetVerticalOffset): IModelState;
|
47
47
|
useStdOffset(): IModelState;
|
48
48
|
setRelativePosition(relativePosition: RelativePosition): IModelStateByModelPosition_VerticalOffset;
|
49
49
|
useStdRelativePosition(): IModelStateByModelPosition_VerticalOffset;
|
@@ -54,7 +54,7 @@ export interface ModelStateByPageInfo_SetPageInfo {
|
|
54
54
|
}
|
55
55
|
export declare class ModelStateByPageInfo implements ModelStateByPageInfo_SetPageInfo, IModelState {
|
56
56
|
protected pageIndex: number;
|
57
|
-
protected getVerticalOffset:
|
57
|
+
protected getVerticalOffset: GetVerticalOffset;
|
58
58
|
protected relativePosition: RelativePosition;
|
59
59
|
setPageInfo(scrollTopInfo: ScrollTopInfo): IModelState;
|
60
60
|
getCanvasState(layout: DocumentLayout): ICanvasState;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "devexpress-richedit",
|
3
|
-
"version": "25.1.
|
3
|
+
"version": "25.1.4-build-25191-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": "25.1.
|
18
|
-
"devextreme-dist": "25.1.
|
17
|
+
"devextreme": "25.1.4-build-25189-0901",
|
18
|
+
"devextreme-dist": "25.1.4-build-25189-0901"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"jszip": "~3.10.1",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|