@harbour-enterprises/superdoc 0.11.28 → 0.11.29
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/dist/chunks/{super-editor.es-BtnR1npJ.cjs → super-editor.es-Bl9myfzE.cjs} +67 -67
- package/dist/chunks/{super-editor.es-BFtiZHId.es.js → super-editor.es-CsEQg4xc.es.js} +4908 -4840
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-BGRZCQ6v.js → converter-CJL8YHIz.js} +1163 -1147
- package/dist/super-editor/chunks/{docx-zipper-1a8zcFva.js → docx-zipper-Bdd3jp6o.js} +1 -1
- package/dist/super-editor/chunks/{editor-C-0fSABI.js → editor-DE58B9UE.js} +1332 -1284
- package/dist/super-editor/chunks/{toolbar-Ch6ELZhQ.js → toolbar-lfYkRb7A.js} +2 -2
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/helpers/getActiveFormatting.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/annotationImporter.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/field-annotation/field-annotation.d.ts.map +1 -1
- package/dist/super-editor/extensions/table/table.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +290 -285
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +2716 -2647
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,22 +2,22 @@ var yt = Object.defineProperty;
|
|
|
2
2
|
var Ue = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var bt = (t,
|
|
6
|
-
var Re = (t,
|
|
7
|
-
var Ae = (t,
|
|
8
|
-
var z = (t,
|
|
9
|
-
import { _ as q, a as Ze, b as wt, I as Ne, f as
|
|
10
|
-
import { C as No, T as zo, l as Vo, n as Wo, k as Po, m as jo } from "./chunks/editor-
|
|
11
|
-
import { a1 as Dt, y as $t, a3 as Ht, T as Ye, a as Bt } from "./chunks/converter-
|
|
12
|
-
import { O as qo } from "./chunks/converter-
|
|
13
|
-
import { ref as f, createElementBlock as
|
|
14
|
-
import { t as X, s as Wt, T as Pt, N as Y } from "./chunks/toolbar-
|
|
5
|
+
var bt = (t, a, o) => a in t ? yt(t, a, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[a] = o;
|
|
6
|
+
var Re = (t, a, o) => bt(t, typeof a != "symbol" ? a + "" : a, o), qe = (t, a, o) => a.has(t) || Ue("Cannot " + o);
|
|
7
|
+
var Ae = (t, a, o) => (qe(t, a, "read from private field"), o ? o.call(t) : a.get(t)), Oe = (t, a, o) => a.has(t) ? Ue("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, o);
|
|
8
|
+
var z = (t, a, o) => (qe(t, a, "access private method"), o);
|
|
9
|
+
import { _ as q, a as Ze, b as wt, I as Ne, f as Ct, c as Ge, d as kt, i as _t, u as xt, r as Et, E as ze, e as St, P as At, h as Tt, M as Ft, j as It, A as Lt, N as Mt } from "./chunks/editor-DE58B9UE.js";
|
|
10
|
+
import { C as No, T as zo, l as Vo, n as Wo, k as Po, m as jo } from "./chunks/editor-DE58B9UE.js";
|
|
11
|
+
import { a1 as Dt, y as $t, a3 as Ht, T as Ye, a as Bt } from "./chunks/converter-CJL8YHIz.js";
|
|
12
|
+
import { O as qo } from "./chunks/converter-CJL8YHIz.js";
|
|
13
|
+
import { ref as f, createElementBlock as C, openBlock as w, createElementVNode as k, unref as D, getCurrentInstance as Rt, computed as j, watch as Ot, onMounted as ke, createCommentVNode as Q, withDirectives as Je, withKeys as Qe, normalizeClass as oe, withModifiers as ge, vModelText as et, createTextVNode as tt, toDisplayString as ie, Fragment as U, renderList as ee, normalizeStyle as J, createVNode as P, h as B, createApp as Nt, reactive as Ke, onUnmounted as zt, shallowRef as nt, onBeforeUnmount as ot, createBlock as Vt } from "vue";
|
|
14
|
+
import { t as X, s as Wt, T as Pt, N as Y } from "./chunks/toolbar-lfYkRb7A.js";
|
|
15
15
|
import jt from "./ai-writer.es.js";
|
|
16
|
-
import { D as Ko } from "./chunks/docx-zipper-
|
|
16
|
+
import { D as Ko } from "./chunks/docx-zipper-Bdd3jp6o.js";
|
|
17
17
|
import { createZip as Zo } from "./file-zipper.es.js";
|
|
18
18
|
var it = { exports: {} };
|
|
19
19
|
(function(t) {
|
|
20
|
-
var
|
|
20
|
+
var a = Object.prototype.hasOwnProperty, o = "~";
|
|
21
21
|
function n() {
|
|
22
22
|
}
|
|
23
23
|
Object.create && (n.prototype = /* @__PURE__ */ Object.create(null), new n().__proto__ || (o = !1));
|
|
@@ -33,29 +33,29 @@ var it = { exports: {} };
|
|
|
33
33
|
function r(s, c) {
|
|
34
34
|
--s._eventsCount === 0 ? s._events = new n() : delete s._events[c];
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function l() {
|
|
37
37
|
this._events = new n(), this._eventsCount = 0;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
l.prototype.eventNames = function() {
|
|
40
40
|
var c = [], d, u;
|
|
41
41
|
if (this._eventsCount === 0) return c;
|
|
42
42
|
for (u in d = this._events)
|
|
43
|
-
|
|
43
|
+
a.call(d, u) && c.push(o ? u.slice(1) : u);
|
|
44
44
|
return Object.getOwnPropertySymbols ? c.concat(Object.getOwnPropertySymbols(d)) : c;
|
|
45
|
-
},
|
|
45
|
+
}, l.prototype.listeners = function(c) {
|
|
46
46
|
var d = o ? o + c : c, u = this._events[d];
|
|
47
47
|
if (!u) return [];
|
|
48
48
|
if (u.fn) return [u.fn];
|
|
49
49
|
for (var b = 0, v = u.length, y = new Array(v); b < v; b++)
|
|
50
50
|
y[b] = u[b].fn;
|
|
51
51
|
return y;
|
|
52
|
-
},
|
|
52
|
+
}, l.prototype.listenerCount = function(c) {
|
|
53
53
|
var d = o ? o + c : c, u = this._events[d];
|
|
54
54
|
return u ? u.fn ? 1 : u.length : 0;
|
|
55
|
-
},
|
|
56
|
-
var
|
|
57
|
-
if (!this._events[
|
|
58
|
-
var g = this._events[
|
|
55
|
+
}, l.prototype.emit = function(c, d, u, b, v, y) {
|
|
56
|
+
var E = o ? o + c : c;
|
|
57
|
+
if (!this._events[E]) return !1;
|
|
58
|
+
var g = this._events[E], F = arguments.length, $, p;
|
|
59
59
|
if (g.fn) {
|
|
60
60
|
switch (g.once && this.removeListener(c, g.fn, void 0, !0), F) {
|
|
61
61
|
case 1:
|
|
@@ -97,11 +97,11 @@ var it = { exports: {} };
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
return !0;
|
|
100
|
-
},
|
|
100
|
+
}, l.prototype.on = function(c, d, u) {
|
|
101
101
|
return i(this, c, d, u, !1);
|
|
102
|
-
},
|
|
102
|
+
}, l.prototype.once = function(c, d, u) {
|
|
103
103
|
return i(this, c, d, u, !0);
|
|
104
|
-
},
|
|
104
|
+
}, l.prototype.removeListener = function(c, d, u, b) {
|
|
105
105
|
var v = o ? o + c : c;
|
|
106
106
|
if (!this._events[v]) return this;
|
|
107
107
|
if (!d)
|
|
@@ -110,34 +110,34 @@ var it = { exports: {} };
|
|
|
110
110
|
if (y.fn)
|
|
111
111
|
y.fn === d && (!b || y.once) && (!u || y.context === u) && r(this, v);
|
|
112
112
|
else {
|
|
113
|
-
for (var
|
|
114
|
-
(y[
|
|
113
|
+
for (var E = 0, g = [], F = y.length; E < F; E++)
|
|
114
|
+
(y[E].fn !== d || b && !y[E].once || u && y[E].context !== u) && g.push(y[E]);
|
|
115
115
|
g.length ? this._events[v] = g.length === 1 ? g[0] : g : r(this, v);
|
|
116
116
|
}
|
|
117
117
|
return this;
|
|
118
|
-
},
|
|
118
|
+
}, l.prototype.removeAllListeners = function(c) {
|
|
119
119
|
var d;
|
|
120
120
|
return c ? (d = o ? o + c : c, this._events[d] && r(this, d)) : (this._events = new n(), this._eventsCount = 0), this;
|
|
121
|
-
},
|
|
121
|
+
}, l.prototype.off = l.prototype.removeListener, l.prototype.addListener = l.prototype.on, l.prefixed = o, l.EventEmitter = l, t.exports = l;
|
|
122
122
|
})(it);
|
|
123
123
|
var Ut = it.exports;
|
|
124
124
|
const qt = /* @__PURE__ */ Dt(Ut);
|
|
125
125
|
function Gt(t) {
|
|
126
|
-
let
|
|
127
|
-
for (;
|
|
128
|
-
const o = window.getComputedStyle(
|
|
129
|
-
if (/(auto|scroll)/.test(o) &&
|
|
130
|
-
return
|
|
131
|
-
|
|
126
|
+
let a = t;
|
|
127
|
+
for (; a; ) {
|
|
128
|
+
const o = window.getComputedStyle(a).overflowY;
|
|
129
|
+
if (/(auto|scroll)/.test(o) && a.scrollHeight > a.clientHeight)
|
|
130
|
+
return a;
|
|
131
|
+
a = a.parentElement;
|
|
132
132
|
}
|
|
133
133
|
return document.scrollingElement || document.documentElement;
|
|
134
134
|
}
|
|
135
|
-
function Kt(t,
|
|
135
|
+
function Kt(t, a = { behavior: "smooth", block: "start" }) {
|
|
136
136
|
if (!t) return;
|
|
137
137
|
const o = Gt(t), n = o.getBoundingClientRect(), i = t.getBoundingClientRect().top - n.top + o.scrollTop;
|
|
138
138
|
o.scrollTo({
|
|
139
|
-
top:
|
|
140
|
-
behavior:
|
|
139
|
+
top: a.block === "start" ? i : i - o.clientHeight + t.offsetHeight,
|
|
140
|
+
behavior: a.behavior
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
const x = (t) => {
|
|
@@ -147,10 +147,10 @@ const x = (t) => {
|
|
|
147
147
|
throw new Error("Toolbar button item needs either icon or label - " + t.name);
|
|
148
148
|
if (!t.name)
|
|
149
149
|
throw new Error("Invalid toolbar item name - " + t.name);
|
|
150
|
-
const o = f($t()), n = t.type, e = f(t.name), i = t.command, r = t.noArgumentCommand,
|
|
150
|
+
const o = f($t()), n = t.type, e = f(t.name), i = t.command, r = t.noArgumentCommand, l = f(t.icon), s = f(t.group || "center"), c = f(t.allowWithoutEditor), d = f(t.attributes || {}), u = t.disabled || !1, b = f(t.disabled), v = f(!1), y = f(!1), E = f(t.style), g = f(t.isNarrow), F = f(t.isWide), $ = f(t.minWidth), p = f(t.suppressActiveHighlight || !1), _ = f(t.argument), T = f(null), N = f(null), V = f(t.iconColor), te = f(t.hasCaret), ye = f(t.dropdownStyles), Z = f(t.tooltip), re = f(t.tooltipVisible), be = f(t.tooltipTimeout), I = f(t.defaultLabel), M = f(t.label), H = f(t.hideLabel), R = f(t.inlineTextInputVisible), G = f(t.hasInlineTextInput), K = f(t.markName), ce = f(t.labelAttr), ue = f(t.selectedValue), _e = f(t.dropdownValueKey), xe = f(t.inputRef || null), Ee = f([]);
|
|
151
151
|
if (t.options) {
|
|
152
152
|
if (!Array.isArray(t.options)) throw new Error("Invalid toolbar item options - " + t.options);
|
|
153
|
-
|
|
153
|
+
Ee.value.push(...t.options);
|
|
154
154
|
}
|
|
155
155
|
const Fe = (se) => {
|
|
156
156
|
we(se), !p.value && (v.value = !0);
|
|
@@ -171,15 +171,15 @@ const x = (t) => {
|
|
|
171
171
|
type: n,
|
|
172
172
|
command: i,
|
|
173
173
|
noArgumentCommand: r,
|
|
174
|
-
icon:
|
|
174
|
+
icon: l,
|
|
175
175
|
tooltip: Z,
|
|
176
176
|
group: s,
|
|
177
177
|
attributes: d,
|
|
178
178
|
disabled: b,
|
|
179
179
|
active: v,
|
|
180
180
|
expand: y,
|
|
181
|
-
nestedOptions:
|
|
182
|
-
style:
|
|
181
|
+
nestedOptions: Ee,
|
|
182
|
+
style: E,
|
|
183
183
|
isNarrow: g,
|
|
184
184
|
isWide: F,
|
|
185
185
|
minWidth: $,
|
|
@@ -216,27 +216,27 @@ const x = (t) => {
|
|
|
216
216
|
}, Xt = { class: "alignment-buttons" }, Zt = ["innerHTML"], Yt = ["innerHTML"], Jt = ["innerHTML"], Qt = ["innerHTML"], en = {
|
|
217
217
|
__name: "AlignmentButtons",
|
|
218
218
|
emits: ["select"],
|
|
219
|
-
setup(t, { emit:
|
|
220
|
-
const o =
|
|
219
|
+
setup(t, { emit: a }) {
|
|
220
|
+
const o = a, n = (e) => {
|
|
221
221
|
o("select", e);
|
|
222
222
|
};
|
|
223
|
-
return (e, i) => (w(),
|
|
224
|
-
|
|
223
|
+
return (e, i) => (w(), C("div", Xt, [
|
|
224
|
+
k("div", {
|
|
225
225
|
class: "button-icon",
|
|
226
226
|
onClick: i[0] || (i[0] = (r) => n("left")),
|
|
227
227
|
innerHTML: D(X).alignLeft
|
|
228
228
|
}, null, 8, Zt),
|
|
229
|
-
|
|
229
|
+
k("div", {
|
|
230
230
|
class: "button-icon",
|
|
231
231
|
onClick: i[1] || (i[1] = (r) => n("center")),
|
|
232
232
|
innerHTML: D(X).alignCenter
|
|
233
233
|
}, null, 8, Yt),
|
|
234
|
-
|
|
234
|
+
k("div", {
|
|
235
235
|
class: "button-icon",
|
|
236
236
|
onClick: i[2] || (i[2] = (r) => n("right")),
|
|
237
237
|
innerHTML: D(X).alignRight
|
|
238
238
|
}, null, 8, Jt),
|
|
239
|
-
|
|
239
|
+
k("div", {
|
|
240
240
|
class: "button-icon",
|
|
241
241
|
onClick: i[3] || (i[3] = (r) => n("justify")),
|
|
242
242
|
innerHTML: D(X).alignJustify
|
|
@@ -281,8 +281,8 @@ const x = (t) => {
|
|
|
281
281
|
}
|
|
282
282
|
},
|
|
283
283
|
emits: ["submit", "cancel"],
|
|
284
|
-
setup(t, { emit:
|
|
285
|
-
const o =
|
|
284
|
+
setup(t, { emit: a }) {
|
|
285
|
+
const o = a, n = t, { proxy: e } = Rt(), i = () => {
|
|
286
286
|
if (e?.$submit instanceof Function && e.$submit(), c.value && u.value) {
|
|
287
287
|
o("submit", { text: s.value, href: d.value });
|
|
288
288
|
return;
|
|
@@ -290,13 +290,13 @@ const x = (t) => {
|
|
|
290
290
|
o("submit", { text: s.value, href: null });
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
|
-
console.debug("[LinkInput] Invalid URL in handleSubmit"),
|
|
293
|
+
console.debug("[LinkInput] Invalid URL in handleSubmit"), l.value = !0;
|
|
294
294
|
}, r = () => {
|
|
295
295
|
o("submit", { text: s.value, href: null });
|
|
296
|
-
},
|
|
296
|
+
}, l = f(!1), s = f(n.initialText), c = f(n.href), d = j(() => c.value?.startsWith("http") ? c.value : "http://" + c.value), u = j(() => {
|
|
297
297
|
const p = d.value.split(".").filter(Boolean);
|
|
298
298
|
return d.value.includes(".") && p.length > 1;
|
|
299
|
-
}), b = j(() => y.value ? "Apply" : "Remove"), v = j(() => !u.value), y = j(() => !
|
|
299
|
+
}), b = j(() => y.value ? "Apply" : "Remove"), v = j(() => !u.value), y = j(() => !E.value), E = j(() => n.href && !c.value), g = j(() => n.href.startsWith("#")), F = () => {
|
|
300
300
|
window.open(d.value, "_blank");
|
|
301
301
|
};
|
|
302
302
|
Ot(
|
|
@@ -309,60 +309,60 @@ const x = (t) => {
|
|
|
309
309
|
const p = document.querySelector(".link-input-ctn input");
|
|
310
310
|
p && p.focus();
|
|
311
311
|
};
|
|
312
|
-
return
|
|
312
|
+
return ke(() => {
|
|
313
313
|
n.showInput && $();
|
|
314
|
-
}), (p, _) => (w(),
|
|
315
|
-
t.href ? g.value ? (w(),
|
|
316
|
-
t.showInput && !g.value ? (w(),
|
|
317
|
-
|
|
318
|
-
|
|
314
|
+
}), (p, _) => (w(), C("div", nn, [
|
|
315
|
+
t.href ? g.value ? (w(), C("div", sn, "Page anchor")) : (w(), C("div", ln, "Edit link")) : (w(), C("div", on, "Add link")),
|
|
316
|
+
t.showInput && !g.value ? (w(), C("div", an, [
|
|
317
|
+
k("div", rn, [
|
|
318
|
+
k("div", {
|
|
319
319
|
class: "input-icon",
|
|
320
320
|
innerHTML: D(X).linkInput
|
|
321
321
|
}, null, 8, cn),
|
|
322
|
-
Je(
|
|
322
|
+
Je(k("input", {
|
|
323
323
|
type: "text",
|
|
324
324
|
placeholder: "Type or paste a link",
|
|
325
|
-
class: oe({ error:
|
|
325
|
+
class: oe({ error: l.value }),
|
|
326
326
|
"onUpdate:modelValue": _[0] || (_[0] = (T) => c.value = T),
|
|
327
327
|
onKeydown: [
|
|
328
328
|
Qe(ge(i, ["stop", "prevent"]), ["enter"]),
|
|
329
|
-
_[1] || (_[1] = (T) =>
|
|
329
|
+
_[1] || (_[1] = (T) => l.value = !1)
|
|
330
330
|
]
|
|
331
331
|
}, null, 42, dn), [
|
|
332
332
|
[et, c.value]
|
|
333
333
|
]),
|
|
334
|
-
|
|
334
|
+
k("div", {
|
|
335
335
|
class: oe(["open-link-icon", { disabled: !u.value }]),
|
|
336
336
|
innerHTML: D(X).openLink,
|
|
337
337
|
onClick: F
|
|
338
338
|
}, null, 10, un)
|
|
339
339
|
]),
|
|
340
|
-
|
|
341
|
-
t.href ? (w(),
|
|
340
|
+
k("div", mn, [
|
|
341
|
+
t.href ? (w(), C("button", {
|
|
342
342
|
key: 0,
|
|
343
343
|
class: "remove-btn",
|
|
344
344
|
onClick: r
|
|
345
345
|
}, [
|
|
346
|
-
|
|
346
|
+
k("div", {
|
|
347
347
|
class: "remove-btn__icon",
|
|
348
348
|
innerHTML: D(X).removeLink
|
|
349
349
|
}, null, 8, pn),
|
|
350
350
|
_[3] || (_[3] = tt(" Remove "))
|
|
351
351
|
])) : Q("", !0),
|
|
352
|
-
y.value ? (w(),
|
|
352
|
+
y.value ? (w(), C("button", {
|
|
353
353
|
key: 1,
|
|
354
354
|
class: oe(["submit-btn", { "disable-btn": v.value }]),
|
|
355
355
|
onClick: i
|
|
356
356
|
}, ie(b.value), 3)) : Q("", !0)
|
|
357
357
|
])
|
|
358
|
-
])) : g.value ? (w(),
|
|
359
|
-
|
|
358
|
+
])) : g.value ? (w(), C("div", hn, [
|
|
359
|
+
k("a", {
|
|
360
360
|
onClick: _[2] || (_[2] = ge((...T) => t.goToAnchor && t.goToAnchor(...T), ["stop", "prevent"]))
|
|
361
361
|
}, "Go to " + ie(t.href.startsWith("#_") ? t.href.substring(2) : t.href), 1)
|
|
362
362
|
])) : Q("", !0)
|
|
363
363
|
]));
|
|
364
364
|
}
|
|
365
|
-
}, vn = /* @__PURE__ */ q(fn, [["__scopeId", "data-v-6990d5b2"]]), gn = { class: "document-mode" }, yn = ["onClick"], bn = { class: "document-mode-column icon-column" }, wn = ["innerHTML"],
|
|
365
|
+
}, vn = /* @__PURE__ */ q(fn, [["__scopeId", "data-v-6990d5b2"]]), gn = { class: "document-mode" }, yn = ["onClick"], bn = { class: "document-mode-column icon-column" }, wn = ["innerHTML"], Cn = { class: "document-mode-column text-column" }, kn = { class: "document-mode-type" }, _n = { class: "document-mode-description" }, xn = {
|
|
366
366
|
__name: "DocumentMode",
|
|
367
367
|
props: {
|
|
368
368
|
options: {
|
|
@@ -370,29 +370,29 @@ const x = (t) => {
|
|
|
370
370
|
}
|
|
371
371
|
},
|
|
372
372
|
emits: ["select"],
|
|
373
|
-
setup(t, { emit:
|
|
374
|
-
const o =
|
|
373
|
+
setup(t, { emit: a }) {
|
|
374
|
+
const o = a, n = (e) => {
|
|
375
375
|
o("select", e);
|
|
376
376
|
};
|
|
377
|
-
return (e, i) => (w(),
|
|
378
|
-
(w(!0),
|
|
377
|
+
return (e, i) => (w(), C("div", gn, [
|
|
378
|
+
(w(!0), C(U, null, ee(t.options, (r) => (w(), C("div", {
|
|
379
379
|
class: oe(["option-item", { disabled: r.disabled }]),
|
|
380
|
-
onClick: (
|
|
380
|
+
onClick: (l) => n(r)
|
|
381
381
|
}, [
|
|
382
|
-
|
|
383
|
-
|
|
382
|
+
k("div", bn, [
|
|
383
|
+
k("div", {
|
|
384
384
|
class: "icon-column__icon",
|
|
385
385
|
innerHTML: r.icon
|
|
386
386
|
}, null, 8, wn)
|
|
387
387
|
]),
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
388
|
+
k("div", Cn, [
|
|
389
|
+
k("div", kn, ie(r.label), 1),
|
|
390
|
+
k("div", _n, ie(r.description), 1)
|
|
391
391
|
])
|
|
392
392
|
], 10, yn))), 256))
|
|
393
393
|
]));
|
|
394
394
|
}
|
|
395
|
-
},
|
|
395
|
+
}, En = /* @__PURE__ */ q(xn, [["__scopeId", "data-v-f86e1477"]]), Sn = {
|
|
396
396
|
key: 0,
|
|
397
397
|
class: "linked-style-buttons"
|
|
398
398
|
}, An = ["onClick"], Tn = {
|
|
@@ -404,19 +404,19 @@ const x = (t) => {
|
|
|
404
404
|
}
|
|
405
405
|
},
|
|
406
406
|
emits: ["select"],
|
|
407
|
-
setup(t, { emit:
|
|
408
|
-
const o =
|
|
407
|
+
setup(t, { emit: a }) {
|
|
408
|
+
const o = a, n = t, e = (i) => {
|
|
409
409
|
o("select", i);
|
|
410
410
|
};
|
|
411
|
-
return (i, r) => n.editor ? (w(),
|
|
412
|
-
(w(!0),
|
|
411
|
+
return (i, r) => n.editor ? (w(), C("div", Sn, [
|
|
412
|
+
(w(!0), C(U, null, ee(D(Ze)(t.editor), (l) => (w(), C("div", {
|
|
413
413
|
class: "style-item",
|
|
414
|
-
onClick: (s) => e(
|
|
414
|
+
onClick: (s) => e(l)
|
|
415
415
|
}, [
|
|
416
|
-
|
|
416
|
+
k("div", {
|
|
417
417
|
class: "style-name",
|
|
418
|
-
style: J(D(wt)(
|
|
419
|
-
}, ie(
|
|
418
|
+
style: J(D(wt)(l, null, !1))
|
|
419
|
+
}, ie(l.definition.attrs.name), 5)
|
|
420
420
|
], 8, An))), 256))
|
|
421
421
|
])) : Q("", !0);
|
|
422
422
|
}
|
|
@@ -433,27 +433,27 @@ const x = (t) => {
|
|
|
433
433
|
}
|
|
434
434
|
},
|
|
435
435
|
emits: ["select"],
|
|
436
|
-
setup(t, { emit:
|
|
437
|
-
const o =
|
|
438
|
-
o("select",
|
|
436
|
+
setup(t, { emit: a }) {
|
|
437
|
+
const o = a, n = t, e = j(() => (l) => n.activeColor.value ? n.activeColor.value.toUpperCase() === l.value : !1), i = (l, s) => s === 5 || ["#FFFFFF", "#FAFF09"].includes(l) ? { color: "#000" } : { color: "#FFF" }, r = (l) => {
|
|
438
|
+
o("select", l.value);
|
|
439
439
|
};
|
|
440
|
-
return
|
|
440
|
+
return ke(() => {
|
|
441
441
|
if (!n.icons.every((s) => Array.isArray(s))) throw new Error("icon props must be 2d array");
|
|
442
|
-
}), (
|
|
442
|
+
}), (l, s) => (w(!0), C(U, null, ee(t.icons, (c, d) => (w(), C("div", {
|
|
443
443
|
class: "option-row",
|
|
444
444
|
key: d
|
|
445
445
|
}, [
|
|
446
|
-
(w(!0),
|
|
446
|
+
(w(!0), C(U, null, ee(c, (u, b) => (w(), C("div", {
|
|
447
447
|
class: "option",
|
|
448
448
|
key: b,
|
|
449
449
|
onClick: ge((v) => r(u), ["stop", "prevent"])
|
|
450
450
|
}, [
|
|
451
|
-
|
|
451
|
+
k("div", {
|
|
452
452
|
class: "option__icon",
|
|
453
453
|
innerHTML: u.icon,
|
|
454
454
|
style: J(u.style)
|
|
455
455
|
}, null, 12, Ln),
|
|
456
|
-
e.value(u) ? (w(),
|
|
456
|
+
e.value(u) ? (w(), C("div", {
|
|
457
457
|
key: 0,
|
|
458
458
|
class: "option__check",
|
|
459
459
|
innerHTML: D(X).colorOptionCheck,
|
|
@@ -484,30 +484,30 @@ const x = (t) => {
|
|
|
484
484
|
}
|
|
485
485
|
},
|
|
486
486
|
emits: ["select", "clickoutside"],
|
|
487
|
-
setup(t, { emit:
|
|
488
|
-
const o =
|
|
487
|
+
setup(t, { emit: a }) {
|
|
488
|
+
const o = a, n = (e) => {
|
|
489
489
|
o("select", e);
|
|
490
490
|
};
|
|
491
|
-
return (e, i) => (w(),
|
|
492
|
-
t.hasNoneIcon ? (w(),
|
|
491
|
+
return (e, i) => (w(), C("div", Hn, [
|
|
492
|
+
t.hasNoneIcon ? (w(), C("div", {
|
|
493
493
|
key: 0,
|
|
494
494
|
class: "none-option",
|
|
495
495
|
onClick: i[0] || (i[0] = (r) => n("none"))
|
|
496
496
|
}, [
|
|
497
|
-
|
|
497
|
+
k("span", {
|
|
498
498
|
innerHTML: D($n),
|
|
499
499
|
class: "none-icon"
|
|
500
500
|
}, null, 8, Bn),
|
|
501
501
|
i[1] || (i[1] = tt(" None "))
|
|
502
502
|
])) : Q("", !0),
|
|
503
|
-
|
|
503
|
+
k("div", Rn, [
|
|
504
504
|
P(Xe, {
|
|
505
505
|
icons: t.icons,
|
|
506
506
|
"active-color": t.activeColor,
|
|
507
507
|
onSelect: n
|
|
508
508
|
}, null, 8, ["icons", "active-color"]),
|
|
509
|
-
t.customIcons.flat().length ? (w(),
|
|
510
|
-
i[2] || (i[2] =
|
|
509
|
+
t.customIcons.flat().length ? (w(), C(U, { key: 0 }, [
|
|
510
|
+
i[2] || (i[2] = k("span", { class: "option-grid-ctn__subtitle" }, "Custom colors", -1)),
|
|
511
511
|
P(Xe, {
|
|
512
512
|
icons: t.customIcons,
|
|
513
513
|
"active-color": t.activeColor,
|
|
@@ -519,8 +519,8 @@ const x = (t) => {
|
|
|
519
519
|
}
|
|
520
520
|
}, Nn = /* @__PURE__ */ q(On, [["__scopeId", "data-v-47b783db"]]), zn = (t) => {
|
|
521
521
|
t.expand.value = !1;
|
|
522
|
-
}, h = (t,
|
|
523
|
-
label:
|
|
522
|
+
}, h = (t, a = null) => ({
|
|
523
|
+
label: a,
|
|
524
524
|
icon: X.colorOption,
|
|
525
525
|
value: t,
|
|
526
526
|
style: {
|
|
@@ -528,15 +528,15 @@ const x = (t) => {
|
|
|
528
528
|
boxShadow: "0 0 5px 1px rgba(0, 0, 0, 0.1)",
|
|
529
529
|
borderRadius: "50%"
|
|
530
530
|
}
|
|
531
|
-
}), Ve = (t,
|
|
531
|
+
}), Ve = (t, a, o = [], n = !1) => {
|
|
532
532
|
const e = (i) => {
|
|
533
|
-
|
|
533
|
+
a.iconColor.value = i, t.emitCommand({ item: a, argument: i }), zn(a);
|
|
534
534
|
};
|
|
535
535
|
return B("div", {}, [
|
|
536
536
|
B(Nn, {
|
|
537
537
|
icons: st,
|
|
538
538
|
customIcons: o,
|
|
539
|
-
activeColor:
|
|
539
|
+
activeColor: a.iconColor,
|
|
540
540
|
hasNoneIcon: n,
|
|
541
541
|
onSelect: e
|
|
542
542
|
})
|
|
@@ -617,28 +617,28 @@ const x = (t) => {
|
|
|
617
617
|
], Vn = () => st.flat().map((t) => t.value), Wn = { class: "toolbar-table-grid-wrapper" }, Pn = ["data-cols", "data-rows", "onClick"], jn = { class: "toolbar-table-grid-value" }, Un = {
|
|
618
618
|
__name: "TableGrid",
|
|
619
619
|
emits: ["select", "clickoutside"],
|
|
620
|
-
setup(t, { emit:
|
|
621
|
-
const o =
|
|
622
|
-
let s =
|
|
620
|
+
setup(t, { emit: a }) {
|
|
621
|
+
const o = a, n = f(0), e = f(0), i = (l) => {
|
|
622
|
+
let s = l.target;
|
|
623
623
|
if (!!s.dataset.grid)
|
|
624
624
|
return;
|
|
625
625
|
let u = [...s.parentElement.querySelectorAll("[data-item]")], b = parseInt(s.dataset.cols, 10), v = parseInt(s.dataset.rows, 10);
|
|
626
626
|
e.value = b, n.value = v;
|
|
627
627
|
for (let y = 0; y < u.length; y++) {
|
|
628
|
-
let
|
|
629
|
-
g <= b && F <= v ?
|
|
628
|
+
let E = u[y], g = parseInt(E.dataset.cols, 10), F = parseInt(E.dataset.rows, 10);
|
|
629
|
+
g <= b && F <= v ? E.classList.add("selected") : E.classList.remove("selected");
|
|
630
630
|
}
|
|
631
|
-
}, r = ({ cols:
|
|
632
|
-
o("select", { cols:
|
|
631
|
+
}, r = ({ cols: l, rows: s }) => {
|
|
632
|
+
o("select", { cols: l, rows: s });
|
|
633
633
|
};
|
|
634
|
-
return (
|
|
635
|
-
|
|
634
|
+
return (l, s) => (w(), C("div", Wn, [
|
|
635
|
+
k("div", {
|
|
636
636
|
class: "toolbar-table-grid",
|
|
637
637
|
onMouseover: i,
|
|
638
638
|
"data-grid": "true"
|
|
639
639
|
}, [
|
|
640
|
-
(w(),
|
|
641
|
-
(w(),
|
|
640
|
+
(w(), C(U, null, ee(5, (c) => (w(), C(U, { key: c }, [
|
|
641
|
+
(w(), C(U, null, ee(5, (d) => k("div", {
|
|
642
642
|
class: "toolbar-table-grid__item",
|
|
643
643
|
key: `${c}_${d}`,
|
|
644
644
|
"data-cols": d,
|
|
@@ -648,7 +648,7 @@ const x = (t) => {
|
|
|
648
648
|
}, null, 8, Pn)), 64))
|
|
649
649
|
], 64))), 64))
|
|
650
650
|
], 32),
|
|
651
|
-
|
|
651
|
+
k("div", jn, ie(n.value) + " x " + ie(e.value), 1)
|
|
652
652
|
]));
|
|
653
653
|
}
|
|
654
654
|
}, qn = /* @__PURE__ */ q(Un, [["__scopeId", "data-v-06352ab9"]]), Gn = { class: "toolbar-table-actions" }, Kn = ["onClick"], Xn = { class: "toolbar-table-actions__icon" }, Zn = ["innerHTML"], Yn = { class: "toolbar-table-actions__label" }, Jn = {
|
|
@@ -659,22 +659,22 @@ const x = (t) => {
|
|
|
659
659
|
}
|
|
660
660
|
},
|
|
661
661
|
emits: ["select"],
|
|
662
|
-
setup(t, { emit:
|
|
663
|
-
const o =
|
|
662
|
+
setup(t, { emit: a }) {
|
|
663
|
+
const o = a, n = (e) => {
|
|
664
664
|
o("select", { command: e.command });
|
|
665
665
|
};
|
|
666
|
-
return (e, i) => (w(),
|
|
667
|
-
(w(!0),
|
|
666
|
+
return (e, i) => (w(), C("div", Gn, [
|
|
667
|
+
(w(!0), C(U, null, ee(t.options, (r) => (w(), C("div", {
|
|
668
668
|
class: oe(["toolbar-table-actions__item", { "toolbar-table-actions__item--border": r.bottomBorder }]),
|
|
669
|
-
onClick: (
|
|
669
|
+
onClick: (l) => n(r)
|
|
670
670
|
}, [
|
|
671
|
-
|
|
672
|
-
|
|
671
|
+
k("div", Xn, [
|
|
672
|
+
k("div", {
|
|
673
673
|
class: "toolbar-table-actions__icon-wrapper",
|
|
674
674
|
innerHTML: r.icon
|
|
675
675
|
}, null, 8, Zn)
|
|
676
676
|
]),
|
|
677
|
-
|
|
677
|
+
k("div", Yn, ie(r.label), 1)
|
|
678
678
|
], 10, Kn))), 256))
|
|
679
679
|
]));
|
|
680
680
|
}
|
|
@@ -687,15 +687,15 @@ const x = (t) => {
|
|
|
687
687
|
}
|
|
688
688
|
},
|
|
689
689
|
emits: ["submit"],
|
|
690
|
-
setup(t, { emit:
|
|
691
|
-
const o = f(""), n =
|
|
690
|
+
setup(t, { emit: a }) {
|
|
691
|
+
const o = f(""), n = a, e = () => {
|
|
692
692
|
n("submit", { value: o.value });
|
|
693
693
|
};
|
|
694
|
-
return (i, r) => (w(),
|
|
695
|
-
|
|
696
|
-
Je(
|
|
694
|
+
return (i, r) => (w(), C("div", to, [
|
|
695
|
+
k("div", no, [
|
|
696
|
+
Je(k("input", {
|
|
697
697
|
ref: t.searchRef,
|
|
698
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
698
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
|
|
699
699
|
class: "search-input",
|
|
700
700
|
type: "text",
|
|
701
701
|
name: "search",
|
|
@@ -705,8 +705,8 @@ const x = (t) => {
|
|
|
705
705
|
[et, o.value]
|
|
706
706
|
])
|
|
707
707
|
]),
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
k("div", { class: "row submit" }, [
|
|
709
|
+
k("button", {
|
|
710
710
|
class: "submit-btn",
|
|
711
711
|
onClick: e
|
|
712
712
|
}, " Apply ")
|
|
@@ -715,7 +715,7 @@ const x = (t) => {
|
|
|
715
715
|
}
|
|
716
716
|
}, so = /* @__PURE__ */ q(io, [["__scopeId", "data-v-af870fbd"]]), ae = (t) => {
|
|
717
717
|
t.expand.value = !1;
|
|
718
|
-
}, lo = (t,
|
|
718
|
+
}, lo = (t, a = !1, o, n, e) => {
|
|
719
719
|
const i = x({
|
|
720
720
|
type: "button",
|
|
721
721
|
name: "bold",
|
|
@@ -773,7 +773,7 @@ const x = (t) => {
|
|
|
773
773
|
m && (r.label.value = m);
|
|
774
774
|
},
|
|
775
775
|
onDeactivate: () => r.label.value = r.defaultLabel.value
|
|
776
|
-
}),
|
|
776
|
+
}), l = x({
|
|
777
777
|
type: "dropdown",
|
|
778
778
|
dropdownStyles: {
|
|
779
779
|
padding: 0,
|
|
@@ -802,7 +802,7 @@ const x = (t) => {
|
|
|
802
802
|
[
|
|
803
803
|
B(jt, {
|
|
804
804
|
handleClose: () => {
|
|
805
|
-
ae(
|
|
805
|
+
ae(l);
|
|
806
806
|
},
|
|
807
807
|
selectedText: m,
|
|
808
808
|
editor: t.activeEditor,
|
|
@@ -848,8 +848,8 @@ const x = (t) => {
|
|
|
848
848
|
],
|
|
849
849
|
onActivate: ({ fontSize: m }) => {
|
|
850
850
|
if (!m) return s.label.value = s.defaultLabel.value;
|
|
851
|
-
let
|
|
852
|
-
|
|
851
|
+
let S = Wt(m, 12);
|
|
852
|
+
S < 8 && (S = 8), S > 96 && (S = 96), s.label.value = String(S);
|
|
853
853
|
},
|
|
854
854
|
onDeactivate: () => s.label.value = s.defaultLabel.value
|
|
855
855
|
}), c = x({
|
|
@@ -911,7 +911,7 @@ const x = (t) => {
|
|
|
911
911
|
v.iconColor.value = m;
|
|
912
912
|
},
|
|
913
913
|
onDeactivate: () => v.iconColor.value = "#000"
|
|
914
|
-
}), y = f(null),
|
|
914
|
+
}), y = f(null), E = x({
|
|
915
915
|
type: "dropdown",
|
|
916
916
|
name: "search",
|
|
917
917
|
icon: e.search,
|
|
@@ -927,8 +927,8 @@ const x = (t) => {
|
|
|
927
927
|
]
|
|
928
928
|
}), g = () => B("div", {}, [
|
|
929
929
|
B(so, {
|
|
930
|
-
onSubmit: ({ value:
|
|
931
|
-
t.activeEditor.commands.search(
|
|
930
|
+
onSubmit: ({ value: S }) => {
|
|
931
|
+
t.activeEditor.commands.search(S);
|
|
932
932
|
},
|
|
933
933
|
searchRef: y
|
|
934
934
|
})
|
|
@@ -1083,9 +1083,9 @@ const x = (t) => {
|
|
|
1083
1083
|
function ye(m) {
|
|
1084
1084
|
return B(Qn, {
|
|
1085
1085
|
options: te,
|
|
1086
|
-
onSelect: (
|
|
1086
|
+
onSelect: (S) => {
|
|
1087
1087
|
ae(m);
|
|
1088
|
-
const { command: A } =
|
|
1088
|
+
const { command: A } = S;
|
|
1089
1089
|
t.emitCommand({ item: m, argument: { command: A } });
|
|
1090
1090
|
}
|
|
1091
1091
|
});
|
|
@@ -1105,10 +1105,10 @@ const x = (t) => {
|
|
|
1105
1105
|
type: "render",
|
|
1106
1106
|
render: () => B("div", {}, [
|
|
1107
1107
|
B(tn, {
|
|
1108
|
-
onSelect: (
|
|
1108
|
+
onSelect: (S) => {
|
|
1109
1109
|
ae(Z);
|
|
1110
1110
|
const A = { ...Z, command: "setTextAlign" };
|
|
1111
|
-
A.command = "setTextAlign", t.emitCommand({ item: A, argument:
|
|
1111
|
+
A.command = "setTextAlign", t.emitCommand({ item: A, argument: S }), re(Z, S);
|
|
1112
1112
|
}
|
|
1113
1113
|
})
|
|
1114
1114
|
]),
|
|
@@ -1121,8 +1121,8 @@ const x = (t) => {
|
|
|
1121
1121
|
onDeactivate: () => {
|
|
1122
1122
|
re(Z, "left");
|
|
1123
1123
|
}
|
|
1124
|
-
}), re = (m,
|
|
1125
|
-
let A =
|
|
1124
|
+
}), re = (m, S) => {
|
|
1125
|
+
let A = S === "both" ? "justify" : S, W = {
|
|
1126
1126
|
left: e.alignLeft,
|
|
1127
1127
|
right: e.alignRight,
|
|
1128
1128
|
center: e.alignCenter,
|
|
@@ -1231,7 +1231,7 @@ const x = (t) => {
|
|
|
1231
1231
|
command: "rejectTrackedChangeOnSelection",
|
|
1232
1232
|
icon: e.trackChangesReject,
|
|
1233
1233
|
group: "left"
|
|
1234
|
-
}),
|
|
1234
|
+
}), Ee = x({
|
|
1235
1235
|
type: "button",
|
|
1236
1236
|
disabled: !1,
|
|
1237
1237
|
name: "toggleTrackChangesShowOriginal",
|
|
@@ -1260,7 +1260,7 @@ const x = (t) => {
|
|
|
1260
1260
|
u,
|
|
1261
1261
|
H,
|
|
1262
1262
|
M,
|
|
1263
|
-
|
|
1263
|
+
E,
|
|
1264
1264
|
R
|
|
1265
1265
|
].map((m) => m.name);
|
|
1266
1266
|
const Le = x({
|
|
@@ -1269,7 +1269,7 @@ const x = (t) => {
|
|
|
1269
1269
|
tooltip: "Format painter",
|
|
1270
1270
|
icon: e.copyFormat,
|
|
1271
1271
|
command: "copyFormat"
|
|
1272
|
-
}), Me = (m,
|
|
1272
|
+
}), Me = (m, S) => m === "editor" ? S : m === "suggester" ? S.filter((A) => A.value === "suggesting") : S.filter((A) => A.value === "viewing"), we = (m) => m === "editor" ? "Editing" : m === "suggester" ? "Suggesting" : "Viewing", ne = x({
|
|
1273
1273
|
type: "dropdown",
|
|
1274
1274
|
name: "documentMode",
|
|
1275
1275
|
command: "setDocumentMode",
|
|
@@ -1315,9 +1315,9 @@ const x = (t) => {
|
|
|
1315
1315
|
}
|
|
1316
1316
|
];
|
|
1317
1317
|
function me(m) {
|
|
1318
|
-
const
|
|
1319
|
-
return B(
|
|
1320
|
-
options:
|
|
1318
|
+
const S = Me(n, De);
|
|
1319
|
+
return B(En, {
|
|
1320
|
+
options: S,
|
|
1321
1321
|
onSelect: (A) => {
|
|
1322
1322
|
ae(m);
|
|
1323
1323
|
const { label: W, icon: le } = A;
|
|
@@ -1347,7 +1347,7 @@ const x = (t) => {
|
|
|
1347
1347
|
command: "toggleRuler",
|
|
1348
1348
|
icon: e.ruler,
|
|
1349
1349
|
tooltip: "Show or hide ruler"
|
|
1350
|
-
}),
|
|
1350
|
+
}), Ce = x({
|
|
1351
1351
|
type: "dropdown",
|
|
1352
1352
|
name: "linkedStyles",
|
|
1353
1353
|
command: "setLinkedStyle",
|
|
@@ -1367,10 +1367,10 @@ const x = (t) => {
|
|
|
1367
1367
|
type: "render",
|
|
1368
1368
|
key: "linkedStyle",
|
|
1369
1369
|
render: () => {
|
|
1370
|
-
const m = (
|
|
1371
|
-
ae(
|
|
1372
|
-
const A = { ...
|
|
1373
|
-
t.emitCommand({ item: A, argument:
|
|
1370
|
+
const m = (S) => {
|
|
1371
|
+
ae(Ce);
|
|
1372
|
+
const A = { ...Ce, command: "setLinkedStyle" };
|
|
1373
|
+
t.emitCommand({ item: A, argument: S });
|
|
1374
1374
|
};
|
|
1375
1375
|
return B("div", {}, [
|
|
1376
1376
|
B(Fn, {
|
|
@@ -1382,13 +1382,13 @@ const x = (t) => {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
],
|
|
1384
1384
|
onActivate: () => {
|
|
1385
|
-
|
|
1385
|
+
Ce.disabled.value = !1;
|
|
1386
1386
|
},
|
|
1387
1387
|
onDeactivate: () => {
|
|
1388
|
-
|
|
1388
|
+
Ce.disabled.value = !0;
|
|
1389
1389
|
}
|
|
1390
|
-
}), he = (m,
|
|
1391
|
-
if (
|
|
1390
|
+
}), he = (m, S) => {
|
|
1391
|
+
if (S.value.toString() === m)
|
|
1392
1392
|
return B("div", { innerHTML: eo, class: "dropdown-select-icon" });
|
|
1393
1393
|
}, de = x({
|
|
1394
1394
|
type: "dropdown",
|
|
@@ -1448,53 +1448,53 @@ const x = (t) => {
|
|
|
1448
1448
|
H,
|
|
1449
1449
|
de,
|
|
1450
1450
|
c,
|
|
1451
|
-
|
|
1451
|
+
Ce,
|
|
1452
1452
|
c,
|
|
1453
1453
|
dt,
|
|
1454
1454
|
se,
|
|
1455
1455
|
Le,
|
|
1456
1456
|
Ie,
|
|
1457
|
-
|
|
1457
|
+
l,
|
|
1458
1458
|
R,
|
|
1459
1459
|
ne
|
|
1460
1460
|
];
|
|
1461
1461
|
if (t.config?.superdoc?.config?.modules?.ai || (O = O.filter((m) => m.name.value !== "ai")), o <= $e.md && (O = O.filter((m) => m.type !== "separator")), t.config.pagination || (O = O.filter((m) => m.name.value !== "pageBreakTool")), t.config.mode !== "docx") {
|
|
1462
1462
|
const m = O.findIndex((A) => A.name.value === "linkedStyles");
|
|
1463
1463
|
O.splice(m - 1, 2);
|
|
1464
|
-
const
|
|
1465
|
-
O = O.filter((A) => !
|
|
1464
|
+
const S = ["ruler", "zoom", "undo", "redo"];
|
|
1465
|
+
O = O.filter((A) => !S.includes(A.name.value));
|
|
1466
1466
|
}
|
|
1467
|
-
const je = [ue,
|
|
1468
|
-
|
|
1469
|
-
const ft = [
|
|
1467
|
+
const je = [ue, Ee, Fe];
|
|
1468
|
+
a || (n === "viewer" && je.push(_e, xe), O = O.filter((m) => !je.includes(m)));
|
|
1469
|
+
const ft = [E, K, R, ne].map((m) => m.name), vt = (m) => ft.includes(m.name), Se = [], He = [];
|
|
1470
1470
|
let Be = mt + ut;
|
|
1471
1471
|
return O.forEach((m) => {
|
|
1472
|
-
const
|
|
1472
|
+
const S = pe.get(m.name.value) || pe.get("default");
|
|
1473
1473
|
if (o < $e.xl && pt.includes(m.name.value)) {
|
|
1474
|
-
if (
|
|
1474
|
+
if (Se.push(m), m.name.value === "linkedStyles") {
|
|
1475
1475
|
const A = O.findIndex((W) => W.name.value === "linkedStyles");
|
|
1476
1476
|
O.splice(A + 1, 1);
|
|
1477
1477
|
}
|
|
1478
1478
|
return;
|
|
1479
1479
|
}
|
|
1480
1480
|
if (o < $e.sm && ht.includes(m.name.value)) {
|
|
1481
|
-
|
|
1481
|
+
Se.push(m);
|
|
1482
1482
|
return;
|
|
1483
1483
|
}
|
|
1484
1484
|
if (vt(m)) {
|
|
1485
|
-
He.push(m), Be +=
|
|
1485
|
+
He.push(m), Be += S;
|
|
1486
1486
|
return;
|
|
1487
1487
|
}
|
|
1488
|
-
Be < o ? (He.push(m), Be +=
|
|
1488
|
+
Be < o ? (He.push(m), Be += S) : Se.push(m);
|
|
1489
1489
|
}), {
|
|
1490
1490
|
defaultItems: He,
|
|
1491
|
-
overflowItems:
|
|
1491
|
+
overflowItems: Se.filter((m) => m.type !== "separator")
|
|
1492
1492
|
};
|
|
1493
1493
|
}, ao = [".jpg", ".jpeg", ".png", "image/jpeg", "image/png"], ro = () => {
|
|
1494
1494
|
let t = document.createElement("input");
|
|
1495
1495
|
t.type = "file";
|
|
1496
|
-
let
|
|
1497
|
-
return t.accept =
|
|
1496
|
+
let a = ao;
|
|
1497
|
+
return t.accept = a.join(","), () => new Promise((n, e) => {
|
|
1498
1498
|
t.onchange = async () => {
|
|
1499
1499
|
const i = t.files;
|
|
1500
1500
|
if (!i) return n(null);
|
|
@@ -1502,18 +1502,18 @@ const x = (t) => {
|
|
|
1502
1502
|
return n(r ? { file: r } : null);
|
|
1503
1503
|
}, t.oncancel = () => n(null), t.onerror = e, t.click();
|
|
1504
1504
|
});
|
|
1505
|
-
}, co = (t) => new Promise((
|
|
1505
|
+
}, co = (t) => new Promise((a, o) => {
|
|
1506
1506
|
let n = new FileReader();
|
|
1507
|
-
n.onload = (e) =>
|
|
1508
|
-
}), uo = (t,
|
|
1507
|
+
n.onload = (e) => a(e.target.result), n.onerror = o, setTimeout(() => n.readAsDataURL(t), 250);
|
|
1508
|
+
}), uo = (t, a) => new Promise((o, n) => {
|
|
1509
1509
|
const e = new window.Image();
|
|
1510
1510
|
e.onload = () => {
|
|
1511
|
-
const i = document.createElement("canvas"), { width: r, height:
|
|
1511
|
+
const i = document.createElement("canvas"), { width: r, height: l } = mo(
|
|
1512
1512
|
e.width,
|
|
1513
1513
|
e.height,
|
|
1514
|
-
|
|
1514
|
+
a
|
|
1515
1515
|
);
|
|
1516
|
-
if (i.width = r, i.height =
|
|
1516
|
+
if (i.width = r, i.height = l, i.getContext("2d").drawImage(e, 0, 0, r, l), typeof t == "string") {
|
|
1517
1517
|
const c = i.toDataURL();
|
|
1518
1518
|
o(c);
|
|
1519
1519
|
} else
|
|
@@ -1522,16 +1522,16 @@ const x = (t) => {
|
|
|
1522
1522
|
type: t.type,
|
|
1523
1523
|
lastModified: Date.now()
|
|
1524
1524
|
});
|
|
1525
|
-
o({ file: d, width: r, height:
|
|
1525
|
+
o({ file: d, width: r, height: l });
|
|
1526
1526
|
});
|
|
1527
1527
|
}, e.onerror = (i) => n(i), e.src = typeof t == "string" ? t : URL.createObjectURL(t);
|
|
1528
|
-
}), mo = (t,
|
|
1528
|
+
}), mo = (t, a, o) => {
|
|
1529
1529
|
const { width: n, height: e } = o.getMaxContentSize();
|
|
1530
|
-
if (!n || !e) return { width: t, height:
|
|
1531
|
-
let i = t, r =
|
|
1532
|
-
const
|
|
1533
|
-
return
|
|
1534
|
-
}, po = async ({ editor: t, view:
|
|
1530
|
+
if (!n || !e) return { width: t, height: a };
|
|
1531
|
+
let i = t, r = a;
|
|
1532
|
+
const l = t / a;
|
|
1533
|
+
return a > e && (r = e, i = Math.round(e * l)), i > n && (i = n, r = Math.round(n / l)), { width: i, height: r };
|
|
1534
|
+
}, po = async ({ editor: t, view: a, file: o }) => {
|
|
1535
1535
|
let n = typeof t.options.handleImageUpload == "function" ? t.options.handleImageUpload : co;
|
|
1536
1536
|
if ((o.size / (1024 * 1024)).toFixed(4) > 5) {
|
|
1537
1537
|
window.alert("Image size must be less than 5MB");
|
|
@@ -1545,29 +1545,29 @@ const x = (t) => {
|
|
|
1545
1545
|
console.warn("Error processing image:", u);
|
|
1546
1546
|
return;
|
|
1547
1547
|
}
|
|
1548
|
-
let
|
|
1548
|
+
let l = {}, { tr: s, schema: c } = a.state;
|
|
1549
1549
|
s.selection.empty || s.deleteSelection();
|
|
1550
1550
|
let d = {
|
|
1551
1551
|
type: "add",
|
|
1552
1552
|
pos: s.selection.from,
|
|
1553
|
-
id:
|
|
1553
|
+
id: l
|
|
1554
1554
|
};
|
|
1555
|
-
s.setMeta(Ne, d),
|
|
1555
|
+
s.setMeta(Ne, d), a.dispatch(s), n(o).then(
|
|
1556
1556
|
(u) => {
|
|
1557
|
-
let b = o.name.replace(" ", "_"), v =
|
|
1557
|
+
let b = o.name.replace(" ", "_"), v = Ct(a.state, l);
|
|
1558
1558
|
if (v == null)
|
|
1559
1559
|
return;
|
|
1560
|
-
let y = { type: "remove", id:
|
|
1561
|
-
src:
|
|
1560
|
+
let y = { type: "remove", id: l }, E = `word/media/${b}`, g = c.nodes.image.create({
|
|
1561
|
+
src: E,
|
|
1562
1562
|
size: { width: i, height: r }
|
|
1563
1563
|
});
|
|
1564
|
-
t.storage.image.media = Object.assign(t.storage.image.media, { [
|
|
1565
|
-
|
|
1564
|
+
t.storage.image.media = Object.assign(t.storage.image.media, { [E]: u }), t.options.ydoc && t.commands.addImageToCollaboration({ mediaPath: E, fileData: u }), a.dispatch(
|
|
1565
|
+
a.state.tr.replaceWith(v, v, g).setMeta(Ne, y)
|
|
1566
1566
|
);
|
|
1567
1567
|
},
|
|
1568
1568
|
() => {
|
|
1569
|
-
let u = { type: "remove", id:
|
|
1570
|
-
|
|
1569
|
+
let u = { type: "remove", id: l };
|
|
1570
|
+
a.dispatch(s.setMeta(Ne, u));
|
|
1571
1571
|
}
|
|
1572
1572
|
);
|
|
1573
1573
|
};
|
|
@@ -1612,10 +1612,15 @@ class Mo extends qt {
|
|
|
1612
1612
|
});
|
|
1613
1613
|
},
|
|
1614
1614
|
setColor: ({ item: o, argument: n }) => {
|
|
1615
|
-
z(this, L, fe).call(this, { item: o, argument: n })
|
|
1615
|
+
z(this, L, fe).call(this, { item: o, argument: n }, () => {
|
|
1616
|
+
this.activeEditor?.commands.setFieldAnnotationsTextColor(n, !0);
|
|
1617
|
+
});
|
|
1616
1618
|
},
|
|
1617
1619
|
setHighlight: ({ item: o, argument: n }) => {
|
|
1618
|
-
z(this, L, fe).call(this, { item: o, argument: n })
|
|
1620
|
+
z(this, L, fe).call(this, { item: o, argument: n, noArgumentCallback: !0 }, () => {
|
|
1621
|
+
let e = n !== "none" ? n : null;
|
|
1622
|
+
this.activeEditor?.commands.setFieldAnnotationsTextHighlight(e, !0), this.activeEditor?.commands.setCellBackground(e);
|
|
1623
|
+
});
|
|
1619
1624
|
},
|
|
1620
1625
|
toggleRuler: ({ item: o, argument: n }) => {
|
|
1621
1626
|
this.superdoc.toggleRuler();
|
|
@@ -1630,13 +1635,13 @@ class Mo extends qt {
|
|
|
1630
1635
|
},
|
|
1631
1636
|
increaseTextIndent: ({ item: o, argument: n }) => {
|
|
1632
1637
|
let e = o.command, { state: i } = this.activeEditor;
|
|
1633
|
-
if (Ge((
|
|
1638
|
+
if (Ge((l) => l.type.name === "listItem")(i.selection))
|
|
1634
1639
|
return this.activeEditor.commands.increaseListIndent();
|
|
1635
1640
|
e in this.activeEditor.commands && this.activeEditor.commands[e](n);
|
|
1636
1641
|
},
|
|
1637
1642
|
decreaseTextIndent: ({ item: o, argument: n }) => {
|
|
1638
1643
|
let e = o.command, { state: i } = this.activeEditor;
|
|
1639
|
-
if (Ge((
|
|
1644
|
+
if (Ge((l) => l.type.name === "listItem")(i.selection))
|
|
1640
1645
|
return this.activeEditor.commands.decreaseListIndent();
|
|
1641
1646
|
e in this.activeEditor.commands && this.activeEditor.commands[e](n);
|
|
1642
1647
|
},
|
|
@@ -1656,7 +1661,7 @@ class Mo extends qt {
|
|
|
1656
1661
|
let e = o.command;
|
|
1657
1662
|
if (e in this.activeEditor.commands) {
|
|
1658
1663
|
this.activeEditor.commands[e](n);
|
|
1659
|
-
const { view: i } = this.activeEditor, r = i.state.selection.$to.pos,
|
|
1664
|
+
const { view: i } = this.activeEditor, r = i.state.selection.$to.pos, l = new Ye(i.state.doc.resolve(r)), s = i.state.tr.setSelection(l), c = i.state.apply(s);
|
|
1660
1665
|
i.updateState(c), setTimeout(() => {
|
|
1661
1666
|
i.focus();
|
|
1662
1667
|
}, 100);
|
|
@@ -1715,7 +1720,7 @@ class Mo extends qt {
|
|
|
1715
1720
|
z(this, L, Pe).call(this);
|
|
1716
1721
|
return;
|
|
1717
1722
|
}
|
|
1718
|
-
const o =
|
|
1723
|
+
const o = kt(this.activeEditor), n = _t(this.activeEditor.state);
|
|
1719
1724
|
this.toolbarItems.forEach((e) => {
|
|
1720
1725
|
if (e.resetDisabled(), e.name.value === "linkedStyles")
|
|
1721
1726
|
return this.activeEditor && !Ze(this.activeEditor).length ? e.deactivate() : e.activate();
|
|
@@ -1736,8 +1741,8 @@ class Mo extends qt {
|
|
|
1736
1741
|
e.activate(d);
|
|
1737
1742
|
}
|
|
1738
1743
|
}
|
|
1739
|
-
const
|
|
1740
|
-
e.name.value === "lineHeight" && (i?.attrs?.lineHeight ||
|
|
1744
|
+
const l = o.find((s) => s.name === "spacing");
|
|
1745
|
+
e.name.value === "lineHeight" && (i?.attrs?.lineHeight || l) && (e.selectedValue.value = i?.attrs?.lineHeight || l.attrs?.spacing?.line || ""), e.name.value === "tableActions" && (e.disabled.value = !n);
|
|
1741
1746
|
});
|
|
1742
1747
|
}
|
|
1743
1748
|
/**
|
|
@@ -1768,14 +1773,14 @@ class Mo extends qt {
|
|
|
1768
1773
|
L = new WeakSet(), lt = function() {
|
|
1769
1774
|
this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length && (this.config.toolbarGroups = Object.keys(this.config.groups));
|
|
1770
1775
|
}, ve = new WeakMap(), We = function(o, n, e = !1) {
|
|
1771
|
-
const i = document.documentElement.clientWidth, { defaultItems: r, overflowItems:
|
|
1776
|
+
const i = document.documentElement.clientWidth, { defaultItems: r, overflowItems: l } = lo(o, e, i, this.role, n);
|
|
1772
1777
|
let s = [
|
|
1773
1778
|
...r.map((d) => d.name.value),
|
|
1774
|
-
...
|
|
1779
|
+
...l.map((d) => d.name.value)
|
|
1775
1780
|
];
|
|
1776
1781
|
this.config.groups && (s = Object.values(this.config.groups).flatMap((d) => d));
|
|
1777
1782
|
const c = r.filter((d) => s.includes(d.name.value)).filter((d) => !this.config.excludeItems.includes(d.name.value));
|
|
1778
|
-
this.toolbarItems = c, this.overflowItems =
|
|
1783
|
+
this.toolbarItems = c, this.overflowItems = l.filter((d) => s.includes(d.name.value));
|
|
1779
1784
|
}, at = function() {
|
|
1780
1785
|
if (!this.activeEditor || !this.activeEditor.converter) return;
|
|
1781
1786
|
const { typeface: o = "Arial", fontSizePt: n = 12 } = this.activeEditor.converter.getDocumentDefaultStyles() ?? {}, e = this.toolbarItems.find((r) => r.name.value === "fontSize");
|
|
@@ -1784,9 +1789,9 @@ L = new WeakSet(), lt = function() {
|
|
|
1784
1789
|
i && (i.defaultLabel.value = o);
|
|
1785
1790
|
}, rt = function() {
|
|
1786
1791
|
if (!this.activeEditor || !this.activeEditor.converter || !this.activeEditor.converter.docHiglightColors.size) return;
|
|
1787
|
-
const o = this.toolbarItems.find((
|
|
1792
|
+
const o = this.toolbarItems.find((l) => l.name.value === "highlight"), n = Vn(), e = 7, i = Array.from(this.activeEditor.converter.docHiglightColors).reduce((l, s, c) => {
|
|
1788
1793
|
const d = Math.floor(c / e);
|
|
1789
|
-
return
|
|
1794
|
+
return l[d] || (l[d] = []), n.includes(s) || l[d].push(h(s)), l;
|
|
1790
1795
|
}, []), r = {
|
|
1791
1796
|
key: "color",
|
|
1792
1797
|
type: "render",
|
|
@@ -1799,20 +1804,20 @@ L = new WeakSet(), lt = function() {
|
|
|
1799
1804
|
n.value || o.setDisabled(!0);
|
|
1800
1805
|
});
|
|
1801
1806
|
}, ct = function() {
|
|
1802
|
-
this.activeEditor && (this.undoDepth = xt(this.activeEditor.state), this.redoDepth =
|
|
1803
|
-
}, fe = function({ item: o, argument: n },
|
|
1807
|
+
this.activeEditor && (this.undoDepth = xt(this.activeEditor.state), this.redoDepth = Et(this.activeEditor.state));
|
|
1808
|
+
}, fe = function({ item: o, argument: n, noArgumentCallback: e = !1 }, i) {
|
|
1804
1809
|
if (!n || !this.activeEditor) return;
|
|
1805
|
-
let
|
|
1806
|
-
const
|
|
1807
|
-
if (n === "none" &&
|
|
1808
|
-
this.activeEditor.commands[
|
|
1810
|
+
let r = o.command;
|
|
1811
|
+
const l = o.noArgumentCommand;
|
|
1812
|
+
if (n === "none" && l in this.activeEditor?.commands) {
|
|
1813
|
+
this.activeEditor.commands[l](), typeof i == "function" && e && i(n), this.updateToolbarState();
|
|
1809
1814
|
return;
|
|
1810
1815
|
}
|
|
1811
|
-
|
|
1816
|
+
r in this.activeEditor?.commands && (this.activeEditor.commands[r](n), typeof i == "function" && i(n), this.updateToolbarState());
|
|
1812
1817
|
};
|
|
1813
|
-
function ho(t,
|
|
1814
|
-
if (!t.value || !
|
|
1815
|
-
const o =
|
|
1818
|
+
function ho(t, a) {
|
|
1819
|
+
if (!t.value || !a?.value?.options?.scale) return;
|
|
1820
|
+
const o = a.value.options.scale, n = t.value.getBoundingClientRect(), e = t.value.querySelectorAll(".pagination-break-wrapper");
|
|
1816
1821
|
let i;
|
|
1817
1822
|
e.forEach((r) => {
|
|
1818
1823
|
const s = (r.getBoundingClientRect().left - n.left) / o * -1 + 1;
|
|
@@ -1822,19 +1827,19 @@ function ho(t, l) {
|
|
|
1822
1827
|
}
|
|
1823
1828
|
});
|
|
1824
1829
|
}
|
|
1825
|
-
const fo = (t,
|
|
1826
|
-
const o = t.clientY, n = t.clientX, { view: e } =
|
|
1830
|
+
const fo = (t, a) => {
|
|
1831
|
+
const o = t.clientY, n = t.clientX, { view: e } = a, i = e.dom.getBoundingClientRect();
|
|
1827
1832
|
let r = {
|
|
1828
1833
|
left: 0,
|
|
1829
1834
|
top: o
|
|
1830
|
-
},
|
|
1831
|
-
n > i.right ? (r.left = i.left + i.width - 1,
|
|
1835
|
+
}, l = !1;
|
|
1836
|
+
n > i.right ? (r.left = i.left + i.width - 1, l = !0) : n < i.left && (r.left = i.left);
|
|
1832
1837
|
const s = e.posAtCoords(r)?.pos;
|
|
1833
1838
|
if (s) {
|
|
1834
1839
|
let c = s;
|
|
1835
|
-
if (
|
|
1836
|
-
const b = e.state.doc.resolve(s).textOffset, v = e.state.doc.nodeAt(s),
|
|
1837
|
-
c = v?.isText &&
|
|
1840
|
+
if (l) {
|
|
1841
|
+
const b = e.state.doc.resolve(s).textOffset, v = e.state.doc.nodeAt(s), E = v?.text?.charAt(b);
|
|
1842
|
+
c = v?.isText && E !== " " ? s - 1 : s;
|
|
1838
1843
|
}
|
|
1839
1844
|
const d = e.state.tr.setSelection(
|
|
1840
1845
|
Ye.create(e.state.doc, c)
|
|
@@ -1858,8 +1863,8 @@ const fo = (t, l) => {
|
|
|
1858
1863
|
}
|
|
1859
1864
|
},
|
|
1860
1865
|
emits: ["margin-change"],
|
|
1861
|
-
setup(t, { emit:
|
|
1862
|
-
const o =
|
|
1866
|
+
setup(t, { emit: a }) {
|
|
1867
|
+
const o = a, n = t, e = f(null), i = f([]), r = f("#CCCCCC"), l = f("#2563EB66"), s = f(null), c = f(null), d = f(!1), u = f(null), b = Ke({ side: "left", x: 0 }), v = Ke({ side: "right", x: 0 }), y = f(!1), E = f(0);
|
|
1863
1868
|
let g = 0;
|
|
1864
1869
|
const F = () => {
|
|
1865
1870
|
if (n.editor.options.mode !== "docx") return;
|
|
@@ -1898,13 +1903,13 @@ const fo = (t, l) => {
|
|
|
1898
1903
|
}), N = (I) => {
|
|
1899
1904
|
d.value = !0, ye();
|
|
1900
1905
|
const M = I.currentTarget.id;
|
|
1901
|
-
u.value = M === "left-margin-handle" ? b : v,
|
|
1906
|
+
u.value = M === "left-margin-handle" ? b : v, E.value = u.value.x, g = I.clientX - u.value.x, y.value = !0;
|
|
1902
1907
|
}, V = (I) => {
|
|
1903
1908
|
if (!d.value) return;
|
|
1904
1909
|
const M = I.clientX - g;
|
|
1905
1910
|
u.value.x = M, u.value.side === "left" ? M <= 0 ? u.value.x = 0 : M >= v.x - Te && (u.value.x = v.x - Te) : M >= s.value.width * 96 ? u.value.x = s.value.width * 96 : M <= b.x + Te && (u.value.x = b.x + Te);
|
|
1906
1911
|
}, te = () => {
|
|
1907
|
-
if (d.value = !1, y.value = !1, Z(), u.value && u.value.x !==
|
|
1912
|
+
if (d.value = !1, y.value = !1, Z(), u.value && u.value.x !== E.value) {
|
|
1908
1913
|
const I = re();
|
|
1909
1914
|
o("margin-change", {
|
|
1910
1915
|
side: u.value.side,
|
|
@@ -1912,51 +1917,51 @@ const fo = (t, l) => {
|
|
|
1912
1917
|
});
|
|
1913
1918
|
}
|
|
1914
1919
|
}, ye = () => {
|
|
1915
|
-
r.value =
|
|
1920
|
+
r.value = l.value;
|
|
1916
1921
|
}, Z = () => {
|
|
1917
1922
|
r.value = "#CCC";
|
|
1918
1923
|
}, re = () => u.value.side === "left" ? u.value.x / 96 : (s.value.width * 96 - u.value.x) / 96, be = j(() => ({
|
|
1919
1924
|
"--alignment": go,
|
|
1920
1925
|
"--ruler-handle-color": r.value,
|
|
1921
|
-
"--ruler-handle-active-color":
|
|
1926
|
+
"--ruler-handle-active-color": l.value
|
|
1922
1927
|
}));
|
|
1923
|
-
return
|
|
1928
|
+
return ke(() => {
|
|
1924
1929
|
i.value = F(), window.addEventListener("mousemove", V), window.addEventListener("mouseup", te);
|
|
1925
1930
|
}), zt(() => {
|
|
1926
1931
|
window.removeEventListener("mousemove", V), window.removeEventListener("mouseup", te);
|
|
1927
|
-
}), (I, M) => (w(),
|
|
1932
|
+
}), (I, M) => (w(), C("div", {
|
|
1928
1933
|
class: "ruler",
|
|
1929
1934
|
ref_key: "ruler",
|
|
1930
1935
|
ref: e,
|
|
1931
1936
|
style: J(be.value)
|
|
1932
1937
|
}, [
|
|
1933
|
-
|
|
1938
|
+
k("div", {
|
|
1934
1939
|
class: "margin-handle handle-left",
|
|
1935
1940
|
id: "left-margin-handle",
|
|
1936
1941
|
onMousedown: N,
|
|
1937
1942
|
style: J(_.value("left"))
|
|
1938
1943
|
}, null, 36),
|
|
1939
|
-
|
|
1944
|
+
k("div", {
|
|
1940
1945
|
class: "margin-handle handle-right",
|
|
1941
1946
|
id: "right-margin-handle",
|
|
1942
1947
|
onMousedown: N,
|
|
1943
1948
|
style: J(_.value("right"))
|
|
1944
1949
|
}, null, 36),
|
|
1945
|
-
y.value ? (w(),
|
|
1950
|
+
y.value ? (w(), C("div", {
|
|
1946
1951
|
key: 0,
|
|
1947
1952
|
class: "vertical-indicator",
|
|
1948
1953
|
style: J(T.value)
|
|
1949
1954
|
}, null, 4)) : Q("", !0),
|
|
1950
|
-
(w(!0),
|
|
1955
|
+
(w(!0), C(U, null, ee(i.value, (H) => (w(), C("div", {
|
|
1951
1956
|
class: oe(H.className),
|
|
1952
1957
|
style: J(p.value(H))
|
|
1953
1958
|
}, [
|
|
1954
|
-
|
|
1955
|
-
(w(!0),
|
|
1959
|
+
k("div", vo, ie(H.numbering), 1),
|
|
1960
|
+
(w(!0), C(U, null, ee(H.elements, (R) => (w(), C("div", {
|
|
1956
1961
|
class: oe(R.className),
|
|
1957
1962
|
style: J(p.value(R))
|
|
1958
1963
|
}, [
|
|
1959
|
-
(w(!0),
|
|
1964
|
+
(w(!0), C(U, null, ee(R.elements, (G) => (w(), C("div", {
|
|
1960
1965
|
class: oe(G.className),
|
|
1961
1966
|
style: J(p.value(G))
|
|
1962
1967
|
}, null, 6))), 256))
|
|
@@ -1964,10 +1969,10 @@ const fo = (t, l) => {
|
|
|
1964
1969
|
], 6))), 256))
|
|
1965
1970
|
], 4));
|
|
1966
1971
|
}
|
|
1967
|
-
}, bo = /* @__PURE__ */ q(yo, [["__scopeId", "data-v-ad77036c"]]), wo = { class: "super-editor-container" },
|
|
1972
|
+
}, bo = /* @__PURE__ */ q(yo, [["__scopeId", "data-v-ad77036c"]]), wo = { class: "super-editor-container" }, Co = {
|
|
1968
1973
|
key: 1,
|
|
1969
1974
|
class: "placeholder-editor"
|
|
1970
|
-
},
|
|
1975
|
+
}, ko = { class: "placeholder-title" }, _o = {
|
|
1971
1976
|
__name: "SuperEditor",
|
|
1972
1977
|
props: {
|
|
1973
1978
|
documentId: {
|
|
@@ -1996,8 +2001,8 @@ const fo = (t, l) => {
|
|
|
1996
2001
|
"comments-loaded",
|
|
1997
2002
|
"selection-update"
|
|
1998
2003
|
],
|
|
1999
|
-
setup(t, { emit:
|
|
2000
|
-
const o =
|
|
2004
|
+
setup(t, { emit: a }) {
|
|
2005
|
+
const o = a, n = t, e = f(!1), i = nt(null), r = f(null), l = f(null);
|
|
2001
2006
|
let s;
|
|
2002
2007
|
const c = () => {
|
|
2003
2008
|
clearTimeout(s);
|
|
@@ -2026,12 +2031,12 @@ const fo = (t, l) => {
|
|
|
2026
2031
|
_.on("synced", T);
|
|
2027
2032
|
}
|
|
2028
2033
|
}, v = () => {
|
|
2029
|
-
const p =
|
|
2034
|
+
const p = St();
|
|
2030
2035
|
return n.options.pagination ? p : p.filter((_) => _.name !== "pagination");
|
|
2031
2036
|
}, y = async ({ content: p, media: _ = {}, mediaFiles: T = {}, fonts: N = {} } = {}) => {
|
|
2032
2037
|
i.value = new ze({
|
|
2033
2038
|
mode: "docx",
|
|
2034
|
-
element:
|
|
2039
|
+
element: l.value,
|
|
2035
2040
|
fileSource: n.fileSource,
|
|
2036
2041
|
extensions: v(),
|
|
2037
2042
|
externalExtensions: n.options.externalExtensions,
|
|
@@ -2042,22 +2047,22 @@ const fo = (t, l) => {
|
|
|
2042
2047
|
fonts: N,
|
|
2043
2048
|
...n.options
|
|
2044
2049
|
}), i.value.on("paginationUpdate", () => {
|
|
2045
|
-
ho(
|
|
2050
|
+
ho(l, i);
|
|
2046
2051
|
}), i.value.on("collaborationReady", () => {
|
|
2047
2052
|
setTimeout(() => {
|
|
2048
2053
|
e.value = !0;
|
|
2049
2054
|
}, 150);
|
|
2050
2055
|
});
|
|
2051
|
-
},
|
|
2056
|
+
}, E = (p) => {
|
|
2052
2057
|
o("editor-keydown", { editor: i.value });
|
|
2053
2058
|
}, g = (p) => {
|
|
2054
2059
|
o("editor-click", { editor: i.value });
|
|
2055
|
-
let _ =
|
|
2060
|
+
let _ = l.value?.querySelector(".ProseMirror");
|
|
2056
2061
|
if (!_ || !i.value)
|
|
2057
2062
|
return;
|
|
2058
2063
|
!_.contains(p.target) && i.value.isEditable && i.value.view?.focus();
|
|
2059
2064
|
};
|
|
2060
|
-
|
|
2065
|
+
ke(() => {
|
|
2061
2066
|
b(), (n.options?.suppressSkeletonLoader || !n.options?.collaborationProvider) && (e.value = !0);
|
|
2062
2067
|
});
|
|
2063
2068
|
const F = (p) => {
|
|
@@ -2069,29 +2074,29 @@ const fo = (t, l) => {
|
|
|
2069
2074
|
};
|
|
2070
2075
|
return ot(() => {
|
|
2071
2076
|
c(), i.value?.destroy(), i.value = null;
|
|
2072
|
-
}), (p, _) => (w(),
|
|
2077
|
+
}), (p, _) => (w(), C("div", wo, [
|
|
2073
2078
|
t.options.rulers && i.value ? (w(), Vt(bo, {
|
|
2074
2079
|
key: 0,
|
|
2075
2080
|
class: "ruler",
|
|
2076
2081
|
editor: i.value,
|
|
2077
2082
|
onMarginChange: $
|
|
2078
2083
|
}, null, 8, ["editor"])) : Q("", !0),
|
|
2079
|
-
|
|
2084
|
+
k("div", {
|
|
2080
2085
|
class: "super-editor",
|
|
2081
2086
|
ref_key: "editorWrapper",
|
|
2082
2087
|
ref: r,
|
|
2083
|
-
onKeydown:
|
|
2088
|
+
onKeydown: E,
|
|
2084
2089
|
onClick: g,
|
|
2085
2090
|
onMousedown: F
|
|
2086
2091
|
}, [
|
|
2087
|
-
|
|
2092
|
+
k("div", {
|
|
2088
2093
|
ref_key: "editorElem",
|
|
2089
|
-
ref:
|
|
2094
|
+
ref: l,
|
|
2090
2095
|
class: "editor-element super-editor__element"
|
|
2091
2096
|
}, null, 512)
|
|
2092
2097
|
], 544),
|
|
2093
|
-
e.value ? Q("", !0) : (w(),
|
|
2094
|
-
|
|
2098
|
+
e.value ? Q("", !0) : (w(), C("div", Co, [
|
|
2099
|
+
k("div", ko, [
|
|
2095
2100
|
P(D(Y), {
|
|
2096
2101
|
text: "",
|
|
2097
2102
|
style: { width: "60%" }
|
|
@@ -2140,12 +2145,12 @@ const fo = (t, l) => {
|
|
|
2140
2145
|
}, Do = /* @__PURE__ */ q(_o, [["__scopeId", "data-v-ff8f86f4"]]), $o = {
|
|
2141
2146
|
__name: "BasicUpload",
|
|
2142
2147
|
emits: ["file-change"],
|
|
2143
|
-
setup(t, { emit:
|
|
2144
|
-
const o =
|
|
2148
|
+
setup(t, { emit: a }) {
|
|
2149
|
+
const o = a, n = (e) => {
|
|
2145
2150
|
o("file-change", e.target.files[0]);
|
|
2146
2151
|
};
|
|
2147
|
-
return (e, i) => (w(),
|
|
2148
|
-
|
|
2152
|
+
return (e, i) => (w(), C("div", null, [
|
|
2153
|
+
k("input", {
|
|
2149
2154
|
type: "file",
|
|
2150
2155
|
id: "fileInput",
|
|
2151
2156
|
onChange: n,
|
|
@@ -2153,7 +2158,7 @@ const fo = (t, l) => {
|
|
|
2153
2158
|
}, null, 32)
|
|
2154
2159
|
]));
|
|
2155
2160
|
}
|
|
2156
|
-
}, xo = ["innerHTML"],
|
|
2161
|
+
}, xo = ["innerHTML"], Eo = {
|
|
2157
2162
|
__name: "SuperInput",
|
|
2158
2163
|
props: {
|
|
2159
2164
|
modelValue: {
|
|
@@ -2176,16 +2181,16 @@ const fo = (t, l) => {
|
|
|
2176
2181
|
}
|
|
2177
2182
|
},
|
|
2178
2183
|
emits: ["update:modelValue", "focus", "blur"],
|
|
2179
|
-
setup(t, { emit:
|
|
2180
|
-
const o =
|
|
2181
|
-
const
|
|
2182
|
-
o("update:modelValue",
|
|
2184
|
+
setup(t, { emit: a }) {
|
|
2185
|
+
const o = a, n = t, e = nt(), i = f(null), r = f(!1), l = ({ editor: v, transaction: y }) => {
|
|
2186
|
+
const E = v.getHTML();
|
|
2187
|
+
o("update:modelValue", E);
|
|
2183
2188
|
}, s = ({ editor: v, transaction: y }) => {
|
|
2184
2189
|
r.value = !0, b(), o("focus", { editor: v, transaction: y });
|
|
2185
2190
|
}, c = ({ editor: v, transaction: y }) => {
|
|
2186
2191
|
r.value = !1, o("blur", { editor: v, transaction: y });
|
|
2187
2192
|
}, d = async () => {
|
|
2188
|
-
At.options.placeholder = n.placeholder || "Type something...", n.options.onTransaction =
|
|
2193
|
+
At.options.placeholder = n.placeholder || "Type something...", n.options.onTransaction = l, n.options.onFocus = s, n.options.onBlur = c, e.value = new ze({
|
|
2189
2194
|
mode: "text",
|
|
2190
2195
|
content: document.getElementById("currentContent"),
|
|
2191
2196
|
element: i.value,
|
|
@@ -2198,27 +2203,27 @@ const fo = (t, l) => {
|
|
|
2198
2203
|
}, b = () => {
|
|
2199
2204
|
e.value?.setOptions({ users: n.users });
|
|
2200
2205
|
};
|
|
2201
|
-
return
|
|
2206
|
+
return ke(() => {
|
|
2202
2207
|
d();
|
|
2203
2208
|
}), ot(() => {
|
|
2204
2209
|
e.value?.destroy(), e.value = null;
|
|
2205
|
-
}), (v, y) => (w(),
|
|
2210
|
+
}), (v, y) => (w(), C("div", {
|
|
2206
2211
|
class: oe(["super-editor super-input", { "super-input-active": r.value }]),
|
|
2207
2212
|
onClick: ge(u, ["stop", "prevent"])
|
|
2208
2213
|
}, [
|
|
2209
|
-
|
|
2214
|
+
k("div", {
|
|
2210
2215
|
id: "currentContent",
|
|
2211
2216
|
style: { display: "none" },
|
|
2212
2217
|
innerHTML: t.modelValue
|
|
2213
2218
|
}, null, 8, xo),
|
|
2214
|
-
|
|
2219
|
+
k("div", {
|
|
2215
2220
|
ref_key: "editorElem",
|
|
2216
2221
|
ref: i,
|
|
2217
2222
|
class: "editor-element super-editor__element"
|
|
2218
2223
|
}, null, 512)
|
|
2219
2224
|
], 2));
|
|
2220
2225
|
}
|
|
2221
|
-
}, Ho = /* @__PURE__ */ q(
|
|
2226
|
+
}, Ho = /* @__PURE__ */ q(Eo, [["__scopeId", "data-v-4d5cff52"]]), Bo = {
|
|
2222
2227
|
Node: Mt,
|
|
2223
2228
|
Attribute: Lt,
|
|
2224
2229
|
Extension: It,
|
|
@@ -2240,11 +2245,11 @@ export {
|
|
|
2240
2245
|
zo as TrackChangesBasePluginKey,
|
|
2241
2246
|
Zo as createZip,
|
|
2242
2247
|
Vo as fieldAnnotationHelpers,
|
|
2243
|
-
|
|
2248
|
+
kt as getActiveFormatting,
|
|
2244
2249
|
mo as getAllowedImageDimensions,
|
|
2245
2250
|
Wo as getMarksFromSelection,
|
|
2246
2251
|
Tt as getRichTextExtensions,
|
|
2247
|
-
|
|
2252
|
+
St as getStarterExtensions,
|
|
2248
2253
|
Po as helpers,
|
|
2249
2254
|
jo as trackChangesHelpers
|
|
2250
2255
|
};
|