jodit 4.2.50 → 4.3.1

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 (82) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +238 -108
  5. package/es2015/jodit.min.js +2 -2
  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.css +1 -1
  13. package/es2018/jodit.fat.min.js +2 -2
  14. package/es2018/jodit.js +239 -108
  15. package/es2018/jodit.min.js +2 -2
  16. package/es2018/plugins/debug/debug.css +1 -1
  17. package/es2018/plugins/debug/debug.js +1 -1
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  21. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  22. package/es2021/jodit.css +1 -1
  23. package/es2021/jodit.fat.min.js +2 -2
  24. package/es2021/jodit.js +237 -107
  25. package/es2021/jodit.min.js +2 -2
  26. package/es2021/plugins/debug/debug.css +1 -1
  27. package/es2021/plugins/debug/debug.js +1 -1
  28. package/es2021/plugins/debug/debug.min.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  32. package/es2021.en/jodit.css +1 -1
  33. package/es2021.en/jodit.fat.min.js +2 -2
  34. package/es2021.en/jodit.js +237 -107
  35. package/es2021.en/jodit.min.js +2 -2
  36. package/es2021.en/plugins/debug/debug.css +1 -1
  37. package/es2021.en/plugins/debug/debug.js +1 -1
  38. package/es2021.en/plugins/debug/debug.min.js +1 -1
  39. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  40. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  42. package/es5/164.fat.min.js +1 -1
  43. package/es5/164.min.js +1 -1
  44. package/es5/5.fat.min.js +1 -1
  45. package/es5/5.min.js +1 -1
  46. package/es5/jodit.css +2 -2
  47. package/es5/jodit.fat.min.js +2 -2
  48. package/es5/jodit.js +241 -109
  49. package/es5/jodit.min.css +2 -2
  50. package/es5/jodit.min.js +2 -2
  51. package/es5/plugins/debug/debug.css +1 -1
  52. package/es5/plugins/debug/debug.js +1 -1
  53. package/es5/plugins/debug/debug.min.js +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  57. package/esm/config.d.ts +4 -0
  58. package/esm/config.js +4 -0
  59. package/esm/core/constants.js +1 -1
  60. package/esm/core/decorators/cache/cache.d.ts +100 -0
  61. package/esm/core/decorators/cache/cache.js +106 -0
  62. package/esm/core/global.d.ts +6 -1
  63. package/esm/core/global.js +15 -13
  64. package/esm/core/helpers/utils/selector.d.ts +5 -1
  65. package/esm/core/helpers/utils/selector.js +3 -0
  66. package/esm/core/traits/dlgs.js +3 -0
  67. package/esm/core/view/view.js +4 -6
  68. package/esm/jodit.js +5 -5
  69. package/esm/modules/dialog/dialog.d.ts +8 -8
  70. package/esm/modules/dialog/dialog.js +37 -30
  71. package/esm/modules/file-browser/file-browser.js +2 -2
  72. package/esm/plugins/clipboard/clipboard.js +2 -1
  73. package/esm/plugins/image-processor/image-processor.js +5 -4
  74. package/esm/plugins/search/search.js +2 -2
  75. package/esm/types/view.d.ts +1 -0
  76. package/package.json +1 -1
  77. package/types/config.d.ts +4 -0
  78. package/types/core/decorators/cache/cache.d.ts +100 -0
  79. package/types/core/global.d.ts +6 -1
  80. package/types/core/helpers/utils/selector.d.ts +5 -1
  81. package/types/modules/dialog/dialog.d.ts +8 -8
  82. package/types/types/view.d.ts +1 -0
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.2.50
4
+ * Version: v4.3.1
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1000,6 +1000,10 @@ class Config {
1000
1000
  * Buttons in toolbat without SVG - only texts
1001
1001
  */
1002
1002
  this.textIcons = false;
1003
+ /**
1004
+ * Element for dialog container
1005
+ */
1006
+ this.popupRoot = null;
1003
1007
  /**
1004
1008
  * shows a INPUT[type=color] to open the browser color picker, on the right bottom of widget color picker
1005
1009
  */
@@ -1735,7 +1739,7 @@ __webpack_require__.r(__webpack_exports__);
1735
1739
  * Released under MIT see LICENSE.txt in the project root for license information.
1736
1740
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1737
1741
  */
1738
- const APP_VERSION = "4.2.50";
1742
+ const APP_VERSION = "4.3.1";
1739
1743
  // prettier-ignore
1740
1744
  const ES = "es2015";
1741
1745
  const IS_ES_MODERN = true;
@@ -2152,9 +2156,10 @@ class Create {
2152
2156
  /* harmony export */ PP: function() { return /* binding */ cache; }
2153
2157
  /* harmony export */ });
