jodit 4.9.13 → 4.9.14

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +13 -13
  4. package/es2015/jodit.js +172 -77
  5. package/es2015/jodit.min.js +5 -5
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +5 -5
  13. package/es2018/jodit.min.js +5 -5
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +6 -6
  18. package/es2021/jodit.js +172 -77
  19. package/es2021/jodit.min.js +6 -6
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +7 -7
  28. package/es2021.en/jodit.js +172 -77
  29. package/es2021.en/jodit.min.js +6 -6
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +215 -117
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/core/constants.js +1 -1
  51. package/esm/core/helpers/utils/utils.d.ts +10 -0
  52. package/esm/core/helpers/utils/utils.js +12 -0
  53. package/esm/modules/file-browser/data-provider.d.ts +4 -4
  54. package/esm/modules/file-browser/data-provider.js +83 -14
  55. package/esm/modules/image-editor/image-editor.js +13 -2
  56. package/package.json +1 -1
  57. package/types/core/helpers/utils/utils.d.ts +10 -0
  58. package/types/modules/file-browser/data-provider.d.ts +4 -4
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.9.13
4
+ * Version: v4.9.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -8991,11 +8991,17 @@ var Ajax = /*#__PURE__*/ function() {
8991
8991
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
8992
8992
  /* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41411);
8993
8993
  /* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(15366);
8994
- /* harmony import */ var _swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3233);
8995
- /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(81937);
8996
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65946);
8997
- /* harmony import */ var jodit_core_request__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73714);
8998
- /* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(58664);
8994
+ /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
8995
+ /* harmony import */ var _swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3233);
8996
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(81937);
8997
+ /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
8998
+ /* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(91565);
8999
+ /* harmony import */ var jodit_core_helpers_normalize_normalize_relative_path__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(96340);
9000
+ /* harmony import */ var jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(77483);
9001
+ /* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(33201);
9002
+ /* harmony import */ var jodit_core_helpers_utils_set__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(52144);
9003
+ /* harmony import */ var jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(17338);
9004
+ /* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(58664);
8999
9005
  /*!
9000
9006
  * Jodit Editor (https://xdsoft.net/jodit/)
9001
9007
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -9013,6 +9019,12 @@ var Ajax = /*#__PURE__*/ function() {
9013
9019
 
9014
9020
 
9015
9021
 
9022
+
9023
+
9024
+
9025
+
9026
+
9027
+
9016
9028
  var DEFAULT_SOURCE_NAME = 'default';
9017
9029
  var possibleRules = new Set([
9018
9030
  'allowFiles',
@@ -9063,13 +9075,13 @@ var DataProvider = /*#__PURE__*/ function() {
9063
9075
  ajax === null || ajax === void 0 ? void 0 : ajax.abort();
9064
9076
  instances.delete(name);
9065
9077
  }
9066
- 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)({
9078
+ var opts = (0,jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_12__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_12__.ConfigProto)({
9067
9079
  onProgress: this.progressHandler
9068
9080
  }, this.o.ajax));
9069
9081
  if (opts.prepareData) {
9070
9082
  opts.data = opts.prepareData.call(this, opts.data);
9071
9083
  }
9072
- var ajax1 = new jodit_core_request__WEBPACK_IMPORTED_MODULE_9__.Ajax(opts);
9084
+ var ajax1 = new jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_15__.Ajax(opts);
9073
9085
  instances.set(name, ajax1);
9074
9086
  var promise = ajax1.send();
9075
9087
  promise.finally(function() {
@@ -9102,7 +9114,7 @@ var DataProvider = /*#__PURE__*/ function() {
9102
9114
  */ function permissions(path, source) {
9103
9115
  return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function() {
9104
9116
  var _this;
9105
- return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_6__._)(this, function(_state) {
9117
+ return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_7__._)(this, function(_state) {
9106
9118
  _this = this;
9107
9119
  if (!this.o.permissions) {
9108
9120
  return [
@@ -9117,7 +9129,7 @@ var DataProvider = /*#__PURE__*/ function() {
9117
9129
  2,
9118
9130
  this.get('permissions').then(function(resp) {
9119
9131
  if (_this.parent.isInDestruct) {
9120
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.abort)();
9132
+ throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_13__.abort)();
9121
9133
  }
9122
9134
  var process = _this.o.permissions.process;
9123
9135
  if (!process) {
@@ -9146,9 +9158,9 @@ var DataProvider = /*#__PURE__*/ function() {
9146
9158
  key: "canI",
9147
9159
  value: function canI(action) {
9148
9160
  var rule = 'allow' + action;
9149
- if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.IS_PROD) {
9161
+ if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_8__.IS_PROD) {
9150
9162
  if (!possibleRules.has(rule)) {
9151
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)('Wrong action ' + action);
9163
+ throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_13__.error)('Wrong action ' + action);
9152
9164
  }
9153
9165
  }
9154
9166
  var presetValue = this.o.permissionsPresets[rule];
@@ -9182,22 +9194,22 @@ var DataProvider = /*#__PURE__*/ function() {
9182
9194
  }
9183
9195
  },
9184
9196
  {
9185
- /**
9197
+ key: "items",
9198
+ value: /**
9186
9199
  * Load items list by path and source
9187
- */ key: "items",
9188
- value: function items(path, source) {
9200
+ */ function items(path, source) {
9189
9201
  var _this = this;
9190
9202
  var mods = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
9191
9203
  return this.__items(path, source, mods, function(resp) {
9192
- return _this.generateItemsList(resp.data.sources, mods);
9204
+ return _this.__generateItemsList(resp.data.sources, mods);
9193
9205
  });
9194
9206
  }
9195
9207
  },
9196
9208
  {
9197
- /**
9209
+ key: "itemsEx",
9210
+ value: /**
9198
9211
  * Load items list by path and source
9199
- */ key: "itemsEx",
9200
- value: function itemsEx(path, source) {
9212
+ */ function itemsEx(path, source) {
9201
9213
  var _this = this;
9202
9214
  var mods = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
9203
9215
  var calcTotal = function calcTotal(sources) {
@@ -9207,15 +9219,15 @@ var DataProvider = /*#__PURE__*/ function() {
9207
9219
  };
9208
9220
  return this.__items(path, source, mods, function(resp) {
9209
9221
  return {
9210
- items: _this.generateItemsList(resp.data.sources, mods),
9222
+ items: _this.__generateItemsList(resp.data.sources, mods),
9211
9223
  loadedTotal: calcTotal(resp.data.sources)
9212
9224
  };
9213
9225
  });
9214
9226
  }
9215
9227
  },
9216
9228
  {
9217
- key: "generateItemsList",
9218
- value: function generateItemsList(sources) {
9229
+ key: "__generateItemsList",
9230
+ value: function __generateItemsList(sources) {
9219
9231
  var _this = this;
9220
9232
  var mods = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
9221
9233
  var elements = [];
@@ -9229,14 +9241,14 @@ var DataProvider = /*#__PURE__*/ function() {
9229
9241
  sources.forEach(function(source) {
9230
9242
  if (source.files && source.files.length) {
9231
9243
  var sort = _this.o.sort;
9232
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.isFunction)(sort) && mods.sortBy) {
9244
+ if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_10__.isFunction)(sort) && mods.sortBy) {
9233
9245
  source.files.sort(function(a, b) {
9234
9246
  return sort(a, b, mods.sortBy);
9235
9247
  });
9236
9248
  }
9237
9249
  source.files.forEach(function(item) {
9238
9250
  if (inFilter(item) && canBeFile(item)) {
9239
- 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), {
9251
+ elements.push(jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_16__.FileBrowserItem.create((0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_5__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_4__._)({}, item), {
9240
9252
  sourceName: source.name,
9241
9253
  source: source
9242
9254
  })));
@@ -9252,11 +9264,11 @@ var DataProvider = /*#__PURE__*/ function() {
9252
9264
  value: function tree(path, source) {
9253
9265
  return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function() {
9254
9266
  var _this;
9255
- return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_6__._)(this, function(_state) {
9267
+ return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_7__._)(this, function(_state) {
9256
9268
  switch(_state.label){
9257
9269
  case 0:
9258
9270
  _this = this;
9259
- path = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.normalizeRelativePath)(path);
9271
+ path = (0,jodit_core_helpers_normalize_normalize_relative_path__WEBPACK_IMPORTED_MODULE_11__.normalizeRelativePath)(path);
9260
9272
  if (!this.o.folder) {
9261
9273
  return [
9262
9274
  2,
@@ -9290,33 +9302,33 @@ var DataProvider = /*#__PURE__*/ function() {
9290
9302
  }
9291
9303
  },
9292
9304
  {
9293
- /**
9305
+ key: "getPathByUrl",
9306
+ value: /**
9294
9307
  * Get path by url. You can use this method in another modules
9295
- */ key: "getPathByUrl",
9296
- value: function getPathByUrl(url) {
9308
+ */ function getPathByUrl(url) {
9297
9309
  var _this = this;
9298
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.set)('options.getLocalFileByUrl.data.url', url, this);
9310
+ (0,jodit_core_helpers_utils_set__WEBPACK_IMPORTED_MODULE_14__.set)('options.getLocalFileByUrl.data.url', url, this);
9299
9311
  return this.get('getLocalFileByUrl').then(function(resp) {
9300
9312
  if (_this.isSuccess(resp)) {
9301
9313
  return resp.data;
9302
9314
  }
9303
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)(_this.getMessage(resp));
9315
+ throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_13__.error)(_this.getMessage(resp));
9304
9316
  });
9305
9317
  }
9306
9318
  },
9307
9319
  {
9308
- /**
9320
+ key: "createFolder",
9321
+ value: /**
9309
9322
  * Create a directory on the server
9310
9323
  *
9311
9324
  * @param name - Name the new folder
9312
9325
  * @param path - Relative directory in which you want create a folder
9313
9326
  * @param source - Server source key
9314
- */ key: "createFolder",
9315
- value: function createFolder(name, path, source) {
9327
+ */ function createFolder(name, path, source) {
9316
9328
  var _this = this;
9317
9329
  var create = this.o.create;
9318
9330
  if (!create) {
9319
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)('Set Create api options');
9331
+ throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_13__.error)('Set Create api options');
9320
9332
  }
9321
9333
  create.data.source = source;
9322
9334
  create.data.path = path;
@@ -9325,23 +9337,23 @@ var DataProvider = /*#__PURE__*/ function() {
9325
9337
  if (_this.isSuccess(resp)) {
9326
9338
  return true;
9327
9339
  }
9328
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)(_this.getMessage(resp));
9340
+ throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_13__.error)(_this.getMessage(resp));
9329
9341
  });
9330
9342
  }
9331
9343
  },
9332
9344
  {
9333
- /**
9345
+ key: "move",
9346
+ value: /**
9334
9347
  * Move a file / directory on the server
9335
9348
  *
9336
9349
  * @param filepath - The relative path to the file / folder source
9337
9350
  * @param path - Relative to the directory where you want to move the file / folder
9338
- */ key: "move",
9339
- value: function move(filepath, path, source, isFile) {
9351
+ */ function move(filepath, path, source, isFile) {
9340
9352
  var _this = this;
9341
9353
  var mode = isFile ? 'fileMove' : 'folderMove';
9342
9354
  var option = this.options[mode];
9343
9355
  if (!option) {
9344
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)('Set Move api options');
9356
+ throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_13__.error)('Set Move api options');
9345
9357
  }
9346
9358
  option.data.from = filepath;
9347
9359
  option.data.path = path;
@@ -9350,23 +9362,23 @@ var DataProvider = /*#__PURE__*/ function() {
9350
9362
  if (_this.isSuccess(resp)) {
9351
9363
  return true;
9352
9364
  }
9353
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)(_this.getMessage(resp));
9365
+ throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_13__.error)(_this.getMessage(resp));
9354
9366
  });
9355
9367
  }
9356
9368
  },
9357
9369
  {
9358
- key: "remove",
9370
+ key: "__remove",
9359
9371
  value: /**
9360
9372
  * Deleting item
9361
9373
  *
9362
9374
  * @param path - Relative path
9363
9375
  * @param file - The filename
9364
9376
  * @param source - Source
9365
- */ function remove(action, path, file, source) {
9377
+ */ function __remove(action, path, file, source) {
9366
9378
  var _this = this;
9367
9379
  var fr = this.o[action];
9368
9380
  if (!fr) {
9369
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)('Set "'.concat(action, '" api options'));
9381
+ throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_13__.error)('Set "'.concat(action, '" api options'));
9370
9382
  }
9371
9383
  fr.data.path = path;
9372
9384
  fr.data.name = file;
@@ -9380,31 +9392,31 @@ var DataProvider = /*#__PURE__*/ function() {
9380
9392
  }
9381
9393
  },
9382
9394
  {
9383
- /**
9395
+ key: "fileRemove",
9396
+ value: /**
9384
9397
  * Deleting a file
9385
9398
  *
9386
9399
  * @param path - Relative path
9387
9400
  * @param file - The filename
9388
9401
  * @param source - Source
9389
- */ key: "fileRemove",
9390
- value: function fileRemove(path, file, source) {
9391
- return this.remove('fileRemove', path, file, source);
9402
+ */ function fileRemove(path, file, source) {
9403
+ return this.__remove('fileRemove', path, file, source);
9392
9404
  }
9393
9405
  },
9394
9406
  {
9395
- /**
9407
+ key: "folderRemove",
9408
+ value: /**
9396
9409
  * Deleting a folder
9397
9410
  *
9398
9411
  * @param path - Relative path
9399
9412
  * @param file - The filename
9400
9413
  * @param source - Source
9401
- */ key: "folderRemove",
9402
- value: function folderRemove(path, file, source) {
9403
- return this.remove('folderRemove', path, file, source);
9414
+ */ function folderRemove(path, file, source) {
9415
+ return this.__remove('folderRemove', path, file, source);
9404
9416
  }
9405
9417
  },
9406
9418
  {
9407
- key: "rename",
9419
+ key: "__rename",
9408
9420
  value: /**
9409
9421
  * Rename action
9410
9422
  *
@@ -9412,11 +9424,11 @@ var DataProvider = /*#__PURE__*/ function() {
9412
9424
  * @param name - Old name
9413
9425
  * @param newname - New name
9414
9426
  * @param source - Source
9415
- */ function rename(action, path, name, newname, source) {
9427
+ */ function __rename(action, path, name, newname, source) {
9416
9428
  var _this = this;
9417
9429
  var fr = this.o[action];
9418
9430
  if (!fr) {
9419
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_8__.error)('Set "'.concat(action, '" api options'));
9431
+ throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_13__.error)('Set "'.concat(action, '" api options'));
9420
9432
  }
9421
9433
  fr.data.path = path;
9422
9434
  fr.data.name = name;
@@ -9431,24 +9443,24 @@ var DataProvider = /*#__PURE__*/ function() {
9431
9443
  }
9432
9444
  },
9433
9445
  {
9434
- /**
9446
+ key: "folderRename",
9447
+ value: /**
9435
9448
  * Rename folder
9436
- */ key: "folderRename",
9437
- value: function folderRename(path, name, newname, source) {
9438
- return this.rename('folderRename', path, name, newname, source);
9449
+ */ function folderRename(path, name, newname, source) {
9450
+ return this.__rename('folderRename', path, name, newname, source);
9439
9451
  }
9440
9452
  },
9441
9453
  {
9442
- /**
9454
+ key: "fileRename",
9455
+ value: /**
9443
9456
  * Rename file
9444
- */ key: "fileRename",
9445
- value: function fileRename(path, name, newname, source) {
9446
- return this.rename('fileRename', path, name, newname, source);
9457
+ */ function fileRename(path, name, newname, source) {
9458
+ return this.__rename('fileRename', path, name, newname, source);
9447
9459
  }
9448
9460
  },
9449
9461
  {
9450
- key: "changeImage",
9451
- value: function changeImage(type, path, source, name, newname, box) {
9462
+ key: "__changeImage",
9463
+ value: function __changeImage(type, path, source, name, newname, box) {
9452
9464
  if (!this.o[type]) {
9453
9465
  this.o[type] = {
9454
9466
  data: {}
@@ -9473,19 +9485,19 @@ var DataProvider = /*#__PURE__*/ function() {
9473
9485
  }
9474
9486
  },
9475
9487
  {
9476
- /**
9488
+ key: "crop",
9489
+ value: /**
9477
9490
  * Send command to server to crop image
9478
- */ key: "crop",
9479
- value: function crop(path, source, name, newname, box) {
9480
- return this.changeImage('crop', path, source, name, newname, box);
9491
+ */ function crop(path, source, name, newname, box) {
9492
+ return this.__changeImage('crop', path, source, name, newname, box);
9481
9493
  }
9482
9494
  },
9483
9495
  {
9484
- /**
9496
+ key: "resize",
9497
+ value: /**
9485
9498
  * Send command to server to resize image
9486
- */ key: "resize",
9487
- value: function resize(path, source, name, newname, box) {
9488
- return this.changeImage('resize', path, source, name, newname, box);
9499
+ */ function resize(path, source, name, newname, box) {
9500
+ return this.__changeImage('resize', path, source, name, newname, box);
9489
9501
  }
9490
9502
  },
9491
9503
  {
@@ -9513,6 +9525,60 @@ var DataProvider = /*#__PURE__*/ function() {
9513
9525
  return DataProvider;
9514
9526
  }();
9515
9527
 
9528
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9529
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9530
+ ], DataProvider.prototype, "onProgress", null);
9531
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9532
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9533
+ ], DataProvider.prototype, "permissions", null);
9534
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9535
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9536
+ ], DataProvider.prototype, "canI", null);
9537
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9538
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9539
+ ], DataProvider.prototype, "items", null);
9540
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9541
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9542
+ ], DataProvider.prototype, "itemsEx", null);
9543
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9544
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9545
+ ], DataProvider.prototype, "tree", null);
9546
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9547
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9548
+ ], DataProvider.prototype, "getPathByUrl", null);
9549
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9550
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9551
+ ], DataProvider.prototype, "createFolder", null);
9552
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9553
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9554
+ ], DataProvider.prototype, "move", null);
9555
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9556
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9557
+ ], DataProvider.prototype, "fileRemove", null);
9558
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9559
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9560
+ ], DataProvider.prototype, "folderRemove", null);
9561
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9562
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9563
+ ], DataProvider.prototype, "folderRename", null);
9564
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9565
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9566
+ ], DataProvider.prototype, "fileRename", null);
9567
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9568
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9569
+ ], DataProvider.prototype, "crop", null);
9570
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9571
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9572
+ ], DataProvider.prototype, "resize", null);
9573
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9574
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9575
+ ], DataProvider.prototype, "getMessage", null);
9576
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9577
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9578
+ ], DataProvider.prototype, "isSuccess", null);
9579
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
9580
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_9__.autobind
9581
+ ], DataProvider.prototype, "destruct", null);
9516
9582
 
