devexpress-richedit 25.2.7 → 26.1.2-beta
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 +0 -1
- package/dist/dx.richedit.d.ts +1 -1
- package/dist/dx.richedit.js +1271 -701
- 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/default-localization.js +25 -7
- package/lib/client/dialogs/alert-dialog.d.ts +1 -1
- package/lib/client/dialogs/bookmark-dialog.d.ts +1 -1
- package/lib/client/dialogs/delete-table-cells-dialog.d.ts +1 -1
- package/lib/client/dialogs/dialog-base.d.ts +1 -1
- package/lib/client/dialogs/find-replace-dialog.d.ts +1 -1
- package/lib/client/dialogs/finish-and-merge-dialog.d.ts +1 -1
- package/lib/client/dialogs/font-dialog.d.ts +1 -1
- package/lib/client/dialogs/hyperlink-dialog.d.ts +1 -1
- package/lib/client/dialogs/insert-merge-field-dialog.d.ts +1 -1
- package/lib/client/dialogs/insert-table-cells-dialog.d.ts +1 -1
- package/lib/client/dialogs/insert-table-dialog.d.ts +1 -1
- package/lib/client/dialogs/page-setup-dialog.d.ts +1 -1
- package/lib/client/dialogs/paragraph-dialog.d.ts +1 -1
- package/lib/client/dialogs/split-table-cells-dialog.d.ts +1 -1
- package/lib/client/dialogs/tabs-dialog.d.ts +1 -1
- package/lib/client/public/rich-edit.js +2 -0
- package/lib/client/public/utils.js +5 -1
- package/lib/common/canvas/renderes/common/document-renderer.js +7 -1
- package/lib/common/commands/command-manager.d.ts +2 -0
- package/lib/common/commands/command-manager.js +6 -0
- package/lib/common/commands/layout/switch-view-command.js +2 -1
- package/lib/common/commands/selection/go-to-next-word-command.d.ts +3 -4
- package/lib/common/commands/selection/go-to-next-word-command.js +2 -9
- package/lib/common/commands/selection/go-to-prev-word-command.d.ts +3 -2
- package/lib/common/commands/selection/go-to-prev-word-command.js +2 -2
- package/lib/common/commands/selection/select-all-document-command.d.ts +2 -0
- package/lib/common/commands/selection/select-all-document-command.js +6 -0
- package/lib/common/commands/selection/selection-command-base.d.ts +2 -0
- package/lib/common/commands/selection/selection-command-base.js +8 -0
- package/lib/common/event-manager.js +0 -1
- package/lib/common/formats/txt/txt-exporter.js +1 -1
- package/lib/common/input-controller.js +2 -0
- package/lib/common/interfaces/i-rich-edit-core.d.ts +2 -0
- package/lib/common/layout-formatter/formatter/base-formatter.d.ts +1 -0
- package/lib/common/layout-formatter/formatter/base-formatter.js +11 -0
- package/lib/common/layout-formatter/row/result.d.ts +0 -1
- package/lib/common/layout-formatter/row/result.js +4 -19
- package/lib/common/layout-formatter/row/size-engine/row-sizes-manager.js +1 -3
- package/lib/common/model/sub-document.d.ts +11 -0
- package/lib/common/model/sub-document.js +66 -22
- package/lib/common/rich-edit-core.d.ts +3 -0
- package/lib/common/rich-edit-core.js +18 -0
- package/lib/common/screen-reader-manager.d.ts +45 -0
- package/lib/common/screen-reader-manager.js +309 -0
- package/lib/common/utils/interval-utils.d.ts +4 -0
- package/lib/common/utils/interval-utils.js +25 -0
- package/package.json +3 -3
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -61,8 +61,8 @@ export class ClientRichEdit {
|
|
|
61
61
|
this.rawDataSource = settings.rawDataSource;
|
|
62
62
|
this.contextMenuSettings = settings.contextMenuSettings;
|
|
63
63
|
this.fullScreenHelper = new FullScreenHelper(element);
|
|
64
|
-
if ("
|
|
65
|
-
config(JSON.parse(atob("
|
|
64
|
+
if ("eyJsaWNlbnNlS2V5IjoiTENQdjE+eWUzLGp0LWNfVmZwK2Q0Y3BGOyhqbWQyPjl5PjdEOGNqWG9JeSUxN2JSZz5SPG4zYis3JUhkTDpRZVFaUUZKN2I6SiU8WHlWaSFvMlJjejllUjlJb2RZIW8peSw8ZXooN2E2JSVMMSgrVmRJPHktU29TIWVZKUo3UlMzKCtkejpRVnQhUVMhZUwtYUdMcm9waWROSWlSUjpvPDEsbmFlKExtZ0dMNEtwZWQ6Pkh0LTNlUW1rJSk7cEtGITY8ISk2JUZRJWUrPHBRZCk+Sy1AMnAhJD5qei1TUTgtMmlYOz4lWDwycEBAIVE0QDJfQEYhUWQ6SXAhQEk8NClhS0BAIVE0QDJfQEYhUWQ6SXAhQEk8NClhS3o8SV95QEliUnZJPC0pOU5YPD5RNDo+UTh2SWJSKTlqejshakw7OWp5Rkk3eUZJN3lGSSV5NjlRWHYyJSE6cGItJEliUik5akA2MnAhKTIlWHYyJSE6MmktdkklISk+akw8MjdAOjlLOXZhakBGMjdAQElfQDY5UWQkYVE0Oj5RNDpHX0BAOVFkdjY8IUY2PGRGSTd5Rkk3eUZJN0xsIn0=")
|
|
65
|
+
config(JSON.parse(atob("eyJsaWNlbnNlS2V5IjoiTENQdjE+eWUzLGp0LWNfVmZwK2Q0Y3BGOyhqbWQyPjl5PjdEOGNqWG9JeSUxN2JSZz5SPG4zYis3JUhkTDpRZVFaUUZKN2I6SiU8WHlWaSFvMlJjejllUjlJb2RZIW8peSw8ZXooN2E2JSVMMSgrVmRJPHktU29TIWVZKUo3UlMzKCtkejpRVnQhUVMhZUwtYUdMcm9waWROSWlSUjpvPDEsbmFlKExtZ0dMNEtwZWQ6Pkh0LTNlUW1rJSk7cEtGITY8ISk2JUZRJWUrPHBRZCk+Sy1AMnAhJD5qei1TUTgtMmlYOz4lWDwycEBAIVE0QDJfQEYhUWQ6SXAhQEk8NClhS0BAIVE0QDJfQEYhUWQ6SXAhQEk8NClhS3o8SV95QEliUnZJPC0pOU5YPD5RNDo+UTh2SWJSKTlqejshakw7OWp5Rkk3eUZJN3lGSSV5NjlRWHYyJSE6cGItJEliUik5akA2MnAhKTIlWHYyJSE6MmktdkklISk+akw8MjdAOjlLOXZhakBGMjdAQElfQDY5UWQkYVE0Oj5RNDpHX0BAOVFkdjY8IUY2PGRGSTd5Rkk3eUZJN0xsIn0=")));
|
|
66
66
|
this.prepareElement(element, settings);
|
|
67
67
|
this.initDefaultFontsAndStyles();
|
|
68
68
|
this.initBars(settings.ribbon, settings.fonts);
|
|
@@ -242,9 +242,9 @@ export function loadDefaultMessages() {
|
|
|
242
242
|
"XtraRichEditStringId.Caption_FollowingParagraphText": "Following Paragraph ",
|
|
243
243
|
"XtraRichEditStringId.Caption_GroupTableAlignment": "Alignment",
|
|
244
244
|
"XtraRichEditStringId.Caption_GroupTableCellSize": "Cell Size",
|
|
245
|
-
"XtraRichEditStringId.Caption_GroupTableDrawBorders": "Borders
|
|
245
|
+
"XtraRichEditStringId.Caption_GroupTableDrawBorders": "Borders & Shadings",
|
|
246
246
|
"XtraRichEditStringId.Caption_GroupTableMerge": "Merge",
|
|
247
|
-
"XtraRichEditStringId.Caption_GroupTableRowsAndColumns": "Rows
|
|
247
|
+
"XtraRichEditStringId.Caption_GroupTableRowsAndColumns": "Rows & Columns",
|
|
248
248
|
"XtraRichEditStringId.Caption_GroupTableStyleOptions": "Table Style Options",
|
|
249
249
|
"XtraRichEditStringId.Caption_GroupTableStyles": "Table Styles",
|
|
250
250
|
"XtraRichEditStringId.Caption_GroupTableTable": "Table",
|
|
@@ -1742,7 +1742,7 @@ export function loadDefaultMessages() {
|
|
|
1742
1742
|
"ASPxRichEditStringId.PageMailings": "Mail Merge",
|
|
1743
1743
|
"ASPxRichEditStringId.PageReview": "Review",
|
|
1744
1744
|
"ASPxRichEditStringId.PageView": "View",
|
|
1745
|
-
"ASPxRichEditStringId.PageHeaderAndFooter": "Header
|
|
1745
|
+
"ASPxRichEditStringId.PageHeaderAndFooter": "Header & Footer",
|
|
1746
1746
|
"ASPxRichEditStringId.PageTableDesign": "Design",
|
|
1747
1747
|
"ASPxRichEditStringId.PageTableLayout": "Layout",
|
|
1748
1748
|
"ASPxRichEditStringId.PageFloatingObjects": "Format",
|
|
@@ -1761,7 +1761,7 @@ export function loadDefaultMessages() {
|
|
|
1761
1761
|
"ASPxRichEditStringId.GroupSymbols": "Symbols",
|
|
1762
1762
|
"ASPxRichEditStringId.GroupLinks": "Links",
|
|
1763
1763
|
"ASPxRichEditStringId.GroupPages": "Pages",
|
|
1764
|
-
"ASPxRichEditStringId.GroupHeaderFooter": "Header
|
|
1764
|
+
"ASPxRichEditStringId.GroupHeaderFooter": "Header & Footer",
|
|
1765
1765
|
"ASPxRichEditStringId.GroupHeaderFooterToolsDesignClose": "Close",
|
|
1766
1766
|
"ASPxRichEditStringId.GroupHeaderFooterToolsDesignNavigation": "Navigation",
|
|
1767
1767
|
"ASPxRichEditStringId.GroupMailMerge": "Mail Merge",
|
|
@@ -1786,9 +1786,9 @@ export function loadDefaultMessages() {
|
|
|
1786
1786
|
"ASPxRichEditStringId.GroupView": "View",
|
|
1787
1787
|
"ASPxRichEditStringId.GroupTableToolsDesignTableStyleOptions": "Table Style Options",
|
|
1788
1788
|
"ASPxRichEditStringId.GroupTableToolsDesignTableStyles": "Table Styles",
|
|
1789
|
-
"ASPxRichEditStringId.GroupTableToolsDesignBordersAndShadings": "Borders
|
|
1789
|
+
"ASPxRichEditStringId.GroupTableToolsDesignBordersAndShadings": "Borders & Shadings",
|
|
1790
1790
|
"ASPxRichEditStringId.GroupTableToolsLayoutTable": "Table",
|
|
1791
|
-
"ASPxRichEditStringId.GroupTableToolsLayoutRowsAndColumns": "Rows
|
|
1791
|
+
"ASPxRichEditStringId.GroupTableToolsLayoutRowsAndColumns": "Rows & Columns",
|
|
1792
1792
|
"ASPxRichEditStringId.GroupTableToolsLayoutMerge": "Merge",
|
|
1793
1793
|
"ASPxRichEditStringId.GroupTableToolsLayoutCellSize": "Cell Size",
|
|
1794
1794
|
"ASPxRichEditStringId.GroupTableToolsLayoutAlignment": "Alignment",
|
|
@@ -2181,7 +2181,7 @@ export function loadDefaultMessages() {
|
|
|
2181
2181
|
"RichEditExtensionsStringId.Caption_GroupFloatingPictureToolsArrange": "Arrange",
|
|
2182
2182
|
"RichEditExtensionsStringId.Caption_GroupFloatingPictureToolsShapeStyles": "Shape Styles",
|
|
2183
2183
|
"RichEditExtensionsStringId.Caption_GroupFont": "Font",
|
|
2184
|
-
"RichEditExtensionsStringId.Caption_GroupHeaderFooter": "Header
|
|
2184
|
+
"RichEditExtensionsStringId.Caption_GroupHeaderFooter": "Header & Footer",
|
|
2185
2185
|
"RichEditExtensionsStringId.Caption_GroupHeaderFooterToolsDesignClose": "Close",
|
|
2186
2186
|
"RichEditExtensionsStringId.Caption_GroupHeaderFooterToolsDesignNavigation": "Navigation",
|
|
2187
2187
|
"RichEditExtensionsStringId.Caption_GroupHeaderFooterToolsDesignOptions": "Options",
|
|
@@ -2221,6 +2221,24 @@ export function loadDefaultMessages() {
|
|
|
2221
2221
|
"ASPxRichEditStringId.Download_RichTextFormat": "Rich Text Format (*.rtf)",
|
|
2222
2222
|
"ASPxRichEditStringId.Download_PlainText": "Plain Text (*.txt)",
|
|
2223
2223
|
"ASPxRichEditStringId.Download_Html": "Html Document (*.html, *.htm)",
|
|
2224
|
+
"AspNetCoreRichEditStringId.InTableAnnouncement": "table with {0} rows and {1} columns",
|
|
2225
|
+
"AspNetCoreRichEditStringId.OutOfTableAnnouncement": "out of table",
|
|
2226
|
+
"AspNetCoreRichEditStringId.TableRowAnnouncement": "row {0}",
|
|
2227
|
+
"AspNetCoreRichEditStringId.TableColumnAnnouncement": "column {0}",
|
|
2228
|
+
"AspNetCoreRichEditStringId.SelectAllAnnouncement": "select all",
|
|
2229
|
+
"AspNetCoreRichEditStringId.TextSelectedAnnouncement": "{0} selected",
|
|
2230
|
+
"AspNetCoreRichEditStringId.TextUnselectedAnnouncement": "{0} unselected",
|
|
2231
|
+
"AspNetCoreRichEditStringId.PictureAnnouncement": "graphic {0}",
|
|
2232
|
+
"AspNetCoreRichEditStringId.PageAnnouncement": "page {0}",
|
|
2233
|
+
"AspNetCoreRichEditStringId.SpaceAnnouncement": "space",
|
|
2234
|
+
"AspNetCoreRichEditStringId.BulletAnnouncement": "bullet",
|
|
2235
|
+
"AspNetCoreRichEditStringId.ListItemAnnouncement": "list item level {0} {1}",
|
|
2236
|
+
"AspNetCoreRichEditStringId.TabAnnouncement": "tab",
|
|
2237
|
+
"AspNetCoreRichEditStringId.CarriageReturnAnnouncement": "carriage return",
|
|
2238
|
+
"AspNetCoreRichEditStringId.LineBreakAnnouncement": "line break",
|
|
2239
|
+
"AspNetCoreRichEditStringId.LinkAnnouncement": "link",
|
|
2240
|
+
"AspNetCoreRichEditStringId.OutOfLinkAnnouncement": "out of link",
|
|
2241
|
+
"AspNetCoreRichEditStringId.BlankAnnouncement": "blank",
|
|
2224
2242
|
}
|
|
2225
2243
|
});
|
|
2226
2244
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { dxPopupToolbarItem } from 'devextreme/ui/popup';
|
|
3
3
|
import { AlertMessageDialogParameters } from '../../common/commands/dialogs/dialog-alert-message-command';
|
|
4
4
|
import { DialogBase } from './dialog-base';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { dxPopupToolbarItem } from 'devextreme/ui/popup';
|
|
3
3
|
import { BookmarkDialogInfo, BookmarksDialogParameters } from '../../common/commands/dialogs/dialog-bookmarks-command';
|
|
4
4
|
import { DialogBase } from './dialog-base';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { TableCellsDialogParameters } from '../../common/commands/dialogs/dialog-insert-table-cells-command';
|
|
3
3
|
import { DialogBase } from './dialog-base';
|
|
4
4
|
export declare class DeleteTableCellsDialog extends DialogBase<TableCellsDialogParameters> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import dxForm, {
|
|
1
|
+
import dxForm, { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import dxPopup, { dxPopupToolbarItem } from 'devextreme/ui/popup';
|
|
3
3
|
import { DialogParametersBase } from '../../common/commands/dialogs/show-dialog-command-base';
|
|
4
4
|
import { RichEditCore } from '../../common/rich-edit-core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { dxPopupToolbarItem } from 'devextreme/ui/popup';
|
|
3
3
|
import { FindReplaceDialogParameters } from '../../common/commands/dialogs/dialog-find-replace-command';
|
|
4
4
|
import { ISearchResetListener } from '../../common/ui/search-manager';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { FinishAndMergeDialogParameters } from '../../common/commands/dialogs/dialog-finish-and-merge-command';
|
|
3
3
|
import { DialogBase } from './dialog-base';
|
|
4
4
|
export declare class FinishAndMergeDialog extends DialogBase<FinishAndMergeDialogParameters> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { FontDialogParameters } from '../../common/commands/dialogs/dialog-font-command';
|
|
3
3
|
import { DialogBase } from './dialog-base';
|
|
4
4
|
export declare class FontDialog extends DialogBase<FontDialogParameters> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { DialogHyperlinkParameters } from '../../common/commands/dialogs/dialog-hyperlink-command';
|
|
3
3
|
import { DialogBase } from './dialog-base';
|
|
4
4
|
export declare class HyperlinkDialog extends DialogBase<DialogHyperlinkParameters> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { dxPopupToolbarItem } from 'devextreme/ui/popup';
|
|
3
3
|
import { InsertMergeFieldDialogParameters } from '../../common/commands/dialogs/dialog-insert-merge-field-command';
|
|
4
4
|
import { DialogBase } from './dialog-base';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { TableCellsDialogParameters } from '../../common/commands/dialogs/dialog-insert-table-cells-command';
|
|
3
3
|
import { DialogBase } from './dialog-base';
|
|
4
4
|
export declare class InsertTableCellsDialog extends DialogBase<TableCellsDialogParameters> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { InsertTableDialogParameters } from '../../common/commands/dialogs/dialog-insert-table-command';
|
|
3
3
|
import { DialogBase } from './dialog-base';
|
|
4
4
|
export declare class InsertTableDialog extends DialogBase<InsertTableDialogParameters> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { PageSetupDialogParameters } from '../../common/commands/dialogs/dialog-page-setup-command';
|
|
3
3
|
import { DialogBase } from './dialog-base';
|
|
4
4
|
export declare class PageSetupDialog extends DialogBase<PageSetupDialogParameters> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { dxPopupToolbarItem } from 'devextreme/ui/popup';
|
|
3
3
|
import { ParagraphDialogParameters } from '../../common/commands/dialogs/dialog-paragraph-properties-command';
|
|
4
4
|
import { DialogBase } from './dialog-base';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { SplitTableCellsDialogParameters } from '../../common/commands/dialogs/dialog-split-table-cells-command';
|
|
3
3
|
import { DialogBase } from './dialog-base';
|
|
4
4
|
export declare class SplitTableCellsDialog extends DialogBase<SplitTableCellsDialogParameters> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Properties as dxFormOptions } from 'devextreme/ui/form';
|
|
2
2
|
import { dxPopupToolbarItem } from 'devextreme/ui/popup';
|
|
3
3
|
import { DialogTabsParameters } from '../../common/commands/dialogs/dialog-tabs-command';
|
|
4
4
|
import { DialogBase } from './dialog-base';
|
|
@@ -159,6 +159,8 @@ class RichEditPublic {
|
|
|
159
159
|
return this._native.core.innerClientProperties.viewsSettings.viewType;
|
|
160
160
|
}
|
|
161
161
|
set viewType(type) {
|
|
162
|
+
if (typeof console !== 'undefined' && console.log)
|
|
163
|
+
console.log(`[RichEdit] ${new Date().toISOString()} PublicAPI.set viewType`, { to: type, stack: new Error().stack });
|
|
162
164
|
const command = this._native.core.commandManager.getCommand(RichEditClientCommand.ChangeViewType);
|
|
163
165
|
command.execute(true, type);
|
|
164
166
|
}
|
|
@@ -74,7 +74,11 @@ export class Utils {
|
|
|
74
74
|
static getTrimmedMessage(id) {
|
|
75
75
|
const message = formatMessage(id);
|
|
76
76
|
const trimmedFromEnd = StringUtils.trimEnd(message, ['\\.']);
|
|
77
|
-
return trimmedFromEnd
|
|
77
|
+
return trimmedFromEnd
|
|
78
|
+
.replace(/&&/g, '\u0000')
|
|
79
|
+
.replace(/(\S)&/g, "$1")
|
|
80
|
+
.replace(/&(\S)/g, "$1")
|
|
81
|
+
.replace(/\u0000/g, '&');
|
|
78
82
|
}
|
|
79
83
|
}
|
|
80
84
|
export class TypeConverterFactory {
|
|
@@ -274,8 +274,14 @@ export class DocumentRenderer {
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
updatePageSize(page, pageElement) {
|
|
277
|
-
if (pageElement.offsetHeight != Math.round(page.height) || pageElement.offsetWidth != Math.round(page.width))
|
|
277
|
+
if (pageElement.offsetHeight != Math.round(page.height) || pageElement.offsetWidth != Math.round(page.width)) {
|
|
278
278
|
DomUtils.setStyleSize(pageElement.style, page);
|
|
279
|
+
if (this.viewManager.innerClientProperties.viewsSettings.isSimpleView) {
|
|
280
|
+
const paddings = this.viewManager.innerClientProperties.viewsSettings.paddings;
|
|
281
|
+
if (page.width - paddings.right <= this.viewManager.sizes.getVisibleAreaWidth(false))
|
|
282
|
+
pageElement.style.width = "100%";
|
|
283
|
+
}
|
|
284
|
+
}
|
|
279
285
|
}
|
|
280
286
|
updatePageClasses(pageElement) {
|
|
281
287
|
pageElement.className = RendererClassNames.PAGE;
|
|
@@ -22,6 +22,8 @@ export declare abstract class CommandManager implements ISelectionChangesListene
|
|
|
22
22
|
dispose(): void;
|
|
23
23
|
abortClipboardCommandExecution(): void;
|
|
24
24
|
getCommand(key: RichEditClientCommand): ICommand;
|
|
25
|
+
getExecutingCommandsChainDebug(): string[];
|
|
26
|
+
getLastCommandsChainDebug(): string[];
|
|
25
27
|
beforeExecuting(command: ICommand): void;
|
|
26
28
|
afterExecuting(): void;
|
|
27
29
|
assertLastExecutedCommandsChain(checkLength: boolean, ...types: Function[]): boolean;
|
|
@@ -579,6 +579,12 @@ export class CommandManager {
|
|
|
579
579
|
getCommand(key) {
|
|
580
580
|
return this.commands[key];
|
|
581
581
|
}
|
|
582
|
+
getExecutingCommandsChainDebug() {
|
|
583
|
+
return this.executingCommandsChain.map(command => command?.constructor?.name || 'UnknownCommand');
|
|
584
|
+
}
|
|
585
|
+
getLastCommandsChainDebug() {
|
|
586
|
+
return this.lastCommandsChain.map(command => command?.constructor?.name || 'UnknownCommand');
|
|
587
|
+
}
|
|
582
588
|
beforeExecuting(command) {
|
|
583
589
|
this.executingCommandsChain.push(command);
|
|
584
590
|
this.executingCommandCounter++;
|
|
@@ -16,7 +16,8 @@ export class ChangeViewTypeCommand extends CommandBase {
|
|
|
16
16
|
return true;
|
|
17
17
|
}
|
|
18
18
|
executeCore(_state, options) {
|
|
19
|
-
|
|
19
|
+
const currentViewType = this.control.innerClientProperties.viewsSettings.viewType;
|
|
20
|
+
if (currentViewType != options.param) {
|
|
20
21
|
if (this.selection.activeSubDocument.isHeaderFooter())
|
|
21
22
|
this.control.commandManager.getCommand(RichEditClientCommand.ChangeActiveSubDocumentToMain)
|
|
22
23
|
.execute(this.control.commandManager.isPublicApiCall, new CommandOptions(this.control));
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ICommandOptions } from '../command-base';
|
|
2
2
|
import { SimpleCommandState } from '../command-states';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { SelectionCommandBase } from './selection-command-base';
|
|
4
|
+
export declare class GoToNextWordCommandBase extends SelectionCommandBase {
|
|
5
5
|
getStartPosition(): number;
|
|
6
|
-
isEnabledInReadOnlyMode(): boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare class GoToNextWordCommand extends GoToNextWordCommandBase {
|
|
9
8
|
executeCore(_state: SimpleCommandState, _options: ICommandOptions): boolean;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { LayoutWordBounds } from '../../word-bounds-engine/layout-word-bounds';
|
|
2
|
-
import { CommandBase } from '../command-base';
|
|
3
|
-
import { SimpleCommandState } from '../command-states';
|
|
4
2
|
import { ExtendGoToNextCharacterCommand } from './go-to-next-character-command';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return new SimpleCommandState(this.isEnabled());
|
|
8
|
-
}
|
|
3
|
+
import { SelectionCommandBase } from './selection-command-base';
|
|
4
|
+
export class GoToNextWordCommandBase extends SelectionCommandBase {
|
|
9
5
|
getStartPosition() {
|
|
10
6
|
var selection = this.selection;
|
|
11
7
|
return selection.forwardDirection ? selection.lastSelectedInterval.end : selection.lastSelectedInterval.start;
|
|
12
8
|
}
|
|
13
|
-
isEnabledInReadOnlyMode() {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
9
|
}
|
|
17
10
|
export class GoToNextWordCommand extends GoToNextWordCommandBase {
|
|
18
11
|
executeCore(_state, _options) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ICommandOptions } from '../command-base';
|
|
2
2
|
import { SimpleCommandState } from '../command-states';
|
|
3
|
-
|
|
3
|
+
import { SelectionCommandBase } from './selection-command-base';
|
|
4
|
+
export declare abstract class GoToPrevWordCommandBase extends SelectionCommandBase {
|
|
4
5
|
getState(): SimpleCommandState;
|
|
5
6
|
getStartPosition(): number;
|
|
6
7
|
isEnabledInReadOnlyMode(): boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LayoutPositionCreatorConflictFlags, LayoutPositionMainSubDocumentCreator, LayoutPositionOtherSubDocumentCreator } from '../../layout-engine/layout-position-creator';
|
|
2
2
|
import { DocumentLayoutDetailsLevel } from '../../layout/document-layout-details-level';
|
|
3
3
|
import { LayoutWordBounds } from '../../word-bounds-engine/layout-word-bounds';
|
|
4
|
-
import { CommandBase } from '../command-base';
|
|
5
4
|
import { SimpleCommandState } from '../command-states';
|
|
6
5
|
import { ExtendGoToPrevCharacterCommand } from './go-to-prev-character-command';
|
|
7
|
-
|
|
6
|
+
import { SelectionCommandBase } from './selection-command-base';
|
|
7
|
+
export class GoToPrevWordCommandBase extends SelectionCommandBase {
|
|
8
8
|
getState() {
|
|
9
9
|
return new SimpleCommandState(this.isEnabled());
|
|
10
10
|
}
|
|
@@ -3,5 +3,7 @@ import { SimpleCommandState } from '../command-states';
|
|
|
3
3
|
export declare class SelectAllDocumentCommand extends CommandBase<SimpleCommandState> {
|
|
4
4
|
getState(): SimpleCommandState;
|
|
5
5
|
executeCore(_state: SimpleCommandState, _options: ICommandOptions): boolean;
|
|
6
|
+
protected beforeExecute(): void;
|
|
7
|
+
protected afterExecute(): void;
|
|
6
8
|
isEnabledInReadOnlyMode(): boolean;
|
|
7
9
|
}
|
|
@@ -12,6 +12,12 @@ export class SelectAllDocumentCommand extends CommandBase {
|
|
|
12
12
|
this.control.focusManager.captureFocus();
|
|
13
13
|
return true;
|
|
14
14
|
}
|
|
15
|
+
beforeExecute() {
|
|
16
|
+
this.control.screenReaderManager.beginExecute(this.commandId);
|
|
17
|
+
}
|
|
18
|
+
afterExecute() {
|
|
19
|
+
this.control.screenReaderManager.endExecute();
|
|
20
|
+
}
|
|
15
21
|
isEnabledInReadOnlyMode() {
|
|
16
22
|
return true;
|
|
17
23
|
}
|
|
@@ -8,4 +8,6 @@ export declare class SelectionCommandBase extends CommandBase<SimpleCommandState
|
|
|
8
8
|
protected shouldCollapseSingleCellTableSelection(entryDirection: TableNavDirection, shrinkDirection: TableNavDirection): boolean;
|
|
9
9
|
protected collapseSingleCellTableSelectionToCaret(): boolean;
|
|
10
10
|
protected collapseTableCellSelectionSpatialFocus(direction: TableNavDirection): boolean;
|
|
11
|
+
beforeExecute(): void;
|
|
12
|
+
afterExecute(): void;
|
|
11
13
|
}
|
|
@@ -98,4 +98,12 @@ export class SelectionCommandBase extends CommandBase {
|
|
|
98
98
|
selection.deprecatedSetSelection(pos, pos, false, -1, true);
|
|
99
99
|
return true;
|
|
100
100
|
}
|
|
101
|
+
beforeExecute() {
|
|
102
|
+
super.beforeExecute();
|
|
103
|
+
this.control.screenReaderManager.beginExecute(this.commandId);
|
|
104
|
+
}
|
|
105
|
+
afterExecute() {
|
|
106
|
+
super.afterExecute();
|
|
107
|
+
this.control.screenReaderManager.endExecute();
|
|
108
|
+
}
|
|
101
109
|
}
|
|
@@ -116,7 +116,6 @@ export class EventManager {
|
|
|
116
116
|
onMouseDblClick(evt) {
|
|
117
117
|
Log.print(LogSource.EventManager, "onMouseDoubleClick", LogObjToStrCanvas.richMouseEvent(evt));
|
|
118
118
|
this.mouseHandler.onMouseDoubleClick(evt);
|
|
119
|
-
this.control.inputController.setPosition(evt.absolutePoint.x, evt.absolutePoint.y);
|
|
120
119
|
}
|
|
121
120
|
onMouseWheel(evt) {
|
|
122
121
|
Log.print(LogSource.EventManager, "onMouseWheel", LogObjToStrCanvas.richMouseEvent(evt));
|
|
@@ -22,7 +22,7 @@ export class TxtExporter {
|
|
|
22
22
|
this.model.mainSubDocument.paragraphs.forEach((p, index) => {
|
|
23
23
|
if (index > 0)
|
|
24
24
|
text += '\r\n';
|
|
25
|
-
text += this.model.mainSubDocument.getSimpleText(new FixedInterval(p.startLogPosition.value, p.length));
|
|
25
|
+
text += this.model.mainSubDocument.getSimpleText(new FixedInterval(p.startLogPosition.value, p.length - 1));
|
|
26
26
|
});
|
|
27
27
|
callback(new Blob([text], { type: PlainTextMimeType }));
|
|
28
28
|
});
|
|
@@ -91,6 +91,7 @@ export class InputEditorBase {
|
|
|
91
91
|
createHierarchy(parent) {
|
|
92
92
|
this.inputElement = this.createInputElement();
|
|
93
93
|
this.inputElement.classList.add(INPUT_CLASS_NAME);
|
|
94
|
+
this.inputElement.setAttribute('aria-hidden', 'true');
|
|
94
95
|
parent.appendChild(this.inputElement);
|
|
95
96
|
this.createHierarchyCore();
|
|
96
97
|
this.inputElement.addEventListener("load", () => this.recreateIfNeeded(), true);
|
|
@@ -585,6 +586,7 @@ export class IFrameInputEditor extends InputEditorBase {
|
|
|
585
586
|
}
|
|
586
587
|
createInputElement() {
|
|
587
588
|
const element = document.createElement("IFRAME");
|
|
589
|
+
element.setAttribute("aria-hidden", "true");
|
|
588
590
|
element.src = "about:blank";
|
|
589
591
|
if (Browser.Safari) {
|
|
590
592
|
element.style.width = "100%";
|
|
@@ -38,6 +38,7 @@ import { SearchManager } from '../ui/search-manager';
|
|
|
38
38
|
import { IControlOwner } from './i-control-owner';
|
|
39
39
|
import { IExportModelOptions } from '../formats/i-document-exporter';
|
|
40
40
|
import { ModelScrollManager } from '../scroll/model-scroll-manager';
|
|
41
|
+
import { ScreenReaderManager } from '../screen-reader-manager';
|
|
41
42
|
export interface IBarListener extends IEventListener {
|
|
42
43
|
NotifyBarCommandExecuted(commandID: RichEditClientCommand, parameter: any): any;
|
|
43
44
|
NotifyBarUpdateRequested(): any;
|
|
@@ -86,6 +87,7 @@ export interface IRichEditControl extends IBatchUpdatableObject, IDisposable, IR
|
|
|
86
87
|
owner: IControlOwner;
|
|
87
88
|
selectionModelChangesListener: SelectionModelChangesListener;
|
|
88
89
|
pdfHelperFrame: PdfHelperFrame;
|
|
90
|
+
screenReaderManager: ScreenReaderManager;
|
|
89
91
|
getExportModelOptions(initOptions?: Partial<IExportModelOptions>): IExportModelOptions;
|
|
90
92
|
isClientMode(): boolean;
|
|
91
93
|
createFieldRequestManager(): FieldRequestManager;
|
|
@@ -38,6 +38,7 @@ export declare class BaseFormatter {
|
|
|
38
38
|
private tryExcludeAnchoredObjectFromCurrentPage;
|
|
39
39
|
private shouldEndColumn;
|
|
40
40
|
private processStateColumnEnd;
|
|
41
|
+
private calculateContentWidth;
|
|
41
42
|
private createNextPageArea;
|
|
42
43
|
private createNextColumn;
|
|
43
44
|
private pushRow;
|
|
@@ -238,6 +238,7 @@ export class BaseFormatter {
|
|
|
238
238
|
this.layoutPosition.column.height = columnHeight;
|
|
239
239
|
this.layoutPosition.pageArea.height = columnHeight;
|
|
240
240
|
this.layoutPosition.page.height = finalPageHeight;
|
|
241
|
+
this.layoutPosition.page.width = this.calculateContentWidth(this.layoutPosition.column) + margins.horizontal;
|
|
241
242
|
this.layoutPosition.page.minContentHeight = minVisibleAreaHeight;
|
|
242
243
|
}
|
|
243
244
|
createdColumn.paragraphFrames = ParagraphFrameCollector.collect(this.manager.model.colorProvider, createdColumn, this.subDocument.isMain() ?
|
|
@@ -257,6 +258,16 @@ export class BaseFormatter {
|
|
|
257
258
|
}
|
|
258
259
|
return true;
|
|
259
260
|
}
|
|
261
|
+
calculateContentWidth(column) {
|
|
262
|
+
let maxRight = 0;
|
|
263
|
+
column.tablesInfo.forEach(tableInfo => {
|
|
264
|
+
maxRight = Math.max(maxRight, tableInfo.right);
|
|
265
|
+
});
|
|
266
|
+
column.rows.forEach(row => {
|
|
267
|
+
maxRight = Math.max(maxRight, row.right);
|
|
268
|
+
});
|
|
269
|
+
return maxRight;
|
|
270
|
+
}
|
|
260
271
|
createNextPageArea() {
|
|
261
272
|
const newPageArea = new LayoutPageArea(this.subDocument);
|
|
262
273
|
newPageArea.setGeomerty(this.pageAreaBounds);
|
|
@@ -25,7 +25,6 @@ export declare class RowFormatterResult {
|
|
|
25
25
|
finishLogicalRow(currLogicRowEndPos: number): void;
|
|
26
26
|
private deleteSomeAnchorObjects;
|
|
27
27
|
finishRow(): void;
|
|
28
|
-
private onlyInlinePictureBox;
|
|
29
28
|
private addBracketBox;
|
|
30
29
|
private addBrackets;
|
|
31
30
|
private getBracketBox;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Flag } from '@devexpress/utils/lib/class/flag';
|
|
2
|
-
import { EnumUtils } from '@devexpress/utils/lib/utils/enum';
|
|
3
2
|
import { ListUtils } from '@devexpress/utils/lib/utils/list';
|
|
4
3
|
import { MathUtils } from '@devexpress/utils/lib/utils/math';
|
|
5
4
|
import { SearchUtils } from '@devexpress/utils/lib/utils/search';
|
|
6
5
|
import { DocumentLayoutDetailsLevel } from '../../layout/document-layout-details-level';
|
|
7
6
|
import { BookmarkBox, LayoutBookmarkBoxType } from '../../layout/main-structures/layout-boxes/bookmark-box';
|
|
8
7
|
import { AnchoredObjectLevelType } from '../../layout/main-structures/layout-boxes/layout-anchored-object-box';
|
|
9
|
-
import { LayoutBoxType } from '../../layout/main-structures/layout-boxes/layout-box';
|
|
10
8
|
import { LayoutRow, LayoutRowStateFlags } from '../../layout/main-structures/layout-row';
|
|
11
9
|
import { BoxAligner } from './utils/box-aligner';
|
|
12
10
|
export var RowFormatterResultFlag;
|
|
@@ -52,7 +50,8 @@ export class RowFormatterResult {
|
|
|
52
50
|
}
|
|
53
51
|
finishRow() {
|
|
54
52
|
this.finishLogicalRow(this.rowFormatter.rowSizesManager.rowFormattingInfo.lastNonEmptyInterval.end);
|
|
55
|
-
const
|
|
53
|
+
const lastBox = ListUtils.last(this.row.boxes);
|
|
54
|
+
const lastBoxOffset = lastBox.rowOffset;
|
|
56
55
|
for (let ind = 0, anc; anc = this.newAnchoredObjects[ind]; ind++) {
|
|
57
56
|
if (anc.rowOffset > lastBoxOffset) {
|
|
58
57
|
this.deleteSomeAnchorObjects(ind, anc.rowOffset);
|
|
@@ -81,25 +80,11 @@ export class RowFormatterResult {
|
|
|
81
80
|
}
|
|
82
81
|
this.row.columnOffset = rowStartPos -
|
|
83
82
|
this.rowFormatter.manager.activeFormatter.layoutPosition.getLogPosition(DocumentLayoutDetailsLevel.Column);
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
this.row.width = pictBox.width;
|
|
83
|
+
const firstBox = this.row.boxes[0];
|
|
84
|
+
this.row.width = Math.max(this.row.width, lastBox.right - firstBox.x);
|
|
87
85
|
const currState = this.rowFormatter.rowSizesManager.heightCalculator.currState;
|
|
88
86
|
this.row.increaseRowHeightFromSpacingBeforeAndAfter(currState.maxAscent, currState.maxDescent);
|
|
89
87
|
}
|
|
90
|
-
onlyInlinePictureBox() {
|
|
91
|
-
let pictBox;
|
|
92
|
-
for (let ind = this.row.boxes.length - 1; ind >= 0; ind--) {
|
|
93
|
-
const box = this.row.boxes[ind];
|
|
94
|
-
if (box.getType() == LayoutBoxType.Picture) {
|
|
95
|
-
pictBox = box;
|
|
96
|
-
}
|
|
97
|
-
else if (!EnumUtils.isAnyOf(box.getType(), LayoutBoxType.ParagraphMark, LayoutBoxType.SectionMark, LayoutBoxType.LineBreak, LayoutBoxType.PageBreak)) {
|
|
98
|
-
return null;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return pictBox;
|
|
102
|
-
}
|
|
103
88
|
addBracketBox(boxType, color, x, layoutBox) {
|
|
104
89
|
const box = new BookmarkBox(boxType);
|
|
105
90
|
box.x = x - (boxType == LayoutBookmarkBoxType.EndBox ? BookmarkBox.DEFAULT_BORDER_WIDTH : 0);
|
|
@@ -129,7 +129,7 @@ export class RowSizesManager {
|
|
|
129
129
|
}
|
|
130
130
|
else {
|
|
131
131
|
box.x = this.rowFormattingInfo.intervals[0].startOfFreeSpace;
|
|
132
|
-
this.rowFormattingInfo.intervals[0].avaliableWidth -=
|
|
132
|
+
this.rowFormattingInfo.intervals[0].avaliableWidth -= box.width;
|
|
133
133
|
this.addBoxIgnoreWidth();
|
|
134
134
|
}
|
|
135
135
|
}
|
|
@@ -166,8 +166,6 @@ export class RowSizesManager {
|
|
|
166
166
|
const box = this.rowFormatter.currBox;
|
|
167
167
|
box.x = this.rowFormattingInfo.currInterval.startOfFreeSpace;
|
|
168
168
|
this.rowFormattingInfo.currInterval.avaliableWidth -= box.width;
|
|
169
|
-
if (this.rowFormattingInfo.currInterval.avaliableWidth < 0)
|
|
170
|
-
this.rowFormattingInfo.currInterval.avaliableWidth = 0;
|
|
171
169
|
this.row.boxes.push(box);
|
|
172
170
|
this.rowFormattingInfo.lastNonEmptyIntervalIndex = this.rowFormattingInfo.currIndex;
|
|
173
171
|
this.rowFormatter.setBoxInfo(true);
|
|
@@ -17,6 +17,7 @@ import { RunBase } from './runs/run-base';
|
|
|
17
17
|
import { Section } from './section/section';
|
|
18
18
|
import { SubDocumentInfoBase } from './sub-document-infos';
|
|
19
19
|
import { Table } from './tables/main-structures/table';
|
|
20
|
+
import { InlinePictureRun } from './runs/inline-picture-run';
|
|
20
21
|
export declare class SubDocument {
|
|
21
22
|
static AUTOGENERATE_ID: number;
|
|
22
23
|
static MAIN_SUBDOCUMENT_ID: number;
|
|
@@ -44,6 +45,8 @@ export declare class SubDocument {
|
|
|
44
45
|
getFirstParagraph(): Paragraph;
|
|
45
46
|
getText(interval?: FixedInterval): string;
|
|
46
47
|
getSimpleText(interval: ConstInterval): string;
|
|
48
|
+
getVisibleText(interval: ConstInterval, options?: IGetTextOptions): string;
|
|
49
|
+
private isPositionVisible;
|
|
47
50
|
splitRun(position: number): void;
|
|
48
51
|
getLastRun(): RunBase;
|
|
49
52
|
getFirstRun(): RunBase;
|
|
@@ -123,3 +126,11 @@ export declare class SubDocumentIntervals implements ISubDocumentIntervals {
|
|
|
123
126
|
equals(obj: SubDocumentIntervals): boolean;
|
|
124
127
|
static fromPosition(subDocument: SubDocument, pos: number): SubDocumentIntervals;
|
|
125
128
|
}
|
|
129
|
+
export interface IGetTextOptions {
|
|
130
|
+
charMap?: Record<string, string>;
|
|
131
|
+
includeNumberedListMarks?: boolean;
|
|
132
|
+
useFieldResult?: boolean;
|
|
133
|
+
paragraphEndMark?: string;
|
|
134
|
+
inlinePictureAltText?: string | ((run: InlinePictureRun) => string);
|
|
135
|
+
resolveAdditionalText?: (fieldIndexes: number[], pos: number) => string | null;
|
|
136
|
+
}
|