2154
2158
  /* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64567);
2155
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
2156
- /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9823);
2157
- /* harmony import */ var jodit_core_helpers_utils_error_error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(76166);
2159
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
2160
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
2161
+ /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9823);
2162
+ /* harmony import */ var jodit_core_helpers_utils_error_error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76166);
2158
2163
  /*!
2159
2164
  * Jodit Editor (https://xdsoft.net/jodit/)
2160
2165
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -2164,19 +2169,125 @@ class Create {
2164
2169
 
2165
2170
 
2166
2171
 
2172
+
2173
+ /**
2174
+ * Retrieves a cached property value from an object if it exists; otherwise, returns `null`.
2175
+ *
2176
+ * This utility is particularly useful when working with properties that are lazily initialized
2177
+ * or dynamically created, such as getters or cached computations. It ensures you can safely
2178
+ * access the value without triggering initialization or creating a new instance.
2179
+ *
2180
+ * ### Usage Example:
2181
+ * ```typescript
2182
+ * import type { IUIElement } from "jodit";
2183
+ *
2184
+ * const { component, cache, cached } = Jodit.decorators;
2185
+ * const { UIElement } = Jodit.modules;
2186
+ *
2187
+ * @component
2188
+ * class SomeComponent extends UIElement {
2189
+ * @cache
2190
+ * get someElement(): IUIElement {
2191
+ * return new UIElement(this.jodit);
2192
+ * }
2193
+ *
2194
+ * destruct() {
2195
+ * // Use the cached utility to clean up only if the property is initialized
2196
+ * cached(this, 'someElement')?.destruct();
2197
+ * super.destruct();
2198
+ * }
2199
+ * }
2200
+ * ```
2201
+ *
2202
+ * @param object - The object containing the property to check.
2203
+ * @param property - The name of the property to retrieve from the cache.
2204
+ * @returns The cached value of the property if it exists; otherwise, `null`.
2205
+ *
2206
+ * ### Notes:
2207
+ * - If the property is defined as a getter, the function will return `null`
2208
+ * instead of invoking the getter.
2209
+ * - This function is non-destructive and does not alter the object's state.
2210
+ */
2167
2211
  function cached(object, property) {
2168
2212
  const descriptor = Object.getOwnPropertyDescriptor(object, property);
2169
- if (!descriptor || (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isFunction */ .Tn)(descriptor.get)) {
2213
+ if (!descriptor || (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__/* .isFunction */ .Tn)(descriptor.get)) {
2170
2214
  return null;
2171
2215
  }
2172
2216
  return descriptor.value;
2173
2217
  }
2218
+ /**
2219
+ * A decorator that caches the result of a getter method. Once the getter is accessed for the first time,
2220
+ * its computed value is stored as a property of the object. Subsequent accesses return the cached value
2221
+ * without recalculating it, improving performance and avoiding redundant computations.
2222
+ *
2223
+ * ### Key Features:
2224
+ * - **Lazy Initialization**: The original getter is invoked only once, the first time the property is accessed.
2225
+ * - **Immutability**: After caching, the value is stored as a non-writable, non-configurable property, preventing accidental modifications.
2226
+ * - **Conditional Caching**: If the returned value has a property `noCache` set to `true`, the caching mechanism is bypassed, and the getter is invoked each time.
2227
+ *
2228
+ * ### Usage Example 1: Basic Caching
2229
+ * ```typescript
2230
+ * import { cache } from './decorators';
2231
+ *
2232
+ * class Example {
2233
+ * private counter = 0;
2234
+ *
2235
+ * @cache
2236
+ * get expensiveComputation(): number {
2237
+ * console.log('Calculating...');
2238
+ * return ++this.counter;
2239
+ * }
2240
+ * }
2241
+ *
2242
+ * const instance = new Example();
2243
+ * console.log(instance.expensiveComputation); // Logs "Calculating..." and returns 1
2244
+ * console.log(instance.expensiveComputation); // Returns 1 (cached value, no calculation)
2245
+ * ```
2246
+ *
2247
+ * ### Usage Example 2: Integration with Cached Utilities
2248
+ * ```typescript
2249
+ * import { cache, cached } from './decorators';
2250
+ * import type { IUIElement } from "jodit";
2251
+ *
2252
+ * const { component } = Jodit.decorators;
2253
+ * const { UIElement } = Jodit.modules;
2254
+ *
2255
+ * @component
2256
+ * class SomeComponent extends UIElement {
2257
+ * @cache
2258
+ * get someElement(): IUIElement {
2259
+ * return new UIElement(this.jodit);
2260
+ * }
2261
+ *
2262
+ * destruct() {
2263
+ * // Use the cached utility to clean up only if the property is initialized
2264
+ * cached(this, 'someElement')?.destruct();
2265
+ * super.destruct();
2266
+ * }
2267
+ * }
2268
+ * ```
2269
+ *
2270
+ * @param _ - The target object (not used directly).
2271
+ * @param name - The name of the property to decorate.
2272
+ * @param descriptor - The property descriptor, which must include a getter method.
2273
+ * @throws Will throw an error if the descriptor does not include a getter.
2274
+ *
2275
+ * ### Notes:
2276
+ * - **Performance**: Ideal for properties that are computationally expensive and do not change after the initial computation.
2277
+ * - **Flexibility**: Supports conditional caching via the `noCache` property in the returned value.
2278
+ * - **Compatibility**: Designed to work seamlessly with objects and classes in TypeScript or JavaScript.
2279
+ */
2174
2280
  function cache(_, name, descriptor) {
2175
2281
  const getter = descriptor.get;
2176
2282
  if (!getter) {
2177
- throw (0,jodit_core_helpers_utils_error_error__WEBPACK_IMPORTED_MODULE_3__/* .error */ .z3)('Getter property descriptor expected');
2283
+ throw (0,jodit_core_helpers_utils_error_error__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3)('Getter property descriptor expected');
2178
2284
  }
2179
2285
  descriptor.get = function () {
2286
+ if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
2287
+ if (this.isInDestruct) {
2288
+ console.error('Trying to access property in destructed component');
2289
+ }
2290
+ }
2180
2291
  const value = getter.call(this);
2181
2292
  if (value && value.noCache === true) {
2182
2293
  return value;
@@ -2192,8 +2303,8 @@ function cache(_, name, descriptor) {
2192
2303
  }
2193
2304
  function cacheHTML(target, _, descriptor) {
2194
2305
  const fn = descriptor.value;
2195
- if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isFunction */ .Tn)(fn)) {
2196
- throw (0,jodit_core_helpers_utils_error_error__WEBPACK_IMPORTED_MODULE_3__/* .error */ .z3)('Handler must be a Function');
2306
+ if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__/* .isFunction */ .Tn)(fn)) {
2307
+ throw (0,jodit_core_helpers_utils_error_error__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3)('Handler must be a Function');
2197
2308
  }
2198
2309
  let useCache = true;
2199
2310
  const cached = new WeakMap();
@@ -2203,13 +2314,13 @@ function cacheHTML(target, _, descriptor) {
2203
2314
  return (_a = cached.get(this.constructor)) === null || _a === void 0 ? void 0 : _a.cloneNode(true);
2204
2315
  }
2205
2316
  const value = fn.apply(this, attrs);
2206
- if (useCache && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isElement(value)) {
2317
+ if (useCache && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isElement(value)) {
2207
2318
  cached.set(this.constructor, value);
2208
2319
  }
2209
2320
  return useCache ? value.cloneNode(true) : value;
2210
2321
  };
2211
2322
  target.hookStatus(jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready, (component) => {
2212
- const view = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isViewObject */ .hH)(component)
2323
+ const view = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__/* .isViewObject */ .hH)(component)
2213
2324
  ? component
2214
2325
  : component.jodit;
2215
2326
  useCache = Boolean(view.options.cache);
@@ -4457,18 +4568,20 @@ class EventHandlersStore {
4457
4568
  /* harmony export */ RR: function() { return /* binding */ eventEmitter; },
4458
4569
  /* harmony export */ VF: function() { return /* binding */ instances; },
4459
4570
  /* harmony export */ av: function() { return /* binding */ modules; },
4571
+ /* harmony export */ ef: function() { return /* binding */ getPopupViewRoot; },
4460
4572
  /* harmony export */ fg: function() { return /* binding */ pluginSystem; },
4461
4573
  /* harmony export */ w9: function() { return /* binding */ uniqueUid; }
4462
4574
  /* harmony export */ });
