devexpress-richedit 24.1.9-build-25002-0102 → 24.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dx.richedit.js +38 -36
- package/dist/dx.richedit.min.js +1 -1
- package/lib/client/client-rich-edit.js +2 -2
- package/lib/client/model-api/collections/table/table-collection.js +1 -3
- package/lib/common/commands/tables/auto-fit-commands.js +1 -3
- package/lib/common/commands/tables/insert-table-core-command.js +1 -3
- package/lib/common/event-manager.js +21 -12
- package/lib/common/input-controller.js +5 -3
- package/lib/common/layout/document-layout.d.ts +1 -0
- package/lib/common/layout/document-layout.js +3 -0
- package/lib/common/layout/layout-position.d.ts +1 -3
- package/lib/common/layout/layout-position.js +6 -3
- package/lib/common/rich-utils/layout/rich-layout-utils.d.ts +0 -5
- package/lib/common/rich-utils/layout/rich-layout-utils.js +0 -9
- package/package.json +3 -3
package/dist/dx.richedit.js
CHANGED
@@ -31568,12 +31568,15 @@ class LayoutPosition extends LayoutPositionBase {
|
|
31568
31568
|
super();
|
31569
31569
|
this.detailsLevel = detailsLevel;
|
31570
31570
|
}
|
31571
|
-
static ensure(formatterController,
|
31571
|
+
static ensure(formatterController, subDocument, logPosition, detailsLevel = DocumentLayoutDetailsLevel.Row) {
|
31572
31572
|
const layout = formatterController.layout;
|
31573
|
+
const endRowConflictFlags = new LayoutPositionCreatorConflictFlags().setDefault(false);
|
31574
|
+
const middleRowConflictFlags = new LayoutPositionCreatorConflictFlags().setDefault(false);
|
31573
31575
|
if (subDocument.isMain())
|
31574
31576
|
return LayoutPositionMainSubDocumentCreator.ensureLayoutPosition(formatterController, subDocument, logPosition, detailsLevel, endRowConflictFlags, middleRowConflictFlags);
|
31575
31577
|
while (true) {
|
31576
|
-
const
|
31578
|
+
const pageIndex = layout.getPageBySubDocumentId(subDocument.id).index;
|
31579
|
+
const lp = new LayoutPositionOtherSubDocumentCreator(layout, subDocument, logPosition, pageIndex, detailsLevel)
|
31577
31580
|
.create(endRowConflictFlags, middleRowConflictFlags);
|
31578
31581
|
if (lp)
|
31579
31582
|
return lp;
|
@@ -70468,6 +70471,9 @@ class DocumentLayout {
|
|
70468
70471
|
isPageValid(pageIndex) {
|
70469
70472
|
return pageIndex < this.validPageCount && this.pages[pageIndex].isValid;
|
70470
70473
|
}
|
70474
|
+
getPageBySubDocumentId(subDocumentId) {
|
70475
|
+
return this.pages.find((page) => !!page.mainSubDocumentPageAreas[subDocumentId] || !!page.otherPageAreas[subDocumentId]);
|
70476
|
+
}
|
70471
70477
|
}
|
70472
70478
|
|
70473
70479
|
;// CONCATENATED MODULE: ./src/client/model-api/table/enums.ts
|
@@ -71424,8 +71430,6 @@ class TableApi extends TableElementBase {
|
|
71424
71430
|
|
71425
71431
|
|
71426
71432
|
|
71427
|
-
|
71428
|
-
|
71429
71433
|
class TableCollection extends TableBaseCollection {
|
71430
71434
|
constructor(processor, subDocument) {
|
71431
71435
|
super(processor, subDocument);
|
@@ -71440,7 +71444,7 @@ class TableCollection extends TableBaseCollection {
|
|
71440
71444
|
rowCount = ApiParametersChecker.check(rowCount, 3, false, [
|
71441
71445
|
ApiParametersChecker.numberDescriptor("rowCount", (n) => n, 1)
|
71442
71446
|
]);
|
71443
|
-
const lp = LayoutPosition.ensure(this._processor.layoutFormatterManager, this.
|
71447
|
+
const lp = LayoutPosition.ensure(this._processor.layoutFormatterManager, this._subDocument, position);
|
71444
71448
|
const currentTable = Table.getTableByPosition(this._subDocument.tables, position, true);
|
71445
71449
|
const availableWidth = currentTable ? lp.row.tableCellInfo.avaliableContentWidth :
|
71446
71450
|
LayoutColumn.findSectionColumnWithMinimumWidth(lp.pageArea.columns);
|
@@ -107272,16 +107276,7 @@ class LogObjToStrCanvas {
|
|
107272
107276
|
|
107273
107277
|
|
107274
107278
|
|
107275
|
-
|
107276
|
-
|
107277
107279
|
class RichLayoutUtils {
|
107278
|
-
static getAllowedSizeForImage(subDocument, layoutFormatterManager, selection, logPosition) {
|
107279
|
-
const layoutPosition = LayoutPosition.ensure(layoutFormatterManager, selection, subDocument, logPosition, DocumentLayoutDetailsLevel.Row, new LayoutPositionCreatorConflictFlags().setDefault(false), new LayoutPositionCreatorConflictFlags().setDefault(true));
|
107280
|
-
const allowedSize = layoutPosition.column.createSize().applyConverter(unit_converter/* UnitConverter */.u.pixelsToTwips);
|
107281
|
-
if (layoutPosition.row.tableCellInfo)
|
107282
|
-
allowedSize.width = Math.min(unit_converter/* UnitConverter */.u.pixelsToTwips(layoutPosition.row.tableCellInfo.avaliableContentWidth), allowedSize.width);
|
107283
|
-
return allowedSize;
|
107284
|
-
}
|
107285
107280
|
static modifyTextUnderCursor(control, text) {
|
107286
107281
|
const subDocument = control.selection.activeSubDocument;
|
107287
107282
|
let position = control.selection.lastSelectedInterval.start;
|
@@ -107327,6 +107322,7 @@ class RichLayoutUtils {
|
|
107327
107322
|
|
107328
107323
|
|
107329
107324
|
|
107325
|
+
|
107330
107326
|
|
107331
107327
|
|
107332
107328
|
var MouseButton;
|
@@ -107451,10 +107447,12 @@ class EventManager {
|
|
107451
107447
|
}
|
107452
107448
|
modifyLastText(text, length) {
|
107453
107449
|
if (length === 0) {
|
107454
|
-
|
107455
|
-
|
107456
|
-
|
107457
|
-
|
107450
|
+
if (!utils_string.StringUtils.isNullOrEmpty(text)) {
|
107451
|
+
this.control.beginUpdate();
|
107452
|
+
this.control.commandManager.getCommand(RichEditClientCommand.InsertText).execute(this.control.commandManager.isPublicApiCall, new CommandSimpleOptions(this.control, text));
|
107453
|
+
this.control.endUpdate();
|
107454
|
+
}
|
107455
|
+
return true;
|
107458
107456
|
}
|
107459
107457
|
let endInterval = this.control.selection.lastSelectedInterval.start;
|
107460
107458
|
let startInterval = endInterval - length;
|
@@ -107462,14 +107460,19 @@ class EventManager {
|
|
107462
107460
|
const insertTextHistoryItem = this.control.modelManager.modelManipulator.text.getLastModifiableHistoryItem((hi) => hi instanceof InsertTextHistoryItem);
|
107463
107461
|
if (!insertTextHistoryItem)
|
107464
107462
|
return false;
|
107465
|
-
|
107466
|
-
|
107467
|
-
|
107468
|
-
|
107469
|
-
|
107470
|
-
|
107471
|
-
|
107472
|
-
|
107463
|
+
if (!utils_string.StringUtils.isNullOrEmpty(text)) {
|
107464
|
+
const setSelectionHistoryItem = this.control.modelManager.modelManipulator.text.getLastModifiableHistoryItem((hi) => hi instanceof SelectionHistoryItem);
|
107465
|
+
this.control.modelManager.modelManipulator.range.removeIntervalWithoutHistory(insertTextHistoryItem.params.subDocPos.subDocument, intervalForModify, false);
|
107466
|
+
this.control.modelManager.modelManipulator.text.insertTextInner(new InsertTextManipulatorParams(new SubDocumentPosition(insertTextHistoryItem.params.subDocPos.subDocument, intervalForModify.start), insertTextHistoryItem.params.charPropsBundle, RunType.TextRun, text));
|
107467
|
+
setSelectionHistoryItem.newState.intervalsInfo.intervals[0].start = startInterval + text.length;
|
107468
|
+
insertTextHistoryItem.params.text = text;
|
107469
|
+
var newPositionSelection = setSelectionHistoryItem.newState.intervalsInfo.intervals[0].start;
|
107470
|
+
this.control.selection.changeState((newState) => newState.setPosition(newPositionSelection));
|
107471
|
+
this.control.commandManager.lastTextInsertDate = new Date(0);
|
107472
|
+
}
|
107473
|
+
else
|
107474
|
+
this.control.modelManager.modelManipulator.range.removeIntervalInner(insertTextHistoryItem.params.subDocPos.subDocument, intervalForModify, false);
|
107475
|
+
return true;
|
107473
107476
|
}
|
107474
107477
|
modifyLastInsertedSymbol(symbol) {
|
107475
107478
|
if (symbol.length !== 1)
|
@@ -107530,6 +107533,7 @@ class EventManager {
|
|
107530
107533
|
createInputTypeHandlers() {
|
107531
107534
|
const result = {};
|
107532
107535
|
result["insertParagraph"] = RichEditClientCommand.InsertParagraph;
|
107536
|
+
result["deleteContentBackward"] = RichEditClientCommand.ToggleBackspaceKey;
|
107533
107537
|
return result;
|
107534
107538
|
}
|
107535
107539
|
}
|
@@ -110548,7 +110552,7 @@ class DivInputEditor extends InputEditorBase {
|
|
110548
110552
|
this.selectEditableDocumentContent();
|
110549
110553
|
}
|
110550
110554
|
super.onKeyDown(evt);
|
110551
|
-
this.canSkipInputEvent =
|
110555
|
+
this.canSkipInputEvent = key/* KeyUtils */.LN.getEventKeyCode(evt) != EMPTY_KEYCODE;
|
110552
110556
|
}
|
110553
110557
|
onKeyUp(evt) {
|
110554
110558
|
super.onKeyUp(evt);
|
@@ -110918,7 +110922,9 @@ class IFrameInputEditor extends InputEditorBase {
|
|
110918
110922
|
}
|
110919
110923
|
onCompositionUpdate(_evt) {
|
110920
110924
|
const text = this.getEditableDocumentText();
|
110921
|
-
if (this.IMEState
|
110925
|
+
if (this.IMEState === IMEState.None)
|
110926
|
+
return;
|
110927
|
+
if (text.length && this.previousText != text) {
|
110922
110928
|
this.onTextReplace(text, text);
|
110923
110929
|
this.updateInputIME();
|
110924
110930
|
}
|
@@ -110926,7 +110932,7 @@ class IFrameInputEditor extends InputEditorBase {
|
|
110926
110932
|
}
|
110927
110933
|
onCompositionEnd(_evt) {
|
110928
110934
|
const text = this.getEditableDocumentText();
|
110929
|
-
if (
|
110935
|
+
if (this.previousText != text)
|
110930
110936
|
this.onTextReplace(text, text);
|
110931
110937
|
else if (!browser.Browser.Edge)
|
110932
110938
|
this.clearInputElement();
|
@@ -132971,8 +132977,6 @@ class ApplyTableStyleCommand extends TableCommandBase {
|
|
132971
132977
|
|
132972
132978
|
|
132973
132979
|
|
132974
|
-
|
132975
|
-
|
132976
132980
|
class AutoFitCommandBase extends TableCommandBase {
|
132977
132981
|
getState() {
|
132978
132982
|
if (this.isEnabled()) {
|
@@ -133022,7 +133026,7 @@ class FixedColumnWidthCommand extends AutoFitCommandBase {
|
|
133022
133026
|
const table = state.value;
|
133023
133027
|
const history = this.history;
|
133024
133028
|
const subDocument = parameter.subDocument;
|
133025
|
-
const lp = LayoutPosition.ensure(this.control.layoutFormatterManager,
|
133029
|
+
const lp = LayoutPosition.ensure(this.control.layoutFormatterManager, subDocument, table.getStartPosition());
|
133026
133030
|
const grid = this.getGrid(table, lp);
|
133027
133031
|
history.beginTransaction();
|
133028
133032
|
history.addAndRedo(new TableLayoutTypeHistoryItem(this.modelManipulator, subDocument, table.index, TableLayoutType.Fixed, true));
|
@@ -134104,8 +134108,6 @@ class InsertTableColumnToTheRightCommand extends InsertTableColumnCommandBase {
|
|
134104
134108
|
|
134105
134109
|
|
134106
134110
|
|
134107
|
-
|
134108
|
-
|
134109
134111
|
class InsertTableCoreCommand extends CommandBase {
|
134110
134112
|
getState() {
|
134111
134113
|
return new SimpleCommandState(this.isEnabled());
|
@@ -134117,7 +134119,7 @@ class InsertTableCoreCommand extends CommandBase {
|
|
134117
134119
|
const parameter = options.param;
|
134118
134120
|
const subDocument = this.selection.activeSubDocument;
|
134119
134121
|
const position = this.selection.intervals[0].start;
|
134120
|
-
const lp = LayoutPosition.ensure(this.control.layoutFormatterManager,
|
134122
|
+
const lp = LayoutPosition.ensure(this.control.layoutFormatterManager, subDocument, position);
|
134121
134123
|
let currentTable = Table.getTableByPosition(subDocument.tables, position, true);
|
134122
134124
|
let availableWidth = currentTable ? lp.row.tableCellInfo.avaliableContentWidth :
|
134123
134125
|
LayoutColumn.findSectionColumnWithMinimumWidth(lp.pageArea.columns);
|
@@ -141541,7 +141543,7 @@ class ClientRichEdit {
|
|
141541
141543
|
this.contextMenuSettings = settings.contextMenuSettings;
|
141542
141544
|
this.fullScreenHelper = new FullScreenHelper(element);
|
141543
141545
|
if (true)
|
141544
|
-
external_DevExpress_config_default()(JSON.parse(atob('
|
141546
|
+
external_DevExpress_config_default()(JSON.parse(atob('eyJsaWNlbnNlS2V5IjoiZXdvZ0lDSm1iM0p0WVhRaU9pQXhMQW9nSUNKcGJuUmxjbTVoYkZWellXZGxTV1FpT2lBaVZGTlJNR05RV1ZObU1GTlBibVpUWlUxaFRtMDRVU0lLZlE9PS5UbVRVMXNoalpjd1hWVXg0b3R1dHNKVlMvazMxQWphYXlrTm83VjcyL1dMU09GQlYrNjJ3YzBJcVh0WW95dCthZWlLTCtkb3FDSlBHNytnS2djQzRSbFZvSWxHQ3k1ajJUVHVjeXFEaFJBaHRoWUcrcmgrV2ZtZUNFZDMzZndueVZEcUEyUT09In0=')));
|
141545
141547
|
this.prepareElement(element, settings);
|
141546
141548
|
this.initDefaultFontsAndStyles();
|
141547
141549
|
this.initBars(settings.ribbon, settings.fonts);
|