jodit 4.7.4 → 4.7.6
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/CHANGELOG.md +87 -31
- package/README.md +4 -18
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +103 -148
- package/es2015/jodit.min.js +7 -7
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.fat.min.js +8 -8
- package/es2018/jodit.min.js +7 -7
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +11 -11
- package/es2021/jodit.js +103 -148
- package/es2021/jodit.min.js +10 -10
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +12 -12
- package/es2021.en/jodit.js +103 -148
- package/es2021.en/jodit.min.js +11 -11
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +106 -152
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/decorators/autobind/autobind.d.ts +19 -1
- package/esm/core/decorators/autobind/autobind.js +40 -1
- package/esm/modules/file-browser/data-provider.js +2 -17
- package/esm/modules/uploader/helpers/send.js +17 -11
- package/esm/modules/widget/file-selector/file-selector.js +5 -3
- package/esm/plugins/resize-handler/resize-handler.js +10 -5
- package/esm/plugins/size/size.js +8 -6
- package/esm/plugins/speech-recognize/helpers/recognize-manager.js +13 -9
- package/esm/tsconfig.json +1 -1
- package/esm/types/uploader.d.ts +14 -0
- package/package.json +1 -1
- package/types/core/decorators/autobind/autobind.d.ts +19 -1
- package/types/tsconfig.json +1 -1
- package/types/types/uploader.d.ts +14 -0
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.7.
|
|
4
|
+
* Version: v4.7.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -590,7 +590,7 @@ module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 24 24\">
|
|
|
590
590
|
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(42395);
|
|
591
591
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
|
|
592
592
|
/* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(69364);
|
|
593
|
-
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
|
|
593
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(49574);
|
|
594
594
|
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(68616);
|
|
595
595
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(23211);
|
|
596
596
|
/* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45664);
|
|
@@ -763,7 +763,7 @@ var ViewWithToolbar = /*#__PURE__*/ function(View) {
|
|
|
763
763
|
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_11__.watch)(':rebuildToolbar')
|
|
764
764
|
], ViewWithToolbar.prototype, "buildToolbar", null);
|
|
765
765
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
766
|
-
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__
|
|
766
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
767
767
|
], ViewWithToolbar.prototype, "beforeToolbarBuild", null);
|
|
768
768
|
|
|
769
769
|
|
|
@@ -8148,7 +8148,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
8148
8148
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
|
|
8149
8149
|
/* harmony import */ var jodit_core_async__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(91231);
|
|
8150
8150
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(81937);
|
|
8151
|
-
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
|
|
8151
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(49574);
|
|
8152
8152
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(65946);
|
|
8153
8153
|
/* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(33201);
|
|
8154
8154
|
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5266);
|
|
@@ -8369,7 +8369,7 @@ var Ajax = /*#__PURE__*/ function() {
|
|
|
8369
8369
|
}();
|
|
8370
8370
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Ajax, "log", []);
|
|
8371
8371
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
8372
|
-
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__
|
|
8372
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
8373
8373
|
], Ajax.prototype, "destruct", null);
|
|
8374
8374
|
|
|
8375
8375
|
|
|
@@ -8521,12 +8521,11 @@ var Ajax = /*#__PURE__*/ function() {
|
|
|
8521
8521
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
|
|
8522
8522
|
/* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41411);
|
|
8523
8523
|
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(15366);
|
|
8524
|
-
/* harmony import */ var
|
|
8524
|
+
/* harmony import */ var _swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
|
|
8525
8525
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(81937);
|
|
8526
|
-
/* harmony import */ var
|
|
8527
|
-
/* harmony import */ var
|
|
8528
|
-
/* harmony import */ var
|
|
8529
|
-
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(58664);
|
|
8526
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65946);
|
|
8527
|
+
/* harmony import */ var jodit_core_request__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73714);
|
|
8528
|
+
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(58664);
|
|
8530
8529
|
/*!
|
|
8531
8530
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8532
8531
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -8544,8 +8543,6 @@ var Ajax = /*#__PURE__*/ function() {
|
|
|
8544
8543
|
|
|
8545
8544
|
|
|
8546
8545
|
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
8546
|
var DEFAULT_SOURCE_NAME = 'default';
|
|
8550
8547
|
var possibleRules = new Set([
|
|
8551
8548
|
'allowFiles',
|
|
@@ -8596,13 +8593,13 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8596
8593
|
ajax === null || ajax === void 0 ? void 0 : ajax.abort();
|
|
8597
8594
|
instances.delete(name);
|
|
8598
8595
|
}
|
|
8599
|
-
var opts = (0,
|
|
8596
|
+
var opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.ConfigProto)({
|
|
8600
8597
|
onProgress: this.progressHandler
|
|
8601
8598
|
}, this.o.ajax));
|
|
8602
8599
|
if (opts.prepareData) {
|
|
8603
8600
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
8604
8601
|
}
|
|
8605
|
-
var ajax1 = new
|
|
8602
|
+
var ajax1 = new jodit_core_request__WEBPACK_IMPORTED_MODULE_9__.Ajax(opts);
|
|
8606
8603
|
instances.set(name, ajax1);
|
|
8607
8604
|
var promise = ajax1.send();
|
|
8608
8605
|
promise.finally(function() {
|
|
@@ -8635,7 +8632,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8635
8632
|
*/ function permissions(path, source) {
|
|
8636
8633
|
return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function() {
|
|
8637
8634
|
var _this;
|
|
8638
|
-
return (0,
|
|
8635
|
+
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_6__.__generator)(this, function(_state) {
|
|
8639
8636
|
_this = this;
|
|
8640
8637
|
if (!this.o.permissions) {
|
|
8641
8638
|
return [
|
|
@@ -8650,7 +8647,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8650
8647
|
2,
|
|
8651
8648
|
this.get('permissions').then(function(resp) {
|
|
8652
8649
|
if (_this.parent.isInDestruct) {
|
|
8653
|
-
throw (0,
|
|
8650
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.abort)();
|
|
8654
8651
|
}
|
|
8655
8652
|
var process = _this.o.permissions.process;
|
|
8656
8653
|
if (!process) {
|
|
@@ -8681,7 +8678,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8681
8678
|
var rule = 'allow' + action;
|
|
8682
8679
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.IS_PROD) {
|
|
8683
8680
|
if (!possibleRules.has(rule)) {
|
|
8684
|
-
throw (0,
|
|
8681
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)('Wrong action ' + action);
|
|
8685
8682
|
}
|
|
8686
8683
|
}
|
|
8687
8684
|
var presetValue = this.o.permissionsPresets[rule];
|
|
@@ -8762,14 +8759,14 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8762
8759
|
sources.forEach(function(source) {
|
|
8763
8760
|
if (source.files && source.files.length) {
|
|
8764
8761
|
var sort = _this.o.sort;
|
|
8765
|
-
if ((0,
|
|
8762
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.isFunction)(sort) && mods.sortBy) {
|
|
8766
8763
|
source.files.sort(function(a, b) {
|
|
8767
8764
|
return sort(a, b, mods.sortBy);
|
|
8768
8765
|
});
|
|
8769
8766
|
}
|
|
8770
8767
|
source.files.forEach(function(item) {
|
|
8771
8768
|
if (inFilter(item) && canBeFile(item)) {
|
|
8772
|
-
elements.push(
|
|
8769
|
+
elements.push(jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_10__.FileBrowserItem.create((0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_5__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_4__._)({}, item), {
|
|
8773
8770
|
sourceName: source.name,
|
|
8774
8771
|
source: source
|
|
8775
8772
|
})));
|
|
@@ -8785,11 +8782,11 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8785
8782
|
value: function tree(path, source) {
|
|
8786
8783
|
return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function() {
|
|
8787
8784
|
var _this;
|
|
8788
|
-
return (0,
|
|
8785
|
+
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_6__.__generator)(this, function(_state) {
|
|
8789
8786
|
switch(_state.label){
|
|
8790
8787
|
case 0:
|
|
8791
8788
|
_this = this;
|
|
8792
|
-
path = (0,
|
|
8789
|
+
path = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.normalizeRelativePath)(path);
|
|
8793
8790
|
if (!this.o.folder) {
|
|
8794
8791
|
return [
|
|
8795
8792
|
2,
|
|
@@ -8828,12 +8825,12 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8828
8825
|
*/ key: "getPathByUrl",
|
|
8829
8826
|
value: function getPathByUrl(url) {
|
|
8830
8827
|
var _this = this;
|
|
8831
|
-
(0,
|
|
8828
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.set)('options.getLocalFileByUrl.data.url', url, this);
|
|
8832
8829
|
return this.get('getLocalFileByUrl').then(function(resp) {
|
|
8833
8830
|
if (_this.isSuccess(resp)) {
|
|
8834
8831
|
return resp.data;
|
|
8835
8832
|
}
|
|
8836
|
-
throw (0,
|
|
8833
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)(_this.getMessage(resp));
|
|
8837
8834
|
});
|
|
8838
8835
|
}
|
|
8839
8836
|
},
|
|
@@ -8849,7 +8846,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8849
8846
|
var _this = this;
|
|
8850
8847
|
var create = this.o.create;
|
|
8851
8848
|
if (!create) {
|
|
8852
|
-
throw (0,
|
|
8849
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)('Set Create api options');
|
|
8853
8850
|
}
|
|
8854
8851
|
create.data.source = source;
|
|
8855
8852
|
create.data.path = path;
|
|
@@ -8858,7 +8855,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8858
8855
|
if (_this.isSuccess(resp)) {
|
|
8859
8856
|
return true;
|
|
8860
8857
|
}
|
|
8861
|
-
throw (0,
|
|
8858
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)(_this.getMessage(resp));
|
|
8862
8859
|
});
|
|
8863
8860
|
}
|
|
8864
8861
|
},
|
|
@@ -8874,7 +8871,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8874
8871
|
var mode = isFile ? 'fileMove' : 'folderMove';
|
|
8875
8872
|
var option = this.options[mode];
|
|
8876
8873
|
if (!option) {
|
|
8877
|
-
throw (0,
|
|
8874
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)('Set Move api options');
|
|
8878
8875
|
}
|
|
8879
8876
|
option.data.from = filepath;
|
|
8880
8877
|
option.data.path = path;
|
|
@@ -8883,7 +8880,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8883
8880
|
if (_this.isSuccess(resp)) {
|
|
8884
8881
|
return true;
|
|
8885
8882
|
}
|
|
8886
|
-
throw (0,
|
|
8883
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)(_this.getMessage(resp));
|
|
8887
8884
|
});
|
|
8888
8885
|
}
|
|
8889
8886
|
},
|
|
@@ -8899,7 +8896,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8899
8896
|
var _this = this;
|
|
8900
8897
|
var fr = this.o[action];
|
|
8901
8898
|
if (!fr) {
|
|
8902
|
-
throw (0,
|
|
8899
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)('Set "'.concat(action, '" api options'));
|
|
8903
8900
|
}
|
|
8904
8901
|
fr.data.path = path;
|
|
8905
8902
|
fr.data.name = file;
|
|
@@ -8949,7 +8946,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
8949
8946
|
var _this = this;
|
|
8950
8947
|
var fr = this.o[action];
|
|
8951
8948
|
if (!fr) {
|
|
8952
|
-
throw (0,
|
|
8949
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)('Set "'.concat(action, '" api options'));
|
|
8953
8950
|
}
|
|
8954
8951
|
fr.data.path = path;
|
|
8955
8952
|
fr.data.name = name;
|
|
@@ -9046,9 +9043,6 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
9046
9043
|
return DataProvider;
|
|
9047
9044
|
}();
|
|
9048
9045
|
|
|
9049
|
-
DataProvider = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
9050
|
-
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
9051
|
-
], DataProvider);
|
|
9052
9046
|
|
|
9053
9047
|
|
|
9054
9048
|
/***/ }),
|
|
@@ -9629,10 +9623,11 @@ module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 179
|
|
|
9629
9623
|
var isImage = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true;
|
|
9630
9624
|
var currentImage;
|
|
9631
9625
|
var tabs = [];
|
|
9632
|
-
|
|
9626
|
+
var options = editor.o.uploader;
|
|
9627
|
+
if (callbacks.upload && (options.url || options.insertImageAsBase64URI || options.customUploadFunction)) {
|
|
9633
9628
|
var dragBox = editor.c.fromHTML('<div class="jodit-drag-and-drop__file-box">' + "<strong>".concat(editor.i18n(isImage ? 'Drop image' : 'Drop file'), "</strong>") + "<span><br>".concat(editor.i18n('or click'), "</span>") + '<input type="file" accept="'.concat(isImage ? 'image/*' : '*', '" tabindex="-1" dir="auto" multiple=""/>') + '</div>');
|
|
9634
9629
|
editor.uploader.bind(dragBox, function(resp) {
|
|
9635
|
-
var handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(callbacks.upload) ? callbacks.upload :
|
|
9630
|
+
var handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(callbacks.upload) ? callbacks.upload : options.defaultHandlerSuccess;
|
|
9636
9631
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) {
|
|
9637
9632
|
handler.call(editor, resp);
|
|
9638
9633
|
}
|
|
@@ -22449,7 +22444,9 @@ function _array_with_holes(arr) {
|
|
|
22449
22444
|
|
|
22450
22445
|
|
|
22451
22446
|
|
|
22452
|
-
|
|
22447
|
+
/**
|
|
22448
|
+
* Calculate sizes for editor workspace and handle setHeight and setWidth events
|
|
22449
|
+
*/ var size = /*#__PURE__*/ function(Plugin) {
|
|
22453
22450
|
"use strict";
|
|
22454
22451
|
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__._)(size, Plugin);
|
|
22455
22452
|
function size() {
|
|
@@ -22614,10 +22611,13 @@ var size = /*#__PURE__*/ function(Plugin) {
|
|
|
22614
22611
|
], size.prototype, "__initialize", null);
|
|
22615
22612
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
22616
22613
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind
|
|
22617
|
-
], size.prototype, "
|
|
22618
|
-
|
|
22614
|
+
], size.prototype, "__setHeight", null);
|
|
22615
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
22616
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind
|
|
22617
|
+
], size.prototype, "__setWidth", null);
|
|
22618
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
22619
22619
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind
|
|
22620
|
-
], size);
|
|
22620
|
+
], size.prototype, "__resizeWorkspaceImd", null);
|
|
22621
22621
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_8__.pluginSystem.add('size', size);
|
|
22622
22622
|
|
|
22623
22623
|
|
|
@@ -24502,18 +24502,56 @@ var cns = console;
|
|
|
24502
24502
|
|
|
24503
24503
|
"use strict";
|
|
24504
24504
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24505
|
-
/* harmony export */ autobind: function() { return /*
|
|
24505
|
+
/* harmony export */ autobind: function() { return /* binding */ autobind; }
|
|
24506
24506
|
/* harmony export */ });
|
|
24507
|
-
/* harmony import */ var
|
|
24507
|
+
/* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91565);
|
|
24508
24508
|
/*!
|
|
24509
24509
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
24510
24510
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
24511
24511
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
24512
|
-
*/
|
|
24512
|
+
*/
|
|
24513
|
+
/**
|
|
24513
24514
|
* [[include:core/decorators/autobind/README.md]]
|
|
24514
24515
|
* @packageDocumentation
|
|
24515
24516
|
* @module decorators/autobind
|
|
24516
|
-
*/
|
|
24517
|
+
*/ /**
|
|
24518
|
+
* Decorator that automatically binds a method to its class instance.
|
|
24519
|
+
* This is useful when passing methods as callbacks to preserve the correct `this` context.
|
|
24520
|
+
*
|
|
24521
|
+
* @example
|
|
24522
|
+
* ```typescript
|
|
24523
|
+
* class MyComponent {
|
|
24524
|
+
* @autobind
|
|
24525
|
+
* handleClick() {
|
|
24526
|
+
* console.log(this); // Always refers to MyComponent instance
|
|
24527
|
+
* }
|
|
24528
|
+
* }
|
|
24529
|
+
*
|
|
24530
|
+
* const component = new MyComponent();
|
|
24531
|
+
* const button = document.createElement('button');
|
|
24532
|
+
* button.addEventListener('click', component.handleClick); // `this` is correctly bound
|
|
24533
|
+
* ```
|
|
24534
|
+
*/ function autobind(_target, propertyKey, descriptor) {
|
|
24535
|
+
if (!(0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_0__.isFunction)(descriptor.value)) {
|
|
24536
|
+
throw new TypeError('@autobind can only be applied to methods, but "'.concat(propertyKey, '" is not a function'));
|
|
24537
|
+
}
|
|
24538
|
+
var originalMethod = descriptor.value;
|
|
24539
|
+
return {
|
|
24540
|
+
configurable: true,
|
|
24541
|
+
get: function get() {
|
|
24542
|
+
// Create a bound version of the method and cache it on the instance
|
|
24543
|
+
var boundMethod = originalMethod.bind(this);
|
|
24544
|
+
// Define the bound method as a property on the instance
|
|
24545
|
+
// This ensures the same bound function is returned on subsequent accesses
|
|
24546
|
+
Object.defineProperty(this, propertyKey, {
|
|
24547
|
+
value: boundMethod,
|
|
24548
|
+
configurable: true,
|
|
24549
|
+
writable: true
|
|
24550
|
+
});
|
|
24551
|
+
return boundMethod;
|
|
24552
|
+
}
|
|
24553
|
+
};
|
|
24554
|
+
}
|
|
24517
24555
|
|
|
24518
24556
|
|
|
24519
24557
|
/***/ }),
|
|
@@ -26254,104 +26292,6 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('xpath', xpath);
|
|
|
26254
26292
|
}
|
|
26255
26293
|
|
|
26256
26294
|
|
|
26257
|
-
/***/ }),
|
|
26258
|
-
|
|
26259
|
-
/***/ 52201:
|
|
26260
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
26261
|
-
|
|
26262
|
-
"use strict";
|
|
26263
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26264
|
-
/* harmony export */ "default": function() { return /* binding */ autobind; }
|
|
26265
|
-
/* harmony export */ });
|
|
26266
|
-
/* unused harmony exports boundMethod, boundClass */
|
|
26267
|
-
function _type_of(obj) {
|
|
26268
|
-
"@swc/helpers - typeof";
|
|
26269
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
26270
|
-
}
|
|
26271
|
-
function _typeof(obj) {
|
|
26272
|
-
if (typeof Symbol === "function" && _type_of(Symbol.iterator) === "symbol") {
|
|
26273
|
-
_typeof = function _typeof(obj) {
|
|
26274
|
-
return typeof obj === "undefined" ? "undefined" : _type_of(obj);
|
|
26275
|
-
};
|
|
26276
|
-
} else {
|
|
26277
|
-
_typeof = function _typeof(obj) {
|
|
26278
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _type_of(obj);
|
|
26279
|
-
};
|
|
26280
|
-
}
|
|
26281
|
-
return _typeof(obj);
|
|
26282
|
-
}
|
|
26283
|
-
/**
|
|
26284
|
-
* Return a descriptor removing the value and returning a getter
|
|
26285
|
-
* The getter will return a .bind version of the function
|
|
26286
|
-
* and memoize the result against a symbol on the instance
|
|
26287
|
-
*/ function boundMethod(target, key, descriptor) {
|
|
26288
|
-
var fn = descriptor.value;
|
|
26289
|
-
if (typeof fn !== 'function') {
|
|
26290
|
-
throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(_typeof(fn)));
|
|
26291
|
-
} // In IE11 calling Object.defineProperty has a side-effect of evaluating the
|
|
26292
|
-
// getter for the property which is being replaced. This causes infinite
|
|
26293
|
-
// recursion and an "Out of stack space" error.
|
|
26294
|
-
var definingProperty = false;
|
|
26295
|
-
return {
|
|
26296
|
-
configurable: true,
|
|
26297
|
-
get: function get() {
|
|
26298
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
26299
|
-
if (definingProperty || this === target.prototype || this.hasOwnProperty(key) || typeof fn !== 'function') {
|
|
26300
|
-
return fn;
|
|
26301
|
-
}
|
|
26302
|
-
var boundFn = fn.bind(this);
|
|
26303
|
-
definingProperty = true;
|
|
26304
|
-
Object.defineProperty(this, key, {
|
|
26305
|
-
configurable: true,
|
|
26306
|
-
get: function get() {
|
|
26307
|
-
return boundFn;
|
|
26308
|
-
},
|
|
26309
|
-
set: function set(value) {
|
|
26310
|
-
fn = value;
|
|
26311
|
-
delete this[key];
|
|
26312
|
-
}
|
|
26313
|
-
});
|
|
26314
|
-
definingProperty = false;
|
|
26315
|
-
return boundFn;
|
|
26316
|
-
},
|
|
26317
|
-
set: function set(value) {
|
|
26318
|
-
fn = value;
|
|
26319
|
-
}
|
|
26320
|
-
};
|
|
26321
|
-
}
|
|
26322
|
-
/**
|
|
26323
|
-
* Use boundMethod to bind all methods on the target.prototype
|
|
26324
|
-
*/ function boundClass(target) {
|
|
26325
|
-
// (Using reflect to get all keys including symbols)
|
|
26326
|
-
var keys; // Use Reflect if exists
|
|
26327
|
-
if (typeof Reflect !== 'undefined' && typeof Reflect.ownKeys === 'function') {
|
|
26328
|
-
keys = Reflect.ownKeys(target.prototype);
|
|
26329
|
-
} else {
|
|
26330
|
-
keys = Object.getOwnPropertyNames(target.prototype); // Use symbols if support is provided
|
|
26331
|
-
if (typeof Object.getOwnPropertySymbols === 'function') {
|
|
26332
|
-
keys = keys.concat(Object.getOwnPropertySymbols(target.prototype));
|
|
26333
|
-
}
|
|
26334
|
-
}
|
|
26335
|
-
keys.forEach(function(key) {
|
|
26336
|
-
// Ignore special case target method
|
|
26337
|
-
if (key === 'constructor') {
|
|
26338
|
-
return;
|
|
26339
|
-
}
|
|
26340
|
-
var descriptor = Object.getOwnPropertyDescriptor(target.prototype, key); // Only methods need binding
|
|
26341
|
-
if (typeof descriptor.value === 'function') {
|
|
26342
|
-
Object.defineProperty(target.prototype, key, boundMethod(target, key, descriptor));
|
|
26343
|
-
}
|
|
26344
|
-
});
|
|
26345
|
-
return target;
|
|
26346
|
-
}
|
|
26347
|
-
function autobind() {
|
|
26348
|
-
if (arguments.length === 1) {
|
|
26349
|
-
return boundClass.apply(void 0, arguments);
|
|
26350
|
-
}
|
|
26351
|
-
return boundMethod.apply(void 0, arguments);
|
|
26352
|
-
}
|
|
26353
|
-
|
|
26354
|
-
|
|
26355
26295
|
/***/ }),
|
|
26356
26296
|
|
|
26357
26297
|
/***/ 52433:
|
|
@@ -34717,9 +34657,15 @@ var resizeHandler = /*#__PURE__*/ function(Plugin) {
|
|
|
34717
34657
|
/** @override **/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(resizeHandler, "requires", [
|
|
34718
34658
|
'size'
|
|
34719
34659
|
]);
|
|
34720
|
-
|
|
34660
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
34661
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind
|
|
34662
|
+
], resizeHandler.prototype, "onHandleResizeStart", null);
|
|
34663
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
34664
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind
|
|
34665
|
+
], resizeHandler.prototype, "onHandleResize", null);
|
|
34666
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
34721
34667
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind
|
|
34722
|
-
], resizeHandler);
|
|
34668
|
+
], resizeHandler.prototype, "onHandleResizeEnd", null);
|
|
34723
34669
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('resizeHandler', resizeHandler);
|
|
34724
34670
|
|
|
34725
34671
|
|
|
@@ -38932,24 +38878,27 @@ function ConfigFlatten(obj) {
|
|
|
38932
38878
|
var ajaxInstances = new WeakMap();
|
|
38933
38879
|
function send(uploader, data) {
|
|
38934
38880
|
var requestData = (0,jodit_modules_uploader_helpers_build_data__WEBPACK_IMPORTED_MODULE_2__.buildData)(uploader, data);
|
|
38935
|
-
var
|
|
38881
|
+
var showProgress = function(progress) {
|
|
38882
|
+
uploader.j.progressbar.show().progress(progress);
|
|
38883
|
+
if (progress >= 100) {
|
|
38884
|
+
uploader.j.progressbar.hide();
|
|
38885
|
+
}
|
|
38886
|
+
};
|
|
38887
|
+
var sendData = function(request, showProgress) {
|
|
38936
38888
|
var ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_1__.Ajax({
|
|
38937
38889
|
xhr: function() {
|
|
38938
38890
|
var xhr = new XMLHttpRequest();
|
|
38939
38891
|
if (uploader.j.ow.FormData !== undefined && xhr.upload) {
|
|
38940
|
-
|
|
38892
|
+
showProgress(10);
|
|
38941
38893
|
xhr.upload.addEventListener('progress', function(evt) {
|
|
38942
38894
|
if (evt.lengthComputable) {
|
|
38943
38895
|
var percentComplete = evt.loaded / evt.total;
|
|
38944
38896
|
percentComplete *= 100;
|
|
38945
|
-
|
|
38946
|
-
if (percentComplete >= 100) {
|
|
38947
|
-
uploader.j.progressbar.hide();
|
|
38948
|
-
}
|
|
38897
|
+
showProgress(percentComplete);
|
|
38949
38898
|
}
|
|
38950
38899
|
}, false);
|
|
38951
38900
|
} else {
|
|
38952
|
-
|
|
38901
|
+
showProgress(100);
|
|
38953
38902
|
}
|
|
38954
38903
|
return xhr;
|
|
38955
38904
|
},
|
|
@@ -38984,12 +38933,17 @@ function send(uploader, data) {
|
|
|
38984
38933
|
instances === null || instances === void 0 ? void 0 : instances.delete(ajax);
|
|
38985
38934
|
});
|
|
38986
38935
|
};
|
|
38936
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(uploader.o.customUploadFunction)) {
|
|
38937
|
+
sendData = uploader.o.customUploadFunction;
|
|
38938
|
+
}
|
|
38987
38939
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isPromise)(requestData)) {
|
|
38988
|
-
return requestData.then(
|
|
38940
|
+
return requestData.then(function(data) {
|
|
38941
|
+
return sendData(data, showProgress);
|
|
38942
|
+
}).catch(function(error) {
|
|
38989
38943
|
uploader.o.error.call(uploader, error);
|
|
38990
38944
|
});
|
|
38991
38945
|
}
|
|
38992
|
-
return sendData(requestData);
|
|
38946
|
+
return sendData(requestData, showProgress);
|
|
38993
38947
|
}
|
|
38994
38948
|
|
|
38995
38949
|
|
|
@@ -40676,7 +40630,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
40676
40630
|
* @packageDocumentation
|
|
40677
40631
|
* @module constants
|
|
40678
40632
|
*/
|
|
40679
|
-
var APP_VERSION = "4.7.
|
|
40633
|
+
var APP_VERSION = "4.7.6";
|
|
40680
40634
|
// prettier-ignore
|
|
40681
40635
|
var ES = "es5";
|
|
40682
40636
|
var IS_ES_MODERN = false;
|
package/es5/jodit.min.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.7.
|
|
4
|
+
* Version: v4.7.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
11
|
-
* Version: v4.7.
|
|
11
|
+
* Version: v4.7.6
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|