@eigenpal/docx-editor-vue 1.5.0 → 1.6.0
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/KeyboardShortcutsDialog-Dohz9D39.cjs +1 -0
- package/dist/{KeyboardShortcutsDialog-DtuQzPxi.js → KeyboardShortcutsDialog-OPAV0oVm.js} +9 -6
- package/dist/{MenuBar-DfQrRpyI.js → MenuBar-BLKoZqG3.js} +644 -540
- package/dist/MenuBar-BP-XM0MI.cjs +4 -0
- package/dist/{TablePropertiesDialog-BVlqA7s3.cjs → TablePropertiesDialog-B-FVOqkH.cjs} +1 -1
- package/dist/{TablePropertiesDialog-D4xs_Xif.js → TablePropertiesDialog-B3oZIIjw.js} +9 -9
- package/dist/components/DocxEditor/types.d.ts +8 -0
- package/dist/components/Toolbar/presets.d.ts +0 -1
- package/dist/components/ui/fontPickerValue.d.ts +1 -0
- package/dist/components/ui/fontPickerValue.test.d.ts +1 -0
- package/dist/composables/useColorMode.d.ts +8 -0
- package/dist/composables/useDocxEditorRefApi.d.ts +4 -0
- package/dist/composables/useFormattingActions.d.ts +5 -2
- package/dist/composables/useMenuActions.d.ts +2 -0
- package/dist/composables/useParagraphStyleOptions.d.ts +18 -0
- package/dist/composables/useToolbarDropdowns.d.ts +1 -0
- package/dist/composables/useToolbarFontSize.d.ts +15 -0
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +4 -3
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +2 -2
- package/dist/docx-editor-vue.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +952 -906
- package/dist/plugin-api.cjs +1 -1
- package/dist/plugin-api.js +1 -1
- package/dist/ui.cjs +2 -2
- package/dist/ui.js +220 -197
- package/dist/{useDragAutoScroll-BNPB-6SM.js → useDragAutoScroll-B21Ec-Zy.js} +6 -7
- package/dist/useDragAutoScroll-BPnc7LEO.cjs +1 -0
- package/package.json +4 -4
- package/dist/KeyboardShortcutsDialog-DyfvEiK5.cjs +0 -1
- package/dist/MenuBar-p9bqtbLg.cjs +0 -4
- package/dist/useDragAutoScroll-DCUotwOX.cjs +0 -1
package/dist/ui.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as e, f as t, i as n, n as r, o as i, r as a, t as o, u as s } from "./KeyboardShortcutsDialog-
|
|
2
|
-
import { C as c, D as l, E as u, S as d, T as f, _ as ee, a as te, b as ne, c as p, d as m, f as h, g, h as _, i as v, l as y, m as b, n as x, o as re, p as ie, r as ae, s as oe, t as S, u as se, v as ce, w as le, x as C, y as ue } from "./MenuBar-
|
|
1
|
+
import { a as e, f as t, i as n, n as r, o as i, r as a, t as o, u as s } from "./KeyboardShortcutsDialog-OPAV0oVm.js";
|
|
2
|
+
import { C as c, D as l, E as u, S as d, T as f, _ as ee, a as te, b as ne, c as p, d as m, f as h, g, h as _, i as v, l as y, m as b, n as x, o as re, p as ie, r as ae, s as oe, t as S, u as se, v as ce, w as le, x as C, y as ue } from "./MenuBar-BLKoZqG3.js";
|
|
3
3
|
import { t as w } from "./_plugin-vue_export-helper-B52Kst-M.js";
|
|
4
|
-
import { a as de, c as fe, i as pe, n as me, o as
|
|
5
|
-
import { Fragment as
|
|
4
|
+
import { a as de, c as fe, i as pe, n as me, o as he, r as T, s as E, t as D } from "./TablePropertiesDialog-B3oZIIjw.js";
|
|
5
|
+
import { Fragment as O, Teleport as k, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createTextVNode as F, createVNode as I, defineComponent as L, guardReactiveProps as R, nextTick as z, normalizeClass as B, normalizeProps as ge, normalizeStyle as V, onBeforeUnmount as H, onMounted as U, openBlock as W, ref as G, renderList as K, renderSlot as q, resolveDynamicComponent as _e, toDisplayString as J, unref as ve, watch as ye, withCtx as Y, withKeys as X, withModifiers as Z } from "vue";
|
|
6
6
|
import "@eigenpal/docx-editor-core/utils/units";
|
|
7
|
-
import { createDefaultListState as
|
|
8
|
-
import { CARD_STYLE_COLLAPSED as
|
|
7
|
+
import { createDefaultListState as be } from "@eigenpal/docx-editor-core/utils/listState";
|
|
8
|
+
import { CARD_STYLE_COLLAPSED as xe, CARD_STYLE_EXPANDED as Se } from "@eigenpal/docx-editor-core/utils/cardStyles";
|
|
9
9
|
//#region src/components/EditorToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
10
|
+
var Ce = { class: "docx-editor-toolbar" }, we = { class: "docx-editor-toolbar__title-row" }, Te = { class: "docx-editor-toolbar__title-left" }, Ee = { class: "docx-editor-toolbar__title-center" }, De = { class: "docx-editor-toolbar__title-right" }, Oe = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
11
11
|
inheritAttrs: !1,
|
|
12
12
|
__name: "EditorToolbar",
|
|
13
13
|
props: { showMenuBar: {
|
|
@@ -16,30 +16,30 @@ var Se = { class: "docx-editor-toolbar" }, Ce = { class: "docx-editor-toolbar__t
|
|
|
16
16
|
} },
|
|
17
17
|
emits: ["menu-action"],
|
|
18
18
|
setup(e) {
|
|
19
|
-
return (t, n) => (
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
return (t, n) => (W(), N("div", Ce, [q(t.$slots, "title-bar", {}, () => [P("div", we, [
|
|
20
|
+
P("div", Te, [q(t.$slots, "title-bar-left", {}, void 0, !0)]),
|
|
21
|
+
P("div", Ee, [q(t.$slots, "document-name", {}, void 0, !0), e.showMenuBar ? (W(), j(S, {
|
|
22
22
|
key: 0,
|
|
23
23
|
onAction: n[0] ||= (e) => t.$emit("menu-action", e)
|
|
24
|
-
})) :
|
|
25
|
-
|
|
26
|
-
])], !0),
|
|
24
|
+
})) : M("", !0)]),
|
|
25
|
+
P("div", De, [q(t.$slots, "title-bar-right", {}, void 0, !0)])
|
|
26
|
+
])], !0), q(t.$slots, "toolbar", {}, () => [I(C, ge(R(t.$attrs)), null, 16)], !0)]));
|
|
27
27
|
}
|
|
28
|
-
}), [["__scopeId", "data-v-
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
}), [["__scopeId", "data-v-f2023632"]]), ke = {}, Ae = { class: "docx-title-bar" }, je = { class: "docx-title-bar__left" }, Me = { class: "docx-title-bar__center" }, Ne = { class: "docx-title-bar__right" };
|
|
29
|
+
function Pe(e, t) {
|
|
30
|
+
return W(), N("div", Ae, [
|
|
31
|
+
P("div", je, [q(e.$slots, "left", {}, void 0, !0)]),
|
|
32
|
+
P("div", Me, [q(e.$slots, "default", {}, void 0, !0)]),
|
|
33
|
+
P("div", Ne, [q(e.$slots, "right", {}, void 0, !0)])
|
|
34
34
|
]);
|
|
35
35
|
}
|
|
36
|
-
var
|
|
36
|
+
var Fe = /* @__PURE__ */ w(ke, [["render", Pe], ["__scopeId", "data-v-ae11d49f"]]), Ie = ["title"], Le = {
|
|
37
37
|
key: 0,
|
|
38
38
|
class: "responsive-toolbar__overflow-menu"
|
|
39
|
-
},
|
|
39
|
+
}, Re = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
40
40
|
__name: "ResponsiveToolbar",
|
|
41
41
|
setup(e) {
|
|
42
|
-
let { t } = s(), n =
|
|
42
|
+
let { t } = s(), n = G(null), r = G(null), i = G(null), a = G(0), o = G(!1), c = null;
|
|
43
43
|
function l() {
|
|
44
44
|
let e = n.value, t = r.value;
|
|
45
45
|
if (!e || !t) return;
|
|
@@ -53,44 +53,67 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
53
53
|
let t = e.target;
|
|
54
54
|
i.value?.contains(t) || (o.value = !1);
|
|
55
55
|
}
|
|
56
|
-
return
|
|
56
|
+
return U(() => {
|
|
57
57
|
c = new ResizeObserver(() => {
|
|
58
|
-
|
|
59
|
-
}), n.value && c.observe(n.value),
|
|
60
|
-
}),
|
|
58
|
+
z(l);
|
|
59
|
+
}), n.value && c.observe(n.value), z(l), document.addEventListener("mousedown", u);
|
|
60
|
+
}), H(() => {
|
|
61
61
|
c?.disconnect(), document.removeEventListener("mousedown", u);
|
|
62
|
-
}), (e, s) => (
|
|
62
|
+
}), (e, s) => (W(), N("div", {
|
|
63
63
|
class: "responsive-toolbar",
|
|
64
64
|
ref_key: "containerRef",
|
|
65
65
|
ref: n
|
|
66
|
-
}, [
|
|
66
|
+
}, [P("div", {
|
|
67
67
|
class: "responsive-toolbar__items",
|
|
68
68
|
ref_key: "itemsRef",
|
|
69
69
|
ref: r
|
|
70
|
-
}, [
|
|
70
|
+
}, [q(e.$slots, "default", {}, void 0, !0)], 512), a.value > 0 ? (W(), N("div", {
|
|
71
71
|
key: 0,
|
|
72
72
|
class: "responsive-toolbar__overflow",
|
|
73
73
|
ref_key: "overflowRef",
|
|
74
74
|
ref: i
|
|
75
|
-
}, [
|
|
75
|
+
}, [P("button", {
|
|
76
76
|
class: "responsive-toolbar__overflow-btn",
|
|
77
|
-
onMousedown: s[0] ||=
|
|
78
|
-
title:
|
|
79
|
-
}, " ⋯ ", 40,
|
|
77
|
+
onMousedown: s[0] ||= Z((e) => o.value = !o.value, ["prevent"]),
|
|
78
|
+
title: ve(t)("formattingBar.moreItems", { count: a.value })
|
|
79
|
+
}, " ⋯ ", 40, Ie), o.value ? (W(), N("div", Le, [q(e.$slots, "overflow", {}, void 0, !0)])) : M("", !0)], 512)) : M("", !0)], 512));
|
|
80
80
|
}
|
|
81
|
-
}), [["__scopeId", "data-v-
|
|
81
|
+
}), [["__scopeId", "data-v-134de3f0"]]);
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/components/ui/fontPickerValue.ts
|
|
84
|
+
function Q(e) {
|
|
85
|
+
let t = e.trim();
|
|
86
|
+
if (!t) return "";
|
|
87
|
+
let n = null, r = "";
|
|
88
|
+
for (let e of t) {
|
|
89
|
+
if ((e === "\"" || e === "'") && n === null) {
|
|
90
|
+
n = e, r += e;
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (e === n) {
|
|
94
|
+
n = null, r += e;
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (e === "," && n === null) break;
|
|
98
|
+
r += e;
|
|
99
|
+
}
|
|
100
|
+
return r.trim().replace(/^['"]|['"]$/g, "");
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/components/ui/FontPicker.vue?vue&type=script&setup=true&lang.ts
|
|
104
|
+
var ze = ["value", "disabled"], Be = {
|
|
82
105
|
key: 0,
|
|
83
106
|
label: "Sans-serif"
|
|
84
|
-
},
|
|
107
|
+
}, Ve = ["value"], He = {
|
|
85
108
|
key: 1,
|
|
86
109
|
label: "Serif"
|
|
87
|
-
},
|
|
110
|
+
}, Ue = ["value"], We = {
|
|
88
111
|
key: 2,
|
|
89
112
|
label: "Monospace"
|
|
90
|
-
},
|
|
113
|
+
}, Ge = ["value"], Ke = {
|
|
91
114
|
key: 3,
|
|
92
115
|
label: "Other"
|
|
93
|
-
},
|
|
116
|
+
}, qe = ["value"], Je = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
94
117
|
__name: "FontPicker",
|
|
95
118
|
props: {
|
|
96
119
|
value: {},
|
|
@@ -169,7 +192,7 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
169
192
|
fontFamily: "Consolas, monospace",
|
|
170
193
|
category: "monospace"
|
|
171
194
|
}
|
|
172
|
-
], a =
|
|
195
|
+
], a = A(() => n.fonts ?? i), o = A(() => {
|
|
173
196
|
let e = {
|
|
174
197
|
"sans-serif": [],
|
|
175
198
|
serif: [],
|
|
@@ -178,45 +201,45 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
178
201
|
};
|
|
179
202
|
for (let t of a.value) e[t.category ?? "other"].push(t);
|
|
180
203
|
return e;
|
|
181
|
-
}), s =
|
|
204
|
+
}), s = A(() => n.value ? a.value.find((e) => e.fontFamily === n.value || e.name.toLowerCase() === n.value.toLowerCase() || Q(e.fontFamily).toLowerCase() === n.value.toLowerCase())?.name ?? n.value : n.placeholder);
|
|
182
205
|
function c(e) {
|
|
183
|
-
let t = e.target.value;
|
|
184
|
-
r("change",
|
|
206
|
+
let t = e.target.value, n = a.value.find((e) => e.name === t);
|
|
207
|
+
r("change", n ? Q(n.fontFamily) || n.name : t);
|
|
185
208
|
}
|
|
186
|
-
return (t, n) => (
|
|
187
|
-
class:
|
|
209
|
+
return (t, n) => (W(), N("select", {
|
|
210
|
+
class: B(["docx-font-picker", e.className]),
|
|
188
211
|
value: s.value,
|
|
189
212
|
disabled: e.disabled,
|
|
190
213
|
"aria-label": "Font family",
|
|
191
214
|
onChange: c
|
|
192
215
|
}, [
|
|
193
|
-
o.value["sans-serif"].length ? (
|
|
216
|
+
o.value["sans-serif"].length ? (W(), N("optgroup", Be, [(W(!0), N(O, null, K(o.value["sans-serif"], (t) => (W(), N("option", {
|
|
194
217
|
key: t.name,
|
|
195
218
|
value: t.name,
|
|
196
|
-
style:
|
|
197
|
-
},
|
|
198
|
-
o.value.serif.length ? (
|
|
219
|
+
style: V(e.showPreview ? { fontFamily: t.fontFamily } : void 0)
|
|
220
|
+
}, J(t.name), 13, Ve))), 128))])) : M("", !0),
|
|
221
|
+
o.value.serif.length ? (W(), N("optgroup", He, [(W(!0), N(O, null, K(o.value.serif, (t) => (W(), N("option", {
|
|
199
222
|
key: t.name,
|
|
200
223
|
value: t.name,
|
|
201
|
-
style:
|
|
202
|
-
},
|
|
203
|
-
o.value.monospace.length ? (
|
|
224
|
+
style: V(e.showPreview ? { fontFamily: t.fontFamily } : void 0)
|
|
225
|
+
}, J(t.name), 13, Ue))), 128))])) : M("", !0),
|
|
226
|
+
o.value.monospace.length ? (W(), N("optgroup", We, [(W(!0), N(O, null, K(o.value.monospace, (t) => (W(), N("option", {
|
|
204
227
|
key: t.name,
|
|
205
228
|
value: t.name,
|
|
206
|
-
style:
|
|
207
|
-
},
|
|
208
|
-
o.value.other.length ? (
|
|
229
|
+
style: V(e.showPreview ? { fontFamily: t.fontFamily } : void 0)
|
|
230
|
+
}, J(t.name), 13, Ge))), 128))])) : M("", !0),
|
|
231
|
+
o.value.other.length ? (W(), N("optgroup", Ke, [(W(!0), N(O, null, K(o.value.other, (t) => (W(), N("option", {
|
|
209
232
|
key: t.name,
|
|
210
233
|
value: t.name,
|
|
211
|
-
style:
|
|
212
|
-
},
|
|
213
|
-
], 42,
|
|
234
|
+
style: V(e.showPreview ? { fontFamily: t.fontFamily } : void 0)
|
|
235
|
+
}, J(t.name), 13, qe))), 128))])) : M("", !0)
|
|
236
|
+
], 42, ze));
|
|
214
237
|
}
|
|
215
|
-
}), [["__scopeId", "data-v-
|
|
238
|
+
}), [["__scopeId", "data-v-30a12967"]]), Ye = { class: "docx-font-size" }, Xe = ["disabled"], Ze = [
|
|
216
239
|
"value",
|
|
217
240
|
"disabled",
|
|
218
241
|
"placeholder"
|
|
219
|
-
],
|
|
242
|
+
], Qe = ["disabled"], $e = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
220
243
|
__name: "FontSizePicker",
|
|
221
244
|
props: {
|
|
222
245
|
value: {},
|
|
@@ -246,7 +269,7 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
246
269
|
36,
|
|
247
270
|
48,
|
|
248
271
|
72
|
|
249
|
-
], a =
|
|
272
|
+
], a = A(() => n.sizes ?? i), o = A(() => n.value ?? parseInt(n.placeholder, 10) ?? 11), s = A(() => n.value === void 0 ? n.placeholder : String(n.value));
|
|
250
273
|
function c(e) {
|
|
251
274
|
return a.value.find((t) => t > e) ?? Math.min(e + 1, n.maxSize);
|
|
252
275
|
}
|
|
@@ -263,41 +286,41 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
263
286
|
let t = parseFloat(e.target.value);
|
|
264
287
|
!isNaN(t) && t >= n.minSize && t <= n.maxSize && r("change", Math.round(t * 2) / 2);
|
|
265
288
|
}
|
|
266
|
-
return (t, n) => (
|
|
267
|
-
|
|
289
|
+
return (t, n) => (W(), N("div", Ye, [
|
|
290
|
+
P("button", {
|
|
268
291
|
type: "button",
|
|
269
292
|
class: "docx-font-size__btn",
|
|
270
293
|
disabled: e.disabled || o.value <= e.minSize,
|
|
271
294
|
title: "Decrease font size",
|
|
272
|
-
onClick:
|
|
273
|
-
}, "−", 8,
|
|
274
|
-
|
|
295
|
+
onClick: Z(u, ["prevent"])
|
|
296
|
+
}, "−", 8, Xe),
|
|
297
|
+
P("input", {
|
|
275
298
|
class: "docx-font-size__input",
|
|
276
299
|
type: "text",
|
|
277
300
|
value: s.value,
|
|
278
301
|
disabled: e.disabled,
|
|
279
302
|
placeholder: e.placeholder,
|
|
280
303
|
onKeydown: [
|
|
281
|
-
n[0] ||= Z(
|
|
304
|
+
n[0] ||= X(Z((e) => {
|
|
282
305
|
u(), e.stopPropagation();
|
|
283
306
|
}, ["prevent"]), ["up"]),
|
|
284
|
-
n[1] ||= Z(
|
|
307
|
+
n[1] ||= X(Z((e) => {
|
|
285
308
|
d(), e.stopPropagation();
|
|
286
309
|
}, ["prevent"]), ["down"]),
|
|
287
|
-
n[2] ||= Z(
|
|
310
|
+
n[2] ||= X(Z((e) => f(e), ["prevent"]), ["enter"])
|
|
288
311
|
],
|
|
289
312
|
onBlur: n[3] ||= (e) => f(e)
|
|
290
|
-
}, null, 40,
|
|
291
|
-
|
|
313
|
+
}, null, 40, Ze),
|
|
314
|
+
P("button", {
|
|
292
315
|
type: "button",
|
|
293
316
|
class: "docx-font-size__btn",
|
|
294
317
|
disabled: e.disabled || o.value >= e.maxSize,
|
|
295
318
|
title: "Increase font size",
|
|
296
|
-
onClick:
|
|
297
|
-
}, "+", 8,
|
|
319
|
+
onClick: Z(d, ["prevent"])
|
|
320
|
+
}, "+", 8, Qe)
|
|
298
321
|
]));
|
|
299
322
|
}
|
|
300
|
-
}), [["__scopeId", "data-v-
|
|
323
|
+
}), [["__scopeId", "data-v-593c3ec6"]]), et = ["value", "disabled"], tt = ["value"], nt = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
301
324
|
__name: "LineSpacingPicker",
|
|
302
325
|
props: {
|
|
303
326
|
value: {},
|
|
@@ -331,23 +354,23 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
331
354
|
value: 2,
|
|
332
355
|
twipsValue: 480
|
|
333
356
|
}
|
|
334
|
-
], a =
|
|
357
|
+
], a = A(() => n.options ?? i), o = A(() => n.value ?? a.value[0].twipsValue);
|
|
335
358
|
function s(e) {
|
|
336
359
|
let t = parseInt(e.target.value, 10);
|
|
337
360
|
isNaN(t) || r("change", t);
|
|
338
361
|
}
|
|
339
|
-
return (t, n) => (
|
|
340
|
-
class:
|
|
362
|
+
return (t, n) => (W(), N("select", {
|
|
363
|
+
class: B(["docx-line-spacing", e.className]),
|
|
341
364
|
value: String(o.value),
|
|
342
365
|
disabled: e.disabled,
|
|
343
366
|
"aria-label": "Line spacing",
|
|
344
367
|
onChange: s
|
|
345
|
-
}, [(
|
|
368
|
+
}, [(W(!0), N(O, null, K(a.value, (e) => (W(), N("option", {
|
|
346
369
|
key: e.twipsValue,
|
|
347
370
|
value: String(e.twipsValue)
|
|
348
|
-
},
|
|
371
|
+
}, J(e.label), 9, tt))), 128))], 42, et));
|
|
349
372
|
}
|
|
350
|
-
}), [["__scopeId", "data-v-
|
|
373
|
+
}), [["__scopeId", "data-v-8cd813f2"]]), rt = ["value", "disabled"], it = ["value"], at = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
351
374
|
__name: "StylePicker",
|
|
352
375
|
props: {
|
|
353
376
|
value: {},
|
|
@@ -385,27 +408,27 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
385
408
|
styleId: "Heading3",
|
|
386
409
|
name: "Heading 3"
|
|
387
410
|
}
|
|
388
|
-
], a =
|
|
411
|
+
], a = A(() => n.styles ?? i);
|
|
389
412
|
function o(e) {
|
|
390
413
|
r("change", e.target.value);
|
|
391
414
|
}
|
|
392
|
-
return (t, n) => (
|
|
393
|
-
class:
|
|
415
|
+
return (t, n) => (W(), N("select", {
|
|
416
|
+
class: B(["docx-style-picker", e.className]),
|
|
394
417
|
value: e.value ?? "Normal",
|
|
395
418
|
disabled: e.disabled,
|
|
396
419
|
"aria-label": "Paragraph style",
|
|
397
420
|
onChange: o
|
|
398
|
-
}, [(
|
|
421
|
+
}, [(W(!0), N(O, null, K(a.value, (e) => (W(), N("option", {
|
|
399
422
|
key: e.styleId,
|
|
400
423
|
value: e.styleId
|
|
401
|
-
},
|
|
424
|
+
}, J(e.name), 9, it))), 128))], 42, rt));
|
|
402
425
|
}
|
|
403
|
-
}), [["__scopeId", "data-v-
|
|
426
|
+
}), [["__scopeId", "data-v-dce7e34a"]]), ot = [
|
|
404
427
|
"disabled",
|
|
405
428
|
"title",
|
|
406
429
|
"aria-expanded",
|
|
407
430
|
"onClick"
|
|
408
|
-
],
|
|
431
|
+
], st = { class: "docx-align__panel" }, ct = ["title", "onClick"], lt = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
409
432
|
__name: "AlignmentButtons",
|
|
410
433
|
props: {
|
|
411
434
|
value: { default: "left" },
|
|
@@ -416,7 +439,7 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
416
439
|
},
|
|
417
440
|
emits: ["change"],
|
|
418
441
|
setup(e, { emit: n }) {
|
|
419
|
-
let r = e, i = n, a =
|
|
442
|
+
let r = e, i = n, a = G(!1), o = [
|
|
420
443
|
{
|
|
421
444
|
value: "left",
|
|
422
445
|
label: "Align left",
|
|
@@ -441,44 +464,44 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
441
464
|
icon: "format_align_justify",
|
|
442
465
|
shortcut: "Ctrl+J"
|
|
443
466
|
}
|
|
444
|
-
], s =
|
|
467
|
+
], s = A(() => o.find((e) => e.value === r.value)?.icon ?? "format_align_left"), c = A(() => o.find((e) => e.value === r.value)?.label ?? "Left");
|
|
445
468
|
function l(e) {
|
|
446
469
|
i("change", e), a.value = !1;
|
|
447
470
|
}
|
|
448
|
-
return (n, r) => (
|
|
471
|
+
return (n, r) => (W(), j(u, {
|
|
449
472
|
open: a.value,
|
|
450
473
|
"onUpdate:open": r[0] ||= (e) => a.value = e,
|
|
451
474
|
onClose: r[1] ||= (e) => a.value = !1
|
|
452
475
|
}, {
|
|
453
|
-
trigger:
|
|
476
|
+
trigger: Y(({ toggle: n }) => [P("button", {
|
|
454
477
|
type: "button",
|
|
455
|
-
class:
|
|
478
|
+
class: B(["docx-align__btn", { "docx-align__btn--open": a.value }]),
|
|
456
479
|
disabled: e.disabled,
|
|
457
480
|
title: `Alignment: ${c.value}`,
|
|
458
481
|
"aria-expanded": a.value,
|
|
459
482
|
"aria-haspopup": "true",
|
|
460
|
-
onClick:
|
|
461
|
-
}, [
|
|
483
|
+
onClick: Z(n, ["prevent"])
|
|
484
|
+
}, [I(t, {
|
|
462
485
|
name: s.value,
|
|
463
486
|
size: 20
|
|
464
|
-
}, null, 8, ["name"]),
|
|
487
|
+
}, null, 8, ["name"]), I(t, {
|
|
465
488
|
name: "arrow_drop_down",
|
|
466
489
|
size: 14
|
|
467
|
-
})], 10,
|
|
468
|
-
panel:
|
|
490
|
+
})], 10, ot)]),
|
|
491
|
+
panel: Y(() => [P("div", st, [(W(), N(O, null, K(o, (n) => P("button", {
|
|
469
492
|
key: n.value,
|
|
470
493
|
type: "button",
|
|
471
|
-
class:
|
|
494
|
+
class: B(["docx-align__option", { "docx-align__option--active": e.value === n.value }]),
|
|
472
495
|
title: `${n.label} (${n.shortcut})`,
|
|
473
|
-
onClick:
|
|
474
|
-
}, [
|
|
496
|
+
onClick: Z((e) => l(n.value), ["prevent"])
|
|
497
|
+
}, [I(t, {
|
|
475
498
|
name: n.icon,
|
|
476
499
|
size: 20
|
|
477
|
-
}, null, 8, ["name"])], 10,
|
|
500
|
+
}, null, 8, ["name"])], 10, ct)), 64))])]),
|
|
478
501
|
_: 1
|
|
479
502
|
}, 8, ["open"]));
|
|
480
503
|
}
|
|
481
|
-
}), [["__scopeId", "data-v-
|
|
504
|
+
}), [["__scopeId", "data-v-412e177a"]]), ut = { class: "docx-list-btns" }, dt = ["disabled"], ft = ["disabled"], pt = ["disabled"], mt = ["disabled"], ht = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
482
505
|
__name: "ListButtons",
|
|
483
506
|
props: {
|
|
484
507
|
listState: {},
|
|
@@ -502,53 +525,53 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
502
525
|
"outdent"
|
|
503
526
|
],
|
|
504
527
|
setup(e) {
|
|
505
|
-
return (n, r) => (
|
|
506
|
-
|
|
528
|
+
return (n, r) => (W(), N("span", ut, [
|
|
529
|
+
P("button", {
|
|
507
530
|
type: "button",
|
|
508
|
-
class:
|
|
531
|
+
class: B(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.isInList && e.listState?.type === "bullet" }]),
|
|
509
532
|
disabled: e.disabled,
|
|
510
533
|
title: "Bullet list",
|
|
511
|
-
onClick: r[0] ||=
|
|
512
|
-
}, [
|
|
534
|
+
onClick: r[0] ||= Z((e) => n.$emit("bullet-list"), ["prevent"])
|
|
535
|
+
}, [I(t, {
|
|
513
536
|
name: "format_list_bulleted",
|
|
514
537
|
size: 20
|
|
515
|
-
})], 10,
|
|
516
|
-
|
|
538
|
+
})], 10, dt),
|
|
539
|
+
P("button", {
|
|
517
540
|
type: "button",
|
|
518
|
-
class:
|
|
541
|
+
class: B(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.isInList && e.listState?.type === "numbered" }]),
|
|
519
542
|
disabled: e.disabled,
|
|
520
543
|
title: "Numbered list",
|
|
521
|
-
onClick: r[1] ||=
|
|
522
|
-
}, [
|
|
544
|
+
onClick: r[1] ||= Z((e) => n.$emit("numbered-list"), ["prevent"])
|
|
545
|
+
}, [I(t, {
|
|
523
546
|
name: "format_list_numbered",
|
|
524
547
|
size: 20
|
|
525
|
-
})], 10,
|
|
526
|
-
e.showIndentButtons ? (
|
|
548
|
+
})], 10, ft),
|
|
549
|
+
e.showIndentButtons ? (W(), N(O, { key: 0 }, [P("button", {
|
|
527
550
|
type: "button",
|
|
528
551
|
class: "docx-list-btns__btn",
|
|
529
552
|
disabled: e.disabled || !e.canOutdent,
|
|
530
553
|
title: "Decrease indent",
|
|
531
|
-
onClick: r[2] ||=
|
|
532
|
-
}, [
|
|
554
|
+
onClick: r[2] ||= Z((e) => n.$emit("outdent"), ["prevent"])
|
|
555
|
+
}, [I(t, {
|
|
533
556
|
name: "format_indent_decrease",
|
|
534
557
|
size: 20
|
|
535
|
-
})], 8,
|
|
558
|
+
})], 8, pt), P("button", {
|
|
536
559
|
type: "button",
|
|
537
560
|
class: "docx-list-btns__btn",
|
|
538
561
|
disabled: e.disabled,
|
|
539
562
|
title: "Increase indent",
|
|
540
|
-
onClick: r[3] ||=
|
|
541
|
-
}, [
|
|
563
|
+
onClick: r[3] ||= Z((e) => n.$emit("indent"), ["prevent"])
|
|
564
|
+
}, [I(t, {
|
|
542
565
|
name: "format_indent_increase",
|
|
543
566
|
size: 20
|
|
544
|
-
})], 8,
|
|
567
|
+
})], 8, mt)], 64)) : M("", !0)
|
|
545
568
|
]));
|
|
546
569
|
}
|
|
547
|
-
}), [["__scopeId", "data-v-
|
|
570
|
+
}), [["__scopeId", "data-v-1b9a4dcd"]]), gt = [
|
|
548
571
|
"value",
|
|
549
572
|
"disabled",
|
|
550
573
|
"aria-label"
|
|
551
|
-
],
|
|
574
|
+
], _t = ["value"], vt = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
552
575
|
__name: "ZoomControl",
|
|
553
576
|
props: {
|
|
554
577
|
value: { default: 1 },
|
|
@@ -590,7 +613,7 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
590
613
|
value: 2,
|
|
591
614
|
label: "200%"
|
|
592
615
|
}
|
|
593
|
-
], a =
|
|
616
|
+
], a = A(() => n.levels ?? i), o = A(() => {
|
|
594
617
|
let e = a.value.find((e) => Math.abs(e.value - n.value) < .001);
|
|
595
618
|
return e ? e.label : `${Math.round(n.value * 100)}%`;
|
|
596
619
|
});
|
|
@@ -598,8 +621,8 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
598
621
|
let t = parseFloat(e.target.value);
|
|
599
622
|
isNaN(t) || r("change", t);
|
|
600
623
|
}
|
|
601
|
-
return (t, n) => (
|
|
602
|
-
class:
|
|
624
|
+
return (t, n) => (W(), N("select", {
|
|
625
|
+
class: B(["docx-zoom-control", {
|
|
603
626
|
"docx-zoom-control--compact": e.compact,
|
|
604
627
|
[e.className ?? ""]: !!e.className
|
|
605
628
|
}]),
|
|
@@ -607,12 +630,12 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
607
630
|
disabled: e.disabled,
|
|
608
631
|
"aria-label": `Zoom: ${o.value}`,
|
|
609
632
|
onChange: s
|
|
610
|
-
}, [(
|
|
633
|
+
}, [(W(!0), N(O, null, K(a.value, (e) => (W(), N("option", {
|
|
611
634
|
key: e.value,
|
|
612
635
|
value: e.value
|
|
613
|
-
},
|
|
636
|
+
}, J(e.label), 9, _t))), 128))], 42, gt));
|
|
614
637
|
}
|
|
615
|
-
}), [["__scopeId", "data-v-
|
|
638
|
+
}), [["__scopeId", "data-v-734f61aa"]]), yt = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
616
639
|
__name: "Tooltip",
|
|
617
640
|
props: {
|
|
618
641
|
content: {},
|
|
@@ -620,10 +643,10 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
620
643
|
delayMs: { default: 400 }
|
|
621
644
|
},
|
|
622
645
|
setup(e) {
|
|
623
|
-
let t = e, n =
|
|
646
|
+
let t = e, n = G(!1), r = G({
|
|
624
647
|
x: 0,
|
|
625
648
|
y: 0
|
|
626
|
-
}), i =
|
|
649
|
+
}), i = G(null), a = null;
|
|
627
650
|
function o() {
|
|
628
651
|
a = setTimeout(() => {
|
|
629
652
|
let e = i.value;
|
|
@@ -640,36 +663,36 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
640
663
|
function s() {
|
|
641
664
|
a &&= (clearTimeout(a), null), n.value = !1;
|
|
642
665
|
}
|
|
643
|
-
|
|
666
|
+
H(() => {
|
|
644
667
|
a && clearTimeout(a);
|
|
645
668
|
});
|
|
646
|
-
let c =
|
|
669
|
+
let c = A(() => ({
|
|
647
670
|
left: r.value.x + "px",
|
|
648
671
|
top: r.value.y + "px",
|
|
649
672
|
transform: t.side === "top" ? "translate(-50%, -100%)" : t.side === "bottom" ? "translate(-50%, 0)" : void 0
|
|
650
673
|
}));
|
|
651
|
-
return (t, r) => (
|
|
674
|
+
return (t, r) => (W(), N(O, null, [P("span", {
|
|
652
675
|
ref_key: "triggerRef",
|
|
653
676
|
ref: i,
|
|
654
677
|
class: "docx-tooltip__trigger",
|
|
655
678
|
onMouseenter: o,
|
|
656
679
|
onMouseleave: s
|
|
657
|
-
}, [
|
|
680
|
+
}, [q(t.$slots, "default", {}, void 0, !0)], 544), (W(), j(k, { to: "body" }, [n.value ? (W(), N("div", {
|
|
658
681
|
key: 0,
|
|
659
682
|
class: "docx-tooltip",
|
|
660
|
-
style:
|
|
661
|
-
},
|
|
683
|
+
style: V(c.value)
|
|
684
|
+
}, J(e.content), 5)) : M("", !0)]))], 64));
|
|
662
685
|
}
|
|
663
|
-
}), [["__scopeId", "data-v-
|
|
686
|
+
}), [["__scopeId", "data-v-9e7ae410"]]), bt = ["aria-label"], xt = {
|
|
664
687
|
key: 0,
|
|
665
688
|
class: "docx-loading__spinner"
|
|
666
|
-
},
|
|
689
|
+
}, St = {
|
|
667
690
|
key: 1,
|
|
668
691
|
class: "docx-loading__bar"
|
|
669
|
-
},
|
|
692
|
+
}, Ct = {
|
|
670
693
|
key: 2,
|
|
671
694
|
class: "docx-loading__message"
|
|
672
|
-
},
|
|
695
|
+
}, wt = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
673
696
|
__name: "LoadingIndicator",
|
|
674
697
|
props: {
|
|
675
698
|
isLoading: { type: Boolean },
|
|
@@ -683,9 +706,9 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
683
706
|
progress: { default: null }
|
|
684
707
|
},
|
|
685
708
|
setup(e) {
|
|
686
|
-
return (t, n) => e.isLoading ? (
|
|
709
|
+
return (t, n) => e.isLoading ? (W(), N("div", {
|
|
687
710
|
key: 0,
|
|
688
|
-
class:
|
|
711
|
+
class: B([
|
|
689
712
|
"docx-loading",
|
|
690
713
|
`docx-loading--${e.variant}`,
|
|
691
714
|
`docx-loading--${e.size}`,
|
|
@@ -693,12 +716,12 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
693
716
|
]),
|
|
694
717
|
role: "status",
|
|
695
718
|
"aria-label": e.message
|
|
696
|
-
}, [e.variant === "spinner" ? (
|
|
719
|
+
}, [e.variant === "spinner" ? (W(), N("span", xt)) : e.variant === "bar" || e.variant === "progress" ? (W(), N("div", St, [P("div", {
|
|
697
720
|
class: "docx-loading__bar-fill",
|
|
698
|
-
style:
|
|
699
|
-
}, null, 4)])) :
|
|
721
|
+
style: V(e.variant === "progress" && e.progress != null ? { width: e.progress + "%" } : void 0)
|
|
722
|
+
}, null, 4)])) : M("", !0), e.message ? (W(), N("span", Ct, J(e.message), 1)) : M("", !0)], 10, bt)) : M("", !0);
|
|
700
723
|
}
|
|
701
|
-
}), [["__scopeId", "data-v-
|
|
724
|
+
}), [["__scopeId", "data-v-5ffccb99"]]), Tt = ["disabled"], Et = "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", Dt = /* @__PURE__ */ L({
|
|
702
725
|
__name: "Button",
|
|
703
726
|
props: {
|
|
704
727
|
variant: { default: "default" },
|
|
@@ -724,24 +747,24 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
724
747
|
lg: "h-11 rounded-md px-8",
|
|
725
748
|
icon: "h-9 w-9",
|
|
726
749
|
"icon-sm": "h-7 w-7"
|
|
727
|
-
}, i =
|
|
728
|
-
|
|
750
|
+
}, i = A(() => [
|
|
751
|
+
Et,
|
|
729
752
|
n[t.variant],
|
|
730
753
|
r[t.size],
|
|
731
754
|
t.className
|
|
732
755
|
].filter(Boolean).join(" "));
|
|
733
|
-
return (t, n) => (
|
|
734
|
-
class:
|
|
756
|
+
return (t, n) => (W(), N("button", {
|
|
757
|
+
class: B(i.value),
|
|
735
758
|
disabled: e.disabled,
|
|
736
759
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
737
|
-
}, [
|
|
760
|
+
}, [q(t.$slots, "default")], 10, Tt));
|
|
738
761
|
}
|
|
739
|
-
}),
|
|
762
|
+
}), Ot = [
|
|
740
763
|
"disabled",
|
|
741
764
|
"aria-expanded",
|
|
742
765
|
"title",
|
|
743
766
|
"onClick"
|
|
744
|
-
],
|
|
767
|
+
], kt = { class: "docx-table-grid__panel" }, At = { class: "docx-table-grid__label" }, jt = ["onMouseenter", "onClick"], Mt = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
745
768
|
__name: "TableGridPicker",
|
|
746
769
|
props: {
|
|
747
770
|
disabled: {
|
|
@@ -754,10 +777,10 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
754
777
|
},
|
|
755
778
|
emits: ["insert"],
|
|
756
779
|
setup(e, { emit: n }) {
|
|
757
|
-
let r = e, i = n, a =
|
|
780
|
+
let r = e, i = n, a = G(!1), o = G({
|
|
758
781
|
rows: 1,
|
|
759
782
|
cols: 1
|
|
760
|
-
}), s =
|
|
783
|
+
}), s = A(() => {
|
|
761
784
|
let e = [];
|
|
762
785
|
for (let t = 1; t <= r.gridRows; t++) for (let n = 1; n <= r.gridColumns; n++) e.push({
|
|
763
786
|
r: t,
|
|
@@ -774,43 +797,43 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
774
797
|
cols: 1
|
|
775
798
|
};
|
|
776
799
|
}
|
|
777
|
-
return (n, r) => (
|
|
800
|
+
return (n, r) => (W(), j(u, {
|
|
778
801
|
open: a.value,
|
|
779
802
|
"onUpdate:open": r[0] ||= (e) => a.value = e,
|
|
780
803
|
onClose: l
|
|
781
804
|
}, {
|
|
782
|
-
trigger:
|
|
805
|
+
trigger: Y(({ toggle: n }) => [P("button", {
|
|
783
806
|
type: "button",
|
|
784
807
|
class: "docx-table-grid__btn",
|
|
785
808
|
disabled: e.disabled,
|
|
786
809
|
"aria-expanded": a.value,
|
|
787
810
|
"aria-haspopup": "grid",
|
|
788
811
|
title: e.tooltip,
|
|
789
|
-
onClick:
|
|
790
|
-
}, [
|
|
812
|
+
onClick: Z(n, ["prevent"])
|
|
813
|
+
}, [I(t, {
|
|
791
814
|
name: "grid_on",
|
|
792
815
|
size: 20
|
|
793
|
-
})], 8,
|
|
794
|
-
panel:
|
|
816
|
+
})], 8, Ot)]),
|
|
817
|
+
panel: Y(() => [P("div", kt, [P("div", At, J(o.value.rows) + " × " + J(o.value.cols), 1), P("div", {
|
|
795
818
|
class: "docx-table-grid__grid",
|
|
796
|
-
style:
|
|
797
|
-
}, [(
|
|
819
|
+
style: V({ gridTemplateColumns: `repeat(${e.gridColumns}, 18px)` })
|
|
820
|
+
}, [(W(!0), N(O, null, K(s.value, (e) => (W(), N("button", {
|
|
798
821
|
key: `${e.r}-${e.c}`,
|
|
799
|
-
class:
|
|
822
|
+
class: B(["docx-table-grid__cell", { "docx-table-grid__cell--active": e.r <= o.value.rows && e.c <= o.value.cols }]),
|
|
800
823
|
onMouseenter: (t) => o.value = {
|
|
801
824
|
rows: e.r,
|
|
802
825
|
cols: e.c
|
|
803
826
|
},
|
|
804
|
-
onClick:
|
|
805
|
-
}, null, 42,
|
|
827
|
+
onClick: Z((t) => c(e.r, e.c), ["prevent"])
|
|
828
|
+
}, null, 42, jt))), 128))], 4)])]),
|
|
806
829
|
_: 1
|
|
807
830
|
}, 8, ["open"]));
|
|
808
831
|
}
|
|
809
|
-
}), [["__scopeId", "data-v-
|
|
832
|
+
}), [["__scopeId", "data-v-34f6875c"]]), Nt = { class: "docx-table-insert" }, $ = [
|
|
810
833
|
"disabled",
|
|
811
834
|
"title",
|
|
812
835
|
"onClick"
|
|
813
|
-
],
|
|
836
|
+
], Pt = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
814
837
|
__name: "TableInsertButtons",
|
|
815
838
|
props: { disabled: { type: Boolean } },
|
|
816
839
|
emits: ["action"],
|
|
@@ -837,19 +860,19 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
837
860
|
label: "Insert column right"
|
|
838
861
|
}
|
|
839
862
|
];
|
|
840
|
-
return (n, a) => (
|
|
863
|
+
return (n, a) => (W(), N("span", Nt, [(W(), N(O, null, K(i, (n) => P("button", {
|
|
841
864
|
key: n.action,
|
|
842
865
|
type: "button",
|
|
843
866
|
class: "docx-table-insert__btn",
|
|
844
867
|
disabled: e.disabled,
|
|
845
868
|
title: n.label,
|
|
846
|
-
onClick:
|
|
847
|
-
}, [
|
|
869
|
+
onClick: Z((e) => r("action", n.action), ["prevent"])
|
|
870
|
+
}, [I(t, {
|
|
848
871
|
name: n.icon,
|
|
849
872
|
size: 20
|
|
850
|
-
}, null, 8, ["name"])], 8,
|
|
873
|
+
}, null, 8, ["name"])], 8, $)), 64))]));
|
|
851
874
|
}
|
|
852
|
-
}), [["__scopeId", "data-v-
|
|
875
|
+
}), [["__scopeId", "data-v-a11c0f43"]]), Ft = ["disabled", "title"], It = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
853
876
|
__name: "TableMergeButton",
|
|
854
877
|
props: {
|
|
855
878
|
canSplit: { type: Boolean },
|
|
@@ -858,21 +881,21 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
858
881
|
emits: ["action"],
|
|
859
882
|
setup(e, { emit: n }) {
|
|
860
883
|
let r = n;
|
|
861
|
-
return (n, i) => (
|
|
884
|
+
return (n, i) => (W(), N("button", {
|
|
862
885
|
type: "button",
|
|
863
886
|
class: "docx-table-merge",
|
|
864
887
|
disabled: e.disabled,
|
|
865
888
|
title: e.canSplit ? "Split cells" : "Merge cells",
|
|
866
|
-
onClick: i[0] ||=
|
|
867
|
-
}, [
|
|
889
|
+
onClick: i[0] ||= Z((t) => r("action", e.canSplit ? "splitCells" : "mergeCells"), ["prevent"])
|
|
890
|
+
}, [I(t, {
|
|
868
891
|
name: e.canSplit ? "call_split" : "call_merge",
|
|
869
892
|
size: 20
|
|
870
|
-
}, null, 8, ["name"])], 8,
|
|
893
|
+
}, null, 8, ["name"])], 8, Ft));
|
|
871
894
|
}
|
|
872
|
-
}), [["__scopeId", "data-v-
|
|
895
|
+
}), [["__scopeId", "data-v-467e6c3e"]]), Lt = ["disabled", "title"], Rt = {
|
|
873
896
|
key: 0,
|
|
874
897
|
class: "print-btn__icon"
|
|
875
|
-
},
|
|
898
|
+
}, zt = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
876
899
|
__name: "PrintButton",
|
|
877
900
|
props: {
|
|
878
901
|
disabled: {
|
|
@@ -891,31 +914,31 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
891
914
|
function i() {
|
|
892
915
|
n.disabled || (r("print"), window.print());
|
|
893
916
|
}
|
|
894
|
-
return (t, n) => (
|
|
917
|
+
return (t, n) => (W(), N("button", {
|
|
895
918
|
class: "print-btn",
|
|
896
919
|
disabled: e.disabled,
|
|
897
920
|
title: e.label,
|
|
898
|
-
onMousedown:
|
|
899
|
-
}, [
|
|
921
|
+
onMousedown: Z(i, ["prevent"])
|
|
922
|
+
}, [F(J(e.compact ? "" : e.label) + " ", 1), e.compact ? (W(), N("span", Rt, "🖨")) : M("", !0)], 40, Lt));
|
|
900
923
|
}
|
|
901
|
-
}), [["__scopeId", "data-v-
|
|
924
|
+
}), [["__scopeId", "data-v-3e413c06"]]), Bt = "\n@media print {\n body * { visibility: hidden; }\n .docx-print-pages, .docx-print-pages * { visibility: visible; }\n .docx-print-pages { position: absolute; left: 0; top: 0; }\n .docx-print-page {\n box-shadow: none !important;\n margin: 0 !important;\n page-break-after: always;\n page-break-inside: avoid;\n }\n img { max-width: 100%; page-break-inside: avoid; }\n table, tr { page-break-inside: avoid; }\n h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }\n p { orphans: 3; widows: 3; }\n}\n@page { margin: 0; size: auto; }\n", Vt = /* @__PURE__ */ L({
|
|
902
925
|
__name: "PrintPreview",
|
|
903
926
|
setup(e) {
|
|
904
|
-
return (e, t) => (
|
|
905
|
-
default:
|
|
927
|
+
return (e, t) => (W(), j(_e("style"), null, {
|
|
928
|
+
default: Y(() => [F(J(Bt))]),
|
|
906
929
|
_: 1
|
|
907
930
|
}));
|
|
908
931
|
}
|
|
909
|
-
}),
|
|
932
|
+
}), Ht = ["title"], Ut = {
|
|
910
933
|
key: 0,
|
|
911
934
|
class: "unsaved-indicator__dot"
|
|
912
|
-
},
|
|
935
|
+
}, Wt = {
|
|
913
936
|
key: 1,
|
|
914
937
|
class: "unsaved-indicator__badge"
|
|
915
|
-
},
|
|
938
|
+
}, Gt = {
|
|
916
939
|
key: 2,
|
|
917
940
|
class: "unsaved-indicator__text"
|
|
918
|
-
},
|
|
941
|
+
}, Kt = /* @__PURE__ */ w(/* @__PURE__ */ L({
|
|
919
942
|
__name: "UnsavedIndicator",
|
|
920
943
|
props: {
|
|
921
944
|
currentState: {},
|
|
@@ -928,8 +951,8 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
928
951
|
title: { default: "You have unsaved changes" }
|
|
929
952
|
},
|
|
930
953
|
setup(e, { expose: t }) {
|
|
931
|
-
let n = e, r =
|
|
932
|
-
|
|
954
|
+
let n = e, r = G(!1), i = G(0), a = null;
|
|
955
|
+
ye(() => n.currentState, (e) => {
|
|
933
956
|
if (e !== void 0) {
|
|
934
957
|
if (a === null) {
|
|
935
958
|
a = e;
|
|
@@ -944,20 +967,20 @@ var Pe = /* @__PURE__ */ w(Oe, [["render", Ne], ["__scopeId", "data-v-53d684ff"]
|
|
|
944
967
|
function s(e) {
|
|
945
968
|
r.value && n.warnOnUnload && (e.preventDefault(), e.returnValue = "");
|
|
946
969
|
}
|
|
947
|
-
return
|
|
970
|
+
return U(() => {
|
|
948
971
|
window.addEventListener("beforeunload", s);
|
|
949
|
-
}),
|
|
972
|
+
}), H(() => {
|
|
950
973
|
window.removeEventListener("beforeunload", s);
|
|
951
974
|
}), t({
|
|
952
975
|
hasUnsavedChanges: r,
|
|
953
976
|
changeCount: i,
|
|
954
977
|
markAsSaved: o
|
|
955
|
-
}), (t, n) => r.value ? (
|
|
978
|
+
}), (t, n) => r.value ? (W(), N("span", {
|
|
956
979
|
key: 0,
|
|
957
|
-
class:
|
|
980
|
+
class: B(["unsaved-indicator", `unsaved-indicator--${e.variant}`]),
|
|
958
981
|
title: e.title
|
|
959
|
-
}, [e.variant === "dot" ? (
|
|
982
|
+
}, [e.variant === "dot" ? (W(), N("span", Ut)) : e.variant === "badge" ? (W(), N("span", Wt, J(i.value), 1)) : (W(), N("span", Gt, J(e.label), 1))], 10, Ht)) : M("", !0);
|
|
960
983
|
}
|
|
961
|
-
}), [["__scopeId", "data-v-
|
|
984
|
+
}), [["__scopeId", "data-v-769d4022"]]), qt = xe, Jt = Se;
|
|
962
985
|
//#endregion
|
|
963
|
-
export { y as AddCommentCard,
|
|
986
|
+
export { y as AddCommentCard, lt as AlignmentButtons, Dt as Button, qt as CARD_STYLE_COLLAPSED, Jt as CARD_STYLE_EXPANDED, l as ColorPicker, h as CommentCard, oe as CommentMarginMarkers, v as DocumentName, f as EditingModeDropdown, Oe as EditorToolbar, i as FindReplaceDialog, Je as FontPicker, $e as FontSizePicker, E as FootnotePropertiesDialog, re as HorizontalRuler, e as HyperlinkDialog, le as IconGridDropdown, he as ImagePositionDialog, a as ImagePropertiesDialog, d as ImageTransformDropdown, c as ImageWrapDropdown, de as InsertImageDialog, n as InsertSymbolDialog, pe as InsertTableDialog, o as KeyboardShortcutsDialog, nt as LineSpacingPicker, ht as ListButtons, wt as LoadingIndicator, S as MenuBar, ae as MenuDropdown, r as PageSetupDialog, T as PasteSpecialDialog, u as Popover, zt as PrintButton, Vt as PrintPreview, ie as ReplyInput, b as ReplyThread, m as ResolvedCommentMarker, Re as ResponsiveToolbar, me as SplitCellDialog, at as StylePicker, ce as TableBorderColorPicker, ue as TableBorderPicker, ee as TableBorderWidthPicker, ne as TableCellFillPicker, x as TableGridInline, Mt as TableGridPicker, Pt as TableInsertButtons, It as TableMergeButton, g as TableMoreDropdown, D as TablePropertiesDialog, fe as TableStyleGallery, _ as TableToolbar, Fe as TitleBar, C as Toolbar, yt as Tooltip, se as TrackedChangeCard, p as UnifiedSidebar, Kt as UnsavedIndicator, te as VerticalRuler, vt as ZoomControl, be as createDefaultListState };
|