9517
9583
 
9518
9584
  /***/ }),
@@ -22251,11 +22317,16 @@ function _iterable_to_array(iter) {
22251
22317
  /* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(16964);
22252
22318
  /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(84839);
22253
22319
  /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27795);
22254
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(65946);
22255
- /* harmony import */ var jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(59400);
22256
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5266);
22257
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(54500);
22258
- /* harmony import */ var _templates_form__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(8908);
22320
+ /* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(88475);
22321
+ /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4040);
22322
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(7909);
22323
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(80991);
22324
+ /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(28723);
22325
+ /* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(71125);
22326
+ /* harmony import */ var jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(59400);
22327
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(5266);
22328
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(54500);
22329
+ /* harmony import */ var _templates_form__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(8908);
22259
22330
  /*!
22260
22331
  * Jodit Editor (https://xdsoft.net/jodit/)
22261
22332
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -22280,6 +22351,11 @@ function _iterable_to_array(iter) {
22280
22351
 
22281
22352
 
22282
22353
 
22354
+
22355
+
22356
+
22357
+
22358
+
22283
22359
 
22284
22360
  var jie = 'jodit-image-editor';
22285
22361
  var TABS = {
@@ -22316,7 +22392,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22316
22392
  wn = nw * (h / nh);
22317
22393
  hn = h;
22318
22394
  }
22319
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(_this.crop_box, {
22395
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(_this.crop_box, {
22320
22396
  width: wn,
22321
22397
  height: hn
22322
22398
  });
@@ -22333,8 +22409,8 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22333
22409
  } else {
22334
22410
  _this.new_h = ImageEditor.calcValueByPercent(h, _this.o.cropDefaultHeight);
22335
22411
  }
22336
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(_this.cropHandler, {
22337
- backgroundImage: 'url(' + (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(_this.cropImage, 'src') + ')',
22412
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(_this.cropHandler, {
22413
+ backgroundImage: 'url(' + (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_13__.attr)(_this.cropImage, 'src') + ')',
22338
22414
  width: _this.new_w,
22339
22415
  height: _this.new_h,
22340
22416
  left: w / 2 - _this.new_w / 2,
@@ -22346,8 +22422,8 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22346
22422
  return;
22347
22423
  }
22348
22424
  var ratioX = _this.cropImage.offsetWidth / _this.naturalWidth, ratioY = _this.cropImage.offsetHeight / _this.naturalHeight;
22349
- _this.cropBox.x = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(_this.cropHandler, 'left') / ratioX;
22350
- _this.cropBox.y = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(_this.cropHandler, 'top') / ratioY;
22425
+ _this.cropBox.x = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(_this.cropHandler, 'left') / ratioX;
22426
+ _this.cropBox.y = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(_this.cropHandler, 'top') / ratioY;
22351
22427
  _this.cropBox.w = _this.cropHandler.offsetWidth / ratioX;
22352
22428
  _this.cropBox.h = _this.cropHandler.offsetHeight / ratioY;
22353
22429
  _this.sizes.textContent = _this.cropBox.w.toFixed(0) + 'x' + _this.cropBox.h.toFixed(0);
@@ -22356,7 +22432,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22356
22432
  _this.resizeBox.h = _this.image.offsetHeight || _this.naturalHeight;
22357
22433
  }), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "setHandlers", function() {
22358
22434
  var self = _this;
22359
- var _refs = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.refs)(_this.editor), widthInput = _refs.widthInput, heightInput = _refs.heightInput;
22435
+ var _refs = (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__.refs)(_this.editor), widthInput = _refs.widthInput, heightInput = _refs.heightInput;
22360
22436
  self.j.e.on([
22361
22437
  self.editor.querySelector('.jodit_bottomright'),
22362
22438
  self.cropHandler
@@ -22365,11 +22441,11 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22365
22441
  self.showCrop();
22366
22442
  _this.j.e.fire(self.cropHandler, 'updatesize');
22367
22443
  });
22368
- self.j.e.on((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.toArray)(_this.editor.querySelectorAll(".".concat(jie, "__slider-title"))), 'click', _this.onTitleModeClick).on([
22444
+ self.j.e.on((0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_11__.toArray)(_this.editor.querySelectorAll(".".concat(jie, "__slider-title"))), 'click', _this.onTitleModeClick).on([
22369
22445
  widthInput,
22370
22446
  heightInput
22371
22447
  ], 'input', _this.onChangeSizeInput);
22372
- var _refs1 = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.refs)(_this.editor), keepAspectRatioResize = _refs1.keepAspectRatioResize, keepAspectRatioCrop = _refs1.keepAspectRatioCrop;
22448
+ var _refs1 = (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__.refs)(_this.editor), keepAspectRatioResize = _refs1.keepAspectRatioResize, keepAspectRatioCrop = _refs1.keepAspectRatioCrop;
22373
22449
  if (keepAspectRatioResize) {
22374
22450
  keepAspectRatioResize.addEventListener('change', function() {
22375
22451
  _this.resizeUseRatio = keepAspectRatioResize.checked;
@@ -22381,7 +22457,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22381
22457
  });
22382
22458
  }
22383
22459
  self.j.e.on(self.resizeHandler, 'updatesize', function() {
22384
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.resizeHandler, {
22460
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.resizeHandler, {
22385
22461
  top: 0,
22386
22462
  left: 0,
22387
22463
  width: self.image.offsetWidth || self.naturalWidth,
@@ -22392,7 +22468,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22392
22468
  if (!self.cropImage) {
22393
22469
  return;
22394
22470
  }
22395
- var new_x = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.cropHandler, 'left'), new_y = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.cropHandler, 'top'), new_width = self.cropHandler.offsetWidth, new_height = self.cropHandler.offsetHeight;
22471
+ var new_x = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.cropHandler, 'left'), new_y = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.cropHandler, 'top'), new_width = self.cropHandler.offsetWidth, new_height = self.cropHandler.offsetHeight;
22396
22472
  if (new_x < 0) {
22397
22473
  new_x = 0;
22398
22474
  }
@@ -22411,7 +22487,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22411
22487
  new_width = new_height * self.ratio;
22412
22488
  }
22413
22489
  }
22414
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.cropHandler, {
22490
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.cropHandler, {
22415
22491
  width: new_width,
22416
22492
  height: new_height,
22417
22493
  left: new_x,
@@ -22430,7 +22506,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22430
22506
  switch(button){
22431
22507
  case self.buttons.saveas:
22432
22508
  self.j.prompt('Enter new name', 'Save in new file', function(name) {
22433
- if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.trim)(name)) {
22509
+ if (!(0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_12__.trim)(name)) {
22434
22510
  self.j.alert('The name should not be empty');
22435
22511
  return false;
22436
22512
  }
@@ -22446,7 +22522,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22446
22522
  break;
22447
22523
  case self.buttons.reset:
22448
22524
  if (self.activeTab === TABS.resize) {
22449
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.image, {
22525
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.image, {
22450
22526
  width: null,
22451
22527
  height: null
22452
22528
  });
@@ -22461,18 +22537,24 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22461
22537
  });
22462
22538
  });
22463
22539
  });
22464
- _this.options = editor && editor.o && editor.o.imageeditor ? editor.o.imageeditor : jodit_config__WEBPACK_IMPORTED_MODULE_13__.Config.defaultOptions.imageeditor;
22540
+ _this.options = editor && editor.o && editor.o.imageeditor ? editor.o.imageeditor : jodit_config__WEBPACK_IMPORTED_MODULE_18__.Config.defaultOptions.imageeditor;
22465
22541
  var o = _this.options;
22466
22542
  _this.resizeUseRatio = o.resizeUseRatio;
22467
22543
  _this.cropUseRatio = o.cropUseRatio;
22468
22544
  _this.buttons = {
22469
- reset: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_12__.Button)(_this.j, 'update', 'Reset'),
22470
- save: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_12__.Button)(_this.j, 'save', 'Save'),
22471
- saveas: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_12__.Button)(_this.j, 'save', 'Save as ...')
22545
+ reset: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_17__.Button)(_this.j, 'update', 'Reset'),
22546
+ save: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_17__.Button)(_this.j, 'save', 'Save'),
22547
+ saveas: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_17__.Button)(_this.j, {
22548
+ icon: {
22549
+ name: 'save'
22550
+ },
22551
+ name: 'save-as',
22552
+ text: 'Save as ...'
22553
+ })
22472
22554
  };
22473
22555
  _this.activeTab = o.resize ? TABS.resize : TABS.crop;
22474
- _this.editor = (0,_templates_form__WEBPACK_IMPORTED_MODULE_15__.form)(_this.j, _this.options);
22475
- var _refs = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.refs)(_this.editor), resizeBox = _refs.resizeBox, cropBox = _refs.cropBox;
22556
+ _this.editor = (0,_templates_form__WEBPACK_IMPORTED_MODULE_20__.form)(_this.j, _this.options);
22557
+ var _refs = (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__.refs)(_this.editor), resizeBox = _refs.resizeBox, cropBox = _refs.cropBox;
22476
22558
  _this.resize_box = resizeBox;
22477
22559
  _this.crop_box = cropBox;
22478
22560
  _this.sizes = _this.editor.querySelector(".".concat(jie, "__area.").concat(jie, "__area_crop .jodit-image-editor__sizes"));
@@ -22545,9 +22627,9 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22545
22627
  return this.j.async.promise(function(resolve) {
22546
22628
  var timestamp = new Date().getTime();
22547
22629
  _this.image = _this.j.c.element('img');
22548
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.$$)('img,.jodit-icon_loader', _this.resize_box).forEach(jodit_core_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove);
22549
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.$$)('img,.jodit-icon_loader', _this.crop_box).forEach(jodit_core_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove);
22550
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(_this.cropHandler, 'background', 'transparent');
22630
+ (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__.$$)('img,.jodit-icon_loader', _this.resize_box).forEach(jodit_core_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove);
22631
+ (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__.$$)('img,.jodit-icon_loader', _this.crop_box).forEach(jodit_core_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove);
22632
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(_this.cropHandler, 'background', 'transparent');
22551
22633
  _this.onSave = save;
22552
22634
  _this.resize_box.appendChild(_this.j.c.element('i', {
22553
22635
  class: 'jodit-icon_loader'
@@ -22562,7 +22644,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22562
22644
  }
22563
22645
  _this.image.setAttribute('src', url);
22564
22646
  _this._dialog.open();
22565
- var _refs = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.refs)(_this.editor), widthInput = _refs.widthInput, heightInput = _refs.heightInput;
22647
+ var _refs = (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__.refs)(_this.editor), widthInput = _refs.widthInput, heightInput = _refs.heightInput;
22566
22648
  var onload = function onload1() {
22567
22649
  if (_this.isDestructed) {
22568
22650
  return;
@@ -22576,7 +22658,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22576
22658
  _this.resize_box.appendChild(_this.image);
22577
22659
  _this.cropImage = _this.image.cloneNode(true);
22578
22660
  _this.crop_box.appendChild(_this.cropImage);
22579
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove.apply(null, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.$$)('.jodit-icon_loader', _this.editor));
22661
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove.apply(null, (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__.$$)('.jodit-icon_loader', _this.editor));
22580
22662
  if (_this.activeTab === TABS.crop) {
22581
22663
  _this.showCrop();
22582
22664
  }
@@ -22601,11 +22683,11 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22601
22683
  if (!slide) {
22602
22684
  return;
22603
22685
  }
22604
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.$$)(".".concat(jie, "__slider,.").concat(jie, "__area"), self.editor).forEach(function(elm) {
22686
+ (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__.$$)(".".concat(jie, "__slider,.").concat(jie, "__area"), self.editor).forEach(function(elm) {
22605
22687
  return elm.classList.remove("".concat(jie, "_active"));
22606
22688
  });
22607
22689
  slide.classList.add("".concat(jie, "_active"));
22608
- this.activeTab = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(slide, '-area') || TABS.resize;
22690
+ this.activeTab = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_13__.attr)(slide, '-area') || TABS.resize;
22609
22691
  var tab = self.editor.querySelector(".".concat(jie, "__area.").concat(jie, "__area_") + self.activeTab);
22610
22692
  if (tab) {
22611
22693
  tab.classList.add("".concat(jie, "_active"));
@@ -22618,14 +22700,14 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22618
22700
  {
22619
22701
  key: "onChangeSizeInput",
22620
22702
  value: function onChangeSizeInput(e) {
22621
- var self = this, input = e.target, _refs = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.refs)(this.editor), widthInput = _refs.widthInput, heightInput = _refs.heightInput, isWidth = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(input, 'data-ref') === 'widthInput', x = parseInt(input.value, 10), minX = isWidth ? self.o.min_width : self.o.min_height, minY = !isWidth ? self.o.min_width : self.o.min_height;
22703
+ var self = this, input = e.target, _refs = (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__.refs)(this.editor), widthInput = _refs.widthInput, heightInput = _refs.heightInput, isWidth = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_13__.attr)(input, 'data-ref') === 'widthInput', x = parseInt(input.value, 10), minX = isWidth ? self.o.min_width : self.o.min_height, minY = !isWidth ? self.o.min_width : self.o.min_height;
22622
22704
  var y;
22623
22705
  if (x > minX) {
22624
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.image, isWidth ? 'width' : 'height', x);
22706
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.image, isWidth ? 'width' : 'height', x);
22625
22707
  if (self.resizeUseRatio) {
22626
22708
  y = isWidth ? Math.round(x / self.ratio) : Math.round(x * self.ratio);
22627
22709
  if (y > minY) {
22628
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.image, !isWidth ? 'width' : 'height', y);
22710
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.image, !isWidth ? 'width' : 'height', y);
22629
22711
  if (isWidth) {
22630
22712
  heightInput.value = y.toString();
22631
22713
  } else {
@@ -22648,8 +22730,8 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22648
22730
  self.start_x = e.clientX;
22649
22731
  self.start_y = e.clientY;
22650
22732
  if (self.activeTab === TABS.crop) {
22651
- self.top_x = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.cropHandler, 'left');
22652
- self.top_y = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.cropHandler, 'top');
22733
+ self.top_x = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.cropHandler, 'left');
22734
+ self.top_y = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.cropHandler, 'top');
22653
22735
  self.width = self.cropHandler.offsetWidth;
22654
22736
  self.height = self.cropHandler.offsetHeight;
22655
22737
  } else {
@@ -22676,7 +22758,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22676
22758
  if (!self.clicked) {
22677
22759
  return;
22678
22760
  }
22679
- var _refs = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.refs)(this.editor), widthInput = _refs.widthInput, heightInput = _refs.heightInput;
22761
+ var _refs = (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_15__.refs)(this.editor), widthInput = _refs.widthInput, heightInput = _refs.heightInput;
22680
22762
  self.diff_x = e.clientX - self.start_x;
22681
22763
  self.diff_y = e.clientY - self.start_y;
22682
22764
  if (self.activeTab === TABS.resize && self.resizeUseRatio || self.activeTab === TABS.crop && self.cropUseRatio) {
@@ -22693,11 +22775,11 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22693
22775
  }
22694
22776
  if (self.activeTab === TABS.resize) {
22695
22777
  if (self.new_w > self.o.resizeMinWidth) {
22696
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.image, 'width', self.new_w + 'px');
22778
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.image, 'width', self.new_w + 'px');
22697
22779
  widthInput.value = self.new_w.toString();
22698
22780
  }
22699
22781
  if (self.new_h > self.o.resizeMinHeight) {
22700
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.image, 'height', self.new_h + 'px');
22782
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.image, 'height', self.new_h + 'px');
22701
22783
  heightInput.value = self.new_h.toString();
22702
22784
  }
22703
22785
  this.j.e.fire(self.resizeHandler, 'updatesize');
@@ -22709,7 +22791,7 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22709
22791
  if (self.top_y + self.new_h > self.cropImage.offsetHeight) {
22710
22792
  self.new_h = self.cropImage.offsetHeight - self.top_y;
22711
22793
  }
22712
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.cropHandler, {
22794
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.cropHandler, {
22713
22795
  width: self.new_w,
22714
22796
  height: self.new_h
22715
22797
  });
@@ -22717,11 +22799,11 @@ var ImageEditor = /*#__PURE__*/ function(ViewComponent) {
22717
22799
  if (self.top_x + self.diff_x + self.cropHandler.offsetWidth > self.cropImage.offsetWidth) {
22718
22800
  self.diff_x = self.cropImage.offsetWidth - self.top_x - self.cropHandler.offsetWidth;
22719
22801
  }
22720
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.cropHandler, 'left', self.top_x + self.diff_x);
22802
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.cropHandler, 'left', self.top_x + self.diff_x);
22721
22803
  if (self.top_y + self.diff_y + self.cropHandler.offsetHeight > self.cropImage.offsetHeight) {
22722
22804
  self.diff_y = self.cropImage.offsetHeight - self.top_y - self.cropHandler.offsetHeight;
22723
22805
  }