4463
- /* harmony import */ var jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83044);
4464
- /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(98253);
4465
- /* harmony import */ var jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12041);
4466
- /* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(449);
4467
- /* harmony import */ var jodit_core_helpers_utils_get_class_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75766);
4468
- /* harmony import */ var jodit_core_plugin_plugin_system__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77402);
4469
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17352);
4470
- /* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71842);
4471
- /* harmony import */ var _event_emitter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50025);
4575
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65147);
4576
+ /* harmony import */ var jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(83044);
4577
+ /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98253);
4578
+ /* harmony import */ var jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12041);
4579
+ /* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(449);
4580
+ /* harmony import */ var jodit_core_helpers_utils_get_class_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75766);
4581
+ /* harmony import */ var jodit_core_plugin_plugin_system__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(77402);
4582
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17352);
4583
+ /* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71842);
4584
+ /* harmony import */ var _event_emitter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50025);
4472
4585
  /*!
4473
4586
  * Jodit Editor (https://xdsoft.net/jodit/)
4474
4587
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -4483,6 +4596,7 @@ class EventHandlersStore {
4483
4596
 
4484
4597
 
4485
4598
 
4599
+
4486
4600
  const instances = {};
4487
4601
  let counter = 1;
4488
4602
  const uuids = new Set();
@@ -4501,15 +4615,15 @@ function uniqueUid() {
4501
4615
  uuids.add(uid);
4502
4616
  return uid;
4503
4617
  }
4504
- const pluginSystem = new jodit_core_plugin_plugin_system__WEBPACK_IMPORTED_MODULE_1__/* .PluginSystem */ .$();
4618
+ const pluginSystem = new jodit_core_plugin_plugin_system__WEBPACK_IMPORTED_MODULE_2__/* .PluginSystem */ .$();
4505
4619
  const modules = {};
