jodit 4.2.5 → 4.2.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.
Files changed (56) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +2 -2
  3. package/es2015/jodit.js +43 -7
  4. package/es2015/jodit.min.js +2 -2
  5. package/es2015/plugins/debug/debug.js +1 -1
  6. package/es2015/plugins/debug/debug.min.js +1 -1
  7. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  8. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  10. package/es2018/jodit.css +1 -1
  11. package/es2018/jodit.fat.min.js +2 -2
  12. package/es2018/jodit.js +43 -7
  13. package/es2018/jodit.min.js +2 -2
  14. package/es2018/plugins/debug/debug.js +1 -1
  15. package/es2018/plugins/debug/debug.min.js +1 -1
  16. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  17. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  18. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  19. package/es2021/jodit.css +1 -1
  20. package/es2021/jodit.fat.min.js +2 -2
  21. package/es2021/jodit.js +43 -7
  22. package/es2021/jodit.min.js +2 -2
  23. package/es2021/plugins/debug/debug.js +1 -1
  24. package/es2021/plugins/debug/debug.min.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  26. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  27. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  28. package/es2021.en/jodit.css +1 -1
  29. package/es2021.en/jodit.fat.min.js +2 -2
  30. package/es2021.en/jodit.js +43 -7
  31. package/es2021.en/jodit.min.js +2 -2
  32. package/es2021.en/plugins/debug/debug.js +1 -1
  33. package/es2021.en/plugins/debug/debug.min.js +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  37. package/es5/jodit.css +2 -2
  38. package/es5/jodit.fat.min.js +2 -2
  39. package/es5/jodit.js +43 -7
  40. package/es5/jodit.min.css +2 -2
  41. package/es5/jodit.min.js +2 -2
  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/esm/config.d.ts +22 -0
  48. package/esm/config.js +22 -0
  49. package/esm/core/async/async.js +7 -1
  50. package/esm/core/constants.js +1 -1
  51. package/esm/core/ui/popup/popup.js +1 -1
  52. package/esm/modules/file-browser/data-provider.js +4 -1
  53. package/esm/modules/file-browser/file-browser.js +1 -1
  54. package/esm/plugins/image-properties/image-properties.js +6 -2
  55. package/package.json +1 -1
  56. package/types/config.d.ts +22 -0
