jodit 4.7.5 → 4.7.7
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 +41 -0
- package/README.md +4 -18
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +85 -137
- 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 +39 -39
- package/es2021/jodit.js +85 -137
- package/es2021/jodit.min.js +40 -40
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +4 -4
- 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 +76 -76
- package/es2021.en/jodit.js +85 -137
- package/es2021.en/jodit.min.js +76 -76
- 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 +4 -4
- 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 +86 -141
- 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/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/package.json +1 -1
- package/types/core/decorators/autobind/autobind.d.ts +19 -1
- package/types/tsconfig.json +1 -1
package/es2015/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.7
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -530,7 +530,7 @@ module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 24 24\">
|
|
|
530
530
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
|
|
531
531
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
|
|
532
532
|
/* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69364);
|
|
533
|
-
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
533
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
534
534
|
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68616);
|
|
535
535
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23211);
|
|
536
536
|
/* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45664);
|
|
@@ -662,7 +662,7 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_11__
|
|
|
662
662
|
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)(':rebuildToolbar')
|
|
663
663
|
], ViewWithToolbar.prototype, "buildToolbar", null);
|
|
664
664
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
665
|
-
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__
|
|
665
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__.autobind
|
|
666
666
|
], ViewWithToolbar.prototype, "beforeToolbarBuild", null);
|
|
667
667
|
|
|
668
668
|
|
|
@@ -7226,7 +7226,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
7226
7226
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31635);
|
|
7227
7227
|
/* harmony import */ var jodit_core_async__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(91231);
|
|
7228
7228
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81937);
|
|
7229
|
-
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
7229
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
7230
7230
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(65946);
|
|
7231
7231
|
/* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(33201);
|
|
7232
7232
|
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(5266);
|
|
@@ -7394,7 +7394,7 @@ class Ajax {
|
|
|
7394
7394
|
}
|
|
7395
7395
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(Ajax, "log", []);
|
|
7396
7396
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
|
|
7397
|
-
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_6__
|
|
7397
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_6__.autobind
|
|
7398
7398
|
], Ajax.prototype, "destruct", null);
|
|
7399
7399
|
|
|
7400
7400
|
|
|
@@ -7544,12 +7544,10 @@ class Ajax {
|
|
|
7544
7544
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25045);
|
|
7545
7545
|
/* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41411);
|
|
7546
7546
|
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15366);
|
|
7547
|
-
/* harmony import */ var
|
|
7548
|
-
/* harmony import */ var
|
|
7549
|
-
/* harmony import */ var
|
|
7550
|
-
/* harmony import */ var
|
|
7551
|
-
/* harmony import */ var jodit_core_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(73714);
|
|
7552
|
-
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(58664);
|
|
7547
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81937);
|
|
7548
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65946);
|
|
7549
|
+
/* harmony import */ var jodit_core_request__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(73714);
|
|
7550
|
+
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58664);
|
|
7553
7551
|
/*!
|
|
7554
7552
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7555
7553
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7564,8 +7562,6 @@ class Ajax {
|
|
|
7564
7562
|
|
|
7565
7563
|
|
|
7566
7564
|
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
7565
|
const DEFAULT_SOURCE_NAME = 'default';
|
|
7570
7566
|
const possibleRules = new Set([
|
|
7571
7567
|
'allowFiles',
|
|
@@ -7595,13 +7591,13 @@ class DataProvider {
|
|
|
7595
7591
|
ajax === null || ajax === void 0 ? void 0 : ajax.abort();
|
|
7596
7592
|
instances.delete(name);
|
|
7597
7593
|
}
|
|
7598
|
-
const opts = (0,
|
|
7594
|
+
const opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)({
|
|
7599
7595
|
onProgress: this.progressHandler
|
|
7600
7596
|
}, this.o.ajax));
|
|
7601
7597
|
if (opts.prepareData) {
|
|
7602
7598
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
7603
7599
|
}
|
|
7604
|
-
const ajax = new
|
|
7600
|
+
const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_6__.Ajax(opts);
|
|
7605
7601
|
instances.set(name, ajax);
|
|
7606
7602
|
const promise = ajax.send();
|
|
7607
7603
|
promise.finally(()=>{
|
|
@@ -7631,7 +7627,7 @@ class DataProvider {
|
|
|
7631
7627
|
if (this.o.permissions.url) {
|
|
7632
7628
|
return this.get('permissions').then((resp)=>{
|
|
7633
7629
|
if (this.parent.isInDestruct) {
|
|
7634
|
-
throw (0,
|
|
7630
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.abort)();
|
|
7635
7631
|
}
|
|
7636
7632
|
let process = this.o.permissions.process;
|
|
7637
7633
|
if (!process) {
|
|
@@ -7652,9 +7648,9 @@ class DataProvider {
|
|
|
7652
7648
|
}
|
|
7653
7649
|
canI(action) {
|
|
7654
7650
|
const rule = 'allow' + action;
|
|
7655
|
-
if (!
|
|
7651
|
+
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_4__.IS_PROD) {
|
|
7656
7652
|
if (!possibleRules.has(rule)) {
|
|
7657
|
-
throw (0,
|
|
7653
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Wrong action ' + action);
|
|
7658
7654
|
}
|
|
7659
7655
|
}
|
|
7660
7656
|
const presetValue = this.o.permissionsPresets[rule];
|
|
@@ -7706,12 +7702,12 @@ class DataProvider {
|
|
|
7706
7702
|
sources.forEach((source)=>{
|
|
7707
7703
|
if (source.files && source.files.length) {
|
|
7708
7704
|
const { sort } = this.o;
|
|
7709
|
-
if ((0,
|
|
7705
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(sort) && mods.sortBy) {
|
|
7710
7706
|
source.files.sort((a, b)=>sort(a, b, mods.sortBy));
|
|
7711
7707
|
}
|
|
7712
7708
|
source.files.forEach((item)=>{
|
|
7713
7709
|
if (inFilter(item) && canBeFile(item)) {
|
|
7714
|
-
elements.push(
|
|
7710
|
+
elements.push(jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_7__.FileBrowserItem.create((0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_3__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_2__._)({}, item), {
|
|
7715
7711
|
sourceName: source.name,
|
|
7716
7712
|
source
|
|
7717
7713
|
})));
|
|
@@ -7723,7 +7719,7 @@ class DataProvider {
|
|
|
7723
7719
|
}
|
|
7724
7720
|
tree(path, source) {
|
|
7725
7721
|
return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function*() {
|
|
7726
|
-
path = (0,
|
|
7722
|
+
path = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.normalizeRelativePath)(path);
|
|
7727
7723
|
if (!this.o.folder) {
|
|
7728
7724
|
return Promise.reject(Error('Set Folder Api options'));
|
|
7729
7725
|
}
|
|
@@ -7745,12 +7741,12 @@ class DataProvider {
|
|
|
7745
7741
|
/**
|
|
7746
7742
|
* Get path by url. You can use this method in another modules
|
|
7747
7743
|
*/ getPathByUrl(url) {
|
|
7748
|
-
(0,
|
|
7744
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.set)('options.getLocalFileByUrl.data.url', url, this);
|
|
7749
7745
|
return this.get('getLocalFileByUrl').then((resp)=>{
|
|
7750
7746
|
if (this.isSuccess(resp)) {
|
|
7751
7747
|
return resp.data;
|
|
7752
7748
|
}
|
|
7753
|
-
throw (0,
|
|
7749
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)(this.getMessage(resp));
|
|
7754
7750
|
});
|
|
7755
7751
|
}
|
|
7756
7752
|
/**
|
|
@@ -7762,7 +7758,7 @@ class DataProvider {
|
|
|
7762
7758
|
*/ createFolder(name, path, source) {
|
|
7763
7759
|
const { create } = this.o;
|
|
7764
7760
|
if (!create) {
|
|
7765
|
-
throw (0,
|
|
7761
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Set Create api options');
|
|
7766
7762
|
}
|
|
7767
7763
|
create.data.source = source;
|
|
7768
7764
|
create.data.path = path;
|
|
@@ -7771,7 +7767,7 @@ class DataProvider {
|
|
|
7771
7767
|
if (this.isSuccess(resp)) {
|
|
7772
7768
|
return true;
|
|
7773
7769
|
}
|
|
7774
|
-
throw (0,
|
|
7770
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)(this.getMessage(resp));
|
|
7775
7771
|
});
|
|
7776
7772
|
}
|
|
7777
7773
|
/**
|
|
@@ -7783,7 +7779,7 @@ class DataProvider {
|
|
|
7783
7779
|
const mode = isFile ? 'fileMove' : 'folderMove';
|
|
7784
7780
|
const option = this.options[mode];
|
|
7785
7781
|
if (!option) {
|
|
7786
|
-
throw (0,
|
|
7782
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Set Move api options');
|
|
7787
7783
|
}
|
|
7788
7784
|
option.data.from = filepath;
|
|
7789
7785
|
option.data.path = path;
|
|
@@ -7792,7 +7788,7 @@ class DataProvider {
|
|
|
7792
7788
|
if (this.isSuccess(resp)) {
|
|
7793
7789
|
return true;
|
|
7794
7790
|
}
|
|
7795
|
-
throw (0,
|
|
7791
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)(this.getMessage(resp));
|
|
7796
7792
|
});
|
|
7797
7793
|
}
|
|
7798
7794
|
/**
|
|
@@ -7804,7 +7800,7 @@ class DataProvider {
|
|
|
7804
7800
|
*/ remove(action, path, file, source) {
|
|
7805
7801
|
const fr = this.o[action];
|
|
7806
7802
|
if (!fr) {
|
|
7807
|
-
throw (0,
|
|
7803
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)(`Set "${action}" api options`);
|
|
7808
7804
|
}
|
|
7809
7805
|
fr.data.path = path;
|
|
7810
7806
|
fr.data.name = file;
|
|
@@ -7844,7 +7840,7 @@ class DataProvider {
|
|
|
7844
7840
|
*/ rename(action, path, name, newname, source) {
|
|
7845
7841
|
const fr = this.o[action];
|
|
7846
7842
|
if (!fr) {
|
|
7847
|
-
throw (0,
|
|
7843
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)(`Set "${action}" api options`);
|
|
7848
7844
|
}
|
|
7849
7845
|
fr.data.path = path;
|
|
7850
7846
|
fr.data.name = name;
|
|
@@ -7924,9 +7920,6 @@ class DataProvider {
|
|
|
7924
7920
|
}
|
|
7925
7921
|
}
|
|
7926
7922
|
|
|
7927
|
-
DataProvider = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
7928
|
-
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_6__.autobind
|
|
7929
|
-
], DataProvider);
|
|
7930
7923
|
|
|
7931
7924
|
|
|
7932
7925
|
/***/ }),
|
|
@@ -19005,7 +18998,9 @@ const map = {};
|
|
|
19005
18998
|
|
|
19006
18999
|
|
|
19007
19000
|
|
|
19008
|
-
|
|
19001
|
+
/**
|
|
19002
|
+
* Calculate sizes for editor workspace and handle setHeight and setWidth events
|
|
19003
|
+
*/ class size extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_6__.Plugin {
|
|
19009
19004
|
afterInit(editor) {
|
|
19010
19005
|
editor.e.on('setHeight.size', this.__setHeight).on('setWidth.size', this.__setWidth).on('afterInit.size changePlace.size', this.__initialize, {
|
|
19011
19006
|
top: true
|
|
@@ -19140,10 +19135,13 @@ class size extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_6__.Plugin
|
|
|
19140
19135
|
], size.prototype, "__initialize", null);
|
|
19141
19136
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
19142
19137
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19143
|
-
], size.prototype, "
|
|
19144
|
-
|
|
19138
|
+
], size.prototype, "__setHeight", null);
|
|
19139
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
19145
19140
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19146
|
-
], size);
|
|
19141
|
+
], size.prototype, "__setWidth", null);
|
|
19142
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
19143
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19144
|
+
], size.prototype, "__resizeWorkspaceImd", null);
|
|
19147
19145
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('size', size);
|
|
19148
19146
|
|
|
19149
19147
|
|
|
@@ -20803,18 +20801,56 @@ function _async_to_generator(fn) {
|
|
|
20803
20801
|
|
|
20804
20802
|
"use strict";
|
|
20805
20803
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20806
|
-
/* harmony export */ autobind: function() { return /*
|
|
20804
|
+
/* harmony export */ autobind: function() { return /* binding */ autobind; }
|
|
20807
20805
|
/* harmony export */ });
|
|
20808
|
-
/* harmony import */ var
|
|
20806
|
+
/* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91565);
|
|
20809
20807
|
/*!
|
|
20810
20808
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
20811
20809
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
20812
20810
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
20813
|
-
*/
|
|
20811
|
+
*/
|
|
20812
|
+
/**
|
|
20814
20813
|
* [[include:core/decorators/autobind/README.md]]
|
|
20815
20814
|
* @packageDocumentation
|
|
20816
20815
|
* @module decorators/autobind
|
|
20817
|
-
*/
|
|
20816
|
+
*/ /**
|
|
20817
|
+
* Decorator that automatically binds a method to its class instance.
|
|
20818
|
+
* This is useful when passing methods as callbacks to preserve the correct `this` context.
|
|
20819
|
+
*
|
|
20820
|
+
* @example
|
|
20821
|
+
* ```typescript
|
|
20822
|
+
* class MyComponent {
|
|
20823
|
+
* @autobind
|
|
20824
|
+
* handleClick() {
|
|
20825
|
+
* console.log(this); // Always refers to MyComponent instance
|
|
20826
|
+
* }
|
|
20827
|
+
* }
|
|
20828
|
+
*
|
|
20829
|
+
* const component = new MyComponent();
|
|
20830
|
+
* const button = document.createElement('button');
|
|
20831
|
+
* button.addEventListener('click', component.handleClick); // `this` is correctly bound
|
|
20832
|
+
* ```
|
|
20833
|
+
*/ function autobind(_target, propertyKey, descriptor) {
|
|
20834
|
+
if (!(0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_0__.isFunction)(descriptor.value)) {
|
|
20835
|
+
throw new TypeError(`@autobind can only be applied to methods, but "${propertyKey}" is not a function`);
|
|
20836
|
+
}
|
|
20837
|
+
const originalMethod = descriptor.value;
|
|
20838
|
+
return {
|
|
20839
|
+
configurable: true,
|
|
20840
|
+
get () {
|
|
20841
|
+
// Create a bound version of the method and cache it on the instance
|
|
20842
|
+
const boundMethod = originalMethod.bind(this);
|
|
20843
|
+
// Define the bound method as a property on the instance
|
|
20844
|
+
// This ensures the same bound function is returned on subsequent accesses
|
|
20845
|
+
Object.defineProperty(this, propertyKey, {
|
|
20846
|
+
value: boundMethod,
|
|
20847
|
+
configurable: true,
|
|
20848
|
+
writable: true
|
|
20849
|
+
});
|
|
20850
|
+
return boundMethod;
|
|
20851
|
+
}
|
|
20852
|
+
};
|
|
20853
|
+
}
|
|
20818
20854
|
|
|
20819
20855
|
|
|
20820
20856
|
/***/ }),
|
|
@@ -22295,100 +22331,6 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('xpath', xpath);
|
|
|
22295
22331
|
}
|
|
22296
22332
|
|
|
22297
22333
|
|
|
22298
|
-
/***/ }),
|
|
22299
|
-
|
|
22300
|
-
/***/ 52201:
|
|
22301
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
22302
|
-
|
|
22303
|
-
"use strict";
|
|
22304
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22305
|
-
/* harmony export */ "default": function() { return /* binding */ autobind; }
|
|
22306
|
-
/* harmony export */ });
|
|
22307
|
-
/* unused harmony exports boundMethod, boundClass */
|
|
22308
|
-
function _typeof(obj) {
|
|
22309
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
22310
|
-
_typeof = function _typeof(obj) {
|
|
22311
|
-
return typeof obj;
|
|
22312
|
-
};
|
|
22313
|
-
} else {
|
|
22314
|
-
_typeof = function _typeof(obj) {
|
|
22315
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
22316
|
-
};
|
|
22317
|
-
}
|
|
22318
|
-
return _typeof(obj);
|
|
22319
|
-
}
|
|
22320
|
-
/**
|
|
22321
|
-
* Return a descriptor removing the value and returning a getter
|
|
22322
|
-
* The getter will return a .bind version of the function
|
|
22323
|
-
* and memoize the result against a symbol on the instance
|
|
22324
|
-
*/ function boundMethod(target, key, descriptor) {
|
|
22325
|
-
var fn = descriptor.value;
|
|
22326
|
-
if (typeof fn !== 'function') {
|
|
22327
|
-
throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(_typeof(fn)));
|
|
22328
|
-
} // In IE11 calling Object.defineProperty has a side-effect of evaluating the
|
|
22329
|
-
// getter for the property which is being replaced. This causes infinite
|
|
22330
|
-
// recursion and an "Out of stack space" error.
|
|
22331
|
-
var definingProperty = false;
|
|
22332
|
-
return {
|
|
22333
|
-
configurable: true,
|
|
22334
|
-
get: function get() {
|
|
22335
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
22336
|
-
if (definingProperty || this === target.prototype || this.hasOwnProperty(key) || typeof fn !== 'function') {
|
|
22337
|
-
return fn;
|
|
22338
|
-
}
|
|
22339
|
-
var boundFn = fn.bind(this);
|
|
22340
|
-
definingProperty = true;
|
|
22341
|
-
Object.defineProperty(this, key, {
|
|
22342
|
-
configurable: true,
|
|
22343
|
-
get: function get() {
|
|
22344
|
-
return boundFn;
|
|
22345
|
-
},
|
|
22346
|
-
set: function set(value) {
|
|
22347
|
-
fn = value;
|
|
22348
|
-
delete this[key];
|
|
22349
|
-
}
|
|
22350
|
-
});
|
|
22351
|
-
definingProperty = false;
|
|
22352
|
-
return boundFn;
|
|
22353
|
-
},
|
|
22354
|
-
set: function set(value) {
|
|
22355
|
-
fn = value;
|
|
22356
|
-
}
|
|
22357
|
-
};
|
|
22358
|
-
}
|
|
22359
|
-
/**
|
|
22360
|
-
* Use boundMethod to bind all methods on the target.prototype
|
|
22361
|
-
*/ function boundClass(target) {
|
|
22362
|
-
// (Using reflect to get all keys including symbols)
|
|
22363
|
-
var keys; // Use Reflect if exists
|
|
22364
|
-
if (typeof Reflect !== 'undefined' && typeof Reflect.ownKeys === 'function') {
|
|
22365
|
-
keys = Reflect.ownKeys(target.prototype);
|
|
22366
|
-
} else {
|
|
22367
|
-
keys = Object.getOwnPropertyNames(target.prototype); // Use symbols if support is provided
|
|
22368
|
-
if (typeof Object.getOwnPropertySymbols === 'function') {
|
|
22369
|
-
keys = keys.concat(Object.getOwnPropertySymbols(target.prototype));
|
|
22370
|
-
}
|
|
22371
|
-
}
|
|
22372
|
-
keys.forEach(function(key) {
|
|
22373
|
-
// Ignore special case target method
|
|
22374
|
-
if (key === 'constructor') {
|
|
22375
|
-
return;
|
|
22376
|
-
}
|
|
22377
|
-
var descriptor = Object.getOwnPropertyDescriptor(target.prototype, key); // Only methods need binding
|
|
22378
|
-
if (typeof descriptor.value === 'function') {
|
|
22379
|
-
Object.defineProperty(target.prototype, key, boundMethod(target, key, descriptor));
|
|
22380
|
-
}
|
|
22381
|
-
});
|
|
22382
|
-
return target;
|
|
22383
|
-
}
|
|
22384
|
-
function autobind() {
|
|
22385
|
-
if (arguments.length === 1) {
|
|
22386
|
-
return boundClass.apply(void 0, arguments);
|
|
22387
|
-
}
|
|
22388
|
-
return boundMethod.apply(void 0, arguments);
|
|
22389
|
-
}
|
|
22390
|
-
|
|
22391
|
-
|
|
22392
22334
|
/***/ }),
|
|
22393
22335
|
|
|
22394
22336
|
/***/ 52433:
|
|
@@ -29445,9 +29387,15 @@ class resizeHandler extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__.Plugi
|
|
|
29445
29387
|
/** @override **/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(resizeHandler, "requires", [
|
|
29446
29388
|
'size'
|
|
29447
29389
|
]);
|
|
29448
|
-
|
|
29390
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29391
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
29392
|
+
], resizeHandler.prototype, "onHandleResizeStart", null);
|
|
29393
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29394
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
29395
|
+
], resizeHandler.prototype, "onHandleResize", null);
|
|
29396
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29449
29397
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
29450
|
-
], resizeHandler);
|
|
29398
|
+
], resizeHandler.prototype, "onHandleResizeEnd", null);
|
|
29451
29399
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('resizeHandler', resizeHandler);
|
|
29452
29400
|
|
|
29453
29401
|
|
|
@@ -34630,7 +34578,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
34630
34578
|
* ```
|
|
34631
34579
|
* @packageDocumentation
|
|
34632
34580
|
* @module constants
|
|
34633
|
-
*/ const APP_VERSION = "4.7.
|
|
34581
|
+
*/ const APP_VERSION = "4.7.7";
|
|
34634
34582
|
// prettier-ignore
|
|
34635
34583
|
const ES = "es2015";
|
|
34636
34584
|
const IS_ES_MODERN = true;
|