4506
4620
  const extendLang = (langs) => {
4507
4621
  Object.keys(langs).forEach(key => {
4508
- if (_constants__WEBPACK_IMPORTED_MODULE_2__.lang[key]) {
4509
- Object.assign(_constants__WEBPACK_IMPORTED_MODULE_2__.lang[key], langs[key]);
4622
+ if (_constants__WEBPACK_IMPORTED_MODULE_3__.lang[key]) {
4623
+ Object.assign(_constants__WEBPACK_IMPORTED_MODULE_3__.lang[key], langs[key]);
4510
4624
  }
4511
4625
  else {
4512
- _constants__WEBPACK_IMPORTED_MODULE_2__.lang[key] = langs[key];
4626
+ _constants__WEBPACK_IMPORTED_MODULE_3__.lang[key] = langs[key];
4513
4627
  }
4514
4628
  });
4515
4629
  };
@@ -4518,47 +4632,36 @@ const boxes = new WeakMap();
4518
4632
  * Create unique box(HTMLCotainer) and remove it after destroy
4519
4633
  */
4520
4634
  function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false) {
4521
- const name = (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .K)(classFunc)
4635
+ const name = (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_6__/* .isString */ .K)(classFunc)
4522
4636
  ? classFunc
4523
4637
  : classFunc
4524
- ? (0,jodit_core_helpers_utils_get_class_name__WEBPACK_IMPORTED_MODULE_0__/* .getClassName */ .u)(classFunc.prototype)
4638
+ ? (0,jodit_core_helpers_utils_get_class_name__WEBPACK_IMPORTED_MODULE_1__/* .getClassName */ .u)(classFunc.prototype)
4525
4639
  : 'jodit-utils';
4526
4640
  const data = boxes.get(jodit) || {}, key = name + tag;
4527
- const view = (0,jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_6__/* .isViewObject */ .h)(jodit) ? jodit : jodit.j;
4641
+ const view = (0,jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_7__/* .isViewObject */ .h)(jodit) ? jodit : jodit.j;
4642
+ let body = null;
4528
4643
  if (!data[key]) {
4529
4644
  let c = view.c;
4530
- let body;
4531
- if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot) {
4532
- body = jodit.o.shadowRoot;
4533
- }
4534
- else {
4535
- body = jodit.od.body;
4536
- if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit)) {
4537
- const dialog = _dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.closest(jodit.container, 'dialog', jodit.od.body);
4538
- if (dialog) {
4539
- body = dialog;
4540
- }
4541
- }
4542
- }
4645
+ body = getPopupViewRoot(view.o, view.container, jodit.od.body);
4543
4646
  if (createInsideEditor &&
4544
- (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) &&
4647
+ (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_8__/* .isJoditObject */ .y)(jodit) &&
4545
4648
  jodit.od !== jodit.ed) {
4546
4649
  c = jodit.createInside;
4547
4650
  const place = tag === 'style' ? jodit.ed.head : jodit.ed.body;
4548
4651
  body =
4549
- (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
4652
+ (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_8__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
4550
4653
  ? jodit.o.shadowRoot
4551
4654
  : place;
4552
4655
  }
4553
4656
  const box = c.element(tag, {
4554
- className: `jodit jodit-${(0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_8__/* .kebabCase */ .k)(name)}-container jodit-box`
4657
+ className: `jodit jodit-${(0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_9__/* .kebabCase */ .k)(name)}-container jodit-box`
4555
4658
  });
4556
4659
  box.classList.add(`jodit_theme_${view.o.theme || 'default'}`);
4557
4660
  body.appendChild(box);
4558
4661
  data[key] = box;
4559
4662
  jodit.hookStatus('beforeDestruct', () => {
4560
4663
  view.events.off(box);
4561
- _dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(box);
4664
+ _dom__WEBPACK_IMPORTED_MODULE_4__/* .Dom */ .J.safeRemove(box);
4562
4665
  delete data[key];
4563
4666
  if (Object.keys(data).length) {
4564
4667
  boxes.delete(jodit);
@@ -4571,10 +4674,20 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
4571
4674
  data[key].classList.add(`jodit_theme_${view.o.theme || 'default'}`);
4572
4675
  return data[key];
4573
4676
  }
4677
+ /**
4678
+ * Get root element for view
4679
+ * @internal
4680
+ */
4681
+ function getPopupViewRoot(o, container, defaultRoot) {
4682
+ var _a, _b, _c;
4683
+ return ((_c = (_b = (_a = o.popupRoot) !== null && _a !== void 0 ? _a : o.shadowRoot) !== null && _b !== void 0 ? _b : _dom__WEBPACK_IMPORTED_MODULE_4__/* .Dom */ .J.closest(container, parentElement => _dom__WEBPACK_IMPORTED_MODULE_4__/* .Dom */ .J.isHTMLElement(parentElement) &&
4684
+ (_dom__WEBPACK_IMPORTED_MODULE_4__/* .Dom */ .J.isTag(parentElement, 'dialog') ||
4685
+ ['fixed', 'absolute'].includes((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.css)(parentElement, 'position'))), defaultRoot)) !== null && _c !== void 0 ? _c : defaultRoot);
4686
+ }
4574
4687
  /**
4575
4688
  * Global event emitter
4576
4689
  */
4577
- const eventEmitter = new _event_emitter__WEBPACK_IMPORTED_MODULE_4__/* .EventEmitter */ .bk();
4690
+ const eventEmitter = new _event_emitter__WEBPACK_IMPORTED_MODULE_5__/* .EventEmitter */ .bk();
4578
4691
 
4579
4692
 
4580
4693
  /***/ }),
@@ -8835,6 +8948,9 @@ const $$temp = () => {
8835
8948
  temp++;
8836
8949
  return temp;
8837
8950
  };
8951
+ /**
8952
+ * @deprecated Do not use it in new code
8953
+ */
8838
8954
  function $$(selector, root) {
8839
8955
  let result;
8840
8956
  if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_ES_NEXT &&
@@ -12888,9 +13004,10 @@ class Storage {
12888
13004
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12889
13005
  /* harmony export */ z: function() { return /* binding */ Dlgs; }
12890
13006
  /* harmony export */ });
12891
- /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9823);
12892
- /* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84976);
12893
- /* harmony import */ var jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(34256);
13007
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56298);
13008
+ /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9823);
13009
+ /* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84976);
13010
+ /* harmony import */ var jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(34256);
12894
13011
  /*!
12895
13012
  * Jodit Editor (https://xdsoft.net/jodit/)
12896
13013
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -12899,32 +13016,34 @@ class Storage {
12899
13016
 
12900
13017
 
12901
13018
 
13019
+
12902
13020
  class Dlgs {
12903
13021
  dlg(options) {
12904
- const dialog = new jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .lG(Object.assign({ language: this.o.language, shadowRoot: this.o.shadowRoot, ownerWindow: this.o.ownerWindow, defaultTimeout: this.o.defaultTimeout, direction: this.o.direction, theme: this.o.theme, globalFullSize: this.o.globalFullSize }, options));
12905
- (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .markOwner */ .b_)(this, dialog.container);
13022
+ const popupRoot = (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .getPopupViewRoot */ .ef)(this.o, this.container, this.od.body);
13023
+ const dialog = new jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_3__/* .Dialog */ .lG(Object.assign({ language: this.o.language, shadowRoot: this.o.shadowRoot, popupRoot, ownerWindow: this.o.ownerWindow, defaultTimeout: this.o.defaultTimeout, direction: this.o.direction, theme: this.o.theme, globalFullSize: this.o.globalFullSize }, options));
13024
+ (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .markOwner */ .b_)(this, dialog.container);
12906
13025
  dialog.parent = this;
