devexpress-richedit 24.1.6 → 24.1.7-build-24281-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 +34 -43
- 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/selection/input-position.js +17 -6
- 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
|
/***/ })
|
@@ -72287,6 +72277,7 @@ class ParagraphFrame extends rectangle.Rectangle {
|
|
72287
72277
|
|
72288
72278
|
|
72289
72279
|
|
72280
|
+
|
72290
72281
|
class InputPosition extends InputPositionBase {
|
72291
72282
|
constructor(selection) {
|
72292
72283
|
super();
|
@@ -72304,13 +72295,23 @@ class InputPosition extends InputPositionBase {
|
|
72304
72295
|
}
|
72305
72296
|
getMergedSectionPropertiesRaw() {
|
72306
72297
|
if (!this.mergedSectionPropertiesRaw) {
|
72307
|
-
|
72308
|
-
|
72309
|
-
|
72310
|
-
|
72311
|
-
|
72298
|
+
let sectionIndex;
|
72299
|
+
let intervalEndPosition;
|
72300
|
+
const sections = this.model.sections;
|
72301
|
+
const pageIndex = this.selection.pageIndex;
|
72302
|
+
if (pageIndex < 0) {
|
72303
|
+
const interval = this.intervalsInfo.interval;
|
72304
|
+
const intervalStartPosition = interval.start;
|
72305
|
+
intervalEndPosition = interval.end;
|
72306
|
+
sectionIndex = search.SearchUtils.normedInterpolationIndexOf(sections, (s) => s.startLogPosition.value, intervalStartPosition);
|
72307
|
+
}
|
72308
|
+
else {
|
72309
|
+
const layoutPage = this.selection.layout.pages[pageIndex];
|
72310
|
+
sectionIndex = Section.getPageSectionIndex(layoutPage, sections);
|
72311
|
+
intervalEndPosition = layoutPage.getEndPosition();
|
72312
|
+
}
|
72312
72313
|
this.mergedSectionPropertiesRaw = sections[sectionIndex++].sectionProperties.clone();
|
72313
|
-
for (
|
72314
|
+
for (let section; (section = sections[sectionIndex]) && (section.startLogPosition.value < intervalEndPosition); sectionIndex++)
|
72314
72315
|
InputPositionBase.mergePropertiesRaw(this.mergedSectionPropertiesRaw, section.sectionProperties, SectionPropertyDescriptor.ALL_FIELDS);
|
72315
72316
|
}
|
72316
72317
|
return this.mergedSectionPropertiesRaw;
|
@@ -117894,7 +117895,6 @@ class AutoCorrectReplaceInfo {
|
|
117894
117895
|
class FieldsSettings {
|
117895
117896
|
constructor() {
|
117896
117897
|
this.openHyperlinkOnClick = false;
|
117897
|
-
this.disableRelativeHyperlinkUri = false;
|
117898
117898
|
this.updateFieldsBeforePrint = true;
|
117899
117899
|
this.updateFieldsOnPaste = true;
|
117900
117900
|
this.defaultTimeFormat = FieldsSettings.DEFAULT_TIME_FORMAT;
|
@@ -117921,10 +117921,6 @@ class FieldsSettings {
|
|
117921
117921
|
this.keepHyperlinkResultForInvalidReference = obj.keepHyperlinkResultForInvalidReference;
|
117922
117922
|
if ((0,common.isDefined)(obj.createHyperlinkTooltip) && obj.createHyperlinkTooltip !== '')
|
117923
117923
|
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
117924
|
}
|
117929
117925
|
clone() {
|
117930
117926
|
const result = new FieldsSettings();
|
@@ -130312,7 +130308,7 @@ class GoToLastDataRecordCommand extends GoToRecordCommandBase {
|
|
130312
130308
|
}
|
130313
130309
|
|
130314
130310
|
// EXTERNAL MODULE: ./node_modules/@devexpress/utils/lib/utils/url.js
|
130315
|
-
var
|
130311
|
+
var utils_url = __webpack_require__(6795);
|
130316
130312
|
;// CONCATENATED MODULE: ./src/common/commands/fields/hyperlink-command-base.ts
|
130317
130313
|
|
130318
130314
|
|
@@ -130363,9 +130359,8 @@ class OpenHyperlinkCommand extends HyperlinkCommandBase {
|
|
130363
130359
|
this.control.commandManager.getCommand(RichEditClientCommand.GoToBookmark)
|
130364
130360
|
.execute(this.control.commandManager.isPublicApiCall, new CommandSimpleOptions(this.control, hyperlinkInfo.anchor));
|
130365
130361
|
else {
|
130366
|
-
const
|
130367
|
-
|
130368
|
-
url/* Url */.R.navigate(hyperlinkInfo.uri, "_blank");
|
130362
|
+
const url = utils/* UrlUtils */.jE.isValid(hyperlinkInfo.uri) ? hyperlinkInfo.uri : utils/* UrlUtils */.jE.EmptyPage;
|
130363
|
+
utils_url/* Url */.R.navigate(url, "_blank");
|
130369
130364
|
}
|
130370
130365
|
return true;
|
130371
130366
|
}
|
@@ -143101,10 +143096,6 @@ class Settings {
|
|
143101
143096
|
result.fields.createHyperlinkTooltip = this.parseEventHandler(settings.fields.createHyperlinkTooltip);
|
143102
143097
|
if ((0,common.isDefined)(settings.fields.keepHyperlinkResultForInvalidReference))
|
143103
143098
|
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
143099
|
}
|
143109
143100
|
}
|
143110
143101
|
static parsePrintingSettings(settings, result) {
|