@eigenpal/docx-editor-vue 1.4.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-BbuDgglK.js → KeyboardShortcutsDialog-OPAV0oVm.js} +351 -506
- package/dist/{MenuBar-CbONA9-a.js → MenuBar-BLKoZqG3.js} +813 -692
- package/dist/MenuBar-BP-XM0MI.cjs +4 -0
- package/dist/{TablePropertiesDialog-JWT68zEO.cjs → TablePropertiesDialog-B-FVOqkH.cjs} +1 -1
- package/dist/TablePropertiesDialog-B3oZIIjw.js +1145 -0
- package/dist/components/DocxEditor/types.d.ts +26 -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/imageOverlayRect.d.ts +44 -0
- package/dist/composables/imageOverlayRect.test.d.ts +1 -0
- package/dist/composables/useColorMode.d.ts +8 -0
- package/dist/composables/useCommentSidebarItems.test.d.ts +1 -0
- package/dist/composables/useDocxEditorRefApi.d.ts +4 -0
- package/dist/composables/useFileIO.d.ts +5 -0
- package/dist/composables/useFormattingActions.d.ts +5 -2
- package/dist/composables/useImageActions.d.ts +0 -6
- package/dist/composables/useMenuActions.d.ts +3 -1
- 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 +5 -4
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +3 -3
- package/dist/docx-editor-vue.css +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.js +1375 -1258
- package/dist/plugin-api.cjs +1 -1
- package/dist/plugin-api.js +1 -1
- package/dist/ui.cjs +2 -2
- package/dist/ui.js +253 -230
- package/dist/{useCommentSidebarItems-CbNvNCd3.cjs → useCommentSidebarItems-DBeGKNGA.cjs} +1 -1
- package/dist/{useCommentSidebarItems-BHomCzpj.js → useCommentSidebarItems-DXbF857R.js} +2 -1
- 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-Bct8AJ0i.cjs +0 -1
- package/dist/MenuBar-m0JEaF1X.cjs +0 -4
- package/dist/TablePropertiesDialog-D5MIF3cj.js +0 -987
- package/dist/useDragAutoScroll-DCUotwOX.cjs +0 -1
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as e, u as t } from "./KeyboardShortcutsDialog-OPAV0oVm.js";
|
|
2
2
|
import { t as n } from "./_plugin-vue_export-helper-B52Kst-M.js";
|
|
3
|
-
import { t as r } from "./useCommentSidebarItems-
|
|
3
|
+
import { t as r } from "./useCommentSidebarItems-DXbF857R.js";
|
|
4
4
|
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, onMounted as _, openBlock as v, reactive as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, unref as T, vModelSelect as E, vModelText as D, watch as O, withCtx as k, withDirectives as A, withKeys as j, withModifiers as M } from "vue";
|
|
5
5
|
import { generateThemeTintShadeMatrix as N, resolveColor as P, resolveColorToHex as F, resolveHighlightColor as I } from "@eigenpal/docx-editor-core/utils";
|
|
6
6
|
import { redoDepth as L, undoDepth as R } from "prosemirror-history";
|
|
7
7
|
import { extractSelectionContext as ee } from "@eigenpal/docx-editor-core/prosemirror/plugins/selectionTracker";
|
|
8
8
|
import { clearFormatting as z } from "@eigenpal/docx-editor-core/prosemirror/commands/formatting";
|
|
9
9
|
import { normalizeFontFamilies as B } from "@eigenpal/docx-editor-core/utils/fontOptions";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
10
|
+
import { getStylePreviewProps as V, resolveParagraphStyleOptions as H } from "@eigenpal/docx-editor-core/utils/stylePreview";
|
|
11
|
+
import { getTableContext as U } from "@eigenpal/docx-editor-core/prosemirror/extensions/nodes/TableExtension";
|
|
12
|
+
import { formatDate as W, getAvatarColor as G, getCommentText as K, getInitials as q, truncateText as J } from "@eigenpal/docx-editor-core/utils/comments";
|
|
13
|
+
import { resolveItemPositions as Y } from "@eigenpal/docx-editor-core/plugin-api/resolveItemPositions";
|
|
14
|
+
import { SIDEBAR_DOCUMENT_SHIFT as X, SIDEBAR_WIDTH as te } from "@eigenpal/docx-editor-core/utils/sidebarConstants";
|
|
15
|
+
import { pixelsToTwips as ne, twipsToPixels as re } from "@eigenpal/docx-editor-core/utils/units";
|
|
15
16
|
//#region src/components/ui/ColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var
|
|
17
|
+
var ie = [
|
|
17
18
|
"disabled",
|
|
18
19
|
"title",
|
|
19
20
|
"aria-label"
|
|
20
|
-
],
|
|
21
|
+
], ae = [
|
|
21
22
|
"disabled",
|
|
22
23
|
"title",
|
|
23
24
|
"aria-label",
|
|
24
25
|
"aria-expanded"
|
|
25
|
-
],
|
|
26
|
+
], oe = [
|
|
26
27
|
"disabled",
|
|
27
28
|
"title",
|
|
28
29
|
"aria-label",
|
|
29
30
|
"aria-expanded"
|
|
30
|
-
],
|
|
31
|
+
], se = { class: "docx-color-picker__button-stack" }, Z = ["aria-label"], ce = {
|
|
31
32
|
key: 0,
|
|
32
33
|
class: "docx-color-picker__auto-icon docx-color-picker__auto-icon--none"
|
|
33
|
-
},
|
|
34
|
+
}, le = {
|
|
34
35
|
key: 1,
|
|
35
36
|
class: "docx-color-picker__auto-icon docx-color-picker__auto-icon--auto"
|
|
36
|
-
},
|
|
37
|
+
}, ue = { class: "docx-color-picker__section-label" }, de = { class: "docx-color-picker__grid" }, fe = [
|
|
37
38
|
"title",
|
|
38
39
|
"aria-label",
|
|
39
40
|
"aria-selected",
|
|
40
41
|
"onClick"
|
|
41
|
-
],
|
|
42
|
+
], pe = { class: "docx-color-picker__section-label" }, me = { class: "docx-color-picker__grid" }, he = [
|
|
42
43
|
"title",
|
|
43
44
|
"aria-label",
|
|
44
45
|
"aria-selected",
|
|
45
46
|
"onClick"
|
|
46
|
-
],
|
|
47
|
+
], ge = { class: "docx-color-picker__section-label" }, _e = { class: "docx-color-picker__custom" }, ve = ["onKeydown"], ye = ["disabled"], be = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
47
48
|
__name: "ColorPicker",
|
|
48
49
|
props: {
|
|
49
50
|
mode: {},
|
|
@@ -66,7 +67,7 @@ var ne = [
|
|
|
66
67
|
},
|
|
67
68
|
emits: ["change"],
|
|
68
69
|
setup(n, { emit: r }) {
|
|
69
|
-
let o = n, f = r, { t: p } =
|
|
70
|
+
let o = n, f = r, { t: p } = t(), y = [
|
|
70
71
|
{
|
|
71
72
|
nameKey: "colorPicker.colors.darkRed",
|
|
72
73
|
hex: "C00000"
|
|
@@ -145,37 +146,37 @@ var ne = [
|
|
|
145
146
|
left: `${t.left}px`
|
|
146
147
|
};
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
+
function Y() {
|
|
149
150
|
o.disabled || (L.value || J(), L.value = !L.value);
|
|
150
151
|
}
|
|
151
|
-
function
|
|
152
|
+
function X(e, t = !0) {
|
|
152
153
|
t && (B.value = e), f("change", e), L.value = !1;
|
|
153
154
|
}
|
|
154
|
-
function
|
|
155
|
+
function te() {
|
|
155
156
|
o.disabled || f("change", B.value);
|
|
156
157
|
}
|
|
157
|
-
function
|
|
158
|
+
function ne(e) {
|
|
158
159
|
if (o.mode === "highlight") {
|
|
159
|
-
|
|
160
|
+
X(e.hex);
|
|
160
161
|
return;
|
|
161
162
|
}
|
|
162
163
|
let t = {
|
|
163
164
|
themeColor: e.themeSlot,
|
|
164
165
|
rgb: e.hex
|
|
165
166
|
};
|
|
166
|
-
e.tint && (t.themeTint = e.tint), e.shade && (t.themeShade = e.shade),
|
|
167
|
+
e.tint && (t.themeTint = e.tint), e.shade && (t.themeShade = e.shade), X(t);
|
|
167
168
|
}
|
|
168
|
-
function
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
function ye() {
|
|
172
|
-
Y(o.mode === "highlight" ? "none" : { auto: !0 }, !1);
|
|
169
|
+
function re(e) {
|
|
170
|
+
X(o.mode === "highlight" ? e : { rgb: e });
|
|
173
171
|
}
|
|
174
172
|
function be() {
|
|
173
|
+
X(o.mode === "highlight" ? "none" : { auto: !0 }, !1);
|
|
174
|
+
}
|
|
175
|
+
function xe() {
|
|
175
176
|
let e = R.value.replace(/^#/, "").toUpperCase();
|
|
176
|
-
C(e) && (
|
|
177
|
+
C(e) && (X(o.mode === "highlight" ? e : { rgb: e }), R.value = "");
|
|
177
178
|
}
|
|
178
|
-
function
|
|
179
|
+
function Q(e) {
|
|
179
180
|
e.target.tagName !== "INPUT" && e.preventDefault();
|
|
180
181
|
}
|
|
181
182
|
function Se(e) {
|
|
@@ -183,7 +184,7 @@ var ne = [
|
|
|
183
184
|
let t = e.target;
|
|
184
185
|
ee.value?.contains(t) || z.value?.contains(t) || (L.value = !1);
|
|
185
186
|
}
|
|
186
|
-
return _(() => document.addEventListener("mousedown", Se)), g(() => document.removeEventListener("mousedown", Se)), (
|
|
187
|
+
return _(() => document.addEventListener("mousedown", Se)), g(() => document.removeEventListener("mousedown", Se)), (t, r) => (v(), c("div", {
|
|
187
188
|
ref_key: "containerRef",
|
|
188
189
|
ref: ee,
|
|
189
190
|
class: m(["docx-color-picker", n.className]),
|
|
@@ -198,14 +199,14 @@ var ne = [
|
|
|
198
199
|
title: n.title ?? G.value,
|
|
199
200
|
"aria-label": n.title ?? G.value,
|
|
200
201
|
onMousedown: r[0] ||= M(() => {}, ["prevent"]),
|
|
201
|
-
onClick:
|
|
202
|
-
}, [d(
|
|
202
|
+
onClick: te
|
|
203
|
+
}, [d(e, {
|
|
203
204
|
name: K.value,
|
|
204
205
|
size: 18
|
|
205
206
|
}, null, 8, ["name"]), l("span", {
|
|
206
207
|
class: m(["docx-color-picker__bar", { "is-light": W.value === "transparent" || E(W.value) }]),
|
|
207
208
|
style: h({ background: W.value === "transparent" ? "#fff" : W.value })
|
|
208
|
-
}, null, 6)], 40,
|
|
209
|
+
}, null, 6)], 40, ie), l("button", {
|
|
209
210
|
type: "button",
|
|
210
211
|
class: m(["docx-color-picker__arrow", { "is-open": L.value }]),
|
|
211
212
|
disabled: n.disabled,
|
|
@@ -214,11 +215,11 @@ var ne = [
|
|
|
214
215
|
"aria-haspopup": "true",
|
|
215
216
|
"aria-expanded": L.value,
|
|
216
217
|
onMousedown: r[1] ||= M(() => {}, ["prevent"]),
|
|
217
|
-
onClick:
|
|
218
|
-
}, [d(
|
|
218
|
+
onClick: Y
|
|
219
|
+
}, [d(e, {
|
|
219
220
|
name: "arrow_drop_down",
|
|
220
221
|
size: 18
|
|
221
|
-
})], 42,
|
|
222
|
+
})], 42, ae)], 2)) : (v(), c("button", {
|
|
222
223
|
key: 1,
|
|
223
224
|
type: "button",
|
|
224
225
|
class: m(["docx-color-picker__button", { "is-open": L.value }]),
|
|
@@ -228,17 +229,17 @@ var ne = [
|
|
|
228
229
|
"aria-haspopup": "true",
|
|
229
230
|
"aria-expanded": L.value,
|
|
230
231
|
onMousedown: r[2] ||= M(() => {}, ["prevent"]),
|
|
231
|
-
onClick:
|
|
232
|
-
}, [l("span",
|
|
232
|
+
onClick: Y
|
|
233
|
+
}, [l("span", se, [d(e, {
|
|
233
234
|
name: K.value,
|
|
234
235
|
size: 18
|
|
235
236
|
}, null, 8, ["name"]), l("span", {
|
|
236
237
|
class: m(["docx-color-picker__bar", { "is-light": U.value === "transparent" || E(U.value) }]),
|
|
237
238
|
style: h({ background: U.value === "transparent" ? "#fff" : U.value })
|
|
238
|
-
}, null, 6)]), d(
|
|
239
|
+
}, null, 6)]), d(e, {
|
|
239
240
|
name: "arrow_drop_down",
|
|
240
241
|
size: 14
|
|
241
|
-
})], 42,
|
|
242
|
+
})], 42, oe)), L.value && !n.disabled ? (v(), c("div", {
|
|
242
243
|
key: 2,
|
|
243
244
|
ref_key: "panelRef",
|
|
244
245
|
ref: z,
|
|
@@ -246,17 +247,17 @@ var ne = [
|
|
|
246
247
|
style: h(q.value),
|
|
247
248
|
role: "dialog",
|
|
248
249
|
"aria-label": T(p)("colorPicker.ariaLabel", { type: G.value }),
|
|
249
|
-
onMousedown:
|
|
250
|
+
onMousedown: Q
|
|
250
251
|
}, [
|
|
251
252
|
l("button", {
|
|
252
253
|
type: "button",
|
|
253
254
|
class: "docx-color-picker__auto",
|
|
254
255
|
onMousedown: r[3] ||= M(() => {}, ["prevent"]),
|
|
255
|
-
onClick:
|
|
256
|
-
}, [n.mode === "highlight" ? (v(), c("span",
|
|
256
|
+
onClick: be
|
|
257
|
+
}, [n.mode === "highlight" ? (v(), c("span", ce, [...r[10] ||= [l("span", { class: "docx-color-picker__auto-slash" }, null, -1)]])) : (v(), c("span", le)), u(" " + w(n.autoLabel ?? (n.mode === "highlight" ? T(p)("colorPicker.noColor") : T(p)("colorPicker.automatic"))), 1)], 32),
|
|
257
258
|
r[12] ||= l("div", { class: "docx-color-picker__divider" }, null, -1),
|
|
258
|
-
l("div",
|
|
259
|
-
l("div",
|
|
259
|
+
l("div", ue, w(T(p)("colorPicker.themeColors")), 1),
|
|
260
|
+
l("div", de, [(v(!0), c(i, null, x(H.value, (e) => (v(), c("button", {
|
|
260
261
|
key: e.key,
|
|
261
262
|
type: "button",
|
|
262
263
|
class: m(["docx-color-picker__cell", { "is-selected": k(n.value, e.hex) }]),
|
|
@@ -265,11 +266,11 @@ var ne = [
|
|
|
265
266
|
"aria-label": e.label,
|
|
266
267
|
"aria-selected": k(n.value, e.hex),
|
|
267
268
|
onMousedown: r[4] ||= M(() => {}, ["prevent"]),
|
|
268
|
-
onClick: (t) =>
|
|
269
|
-
}, null, 46,
|
|
269
|
+
onClick: (t) => ne(e)
|
|
270
|
+
}, null, 46, fe))), 128))]),
|
|
270
271
|
r[13] ||= l("div", { class: "docx-color-picker__divider" }, null, -1),
|
|
271
|
-
l("div",
|
|
272
|
-
l("div",
|
|
272
|
+
l("div", pe, w(T(p)("colorPicker.standardColors")), 1),
|
|
273
|
+
l("div", me, [(v(), c(i, null, x(y, (e) => l("button", {
|
|
273
274
|
key: e.hex,
|
|
274
275
|
type: "button",
|
|
275
276
|
class: m(["docx-color-picker__cell", { "is-selected": k(n.value, e.hex) }]),
|
|
@@ -278,11 +279,11 @@ var ne = [
|
|
|
278
279
|
"aria-label": T(p)(e.nameKey),
|
|
279
280
|
"aria-selected": k(n.value, e.hex),
|
|
280
281
|
onMousedown: r[5] ||= M(() => {}, ["prevent"]),
|
|
281
|
-
onClick: (t) =>
|
|
282
|
-
}, null, 46,
|
|
282
|
+
onClick: (t) => re(e.hex)
|
|
283
|
+
}, null, 46, he)), 64))]),
|
|
283
284
|
r[14] ||= l("div", { class: "docx-color-picker__divider" }, null, -1),
|
|
284
|
-
l("div",
|
|
285
|
-
l("div",
|
|
285
|
+
l("div", ge, w(T(p)("colorPicker.customColor")), 1),
|
|
286
|
+
l("div", _e, [
|
|
286
287
|
r[11] ||= l("span", { class: "docx-color-picker__hash" }, "#", -1),
|
|
287
288
|
A(l("input", {
|
|
288
289
|
"onUpdate:modelValue": r[6] ||= (e) => R.value = e,
|
|
@@ -292,20 +293,20 @@ var ne = [
|
|
|
292
293
|
maxlength: "6",
|
|
293
294
|
"aria-label": "Custom hex color",
|
|
294
295
|
onInput: r[7] ||= (e) => R.value = R.value.replace(/[^0-9A-Fa-f]/g, "").slice(0, 6),
|
|
295
|
-
onKeydown: j(M(
|
|
296
|
+
onKeydown: j(M(xe, ["prevent"]), ["enter"]),
|
|
296
297
|
onMousedown: r[8] ||= M(() => {}, ["stop"])
|
|
297
|
-
}, null, 40,
|
|
298
|
+
}, null, 40, ve), [[D, R.value]]),
|
|
298
299
|
l("button", {
|
|
299
300
|
type: "button",
|
|
300
301
|
class: "docx-color-picker__apply-btn",
|
|
301
302
|
disabled: !C(R.value),
|
|
302
303
|
onMousedown: r[9] ||= M(() => {}, ["prevent"]),
|
|
303
|
-
onClick:
|
|
304
|
-
}, w(T(p)("common.apply")), 41,
|
|
304
|
+
onClick: xe
|
|
305
|
+
}, w(T(p)("common.apply")), 41, ye)
|
|
305
306
|
])
|
|
306
307
|
], 44, Z)) : s("", !0)], 6));
|
|
307
308
|
}
|
|
308
|
-
}), [["__scopeId", "data-v-
|
|
309
|
+
}), [["__scopeId", "data-v-e2472617"]]), xe = 4, Q = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
309
310
|
__name: "Popover",
|
|
310
311
|
props: {
|
|
311
312
|
open: { type: Boolean },
|
|
@@ -324,7 +325,7 @@ var ne = [
|
|
|
324
325
|
let e = i.value;
|
|
325
326
|
if (!e) return;
|
|
326
327
|
let t = e.getBoundingClientRect(), r = { position: "fixed" };
|
|
327
|
-
n.placement.startsWith("top") ? (r.bottom = `${Math.round(window.innerHeight - t.top +
|
|
328
|
+
n.placement.startsWith("top") ? (r.bottom = `${Math.round(window.innerHeight - t.top + xe)}px`, r.top = "auto") : (r.top = `${Math.round(t.bottom + xe)}px`, r.bottom = "auto"), n.placement.endsWith("right") ? (r.right = `${Math.round(window.innerWidth - t.right)}px`, r.left = "auto") : (r.left = `${Math.round(t.left)}px`, r.right = "auto"), o.value = r;
|
|
328
329
|
}
|
|
329
330
|
function u() {
|
|
330
331
|
r("update:open", !n.open), n.open && r("close");
|
|
@@ -372,15 +373,15 @@ var ne = [
|
|
|
372
373
|
onMousedown: n[0] ||= M(() => {}, ["stop"])
|
|
373
374
|
}, [S(t.$slots, "panel", {}, void 0, !0)], 38)) : s("", !0)], 512));
|
|
374
375
|
}
|
|
375
|
-
}), [["__scopeId", "data-v-
|
|
376
|
+
}), [["__scopeId", "data-v-5878ce2a"]]), Se = ["title", "onClick"], Ce = {
|
|
376
377
|
key: 0,
|
|
377
378
|
class: "editing-mode__label"
|
|
378
|
-
},
|
|
379
|
+
}, we = { class: "editing-mode__panel" }, Te = ["onClick"], Ee = { class: "editing-mode__option-text" }, De = { class: "editing-mode__option-label" }, Oe = { class: "editing-mode__option-desc" }, ke = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
379
380
|
__name: "EditingModeDropdown",
|
|
380
381
|
props: { modelValue: {} },
|
|
381
382
|
emits: ["update:modelValue"],
|
|
382
383
|
setup(n, { emit: r }) {
|
|
383
|
-
let { t: u } =
|
|
384
|
+
let { t: u } = t(), f = n, p = r, h = [
|
|
384
385
|
{
|
|
385
386
|
value: "editing",
|
|
386
387
|
labelKey: "editor.editing",
|
|
@@ -409,59 +410,59 @@ var ne = [
|
|
|
409
410
|
}
|
|
410
411
|
return _(() => {
|
|
411
412
|
D = window.matchMedia("(max-width: 1400px)"), S.value = D.matches, D.addEventListener("change", O);
|
|
412
|
-
}), g(() => D?.removeEventListener("change", O)), (
|
|
413
|
+
}), g(() => D?.removeEventListener("change", O)), (t, r) => (v(), o(Q, {
|
|
413
414
|
open: y.value,
|
|
414
415
|
placement: "bottom-right",
|
|
415
416
|
"onUpdate:open": r[0] ||= (e) => y.value = e,
|
|
416
417
|
onClose: r[1] ||= (e) => y.value = !1
|
|
417
418
|
}, {
|
|
418
|
-
trigger: k(({ toggle:
|
|
419
|
+
trigger: k(({ toggle: t }) => [l("button", {
|
|
419
420
|
type: "button",
|
|
420
421
|
class: m(["editing-mode__trigger", {
|
|
421
422
|
"editing-mode__trigger--open": y.value,
|
|
422
423
|
"editing-mode__trigger--compact": S.value
|
|
423
424
|
}]),
|
|
424
425
|
title: `${T(u)(C.value.labelKey)} (Ctrl+Shift+E)`,
|
|
425
|
-
onClick: M(
|
|
426
|
+
onClick: M(t, ["prevent"])
|
|
426
427
|
}, [
|
|
427
|
-
d(
|
|
428
|
+
d(e, {
|
|
428
429
|
name: C.value.icon,
|
|
429
430
|
size: 18
|
|
430
431
|
}, null, 8, ["name"]),
|
|
431
|
-
S.value ? s("", !0) : (v(), c("span",
|
|
432
|
-
d(
|
|
432
|
+
S.value ? s("", !0) : (v(), c("span", Ce, w(T(u)(C.value.labelKey)), 1)),
|
|
433
|
+
d(e, {
|
|
433
434
|
name: "arrow_drop_down",
|
|
434
435
|
size: 16
|
|
435
436
|
})
|
|
436
|
-
], 10,
|
|
437
|
-
panel: k(() => [l("div",
|
|
438
|
-
key:
|
|
437
|
+
], 10, Se)]),
|
|
438
|
+
panel: k(() => [l("div", we, [(v(), c(i, null, x(h, (t) => l("button", {
|
|
439
|
+
key: t.value,
|
|
439
440
|
type: "button",
|
|
440
441
|
class: "editing-mode__option",
|
|
441
|
-
onClick: M((
|
|
442
|
+
onClick: M((e) => E(t.value), ["prevent"])
|
|
442
443
|
}, [
|
|
443
|
-
d(
|
|
444
|
-
name:
|
|
444
|
+
d(e, {
|
|
445
|
+
name: t.icon,
|
|
445
446
|
size: 20
|
|
446
447
|
}, null, 8, ["name"]),
|
|
447
|
-
l("span",
|
|
448
|
-
|
|
448
|
+
l("span", Ee, [l("span", De, w(T(u)(t.labelKey)), 1), l("span", Oe, w(T(u)(t.descKey)), 1)]),
|
|
449
|
+
t.value === n.modelValue ? (v(), o(e, {
|
|
449
450
|
key: 0,
|
|
450
451
|
name: "check",
|
|
451
452
|
size: 18,
|
|
452
453
|
class: "editing-mode__check"
|
|
453
454
|
})) : s("", !0)
|
|
454
|
-
], 8,
|
|
455
|
+
], 8, Te)), 64))])]),
|
|
455
456
|
_: 1
|
|
456
457
|
}, 8, ["open"]));
|
|
457
458
|
}
|
|
458
|
-
}), [["__scopeId", "data-v-
|
|
459
|
+
}), [["__scopeId", "data-v-00df78da"]]), Ae = [
|
|
459
460
|
"disabled",
|
|
460
461
|
"aria-label",
|
|
461
462
|
"title",
|
|
462
463
|
"aria-expanded",
|
|
463
464
|
"onClick"
|
|
464
|
-
],
|
|
465
|
+
], je = { class: "docx-icon-grid__panel" }, Me = ["title", "onClick"], Ne = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
465
466
|
__name: "IconGridDropdown",
|
|
466
467
|
props: {
|
|
467
468
|
options: {},
|
|
@@ -472,7 +473,7 @@ var ne = [
|
|
|
472
473
|
ariaLabel: {}
|
|
473
474
|
},
|
|
474
475
|
emits: ["select"],
|
|
475
|
-
setup(
|
|
476
|
+
setup(t, { emit: n }) {
|
|
476
477
|
let r = n, a = b(!1);
|
|
477
478
|
function s(e) {
|
|
478
479
|
r("select", e), a.value = !1;
|
|
@@ -485,41 +486,41 @@ var ne = [
|
|
|
485
486
|
trigger: k(({ toggle: n }) => [l("button", {
|
|
486
487
|
type: "button",
|
|
487
488
|
class: m(["docx-icon-grid__btn", { "docx-icon-grid__btn--open": a.value }]),
|
|
488
|
-
disabled:
|
|
489
|
-
"aria-label":
|
|
490
|
-
title:
|
|
489
|
+
disabled: t.disabled,
|
|
490
|
+
"aria-label": t.ariaLabel ?? t.tooltipContent,
|
|
491
|
+
title: t.tooltipContent,
|
|
491
492
|
"aria-expanded": a.value,
|
|
492
493
|
"aria-haspopup": "true",
|
|
493
494
|
onClick: M(n, ["prevent"])
|
|
494
|
-
}, [d(
|
|
495
|
-
name:
|
|
495
|
+
}, [d(e, {
|
|
496
|
+
name: t.triggerIcon,
|
|
496
497
|
size: 20
|
|
497
|
-
}, null, 8, ["name"]), d(
|
|
498
|
+
}, null, 8, ["name"]), d(e, {
|
|
498
499
|
name: "arrow_drop_down",
|
|
499
500
|
size: 14
|
|
500
|
-
})], 10,
|
|
501
|
-
panel: k(() => [l("div",
|
|
501
|
+
})], 10, Ae)]),
|
|
502
|
+
panel: k(() => [l("div", je, [(v(!0), c(i, null, x(t.options, (n) => (v(), c("button", {
|
|
502
503
|
key: n.value,
|
|
503
504
|
type: "button",
|
|
504
|
-
class: m(["docx-icon-grid__option", { "docx-icon-grid__option--active":
|
|
505
|
+
class: m(["docx-icon-grid__option", { "docx-icon-grid__option--active": t.activeValue === n.value }]),
|
|
505
506
|
title: n.label,
|
|
506
507
|
onClick: M((e) => s(n.value), ["prevent"])
|
|
507
|
-
}, [d(
|
|
508
|
+
}, [d(e, {
|
|
508
509
|
name: n.iconName,
|
|
509
510
|
size: 18
|
|
510
|
-
}, null, 8, ["name"])], 10,
|
|
511
|
+
}, null, 8, ["name"])], 10, Me))), 128))])]),
|
|
511
512
|
_: 1
|
|
512
513
|
}, 8, ["open"]));
|
|
513
514
|
}
|
|
514
|
-
}), [["__scopeId", "data-v-
|
|
515
|
+
}), [["__scopeId", "data-v-28013428"]]), Pe = /* @__PURE__ */ f({
|
|
515
516
|
__name: "ImageWrapDropdown",
|
|
516
517
|
props: {
|
|
517
518
|
imageContext: {},
|
|
518
519
|
disabled: { type: Boolean }
|
|
519
520
|
},
|
|
520
521
|
emits: ["change"],
|
|
521
|
-
setup(
|
|
522
|
-
let n =
|
|
522
|
+
setup(e) {
|
|
523
|
+
let n = e, { t: r } = t(), i = [
|
|
523
524
|
{
|
|
524
525
|
value: "inline",
|
|
525
526
|
labelKey: "imageWrap.inline",
|
|
@@ -558,13 +559,13 @@ var ne = [
|
|
|
558
559
|
let e = n.imageContext;
|
|
559
560
|
return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
|
|
560
561
|
}), l = a(() => s.value.find((e) => e.value === c.value) ?? s.value[0]);
|
|
561
|
-
return (
|
|
562
|
+
return (t, n) => (v(), o(Ne, {
|
|
562
563
|
options: s.value,
|
|
563
564
|
"active-value": c.value,
|
|
564
565
|
"trigger-icon": l.value.iconName,
|
|
565
566
|
"tooltip-content": T(r)("imageWrap.tooltipPrefix", { label: l.value.label }),
|
|
566
|
-
disabled:
|
|
567
|
-
onSelect: n[0] ||= (
|
|
567
|
+
disabled: e.disabled,
|
|
568
|
+
onSelect: n[0] ||= (e) => t.$emit("change", e)
|
|
568
569
|
}, null, 8, [
|
|
569
570
|
"options",
|
|
570
571
|
"active-value",
|
|
@@ -573,12 +574,12 @@ var ne = [
|
|
|
573
574
|
"disabled"
|
|
574
575
|
]));
|
|
575
576
|
}
|
|
576
|
-
}),
|
|
577
|
+
}), Fe = /* @__PURE__ */ f({
|
|
577
578
|
__name: "ImageTransformDropdown",
|
|
578
579
|
props: { disabled: { type: Boolean } },
|
|
579
580
|
emits: ["transform"],
|
|
580
|
-
setup(
|
|
581
|
-
let { t: n } =
|
|
581
|
+
setup(e) {
|
|
582
|
+
let { t: n } = t(), r = [
|
|
582
583
|
{
|
|
583
584
|
value: "rotateCW",
|
|
584
585
|
labelKey: "imageTransform.rotateClockwise",
|
|
@@ -604,19 +605,19 @@ var ne = [
|
|
|
604
605
|
label: n(e.labelKey),
|
|
605
606
|
iconName: e.iconName
|
|
606
607
|
})));
|
|
607
|
-
return (
|
|
608
|
+
return (t, r) => (v(), o(Ne, {
|
|
608
609
|
options: i.value,
|
|
609
610
|
"trigger-icon": "rotate_right",
|
|
610
611
|
"tooltip-content": T(n)("imageTransform.tooltip"),
|
|
611
|
-
disabled:
|
|
612
|
-
onSelect: r[0] ||= (
|
|
612
|
+
disabled: e.disabled,
|
|
613
|
+
onSelect: r[0] ||= (e) => t.$emit("transform", e)
|
|
613
614
|
}, null, 8, [
|
|
614
615
|
"options",
|
|
615
616
|
"tooltip-content",
|
|
616
617
|
"disabled"
|
|
617
618
|
]));
|
|
618
619
|
}
|
|
619
|
-
}),
|
|
620
|
+
}), Ie = [
|
|
620
621
|
{
|
|
621
622
|
name: "Arial",
|
|
622
623
|
fontFamily: "Arial",
|
|
@@ -677,7 +678,7 @@ var ne = [
|
|
|
677
678
|
fontFamily: "Consolas",
|
|
678
679
|
category: "monospace"
|
|
679
680
|
}
|
|
680
|
-
],
|
|
681
|
+
], Le = [
|
|
681
682
|
8,
|
|
682
683
|
9,
|
|
683
684
|
10,
|
|
@@ -692,62 +693,38 @@ var ne = [
|
|
|
692
693
|
36,
|
|
693
694
|
48,
|
|
694
695
|
72
|
|
695
|
-
],
|
|
696
|
+
], Re = [
|
|
696
697
|
{
|
|
697
698
|
id: "Normal",
|
|
698
699
|
label: "Normal",
|
|
699
|
-
nameKey: "styles.normalText"
|
|
700
|
-
previewStyle: { fontSize: "13px" }
|
|
700
|
+
nameKey: "styles.normalText"
|
|
701
701
|
},
|
|
702
702
|
{
|
|
703
703
|
id: "Title",
|
|
704
704
|
label: "Title",
|
|
705
|
-
nameKey: "styles.title"
|
|
706
|
-
previewStyle: {
|
|
707
|
-
fontSize: "20px",
|
|
708
|
-
fontWeight: "bold"
|
|
709
|
-
}
|
|
705
|
+
nameKey: "styles.title"
|
|
710
706
|
},
|
|
711
707
|
{
|
|
712
708
|
id: "Subtitle",
|
|
713
709
|
label: "Subtitle",
|
|
714
|
-
nameKey: "styles.subtitle"
|
|
715
|
-
previewStyle: {
|
|
716
|
-
fontSize: "15px",
|
|
717
|
-
color: "#6b7280"
|
|
718
|
-
}
|
|
710
|
+
nameKey: "styles.subtitle"
|
|
719
711
|
},
|
|
720
712
|
{
|
|
721
713
|
id: "Heading1",
|
|
722
714
|
label: "Heading 1",
|
|
723
|
-
nameKey: "styles.heading1"
|
|
724
|
-
previewStyle: {
|
|
725
|
-
fontSize: "18px",
|
|
726
|
-
fontWeight: "bold",
|
|
727
|
-
color: "#4a6c8c"
|
|
728
|
-
}
|
|
715
|
+
nameKey: "styles.heading1"
|
|
729
716
|
},
|
|
730
717
|
{
|
|
731
718
|
id: "Heading2",
|
|
732
719
|
label: "Heading 2",
|
|
733
|
-
nameKey: "styles.heading2"
|
|
734
|
-
previewStyle: {
|
|
735
|
-
fontSize: "16px",
|
|
736
|
-
fontWeight: "bold",
|
|
737
|
-
color: "#4a6c8c"
|
|
738
|
-
}
|
|
720
|
+
nameKey: "styles.heading2"
|
|
739
721
|
},
|
|
740
722
|
{
|
|
741
723
|
id: "Heading3",
|
|
742
724
|
label: "Heading 3",
|
|
743
|
-
nameKey: "styles.heading3"
|
|
744
|
-
previewStyle: {
|
|
745
|
-
fontSize: "14px",
|
|
746
|
-
fontWeight: "bold",
|
|
747
|
-
color: "#4a6c8c"
|
|
748
|
-
}
|
|
725
|
+
nameKey: "styles.heading3"
|
|
749
726
|
}
|
|
750
|
-
],
|
|
727
|
+
], ze = [
|
|
751
728
|
{
|
|
752
729
|
label: "Single",
|
|
753
730
|
labelKey: "lineSpacing.single",
|
|
@@ -766,7 +743,7 @@ var ne = [
|
|
|
766
743
|
labelKey: "lineSpacing.double",
|
|
767
744
|
value: 480
|
|
768
745
|
}
|
|
769
|
-
],
|
|
746
|
+
], Be = [
|
|
770
747
|
.5,
|
|
771
748
|
.75,
|
|
772
749
|
1,
|
|
@@ -776,7 +753,7 @@ var ne = [
|
|
|
776
753
|
];
|
|
777
754
|
//#endregion
|
|
778
755
|
//#region src/composables/useToolbarDropdowns.ts
|
|
779
|
-
function
|
|
756
|
+
function Ve(e) {
|
|
780
757
|
let t = b(null), n = b({
|
|
781
758
|
top: 0,
|
|
782
759
|
left: 0
|
|
@@ -822,30 +799,98 @@ function Re(e) {
|
|
|
822
799
|
return _(() => document.addEventListener("mousedown", c)), g(() => document.removeEventListener("mousedown", c)), {
|
|
823
800
|
openDropdown: t,
|
|
824
801
|
dropdownMenuStyle: o,
|
|
825
|
-
toggleDropdown: s
|
|
802
|
+
toggleDropdown: s,
|
|
803
|
+
recomputeDropdownPos: i
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
//#endregion
|
|
807
|
+
//#region src/composables/useToolbarFontSize.ts
|
|
808
|
+
function He(e) {
|
|
809
|
+
let t = b(!1), n = (t) => e.execCommand("setFontSize", t * 2);
|
|
810
|
+
function r() {
|
|
811
|
+
t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
|
|
812
|
+
}
|
|
813
|
+
function i() {
|
|
814
|
+
t.value = !0;
|
|
815
|
+
}
|
|
816
|
+
function a(r) {
|
|
817
|
+
if (t.value) {
|
|
818
|
+
let e = parseFloat(r.target.value);
|
|
819
|
+
isNaN(e) || n(Math.round(Math.min(Math.max(e, 1), 1638) * 2) / 2);
|
|
820
|
+
}
|
|
821
|
+
t.value = !1, e.openDropdown.value = null;
|
|
822
|
+
}
|
|
823
|
+
function o(r) {
|
|
824
|
+
t.value = !1, n(r), e.openDropdown.value = null;
|
|
825
|
+
}
|
|
826
|
+
function s() {
|
|
827
|
+
let t = e.currentFontSize.value;
|
|
828
|
+
n(Le.find((e) => e > t) || t + 1);
|
|
829
|
+
}
|
|
830
|
+
function c() {
|
|
831
|
+
let t = e.currentFontSize.value;
|
|
832
|
+
n([...Le].reverse().find((e) => e < t) || Math.max(1, t - 1));
|
|
833
|
+
}
|
|
834
|
+
return {
|
|
835
|
+
onSizeFocus: r,
|
|
836
|
+
onSizeInput: i,
|
|
837
|
+
commitFontSize: a,
|
|
838
|
+
pickFontSize: o,
|
|
839
|
+
increaseFontSize: s,
|
|
840
|
+
decreaseFontSize: c
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
//#endregion
|
|
844
|
+
//#region src/composables/useParagraphStyleOptions.ts
|
|
845
|
+
function Ue(e) {
|
|
846
|
+
let t = a(() => {
|
|
847
|
+
let t = H(e.documentStyles());
|
|
848
|
+
return t.length > 0 ? t.map((t) => {
|
|
849
|
+
let n = Re.find((e) => e.id === t.styleId);
|
|
850
|
+
return {
|
|
851
|
+
id: t.styleId,
|
|
852
|
+
label: n ? e.t(n.nameKey) : t.name,
|
|
853
|
+
previewStyle: V(t)
|
|
854
|
+
};
|
|
855
|
+
}) : Re.map((t) => ({
|
|
856
|
+
id: t.id,
|
|
857
|
+
label: e.t(t.nameKey),
|
|
858
|
+
previewStyle: V({ styleId: t.id })
|
|
859
|
+
}));
|
|
860
|
+
});
|
|
861
|
+
return {
|
|
862
|
+
resolvedParagraphStyles: t,
|
|
863
|
+
currentStyleLabel: a(() => {
|
|
864
|
+
let n = e.currentStyleId() || "Normal", r = t.value.find((e) => e.id === n);
|
|
865
|
+
return r ? r.label : n;
|
|
866
|
+
})
|
|
826
867
|
};
|
|
827
868
|
}
|
|
828
869
|
//#endregion
|
|
829
870
|
//#region src/components/Toolbar.vue?vue&type=script&setup=true&lang.ts
|
|
830
|
-
var
|
|
871
|
+
var We = {
|
|
831
872
|
key: 0,
|
|
832
873
|
class: "basic-toolbar"
|
|
833
|
-
},
|
|
874
|
+
}, Ge = [
|
|
834
875
|
"title",
|
|
835
876
|
"aria-label",
|
|
836
877
|
"disabled"
|
|
837
|
-
],
|
|
878
|
+
], Ke = [
|
|
838
879
|
"title",
|
|
839
880
|
"aria-label",
|
|
840
881
|
"disabled"
|
|
841
|
-
],
|
|
882
|
+
], qe = ["disabled", "title"], Je = ["aria-expanded", "title"], Ye = ["disabled", "title"], Xe = ["onMousedown"], Ze = ["aria-expanded", "title"], Qe = ["onMousedown"], $e = ["aria-expanded", "title"], et = {
|
|
842
883
|
key: 0,
|
|
843
884
|
class: "toolbar-dropdown__group-label"
|
|
844
|
-
},
|
|
885
|
+
}, tt = ["onMousedown"], nt = ["title"], rt = [
|
|
886
|
+
"value",
|
|
887
|
+
"title",
|
|
888
|
+
"aria-expanded"
|
|
889
|
+
], it = ["title"], at = ["onMousedown"], ot = ["title", "aria-label"], st = ["title", "aria-label"], ct = ["title", "aria-label"], lt = ["title", "aria-label"], ut = ["title", "aria-label"], dt = ["title", "aria-label"], ft = ["title", "aria-label"], pt = ["aria-expanded", "title"], mt = ["title"], ht = ["title"], gt = ["title"], _t = ["title"], vt = ["title", "aria-label"], yt = ["title", "aria-label"], bt = [
|
|
845
890
|
"title",
|
|
846
891
|
"aria-label",
|
|
847
892
|
"disabled"
|
|
848
|
-
],
|
|
893
|
+
], xt = ["title", "aria-label"], St = ["aria-expanded", "title"], Ct = ["onMousedown"], wt = ["title", "aria-label"], Tt = ["title", "aria-label"], Et = ["title", "aria-label"], Dt = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
849
894
|
__name: "Toolbar",
|
|
850
895
|
props: {
|
|
851
896
|
view: {},
|
|
@@ -860,7 +905,8 @@ var ze = {
|
|
|
860
905
|
commentsSidebarOpen: { type: Boolean },
|
|
861
906
|
imageContext: {},
|
|
862
907
|
theme: {},
|
|
863
|
-
fontFamilies: {}
|
|
908
|
+
fontFamilies: {},
|
|
909
|
+
documentStyles: {}
|
|
864
910
|
},
|
|
865
911
|
emits: [
|
|
866
912
|
"find-replace",
|
|
@@ -883,14 +929,14 @@ var ze = {
|
|
|
883
929
|
"image-transform"
|
|
884
930
|
],
|
|
885
931
|
setup(n, { emit: r }) {
|
|
886
|
-
let f = n, { t: p } =
|
|
887
|
-
zoom:
|
|
932
|
+
let f = n, { t: p } = t(), g = r, _ = a(() => f.zoomPercent ?? 100), y = a(() => f.isMinZoom ?? !1), C = a(() => f.isMaxZoom ?? !1), E = a(() => f.zoomPresets ?? Be), D = a(() => f.showZoomControl ?? !0), O = b(null), k = b(null), A = b(null), N = b(null), P = b(null), F = b(null), { openDropdown: I, dropdownMenuStyle: V, toggleDropdown: H, recomputeDropdownPos: U } = Ve({
|
|
933
|
+
zoom: F,
|
|
888
934
|
style: O,
|
|
889
935
|
font: k,
|
|
890
936
|
size: A,
|
|
891
|
-
align:
|
|
892
|
-
spacing:
|
|
893
|
-
}),
|
|
937
|
+
align: N,
|
|
938
|
+
spacing: P
|
|
939
|
+
}), W = a(() => {
|
|
894
940
|
f.stateTick;
|
|
895
941
|
let e = f.view;
|
|
896
942
|
return e ? ee(e.state) : {
|
|
@@ -905,55 +951,56 @@ var ze = {
|
|
|
905
951
|
inInsertion: !1,
|
|
906
952
|
inDeletion: !1
|
|
907
953
|
};
|
|
908
|
-
}),
|
|
909
|
-
let e =
|
|
954
|
+
}), G = a(() => {
|
|
955
|
+
let e = W.value.textFormatting.fontFamily;
|
|
910
956
|
return e?.ascii || e?.hAnsi || "Arial";
|
|
911
|
-
}),
|
|
912
|
-
let e =
|
|
957
|
+
}), K = a(() => {
|
|
958
|
+
let e = W.value.textFormatting.fontSize;
|
|
913
959
|
return e ? e / 2 : 11;
|
|
914
|
-
}),
|
|
915
|
-
switch (
|
|
960
|
+
}), q = a(() => W.value.paragraphFormatting.alignment || "left"), J = a(() => {
|
|
961
|
+
switch (q.value) {
|
|
916
962
|
case "center": return "format_align_center";
|
|
917
963
|
case "right": return "format_align_right";
|
|
918
964
|
case "both": return "format_align_justify";
|
|
919
965
|
default: return "format_align_left";
|
|
920
966
|
}
|
|
921
|
-
}),
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
967
|
+
}), { resolvedParagraphStyles: Y, currentStyleLabel: X } = Ue({
|
|
968
|
+
documentStyles: () => f.documentStyles,
|
|
969
|
+
currentStyleId: () => W.value.paragraphFormatting.styleId || "Normal",
|
|
970
|
+
t: p
|
|
971
|
+
}), te = a(() => {
|
|
925
972
|
f.stateTick;
|
|
926
973
|
let e = f.view;
|
|
927
974
|
return e ? R(e.state) > 0 : !1;
|
|
928
|
-
}),
|
|
975
|
+
}), ne = a(() => {
|
|
929
976
|
f.stateTick;
|
|
930
977
|
let e = f.view;
|
|
931
978
|
return e ? L(e.state) > 0 : !1;
|
|
932
|
-
}),
|
|
933
|
-
let e =
|
|
979
|
+
}), re = a(() => {
|
|
980
|
+
let e = W.value, t = e.inList && (e.listLevel ?? 0) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
|
|
934
981
|
return t || n;
|
|
935
|
-
}),
|
|
936
|
-
let e =
|
|
982
|
+
}), ie = a(() => {
|
|
983
|
+
let e = W.value.textFormatting.color?.rgb;
|
|
937
984
|
return e ? e.replace(/^#/, "").toUpperCase() : void 0;
|
|
938
|
-
}),
|
|
939
|
-
let e =
|
|
985
|
+
}), ae = a(() => {
|
|
986
|
+
let e = W.value.textFormatting.highlight;
|
|
940
987
|
if (!(!e || e === "none")) return e.replace(/^#/, "").toUpperCase();
|
|
941
|
-
}),
|
|
988
|
+
}), oe = a(() => B(f.fontFamilies) ?? Ie), se = a(() => [
|
|
942
989
|
{
|
|
943
990
|
label: p("font.sansSerif"),
|
|
944
|
-
fonts:
|
|
991
|
+
fonts: oe.value.filter((e) => e.category === "sans-serif")
|
|
945
992
|
},
|
|
946
993
|
{
|
|
947
994
|
label: p("font.serif"),
|
|
948
|
-
fonts:
|
|
995
|
+
fonts: oe.value.filter((e) => e.category === "serif")
|
|
949
996
|
},
|
|
950
997
|
{
|
|
951
998
|
label: p("font.monospace"),
|
|
952
|
-
fonts:
|
|
999
|
+
fonts: oe.value.filter((e) => e.category === "monospace")
|
|
953
1000
|
},
|
|
954
1001
|
{
|
|
955
1002
|
label: p("font.other"),
|
|
956
|
-
fonts:
|
|
1003
|
+
fonts: oe.value.filter((e) => !e.category || e.category === "other")
|
|
957
1004
|
}
|
|
958
1005
|
]);
|
|
959
1006
|
function Z(e, ...t) {
|
|
@@ -964,139 +1011,143 @@ var ze = {
|
|
|
964
1011
|
console.warn("[Toolbar] command not found:", e);
|
|
965
1012
|
return;
|
|
966
1013
|
}
|
|
967
|
-
r(...t)(n.state, (e) => n.dispatch(e), n), n.hasFocus() || n.focus(),
|
|
1014
|
+
r(...t)(n.state, (e) => n.dispatch(e), n), n.hasFocus() || n.focus(), I.value = null;
|
|
968
1015
|
}
|
|
969
|
-
function
|
|
1016
|
+
function ce(e) {
|
|
970
1017
|
Z("setFontFamily", e);
|
|
971
1018
|
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
function ce() {
|
|
980
|
-
let e = W.value;
|
|
981
|
-
oe([...Pe].reverse().find((t) => t < e) || Math.max(1, e - 2));
|
|
982
|
-
}
|
|
983
|
-
function le(e) {
|
|
1019
|
+
let { onSizeFocus: le, onSizeInput: ue, commitFontSize: de, pickFontSize: fe, increaseFontSize: pe, decreaseFontSize: me } = He({
|
|
1020
|
+
currentFontSize: K,
|
|
1021
|
+
openDropdown: I,
|
|
1022
|
+
recomputeDropdownPos: U,
|
|
1023
|
+
execCommand: Z
|
|
1024
|
+
});
|
|
1025
|
+
function he(e) {
|
|
984
1026
|
if (typeof e == "object" && e.auto) {
|
|
985
1027
|
Z("clearTextColor");
|
|
986
1028
|
return;
|
|
987
1029
|
}
|
|
988
1030
|
Z("setTextColor", typeof e == "string" ? { rgb: e } : e);
|
|
989
1031
|
}
|
|
990
|
-
function
|
|
1032
|
+
function ge() {
|
|
991
1033
|
let e = f.view;
|
|
992
1034
|
e && (z(e.state, (t) => e.dispatch(t), e), e.hasFocus() || e.focus());
|
|
993
1035
|
}
|
|
994
|
-
function
|
|
1036
|
+
function _e(e) {
|
|
995
1037
|
Z("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
|
|
996
1038
|
}
|
|
997
|
-
function
|
|
998
|
-
g("apply-style", e),
|
|
1039
|
+
function ve(e) {
|
|
1040
|
+
g("apply-style", e), I.value = null;
|
|
999
1041
|
}
|
|
1000
|
-
function
|
|
1042
|
+
function ye(e) {
|
|
1001
1043
|
Z("setLineSpacing", e);
|
|
1002
1044
|
}
|
|
1003
|
-
function
|
|
1004
|
-
let t =
|
|
1045
|
+
function xe(e) {
|
|
1046
|
+
let t = W.value.paragraphFormatting.lineSpacing;
|
|
1005
1047
|
return t ? Math.abs(t - e) < 10 : e === 240;
|
|
1006
1048
|
}
|
|
1007
|
-
return (
|
|
1049
|
+
return (t, r) => n.view ? (v(), c("div", We, [
|
|
1008
1050
|
l("button", {
|
|
1009
1051
|
title: T(p)("formattingBar.undoShortcut"),
|
|
1010
1052
|
"aria-label": T(p)("formattingBar.undo"),
|
|
1011
|
-
disabled: !
|
|
1053
|
+
disabled: !te.value,
|
|
1012
1054
|
onMousedown: r[0] ||= M((e) => Z("undo"), ["prevent"])
|
|
1013
|
-
}, [d(
|
|
1055
|
+
}, [d(e, { name: "undo" })], 40, Ge),
|
|
1014
1056
|
l("button", {
|
|
1015
1057
|
title: T(p)("formattingBar.redoShortcut"),
|
|
1016
1058
|
"aria-label": T(p)("formattingBar.redo"),
|
|
1017
|
-
disabled: !
|
|
1059
|
+
disabled: !ne.value,
|
|
1018
1060
|
onMousedown: r[1] ||= M((e) => Z("redo"), ["prevent"])
|
|
1019
|
-
}, [d(
|
|
1020
|
-
r[
|
|
1061
|
+
}, [d(e, { name: "redo" })], 40, Ke),
|
|
1062
|
+
r[39] ||= l("span", { class: "divider" }, null, -1),
|
|
1021
1063
|
D.value ? (v(), c("div", {
|
|
1022
1064
|
key: 0,
|
|
1023
1065
|
class: "toolbar-dropdown zoom-group",
|
|
1024
1066
|
ref_key: "zoomDropdownRef",
|
|
1025
|
-
ref:
|
|
1067
|
+
ref: F
|
|
1026
1068
|
}, [
|
|
1027
1069
|
l("button", {
|
|
1028
1070
|
class: "size-btn",
|
|
1029
|
-
onMousedown: r[2] ||= M((
|
|
1071
|
+
onMousedown: r[2] ||= M((e) => t.$emit("zoom-out"), ["prevent"]),
|
|
1030
1072
|
disabled: y.value,
|
|
1031
1073
|
title: T(p)("zoom.zoomOut")
|
|
1032
|
-
}, " − ", 40,
|
|
1074
|
+
}, " − ", 40, qe),
|
|
1033
1075
|
l("button", {
|
|
1034
1076
|
class: "toolbar-dropdown__trigger zoom-trigger",
|
|
1035
|
-
onMousedown: r[3] ||= M((e) => T(
|
|
1077
|
+
onMousedown: r[3] ||= M((e) => T(H)("zoom"), ["prevent"]),
|
|
1078
|
+
"aria-expanded": T(I) === "zoom",
|
|
1079
|
+
"aria-haspopup": "listbox",
|
|
1036
1080
|
title: T(p)("zoom.zoomLevel")
|
|
1037
|
-
}, w(_.value) + "% ",
|
|
1081
|
+
}, [u(w(_.value) + "% ", 1), d(e, {
|
|
1082
|
+
class: "chevron",
|
|
1083
|
+
name: "arrow_drop_down",
|
|
1084
|
+
size: 16
|
|
1085
|
+
})], 40, Je),
|
|
1038
1086
|
l("button", {
|
|
1039
1087
|
class: "size-btn",
|
|
1040
|
-
onMousedown: r[4] ||= M((
|
|
1088
|
+
onMousedown: r[4] ||= M((e) => t.$emit("zoom-in"), ["prevent"]),
|
|
1041
1089
|
disabled: C.value,
|
|
1042
1090
|
title: T(p)("zoom.zoomIn")
|
|
1043
|
-
}, " + ", 40,
|
|
1044
|
-
T(
|
|
1091
|
+
}, " + ", 40, Ye),
|
|
1092
|
+
T(I) === "zoom" ? (v(), c("div", {
|
|
1045
1093
|
key: 0,
|
|
1046
|
-
style: h(T(
|
|
1094
|
+
style: h(T(V)),
|
|
1047
1095
|
class: "toolbar-dropdown__menu zoom-menu"
|
|
1048
|
-
}, [(v(!0), c(i, null, x(E.value, (
|
|
1049
|
-
key:
|
|
1050
|
-
class: m(["toolbar-dropdown__item", { active: _.value === Math.round(
|
|
1051
|
-
onMousedown: M((n) =>
|
|
1052
|
-
}, w(Math.round(
|
|
1096
|
+
}, [(v(!0), c(i, null, x(E.value, (e) => (v(), c("button", {
|
|
1097
|
+
key: e,
|
|
1098
|
+
class: m(["toolbar-dropdown__item", { active: _.value === Math.round(e * 100) }]),
|
|
1099
|
+
onMousedown: M((n) => t.$emit("zoom-set", e), ["prevent"])
|
|
1100
|
+
}, w(Math.round(e * 100)) + "% ", 43, Xe))), 128))], 4)) : s("", !0)
|
|
1053
1101
|
], 512)) : s("", !0),
|
|
1054
|
-
r[
|
|
1102
|
+
r[40] ||= l("span", { class: "divider" }, null, -1),
|
|
1055
1103
|
l("div", {
|
|
1056
1104
|
class: "toolbar-dropdown",
|
|
1057
1105
|
ref_key: "styleDropdownRef",
|
|
1058
1106
|
ref: O
|
|
1059
1107
|
}, [l("button", {
|
|
1060
1108
|
class: "toolbar-dropdown__trigger style-trigger",
|
|
1061
|
-
onMousedown: r[5] ||= M((e) => T(
|
|
1109
|
+
onMousedown: r[5] ||= M((e) => T(H)("style"), ["prevent"]),
|
|
1110
|
+
"aria-expanded": T(I) === "style",
|
|
1111
|
+
"aria-haspopup": "listbox",
|
|
1062
1112
|
title: T(p)("styles.selectAriaLabel")
|
|
1063
|
-
}, [u(w(
|
|
1113
|
+
}, [u(w(T(X)) + " ", 1), d(e, {
|
|
1064
1114
|
class: "chevron",
|
|
1065
1115
|
name: "arrow_drop_down",
|
|
1066
1116
|
size: 16
|
|
1067
|
-
})], 40,
|
|
1117
|
+
})], 40, Ze), T(I) === "style" ? (v(), c("div", {
|
|
1068
1118
|
key: 0,
|
|
1069
|
-
style: h(T(
|
|
1119
|
+
style: h(T(V)),
|
|
1070
1120
|
class: "toolbar-dropdown__menu style-menu"
|
|
1071
|
-
}, [(v(!0), c(i, null, x(T(
|
|
1121
|
+
}, [(v(!0), c(i, null, x(T(Y), (e) => (v(), c("button", {
|
|
1072
1122
|
key: e.id,
|
|
1073
|
-
class: m(["toolbar-dropdown__item", { active: (
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
r[33] ||= l("span", { class: "divider" }, null, -1),
|
|
1123
|
+
class: m(["toolbar-dropdown__item", { active: (W.value.paragraphFormatting.styleId || "Normal") === e.id }]),
|
|
1124
|
+
onMousedown: M((t) => ve(e.id), ["prevent"])
|
|
1125
|
+
}, [l("span", { style: h(e.previewStyle) }, w(e.label), 5)], 42, Qe))), 128))], 4)) : s("", !0)], 512),
|
|
1126
|
+
r[41] ||= l("span", { class: "divider" }, null, -1),
|
|
1078
1127
|
l("div", {
|
|
1079
1128
|
class: "toolbar-dropdown",
|
|
1080
1129
|
ref_key: "fontDropdownRef",
|
|
1081
1130
|
ref: k
|
|
1082
1131
|
}, [l("button", {
|
|
1083
1132
|
class: "toolbar-dropdown__trigger font-trigger",
|
|
1084
|
-
onMousedown: r[6] ||= M((e) => T(
|
|
1133
|
+
onMousedown: r[6] ||= M((e) => T(H)("font"), ["prevent"]),
|
|
1134
|
+
"aria-expanded": T(I) === "font",
|
|
1135
|
+
"aria-haspopup": "listbox",
|
|
1085
1136
|
title: T(p)("font.selectAriaLabel")
|
|
1086
|
-
}, [u(w(
|
|
1137
|
+
}, [u(w(G.value) + " ", 1), d(e, {
|
|
1087
1138
|
class: "chevron",
|
|
1088
1139
|
name: "arrow_drop_down",
|
|
1089
1140
|
size: 16
|
|
1090
|
-
})], 40,
|
|
1141
|
+
})], 40, $e), T(I) === "font" ? (v(), c("div", {
|
|
1091
1142
|
key: 0,
|
|
1092
|
-
style: h(T(
|
|
1143
|
+
style: h(T(V)),
|
|
1093
1144
|
class: "toolbar-dropdown__menu font-menu"
|
|
1094
|
-
}, [(v(!0), c(i, null, x(
|
|
1145
|
+
}, [(v(!0), c(i, null, x(se.value, (e) => (v(), c(i, { key: e.label }, [e.fonts.length > 0 ? (v(), c("div", et, w(e.label), 1)) : s("", !0), (v(!0), c(i, null, x(e.fonts, (e) => (v(), c("button", {
|
|
1095
1146
|
key: e.name,
|
|
1096
|
-
class: m(["toolbar-dropdown__item", { active:
|
|
1147
|
+
class: m(["toolbar-dropdown__item", { active: G.value === e.name }]),
|
|
1097
1148
|
style: h({ fontFamily: e.fontFamily }),
|
|
1098
|
-
onMousedown: M((t) =>
|
|
1099
|
-
}, w(e.name), 47,
|
|
1149
|
+
onMousedown: M((t) => ce(e.name), ["prevent"])
|
|
1150
|
+
}, w(e.name), 47, tt))), 128))], 64))), 128))], 4)) : s("", !0)], 512),
|
|
1100
1151
|
l("div", {
|
|
1101
1152
|
class: "toolbar-dropdown font-size-group",
|
|
1102
1153
|
ref_key: "sizeDropdownRef",
|
|
@@ -1104,218 +1155,238 @@ var ze = {
|
|
|
1104
1155
|
}, [
|
|
1105
1156
|
l("button", {
|
|
1106
1157
|
class: "size-btn",
|
|
1107
|
-
onMousedown: M(
|
|
1158
|
+
onMousedown: r[7] ||= M((...e) => T(me) && T(me)(...e), ["prevent"]),
|
|
1108
1159
|
title: T(p)("fontSize.decrease")
|
|
1109
|
-
}, " − ", 40,
|
|
1110
|
-
l("
|
|
1111
|
-
class: "
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1160
|
+
}, " − ", 40, nt),
|
|
1161
|
+
l("input", {
|
|
1162
|
+
class: "size-trigger size-input",
|
|
1163
|
+
type: "text",
|
|
1164
|
+
value: K.value,
|
|
1165
|
+
title: T(p)("fontSize.label"),
|
|
1166
|
+
onMousedown: r[8] ||= M(() => {}, ["stop"]),
|
|
1167
|
+
onFocus: r[9] ||= (...e) => T(le) && T(le)(...e),
|
|
1168
|
+
"aria-expanded": T(I) === "size",
|
|
1169
|
+
"aria-haspopup": "listbox",
|
|
1170
|
+
onInput: r[10] ||= (...e) => T(ue) && T(ue)(...e),
|
|
1171
|
+
onKeydown: [
|
|
1172
|
+
r[11] ||= j(M((e) => T(pe)(), ["prevent", "stop"]), ["up"]),
|
|
1173
|
+
r[12] ||= j(M((e) => T(me)(), ["prevent", "stop"]), ["down"]),
|
|
1174
|
+
r[13] ||= j(M((e) => T(de)(e), ["prevent"]), ["enter"])
|
|
1175
|
+
],
|
|
1176
|
+
onBlur: r[14] ||= (e) => T(de)(e)
|
|
1177
|
+
}, null, 40, rt),
|
|
1115
1178
|
l("button", {
|
|
1116
1179
|
class: "size-btn",
|
|
1117
|
-
onMousedown: M(
|
|
1180
|
+
onMousedown: r[15] ||= M((...e) => T(pe) && T(pe)(...e), ["prevent"]),
|
|
1118
1181
|
title: T(p)("fontSize.increase")
|
|
1119
|
-
}, " + ", 40,
|
|
1120
|
-
T(
|
|
1182
|
+
}, " + ", 40, it),
|
|
1183
|
+
T(I) === "size" ? (v(), c("div", {
|
|
1121
1184
|
key: 0,
|
|
1122
|
-
style: h(T(
|
|
1185
|
+
style: h(T(V)),
|
|
1123
1186
|
class: "toolbar-dropdown__menu size-menu"
|
|
1124
|
-
}, [(v(!0), c(i, null, x(T(
|
|
1187
|
+
}, [(v(!0), c(i, null, x(T(Le), (e) => (v(), c("button", {
|
|
1125
1188
|
key: e,
|
|
1126
|
-
class: m(["toolbar-dropdown__item", { active:
|
|
1127
|
-
onMousedown: M((t) =>
|
|
1128
|
-
}, w(e), 43,
|
|
1189
|
+
class: m(["toolbar-dropdown__item", { active: K.value === e }]),
|
|
1190
|
+
onMousedown: M((t) => T(fe)(e), ["prevent"])
|
|
1191
|
+
}, w(e), 43, at))), 128))], 4)) : s("", !0)
|
|
1129
1192
|
], 512),
|
|
1130
|
-
r[
|
|
1193
|
+
r[42] ||= l("span", { class: "divider" }, null, -1),
|
|
1131
1194
|
l("button", {
|
|
1132
1195
|
title: T(p)("formattingBar.boldShortcut"),
|
|
1133
1196
|
"aria-label": T(p)("formattingBar.bold"),
|
|
1134
|
-
class: m({ active:
|
|
1135
|
-
onMousedown: r[
|
|
1136
|
-
}, [d(
|
|
1197
|
+
class: m({ active: W.value.textFormatting.bold }),
|
|
1198
|
+
onMousedown: r[16] ||= M((e) => Z("toggleBold"), ["prevent"])
|
|
1199
|
+
}, [d(e, { name: "format_bold" })], 42, ot),
|
|
1137
1200
|
l("button", {
|
|
1138
1201
|
title: T(p)("formattingBar.italicShortcut"),
|
|
1139
1202
|
"aria-label": T(p)("formattingBar.italic"),
|
|
1140
|
-
class: m({ active:
|
|
1141
|
-
onMousedown: r[
|
|
1142
|
-
}, [d(
|
|
1203
|
+
class: m({ active: W.value.textFormatting.italic }),
|
|
1204
|
+
onMousedown: r[17] ||= M((e) => Z("toggleItalic"), ["prevent"])
|
|
1205
|
+
}, [d(e, { name: "format_italic" })], 42, st),
|
|
1143
1206
|
l("button", {
|
|
1144
1207
|
title: T(p)("formattingBar.underlineShortcut"),
|
|
1145
1208
|
"aria-label": T(p)("formattingBar.underline"),
|
|
1146
|
-
class: m({ active: !!
|
|
1147
|
-
onMousedown: r[
|
|
1148
|
-
}, [d(
|
|
1209
|
+
class: m({ active: !!W.value.textFormatting.underline }),
|
|
1210
|
+
onMousedown: r[18] ||= M((e) => Z("toggleUnderline"), ["prevent"])
|
|
1211
|
+
}, [d(e, { name: "format_underlined" })], 42, ct),
|
|
1149
1212
|
l("button", {
|
|
1150
1213
|
title: T(p)("formattingBar.strikethrough"),
|
|
1151
1214
|
"aria-label": T(p)("formattingBar.strikethrough"),
|
|
1152
|
-
class: m({ active:
|
|
1153
|
-
onMousedown: r[
|
|
1154
|
-
}, [d(
|
|
1155
|
-
d(
|
|
1215
|
+
class: m({ active: W.value.textFormatting.strike }),
|
|
1216
|
+
onMousedown: r[19] ||= M((e) => Z("toggleStrike"), ["prevent"])
|
|
1217
|
+
}, [d(e, { name: "strikethrough_s" })], 42, lt),
|
|
1218
|
+
d(be, {
|
|
1156
1219
|
mode: "text",
|
|
1157
|
-
value:
|
|
1220
|
+
value: ie.value,
|
|
1158
1221
|
theme: n.theme ?? null,
|
|
1159
|
-
onChange:
|
|
1222
|
+
onChange: he
|
|
1160
1223
|
}, null, 8, ["value", "theme"]),
|
|
1161
|
-
d(
|
|
1224
|
+
d(be, {
|
|
1162
1225
|
mode: "highlight",
|
|
1163
|
-
value:
|
|
1226
|
+
value: ae.value,
|
|
1164
1227
|
theme: n.theme ?? null,
|
|
1165
|
-
onChange:
|
|
1228
|
+
onChange: _e
|
|
1166
1229
|
}, null, 8, ["value", "theme"]),
|
|
1167
1230
|
l("button", {
|
|
1168
1231
|
title: T(p)("formattingBar.insertLinkShortcut"),
|
|
1169
1232
|
"aria-label": T(p)("formattingBar.insertLink"),
|
|
1170
|
-
onMousedown: r[
|
|
1171
|
-
}, [d(
|
|
1233
|
+
onMousedown: r[20] ||= M((e) => t.$emit("insert-link"), ["prevent"])
|
|
1234
|
+
}, [d(e, { name: "link" })], 40, ut),
|
|
1172
1235
|
l("button", {
|
|
1173
1236
|
title: T(p)("formattingBar.superscriptShortcut"),
|
|
1174
1237
|
"aria-label": T(p)("formattingBar.superscript"),
|
|
1175
|
-
class: m({ active:
|
|
1176
|
-
onMousedown: r[
|
|
1177
|
-
}, [d(
|
|
1238
|
+
class: m({ active: W.value.textFormatting.vertAlign === "superscript" }),
|
|
1239
|
+
onMousedown: r[21] ||= M((e) => Z("toggleSuperscript"), ["prevent"])
|
|
1240
|
+
}, [d(e, { name: "superscript" })], 42, dt),
|
|
1178
1241
|
l("button", {
|
|
1179
1242
|
title: T(p)("formattingBar.subscriptShortcut"),
|
|
1180
1243
|
"aria-label": T(p)("formattingBar.subscript"),
|
|
1181
|
-
class: m({ active:
|
|
1182
|
-
onMousedown: r[
|
|
1183
|
-
}, [d(
|
|
1184
|
-
r[
|
|
1244
|
+
class: m({ active: W.value.textFormatting.vertAlign === "subscript" }),
|
|
1245
|
+
onMousedown: r[22] ||= M((e) => Z("toggleSubscript"), ["prevent"])
|
|
1246
|
+
}, [d(e, { name: "subscript" })], 42, ft),
|
|
1247
|
+
r[43] ||= l("span", { class: "divider" }, null, -1),
|
|
1185
1248
|
l("div", {
|
|
1186
1249
|
class: "toolbar-dropdown",
|
|
1187
1250
|
ref_key: "alignDropdownRef",
|
|
1188
|
-
ref:
|
|
1251
|
+
ref: N
|
|
1189
1252
|
}, [l("button", {
|
|
1190
1253
|
class: "toolbar-dropdown__trigger align-trigger",
|
|
1191
|
-
onMousedown: r[
|
|
1254
|
+
onMousedown: r[23] ||= M((e) => T(H)("align"), ["prevent"]),
|
|
1255
|
+
"aria-expanded": T(I) === "align",
|
|
1256
|
+
"aria-haspopup": "listbox",
|
|
1192
1257
|
title: T(p)("formattingBar.groups.alignment")
|
|
1193
|
-
}, [d(
|
|
1258
|
+
}, [d(e, { name: J.value }, null, 8, ["name"]), d(e, {
|
|
1194
1259
|
class: "chevron",
|
|
1195
1260
|
name: "arrow_drop_down",
|
|
1196
1261
|
size: 16
|
|
1197
|
-
})], 40,
|
|
1262
|
+
})], 40, pt), T(I) === "align" ? (v(), c("div", {
|
|
1198
1263
|
key: 0,
|
|
1199
|
-
style: h(T(
|
|
1200
|
-
class: "toolbar-dropdown__menu align-
|
|
1264
|
+
style: h(T(V)),
|
|
1265
|
+
class: "toolbar-dropdown__menu align-strip"
|
|
1201
1266
|
}, [
|
|
1202
1267
|
l("button", {
|
|
1203
|
-
class: m(["
|
|
1204
|
-
|
|
1205
|
-
|
|
1268
|
+
class: m(["align-strip__btn", { active: q.value === "left" }]),
|
|
1269
|
+
title: `${T(p)("alignment.alignLeft")} (${T(p)("alignment.alignLeftShortcut")})`,
|
|
1270
|
+
onMousedown: r[24] ||= M((e) => {
|
|
1271
|
+
Z("alignLeft"), I.value = null;
|
|
1206
1272
|
}, ["prevent"])
|
|
1207
|
-
}, [d(
|
|
1273
|
+
}, [d(e, {
|
|
1208
1274
|
name: "format_align_left",
|
|
1209
1275
|
size: 18
|
|
1210
|
-
}),
|
|
1276
|
+
})], 42, mt),
|
|
1211
1277
|
l("button", {
|
|
1212
|
-
class: m(["
|
|
1213
|
-
|
|
1214
|
-
|
|
1278
|
+
class: m(["align-strip__btn", { active: q.value === "center" }]),
|
|
1279
|
+
title: `${T(p)("alignment.center")} (${T(p)("alignment.centerShortcut")})`,
|
|
1280
|
+
onMousedown: r[25] ||= M((e) => {
|
|
1281
|
+
Z("alignCenter"), I.value = null;
|
|
1215
1282
|
}, ["prevent"])
|
|
1216
|
-
}, [d(
|
|
1283
|
+
}, [d(e, {
|
|
1217
1284
|
name: "format_align_center",
|
|
1218
1285
|
size: 18
|
|
1219
|
-
}),
|
|
1286
|
+
})], 42, ht),
|
|
1220
1287
|
l("button", {
|
|
1221
|
-
class: m(["
|
|
1222
|
-
|
|
1223
|
-
|
|
1288
|
+
class: m(["align-strip__btn", { active: q.value === "right" }]),
|
|
1289
|
+
title: `${T(p)("alignment.alignRight")} (${T(p)("alignment.alignRightShortcut")})`,
|
|
1290
|
+
onMousedown: r[26] ||= M((e) => {
|
|
1291
|
+
Z("alignRight"), I.value = null;
|
|
1224
1292
|
}, ["prevent"])
|
|
1225
|
-
}, [d(
|
|
1293
|
+
}, [d(e, {
|
|
1226
1294
|
name: "format_align_right",
|
|
1227
1295
|
size: 18
|
|
1228
|
-
}),
|
|
1296
|
+
})], 42, gt),
|
|
1229
1297
|
l("button", {
|
|
1230
|
-
class: m(["
|
|
1231
|
-
|
|
1232
|
-
|
|
1298
|
+
class: m(["align-strip__btn", { active: q.value === "both" }]),
|
|
1299
|
+
title: `${T(p)("alignment.justify")} (${T(p)("alignment.justifyShortcut")})`,
|
|
1300
|
+
onMousedown: r[27] ||= M((e) => {
|
|
1301
|
+
Z("alignJustify"), I.value = null;
|
|
1233
1302
|
}, ["prevent"])
|
|
1234
|
-
}, [d(
|
|
1303
|
+
}, [d(e, {
|
|
1235
1304
|
name: "format_align_justify",
|
|
1236
1305
|
size: 18
|
|
1237
|
-
}),
|
|
1306
|
+
})], 42, _t)
|
|
1238
1307
|
], 4)) : s("", !0)], 512),
|
|
1239
1308
|
l("button", {
|
|
1240
1309
|
title: T(p)("lists.bulletList"),
|
|
1241
1310
|
"aria-label": T(p)("lists.bulletList"),
|
|
1242
|
-
class: m({ active:
|
|
1243
|
-
onMousedown: r[
|
|
1244
|
-
}, [d(
|
|
1311
|
+
class: m({ active: W.value.inList && W.value.listType === "bullet" }),
|
|
1312
|
+
onMousedown: r[28] ||= M((e) => Z("toggleBulletList"), ["prevent"])
|
|
1313
|
+
}, [d(e, { name: "format_list_bulleted" })], 42, vt),
|
|
1245
1314
|
l("button", {
|
|
1246
1315
|
title: T(p)("lists.numberedList"),
|
|
1247
1316
|
"aria-label": T(p)("lists.numberedList"),
|
|
1248
|
-
class: m({ active:
|
|
1249
|
-
onMousedown: r[
|
|
1250
|
-
}, [d(
|
|
1317
|
+
class: m({ active: W.value.inList && W.value.listType === "numbered" }),
|
|
1318
|
+
onMousedown: r[29] ||= M((e) => Z("toggleNumberedList"), ["prevent"])
|
|
1319
|
+
}, [d(e, { name: "format_list_numbered" })], 42, yt),
|
|
1251
1320
|
l("button", {
|
|
1252
1321
|
title: T(p)("lists.decreaseIndent"),
|
|
1253
1322
|
"aria-label": T(p)("lists.decreaseIndent"),
|
|
1254
|
-
disabled: !
|
|
1255
|
-
onMousedown: r[
|
|
1256
|
-
}, [d(
|
|
1323
|
+
disabled: !re.value,
|
|
1324
|
+
onMousedown: r[30] ||= M((e) => Z("outdent"), ["prevent"])
|
|
1325
|
+
}, [d(e, { name: "format_indent_decrease" })], 40, bt),
|
|
1257
1326
|
l("button", {
|
|
1258
1327
|
title: T(p)("lists.increaseIndent"),
|
|
1259
1328
|
"aria-label": T(p)("lists.increaseIndent"),
|
|
1260
|
-
onMousedown: r[
|
|
1261
|
-
}, [d(
|
|
1329
|
+
onMousedown: r[31] ||= M((e) => Z("indent"), ["prevent"])
|
|
1330
|
+
}, [d(e, { name: "format_indent_increase" })], 40, xt),
|
|
1262
1331
|
l("div", {
|
|
1263
1332
|
class: "toolbar-dropdown",
|
|
1264
1333
|
ref_key: "spacingDropdownRef",
|
|
1265
|
-
ref:
|
|
1334
|
+
ref: P
|
|
1266
1335
|
}, [l("button", {
|
|
1267
1336
|
class: "toolbar-dropdown__trigger",
|
|
1268
|
-
onMousedown: r[
|
|
1337
|
+
onMousedown: r[32] ||= M((e) => T(H)("spacing"), ["prevent"]),
|
|
1338
|
+
"aria-expanded": T(I) === "spacing",
|
|
1339
|
+
"aria-haspopup": "listbox",
|
|
1269
1340
|
title: T(p)("lineSpacing.label")
|
|
1270
|
-
}, [d(
|
|
1341
|
+
}, [d(e, { name: "format_line_spacing" }), d(e, {
|
|
1271
1342
|
class: "chevron",
|
|
1272
1343
|
name: "arrow_drop_down",
|
|
1273
1344
|
size: 16
|
|
1274
|
-
})], 40,
|
|
1345
|
+
})], 40, St), T(I) === "spacing" ? (v(), c("div", {
|
|
1275
1346
|
key: 0,
|
|
1276
|
-
style: h(T(
|
|
1347
|
+
style: h(T(V)),
|
|
1277
1348
|
class: "toolbar-dropdown__menu"
|
|
1278
|
-
}, [(v(!0), c(i, null, x(T(
|
|
1349
|
+
}, [(v(!0), c(i, null, x(T(ze), (e) => (v(), c("button", {
|
|
1279
1350
|
key: e.value,
|
|
1280
|
-
class: m(["toolbar-dropdown__item", { active:
|
|
1281
|
-
onMousedown: M((t) =>
|
|
1282
|
-
}, w(e.labelKey ? T(p)(e.labelKey) : e.label), 43,
|
|
1351
|
+
class: m(["toolbar-dropdown__item", { active: xe(e.value) }]),
|
|
1352
|
+
onMousedown: M((t) => ye(e.value), ["prevent"])
|
|
1353
|
+
}, w(e.labelKey ? T(p)(e.labelKey) : e.label), 43, Ct))), 128))], 4)) : s("", !0)], 512),
|
|
1283
1354
|
l("button", {
|
|
1284
1355
|
title: T(p)("formattingBar.clearFormatting"),
|
|
1285
1356
|
"aria-label": T(p)("formattingBar.clearFormatting"),
|
|
1286
|
-
onMousedown: M(
|
|
1287
|
-
}, [d(
|
|
1288
|
-
r[
|
|
1357
|
+
onMousedown: M(ge, ["prevent"])
|
|
1358
|
+
}, [d(e, { name: "format_clear" })], 40, wt),
|
|
1359
|
+
r[44] ||= l("span", { class: "divider" }, null, -1),
|
|
1289
1360
|
l("button", {
|
|
1290
1361
|
title: T(p)("formattingBar.commentsAndChanges"),
|
|
1291
1362
|
"aria-label": T(p)("formattingBar.commentsAndChanges"),
|
|
1292
1363
|
class: m({ active: n.commentsSidebarOpen }),
|
|
1293
|
-
onMousedown: r[
|
|
1294
|
-
}, [d(
|
|
1364
|
+
onMousedown: r[33] ||= M((e) => t.$emit("toggle-sidebar"), ["prevent"])
|
|
1365
|
+
}, [d(e, { name: "comment" })], 42, Tt),
|
|
1295
1366
|
n.imageContext ? (v(), c(i, { key: 1 }, [
|
|
1296
|
-
r[
|
|
1297
|
-
d(
|
|
1367
|
+
r[38] ||= l("span", { class: "divider" }, null, -1),
|
|
1368
|
+
d(Pe, {
|
|
1298
1369
|
"image-context": n.imageContext,
|
|
1299
|
-
onChange: r[
|
|
1370
|
+
onChange: r[34] ||= (e) => t.$emit("image-wrap-type", e)
|
|
1300
1371
|
}, null, 8, ["image-context"]),
|
|
1301
|
-
d(
|
|
1372
|
+
d(Fe, { onTransform: r[35] ||= (e) => t.$emit("image-transform", e) }),
|
|
1302
1373
|
l("button", {
|
|
1303
1374
|
title: T(p)("formattingBar.imagePropertiesShortcut"),
|
|
1304
1375
|
"aria-label": T(p)("formattingBar.imageProperties"),
|
|
1305
|
-
onMousedown: r[
|
|
1306
|
-
}, [d(
|
|
1376
|
+
onMousedown: r[36] ||= M((e) => t.$emit("image-properties"), ["prevent"])
|
|
1377
|
+
}, [d(e, { name: "tune" })], 40, Et)
|
|
1307
1378
|
], 64)) : s("", !0),
|
|
1308
|
-
S(
|
|
1309
|
-
r[
|
|
1310
|
-
n.editorMode ? (v(), o(
|
|
1379
|
+
S(t.$slots, "table-context", {}, void 0, !0),
|
|
1380
|
+
r[45] ||= l("span", { class: "divider" }, null, -1),
|
|
1381
|
+
n.editorMode ? (v(), o(ke, {
|
|
1311
1382
|
key: 2,
|
|
1312
1383
|
"model-value": n.editorMode,
|
|
1313
|
-
"onUpdate:modelValue": r[
|
|
1384
|
+
"onUpdate:modelValue": r[37] ||= (e) => t.$emit("mode-change", e)
|
|
1314
1385
|
}, null, 8, ["model-value"])) : s("", !0),
|
|
1315
|
-
S(
|
|
1386
|
+
S(t.$slots, "toolbar-extra", {}, void 0, !0)
|
|
1316
1387
|
])) : s("", !0);
|
|
1317
1388
|
}
|
|
1318
|
-
}), [["__scopeId", "data-v-
|
|
1389
|
+
}), [["__scopeId", "data-v-8271d639"]]), Ot = /* @__PURE__ */ f({
|
|
1319
1390
|
__name: "TableCellFillPicker",
|
|
1320
1391
|
props: {
|
|
1321
1392
|
disabled: { type: Boolean },
|
|
@@ -1323,16 +1394,16 @@ var ze = {
|
|
|
1323
1394
|
value: {}
|
|
1324
1395
|
},
|
|
1325
1396
|
emits: ["change"],
|
|
1326
|
-
setup(
|
|
1327
|
-
let r = n, { t: i } =
|
|
1397
|
+
setup(e, { emit: n }) {
|
|
1398
|
+
let r = n, { t: i } = t();
|
|
1328
1399
|
function a(e) {
|
|
1329
1400
|
typeof e == "string" && r("change", e === "none" ? "" : e.replace(/^#/, ""));
|
|
1330
1401
|
}
|
|
1331
|
-
return (
|
|
1402
|
+
return (t, n) => (v(), o(be, {
|
|
1332
1403
|
mode: "highlight",
|
|
1333
|
-
value:
|
|
1334
|
-
theme:
|
|
1335
|
-
disabled:
|
|
1404
|
+
value: e.value,
|
|
1405
|
+
theme: e.theme ?? null,
|
|
1406
|
+
disabled: e.disabled,
|
|
1336
1407
|
title: T(i)("table.cellFillColor"),
|
|
1337
1408
|
icon: "format_color_fill",
|
|
1338
1409
|
"auto-label": T(i)("colorPicker.noColor"),
|
|
@@ -1345,11 +1416,11 @@ var ze = {
|
|
|
1345
1416
|
"auto-label"
|
|
1346
1417
|
]));
|
|
1347
1418
|
}
|
|
1348
|
-
}),
|
|
1419
|
+
}), kt = ["disabled", "onClick"], At = { class: "docx-tbp__panel" }, jt = ["title", "onClick"], Mt = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
1349
1420
|
__name: "TableBorderPicker",
|
|
1350
1421
|
props: { disabled: { type: Boolean } },
|
|
1351
1422
|
emits: ["change"],
|
|
1352
|
-
setup(
|
|
1423
|
+
setup(t, { emit: n }) {
|
|
1353
1424
|
let r = n, a = b(!1), s = [
|
|
1354
1425
|
{
|
|
1355
1426
|
value: "all",
|
|
@@ -1413,27 +1484,27 @@ var ze = {
|
|
|
1413
1484
|
trigger: k(({ toggle: n }) => [l("button", {
|
|
1414
1485
|
type: "button",
|
|
1415
1486
|
class: "docx-tbp__btn",
|
|
1416
|
-
disabled:
|
|
1487
|
+
disabled: t.disabled,
|
|
1417
1488
|
title: "Borders",
|
|
1418
1489
|
onClick: M(n, ["prevent"])
|
|
1419
|
-
}, [d(
|
|
1490
|
+
}, [d(e, {
|
|
1420
1491
|
name: "border_all",
|
|
1421
1492
|
size: 20
|
|
1422
|
-
})], 8,
|
|
1423
|
-
panel: k(() => [l("div",
|
|
1424
|
-
key:
|
|
1493
|
+
})], 8, kt)]),
|
|
1494
|
+
panel: k(() => [l("div", At, [(v(), c(i, null, x(s, (t) => l("button", {
|
|
1495
|
+
key: t.value,
|
|
1425
1496
|
type: "button",
|
|
1426
1497
|
class: "docx-tbp__option",
|
|
1427
|
-
title:
|
|
1428
|
-
onClick: M((
|
|
1429
|
-
}, [d(
|
|
1430
|
-
name:
|
|
1498
|
+
title: t.label,
|
|
1499
|
+
onClick: M((e) => u(t.value), ["prevent"])
|
|
1500
|
+
}, [d(e, {
|
|
1501
|
+
name: t.icon,
|
|
1431
1502
|
size: 20
|
|
1432
|
-
}, null, 8, ["name"])], 8,
|
|
1503
|
+
}, null, 8, ["name"])], 8, jt)), 64))])]),
|
|
1433
1504
|
_: 1
|
|
1434
1505
|
}, 8, ["open"]));
|
|
1435
1506
|
}
|
|
1436
|
-
}), [["__scopeId", "data-v-
|
|
1507
|
+
}), [["__scopeId", "data-v-47032801"]]), Nt = /* @__PURE__ */ f({
|
|
1437
1508
|
__name: "TableBorderColorPicker",
|
|
1438
1509
|
props: {
|
|
1439
1510
|
disabled: { type: Boolean },
|
|
@@ -1441,16 +1512,16 @@ var ze = {
|
|
|
1441
1512
|
value: {}
|
|
1442
1513
|
},
|
|
1443
1514
|
emits: ["change"],
|
|
1444
|
-
setup(
|
|
1445
|
-
let r = n, { t: i } =
|
|
1515
|
+
setup(e, { emit: n }) {
|
|
1516
|
+
let r = n, { t: i } = t();
|
|
1446
1517
|
function a(e) {
|
|
1447
1518
|
typeof e == "string" ? r("change", e.replace(/^#/, "")) : e.rgb ? r("change", e.rgb.replace(/^#/, "")) : e.auto && r("change", "000000");
|
|
1448
1519
|
}
|
|
1449
|
-
return (
|
|
1520
|
+
return (t, n) => (v(), o(be, {
|
|
1450
1521
|
mode: "border",
|
|
1451
|
-
value:
|
|
1452
|
-
theme:
|
|
1453
|
-
disabled:
|
|
1522
|
+
value: e.value,
|
|
1523
|
+
theme: e.theme ?? null,
|
|
1524
|
+
disabled: e.disabled,
|
|
1454
1525
|
title: T(i)("table.borderColor"),
|
|
1455
1526
|
onChange: a
|
|
1456
1527
|
}, null, 8, [
|
|
@@ -1460,11 +1531,11 @@ var ze = {
|
|
|
1460
1531
|
"title"
|
|
1461
1532
|
]));
|
|
1462
1533
|
}
|
|
1463
|
-
}),
|
|
1534
|
+
}), Pt = ["disabled", "onClick"], Ft = { class: "docx-tbwidth__panel" }, It = ["onClick"], Lt = { class: "docx-tbwidth__label" }, Rt = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
1464
1535
|
__name: "TableBorderWidthPicker",
|
|
1465
1536
|
props: { disabled: { type: Boolean } },
|
|
1466
1537
|
emits: ["change"],
|
|
1467
|
-
setup(
|
|
1538
|
+
setup(t, { emit: n }) {
|
|
1468
1539
|
let r = n, a = b(!1), s = [
|
|
1469
1540
|
{
|
|
1470
1541
|
label: "0.5pt",
|
|
@@ -1518,14 +1589,14 @@ var ze = {
|
|
|
1518
1589
|
trigger: k(({ toggle: n }) => [l("button", {
|
|
1519
1590
|
type: "button",
|
|
1520
1591
|
class: "docx-tbwidth__btn",
|
|
1521
|
-
disabled:
|
|
1592
|
+
disabled: t.disabled,
|
|
1522
1593
|
title: "Border width",
|
|
1523
1594
|
onClick: M(n, ["prevent"])
|
|
1524
|
-
}, [d(
|
|
1595
|
+
}, [d(e, {
|
|
1525
1596
|
name: "line_weight",
|
|
1526
1597
|
size: 20
|
|
1527
|
-
})], 8,
|
|
1528
|
-
panel: k(() => [l("div",
|
|
1598
|
+
})], 8, Pt)]),
|
|
1599
|
+
panel: k(() => [l("div", Ft, [(v(), c(i, null, x(s, (e) => l("button", {
|
|
1529
1600
|
key: e.eighths,
|
|
1530
1601
|
type: "button",
|
|
1531
1602
|
class: "docx-tbwidth__option",
|
|
@@ -1533,27 +1604,27 @@ var ze = {
|
|
|
1533
1604
|
}, [l("span", {
|
|
1534
1605
|
class: "docx-tbwidth__preview",
|
|
1535
1606
|
style: h({ borderTopWidth: e.previewPx + "px" })
|
|
1536
|
-
}, null, 4), l("span",
|
|
1607
|
+
}, null, 4), l("span", Lt, w(e.label), 1)], 8, It)), 64))])]),
|
|
1537
1608
|
_: 1
|
|
1538
1609
|
}, 8, ["open"]));
|
|
1539
1610
|
}
|
|
1540
|
-
}), [["__scopeId", "data-v-
|
|
1611
|
+
}), [["__scopeId", "data-v-f11ca0b1"]]), zt = [
|
|
1541
1612
|
"disabled",
|
|
1542
1613
|
"title",
|
|
1543
1614
|
"onClick"
|
|
1544
|
-
],
|
|
1615
|
+
], Bt = ["aria-label"], Vt = ["disabled"], Ht = ["disabled"], Ut = ["disabled"], Wt = ["disabled"], Gt = { class: "docx-tmore__section-label" }, Kt = { class: "docx-tmore__icon-row" }, qt = ["title"], Jt = ["title"], Yt = ["title"], Xt = { class: "docx-tmore__section-label" }, Zt = { class: "docx-tmore__icon-row" }, Qt = ["title"], $t = ["title"], en = ["title"], tn = { class: "docx-tmore__grow" }, nn = {
|
|
1545
1616
|
key: 0,
|
|
1546
1617
|
class: "docx-tmore__sub"
|
|
1547
|
-
},
|
|
1618
|
+
}, rn = { class: "docx-tmore__margin-grid" }, an = { class: "docx-tmore__field-label" }, on = ["onUpdate:modelValue"], sn = { class: "docx-tmore__grow" }, cn = {
|
|
1548
1619
|
key: 1,
|
|
1549
1620
|
class: "docx-tmore__sub"
|
|
1550
|
-
},
|
|
1621
|
+
}, ln = { class: "docx-tmore__row-field" }, un = { class: "docx-tmore__field-label" }, dn = { value: "auto" }, fn = { value: "atLeast" }, pn = { value: "exact" }, mn = {
|
|
1551
1622
|
key: 0,
|
|
1552
1623
|
class: "docx-tmore__row-field"
|
|
1553
|
-
},
|
|
1624
|
+
}, hn = { class: "docx-tmore__field-label" }, gn = { class: "docx-tmore__grow" }, _n = {
|
|
1554
1625
|
key: 2,
|
|
1555
1626
|
class: "docx-tmore__sub docx-tmore__sub--list"
|
|
1556
|
-
},
|
|
1627
|
+
}, vn = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
1557
1628
|
__name: "TableMoreDropdown",
|
|
1558
1629
|
props: {
|
|
1559
1630
|
disabled: {
|
|
@@ -1579,7 +1650,7 @@ var ze = {
|
|
|
1579
1650
|
"row-height"
|
|
1580
1651
|
],
|
|
1581
1652
|
setup(n, { emit: r }) {
|
|
1582
|
-
let a = n, u = r, { t: f } =
|
|
1653
|
+
let a = n, u = r, { t: f } = t(), p = b(!1), h = b(!1), g = b(!1), _ = b(!1), S = y({
|
|
1583
1654
|
top: 0,
|
|
1584
1655
|
bottom: 0,
|
|
1585
1656
|
left: 108,
|
|
@@ -1616,22 +1687,22 @@ var ze = {
|
|
|
1616
1687
|
function R(e) {
|
|
1617
1688
|
u("cell-text-direction", e), p.value = !1;
|
|
1618
1689
|
}
|
|
1619
|
-
return (
|
|
1690
|
+
return (t, r) => (v(), o(Q, {
|
|
1620
1691
|
open: p.value,
|
|
1621
1692
|
placement: "bottom-right",
|
|
1622
1693
|
"onUpdate:open": r[34] ||= (e) => p.value = e,
|
|
1623
1694
|
onClose: r[35] ||= (e) => p.value = !1
|
|
1624
1695
|
}, {
|
|
1625
|
-
trigger: k(({ toggle:
|
|
1696
|
+
trigger: k(({ toggle: t }) => [l("button", {
|
|
1626
1697
|
type: "button",
|
|
1627
1698
|
class: m(["docx-tmore__btn", { "docx-tmore__btn--open": p.value }]),
|
|
1628
1699
|
disabled: n.disabled,
|
|
1629
1700
|
title: T(f)("tableAdvanced.tableOptions"),
|
|
1630
|
-
onClick: M(
|
|
1631
|
-
}, [d(
|
|
1701
|
+
onClick: M(t, ["prevent"])
|
|
1702
|
+
}, [d(e, {
|
|
1632
1703
|
name: "more_vert",
|
|
1633
1704
|
size: 20
|
|
1634
|
-
})], 10,
|
|
1705
|
+
})], 10, zt)]),
|
|
1635
1706
|
panel: k(() => [l("div", {
|
|
1636
1707
|
class: "docx-tmore__panel",
|
|
1637
1708
|
role: "menu",
|
|
@@ -1641,7 +1712,7 @@ var ze = {
|
|
|
1641
1712
|
type: "button",
|
|
1642
1713
|
class: "docx-tmore__item",
|
|
1643
1714
|
onClick: r[0] ||= M((e) => P("addRowAbove"), ["prevent"])
|
|
1644
|
-
}, [d(
|
|
1715
|
+
}, [d(e, {
|
|
1645
1716
|
name: "add",
|
|
1646
1717
|
size: 18
|
|
1647
1718
|
}), l("span", null, w(T(f)("table.insertRowAbove")), 1)]),
|
|
@@ -1649,7 +1720,7 @@ var ze = {
|
|
|
1649
1720
|
type: "button",
|
|
1650
1721
|
class: "docx-tmore__item",
|
|
1651
1722
|
onClick: r[1] ||= M((e) => P("addRowBelow"), ["prevent"])
|
|
1652
|
-
}, [d(
|
|
1723
|
+
}, [d(e, {
|
|
1653
1724
|
name: "add",
|
|
1654
1725
|
size: 18
|
|
1655
1726
|
}), l("span", null, w(T(f)("table.insertRowBelow")), 1)]),
|
|
@@ -1657,7 +1728,7 @@ var ze = {
|
|
|
1657
1728
|
type: "button",
|
|
1658
1729
|
class: "docx-tmore__item",
|
|
1659
1730
|
onClick: r[2] ||= M((e) => P("addColumnLeft"), ["prevent"])
|
|
1660
|
-
}, [d(
|
|
1731
|
+
}, [d(e, {
|
|
1661
1732
|
name: "add",
|
|
1662
1733
|
size: 18
|
|
1663
1734
|
}), l("span", null, w(T(f)("table.insertColumnLeft")), 1)]),
|
|
@@ -1665,7 +1736,7 @@ var ze = {
|
|
|
1665
1736
|
type: "button",
|
|
1666
1737
|
class: "docx-tmore__item",
|
|
1667
1738
|
onClick: r[3] ||= M((e) => P("addColumnRight"), ["prevent"])
|
|
1668
|
-
}, [d(
|
|
1739
|
+
}, [d(e, {
|
|
1669
1740
|
name: "add",
|
|
1670
1741
|
size: 18
|
|
1671
1742
|
}), l("span", null, w(T(f)("table.insertColumnRight")), 1)]),
|
|
@@ -1675,113 +1746,113 @@ var ze = {
|
|
|
1675
1746
|
class: "docx-tmore__item",
|
|
1676
1747
|
disabled: N("mergeCells"),
|
|
1677
1748
|
onClick: r[4] ||= M((e) => P("mergeCells"), ["prevent"])
|
|
1678
|
-
}, [d(
|
|
1749
|
+
}, [d(e, {
|
|
1679
1750
|
name: "call_merge",
|
|
1680
1751
|
size: 18
|
|
1681
|
-
}), l("span", null, w(T(f)("table.mergeCells")), 1)], 8,
|
|
1752
|
+
}), l("span", null, w(T(f)("table.mergeCells")), 1)], 8, Vt),
|
|
1682
1753
|
l("button", {
|
|
1683
1754
|
type: "button",
|
|
1684
1755
|
class: "docx-tmore__item",
|
|
1685
1756
|
disabled: N("splitCell"),
|
|
1686
1757
|
onClick: r[5] ||= M((e) => P("splitCell"), ["prevent"])
|
|
1687
|
-
}, [d(
|
|
1758
|
+
}, [d(e, {
|
|
1688
1759
|
name: "call_split",
|
|
1689
1760
|
size: 18
|
|
1690
|
-
}), l("span", null, w(T(f)("table.splitCell")), 1)], 8,
|
|
1761
|
+
}), l("span", null, w(T(f)("table.splitCell")), 1)], 8, Ht),
|
|
1691
1762
|
r[39] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
|
|
1692
1763
|
l("button", {
|
|
1693
1764
|
type: "button",
|
|
1694
1765
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
1695
1766
|
disabled: N("deleteRow"),
|
|
1696
1767
|
onClick: r[6] ||= M((e) => P("deleteRow"), ["prevent"])
|
|
1697
|
-
}, [d(
|
|
1768
|
+
}, [d(e, {
|
|
1698
1769
|
name: "delete",
|
|
1699
1770
|
size: 18
|
|
1700
|
-
}), l("span", null, w(T(f)("table.deleteRow")), 1)], 8,
|
|
1771
|
+
}), l("span", null, w(T(f)("table.deleteRow")), 1)], 8, Ut),
|
|
1701
1772
|
l("button", {
|
|
1702
1773
|
type: "button",
|
|
1703
1774
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
1704
1775
|
disabled: N("deleteColumn"),
|
|
1705
1776
|
onClick: r[7] ||= M((e) => P("deleteColumn"), ["prevent"])
|
|
1706
|
-
}, [d(
|
|
1777
|
+
}, [d(e, {
|
|
1707
1778
|
name: "delete",
|
|
1708
1779
|
size: 18
|
|
1709
|
-
}), l("span", null, w(T(f)("table.deleteColumn")), 1)], 8,
|
|
1780
|
+
}), l("span", null, w(T(f)("table.deleteColumn")), 1)], 8, Wt),
|
|
1710
1781
|
l("button", {
|
|
1711
1782
|
type: "button",
|
|
1712
1783
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
1713
1784
|
onClick: r[8] ||= M((e) => P("deleteTable"), ["prevent"])
|
|
1714
|
-
}, [d(
|
|
1785
|
+
}, [d(e, {
|
|
1715
1786
|
name: "delete",
|
|
1716
1787
|
size: 18
|
|
1717
1788
|
}), l("span", null, w(T(f)("table.deleteTable")), 1)]),
|
|
1718
1789
|
r[40] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
|
|
1719
|
-
l("div",
|
|
1720
|
-
l("div",
|
|
1790
|
+
l("div", Gt, w(T(f)("tableAdvanced.verticalAlignment")), 1),
|
|
1791
|
+
l("div", Kt, [
|
|
1721
1792
|
l("button", {
|
|
1722
1793
|
type: "button",
|
|
1723
1794
|
class: "docx-tmore__icon-btn",
|
|
1724
1795
|
title: T(f)("tableAdvanced.top"),
|
|
1725
1796
|
onMousedown: r[9] ||= M(() => {}, ["prevent"]),
|
|
1726
1797
|
onClick: r[10] ||= M((e) => P("verticalAlignTop"), ["prevent"])
|
|
1727
|
-
}, [d(
|
|
1798
|
+
}, [d(e, {
|
|
1728
1799
|
name: "vertical_align_top",
|
|
1729
1800
|
size: 16
|
|
1730
|
-
})], 40,
|
|
1801
|
+
})], 40, qt),
|
|
1731
1802
|
l("button", {
|
|
1732
1803
|
type: "button",
|
|
1733
1804
|
class: "docx-tmore__icon-btn",
|
|
1734
1805
|
title: T(f)("tableAdvanced.middle"),
|
|
1735
1806
|
onMousedown: r[11] ||= M(() => {}, ["prevent"]),
|
|
1736
1807
|
onClick: r[12] ||= M((e) => P("verticalAlignMiddle"), ["prevent"])
|
|
1737
|
-
}, [d(
|
|
1808
|
+
}, [d(e, {
|
|
1738
1809
|
name: "vertical_align_center",
|
|
1739
1810
|
size: 16
|
|
1740
|
-
})], 40,
|
|
1811
|
+
})], 40, Jt),
|
|
1741
1812
|
l("button", {
|
|
1742
1813
|
type: "button",
|
|
1743
1814
|
class: "docx-tmore__icon-btn",
|
|
1744
1815
|
title: T(f)("tableAdvanced.bottom"),
|
|
1745
1816
|
onMousedown: r[13] ||= M(() => {}, ["prevent"]),
|
|
1746
1817
|
onClick: r[14] ||= M((e) => P("verticalAlignBottom"), ["prevent"])
|
|
1747
|
-
}, [d(
|
|
1818
|
+
}, [d(e, {
|
|
1748
1819
|
name: "vertical_align_bottom",
|
|
1749
1820
|
size: 16
|
|
1750
|
-
})], 40,
|
|
1821
|
+
})], 40, Yt)
|
|
1751
1822
|
]),
|
|
1752
1823
|
r[41] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
|
|
1753
|
-
l("div",
|
|
1754
|
-
l("div",
|
|
1824
|
+
l("div", Xt, w(T(f)("tableAdvanced.tableAlignment")), 1),
|
|
1825
|
+
l("div", Zt, [
|
|
1755
1826
|
l("button", {
|
|
1756
1827
|
type: "button",
|
|
1757
1828
|
class: m(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "left" }]),
|
|
1758
1829
|
title: T(f)("tableAdvanced.alignTableLeft"),
|
|
1759
1830
|
onMousedown: r[15] ||= M(() => {}, ["prevent"]),
|
|
1760
1831
|
onClick: r[16] ||= M((e) => P("alignTableLeft"), ["prevent"])
|
|
1761
|
-
}, [d(
|
|
1832
|
+
}, [d(e, {
|
|
1762
1833
|
name: "format_align_left",
|
|
1763
1834
|
size: 16
|
|
1764
|
-
})], 42,
|
|
1835
|
+
})], 42, Qt),
|
|
1765
1836
|
l("button", {
|
|
1766
1837
|
type: "button",
|
|
1767
1838
|
class: m(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "center" }]),
|
|
1768
1839
|
title: T(f)("tableAdvanced.alignTableCenter"),
|
|
1769
1840
|
onMousedown: r[17] ||= M(() => {}, ["prevent"]),
|
|
1770
1841
|
onClick: r[18] ||= M((e) => P("alignTableCenter"), ["prevent"])
|
|
1771
|
-
}, [d(
|
|
1842
|
+
}, [d(e, {
|
|
1772
1843
|
name: "format_align_center",
|
|
1773
1844
|
size: 16
|
|
1774
|
-
})], 42,
|
|
1845
|
+
})], 42, $t),
|
|
1775
1846
|
l("button", {
|
|
1776
1847
|
type: "button",
|
|
1777
1848
|
class: m(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "right" }]),
|
|
1778
1849
|
title: T(f)("tableAdvanced.alignTableRight"),
|
|
1779
1850
|
onMousedown: r[19] ||= M(() => {}, ["prevent"]),
|
|
1780
1851
|
onClick: r[20] ||= M((e) => P("alignTableRight"), ["prevent"])
|
|
1781
|
-
}, [d(
|
|
1852
|
+
}, [d(e, {
|
|
1782
1853
|
name: "format_align_right",
|
|
1783
1854
|
size: 16
|
|
1784
|
-
})], 42,
|
|
1855
|
+
})], 42, en)
|
|
1785
1856
|
]),
|
|
1786
1857
|
r[42] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
|
|
1787
1858
|
l("button", {
|
|
@@ -1789,17 +1860,17 @@ var ze = {
|
|
|
1789
1860
|
class: "docx-tmore__item",
|
|
1790
1861
|
onClick: r[21] ||= M((e) => h.value = !h.value, ["prevent"])
|
|
1791
1862
|
}, [
|
|
1792
|
-
d(
|
|
1863
|
+
d(e, {
|
|
1793
1864
|
name: "padding",
|
|
1794
1865
|
size: 18
|
|
1795
1866
|
}),
|
|
1796
|
-
l("span",
|
|
1797
|
-
d(
|
|
1867
|
+
l("span", tn, w(T(f)("tableAdvanced.cellMargins")), 1),
|
|
1868
|
+
d(e, {
|
|
1798
1869
|
name: h.value ? "expand_less" : "expand_more",
|
|
1799
1870
|
size: 18
|
|
1800
1871
|
}, null, 8, ["name"])
|
|
1801
1872
|
]),
|
|
1802
|
-
h.value ? (v(), c("div",
|
|
1873
|
+
h.value ? (v(), c("div", nn, [l("div", rn, [(v(), c(i, null, x([
|
|
1803
1874
|
"top",
|
|
1804
1875
|
"bottom",
|
|
1805
1876
|
"left",
|
|
@@ -1808,14 +1879,14 @@ var ze = {
|
|
|
1808
1879
|
key: e,
|
|
1809
1880
|
class: "docx-tmore__field"
|
|
1810
1881
|
}, [
|
|
1811
|
-
l("span",
|
|
1882
|
+
l("span", an, w(e), 1),
|
|
1812
1883
|
A(l("input", {
|
|
1813
1884
|
type: "number",
|
|
1814
1885
|
min: "0",
|
|
1815
1886
|
step: "20",
|
|
1816
1887
|
"onUpdate:modelValue": (t) => S[e] = t,
|
|
1817
1888
|
class: "docx-tmore__input"
|
|
1818
|
-
}, null, 8,
|
|
1889
|
+
}, null, 8, on), [[
|
|
1819
1890
|
D,
|
|
1820
1891
|
S[e],
|
|
1821
1892
|
void 0,
|
|
@@ -1832,27 +1903,27 @@ var ze = {
|
|
|
1832
1903
|
class: "docx-tmore__item",
|
|
1833
1904
|
onClick: r[22] ||= M((e) => g.value = !g.value, ["prevent"])
|
|
1834
1905
|
}, [
|
|
1835
|
-
d(
|
|
1906
|
+
d(e, {
|
|
1836
1907
|
name: "height",
|
|
1837
1908
|
size: 18
|
|
1838
1909
|
}),
|
|
1839
|
-
l("span",
|
|
1840
|
-
d(
|
|
1910
|
+
l("span", sn, w(T(f)("tableAdvanced.rowHeight")), 1),
|
|
1911
|
+
d(e, {
|
|
1841
1912
|
name: g.value ? "expand_less" : "expand_more",
|
|
1842
1913
|
size: 18
|
|
1843
1914
|
}, null, 8, ["name"])
|
|
1844
1915
|
]),
|
|
1845
|
-
g.value ? (v(), c("div",
|
|
1846
|
-
l("label",
|
|
1916
|
+
g.value ? (v(), c("div", cn, [
|
|
1917
|
+
l("label", ln, [l("span", un, w(T(f)("tableAdvanced.rule")), 1), A(l("select", {
|
|
1847
1918
|
"onUpdate:modelValue": r[23] ||= (e) => j.value = e,
|
|
1848
1919
|
class: "docx-tmore__select"
|
|
1849
1920
|
}, [
|
|
1850
|
-
l("option",
|
|
1851
|
-
l("option",
|
|
1852
|
-
l("option",
|
|
1921
|
+
l("option", dn, w(T(f)("tableAdvanced.heightRules.auto")), 1),
|
|
1922
|
+
l("option", fn, w(T(f)("tableAdvanced.heightRules.atLeast")), 1),
|
|
1923
|
+
l("option", pn, w(T(f)("tableAdvanced.heightRules.exact")), 1)
|
|
1853
1924
|
], 512), [[E, j.value]])]),
|
|
1854
|
-
j.value === "auto" ? s("", !0) : (v(), c("label",
|
|
1855
|
-
l("span",
|
|
1925
|
+
j.value === "auto" ? s("", !0) : (v(), c("label", mn, [
|
|
1926
|
+
l("span", hn, w(T(f)("tableAdvanced.height")), 1),
|
|
1856
1927
|
A(l("input", {
|
|
1857
1928
|
type: "number",
|
|
1858
1929
|
min: "0",
|
|
@@ -1878,17 +1949,17 @@ var ze = {
|
|
|
1878
1949
|
class: "docx-tmore__item",
|
|
1879
1950
|
onClick: r[25] ||= M((e) => _.value = !_.value, ["prevent"])
|
|
1880
1951
|
}, [
|
|
1881
|
-
d(
|
|
1952
|
+
d(e, {
|
|
1882
1953
|
name: "text_rotation_none",
|
|
1883
1954
|
size: 18
|
|
1884
1955
|
}),
|
|
1885
|
-
l("span",
|
|
1886
|
-
d(
|
|
1956
|
+
l("span", gn, w(T(f)("tableAdvanced.textDirection")), 1),
|
|
1957
|
+
d(e, {
|
|
1887
1958
|
name: _.value ? "expand_less" : "expand_more",
|
|
1888
1959
|
size: 18
|
|
1889
1960
|
}, null, 8, ["name"])
|
|
1890
1961
|
]),
|
|
1891
|
-
_.value ? (v(), c("div",
|
|
1962
|
+
_.value ? (v(), c("div", _n, [
|
|
1892
1963
|
l("button", {
|
|
1893
1964
|
type: "button",
|
|
1894
1965
|
class: "docx-tmore__sub-item",
|
|
@@ -1910,7 +1981,7 @@ var ze = {
|
|
|
1910
1981
|
type: "button",
|
|
1911
1982
|
class: "docx-tmore__item",
|
|
1912
1983
|
onClick: r[29] ||= M((e) => P("toggleHeaderRow"), ["prevent"])
|
|
1913
|
-
}, [d(
|
|
1984
|
+
}, [d(e, {
|
|
1914
1985
|
name: "table_rows",
|
|
1915
1986
|
size: 18
|
|
1916
1987
|
}), l("span", null, w(T(f)("tableAdvanced.toggleHeaderRow")), 1)]),
|
|
@@ -1918,7 +1989,7 @@ var ze = {
|
|
|
1918
1989
|
type: "button",
|
|
1919
1990
|
class: "docx-tmore__item",
|
|
1920
1991
|
onClick: r[30] ||= M((e) => P("distributeColumns"), ["prevent"])
|
|
1921
|
-
}, [d(
|
|
1992
|
+
}, [d(e, {
|
|
1922
1993
|
name: "view_column",
|
|
1923
1994
|
size: 18
|
|
1924
1995
|
}), l("span", null, w(T(f)("tableAdvanced.distributeColumns")), 1)]),
|
|
@@ -1926,7 +1997,7 @@ var ze = {
|
|
|
1926
1997
|
type: "button",
|
|
1927
1998
|
class: "docx-tmore__item",
|
|
1928
1999
|
onClick: r[31] ||= M((e) => P("autoFit"), ["prevent"])
|
|
1929
|
-
}, [d(
|
|
2000
|
+
}, [d(e, {
|
|
1930
2001
|
name: "fit_width",
|
|
1931
2002
|
size: 18
|
|
1932
2003
|
}), l("span", null, w(T(f)("tableAdvanced.autoFit")), 1)]),
|
|
@@ -1934,7 +2005,7 @@ var ze = {
|
|
|
1934
2005
|
type: "button",
|
|
1935
2006
|
class: "docx-tmore__item",
|
|
1936
2007
|
onClick: r[32] ||= M((e) => P("toggleNoWrap"), ["prevent"])
|
|
1937
|
-
}, [d(
|
|
2008
|
+
}, [d(e, {
|
|
1938
2009
|
name: "wrap_text",
|
|
1939
2010
|
size: 18
|
|
1940
2011
|
}), l("span", null, w(T(f)("tableAdvanced.toggleNoWrap")), 1)]),
|
|
@@ -1943,15 +2014,15 @@ var ze = {
|
|
|
1943
2014
|
type: "button",
|
|
1944
2015
|
class: "docx-tmore__item",
|
|
1945
2016
|
onClick: r[33] ||= M((e) => P("tableProperties"), ["prevent"])
|
|
1946
|
-
}, [d(
|
|
2017
|
+
}, [d(e, {
|
|
1947
2018
|
name: "settings",
|
|
1948
2019
|
size: 18
|
|
1949
2020
|
}), l("span", null, w(T(f)("tableAdvanced.tableProperties")), 1)])
|
|
1950
|
-
], 8,
|
|
2021
|
+
], 8, Bt)]),
|
|
1951
2022
|
_: 1
|
|
1952
2023
|
}, 8, ["open"]));
|
|
1953
2024
|
}
|
|
1954
|
-
}), [["__scopeId", "data-v-
|
|
2025
|
+
}), [["__scopeId", "data-v-27bf8a6f"]]), yn = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
1955
2026
|
__name: "TableToolbar",
|
|
1956
2027
|
props: {
|
|
1957
2028
|
view: {},
|
|
@@ -1963,7 +2034,7 @@ var ze = {
|
|
|
1963
2034
|
let t = e, n = a(() => {
|
|
1964
2035
|
t.stateTick;
|
|
1965
2036
|
let e = t.view;
|
|
1966
|
-
return e ?
|
|
2037
|
+
return e ? U(e.state) : null;
|
|
1967
2038
|
}), r = a(() => !!n.value?.isInTable), o = a(() => {
|
|
1968
2039
|
t.stateTick;
|
|
1969
2040
|
let e = t.view;
|
|
@@ -1985,7 +2056,7 @@ var ze = {
|
|
|
1985
2056
|
O([() => t.view, () => t.stateTick], () => {
|
|
1986
2057
|
let e = t.view;
|
|
1987
2058
|
if (!e) return;
|
|
1988
|
-
let n =
|
|
2059
|
+
let n = U(e.state), r = n.cellBorderColor;
|
|
1989
2060
|
!r || !n.isInTable || typeof r == "object" && "rgb" in r && typeof r.rgb == "string" && (h.color = { rgb: r.rgb });
|
|
1990
2061
|
}, { immediate: !0 });
|
|
1991
2062
|
function g(e, ...n) {
|
|
@@ -2058,17 +2129,17 @@ var ze = {
|
|
|
2058
2129
|
}
|
|
2059
2130
|
return (t, n) => r.value ? (v(), c(i, { key: 0 }, [
|
|
2060
2131
|
n[0] ||= l("span", { class: "divider" }, null, -1),
|
|
2061
|
-
d(
|
|
2062
|
-
d(
|
|
2132
|
+
d(Mt, { onChange: _ }),
|
|
2133
|
+
d(Nt, {
|
|
2063
2134
|
theme: e.theme ?? null,
|
|
2064
2135
|
onChange: y
|
|
2065
2136
|
}, null, 8, ["theme"]),
|
|
2066
|
-
d(
|
|
2067
|
-
d(
|
|
2137
|
+
d(Rt, { onChange: b }),
|
|
2138
|
+
d(Ot, {
|
|
2068
2139
|
theme: e.theme ?? null,
|
|
2069
2140
|
onChange: x
|
|
2070
2141
|
}, null, 8, ["theme"]),
|
|
2071
|
-
d(
|
|
2142
|
+
d(vn, {
|
|
2072
2143
|
"can-split": o.value,
|
|
2073
2144
|
"can-merge": u.value,
|
|
2074
2145
|
"row-count": f.value,
|
|
@@ -2087,18 +2158,18 @@ var ze = {
|
|
|
2087
2158
|
])
|
|
2088
2159
|
], 64)) : s("", !0);
|
|
2089
2160
|
}
|
|
2090
|
-
}), [["__scopeId", "data-v-
|
|
2161
|
+
}), [["__scopeId", "data-v-b9fbce78"]]), bn = /* @__PURE__ */ f({
|
|
2091
2162
|
__name: "Avatar",
|
|
2092
2163
|
props: {
|
|
2093
2164
|
name: { default: "U" },
|
|
2094
2165
|
size: { default: 32 }
|
|
2095
2166
|
},
|
|
2096
2167
|
setup(e) {
|
|
2097
|
-
let t = e, n = a(() =>
|
|
2168
|
+
let t = e, n = a(() => q(t.name || "U")), r = a(() => ({
|
|
2098
2169
|
width: t.size + "px",
|
|
2099
2170
|
height: t.size + "px",
|
|
2100
2171
|
borderRadius: "50%",
|
|
2101
|
-
backgroundColor:
|
|
2172
|
+
backgroundColor: G(t.name || "U"),
|
|
2102
2173
|
color: "#fff",
|
|
2103
2174
|
display: "flex",
|
|
2104
2175
|
alignItems: "center",
|
|
@@ -2112,13 +2183,13 @@ var ze = {
|
|
|
2112
2183
|
style: h(r.value)
|
|
2113
2184
|
}, w(n.value), 5));
|
|
2114
2185
|
}
|
|
2115
|
-
}),
|
|
2186
|
+
}), xn = {
|
|
2116
2187
|
key: 0,
|
|
2117
2188
|
class: "reply-thread"
|
|
2118
|
-
},
|
|
2189
|
+
}, Sn = {
|
|
2119
2190
|
key: 0,
|
|
2120
2191
|
class: "reply-thread__more"
|
|
2121
|
-
},
|
|
2192
|
+
}, Cn = { class: "reply-thread__header" }, wn = { class: "reply-thread__author-block" }, Tn = { class: "reply-thread__author" }, En = { class: "reply-thread__date" }, Dn = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
2122
2193
|
__name: "ReplyThread",
|
|
2123
2194
|
props: {
|
|
2124
2195
|
replies: {},
|
|
@@ -2126,15 +2197,15 @@ var ze = {
|
|
|
2126
2197
|
},
|
|
2127
2198
|
setup(e) {
|
|
2128
2199
|
let t = e, n = a(() => t.isExpanded ? t.replies : t.replies.slice(-1)), r = a(() => t.isExpanded ? 0 : Math.max(0, t.replies.length - 1));
|
|
2129
|
-
return (t, a) => e.replies.length > 0 ? (v(), c("div",
|
|
2200
|
+
return (t, a) => e.replies.length > 0 ? (v(), c("div", xn, [r.value > 0 ? (v(), c("div", Sn, w(r.value) + " " + w(r.value === 1 ? "reply" : "replies"), 1)) : s("", !0), (v(!0), c(i, null, x(n.value, (t) => (v(), c("div", {
|
|
2130
2201
|
key: t.id,
|
|
2131
2202
|
class: m(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
|
|
2132
|
-
}, [l("div",
|
|
2203
|
+
}, [l("div", Cn, [d(bn, {
|
|
2133
2204
|
name: t.author,
|
|
2134
2205
|
size: 28
|
|
2135
|
-
}, null, 8, ["name"]), l("div",
|
|
2206
|
+
}, null, 8, ["name"]), l("div", wn, [l("div", Tn, w(t.author || "Unknown"), 1), l("div", En, w(T(W)(t.date)), 1)])]), l("div", { class: m(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, w(T(K)(t.content)), 3)], 2))), 128))])) : s("", !0);
|
|
2136
2207
|
}
|
|
2137
|
-
}), [["__scopeId", "data-v-
|
|
2208
|
+
}), [["__scopeId", "data-v-9634d553"]]), On = ["onKeydown"], kn = { class: "reply-input__actions" }, An = ["disabled"], jn = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
2138
2209
|
__name: "ReplyInput",
|
|
2139
2210
|
emits: ["submit"],
|
|
2140
2211
|
setup(e, { emit: t }) {
|
|
@@ -2166,14 +2237,14 @@ var ze = {
|
|
|
2166
2237
|
j(M(h, ["prevent"]), ["enter"]),
|
|
2167
2238
|
j(f, ["esc"])
|
|
2168
2239
|
]
|
|
2169
|
-
}, null, 40,
|
|
2240
|
+
}, null, 40, On), [[D, o.value]]), l("div", kn, [l("button", {
|
|
2170
2241
|
class: "reply-input__cancel",
|
|
2171
2242
|
onClick: M(f, ["stop"])
|
|
2172
2243
|
}, "Cancel"), l("button", {
|
|
2173
2244
|
class: m(["reply-input__submit", { "reply-input__submit--active": u.value }]),
|
|
2174
2245
|
disabled: !u.value,
|
|
2175
2246
|
onClick: M(h, ["stop"])
|
|
2176
|
-
}, "Reply", 10,
|
|
2247
|
+
}, "Reply", 10, An)])], 64)) : (v(), c("input", {
|
|
2177
2248
|
key: 0,
|
|
2178
2249
|
readonly: "",
|
|
2179
2250
|
placeholder: "Reply",
|
|
@@ -2182,13 +2253,13 @@ var ze = {
|
|
|
2182
2253
|
onClick: M(d, ["stop"])
|
|
2183
2254
|
}, null, 32))], 32));
|
|
2184
2255
|
}
|
|
2185
|
-
}), [["__scopeId", "data-v-
|
|
2256
|
+
}), [["__scopeId", "data-v-1cfd229c"]]), Mn = ["data-comment-id"], Nn = {
|
|
2186
2257
|
key: 0,
|
|
2187
2258
|
class: "comment-card__resolved"
|
|
2188
|
-
},
|
|
2259
|
+
}, Pn = { class: "comment-card__head" }, Fn = { class: "comment-card__author-block" }, In = { class: "comment-card__author" }, Ln = { class: "comment-card__date" }, Rn = {
|
|
2189
2260
|
key: 0,
|
|
2190
2261
|
class: "comment-card__actions"
|
|
2191
|
-
},
|
|
2262
|
+
}, zn = ["title"], Bn = { class: "comment-card__body" }, Vn = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
2192
2263
|
__name: "CommentCard",
|
|
2193
2264
|
props: {
|
|
2194
2265
|
comment: {},
|
|
@@ -2202,41 +2273,41 @@ var ze = {
|
|
|
2202
2273
|
"unresolve",
|
|
2203
2274
|
"delete"
|
|
2204
2275
|
],
|
|
2205
|
-
setup(
|
|
2206
|
-
let r =
|
|
2276
|
+
setup(t, { emit: n }) {
|
|
2277
|
+
let r = t, i = n, a = b(!1);
|
|
2207
2278
|
function u() {
|
|
2208
2279
|
a.value = !1, i("delete", r.comment.id);
|
|
2209
2280
|
}
|
|
2210
2281
|
return (n, r) => (v(), c("div", {
|
|
2211
|
-
class: m(["comment-card", { "comment-card--expanded":
|
|
2212
|
-
"data-comment-id":
|
|
2282
|
+
class: m(["comment-card", { "comment-card--expanded": t.expanded }]),
|
|
2283
|
+
"data-comment-id": t.comment.id,
|
|
2213
2284
|
onClick: r[5] ||= (e) => n.$emit("click"),
|
|
2214
2285
|
onMousedown: r[6] ||= M(() => {}, ["stop"])
|
|
2215
2286
|
}, [
|
|
2216
|
-
|
|
2287
|
+
t.comment.done ? (v(), c("div", Nn, [d(e, {
|
|
2217
2288
|
name: "check",
|
|
2218
2289
|
size: 12
|
|
2219
2290
|
}), r[7] ||= l("span", null, "Resolved", -1)])) : s("", !0),
|
|
2220
|
-
l("div",
|
|
2221
|
-
d(
|
|
2222
|
-
name:
|
|
2291
|
+
l("div", Pn, [
|
|
2292
|
+
d(bn, {
|
|
2293
|
+
name: t.comment.author,
|
|
2223
2294
|
size: 32
|
|
2224
2295
|
}, null, 8, ["name"]),
|
|
2225
|
-
l("div",
|
|
2226
|
-
|
|
2296
|
+
l("div", Fn, [l("div", In, w(t.comment.author || "Unknown"), 1), l("div", Ln, w(T(W)(t.comment.date)), 1)]),
|
|
2297
|
+
t.expanded ? (v(), c("div", Rn, [
|
|
2227
2298
|
l("button", {
|
|
2228
2299
|
class: "comment-card__icon-btn",
|
|
2229
|
-
title:
|
|
2230
|
-
onClick: r[0] ||= M((
|
|
2231
|
-
}, [d(
|
|
2232
|
-
name:
|
|
2300
|
+
title: t.comment.done ? "Reopen" : "Resolve",
|
|
2301
|
+
onClick: r[0] ||= M((e) => t.comment.done ? n.$emit("unresolve", t.comment.id) : n.$emit("resolve", t.comment.id), ["stop"])
|
|
2302
|
+
}, [d(e, {
|
|
2303
|
+
name: t.comment.done ? "undo" : "check",
|
|
2233
2304
|
size: 20
|
|
2234
|
-
}, null, 8, ["name"])], 8,
|
|
2305
|
+
}, null, 8, ["name"])], 8, zn),
|
|
2235
2306
|
l("button", {
|
|
2236
2307
|
class: "comment-card__icon-btn",
|
|
2237
2308
|
title: "More options",
|
|
2238
2309
|
onClick: r[1] ||= M((e) => a.value = !a.value, ["stop"])
|
|
2239
|
-
}, [d(
|
|
2310
|
+
}, [d(e, {
|
|
2240
2311
|
name: "more_vert",
|
|
2241
2312
|
size: 20
|
|
2242
2313
|
})]),
|
|
@@ -2251,74 +2322,75 @@ var ze = {
|
|
|
2251
2322
|
}, "Delete")], 32)) : s("", !0)
|
|
2252
2323
|
])) : s("", !0)
|
|
2253
2324
|
]),
|
|
2254
|
-
l("div",
|
|
2255
|
-
d(
|
|
2256
|
-
replies:
|
|
2257
|
-
"is-expanded":
|
|
2325
|
+
l("div", Bn, w(T(K)(t.comment.content)), 1),
|
|
2326
|
+
d(Dn, {
|
|
2327
|
+
replies: t.replies,
|
|
2328
|
+
"is-expanded": t.expanded
|
|
2258
2329
|
}, null, 8, ["replies", "is-expanded"]),
|
|
2259
|
-
|
|
2330
|
+
t.expanded && !t.comment.done ? (v(), o(jn, {
|
|
2260
2331
|
key: 1,
|
|
2261
|
-
onSubmit: r[4] ||= (
|
|
2332
|
+
onSubmit: r[4] ||= (e) => n.$emit("reply", t.comment.id, e)
|
|
2262
2333
|
})) : s("", !0)
|
|
2263
|
-
], 42,
|
|
2334
|
+
], 42, Mn));
|
|
2264
2335
|
}
|
|
2265
|
-
}), [["__scopeId", "data-v-
|
|
2336
|
+
}), [["__scopeId", "data-v-fc5f60de"]]), Hn = ["data-comment-id"], Un = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
2266
2337
|
__name: "ResolvedCommentMarker",
|
|
2267
2338
|
props: { comment: {} },
|
|
2268
2339
|
emits: ["toggle-expand"],
|
|
2269
|
-
setup(
|
|
2340
|
+
setup(t) {
|
|
2270
2341
|
return (n, r) => (v(), c("div", {
|
|
2271
2342
|
class: "resolved-comment-marker",
|
|
2272
|
-
"data-comment-id":
|
|
2343
|
+
"data-comment-id": t.comment.id,
|
|
2273
2344
|
"data-comment-resolved": "true",
|
|
2274
2345
|
onClick: r[0] ||= (e) => n.$emit("toggle-expand"),
|
|
2275
2346
|
onMousedown: r[1] ||= M(() => {}, ["stop"])
|
|
2276
|
-
}, [d(
|
|
2347
|
+
}, [d(e, {
|
|
2277
2348
|
name: "chat_bubble_check",
|
|
2278
2349
|
size: 20
|
|
2279
|
-
})], 40,
|
|
2350
|
+
})], 40, Hn));
|
|
2280
2351
|
}
|
|
2281
|
-
}), [["__scopeId", "data-v-
|
|
2352
|
+
}), [["__scopeId", "data-v-c4b9639d"]]), Wn = { class: "tc-card__head" }, Gn = { class: "tc-card__author-block" }, Kn = { class: "tc-card__author" }, qn = {
|
|
2282
2353
|
key: 0,
|
|
2283
2354
|
class: "tc-card__date"
|
|
2284
|
-
},
|
|
2355
|
+
}, Jn = {
|
|
2285
2356
|
key: 0,
|
|
2286
2357
|
class: "tc-card__actions"
|
|
2287
|
-
},
|
|
2358
|
+
}, Yn = ["title"], Xn = ["title"], Zn = { class: "tc-card__body" }, Qn = { class: "tc-card__deleted" }, $n = { class: "tc-card__inserted" }, er = { class: "tc-card__inserted" }, tr = { class: "tc-card__deleted" }, nr = { class: "tc-card__changed" }, rr = {
|
|
2288
2359
|
key: 4,
|
|
2289
2360
|
class: "tc-card__inserted"
|
|
2290
|
-
},
|
|
2361
|
+
}, ir = {
|
|
2291
2362
|
key: 5,
|
|
2292
2363
|
class: "tc-card__deleted"
|
|
2293
|
-
},
|
|
2364
|
+
}, ar = {
|
|
2294
2365
|
key: 6,
|
|
2295
2366
|
class: "tc-card__inserted"
|
|
2296
|
-
},
|
|
2367
|
+
}, or = {
|
|
2297
2368
|
key: 7,
|
|
2298
2369
|
class: "tc-card__deleted"
|
|
2299
|
-
},
|
|
2370
|
+
}, sr = {
|
|
2300
2371
|
key: 8,
|
|
2301
2372
|
class: "tc-card__changed"
|
|
2302
|
-
},
|
|
2373
|
+
}, cr = {
|
|
2303
2374
|
key: 9,
|
|
2304
2375
|
class: "tc-card__changed"
|
|
2305
|
-
},
|
|
2376
|
+
}, lr = {
|
|
2306
2377
|
key: 10,
|
|
2307
2378
|
class: "tc-card__changed"
|
|
2308
|
-
},
|
|
2379
|
+
}, ur = {
|
|
2309
2380
|
key: 11,
|
|
2310
2381
|
class: "tc-card__changed"
|
|
2311
|
-
},
|
|
2382
|
+
}, dr = {
|
|
2312
2383
|
key: 12,
|
|
2313
2384
|
class: "tc-card__inserted"
|
|
2314
|
-
},
|
|
2385
|
+
}, fr = {
|
|
2315
2386
|
key: 13,
|
|
2316
2387
|
class: "tc-card__deleted"
|
|
2317
|
-
},
|
|
2388
|
+
}, pr = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
2318
2389
|
__name: "TrackedChangeCard",
|
|
2319
2390
|
props: {
|
|
2320
2391
|
change: {},
|
|
2321
|
-
expanded: { type: Boolean }
|
|
2392
|
+
expanded: { type: Boolean },
|
|
2393
|
+
replies: {}
|
|
2322
2394
|
},
|
|
2323
2395
|
emits: [
|
|
2324
2396
|
"click",
|
|
@@ -2327,7 +2399,7 @@ var ze = {
|
|
|
2327
2399
|
"reply"
|
|
2328
2400
|
],
|
|
2329
2401
|
setup(n, { emit: r }) {
|
|
2330
|
-
let { t: f } =
|
|
2402
|
+
let { t: f } = t(), p = n, h = r, g = a(() => p.change.author || f("trackedChanges.unknown"));
|
|
2331
2403
|
function _() {
|
|
2332
2404
|
let e = new Set([p.change.revisionId]);
|
|
2333
2405
|
p.change.type === "replacement" && p.change.insertionRevisionId != null && e.add(p.change.insertionRevisionId);
|
|
@@ -2340,46 +2412,50 @@ var ze = {
|
|
|
2340
2412
|
function b() {
|
|
2341
2413
|
for (let e of _()) h("reject-by-id", e);
|
|
2342
2414
|
}
|
|
2343
|
-
return (
|
|
2415
|
+
return (t, r) => (v(), c("div", {
|
|
2344
2416
|
class: m(["tc-card", { "tc-card--expanded": n.expanded }]),
|
|
2345
|
-
onClick: r[1] ||= (
|
|
2417
|
+
onClick: r[1] ||= (e) => t.$emit("click"),
|
|
2346
2418
|
onMousedown: r[2] ||= M(() => {}, ["stop"])
|
|
2347
2419
|
}, [
|
|
2348
|
-
l("div",
|
|
2349
|
-
d(
|
|
2420
|
+
l("div", Wn, [
|
|
2421
|
+
d(bn, {
|
|
2350
2422
|
name: g.value,
|
|
2351
2423
|
size: 32
|
|
2352
2424
|
}, null, 8, ["name"]),
|
|
2353
|
-
l("div",
|
|
2354
|
-
n.expanded ? (v(), c("div",
|
|
2425
|
+
l("div", Gn, [l("div", Kn, w(g.value), 1), n.change.date ? (v(), c("div", qn, w(T(W)(n.change.date)), 1)) : s("", !0)]),
|
|
2426
|
+
n.expanded ? (v(), c("div", Jn, [l("button", {
|
|
2355
2427
|
class: "tc-card__icon-btn",
|
|
2356
2428
|
title: T(f)("common.accept"),
|
|
2357
2429
|
onClick: M(y, ["stop"])
|
|
2358
|
-
}, [d(
|
|
2430
|
+
}, [d(e, {
|
|
2359
2431
|
name: "check",
|
|
2360
2432
|
size: 20
|
|
2361
|
-
})], 8,
|
|
2433
|
+
})], 8, Yn), l("button", {
|
|
2362
2434
|
class: "tc-card__icon-btn",
|
|
2363
2435
|
title: T(f)("common.reject"),
|
|
2364
2436
|
onClick: M(b, ["stop"])
|
|
2365
|
-
}, [d(
|
|
2437
|
+
}, [d(e, {
|
|
2366
2438
|
name: "close",
|
|
2367
2439
|
size: 20
|
|
2368
|
-
})], 8,
|
|
2440
|
+
})], 8, Xn)])) : s("", !0)
|
|
2369
2441
|
]),
|
|
2370
|
-
l("div",
|
|
2442
|
+
l("div", Zn, [n.change.type === "replacement" ? (v(), c(i, { key: 0 }, [
|
|
2371
2443
|
u(w(T(f)("trackedChanges.replaced")) + " ", 1),
|
|
2372
|
-
l("span",
|
|
2444
|
+
l("span", Qn, "\"" + w(T(J)(n.change.deletedText || "")) + "\"", 1),
|
|
2373
2445
|
u(" " + w(T(f)("trackedChanges.with")) + " ", 1),
|
|
2374
|
-
l("span",
|
|
2375
|
-
], 64)) : n.change.type === "paragraphMarkInsertion" ? (v(), c(i, { key: 1 }, [u(w(T(f)("revisions.paragraphMarkInserted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[3] ||= u(": ", -1), l("span",
|
|
2376
|
-
|
|
2446
|
+
l("span", $n, "\"" + w(T(J)(n.change.text)) + "\"", 1)
|
|
2447
|
+
], 64)) : n.change.type === "paragraphMarkInsertion" ? (v(), c(i, { key: 1 }, [u(w(T(f)("revisions.paragraphMarkInserted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[3] ||= u(": ", -1), l("span", er, "\"" + w(T(J)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "paragraphMarkDeletion" ? (v(), c(i, { key: 2 }, [u(w(T(f)("revisions.paragraphMarkDeleted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[4] ||= u(": ", -1), l("span", tr, "\"" + w(T(J)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "paragraphPropertiesChanged" ? (v(), c(i, { key: 3 }, [u(w(T(f)("revisions.paragraphPropertiesChanged")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[5] ||= u(": ", -1), l("span", nr, "\"" + w(T(J)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "rowInserted" ? (v(), c("span", rr, w(T(f)("revisions.rowInserted")), 1)) : n.change.type === "rowDeleted" ? (v(), c("span", ir, w(T(f)("revisions.rowDeleted")), 1)) : n.change.type === "cellInserted" ? (v(), c("span", ar, w(T(f)("revisions.cellInserted")), 1)) : n.change.type === "cellDeleted" ? (v(), c("span", or, w(T(f)("revisions.cellDeleted")), 1)) : n.change.type === "cellMerged" ? (v(), c("span", sr, w(T(f)("revisions.cellMerged")), 1)) : n.change.type === "rowPropertiesChanged" ? (v(), c("span", cr, w(T(f)("revisions.rowPropertiesChanged")), 1)) : n.change.type === "cellPropertiesChanged" ? (v(), c("span", lr, w(T(f)("revisions.cellPropertiesChanged")), 1)) : n.change.type === "tablePropertiesChanged" ? (v(), c("span", ur, w(T(f)("revisions.tablePropertiesChanged")), 1)) : n.change.type === "tableInserted" ? (v(), c("span", dr, w(T(f)("revisions.tableInserted")), 1)) : n.change.type === "tableDeleted" ? (v(), c("span", fr, w(T(f)("revisions.tableDeleted")), 1)) : (v(), c(i, { key: 14 }, [u(w(n.change.type === "insertion" ? T(f)("trackedChanges.added") : T(f)("trackedChanges.deleted")) + " ", 1), l("span", { class: m(n.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + w(T(J)(n.change.text)) + "\" ", 3)], 64))]),
|
|
2448
|
+
d(Dn, {
|
|
2449
|
+
replies: n.replies,
|
|
2450
|
+
"is-expanded": n.expanded
|
|
2451
|
+
}, null, 8, ["replies", "is-expanded"]),
|
|
2452
|
+
n.expanded ? (v(), o(jn, {
|
|
2377
2453
|
key: 0,
|
|
2378
|
-
onSubmit: r[0] ||= (
|
|
2454
|
+
onSubmit: r[0] ||= (e) => t.$emit("reply", n.change.revisionId, e)
|
|
2379
2455
|
})) : s("", !0)
|
|
2380
2456
|
], 34));
|
|
2381
2457
|
}
|
|
2382
|
-
}), [["__scopeId", "data-v-
|
|
2458
|
+
}), [["__scopeId", "data-v-aba5ffb2"]]), mr = ["onKeydown"], hr = { class: "add-comment-card__actions" }, gr = ["disabled"], _r = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
2383
2459
|
__name: "AddCommentCard",
|
|
2384
2460
|
emits: ["submit", "cancel"],
|
|
2385
2461
|
setup(e, { emit: t }) {
|
|
@@ -2408,16 +2484,16 @@ var ze = {
|
|
|
2408
2484
|
j(M(s, ["exact", "prevent"]), ["enter"]),
|
|
2409
2485
|
j(u, ["esc"])
|
|
2410
2486
|
]
|
|
2411
|
-
}, null, 40,
|
|
2487
|
+
}, null, 40, mr), [[D, r.value]]), l("div", hr, [l("button", {
|
|
2412
2488
|
class: "add-comment-card__cancel",
|
|
2413
2489
|
onClick: u
|
|
2414
2490
|
}, "Cancel"), l("button", {
|
|
2415
2491
|
class: m(["add-comment-card__submit", { "add-comment-card__submit--active": o.value }]),
|
|
2416
2492
|
disabled: !o.value,
|
|
2417
2493
|
onClick: s
|
|
2418
|
-
}, "Comment", 10,
|
|
2494
|
+
}, "Comment", 10, gr)])], 32));
|
|
2419
2495
|
}
|
|
2420
|
-
}), [["__scopeId", "data-v-
|
|
2496
|
+
}), [["__scopeId", "data-v-ddb8719d"]]), vr = Y, yr = ["data-card-id"], br = 16, xr = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
2421
2497
|
__name: "UnifiedSidebar",
|
|
2422
2498
|
props: {
|
|
2423
2499
|
isOpen: { type: Boolean },
|
|
@@ -2452,17 +2528,30 @@ var ze = {
|
|
|
2452
2528
|
let t = p.value === e ? null : e;
|
|
2453
2529
|
f.value = t, d("update:activeItemId", t);
|
|
2454
2530
|
}
|
|
2455
|
-
|
|
2531
|
+
function y(e) {
|
|
2532
|
+
e.stopPropagation(), !e.target.closest(".unified-sidebar__card-slot") && p.value !== null && (f.value = null, d("update:activeItemId", null));
|
|
2533
|
+
}
|
|
2534
|
+
let S = r({
|
|
2456
2535
|
comments: a(() => n.comments),
|
|
2457
2536
|
trackedChanges: a(() => n.trackedChanges),
|
|
2458
2537
|
showResolved: a(() => n.showResolved ?? !1),
|
|
2459
2538
|
isAddingComment: a(() => n.isAddingComment ?? !1),
|
|
2460
2539
|
addCommentYPosition: a(() => n.addCommentYPosition ?? null)
|
|
2461
|
-
}),
|
|
2462
|
-
function
|
|
2463
|
-
let e =
|
|
2540
|
+
}), E = b(null), D = b(/* @__PURE__ */ new Map()), A = /* @__PURE__ */ new Map(), j = null, M = null, N = /* @__PURE__ */ new Set();
|
|
2541
|
+
function P() {
|
|
2542
|
+
let e = E.value;
|
|
2543
|
+
if (!e || !M) return;
|
|
2544
|
+
let t = new Set(e.querySelectorAll("[data-card-id]"));
|
|
2545
|
+
if (!(t.size === N.size && [...t].every((e) => N.has(e)))) {
|
|
2546
|
+
M.disconnect();
|
|
2547
|
+
for (let e of t) M.observe(e);
|
|
2548
|
+
N = t;
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
function F() {
|
|
2552
|
+
let e = n.pagesContainer, t = S.value;
|
|
2464
2553
|
if (!e || t.length === 0) {
|
|
2465
|
-
|
|
2554
|
+
D.value = /* @__PURE__ */ new Map();
|
|
2466
2555
|
return;
|
|
2467
2556
|
}
|
|
2468
2557
|
let r = e.getBoundingClientRect(), i = /* @__PURE__ */ new Map();
|
|
@@ -2497,43 +2586,43 @@ var ze = {
|
|
|
2497
2586
|
}
|
|
2498
2587
|
t && s.set(e.anchorKey, c(t));
|
|
2499
2588
|
}
|
|
2500
|
-
let l = /* @__PURE__ */ new Map(), u =
|
|
2589
|
+
let l = /* @__PURE__ */ new Map(), u = E.value;
|
|
2501
2590
|
if (u) for (let e of u.querySelectorAll("[data-card-id]")) {
|
|
2502
2591
|
let t = e.dataset.cardId;
|
|
2503
2592
|
t && l.set(t, e.offsetHeight);
|
|
2504
2593
|
}
|
|
2505
2594
|
let d = /* @__PURE__ */ new Map();
|
|
2506
|
-
for (let { item: e, y: n } of
|
|
2507
|
-
|
|
2595
|
+
for (let { item: e, y: n } of vr(t, s, null, 1, l, A)) d.set(e.id, n);
|
|
2596
|
+
D.value = d, P();
|
|
2508
2597
|
}
|
|
2509
|
-
let
|
|
2598
|
+
let I = a(() => {
|
|
2510
2599
|
let e = 0;
|
|
2511
|
-
for (let t of
|
|
2600
|
+
for (let t of D.value.values()) e = Math.max(e, t);
|
|
2512
2601
|
return e + 200;
|
|
2513
|
-
}),
|
|
2602
|
+
}), L = a(() => {
|
|
2514
2603
|
let e = p.value;
|
|
2515
2604
|
if (!e) return "";
|
|
2516
2605
|
if (e.startsWith("comment-")) return `.paged-editor__pages [data-comment-id="${e.slice(8)}"] { background-color: rgba(255, 212, 0, 0.35) !important; border-bottom: 2px solid rgba(255, 212, 0, 0.7) !important; }`;
|
|
2517
2606
|
if (e.startsWith("tc-")) {
|
|
2518
2607
|
let t = e.split("-")[1];
|
|
2519
2608
|
return `
|
|
2520
|
-
.paged-editor__pages .docx-insertion[data-revision-id="${
|
|
2609
|
+
.paged-editor__pages .docx-insertion[data-revision-id="${S.value.find((t) => t.id === e)?.change?.insertionRevisionId ?? Number(t)}"] { background-color: rgba(52, 168, 83, 0.2) !important; border-bottom: 2px solid #2e7d32 !important; }
|
|
2521
2610
|
.paged-editor__pages .docx-deletion[data-revision-id="${t}"] { background-color: rgba(211, 47, 47, 0.2) !important; text-decoration-thickness: 2px !important; }
|
|
2522
2611
|
`;
|
|
2523
2612
|
}
|
|
2524
2613
|
return "";
|
|
2525
|
-
}),
|
|
2526
|
-
let e = n.pageWidthPx / 2 +
|
|
2614
|
+
}), R = a(() => {
|
|
2615
|
+
let e = n.pageWidthPx / 2 + br - X, t = D.value.size > 0 || S.value.length === 0;
|
|
2527
2616
|
return {
|
|
2528
2617
|
position: "absolute",
|
|
2529
2618
|
top: "0",
|
|
2530
2619
|
left: `calc(50% + ${e}px)`,
|
|
2531
|
-
width:
|
|
2620
|
+
width: te + "px",
|
|
2532
2621
|
opacity: +!!t
|
|
2533
2622
|
};
|
|
2534
2623
|
});
|
|
2535
|
-
function
|
|
2536
|
-
let t =
|
|
2624
|
+
function ee(e) {
|
|
2625
|
+
let t = D.value.get(e);
|
|
2537
2626
|
return t == null ? {
|
|
2538
2627
|
position: "static",
|
|
2539
2628
|
marginBottom: "8px"
|
|
@@ -2545,22 +2634,22 @@ var ze = {
|
|
|
2545
2634
|
transition: "top 0.15s ease"
|
|
2546
2635
|
};
|
|
2547
2636
|
}
|
|
2548
|
-
let
|
|
2549
|
-
function
|
|
2550
|
-
|
|
2551
|
-
|
|
2637
|
+
let z = !1;
|
|
2638
|
+
function B() {
|
|
2639
|
+
z || (z = !0, requestAnimationFrame(() => {
|
|
2640
|
+
z = !1, F();
|
|
2552
2641
|
}));
|
|
2553
2642
|
}
|
|
2554
2643
|
O(() => [
|
|
2555
|
-
|
|
2644
|
+
S.value.length,
|
|
2556
2645
|
p.value,
|
|
2557
2646
|
n.pagesContainer,
|
|
2558
2647
|
n.pageWidthPx,
|
|
2559
2648
|
n.zoom,
|
|
2560
2649
|
n.isAddingComment,
|
|
2561
2650
|
n.addCommentYPosition
|
|
2562
|
-
], () =>
|
|
2563
|
-
function
|
|
2651
|
+
], () => B(), { immediate: !0 });
|
|
2652
|
+
function V(e) {
|
|
2564
2653
|
let t = e?.parentElement ?? null;
|
|
2565
2654
|
for (; t;) {
|
|
2566
2655
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -2569,43 +2658,43 @@ var ze = {
|
|
|
2569
2658
|
}
|
|
2570
2659
|
return null;
|
|
2571
2660
|
}
|
|
2572
|
-
let
|
|
2573
|
-
function
|
|
2574
|
-
|
|
2661
|
+
let H = null;
|
|
2662
|
+
function U() {
|
|
2663
|
+
H && H.removeEventListener("scroll", B), H = V(n.pagesContainer), H && H.addEventListener("scroll", B, { passive: !0 });
|
|
2575
2664
|
}
|
|
2576
2665
|
return _(() => {
|
|
2577
|
-
|
|
2578
|
-
}), O(() => n.pagesContainer, (e
|
|
2579
|
-
|
|
2666
|
+
M = new ResizeObserver(() => B()), B(), n.pagesContainer && (j = new ResizeObserver(() => B()), j.observe(n.pagesContainer), U());
|
|
2667
|
+
}), O(() => n.pagesContainer, (e) => {
|
|
2668
|
+
j?.disconnect(), j = null, e && (j = new ResizeObserver(() => B()), j.observe(e), U());
|
|
2580
2669
|
}), g(() => {
|
|
2581
|
-
|
|
2582
|
-
}), (t, n) => (v(), c(i, null, [
|
|
2583
|
-
default: k(() => [u(w(
|
|
2670
|
+
j?.disconnect(), M?.disconnect(), H && H.removeEventListener("scroll", B);
|
|
2671
|
+
}), (t, n) => (v(), c(i, null, [L.value ? (v(), o(C("style"), { key: 0 }, {
|
|
2672
|
+
default: k(() => [u(w(L.value), 1)]),
|
|
2584
2673
|
_: 1
|
|
2585
2674
|
})) : s("", !0), e.isOpen ? (v(), c("aside", {
|
|
2586
2675
|
key: 1,
|
|
2587
2676
|
ref_key: "rootRef",
|
|
2588
|
-
ref:
|
|
2677
|
+
ref: E,
|
|
2589
2678
|
class: "unified-sidebar",
|
|
2590
|
-
style: h(
|
|
2591
|
-
onMousedown:
|
|
2679
|
+
style: h(R.value),
|
|
2680
|
+
onMousedown: y
|
|
2592
2681
|
}, [l("div", {
|
|
2593
2682
|
class: "unified-sidebar__inner",
|
|
2594
|
-
style: h({ minHeight:
|
|
2595
|
-
}, [(v(!0), c(i, null, x(T(
|
|
2683
|
+
style: h({ minHeight: I.value + "px" })
|
|
2684
|
+
}, [(v(!0), c(i, null, x(T(S), (e) => (v(), c("div", {
|
|
2596
2685
|
key: e.id,
|
|
2597
2686
|
class: "unified-sidebar__card-slot",
|
|
2598
2687
|
"data-card-id": e.id,
|
|
2599
|
-
style: h(
|
|
2600
|
-
}, [e.kind === "add-comment" ? (v(), o(
|
|
2688
|
+
style: h(ee(e.id))
|
|
2689
|
+
}, [e.kind === "add-comment" ? (v(), o(_r, {
|
|
2601
2690
|
key: 0,
|
|
2602
2691
|
onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
|
|
2603
2692
|
onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
|
|
2604
|
-
})) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (v(), o(
|
|
2693
|
+
})) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (v(), o(Un, {
|
|
2605
2694
|
key: 1,
|
|
2606
2695
|
comment: e.comment,
|
|
2607
2696
|
onToggleExpand: (t) => m(e.id)
|
|
2608
|
-
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (v(), o(
|
|
2697
|
+
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (v(), o(Vn, {
|
|
2609
2698
|
key: 2,
|
|
2610
2699
|
comment: e.comment,
|
|
2611
2700
|
replies: e.replies,
|
|
@@ -2620,9 +2709,10 @@ var ze = {
|
|
|
2620
2709
|
"replies",
|
|
2621
2710
|
"expanded",
|
|
2622
2711
|
"onClick"
|
|
2623
|
-
])) : e.kind === "tracked-change" ? (v(), o(
|
|
2712
|
+
])) : e.kind === "tracked-change" ? (v(), o(pr, {
|
|
2624
2713
|
key: 3,
|
|
2625
2714
|
change: e.change,
|
|
2715
|
+
replies: e.replies ?? [],
|
|
2626
2716
|
expanded: p.value === e.id,
|
|
2627
2717
|
onClick: (t) => m(e.id),
|
|
2628
2718
|
onAccept: n[6] ||= (e, n) => t.$emit("accept-change", e, n),
|
|
@@ -2632,11 +2722,12 @@ var ze = {
|
|
|
2632
2722
|
onReply: n[10] ||= (e, n) => t.$emit("tracked-change-reply", e, n)
|
|
2633
2723
|
}, null, 8, [
|
|
2634
2724
|
"change",
|
|
2725
|
+
"replies",
|
|
2635
2726
|
"expanded",
|
|
2636
2727
|
"onClick"
|
|
2637
|
-
])) : s("", !0)], 12,
|
|
2728
|
+
])) : s("", !0)], 12, yr))), 128))], 4)], 36)) : s("", !0)], 64));
|
|
2638
2729
|
}
|
|
2639
|
-
}), [["__scopeId", "data-v-
|
|
2730
|
+
}), [["__scopeId", "data-v-b5509735"]]), Sr = ["title", "onClick"], Cr = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
2640
2731
|
__name: "CommentMarginMarkers",
|
|
2641
2732
|
props: {
|
|
2642
2733
|
comments: {},
|
|
@@ -2647,8 +2738,8 @@ var ze = {
|
|
|
2647
2738
|
resolvedCommentIds: {}
|
|
2648
2739
|
},
|
|
2649
2740
|
emits: ["marker-click"],
|
|
2650
|
-
setup(
|
|
2651
|
-
let n =
|
|
2741
|
+
setup(t) {
|
|
2742
|
+
let n = t, r = a(() => {
|
|
2652
2743
|
if (n.sidebarOpen) return [];
|
|
2653
2744
|
let e = n.pagesContainer;
|
|
2654
2745
|
if (!e) return [];
|
|
@@ -2686,14 +2777,14 @@ var ze = {
|
|
|
2686
2777
|
key: r.comment.id,
|
|
2687
2778
|
class: "docx-comment-margin-markers__btn",
|
|
2688
2779
|
title: r.isResolved ? "Resolved comment" : "Comment",
|
|
2689
|
-
style: h({ top: r.y *
|
|
2780
|
+
style: h({ top: r.y * t.zoom + "px" }),
|
|
2690
2781
|
onClick: (e) => n.$emit("marker-click", r.comment.id)
|
|
2691
|
-
}, [d(
|
|
2782
|
+
}, [d(e, {
|
|
2692
2783
|
name: r.isResolved ? "chat_bubble_check" : "chat_bubble_outline",
|
|
2693
2784
|
size: 18
|
|
2694
|
-
}, null, 8, ["name"])], 12,
|
|
2785
|
+
}, null, 8, ["name"])], 12, Sr))), 128))], 36)) : s("", !0);
|
|
2695
2786
|
}
|
|
2696
|
-
}), [["__scopeId", "data-v-
|
|
2787
|
+
}), [["__scopeId", "data-v-b6c7e425"]]), wr = ["aria-valuemax"], Tr = { class: "docx-horizontal-ruler__ticks" }, Er = ["title", "onDblclick"], Dr = 12240, Or = 1440, kr = 1440, Ar = 567, jr = 22, Mr = "var(--doc-primary)", Nr = "var(--doc-primary)", Pr = "var(--doc-primary-hover)", $ = 5, Fr = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
2697
2788
|
__name: "HorizontalRuler",
|
|
2698
2789
|
props: {
|
|
2699
2790
|
sectionProps: {},
|
|
@@ -2727,15 +2818,15 @@ var ze = {
|
|
|
2727
2818
|
setup(e, { emit: t }) {
|
|
2728
2819
|
let n = e, r = t, o = Math.round($ * 1.6), u = b(null), d = b(null), f = b(null), p = b(0), m = b("");
|
|
2729
2820
|
function _(e) {
|
|
2730
|
-
return
|
|
2821
|
+
return re(e) * n.zoom;
|
|
2731
2822
|
}
|
|
2732
2823
|
function y(e) {
|
|
2733
|
-
return Math.round(
|
|
2824
|
+
return Math.round(ne(e / n.zoom));
|
|
2734
2825
|
}
|
|
2735
|
-
let S = a(() => n.sectionProps?.pageWidth ??
|
|
2826
|
+
let S = a(() => n.sectionProps?.pageWidth ?? Dr), C = a(() => n.sectionProps?.marginLeft ?? Or), T = a(() => n.sectionProps?.marginRight ?? Or), E = a(() => S.value - C.value - T.value), D = a(() => _(S.value)), O = a(() => _(C.value)), k = a(() => _(T.value)), A = a(() => _(n.indentLeft)), j = a(() => _(n.indentRight)), N = a(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), P = a(() => _(N.value)), F = a(() => O.value + A.value), I = a(() => D.value - k.value - j.value), L = a(() => O.value + A.value + P.value), R = a(() => ({
|
|
2736
2827
|
position: "relative",
|
|
2737
2828
|
width: D.value + "px",
|
|
2738
|
-
height:
|
|
2829
|
+
height: jr + "px",
|
|
2739
2830
|
backgroundColor: "transparent",
|
|
2740
2831
|
overflow: "visible",
|
|
2741
2832
|
userSelect: "none",
|
|
@@ -2745,9 +2836,9 @@ var ze = {
|
|
|
2745
2836
|
top: 0,
|
|
2746
2837
|
left: 0,
|
|
2747
2838
|
width: O.value + "px",
|
|
2748
|
-
height:
|
|
2749
|
-
backgroundColor: "
|
|
2750
|
-
borderRight: "1px solid
|
|
2839
|
+
height: jr + "px",
|
|
2840
|
+
backgroundColor: "var(--doc-shadow-subtle)",
|
|
2841
|
+
borderRight: "1px solid var(--doc-shadow-subtle)",
|
|
2751
2842
|
cursor: n.editable ? "ew-resize" : "default",
|
|
2752
2843
|
zIndex: 1
|
|
2753
2844
|
})), z = a(() => ({
|
|
@@ -2755,15 +2846,15 @@ var ze = {
|
|
|
2755
2846
|
top: 0,
|
|
2756
2847
|
right: 0,
|
|
2757
2848
|
width: k.value + "px",
|
|
2758
|
-
height:
|
|
2759
|
-
backgroundColor: "
|
|
2760
|
-
borderLeft: "1px solid
|
|
2849
|
+
height: jr + "px",
|
|
2850
|
+
backgroundColor: "var(--doc-shadow-subtle)",
|
|
2851
|
+
borderLeft: "1px solid var(--doc-shadow-subtle)",
|
|
2761
2852
|
cursor: n.editable ? "ew-resize" : "default",
|
|
2762
2853
|
zIndex: 1
|
|
2763
2854
|
})), B = a(() => {
|
|
2764
2855
|
let e = [];
|
|
2765
2856
|
if (n.unit === "inch") {
|
|
2766
|
-
let t =
|
|
2857
|
+
let t = kr / 8, n = Math.ceil(S.value / t);
|
|
2767
2858
|
for (let r = 0; r <= n; r++) {
|
|
2768
2859
|
let n = r * t;
|
|
2769
2860
|
if (n > S.value) break;
|
|
@@ -2784,7 +2875,7 @@ var ze = {
|
|
|
2784
2875
|
});
|
|
2785
2876
|
}
|
|
2786
2877
|
} else {
|
|
2787
|
-
let t =
|
|
2878
|
+
let t = Ar / 10, n = Math.ceil(S.value / t);
|
|
2788
2879
|
for (let r = 0; r <= n; r++) {
|
|
2789
2880
|
let n = r * t;
|
|
2790
2881
|
if (n > S.value) break;
|
|
@@ -2812,10 +2903,10 @@ var ze = {
|
|
|
2812
2903
|
};
|
|
2813
2904
|
}) : []);
|
|
2814
2905
|
function H(e) {
|
|
2815
|
-
return n.unit === "cm" ? (e /
|
|
2906
|
+
return n.unit === "cm" ? (e / Ar).toFixed(1) + " cm" : (e / kr).toFixed(2) + "\"";
|
|
2816
2907
|
}
|
|
2817
2908
|
function U(e) {
|
|
2818
|
-
return d.value === e ?
|
|
2909
|
+
return d.value === e ? Pr : f.value === e ? Nr : Mr;
|
|
2819
2910
|
}
|
|
2820
2911
|
function W(e, t, r) {
|
|
2821
2912
|
return {
|
|
@@ -2853,7 +2944,7 @@ var ze = {
|
|
|
2853
2944
|
}
|
|
2854
2945
|
let K = 0;
|
|
2855
2946
|
function q(e, t) {
|
|
2856
|
-
n.editable && (d.value = e, t.clientX, e === "leftMargin" ? K = C.value : e === "rightMargin" ? K = T.value : e === "leftIndent" ? K = n.indentLeft : e === "rightIndent" ? K = n.indentRight : e === "firstLineIndent" && (K = n.firstLineIndent), p.value = t.clientX - (u.value?.getBoundingClientRect().left ?? 0), m.value = H(K), document.addEventListener("mousemove", J), document.addEventListener("mouseup",
|
|
2947
|
+
n.editable && (d.value = e, t.clientX, e === "leftMargin" ? K = C.value : e === "rightMargin" ? K = T.value : e === "leftIndent" ? K = n.indentLeft : e === "rightIndent" ? K = n.indentRight : e === "firstLineIndent" && (K = n.firstLineIndent), p.value = t.clientX - (u.value?.getBoundingClientRect().left ?? 0), m.value = H(K), document.addEventListener("mousemove", J), document.addEventListener("mouseup", Y));
|
|
2857
2948
|
}
|
|
2858
2949
|
function J(e) {
|
|
2859
2950
|
if (!d.value || !u.value) return;
|
|
@@ -2861,13 +2952,13 @@ var ze = {
|
|
|
2861
2952
|
if (!t) return;
|
|
2862
2953
|
let n = e.clientX - t.left;
|
|
2863
2954
|
p.value = n;
|
|
2864
|
-
let r = y(n), i =
|
|
2865
|
-
m.value = H(i),
|
|
2955
|
+
let r = y(n), i = X(d.value, r);
|
|
2956
|
+
m.value = H(i), te(d.value, i);
|
|
2866
2957
|
}
|
|
2867
|
-
function
|
|
2868
|
-
d.value = null, document.removeEventListener("mousemove", J), document.removeEventListener("mouseup",
|
|
2958
|
+
function Y(e) {
|
|
2959
|
+
d.value = null, document.removeEventListener("mousemove", J), document.removeEventListener("mouseup", Y);
|
|
2869
2960
|
}
|
|
2870
|
-
function
|
|
2961
|
+
function X(e, t) {
|
|
2871
2962
|
if (e === "leftMargin") {
|
|
2872
2963
|
let e = S.value - T.value - 720;
|
|
2873
2964
|
return Math.round(Math.max(0, Math.min(t, e)));
|
|
@@ -2887,7 +2978,7 @@ var ze = {
|
|
|
2887
2978
|
let r = S.value - T.value - t, i = E.value - n.indentLeft - 720;
|
|
2888
2979
|
return Math.round(Math.max(0, Math.min(r, i)));
|
|
2889
2980
|
}
|
|
2890
|
-
function
|
|
2981
|
+
function te(e, t) {
|
|
2891
2982
|
switch (e) {
|
|
2892
2983
|
case "leftMargin":
|
|
2893
2984
|
r("left-margin-change", t);
|
|
@@ -2907,7 +2998,7 @@ var ze = {
|
|
|
2907
2998
|
}
|
|
2908
2999
|
}
|
|
2909
3000
|
return g(() => {
|
|
2910
|
-
document.removeEventListener("mousemove", J), document.removeEventListener("mouseup",
|
|
3001
|
+
document.removeEventListener("mousemove", J), document.removeEventListener("mouseup", Y);
|
|
2911
3002
|
}), (t, n) => (v(), c("div", {
|
|
2912
3003
|
ref_key: "rulerRef",
|
|
2913
3004
|
ref: u,
|
|
@@ -2928,7 +3019,7 @@ var ze = {
|
|
|
2928
3019
|
style: h(z.value),
|
|
2929
3020
|
onMousedown: n[1] ||= M((t) => e.editable ? q("rightMargin", t) : null, ["prevent", "stop"])
|
|
2930
3021
|
}, null, 36),
|
|
2931
|
-
l("div",
|
|
3022
|
+
l("div", Tr, [(v(!0), c(i, null, x(B.value, (e, t) => (v(), c(i, { key: t }, [l("div", {
|
|
2932
3023
|
class: "docx-horizontal-ruler__tick-line",
|
|
2933
3024
|
style: h({
|
|
2934
3025
|
left: e.position + "px",
|
|
@@ -2969,15 +3060,15 @@ var ze = {
|
|
|
2969
3060
|
style: h({ left: e.px + "px" }),
|
|
2970
3061
|
title: `${e.label}`,
|
|
2971
3062
|
onDblclick: M((n) => t.$emit("tab-stop-remove", e.twips), ["prevent"])
|
|
2972
|
-
}, "L", 44,
|
|
3063
|
+
}, "L", 44, Er))), 128)),
|
|
2973
3064
|
d.value && m.value ? (v(), c("div", {
|
|
2974
3065
|
key: 3,
|
|
2975
3066
|
class: "docx-horizontal-ruler__tooltip",
|
|
2976
3067
|
style: h({ left: p.value + "px" })
|
|
2977
3068
|
}, w(m.value), 5)) : s("", !0)
|
|
2978
|
-
], 12,
|
|
3069
|
+
], 12, wr));
|
|
2979
3070
|
}
|
|
2980
|
-
}), [["__scopeId", "data-v-
|
|
3071
|
+
}), [["__scopeId", "data-v-e917c826"]]), Ir = { class: "docx-vertical-ruler__ticks" }, Lr = 15840, Rr = 1440, zr = 1440, Br = 567, Vr = 20, Hr = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
2981
3072
|
__name: "VerticalRuler",
|
|
2982
3073
|
props: {
|
|
2983
3074
|
sectionProps: {},
|
|
@@ -2992,14 +3083,14 @@ var ze = {
|
|
|
2992
3083
|
setup(e, { emit: t }) {
|
|
2993
3084
|
let n = e, r = t, o = b(null), u = b(null), d = b(null);
|
|
2994
3085
|
function f(e) {
|
|
2995
|
-
return
|
|
3086
|
+
return re(e) * n.zoom;
|
|
2996
3087
|
}
|
|
2997
3088
|
function p(e) {
|
|
2998
|
-
return Math.round(
|
|
3089
|
+
return Math.round(ne(e / n.zoom));
|
|
2999
3090
|
}
|
|
3000
|
-
let m = a(() => n.sectionProps?.pageHeight ??
|
|
3091
|
+
let m = a(() => n.sectionProps?.pageHeight ?? Lr), _ = a(() => n.sectionProps?.marginTop ?? Rr), y = a(() => n.sectionProps?.marginBottom ?? Rr), S = a(() => f(m.value)), C = a(() => f(_.value)), T = a(() => f(y.value)), E = a(() => ({
|
|
3001
3092
|
position: "relative",
|
|
3002
|
-
width:
|
|
3093
|
+
width: Vr + "px",
|
|
3003
3094
|
height: S.value + "px",
|
|
3004
3095
|
backgroundColor: "transparent",
|
|
3005
3096
|
overflow: "visible",
|
|
@@ -3008,7 +3099,7 @@ var ze = {
|
|
|
3008
3099
|
})), D = a(() => {
|
|
3009
3100
|
let e = [];
|
|
3010
3101
|
if (n.unit === "inch") {
|
|
3011
|
-
let t =
|
|
3102
|
+
let t = zr / 8, n = Math.ceil(m.value / t);
|
|
3012
3103
|
for (let r = 0; r <= n; r++) {
|
|
3013
3104
|
let n = r * t;
|
|
3014
3105
|
if (n > m.value) break;
|
|
@@ -3029,7 +3120,7 @@ var ze = {
|
|
|
3029
3120
|
});
|
|
3030
3121
|
}
|
|
3031
3122
|
} else {
|
|
3032
|
-
let t =
|
|
3123
|
+
let t = Br / 10, n = Math.ceil(m.value / t);
|
|
3033
3124
|
for (let r = 0; r <= n; r++) {
|
|
3034
3125
|
let n = r * t;
|
|
3035
3126
|
if (n > m.value) break;
|
|
@@ -3054,7 +3145,7 @@ var ze = {
|
|
|
3054
3145
|
position: "absolute",
|
|
3055
3146
|
top: e - 5 + "px",
|
|
3056
3147
|
right: 0,
|
|
3057
|
-
width:
|
|
3148
|
+
width: Vr + "px",
|
|
3058
3149
|
height: "10px",
|
|
3059
3150
|
cursor: n.editable ? "ns-resize" : "default",
|
|
3060
3151
|
zIndex: u.value === null ? 1 : 10
|
|
@@ -3070,7 +3161,7 @@ var ze = {
|
|
|
3070
3161
|
height: "0",
|
|
3071
3162
|
borderTop: "5px solid transparent",
|
|
3072
3163
|
borderBottom: "5px solid transparent",
|
|
3073
|
-
borderRight: `8px solid ${t ? "var(--doc-primary-hover
|
|
3164
|
+
borderRight: `8px solid ${t ? "var(--doc-primary-hover)" : "var(--doc-primary)"}`,
|
|
3074
3165
|
transition: "border-right-color 0.1s"
|
|
3075
3166
|
};
|
|
3076
3167
|
}
|
|
@@ -3097,7 +3188,7 @@ var ze = {
|
|
|
3097
3188
|
"aria-label": "Vertical ruler",
|
|
3098
3189
|
"aria-orientation": "vertical"
|
|
3099
3190
|
}, [
|
|
3100
|
-
l("div",
|
|
3191
|
+
l("div", Ir, [(v(!0), c(i, null, x(D.value, (e, t) => (v(), c(i, { key: t }, [l("div", {
|
|
3101
3192
|
class: "docx-vertical-ruler__tick-line",
|
|
3102
3193
|
style: h({
|
|
3103
3194
|
top: e.position + "px",
|
|
@@ -3126,10 +3217,10 @@ var ze = {
|
|
|
3126
3217
|
}, [l("div", { style: h(k("bottomMargin")) }, null, 4)], 36)) : s("", !0)
|
|
3127
3218
|
], 4));
|
|
3128
3219
|
}
|
|
3129
|
-
}), [["__scopeId", "data-v-
|
|
3220
|
+
}), [["__scopeId", "data-v-42fc6ef7"]]), Ur = { class: "doc-name" }, Wr = ["value"], Gr = {
|
|
3130
3221
|
key: 1,
|
|
3131
3222
|
class: "doc-name__text"
|
|
3132
|
-
},
|
|
3223
|
+
}, Kr = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
3133
3224
|
__name: "DocumentName",
|
|
3134
3225
|
props: {
|
|
3135
3226
|
modelValue: {},
|
|
@@ -3148,28 +3239,28 @@ var ze = {
|
|
|
3148
3239
|
function s(e) {
|
|
3149
3240
|
e.target.value.trim() || r("update:modelValue", "Untitled document.docx");
|
|
3150
3241
|
}
|
|
3151
|
-
return (t, n) => (v(), c("div",
|
|
3242
|
+
return (t, n) => (v(), c("div", Ur, [e.editable ? (v(), c("input", {
|
|
3152
3243
|
key: 0,
|
|
3153
3244
|
class: "doc-name__input",
|
|
3154
3245
|
value: i.value,
|
|
3155
3246
|
onInput: o,
|
|
3156
3247
|
onBlur: s,
|
|
3157
3248
|
placeholder: "Untitled document"
|
|
3158
|
-
}, null, 40,
|
|
3249
|
+
}, null, 40, Wr)) : (v(), c("span", Gr, w(i.value || "Untitled document"), 1))]));
|
|
3159
3250
|
}
|
|
3160
|
-
}), [["__scopeId", "data-v-
|
|
3251
|
+
}), [["__scopeId", "data-v-3f4b57cc"]]), qr = ["disabled", "onClick"], Jr = {
|
|
3161
3252
|
key: 0,
|
|
3162
3253
|
class: "docx-menu-dropdown__separator"
|
|
3163
|
-
},
|
|
3254
|
+
}, Yr = ["onMouseenter", "onMouseleave"], Xr = ["disabled", "onClick"], Zr = { class: "docx-menu-dropdown__label" }, Qr = {
|
|
3164
3255
|
key: 1,
|
|
3165
3256
|
class: "docx-menu-dropdown__shortcut"
|
|
3166
|
-
},
|
|
3257
|
+
}, $r = {
|
|
3167
3258
|
key: 2,
|
|
3168
3259
|
class: "docx-menu-dropdown__chevron"
|
|
3169
|
-
},
|
|
3260
|
+
}, ei = {
|
|
3170
3261
|
key: 0,
|
|
3171
3262
|
class: "docx-menu-dropdown__submenu"
|
|
3172
|
-
},
|
|
3263
|
+
}, ti = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
3173
3264
|
__name: "MenuDropdown",
|
|
3174
3265
|
props: {
|
|
3175
3266
|
label: {},
|
|
@@ -3180,7 +3271,7 @@ var ze = {
|
|
|
3180
3271
|
default: !1
|
|
3181
3272
|
}
|
|
3182
3273
|
},
|
|
3183
|
-
setup(
|
|
3274
|
+
setup(t) {
|
|
3184
3275
|
function n(e) {
|
|
3185
3276
|
return "type" in e && e.type === "separator";
|
|
3186
3277
|
}
|
|
@@ -3199,47 +3290,47 @@ var ze = {
|
|
|
3199
3290
|
trigger: k(({ toggle: n }) => [l("button", {
|
|
3200
3291
|
type: "button",
|
|
3201
3292
|
class: m(["docx-menu-dropdown__trigger", { "docx-menu-dropdown__trigger--open": r.value }]),
|
|
3202
|
-
disabled:
|
|
3293
|
+
disabled: t.disabled,
|
|
3203
3294
|
onMousedown: g[0] ||= M(() => {}, ["prevent"]),
|
|
3204
3295
|
onClick: M(n, ["prevent"])
|
|
3205
|
-
}, [u(w(
|
|
3296
|
+
}, [u(w(t.label) + " ", 1), t.showChevron ? (v(), o(e, {
|
|
3206
3297
|
key: 0,
|
|
3207
3298
|
name: "arrow_drop_down",
|
|
3208
3299
|
size: 16
|
|
3209
|
-
})) : s("", !0)], 42,
|
|
3300
|
+
})) : s("", !0)], 42, qr)]),
|
|
3210
3301
|
panel: k(() => [l("div", {
|
|
3211
3302
|
class: "docx-menu-dropdown__menu",
|
|
3212
3303
|
onMousedown: g[1] ||= M(() => {}, ["prevent"])
|
|
3213
|
-
}, [(v(!0), c(i, null, x(
|
|
3304
|
+
}, [(v(!0), c(i, null, x(t.items, (t, r) => (v(), c(i, { key: r }, [n(t) ? (v(), c("div", Jr)) : (v(), c("div", {
|
|
3214
3305
|
key: 1,
|
|
3215
3306
|
class: "docx-menu-dropdown__wrap",
|
|
3216
|
-
onMouseenter: (
|
|
3217
|
-
onMouseleave: (
|
|
3307
|
+
onMouseenter: (e) => t.submenu ? a.value = r : void 0,
|
|
3308
|
+
onMouseleave: (e) => t.submenu ? a.value = null : void 0
|
|
3218
3309
|
}, [l("button", {
|
|
3219
3310
|
type: "button",
|
|
3220
|
-
class: m(["docx-menu-dropdown__item", { "docx-menu-dropdown__item--disabled":
|
|
3221
|
-
disabled:
|
|
3222
|
-
onClick: M((
|
|
3311
|
+
class: m(["docx-menu-dropdown__item", { "docx-menu-dropdown__item--disabled": t.disabled }]),
|
|
3312
|
+
disabled: t.disabled,
|
|
3313
|
+
onClick: M((e) => p(t), ["prevent"])
|
|
3223
3314
|
}, [
|
|
3224
|
-
|
|
3315
|
+
t.icon ? (v(), o(e, {
|
|
3225
3316
|
key: 0,
|
|
3226
|
-
name:
|
|
3317
|
+
name: t.icon,
|
|
3227
3318
|
size: 18
|
|
3228
3319
|
}, null, 8, ["name"])) : s("", !0),
|
|
3229
|
-
l("span",
|
|
3230
|
-
|
|
3231
|
-
|
|
3320
|
+
l("span", Zr, w(t.label), 1),
|
|
3321
|
+
t.shortcut ? (v(), c("span", Qr, w(t.shortcut), 1)) : s("", !0),
|
|
3322
|
+
t.submenu ? (v(), c("span", $r, [d(e, {
|
|
3232
3323
|
name: "keyboard_arrow_right",
|
|
3233
3324
|
size: 16
|
|
3234
3325
|
})])) : s("", !0)
|
|
3235
|
-
], 10,
|
|
3236
|
-
item:
|
|
3326
|
+
], 10, Xr), t.submenu && a.value === r ? (v(), c("div", ei, [S(h.$slots, "submenu", {
|
|
3327
|
+
item: t,
|
|
3237
3328
|
closeMenu: f
|
|
3238
|
-
}, void 0, !0)])) : s("", !0)], 40,
|
|
3329
|
+
}, void 0, !0)])) : s("", !0)], 40, Yr))], 64))), 128))], 32)]),
|
|
3239
3330
|
_: 3
|
|
3240
3331
|
}, 8, ["open"]));
|
|
3241
3332
|
}
|
|
3242
|
-
}), [["__scopeId", "data-v-
|
|
3333
|
+
}), [["__scopeId", "data-v-f87b9133"]]), ni = ["aria-selected", "onMouseenter"], ri = { class: "docx-table-grid-inline__label" }, ii = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
3243
3334
|
__name: "TableGridInline",
|
|
3244
3335
|
props: {
|
|
3245
3336
|
gridRows: { default: 6 },
|
|
@@ -3275,105 +3366,135 @@ var ze = {
|
|
|
3275
3366
|
o.value = e.r, s.value = e.c;
|
|
3276
3367
|
},
|
|
3277
3368
|
onClick: M(d, ["prevent"])
|
|
3278
|
-
}, null, 42,
|
|
3369
|
+
}, null, 42, ni))), 128))], 36), l("div", ri, w(o.value > 0 && s.value > 0 ? `${s.value} × ${o.value}` : "Select size"), 1)]));
|
|
3279
3370
|
}
|
|
3280
|
-
}), [["__scopeId", "data-v-
|
|
3371
|
+
}), [["__scopeId", "data-v-62b10375"]]), ai = {
|
|
3281
3372
|
class: "menu-bar",
|
|
3282
3373
|
role: "menubar"
|
|
3283
|
-
},
|
|
3374
|
+
}, oi = {
|
|
3375
|
+
key: 1,
|
|
3376
|
+
class: "menu-bar__break-submenu"
|
|
3377
|
+
}, si = ["onClick"], ci = /* @__PURE__ */ n(/* @__PURE__ */ f({
|
|
3284
3378
|
__name: "MenuBar",
|
|
3285
3379
|
emits: ["action", "insert-table"],
|
|
3286
|
-
setup(
|
|
3287
|
-
let
|
|
3288
|
-
function
|
|
3289
|
-
return () =>
|
|
3380
|
+
setup(n, { emit: r }) {
|
|
3381
|
+
let u = r, { t: f } = t();
|
|
3382
|
+
function p(e) {
|
|
3383
|
+
return () => u("action", e);
|
|
3290
3384
|
}
|
|
3291
|
-
let
|
|
3385
|
+
let m = a(() => [
|
|
3292
3386
|
{
|
|
3293
3387
|
icon: "file_upload",
|
|
3294
|
-
label:
|
|
3295
|
-
shortcut:
|
|
3296
|
-
onClick:
|
|
3388
|
+
label: f("toolbar.open"),
|
|
3389
|
+
shortcut: f("toolbar.openShortcut"),
|
|
3390
|
+
onClick: p("open")
|
|
3297
3391
|
},
|
|
3298
3392
|
{
|
|
3299
3393
|
icon: "file_download",
|
|
3300
|
-
label:
|
|
3301
|
-
shortcut:
|
|
3302
|
-
onClick:
|
|
3394
|
+
label: f("toolbar.save"),
|
|
3395
|
+
shortcut: f("toolbar.saveShortcut"),
|
|
3396
|
+
onClick: p("save")
|
|
3303
3397
|
},
|
|
3304
3398
|
{ type: "separator" },
|
|
3305
3399
|
{
|
|
3306
3400
|
icon: "settings",
|
|
3307
|
-
label:
|
|
3308
|
-
onClick:
|
|
3401
|
+
label: f("toolbar.pageSetup"),
|
|
3402
|
+
onClick: p("pageSetup")
|
|
3309
3403
|
}
|
|
3310
|
-
]),
|
|
3404
|
+
]), h = a(() => [{
|
|
3311
3405
|
icon: "format_textdirection_l_to_r",
|
|
3312
|
-
label:
|
|
3313
|
-
onClick:
|
|
3406
|
+
label: f("toolbar.leftToRight"),
|
|
3407
|
+
onClick: p("dirLTR")
|
|
3314
3408
|
}, {
|
|
3315
3409
|
icon: "format_textdirection_r_to_l",
|
|
3316
|
-
label:
|
|
3317
|
-
onClick:
|
|
3318
|
-
}]),
|
|
3410
|
+
label: f("toolbar.rightToLeft"),
|
|
3411
|
+
onClick: p("dirRTL")
|
|
3412
|
+
}]), g = a(() => [
|
|
3319
3413
|
{
|
|
3320
3414
|
icon: "image",
|
|
3321
|
-
label:
|
|
3322
|
-
onClick:
|
|
3415
|
+
label: f("toolbar.image"),
|
|
3416
|
+
onClick: p("insertImage")
|
|
3323
3417
|
},
|
|
3324
3418
|
{
|
|
3325
3419
|
icon: "grid_on",
|
|
3326
|
-
label:
|
|
3420
|
+
label: f("toolbar.table"),
|
|
3327
3421
|
key: "table",
|
|
3328
3422
|
submenu: !0
|
|
3329
3423
|
},
|
|
3330
3424
|
{ type: "separator" },
|
|
3331
3425
|
{
|
|
3332
3426
|
icon: "page_break",
|
|
3333
|
-
label:
|
|
3334
|
-
|
|
3427
|
+
label: f("toolbar.break"),
|
|
3428
|
+
key: "break",
|
|
3429
|
+
submenu: !0
|
|
3335
3430
|
},
|
|
3336
3431
|
{
|
|
3337
3432
|
icon: "format_list_numbered",
|
|
3338
|
-
label:
|
|
3339
|
-
onClick:
|
|
3433
|
+
label: f("toolbar.tableOfContents"),
|
|
3434
|
+
onClick: p("insertTOC")
|
|
3340
3435
|
},
|
|
3341
3436
|
{
|
|
3342
3437
|
icon: "branding_watermark",
|
|
3343
|
-
label:
|
|
3344
|
-
onClick:
|
|
3438
|
+
label: f("toolbar.watermark"),
|
|
3439
|
+
onClick: p("watermark")
|
|
3345
3440
|
}
|
|
3346
|
-
]),
|
|
3347
|
-
|
|
3348
|
-
|
|
3441
|
+
]), _ = a(() => [
|
|
3442
|
+
{
|
|
3443
|
+
icon: "page_break",
|
|
3444
|
+
label: f("toolbar.pageBreak"),
|
|
3445
|
+
action: "insertPageBreak"
|
|
3446
|
+
},
|
|
3447
|
+
{
|
|
3448
|
+
icon: "horizontal_rule",
|
|
3449
|
+
label: f("toolbar.sectionBreakNextPage"),
|
|
3450
|
+
action: "insertSectionBreakNextPage"
|
|
3451
|
+
},
|
|
3452
|
+
{
|
|
3453
|
+
icon: "border_horizontal",
|
|
3454
|
+
label: f("toolbar.sectionBreakContinuous"),
|
|
3455
|
+
action: "insertSectionBreakContinuous"
|
|
3456
|
+
}
|
|
3457
|
+
]), y = a(() => [{
|
|
3458
|
+
label: f("toolbar.reportIssue"),
|
|
3459
|
+
onClick: p("reportIssue")
|
|
3349
3460
|
}]);
|
|
3350
|
-
return (
|
|
3351
|
-
d(
|
|
3352
|
-
label: T(
|
|
3353
|
-
items:
|
|
3461
|
+
return (t, n) => (v(), c("div", ai, [
|
|
3462
|
+
d(ti, {
|
|
3463
|
+
label: T(f)("toolbar.file"),
|
|
3464
|
+
items: m.value
|
|
3354
3465
|
}, null, 8, ["label", "items"]),
|
|
3355
|
-
d(
|
|
3356
|
-
label: T(
|
|
3357
|
-
items:
|
|
3466
|
+
d(ti, {
|
|
3467
|
+
label: T(f)("toolbar.format"),
|
|
3468
|
+
items: h.value
|
|
3358
3469
|
}, null, 8, ["label", "items"]),
|
|
3359
|
-
d(
|
|
3360
|
-
label: T(
|
|
3361
|
-
items:
|
|
3470
|
+
d(ti, {
|
|
3471
|
+
label: T(f)("toolbar.insert"),
|
|
3472
|
+
items: g.value
|
|
3362
3473
|
}, {
|
|
3363
|
-
submenu: k(({ item:
|
|
3474
|
+
submenu: k(({ item: t, closeMenu: n }) => [t.key === "table" ? (v(), o(ii, {
|
|
3364
3475
|
key: 0,
|
|
3365
|
-
onInsert: (e,
|
|
3366
|
-
|
|
3476
|
+
onInsert: (e, t) => {
|
|
3477
|
+
u("insert-table", e, t), n();
|
|
3367
3478
|
}
|
|
3368
|
-
}, null, 8, ["onInsert"])) :
|
|
3479
|
+
}, null, 8, ["onInsert"])) : t.key === "break" ? (v(), c("div", oi, [(v(!0), c(i, null, x(_.value, (t) => (v(), c("button", {
|
|
3480
|
+
key: t.action,
|
|
3481
|
+
type: "button",
|
|
3482
|
+
class: "menu-bar__break-item",
|
|
3483
|
+
onClick: M(() => {
|
|
3484
|
+
u("action", t.action), n();
|
|
3485
|
+
}, ["prevent"])
|
|
3486
|
+
}, [d(e, {
|
|
3487
|
+
name: t.icon,
|
|
3488
|
+
size: 18
|
|
3489
|
+
}, null, 8, ["name"]), l("span", null, w(t.label), 1)], 8, si))), 128))])) : s("", !0)]),
|
|
3369
3490
|
_: 1
|
|
3370
3491
|
}, 8, ["label", "items"]),
|
|
3371
|
-
d(
|
|
3372
|
-
label: T(
|
|
3373
|
-
items:
|
|
3492
|
+
d(ti, {
|
|
3493
|
+
label: T(f)("toolbar.help"),
|
|
3494
|
+
items: y.value
|
|
3374
3495
|
}, null, 8, ["label", "items"])
|
|
3375
3496
|
]));
|
|
3376
3497
|
}
|
|
3377
|
-
}), [["__scopeId", "data-v-
|
|
3498
|
+
}), [["__scopeId", "data-v-14562b7b"]]);
|
|
3378
3499
|
//#endregion
|
|
3379
|
-
export {
|
|
3500
|
+
export { Pe as C, be as D, Q as E, Fe as S, ke as T, Rt as _, Hr as a, Ot as b, xr as c, Un as d, Vn as f, vn as g, yn as h, Kr as i, _r as l, Dn as m, ii as n, Fr as o, jn as p, ti as r, Cr as s, ci as t, pr as u, Nt as v, Ne as w, Dt as x, Mt as y };
|