12907
13026
  return dialog.bindDestruct(this);
12908
13027
  }
12909
13028
  confirm(msg, title, callback) {
12910
13029
  msg = processTitle(msg, this);
12911
13030
  title = processTitle(title, this);
12912
- return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__/* .Confirm */ .pT.call(this.dlg({ closeOnClickOverlay: true }), msg, title, callback);
13031
+ return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_3__/* .Confirm */ .pT.call(this.dlg({ closeOnClickOverlay: true }), msg, title, callback);
12913
13032
  }
12914
13033
  prompt(msg, title, callback, placeholder, defaultValue) {
12915
13034
  msg = processTitle(msg, this);
12916
13035
  title = processTitle(title, this);
12917
13036
  placeholder = processTitle(placeholder, this);
12918
- return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__/* .Prompt */ .XG.call(this.dlg({ closeOnClickOverlay: true }), msg, title, callback, placeholder, defaultValue);
13037
+ return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_3__/* .Prompt */ .XG.call(this.dlg({ closeOnClickOverlay: true }), msg, title, callback, placeholder, defaultValue);
12919
13038
  }
12920
13039
  alert(msg, title, callback, className) {
12921
13040
  msg = processTitle(msg, this);
12922
13041
  title = processTitle(title, this);
12923
- return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__/* .Alert */ .Fc.call(this.dlg({ closeOnClickOverlay: true }), msg, title, callback, className);
13042
+ return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_3__/* .Alert */ .Fc.call(this.dlg({ closeOnClickOverlay: true }), msg, title, callback, className);
12924
13043
  }
12925
13044
  }
12926
13045
  function processTitle(title, self) {
12927
- if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .Kg)(title) && !(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isHTML */ .AH)(title)) {
13046
+ if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(title) && !(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isHTML */ .AH)(title)) {
12928
13047
  title = self.i18n(title);
12929
13048
  }
12930
13049
  return title;
@@ -16223,19 +16342,18 @@ let View = View_1 = class View extends jodit_core_component_component__WEBPACK_I
16223
16342
  }
16224
16343
  /** @override */
16225
16344
  destruct() {
16345
+ var _a, _b, _c;
16226
16346
  if (this.isDestructed) {
16227
16347
  return;
16228
16348
  }
16229
- this.progressbar.destruct();
16230
- this.message.destruct();
16349
+ (_a = (0,jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'progressbar')) === null || _a === void 0 ? void 0 : _a.destruct();
16350
+ (_b = (0,jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'message')) === null || _b === void 0 ? void 0 : _b.destruct();
16231
16351
  if (this.events) {
16232
16352
  this.events.destruct();
16233
16353
  // @ts-ignore
16234
16354
  this.events = undefined;
16235
16355
  }
16236
- if (this.buffer) {
16237
- this.buffer.clear();
16238
- }
16356
+ (_c = (0,jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'buffer')) === null || _c === void 0 ? void 0 : _c.clear();
16239
16357
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_7__/* .Dom */ .J.safeRemove(this.container);
16240
16358
  super.destruct();
16241
16359
  }
