jodit-pro-react 5.4.23 → 5.4.25
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.
|
@@ -182,7 +182,7 @@ var APP_VERSION, ES, IS_ES_MODERN, IS_ES_NEXT, IS_PROD, IS_TEST, FAT_MODE, HOMEP
|
|
|
182
182
|
var init_constants = __esm({
|
|
183
183
|
"node_modules/jodit/esm/core/constants.js"() {
|
|
184
184
|
"use strict";
|
|
185
|
-
APP_VERSION = "4.9.
|
|
185
|
+
APP_VERSION = "4.9.13";
|
|
186
186
|
ES = "es2020";
|
|
187
187
|
IS_ES_MODERN = true;
|
|
188
188
|
IS_ES_NEXT = true;
|
|
@@ -2269,7 +2269,7 @@ var init_dom = __esm({
|
|
|
2269
2269
|
}
|
|
2270
2270
|
/**
|
|
2271
2271
|
* Get temporary list
|
|
2272
|
-
* @deprecated
|
|
2272
|
+
* @deprecated Just do not use it, it is not needed anymore
|
|
2273
2273
|
*/
|
|
2274
2274
|
static temporaryList(root) {
|
|
2275
2275
|
return toArray(root.querySelectorAll(`[${TEMP_ATTR}]`));
|
|
@@ -7599,6 +7599,7 @@ init_component3();
|
|
|
7599
7599
|
init_derive();
|
|
7600
7600
|
init_dom();
|
|
7601
7601
|
init_is_string();
|
|
7602
|
+
init_attr();
|
|
7602
7603
|
|
|
7603
7604
|
// node_modules/jodit/esm/core/traits/elms.js
|
|
7604
7605
|
init_to_array();
|
|
@@ -7664,6 +7665,10 @@ var __decorate2 = function(decorators, target, key3, desc) {
|
|
|
7664
7665
|
};
|
|
7665
7666
|
var UIElement_1;
|
|
7666
7667
|
var UIElement = UIElement_1 = class UIElement2 extends ViewComponent {
|
|
7668
|
+
getRole() {
|
|
7669
|
+
var _a2;
|
|
7670
|
+
return ((_a2 = this.options) === null || _a2 === void 0 ? void 0 : _a2.role) || "";
|
|
7671
|
+
}
|
|
7667
7672
|
get parentElement() {
|
|
7668
7673
|
return this.__parentElement;
|
|
7669
7674
|
}
|
|
@@ -7761,13 +7766,15 @@ var UIElement = UIElement_1 = class UIElement2 extends ViewComponent {
|
|
|
7761
7766
|
parseTemplate(result) {
|
|
7762
7767
|
return this.j.c.fromHTML(result.replace(/\*([^*]+?)\*/g, (_12, name) => Icon.get(name) || "").replace(/&_/g, this.componentName + "_").replace(/~([^~]+?)~/g, (_12, s50) => this.i18n(s50)));
|
|
7763
7768
|
}
|
|
7764
|
-
/** @override */
|
|
7765
7769
|
constructor(jodit, options2) {
|
|
7766
7770
|
super(jodit);
|
|
7767
7771
|
this.name = "";
|
|
7768
7772
|
this.__parentElement = null;
|
|
7769
7773
|
this.mods = {};
|
|
7774
|
+
this.options = options2;
|
|
7770
7775
|
this.container = this.createContainer(options2);
|
|
7776
|
+
const role = this.getRole();
|
|
7777
|
+
role && attr(this.container, "role", role);
|
|
7771
7778
|
Object.defineProperty(this.container, "component", {
|
|
7772
7779
|
value: this,
|
|
7773
7780
|
configurable: true
|
|
@@ -7866,7 +7873,7 @@ var UIButton = class UIButton2 extends UIElement {
|
|
|
7866
7873
|
}
|
|
7867
7874
|
onChangeText() {
|
|
7868
7875
|
this.text.textContent = this.jodit.i18n(this.state.text);
|
|
7869
|
-
this.
|
|
7876
|
+
this.updateAriaLabel();
|
|
7870
7877
|
}
|
|
7871
7878
|
onChangeTextSetMode() {
|
|
7872
7879
|
this.setMod("text-icons", Boolean(this.state.text.trim().length));
|
|
@@ -7889,9 +7896,9 @@ var UIButton = class UIButton2 extends UIElement {
|
|
|
7889
7896
|
attr(this.container, "title", i8nTooltip);
|
|
7890
7897
|
}
|
|
7891
7898
|
attr(this.container, "aria-label", i8nTooltip);
|
|
7892
|
-
this.
|
|
7899
|
+
this.updateAriaLabel();
|
|
7893
7900
|
}
|
|
7894
|
-
|
|
7901
|
+
updateAriaLabel() {
|
|
7895
7902
|
const hasText = this.state.text.trim().length > 0;
|
|
7896
7903
|
const i8nTooltip = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : null;
|
|
7897
7904
|
attr(this.container, "aria-label", i8nTooltip);
|
|
@@ -8075,6 +8082,10 @@ var UIGroup = UIGroup_1 = class UIGroup2 extends UIElement {
|
|
|
8075
8082
|
className() {
|
|
8076
8083
|
return "UIGroup";
|
|
8077
8084
|
}
|
|
8085
|
+
getRole() {
|
|
8086
|
+
var _a2;
|
|
8087
|
+
return ((_a2 = this.options) === null || _a2 === void 0 ? void 0 : _a2.role) || "list";
|
|
8088
|
+
}
|
|
8078
8089
|
/**
|
|
8079
8090
|
* All group children
|
|
8080
8091
|
*/
|
|
@@ -9585,18 +9596,20 @@ var UIList = class UIList2 extends UIGroup {
|
|
|
9585
9596
|
this.mode = "horizontal";
|
|
9586
9597
|
this.removeButtons = [];
|
|
9587
9598
|
}
|
|
9588
|
-
/** @override */
|
|
9589
9599
|
className() {
|
|
9590
9600
|
return "UIList";
|
|
9591
9601
|
}
|
|
9602
|
+
getRole() {
|
|
9603
|
+
return "list";
|
|
9604
|
+
}
|
|
9592
9605
|
__onChangeMode() {
|
|
9593
9606
|
this.setMod("mode", this.mode);
|
|
9594
9607
|
}
|
|
9595
9608
|
/**
|
|
9596
9609
|
* Make new group and append it in list of elements
|
|
9597
9610
|
*/
|
|
9598
|
-
makeGroup() {
|
|
9599
|
-
return new UIGroup(this.jodit);
|
|
9611
|
+
makeGroup(role) {
|
|
9612
|
+
return new UIGroup(this.jodit, [], role ? { role } : void 0);
|
|
9600
9613
|
}
|
|
9601
9614
|
/**
|
|
9602
9615
|
* All buttons from list
|
|
@@ -9618,7 +9631,7 @@ var UIList = class UIList2 extends UIGroup {
|
|
|
9618
9631
|
items = splitArray(items);
|
|
9619
9632
|
this.clear();
|
|
9620
9633
|
let lastBtnSeparator = false;
|
|
9621
|
-
let line = this.makeGroup();
|
|
9634
|
+
let line = this.makeGroup("group");
|
|
9622
9635
|
this.append(line);
|
|
9623
9636
|
line.setMod("line", true);
|
|
9624
9637
|
let group;
|
|
@@ -9626,7 +9639,7 @@ var UIList = class UIList2 extends UIGroup {
|
|
|
9626
9639
|
let elm = null;
|
|
9627
9640
|
switch (control.name) {
|
|
9628
9641
|
case "\n":
|
|
9629
|
-
line = this.makeGroup();
|
|
9642
|
+
line = this.makeGroup("group");
|
|
9630
9643
|
line.setMod("line", true);
|
|
9631
9644
|
group = this.makeGroup();
|
|
9632
9645
|
line.append(group);
|
|
@@ -15178,6 +15191,16 @@ var ToolbarButton = class ToolbarButton2 extends UIButton {
|
|
|
15178
15191
|
className() {
|
|
15179
15192
|
return "ToolbarButton";
|
|
15180
15193
|
}
|
|
15194
|
+
getRole() {
|
|
15195
|
+
return "listitem";
|
|
15196
|
+
}
|
|
15197
|
+
updateAriaLabel() {
|
|
15198
|
+
super.updateAriaLabel();
|
|
15199
|
+
if (this.trigger) {
|
|
15200
|
+
const i8nTooltip = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : null;
|
|
15201
|
+
attr(this.trigger, "aria-label", i8nTooltip);
|
|
15202
|
+
}
|
|
15203
|
+
}
|
|
15181
15204
|
/**
|
|
15182
15205
|
* Get parent toolbar
|
|
15183
15206
|
*/
|
|
@@ -15248,14 +15271,13 @@ var ToolbarButton = class ToolbarButton2 extends UIButton {
|
|
|
15248
15271
|
const cn = this.componentName;
|
|
15249
15272
|
const container = this.j.c.span(cn);
|
|
15250
15273
|
const button = super.createContainer();
|
|
15251
|
-
attr(container, "role", "listitem");
|
|
15252
15274
|
button.classList.remove(cn);
|
|
15253
15275
|
button.classList.add(cn + "__button");
|
|
15254
15276
|
Object.defineProperty(button, "component", {
|
|
15255
15277
|
value: this
|
|
15256
15278
|
});
|
|
15257
15279
|
container.appendChild(button);
|
|
15258
|
-
const trigger = this.j.c.fromHTML(`<span role="
|
|
15280
|
+
const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${Icon.get("chevron")}</span>`);
|
|
15259
15281
|
button.appendChild(trigger);
|
|
15260
15282
|
return container;
|
|
15261
15283
|
}
|
|
@@ -15350,6 +15372,7 @@ var ToolbarButton = class ToolbarButton2 extends UIButton {
|
|
|
15350
15372
|
return;
|
|
15351
15373
|
}
|
|
15352
15374
|
const { control: ctr } = this;
|
|
15375
|
+
attr(this.trigger, "aria-expanded", true);
|
|
15353
15376
|
e40.buffer = {
|
|
15354
15377
|
actionTrigger: this
|
|
15355
15378
|
};
|
|
@@ -15452,6 +15475,9 @@ var ToolbarButton = class ToolbarButton2 extends UIButton {
|
|
|
15452
15475
|
this.openedPopup.close();
|
|
15453
15476
|
this.openedPopup.destruct();
|
|
15454
15477
|
this.openedPopup = null;
|
|
15478
|
+
if (this.trigger) {
|
|
15479
|
+
attr(this.trigger, "aria-expanded", false);
|
|
15480
|
+
}
|
|
15455
15481
|
}
|
|
15456
15482
|
}
|
|
15457
15483
|
/**
|
|
@@ -15616,6 +15642,9 @@ var ToolbarCollection = class ToolbarCollection2 extends UIList {
|
|
|
15616
15642
|
className() {
|
|
15617
15643
|
return "ToolbarCollection";
|
|
15618
15644
|
}
|
|
15645
|
+
getRole() {
|
|
15646
|
+
return "toolbar";
|
|
15647
|
+
}
|
|
15619
15648
|
/**
|
|
15620
15649
|
* First button in a list
|
|
15621
15650
|
*/
|
|
@@ -15810,6 +15839,7 @@ var ToolbarEditorCollection = class ToolbarEditorCollection2 extends ToolbarColl
|
|
|
15810
15839
|
*/
|
|
15811
15840
|
prependInvisibleInput(container) {
|
|
15812
15841
|
const input = this.j.create.element("input", {
|
|
15842
|
+
name: "jodit-toolbar-focus-helper_" + this.j.id,
|
|
15813
15843
|
tabIndex: -1,
|
|
15814
15844
|
disabled: true,
|
|
15815
15845
|
// Because <label> can trigger click
|
|
@@ -30666,7 +30696,9 @@ var import_dtd = __toESM(require_dtd());
|
|
|
30666
30696
|
init_constants();
|
|
30667
30697
|
init_dom2();
|
|
30668
30698
|
init_global2();
|
|
30669
|
-
|
|
30699
|
+
init_trim();
|
|
30700
|
+
init_attr();
|
|
30701
|
+
init_selector();
|
|
30670
30702
|
init_plugin2();
|
|
30671
30703
|
|
|
30672
30704
|
// node_modules/jodit/esm/plugins/xpath/config.js
|
|
@@ -30768,6 +30800,7 @@ var xpath = class extends Plugin {
|
|
|
30768
30800
|
afterInit() {
|
|
30769
30801
|
if (this.j.o.showXPathInStatusbar) {
|
|
30770
30802
|
this.container = this.j.c.div("jodit-xpath");
|
|
30803
|
+
attr(this.container, "role", "list");
|
|
30771
30804
|
const init2 = () => {
|
|
30772
30805
|
if (!this.j.o.showXPathInStatusbar || !this.container) {
|
|
30773
30806
|
return;
|
|
@@ -30782,7 +30815,7 @@ var xpath = class extends Plugin {
|
|
|
30782
30815
|
this.appendSelectAll();
|
|
30783
30816
|
}
|
|
30784
30817
|
};
|
|
30785
|
-
this.j.e.off(".xpath").on("
|
|
30818
|
+
this.j.e.off(".xpath").on("pointerup.xpath change.xpath keydown.xpath changeSelection.xpath", this.calcPath).on("afterSetMode.xpath afterInit.xpath changePlace.xpath", init2);
|
|
30786
30819
|
init2();
|
|
30787
30820
|
this.calcPath();
|
|
30788
30821
|
}
|