devexpress-richedit 25.1.2-beta → 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.css +1 -1
- package/dist/dx.richedit.d.ts +1 -2
- package/dist/dx.richedit.js +1374 -1304
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/client-rich-edit.js +2 -2
- package/lib/client/commands/commands.js +0 -3
- 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/character-properties.js +13 -17
- package/lib/client/model-api/document.js +2 -0
- package/lib/client/model-api/images/image-enums.js +1 -0
- package/lib/client/model-api/images/images.js +1 -1
- package/lib/client/model-api/table/enums.js +4 -0
- package/lib/client/public/commands/enum.d.ts +1 -2
- package/lib/client/public/commands/enum.js +1 -1
- package/lib/client/public/options.d.ts +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/client/utils/focus-helper.js +22 -5
- package/lib/common/canvas/canvas-manager.js +1 -1
- package/lib/common/canvas/canvas-scroll-manager.js +1 -1
- package/lib/common/canvas/canvas-size-info.d.ts +1 -0
- package/lib/common/canvas/canvas-size-info.js +2 -2
- package/lib/common/canvas/renderes/view-manager.js +4 -3
- package/lib/common/commands/client-command.d.ts +1 -2
- package/lib/common/commands/client-command.js +0 -1
- package/lib/common/commands/command-manager.js +0 -2
- package/lib/common/commands/dialogs/dialog-layout-options-command.js +0 -3
- package/lib/common/commands/document/print-document-on-client-command.d.ts +2 -0
- package/lib/common/commands/document/print-document-on-client-command.js +46 -18
- package/lib/common/commands/floating-objects/floating-object-drag-drop-change-position-command.js +0 -3
- 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/layout/toggle-show-hidden-symbols-command.js +0 -3
- package/lib/common/commands/toc/set-paragraph-level-command.js +1 -1
- 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 +2 -2
- package/lib/common/layout/document-layout.js +4 -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/layout-formatter/row/word-holder.js +1 -1
- package/lib/common/model/borders/border-info.js +1 -1
- package/lib/common/model/caches/images.d.ts +4 -1
- package/lib/common/model/caches/images.js +6 -2
- 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/fields/field.d.ts +1 -1
- package/lib/common/model/fields/field.js +4 -3
- 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/fields/tree-creator.js +1 -1
- 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/manipulators/picture-manipulator/picture-manipulator.js +2 -2
- package/lib/common/model/options/fonts.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/lib/common/ui/ruler/controls/ruler.js +3 -7
- package/lib/common/ui/ruler/controls/vertical-line.js +2 -1
- 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/commands/layout/toggle-allow-zoom-command.d.ts +0 -7
- package/lib/common/commands/layout/toggle-allow-zoom-command.js +0 -17
- 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
@@ -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;
|
@@ -8,12 +8,15 @@ export declare class CacheImageInfo {
|
|
8
8
|
private _convertedBase64?;
|
9
9
|
private _size?;
|
10
10
|
private _isLoaded;
|
11
|
+
private _isSizeDefined;
|
11
12
|
tmpId?: number;
|
12
13
|
actualId?: number;
|
13
14
|
imageUrl?: string;
|
14
15
|
file?: File;
|
15
16
|
get isLoaded(): boolean;
|
16
17
|
set isLoaded(val: boolean);
|
18
|
+
get isSizeDefined(): boolean;
|
19
|
+
set isSizeDefined(val: boolean);
|
17
20
|
get size(): Size;
|
18
21
|
set size(val: Size);
|
19
22
|
get currId(): number;
|
@@ -22,7 +25,7 @@ export declare class CacheImageInfo {
|
|
22
25
|
get pdfCompatibleBase64(): string | undefined;
|
23
26
|
get referenceInfo(): CacheImageInfo | undefined;
|
24
27
|
set referenceInfo(val: CacheImageInfo | undefined);
|
25
|
-
constructor(base64?: string, actualId?: number, tmpId?: number, imageUrl?: string, file?: File, referenceInfo?: CacheImageInfo, size?: Size, isLoaded?: boolean);
|
28
|
+
constructor(base64?: string, actualId?: number, tmpId?: number, imageUrl?: string, file?: File, referenceInfo?: CacheImageInfo, size?: Size, isLoaded?: boolean, isActualSize?: boolean);
|
26
29
|
equals(obj: CacheImageInfo): boolean;
|
27
30
|
clone(): CacheImageInfo;
|
28
31
|
shouldMakeImagePdfCompatible(): boolean;
|
@@ -7,6 +7,8 @@ export class CacheImageInfo {
|
|
7
7
|
static get emptyPictureSize() { return new Size(CacheImageInfo.emptyPicDimension, CacheImageInfo.emptyPicDimension); }
|
8
8
|
get isLoaded() { return this._referenceInfo ? this._referenceInfo._isLoaded : this._isLoaded; }
|
9
9
|
set isLoaded(val) { this._isLoaded = val; }
|
10
|
+
get isSizeDefined() { return this._referenceInfo ? this._referenceInfo._isSizeDefined : this._isSizeDefined; }
|
11
|
+
set isSizeDefined(val) { this._isSizeDefined = val; }
|
10
12
|
get size() { return this._referenceInfo ? this._referenceInfo._size : this._size; }
|
11
13
|
set size(val) { this._size = val; }
|
12
14
|
get currId() { return this.actualId !== undefined ? this.actualId : this.tmpId; }
|
@@ -19,15 +21,17 @@ export class CacheImageInfo {
|
|
19
21
|
this._base64 = undefined;
|
20
22
|
this._size = undefined;
|
21
23
|
this._isLoaded = undefined;
|
24
|
+
this._isSizeDefined = undefined;
|
22
25
|
this.file = undefined;
|
23
26
|
}
|
24
|
-
constructor(base64, actualId, tmpId, imageUrl, file, referenceInfo, size, isLoaded) {
|
27
|
+
constructor(base64, actualId, tmpId, imageUrl, file, referenceInfo, size, isLoaded, isActualSize) {
|
25
28
|
this._base64 = base64 !== undefined ? Base64Utils.normalizeToDataUrl(base64, "image/png") : undefined;
|
26
29
|
this.actualId = actualId;
|
27
30
|
this.tmpId = tmpId;
|
28
31
|
this._referenceInfo = referenceInfo;
|
29
32
|
this._size = size ? size : CacheImageInfo.emptyPictureSize;
|
30
33
|
this._isLoaded = isLoaded !== undefined ? isLoaded : false;
|
34
|
+
this._isSizeDefined = isActualSize ? isActualSize : !!size;
|
31
35
|
this.imageUrl = imageUrl;
|
32
36
|
this.file = file;
|
33
37
|
}
|
@@ -41,7 +45,7 @@ export class CacheImageInfo {
|
|
41
45
|
this.size.equals(obj.size);
|
42
46
|
}
|
43
47
|
clone() {
|
44
|
-
return new CacheImageInfo(this._base64, this.actualId, this.tmpId, this.imageUrl, this.file, this._referenceInfo, this._size, this._isLoaded);
|
48
|
+
return new CacheImageInfo(this._base64, this.actualId, this.tmpId, this.imageUrl, this.file, this._referenceInfo, this._size, this._isLoaded, this._isSizeDefined);
|
45
49
|
}
|
46
50
|
shouldMakeImagePdfCompatible() {
|
47
51
|
if (isDefined(this._convertedBase64))
|
@@ -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) {
|
@@ -99,7 +99,7 @@ export declare class Field {
|
|
99
99
|
static correctIntervalDueToFieldsWithoutUiChecks(subDocument: SubDocument, newInterval: FixedInterval): FixedInterval;
|
100
100
|
private static correctIntervalDueToFieldsCaseSelectionCollapsed;
|
101
101
|
static correctIntervalDueToFields(subDocument: SubDocument, newInterval: FixedInterval): number;
|
102
|
-
private static
|
102
|
+
private static isResizableObjectSelected;
|
103
103
|
static correctWhenPositionInStartCode(fields: Field[], position: number): number;
|
104
104
|
clone(subDocument: SubDocument): Field;
|
105
105
|
}
|
@@ -287,15 +287,16 @@ export class Field {
|
|
287
287
|
return newInterval.start = Field.correctIntervalDueToFieldsCaseSelectionCollapsed(subDocument.fields, newInterval.start);
|
288
288
|
const indexesInterval = Field.correctIntervalDueToFieldsWithoutUiChecks(subDocument, newInterval);
|
289
289
|
ListUtils.forEach(fields, (field) => {
|
290
|
-
if (field.getResultInterval().equals(newInterval) && !this.
|
290
|
+
if (field.getResultInterval().equals(newInterval) && !this.isResizableObjectSelected(subDocument, newInterval))
|
291
291
|
newInterval.expand(field.getAllFieldInterval());
|
292
292
|
}, indexesInterval.start, indexesInterval.end);
|
293
293
|
}
|
294
|
-
static
|
294
|
+
static isResizableObjectSelected(subDocument, interval) {
|
295
295
|
if (interval.length !== 1)
|
296
296
|
return false;
|
297
297
|
const run = subDocument.getRunByPosition(interval.start);
|
298
|
-
|
298
|
+
const runType = run && run.getType();
|
299
|
+
return runType == RunType.AnchoredPictureRun || runType == RunType.AnchoredTextBoxRun || runType == RunType.InlinePictureRun;
|
299
300
|
}
|
300
301
|
static correctWhenPositionInStartCode(fields, position) {
|
301
302
|
if (fields.length < 1)
|
@@ -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;
|
@@ -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> {
|
@@ -88,7 +88,7 @@ export class PictureManipulator extends RunsBaseManipulator {
|
|
88
88
|
this.history.addTransaction(() => {
|
89
89
|
this.modelManipulator.range.removeInterval(new SubDocumentInterval(subDocument, interval), true, false);
|
90
90
|
const newInfo = new InlinePictureInfo(pictureRun.size.clone(), new Shape(), -1, pictureRun.info.containerProperties, pictureRun.info.nonVisualDrawingProperties);
|
91
|
-
this.modelManipulator.picture.insertInlinePictureViaHistory(new SubDocumentPosition(subDocument, interval.start), charPropsBundle, newInfo);
|
91
|
+
this.modelManipulator.picture.insertInlinePictureViaHistory(new SubDocumentPosition(subDocument, interval.start), charPropsBundle, newInfo, new ImageLoadingOptions(!pictureRun.cacheInfo.isSizeDefined));
|
92
92
|
});
|
93
93
|
}
|
94
94
|
}
|
@@ -103,7 +103,7 @@ export class PictureManipulator extends RunsBaseManipulator {
|
|
103
103
|
anchorInfo.zOrder = this.modelManipulator.floatingObject.zOrder.getNewZOrder(subDocument);
|
104
104
|
this.modelManipulator.range.removeInterval(new SubDocumentInterval(subDocument, interval), true, false);
|
105
105
|
const newInfo = new AnchorPictureInfo(pictureRun.size.clone(), new Shape(), anchorInfo, pictureRun.info.containerProperties, pictureRun.info.nonVisualDrawingProperties);
|
106
|
-
this.modelManipulator.picture.insertAnchoredPictureViaHistory(new SubDocumentPosition(subDocument, interval.start), charPropsBundle, newInfo, new ImageLoadingOptions(
|
106
|
+
this.modelManipulator.picture.insertAnchoredPictureViaHistory(new SubDocumentPosition(subDocument, interval.start), charPropsBundle, newInfo, new ImageLoadingOptions(!pictureRun.cacheInfo.isSizeDefined));
|
107
107
|
run = subDocument.getRunByPosition(interval.start);
|
108
108
|
}
|
109
109
|
let anchoredRun = run.getType() == RunType.AnchoredPictureRun ? run : run;
|
@@ -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;
|
@@ -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;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { DomUtils } from '@devexpress/utils/lib/utils/dom';
|
2
2
|
import { DocumentRenderer } from '../../../canvas/renderes/common/document-renderer';
|
3
3
|
import { RULLER_NUMBER_CORRECTION } from '../settings';
|
4
|
+
import { SizeUtils } from '../../../../common/utils/size-utils';
|
4
5
|
export const TABLE_COLUMN_SEPARATOR_RULER_LINE_CLASS_NAME = " table";
|
5
6
|
export var SnapTo;
|
6
7
|
(function (SnapTo) {
|
@@ -33,7 +34,7 @@ export class RulerVerticalLineControl {
|
|
33
34
|
DomUtils.addClassName(this.rootElement, TABLE_COLUMN_SEPARATOR_RULER_LINE_CLASS_NAME);
|
34
35
|
else
|
35
36
|
DomUtils.removeClassName(this.rootElement, TABLE_COLUMN_SEPARATOR_RULER_LINE_CLASS_NAME);
|
36
|
-
this.rootElement.style.height = this.canvas
|
37
|
+
this.rootElement.style.height = SizeUtils.getClientHeight(this.canvas) + "px";
|
37
38
|
this.rootElement.style.top = this.canvas.offsetTop + "px";
|
38
39
|
this.rulerControlLeft = this.rulerControlElement.offsetLeft;
|
39
40
|
this.rulerControlWidth = this.rulerControlElement.offsetWidth;
|
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
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { CommandBase, CommandSimpleOptions } from '../command-base';
|
2
|
-
import { SimpleCommandState } from '../command-states';
|
3
|
-
export declare class ToggleAllowZoomCommand extends CommandBase<SimpleCommandState> {
|
4
|
-
getState(): SimpleCommandState;
|
5
|
-
executeCore(_state: SimpleCommandState, options: CommandSimpleOptions<boolean>): boolean;
|
6
|
-
isEnabledInReadOnlyMode(): boolean;
|
7
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { CommandBase } from '../command-base';
|
2
|
-
import { SimpleCommandState } from '../command-states';
|
3
|
-
export class ToggleAllowZoomCommand extends CommandBase {
|
4
|
-
getState() {
|
5
|
-
return new SimpleCommandState(this.isEnabled(), this.control.viewManager.allowZoom);
|
6
|
-
}
|
7
|
-
executeCore(_state, options) {
|
8
|
-
const allowZoom = this.control.viewManager.allowZoom;
|
9
|
-
if (options.param === allowZoom)
|
10
|
-
return false;
|
11
|
-
this.control.viewManager.allowZoom = !allowZoom;
|
12
|
-
return true;
|
13
|
-
}
|
14
|
-
isEnabledInReadOnlyMode() {
|
15
|
-
return true;
|
16
|
-
}
|
17
|
-
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|