devexpress-richedit 24.1.6 → 24.1.7-build-24274-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.d.ts +1 -1
- package/dist/dx.richedit.js +17 -37
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/i-rich-constructor-settings.d.ts +0 -2
- package/lib/client/public/options.d.ts +0 -2
- package/lib/client/settings.js +0 -4
- package/lib/common/commands/fields/open-hyperlink-command.js +3 -4
- package/lib/common/model/options/fields.d.ts +0 -2
- package/lib/common/model/options/fields.js +0 -5
- package/lib/common/utils/utils.d.ts +3 -6
- package/lib/common/utils/utils.js +11 -20
- 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.7
|
4
4
|
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
|
5
5
|
* License: https://www.devexpress.com/Support/EULAs
|
6
6
|
*/
|
@@ -10241,10 +10241,9 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
10241
10241
|
|
10242
10242
|
"use strict";
|
10243
10243
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
10244
|
-
/* harmony export */ EW: function() { return /* binding */ createUrlValidationOptions; },
|
10245
10244
|
/* harmony export */ Ev: function() { return /* binding */ splitByLines; },
|
10246
10245
|
/* harmony export */ Fw: function() { return /* binding */ searchTreeItem; },
|
10247
|
-
/* harmony export */
|
10246
|
+
/* harmony export */ jE: function() { return /* binding */ UrlUtils; },
|
10248
10247
|
/* harmony export */ tm: function() { return /* binding */ convertToFunction; },
|
10249
10248
|
/* harmony export */ xj: function() { return /* binding */ rotatePoint; }
|
10250
10249
|
/* harmony export */ });
|
@@ -10309,32 +10308,23 @@ function convertToFunction(func) {
|
|
10309
10308
|
function splitByLines(text) {
|
10310
10309
|
return text ? text.split(/\r\n|\r|\n/) : [''];
|
10311
10310
|
}
|
10312
|
-
function createUrlValidationOptions(control) {
|
10313
|
-
const fieldSettings = control.modelManager.richOptions.fields;
|
10314
|
-
return {
|
10315
|
-
allowRelativeUrl: !fieldSettings.disableRelativeHyperlinkUri,
|
10316
|
-
allowedProtocols: fieldSettings.allowedHyperlinkUriProtocols
|
10317
|
-
};
|
10318
|
-
}
|
10319
10311
|
const disallowedProtocols = [
|
10320
10312
|
'data',
|
10321
10313
|
'javascript'
|
10322
10314
|
];
|
10323
|
-
|
10324
|
-
|
10325
|
-
|
10326
|
-
|
10327
|
-
|
10328
|
-
|
10329
|
-
|
10330
|
-
|
10331
|
-
|
10332
|
-
|
10333
|
-
|
10334
|
-
}
|
10335
|
-
catch (_a) { }
|
10336
|
-
return false;
|
10315
|
+
class UrlUtils {
|
10316
|
+
static isValid(url) {
|
10317
|
+
const currentLocation = window.location.href;
|
10318
|
+
try {
|
10319
|
+
const resultUrl = new URL(url, currentLocation);
|
10320
|
+
const protocol = resultUrl.protocol.slice(0, -1);
|
10321
|
+
return !disallowedProtocols.includes(protocol);
|
10322
|
+
}
|
10323
|
+
catch (_a) { }
|
10324
|
+
return false;
|
10325
|
+
}
|
10337
10326
|
}
|
10327
|
+
UrlUtils.EmptyPage = "about:blank";
|
10338
10328
|
|
10339
10329
|
|
10340
10330
|
/***/ })
|
@@ -117894,7 +117884,6 @@ class AutoCorrectReplaceInfo {
|
|
117894
117884
|
class FieldsSettings {
|
117895
117885
|
constructor() {
|
117896
117886
|
this.openHyperlinkOnClick = false;
|
117897
|
-
this.disableRelativeHyperlinkUri = false;
|
117898
117887
|
this.updateFieldsBeforePrint = true;
|
117899
117888
|
this.updateFieldsOnPaste = true;
|
117900
117889
|
this.defaultTimeFormat = FieldsSettings.DEFAULT_TIME_FORMAT;
|
@@ -117921,10 +117910,6 @@ class FieldsSettings {
|
|
117921
117910
|
this.keepHyperlinkResultForInvalidReference = obj.keepHyperlinkResultForInvalidReference;
|
117922
117911
|
if ((0,common.isDefined)(obj.createHyperlinkTooltip) && obj.createHyperlinkTooltip !== '')
|
117923
117912
|
this.createHyperlinkTooltip = (0,utils/* convertToFunction */.tm)(obj.createHyperlinkTooltip);
|
117924
|
-
if ((0,common.isDefined)(obj.disableRelativeHyperlinkUri))
|
117925
|
-
this.disableRelativeHyperlinkUri = obj.disableRelativeHyperlinkUri;
|
117926
|
-
if ((0,common.isDefined)(obj.allowedHyperlinkUriProtocols))
|
117927
|
-
this.allowedHyperlinkUriProtocols = obj.allowedHyperlinkUriProtocols;
|
117928
117913
|
}
|
117929
117914
|
clone() {
|
117930
117915
|
const result = new FieldsSettings();
|
@@ -130312,7 +130297,7 @@ class GoToLastDataRecordCommand extends GoToRecordCommandBase {
|
|
130312
130297
|
}
|
130313
130298
|
|
130314
130299
|
// EXTERNAL MODULE: ./node_modules/@devexpress/utils/lib/utils/url.js
|
130315
|
-
var
|
130300
|
+
var utils_url = __webpack_require__(6795);
|
130316
130301
|
;// CONCATENATED MODULE: ./src/common/commands/fields/hyperlink-command-base.ts
|
130317
130302
|
|
130318
130303
|
|
@@ -130363,9 +130348,8 @@ class OpenHyperlinkCommand extends HyperlinkCommandBase {
|
|
130363
130348
|
this.control.commandManager.getCommand(RichEditClientCommand.GoToBookmark)
|
130364
130349
|
.execute(this.control.commandManager.isPublicApiCall, new CommandSimpleOptions(this.control, hyperlinkInfo.anchor));
|
130365
130350
|
else {
|
130366
|
-
const
|
130367
|
-
|
130368
|
-
url/* Url */.R.navigate(hyperlinkInfo.uri, "_blank");
|
130351
|
+
const url = utils/* UrlUtils */.jE.isValid(hyperlinkInfo.uri) ? hyperlinkInfo.uri : utils/* UrlUtils */.jE.EmptyPage;
|
130352
|
+
utils_url/* Url */.R.navigate(url, "_blank");
|
130369
130353
|
}
|
130370
130354
|
return true;
|
130371
130355
|
}
|
@@ -143101,10 +143085,6 @@ class Settings {
|
|
143101
143085
|
result.fields.createHyperlinkTooltip = this.parseEventHandler(settings.fields.createHyperlinkTooltip);
|
143102
143086
|
if ((0,common.isDefined)(settings.fields.keepHyperlinkResultForInvalidReference))
|
143103
143087
|
result.fields.keepHyperlinkResultForInvalidReference = settings.fields.keepHyperlinkResultForInvalidReference;
|
143104
|
-
if ((0,common.isDefined)(settings.fields.disableRelativeHyperlinkUri))
|
143105
|
-
result.fields.disableRelativeHyperlinkUri = settings.fields.disableRelativeHyperlinkUri;
|
143106
|
-
if ((0,common.isDefined)(settings.fields.allowedHyperlinkUriProtocols))
|
143107
|
-
result.fields.allowedHyperlinkUriProtocols = settings.fields.allowedHyperlinkUriProtocols;
|
143108
143088
|
}
|
143109
143089
|
}
|
143110
143090
|
static parsePrintingSettings(settings, result) {
|