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/es2021.en/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
|
*/
|
|
@@ -469,7 +469,7 @@ module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 24 24\">
|
|
|
469
469
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
|
|
470
470
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
|
|
471
471
|
/* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69364);
|
|
472
|
-
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
472
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
473
473
|
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68616);
|
|
474
474
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23211);
|
|
475
475
|
/* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45664);
|
|
@@ -598,7 +598,7 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_11__
|
|
|
598
598
|
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)(':rebuildToolbar')
|
|
599
599
|
], ViewWithToolbar.prototype, "buildToolbar", null);
|
|
600
600
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
601
|
-
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__
|
|
601
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__.autobind
|
|
602
602
|
], ViewWithToolbar.prototype, "beforeToolbarBuild", null);
|
|
603
603
|
|
|
604
604
|
|
|
@@ -6841,7 +6841,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
6841
6841
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
|
|
6842
6842
|
/* harmony import */ var jodit_core_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91231);
|
|
6843
6843
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81937);
|
|
6844
|
-
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
6844
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
|
|
6845
6845
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65946);
|
|
6846
6846
|
/* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(33201);
|
|
6847
6847
|
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5266);
|
|
@@ -7007,7 +7007,7 @@ class Ajax {
|
|
|
7007
7007
|
}
|
|
7008
7008
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(Ajax, "log", []);
|
|
7009
7009
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
7010
|
-
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_4__
|
|
7010
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_4__.autobind
|
|
7011
7011
|
], Ajax.prototype, "destruct", null);
|
|
7012
7012
|
|
|
7013
7013
|
|
|
@@ -7154,12 +7154,10 @@ class Ajax {
|
|
|
7154
7154
|
/* harmony export */ "default": function() { return /* binding */ DataProvider; }
|
|
7155
7155
|
/* harmony export */ });
|
|
7156
7156
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
|
|
7157
|
-
/* harmony import */ var
|
|
7158
|
-
/* harmony import */ var
|
|
7159
|
-
/* harmony import */ var
|
|
7160
|
-
/* harmony import */ var
|
|
7161
|
-
/* harmony import */ var jodit_core_request__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(73714);
|
|
7162
|
-
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(58664);
|
|
7157
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81937);
|
|
7158
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65946);
|
|
7159
|
+
/* harmony import */ var jodit_core_request__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(73714);
|
|
7160
|
+
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(58664);
|
|
7163
7161
|
/*!
|
|
7164
7162
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7165
7163
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7171,8 +7169,6 @@ class Ajax {
|
|
|
7171
7169
|
|
|
7172
7170
|
|
|
7173
7171
|
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
7172
|
const DEFAULT_SOURCE_NAME = 'default';
|
|
7177
7173
|
const possibleRules = new Set([
|
|
7178
7174
|
'allowFiles',
|
|
@@ -7202,13 +7198,13 @@ class DataProvider {
|
|
|
7202
7198
|
ajax?.abort();
|
|
7203
7199
|
instances.delete(name);
|
|
7204
7200
|
}
|
|
7205
|
-
const opts = (0,
|
|
7201
|
+
const opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)({
|
|
7206
7202
|
onProgress: this.progressHandler
|
|
7207
7203
|
}, this.o.ajax));
|
|
7208
7204
|
if (opts.prepareData) {
|
|
7209
7205
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
7210
7206
|
}
|
|
7211
|
-
const ajax = new
|
|
7207
|
+
const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_3__.Ajax(opts);
|
|
7212
7208
|
instances.set(name, ajax);
|
|
7213
7209
|
const promise = ajax.send();
|
|
7214
7210
|
promise.finally(()=>{
|
|
@@ -7237,7 +7233,7 @@ class DataProvider {
|
|
|
7237
7233
|
if (this.o.permissions.url) {
|
|
7238
7234
|
return this.get('permissions').then((resp)=>{
|
|
7239
7235
|
if (this.parent.isInDestruct) {
|
|
7240
|
-
throw (0,
|
|
7236
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.abort)();
|
|
7241
7237
|
}
|
|
7242
7238
|
let process = this.o.permissions.process;
|
|
7243
7239
|
if (!process) {
|
|
@@ -7257,9 +7253,9 @@ class DataProvider {
|
|
|
7257
7253
|
}
|
|
7258
7254
|
canI(action) {
|
|
7259
7255
|
const rule = 'allow' + action;
|
|
7260
|
-
if (!
|
|
7256
|
+
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
7261
7257
|
if (!possibleRules.has(rule)) {
|
|
7262
|
-
throw (0,
|
|
7258
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)('Wrong action ' + action);
|
|
7263
7259
|
}
|
|
7264
7260
|
}
|
|
7265
7261
|
const presetValue = this.o.permissionsPresets[rule];
|
|
@@ -7308,12 +7304,12 @@ class DataProvider {
|
|
|
7308
7304
|
sources.forEach((source)=>{
|
|
7309
7305
|
if (source.files && source.files.length) {
|
|
7310
7306
|
const { sort } = this.o;
|
|
7311
|
-
if ((0,
|
|
7307
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(sort) && mods.sortBy) {
|
|
7312
7308
|
source.files.sort((a, b)=>sort(a, b, mods.sortBy));
|
|
7313
7309
|
}
|
|
7314
7310
|
source.files.forEach((item)=>{
|
|
7315
7311
|
if (inFilter(item) && canBeFile(item)) {
|
|
7316
|
-
elements.push(
|
|
7312
|
+
elements.push(jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_4__.FileBrowserItem.create({
|
|
7317
7313
|
...item,
|
|
7318
7314
|
sourceName: source.name,
|
|
7319
7315
|
source
|
|
@@ -7325,7 +7321,7 @@ class DataProvider {
|
|
|
7325
7321
|
return elements;
|
|
7326
7322
|
}
|
|
7327
7323
|
async tree(path, source) {
|
|
7328
|
-
path = (0,
|
|
7324
|
+
path = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.normalizeRelativePath)(path);
|
|
7329
7325
|
if (!this.o.folder) {
|
|
7330
7326
|
return Promise.reject(Error('Set Folder Api options'));
|
|
7331
7327
|
}
|
|
@@ -7346,12 +7342,12 @@ class DataProvider {
|
|
|
7346
7342
|
/**
|
|
7347
7343
|
* Get path by url. You can use this method in another modules
|
|
7348
7344
|
*/ getPathByUrl(url) {
|
|
7349
|
-
(0,
|
|
7345
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.set)('options.getLocalFileByUrl.data.url', url, this);
|
|
7350
7346
|
return this.get('getLocalFileByUrl').then((resp)=>{
|
|
7351
7347
|
if (this.isSuccess(resp)) {
|
|
7352
7348
|
return resp.data;
|
|
7353
7349
|
}
|
|
7354
|
-
throw (0,
|
|
7350
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)(this.getMessage(resp));
|
|
7355
7351
|
});
|
|
7356
7352
|
}
|
|
7357
7353
|
/**
|
|
@@ -7363,7 +7359,7 @@ class DataProvider {
|
|
|
7363
7359
|
*/ createFolder(name, path, source) {
|
|
7364
7360
|
const { create } = this.o;
|
|
7365
7361
|
if (!create) {
|
|
7366
|
-
throw (0,
|
|
7362
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)('Set Create api options');
|
|
7367
7363
|
}
|
|
7368
7364
|
create.data.source = source;
|
|
7369
7365
|
create.data.path = path;
|
|
@@ -7372,7 +7368,7 @@ class DataProvider {
|
|
|
7372
7368
|
if (this.isSuccess(resp)) {
|
|
7373
7369
|
return true;
|
|
7374
7370
|
}
|
|
7375
|
-
throw (0,
|
|
7371
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)(this.getMessage(resp));
|
|
7376
7372
|
});
|
|
7377
7373
|
}
|
|
7378
7374
|
/**
|
|
@@ -7384,7 +7380,7 @@ class DataProvider {
|
|
|
7384
7380
|
const mode = isFile ? 'fileMove' : 'folderMove';
|
|
7385
7381
|
const option = this.options[mode];
|
|
7386
7382
|
if (!option) {
|
|
7387
|
-
throw (0,
|
|
7383
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)('Set Move api options');
|
|
7388
7384
|
}
|
|
7389
7385
|
option.data.from = filepath;
|
|
7390
7386
|
option.data.path = path;
|
|
@@ -7393,7 +7389,7 @@ class DataProvider {
|
|
|
7393
7389
|
if (this.isSuccess(resp)) {
|
|
7394
7390
|
return true;
|
|
7395
7391
|
}
|
|
7396
|
-
throw (0,
|
|
7392
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)(this.getMessage(resp));
|
|
7397
7393
|
});
|
|
7398
7394
|
}
|
|
7399
7395
|
/**
|
|
@@ -7405,7 +7401,7 @@ class DataProvider {
|
|
|
7405
7401
|
*/ remove(action, path, file, source) {
|
|
7406
7402
|
const fr = this.o[action];
|
|
7407
7403
|
if (!fr) {
|
|
7408
|
-
throw (0,
|
|
7404
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)(`Set "${action}" api options`);
|
|
7409
7405
|
}
|
|
7410
7406
|
fr.data.path = path;
|
|
7411
7407
|
fr.data.name = file;
|
|
@@ -7445,7 +7441,7 @@ class DataProvider {
|
|
|
7445
7441
|
*/ rename(action, path, name, newname, source) {
|
|
7446
7442
|
const fr = this.o[action];
|
|
7447
7443
|
if (!fr) {
|
|
7448
|
-
throw (0,
|
|
7444
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)(`Set "${action}" api options`);
|
|
7449
7445
|
}
|
|
7450
7446
|
fr.data.path = path;
|
|
7451
7447
|
fr.data.name = name;
|
|
@@ -7525,9 +7521,6 @@ class DataProvider {
|
|
|
7525
7521
|
}
|
|
7526
7522
|
}
|
|
7527
7523
|
|
|
7528
|
-
DataProvider = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
7529
|
-
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_3__.autobind
|
|
7530
|
-
], DataProvider);
|
|
7531
7524
|
|
|
7532
7525
|
|
|
7533
7526
|
/***/ }),
|
|
@@ -8049,10 +8042,11 @@ module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 179
|
|
|
8049
8042
|
*/ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true)=>{
|
|
8050
8043
|
let currentImage;
|
|
8051
8044
|
const tabs = [];
|
|
8052
|
-
|
|
8045
|
+
const options = editor.o.uploader;
|
|
8046
|
+
if (callbacks.upload && (options.url || options.insertImageAsBase64URI || options.customUploadFunction)) {
|
|
8053
8047
|
const dragBox = editor.c.fromHTML('<div class="jodit-drag-and-drop__file-box">' + `<strong>${editor.i18n(isImage ? 'Drop image' : 'Drop file')}</strong>` + `<span><br>${editor.i18n('or click')}</span>` + `<input type="file" accept="${isImage ? 'image/*' : '*'}" tabindex="-1" dir="auto" multiple=""/>` + '</div>');
|
|
8054
8048
|
editor.uploader.bind(dragBox, (resp)=>{
|
|
8055
|
-
const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(callbacks.upload) ? callbacks.upload :
|
|
8049
|
+
const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(callbacks.upload) ? callbacks.upload : options.defaultHandlerSuccess;
|
|
8056
8050
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) {
|
|
8057
8051
|
handler.call(editor, resp);
|
|
8058
8052
|
}
|
|
@@ -18022,7 +18016,9 @@ const map = {};
|
|
|
18022
18016
|
|
|
18023
18017
|
|
|
18024
18018
|
|
|
18025
|
-
|
|
18019
|
+
/**
|
|
18020
|
+
* Calculate sizes for editor workspace and handle setHeight and setWidth events
|
|
18021
|
+
*/ class size extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_6__.Plugin {
|
|
18026
18022
|
afterInit(editor) {
|
|
18027
18023
|
editor.e.on('setHeight.size', this.__setHeight).on('setWidth.size', this.__setWidth).on('afterInit.size changePlace.size', this.__initialize, {
|
|
18028
18024
|
top: true
|
|
@@ -18156,10 +18152,13 @@ class size extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_6__.Plugin
|
|
|
18156
18152
|
], size.prototype, "__initialize", null);
|
|
18157
18153
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
18158
18154
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
18159
|
-
], size.prototype, "
|
|
18160
|
-
|
|
18155
|
+
], size.prototype, "__setHeight", null);
|
|
18156
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
18161
18157
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
18162
|
-
], size);
|
|
18158
|
+
], size.prototype, "__setWidth", null);
|
|
18159
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
18160
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
18161
|
+
], size.prototype, "__resizeWorkspaceImd", null);
|
|
18163
18162
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('size', size);
|
|
18164
18163
|
|
|
18165
18164
|
|
|
@@ -19712,18 +19711,56 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
|
|
|
19712
19711
|
|
|
19713
19712
|
"use strict";
|
|
19714
19713
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19715
|
-
/* harmony export */ autobind: function() { return /*
|
|
19714
|
+
/* harmony export */ autobind: function() { return /* binding */ autobind; }
|
|
19716
19715
|
/* harmony export */ });
|
|
19717
|
-
/* harmony import */ var
|
|
19716
|
+
/* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91565);
|
|
19718
19717
|
/*!
|
|
19719
19718
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
19720
19719
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
19721
19720
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
19722
|
-
*/
|
|
19721
|
+
*/
|
|
19722
|
+
/**
|
|
19723
19723
|
* [[include:core/decorators/autobind/README.md]]
|
|
19724
19724
|
* @packageDocumentation
|
|
19725
19725
|
* @module decorators/autobind
|
|
19726
|
-
*/
|
|
19726
|
+
*/ /**
|
|
19727
|
+
* Decorator that automatically binds a method to its class instance.
|
|
19728
|
+
* This is useful when passing methods as callbacks to preserve the correct `this` context.
|
|
19729
|
+
*
|
|
19730
|
+
* @example
|
|
19731
|
+
* ```typescript
|
|
19732
|
+
* class MyComponent {
|
|
19733
|
+
* @autobind
|
|
19734
|
+
* handleClick() {
|
|
19735
|
+
* console.log(this); // Always refers to MyComponent instance
|
|
19736
|
+
* }
|
|
19737
|
+
* }
|
|
19738
|
+
*
|
|
19739
|
+
* const component = new MyComponent();
|
|
19740
|
+
* const button = document.createElement('button');
|
|
19741
|
+
* button.addEventListener('click', component.handleClick); // `this` is correctly bound
|
|
19742
|
+
* ```
|
|
19743
|
+
*/ function autobind(_target, propertyKey, descriptor) {
|
|
19744
|
+
if (!(0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_0__.isFunction)(descriptor.value)) {
|
|
19745
|
+
throw new TypeError(`@autobind can only be applied to methods, but "${propertyKey}" is not a function`);
|
|
19746
|
+
}
|
|
19747
|
+
const originalMethod = descriptor.value;
|
|
19748
|
+
return {
|
|
19749
|
+
configurable: true,
|
|
19750
|
+
get () {
|
|
19751
|
+
// Create a bound version of the method and cache it on the instance
|
|
19752
|
+
const boundMethod = originalMethod.bind(this);
|
|
19753
|
+
// Define the bound method as a property on the instance
|
|
19754
|
+
// This ensures the same bound function is returned on subsequent accesses
|
|
19755
|
+
Object.defineProperty(this, propertyKey, {
|
|
19756
|
+
value: boundMethod,
|
|
19757
|
+
configurable: true,
|
|
19758
|
+
writable: true
|
|
19759
|
+
});
|
|
19760
|
+
return boundMethod;
|
|
19761
|
+
}
|
|
19762
|
+
};
|
|
19763
|
+
}
|
|
19727
19764
|
|
|
19728
19765
|
|
|
19729
19766
|
/***/ }),
|
|
@@ -21183,100 +21220,6 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('xpath', xpath);
|
|
|
21183
21220
|
}
|
|
21184
21221
|
|
|
21185
21222
|
|
|
21186
|
-
/***/ }),
|
|
21187
|
-
|
|
21188
|
-
/***/ 52201:
|
|
21189
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
21190
|
-
|
|
21191
|
-
"use strict";
|
|
21192
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21193
|
-
/* harmony export */ "default": function() { return /* binding */ autobind; }
|
|
21194
|
-
/* harmony export */ });
|
|
21195
|
-
/* unused harmony exports boundMethod, boundClass */
|
|
21196
|
-
function _typeof(obj) {
|
|
21197
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
21198
|
-
_typeof = function _typeof(obj) {
|
|
21199
|
-
return typeof obj;
|
|
21200
|
-
};
|
|
21201
|
-
} else {
|
|
21202
|
-
_typeof = function _typeof(obj) {
|
|
21203
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
21204
|
-
};
|
|
21205
|
-
}
|
|
21206
|
-
return _typeof(obj);
|
|
21207
|
-
}
|
|
21208
|
-
/**
|
|
21209
|
-
* Return a descriptor removing the value and returning a getter
|
|
21210
|
-
* The getter will return a .bind version of the function
|
|
21211
|
-
* and memoize the result against a symbol on the instance
|
|
21212
|
-
*/ function boundMethod(target, key, descriptor) {
|
|
21213
|
-
var fn = descriptor.value;
|
|
21214
|
-
if (typeof fn !== 'function') {
|
|
21215
|
-
throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(_typeof(fn)));
|
|
21216
|
-
} // In IE11 calling Object.defineProperty has a side-effect of evaluating the
|
|
21217
|
-
// getter for the property which is being replaced. This causes infinite
|
|
21218
|
-
// recursion and an "Out of stack space" error.
|
|
21219
|
-
var definingProperty = false;
|
|
21220
|
-
return {
|
|
21221
|
-
configurable: true,
|
|
21222
|
-
get: function get() {
|
|
21223
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
21224
|
-
if (definingProperty || this === target.prototype || this.hasOwnProperty(key) || typeof fn !== 'function') {
|
|
21225
|
-
return fn;
|
|
21226
|
-
}
|
|
21227
|
-
var boundFn = fn.bind(this);
|
|
21228
|
-
definingProperty = true;
|
|
21229
|
-
Object.defineProperty(this, key, {
|
|
21230
|
-
configurable: true,
|
|
21231
|
-
get: function get() {
|
|
21232
|
-
return boundFn;
|
|
21233
|
-
},
|
|
21234
|
-
set: function set(value) {
|
|
21235
|
-
fn = value;
|
|
21236
|
-
delete this[key];
|
|
21237
|
-
}
|
|
21238
|
-
});
|
|
21239
|
-
definingProperty = false;
|
|
21240
|
-
return boundFn;
|
|
21241
|
-
},
|
|
21242
|
-
set: function set(value) {
|
|
21243
|
-
fn = value;
|
|
21244
|
-
}
|
|
21245
|
-
};
|
|
21246
|
-
}
|
|
21247
|
-
/**
|
|
21248
|
-
* Use boundMethod to bind all methods on the target.prototype
|
|
21249
|
-
*/ function boundClass(target) {
|
|
21250
|
-
// (Using reflect to get all keys including symbols)
|
|
21251
|
-
var keys; // Use Reflect if exists
|
|
21252
|
-
if (typeof Reflect !== 'undefined' && typeof Reflect.ownKeys === 'function') {
|
|
21253
|
-
keys = Reflect.ownKeys(target.prototype);
|
|
21254
|
-
} else {
|
|
21255
|
-
keys = Object.getOwnPropertyNames(target.prototype); // Use symbols if support is provided
|
|
21256
|
-
if (typeof Object.getOwnPropertySymbols === 'function') {
|
|
21257
|
-
keys = keys.concat(Object.getOwnPropertySymbols(target.prototype));
|
|
21258
|
-
}
|
|
21259
|
-
}
|
|
21260
|
-
keys.forEach(function(key) {
|
|
21261
|
-
// Ignore special case target method
|
|
21262
|
-
if (key === 'constructor') {
|
|
21263
|
-
return;
|
|
21264
|
-
}
|
|
21265
|
-
var descriptor = Object.getOwnPropertyDescriptor(target.prototype, key); // Only methods need binding
|
|
21266
|
-
if (typeof descriptor.value === 'function') {
|
|
21267
|
-
Object.defineProperty(target.prototype, key, boundMethod(target, key, descriptor));
|
|
21268
|
-
}
|
|
21269
|
-
});
|
|
21270
|
-
return target;
|
|
21271
|
-
}
|
|
21272
|
-
function autobind() {
|
|
21273
|
-
if (arguments.length === 1) {
|
|
21274
|
-
return boundClass.apply(void 0, arguments);
|
|
21275
|
-
}
|
|
21276
|
-
return boundMethod.apply(void 0, arguments);
|
|
21277
|
-
}
|
|
21278
|
-
|
|
21279
|
-
|
|
21280
21223
|
/***/ }),
|
|
21281
21224
|
|
|
21282
21225
|
/***/ 52433:
|
|
@@ -27935,9 +27878,15 @@ class resizeHandler extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__.Plugi
|
|
|
27935
27878
|
/** @override **/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(resizeHandler, "requires", [
|
|
27936
27879
|
'size'
|
|
27937
27880
|
]);
|
|
27938
|
-
|
|
27881
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27882
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
27883
|
+
], resizeHandler.prototype, "onHandleResizeStart", null);
|
|
27884
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27885
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
27886
|
+
], resizeHandler.prototype, "onHandleResize", null);
|
|
27887
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27939
27888
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
27940
|
-
], resizeHandler);
|
|
27889
|
+
], resizeHandler.prototype, "onHandleResizeEnd", null);
|
|
27941
27890
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('resizeHandler', resizeHandler);
|
|
27942
27891
|
|
|
27943
27892
|
|
|
@@ -31514,24 +31463,27 @@ function ConfigFlatten(obj) {
|
|
|
31514
31463
|
const ajaxInstances = new WeakMap();
|
|
31515
31464
|
function send(uploader, data) {
|
|
31516
31465
|
const requestData = (0,jodit_modules_uploader_helpers_build_data__WEBPACK_IMPORTED_MODULE_2__.buildData)(uploader, data);
|
|
31517
|
-
const
|
|
31466
|
+
const showProgress = (progress)=>{
|
|
31467
|
+
uploader.j.progressbar.show().progress(progress);
|
|
31468
|
+
if (progress >= 100) {
|
|
31469
|
+
uploader.j.progressbar.hide();
|
|
31470
|
+
}
|
|
31471
|
+
};
|
|
31472
|
+
let sendData = (request, showProgress)=>{
|
|
31518
31473
|
const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_1__.Ajax({
|
|
31519
31474
|
xhr: ()=>{
|
|
31520
31475
|
const xhr = new XMLHttpRequest();
|
|
31521
31476
|
if (uploader.j.ow.FormData !== undefined && xhr.upload) {
|
|
31522
|
-
|
|
31477
|
+
showProgress(10);
|
|
31523
31478
|
xhr.upload.addEventListener('progress', (evt)=>{
|
|
31524
31479
|
if (evt.lengthComputable) {
|
|
31525
31480
|
let percentComplete = evt.loaded / evt.total;
|
|
31526
31481
|
percentComplete *= 100;
|
|
31527
|
-
|
|
31528
|
-
if (percentComplete >= 100) {
|
|
31529
|
-
uploader.j.progressbar.hide();
|
|
31530
|
-
}
|
|
31482
|
+
showProgress(percentComplete);
|
|
31531
31483
|
}
|
|
31532
31484
|
}, false);
|
|
31533
31485
|
} else {
|
|
31534
|
-
|
|
31486
|
+
showProgress(100);
|
|
31535
31487
|
}
|
|
31536
31488
|
return xhr;
|
|
31537
31489
|
},
|
|
@@ -31564,12 +31516,15 @@ function send(uploader, data) {
|
|
|
31564
31516
|
instances?.delete(ajax);
|
|
31565
31517
|
});
|
|
31566
31518
|
};
|
|
31519
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(uploader.o.customUploadFunction)) {
|
|
31520
|
+
sendData = uploader.o.customUploadFunction;
|
|
31521
|
+
}
|
|
31567
31522
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isPromise)(requestData)) {
|
|
31568
|
-
return requestData.then(sendData).catch((error)=>{
|
|
31523
|
+
return requestData.then((data)=>sendData(data, showProgress)).catch((error)=>{
|
|
31569
31524
|
uploader.o.error.call(uploader, error);
|
|
31570
31525
|
});
|
|
31571
31526
|
}
|
|
31572
|
-
return sendData(requestData);
|
|
31527
|
+
return sendData(requestData, showProgress);
|
|
31573
31528
|
}
|
|
31574
31529
|
|
|
31575
31530
|
|
|
@@ -33052,7 +33007,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
33052
33007
|
* ```
|
|
33053
33008
|
* @packageDocumentation
|
|
33054
33009
|
* @module constants
|
|
33055
|
-
*/ const APP_VERSION = "4.7.
|
|
33010
|
+
*/ const APP_VERSION = "4.7.6";
|
|
33056
33011
|
// prettier-ignore
|
|
33057
33012
|
const ES = "es2021";
|
|
33058
33013
|
const IS_ES_MODERN = true;
|