@eigenpal/docx-editor-vue 1.6.0 → 1.6.2
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/docx-editor-vue.css +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +420 -402
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { t as b } from "./_plugin-vue_export-helper-B52Kst-M.js";
|
|
|
4
4
|
import { n as x } from "./RenderedDomContext-CHc18N_2.js";
|
|
5
5
|
import { t as S } from "./zIndex-CxELVe_L.js";
|
|
6
6
|
import { i as C, n as ee, r as te, t as ne } from "./useDragAutoScroll-B21Ec-Zy.js";
|
|
7
|
-
import { Fragment as w, Teleport as T, computed as E, createApp as
|
|
7
|
+
import { Fragment as w, Teleport as T, computed as E, createApp as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createSlots as re, createStaticVNode as ie, createTextVNode as M, createVNode as N, defineComponent as P, h as ae, isRef as oe, nextTick as se, normalizeClass as ce, normalizeStyle as F, onBeforeUnmount as I, onMounted as le, openBlock as L, ref as R, renderList as ue, renderSlot as de, resolveDynamicComponent as fe, shallowRef as pe, toDisplayString as z, unref as B, vModelCheckbox as V, vModelSelect as me, vModelText as H, watch as U, watchEffect as W, withCtx as he, withDirectives as G, withKeys as K, withModifiers as q } from "vue";
|
|
8
8
|
import { NodeSelection as J, TextSelection as Y } from "prosemirror-state";
|
|
9
9
|
import { applyCellSelectionHighlight as ge, clickToPositionDom as _e, computeHfCaretRectFromView as ve, computeHfSelectionRectsFromView as ye, findBodyPmAnchor as X, findBodyPmSpans as be } from "@eigenpal/docx-editor-core/layout-bridge";
|
|
10
10
|
import { clampRangeToDoc as xe, findChangeRange as Se, findCommentRange as Ce, findInDocument as we, getPageContent as Te, getSelectionInfo as Ee } from "@eigenpal/docx-editor-core/prosemirror/queries";
|
|
@@ -97,7 +97,7 @@ function on(e, t, n, r) {
|
|
|
97
97
|
}
|
|
98
98
|
//#endregion
|
|
99
99
|
//#region src/components/DecorationLayer.vue
|
|
100
|
-
var sn = /* @__PURE__ */
|
|
100
|
+
var sn = /* @__PURE__ */ P({
|
|
101
101
|
__name: "DecorationLayer",
|
|
102
102
|
props: {
|
|
103
103
|
getView: { type: Function },
|
|
@@ -182,7 +182,7 @@ var sn = /* @__PURE__ */ N({
|
|
|
182
182
|
function u(e) {
|
|
183
183
|
return e.type?.attrs ?? null;
|
|
184
184
|
}
|
|
185
|
-
return (e, t) => (L(),
|
|
185
|
+
return (e, t) => (L(), A("div", {
|
|
186
186
|
ref_key: "overlayRef",
|
|
187
187
|
ref: n,
|
|
188
188
|
class: "paged-editor__decoration-overlay",
|
|
@@ -209,7 +209,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
209
209
|
}, fn = {
|
|
210
210
|
key: 1,
|
|
211
211
|
class: "image-overlay__dim image-overlay__dim--rotate"
|
|
212
|
-
}, pn = 4, mn = 15, hn = 250, gn = 700, _n = /* @__PURE__ */ b(/* @__PURE__ */
|
|
212
|
+
}, pn = 4, mn = 15, hn = 250, gn = 700, _n = /* @__PURE__ */ b(/* @__PURE__ */ P({
|
|
213
213
|
__name: "ImageSelectionOverlay",
|
|
214
214
|
props: {
|
|
215
215
|
imageInfo: {},
|
|
@@ -267,9 +267,9 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
267
267
|
zoom: r.zoom
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
|
-
let
|
|
271
|
-
function
|
|
272
|
-
|
|
270
|
+
let D = null;
|
|
271
|
+
function O() {
|
|
272
|
+
D?.();
|
|
273
273
|
let e = 0, t = "", n = 0, r = 0, i = (a) => {
|
|
274
274
|
r === 0 && (r = a);
|
|
275
275
|
let o = a - r;
|
|
@@ -279,7 +279,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
279
279
|
};
|
|
280
280
|
e = requestAnimationFrame(i);
|
|
281
281
|
let a = setTimeout(T, hn);
|
|
282
|
-
|
|
282
|
+
D = () => {
|
|
283
283
|
cancelAnimationFrame(e), clearTimeout(a);
|
|
284
284
|
};
|
|
285
285
|
}
|
|
@@ -288,9 +288,9 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
288
288
|
p.value = null;
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
|
-
|
|
291
|
+
O(), n(() => D?.());
|
|
292
292
|
}, { immediate: !0 }), U(() => r.zoom, () => {
|
|
293
|
-
r.imageInfo &&
|
|
293
|
+
r.imageInfo && O();
|
|
294
294
|
}), U(() => r.imageInfo, (e, t, n) => {
|
|
295
295
|
if (!r.imageInfo) return;
|
|
296
296
|
let i = () => {
|
|
@@ -301,7 +301,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
301
301
|
se(() => {
|
|
302
302
|
if (c || !r.imageInfo) return;
|
|
303
303
|
let e = te();
|
|
304
|
-
e && (s = new MutationObserver(() =>
|
|
304
|
+
e && (s = new MutationObserver(() => O()), s.observe(e, {
|
|
305
305
|
attributes: !0,
|
|
306
306
|
attributeFilter: ["style"]
|
|
307
307
|
}));
|
|
@@ -309,7 +309,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
309
309
|
c = !0, o?.removeEventListener("scroll", i), window.removeEventListener("resize", i), s?.disconnect(), b && cancelAnimationFrame(b);
|
|
310
310
|
});
|
|
311
311
|
}, { immediate: !0 });
|
|
312
|
-
let
|
|
312
|
+
let re = E(() => o.value ? l.value : p.value?.width || 0), ie = E(() => o.value ? u.value : p.value?.height || 0), M = E(() => {
|
|
313
313
|
let e = p.value;
|
|
314
314
|
if (!e) return {
|
|
315
315
|
position: "absolute",
|
|
@@ -330,8 +330,8 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
330
330
|
zIndex: S.imageOverlay,
|
|
331
331
|
pointerEvents: "auto"
|
|
332
332
|
};
|
|
333
|
-
}),
|
|
334
|
-
let e =
|
|
333
|
+
}), N = E(() => {
|
|
334
|
+
let e = re.value, t = ie.value, n = `${e / 2 - 5}px`, r = `${t / 2 - 5}px`, i = `${e - 5}px`, a = `${t - 5}px`, o = "-5px";
|
|
335
335
|
return [
|
|
336
336
|
{
|
|
337
337
|
pos: "nw",
|
|
@@ -399,10 +399,10 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
399
399
|
}
|
|
400
400
|
];
|
|
401
401
|
});
|
|
402
|
-
function
|
|
403
|
-
!r.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, y = { ...p.value }, l.value = Math.round(_), u.value = Math.round(v), o.value = !0, i("interact-start"), document.addEventListener("mousemove",
|
|
402
|
+
function P(e, t) {
|
|
403
|
+
!r.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, y = { ...p.value }, l.value = Math.round(_), u.value = Math.round(v), o.value = !0, i("interact-start"), document.addEventListener("mousemove", ae), document.addEventListener("mouseup", oe));
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function ae(e) {
|
|
406
406
|
let t = r.zoom, n = (e.clientX - h) / t, i = (e.clientY - g) / t, a = !e.shiftKey, o = $e(m, n, i, _, v, a);
|
|
407
407
|
l.value = Math.round(o.width), u.value = Math.round(o.height);
|
|
408
408
|
let s = y;
|
|
@@ -414,7 +414,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
function oe() {
|
|
417
|
-
document.removeEventListener("mousemove",
|
|
417
|
+
document.removeEventListener("mousemove", ae), document.removeEventListener("mouseup", oe), o.value = !1, y = null, i("interact-end");
|
|
418
418
|
let e = r.view, t = r.imageInfo;
|
|
419
419
|
if (!e || !t) {
|
|
420
420
|
T();
|
|
@@ -520,73 +520,95 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
520
520
|
} catch {}
|
|
521
521
|
}
|
|
522
522
|
return I(() => {
|
|
523
|
-
document.removeEventListener("mousemove",
|
|
524
|
-
}), (t, r) => e.imageInfo ? (L(),
|
|
523
|
+
document.removeEventListener("mousemove", ae), document.removeEventListener("mouseup", oe), document.removeEventListener("mousemove", G), document.removeEventListener("mouseup", K), x && document.removeEventListener("mousemove", x), C && document.removeEventListener("mouseup", C), Y &&= (Y.remove(), null), b && cancelAnimationFrame(b), D?.();
|
|
524
|
+
}), (t, r) => e.imageInfo ? (L(), A("div", {
|
|
525
525
|
key: 0,
|
|
526
526
|
ref_key: "overlayRootRef",
|
|
527
527
|
ref: a,
|
|
528
528
|
class: "image-overlay",
|
|
529
|
-
style: F(
|
|
529
|
+
style: F(M.value),
|
|
530
530
|
onMousedown: r[3] ||= q(() => {}, ["stop"])
|
|
531
531
|
}, [
|
|
532
|
-
r[4] ||=
|
|
533
|
-
|
|
532
|
+
r[4] ||= j("div", { class: "image-overlay__border" }, null, -1),
|
|
533
|
+
j("div", {
|
|
534
534
|
class: "image-overlay__body",
|
|
535
535
|
style: F({ cursor: s.value ? "grabbing" : "grab" }),
|
|
536
536
|
onMousedown: r[0] ||= q((e) => ge(e), ["prevent", "stop"]),
|
|
537
537
|
onContextmenu: r[1] ||= q((e) => t.$emit("context-menu", e), ["prevent", "stop"])
|
|
538
538
|
}, null, 36),
|
|
539
|
-
(L(!0),
|
|
539
|
+
(L(!0), A(w, null, ue(N.value, (e) => (L(), A("div", {
|
|
540
540
|
key: e.pos,
|
|
541
541
|
class: "image-overlay__handle",
|
|
542
542
|
style: F(e.style),
|
|
543
543
|
"data-handle": e.pos,
|
|
544
|
-
onMousedown: q((t) =>
|
|
544
|
+
onMousedown: q((t) => P(t, e.pos), ["prevent", "stop"])
|
|
545
545
|
}, null, 44, ln))), 128)),
|
|
546
|
-
r[5] ||=
|
|
547
|
-
|
|
546
|
+
r[5] ||= j("div", { class: "image-overlay__rotate-line" }, null, -1),
|
|
547
|
+
j("div", {
|
|
548
548
|
class: "image-overlay__rotate-handle",
|
|
549
|
-
style: F({ left: `${
|
|
549
|
+
style: F({ left: `${re.value / 2 - 7}px` }),
|
|
550
550
|
title: B(n)("imageOverlay.rotate"),
|
|
551
551
|
onMousedown: r[2] ||= q((e) => he(e), ["prevent", "stop"])
|
|
552
552
|
}, null, 44, un),
|
|
553
|
-
o.value ? (L(),
|
|
554
|
-
c.value ? (L(),
|
|
555
|
-
], 36)) :
|
|
553
|
+
o.value ? (L(), A("div", dn, z(Math.round(l.value)) + " × " + z(Math.round(u.value)), 1)) : k("", !0),
|
|
554
|
+
c.value ? (L(), A("div", fn, z(Math.round(f.value)) + "° ", 1)) : k("", !0)
|
|
555
|
+
], 36)) : k("", !0);
|
|
556
556
|
}
|
|
557
557
|
}), [["__scopeId", "data-v-a3e3aca1"]]), vn = { class: "doc-outline__header" }, yn = { class: "doc-outline__body" }, bn = {
|
|
558
558
|
key: 0,
|
|
559
559
|
class: "doc-outline__empty"
|
|
560
|
-
}, xn = ["onMousedown"], Sn = /* @__PURE__ */ b(/* @__PURE__ */
|
|
560
|
+
}, xn = ["onMousedown"], Sn = /* @__PURE__ */ b(/* @__PURE__ */ P({
|
|
561
561
|
__name: "DocumentOutline",
|
|
562
562
|
props: {
|
|
563
563
|
isOpen: { type: Boolean },
|
|
564
|
-
headings: {}
|
|
564
|
+
headings: {},
|
|
565
|
+
leftOffset: { default: 12 }
|
|
565
566
|
},
|
|
566
567
|
emits: ["close", "navigate"],
|
|
567
568
|
setup(e) {
|
|
568
|
-
|
|
569
|
+
let t = e, n = E(() => t.headings.length ? Math.min(...t.headings.map((e) => e.level)) : 0);
|
|
570
|
+
return (t, i) => e.isOpen ? (L(), A("nav", {
|
|
569
571
|
key: 0,
|
|
570
572
|
class: "doc-outline",
|
|
573
|
+
style: F({ left: e.leftOffset + "px" }),
|
|
571
574
|
role: "navigation",
|
|
572
575
|
"aria-label": "Document outline",
|
|
573
|
-
onMousedown:
|
|
574
|
-
}, [
|
|
576
|
+
onMousedown: i[1] ||= q(() => {}, ["stop"])
|
|
577
|
+
}, [j("div", vn, [j("button", {
|
|
575
578
|
class: "doc-outline__back",
|
|
576
579
|
title: "Close outline",
|
|
577
580
|
"aria-label": "Close outline",
|
|
578
|
-
onClick:
|
|
579
|
-
}, [
|
|
581
|
+
onClick: i[0] ||= (e) => t.$emit("close")
|
|
582
|
+
}, [N(r, {
|
|
580
583
|
name: "arrow_back",
|
|
581
584
|
size: 20
|
|
582
|
-
})]),
|
|
583
|
-
key:
|
|
585
|
+
})]), i[2] ||= j("span", { class: "doc-outline__title" }, "Document Outline", -1)]), j("div", yn, [e.headings.length === 0 ? (L(), A("div", bn, "No headings found")) : k("", !0), (L(!0), A(w, null, ue(e.headings, (e, r) => (L(), A("button", {
|
|
586
|
+
key: r,
|
|
584
587
|
class: "doc-outline__item",
|
|
585
|
-
style: F({ paddingLeft:
|
|
588
|
+
style: F({ paddingLeft: 8 + (e.level - n.value) * 16 + "px" }),
|
|
586
589
|
onMousedown: q((n) => t.$emit("navigate", e.pmPos), ["prevent"])
|
|
587
|
-
}, z(e.text || "(untitled)"), 45, xn))), 128))])],
|
|
590
|
+
}, z(e.text || "(untitled)"), 45, xn))), 128))])], 36)) : k("", !0);
|
|
588
591
|
}
|
|
589
|
-
}), [["__scopeId", "data-v-
|
|
592
|
+
}), [["__scopeId", "data-v-db5afef4"]]), Cn = ["title", "aria-label"], wn = /* @__PURE__ */ P({
|
|
593
|
+
__name: "OutlineToggleButton",
|
|
594
|
+
props: { leftOffset: {} },
|
|
595
|
+
emits: ["toggle"],
|
|
596
|
+
setup(e) {
|
|
597
|
+
let { t } = d();
|
|
598
|
+
return (n, i) => (L(), A("button", {
|
|
599
|
+
type: "button",
|
|
600
|
+
class: "docx-outline-toggle docx-editor-vue__outline-toggle",
|
|
601
|
+
style: F({ left: e.leftOffset + "px" }),
|
|
602
|
+
title: B(t)("editor.showDocumentOutline"),
|
|
603
|
+
"aria-label": B(t)("editor.showDocumentOutline"),
|
|
604
|
+
onClick: i[0] ||= (e) => n.$emit("toggle"),
|
|
605
|
+
onMousedown: i[1] ||= q(() => {}, ["stop"])
|
|
606
|
+
}, [N(r, {
|
|
607
|
+
name: "format_list_bulleted",
|
|
608
|
+
size: 20
|
|
609
|
+
})], 44, Cn));
|
|
610
|
+
}
|
|
611
|
+
}), Tn = /* @__PURE__ */ b(/* @__PURE__ */ P({
|
|
590
612
|
__name: "PageIndicator",
|
|
591
613
|
props: {
|
|
592
614
|
currentPage: {},
|
|
@@ -595,7 +617,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
595
617
|
},
|
|
596
618
|
setup(e) {
|
|
597
619
|
let { t } = d();
|
|
598
|
-
return (n, r) => (L(),
|
|
620
|
+
return (n, r) => (L(), A("div", {
|
|
599
621
|
class: "docx-editor-vue__page-indicator",
|
|
600
622
|
style: F({ opacity: +!!e.visible }),
|
|
601
623
|
"aria-live": "polite",
|
|
@@ -605,10 +627,10 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
605
627
|
total: e.totalPages
|
|
606
628
|
})), 5));
|
|
607
629
|
}
|
|
608
|
-
}), [["__scopeId", "data-v-877b9ee2"]]),
|
|
630
|
+
}), [["__scopeId", "data-v-877b9ee2"]]), En = { class: "hf-editor__label" }, Dn = {
|
|
609
631
|
class: "hf-editor__actions",
|
|
610
632
|
style: { position: "relative" }
|
|
611
|
-
},
|
|
633
|
+
}, On = /* @__PURE__ */ b(/* @__PURE__ */ P({
|
|
612
634
|
__name: "InlineHeaderFooterEditor",
|
|
613
635
|
props: {
|
|
614
636
|
isOpen: { type: Boolean },
|
|
@@ -654,60 +676,60 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
654
676
|
function c() {
|
|
655
677
|
n.view && (r("save", dt(n.view.state.doc)), r("close"));
|
|
656
678
|
}
|
|
657
|
-
return (t, n) => e.isOpen ? (L(),
|
|
679
|
+
return (t, n) => e.isOpen ? (L(), A("div", {
|
|
658
680
|
key: 0,
|
|
659
681
|
class: "hf-editor",
|
|
660
682
|
style: F(i.value)
|
|
661
|
-
}, [
|
|
683
|
+
}, [j("div", {
|
|
662
684
|
class: ce(["hf-editor__toolbar", e.position === "footer" ? "hf-editor__toolbar--below" : "hf-editor__toolbar--above"]),
|
|
663
685
|
onMousedown: n[8] ||= q(() => {}, ["stop"]),
|
|
664
686
|
onContextmenu: n[9] ||= q(() => {}, ["stop"])
|
|
665
|
-
}, [
|
|
666
|
-
|
|
687
|
+
}, [j("span", En, z(e.position === "header" ? "Header" : "Footer"), 1), j("div", Dn, [
|
|
688
|
+
j("button", {
|
|
667
689
|
class: "hf-editor__btn",
|
|
668
690
|
title: "Options",
|
|
669
691
|
onMousedown: n[0] ||= q(() => {}, ["prevent"]),
|
|
670
692
|
onClick: n[1] ||= (e) => a.value = !a.value
|
|
671
693
|
}, " Options ▾ ", 32),
|
|
672
|
-
a.value ? (L(),
|
|
694
|
+
a.value ? (L(), A("div", {
|
|
673
695
|
key: 0,
|
|
674
696
|
class: "hf-editor__dropdown",
|
|
675
697
|
onMousedown: n[4] ||= q(() => {}, ["stop"]),
|
|
676
698
|
onContextmenu: n[5] ||= q(() => {}, ["stop"])
|
|
677
|
-
}, [
|
|
699
|
+
}, [j("button", {
|
|
678
700
|
type: "button",
|
|
679
701
|
class: "hf-editor__dropdown-item",
|
|
680
702
|
onClick: n[2] ||= (e) => {
|
|
681
703
|
a.value = !1, o("PAGE");
|
|
682
704
|
}
|
|
683
|
-
}, " Insert current page number "),
|
|
705
|
+
}, " Insert current page number "), j("button", {
|
|
684
706
|
type: "button",
|
|
685
707
|
class: "hf-editor__dropdown-item",
|
|
686
708
|
onClick: n[3] ||= (e) => {
|
|
687
709
|
a.value = !1, o("NUMPAGES");
|
|
688
710
|
}
|
|
689
|
-
}, " Insert total page count ")], 32)) :
|
|
690
|
-
|
|
711
|
+
}, " Insert total page count ")], 32)) : k("", !0),
|
|
712
|
+
j("button", {
|
|
691
713
|
class: "hf-editor__btn",
|
|
692
714
|
title: "Remove",
|
|
693
715
|
onMousedown: n[6] ||= q((e) => t.$emit("remove"), ["prevent"])
|
|
694
716
|
}, " Remove ", 32),
|
|
695
|
-
|
|
717
|
+
j("button", {
|
|
696
718
|
class: "hf-editor__btn hf-editor__btn--primary",
|
|
697
719
|
title: "Save",
|
|
698
720
|
onMousedown: q(c, ["prevent"])
|
|
699
721
|
}, " Save ", 32),
|
|
700
|
-
|
|
722
|
+
j("button", {
|
|
701
723
|
class: "hf-editor__btn",
|
|
702
724
|
title: "Cancel",
|
|
703
725
|
onMousedown: n[7] ||= q((e) => t.$emit("close"), ["prevent"])
|
|
704
726
|
}, " Cancel ", 32)
|
|
705
|
-
])], 34)], 4)) :
|
|
727
|
+
])], 34)], 4)) : k("", !0);
|
|
706
728
|
}
|
|
707
|
-
}), [["__scopeId", "data-v-81468575"]]),
|
|
729
|
+
}), [["__scopeId", "data-v-81468575"]]), kn = ["role"], An = {
|
|
708
730
|
key: 0,
|
|
709
731
|
class: "layout-sdt-widget-empty"
|
|
710
|
-
},
|
|
732
|
+
}, jn = ["aria-selected", "onClick"], Mn = ["value"], Nn = ".layout-sdt-widget, .layout-inline-sdt-widget", Pn = /* @__PURE__ */ P({
|
|
711
733
|
__name: "ContentControlWidgets",
|
|
712
734
|
props: {
|
|
713
735
|
container: {},
|
|
@@ -749,7 +771,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
749
771
|
}
|
|
750
772
|
function l(e) {
|
|
751
773
|
let t = e.target;
|
|
752
|
-
(t?.closest?.(
|
|
774
|
+
(t?.closest?.(Nn) || t?.closest?.(".layout-sdt-repeat-btn")) && e.preventDefault();
|
|
753
775
|
}
|
|
754
776
|
function u(e) {
|
|
755
777
|
let t = i.view, n = e.dataset.sdtWidget, o = r(e);
|
|
@@ -779,12 +801,12 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
779
801
|
e.preventDefault(), e.stopPropagation(), c(t);
|
|
780
802
|
return;
|
|
781
803
|
}
|
|
782
|
-
let n = e.target?.closest?.(
|
|
804
|
+
let n = e.target?.closest?.(Nn);
|
|
783
805
|
n && (e.preventDefault(), e.stopPropagation(), u(n));
|
|
784
806
|
}
|
|
785
807
|
function f(e) {
|
|
786
808
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
787
|
-
let t = e.target?.closest?.(
|
|
809
|
+
let t = e.target?.closest?.(Nn);
|
|
788
810
|
t && (e.preventDefault(), u(t));
|
|
789
811
|
}
|
|
790
812
|
function p(e) {
|
|
@@ -820,7 +842,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
820
842
|
date: t
|
|
821
843
|
});
|
|
822
844
|
}
|
|
823
|
-
return (e, t) => a.value ? (L(),
|
|
845
|
+
return (e, t) => a.value ? (L(), A("div", {
|
|
824
846
|
key: 0,
|
|
825
847
|
ref_key: "popupEl",
|
|
826
848
|
ref: o,
|
|
@@ -834,7 +856,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
834
856
|
}),
|
|
835
857
|
onKeydown: g,
|
|
836
858
|
onMousedown: t[0] ||= q(() => {}, ["prevent"])
|
|
837
|
-
}, [a.value.kind === "dropdown" ? (L(),
|
|
859
|
+
}, [a.value.kind === "dropdown" ? (L(), A(w, { key: 0 }, [a.value.items.length === 0 ? (L(), A("div", An, "No options")) : k("", !0), (L(!0), A(w, null, ue(a.value.items, (e) => (L(), A("button", {
|
|
838
860
|
key: e.value,
|
|
839
861
|
type: "button",
|
|
840
862
|
role: "option",
|
|
@@ -844,18 +866,18 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
844
866
|
kind: "dropdown",
|
|
845
867
|
value: e.value
|
|
846
868
|
})
|
|
847
|
-
}, z(e.displayText), 11,
|
|
869
|
+
}, z(e.displayText), 11, jn))), 128))], 64)) : (L(), A("input", {
|
|
848
870
|
key: 1,
|
|
849
871
|
type: "date",
|
|
850
872
|
class: "layout-sdt-widget-date",
|
|
851
873
|
value: a.value.current,
|
|
852
874
|
onChange: _
|
|
853
|
-
}, null, 40,
|
|
875
|
+
}, null, 40, Mn))], 44, kn)) : k("", !0);
|
|
854
876
|
}
|
|
855
|
-
}),
|
|
877
|
+
}), Fn = {
|
|
856
878
|
key: 0,
|
|
857
879
|
class: "docx-editor-vue__title-bar"
|
|
858
|
-
},
|
|
880
|
+
}, In = { class: "docx-editor-vue__title-bar-left" }, Ln = { class: "docx-editor-vue__title-bar-center" }, Rn = { class: "docx-editor-vue__title-bar-right" }, zn = /* @__PURE__ */ P({
|
|
859
881
|
__name: "DocxEditorMenuBar",
|
|
860
882
|
props: {
|
|
861
883
|
showMenuBar: { type: Boolean },
|
|
@@ -874,41 +896,41 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
874
896
|
],
|
|
875
897
|
setup(e, { emit: t }) {
|
|
876
898
|
let n = t;
|
|
877
|
-
return (t, r) => e.showMenuBar ? (L(),
|
|
878
|
-
|
|
879
|
-
|
|
899
|
+
return (t, r) => e.showMenuBar ? (L(), A("div", Fn, [
|
|
900
|
+
j("div", In, [e.renderLogo ? (L(), O(fe(e.renderLogo), { key: 0 })) : k("", !0), de(t.$slots, "title-bar-left")]),
|
|
901
|
+
j("div", Ln, [N(h, {
|
|
880
902
|
"model-value": e.documentName,
|
|
881
903
|
editable: e.documentNameEditable,
|
|
882
904
|
"onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
|
|
883
|
-
}, null, 8, ["model-value", "editable"]),
|
|
905
|
+
}, null, 8, ["model-value", "editable"]), N(v, {
|
|
884
906
|
onAction: r[1] ||= (e) => n("menu-action", e),
|
|
885
907
|
onInsertTable: r[2] ||= (e, t) => n("insert-table", e, t)
|
|
886
908
|
})]),
|
|
887
|
-
|
|
888
|
-
])) :
|
|
909
|
+
j("div", Rn, [de(t.$slots, "title-bar-right"), e.renderTitleBarRight ? (L(), O(fe(e.renderTitleBarRight), { key: 0 })) : k("", !0)])
|
|
910
|
+
])) : k("", !0);
|
|
889
911
|
}
|
|
890
|
-
}),
|
|
912
|
+
}), $ = ["aria-label"], Bn = { class: "wm-header" }, Vn = { class: "wm-body" }, Hn = { class: "wm-radio-row" }, Un = ["checked"], Wn = {
|
|
891
913
|
for: "wm-none",
|
|
892
914
|
class: "wm-inline-label"
|
|
893
|
-
},
|
|
915
|
+
}, Gn = { class: "wm-radio-row" }, Kn = ["checked"], qn = {
|
|
894
916
|
for: "wm-picture",
|
|
895
917
|
class: "wm-inline-label"
|
|
896
|
-
},
|
|
918
|
+
}, Jn = {
|
|
897
919
|
key: 0,
|
|
898
920
|
class: "wm-subform"
|
|
899
|
-
},
|
|
921
|
+
}, Yn = { class: "wm-row" }, Xn = {
|
|
900
922
|
key: 0,
|
|
901
923
|
class: "wm-row"
|
|
902
|
-
},
|
|
924
|
+
}, Zn = ["src"], Qn = { class: "wm-row" }, $n = { class: "wm-label" }, er = { class: "wm-inline-label" }, tr = { class: "wm-radio-row" }, nr = ["checked"], rr = {
|
|
903
925
|
for: "wm-text",
|
|
904
926
|
class: "wm-inline-label"
|
|
905
|
-
},
|
|
927
|
+
}, ir = {
|
|
906
928
|
key: 1,
|
|
907
929
|
class: "wm-subform"
|
|
908
|
-
},
|
|
930
|
+
}, ar = {
|
|
909
931
|
key: 0,
|
|
910
932
|
class: "wm-row"
|
|
911
|
-
},
|
|
933
|
+
}, or = { class: "wm-label" }, sr = ["value"], cr = ["value"], lr = { class: "wm-row" }, ur = { class: "wm-label" }, dr = { class: "wm-row" }, fr = { class: "wm-label" }, pr = ["value"], mr = { class: "wm-row" }, hr = { class: "wm-label" }, gr = { class: "wm-inline-label" }, _r = { class: "wm-row" }, vr = { class: "wm-label" }, yr = { class: "wm-row" }, br = { class: "wm-label" }, xr = { class: "wm-inline-label" }, Sr = ["checked"], Cr = { class: "wm-inline-label" }, wr = ["checked"], Tr = { class: "wm-inline-label" }, Er = { class: "wm-footer" }, Dr = ["disabled"], Or = /* @__PURE__ */ b(/* @__PURE__ */ P({
|
|
912
934
|
__name: "WatermarkDialog",
|
|
913
935
|
props: {
|
|
914
936
|
isOpen: { type: Boolean },
|
|
@@ -980,45 +1002,45 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
980
1002
|
function te(e) {
|
|
981
1003
|
e.key === "Escape" && C();
|
|
982
1004
|
}
|
|
983
|
-
return (t, i) => e.isOpen ? (L(),
|
|
1005
|
+
return (t, i) => e.isOpen ? (L(), A("div", {
|
|
984
1006
|
key: 0,
|
|
985
1007
|
class: "wm-overlay",
|
|
986
1008
|
onMousedown: q(C, ["self"]),
|
|
987
1009
|
onKeydown: te
|
|
988
|
-
}, [
|
|
1010
|
+
}, [j("div", {
|
|
989
1011
|
class: "wm-dialog",
|
|
990
1012
|
role: "dialog",
|
|
991
1013
|
"aria-label": B(r)("dialogs.watermark.title"),
|
|
992
1014
|
onMousedown: i[13] ||= q(() => {}, ["stop"])
|
|
993
1015
|
}, [
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1016
|
+
j("div", Bn, z(B(r)("dialogs.watermark.title")), 1),
|
|
1017
|
+
j("div", Vn, [
|
|
1018
|
+
j("div", Hn, [j("input", {
|
|
997
1019
|
id: "wm-none",
|
|
998
1020
|
type: "radio",
|
|
999
1021
|
checked: s.value === "none",
|
|
1000
1022
|
onChange: i[0] ||= (e) => s.value = "none"
|
|
1001
|
-
}, null, 40,
|
|
1002
|
-
|
|
1023
|
+
}, null, 40, Un), j("label", Wn, z(B(r)("dialogs.watermark.noWatermark")), 1)]),
|
|
1024
|
+
j("div", Gn, [j("input", {
|
|
1003
1025
|
id: "wm-picture",
|
|
1004
1026
|
type: "radio",
|
|
1005
1027
|
checked: s.value === "picture",
|
|
1006
1028
|
onChange: i[1] ||= (e) => s.value = "picture"
|
|
1007
|
-
}, null, 40,
|
|
1008
|
-
s.value === "picture" ? (L(),
|
|
1009
|
-
|
|
1029
|
+
}, null, 40, Kn), j("label", qn, z(B(r)("dialogs.watermark.picture")), 1)]),
|
|
1030
|
+
s.value === "picture" ? (L(), A("div", Jn, [
|
|
1031
|
+
j("div", Yn, [j("input", {
|
|
1010
1032
|
type: "file",
|
|
1011
1033
|
accept: "image/*",
|
|
1012
1034
|
onChange: S
|
|
1013
1035
|
}, null, 32)]),
|
|
1014
|
-
g.value ? (L(),
|
|
1036
|
+
g.value ? (L(), A("div", Xn, [j("img", {
|
|
1015
1037
|
src: g.value,
|
|
1016
1038
|
alt: "",
|
|
1017
1039
|
class: "wm-preview"
|
|
1018
|
-
}, null, 8,
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
G(
|
|
1040
|
+
}, null, 8, Zn)])) : k("", !0),
|
|
1041
|
+
j("div", Qn, [
|
|
1042
|
+
j("span", $n, z(B(r)("dialogs.watermark.scale")), 1),
|
|
1043
|
+
G(j("input", {
|
|
1022
1044
|
class: "wm-input wm-input--narrow",
|
|
1023
1045
|
type: "number",
|
|
1024
1046
|
min: "10",
|
|
@@ -1030,46 +1052,46 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1030
1052
|
void 0,
|
|
1031
1053
|
{ number: !0 }
|
|
1032
1054
|
]]),
|
|
1033
|
-
i[14] ||=
|
|
1055
|
+
i[14] ||= j("span", { class: "wm-unit" }, "%", -1)
|
|
1034
1056
|
]),
|
|
1035
|
-
|
|
1057
|
+
j("label", er, [G(j("input", {
|
|
1036
1058
|
type: "checkbox",
|
|
1037
1059
|
"onUpdate:modelValue": i[3] ||= (e) => y.value = e
|
|
1038
|
-
}, null, 512), [[V, y.value]]),
|
|
1039
|
-
])) :
|
|
1040
|
-
|
|
1060
|
+
}, null, 512), [[V, y.value]]), M(" " + z(B(r)("dialogs.watermark.washout")), 1)])
|
|
1061
|
+
])) : k("", !0),
|
|
1062
|
+
j("div", tr, [j("input", {
|
|
1041
1063
|
id: "wm-text",
|
|
1042
1064
|
type: "radio",
|
|
1043
1065
|
checked: s.value === "text",
|
|
1044
1066
|
onChange: i[4] ||= (e) => s.value = "text"
|
|
1045
|
-
}, null, 40,
|
|
1046
|
-
s.value === "text" ? (L(),
|
|
1047
|
-
a.value.length > 0 ? (L(),
|
|
1067
|
+
}, null, 40, nr), j("label", rr, z(B(r)("dialogs.watermark.text")), 1)]),
|
|
1068
|
+
s.value === "text" ? (L(), A("div", ir, [
|
|
1069
|
+
a.value.length > 0 ? (L(), A("div", ar, [j("span", or, z(B(r)("dialogs.watermark.presetLabel")), 1), j("select", {
|
|
1048
1070
|
class: "wm-input",
|
|
1049
1071
|
value: a.value.includes(c.value) ? c.value : "",
|
|
1050
1072
|
onChange: x
|
|
1051
|
-
}, [i[15] ||=
|
|
1073
|
+
}, [i[15] ||= j("option", { value: "" }, "—", -1), (L(!0), A(w, null, ue(a.value, (e) => (L(), A("option", {
|
|
1052
1074
|
key: e,
|
|
1053
1075
|
value: e
|
|
1054
|
-
}, z(e), 9,
|
|
1055
|
-
|
|
1076
|
+
}, z(e), 9, cr))), 128))], 40, sr)])) : k("", !0),
|
|
1077
|
+
j("div", lr, [j("span", ur, z(B(r)("dialogs.watermark.textLabel")), 1), G(j("input", {
|
|
1056
1078
|
class: "wm-input",
|
|
1057
1079
|
"onUpdate:modelValue": i[5] ||= (e) => c.value = e
|
|
1058
1080
|
}, null, 512), [[H, c.value]])]),
|
|
1059
|
-
|
|
1081
|
+
j("div", dr, [j("span", fr, z(B(r)("dialogs.watermark.fontLabel")), 1), G(j("select", {
|
|
1060
1082
|
class: "wm-input",
|
|
1061
1083
|
"onUpdate:modelValue": i[6] ||= (e) => l.value = e
|
|
1062
|
-
}, [(L(),
|
|
1084
|
+
}, [(L(), A(w, null, ue(n, (e) => j("option", {
|
|
1063
1085
|
key: e,
|
|
1064
1086
|
value: e
|
|
1065
|
-
}, z(e), 9,
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1087
|
+
}, z(e), 9, pr)), 64))], 512), [[me, l.value]])]),
|
|
1088
|
+
j("div", mr, [
|
|
1089
|
+
j("span", hr, z(B(r)("dialogs.watermark.sizeLabel")), 1),
|
|
1090
|
+
j("label", gr, [G(j("input", {
|
|
1069
1091
|
type: "checkbox",
|
|
1070
1092
|
"onUpdate:modelValue": i[7] ||= (e) => u.value = e
|
|
1071
|
-
}, null, 512), [[V, u.value]]),
|
|
1072
|
-
u.value ?
|
|
1093
|
+
}, null, 512), [[V, u.value]]), M(" " + z(B(r)("dialogs.watermark.sizeAuto")), 1)]),
|
|
1094
|
+
u.value ? k("", !0) : G((L(), A("input", {
|
|
1073
1095
|
key: 0,
|
|
1074
1096
|
class: "wm-input wm-input--narrow",
|
|
1075
1097
|
type: "number",
|
|
@@ -1083,44 +1105,44 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1083
1105
|
{ number: !0 }
|
|
1084
1106
|
]])
|
|
1085
1107
|
]),
|
|
1086
|
-
|
|
1108
|
+
j("div", _r, [j("span", vr, z(B(r)("dialogs.watermark.colorLabel")), 1), G(j("input", {
|
|
1087
1109
|
type: "color",
|
|
1088
1110
|
"onUpdate:modelValue": i[9] ||= (e) => p.value = e
|
|
1089
1111
|
}, null, 512), [[H, p.value]])]),
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1112
|
+
j("div", yr, [
|
|
1113
|
+
j("span", br, z(B(r)("dialogs.watermark.layoutLabel")), 1),
|
|
1114
|
+
j("label", xr, [j("input", {
|
|
1093
1115
|
type: "radio",
|
|
1094
1116
|
name: "wm-layout",
|
|
1095
1117
|
checked: m.value === "diagonal",
|
|
1096
1118
|
onChange: i[10] ||= (e) => m.value = "diagonal"
|
|
1097
|
-
}, null, 40,
|
|
1098
|
-
|
|
1119
|
+
}, null, 40, Sr), M(" " + z(B(r)("dialogs.watermark.diagonal")), 1)]),
|
|
1120
|
+
j("label", Cr, [j("input", {
|
|
1099
1121
|
type: "radio",
|
|
1100
1122
|
name: "wm-layout",
|
|
1101
1123
|
checked: m.value === "horizontal",
|
|
1102
1124
|
onChange: i[11] ||= (e) => m.value = "horizontal"
|
|
1103
|
-
}, null, 40,
|
|
1125
|
+
}, null, 40, wr), M(" " + z(B(r)("dialogs.watermark.horizontal")), 1)])
|
|
1104
1126
|
]),
|
|
1105
|
-
|
|
1127
|
+
j("label", Tr, [G(j("input", {
|
|
1106
1128
|
type: "checkbox",
|
|
1107
1129
|
"onUpdate:modelValue": i[12] ||= (e) => h.value = e
|
|
1108
|
-
}, null, 512), [[V, h.value]]),
|
|
1109
|
-
])) :
|
|
1130
|
+
}, null, 512), [[V, h.value]]), M(" " + z(B(r)("dialogs.watermark.semitransparent")), 1)])
|
|
1131
|
+
])) : k("", !0)
|
|
1110
1132
|
]),
|
|
1111
|
-
|
|
1133
|
+
j("div", Er, [j("button", {
|
|
1112
1134
|
type: "button",
|
|
1113
1135
|
class: "wm-btn",
|
|
1114
1136
|
onClick: C
|
|
1115
|
-
}, z(B(r)("dialogs.watermark.cancelButton")), 1),
|
|
1137
|
+
}, z(B(r)("dialogs.watermark.cancelButton")), 1), j("button", {
|
|
1116
1138
|
type: "button",
|
|
1117
1139
|
class: ce(["wm-btn wm-btn--primary", { "wm-btn--disabled": b.value }]),
|
|
1118
1140
|
disabled: b.value,
|
|
1119
1141
|
onClick: ee
|
|
1120
|
-
}, z(B(r)("dialogs.watermark.applyButton")), 11,
|
|
1121
|
-
], 40,
|
|
1142
|
+
}, z(B(r)("dialogs.watermark.applyButton")), 11, Dr)])
|
|
1143
|
+
], 40, $)], 32)) : k("", !0);
|
|
1122
1144
|
}
|
|
1123
|
-
}), [["__scopeId", "data-v-cf7e36c1"]]),
|
|
1145
|
+
}), [["__scopeId", "data-v-cf7e36c1"]]), kr = /* @__PURE__ */ P({
|
|
1124
1146
|
__name: "DocxEditorDialogs",
|
|
1125
1147
|
props: {
|
|
1126
1148
|
view: {},
|
|
@@ -1154,8 +1176,8 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1154
1176
|
],
|
|
1155
1177
|
setup(t, { emit: n }) {
|
|
1156
1178
|
let r = n;
|
|
1157
|
-
return (n, a) => (L(),
|
|
1158
|
-
|
|
1179
|
+
return (n, a) => (L(), A(w, null, [
|
|
1180
|
+
N(s, {
|
|
1159
1181
|
"is-open": t.showFindReplace,
|
|
1160
1182
|
view: t.view,
|
|
1161
1183
|
"scroll-visible-position-into-view": t.scrollVisiblePositionIntoView,
|
|
@@ -1165,7 +1187,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1165
1187
|
"view",
|
|
1166
1188
|
"scroll-visible-position-into-view"
|
|
1167
1189
|
]),
|
|
1168
|
-
|
|
1190
|
+
N(e, {
|
|
1169
1191
|
"is-open": t.showHyperlink,
|
|
1170
1192
|
view: t.view,
|
|
1171
1193
|
bookmarks: t.bookmarks,
|
|
@@ -1177,12 +1199,12 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1177
1199
|
"view",
|
|
1178
1200
|
"bookmarks"
|
|
1179
1201
|
]),
|
|
1180
|
-
|
|
1202
|
+
N(i, {
|
|
1181
1203
|
"is-open": t.showInsertSymbol,
|
|
1182
1204
|
onClose: a[4] ||= (e) => r("update:showInsertSymbol", !1),
|
|
1183
1205
|
onInsert: a[5] ||= (e) => r("insert-symbol", e)
|
|
1184
1206
|
}, null, 8, ["is-open"]),
|
|
1185
|
-
|
|
1207
|
+
N(c, {
|
|
1186
1208
|
"is-open": t.showImageProperties,
|
|
1187
1209
|
view: t.view,
|
|
1188
1210
|
"pm-pos": t.selectedImagePmPos,
|
|
@@ -1192,13 +1214,13 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1192
1214
|
"view",
|
|
1193
1215
|
"pm-pos"
|
|
1194
1216
|
]),
|
|
1195
|
-
|
|
1217
|
+
N(o, {
|
|
1196
1218
|
"is-open": t.showPageSetup,
|
|
1197
1219
|
"section-properties": t.sectionProperties,
|
|
1198
1220
|
onClose: a[7] ||= (e) => r("update:showPageSetup", !1),
|
|
1199
1221
|
onApply: a[8] ||= (e) => r("page-setup-apply", e)
|
|
1200
1222
|
}, null, 8, ["is-open", "section-properties"]),
|
|
1201
|
-
|
|
1223
|
+
N(Or, {
|
|
1202
1224
|
"is-open": t.showWatermark,
|
|
1203
1225
|
current: t.currentWatermark,
|
|
1204
1226
|
presets: t.watermarkPresets,
|
|
@@ -1209,16 +1231,16 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1209
1231
|
"current",
|
|
1210
1232
|
"presets"
|
|
1211
1233
|
]),
|
|
1212
|
-
|
|
1234
|
+
N(u, {
|
|
1213
1235
|
"is-open": t.showKeyboardShortcuts,
|
|
1214
1236
|
onClose: a[11] ||= (e) => r("update:showKeyboardShortcuts", !1)
|
|
1215
1237
|
}, null, 8, ["is-open"])
|
|
1216
1238
|
], 64));
|
|
1217
1239
|
}
|
|
1218
|
-
}),
|
|
1240
|
+
}), Ar = ["disabled", "onMousedown"], jr = { class: "ctx-menu__label" }, Mr = {
|
|
1219
1241
|
key: 0,
|
|
1220
1242
|
class: "ctx-menu__shortcut"
|
|
1221
|
-
},
|
|
1243
|
+
}, Nr = 220, Pr = 32, Fr = 10, Ir = /* @__PURE__ */ b(/* @__PURE__ */ P({
|
|
1222
1244
|
__name: "TextContextMenu",
|
|
1223
1245
|
props: {
|
|
1224
1246
|
isOpen: { type: Boolean },
|
|
@@ -1351,8 +1373,8 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1351
1373
|
disabled: !n.canSplitCell
|
|
1352
1374
|
}), e;
|
|
1353
1375
|
}), s = E(() => {
|
|
1354
|
-
let e = n.position.x, t = n.position.y, r = o.value.filter((e) => !e.divider).length, i = o.value.filter((e) => e.divider).length, a = r *
|
|
1355
|
-
return typeof window < "u" && (e +
|
|
1376
|
+
let e = n.position.x, t = n.position.y, r = o.value.filter((e) => !e.divider).length, i = o.value.filter((e) => e.divider).length, a = r * Pr + i * 9;
|
|
1377
|
+
return typeof window < "u" && (e + Nr + Fr > window.innerWidth && (e = window.innerWidth - Nr - Fr), t + a + Fr > window.innerHeight && (t = window.innerHeight - a - Fr)), {
|
|
1356
1378
|
position: "fixed",
|
|
1357
1379
|
left: `${e}px`,
|
|
1358
1380
|
top: `${t}px`,
|
|
@@ -1367,12 +1389,12 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1367
1389
|
}
|
|
1368
1390
|
return U(() => n.isOpen, (e) => {
|
|
1369
1391
|
e && se(() => a.value?.focus());
|
|
1370
|
-
}), (t, n) => (L(),
|
|
1392
|
+
}), (t, n) => (L(), O(T, { to: "body" }, [e.isOpen ? (L(), A("div", {
|
|
1371
1393
|
key: 0,
|
|
1372
1394
|
class: "ctx-menu-backdrop",
|
|
1373
1395
|
onMousedown: n[0] ||= (e) => t.$emit("close"),
|
|
1374
1396
|
onContextmenu: n[1] ||= q((e) => t.$emit("close"), ["prevent"])
|
|
1375
|
-
}, null, 32)) :
|
|
1397
|
+
}, null, 32)) : k("", !0), e.isOpen ? (L(), A("div", {
|
|
1376
1398
|
key: 1,
|
|
1377
1399
|
ref_key: "menuRef",
|
|
1378
1400
|
ref: a,
|
|
@@ -1380,7 +1402,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1380
1402
|
style: F(s.value),
|
|
1381
1403
|
onContextmenu: n[2] ||= q(() => {}, ["prevent"]),
|
|
1382
1404
|
onKeydown: l
|
|
1383
|
-
}, [(L(!0),
|
|
1405
|
+
}, [(L(!0), A(w, null, ue(o.value, (e, t) => (L(), A("button", {
|
|
1384
1406
|
key: e.id || t,
|
|
1385
1407
|
class: ce(["ctx-menu__item", {
|
|
1386
1408
|
"ctx-menu__item--disabled": e.disabled,
|
|
@@ -1388,27 +1410,27 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1388
1410
|
}]),
|
|
1389
1411
|
disabled: e.disabled,
|
|
1390
1412
|
onMousedown: q((t) => c(e.action), ["prevent"])
|
|
1391
|
-
}, [
|
|
1413
|
+
}, [j("span", jr, z(e.label), 1), e.shortcut ? (L(), A("span", Mr, z(e.shortcut), 1)) : k("", !0)], 42, Ar))), 128))], 36)) : k("", !0)]));
|
|
1392
1414
|
}
|
|
1393
|
-
}), [["__scopeId", "data-v-852b8986"]]),
|
|
1415
|
+
}), [["__scopeId", "data-v-852b8986"]]), Lr = ["aria-label"], Rr = { class: "image-ctx-menu__icon" }, zr = { class: "image-ctx-menu__label" }, Br = {
|
|
1394
1416
|
key: 1,
|
|
1395
1417
|
class: "image-ctx-menu__divider",
|
|
1396
1418
|
role: "separator"
|
|
1397
|
-
},
|
|
1419
|
+
}, Vr = [
|
|
1398
1420
|
"data-wrap-type",
|
|
1399
1421
|
"data-current",
|
|
1400
1422
|
"data-disabled",
|
|
1401
1423
|
"disabled",
|
|
1402
1424
|
"title",
|
|
1403
1425
|
"onClick"
|
|
1404
|
-
],
|
|
1426
|
+
], Hr = { class: "image-ctx-menu__icon" }, Ur = { class: "image-ctx-menu__label" }, Wr = ["aria-label"], Gr = ["disabled", "onClick"], Kr = { class: "image-ctx-menu__label" }, qr = {
|
|
1405
1427
|
key: 0,
|
|
1406
1428
|
class: "image-ctx-menu__shortcut"
|
|
1407
|
-
},
|
|
1429
|
+
}, Jr = {
|
|
1408
1430
|
key: 0,
|
|
1409
1431
|
class: "image-ctx-menu__divider",
|
|
1410
1432
|
role: "separator"
|
|
1411
|
-
},
|
|
1433
|
+
}, Yr = 18, Xr = 260, Zr = 10, Qr = /* @__PURE__ */ b(/* @__PURE__ */ P({
|
|
1412
1434
|
__name: "ImageContextMenu",
|
|
1413
1435
|
props: {
|
|
1414
1436
|
state: {},
|
|
@@ -1442,11 +1464,11 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1442
1464
|
let p = E(() => {
|
|
1443
1465
|
if (!n.state) return {};
|
|
1444
1466
|
let e = it.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
|
|
1445
|
-
return typeof window < "u" && (t +
|
|
1467
|
+
return typeof window < "u" && (t + Xr > window.innerWidth && (t = window.innerWidth - Xr - Zr), r + e > window.innerHeight && (r = window.innerHeight - e - Zr), t < Zr && (t = Zr), r < Zr && (r = Zr)), {
|
|
1446
1468
|
position: "fixed",
|
|
1447
1469
|
left: `${t}px`,
|
|
1448
1470
|
top: `${r}px`,
|
|
1449
|
-
minWidth: `${
|
|
1471
|
+
minWidth: `${Xr}px`,
|
|
1450
1472
|
zIndex: 400
|
|
1451
1473
|
};
|
|
1452
1474
|
});
|
|
@@ -1465,12 +1487,12 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1465
1487
|
function v(e) {
|
|
1466
1488
|
e.key === "Escape" && (e.preventDefault(), i("close"));
|
|
1467
1489
|
}
|
|
1468
|
-
return (t, n) => (L(),
|
|
1490
|
+
return (t, n) => (L(), O(T, { to: "body" }, [e.state && e.state.open ? (L(), A("div", {
|
|
1469
1491
|
key: 0,
|
|
1470
1492
|
class: "image-ctx-menu-backdrop",
|
|
1471
1493
|
onMousedown: _,
|
|
1472
1494
|
onContextmenu: n[0] ||= q((e) => t.$emit("close"), ["prevent"])
|
|
1473
|
-
}, null, 32)) :
|
|
1495
|
+
}, null, 32)) : k("", !0), e.state && e.state.open ? (L(), A("div", {
|
|
1474
1496
|
key: 1,
|
|
1475
1497
|
ref_key: "menuRef",
|
|
1476
1498
|
ref: s,
|
|
@@ -1482,7 +1504,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1482
1504
|
onContextmenu: n[4] ||= q(() => {}, ["prevent"]),
|
|
1483
1505
|
onKeydown: v
|
|
1484
1506
|
}, [
|
|
1485
|
-
e.canOpenProperties ? (L(),
|
|
1507
|
+
e.canOpenProperties ? (L(), A("button", {
|
|
1486
1508
|
key: 0,
|
|
1487
1509
|
type: "button",
|
|
1488
1510
|
role: "menuitem",
|
|
@@ -1490,12 +1512,12 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1490
1512
|
"data-action": "open-properties",
|
|
1491
1513
|
onMousedown: n[1] ||= q(() => {}, ["prevent"]),
|
|
1492
1514
|
onClick: a
|
|
1493
|
-
}, [
|
|
1515
|
+
}, [j("span", Rr, [N(r, {
|
|
1494
1516
|
name: "settings",
|
|
1495
|
-
size:
|
|
1496
|
-
})]),
|
|
1497
|
-
e.canOpenProperties ? (L(),
|
|
1498
|
-
(L(!0),
|
|
1517
|
+
size: Yr
|
|
1518
|
+
})]), j("span", zr, z(B(o)("imageWrap.menu.imageProperties")), 1)], 32)) : k("", !0),
|
|
1519
|
+
e.canOpenProperties ? (L(), A("div", Br)) : k("", !0),
|
|
1520
|
+
(L(!0), A(w, null, ue(B(c), (e) => (L(), A("button", {
|
|
1499
1521
|
key: e.choice,
|
|
1500
1522
|
type: "button",
|
|
1501
1523
|
role: "menuitem",
|
|
@@ -1508,31 +1530,31 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1508
1530
|
onMousedown: n[2] ||= q(() => {}, ["prevent"]),
|
|
1509
1531
|
onClick: (t) => h(e)
|
|
1510
1532
|
}, [
|
|
1511
|
-
|
|
1533
|
+
j("span", Hr, [N(r, {
|
|
1512
1534
|
name: f(e.iconHint),
|
|
1513
|
-
size:
|
|
1535
|
+
size: Yr
|
|
1514
1536
|
}, null, 8, ["name"])]),
|
|
1515
|
-
|
|
1516
|
-
e.choice === l.value ? (L(),
|
|
1537
|
+
j("span", Ur, z(B(o)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
|
|
1538
|
+
e.choice === l.value ? (L(), A("span", {
|
|
1517
1539
|
key: 0,
|
|
1518
1540
|
class: "image-ctx-menu__current-dot",
|
|
1519
1541
|
"aria-label": B(o)("imageWrap.menu.ariaLabel")
|
|
1520
|
-
}, "●", 8,
|
|
1521
|
-
], 42,
|
|
1522
|
-
e.textActions && e.textActions.length > 0 ? (L(),
|
|
1542
|
+
}, "●", 8, Wr)) : k("", !0)
|
|
1543
|
+
], 42, Vr))), 128)),
|
|
1544
|
+
e.textActions && e.textActions.length > 0 ? (L(), A(w, { key: 2 }, [n[5] ||= j("div", {
|
|
1523
1545
|
class: "image-ctx-menu__divider",
|
|
1524
1546
|
role: "separator"
|
|
1525
|
-
}, null, -1), (L(!0),
|
|
1547
|
+
}, null, -1), (L(!0), A(w, null, ue(e.textActions, (e, t) => (L(), A(w, { key: `${e.action}-${t}` }, [j("button", {
|
|
1526
1548
|
type: "button",
|
|
1527
1549
|
role: "menuitem",
|
|
1528
1550
|
class: "image-ctx-menu__item image-ctx-menu__item--text",
|
|
1529
1551
|
disabled: e.disabled,
|
|
1530
1552
|
onMousedown: n[3] ||= q(() => {}, ["prevent"]),
|
|
1531
1553
|
onClick: (t) => g(e)
|
|
1532
|
-
}, [
|
|
1533
|
-
], 44,
|
|
1554
|
+
}, [j("span", Kr, z(e.label), 1), e.shortcut ? (L(), A("span", qr, z(e.shortcut), 1)) : k("", !0)], 40, Gr), e.dividerAfter ? (L(), A("div", Jr)) : k("", !0)], 64))), 128))], 64)) : k("", !0)
|
|
1555
|
+
], 44, Lr)) : k("", !0)]));
|
|
1534
1556
|
}
|
|
1535
|
-
}), [["__scopeId", "data-v-de904a04"]]),
|
|
1557
|
+
}), [["__scopeId", "data-v-de904a04"]]), $r = /* @__PURE__ */ P({
|
|
1536
1558
|
__name: "DocxEditorOverlays",
|
|
1537
1559
|
props: {
|
|
1538
1560
|
readOnly: { type: Boolean },
|
|
@@ -1550,7 +1572,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1550
1572
|
],
|
|
1551
1573
|
setup(e, { emit: t }) {
|
|
1552
1574
|
let n = t;
|
|
1553
|
-
return (t, r) => (L(),
|
|
1575
|
+
return (t, r) => (L(), A(w, null, [N(Ir, {
|
|
1554
1576
|
"is-open": e.contextMenu.isOpen,
|
|
1555
1577
|
position: e.contextMenu.position,
|
|
1556
1578
|
"has-selection": e.contextMenu.hasSelection,
|
|
@@ -1570,7 +1592,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1570
1592
|
"on-image",
|
|
1571
1593
|
"can-merge-cells",
|
|
1572
1594
|
"can-split-cell"
|
|
1573
|
-
]),
|
|
1595
|
+
]), N(Qr, {
|
|
1574
1596
|
state: e.imageContextMenu,
|
|
1575
1597
|
"text-actions": e.imageContextMenuTextActions,
|
|
1576
1598
|
"can-open-properties": e.canOpenImageProperties,
|
|
@@ -1584,7 +1606,7 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1584
1606
|
"can-open-properties"
|
|
1585
1607
|
])], 64));
|
|
1586
1608
|
}
|
|
1587
|
-
}),
|
|
1609
|
+
}), ei = ["href", "title"], ti = ["title"], ni = ["title"], ri = ["title"], ii = { class: "docx-hyperlink-popup__edit-row" }, ai = ["placeholder", "onKeydown"], oi = { class: "docx-hyperlink-popup__edit-row" }, si = ["onKeydown"], ci = ["disabled"], li = /* @__PURE__ */ b(/* @__PURE__ */ P({
|
|
1588
1610
|
__name: "HyperlinkPopup",
|
|
1589
1611
|
props: {
|
|
1590
1612
|
data: {},
|
|
@@ -1626,41 +1648,41 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1626
1648
|
function g() {
|
|
1627
1649
|
r.data && (i("copy", r.data.href), typeof navigator < "u" && navigator.clipboard && navigator.clipboard.writeText(r.data.href).catch(() => {}));
|
|
1628
1650
|
}
|
|
1629
|
-
return (t, r) => e.data ? (L(),
|
|
1651
|
+
return (t, r) => e.data ? (L(), A("div", {
|
|
1630
1652
|
key: 0,
|
|
1631
1653
|
ref_key: "popupRef",
|
|
1632
1654
|
ref: c,
|
|
1633
1655
|
class: ce(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": a.value }]),
|
|
1634
1656
|
style: F(l.value),
|
|
1635
1657
|
onMousedown: r[6] ||= q(() => {}, ["stop"])
|
|
1636
|
-
}, [a.value ? (L(),
|
|
1658
|
+
}, [a.value ? (L(), A(w, { key: 1 }, [j("div", ii, [G(j("input", {
|
|
1637
1659
|
class: "docx-hyperlink-popup__input",
|
|
1638
1660
|
placeholder: B(n)("hyperlinkPopup.displayTextPlaceholder"),
|
|
1639
1661
|
"onUpdate:modelValue": r[2] ||= (e) => o.value = e,
|
|
1640
1662
|
onKeydown: [K(q(h, ["prevent"]), ["enter"]), r[3] ||= K((e) => t.$emit("close"), ["esc"])]
|
|
1641
|
-
}, null, 40,
|
|
1663
|
+
}, null, 40, ai), [[H, o.value]])]), j("div", oi, [G(j("input", {
|
|
1642
1664
|
class: "docx-hyperlink-popup__input",
|
|
1643
1665
|
placeholder: "https://...",
|
|
1644
1666
|
"onUpdate:modelValue": r[4] ||= (e) => s.value = e,
|
|
1645
1667
|
onKeydown: [K(q(h, ["prevent"]), ["enter"]), r[5] ||= K((e) => t.$emit("close"), ["esc"])]
|
|
1646
|
-
}, null, 40,
|
|
1668
|
+
}, null, 40, si), [[H, s.value]]), j("button", {
|
|
1647
1669
|
class: "docx-hyperlink-popup__apply",
|
|
1648
1670
|
disabled: !s.value.trim(),
|
|
1649
1671
|
onClick: q(h, ["prevent"])
|
|
1650
|
-
}, z(B(n)("common.apply")), 9,
|
|
1651
|
-
r[10] ||=
|
|
1652
|
-
|
|
1672
|
+
}, z(B(n)("common.apply")), 9, ci)])], 64)) : (L(), A(w, { key: 0 }, [
|
|
1673
|
+
r[10] ||= ie("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-084b4288><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-084b4288><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-084b4288></circle><path d=\"M2 12h20\" data-v-084b4288></path><path d=\"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z\" data-v-084b4288></path></svg></span>", 1),
|
|
1674
|
+
j("a", {
|
|
1653
1675
|
class: "docx-hyperlink-popup__url",
|
|
1654
1676
|
href: e.data.href,
|
|
1655
1677
|
title: e.data.href,
|
|
1656
1678
|
onClick: r[0] ||= q((n) => t.$emit("navigate", e.data.href), ["prevent"])
|
|
1657
|
-
}, z(e.data.href), 9,
|
|
1658
|
-
r[11] ||=
|
|
1659
|
-
|
|
1679
|
+
}, z(e.data.href), 9, ei),
|
|
1680
|
+
r[11] ||= j("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
|
|
1681
|
+
j("button", {
|
|
1660
1682
|
class: "docx-hyperlink-popup__btn",
|
|
1661
1683
|
title: B(n)("hyperlinkPopup.copyLink"),
|
|
1662
1684
|
onClick: q(g, ["prevent"])
|
|
1663
|
-
}, [...r[7] ||= [
|
|
1685
|
+
}, [...r[7] ||= [j("svg", {
|
|
1664
1686
|
width: "18",
|
|
1665
1687
|
height: "18",
|
|
1666
1688
|
viewBox: "0 0 24 24",
|
|
@@ -1669,20 +1691,20 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1669
1691
|
"stroke-width": "2",
|
|
1670
1692
|
"stroke-linecap": "round",
|
|
1671
1693
|
"stroke-linejoin": "round"
|
|
1672
|
-
}, [
|
|
1694
|
+
}, [j("rect", {
|
|
1673
1695
|
x: "9",
|
|
1674
1696
|
y: "9",
|
|
1675
1697
|
width: "13",
|
|
1676
1698
|
height: "13",
|
|
1677
1699
|
rx: "2",
|
|
1678
1700
|
ry: "2"
|
|
1679
|
-
}),
|
|
1680
|
-
e.readOnly ?
|
|
1701
|
+
}), j("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, ti),
|
|
1702
|
+
e.readOnly ? k("", !0) : (L(), A("button", {
|
|
1681
1703
|
key: 0,
|
|
1682
1704
|
class: "docx-hyperlink-popup__btn",
|
|
1683
1705
|
title: B(n)("hyperlinkPopup.editLink"),
|
|
1684
1706
|
onClick: q(m, ["prevent"])
|
|
1685
|
-
}, [...r[8] ||= [
|
|
1707
|
+
}, [...r[8] ||= [j("svg", {
|
|
1686
1708
|
width: "18",
|
|
1687
1709
|
height: "18",
|
|
1688
1710
|
viewBox: "0 0 24 24",
|
|
@@ -1691,19 +1713,19 @@ var ln = ["data-handle", "onMousedown"], un = ["title"], dn = {
|
|
|
1691
1713
|
"stroke-width": "2",
|
|
1692
1714
|
"stroke-linecap": "round",
|
|
1693
1715
|
"stroke-linejoin": "round"
|
|
1694
|
-
}, [
|
|
1695
|
-
e.readOnly ?
|
|
1716
|
+
}, [j("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), j("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })], -1)]], 8, ni)),
|
|
1717
|
+
e.readOnly ? k("", !0) : (L(), A("button", {
|
|
1696
1718
|
key: 1,
|
|
1697
1719
|
class: "docx-hyperlink-popup__btn",
|
|
1698
1720
|
title: B(n)("hyperlinkPopup.removeLink"),
|
|
1699
1721
|
onClick: r[1] ||= q((e) => t.$emit("remove"), ["prevent"])
|
|
1700
|
-
}, [...r[9] ||= [
|
|
1701
|
-
], 64))], 38)) :
|
|
1722
|
+
}, [...r[9] ||= [ie("<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-084b4288><path d=\"M18.84 12.25l1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\" data-v-084b4288></path><path d=\"M5.17 11.75l-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\" data-v-084b4288></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-084b4288></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-084b4288></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-084b4288></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-084b4288></line></svg>", 1)]], 8, ri))
|
|
1723
|
+
], 64))], 38)) : k("", !0);
|
|
1702
1724
|
}
|
|
1703
1725
|
}), [["__scopeId", "data-v-084b4288"]]);
|
|
1704
1726
|
//#endregion
|
|
1705
1727
|
//#region src/composables/useFileIO.ts
|
|
1706
|
-
function
|
|
1728
|
+
function ui(e) {
|
|
1707
1729
|
let t = R(null), n = R(null);
|
|
1708
1730
|
function r(t) {
|
|
1709
1731
|
let n = t.target, r = n.files?.[0], i = e.getActiveView();
|
|
@@ -1755,7 +1777,7 @@ function ci(e) {
|
|
|
1755
1777
|
}
|
|
1756
1778
|
//#endregion
|
|
1757
1779
|
//#region src/composables/useHyperlinkManagement.ts
|
|
1758
|
-
function
|
|
1780
|
+
function di(e) {
|
|
1759
1781
|
let t = R(null);
|
|
1760
1782
|
function n(t) {
|
|
1761
1783
|
let n = e.editorView.value;
|
|
@@ -1817,7 +1839,7 @@ function li(e) {
|
|
|
1817
1839
|
}
|
|
1818
1840
|
//#endregion
|
|
1819
1841
|
//#region src/composables/useFormattingActions.ts
|
|
1820
|
-
function
|
|
1842
|
+
function fi(e) {
|
|
1821
1843
|
let t = () => e.activeView?.value ?? e.editorView.value;
|
|
1822
1844
|
function n() {
|
|
1823
1845
|
let e = t();
|
|
@@ -1886,7 +1908,7 @@ function ui(e) {
|
|
|
1886
1908
|
}
|
|
1887
1909
|
//#endregion
|
|
1888
1910
|
//#region src/composables/usePageSetupControls.ts
|
|
1889
|
-
function
|
|
1911
|
+
function pi(e) {
|
|
1890
1912
|
function t(t) {
|
|
1891
1913
|
let n = e.getDocument();
|
|
1892
1914
|
if (!n?.package?.document) return;
|
|
@@ -1941,7 +1963,7 @@ function di(e) {
|
|
|
1941
1963
|
}
|
|
1942
1964
|
//#endregion
|
|
1943
1965
|
//#region src/composables/useWatermarkControls.ts
|
|
1944
|
-
function
|
|
1966
|
+
function mi(e) {
|
|
1945
1967
|
let t = R(!1), n = E(() => {
|
|
1946
1968
|
e.stateTick.value;
|
|
1947
1969
|
let t = e.editorView.value;
|
|
@@ -1960,7 +1982,7 @@ function fi(e) {
|
|
|
1960
1982
|
}
|
|
1961
1983
|
//#endregion
|
|
1962
1984
|
//#region src/composables/useOutlineSidebar.ts
|
|
1963
|
-
function
|
|
1985
|
+
function hi(e) {
|
|
1964
1986
|
function t() {
|
|
1965
1987
|
if (!e.showOutline.value) {
|
|
1966
1988
|
let t = e.editorView.value;
|
|
@@ -1990,7 +2012,7 @@ function pi(e) {
|
|
|
1990
2012
|
}
|
|
1991
2013
|
//#endregion
|
|
1992
2014
|
//#region src/composables/useKeyboardShortcuts.ts
|
|
1993
|
-
function
|
|
2015
|
+
function gi(e) {
|
|
1994
2016
|
function t(t) {
|
|
1995
2017
|
if (t.key === "F1") {
|
|
1996
2018
|
t.preventDefault(), e.showKeyboardShortcuts.value = !0;
|
|
@@ -2002,7 +2024,7 @@ function mi(e) {
|
|
|
2002
2024
|
}
|
|
2003
2025
|
//#endregion
|
|
2004
2026
|
//#region src/composables/useCommentManagement.ts
|
|
2005
|
-
function
|
|
2027
|
+
function _i(e) {
|
|
2006
2028
|
let t = () => B(e.author) ?? "User";
|
|
2007
2029
|
function n(t) {
|
|
2008
2030
|
e.comments.value = t, e.commentCallbacks?.onCommentsChange?.(t);
|
|
@@ -2102,7 +2124,7 @@ function hi(e) {
|
|
|
2102
2124
|
}
|
|
2103
2125
|
//#endregion
|
|
2104
2126
|
//#region src/composables/useHostCallbacks.ts
|
|
2105
|
-
function
|
|
2127
|
+
function vi(e, t) {
|
|
2106
2128
|
return U(t, (t) => t && e.onEditorViewReady?.(t), { immediate: !0 }), { commentCallbacks: {
|
|
2107
2129
|
onCommentAdd: (t) => e.onCommentAdd?.(t),
|
|
2108
2130
|
onCommentResolve: (t) => e.onCommentResolve?.(t),
|
|
@@ -2113,7 +2135,7 @@ function gi(e, t) {
|
|
|
2113
2135
|
}
|
|
2114
2136
|
//#endregion
|
|
2115
2137
|
//#region src/composables/useCommentLifecycle.ts
|
|
2116
|
-
function
|
|
2138
|
+
function yi(e) {
|
|
2117
2139
|
let t = R(null), n = R(null), r = R(null), i = R(!1);
|
|
2118
2140
|
function a() {
|
|
2119
2141
|
let t = e.getDocument(), n = e.editorView.value;
|
|
@@ -2247,7 +2269,7 @@ function _i(e) {
|
|
|
2247
2269
|
}
|
|
2248
2270
|
//#endregion
|
|
2249
2271
|
//#region src/composables/useImageActions.ts
|
|
2250
|
-
function
|
|
2272
|
+
function bi(e) {
|
|
2251
2273
|
let t = pe(null), n = R(!1), r = E(() => {
|
|
2252
2274
|
e.stateTick.value;
|
|
2253
2275
|
let n = e.editorView.value, r = t.value;
|
|
@@ -2292,7 +2314,7 @@ function vi(e) {
|
|
|
2292
2314
|
}
|
|
2293
2315
|
//#endregion
|
|
2294
2316
|
//#region src/utils/imageClipboard.ts
|
|
2295
|
-
function
|
|
2317
|
+
function xi(e, t, n) {
|
|
2296
2318
|
let r = ht(e.state), i = e.state.schema.marks.insertion;
|
|
2297
2319
|
if (!r || !i) return;
|
|
2298
2320
|
let a = t.selection.from, o = a - n.nodeSize;
|
|
@@ -2302,10 +2324,10 @@ function yi(e, t, n) {
|
|
|
2302
2324
|
date: r.date
|
|
2303
2325
|
}));
|
|
2304
2326
|
}
|
|
2305
|
-
function
|
|
2327
|
+
function Si(e, t) {
|
|
2306
2328
|
return e.getBlob(t);
|
|
2307
2329
|
}
|
|
2308
|
-
function
|
|
2330
|
+
function Ci(e, t) {
|
|
2309
2331
|
let n = e.state.doc.nodeAt(t);
|
|
2310
2332
|
if (!n || n.type.name !== "image") return;
|
|
2311
2333
|
let r = `<img src="${n.attrs.src}" data-pm-image="true" data-width="${n.attrs.width ?? ""}" data-height="${n.attrs.height ?? ""}" data-wrap-type="${n.attrs.wrapType ?? ""}" data-display-mode="${n.attrs.displayMode ?? ""}" data-rid="${n.attrs.rId ?? ""}" />`, i = new ClipboardItem({
|
|
@@ -2317,13 +2339,13 @@ function xi(e, t) {
|
|
|
2317
2339
|
e.value = r, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
|
|
2318
2340
|
});
|
|
2319
2341
|
}
|
|
2320
|
-
function
|
|
2342
|
+
function wi(e) {
|
|
2321
2343
|
return new Promise((t, n) => {
|
|
2322
2344
|
let r = new FileReader();
|
|
2323
2345
|
r.onload = () => t(r.result), r.onerror = n, r.readAsDataURL(e);
|
|
2324
2346
|
});
|
|
2325
2347
|
}
|
|
2326
|
-
function
|
|
2348
|
+
function Ti(e) {
|
|
2327
2349
|
return new Promise((t) => {
|
|
2328
2350
|
let n = new Image();
|
|
2329
2351
|
n.onload = () => t({
|
|
@@ -2335,13 +2357,13 @@ function Ci(e) {
|
|
|
2335
2357
|
}), n.src = e;
|
|
2336
2358
|
});
|
|
2337
2359
|
}
|
|
2338
|
-
async function
|
|
2360
|
+
async function Ei(e) {
|
|
2339
2361
|
try {
|
|
2340
2362
|
let t = await navigator.clipboard.read();
|
|
2341
2363
|
for (let n of t) {
|
|
2342
2364
|
let t = n.types.find((e) => e.startsWith("image/"));
|
|
2343
2365
|
if (t) {
|
|
2344
|
-
let r = await
|
|
2366
|
+
let r = await wi(await Si(n, t)), i = await Ti(r), a = i.width, o = i.height;
|
|
2345
2367
|
a > 612 && (o = Math.round(612 / a * o), a = 612);
|
|
2346
2368
|
let s = e.state.schema.nodes.image.create({
|
|
2347
2369
|
src: r,
|
|
@@ -2351,11 +2373,11 @@ async function wi(e) {
|
|
|
2351
2373
|
wrapType: "inline",
|
|
2352
2374
|
displayMode: "inline"
|
|
2353
2375
|
}), c = e.state.tr.replaceSelectionWith(s);
|
|
2354
|
-
|
|
2376
|
+
xi(e, c, s), e.dispatch(c);
|
|
2355
2377
|
return;
|
|
2356
2378
|
}
|
|
2357
2379
|
if (n.types.includes("text/html")) {
|
|
2358
|
-
let t = await (await
|
|
2380
|
+
let t = await (await Si(n, "text/html")).text(), r = t.match(/<img[^>]+src="([^"]+)"[^>]*>/i);
|
|
2359
2381
|
if (r && r[1]) {
|
|
2360
2382
|
let n = r[1], i = t.match(/data-width="(\d+)"/), a = t.match(/data-height="(\d+)"/), o = i ? Number(i[1]) : 200, s = a ? Number(a[1]) : 200, c = e.state.schema.nodes.image.create({
|
|
2361
2383
|
src: n,
|
|
@@ -2365,12 +2387,12 @@ async function wi(e) {
|
|
|
2365
2387
|
wrapType: "inline",
|
|
2366
2388
|
displayMode: "inline"
|
|
2367
2389
|
}), l = e.state.tr.replaceSelectionWith(c);
|
|
2368
|
-
|
|
2390
|
+
xi(e, l, c), e.dispatch(l);
|
|
2369
2391
|
return;
|
|
2370
2392
|
}
|
|
2371
2393
|
}
|
|
2372
2394
|
if (n.types.includes("text/plain")) {
|
|
2373
|
-
let t = await (await
|
|
2395
|
+
let t = await (await Si(n, "text/plain")).text();
|
|
2374
2396
|
if (t && t !== "[image]") {
|
|
2375
2397
|
let { from: n } = e.state.selection;
|
|
2376
2398
|
e.dispatch(e.state.tr.insertText(t, n));
|
|
@@ -2386,14 +2408,14 @@ async function wi(e) {
|
|
|
2386
2408
|
}
|
|
2387
2409
|
}
|
|
2388
2410
|
}
|
|
2389
|
-
function
|
|
2411
|
+
function Di(e, t) {
|
|
2390
2412
|
let n = e.state.doc.nodeAt(t);
|
|
2391
2413
|
if (!n || n.type.name !== "image") return;
|
|
2392
2414
|
let r = document.createElement("input");
|
|
2393
2415
|
r.type = "file", r.accept = "image/*", r.onchange = async () => {
|
|
2394
2416
|
let i = r.files?.[0];
|
|
2395
2417
|
if (!i) return;
|
|
2396
|
-
let a = await
|
|
2418
|
+
let a = await wi(i), o = await Ti(a), s = n.attrs.width || o.width, c = n.attrs.height || o.height, l = Math.min(s / o.width, c / o.height), u = Math.round(o.width * l), d = Math.round(o.height * l);
|
|
2397
2419
|
try {
|
|
2398
2420
|
let r = e.state.tr.setNodeMarkup(t, void 0, {
|
|
2399
2421
|
...n.attrs,
|
|
@@ -2408,7 +2430,7 @@ function Ti(e, t) {
|
|
|
2408
2430
|
}
|
|
2409
2431
|
//#endregion
|
|
2410
2432
|
//#region src/composables/useContextMenus.ts
|
|
2411
|
-
function
|
|
2433
|
+
function Oi(e) {
|
|
2412
2434
|
let { t } = d(), n = R({
|
|
2413
2435
|
isOpen: !1,
|
|
2414
2436
|
position: {
|
|
@@ -2529,16 +2551,16 @@ function Ei(e) {
|
|
|
2529
2551
|
switch (t) {
|
|
2530
2552
|
case "cut":
|
|
2531
2553
|
if (e.selectedImage.value) {
|
|
2532
|
-
|
|
2554
|
+
Ci(n, e.selectedImage.value.pmPos);
|
|
2533
2555
|
let t = e.selectedImage.value.pmPos, r = n.state.doc.nodeAt(t);
|
|
2534
2556
|
r && (n.dispatch(n.state.tr.delete(t, t + r.nodeSize)), e.selectedImage.value = null);
|
|
2535
2557
|
} else document.execCommand("cut");
|
|
2536
2558
|
break;
|
|
2537
2559
|
case "copy":
|
|
2538
|
-
e.selectedImage.value ?
|
|
2560
|
+
e.selectedImage.value ? Ci(n, e.selectedImage.value.pmPos) : document.execCommand("copy");
|
|
2539
2561
|
break;
|
|
2540
2562
|
case "paste":
|
|
2541
|
-
|
|
2563
|
+
Ei(n);
|
|
2542
2564
|
break;
|
|
2543
2565
|
case "pasteAsPlainText":
|
|
2544
2566
|
navigator.clipboard.readText().then((e) => {
|
|
@@ -2559,7 +2581,7 @@ function Ei(e) {
|
|
|
2559
2581
|
e.selectedImage.value && (e.showImageProperties.value = !0);
|
|
2560
2582
|
break;
|
|
2561
2583
|
case "replaceImage":
|
|
2562
|
-
e.selectedImage.value &&
|
|
2584
|
+
e.selectedImage.value && Di(n, e.selectedImage.value.pmPos);
|
|
2563
2585
|
break;
|
|
2564
2586
|
case "deleteImage":
|
|
2565
2587
|
if (e.selectedImage.value) {
|
|
@@ -2594,8 +2616,8 @@ function Ei(e) {
|
|
|
2594
2616
|
}
|
|
2595
2617
|
//#endregion
|
|
2596
2618
|
//#region src/composables/usePagesPointer.ts
|
|
2597
|
-
var
|
|
2598
|
-
function
|
|
2619
|
+
var ki = 500;
|
|
2620
|
+
function Ai(e) {
|
|
2599
2621
|
let t = R(null), n = null;
|
|
2600
2622
|
function r() {
|
|
2601
2623
|
n !== null && (clearTimeout(n), n = null);
|
|
@@ -2852,7 +2874,7 @@ function Oi(e) {
|
|
|
2852
2874
|
return;
|
|
2853
2875
|
}
|
|
2854
2876
|
let _ = Date.now();
|
|
2855
|
-
if (_ - a <
|
|
2877
|
+
if (_ - a < ki && o === p ? s++ : s = 1, a = _, o = p, s === 2) v(p);
|
|
2856
2878
|
else if (s >= 3) y(p), s = 0;
|
|
2857
2879
|
else {
|
|
2858
2880
|
if (t.shiftKey) {
|
|
@@ -2876,10 +2898,10 @@ function Oi(e) {
|
|
|
2876
2898
|
}
|
|
2877
2899
|
d.updateMousePosition(e.clientX, e.clientY);
|
|
2878
2900
|
}
|
|
2879
|
-
function
|
|
2901
|
+
function D() {
|
|
2880
2902
|
c = !1, u.end(), d.stopAutoScroll();
|
|
2881
2903
|
}
|
|
2882
|
-
function
|
|
2904
|
+
function O() {
|
|
2883
2905
|
let t = e.pagesViewportRef.value, n = e.layout.value;
|
|
2884
2906
|
if (!t || !n || n.pages.length === 0) return;
|
|
2885
2907
|
let r = t.scrollTop, i = n.pages.length, a = r + t.clientHeight / 2, o = 24, s = 1;
|
|
@@ -2903,9 +2925,9 @@ function Oi(e) {
|
|
|
2903
2925
|
}, 600);
|
|
2904
2926
|
}
|
|
2905
2927
|
return le(() => {
|
|
2906
|
-
window.addEventListener("mousemove", E), window.addEventListener("mouseup",
|
|
2928
|
+
window.addEventListener("mousemove", E), window.addEventListener("mouseup", D), e.pagesViewportRef.value?.addEventListener("scroll", O, { passive: !0 });
|
|
2907
2929
|
}), I(() => {
|
|
2908
|
-
r(), window.removeEventListener("mousemove", E), window.removeEventListener("mouseup",
|
|
2930
|
+
r(), window.removeEventListener("mousemove", E), window.removeEventListener("mouseup", D), e.pagesViewportRef.value?.removeEventListener("scroll", O), p && clearTimeout(p);
|
|
2909
2931
|
}), {
|
|
2910
2932
|
tableInsertButton: t,
|
|
2911
2933
|
hfEdit: i,
|
|
@@ -2926,7 +2948,7 @@ function Oi(e) {
|
|
|
2926
2948
|
}
|
|
2927
2949
|
//#endregion
|
|
2928
2950
|
//#region src/composables/useSelectionSync.ts
|
|
2929
|
-
function
|
|
2951
|
+
function ji(e) {
|
|
2930
2952
|
let t = null, n = null, r = null;
|
|
2931
2953
|
function i() {
|
|
2932
2954
|
let r = e.pagesRef.value;
|
|
@@ -3006,7 +3028,7 @@ function ki(e) {
|
|
|
3006
3028
|
}
|
|
3007
3029
|
//#endregion
|
|
3008
3030
|
//#region src/composables/useMenuActions.ts
|
|
3009
|
-
function
|
|
3031
|
+
function Mi(e) {
|
|
3010
3032
|
function t(t) {
|
|
3011
3033
|
let n = e.editorView.value;
|
|
3012
3034
|
if (!n) return;
|
|
@@ -3085,7 +3107,7 @@ function Ai(e) {
|
|
|
3085
3107
|
}
|
|
3086
3108
|
//#endregion
|
|
3087
3109
|
//#region src/composables/useDocumentLifecycle.ts
|
|
3088
|
-
function
|
|
3110
|
+
function Ni(e) {
|
|
3089
3111
|
async function t(t) {
|
|
3090
3112
|
e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
|
|
3091
3113
|
}
|
|
@@ -3104,7 +3126,7 @@ function ji(e) {
|
|
|
3104
3126
|
}
|
|
3105
3127
|
//#endregion
|
|
3106
3128
|
//#region src/composables/useDocxEditorRefApi.ts
|
|
3107
|
-
function
|
|
3129
|
+
function Pi(e) {
|
|
3108
3130
|
function t() {
|
|
3109
3131
|
let t = e.pagesRef.value;
|
|
3110
3132
|
t && lt(t), e.onPrint?.(), window.print();
|
|
@@ -3273,7 +3295,7 @@ function Mi(e) {
|
|
|
3273
3295
|
}
|
|
3274
3296
|
//#endregion
|
|
3275
3297
|
//#region src/composables/useColorMode.ts
|
|
3276
|
-
function
|
|
3298
|
+
function Fi(e) {
|
|
3277
3299
|
let t = R(Q());
|
|
3278
3300
|
return W((n) => {
|
|
3279
3301
|
e() === "system" && n(We((e) => {
|
|
@@ -3283,7 +3305,7 @@ function Ni(e) {
|
|
|
3283
3305
|
}
|
|
3284
3306
|
//#endregion
|
|
3285
3307
|
//#region src/composables/useFontLifecycle.ts
|
|
3286
|
-
function
|
|
3308
|
+
function Ii(e, t) {
|
|
3287
3309
|
U(e, (e) => {
|
|
3288
3310
|
ze(e);
|
|
3289
3311
|
}, { immediate: !0 });
|
|
@@ -3292,16 +3314,16 @@ function Pi(e, t) {
|
|
|
3292
3314
|
}
|
|
3293
3315
|
//#endregion
|
|
3294
3316
|
//#region src/components/DocxEditor.vue?vue&type=script&setup=true&lang.ts
|
|
3295
|
-
var
|
|
3317
|
+
var Li = { class: "docx-editor-vue__toolbar-shell" }, Ri = {
|
|
3296
3318
|
key: 0,
|
|
3297
3319
|
class: "docx-editor-vue__error"
|
|
3298
|
-
},
|
|
3320
|
+
}, zi = {
|
|
3299
3321
|
key: 1,
|
|
3300
3322
|
class: "docx-editor-vue__loading"
|
|
3301
|
-
},
|
|
3323
|
+
}, Bi = { class: "docx-editor-vue__editor-area" }, Vi = {
|
|
3302
3324
|
key: 0,
|
|
3303
3325
|
class: "docx-editor-vue__vertical-ruler"
|
|
3304
|
-
},
|
|
3326
|
+
}, Hi = ["title"], Ui = ["title", "aria-label"], Wi = /* @__PURE__ */ P({
|
|
3305
3327
|
__name: "DocxEditor",
|
|
3306
3328
|
props: {
|
|
3307
3329
|
documentBuffer: { default: null },
|
|
@@ -3405,16 +3427,16 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3405
3427
|
"mode-change"
|
|
3406
3428
|
],
|
|
3407
3429
|
setup(e, { expose: t, emit: n }) {
|
|
3408
|
-
let i = e, o = n, s =
|
|
3430
|
+
let i = e, o = n, s = Fi(() => i.colorMode), c = R(i.mode), u = E(() => i.readOnly || c.value === "viewing"), d = E(() => i.author);
|
|
3409
3431
|
a(E(() => i.i18n));
|
|
3410
|
-
let { t: h } = l(E(() => i.i18n)), v = R(null), b = R(null), x = R(null), S = R(0), ne = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set(),
|
|
3432
|
+
let { t: h } = l(E(() => i.i18n)), v = R(null), b = R(null), x = R(null), S = R(0), ne = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set(), D = new De(), ie = R(!1), M = R(!1), P = R(!1), ae = R(!1), V = R(!1), me = R(i.showOutline), H = R(!1), W = R(!1), G = R(!1), K = R(null), J = pe([]), ge = pe([]), _e = pe([]), { zoom: X, zoomPercent: be, isMinZoom: xe, isMaxZoom: Se, setZoom: Ce, zoomIn: we, zoomOut: Te, handleWheel: Oe, handleKeyDown: Ae, installShortcuts: je, ZOOM_PRESETS: Me } = te(i.initialZoom);
|
|
3411
3433
|
je();
|
|
3412
3434
|
let { editorView: Z, isReady: Ne, parseError: Pe, layout: Fe, loadBuffer: Ie, loadDocument: Re, save: ze, focus: Be, destroy: Ve, getDocument: Q, getCommands: He, reLayout: Ue, getHfPmView: We, syncHfPMs: Ge, setHfTransactionListener: qe, setDocument: Je } = C({
|
|
3413
3435
|
hiddenContainer: v,
|
|
3414
3436
|
pagesContainer: b,
|
|
3415
3437
|
readOnly: u,
|
|
3416
3438
|
externalPlugins: i.externalPlugins,
|
|
3417
|
-
syncCoordinator:
|
|
3439
|
+
syncCoordinator: D,
|
|
3418
3440
|
editorMode: c,
|
|
3419
3441
|
author: d,
|
|
3420
3442
|
onChange: (e) => {
|
|
@@ -3430,7 +3452,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3430
3452
|
let t = Ee(e);
|
|
3431
3453
|
T.forEach((e) => e(t));
|
|
3432
3454
|
}
|
|
3433
|
-
}), { commentCallbacks: Ye } =
|
|
3455
|
+
}), { commentCallbacks: Ye } = vi(i, Z), Xe = E(() => {
|
|
3434
3456
|
S.value;
|
|
3435
3457
|
let e = Q();
|
|
3436
3458
|
if (!e?.package?.document) return null;
|
|
@@ -3453,7 +3475,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3453
3475
|
function rt() {
|
|
3454
3476
|
et.value = null, tt.value = [];
|
|
3455
3477
|
}
|
|
3456
|
-
|
|
3478
|
+
Ii(() => i.fonts, (e) => {
|
|
3457
3479
|
o("error", e), i.onError?.(e);
|
|
3458
3480
|
});
|
|
3459
3481
|
let it = E(() => $.value?.headerFooter ? We($.value.headerFooter) ?? null : null), at = E(() => it.value ?? Z.value);
|
|
@@ -3489,7 +3511,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3489
3511
|
} catch {}
|
|
3490
3512
|
t.dom.blur?.();
|
|
3491
3513
|
}
|
|
3492
|
-
|
|
3514
|
+
fr.updateSelectionOverlay();
|
|
3493
3515
|
});
|
|
3494
3516
|
let e = 0;
|
|
3495
3517
|
function t() {
|
|
@@ -3540,7 +3562,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3540
3562
|
}
|
|
3541
3563
|
return !0;
|
|
3542
3564
|
}), n.sort((e, t) => e.name.localeCompare(t.name));
|
|
3543
|
-
}), dt = Ht(), { floatingCommentBtn: pt, pendingCommentRange: mt, addCommentYPosition: ht, sidebarAutoOpenedRef: gt, extractCommentsAndChanges: _t, handleAddComment: vt, handleCancelAddComment: yt, handleStartAddComment: bt, handleMarkerClick: xt } =
|
|
3565
|
+
}), dt = Ht(), { floatingCommentBtn: pt, pendingCommentRange: mt, addCommentYPosition: ht, sidebarAutoOpenedRef: gt, extractCommentsAndChanges: _t, handleAddComment: vt, handleCancelAddComment: yt, handleStartAddComment: bt, handleMarkerClick: xt } = yi({
|
|
3544
3566
|
editorView: Z,
|
|
3545
3567
|
getDocument: Q,
|
|
3546
3568
|
comments: J,
|
|
@@ -3558,7 +3580,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3558
3580
|
commentIdAllocator: dt,
|
|
3559
3581
|
author: d,
|
|
3560
3582
|
commentCallbacks: Ye
|
|
3561
|
-
}), { docxInputRef: St, imageInputRef: Ct, handleImageFileChange: wt, handleDocxFileChange: Tt, handleDocumentNameChange: Et, downloadCurrentDocument: Dt, loadDocumentBuffer: Ot, loadDocument: kt, save: At } =
|
|
3583
|
+
}), { docxInputRef: St, imageInputRef: Ct, handleImageFileChange: wt, handleDocxFileChange: Tt, handleDocumentNameChange: Et, downloadCurrentDocument: Dt, loadDocumentBuffer: Ot, loadDocument: kt, save: At } = ui({
|
|
3562
3584
|
loadBuffer: Ie,
|
|
3563
3585
|
loadParsedDocument: Re,
|
|
3564
3586
|
getDocument: Q,
|
|
@@ -3569,25 +3591,25 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3569
3591
|
onDocumentNameChange: i.onDocumentNameChange,
|
|
3570
3592
|
getActiveView: () => at.value,
|
|
3571
3593
|
nextTick: se
|
|
3572
|
-
}), { hyperlinkPopupData: jt, handleHyperlinkSubmit: Mt, handleHyperlinkRemove: Nt, handleHyperlinkPopupNavigate: Pt, handleHyperlinkPopupEdit: Ft, handleHyperlinkPopupRemove: It } =
|
|
3594
|
+
}), { hyperlinkPopupData: jt, handleHyperlinkSubmit: Mt, handleHyperlinkRemove: Nt, handleHyperlinkPopupNavigate: Pt, handleHyperlinkPopupEdit: Ft, handleHyperlinkPopupRemove: It } = di({
|
|
3573
3595
|
editorView: Z,
|
|
3574
3596
|
getCommands: He
|
|
3575
|
-
}), { handleClearFormatting: Lt, handleApplyStyle: Rt, handleInsertPageBreak: zt, handleInsertSectionBreakNextPage: Bt, handleInsertSectionBreakContinuous: Vt, handleInsertSymbol: Ut, applyFormatting: Wt, setParagraphStyle: Gt, insertBreak: Kt } =
|
|
3597
|
+
}), { handleClearFormatting: Lt, handleApplyStyle: Rt, handleInsertPageBreak: zt, handleInsertSectionBreakNextPage: Bt, handleInsertSectionBreakContinuous: Vt, handleInsertSymbol: Ut, applyFormatting: Wt, setParagraphStyle: Gt, insertBreak: Kt } = fi({
|
|
3576
3598
|
editorView: Z,
|
|
3577
3599
|
activeView: at,
|
|
3578
3600
|
getDocument: Q
|
|
3579
|
-
}), { handlePageSetupApply: qt, handleLeftMarginChange: Jt, handleRightMarginChange: Yt, handleTopMarginChange: Xt, handleBottomMarginChange: Zt, handleIndentLeftChange: Qt, handleIndentRightChange: $t, handleFirstLineIndentChange: tn, handleTabStopRemove: nn } =
|
|
3601
|
+
}), { handlePageSetupApply: qt, handleLeftMarginChange: Jt, handleRightMarginChange: Yt, handleTopMarginChange: Xt, handleBottomMarginChange: Zt, handleIndentLeftChange: Qt, handleIndentRightChange: $t, handleFirstLineIndentChange: tn, handleTabStopRemove: nn } = pi({
|
|
3580
3602
|
editorView: Z,
|
|
3581
3603
|
getDocument: Q,
|
|
3582
3604
|
readOnly: u,
|
|
3583
3605
|
stateTick: S,
|
|
3584
3606
|
reLayout: Ue,
|
|
3585
3607
|
emit: o
|
|
3586
|
-
}), { showWatermark: rn, currentWatermark: an, handleWatermarkApply: on } =
|
|
3608
|
+
}), { showWatermark: rn, currentWatermark: an, handleWatermarkApply: on } = mi({
|
|
3587
3609
|
editorView: Z,
|
|
3588
3610
|
readOnly: u,
|
|
3589
3611
|
stateTick: S
|
|
3590
|
-
}), { handleToggleOutline: cn, handleOutlineNavigate: ln, handleToggleSidebar: un, handleEditorScrollMouseDown: dn } =
|
|
3612
|
+
}), { handleToggleOutline: cn, handleOutlineNavigate: ln, handleToggleSidebar: un, handleEditorScrollMouseDown: dn } = hi({
|
|
3591
3613
|
editorView: Z,
|
|
3592
3614
|
showOutline: me,
|
|
3593
3615
|
showSidebar: W,
|
|
@@ -3595,14 +3617,14 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3595
3617
|
activeSidebarItem: K,
|
|
3596
3618
|
extractCommentsAndChanges: _t
|
|
3597
3619
|
});
|
|
3598
|
-
|
|
3620
|
+
gi({
|
|
3599
3621
|
showKeyboardShortcuts: H,
|
|
3600
|
-
showFindReplace:
|
|
3601
|
-
showHyperlink:
|
|
3622
|
+
showFindReplace: ie,
|
|
3623
|
+
showHyperlink: M,
|
|
3602
3624
|
handleZoomKeyDown: Ae,
|
|
3603
3625
|
disableFindReplaceShortcuts: () => i.disableFindReplaceShortcuts
|
|
3604
3626
|
});
|
|
3605
|
-
let { addComment: fn, replyToComment: pn, resolveComment: mn, proposeChange: hn, handleCommentReply: gn, handleCommentResolve: vn, handleCommentUnresolve: yn, handleCommentDelete: bn, handleAcceptChange: xn, handleRejectChange:
|
|
3627
|
+
let { addComment: fn, replyToComment: pn, resolveComment: mn, proposeChange: hn, handleCommentReply: gn, handleCommentResolve: vn, handleCommentUnresolve: yn, handleCommentDelete: bn, handleAcceptChange: xn, handleRejectChange: Cn, handleAcceptChangeById: En, handleRejectChangeById: Dn, handleTrackedChangeReply: kn } = _i({
|
|
3606
3628
|
editorView: Z,
|
|
3607
3629
|
getDocument: Q,
|
|
3608
3630
|
comments: J,
|
|
@@ -3616,48 +3638,48 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3616
3638
|
commentIdAllocator: dt,
|
|
3617
3639
|
author: d,
|
|
3618
3640
|
commentCallbacks: Ye
|
|
3619
|
-
}), { selectedImage:
|
|
3641
|
+
}), { selectedImage: An, imageInteracting: jn, imageToolbarContext: Mn, handleToolbarImageWrap: Nn, handleImageTransform: Fn } = bi({
|
|
3620
3642
|
editorView: Z,
|
|
3621
3643
|
zoom: X,
|
|
3622
3644
|
stateTick: S,
|
|
3623
3645
|
getCommands: He
|
|
3624
|
-
}),
|
|
3646
|
+
}), In = ee(), Ln = null, { tableInsertButton: Rn, hfEdit: $, scrollPageInfo: Bn, resolvePos: Vn, setPmSelection: Hn, scrollVisiblePositionIntoView: Un, handlePagesMouseDown: Wn, handlePagesMouseMove: Gn, handlePagesClick: Kn, handlePagesDoubleClick: qn, handleTableInsertClick: Jn, clearTableInsertTimer: Yn, handleHfSave: Xn, handleHfRemove: Zn } = Ai({
|
|
3625
3647
|
editorView: Z,
|
|
3626
3648
|
pagesRef: b,
|
|
3627
3649
|
pagesViewportRef: x,
|
|
3628
|
-
selectedImage:
|
|
3629
|
-
imageInteracting:
|
|
3650
|
+
selectedImage: An,
|
|
3651
|
+
imageInteracting: jn,
|
|
3630
3652
|
hyperlinkPopupData: jt,
|
|
3631
3653
|
readOnly: u,
|
|
3632
3654
|
zoom: X,
|
|
3633
3655
|
layout: Fe,
|
|
3634
|
-
tableResize:
|
|
3656
|
+
tableResize: In,
|
|
3635
3657
|
getCommands: He,
|
|
3636
3658
|
getDocument: Q,
|
|
3637
3659
|
reLayout: Ue,
|
|
3638
3660
|
emit: o,
|
|
3639
|
-
clearOverlay:
|
|
3661
|
+
clearOverlay: ur,
|
|
3640
3662
|
syncHfPMs: Ge,
|
|
3641
3663
|
getHfPmView: We,
|
|
3642
3664
|
setDocument: Je
|
|
3643
|
-
}), { contextMenu:
|
|
3665
|
+
}), { contextMenu: Qn, imageContextMenu: $n, imageContextMenuTextActions: er, handleContextMenu: tr, handleSelectedImageContextMenu: nr, handleImageWrapSelect: rr, handleContextMenuAction: ir } = Oi({
|
|
3644
3666
|
editorView: Z,
|
|
3645
|
-
selectedImage:
|
|
3667
|
+
selectedImage: An,
|
|
3646
3668
|
zoom: X,
|
|
3647
|
-
showImageProperties:
|
|
3669
|
+
showImageProperties: ae,
|
|
3648
3670
|
getCommands: He,
|
|
3649
|
-
clearOverlay:
|
|
3650
|
-
setPmSelection:
|
|
3651
|
-
resolvePos:
|
|
3652
|
-
}), { handleMenuAction:
|
|
3671
|
+
clearOverlay: ur,
|
|
3672
|
+
setPmSelection: Hn,
|
|
3673
|
+
resolvePos: Vn
|
|
3674
|
+
}), { handleMenuAction: ar, handleMenuTableInsert: or } = Mi({
|
|
3653
3675
|
editorView: Z,
|
|
3654
3676
|
getCommands: He,
|
|
3655
3677
|
docxInputRef: St,
|
|
3656
3678
|
imageInputRef: Ct,
|
|
3657
3679
|
showPageSetup: V,
|
|
3658
3680
|
showWatermark: rn,
|
|
3659
|
-
showHyperlink:
|
|
3660
|
-
showInsertSymbol:
|
|
3681
|
+
showHyperlink: M,
|
|
3682
|
+
showInsertSymbol: P,
|
|
3661
3683
|
showKeyboardShortcuts: H,
|
|
3662
3684
|
handleClearFormatting: Lt,
|
|
3663
3685
|
handleInsertPageBreak: zt,
|
|
@@ -3668,45 +3690,45 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3668
3690
|
downloadCurrentDocument: Dt,
|
|
3669
3691
|
emit: o
|
|
3670
3692
|
});
|
|
3671
|
-
|
|
3693
|
+
Ni({
|
|
3672
3694
|
documentBuffer: () => i.documentBuffer,
|
|
3673
3695
|
document: () => i.document,
|
|
3674
3696
|
loadDocumentBuffer: Ot,
|
|
3675
3697
|
loadDocument: kt,
|
|
3676
3698
|
sidebarAutoOpenedRef: gt
|
|
3677
3699
|
});
|
|
3678
|
-
let
|
|
3700
|
+
let sr = () => Z.value, cr = () => b.value;
|
|
3679
3701
|
U(() => i.mode, (e) => {
|
|
3680
3702
|
e && e !== c.value && (c.value = e);
|
|
3681
3703
|
}), U(() => i.showOutline, (e) => {
|
|
3682
3704
|
me.value = !!e;
|
|
3683
3705
|
});
|
|
3684
|
-
function
|
|
3706
|
+
function lr(e) {
|
|
3685
3707
|
c.value !== e && (c.value = e, o("mode-change", e));
|
|
3686
3708
|
}
|
|
3687
3709
|
le(() => {
|
|
3688
|
-
|
|
3710
|
+
Ln = In.install();
|
|
3689
3711
|
}), I(() => {
|
|
3690
|
-
|
|
3712
|
+
Ln?.();
|
|
3691
3713
|
});
|
|
3692
|
-
function lr() {
|
|
3693
|
-
dr.clearOverlay();
|
|
3694
|
-
}
|
|
3695
3714
|
function ur() {
|
|
3696
|
-
|
|
3715
|
+
fr.clearOverlay();
|
|
3716
|
+
}
|
|
3717
|
+
function dr() {
|
|
3718
|
+
fr.updateSelectionOverlay();
|
|
3697
3719
|
}
|
|
3698
|
-
let
|
|
3720
|
+
let fr = ji({
|
|
3699
3721
|
editorView: Z,
|
|
3700
3722
|
pagesRef: b,
|
|
3701
3723
|
zoom: X,
|
|
3702
|
-
selectedImage:
|
|
3724
|
+
selectedImage: An,
|
|
3703
3725
|
isHfEditing: E(() => $.value !== null),
|
|
3704
|
-
imageInteracting:
|
|
3705
|
-
}),
|
|
3706
|
-
|
|
3707
|
-
|
|
3726
|
+
imageInteracting: jn
|
|
3727
|
+
}), pr = D.onRender(() => dr());
|
|
3728
|
+
dr(), I(() => {
|
|
3729
|
+
pr(), ur();
|
|
3708
3730
|
});
|
|
3709
|
-
let { exposed:
|
|
3731
|
+
let { exposed: mr } = Pi({
|
|
3710
3732
|
editorView: Z,
|
|
3711
3733
|
layout: Fe,
|
|
3712
3734
|
pagesRef: b,
|
|
@@ -3727,12 +3749,12 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3727
3749
|
applyFormatting: Wt,
|
|
3728
3750
|
setParagraphStyle: Gt,
|
|
3729
3751
|
insertBreak: Kt,
|
|
3730
|
-
scrollVisiblePositionIntoView:
|
|
3752
|
+
scrollVisiblePositionIntoView: Un,
|
|
3731
3753
|
contentChangeSubscribers: ne,
|
|
3732
3754
|
selectionChangeSubscribers: T,
|
|
3733
3755
|
onPrint: i.onPrint
|
|
3734
3756
|
});
|
|
3735
|
-
return t(
|
|
3757
|
+
return t(mr), (t, n) => (L(), A("div", {
|
|
3736
3758
|
class: ce([
|
|
3737
3759
|
"docx-editor-vue ep-root paged-editor",
|
|
3738
3760
|
B(s) ? "dark" : "",
|
|
@@ -3746,15 +3768,15 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3746
3768
|
]),
|
|
3747
3769
|
style: F(e.style)
|
|
3748
3770
|
}, [
|
|
3749
|
-
|
|
3771
|
+
j("div", Li, [N(zn, {
|
|
3750
3772
|
"show-menu-bar": e.showMenuBar,
|
|
3751
3773
|
"document-name": e.documentName,
|
|
3752
3774
|
"document-name-editable": e.documentNameEditable,
|
|
3753
3775
|
"render-logo": e.renderLogo,
|
|
3754
3776
|
"render-title-bar-right": e.renderTitleBarRight,
|
|
3755
3777
|
onRename: B(Et),
|
|
3756
|
-
onMenuAction: B(
|
|
3757
|
-
onInsertTable: B(
|
|
3778
|
+
onMenuAction: B(ar),
|
|
3779
|
+
onInsertTable: B(or)
|
|
3758
3780
|
}, {
|
|
3759
3781
|
"title-bar-left": he(() => [de(t.$slots, "title-bar-left")]),
|
|
3760
3782
|
"title-bar-right": he(() => [de(t.$slots, "title-bar-right")]),
|
|
@@ -3768,7 +3790,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3768
3790
|
"onRename",
|
|
3769
3791
|
"onMenuAction",
|
|
3770
3792
|
"onInsertTable"
|
|
3771
|
-
]), e.showToolbar ? (L(),
|
|
3793
|
+
]), e.showToolbar ? (L(), O(y, {
|
|
3772
3794
|
key: 0,
|
|
3773
3795
|
view: at.value,
|
|
3774
3796
|
"get-commands": B(He),
|
|
@@ -3780,22 +3802,22 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3780
3802
|
"show-zoom-control": e.showZoomControl,
|
|
3781
3803
|
"editor-mode": c.value,
|
|
3782
3804
|
"comments-sidebar-open": W.value,
|
|
3783
|
-
"image-context": B(
|
|
3805
|
+
"image-context": B(Mn),
|
|
3784
3806
|
theme: Qe.value,
|
|
3785
3807
|
"font-families": e.fontFamilies,
|
|
3786
3808
|
"document-styles": $e.value,
|
|
3787
|
-
onInsertLink: n[0] ||= (e) =>
|
|
3809
|
+
onInsertLink: n[0] ||= (e) => M.value = !0,
|
|
3788
3810
|
onApplyStyle: B(Rt),
|
|
3789
3811
|
onZoomIn: B(we),
|
|
3790
3812
|
onZoomOut: B(Te),
|
|
3791
3813
|
onZoomSet: B(Ce),
|
|
3792
3814
|
onToggleSidebar: B(un),
|
|
3793
|
-
onModeChange:
|
|
3815
|
+
onModeChange: lr,
|
|
3794
3816
|
onImageWrapType: B(Nn),
|
|
3795
|
-
onImageProperties: n[1] ||= (e) =>
|
|
3796
|
-
onImageTransform: B(
|
|
3797
|
-
},
|
|
3798
|
-
"table-context": he(() => [
|
|
3817
|
+
onImageProperties: n[1] ||= (e) => ae.value = !0,
|
|
3818
|
+
onImageTransform: B(Fn)
|
|
3819
|
+
}, re({
|
|
3820
|
+
"table-context": he(() => [N(m, {
|
|
3799
3821
|
view: at.value,
|
|
3800
3822
|
"get-commands": B(He),
|
|
3801
3823
|
"state-tick": S.value,
|
|
@@ -3809,7 +3831,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3809
3831
|
_: 2
|
|
3810
3832
|
}, [e.toolbarExtra ? {
|
|
3811
3833
|
name: "toolbar-extra",
|
|
3812
|
-
fn: he(() => [(L(),
|
|
3834
|
+
fn: he(() => [(L(), O(fe(e.toolbarExtra)))]),
|
|
3813
3835
|
key: "0"
|
|
3814
3836
|
} : {
|
|
3815
3837
|
name: "toolbar-extra",
|
|
@@ -3837,16 +3859,16 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3837
3859
|
"onToggleSidebar",
|
|
3838
3860
|
"onImageWrapType",
|
|
3839
3861
|
"onImageTransform"
|
|
3840
|
-
])) :
|
|
3841
|
-
|
|
3842
|
-
"show-find-replace":
|
|
3843
|
-
"onUpdate:showFindReplace": n[2] ||= (e) =>
|
|
3844
|
-
"show-hyperlink":
|
|
3845
|
-
"onUpdate:showHyperlink": n[3] ||= (e) =>
|
|
3846
|
-
"show-insert-symbol":
|
|
3847
|
-
"onUpdate:showInsertSymbol": n[4] ||= (e) =>
|
|
3848
|
-
"show-image-properties":
|
|
3849
|
-
"onUpdate:showImageProperties": n[5] ||= (e) =>
|
|
3862
|
+
])) : k("", !0)]),
|
|
3863
|
+
N(kr, {
|
|
3864
|
+
"show-find-replace": ie.value,
|
|
3865
|
+
"onUpdate:showFindReplace": n[2] ||= (e) => ie.value = e,
|
|
3866
|
+
"show-hyperlink": M.value,
|
|
3867
|
+
"onUpdate:showHyperlink": n[3] ||= (e) => M.value = e,
|
|
3868
|
+
"show-insert-symbol": P.value,
|
|
3869
|
+
"onUpdate:showInsertSymbol": n[4] ||= (e) => P.value = e,
|
|
3870
|
+
"show-image-properties": ae.value,
|
|
3871
|
+
"onUpdate:showImageProperties": n[5] ||= (e) => ae.value = e,
|
|
3850
3872
|
"show-page-setup": V.value,
|
|
3851
3873
|
"onUpdate:showPageSetup": n[6] ||= (e) => V.value = e,
|
|
3852
3874
|
"show-watermark": B(rn),
|
|
@@ -3855,11 +3877,11 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3855
3877
|
"onUpdate:showKeyboardShortcuts": n[8] ||= (e) => H.value = e,
|
|
3856
3878
|
view: B(Z),
|
|
3857
3879
|
bookmarks: ut.value,
|
|
3858
|
-
"selected-image-pm-pos": B(
|
|
3880
|
+
"selected-image-pm-pos": B(An)?.pmPos ?? null,
|
|
3859
3881
|
"section-properties": Xe.value,
|
|
3860
3882
|
"current-watermark": B(an),
|
|
3861
3883
|
"watermark-presets": e.watermarkPresets,
|
|
3862
|
-
"scroll-visible-position-into-view": B(
|
|
3884
|
+
"scroll-visible-position-into-view": B(Un),
|
|
3863
3885
|
onInsertSymbol: B(Ut),
|
|
3864
3886
|
onHyperlinkSubmit: B(Mt),
|
|
3865
3887
|
onHyperlinkRemove: B(Nt),
|
|
@@ -3886,21 +3908,21 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3886
3908
|
"onPageSetupApply",
|
|
3887
3909
|
"onWatermarkApply"
|
|
3888
3910
|
]),
|
|
3889
|
-
B(Pe) ? (L(),
|
|
3890
|
-
!B(Ne) && !B(Pe) ? (L(),
|
|
3891
|
-
|
|
3911
|
+
B(Pe) ? (L(), A("div", Ri, z(B(Pe)), 1)) : k("", !0),
|
|
3912
|
+
!B(Ne) && !B(Pe) ? (L(), A("div", zi, "Loading...")) : k("", !0),
|
|
3913
|
+
j("div", {
|
|
3892
3914
|
ref_key: "hiddenPmRef",
|
|
3893
3915
|
ref: v,
|
|
3894
3916
|
class: "docx-editor-vue__hidden-pm paged-editor__hidden-pm"
|
|
3895
3917
|
}, null, 512),
|
|
3896
|
-
|
|
3918
|
+
j("div", {
|
|
3897
3919
|
class: "docx-editor-vue__editor-scroll",
|
|
3898
|
-
onMousedown: n[
|
|
3899
|
-
}, [e.showRuler && Xe.value ? (L(),
|
|
3920
|
+
onMousedown: n[29] ||= (...e) => B(dn) && B(dn)(...e)
|
|
3921
|
+
}, [e.showRuler && Xe.value ? (L(), A("div", {
|
|
3900
3922
|
key: 0,
|
|
3901
3923
|
class: "docx-editor-vue__ruler-row",
|
|
3902
3924
|
style: F(st.value)
|
|
3903
|
-
}, [
|
|
3925
|
+
}, [N(g, {
|
|
3904
3926
|
"section-props": Xe.value,
|
|
3905
3927
|
zoom: B(X),
|
|
3906
3928
|
editable: !u.value,
|
|
@@ -3930,19 +3952,19 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3930
3952
|
"onIndentRightChange",
|
|
3931
3953
|
"onFirstLineIndentChange",
|
|
3932
3954
|
"onTabStopRemove"
|
|
3933
|
-
])], 4)) :
|
|
3934
|
-
|
|
3955
|
+
])], 4)) : k("", !0), j("div", Bi, [
|
|
3956
|
+
j("div", {
|
|
3935
3957
|
ref_key: "pagesViewportRef",
|
|
3936
3958
|
ref: x,
|
|
3937
3959
|
class: "docx-editor-vue__pages-viewport",
|
|
3938
|
-
onMousedown: n[22] ||= (...e) => B(
|
|
3939
|
-
onMousemove: n[23] ||= (...e) => B(
|
|
3940
|
-
onClick: n[24] ||= (...e) => B(
|
|
3941
|
-
onDblclick: n[25] ||= (...e) => B(
|
|
3942
|
-
onContextmenu: n[26] ||= q((...e) => B(
|
|
3960
|
+
onMousedown: n[22] ||= (...e) => B(Wn) && B(Wn)(...e),
|
|
3961
|
+
onMousemove: n[23] ||= (...e) => B(Gn) && B(Gn)(...e),
|
|
3962
|
+
onClick: n[24] ||= (...e) => B(Kn) && B(Kn)(...e),
|
|
3963
|
+
onDblclick: n[25] ||= (...e) => B(qn) && B(qn)(...e),
|
|
3964
|
+
onContextmenu: n[26] ||= q((...e) => B(tr) && B(tr)(...e), ["prevent"]),
|
|
3943
3965
|
onWheel: n[27] ||= (...e) => B(Oe) && B(Oe)(...e)
|
|
3944
3966
|
}, [
|
|
3945
|
-
e.showRuler && Xe.value ? (L(),
|
|
3967
|
+
e.showRuler && Xe.value ? (L(), A("div", Vi, [N(f, {
|
|
3946
3968
|
"section-props": Xe.value,
|
|
3947
3969
|
zoom: B(X),
|
|
3948
3970
|
editable: !u.value,
|
|
@@ -3954,26 +3976,26 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3954
3976
|
"editable",
|
|
3955
3977
|
"onTopMarginChange",
|
|
3956
3978
|
"onBottomMarginChange"
|
|
3957
|
-
])])) :
|
|
3958
|
-
|
|
3979
|
+
])])) : k("", !0),
|
|
3980
|
+
j("div", {
|
|
3959
3981
|
ref_key: "pagesRef",
|
|
3960
3982
|
ref: b,
|
|
3961
3983
|
class: "docx-editor-vue__pages paged-editor__pages",
|
|
3962
3984
|
style: F(ot.value)
|
|
3963
3985
|
}, null, 4),
|
|
3964
|
-
u.value ?
|
|
3986
|
+
u.value ? k("", !0) : (L(), O(Pn, {
|
|
3965
3987
|
key: 1,
|
|
3966
3988
|
container: b.value,
|
|
3967
3989
|
view: B(Z)
|
|
3968
3990
|
}, null, 8, ["container", "view"])),
|
|
3969
|
-
|
|
3991
|
+
N(On, {
|
|
3970
3992
|
"is-open": B($) !== null,
|
|
3971
3993
|
position: B($)?.position ?? "header",
|
|
3972
3994
|
view: it.value,
|
|
3973
3995
|
"target-rect": B($)?.targetRect ?? null,
|
|
3974
|
-
onSave: B(
|
|
3996
|
+
onSave: B(Xn),
|
|
3975
3997
|
onClose: n[9] ||= (e) => $.value = null,
|
|
3976
|
-
onRemove: B(
|
|
3998
|
+
onRemove: B(Zn)
|
|
3977
3999
|
}, null, 8, [
|
|
3978
4000
|
"is-open",
|
|
3979
4001
|
"position",
|
|
@@ -3982,7 +4004,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3982
4004
|
"onSave",
|
|
3983
4005
|
"onRemove"
|
|
3984
4006
|
]),
|
|
3985
|
-
(L(!0),
|
|
4007
|
+
(L(!0), A(w, null, ue(B($) ? tt.value : [], (e, t) => (L(), A("div", {
|
|
3986
4008
|
key: `hf-sel-${t}-${e.top}-${e.left}`,
|
|
3987
4009
|
class: "vue-hf-sel-rect",
|
|
3988
4010
|
"aria-hidden": "true",
|
|
@@ -3997,7 +4019,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
3997
4019
|
zIndex: 9998
|
|
3998
4020
|
})
|
|
3999
4021
|
}, null, 4))), 128)),
|
|
4000
|
-
B($) && et.value ? (L(),
|
|
4022
|
+
B($) && et.value ? (L(), A("div", {
|
|
4001
4023
|
key: 2,
|
|
4002
4024
|
"aria-hidden": "true",
|
|
4003
4025
|
style: F({
|
|
@@ -4011,34 +4033,34 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
4011
4033
|
zIndex: 9999,
|
|
4012
4034
|
animation: "hf-caret-blink 1.06s steps(1) infinite"
|
|
4013
4035
|
})
|
|
4014
|
-
}, null, 4)) :
|
|
4015
|
-
|
|
4016
|
-
"image-info": B(
|
|
4036
|
+
}, null, 4)) : k("", !0),
|
|
4037
|
+
N(_n, {
|
|
4038
|
+
"image-info": B(An),
|
|
4017
4039
|
zoom: B(X),
|
|
4018
4040
|
view: B(Z),
|
|
4019
|
-
onOpenProperties: n[10] ||= (e) =>
|
|
4020
|
-
onDeselect: n[11] ||= (e) =>
|
|
4021
|
-
onInteractStart: n[12] ||= (e) =>
|
|
4022
|
-
onInteractEnd: n[13] ||= (e) =>
|
|
4023
|
-
onContextMenu: B(
|
|
4041
|
+
onOpenProperties: n[10] ||= (e) => ae.value = !0,
|
|
4042
|
+
onDeselect: n[11] ||= (e) => An.value = null,
|
|
4043
|
+
onInteractStart: n[12] ||= (e) => jn.value = !0,
|
|
4044
|
+
onInteractEnd: n[13] ||= (e) => jn.value = !1,
|
|
4045
|
+
onContextMenu: B(nr)
|
|
4024
4046
|
}, null, 8, [
|
|
4025
4047
|
"image-info",
|
|
4026
4048
|
"zoom",
|
|
4027
4049
|
"view",
|
|
4028
4050
|
"onContextMenu"
|
|
4029
4051
|
]),
|
|
4030
|
-
|
|
4031
|
-
"get-view":
|
|
4032
|
-
"get-pages-container":
|
|
4052
|
+
N(sn, {
|
|
4053
|
+
"get-view": sr,
|
|
4054
|
+
"get-pages-container": cr,
|
|
4033
4055
|
zoom: B(X),
|
|
4034
4056
|
"transaction-version": S.value,
|
|
4035
|
-
"sync-coordinator": B(
|
|
4057
|
+
"sync-coordinator": B(D)
|
|
4036
4058
|
}, null, 8, [
|
|
4037
4059
|
"zoom",
|
|
4038
4060
|
"transaction-version",
|
|
4039
4061
|
"sync-coordinator"
|
|
4040
4062
|
]),
|
|
4041
|
-
B(pt) && !G.value && !u.value ? (L(),
|
|
4063
|
+
B(pt) && !G.value && !u.value ? (L(), A("button", {
|
|
4042
4064
|
key: 3,
|
|
4043
4065
|
type: "button",
|
|
4044
4066
|
class: "docx-editor-vue__floating-comment",
|
|
@@ -4048,11 +4070,11 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
4048
4070
|
}),
|
|
4049
4071
|
title: B(h)("comments.addComment"),
|
|
4050
4072
|
onMousedown: n[14] ||= q((...e) => B(bt) && B(bt)(...e), ["prevent", "stop"])
|
|
4051
|
-
}, [
|
|
4073
|
+
}, [N(r, {
|
|
4052
4074
|
name: "add_comment",
|
|
4053
4075
|
size: 16
|
|
4054
|
-
})], 44,
|
|
4055
|
-
B(Rn) && !u.value ? (L(),
|
|
4076
|
+
})], 44, Hi)) : k("", !0),
|
|
4077
|
+
B(Rn) && !u.value ? (L(), A("button", {
|
|
4056
4078
|
key: 4,
|
|
4057
4079
|
type: "button",
|
|
4058
4080
|
class: "docx-editor-vue__table-insert-btn",
|
|
@@ -4062,21 +4084,21 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
4062
4084
|
}),
|
|
4063
4085
|
title: B(Rn).type === "row" ? "Insert row below" : "Insert column to the right",
|
|
4064
4086
|
"aria-label": B(Rn).type === "row" ? "Insert row below" : "Insert column to the right",
|
|
4065
|
-
onMousedown: n[15] ||= (...e) => B(
|
|
4066
|
-
onMouseenter: n[16] ||= (...e) => B(
|
|
4087
|
+
onMousedown: n[15] ||= (...e) => B(Jn) && B(Jn)(...e),
|
|
4088
|
+
onMouseenter: n[16] ||= (...e) => B(Yn) && B(Yn)(...e),
|
|
4067
4089
|
onMouseleave: n[17] ||= (e) => Rn.value = null
|
|
4068
|
-
}, [...n[
|
|
4090
|
+
}, [...n[35] ||= [j("svg", {
|
|
4069
4091
|
width: "12",
|
|
4070
4092
|
height: "12",
|
|
4071
4093
|
viewBox: "0 0 12 12",
|
|
4072
4094
|
fill: "none"
|
|
4073
|
-
}, [
|
|
4095
|
+
}, [j("path", {
|
|
4074
4096
|
d: "M6 1v10M1 6h10",
|
|
4075
4097
|
stroke: "currentColor",
|
|
4076
4098
|
"stroke-width": "1.5",
|
|
4077
4099
|
"stroke-linecap": "round"
|
|
4078
|
-
})], -1)]], 44,
|
|
4079
|
-
|
|
4100
|
+
})], -1)]], 44, Ui)) : k("", !0),
|
|
4101
|
+
N(_, {
|
|
4080
4102
|
comments: J.value,
|
|
4081
4103
|
"pages-container": b.value,
|
|
4082
4104
|
zoom: B(X),
|
|
@@ -4093,7 +4115,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
4093
4115
|
"resolved-comment-ids",
|
|
4094
4116
|
"onMarkerClick"
|
|
4095
4117
|
]),
|
|
4096
|
-
|
|
4118
|
+
N(p, {
|
|
4097
4119
|
"is-open": W.value,
|
|
4098
4120
|
comments: J.value,
|
|
4099
4121
|
"tracked-changes": ge.value,
|
|
@@ -4112,10 +4134,10 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
4112
4134
|
onCommentUnresolve: B(yn),
|
|
4113
4135
|
onCommentDelete: B(bn),
|
|
4114
4136
|
onAcceptChange: B(xn),
|
|
4115
|
-
onRejectChange: B(
|
|
4116
|
-
onAcceptChangeById: B(
|
|
4137
|
+
onRejectChange: B(Cn),
|
|
4138
|
+
onAcceptChangeById: B(En),
|
|
4117
4139
|
onRejectChangeById: B(Dn),
|
|
4118
|
-
onTrackedChangeReply: B(
|
|
4140
|
+
onTrackedChangeReply: B(kn),
|
|
4119
4141
|
"onUpdate:activeItemId": n[19] ||= (e) => K.value = e
|
|
4120
4142
|
}, null, 8, [
|
|
4121
4143
|
"is-open",
|
|
@@ -4139,7 +4161,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
4139
4161
|
"onRejectChangeById",
|
|
4140
4162
|
"onTrackedChangeReply"
|
|
4141
4163
|
]),
|
|
4142
|
-
|
|
4164
|
+
N(li, {
|
|
4143
4165
|
data: B(jt),
|
|
4144
4166
|
"read-only": u.value,
|
|
4145
4167
|
onNavigate: B(Pt),
|
|
@@ -4155,65 +4177,61 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
4155
4177
|
"onRemove"
|
|
4156
4178
|
])
|
|
4157
4179
|
], 544),
|
|
4158
|
-
!me.value && e.showOutlineButton ? (L(),
|
|
4180
|
+
!me.value && e.showOutlineButton ? (L(), O(wn, {
|
|
4159
4181
|
key: 0,
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
onMousedown: n[29] ||= q(() => {}, ["stop"])
|
|
4165
|
-
}, [M(r, {
|
|
4166
|
-
name: "format_list_bulleted",
|
|
4167
|
-
size: 20
|
|
4168
|
-
})], 32)) : O("", !0),
|
|
4169
|
-
B(zn).totalPages > 1 ? (L(), D(Cn, {
|
|
4182
|
+
"left-offset": e.showRuler ? 32 : 12,
|
|
4183
|
+
onToggle: B(cn)
|
|
4184
|
+
}, null, 8, ["left-offset", "onToggle"])) : k("", !0),
|
|
4185
|
+
B(Bn).totalPages > 1 ? (L(), O(Tn, {
|
|
4170
4186
|
key: 1,
|
|
4171
|
-
"current-page": B(
|
|
4172
|
-
"total-pages": B(
|
|
4173
|
-
visible: B(
|
|
4187
|
+
"current-page": B(Bn).currentPage,
|
|
4188
|
+
"total-pages": B(Bn).totalPages,
|
|
4189
|
+
visible: B(Bn).visible
|
|
4174
4190
|
}, null, 8, [
|
|
4175
4191
|
"current-page",
|
|
4176
4192
|
"total-pages",
|
|
4177
4193
|
"visible"
|
|
4178
|
-
])) :
|
|
4179
|
-
|
|
4194
|
+
])) : k("", !0),
|
|
4195
|
+
N(Sn, {
|
|
4180
4196
|
"is-open": me.value,
|
|
4181
4197
|
headings: _e.value,
|
|
4182
|
-
|
|
4198
|
+
"left-offset": e.showRuler ? 32 : 12,
|
|
4199
|
+
onClose: n[28] ||= (e) => me.value = !1,
|
|
4183
4200
|
onNavigate: B(ln)
|
|
4184
4201
|
}, null, 8, [
|
|
4185
4202
|
"is-open",
|
|
4186
4203
|
"headings",
|
|
4204
|
+
"left-offset",
|
|
4187
4205
|
"onNavigate"
|
|
4188
4206
|
])
|
|
4189
4207
|
])], 32),
|
|
4190
|
-
|
|
4208
|
+
j("input", {
|
|
4191
4209
|
ref_key: "docxInputRef",
|
|
4192
4210
|
ref: St,
|
|
4193
4211
|
type: "file",
|
|
4194
4212
|
accept: ".docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
4195
4213
|
style: { display: "none" },
|
|
4196
|
-
onChange: n[
|
|
4214
|
+
onChange: n[30] ||= (...e) => B(Tt) && B(Tt)(...e)
|
|
4197
4215
|
}, null, 544),
|
|
4198
|
-
|
|
4216
|
+
j("input", {
|
|
4199
4217
|
ref_key: "imageInputRef",
|
|
4200
4218
|
ref: Ct,
|
|
4201
4219
|
type: "file",
|
|
4202
4220
|
accept: "image/*",
|
|
4203
4221
|
style: { display: "none" },
|
|
4204
|
-
onChange: n[
|
|
4222
|
+
onChange: n[31] ||= (...e) => B(wt) && B(wt)(...e)
|
|
4205
4223
|
}, null, 544),
|
|
4206
|
-
|
|
4224
|
+
N($r, {
|
|
4207
4225
|
"read-only": u.value,
|
|
4208
|
-
"context-menu": B(
|
|
4209
|
-
"image-context-menu": B(
|
|
4210
|
-
"image-context-menu-text-actions": B(
|
|
4211
|
-
"can-open-image-properties": !!B(
|
|
4212
|
-
onContextMenuAction: B(
|
|
4213
|
-
onCloseContextMenu: n[
|
|
4214
|
-
onImageWrapSelect: B(
|
|
4215
|
-
onCloseImageContextMenu: n[
|
|
4216
|
-
onOpenImageProperties: n[
|
|
4226
|
+
"context-menu": B(Qn),
|
|
4227
|
+
"image-context-menu": B($n),
|
|
4228
|
+
"image-context-menu-text-actions": B(er),
|
|
4229
|
+
"can-open-image-properties": !!B(An),
|
|
4230
|
+
onContextMenuAction: B(ir),
|
|
4231
|
+
onCloseContextMenu: n[32] ||= (e) => B(Qn).isOpen = !1,
|
|
4232
|
+
onImageWrapSelect: B(rr),
|
|
4233
|
+
onCloseImageContextMenu: n[33] ||= (e) => $n.value = null,
|
|
4234
|
+
onOpenImageProperties: n[34] ||= (e) => ae.value = !0
|
|
4217
4235
|
}, null, 8, [
|
|
4218
4236
|
"read-only",
|
|
4219
4237
|
"context-menu",
|
|
@@ -4228,7 +4246,7 @@ var Fi = { class: "docx-editor-vue__toolbar-shell" }, Ii = {
|
|
|
4228
4246
|
});
|
|
4229
4247
|
//#endregion
|
|
4230
4248
|
//#region src/renderAsync.ts
|
|
4231
|
-
async function
|
|
4249
|
+
async function Gi(e, t, n = {}) {
|
|
4232
4250
|
let r = e instanceof ArrayBuffer ? e : await Ge(e), i = null, a = null, o = !1, s = {
|
|
4233
4251
|
save: async () => {
|
|
4234
4252
|
let e = await (i?.save() ?? Promise.resolve(null));
|
|
@@ -4250,8 +4268,8 @@ async function Ui(e, t, n = {}) {
|
|
|
4250
4268
|
}
|
|
4251
4269
|
};
|
|
4252
4270
|
return new Promise((e, c) => {
|
|
4253
|
-
a =
|
|
4254
|
-
return () =>
|
|
4271
|
+
a = D({ setup() {
|
|
4272
|
+
return () => ae(Wi, {
|
|
4255
4273
|
...n,
|
|
4256
4274
|
documentBuffer: r,
|
|
4257
4275
|
showToolbar: n.showToolbar ?? !0,
|
|
@@ -4275,6 +4293,6 @@ async function Ui(e, t, n = {}) {
|
|
|
4275
4293
|
}
|
|
4276
4294
|
//#endregion
|
|
4277
4295
|
//#region src/index.ts
|
|
4278
|
-
var
|
|
4296
|
+
var Ki = "0.0.2";
|
|
4279
4297
|
//#endregion
|
|
4280
|
-
export {
|
|
4298
|
+
export { Wi as DocxEditor, Ki as VERSION, Qt as createDocumentWithText, $t as createEmptyDocument, n as defaultLocale, t as i18nPlugin, a as provideLocale, Gi as renderAsync, d as useTranslation };
|