@@ -17453,20 +17571,21 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17453
17571
  * Jodit's Destructor. Remove editor, and return source input
17454
17572
  */
17455
17573
  destruct() {
17574
+ var _a, _b;
17456
17575
  if (this.isInDestruct) {
17457
17576
  return;
17458
17577
  }
17459
17578
  this.setStatus(jodit_modules__WEBPACK_IMPORTED_MODULE_7__.STATUSES.beforeDestruct);
17460
17579
  this.__elementToPlace.clear();
17461
- this.storage.clear();
17462
- this.buffer.clear();
17580
+ (_a = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'storage')) === null || _a === void 0 ? void 0 : _a.clear();
17581
+ (_b = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'buffer')) === null || _b === void 0 ? void 0 : _b.clear();
17463
17582
  this.commands.clear();
17464
17583
  this.__selectionLocked = null;
17465
17584
  this.e.off(this.ow, 'resize');
17466
17585
  this.e.off(this.ow);
17467
17586
  this.e.off(this.od);
17468
17587
  this.e.off(this.od.body);
17469
- const buffer = this.editor ? this.getEditorValue() : '';
17588
+ const tmpValue = this.editor ? this.getEditorValue() : '';
17470
17589
  this.places.forEach(({ container, workplace, statusbar, element, iframe, editor, history }) => {
17471
17590
  if (!element) {
17472
17591
  return;
@@ -17510,7 +17629,7 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17510
17629
  jodit_modules__WEBPACK_IMPORTED_MODULE_7__.Dom.safeRemove(iframe);
17511
17630
  // inline mode
17512
17631
  if (container === element) {
17513
- element.innerHTML = buffer;
17632
+ element.innerHTML = tmpValue;
17514
17633
  }
17515
17634
  history.destruct();
17516
17635
  });
@@ -17950,8 +18069,14 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
17950
18069
  return 'Dialog';
17951
18070
  }
17952
18071
  get destination() {
17953
- var _a;
17954
- return ((_a = this.o.shadowRoot) !== null && _a !== void 0 ? _a : this.od.body);
18072
+ const { popupRoot, shadowRoot } = this.o;
18073
+ if (popupRoot) {
18074
+ return popupRoot;
18075
+ }
18076
+ if (shadowRoot) {
18077
+ return shadowRoot;
18078
+ }
18079
+ return this.od.body;
17955
18080
  }
17956
18081
  setElements(root, elements) {
17957
18082
  const elements_list = [];
@@ -17980,14 +18105,14 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
17980
18105
  }
17981
18106
  });
17982
18107
  }
17983
- onMouseUp() {
18108
+ __onMouseUp() {
17984
18109
  if (this.draggable || this.resizable) {
17985
- this.removeGlobalResizeListeners();
18110
+ this.__removeGlobalResizeListeners();
17986
18111
  this.draggable = false;
17987
18112
  this.resizable = false;
17988
18113
  this.unlockSelect();
17989
18114
  if (this.e) {
17990
- this.removeGlobalResizeListeners();
18115
+ this.__removeGlobalResizeListeners();
17991
18116
  /**
17992
18117
  * Fired when the dialog box is finished to resizing
17993
18118
  */
@@ -17998,7 +18123,7 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
17998
18123
  /**
17999
18124
  *
18000
18125
  */
18001
- onHeaderMouseDown(e) {
18126
+ __onHeaderMouseDown(e) {
18002
18127
  const target = e.target;
18003
18128
  if (!this.o.draggable ||
18004
18129
  (target && target.nodeName.match(/^(INPUT|SELECT)$/))) {
@@ -18014,7 +18139,7 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
18014
18139
  e.preventDefault();
18015
18140
  }
18016
18141
  this.lockSelect();
18017
- this.addGlobalResizeListeners();
18142
+ this.__addGlobalResizeListeners();
18018
18143
  if (this.e) {
18019
18144
  /**
18020
18145
  * Fired when dialog box is started moving
@@ -18023,7 +18148,7 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
18023
18148
  this.e.fire('closeAllPopups');
18024
18149
  }
18025
18150
  }
18026
- onMouseMove(e) {
18151
+ __onMouseMove(e) {
18027
18152
  if (this.draggable && this.o.draggable) {
18028
18153
  this.setPosition(this.startPoint.x + e.clientX - this.startX, this.startPoint.y + e.clientY - this.startY);
18029
18154
  if (this.e) {
@@ -18044,7 +18169,7 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
18044
18169
  }
18045
18170
  }
18046
18171
  }
18047
- onEsc(e) {
18172
+ __onEsc(e) {
18048
18173
  if (!this.o.closeOnEsc) {
18049
18174
  return;
18050
18175
  }
@@ -18061,14 +18186,14 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
18061
18186
  e.stopImmediatePropagation();
18062
18187
  }
18063
18188
  }
18064
- onResizerMouseDown(e) {
18189
+ __onResizerMouseDown(e) {
18065
18190
  this.resizable = true;
18066
18191
  this.startX = e.clientX;
18067
18192
  this.startY = e.clientY;
18068
18193
  this.startPoint.w = this.dialog.offsetWidth;
18069
18194
  this.startPoint.h = this.dialog.offsetHeight;
18070
18195
  this.lockSelect();
18071
- this.addGlobalResizeListeners();
18196
+ this.__addGlobalResizeListeners();
18072
18197
  if (this.e) {
18073
18198
  /**
18074
18199
  * Fired when dialog box is started resizing
@@ -18076,17 +18201,17 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
18076
18201
  this.e.fire(this, 'startResize');
18077
18202
  }
18078
18203
  }
18079
- addGlobalResizeListeners() {
18204
+ __addGlobalResizeListeners() {
18080
18205
  const self = this;
18081
18206
  self.e
18082
- .on(self.ow, 'pointermove touchmove', self.onMouseMove)
18083
- .on(self.ow, 'pointerup touchend', self.onMouseUp);
18207
+ .on(self.ow, 'pointermove touchmove', self.__onMouseMove)
18208
+ .on(self.ow, 'pointerup touchend', self.__onMouseUp);
18084
18209
  }
18085
- removeGlobalResizeListeners() {
18210
+ __removeGlobalResizeListeners() {
18086
18211
  const self = this;
18087
18212
  self.e
18088
- .off(self.ow, 'mousemove pointermove', self.onMouseMove)
18089
- .off(self.ow, 'mouseup pointerup', self.onMouseUp);
18213
+ .off(self.ow, 'mousemove pointermove', self.__onMouseMove)
18214
+ .off(self.ow, 'mouseup pointerup', self.__onMouseUp);
18090
18215
  }
18091
18216
  /**
18092
18217
  * Specifies the size of the window
@@ -18342,7 +18467,7 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
18342
18467
  this.toggleFullSize(false);
18343
18468
  }
18344
18469
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(this.container);
18345
- this.removeGlobalResizeListeners();
18470
+ this.__removeGlobalResizeListeners();
18346
18471
  /**
18347
18472
  * It called after the window is closed
18348
18473
  */
@@ -18368,7 +18493,7 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
18368
18493
  this.unlockSelect = () => {
18369
18494
  this.setMod('moved', false);
18370
18495
  };
18371
- this.onResize = () => {
18496
+ this.__onResize = () => {
18372
18497
  if (this.options &&
18373
18498
  this.o.resizable &&
18374
18499
  !this.moved &&
@@ -18436,14 +18561,14 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
18436
18561
  });
18437
18562
  const headerBox = self.getElm('header');
18438
18563
  headerBox &&
18439
- self.e.on(headerBox, 'pointerdown touchstart', self.onHeaderMouseDown);
18440
- self.e.on(self.resizer, 'mousedown touchstart', self.onResizerMouseDown);
18564
+ self.e.on(headerBox, 'pointerdown touchstart', self.__onHeaderMouseDown);
18565
+ self.e.on(self.resizer, 'mousedown touchstart', self.__onResizerMouseDown);
18441
18566
  const fullSize = jodit_core_global__WEBPACK_IMPORTED_MODULE_4__/* .pluginSystem */ .fg.get('fullsize');
18442
18567
  (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_6__/* .isFunction */ .Tn)(fullSize) && fullSize(self);
18443
18568
  this.e
18444
18569
  .on(self.container, 'close_dialog', self.close)
18445
- .on(this.ow, 'keydown', this.onEsc)
18446
- .on(this.ow, 'resize', this.onResize);
18570
+ .on(this.ow, 'keydown', this.__onEsc)
18571
+ .on(this.ow, 'resize', this.__onResize);
18447
18572
  if (this.o.closeOnClickOverlay) {
18448
18573
  const overlay = self.getElm('overlay');
18449
18574
  void 0;
@@ -18472,30 +18597,30 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
18472
18597
  this.close();
18473
18598
  }
18474
18599
  if (this.events) {
18475
- this.removeGlobalResizeListeners();
18600
+ this.__removeGlobalResizeListeners();
18476
18601
  this.events
18477
18602
  .off(this.container, 'close_dialog', self.close)
18478
- .off(this.ow, 'keydown', this.onEsc)
18479
- .off(this.ow, 'resize', this.onResize);
18603
+ .off(this.ow, 'keydown', this.__onEsc)
18604
+ .off(this.ow, 'resize', this.__onResize);
18480
18605
  }
18481
18606
  super.destruct();
18482
18607
  }
18483
18608
  };
18484
18609
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .Cg)([
18485
18610
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
18486
- ], Dialog.prototype, "onMouseUp", null);
18611
+ ], Dialog.prototype, "__onMouseUp", null);
18487
18612
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .Cg)([
18488
18613
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
18489
- ], Dialog.prototype, "onHeaderMouseDown", null);
18614
+ ], Dialog.prototype, "__onHeaderMouseDown", null);
18490
18615
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .Cg)([
18491
18616
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
18492
- ], Dialog.prototype, "onMouseMove", null);
18617
+ ], Dialog.prototype, "__onMouseMove", null);
18493
18618
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .Cg)([
18494
18619
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
18495
- ], Dialog.prototype, "onEsc", null);
18620
+ ], Dialog.prototype, "__onEsc", null);
18496
18621
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .Cg)([
18497
18622
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
18498
- ], Dialog.prototype, "onResizerMouseDown", null);
18623
+ ], Dialog.prototype, "__onResizerMouseDown", null);
18499
18624
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .Cg)([
18500
18625
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
18501
18626
  ], Dialog.prototype, "close", null);
