jodit-pro-react 5.5.64 → 5.5.66

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JoditEditor_default
3
- } from "./chunk-LIIC3OLB.mjs";
3
+ } from "./chunk-K47R7SQU.mjs";
4
4
  export {
5
5
  JoditEditor_default as default
6
6
  };
@@ -193,7 +193,7 @@ var APP_VERSION, ES, IS_ES_MODERN, IS_ES_NEXT, IS_PROD, IS_TEST, FAT_MODE, HOMEP
193
193
  var init_constants = __esm({
194
194
  "node_modules/jodit/esm/core/constants.js"() {
195
195
  "use strict";
196
- APP_VERSION = "4.13.5";
196
+ APP_VERSION = "4.13.7";
197
197
  ES = "es2020";
198
198
  IS_ES_MODERN = true;
199
199
  IS_ES_NEXT = true;
@@ -12165,6 +12165,7 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
12165
12165
  this.isOpened = false;
12166
12166
  const self2 = this;
12167
12167
  self2.options = ConfigProto(options2, ConfigProto(Config.prototype.dialog, Dialog_1.defaultOptions));
12168
+ self2.attachEvents(self2.options);
12168
12169
  Dom.safeRemove(self2.container);
12169
12170
  const n57 = this.getFullElName.bind(this);
12170
12171
  self2.container = this.c.fromHTML(`<div class="jodit jodit-dialog ${this.componentName}">
@@ -15969,7 +15970,8 @@ var ToolbarButton = class ToolbarButton2 extends UIButton {
15969
15970
  button2.classList.remove(cn);
15970
15971
  button2.classList.add(cn + "__button");
15971
15972
  Object.defineProperty(button2, "component", {
15972
- value: this
15973
+ value: this,
15974
+ configurable: true
15973
15975
  });
15974
15976
  container.appendChild(button2);
15975
15977
  const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${Icon.get("chevron")}</span>`);
@@ -20649,11 +20651,12 @@ function tryRemoveNode(jodit, nodeElm, hadEffect, allowTags, denyTags, currentSe
20649
20651
  }
20650
20652
  function isRemovableNode(jodit, node, current, allow, deny) {
20651
20653
  if (!Dom.isText(node)) {
20652
- if (allow && !allow[node.nodeName]) {
20654
+ const name = node.nodeName.toUpperCase();
20655
+ if (allow && !allow[name]) {
20653
20656
  return true;
20654
20657
  }
20655
- const isTrustedEmbed = node.nodeName === "IFRAME" && isAllowedMediaEmbed(attr(node, "src") || "");
20656
- if (!allow && deny && deny[node.nodeName] && !isTrustedEmbed) {
20658
+ const isTrustedEmbed = name === "IFRAME" && isAllowedMediaEmbed(attr(node, "src") || "");
20659
+ if (!allow && deny && deny[name] && !isTrustedEmbed) {
20657
20660
  return true;
20658
20661
  }
20659
20662
  }
@@ -45482,11 +45485,11 @@ init_dom();
45482
45485
  init_plugin2();
45483
45486
  var _8 = Object.defineProperty;
45484
45487
  var c24 = (r59, t48) => _8(r59, "name", { value: t48, configurable: true });
45485
- var d26 = function(r59, t48, o57, e42) {
45486
- var s50 = arguments.length, i54 = s50 < 3 ? t48 : e42 === null ? e42 = Object.getOwnPropertyDescriptor(t48, o57) : e42, l57;
45487
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i54 = Reflect.decorate(r59, t48, o57, e42);
45488
- else for (var a77 = r59.length - 1; a77 >= 0; a77--) (l57 = r59[a77]) && (i54 = (s50 < 3 ? l57(i54) : s50 > 3 ? l57(t48, o57, i54) : l57(t48, o57)) || i54);
45489
- return s50 > 3 && i54 && Object.defineProperty(t48, o57, i54), i54;
45488
+ var d26 = function(r59, t48, e42, o57) {
45489
+ var s50 = arguments.length, i54 = s50 < 3 ? t48 : o57 === null ? o57 = Object.getOwnPropertyDescriptor(t48, e42) : o57, l57;
45490
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i54 = Reflect.decorate(r59, t48, e42, o57);
45491
+ else for (var a77 = r59.length - 1; a77 >= 0; a77--) (l57 = r59[a77]) && (i54 = (s50 < 3 ? l57(i54) : s50 > 3 ? l57(t48, e42, i54) : l57(t48, e42)) || i54);
45492
+ return s50 > 3 && i54 && Object.defineProperty(t48, e42, i54), i54;
45490
45493
  };
45491
45494
  var u31 = class u32 extends Plugin {
45492
45495
  constructor() {
@@ -45494,23 +45497,23 @@ var u31 = class u32 extends Plugin {
45494
45497
  }
45495
45498
  afterInit(t48) {
45496
45499
  t48.e.on("toggleButtonGenerator", this.toggleButtonGenerator).on("isButtonGeneratorOpened", () => {
45497
- var o57;
45498
- return (o57 = this.__dialog) === null || o57 === void 0 ? void 0 : o57.isOpened;
45500
+ var e42;
45501
+ return (e42 = this.__dialog) === null || e42 === void 0 ? void 0 : e42.isOpened;
45499
45502
  });
45500
45503
  }
45501
45504
  toggleButtonGenerator(t48) {
45502
- this.__dialog || (this.__dialog = new Dialog({ language: this.j.o.language, theme: this.j.o.theme, shadowRoot: this.j.o.shadowRoot }), this.__ui = new d25(this.__dialog), this.__dialog.setHeader("Button Generator").setContent(this.__ui).setSize(730, 700)), t48 && !Dom.isTag(t48, /* @__PURE__ */ new Set(["button", "a"])) && (t48 = void 0);
45503
- const o57 = this.__ui, e42 = this.__dialog;
45504
- e42.isOpened ? e42.close() : (t48 && p30.extractStyle(o57.state, t48), o57.target = t48, o57.update(), e42.setFooter([Button(e42, "cancel", "Cancel", "default").onAction(() => e42.close()), Button(e42, "ok", t48 ? "Update" : "Insert", "primary").onAction(() => {
45505
- t48 || (t48 = this.j.createInside.element(o57.state.href ? "a" : "button"), this.j.s.insertNode(t48, true, false)), p30.applyStyle(o57.state, t48), t48.className = o57.state.className || "", this.jodit.e.fire("synchro"), e42.close();
45505
+ this.__dialog || (this.__dialog = new Dialog({ language: this.j.o.language, theme: this.j.o.theme, shadowRoot: this.j.o.shadowRoot, events: this.j.o.events }), this.__ui = new d25(this.__dialog), this.__dialog.setHeader("Button Generator").setContent(this.__ui).setSize(730, 700)), t48 && !Dom.isTag(t48, /* @__PURE__ */ new Set(["button", "a"])) && (t48 = void 0);
45506
+ const e42 = this.__ui, o57 = this.__dialog;
45507
+ o57.isOpened ? o57.close() : (t48 && p30.extractStyle(e42.state, t48), e42.target = t48, e42.update(), o57.setFooter([Button(o57, "cancel", "Cancel", "default").onAction(() => o57.close()), Button(o57, "ok", t48 ? "Update" : "Insert", "primary").onAction(() => {
45508
+ t48 || (t48 = this.j.createInside.element(e42.state.href ? "a" : "button"), this.j.s.insertNode(t48, true, false)), p30.applyStyle(e42.state, t48), t48.className = e42.state.className || "", this.jodit.e.fire("synchro"), o57.close();
45506
45509
  })]).open());
45507
45510
  }
45508
45511
  onDblClick(t48) {
45509
45512
  Dom.isTag(t48.target, "button") && this.toggleButtonGenerator(t48.target);
45510
45513
  }
45511
45514
  beforeDestruct(t48) {
45512
- var o57;
45513
- (o57 = this.__dialog) === null || o57 === void 0 || o57.destruct();
45515
+ var e42;
45516
+ (e42 = this.__dialog) === null || e42 === void 0 || e42.destruct();
45514
45517
  }
45515
45518
  };
45516
45519
  c24(u31, "buttonGenerator");
@@ -2,7 +2,7 @@ import {
2
2
  Config,
3
3
  JoditEditor_default,
4
4
  n
5
- } from "./chunk-LIIC3OLB.mjs";
5
+ } from "./chunk-K47R7SQU.mjs";
6
6
 
7
7
  // src/index.ts
8
8
  var index_default = JoditEditor_default;