devexpress-richedit 24.1.10 → 24.1.11-build-25051-0101
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 +47 -29
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/common/commands/text/clipboard-commands.d.ts +5 -5
- package/lib/common/commands/text/clipboard-commands.js +41 -20
- package/lib/common/model/fields/field.js +0 -2
- package/lib/common/model/fields/parsers/field-code-parser-hyperlink.js +3 -3
- package/lib/common/mouse-handler/touch-handler/touch-handler-popup-menu-state.js +2 -3
- package/package.json +3 -3
package/bin/gulpfile.js
CHANGED
package/bin/index-custom.js
CHANGED
package/bin/nspell-index.js
CHANGED
package/bin/webpack-externals.js
CHANGED
package/bin/webpack.config.js
CHANGED
package/dist/dx.richedit.d.ts
CHANGED
package/dist/dx.richedit.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* DevExpress WebRichEdit (dx.richedit.js)
|
3
|
-
* Version: 24.1.
|
3
|
+
* Version: 24.1.11
|
4
4
|
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
|
5
5
|
* License: https://www.devexpress.com/Support/EULAs
|
6
6
|
*/
|
@@ -22672,8 +22672,6 @@ class HyperlinkInfo {
|
|
22672
22672
|
return false;
|
22673
22673
|
if (this.uri.startsWith("#"))
|
22674
22674
|
return false;
|
22675
|
-
if (this.isMail())
|
22676
|
-
return false;
|
22677
22675
|
return utils/* UrlUtils */.jE.isValid(this.uri);
|
22678
22676
|
}
|
22679
22677
|
isMail() {
|
@@ -31223,6 +31221,7 @@ ApplyFieldHyperlinkStyleHistoryItem.mask = CharacterPropertiesMask.UseAll & ~(Ch
|
|
31223
31221
|
|
31224
31222
|
|
31225
31223
|
|
31224
|
+
|
31226
31225
|
class FieldCodeParserHyperlink extends FieldCodeParserClientUpdatingBase {
|
31227
31226
|
get name() { return FieldName.Hyperlink; }
|
31228
31227
|
parseCodeCurrentFieldInternal(_responce) {
|
@@ -31239,15 +31238,14 @@ class FieldCodeParserHyperlink extends FieldCodeParserClientUpdatingBase {
|
|
31239
31238
|
const text = (_b = (_a = this.parameterInfoList[0]) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : "";
|
31240
31239
|
const newHyperlinkInfo = this.updateHyperlinkInfo(text);
|
31241
31240
|
if (!newHyperlinkInfo) {
|
31242
|
-
if (!this.modelManager.richOptions.fields.keepHyperlinkResultForInvalidReference)
|
31241
|
+
if (!this.modelManager.richOptions.fields.keepHyperlinkResultForInvalidReference)
|
31243
31242
|
this.removeInterval(this.getTopField().getResultInterval());
|
31244
|
-
}
|
31245
31243
|
return true;
|
31246
31244
|
}
|
31247
31245
|
const modelManipulator = this.modelManager.modelManipulator;
|
31248
31246
|
const resultInterval = field.getResultInterval();
|
31249
31247
|
if (resultInterval.length === 0) {
|
31250
|
-
const resultText = text
|
31248
|
+
const resultText = utils_string.StringUtils.isNullOrEmpty(text) ? `#${newHyperlinkInfo.anchor}` : text;
|
31251
31249
|
const newResultInterval = new fixed.FixedInterval(resultInterval.start, resultText.length);
|
31252
31250
|
this.setInputPositionState();
|
31253
31251
|
this.replaceTextByInterval(resultInterval, resultText);
|
@@ -107021,12 +107019,11 @@ class TouchHandlerPopupMenuState extends TouchHandlerStateBase {
|
|
107021
107019
|
return new TouchHandlerBeginTapProcessingState(this.handler, evt);
|
107022
107020
|
}
|
107023
107021
|
canExtendSelection(mousePoint, lpStart) {
|
107024
|
-
return this.handler.control.
|
107025
|
-
this.handler.control.selection.isCollapsed() &&
|
107022
|
+
return this.handler.control.selection.isCollapsed() &&
|
107026
107023
|
this.isHitPoints(mousePoint, lpStart.getPositionRelativePage(this.handler.control.measurer), lpStart.row.height);
|
107027
107024
|
}
|
107028
107025
|
canExtendSelectionOnOneSide(mousePoint, selectionInterval) {
|
107029
|
-
return this.
|
107026
|
+
return this.isLeftOrRightEdge(mousePoint, selectionInterval);
|
107030
107027
|
}
|
107031
107028
|
getLayoutPosition(logPosition) {
|
107032
107029
|
var subDocument = this.handler.control.selection.activeSubDocument;
|
@@ -134787,7 +134784,14 @@ class ClipboardCommand extends CommandBase {
|
|
134787
134784
|
this.control.endUpdate();
|
134788
134785
|
}
|
134789
134786
|
tryWriteToClipboard() {
|
134790
|
-
this
|
134787
|
+
return __awaiter(this, void 0, void 0, function* () {
|
134788
|
+
try {
|
134789
|
+
yield this.clipboardHelper.tryWriteToClipboard(ClipboardCommand.builtInClipboard.clipboardData);
|
134790
|
+
}
|
134791
|
+
catch (error) {
|
134792
|
+
console.log(error);
|
134793
|
+
}
|
134794
|
+
});
|
134791
134795
|
}
|
134792
134796
|
isVisible() {
|
134793
134797
|
return true;
|
@@ -134984,15 +134988,17 @@ class ClipboardHelper {
|
|
134984
134988
|
return Promise.reject(ClipboardHelper.noDataInClipboardMessage);
|
134985
134989
|
}
|
134986
134990
|
insertClipboardItem(item, type, insert) {
|
134987
|
-
return
|
134988
|
-
|
134989
|
-
|
134991
|
+
return __awaiter(this, void 0, void 0, function* () {
|
134992
|
+
const blob = yield item.getType(type);
|
134993
|
+
const text = yield this.readAsText(blob);
|
134994
|
+
return yield insert(text);
|
134995
|
+
});
|
134990
134996
|
}
|
134991
134997
|
insertPlainText(text) {
|
134992
134998
|
return new Promise((resolve, reject) => {
|
134993
|
-
if (ClipboardHelper.
|
134999
|
+
if (ClipboardHelper.lastWrittenTextHash === this.calculateHash(text))
|
134994
135000
|
reject();
|
134995
|
-
ClipboardHelper.
|
135001
|
+
ClipboardHelper.lastWrittenTextHash = -1;
|
134996
135002
|
const command = new InsertPlainTextCommand(this.control);
|
134997
135003
|
if (command.execute(false, new CommandSimpleOptions(this.control, text)))
|
134998
135004
|
resolve();
|
@@ -135014,30 +135020,43 @@ class ClipboardHelper {
|
|
135014
135020
|
}
|
135015
135021
|
});
|
135016
135022
|
}
|
135023
|
+
tryWriteToClipboard(clipboardData) {
|
135024
|
+
return __awaiter(this, void 0, void 0, function* () {
|
135025
|
+
if (this.canWriteToClipboard())
|
135026
|
+
yield this.writeToClipboard(clipboardData);
|
135027
|
+
});
|
135028
|
+
}
|
135017
135029
|
canWriteToClipboard() {
|
135018
135030
|
var _a;
|
135019
|
-
return !!((_a = this.clipboard) === null || _a === void 0 ? void 0 : _a.
|
135031
|
+
return !!((_a = this.clipboard) === null || _a === void 0 ? void 0 : _a.write);
|
135020
135032
|
}
|
135021
135033
|
writeToClipboard(clipboardData) {
|
135022
|
-
ClipboardHelper.
|
135034
|
+
ClipboardHelper.lastWrittenTextHash = -1;
|
135023
135035
|
return new Promise((resolve, reject) => {
|
135024
135036
|
const modelManager = this.createModelManager(clipboardData.model);
|
135025
135037
|
const exporter = new TxtExporter(modelManager.modelManipulator, new DocumentExporterOptions());
|
135026
135038
|
exporter.exportToBlob((blob) => __awaiter(this, void 0, void 0, function* () {
|
135027
|
-
|
135028
|
-
|
135029
|
-
|
135030
|
-
|
135031
|
-
|
135039
|
+
let error = null;
|
135040
|
+
try {
|
135041
|
+
const item = this.createClipboardItem(blob);
|
135042
|
+
yield this.clipboard.write([item]);
|
135043
|
+
}
|
135044
|
+
catch (err) {
|
135045
|
+
error = err;
|
135046
|
+
}
|
135047
|
+
if (this.useWithBuildInClipboard) {
|
135048
|
+
const text = yield this.readAsText(blob);
|
135049
|
+
ClipboardHelper.lastWrittenTextHash = this.calculateHash(text);
|
135050
|
+
}
|
135051
|
+
if (error)
|
135052
|
+
reject(error);
|
135032
135053
|
else
|
135033
|
-
|
135054
|
+
resolve();
|
135034
135055
|
}));
|
135035
135056
|
});
|
135036
135057
|
}
|
135037
|
-
|
135038
|
-
|
135039
|
-
return this.writeToClipboard(clipboardData);
|
135040
|
-
return Promise.resolve();
|
135058
|
+
createClipboardItem(blob) {
|
135059
|
+
return new ClipboardItem({ 'text/plain': blob });
|
135041
135060
|
}
|
135042
135061
|
calculateHash(text) {
|
135043
135062
|
let hash = 0;
|
@@ -135057,10 +135076,9 @@ class ClipboardHelper {
|
|
135057
135076
|
}
|
135058
135077
|
}
|
135059
135078
|
ClipboardHelper.browserDoesNotSupportReadingFromClipboard = 'The browser does not support reading from the clipboard.';
|
135060
|
-
ClipboardHelper.browserDoesNotSupportWritingToClipboard = 'The browser does not support writing to the clipboard.';
|
135061
135079
|
ClipboardHelper.noDataInClipboardMessage = 'There is no any supported data in the clipboard.';
|
135062
135080
|
ClipboardHelper.clipboardItemCannotBeInsertedMessage = 'The clipboard item cannot be inserted.';
|
135063
|
-
ClipboardHelper.
|
135081
|
+
ClipboardHelper.lastWrittenTextHash = -1;
|
135064
135082
|
class InsertHtmlCommand extends CommandBase {
|
135065
135083
|
getState() {
|
135066
135084
|
return new SimpleCommandState(this.isEnabled());
|