package/es5/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.5
4
+ * Version: v4.2.7
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1547,6 +1547,28 @@ var Config = /** @class */ (function () {
1547
1547
  : null);
1548
1548
  /**
1549
1549
  * Shadow root if Jodit was created in it
1550
+ *
1551
+ * ```html
1552
+ * <div id="editor"></div>
1553
+ * ```
1554
+ *
1555
+ * ```js
1556
+ * const app = document.getElementById('editor');
1557
+ * app.attachShadow({ mode: 'open' });
1558
+ * const root = app.shadowRoot;
1559
+ *
1560
+ * root.innerHTML = `
1561
+ * <link rel="stylesheet" href="./build/jodit.css"/>
1562
+ * <h1>Jodit example in Shadow DOM</h1>
1563
+ * <div id="edit"></div>
1564
+ * `;
1565
+ *
1566
+ * const editor = Jodit.make(root.getElementById('edit'), {
1567
+ * globalFullSize: false,
1568
+ * shadowRoot: root
1569
+ * });
1570
+ * editor.value = '<p>start</p>';
1571
+ * ```
1550
1572
  */
1551
1573
  this.shadowRoot = null;
1552
1574
  /**
@@ -2303,6 +2325,7 @@ Config.prototype.controls = {};
2303
2325
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(31635);
2304
2326
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
2305
2327
  /* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59146);
2328
+ /* harmony import */ var jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(99951);
2306
2329
  /* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(69052);
2307
2330
  /* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2461);
2308
2331
  /* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(25376);
@@ -2311,7 +2334,7 @@ Config.prototype.controls = {};
2311
2334
  /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35642);
2312
2335
  /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28712);
2313
2336
  /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__);
2314
- /* harmony import */ var jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21567);
2337
+ /* harmony import */ var jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(21567);
2315
2338
  /*!
2316
2339
  * Jodit Editor (https://xdsoft.net/jodit/)
2317
2340
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -2328,6 +2351,7 @@ Config.prototype.controls = {};
2328
2351
 
2329
2352
 
2330
2353
 
2354
+
2331
2355
  var Async = /** @class */ (function () {
2332
2356
  function Async() {
2333
2357
  var _this = this;
@@ -2466,6 +2490,11 @@ var Async = /** @class */ (function () {
2466
2490
  }
2467
2491
  var promise = _this.promise(function (res) {
2468
2492
  promises.push(res);
2493
+ }).catch(function (e) {
2494
+ if ((0,jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_10__/* .isAbortError */ .z)(e)) {
2495
+ return null;
2496
+ }
2497
+ throw e;
2469
2498
  });
2470
2499
  onFire.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__spreadArray */ .fX)([], (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__read */ .zs)(args), false));
2471
2500
  return promise;
@@ -2550,7 +2579,7 @@ var Async = /** @class */ (function () {
2550
2579
  var _this = this;
2551
2580
  var rejectCallback = function () { };
2552
2581
  var promise = new Promise(function (resolve, reject) {
2553
- rejectCallback = function () { return reject((0,jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__/* .abort */ .h)()); };
2582
+ rejectCallback = function () { return reject((0,jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_11__/* .abort */ .h)('Abort async')); };
2554
2583
  _this.promisesRejections.add(rejectCallback);
2555
2584
  executor(resolve, reject);
2556
2585
  });
@@ -3098,7 +3127,7 @@ __webpack_require__.r(__webpack_exports__);
3098
3127
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
3099
3128
  */
3100
3129
 
3101
- var APP_VERSION = "4.2.5";
3130
+ var APP_VERSION = "4.2.7";
3102
3131
  // prettier-ignore
3103
3132
  var ES = "es5";
3104
3133
  var IS_ES_MODERN = false;
@@ -17451,7 +17480,7 @@ var Popup = /** @class */ (function (_super) {
17451
17480
  }
17452
17481
  return strategy;
17453
17482
  };
17454
- // Try find match position inside Jodit.container
17483
+ // Try to find match position inside Jodit.container
17455
17484
  var strategy = getMatchStrategy((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.position)(this.j.container, this.j));
17456
17485
  // If not found or is not inside window view
17457
17486
  if (!strategy || !Popup.boxInView(getPointByStrategy(strategy), view)) {
@@ -21409,6 +21438,9 @@ var DataProvider = /** @class */ (function () {
21409
21438
  this.o.permissions.data.source = source;
21410
21439
  if (this.o.permissions.url) {
21411
21440
  return [2 /*return*/, this.get('permissions').then(function (resp) {
21441
+ if (_this.parent.isInDestruct) {
21442
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.abort)();
21443
+ }
21412
21444
  var process = _this.o.permissions.process;
21413
21445
  if (!process) {
21414
21446
  process = _this.o.ajax.process;
@@ -22198,7 +22230,7 @@ var FileBrowser = /** @class */ (function (_super) {
22198
22230
  });
22199
22231
  })
22200
22232
  .catch(function (e) {
22201
- if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
22233
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(e) && !jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
22202
22234
  throw e;
22203
22235
  }
22204
22236
  });
@@ -33873,7 +33905,11 @@ var imageProperties = /** @class */ (function (_super) {
33873
33905
  .promise(function (resolve, reject) {
33874
33906
  return (0,_readers__WEBPACK_IMPORTED_MODULE_10__/* .readValuesFromImage */ .U)(_this.j, _this.state).then(resolve, reject);
33875
33907
  })
33876
- .catch(function (e) { return _this.dialog.message.error(e.message); })
33908
+ .catch(function (e) {
33909
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isAbortError)(e)) {
33910
+ _this.dialog.message.error(e.message);
33911
+ }
33912
+ })
33877
33913
  .finally(function () { return _this.__unlock(); });
33878
33914
  return false;
33879
33915
  };
package/es5/jodit.min.css CHANGED
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.5
4
+ * Version: v4.2.7
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
  /*!
9
9
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
10
10
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
11
- * Version: v4.2.5
11
+ * Version: v4.2.7
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */