@progress/kendo-react-editor 9.4.0-develop.2 → 9.4.0-develop.21
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.
- package/Editor.js +1 -1
- package/Editor.mjs +0 -1
- package/NOTICE.txt +40 -51
- package/config/defaultStyles.js +1 -1
- package/config/defaultStyles.mjs +0 -1
- package/config/shortcuts.js +1 -1
- package/config/shortcuts.mjs +8 -9
- package/config/toolsSettings.js +1 -1
- package/config/toolsSettings.mjs +0 -1
- package/dialogs/FindReplace.js +1 -1
- package/dialogs/FindReplace.mjs +0 -1
- package/dialogs/index.js +1 -1
- package/dialogs/index.mjs +0 -1
- package/dialogs/insertImage.js +1 -1
- package/dialogs/insertImage.mjs +0 -1
- package/dialogs/insertLink.js +1 -1
- package/dialogs/insertLink.mjs +10 -11
- package/dialogs/viewHtml.js +1 -1
- package/dialogs/viewHtml.mjs +5 -6
- package/dist/cdn/js/kendo-react-editor.js +8 -1
- package/index.js +2 -1
- package/index.mjs +7 -7
- package/messages/index.js +1 -1
- package/messages/index.mjs +0 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +13 -13
- package/tools/align.js +1 -1
- package/tools/align.mjs +4 -5
- package/tools/applyColor.js +1 -1
- package/tools/applyColor.mjs +5 -6
- package/tools/cleanFormatting.js +1 -1
- package/tools/cleanFormatting.mjs +8 -9
- package/tools/findReplace.js +1 -1
- package/tools/findReplace.mjs +9 -10
- package/tools/fontStyle.js +1 -1
- package/tools/fontStyle.mjs +6 -7
- package/tools/formatBlock.js +1 -1
- package/tools/formatBlock.mjs +10 -11
- package/tools/history.js +1 -1
- package/tools/history.mjs +2 -3
- package/tools/indent.js +1 -1
- package/tools/indent.mjs +0 -1
- package/tools/index.js +1 -1
- package/tools/index.mjs +0 -1
- package/tools/inlineFormat.js +1 -1
- package/tools/inlineFormat.mjs +4 -5
- package/tools/insertImage.js +1 -1
- package/tools/insertImage.mjs +4 -5
- package/tools/insertLink.js +1 -1
- package/tools/insertLink.mjs +13 -14
- package/tools/insertTable/popup.js +1 -1
- package/tools/insertTable/popup.mjs +4 -5
- package/tools/insertTable/popupGrid.js +1 -1
- package/tools/insertTable/popupGrid.mjs +0 -1
- package/tools/insertTable/tool.js +1 -1
- package/tools/insertTable/tool.mjs +0 -1
- package/tools/lists-styled.js +1 -1
- package/tools/lists-styled.mjs +0 -1
- package/tools/lists.js +1 -1
- package/tools/lists.mjs +13 -14
- package/tools/outdent.js +1 -1
- package/tools/outdent.mjs +0 -1
- package/tools/pdf.js +1 -1
- package/tools/pdf.mjs +4 -5
- package/tools/print.js +1 -1
- package/tools/print.mjs +4 -5
- package/tools/proseMirrorTool.js +1 -1
- package/tools/proseMirrorTool.mjs +8 -9
- package/tools/selectAll.js +1 -1
- package/tools/selectAll.mjs +5 -6
- package/tools/table-wizard/cellPropsUtils.js +1 -1
- package/tools/table-wizard/cellPropsUtils.mjs +34 -35
- package/tools/table-wizard/tableCellProperties.js +1 -1
- package/tools/table-wizard/tableCellProperties.mjs +0 -1
- package/tools/table-wizard/tableProperties.js +1 -1
- package/tools/table-wizard/tableProperties.mjs +44 -45
- package/tools/table-wizard/tablePropsUtils.js +1 -1
- package/tools/table-wizard/tablePropsUtils.mjs +99 -100
- package/tools/table-wizard/utils.js +1 -1
- package/tools/table-wizard/utils.mjs +17 -18
- package/tools/tableEdit.js +1 -1
- package/tools/tableEdit.mjs +2 -3
- package/tools/unlink.js +1 -1
- package/tools/unlink.mjs +8 -9
- package/tools/utils.js +1 -1
- package/tools/utils.mjs +0 -1
- package/tools/viewHtml.js +1 -1
- package/tools/viewHtml.mjs +11 -12
- package/utils/browser-detection.js +1 -1
- package/utils/browser-detection.mjs +0 -1
- package/utils/controlled-value.js +1 -1
- package/utils/controlled-value.mjs +2 -3
- package/utils/index.js +1 -1
- package/utils/index.mjs +0 -1
- package/utils/props-key.js +1 -1
- package/utils/props-key.mjs +3 -4
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { pmDocToFragment as F, fragmentToHtml as j, TableMap as A, Selection as O, TextSelection as B, CellSelection as U, addColumnAfter as q, addRowAfter as G, parseContent as J } from "@progress/kendo-editor-common";
|
|
10
9
|
import { deleteColumnCmd as K, deleteRowCmd as L } from "../tableEdit.mjs";
|
|
11
10
|
import { selectedCells as P, parseStyle as S, nodeSize as _, tableCells as Q, setNodeStyle as h } from "./utils.mjs";
|
|
@@ -39,58 +38,58 @@ const N = {
|
|
|
39
38
|
center: { "margin-left": "auto", "margin-right": "auto" },
|
|
40
39
|
right: { "margin-left": "auto", "margin-right": "" },
|
|
41
40
|
"": {}
|
|
42
|
-
}, z = (
|
|
41
|
+
}, z = (o) => {
|
|
43
42
|
const t = [];
|
|
44
|
-
for (let s = 0; s <
|
|
45
|
-
const l = s *
|
|
46
|
-
t.push(
|
|
43
|
+
for (let s = 0; s < o.height; s++) {
|
|
44
|
+
const l = s * o.width, e = l + o.width;
|
|
45
|
+
t.push(o.map.slice(l, e));
|
|
47
46
|
}
|
|
48
47
|
return t;
|
|
49
|
-
}, V = (
|
|
48
|
+
}, V = (o, t) => {
|
|
50
49
|
let s = 0, l = 0;
|
|
51
50
|
const e = z(t);
|
|
52
|
-
e.forEach((
|
|
51
|
+
e.forEach((n) => {
|
|
53
52
|
let i = !0;
|
|
54
|
-
|
|
55
|
-
const c =
|
|
53
|
+
n.forEach((r) => {
|
|
54
|
+
const c = o.nodeAt(r);
|
|
56
55
|
c && c.type.name !== "table_header" && (i = !1);
|
|
57
56
|
}), i && s++;
|
|
58
57
|
});
|
|
59
|
-
for (let
|
|
58
|
+
for (let n = 0; n < t.width; n++) {
|
|
60
59
|
let i = !0;
|
|
61
60
|
for (let r = 0; r < t.height; r++) {
|
|
62
|
-
const c = e[r] && e[r][
|
|
61
|
+
const c = e[r] && e[r][n], u = typeof c == "number" && o.nodeAt(c);
|
|
63
62
|
u && u.type.name !== "table_header" && (i = !1);
|
|
64
63
|
}
|
|
65
64
|
i && l++;
|
|
66
65
|
}
|
|
67
66
|
return { rows: s, columns: l };
|
|
68
|
-
}, X = (
|
|
67
|
+
}, X = (o) => {
|
|
69
68
|
const t = /* @__PURE__ */ new Set();
|
|
70
|
-
return
|
|
69
|
+
return o.content.forEach((s) => {
|
|
71
70
|
s.content.forEach((l) => {
|
|
72
71
|
t.add(S(l.attrs.style).padding || "");
|
|
73
72
|
});
|
|
74
73
|
}), t.size === 1 ? Array.from(t)[0] : "";
|
|
75
|
-
}, Y = (
|
|
74
|
+
}, Y = (o) => {
|
|
76
75
|
let t = !0, s = !0;
|
|
77
|
-
return
|
|
76
|
+
return o.content.forEach((l) => {
|
|
78
77
|
l.content.forEach((e) => {
|
|
79
|
-
const
|
|
80
|
-
|
|
78
|
+
const n = e.type.name === "table_header", i = e.type.name === "table_cell";
|
|
79
|
+
n && !e.attrs.scope && (t = !1), (n && !e.attrs.id || i && !e.attrs.headers) && (s = !1);
|
|
81
80
|
});
|
|
82
81
|
}), t ? "scope" : s ? "id" : "none";
|
|
83
|
-
}, ce = (
|
|
82
|
+
}, ce = (o) => {
|
|
84
83
|
var p, a, b;
|
|
85
|
-
const t = P(
|
|
84
|
+
const t = P(o), s = o.selection.$from, l = t.length ? T(s, (f) => f.type.spec.tableRole === "table") : null;
|
|
86
85
|
if (!l)
|
|
87
86
|
return N;
|
|
88
87
|
const e = T(s, (f) => f.type.name === "table_wrapper");
|
|
89
|
-
let
|
|
88
|
+
let n = "", i = {}, r = {};
|
|
90
89
|
e && (r = S(e.node.attrs.style), e.node.content.forEach((f) => {
|
|
91
90
|
if (f.type.name === "table_caption_external") {
|
|
92
91
|
const y = F(f);
|
|
93
|
-
|
|
92
|
+
n = j(y), n = n === "<img>" ? "" : n, i = S(f.attrs.style);
|
|
94
93
|
}
|
|
95
94
|
}));
|
|
96
95
|
const c = S(((p = l.node.attrs) == null ? void 0 : p.style) || ""), u = A.get(l.node), d = r["margin-left"] === "auto" && r["margin-right"] === "auto" ? "center" : r["margin-right"] === "auto" ? "left" : r["margin-left"] === "auto" ? "right" : null, g = V(l.node, u), m = X(l.node);
|
|
@@ -110,7 +109,7 @@ const N = {
|
|
|
110
109
|
borderColor: c["border-color"],
|
|
111
110
|
borderStyle: c["border-style"] || null,
|
|
112
111
|
collapseBorders: c["border-collapse"] === "collapse",
|
|
113
|
-
caption:
|
|
112
|
+
caption: n || void 0,
|
|
114
113
|
captionAlignment: i["text-align"] || "",
|
|
115
114
|
captionPosition: i["caption-side"] || null,
|
|
116
115
|
headerRows: g.rows,
|
|
@@ -119,23 +118,23 @@ const N = {
|
|
|
119
118
|
id: ((a = l.node.attrs) == null ? void 0 : a.id) || "",
|
|
120
119
|
className: ((b = l.node.attrs) == null ? void 0 : b.class) || ""
|
|
121
120
|
};
|
|
122
|
-
}, $ = (
|
|
123
|
-
const s =
|
|
124
|
-
return { node: s, pos:
|
|
125
|
-
}, R = (
|
|
126
|
-
const
|
|
127
|
-
if (!
|
|
128
|
-
return
|
|
129
|
-
const c =
|
|
130
|
-
let g =
|
|
121
|
+
}, $ = (o) => {
|
|
122
|
+
const s = o.lastChild.lastChild;
|
|
123
|
+
return { node: s, pos: o.content.size - s.nodeSize };
|
|
124
|
+
}, R = (o, t, s, l, e) => {
|
|
125
|
+
const n = $(s), i = t + n.pos;
|
|
126
|
+
if (!o.doc.nodeAt(i))
|
|
127
|
+
return o;
|
|
128
|
+
const c = o.doc.resolve(i), u = new U(c, c), d = o.tr.setSelection(u);
|
|
129
|
+
let g = o.apply(d);
|
|
131
130
|
for (let m = 0; m < l; m++)
|
|
132
131
|
e(g, (p) => {
|
|
133
132
|
g = g.apply(p);
|
|
134
133
|
});
|
|
135
134
|
return g;
|
|
136
|
-
}, x = (
|
|
137
|
-
let e =
|
|
138
|
-
for (let
|
|
135
|
+
}, x = (o, t, s, l) => {
|
|
136
|
+
let e = o;
|
|
137
|
+
for (let n = 0; n < s; n++) {
|
|
139
138
|
const i = e.doc.nodeAt(t);
|
|
140
139
|
if (i) {
|
|
141
140
|
const r = $(i), c = t + r.pos, u = e.doc.resolve(c), d = new U(u, u), g = e.tr.setSelection(d);
|
|
@@ -145,40 +144,40 @@ const N = {
|
|
|
145
144
|
}
|
|
146
145
|
}
|
|
147
146
|
return e;
|
|
148
|
-
}, Z = (
|
|
149
|
-
let e =
|
|
150
|
-
if (!
|
|
147
|
+
}, Z = (o, t, s, l) => {
|
|
148
|
+
let e = o, n = e.doc.nodeAt(t);
|
|
149
|
+
if (!n)
|
|
151
150
|
return e;
|
|
152
|
-
let i = A.get(
|
|
153
|
-
return i.width === l && i.height === s || (l > i.width ? e = R(e, t,
|
|
154
|
-
}, W = (
|
|
155
|
-
const l =
|
|
151
|
+
let i = A.get(n);
|
|
152
|
+
return i.width === l && i.height === s || (l > i.width ? e = R(e, t, n, l - i.width, q) : l < i.width && (e = x(e, t, i.width - l, K)), n = e.doc.nodeAt(t), !n) || (i = A.get(n), s > i.height ? e = R(e, t, n, s - i.height, G) : s < i.height && (e = x(e, t, i.height - s, L))), e;
|
|
153
|
+
}, W = (o, t, s) => {
|
|
154
|
+
const l = o.doc.nodeAt(s);
|
|
156
155
|
if (!l)
|
|
157
|
-
return
|
|
156
|
+
return o;
|
|
158
157
|
let e = { ...l.attrs };
|
|
159
|
-
const
|
|
160
|
-
e = h(e, "width",
|
|
158
|
+
const n = t.width !== null && (t.widthUnit !== "%" || !t.caption && !t.position);
|
|
159
|
+
e = h(e, "width", n ? t.width + t.widthUnit : ""), e = h(e, "height", t.height !== null ? t.height + t.heightUnit : ""), e = h(e, "text-align", t.textAlign || ""), e = h(e, "background-color", t.backgroundColor || ""), e = h(e, "border-width", t.borderWidth ? t.borderWidth + "px" : ""), e = h(e, "border-style", t.borderStyle || ""), e = h(e, "border-color", t.borderColor || ""), e = h(e, "border-spacing", t.cellSpacing !== null ? t.cellSpacing + "px" : ""), t.cellSpacing !== null ? e = h(e, "border-collapse", "unset") : e = h(e, "border-collapse", t.collapseBorders ? "collapse" : "");
|
|
161
160
|
const i = k[t.position || ""] || {};
|
|
162
161
|
Object.keys(i).forEach((c) => {
|
|
163
162
|
e = h(e, c, i[c]);
|
|
164
163
|
}), e.id = t.id || null, e.class = t.className || null;
|
|
165
|
-
const r =
|
|
166
|
-
return
|
|
167
|
-
}, H = (
|
|
164
|
+
const r = o.tr.setNodeMarkup(s, null, e);
|
|
165
|
+
return o = o.apply(r), o;
|
|
166
|
+
}, H = (o, t, s, l, e) => {
|
|
168
167
|
if (t.type.name !== l.name || Object.keys(e).length > 0) {
|
|
169
|
-
const
|
|
170
|
-
return
|
|
168
|
+
const n = o.tr.setNodeMarkup(s, l, { ...t.attrs, ...e });
|
|
169
|
+
return o.apply(n);
|
|
171
170
|
}
|
|
172
|
-
return
|
|
173
|
-
}, I = (
|
|
174
|
-
/^cell-[0-9]+-[0-9]+$/.test(
|
|
175
|
-
}, ee = (
|
|
176
|
-
const l =
|
|
171
|
+
return o;
|
|
172
|
+
}, I = (o, t) => {
|
|
173
|
+
/^cell-[0-9]+-[0-9]+$/.test(o.attrs.id || "") && (t.id = null);
|
|
174
|
+
}, ee = (o, t, s) => {
|
|
175
|
+
const l = o.doc.nodeAt(s), e = l && A.get(l);
|
|
177
176
|
if (!l || !e)
|
|
178
|
-
return
|
|
179
|
-
const
|
|
180
|
-
let i =
|
|
181
|
-
const { table_header: r, table_cell: c } =
|
|
177
|
+
return o;
|
|
178
|
+
const n = z(e);
|
|
179
|
+
let i = o;
|
|
180
|
+
const { table_header: r, table_cell: c } = o.schema.nodes, u = String((/* @__PURE__ */ new Date()).getTime()), d = [], g = (p, a) => {
|
|
182
181
|
const b = `cell-${p}${a}-${u}`;
|
|
183
182
|
return d[p] || d.push([]), d[p][a] || d[p].push([]), d[p][a] = b, b;
|
|
184
183
|
}, m = (p, a, b, f) => {
|
|
@@ -191,7 +190,7 @@ const N = {
|
|
|
191
190
|
d[p] && d[p][w] && y.push(d[p][w]);
|
|
192
191
|
return y.join(" ");
|
|
193
192
|
};
|
|
194
|
-
return
|
|
193
|
+
return n.forEach((p, a) => {
|
|
195
194
|
p.forEach((b, f) => {
|
|
196
195
|
const y = l.nodeAt(b);
|
|
197
196
|
if (y) {
|
|
@@ -200,40 +199,40 @@ const N = {
|
|
|
200
199
|
}
|
|
201
200
|
});
|
|
202
201
|
}), i;
|
|
203
|
-
}, te = (
|
|
202
|
+
}, te = (o, t, s, l) => {
|
|
204
203
|
let e = { ...t.attrs };
|
|
205
|
-
return e = h(e, "margin-left", ""), e = h(e, "margin-right", ""), Object.keys(l || {}).forEach((
|
|
206
|
-
e = h(e,
|
|
207
|
-
}),
|
|
208
|
-
}, v = (
|
|
209
|
-
if (!
|
|
204
|
+
return e = h(e, "margin-left", ""), e = h(e, "margin-right", ""), Object.keys(l || {}).forEach((n) => {
|
|
205
|
+
e = h(e, n, (l || {})[n] || "");
|
|
206
|
+
}), o.apply(o.tr.setNodeMarkup(s, null, e));
|
|
207
|
+
}, v = (o, t) => J("<p>" + o + "</p>", t).content.firstChild.content, M = (o, t) => {
|
|
208
|
+
if (!o.caption)
|
|
210
209
|
return;
|
|
211
210
|
let s = { caption: "", style: "display: table-caption" };
|
|
212
|
-
|
|
213
|
-
const l = v(
|
|
211
|
+
o.captionAlignment && (s = h(s, "text-align", o.captionAlignment)), o.captionPosition && (s = h(s, "caption-side", o.captionPosition));
|
|
212
|
+
const l = v(o.caption, t);
|
|
214
213
|
return l && t.nodes.table_caption_external.createAndFill(s, l) || void 0;
|
|
215
|
-
}, D = (
|
|
216
|
-
let e =
|
|
214
|
+
}, D = (o) => o.firstChild && o.firstChild.type.name === "table_caption_external", oe = (o, t, s, l) => {
|
|
215
|
+
let e = o, n;
|
|
217
216
|
const i = s + 2, r = s + 1, c = e.schema;
|
|
218
217
|
if (D(t))
|
|
219
|
-
if (
|
|
218
|
+
if (n = t.firstChild, l.caption) {
|
|
220
219
|
const u = v(l.caption, c);
|
|
221
220
|
if (e = e.apply(
|
|
222
|
-
e.tr.replaceWith(i, i +
|
|
223
|
-
),
|
|
224
|
-
let d = { ...
|
|
221
|
+
e.tr.replaceWith(i, i + n.content.size, u)
|
|
222
|
+
), n = e.doc.nodeAt(r), n) {
|
|
223
|
+
let d = { ...n.attrs };
|
|
225
224
|
d = h(d, "text-align", l.captionAlignment || ""), d = h(d, "caption-side", l.captionPosition || ""), e = e.apply(e.tr.setNodeAttribute(r, "style", d.style));
|
|
226
225
|
}
|
|
227
226
|
} else
|
|
228
227
|
e = e.apply(
|
|
229
|
-
e.tr.deleteRange(i, i +
|
|
228
|
+
e.tr.deleteRange(i, i + n.content.size)
|
|
230
229
|
);
|
|
231
230
|
else
|
|
232
|
-
|
|
231
|
+
n = M(l, c), n && (e = e.apply(e.tr.replaceWith(r, r, n)));
|
|
233
232
|
return e;
|
|
234
|
-
},
|
|
235
|
-
let
|
|
236
|
-
state:
|
|
233
|
+
}, ne = (o, t, s, l, e) => {
|
|
234
|
+
let n = {
|
|
235
|
+
state: o,
|
|
237
236
|
pos: s
|
|
238
237
|
};
|
|
239
238
|
if (!l && (t.position || t.caption)) {
|
|
@@ -242,47 +241,47 @@ const N = {
|
|
|
242
241
|
d && Object.keys(d).forEach((a) => {
|
|
243
242
|
r = h(r, a, d[a] || "");
|
|
244
243
|
}), typeof t.width == "number" && t.widthUnit === "%" && (r = h(r, "width", t.width + t.widthUnit));
|
|
245
|
-
const g = M(t,
|
|
244
|
+
const g = M(t, o.schema);
|
|
246
245
|
g && c.push(g);
|
|
247
|
-
const m =
|
|
246
|
+
const m = o.doc.nodeAt(s);
|
|
248
247
|
c.push(m);
|
|
249
|
-
const p =
|
|
248
|
+
const p = o.schema.nodes.table_wrapper.createAndFill(r, c);
|
|
250
249
|
if (p) {
|
|
251
|
-
const a =
|
|
252
|
-
|
|
250
|
+
const a = o.tr.replaceWith(s, s + m.content.size, p);
|
|
251
|
+
o = o.apply(a), n = { state: o, pos: s };
|
|
253
252
|
}
|
|
254
253
|
} else
|
|
255
|
-
l && (t.position || t.caption || !t.caption && D(l.node)) ? (
|
|
256
|
-
|
|
254
|
+
l && (t.position || t.caption || !t.caption && D(l.node)) ? (o = te(
|
|
255
|
+
o,
|
|
257
256
|
l.node,
|
|
258
257
|
e,
|
|
259
258
|
t.position && k[t.position]
|
|
260
|
-
),
|
|
261
|
-
const i = l &&
|
|
259
|
+
), o = oe(o, l.node, e, t), n = { state: o, pos: e }) : l && !(t.position || t.caption) ? n = { state: o, node: l.node, pos: o.selection.$from.start(l.depth) - 1 } : n = { state: o, pos: s };
|
|
260
|
+
const i = l && n.state.doc.nodeAt(e);
|
|
262
261
|
if (i) {
|
|
263
262
|
let r;
|
|
264
|
-
typeof t.width == "number" && t.widthUnit === "%" ? r = h(i.attrs, "width", t.width + t.widthUnit) : t.widthUnit !== "%" && /%/.test(S(i.attrs.style || "").width || "") && (r = h(i.attrs, "width", "")), r && (
|
|
263
|
+
typeof t.width == "number" && t.widthUnit === "%" ? r = h(i.attrs, "width", t.width + t.widthUnit) : t.widthUnit !== "%" && /%/.test(S(i.attrs.style || "").width || "") && (r = h(i.attrs, "width", "")), r && (n.state = n.state.apply(n.state.tr.setNodeMarkup(e, null, r)));
|
|
265
264
|
}
|
|
266
|
-
return
|
|
267
|
-
}, de = (
|
|
268
|
-
const s =
|
|
265
|
+
return n;
|
|
266
|
+
}, de = (o, t) => {
|
|
267
|
+
const s = o.selection.$from, l = T(s, (f) => f.type.spec.tableRole === "table");
|
|
269
268
|
if (!l)
|
|
270
269
|
return;
|
|
271
270
|
const e = s.start(l.depth) - 1;
|
|
272
|
-
let
|
|
273
|
-
if (!
|
|
271
|
+
let n = Z(o, e, t.rows, t.columns);
|
|
272
|
+
if (!n)
|
|
274
273
|
return;
|
|
275
|
-
const i =
|
|
276
|
-
Q(
|
|
274
|
+
const i = n.tr;
|
|
275
|
+
Q(n).forEach((f) => {
|
|
277
276
|
let y = { ...f.node.attrs };
|
|
278
277
|
y = h(y, "padding", typeof t.cellPadding == "number" ? t.cellPadding + "px" : ""), i.setNodeMarkup(f.pos, null, y);
|
|
279
|
-
}),
|
|
280
|
-
const r = T(s, (f) => f.type.name === "table_wrapper"), c = s.start((r == null ? void 0 : r.depth) || 0) - 1, u =
|
|
281
|
-
|
|
282
|
-
const d = u.pos, g =
|
|
278
|
+
}), n = n.apply(i), n = W(n, t, e), n = ee(n, t, e);
|
|
279
|
+
const r = T(s, (f) => f.type.name === "table_wrapper"), c = s.start((r == null ? void 0 : r.depth) || 0) - 1, u = ne(n, t, e, r, c);
|
|
280
|
+
n = u.state;
|
|
281
|
+
const d = u.pos, g = n.doc.nodeAt(u.pos);
|
|
283
282
|
if (!g)
|
|
284
283
|
return;
|
|
285
|
-
const m = d + (r || l).node.content.size, p =
|
|
284
|
+
const m = d + (r || l).node.content.size, p = o.tr.replaceWith(d, m, g), a = O.atEnd(g), b = B.create(p.doc, d + a.to + 1);
|
|
286
285
|
return p.setSelection(b), p;
|
|
287
286
|
};
|
|
288
287
|
export {
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("@progress/kendo-editor-common"),i=require("../utils.js"),d=/[\D]+$/,f=e=>{const t=e.match(d);return t?t[0]:""},b=(e,t)=>{var n;const s=u(((n=e.attrs)==null?void 0:n.style)||"")[t]||"";return{[t]:parseFloat(s)||null,[t+"Unit"]:f(s)}},u=e=>(e||"").split(/\s*;\s*/).filter(Boolean).map(s=>{const n=s.split(/\s*:\s*/);return{[n[0]]:n[1]}}).reduce((s,n)=>({...s,...n}),{}),m=(e,t)=>{const s=t.style,n=t.value,l=t.newValue;if(!e)return{changed:!1,style:null};const o=e.split(/\s*;\s*/).filter(c=>!!c),r=o.filter(c=>{const a=c.split(/\s*:\s*/);return!(a[0].toLowerCase()===s&&n.test(a[1]))});return l&&r.push(`${s}: ${l}`),{style:r.join("; ")+(r.length?";":""),changed:!!l||r.length!==o.length}},g=/^.+$/;function $(e,t,s){let n;if(new RegExp("[^-]?"+t+":").test(e.style||"")){const{style:l}=m(e.style||"",{style:t,value:g,newValue:s});n={...e,style:l}}else if(e.style){const l=u(e.style);l[t]=s,n={...e,style:Object.keys(l).filter(o=>!!l[o]).reduce((o,r)=>o+r+": "+l[r]+"; ","").trim()}}else s?n={...e,style:t+": "+s+";"}:n={...e};return n}const N=e=>{const{doc:t,selection:s}=e,n=[];return s.ranges.forEach(l=>{const o=l.$from.pos,r=l.$to.pos;t.nodesBetween(o,r,(c,a,p,S)=>{(c.type.name==="table_cell"||c.type.name==="table_header")&&n.push({node:c,pos:a})})}),n},h=e=>{const t=i.parentNode(e.selection.$from,n=>n.type.name==="table"),s=i.parentNode(e.selection.$to,n=>n.type.name==="table");return t&&s&&t.depth===s.depth&&t.node.eq(s.node)?N(e).filter(({pos:l})=>{const o=i.parentNode(e.doc.resolve(l),r=>r.type.name==="table");return o&&o.depth===t.depth&&t.node.eq(o.node)}):[]},C=e=>{const t=[];if(h(e).length){const s=e.selection.$from,n=i.parentNode(s,a=>a.type.spec.tableRole==="table");if(n===null)return t;const l=s.start(n.depth),o=n.node,r=y.TableMap.get(o),c=e.doc;r.map.forEach(a=>{const p=a+l;t.push({pos:p,node:c.nodeAt(p)})})}return t};exports.getUnit=f;exports.nodeSize=b;exports.parseStyle=u;exports.reUnit=d;exports.selectedCells=h;exports.setNodeStyle=$;exports.tableCells=C;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { TableMap as f } from "@progress/kendo-editor-common";
|
|
10
9
|
import { parentNode as i } from "../utils.mjs";
|
|
11
10
|
const d = /[\D]+$/, h = (e) => {
|
|
@@ -22,32 +21,32 @@ const d = /[\D]+$/, h = (e) => {
|
|
|
22
21
|
const n = s.split(/\s*:\s*/);
|
|
23
22
|
return { [n[0]]: n[1] };
|
|
24
23
|
}).reduce((s, n) => ({ ...s, ...n }), {}), m = (e, t) => {
|
|
25
|
-
const s = t.style, n = t.value,
|
|
24
|
+
const s = t.style, n = t.value, o = t.newValue;
|
|
26
25
|
if (!e)
|
|
27
26
|
return { changed: !1, style: null };
|
|
28
|
-
const
|
|
27
|
+
const l = e.split(/\s*;\s*/).filter((r) => !!r), c = l.filter((r) => {
|
|
29
28
|
const a = r.split(/\s*:\s*/);
|
|
30
29
|
return !(a[0].toLowerCase() === s && n.test(a[1]));
|
|
31
30
|
});
|
|
32
|
-
return
|
|
31
|
+
return o && c.push(`${s}: ${o}`), {
|
|
33
32
|
style: c.join("; ") + (c.length ? ";" : ""),
|
|
34
|
-
changed: !!
|
|
33
|
+
changed: !!o || c.length !== l.length
|
|
35
34
|
};
|
|
36
35
|
}, b = /^.+$/;
|
|
37
36
|
function N(e, t, s) {
|
|
38
37
|
let n;
|
|
39
38
|
if (new RegExp("[^-]?" + t + ":").test(e.style || "")) {
|
|
40
|
-
const { style:
|
|
39
|
+
const { style: o } = m(e.style || "", {
|
|
41
40
|
style: t,
|
|
42
41
|
value: b,
|
|
43
42
|
newValue: s
|
|
44
43
|
});
|
|
45
|
-
n = { ...e, style:
|
|
44
|
+
n = { ...e, style: o };
|
|
46
45
|
} else if (e.style) {
|
|
47
|
-
const
|
|
48
|
-
|
|
46
|
+
const o = u(e.style);
|
|
47
|
+
o[t] = s, n = {
|
|
49
48
|
...e,
|
|
50
|
-
style: Object.keys(
|
|
49
|
+
style: Object.keys(o).filter((l) => !!o[l]).reduce((l, c) => l + c + ": " + o[c] + "; ", "").trim()
|
|
51
50
|
};
|
|
52
51
|
} else
|
|
53
52
|
s ? n = { ...e, style: t + ": " + s + ";" } : n = { ...e };
|
|
@@ -55,17 +54,17 @@ function N(e, t, s) {
|
|
|
55
54
|
}
|
|
56
55
|
const y = (e) => {
|
|
57
56
|
const { doc: t, selection: s } = e, n = [];
|
|
58
|
-
return s.ranges.forEach((
|
|
59
|
-
const
|
|
60
|
-
t.nodesBetween(
|
|
57
|
+
return s.ranges.forEach((o) => {
|
|
58
|
+
const l = o.$from.pos, c = o.$to.pos;
|
|
59
|
+
t.nodesBetween(l, c, (r, a, p, $) => {
|
|
61
60
|
(r.type.name === "table_cell" || r.type.name === "table_header") && n.push({ node: r, pos: a });
|
|
62
61
|
});
|
|
63
62
|
}), n;
|
|
64
63
|
}, g = (e) => {
|
|
65
64
|
const t = i(e.selection.$from, (n) => n.type.name === "table"), s = i(e.selection.$to, (n) => n.type.name === "table");
|
|
66
|
-
return t && s && t.depth === s.depth && t.node.eq(s.node) ? y(e).filter(({ pos:
|
|
67
|
-
const
|
|
68
|
-
return
|
|
65
|
+
return t && s && t.depth === s.depth && t.node.eq(s.node) ? y(e).filter(({ pos: o }) => {
|
|
66
|
+
const l = i(e.doc.resolve(o), (c) => c.type.name === "table");
|
|
67
|
+
return l && l.depth === t.depth && t.node.eq(l.node);
|
|
69
68
|
}) : [];
|
|
70
69
|
}, w = (e) => {
|
|
71
70
|
const t = [];
|
|
@@ -73,9 +72,9 @@ const y = (e) => {
|
|
|
73
72
|
const s = e.selection.$from, n = i(s, (a) => a.type.spec.tableRole === "table");
|
|
74
73
|
if (n === null)
|
|
75
74
|
return t;
|
|
76
|
-
const
|
|
75
|
+
const o = s.start(n.depth), l = n.node, c = f.get(l), r = e.doc;
|
|
77
76
|
c.map.forEach((a) => {
|
|
78
|
-
const p = a +
|
|
77
|
+
const p = a + o;
|
|
79
78
|
t.push({ pos: p, node: r.nodeAt(p) });
|
|
80
79
|
});
|
|
81
80
|
}
|
package/tools/tableEdit.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@progress/kendo-editor-common"),t=require("./proseMirrorTool.js"),d=(o,e)=>{const n=r.deleteColumn(o,e);if(n&&!e){const l=r.selectionCell(o),c=l&&l.node(l.depth);if(c&&c.content.childCount===1)return!1}return n},u=(o,e)=>{const n=r.deleteRow(o,e);if(n&&!e){const l=r.selectionCell(o),c=l&&l.node(l.depth-1);if(c&&c.content.childCount===1)return!1}return n};exports.TableEditNS=void 0;(o=>{o.createAddRowBeforeTool=e=>t.createProseMirrorTool(e,r.addRowBefore),o.createAddRowAfterTool=e=>t.createProseMirrorTool(e,r.addRowAfter),o.createAddColumnBeforeTool=e=>t.createProseMirrorTool(e,r.addColumnBefore),o.createAddColumnAfterTool=e=>t.createProseMirrorTool(e,r.addColumnAfter),o.createDeleteRowTool=e=>t.createProseMirrorTool(e,u),o.createDeleteColumnTool=e=>t.createProseMirrorTool(e,d),o.createDeleteTableTool=e=>t.createProseMirrorTool(e,r.deleteTable),o.createMergeCellsTool=e=>t.createProseMirrorTool(e,r.mergeCells),o.createSplitCellTool=e=>t.createProseMirrorTool(e,r.splitCell)})(exports.TableEditNS||(exports.TableEditNS={}));exports.deleteColumnCmd=d;exports.deleteRowCmd=u;
|
package/tools/tableEdit.mjs
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import { addRowBefore as d, addRowAfter as f, addColumnBefore as s, addColumnAfter as C, deleteTable as m, mergeCells as a, splitCell as w, deleteColumn as A, selectionCell as c, deleteRow as p } from "@progress/kendo-editor-common";
|
|
8
|
+
import { addRowBefore as d, addRowAfter as f, addColumnBefore as C, addColumnAfter as s, deleteTable as m, mergeCells as a, splitCell as w, deleteColumn as A, selectionCell as c, deleteRow as p } from "@progress/kendo-editor-common";
|
|
10
9
|
import { createProseMirrorTool as r } from "./proseMirrorTool.mjs";
|
|
11
10
|
const R = (o, e) => {
|
|
12
11
|
const l = A(o, e);
|
|
@@ -27,7 +26,7 @@ const R = (o, e) => {
|
|
|
27
26
|
};
|
|
28
27
|
var u;
|
|
29
28
|
((o) => {
|
|
30
|
-
o.createAddRowBeforeTool = (e) => r(e, d), o.createAddRowAfterTool = (e) => r(e, f), o.createAddColumnBeforeTool = (e) => r(e,
|
|
29
|
+
o.createAddRowBeforeTool = (e) => r(e, d), o.createAddRowAfterTool = (e) => r(e, f), o.createAddColumnBeforeTool = (e) => r(e, C), o.createAddColumnAfterTool = (e) => r(e, s), o.createDeleteRowTool = (e) => r(e, T), o.createDeleteColumnTool = (e) => r(e, R), o.createDeleteTableTool = (e) => r(e, m), o.createMergeCellsTool = (e) => r(e, a), o.createSplitCellTool = (e) => r(e, w);
|
|
31
30
|
})(u || (u = {}));
|
|
32
31
|
export {
|
|
33
32
|
u as TableEditNS,
|
package/tools/unlink.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),v=require("@progress/kendo-react-buttons"),u=require("@progress/kendo-editor-common"),N=require("./utils.js"),m=require("@progress/kendo-react-intl"),g=require("../messages/index.js"),S=require("@progress/kendo-react-common");function T(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,r.get?r:{enumerable:!0,get:()=>t[o]})}}return e.default=t,Object.freeze(e)}const p=T(f);exports.UnlinkToolNS=void 0;(t=>{t.createUnlinkTool=e=>{const o=class extends p.Component{render(){const{view:n,render:s,...c}=this.props,i={mark:e.mark},k=n?u.hasMark(n.state,i):!1,b=m.provideLocalizationService(this),l=e.messages.title,a=!k,d=p.createElement(v.Button,{onClick:a?void 0:()=>n&&u.removeLink(i,n.state.tr.setMeta("commandName",e.commandName))(n.state,n.dispatch),"aria-disabled":a?!0:void 0,...N.onDownPreventDefault,title:b.toLanguageString(l,g.messages[l]),...e.props,...c,className:S.classNames(c.className,e.props.className,{"k-disabled":a})});return s?s.call(void 0,d,{view:n}):d}};return m.registerForLocalization(o),o}})(exports.UnlinkToolNS||(exports.UnlinkToolNS={}));
|
package/tools/unlink.mjs
CHANGED
|
@@ -5,33 +5,32 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as l from "react";
|
|
10
9
|
import { Button as f } from "@progress/kendo-react-buttons";
|
|
11
|
-
import { hasMark as
|
|
10
|
+
import { hasMark as v, removeLink as u } from "@progress/kendo-editor-common";
|
|
12
11
|
import { onDownPreventDefault as N } from "./utils.mjs";
|
|
13
12
|
import { registerForLocalization as b, provideLocalizationService as h } from "@progress/kendo-react-intl";
|
|
14
13
|
import { messages as L } from "../messages/index.mjs";
|
|
15
14
|
import { classNames as T } from "@progress/kendo-react-common";
|
|
16
15
|
var c;
|
|
17
16
|
((p) => {
|
|
18
|
-
p.createUnlinkTool = (
|
|
17
|
+
p.createUnlinkTool = (t) => {
|
|
19
18
|
const a = class extends l.Component {
|
|
20
19
|
render() {
|
|
21
|
-
const { view: o, render: r, ...s } = this.props, n = { mark:
|
|
20
|
+
const { view: o, render: r, ...s } = this.props, n = { mark: t.mark }, d = o ? v(o.state, n) : !1, k = h(this), i = t.messages.title, e = !d, m = /* @__PURE__ */ l.createElement(
|
|
22
21
|
f,
|
|
23
22
|
{
|
|
24
|
-
onClick:
|
|
23
|
+
onClick: e ? void 0 : () => o && u(n, o.state.tr.setMeta("commandName", t.commandName))(
|
|
25
24
|
o.state,
|
|
26
25
|
o.dispatch
|
|
27
26
|
),
|
|
28
|
-
"aria-disabled":
|
|
27
|
+
"aria-disabled": e ? !0 : void 0,
|
|
29
28
|
...N,
|
|
30
29
|
title: k.toLanguageString(i, L[i]),
|
|
31
|
-
...
|
|
30
|
+
...t.props,
|
|
32
31
|
...s,
|
|
33
|
-
className: T(s.className,
|
|
34
|
-
"k-disabled":
|
|
32
|
+
className: T(s.className, t.props.className, {
|
|
33
|
+
"k-disabled": e
|
|
35
34
|
})
|
|
36
35
|
}
|
|
37
36
|
);
|
package/tools/utils.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),e=require("../messages/index.js");function y(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return s.default=t,Object.freeze(s)}const n=y(l),d={onMouseDown:t=>t.preventDefault(),onPointerDown:t=>t.preventDefault()},a={userSelect:"none"},u=function(t,...s){return s.forEach((r,o)=>{t=t.replace("{"+o+"}",String(r))}),t},i=(t,s)=>s.dataItem.style?n.cloneElement(t,t.props,n.createElement("span",{style:s.dataItem.style},t.props.children)):t,S=["px","em","%"],c={animate:{openDuration:150,closeDuration:150}},b=[{textKey:e.keys.borderStyleNone,text:e.messages[e.keys.borderStyleNone],value:"none"},{textKey:e.keys.borderStyleSolid,text:e.messages[e.keys.borderStyleSolid],value:"solid"},{textKey:e.keys.borderStyleDotted,text:e.messages[e.keys.borderStyleDotted],value:"dotted"},{textKey:e.keys.borderStyleDashed,text:e.messages[e.keys.borderStyleDashed],value:"dashed"},{textKey:e.keys.borderStyleDouble,text:e.messages[e.keys.borderStyleDouble],value:"double"},{textKey:e.keys.borderStyleGroove,text:e.messages[e.keys.borderStyleGroove],value:"groove"},{textKey:e.keys.borderStyleRidge,text:e.messages[e.keys.borderStyleRidge],value:"ridge"},{textKey:e.keys.borderStyleInset,text:e.messages[e.keys.borderStyleInset],value:"inset"},{textKey:e.keys.borderStyleOutset,text:e.messages[e.keys.borderStyleOutset],value:"outset"},{textKey:e.keys.borderStyleInitial,text:e.messages[e.keys.borderStyleInitial],value:"initial"},{textKey:e.keys.borderStyleInherit,text:e.messages[e.keys.borderStyleInherit],value:"inherit"},{textKey:e.keys.borderStyleHidden,text:e.messages[e.keys.borderStyleHidden],value:"hidden"}];function g(t,s){for(let r=t.depth;r>0;r--){const o=t.node(r);if(s(o))return{node:o,depth:r}}return null}exports.borderStyles=b;exports.formatString=u;exports.itemRender=i;exports.onDownPreventDefault=d;exports.parentNode=g;exports.popupSettings=c;exports.units=S;exports.userSelectNone=a;
|
package/tools/utils.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as d from "react";
|
|
10
9
|
import { keys as e, messages as r } from "../messages/index.mjs";
|
|
11
10
|
const a = {
|
package/tools/viewHtml.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),m=require("@progress/kendo-react-buttons"),p=require("./utils.js"),D=require("../dialogs/index.js"),u=require("@progress/kendo-react-intl"),f=require("../messages/index.js");function w(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const r=w(d);exports.ViewHtmlToolNS=void 0;(e=>{e.createViewHtmlTool=t=>{const o=class extends r.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:n,render:l,...s}=this.props,g=u.provideLocalizationService(this),a=t.messages.viewHtml,c=[r.createElement(m.Button,{onClick:this.toggleDialog,key:"viewHtml",...p.onDownPreventDefault,title:g.toLanguageString(a,f.messages[a]),...t.props,...s}),this.state.openedDialog&&n&&r.createElement(D.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:n,settings:t,dir:s.dir,onClose:this.toggleDialog})||null];return l?l.call(void 0,c,{view:n}):c}};return u.registerForLocalization(o),o}})(exports.ViewHtmlToolNS||(exports.ViewHtmlToolNS={}));
|
package/tools/viewHtml.mjs
CHANGED
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as t from "react";
|
|
10
|
-
import { Button as
|
|
11
|
-
import { onDownPreventDefault as
|
|
9
|
+
import { Button as p } from "@progress/kendo-react-buttons";
|
|
10
|
+
import { onDownPreventDefault as c } from "./utils.mjs";
|
|
12
11
|
import { EditorDialogs as d } from "../dialogs/index.mjs";
|
|
13
12
|
import { registerForLocalization as D, provideLocalizationService as u } from "@progress/kendo-react-intl";
|
|
14
13
|
import { messages as h } from "../messages/index.mjs";
|
|
15
14
|
var n;
|
|
16
15
|
((m) => {
|
|
17
|
-
m.createViewHtmlTool = (
|
|
16
|
+
m.createViewHtmlTool = (o) => {
|
|
18
17
|
const i = class extends t.Component {
|
|
19
18
|
constructor() {
|
|
20
19
|
super(...arguments), this.state = {
|
|
@@ -26,30 +25,30 @@ var n;
|
|
|
26
25
|
};
|
|
27
26
|
}
|
|
28
27
|
render() {
|
|
29
|
-
const { view:
|
|
28
|
+
const { view: e, render: r, ...l } = this.props, g = u(this), a = o.messages.viewHtml, s = [
|
|
30
29
|
/* @__PURE__ */ t.createElement(
|
|
31
|
-
|
|
30
|
+
p,
|
|
32
31
|
{
|
|
33
32
|
onClick: this.toggleDialog,
|
|
34
33
|
key: "viewHtml",
|
|
35
|
-
...
|
|
34
|
+
...c,
|
|
36
35
|
title: g.toLanguageString(a, h[a]),
|
|
37
|
-
...
|
|
36
|
+
...o.props,
|
|
38
37
|
...l
|
|
39
38
|
}
|
|
40
39
|
),
|
|
41
|
-
this.state.openedDialog &&
|
|
40
|
+
this.state.openedDialog && e && /* @__PURE__ */ t.createElement(
|
|
42
41
|
d.ViewHtmlDialog,
|
|
43
42
|
{
|
|
44
43
|
key: "viewHtmlDialog",
|
|
45
|
-
view:
|
|
46
|
-
settings:
|
|
44
|
+
view: e,
|
|
45
|
+
settings: o,
|
|
47
46
|
dir: l.dir,
|
|
48
47
|
onClose: this.toggleDialog
|
|
49
48
|
}
|
|
50
49
|
) || null
|
|
51
50
|
];
|
|
52
|
-
return r ? r.call(void 0, s, { view:
|
|
51
|
+
return r ? r.call(void 0, s, { view: e }) : s;
|
|
53
52
|
}
|
|
54
53
|
};
|
|
55
54
|
return D(i), i;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent);exports.firefox=e;
|