22724
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(self.cropHandler, 'top', self.top_y + self.diff_y);
22806
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_14__.css)(self.cropHandler, 'top', self.top_y + self.diff_y);
22725
22807
  }
22726
22808
  this.j.e.fire(self.cropHandler, 'updatesize');
22727
22809
  }
@@ -22790,7 +22872,7 @@ ImageEditor = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorat
22790
22872
  */ function openImageEditor(href, name, path, source, onSuccess, onFailed) {
22791
22873
  var _this = this;
22792
22874
  return this.getInstance('ImageEditor', this.o).open(href, function(newname, box, success, failed) {
22793
- return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.call)(box.action === 'resize' ? _this.dataProvider.resize : _this.dataProvider.crop, path, source, name, newname, box.box).then(function(ok) {
22875
+ return (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_16__.call)(box.action === 'resize' ? _this.dataProvider.resize : _this.dataProvider.crop, path, source, name, newname, box.box).then(function(ok) {
22794
22876
  if (ok) {
22795
22877
  success();
22796
22878
  if (onSuccess) {
@@ -34983,6 +35065,7 @@ module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 179
34983
35065
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
34984
35066
  /* harmony export */ call: function() { return /* binding */ call; },
34985
35067
  /* harmony export */ callPromise: function() { return /* binding */ callPromise; },
35068
+ /* harmony export */ callThis: function() { return /* binding */ callThis; },
34986
35069
  /* harmony export */ getDataTransfer: function() { return /* binding */ getDataTransfer; },
34987
35070
  /* harmony export */ getPropertyDescriptor: function() { return /* binding */ getPropertyDescriptor; },
34988
35071
  /* harmony export */ keys: function() { return /* binding */ keys; },
@@ -35020,6 +35103,20 @@ module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 179
35020
35103
  }
35021
35104
  return func.apply(void 0, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(args));
35022
35105
  }
35106
+ /**
35107
+ * Call function with parameters
35108
+ *
35109
+ * @example
35110
+ * ```js
35111
+ * const f = Math.random();
35112
+ * Jodit.modules.Helpers.call(f > 0.5 ? Math.ceil : Math.floor, f);
35113
+ * ```
35114
+ */ function callThis(func, thisArg) {
35115
+ for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
35116
+ args[_key - 2] = arguments[_key];
35117
+ }
35118
+ return func.apply(thisArg, args);
35119
+ }
35023
35120
  /**
35024
35121
  * Mark element for debugging
35025
35122
  */ function markOwner(jodit, elm) {
@@ -41376,7 +41473,7 @@ __webpack_require__.r(__webpack_exports__);
41376
41473
  * @packageDocumentation
41377
41474
  * @module constants
41378
41475
  */
41379
- var APP_VERSION = "4.9.13";
41476
+ var APP_VERSION = "4.9.14";
41380
41477
  // prettier-ignore
41381
41478
  var ES = "es5";
41382
41479
  var IS_ES_MODERN = false;
@@ -46239,6 +46336,7 @@ __webpack_require__.r(__webpack_exports__);
46239
46336
  /* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
46240
46337
  /* harmony export */ call: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_26__.call; },
46241
46338
  /* harmony export */ callPromise: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_26__.callPromise; },
46339
+ /* harmony export */ callThis: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_26__.callThis; },
46242
46340
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
46243
46341
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
46244
46342
  /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated__WEBPACK_IMPORTED_MODULE_18__.cns; },