devexpress-richedit 23.1.12 → 23.1.13
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 +26 -6
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/base/commands/fields/open-hyperlink-command.js +5 -2
- package/lib/base-utils/utils.d.ts +8 -0
- package/lib/base-utils/utils.js +17 -0
- package/lib/core/model/options/fields.js +1 -2
- 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: 23.1.
|
|
3
|
+
* Version: 23.1.13
|
|
4
4
|
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
|
|
5
5
|
* License: https://www.devexpress.com/Support/EULAs
|
|
6
6
|
*/
|
|
@@ -10253,6 +10253,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
10253
10253
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10254
10254
|
/* harmony export */ "Ev": function() { return /* binding */ splitByLines; },
|
|
10255
10255
|
/* harmony export */ "Fw": function() { return /* binding */ searchTreeItem; },
|
|
10256
|
+
/* harmony export */ "jE": function() { return /* binding */ UrlUtils; },
|
|
10256
10257
|
/* harmony export */ "tm": function() { return /* binding */ convertToFunction; },
|
|
10257
10258
|
/* harmony export */ "xj": function() { return /* binding */ rotatePoint; }
|
|
10258
10259
|
/* harmony export */ });
|
|
@@ -10317,6 +10318,23 @@ function convertToFunction(func) {
|
|
|
10317
10318
|
function splitByLines(text) {
|
|
10318
10319
|
return text ? text.split(/\r\n|\r|\n/) : [''];
|
|
10319
10320
|
}
|
|
10321
|
+
const disallowedProtocols = [
|
|
10322
|
+
'data',
|
|
10323
|
+
'javascript'
|
|
10324
|
+
];
|
|
10325
|
+
class UrlUtils {
|
|
10326
|
+
static isValid(url) {
|
|
10327
|
+
const currentLocation = window.location.href;
|
|
10328
|
+
try {
|
|
10329
|
+
const resultUrl = new URL(url, currentLocation);
|
|
10330
|
+
const protocol = resultUrl.protocol.slice(0, -1);
|
|
10331
|
+
return !disallowedProtocols.includes(protocol);
|
|
10332
|
+
}
|
|
10333
|
+
catch (_a) { }
|
|
10334
|
+
return false;
|
|
10335
|
+
}
|
|
10336
|
+
}
|
|
10337
|
+
UrlUtils.EmptyPage = "about:blank";
|
|
10320
10338
|
|
|
10321
10339
|
|
|
10322
10340
|
/***/ })
|
|
@@ -116302,9 +116320,8 @@ class FieldsSettings {
|
|
|
116302
116320
|
this.openHyperlinkOnClick = obj.openHyperlinkOnClick;
|
|
116303
116321
|
if ((0,common.isDefined)(obj.keepHyperlinkResultForInvalidReference))
|
|
116304
116322
|
this.keepHyperlinkResultForInvalidReference = obj.keepHyperlinkResultForInvalidReference;
|
|
116305
|
-
if ((0,common.isDefined)(obj.createHyperlinkTooltip) && obj.createHyperlinkTooltip !== '')
|
|
116323
|
+
if ((0,common.isDefined)(obj.createHyperlinkTooltip) && obj.createHyperlinkTooltip !== '')
|
|
116306
116324
|
this.createHyperlinkTooltip = (0,utils/* convertToFunction */.tm)(obj.createHyperlinkTooltip);
|
|
116307
|
-
}
|
|
116308
116325
|
}
|
|
116309
116326
|
clone() {
|
|
116310
116327
|
const result = new FieldsSettings();
|
|
@@ -128689,7 +128706,7 @@ class GoToLastDataRecordCommand extends GoToRecordCommandBase {
|
|
|
128689
128706
|
}
|
|
128690
128707
|
|
|
128691
128708
|
// EXTERNAL MODULE: ./node_modules/@devexpress/utils/lib/utils/url.js
|
|
128692
|
-
var
|
|
128709
|
+
var utils_url = __webpack_require__(6795);
|
|
128693
128710
|
;// CONCATENATED MODULE: ./base/src/commands/fields/hyperlink-command-base.ts
|
|
128694
128711
|
|
|
128695
128712
|
|
|
@@ -128715,6 +128732,7 @@ class HyperlinkCommandBase extends CommandBase {
|
|
|
128715
128732
|
|
|
128716
128733
|
|
|
128717
128734
|
|
|
128735
|
+
|
|
128718
128736
|
class OpenHyperlinkCommand extends HyperlinkCommandBase {
|
|
128719
128737
|
executeCore(state, options) {
|
|
128720
128738
|
let field;
|
|
@@ -128738,8 +128756,10 @@ class OpenHyperlinkCommand extends HyperlinkCommandBase {
|
|
|
128738
128756
|
if (hyperlinkInfo.anchor)
|
|
128739
128757
|
this.control.commandManager.getCommand(RichEditClientCommand.GoToBookmark)
|
|
128740
128758
|
.execute(this.control.commandManager.isPublicApiCall, new CommandSimpleOptions(this.control, hyperlinkInfo.anchor));
|
|
128741
|
-
else
|
|
128742
|
-
url/*
|
|
128759
|
+
else {
|
|
128760
|
+
const url = utils/* UrlUtils.isValid */.jE.isValid(hyperlinkInfo.uri) ? hyperlinkInfo.uri : utils/* UrlUtils.EmptyPage */.jE.EmptyPage;
|
|
128761
|
+
utils_url/* Url.navigate */.R.navigate(url, "_blank");
|
|
128762
|
+
}
|
|
128743
128763
|
return true;
|
|
128744
128764
|
}
|
|
128745
128765
|
isEnabledInReadOnlyMode() {
|