@@ -20127,11 +20252,12 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
20127
20252
  self.setStatus(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready);
20128
20253
  }
20129
20254
  destruct() {
20255
+ var _a;
20130
20256
  if (this.isInDestruct) {
20131
20257
  return;
20132
20258
  }
20259
+ (_a = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cached)(this, '_dialog')) === null || _a === void 0 ? void 0 : _a.destruct();
20133
20260
  super.destruct();
20134
- this._dialog.destruct();
20135
20261
  this.events && this.e.off('.filebrowser');
20136
20262
  this.uploader && this.uploader.destruct();
20137
20263
  }
@@ -27806,9 +27932,10 @@ function visitNodeWalker(jodit, nodeElm, allowTags, denyTags, currentSelectionNo
27806
27932
  "use strict";
27807
27933
  /* unused harmony export clipboard */
27808
27934
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
27809
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56298);
27810
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65147);
27811
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51329);
27935
+ /* harmony import */ var jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87875);
27936
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
27937
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65147);
27938
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(51329);
27812
27939
  /*!
27813
27940
  * Jodit Editor (https://xdsoft.net/jodit/)
27814
27941
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -27818,6 +27945,7 @@ function visitNodeWalker(jodit, nodeElm, allowTags, denyTags, currentSelectionNo
27818
27945
 
27819
27946
 
27820
27947
 
27948
+
27821
27949
  /**
27822
27950
  * Clipboard plugin - cut and copy functionality
27823
27951
  */
@@ -27851,11 +27979,11 @@ class clipboard {
27851
27979
  .on(`copy.${jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID} cut.${jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID}`, (event) => {
27852
27980
  var _a;
27853
27981
  const selectedText = editor.s.html;
27854
- const clipboardData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.getDataTransfer)(event) ||
27855
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.getDataTransfer)(editor.ew) ||
27856
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.getDataTransfer)(event.originalEvent);
27982
+ const clipboardData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.getDataTransfer)(event) ||
27983
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.getDataTransfer)(editor.ew) ||
27984
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.getDataTransfer)(event.originalEvent);
27857
27985
  if (clipboardData) {
27858
- clipboardData.setData(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.stripTags)(selectedText));
27986
+ clipboardData.setData(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.stripTags)(selectedText));
27859
27987
  clipboardData.setData(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.TEXT_HTML, selectedText);
27860
27988
  }
27861
27989
  editor.buffer.set(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID, selectedText);
@@ -27875,11 +28003,11 @@ class clipboard {
27875
28003
  /** @override */
27876
28004
  destruct(editor) {
27877
28005
  var _a, _b;
27878
- (_a = editor === null || editor === void 0 ? void 0 : editor.buffer) === null || _a === void 0 ? void 0 : _a.set(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID, '');
28006
+ (_a = (0,jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_1__/* .cached */ .PO)(editor, 'buffer')) === null || _a === void 0 ? void 0 : _a.set(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID, '');
27879
28007
  (_b = editor === null || editor === void 0 ? void 0 : editor.events) === null || _b === void 0 ? void 0 : _b.off('.' + jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID);
27880
28008
  }
27881
28009
  }
27882
- jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('clipboard', clipboard);
28010
+ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('clipboard', clipboard);
27883
28011
 
27884
28012
 
27885
28013
  /***/ }),
@@ -31255,13 +31383,14 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
31255
31383
  class imageProcessor extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
31256
31384
  afterInit(jodit) { }
31257
31385
  beforeDestruct(jodit) {
31258
- const list = jodit.buffer.get(JODIT_IMAGE_BLOB_ID);
31259
- if (list) {
31386
+ const buffer = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.cached)(jodit, 'buffer');
31387
+ const list = buffer === null || buffer === void 0 ? void 0 : buffer.get(JODIT_IMAGE_BLOB_ID);
31388
+ if (buffer && list) {
31260
31389
  const keys = Object.keys(list);
31261
31390
  for (const uri of keys) {
31262
31391
  URL.revokeObjectURL(uri);
31263
31392
  }
31264
- jodit.buffer.delete(JODIT_IMAGE_BLOB_ID);
31393
+ buffer.delete(JODIT_IMAGE_BLOB_ID);
31265
31394
  }
31266
31395
  }
31267
31396
  onAfterGetValueFromEditor(data, consumer) {
@@ -38703,7 +38832,8 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
38703
38832
  }
38704
38833
  /** @override */
38705
38834
  beforeDestruct(jodit) {
38706
- this.ui.destruct();
38835
+ var _a;
38836
+ (_a = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'ui')) === null || _a === void 0 ? void 0 : _a.destruct();
38707
38837
  jodit.e.off('.search');
38708
38838
  }
38709
38839
  }