@stll/folio-vue 0.32.0 → 0.33.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/FindReplaceDialog-CfcTl2Ra.cjs +1 -0
- package/dist/FindReplaceDialog-DEWjhuOw.js +168 -0
- package/dist/HorizontalRuler-Cuk0l4Us.cjs +1 -0
- package/dist/HorizontalRuler-TM9dg--R.js +341 -0
- package/dist/HyperlinkDialog-BEse_y7R.js +175 -0
- package/dist/HyperlinkDialog-Cs1y6aol.cjs +1 -0
- package/dist/ImagePropertiesDialog-CTbX2GrE.cjs +1 -0
- package/dist/ImagePropertiesDialog-mrJ8S3sl.js +186 -0
- package/dist/ImageSelectionOverlay-DULrvfOJ.js +386 -0
- package/dist/ImageSelectionOverlay-Dr0lg9WZ.cjs +1 -0
- package/dist/InsertSymbolDialog-BjB-Q9EO.js +93 -0
- package/dist/InsertSymbolDialog-BsjgPYM-.cjs +1 -0
- package/dist/PageSetupDialog-CZ5fE9rz.cjs +1 -0
- package/dist/PageSetupDialog-DNNSezj3.js +208 -0
- package/dist/SetNumberingValueDialog-ClCYr37D.cjs +1 -0
- package/dist/SetNumberingValueDialog-CwLHfO7f.js +54 -0
- package/dist/SplitCellDialog-Bfuo5WCO.cjs +1 -0
- package/dist/SplitCellDialog-HIg4ZEqt.js +1031 -0
- package/dist/StylePicker-BnGGlXOX.cjs +4 -0
- package/dist/{StylePicker-RAC5uYts.js → StylePicker-F3cLPvRE.js} +593 -1100
- package/dist/TablePropertiesDialog-CRX9Xgdr.js +102 -0
- package/dist/TablePropertiesDialog-ClJSuB0F.cjs +1 -0
- package/dist/VerticalRuler-D973NTMv.js +178 -0
- package/dist/VerticalRuler-DVi2P_TO.cjs +1 -0
- package/dist/WatermarkDialog-BYyBTlDK.cjs +1 -0
- package/dist/WatermarkDialog-BoAdQ-qK.js +161 -0
- package/dist/components/dialogs/recentSymbols.d.ts +7 -0
- package/dist/composables/useDocxEditor.d.ts +4 -1
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +1 -1
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +9 -1
- package/dist/{SplitCellDialog-DULmbU_P.js → folio-ui-ctJdVP-s.js} +713 -2743
- package/dist/folio-ui-u7h3WXUO.cjs +15 -0
- package/dist/folio-vue.css +1 -1
- package/dist/i18n/LocaleLoading.d.ts +3 -0
- package/dist/i18n/index.d.ts +18 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1661 -2039
- package/dist/messages/ar.cjs +1 -1
- package/dist/messages/cs.cjs +1 -1
- package/dist/messages/de.cjs +1 -1
- package/dist/messages/en.cjs +1 -1
- package/dist/messages/es.cjs +1 -1
- package/dist/messages/et.cjs +1 -1
- package/dist/messages/fr.cjs +1 -1
- package/dist/messages/he.cjs +1 -1
- package/dist/messages/hi.cjs +1 -1
- package/dist/messages/hu.cjs +1 -1
- package/dist/messages/lt.cjs +1 -1
- package/dist/messages/lv.cjs +1 -1
- package/dist/messages/pl.cjs +1 -1
- package/dist/messages/pt-BR.cjs +1 -1
- package/dist/messages/sk.cjs +1 -1
- package/dist/messages/tr.cjs +1 -1
- package/dist/messages/zh-CN.cjs +1 -1
- package/dist/rolldown-runtime-DbbDpzbe.cjs +1 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +28 -18
- package/dist/useZoom-CX69Me_z.js +1010 -0
- package/dist/useZoom-QSSrGY_r.cjs +1 -0
- package/package.json +2 -2
- package/dist/SplitCellDialog-Bc2TjxMb.cjs +0 -15
- package/dist/StylePicker-Bb0FkLYi.cjs +0 -4
- package/dist/rolldown-runtime-5iZMYShA.cjs +0 -1
- package/dist/useZoom-HGLyQ-Y0.js +0 -1007
- package/dist/useZoom-vZRWHzC-.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as e, a as t, g as n, m as r, p as i } from "./folio-ui-ctJdVP-s.js";
|
|
2
2
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, reactive as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, toRef as D, unref as O, vModelSelect as k, vModelText as A, watch as j, withCtx as M, withDirectives as N, withKeys as P, withModifiers as F } from "vue";
|
|
3
3
|
import { DISPLAY_MODES as I } from "@stll/folio-core/managers/EditorModeManager";
|
|
4
4
|
import { PANEL_METRICS as L } from "@stll/folio-core/panel-layout";
|
|
@@ -7,17 +7,15 @@ import { executeEditorCommand as z } from "@stll/folio-core/prosemirror/executeE
|
|
|
7
7
|
import { getTableContext as B } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
|
|
8
8
|
import { extractSelectionContext as te } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
|
|
9
9
|
import { getFindParagraphText as V } from "@stll/folio-core/utils/findReplace";
|
|
10
|
-
import { clearFormatting as
|
|
11
|
-
import { sliceText as
|
|
12
|
-
import { createRenderedDomContext as
|
|
13
|
-
import { commentAnchorSelector as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { clampRulerValue as Y, createRulerControl as X, getHorizontalRulerBounds as ae, getVerticalRulerBounds as Z } from "@stll/folio-core/utils/rulerControl";
|
|
18
|
-
import { resolveSidebarItemPositions as oe } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
|
|
10
|
+
import { clearFormatting as ne } from "@stll/folio-core/prosemirror/commands/formatting";
|
|
11
|
+
import { sliceText as H } from "@stll/folio-core/utils/sliceText";
|
|
12
|
+
import { createRenderedDomContext as re } from "@stll/folio-core/render-dom/RenderedDomContext";
|
|
13
|
+
import { commentAnchorSelector as U, indexCommentAnchors as ie } from "@stll/folio-core/render-dom/commentAnchorAttributes";
|
|
14
|
+
import { redoDepth as ae, undoDepth as oe } from "prosemirror-history";
|
|
15
|
+
import { onDocumentPointerDown as W } from "@stll/folio-core/utils/documentPointerDown";
|
|
16
|
+
import { resolveSidebarItemPositions as G } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
|
|
19
17
|
// src/components/CommentMarginMarkers.vue?vue&type=script&setup=true&lang.ts
|
|
20
|
-
var
|
|
18
|
+
var K = ["title", "onClick"], q = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
21
19
|
__name: "CommentMarginMarkers",
|
|
22
20
|
props: {
|
|
23
21
|
comments: {},
|
|
@@ -33,7 +31,7 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
33
31
|
if (t.sidebarOpen) return [];
|
|
34
32
|
let e = t.pagesContainer;
|
|
35
33
|
if (!e) return [];
|
|
36
|
-
let n = e.getBoundingClientRect(), r =
|
|
34
|
+
let n = e.getBoundingClientRect(), r = ie(e), i = [];
|
|
37
35
|
for (let a of t.comments) {
|
|
38
36
|
if (a.parentId != null) continue;
|
|
39
37
|
let o = r.get(String(a.id));
|
|
@@ -67,12 +65,12 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
67
65
|
}, [f(r, {
|
|
68
66
|
name: n.isResolved ? "chat_bubble_check" : "chat_bubble_outline",
|
|
69
67
|
size: 18
|
|
70
|
-
}, null, 8, ["name"])], 12,
|
|
68
|
+
}, null, 8, ["name"])], 12, K))), 128))], 36)) : c("", !0);
|
|
71
69
|
}
|
|
72
|
-
}), [["__scopeId", "data-v-4157fff7"]]),
|
|
70
|
+
}), [["__scopeId", "data-v-4157fff7"]]), J = { class: "doc-name" }, se = ["value"], ce = {
|
|
73
71
|
key: 1,
|
|
74
72
|
class: "doc-name__text"
|
|
75
|
-
},
|
|
73
|
+
}, le = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
76
74
|
__name: "DocumentName",
|
|
77
75
|
props: {
|
|
78
76
|
modelValue: {},
|
|
@@ -94,16 +92,16 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
94
92
|
let t = e.target;
|
|
95
93
|
t instanceof HTMLInputElement && (t.value.trim() || r("update:modelValue", "Untitled document.docx"));
|
|
96
94
|
}
|
|
97
|
-
return (t, n) => (b(), l("div",
|
|
95
|
+
return (t, n) => (b(), l("div", J, [e.editable ? (b(), l("input", {
|
|
98
96
|
key: 0,
|
|
99
97
|
class: "doc-name__input",
|
|
100
98
|
value: i.value,
|
|
101
99
|
placeholder: "Untitled document",
|
|
102
100
|
onInput: a,
|
|
103
101
|
onBlur: s
|
|
104
|
-
}, null, 40,
|
|
102
|
+
}, null, 40, se)) : (b(), l("span", ce, E(i.value || "Untitled document"), 1))]));
|
|
105
103
|
}
|
|
106
|
-
}), [["__scopeId", "data-v-0f0d068b"]]),
|
|
104
|
+
}), [["__scopeId", "data-v-0f0d068b"]]), ue = ["aria-selected", "onMouseenter"], de = { class: "docx-table-grid-inline__label" }, Y = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
107
105
|
__name: "TableGridInline",
|
|
108
106
|
props: {
|
|
109
107
|
gridRows: { default: 6 },
|
|
@@ -139,15 +137,15 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
139
137
|
i.value = e.r, s.value = e.c;
|
|
140
138
|
},
|
|
141
139
|
onClick: F(d, ["prevent"])
|
|
142
|
-
}, null, 42,
|
|
140
|
+
}, null, 42, ue))), 128))], 36), u("div", de, E(i.value > 0 && s.value > 0 ? `${s.value} × ${i.value}` : "Select size"), 1)]));
|
|
143
141
|
}
|
|
144
|
-
}), [["__scopeId", "data-v-4e94349a"]]),
|
|
142
|
+
}), [["__scopeId", "data-v-4e94349a"]]), fe = {
|
|
145
143
|
class: "menu-bar",
|
|
146
144
|
role: "menubar"
|
|
147
|
-
},
|
|
145
|
+
}, pe = {
|
|
148
146
|
key: 1,
|
|
149
147
|
class: "menu-bar__break-submenu"
|
|
150
|
-
},
|
|
148
|
+
}, me = ["onClick"], he = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
151
149
|
__name: "MenuBar",
|
|
152
150
|
props: {
|
|
153
151
|
showFileOpen: {
|
|
@@ -164,8 +162,8 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
164
162
|
}
|
|
165
163
|
},
|
|
166
164
|
emits: ["action", "insert-table"],
|
|
167
|
-
setup(
|
|
168
|
-
let { Menu: d } =
|
|
165
|
+
setup(n, { emit: i }) {
|
|
166
|
+
let { Menu: d } = t(), p = n, m = i, { t: h } = e();
|
|
169
167
|
function g(e) {
|
|
170
168
|
return () => m("action", e);
|
|
171
169
|
}
|
|
@@ -243,7 +241,7 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
243
241
|
label: h("toolbar.reportIssue"),
|
|
244
242
|
onClick: g("reportIssue")
|
|
245
243
|
}]);
|
|
246
|
-
return (
|
|
244
|
+
return (e, t) => (b(), l("div", fe, [
|
|
247
245
|
f(O(d), {
|
|
248
246
|
label: O(h)("toolbar.file"),
|
|
249
247
|
items: _.value
|
|
@@ -256,12 +254,12 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
256
254
|
label: O(h)("toolbar.insert"),
|
|
257
255
|
items: y.value
|
|
258
256
|
}, {
|
|
259
|
-
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(
|
|
257
|
+
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(Y, {
|
|
260
258
|
key: 0,
|
|
261
259
|
onInsert: (e, n) => {
|
|
262
260
|
m("insert-table", e, n), t();
|
|
263
261
|
}
|
|
264
|
-
}, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div",
|
|
262
|
+
}, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div", pe, [(b(!0), l(a, null, C(x.value, (e) => (b(), l("button", {
|
|
265
263
|
key: e.action,
|
|
266
264
|
type: "button",
|
|
267
265
|
class: "menu-bar__break-item",
|
|
@@ -271,17 +269,17 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
271
269
|
}, [f(r, {
|
|
272
270
|
name: e.icon,
|
|
273
271
|
size: 18
|
|
274
|
-
}, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8,
|
|
272
|
+
}, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8, me))), 128))])) : c("", !0)]),
|
|
275
273
|
_: 1
|
|
276
274
|
}, 8, ["label", "items"]),
|
|
277
|
-
|
|
275
|
+
n.showHelpMenu ? (b(), s(O(d), {
|
|
278
276
|
key: 0,
|
|
279
277
|
label: O(h)("toolbar.help"),
|
|
280
278
|
items: S.value
|
|
281
279
|
}, null, 8, ["label", "items"])) : c("", !0)
|
|
282
280
|
]));
|
|
283
281
|
}
|
|
284
|
-
}), [["__scopeId", "data-v-a8e543d5"]]),
|
|
282
|
+
}), [["__scopeId", "data-v-a8e543d5"]]), ge = [
|
|
285
283
|
{
|
|
286
284
|
name: "Arial",
|
|
287
285
|
fontFamily: "Arial",
|
|
@@ -342,7 +340,7 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
342
340
|
fontFamily: "Consolas",
|
|
343
341
|
category: "monospace"
|
|
344
342
|
}
|
|
345
|
-
],
|
|
343
|
+
], _e = [
|
|
346
344
|
8,
|
|
347
345
|
9,
|
|
348
346
|
10,
|
|
@@ -357,7 +355,7 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
357
355
|
36,
|
|
358
356
|
48,
|
|
359
357
|
72
|
|
360
|
-
],
|
|
358
|
+
], X = [
|
|
361
359
|
{
|
|
362
360
|
id: "Normal",
|
|
363
361
|
label: "Normal",
|
|
@@ -388,7 +386,7 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
388
386
|
label: "Heading 3",
|
|
389
387
|
nameKey: "styles.heading3"
|
|
390
388
|
}
|
|
391
|
-
],
|
|
389
|
+
], ve = [
|
|
392
390
|
{
|
|
393
391
|
label: "Single",
|
|
394
392
|
labelKey: "lineSpacing.single",
|
|
@@ -407,14 +405,14 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
407
405
|
labelKey: "lineSpacing.double",
|
|
408
406
|
value: 480
|
|
409
407
|
}
|
|
410
|
-
],
|
|
408
|
+
], ye = [
|
|
411
409
|
.5,
|
|
412
410
|
.75,
|
|
413
411
|
1,
|
|
414
412
|
1.25,
|
|
415
413
|
1.5,
|
|
416
414
|
2
|
|
417
|
-
],
|
|
415
|
+
], be = {
|
|
418
416
|
Title: 26,
|
|
419
417
|
Subtitle: 18,
|
|
420
418
|
Heading1: 24,
|
|
@@ -424,22 +422,22 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
|
424
422
|
Heading5: 13,
|
|
425
423
|
Heading6: 13,
|
|
426
424
|
Normal: 14
|
|
427
|
-
},
|
|
425
|
+
}, xe = /* @__PURE__ */ new Set([
|
|
428
426
|
"Title",
|
|
429
427
|
"Heading1",
|
|
430
428
|
"Heading2",
|
|
431
429
|
"Heading3"
|
|
432
|
-
]),
|
|
433
|
-
function
|
|
434
|
-
let t =
|
|
430
|
+
]), Se = { Subtitle: "666666" }, Ce = "#4a6c8c";
|
|
431
|
+
function we(e) {
|
|
432
|
+
let t = be[e.styleId], n = {
|
|
435
433
|
fontSize: t ? `${t}px` : `${Math.min(Math.max(e.fontSize ? e.fontSize / 2 : 11, 11), 20)}px`,
|
|
436
434
|
lineHeight: "1.3"
|
|
437
435
|
};
|
|
438
|
-
(e.bold ??
|
|
439
|
-
let r = e.color ??
|
|
440
|
-
return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color =
|
|
436
|
+
(e.bold ?? xe.has(e.styleId)) && (n.fontWeight = "bold"), e.italic && (n.fontStyle = "italic");
|
|
437
|
+
let r = e.color ?? Se[e.styleId];
|
|
438
|
+
return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color = Ce), n;
|
|
441
439
|
}
|
|
442
|
-
function
|
|
440
|
+
function Z(e) {
|
|
443
441
|
return !e || e.length === 0 ? [] : e.filter((e) => e.type === "paragraph").filter((e) => e.qFormat ? !0 : !(e.hidden || e.semiHidden)).map((e) => ({
|
|
444
442
|
styleId: e.styleId,
|
|
445
443
|
name: e.name || e.styleId,
|
|
@@ -451,20 +449,20 @@ function Oe(e) {
|
|
|
451
449
|
})).sort((e, t) => e.priority - t.priority);
|
|
452
450
|
}
|
|
453
451
|
// src/composables/useParagraphStyleOptions.ts
|
|
454
|
-
function
|
|
452
|
+
function Te(e) {
|
|
455
453
|
let t = o(() => {
|
|
456
|
-
let t =
|
|
454
|
+
let t = Z(e.documentStyles());
|
|
457
455
|
return t.length > 0 ? t.map((t) => {
|
|
458
|
-
let n =
|
|
456
|
+
let n = X.find((e) => e.id === t.styleId);
|
|
459
457
|
return {
|
|
460
458
|
id: t.styleId,
|
|
461
459
|
label: n ? e.t(n.nameKey) : t.name,
|
|
462
|
-
previewStyle:
|
|
460
|
+
previewStyle: we(t)
|
|
463
461
|
};
|
|
464
|
-
}) :
|
|
462
|
+
}) : X.map((t) => ({
|
|
465
463
|
id: t.id,
|
|
466
464
|
label: e.t(t.nameKey),
|
|
467
|
-
previewStyle:
|
|
465
|
+
previewStyle: we({ styleId: t.id })
|
|
468
466
|
}));
|
|
469
467
|
});
|
|
470
468
|
return {
|
|
@@ -476,7 +474,7 @@ function ke(e) {
|
|
|
476
474
|
};
|
|
477
475
|
}
|
|
478
476
|
// src/composables/useToolbarDropdowns.ts
|
|
479
|
-
function
|
|
477
|
+
function Ee(e) {
|
|
480
478
|
let t = S(null), n = S({
|
|
481
479
|
top: 0,
|
|
482
480
|
left: 0
|
|
@@ -521,7 +519,7 @@ function Ae(e) {
|
|
|
521
519
|
}
|
|
522
520
|
let l;
|
|
523
521
|
return y(() => {
|
|
524
|
-
l =
|
|
522
|
+
l = W(document, c);
|
|
525
523
|
}), v(() => l?.()), {
|
|
526
524
|
openDropdown: t,
|
|
527
525
|
dropdownMenuStyle: a,
|
|
@@ -530,7 +528,7 @@ function Ae(e) {
|
|
|
530
528
|
};
|
|
531
529
|
}
|
|
532
530
|
// src/composables/useToolbarFontSize.ts
|
|
533
|
-
function
|
|
531
|
+
function De(e) {
|
|
534
532
|
let t = S(!1), n = (t) => e.execCommand("setFontSize", t * 2);
|
|
535
533
|
function r() {
|
|
536
534
|
t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
|
|
@@ -550,11 +548,11 @@ function je(e) {
|
|
|
550
548
|
}
|
|
551
549
|
function s() {
|
|
552
550
|
let t = e.currentFontSize.value;
|
|
553
|
-
n(
|
|
551
|
+
n(_e.find((e) => e > t) || t + 1);
|
|
554
552
|
}
|
|
555
553
|
function c() {
|
|
556
554
|
let t = e.currentFontSize.value;
|
|
557
|
-
n([...
|
|
555
|
+
n([..._e].reverse().find((e) => e < t) || Math.max(1, t - 1));
|
|
558
556
|
}
|
|
559
557
|
return {
|
|
560
558
|
onSizeFocus: r,
|
|
@@ -566,23 +564,23 @@ function je(e) {
|
|
|
566
564
|
};
|
|
567
565
|
}
|
|
568
566
|
// src/utils/fontOptions.ts
|
|
569
|
-
function
|
|
567
|
+
function Oe(e) {
|
|
570
568
|
if (e === void 0) return;
|
|
571
569
|
let t = e.map((e) => typeof e == "string" ? {
|
|
572
570
|
name: e,
|
|
573
571
|
fontFamily: e,
|
|
574
572
|
category: "other"
|
|
575
573
|
} : e);
|
|
576
|
-
if (
|
|
574
|
+
if (Q()) {
|
|
577
575
|
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
578
576
|
for (let r of t) n.has(r.name) && !e.has(r.name) && (console.warn(`[DocxEditor] Duplicate font name in fontFamilies: "${r.name}"`), e.add(r.name)), n.add(r.name);
|
|
579
577
|
}
|
|
580
578
|
return t;
|
|
581
579
|
}
|
|
582
|
-
function
|
|
580
|
+
function Q() {
|
|
583
581
|
return typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
584
582
|
}
|
|
585
|
-
function
|
|
583
|
+
function ke(e, t) {
|
|
586
584
|
if (!e || e.length === 0) return [];
|
|
587
585
|
let n = /* @__PURE__ */ new Set();
|
|
588
586
|
for (let e of t) n.add(e.trim().toLowerCase());
|
|
@@ -594,15 +592,15 @@ function Pe(e, t) {
|
|
|
594
592
|
return i;
|
|
595
593
|
}
|
|
596
594
|
// src/components/EditingModeDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
597
|
-
var
|
|
595
|
+
var Ae = ["title", "onClick"], je = {
|
|
598
596
|
key: 0,
|
|
599
597
|
class: "editing-mode__label"
|
|
600
|
-
},
|
|
598
|
+
}, Me = { class: "editing-mode__panel" }, Ne = ["onClick"], Pe = { class: "editing-mode__option-text" }, Fe = { class: "editing-mode__option-label" }, Ie = { class: "editing-mode__option-desc" }, Le = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
601
599
|
__name: "EditingModeDropdown",
|
|
602
600
|
props: { modelValue: {} },
|
|
603
601
|
emits: ["update:modelValue"],
|
|
604
|
-
setup(
|
|
605
|
-
let { t: d } =
|
|
602
|
+
setup(n, { emit: i }) {
|
|
603
|
+
let { t: d } = e(), { Popover: p } = t(), m = n, h = i, _ = {
|
|
606
604
|
value: "editing",
|
|
607
605
|
labelKey: "editor.editing",
|
|
608
606
|
icon: "edit_note",
|
|
@@ -631,11 +629,11 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
631
629
|
}
|
|
632
630
|
return y(() => {
|
|
633
631
|
A = window.matchMedia("(max-width: 1400px)"), T.value = A.matches, A.addEventListener("change", j);
|
|
634
|
-
}), v(() => A?.removeEventListener("change", j)), (
|
|
632
|
+
}), v(() => A?.removeEventListener("change", j)), (e, t) => (b(), s(O(p), {
|
|
635
633
|
open: w.value,
|
|
636
634
|
placement: "bottom-right",
|
|
637
|
-
"onUpdate:open":
|
|
638
|
-
onClose:
|
|
635
|
+
"onUpdate:open": t[0] ||= (e) => w.value = e,
|
|
636
|
+
onClose: t[1] ||= (e) => w.value = !1
|
|
639
637
|
}, {
|
|
640
638
|
trigger: M(({ toggle: e }) => [u("button", {
|
|
641
639
|
type: "button",
|
|
@@ -650,39 +648,39 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
650
648
|
name: D.value.icon,
|
|
651
649
|
size: 18
|
|
652
650
|
}, null, 8, ["name"]),
|
|
653
|
-
T.value ? c("", !0) : (b(), l("span",
|
|
651
|
+
T.value ? c("", !0) : (b(), l("span", je, E(O(d)(D.value.labelKey)), 1)),
|
|
654
652
|
f(r, {
|
|
655
653
|
name: "arrow_drop_down",
|
|
656
654
|
size: 16
|
|
657
655
|
})
|
|
658
|
-
], 10,
|
|
659
|
-
panel: M(() => [u("div",
|
|
660
|
-
key:
|
|
656
|
+
], 10, Ae)]),
|
|
657
|
+
panel: M(() => [u("div", Me, [(b(), l(a, null, C(x, (e) => u("button", {
|
|
658
|
+
key: e.value,
|
|
661
659
|
type: "button",
|
|
662
660
|
class: "editing-mode__option",
|
|
663
|
-
onClick: F((
|
|
661
|
+
onClick: F((t) => k(e.value), ["prevent"])
|
|
664
662
|
}, [
|
|
665
663
|
f(r, {
|
|
666
|
-
name:
|
|
664
|
+
name: e.icon,
|
|
667
665
|
size: 20
|
|
668
666
|
}, null, 8, ["name"]),
|
|
669
|
-
u("span",
|
|
670
|
-
|
|
667
|
+
u("span", Pe, [u("span", Fe, E(O(d)(e.labelKey)), 1), u("span", Ie, E(O(d)(e.descKey)), 1)]),
|
|
668
|
+
e.value === n.modelValue ? (b(), s(r, {
|
|
671
669
|
key: 0,
|
|
672
670
|
name: "check",
|
|
673
671
|
size: 18,
|
|
674
672
|
class: "editing-mode__check"
|
|
675
673
|
})) : c("", !0)
|
|
676
|
-
], 8,
|
|
674
|
+
], 8, Ne)), 64))])]),
|
|
677
675
|
_: 1
|
|
678
676
|
}, 8, ["open"]));
|
|
679
677
|
}
|
|
680
|
-
}), [["__scopeId", "data-v-732ee330"]]),
|
|
678
|
+
}), [["__scopeId", "data-v-732ee330"]]), Re = { class: "review-controls" }, ze = [
|
|
681
679
|
"disabled",
|
|
682
680
|
"aria-pressed",
|
|
683
681
|
"aria-label",
|
|
684
682
|
"title"
|
|
685
|
-
],
|
|
683
|
+
], Be = { class: "review-controls__toggle-label" }, Ve = ["title", "onClick"], He = { class: "review-controls__display-label" }, Ue = ["onClick"], We = { class: "review-controls__option-label" }, Ge = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
686
684
|
__name: "ReviewControls",
|
|
687
685
|
props: {
|
|
688
686
|
trackChangesOn: { type: Boolean },
|
|
@@ -693,8 +691,8 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
693
691
|
}
|
|
694
692
|
},
|
|
695
693
|
emits: ["toggle-track-changes", "update:display-mode"],
|
|
696
|
-
setup(
|
|
697
|
-
let { t: d } =
|
|
694
|
+
setup(n, { emit: i }) {
|
|
695
|
+
let { t: d } = e(), { Popover: p } = t(), m = n, h = i, _ = S(!1), v = {
|
|
698
696
|
"all-markup": "markupView.allMarkup",
|
|
699
697
|
"simple-markup": "markupView.simple",
|
|
700
698
|
"no-markup": "markupView.noMarkup",
|
|
@@ -707,65 +705,65 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
707
705
|
function w(e) {
|
|
708
706
|
h("update:display-mode", e), _.value = !1;
|
|
709
707
|
}
|
|
710
|
-
return (
|
|
708
|
+
return (e, t) => (b(), l("div", Re, [u("button", {
|
|
711
709
|
type: "button",
|
|
712
|
-
class: g(["review-controls__toggle", { "review-controls__toggle--on":
|
|
713
|
-
disabled:
|
|
714
|
-
"aria-pressed":
|
|
710
|
+
class: g(["review-controls__toggle", { "review-controls__toggle--on": n.trackChangesOn }]),
|
|
711
|
+
disabled: n.readOnly,
|
|
712
|
+
"aria-pressed": n.trackChangesOn,
|
|
715
713
|
"aria-label": O(d)("toggleTrackChanges"),
|
|
716
714
|
title: O(d)("toggleTrackChanges"),
|
|
717
|
-
onMousedown:
|
|
718
|
-
onClick:
|
|
715
|
+
onMousedown: t[0] ||= F(() => {}, ["prevent"]),
|
|
716
|
+
onClick: t[1] ||= F((t) => e.$emit("toggle-track-changes"), ["prevent"])
|
|
719
717
|
}, [f(r, {
|
|
720
718
|
name: "edit_note",
|
|
721
719
|
size: 18
|
|
722
|
-
}), u("span",
|
|
720
|
+
}), u("span", Be, E(n.trackChangesOn ? O(d)("trackingOn") : O(d)("trackingOff")), 1)], 42, ze), f(O(p), {
|
|
723
721
|
open: _.value,
|
|
724
722
|
placement: "bottom-right",
|
|
725
|
-
"onUpdate:open":
|
|
726
|
-
onClose:
|
|
723
|
+
"onUpdate:open": t[4] ||= (e) => _.value = e,
|
|
724
|
+
onClose: t[5] ||= (e) => _.value = !1
|
|
727
725
|
}, {
|
|
728
726
|
trigger: M(({ toggle: e }) => [u("button", {
|
|
729
727
|
type: "button",
|
|
730
728
|
class: g(["review-controls__display", { "review-controls__display--open": _.value }]),
|
|
731
729
|
title: x.value,
|
|
732
|
-
onMousedown:
|
|
730
|
+
onMousedown: t[2] ||= F(() => {}, ["prevent"]),
|
|
733
731
|
onClick: F(e, ["prevent"])
|
|
734
732
|
}, [
|
|
735
733
|
f(r, {
|
|
736
734
|
name: "visibility",
|
|
737
735
|
size: 16
|
|
738
736
|
}),
|
|
739
|
-
u("span",
|
|
737
|
+
u("span", He, E(x.value), 1),
|
|
740
738
|
f(r, {
|
|
741
739
|
name: "arrow_drop_down",
|
|
742
740
|
size: 16
|
|
743
741
|
})
|
|
744
|
-
], 42,
|
|
742
|
+
], 42, Ve)]),
|
|
745
743
|
panel: M(() => [u("div", {
|
|
746
744
|
class: "review-controls__panel",
|
|
747
|
-
onMousedown:
|
|
748
|
-
}, [(b(!0), l(a, null, C(O(I), (
|
|
749
|
-
key:
|
|
745
|
+
onMousedown: t[3] ||= F(() => {}, ["prevent"])
|
|
746
|
+
}, [(b(!0), l(a, null, C(O(I), (e) => (b(), l("button", {
|
|
747
|
+
key: e,
|
|
750
748
|
type: "button",
|
|
751
749
|
class: "review-controls__option",
|
|
752
|
-
onClick: F((
|
|
753
|
-
}, [u("span",
|
|
750
|
+
onClick: F((t) => w(e), ["prevent"])
|
|
751
|
+
}, [u("span", We, E(y(e)), 1), e === n.displayMode ? (b(), s(r, {
|
|
754
752
|
key: 0,
|
|
755
753
|
name: "check",
|
|
756
754
|
size: 18,
|
|
757
755
|
class: "review-controls__check"
|
|
758
|
-
})) : c("", !0)], 8,
|
|
756
|
+
})) : c("", !0)], 8, Ue))), 128))], 32)]),
|
|
759
757
|
_: 1
|
|
760
758
|
}, 8, ["open"])]));
|
|
761
759
|
}
|
|
762
|
-
}), [["__scopeId", "data-v-e96b04ec"]]),
|
|
760
|
+
}), [["__scopeId", "data-v-e96b04ec"]]), Ke = [
|
|
763
761
|
"disabled",
|
|
764
762
|
"aria-label",
|
|
765
763
|
"title",
|
|
766
764
|
"aria-expanded",
|
|
767
765
|
"onClick"
|
|
768
|
-
],
|
|
766
|
+
], qe = { class: "docx-icon-grid__panel" }, Je = ["title", "onClick"], Ye = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
769
767
|
__name: "IconGridDropdown",
|
|
770
768
|
props: {
|
|
771
769
|
options: {},
|
|
@@ -776,10 +774,10 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
776
774
|
ariaLabel: {}
|
|
777
775
|
},
|
|
778
776
|
emits: ["select"],
|
|
779
|
-
setup(e, { emit:
|
|
780
|
-
let
|
|
777
|
+
setup(e, { emit: n }) {
|
|
778
|
+
let i = n, { Popover: o } = t(), c = S(!1);
|
|
781
779
|
function d(e) {
|
|
782
|
-
|
|
780
|
+
i("select", e), c.value = !1;
|
|
783
781
|
}
|
|
784
782
|
return (t, n) => (b(), s(O(o), {
|
|
785
783
|
open: c.value,
|
|
@@ -801,8 +799,8 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
801
799
|
}, null, 8, ["name"]), f(r, {
|
|
802
800
|
name: "arrow_drop_down",
|
|
803
801
|
size: 14
|
|
804
|
-
})], 10,
|
|
805
|
-
panel: M(() => [u("div",
|
|
802
|
+
})], 10, Ke)]),
|
|
803
|
+
panel: M(() => [u("div", qe, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
|
|
806
804
|
key: t.value,
|
|
807
805
|
type: "button",
|
|
808
806
|
class: g(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === t.value }]),
|
|
@@ -811,16 +809,16 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
811
809
|
}, [f(r, {
|
|
812
810
|
name: t.iconName,
|
|
813
811
|
size: 18
|
|
814
|
-
}, null, 8, ["name"])], 10,
|
|
812
|
+
}, null, 8, ["name"])], 10, Je))), 128))])]),
|
|
815
813
|
_: 1
|
|
816
814
|
}, 8, ["open"]));
|
|
817
815
|
}
|
|
818
|
-
}), [["__scopeId", "data-v-5ef29208"]]),
|
|
816
|
+
}), [["__scopeId", "data-v-5ef29208"]]), Xe = /* @__PURE__ */ p({
|
|
819
817
|
__name: "ImageTransformDropdown",
|
|
820
818
|
props: { disabled: { type: Boolean } },
|
|
821
819
|
emits: ["transform"],
|
|
822
|
-
setup(
|
|
823
|
-
let { t } =
|
|
820
|
+
setup(t) {
|
|
821
|
+
let { t: n } = e(), r = [
|
|
824
822
|
{
|
|
825
823
|
value: "rotateCW",
|
|
826
824
|
labelKey: "imageTransform.rotateClockwise",
|
|
@@ -843,30 +841,30 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
843
841
|
}
|
|
844
842
|
], i = o(() => r.map((e) => ({
|
|
845
843
|
value: e.value,
|
|
846
|
-
label:
|
|
844
|
+
label: n(e.labelKey),
|
|
847
845
|
iconName: e.iconName
|
|
848
846
|
})));
|
|
849
|
-
return (
|
|
847
|
+
return (e, r) => (b(), s(Ye, {
|
|
850
848
|
options: i.value,
|
|
851
849
|
"trigger-icon": "rotate_right",
|
|
852
|
-
"tooltip-content": O(
|
|
853
|
-
disabled:
|
|
854
|
-
onSelect: r[0] ||= (
|
|
850
|
+
"tooltip-content": O(n)("imageTransform.tooltip"),
|
|
851
|
+
disabled: t.disabled,
|
|
852
|
+
onSelect: r[0] ||= (t) => e.$emit("transform", t)
|
|
855
853
|
}, null, 8, [
|
|
856
854
|
"options",
|
|
857
855
|
"tooltip-content",
|
|
858
856
|
"disabled"
|
|
859
857
|
]));
|
|
860
858
|
}
|
|
861
|
-
}),
|
|
859
|
+
}), Ze = /* @__PURE__ */ p({
|
|
862
860
|
__name: "ImageWrapDropdown",
|
|
863
861
|
props: {
|
|
864
862
|
imageContext: {},
|
|
865
863
|
disabled: { type: Boolean }
|
|
866
864
|
},
|
|
867
865
|
emits: ["change"],
|
|
868
|
-
setup(
|
|
869
|
-
let
|
|
866
|
+
setup(t) {
|
|
867
|
+
let n = t, { t: r } = e(), i = [
|
|
870
868
|
{
|
|
871
869
|
value: "inline",
|
|
872
870
|
labelKey: "imageWrap.inline",
|
|
@@ -902,16 +900,16 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
902
900
|
label: r(e.labelKey),
|
|
903
901
|
iconName: e.iconName
|
|
904
902
|
}))), c = o(() => {
|
|
905
|
-
let e =
|
|
903
|
+
let e = n.imageContext;
|
|
906
904
|
return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
|
|
907
905
|
}), l = o(() => a.value.find((e) => e.value === c.value) ?? a.value.at(0)), u = o(() => l.value?.iconName ?? "format_image_left"), d = o(() => l.value?.label ?? "");
|
|
908
|
-
return (
|
|
906
|
+
return (e, n) => (b(), s(Ye, {
|
|
909
907
|
options: a.value,
|
|
910
908
|
"active-value": c.value,
|
|
911
909
|
"trigger-icon": u.value,
|
|
912
910
|
"tooltip-content": O(r)("imageWrap.tooltipPrefix", { label: d.value }),
|
|
913
|
-
disabled:
|
|
914
|
-
onSelect: n[0] ||= (
|
|
911
|
+
disabled: t.disabled,
|
|
912
|
+
onSelect: n[0] ||= (t) => e.$emit("change", t)
|
|
915
913
|
}, null, 8, [
|
|
916
914
|
"options",
|
|
917
915
|
"active-value",
|
|
@@ -920,41 +918,41 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
920
918
|
"disabled"
|
|
921
919
|
]));
|
|
922
920
|
}
|
|
923
|
-
}),
|
|
921
|
+
}), Qe = {
|
|
924
922
|
key: 0,
|
|
925
923
|
class: "basic-toolbar"
|
|
926
|
-
},
|
|
924
|
+
}, $e = [
|
|
927
925
|
"title",
|
|
928
926
|
"aria-label",
|
|
929
927
|
"disabled"
|
|
930
|
-
],
|
|
928
|
+
], et = [
|
|
931
929
|
"title",
|
|
932
930
|
"aria-label",
|
|
933
931
|
"disabled"
|
|
934
|
-
],
|
|
932
|
+
], tt = ["disabled", "title"], nt = ["aria-expanded", "title"], rt = ["disabled", "title"], it = ["onMousedown"], at = ["aria-expanded", "title"], ot = ["onMousedown"], st = ["aria-expanded", "title"], ct = {
|
|
935
933
|
key: 0,
|
|
936
934
|
class: "toolbar-dropdown__group-label"
|
|
937
|
-
},
|
|
935
|
+
}, lt = ["onMousedown"], ut = ["title"], dt = [
|
|
938
936
|
"value",
|
|
939
937
|
"title",
|
|
940
938
|
"aria-expanded"
|
|
941
|
-
],
|
|
939
|
+
], ft = ["title"], pt = ["onMousedown"], mt = ["title", "aria-label"], ht = ["title", "aria-label"], gt = ["title", "aria-label"], _t = ["title", "aria-label"], vt = ["title", "aria-label"], yt = ["title", "aria-label"], bt = ["title", "aria-label"], xt = ["aria-expanded", "title"], St = ["title"], Ct = ["title"], wt = ["title"], Tt = ["title"], Et = ["title", "aria-label"], Dt = ["title", "aria-label"], Ot = [
|
|
942
940
|
"title",
|
|
943
941
|
"aria-label",
|
|
944
942
|
"disabled"
|
|
945
|
-
],
|
|
943
|
+
], kt = ["title", "aria-label"], At = ["aria-expanded", "title"], jt = ["onMousedown"], Mt = ["title", "aria-label"], Nt = [
|
|
946
944
|
"title",
|
|
947
945
|
"aria-label",
|
|
948
946
|
"aria-pressed"
|
|
949
|
-
],
|
|
947
|
+
], Pt = [
|
|
950
948
|
"title",
|
|
951
949
|
"aria-label",
|
|
952
950
|
"aria-pressed"
|
|
953
|
-
],
|
|
951
|
+
], Ft = {
|
|
954
952
|
key: 0,
|
|
955
953
|
"data-testid": "toolbar-comments-count",
|
|
956
954
|
class: "basic-toolbar__comment-count"
|
|
957
|
-
},
|
|
955
|
+
}, It = ["title", "aria-label"], Lt = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
958
956
|
__name: "Toolbar",
|
|
959
957
|
props: {
|
|
960
958
|
view: { default: null },
|
|
@@ -1018,15 +1016,15 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1018
1016
|
"image-properties",
|
|
1019
1017
|
"image-transform"
|
|
1020
1018
|
],
|
|
1021
|
-
setup(
|
|
1022
|
-
let { ColorPicker: p } =
|
|
1019
|
+
setup(n, { emit: i }) {
|
|
1020
|
+
let { ColorPicker: p } = t(), m = n, { t: h } = e(), v = i, y = o(() => m.zoomPercent ?? 100), x = o(() => m.isMinZoom ?? !1), T = o(() => m.isMaxZoom ?? !1), D = o(() => m.zoomPresets ?? ye), k = o(() => m.showZoomControl ?? !0), A = S(null), j = S(null), M = S(null), N = S(null), I = S(null), L = S(null), { openDropdown: B, dropdownMenuStyle: V, toggleDropdown: H, recomputeDropdownPos: re } = Ee({
|
|
1023
1021
|
zoom: L,
|
|
1024
1022
|
style: A,
|
|
1025
1023
|
font: j,
|
|
1026
1024
|
size: M,
|
|
1027
1025
|
align: N,
|
|
1028
1026
|
spacing: I
|
|
1029
|
-
}),
|
|
1027
|
+
}), U = o(() => {
|
|
1030
1028
|
m.stateTick;
|
|
1031
1029
|
let e = m.view;
|
|
1032
1030
|
return e ? te(e.state) : {
|
|
@@ -1041,69 +1039,69 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1041
1039
|
inInsertion: !1,
|
|
1042
1040
|
inDeletion: !1
|
|
1043
1041
|
};
|
|
1044
|
-
}),
|
|
1045
|
-
let e =
|
|
1042
|
+
}), ie = o(() => {
|
|
1043
|
+
let e = U.value.textFormatting.fontFamily;
|
|
1046
1044
|
return e?.ascii || e?.hAnsi || "Arial";
|
|
1047
|
-
}),
|
|
1048
|
-
let e =
|
|
1045
|
+
}), W = o(() => {
|
|
1046
|
+
let e = U.value.textFormatting.fontSize;
|
|
1049
1047
|
return e ? e / 2 : 11;
|
|
1050
|
-
}),
|
|
1051
|
-
switch (
|
|
1048
|
+
}), G = o(() => U.value.paragraphFormatting.alignment || "left"), K = o(() => {
|
|
1049
|
+
switch (G.value) {
|
|
1052
1050
|
case "center": return "format_align_center";
|
|
1053
1051
|
case "right": return "format_align_right";
|
|
1054
1052
|
case "both": return "format_align_justify";
|
|
1055
1053
|
default: return "format_align_left";
|
|
1056
1054
|
}
|
|
1057
|
-
}), { resolvedParagraphStyles:
|
|
1055
|
+
}), { resolvedParagraphStyles: q, currentStyleLabel: J } = Te({
|
|
1058
1056
|
documentStyles: () => m.documentStyles,
|
|
1059
|
-
currentStyleId: () =>
|
|
1057
|
+
currentStyleId: () => U.value.paragraphFormatting.styleId || "Normal",
|
|
1060
1058
|
t: h
|
|
1061
|
-
}),
|
|
1059
|
+
}), se = o(() => {
|
|
1062
1060
|
if (m.stateTick, m.canUndo !== void 0) return m.canUndo;
|
|
1063
1061
|
let e = m.view;
|
|
1064
|
-
return e ?
|
|
1065
|
-
}),
|
|
1062
|
+
return e ? oe(e.state) > 0 : !1;
|
|
1063
|
+
}), ce = o(() => {
|
|
1066
1064
|
if (m.stateTick, m.canRedo !== void 0) return m.canRedo;
|
|
1067
1065
|
let e = m.view;
|
|
1068
|
-
return e ?
|
|
1069
|
-
}),
|
|
1070
|
-
let e =
|
|
1066
|
+
return e ? ae(e.state) > 0 : !1;
|
|
1067
|
+
}), le = o(() => {
|
|
1068
|
+
let e = U.value, t = R(e.listState) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
|
|
1071
1069
|
return t || n;
|
|
1072
|
-
}),
|
|
1073
|
-
let e =
|
|
1070
|
+
}), ue = o(() => {
|
|
1071
|
+
let e = U.value.textFormatting.color?.rgb;
|
|
1074
1072
|
return e ? e.replace(/^#/, "").toUpperCase() : void 0;
|
|
1075
|
-
}),
|
|
1076
|
-
let e =
|
|
1073
|
+
}), de = o(() => {
|
|
1074
|
+
let e = U.value.textFormatting.highlight;
|
|
1077
1075
|
if (e && e !== "none") return e.replace(/^#/, "").toUpperCase();
|
|
1078
|
-
}),
|
|
1076
|
+
}), Y = o(() => Oe(m.fontFamilies) ?? ge), fe = o(() => ke(m.documentFonts, Y.value.map((e) => e.name))), pe = o(() => [
|
|
1079
1077
|
{
|
|
1080
1078
|
label: h("font.documentFonts"),
|
|
1081
|
-
fonts:
|
|
1079
|
+
fonts: fe.value
|
|
1082
1080
|
},
|
|
1083
1081
|
{
|
|
1084
1082
|
label: h("font.sansSerif"),
|
|
1085
|
-
fonts:
|
|
1083
|
+
fonts: Y.value.filter((e) => e.category === "sans-serif")
|
|
1086
1084
|
},
|
|
1087
1085
|
{
|
|
1088
1086
|
label: h("font.serif"),
|
|
1089
|
-
fonts:
|
|
1087
|
+
fonts: Y.value.filter((e) => e.category === "serif")
|
|
1090
1088
|
},
|
|
1091
1089
|
{
|
|
1092
1090
|
label: h("font.monospace"),
|
|
1093
|
-
fonts:
|
|
1091
|
+
fonts: Y.value.filter((e) => e.category === "monospace")
|
|
1094
1092
|
},
|
|
1095
1093
|
{
|
|
1096
1094
|
label: h("font.other"),
|
|
1097
|
-
fonts:
|
|
1095
|
+
fonts: Y.value.filter((e) => !e.category || e.category === "other")
|
|
1098
1096
|
}
|
|
1099
1097
|
]);
|
|
1100
|
-
function
|
|
1101
|
-
m.onUndo ? m.onUndo() :
|
|
1098
|
+
function me() {
|
|
1099
|
+
m.onUndo ? m.onUndo() : X("undo");
|
|
1102
1100
|
}
|
|
1103
|
-
function
|
|
1104
|
-
m.onRedo ? m.onRedo() :
|
|
1101
|
+
function he() {
|
|
1102
|
+
m.onRedo ? m.onRedo() : X("redo");
|
|
1105
1103
|
}
|
|
1106
|
-
function
|
|
1104
|
+
function X(e, ...t) {
|
|
1107
1105
|
let n = m.view;
|
|
1108
1106
|
if (!n) return;
|
|
1109
1107
|
let r = m.getCommands()[e];
|
|
@@ -1114,49 +1112,49 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1114
1112
|
let i = r(...t);
|
|
1115
1113
|
z(n, i), n.hasFocus() || n.focus(), B.value = null;
|
|
1116
1114
|
}
|
|
1117
|
-
function
|
|
1118
|
-
|
|
1115
|
+
function be(e) {
|
|
1116
|
+
X("setFontFamily", e);
|
|
1119
1117
|
}
|
|
1120
|
-
let { onSizeFocus:
|
|
1121
|
-
currentFontSize:
|
|
1118
|
+
let { onSizeFocus: xe, onSizeInput: Se, commitFontSize: Ce, pickFontSize: we, increaseFontSize: Z, decreaseFontSize: Q } = De({
|
|
1119
|
+
currentFontSize: W,
|
|
1122
1120
|
openDropdown: B,
|
|
1123
|
-
recomputeDropdownPos:
|
|
1124
|
-
execCommand:
|
|
1121
|
+
recomputeDropdownPos: re,
|
|
1122
|
+
execCommand: X
|
|
1125
1123
|
});
|
|
1126
|
-
function
|
|
1127
|
-
typeof e == "object" && e.auto ?
|
|
1124
|
+
function Ae(e) {
|
|
1125
|
+
typeof e == "object" && e.auto ? X("clearTextColor") : X("setTextColor", typeof e == "string" ? { rgb: e } : e);
|
|
1128
1126
|
}
|
|
1129
|
-
function
|
|
1127
|
+
function je() {
|
|
1130
1128
|
let e = m.view;
|
|
1131
|
-
e && (z(e,
|
|
1129
|
+
e && (z(e, ne), e.hasFocus() || e.focus());
|
|
1132
1130
|
}
|
|
1133
|
-
function
|
|
1134
|
-
|
|
1131
|
+
function Me(e) {
|
|
1132
|
+
X("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
|
|
1135
1133
|
}
|
|
1136
|
-
function
|
|
1134
|
+
function Ne(e) {
|
|
1137
1135
|
v("apply-style", e), B.value = null;
|
|
1138
1136
|
}
|
|
1139
|
-
function
|
|
1140
|
-
|
|
1137
|
+
function Pe(e) {
|
|
1138
|
+
X("setLineSpacing", e);
|
|
1141
1139
|
}
|
|
1142
|
-
function
|
|
1143
|
-
let t =
|
|
1140
|
+
function Fe(e) {
|
|
1141
|
+
let t = U.value.paragraphFormatting.lineSpacing;
|
|
1144
1142
|
return t ? Math.abs(t - e) < 10 : e === 240;
|
|
1145
1143
|
}
|
|
1146
|
-
return (
|
|
1144
|
+
return (e, t) => n.view ? (b(), l("div", Qe, [
|
|
1147
1145
|
u("button", {
|
|
1148
1146
|
title: O(h)("undoShortcut"),
|
|
1149
1147
|
"aria-label": O(h)("undo"),
|
|
1150
|
-
disabled: !
|
|
1151
|
-
onMousedown: F(
|
|
1152
|
-
}, [f(r, { name: "undo" })], 40,
|
|
1148
|
+
disabled: !se.value,
|
|
1149
|
+
onMousedown: F(me, ["prevent"])
|
|
1150
|
+
}, [f(r, { name: "undo" })], 40, $e),
|
|
1153
1151
|
u("button", {
|
|
1154
1152
|
title: O(h)("redoShortcut"),
|
|
1155
1153
|
"aria-label": O(h)("redo"),
|
|
1156
|
-
disabled: !
|
|
1157
|
-
onMousedown: F(
|
|
1158
|
-
}, [f(r, { name: "redo" })], 40,
|
|
1159
|
-
|
|
1154
|
+
disabled: !ce.value,
|
|
1155
|
+
onMousedown: F(he, ["prevent"])
|
|
1156
|
+
}, [f(r, { name: "redo" })], 40, et),
|
|
1157
|
+
t[43] ||= u("span", { class: "divider" }, null, -1),
|
|
1160
1158
|
k.value ? (b(), l("div", {
|
|
1161
1159
|
key: 0,
|
|
1162
1160
|
class: "toolbar-dropdown zoom-group",
|
|
@@ -1165,13 +1163,13 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1165
1163
|
}, [
|
|
1166
1164
|
u("button", {
|
|
1167
1165
|
class: "size-btn",
|
|
1168
|
-
onMousedown:
|
|
1166
|
+
onMousedown: t[0] ||= F((t) => e.$emit("zoom-out"), ["prevent"]),
|
|
1169
1167
|
disabled: x.value,
|
|
1170
1168
|
title: O(h)("zoom.zoomOut")
|
|
1171
|
-
}, " − ", 40,
|
|
1169
|
+
}, " − ", 40, tt),
|
|
1172
1170
|
u("button", {
|
|
1173
1171
|
class: "toolbar-dropdown__trigger zoom-trigger",
|
|
1174
|
-
onMousedown:
|
|
1172
|
+
onMousedown: t[1] ||= F((e) => O(H)("zoom"), ["prevent"]),
|
|
1175
1173
|
"aria-expanded": O(B) === "zoom",
|
|
1176
1174
|
"aria-haspopup": "listbox",
|
|
1177
1175
|
title: O(h)("zoom.zoomLevel")
|
|
@@ -1179,72 +1177,72 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1179
1177
|
class: "chevron",
|
|
1180
1178
|
name: "arrow_drop_down",
|
|
1181
1179
|
size: 16
|
|
1182
|
-
})], 40,
|
|
1180
|
+
})], 40, nt),
|
|
1183
1181
|
u("button", {
|
|
1184
1182
|
class: "size-btn",
|
|
1185
|
-
onMousedown:
|
|
1183
|
+
onMousedown: t[2] ||= F((t) => e.$emit("zoom-in"), ["prevent"]),
|
|
1186
1184
|
disabled: T.value,
|
|
1187
1185
|
title: O(h)("zoom.zoomIn")
|
|
1188
|
-
}, " + ", 40,
|
|
1186
|
+
}, " + ", 40, rt),
|
|
1189
1187
|
O(B) === "zoom" ? (b(), l("div", {
|
|
1190
1188
|
key: 0,
|
|
1191
1189
|
style: _(O(V)),
|
|
1192
1190
|
class: "toolbar-dropdown__menu zoom-menu"
|
|
1193
|
-
}, [(b(!0), l(a, null, C(D.value, (
|
|
1194
|
-
key:
|
|
1195
|
-
class: g(["toolbar-dropdown__item", { active: y.value === Math.round(
|
|
1196
|
-
onMousedown: F((n) =>
|
|
1197
|
-
}, E(Math.round(
|
|
1191
|
+
}, [(b(!0), l(a, null, C(D.value, (t) => (b(), l("button", {
|
|
1192
|
+
key: t,
|
|
1193
|
+
class: g(["toolbar-dropdown__item", { active: y.value === Math.round(t * 100) }]),
|
|
1194
|
+
onMousedown: F((n) => e.$emit("zoom-set", t), ["prevent"])
|
|
1195
|
+
}, E(Math.round(t * 100)) + "% ", 43, it))), 128))], 4)) : c("", !0)
|
|
1198
1196
|
], 512)) : c("", !0),
|
|
1199
|
-
|
|
1197
|
+
t[44] ||= u("span", { class: "divider" }, null, -1),
|
|
1200
1198
|
u("div", {
|
|
1201
1199
|
class: "toolbar-dropdown",
|
|
1202
1200
|
ref_key: "styleDropdownRef",
|
|
1203
1201
|
ref: A
|
|
1204
1202
|
}, [u("button", {
|
|
1205
1203
|
class: "toolbar-dropdown__trigger style-trigger",
|
|
1206
|
-
onMousedown:
|
|
1204
|
+
onMousedown: t[3] ||= F((e) => O(H)("style"), ["prevent"]),
|
|
1207
1205
|
"aria-expanded": O(B) === "style",
|
|
1208
1206
|
"aria-haspopup": "listbox",
|
|
1209
1207
|
title: O(h)("styles.selectAriaLabel")
|
|
1210
|
-
}, [d(E(O(
|
|
1208
|
+
}, [d(E(O(J)) + " ", 1), f(r, {
|
|
1211
1209
|
class: "chevron",
|
|
1212
1210
|
name: "arrow_drop_down",
|
|
1213
1211
|
size: 16
|
|
1214
|
-
})], 40,
|
|
1212
|
+
})], 40, at), O(B) === "style" ? (b(), l("div", {
|
|
1215
1213
|
key: 0,
|
|
1216
1214
|
style: _(O(V)),
|
|
1217
1215
|
class: "toolbar-dropdown__menu style-menu"
|
|
1218
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1216
|
+
}, [(b(!0), l(a, null, C(O(q), (e) => (b(), l("button", {
|
|
1219
1217
|
key: e.id,
|
|
1220
|
-
class: g(["toolbar-dropdown__item", { active: (
|
|
1221
|
-
onMousedown: F((t) =>
|
|
1222
|
-
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42,
|
|
1223
|
-
|
|
1218
|
+
class: g(["toolbar-dropdown__item", { active: (U.value.paragraphFormatting.styleId || "Normal") === e.id }]),
|
|
1219
|
+
onMousedown: F((t) => Ne(e.id), ["prevent"])
|
|
1220
|
+
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42, ot))), 128))], 4)) : c("", !0)], 512),
|
|
1221
|
+
t[45] ||= u("span", { class: "divider" }, null, -1),
|
|
1224
1222
|
u("div", {
|
|
1225
1223
|
class: "toolbar-dropdown",
|
|
1226
1224
|
ref_key: "fontDropdownRef",
|
|
1227
1225
|
ref: j
|
|
1228
1226
|
}, [u("button", {
|
|
1229
1227
|
class: "toolbar-dropdown__trigger font-trigger",
|
|
1230
|
-
onMousedown:
|
|
1228
|
+
onMousedown: t[4] ||= F((e) => O(H)("font"), ["prevent"]),
|
|
1231
1229
|
"aria-expanded": O(B) === "font",
|
|
1232
1230
|
"aria-haspopup": "listbox",
|
|
1233
1231
|
title: O(h)("font.selectAriaLabel")
|
|
1234
|
-
}, [d(E(
|
|
1232
|
+
}, [d(E(ie.value) + " ", 1), f(r, {
|
|
1235
1233
|
class: "chevron",
|
|
1236
1234
|
name: "arrow_drop_down",
|
|
1237
1235
|
size: 16
|
|
1238
|
-
})], 40,
|
|
1236
|
+
})], 40, st), O(B) === "font" ? (b(), l("div", {
|
|
1239
1237
|
key: 0,
|
|
1240
1238
|
style: _(O(V)),
|
|
1241
1239
|
class: "toolbar-dropdown__menu font-menu"
|
|
1242
|
-
}, [(b(!0), l(a, null, C(
|
|
1240
|
+
}, [(b(!0), l(a, null, C(pe.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", ct, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
|
|
1243
1241
|
key: e.name,
|
|
1244
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1242
|
+
class: g(["toolbar-dropdown__item", { active: ie.value === e.name }]),
|
|
1245
1243
|
style: _({ fontFamily: e.fontFamily }),
|
|
1246
|
-
onMousedown: F((t) =>
|
|
1247
|
-
}, E(e.name), 47,
|
|
1244
|
+
onMousedown: F((t) => be(e.name), ["prevent"])
|
|
1245
|
+
}, E(e.name), 47, lt))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
|
|
1248
1246
|
u("div", {
|
|
1249
1247
|
class: "toolbar-dropdown font-size-group",
|
|
1250
1248
|
ref_key: "sizeDropdownRef",
|
|
@@ -1252,186 +1250,186 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1252
1250
|
}, [
|
|
1253
1251
|
u("button", {
|
|
1254
1252
|
class: "size-btn",
|
|
1255
|
-
onMousedown:
|
|
1253
|
+
onMousedown: t[5] ||= F((...e) => O(Q) && O(Q)(...e), ["prevent"]),
|
|
1256
1254
|
title: O(h)("decreaseFontSize")
|
|
1257
|
-
}, " − ", 40,
|
|
1255
|
+
}, " − ", 40, ut),
|
|
1258
1256
|
u("input", {
|
|
1259
1257
|
class: "size-trigger size-input",
|
|
1260
1258
|
type: "text",
|
|
1261
|
-
value:
|
|
1259
|
+
value: W.value,
|
|
1262
1260
|
title: O(h)("fontSize"),
|
|
1263
|
-
onMousedown:
|
|
1264
|
-
onFocus:
|
|
1261
|
+
onMousedown: t[6] ||= F(() => {}, ["stop"]),
|
|
1262
|
+
onFocus: t[7] ||= (...e) => O(xe) && O(xe)(...e),
|
|
1265
1263
|
"aria-expanded": O(B) === "size",
|
|
1266
1264
|
"aria-haspopup": "listbox",
|
|
1267
|
-
onInput:
|
|
1265
|
+
onInput: t[8] ||= (...e) => O(Se) && O(Se)(...e),
|
|
1268
1266
|
onKeydown: [
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1267
|
+
t[9] ||= P(F((e) => O(Z)(), ["prevent", "stop"]), ["up"]),
|
|
1268
|
+
t[10] ||= P(F((e) => O(Q)(), ["prevent", "stop"]), ["down"]),
|
|
1269
|
+
t[11] ||= P(F((e) => O(Ce)(e), ["prevent"]), ["enter"])
|
|
1272
1270
|
],
|
|
1273
|
-
onBlur:
|
|
1274
|
-
}, null, 40,
|
|
1271
|
+
onBlur: t[12] ||= (e) => O(Ce)(e)
|
|
1272
|
+
}, null, 40, dt),
|
|
1275
1273
|
u("button", {
|
|
1276
1274
|
class: "size-btn",
|
|
1277
|
-
onMousedown:
|
|
1275
|
+
onMousedown: t[13] ||= F((...e) => O(Z) && O(Z)(...e), ["prevent"]),
|
|
1278
1276
|
title: O(h)("increaseFontSize")
|
|
1279
|
-
}, " + ", 40,
|
|
1277
|
+
}, " + ", 40, ft),
|
|
1280
1278
|
O(B) === "size" ? (b(), l("div", {
|
|
1281
1279
|
key: 0,
|
|
1282
1280
|
style: _(O(V)),
|
|
1283
1281
|
class: "toolbar-dropdown__menu size-menu"
|
|
1284
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1282
|
+
}, [(b(!0), l(a, null, C(O(_e), (e) => (b(), l("button", {
|
|
1285
1283
|
key: e,
|
|
1286
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1287
|
-
onMousedown: F((t) => O(
|
|
1288
|
-
}, E(e), 43,
|
|
1284
|
+
class: g(["toolbar-dropdown__item", { active: W.value === e }]),
|
|
1285
|
+
onMousedown: F((t) => O(we)(e), ["prevent"])
|
|
1286
|
+
}, E(e), 43, pt))), 128))], 4)) : c("", !0)
|
|
1289
1287
|
], 512),
|
|
1290
|
-
|
|
1288
|
+
t[46] ||= u("span", { class: "divider" }, null, -1),
|
|
1291
1289
|
u("button", {
|
|
1292
1290
|
title: O(h)("boldShortcut"),
|
|
1293
1291
|
"aria-label": O(h)("bold"),
|
|
1294
|
-
class: g({ active:
|
|
1295
|
-
onMousedown:
|
|
1296
|
-
}, [f(r, { name: "format_bold" })], 42,
|
|
1292
|
+
class: g({ active: U.value.textFormatting.bold }),
|
|
1293
|
+
onMousedown: t[14] ||= F((e) => X("toggleBold"), ["prevent"])
|
|
1294
|
+
}, [f(r, { name: "format_bold" })], 42, mt),
|
|
1297
1295
|
u("button", {
|
|
1298
1296
|
title: O(h)("italicShortcut"),
|
|
1299
1297
|
"aria-label": O(h)("italic"),
|
|
1300
|
-
class: g({ active:
|
|
1301
|
-
onMousedown:
|
|
1302
|
-
}, [f(r, { name: "format_italic" })], 42,
|
|
1298
|
+
class: g({ active: U.value.textFormatting.italic }),
|
|
1299
|
+
onMousedown: t[15] ||= F((e) => X("toggleItalic"), ["prevent"])
|
|
1300
|
+
}, [f(r, { name: "format_italic" })], 42, ht),
|
|
1303
1301
|
u("button", {
|
|
1304
1302
|
title: O(h)("underlineShortcut"),
|
|
1305
1303
|
"aria-label": O(h)("underline"),
|
|
1306
|
-
class: g({ active: !!
|
|
1307
|
-
onMousedown:
|
|
1308
|
-
}, [f(r, { name: "format_underlined" })], 42,
|
|
1304
|
+
class: g({ active: !!U.value.textFormatting.underline }),
|
|
1305
|
+
onMousedown: t[16] ||= F((e) => X("toggleUnderline"), ["prevent"])
|
|
1306
|
+
}, [f(r, { name: "format_underlined" })], 42, gt),
|
|
1309
1307
|
u("button", {
|
|
1310
1308
|
title: O(h)("formattingBar.strikethrough"),
|
|
1311
1309
|
"aria-label": O(h)("formattingBar.strikethrough"),
|
|
1312
|
-
class: g({ active:
|
|
1313
|
-
onMousedown:
|
|
1314
|
-
}, [f(r, { name: "strikethrough_s" })], 42,
|
|
1310
|
+
class: g({ active: U.value.textFormatting.strike }),
|
|
1311
|
+
onMousedown: t[17] ||= F((e) => X("toggleStrike"), ["prevent"])
|
|
1312
|
+
}, [f(r, { name: "strikethrough_s" })], 42, _t),
|
|
1315
1313
|
f(O(p), {
|
|
1316
1314
|
mode: "text",
|
|
1317
|
-
value:
|
|
1318
|
-
theme:
|
|
1319
|
-
onChange:
|
|
1315
|
+
value: ue.value,
|
|
1316
|
+
theme: n.theme ?? null,
|
|
1317
|
+
onChange: Ae
|
|
1320
1318
|
}, null, 8, ["value", "theme"]),
|
|
1321
1319
|
f(O(p), {
|
|
1322
1320
|
mode: "highlight",
|
|
1323
|
-
value:
|
|
1324
|
-
theme:
|
|
1325
|
-
onChange:
|
|
1321
|
+
value: de.value,
|
|
1322
|
+
theme: n.theme ?? null,
|
|
1323
|
+
onChange: Me
|
|
1326
1324
|
}, null, 8, ["value", "theme"]),
|
|
1327
1325
|
u("button", {
|
|
1328
1326
|
title: O(h)("formattingBar.insertLinkShortcut"),
|
|
1329
1327
|
"aria-label": O(h)("formattingBar.insertLink"),
|
|
1330
|
-
onMousedown:
|
|
1331
|
-
}, [f(r, { name: "link" })], 40,
|
|
1328
|
+
onMousedown: t[18] ||= F((t) => e.$emit("insert-link"), ["prevent"])
|
|
1329
|
+
}, [f(r, { name: "link" })], 40, vt),
|
|
1332
1330
|
u("button", {
|
|
1333
1331
|
title: O(h)("formattingBar.superscriptShortcut"),
|
|
1334
1332
|
"aria-label": O(h)("formattingBar.superscript"),
|
|
1335
|
-
class: g({ active:
|
|
1336
|
-
onMousedown:
|
|
1337
|
-
}, [f(r, { name: "superscript" })], 42,
|
|
1333
|
+
class: g({ active: U.value.textFormatting.vertAlign === "superscript" }),
|
|
1334
|
+
onMousedown: t[19] ||= F((e) => X("toggleSuperscript"), ["prevent"])
|
|
1335
|
+
}, [f(r, { name: "superscript" })], 42, yt),
|
|
1338
1336
|
u("button", {
|
|
1339
1337
|
title: O(h)("formattingBar.subscriptShortcut"),
|
|
1340
1338
|
"aria-label": O(h)("formattingBar.subscript"),
|
|
1341
|
-
class: g({ active:
|
|
1342
|
-
onMousedown:
|
|
1343
|
-
}, [f(r, { name: "subscript" })], 42,
|
|
1344
|
-
|
|
1339
|
+
class: g({ active: U.value.textFormatting.vertAlign === "subscript" }),
|
|
1340
|
+
onMousedown: t[20] ||= F((e) => X("toggleSubscript"), ["prevent"])
|
|
1341
|
+
}, [f(r, { name: "subscript" })], 42, bt),
|
|
1342
|
+
t[47] ||= u("span", { class: "divider" }, null, -1),
|
|
1345
1343
|
u("div", {
|
|
1346
1344
|
class: "toolbar-dropdown",
|
|
1347
1345
|
ref_key: "alignDropdownRef",
|
|
1348
1346
|
ref: N
|
|
1349
1347
|
}, [u("button", {
|
|
1350
1348
|
class: "toolbar-dropdown__trigger align-trigger",
|
|
1351
|
-
onMousedown:
|
|
1349
|
+
onMousedown: t[21] ||= F((e) => O(H)("align"), ["prevent"]),
|
|
1352
1350
|
"aria-expanded": O(B) === "align",
|
|
1353
1351
|
"aria-haspopup": "listbox",
|
|
1354
1352
|
title: O(h)("alignmentGroup")
|
|
1355
|
-
}, [f(r, { name:
|
|
1353
|
+
}, [f(r, { name: K.value }, null, 8, ["name"]), f(r, {
|
|
1356
1354
|
class: "chevron",
|
|
1357
1355
|
name: "arrow_drop_down",
|
|
1358
1356
|
size: 16
|
|
1359
|
-
})], 40,
|
|
1357
|
+
})], 40, xt), O(B) === "align" ? (b(), l("div", {
|
|
1360
1358
|
key: 0,
|
|
1361
1359
|
style: _(O(V)),
|
|
1362
1360
|
class: "toolbar-dropdown__menu align-strip"
|
|
1363
1361
|
}, [
|
|
1364
1362
|
u("button", {
|
|
1365
|
-
class: g(["align-strip__btn", { active:
|
|
1363
|
+
class: g(["align-strip__btn", { active: G.value === "left" }]),
|
|
1366
1364
|
title: `${O(h)("alignLeft")} (${O(h)("alignment.alignLeftShortcut")})`,
|
|
1367
|
-
onMousedown:
|
|
1368
|
-
|
|
1365
|
+
onMousedown: t[22] ||= F((e) => {
|
|
1366
|
+
X("alignLeft"), B.value = null;
|
|
1369
1367
|
}, ["prevent"])
|
|
1370
1368
|
}, [f(r, {
|
|
1371
1369
|
name: "format_align_left",
|
|
1372
1370
|
size: 18
|
|
1373
|
-
})], 42,
|
|
1371
|
+
})], 42, St),
|
|
1374
1372
|
u("button", {
|
|
1375
|
-
class: g(["align-strip__btn", { active:
|
|
1373
|
+
class: g(["align-strip__btn", { active: G.value === "center" }]),
|
|
1376
1374
|
title: `${O(h)("alignCenter")} (${O(h)("alignment.centerShortcut")})`,
|
|
1377
|
-
onMousedown:
|
|
1378
|
-
|
|
1375
|
+
onMousedown: t[23] ||= F((e) => {
|
|
1376
|
+
X("alignCenter"), B.value = null;
|
|
1379
1377
|
}, ["prevent"])
|
|
1380
1378
|
}, [f(r, {
|
|
1381
1379
|
name: "format_align_center",
|
|
1382
1380
|
size: 18
|
|
1383
|
-
})], 42,
|
|
1381
|
+
})], 42, Ct),
|
|
1384
1382
|
u("button", {
|
|
1385
|
-
class: g(["align-strip__btn", { active:
|
|
1383
|
+
class: g(["align-strip__btn", { active: G.value === "right" }]),
|
|
1386
1384
|
title: `${O(h)("alignRight")} (${O(h)("alignment.alignRightShortcut")})`,
|
|
1387
|
-
onMousedown:
|
|
1388
|
-
|
|
1385
|
+
onMousedown: t[24] ||= F((e) => {
|
|
1386
|
+
X("alignRight"), B.value = null;
|
|
1389
1387
|
}, ["prevent"])
|
|
1390
1388
|
}, [f(r, {
|
|
1391
1389
|
name: "format_align_right",
|
|
1392
1390
|
size: 18
|
|
1393
|
-
})], 42,
|
|
1391
|
+
})], 42, wt),
|
|
1394
1392
|
u("button", {
|
|
1395
|
-
class: g(["align-strip__btn", { active:
|
|
1393
|
+
class: g(["align-strip__btn", { active: G.value === "both" }]),
|
|
1396
1394
|
title: `${O(h)("justify")} (${O(h)("alignment.justifyShortcut")})`,
|
|
1397
|
-
onMousedown:
|
|
1398
|
-
|
|
1395
|
+
onMousedown: t[25] ||= F((e) => {
|
|
1396
|
+
X("alignJustify"), B.value = null;
|
|
1399
1397
|
}, ["prevent"])
|
|
1400
1398
|
}, [f(r, {
|
|
1401
1399
|
name: "format_align_justify",
|
|
1402
1400
|
size: 18
|
|
1403
|
-
})], 42,
|
|
1401
|
+
})], 42, Tt)
|
|
1404
1402
|
], 4)) : c("", !0)], 512),
|
|
1405
1403
|
u("button", {
|
|
1406
1404
|
title: O(h)("bulletList"),
|
|
1407
1405
|
"aria-label": O(h)("bulletList"),
|
|
1408
|
-
class: g({ active:
|
|
1409
|
-
onMousedown:
|
|
1410
|
-
}, [f(r, { name: "format_list_bulleted" })], 42,
|
|
1406
|
+
class: g({ active: U.value.listState.type === "bullet" }),
|
|
1407
|
+
onMousedown: t[26] ||= F((e) => X("toggleBulletList"), ["prevent"])
|
|
1408
|
+
}, [f(r, { name: "format_list_bulleted" })], 42, Et),
|
|
1411
1409
|
u("button", {
|
|
1412
1410
|
title: O(h)("numberedList"),
|
|
1413
1411
|
"aria-label": O(h)("numberedList"),
|
|
1414
|
-
class: g({ active:
|
|
1415
|
-
onMousedown:
|
|
1416
|
-
}, [f(r, { name: "format_list_numbered" })], 42,
|
|
1412
|
+
class: g({ active: U.value.listState.type === "numbered" }),
|
|
1413
|
+
onMousedown: t[27] ||= F((e) => X("toggleNumberedList"), ["prevent"])
|
|
1414
|
+
}, [f(r, { name: "format_list_numbered" })], 42, Dt),
|
|
1417
1415
|
u("button", {
|
|
1418
1416
|
title: O(h)("decreaseIndent"),
|
|
1419
1417
|
"aria-label": O(h)("decreaseIndent"),
|
|
1420
|
-
disabled: !
|
|
1421
|
-
onMousedown:
|
|
1422
|
-
}, [f(r, { name: "format_indent_decrease" })], 40,
|
|
1418
|
+
disabled: !le.value,
|
|
1419
|
+
onMousedown: t[28] ||= F((e) => X("outdent"), ["prevent"])
|
|
1420
|
+
}, [f(r, { name: "format_indent_decrease" })], 40, Ot),
|
|
1423
1421
|
u("button", {
|
|
1424
1422
|
title: O(h)("increaseIndent"),
|
|
1425
1423
|
"aria-label": O(h)("increaseIndent"),
|
|
1426
|
-
onMousedown:
|
|
1427
|
-
}, [f(r, { name: "format_indent_increase" })], 40,
|
|
1424
|
+
onMousedown: t[29] ||= F((e) => X("indent"), ["prevent"])
|
|
1425
|
+
}, [f(r, { name: "format_indent_increase" })], 40, kt),
|
|
1428
1426
|
u("div", {
|
|
1429
1427
|
class: "toolbar-dropdown",
|
|
1430
1428
|
ref_key: "spacingDropdownRef",
|
|
1431
1429
|
ref: I
|
|
1432
1430
|
}, [u("button", {
|
|
1433
1431
|
class: "toolbar-dropdown__trigger",
|
|
1434
|
-
onMousedown:
|
|
1432
|
+
onMousedown: t[30] ||= F((e) => O(H)("spacing"), ["prevent"]),
|
|
1435
1433
|
"aria-expanded": O(B) === "spacing",
|
|
1436
1434
|
"aria-haspopup": "listbox",
|
|
1437
1435
|
title: O(h)("lineSpacing.label")
|
|
@@ -1439,411 +1437,77 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1439
1437
|
class: "chevron",
|
|
1440
1438
|
name: "arrow_drop_down",
|
|
1441
1439
|
size: 16
|
|
1442
|
-
})], 40,
|
|
1440
|
+
})], 40, At), O(B) === "spacing" ? (b(), l("div", {
|
|
1443
1441
|
key: 0,
|
|
1444
1442
|
style: _(O(V)),
|
|
1445
1443
|
class: "toolbar-dropdown__menu"
|
|
1446
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1444
|
+
}, [(b(!0), l(a, null, C(O(ve), (e) => (b(), l("button", {
|
|
1447
1445
|
key: e.value,
|
|
1448
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1449
|
-
onMousedown: F((t) =>
|
|
1450
|
-
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43,
|
|
1446
|
+
class: g(["toolbar-dropdown__item", { active: Fe(e.value) }]),
|
|
1447
|
+
onMousedown: F((t) => Pe(e.value), ["prevent"])
|
|
1448
|
+
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43, jt))), 128))], 4)) : c("", !0)], 512),
|
|
1451
1449
|
u("button", {
|
|
1452
1450
|
title: O(h)("formattingBar.clearFormatting"),
|
|
1453
1451
|
"aria-label": O(h)("formattingBar.clearFormatting"),
|
|
1454
|
-
onMousedown: F(
|
|
1455
|
-
}, [f(r, { name: "format_clear" })], 40,
|
|
1456
|
-
|
|
1457
|
-
|
|
1452
|
+
onMousedown: F(je, ["prevent"])
|
|
1453
|
+
}, [f(r, { name: "format_clear" })], 40, Mt),
|
|
1454
|
+
t[48] ||= u("span", { class: "divider" }, null, -1),
|
|
1455
|
+
n.outlineDrawer ? (b(), l("button", {
|
|
1458
1456
|
key: 1,
|
|
1459
1457
|
type: "button",
|
|
1460
1458
|
"data-testid": "toolbar-outline-toggle",
|
|
1461
1459
|
title: O(h)("editor.showDocumentOutline"),
|
|
1462
1460
|
"aria-label": O(h)("editor.showDocumentOutline"),
|
|
1463
|
-
"aria-pressed":
|
|
1464
|
-
class: g({ active:
|
|
1465
|
-
onMousedown:
|
|
1466
|
-
onClick:
|
|
1467
|
-
}, [f(r, { name: "format_list_bulleted" })], 42,
|
|
1461
|
+
"aria-pressed": n.outlineDrawerOpen,
|
|
1462
|
+
class: g({ active: n.outlineDrawerOpen }),
|
|
1463
|
+
onMousedown: t[31] ||= F(() => {}, ["prevent"]),
|
|
1464
|
+
onClick: t[32] ||= (t) => e.$emit("toggle-outline")
|
|
1465
|
+
}, [f(r, { name: "format_list_bulleted" })], 42, Nt)) : c("", !0),
|
|
1468
1466
|
u("button", {
|
|
1469
1467
|
type: "button",
|
|
1470
1468
|
"data-testid": "toolbar-comments-toggle",
|
|
1471
1469
|
title: O(h)("formattingBar.commentsAndChanges"),
|
|
1472
1470
|
"aria-label": O(h)("formattingBar.commentsAndChanges"),
|
|
1473
|
-
"aria-pressed":
|
|
1474
|
-
class: g({ active:
|
|
1475
|
-
onMousedown:
|
|
1476
|
-
onClick:
|
|
1477
|
-
}, [f(r, { name: "comment" }),
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
f(
|
|
1481
|
-
"image-context":
|
|
1482
|
-
onChange:
|
|
1471
|
+
"aria-pressed": n.commentsSidebarOpen,
|
|
1472
|
+
class: g({ active: n.commentsSidebarOpen }),
|
|
1473
|
+
onMousedown: t[33] ||= F(() => {}, ["prevent"]),
|
|
1474
|
+
onClick: t[34] ||= (t) => e.$emit("toggle-sidebar")
|
|
1475
|
+
}, [f(r, { name: "comment" }), n.commentCount > 0 ? (b(), l("span", Ft, E(n.commentCount > 99 ? "99+" : n.commentCount), 1)) : c("", !0)], 42, Pt),
|
|
1476
|
+
n.imageContext ? (b(), l(a, { key: 2 }, [
|
|
1477
|
+
t[41] ||= u("span", { class: "divider" }, null, -1),
|
|
1478
|
+
f(Ze, {
|
|
1479
|
+
"image-context": n.imageContext,
|
|
1480
|
+
onChange: t[35] ||= (t) => e.$emit("image-wrap-type", t)
|
|
1483
1481
|
}, null, 8, ["image-context"]),
|
|
1484
|
-
f(
|
|
1482
|
+
f(Xe, { onTransform: t[36] ||= (t) => e.$emit("image-transform", t) }),
|
|
1485
1483
|
u("button", {
|
|
1486
1484
|
title: O(h)("formattingBar.imagePropertiesShortcut"),
|
|
1487
1485
|
"aria-label": O(h)("formattingBar.imageProperties"),
|
|
1488
|
-
onMousedown:
|
|
1489
|
-
}, [f(r, { name: "tune" })], 40,
|
|
1486
|
+
onMousedown: t[37] ||= F((t) => e.$emit("image-properties"), ["prevent"])
|
|
1487
|
+
}, [f(r, { name: "tune" })], 40, It)
|
|
1490
1488
|
], 64)) : c("", !0),
|
|
1491
|
-
w(
|
|
1492
|
-
|
|
1493
|
-
"track-changes-on":
|
|
1494
|
-
"display-mode":
|
|
1495
|
-
"read-only":
|
|
1496
|
-
onToggleTrackChanges:
|
|
1497
|
-
"onUpdate:displayMode":
|
|
1489
|
+
w(e.$slots, "table-context", {}, void 0, !0),
|
|
1490
|
+
n.showReviewControls ? (b(), l(a, { key: 3 }, [t[42] ||= u("span", { class: "divider" }, null, -1), f(Ge, {
|
|
1491
|
+
"track-changes-on": n.trackChangesOn,
|
|
1492
|
+
"display-mode": n.displayMode,
|
|
1493
|
+
"read-only": n.readOnly,
|
|
1494
|
+
onToggleTrackChanges: t[38] ||= (t) => e.$emit("toggle-track-changes"),
|
|
1495
|
+
"onUpdate:displayMode": t[39] ||= (t) => e.$emit("update:display-mode", t)
|
|
1498
1496
|
}, null, 8, [
|
|
1499
1497
|
"track-changes-on",
|
|
1500
1498
|
"display-mode",
|
|
1501
1499
|
"read-only"
|
|
1502
1500
|
])], 64)) : c("", !0),
|
|
1503
|
-
|
|
1504
|
-
|
|
1501
|
+
t[49] ||= u("span", { class: "divider" }, null, -1),
|
|
1502
|
+
n.editorMode ? (b(), s(Le, {
|
|
1505
1503
|
key: 4,
|
|
1506
|
-
"model-value":
|
|
1507
|
-
"onUpdate:modelValue":
|
|
1504
|
+
"model-value": n.editorMode,
|
|
1505
|
+
"onUpdate:modelValue": t[40] ||= (t) => e.$emit("mode-change", t)
|
|
1508
1506
|
}, null, 8, ["model-value"])) : c("", !0),
|
|
1509
|
-
w(
|
|
1507
|
+
w(e.$slots, "toolbar-extra", {}, void 0, !0)
|
|
1510
1508
|
])) : c("", !0);
|
|
1511
1509
|
}
|
|
1512
|
-
}), [["__scopeId", "data-v-786dbd83"]]),
|
|
1513
|
-
__name: "HorizontalRuler",
|
|
1514
|
-
props: {
|
|
1515
|
-
sectionProps: {},
|
|
1516
|
-
zoom: { default: 1 },
|
|
1517
|
-
editable: {
|
|
1518
|
-
type: Boolean,
|
|
1519
|
-
default: !0
|
|
1520
|
-
},
|
|
1521
|
-
showFirstLineIndent: {
|
|
1522
|
-
type: Boolean,
|
|
1523
|
-
default: !1
|
|
1524
|
-
},
|
|
1525
|
-
firstLineIndent: { default: 0 },
|
|
1526
|
-
hangingIndent: {
|
|
1527
|
-
type: Boolean,
|
|
1528
|
-
default: !1
|
|
1529
|
-
},
|
|
1530
|
-
indentLeft: { default: 0 },
|
|
1531
|
-
indentRight: { default: 0 },
|
|
1532
|
-
unit: { default: "inch" },
|
|
1533
|
-
tabStops: {}
|
|
1534
|
-
},
|
|
1535
|
-
emits: [
|
|
1536
|
-
"left-margin-change",
|
|
1537
|
-
"right-margin-change",
|
|
1538
|
-
"first-line-indent-change",
|
|
1539
|
-
"indent-left-change",
|
|
1540
|
-
"indent-right-change",
|
|
1541
|
-
"tab-stop-remove"
|
|
1542
|
-
],
|
|
1543
|
-
setup(e, { emit: t }) {
|
|
1544
|
-
let r = e, i = t, { t: s } = n(), d = Math.round(an * 1.6), f = S(null), p = S(null), h = S(null), g = S(0), y = S("");
|
|
1545
|
-
function x(e) {
|
|
1546
|
-
return K(e) * r.zoom;
|
|
1547
|
-
}
|
|
1548
|
-
function w(e) {
|
|
1549
|
-
return Math.round(re(e / r.zoom));
|
|
1550
|
-
}
|
|
1551
|
-
let T = o(() => r.sectionProps?.pageWidth ?? Zt), D = o(() => r.sectionProps?.marginLeft ?? Qt), k = o(() => r.sectionProps?.marginRight ?? Qt), A = o(() => x(T.value)), j = o(() => x(D.value)), M = o(() => x(k.value)), N = o(() => x(r.indentLeft)), P = o(() => x(r.indentRight)), I = o(() => r.hangingIndent ? -r.firstLineIndent : r.firstLineIndent), L = o(() => x(I.value)), ee = o(() => j.value + N.value), R = o(() => A.value - M.value - P.value), z = o(() => j.value + N.value + L.value), B = o(() => ({
|
|
1552
|
-
position: "relative",
|
|
1553
|
-
width: A.value + "px",
|
|
1554
|
-
height: "22px",
|
|
1555
|
-
backgroundColor: "transparent",
|
|
1556
|
-
overflow: "visible",
|
|
1557
|
-
userSelect: "none",
|
|
1558
|
-
cursor: p.value ? "ew-resize" : "default"
|
|
1559
|
-
})), te = o(() => ({
|
|
1560
|
-
position: "absolute",
|
|
1561
|
-
top: 0,
|
|
1562
|
-
left: 0,
|
|
1563
|
-
width: j.value + "px",
|
|
1564
|
-
height: "22px",
|
|
1565
|
-
backgroundColor: "var(--doc-shadow-subtle)",
|
|
1566
|
-
borderRight: "1px solid var(--doc-shadow-subtle)",
|
|
1567
|
-
cursor: r.editable ? "ew-resize" : "default",
|
|
1568
|
-
zIndex: 1
|
|
1569
|
-
})), V = o(() => ({
|
|
1570
|
-
position: "absolute",
|
|
1571
|
-
top: 0,
|
|
1572
|
-
right: 0,
|
|
1573
|
-
width: M.value + "px",
|
|
1574
|
-
height: "22px",
|
|
1575
|
-
backgroundColor: "var(--doc-shadow-subtle)",
|
|
1576
|
-
borderLeft: "1px solid var(--doc-shadow-subtle)",
|
|
1577
|
-
cursor: r.editable ? "ew-resize" : "default",
|
|
1578
|
-
zIndex: 1
|
|
1579
|
-
})), H = o(() => ae({
|
|
1580
|
-
pageWidth: T.value,
|
|
1581
|
-
leftMargin: D.value,
|
|
1582
|
-
rightMargin: k.value,
|
|
1583
|
-
leftIndent: r.indentLeft,
|
|
1584
|
-
rightIndent: r.indentRight
|
|
1585
|
-
})), U = o(() => ({
|
|
1586
|
-
leftMargin: X({
|
|
1587
|
-
value: D.value,
|
|
1588
|
-
...H.value.leftMargin,
|
|
1589
|
-
unit: r.unit,
|
|
1590
|
-
onChange: r.editable ? (e) => Q("leftMargin", e) : void 0
|
|
1591
|
-
}),
|
|
1592
|
-
rightMargin: X({
|
|
1593
|
-
value: k.value,
|
|
1594
|
-
...H.value.rightMargin,
|
|
1595
|
-
unit: r.unit,
|
|
1596
|
-
onChange: r.editable ? (e) => Q("rightMargin", e) : void 0
|
|
1597
|
-
}),
|
|
1598
|
-
firstLineIndent: X({
|
|
1599
|
-
value: r.hangingIndent ? -r.firstLineIndent : r.firstLineIndent,
|
|
1600
|
-
...H.value.firstLineIndent,
|
|
1601
|
-
unit: r.unit,
|
|
1602
|
-
onChange: r.editable ? (e) => Q("firstLineIndent", e) : void 0
|
|
1603
|
-
}),
|
|
1604
|
-
leftIndent: X({
|
|
1605
|
-
value: r.indentLeft,
|
|
1606
|
-
...H.value.leftIndent,
|
|
1607
|
-
unit: r.unit,
|
|
1608
|
-
onChange: r.editable ? (e) => Q("leftIndent", e) : void 0
|
|
1609
|
-
}),
|
|
1610
|
-
rightIndent: X({
|
|
1611
|
-
value: r.indentRight,
|
|
1612
|
-
...H.value.rightIndent,
|
|
1613
|
-
unit: r.unit,
|
|
1614
|
-
onChange: r.editable ? (e) => Q("rightIndent", e) : void 0
|
|
1615
|
-
})
|
|
1616
|
-
})), ne = o(() => {
|
|
1617
|
-
let e = [];
|
|
1618
|
-
if (r.unit === "inch") {
|
|
1619
|
-
let t = $t / 8, n = Math.ceil(T.value / t);
|
|
1620
|
-
for (let r = 0; r <= n; r++) {
|
|
1621
|
-
let n = r * t;
|
|
1622
|
-
if (n > T.value) break;
|
|
1623
|
-
let i = x(n);
|
|
1624
|
-
r % 8 == 0 ? e.push({
|
|
1625
|
-
position: i,
|
|
1626
|
-
height: 10,
|
|
1627
|
-
label: r / 8 > 0 ? String(r / 8) : void 0
|
|
1628
|
-
}) : r % 4 == 0 ? e.push({
|
|
1629
|
-
position: i,
|
|
1630
|
-
height: 6
|
|
1631
|
-
}) : r % 2 == 0 ? e.push({
|
|
1632
|
-
position: i,
|
|
1633
|
-
height: 4
|
|
1634
|
-
}) : e.push({
|
|
1635
|
-
position: i,
|
|
1636
|
-
height: 2
|
|
1637
|
-
});
|
|
1638
|
-
}
|
|
1639
|
-
} else {
|
|
1640
|
-
let t = en / 10, n = Math.ceil(T.value / t);
|
|
1641
|
-
for (let r = 0; r <= n; r++) {
|
|
1642
|
-
let n = r * t;
|
|
1643
|
-
if (n > T.value) break;
|
|
1644
|
-
let i = x(n);
|
|
1645
|
-
r % 10 == 0 ? e.push({
|
|
1646
|
-
position: i,
|
|
1647
|
-
height: 10,
|
|
1648
|
-
label: r / 10 > 0 ? String(r / 10) : void 0
|
|
1649
|
-
}) : r % 5 == 0 ? e.push({
|
|
1650
|
-
position: i,
|
|
1651
|
-
height: 6
|
|
1652
|
-
}) : e.push({
|
|
1653
|
-
position: i,
|
|
1654
|
-
height: 3
|
|
1655
|
-
});
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
return e;
|
|
1659
|
-
}), W = o(() => r.tabStops?.length ? r.tabStops.map((e) => {
|
|
1660
|
-
let t = e.position;
|
|
1661
|
-
return {
|
|
1662
|
-
px: x(D.value + t),
|
|
1663
|
-
twips: t,
|
|
1664
|
-
label: G(t)
|
|
1665
|
-
};
|
|
1666
|
-
}) : []);
|
|
1667
|
-
function G(e) {
|
|
1668
|
-
return r.unit === "cm" ? (e / en).toFixed(1) + " cm" : (e / $t).toFixed(2) + "\"";
|
|
1669
|
-
}
|
|
1670
|
-
function q(e) {
|
|
1671
|
-
return p.value === e ? rn : h.value === e ? nn : tn;
|
|
1672
|
-
}
|
|
1673
|
-
function ie(e, t, n) {
|
|
1674
|
-
return {
|
|
1675
|
-
position: "absolute",
|
|
1676
|
-
left: t - an + "px",
|
|
1677
|
-
width: "10px",
|
|
1678
|
-
height: "10px",
|
|
1679
|
-
cursor: r.editable ? "ew-resize" : "default",
|
|
1680
|
-
zIndex: n ? 10 : 4,
|
|
1681
|
-
...e === "down" ? { top: 0 } : { bottom: 0 }
|
|
1682
|
-
};
|
|
1683
|
-
}
|
|
1684
|
-
function J(e, t) {
|
|
1685
|
-
return e === "down" ? {
|
|
1686
|
-
position: "absolute",
|
|
1687
|
-
top: "1px",
|
|
1688
|
-
left: 0,
|
|
1689
|
-
width: 0,
|
|
1690
|
-
height: 0,
|
|
1691
|
-
borderLeft: `${an}px solid transparent`,
|
|
1692
|
-
borderRight: `${an}px solid transparent`,
|
|
1693
|
-
borderTop: `${d}px solid ${t}`,
|
|
1694
|
-
transition: "border-top-color 0.1s"
|
|
1695
|
-
} : {
|
|
1696
|
-
position: "absolute",
|
|
1697
|
-
bottom: "1px",
|
|
1698
|
-
left: 0,
|
|
1699
|
-
width: 0,
|
|
1700
|
-
height: 0,
|
|
1701
|
-
borderLeft: `${an}px solid transparent`,
|
|
1702
|
-
borderRight: `${an}px solid transparent`,
|
|
1703
|
-
borderBottom: `${d}px solid ${t}`,
|
|
1704
|
-
transition: "border-bottom-color 0.1s"
|
|
1705
|
-
};
|
|
1706
|
-
}
|
|
1707
|
-
let Z = 0;
|
|
1708
|
-
function oe(e, t) {
|
|
1709
|
-
r.editable && (p.value = e, e === "leftMargin" ? Z = D.value : e === "rightMargin" ? Z = k.value : e === "leftIndent" ? Z = r.indentLeft : e === "rightIndent" ? Z = r.indentRight : e === "firstLineIndent" && (Z = r.firstLineIndent), g.value = t.clientX - (f.value?.getBoundingClientRect().left ?? 0), y.value = G(Z), document.addEventListener("mousemove", se), document.addEventListener("mouseup", ce));
|
|
1710
|
-
}
|
|
1711
|
-
function se(e) {
|
|
1712
|
-
if (!p.value || !f.value) return;
|
|
1713
|
-
let t = f.value.getBoundingClientRect();
|
|
1714
|
-
if (!t) return;
|
|
1715
|
-
let n = e.clientX - t.left;
|
|
1716
|
-
g.value = n;
|
|
1717
|
-
let r = w(n), i = le(p.value, r);
|
|
1718
|
-
y.value = G(i), Q(p.value, i);
|
|
1719
|
-
}
|
|
1720
|
-
function ce(e) {
|
|
1721
|
-
p.value = null, document.removeEventListener("mousemove", se), document.removeEventListener("mouseup", ce);
|
|
1722
|
-
}
|
|
1723
|
-
function le(e, t) {
|
|
1724
|
-
if (e === "leftMargin") return Y(t, H.value.leftMargin);
|
|
1725
|
-
if (e === "rightMargin") {
|
|
1726
|
-
let e = T.value - t;
|
|
1727
|
-
return Y(e, H.value.rightMargin);
|
|
1728
|
-
}
|
|
1729
|
-
if (e === "firstLineIndent") {
|
|
1730
|
-
let e = t - (D.value + r.indentLeft);
|
|
1731
|
-
return Y(e, H.value.firstLineIndent);
|
|
1732
|
-
}
|
|
1733
|
-
if (e === "leftIndent") {
|
|
1734
|
-
let e = t - D.value;
|
|
1735
|
-
return Y(e, H.value.leftIndent);
|
|
1736
|
-
}
|
|
1737
|
-
let n = T.value - k.value - t;
|
|
1738
|
-
return Y(n, H.value.rightIndent);
|
|
1739
|
-
}
|
|
1740
|
-
function Q(e, t) {
|
|
1741
|
-
switch (e) {
|
|
1742
|
-
case "leftMargin":
|
|
1743
|
-
i("left-margin-change", t);
|
|
1744
|
-
break;
|
|
1745
|
-
case "rightMargin":
|
|
1746
|
-
i("right-margin-change", t);
|
|
1747
|
-
break;
|
|
1748
|
-
case "firstLineIndent":
|
|
1749
|
-
i("first-line-indent-change", t);
|
|
1750
|
-
break;
|
|
1751
|
-
case "leftIndent":
|
|
1752
|
-
i("indent-left-change", t);
|
|
1753
|
-
break;
|
|
1754
|
-
case "rightIndent": i("indent-right-change", t);
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
return v(() => {
|
|
1758
|
-
document.removeEventListener("mousemove", se), document.removeEventListener("mouseup", ce);
|
|
1759
|
-
}), (t, n) => (b(), l("div", {
|
|
1760
|
-
ref_key: "rulerRef",
|
|
1761
|
-
ref: f,
|
|
1762
|
-
class: "docx-horizontal-ruler",
|
|
1763
|
-
style: _(B.value),
|
|
1764
|
-
role: "group",
|
|
1765
|
-
"aria-label": O(s)("ruler.horizontal")
|
|
1766
|
-
}, [
|
|
1767
|
-
u("div", m({
|
|
1768
|
-
class: "docx-horizontal-ruler__margin",
|
|
1769
|
-
style: te.value
|
|
1770
|
-
}, U.value.leftMargin.attributes, {
|
|
1771
|
-
"aria-label": U.value.leftMargin.attributes.role ? `${O(s)("dialogs.pageSetup.margins")}: ${O(s)("dialogs.pageSetup.left")}` : void 0,
|
|
1772
|
-
"aria-orientation": U.value.leftMargin.attributes.role ? "horizontal" : void 0,
|
|
1773
|
-
onKeydown: n[0] ||= (...e) => U.value.leftMargin.onKeyDown && U.value.leftMargin.onKeyDown(...e),
|
|
1774
|
-
onMousedown: n[1] ||= F((t) => e.editable ? oe("leftMargin", t) : null, ["prevent", "stop"])
|
|
1775
|
-
}), null, 16, Wt),
|
|
1776
|
-
u("div", m({
|
|
1777
|
-
class: "docx-horizontal-ruler__margin",
|
|
1778
|
-
style: V.value
|
|
1779
|
-
}, U.value.rightMargin.attributes, {
|
|
1780
|
-
"aria-label": U.value.rightMargin.attributes.role ? `${O(s)("dialogs.pageSetup.margins")}: ${O(s)("dialogs.pageSetup.right")}` : void 0,
|
|
1781
|
-
"aria-orientation": U.value.rightMargin.attributes.role ? "horizontal" : void 0,
|
|
1782
|
-
onKeydown: n[2] ||= (...e) => U.value.rightMargin.onKeyDown && U.value.rightMargin.onKeyDown(...e),
|
|
1783
|
-
onMousedown: n[3] ||= F((t) => e.editable ? oe("rightMargin", t) : null, ["prevent", "stop"])
|
|
1784
|
-
}), null, 16, Gt),
|
|
1785
|
-
u("div", Kt, [(b(!0), l(a, null, C(ne.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
|
|
1786
|
-
class: "docx-horizontal-ruler__tick-line",
|
|
1787
|
-
style: _({
|
|
1788
|
-
left: e.position + "px",
|
|
1789
|
-
height: e.height + "px"
|
|
1790
|
-
})
|
|
1791
|
-
}, null, 4), e.label ? (b(), l("div", {
|
|
1792
|
-
key: 0,
|
|
1793
|
-
class: "docx-horizontal-ruler__tick-label",
|
|
1794
|
-
style: _({ left: e.position + "px" })
|
|
1795
|
-
}, E(e.label), 5)) : c("", !0)], 64))), 128))]),
|
|
1796
|
-
e.showFirstLineIndent ? (b(), l("div", m({
|
|
1797
|
-
key: 0,
|
|
1798
|
-
class: "docx-ruler-indent",
|
|
1799
|
-
style: ie("down", z.value, p.value === "firstLineIndent"),
|
|
1800
|
-
onMousedown: n[4] ||= F((t) => e.editable ? oe("firstLineIndent", t) : null, ["prevent", "stop"]),
|
|
1801
|
-
onMouseenter: n[5] ||= (e) => h.value = "firstLineIndent"
|
|
1802
|
-
}, U.value.firstLineIndent.attributes, {
|
|
1803
|
-
"aria-label": U.value.firstLineIndent.attributes.role ? O(s)("ruler.firstLineIndent") : void 0,
|
|
1804
|
-
"aria-orientation": U.value.firstLineIndent.attributes.role ? "horizontal" : void 0,
|
|
1805
|
-
onKeydown: n[6] ||= (...e) => U.value.firstLineIndent.onKeyDown && U.value.firstLineIndent.onKeyDown(...e),
|
|
1806
|
-
onMouseleave: n[7] ||= (e) => h.value = null
|
|
1807
|
-
}), [u("div", { style: _(J("down", q("firstLineIndent"))) }, null, 4)], 16, qt)) : c("", !0),
|
|
1808
|
-
e.editable ? (b(), l("div", m({
|
|
1809
|
-
key: 1,
|
|
1810
|
-
class: "docx-ruler-indent",
|
|
1811
|
-
style: ie("up", ee.value, p.value === "leftIndent"),
|
|
1812
|
-
onMousedown: n[8] ||= F((e) => oe("leftIndent", e), ["prevent", "stop"]),
|
|
1813
|
-
onMouseenter: n[9] ||= (e) => h.value = "leftIndent"
|
|
1814
|
-
}, U.value.leftIndent.attributes, {
|
|
1815
|
-
"aria-label": U.value.leftIndent.attributes.role ? O(s)("ruler.leftIndent") : void 0,
|
|
1816
|
-
"aria-orientation": U.value.leftIndent.attributes.role ? "horizontal" : void 0,
|
|
1817
|
-
onKeydown: n[10] ||= (...e) => U.value.leftIndent.onKeyDown && U.value.leftIndent.onKeyDown(...e),
|
|
1818
|
-
onMouseleave: n[11] ||= (e) => h.value = null
|
|
1819
|
-
}), [u("div", { style: _(J("up", q("leftIndent"))) }, null, 4)], 16, Jt)) : c("", !0),
|
|
1820
|
-
e.editable ? (b(), l("div", m({
|
|
1821
|
-
key: 2,
|
|
1822
|
-
class: "docx-ruler-indent",
|
|
1823
|
-
style: ie("down", R.value, p.value === "rightIndent"),
|
|
1824
|
-
onMousedown: n[12] ||= F((e) => oe("rightIndent", e), ["prevent", "stop"]),
|
|
1825
|
-
onMouseenter: n[13] ||= (e) => h.value = "rightIndent"
|
|
1826
|
-
}, U.value.rightIndent.attributes, {
|
|
1827
|
-
"aria-label": U.value.rightIndent.attributes.role ? O(s)("ruler.rightIndent") : void 0,
|
|
1828
|
-
"aria-orientation": U.value.rightIndent.attributes.role ? "horizontal" : void 0,
|
|
1829
|
-
onKeydown: n[14] ||= (...e) => U.value.rightIndent.onKeyDown && U.value.rightIndent.onKeyDown(...e),
|
|
1830
|
-
onMouseleave: n[15] ||= (e) => h.value = null
|
|
1831
|
-
}), [u("div", { style: _(J("down", q("rightIndent"))) }, null, 4)], 16, Yt)) : c("", !0),
|
|
1832
|
-
(b(!0), l(a, null, C(W.value, (e, n) => (b(), l("div", {
|
|
1833
|
-
key: n,
|
|
1834
|
-
class: "docx-horizontal-ruler__tab",
|
|
1835
|
-
style: _({ left: e.px + "px" }),
|
|
1836
|
-
title: `${e.label}`,
|
|
1837
|
-
onDblclick: F((n) => t.$emit("tab-stop-remove", e.twips), ["prevent"])
|
|
1838
|
-
}, " L ", 44, Xt))), 128)),
|
|
1839
|
-
p.value && y.value ? (b(), l("div", {
|
|
1840
|
-
key: 3,
|
|
1841
|
-
class: "docx-horizontal-ruler__tooltip",
|
|
1842
|
-
style: _({ left: g.value + "px" })
|
|
1843
|
-
}, E(y.value), 5)) : c("", !0)
|
|
1844
|
-
], 12, Ut));
|
|
1845
|
-
}
|
|
1846
|
-
}), [["__scopeId", "data-v-996b9e9e"]]), sn = /* @__PURE__ */ p({
|
|
1510
|
+
}), [["__scopeId", "data-v-786dbd83"]]), Rt = /* @__PURE__ */ p({
|
|
1847
1511
|
__name: "TableBorderColorPicker",
|
|
1848
1512
|
props: {
|
|
1849
1513
|
disabled: { type: Boolean },
|
|
@@ -1851,16 +1515,16 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1851
1515
|
value: {}
|
|
1852
1516
|
},
|
|
1853
1517
|
emits: ["change"],
|
|
1854
|
-
setup(
|
|
1855
|
-
let
|
|
1518
|
+
setup(t, { emit: n }) {
|
|
1519
|
+
let r = n, { t: a } = e();
|
|
1856
1520
|
function o(e) {
|
|
1857
|
-
typeof e == "string" ?
|
|
1521
|
+
typeof e == "string" ? r("change", e.replace(/^#/, "")) : e.rgb ? r("change", e.rgb.replace(/^#/, "")) : e.auto && r("change", "000000");
|
|
1858
1522
|
}
|
|
1859
|
-
return (
|
|
1523
|
+
return (e, n) => (b(), s(i, {
|
|
1860
1524
|
mode: "border",
|
|
1861
|
-
value:
|
|
1862
|
-
theme:
|
|
1863
|
-
disabled:
|
|
1525
|
+
value: t.value,
|
|
1526
|
+
theme: t.theme ?? null,
|
|
1527
|
+
disabled: t.disabled,
|
|
1864
1528
|
title: O(a)("table.borderColor"),
|
|
1865
1529
|
onChange: o
|
|
1866
1530
|
}, null, 8, [
|
|
@@ -1870,12 +1534,12 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1870
1534
|
"title"
|
|
1871
1535
|
]));
|
|
1872
1536
|
}
|
|
1873
|
-
}),
|
|
1537
|
+
}), zt = ["disabled", "onClick"], Bt = { class: "docx-tbp__panel" }, Vt = ["title", "onClick"], Ht = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
1874
1538
|
__name: "TableBorderPicker",
|
|
1875
1539
|
props: { disabled: { type: Boolean } },
|
|
1876
1540
|
emits: ["change"],
|
|
1877
|
-
setup(e, { emit:
|
|
1878
|
-
let { Popover:
|
|
1541
|
+
setup(e, { emit: n }) {
|
|
1542
|
+
let { Popover: i } = t(), o = n, c = S(!1), d = [
|
|
1879
1543
|
{
|
|
1880
1544
|
value: "all",
|
|
1881
1545
|
icon: "border_all",
|
|
@@ -1930,10 +1594,10 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1930
1594
|
function p(e) {
|
|
1931
1595
|
o("change", e), c.value = !1;
|
|
1932
1596
|
}
|
|
1933
|
-
return (t,
|
|
1597
|
+
return (t, n) => (b(), s(O(i), {
|
|
1934
1598
|
open: c.value,
|
|
1935
|
-
"onUpdate:open":
|
|
1936
|
-
onClose:
|
|
1599
|
+
"onUpdate:open": n[0] ||= (e) => c.value = e,
|
|
1600
|
+
onClose: n[1] ||= (e) => c.value = !1
|
|
1937
1601
|
}, {
|
|
1938
1602
|
trigger: M(({ toggle: t }) => [u("button", {
|
|
1939
1603
|
type: "button",
|
|
@@ -1944,8 +1608,8 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1944
1608
|
}, [f(r, {
|
|
1945
1609
|
name: "border_all",
|
|
1946
1610
|
size: 20
|
|
1947
|
-
})], 8,
|
|
1948
|
-
panel: M(() => [u("div",
|
|
1611
|
+
})], 8, zt)]),
|
|
1612
|
+
panel: M(() => [u("div", Bt, [(b(), l(a, null, C(d, (e) => u("button", {
|
|
1949
1613
|
key: e.value,
|
|
1950
1614
|
type: "button",
|
|
1951
1615
|
class: "docx-tbp__option",
|
|
@@ -1954,16 +1618,16 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
1954
1618
|
}, [f(r, {
|
|
1955
1619
|
name: e.icon,
|
|
1956
1620
|
size: 20
|
|
1957
|
-
}, null, 8, ["name"])], 8,
|
|
1621
|
+
}, null, 8, ["name"])], 8, Vt)), 64))])]),
|
|
1958
1622
|
_: 1
|
|
1959
1623
|
}, 8, ["open"]));
|
|
1960
1624
|
}
|
|
1961
|
-
}), [["__scopeId", "data-v-02e5b963"]]),
|
|
1625
|
+
}), [["__scopeId", "data-v-02e5b963"]]), Ut = ["disabled", "onClick"], Wt = { class: "docx-tbwidth__panel" }, Gt = ["onClick"], Kt = { class: "docx-tbwidth__label" }, qt = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
1962
1626
|
__name: "TableBorderWidthPicker",
|
|
1963
1627
|
props: { disabled: { type: Boolean } },
|
|
1964
1628
|
emits: ["change"],
|
|
1965
|
-
setup(e, { emit:
|
|
1966
|
-
let { Popover:
|
|
1629
|
+
setup(e, { emit: n }) {
|
|
1630
|
+
let { Popover: i } = t(), o = n, c = S(!1), d = [
|
|
1967
1631
|
{
|
|
1968
1632
|
label: "0.5pt",
|
|
1969
1633
|
eighths: 4,
|
|
@@ -2008,10 +1672,10 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2008
1672
|
function p(e) {
|
|
2009
1673
|
o("change", e), c.value = !1;
|
|
2010
1674
|
}
|
|
2011
|
-
return (t,
|
|
1675
|
+
return (t, n) => (b(), s(O(i), {
|
|
2012
1676
|
open: c.value,
|
|
2013
|
-
"onUpdate:open":
|
|
2014
|
-
onClose:
|
|
1677
|
+
"onUpdate:open": n[0] ||= (e) => c.value = e,
|
|
1678
|
+
onClose: n[1] ||= (e) => c.value = !1
|
|
2015
1679
|
}, {
|
|
2016
1680
|
trigger: M(({ toggle: t }) => [u("button", {
|
|
2017
1681
|
type: "button",
|
|
@@ -2022,8 +1686,8 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2022
1686
|
}, [f(r, {
|
|
2023
1687
|
name: "line_weight",
|
|
2024
1688
|
size: 20
|
|
2025
|
-
})], 8,
|
|
2026
|
-
panel: M(() => [u("div",
|
|
1689
|
+
})], 8, Ut)]),
|
|
1690
|
+
panel: M(() => [u("div", Wt, [(b(), l(a, null, C(d, (e) => u("button", {
|
|
2027
1691
|
key: e.eighths,
|
|
2028
1692
|
type: "button",
|
|
2029
1693
|
class: "docx-tbwidth__option",
|
|
@@ -2031,11 +1695,11 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2031
1695
|
}, [u("span", {
|
|
2032
1696
|
class: "docx-tbwidth__preview",
|
|
2033
1697
|
style: _({ borderTopWidth: e.previewPx + "px" })
|
|
2034
|
-
}, null, 4), u("span",
|
|
1698
|
+
}, null, 4), u("span", Kt, E(e.label), 1)], 8, Gt)), 64))])]),
|
|
2035
1699
|
_: 1
|
|
2036
1700
|
}, 8, ["open"]));
|
|
2037
1701
|
}
|
|
2038
|
-
}), [["__scopeId", "data-v-0aa73d09"]]),
|
|
1702
|
+
}), [["__scopeId", "data-v-0aa73d09"]]), Jt = /* @__PURE__ */ p({
|
|
2039
1703
|
__name: "TableCellFillPicker",
|
|
2040
1704
|
props: {
|
|
2041
1705
|
disabled: { type: Boolean },
|
|
@@ -2043,16 +1707,16 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2043
1707
|
value: {}
|
|
2044
1708
|
},
|
|
2045
1709
|
emits: ["change"],
|
|
2046
|
-
setup(
|
|
2047
|
-
let
|
|
1710
|
+
setup(t, { emit: n }) {
|
|
1711
|
+
let r = n, { t: a } = e();
|
|
2048
1712
|
function o(e) {
|
|
2049
|
-
typeof e == "string" &&
|
|
1713
|
+
typeof e == "string" && r("change", e === "none" ? "" : e.replace(/^#/, ""));
|
|
2050
1714
|
}
|
|
2051
|
-
return (
|
|
1715
|
+
return (e, n) => (b(), s(i, {
|
|
2052
1716
|
mode: "highlight",
|
|
2053
|
-
value:
|
|
2054
|
-
theme:
|
|
2055
|
-
disabled:
|
|
1717
|
+
value: t.value,
|
|
1718
|
+
theme: t.theme ?? null,
|
|
1719
|
+
disabled: t.disabled,
|
|
2056
1720
|
title: O(a)("table.cellFillColor"),
|
|
2057
1721
|
icon: "format_color_fill",
|
|
2058
1722
|
"auto-label": O(a)("colorPicker.noColor"),
|
|
@@ -2065,23 +1729,23 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2065
1729
|
"auto-label"
|
|
2066
1730
|
]));
|
|
2067
1731
|
}
|
|
2068
|
-
}),
|
|
1732
|
+
}), Yt = [
|
|
2069
1733
|
"disabled",
|
|
2070
1734
|
"title",
|
|
2071
1735
|
"onClick"
|
|
2072
|
-
],
|
|
1736
|
+
], Xt = ["aria-label"], Zt = ["disabled"], Qt = ["disabled"], $t = ["disabled"], en = ["disabled"], tn = { class: "docx-tmore__section-label" }, nn = { class: "docx-tmore__icon-row" }, rn = ["title"], an = ["title"], on = ["title"], sn = { class: "docx-tmore__section-label" }, cn = { class: "docx-tmore__icon-row" }, ln = ["title"], un = ["title"], dn = ["title"], fn = { class: "docx-tmore__grow" }, pn = {
|
|
2073
1737
|
key: 0,
|
|
2074
1738
|
class: "docx-tmore__sub"
|
|
2075
|
-
},
|
|
1739
|
+
}, mn = { class: "docx-tmore__margin-grid" }, hn = { class: "docx-tmore__field-label" }, gn = ["onUpdate:modelValue"], _n = { class: "docx-tmore__grow" }, vn = {
|
|
2076
1740
|
key: 1,
|
|
2077
1741
|
class: "docx-tmore__sub"
|
|
2078
|
-
},
|
|
1742
|
+
}, yn = { class: "docx-tmore__row-field" }, bn = { class: "docx-tmore__field-label" }, xn = { value: "auto" }, Sn = { value: "atLeast" }, Cn = { value: "exact" }, wn = {
|
|
2079
1743
|
key: 0,
|
|
2080
1744
|
class: "docx-tmore__row-field"
|
|
2081
|
-
},
|
|
1745
|
+
}, Tn = { class: "docx-tmore__field-label" }, En = { class: "docx-tmore__grow" }, Dn = {
|
|
2082
1746
|
key: 2,
|
|
2083
1747
|
class: "docx-tmore__sub docx-tmore__sub--list"
|
|
2084
|
-
},
|
|
1748
|
+
}, On = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
2085
1749
|
__name: "TableMoreDropdown",
|
|
2086
1750
|
props: {
|
|
2087
1751
|
disabled: {
|
|
@@ -2106,8 +1770,8 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2106
1770
|
"cell-text-direction",
|
|
2107
1771
|
"row-height"
|
|
2108
1772
|
],
|
|
2109
|
-
setup(
|
|
2110
|
-
let { Popover: o } =
|
|
1773
|
+
setup(n, { emit: i }) {
|
|
1774
|
+
let { Popover: o } = t(), d = n, p = i, { t: m } = e(), h = S(!1), _ = S(!1), v = S(!1), y = S(!1), w = x({
|
|
2111
1775
|
top: 0,
|
|
2112
1776
|
bottom: 0,
|
|
2113
1777
|
left: 108,
|
|
@@ -2144,22 +1808,22 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2144
1808
|
function z(e) {
|
|
2145
1809
|
p("cell-text-direction", e), h.value = !1;
|
|
2146
1810
|
}
|
|
2147
|
-
return (
|
|
1811
|
+
return (e, t) => (b(), s(O(o), {
|
|
2148
1812
|
open: h.value,
|
|
2149
1813
|
placement: "bottom-right",
|
|
2150
|
-
"onUpdate:open":
|
|
2151
|
-
onClose:
|
|
1814
|
+
"onUpdate:open": t[35] ||= (e) => h.value = e,
|
|
1815
|
+
onClose: t[36] ||= (e) => h.value = !1
|
|
2152
1816
|
}, {
|
|
2153
|
-
trigger: M(({ toggle:
|
|
1817
|
+
trigger: M(({ toggle: e }) => [u("button", {
|
|
2154
1818
|
type: "button",
|
|
2155
1819
|
class: g(["docx-tmore__btn", { "docx-tmore__btn--open": h.value }]),
|
|
2156
|
-
disabled:
|
|
1820
|
+
disabled: n.disabled,
|
|
2157
1821
|
title: O(m)("tableAdvanced.tableOptions"),
|
|
2158
|
-
onClick: F(
|
|
1822
|
+
onClick: F(e, ["prevent"])
|
|
2159
1823
|
}, [f(r, {
|
|
2160
1824
|
name: "more_vert",
|
|
2161
1825
|
size: 20
|
|
2162
|
-
})], 10,
|
|
1826
|
+
})], 10, Yt)]),
|
|
2163
1827
|
panel: M(() => [u("div", {
|
|
2164
1828
|
class: "docx-tmore__panel",
|
|
2165
1829
|
role: "menu",
|
|
@@ -2168,7 +1832,7 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2168
1832
|
u("button", {
|
|
2169
1833
|
type: "button",
|
|
2170
1834
|
class: "docx-tmore__item",
|
|
2171
|
-
onClick:
|
|
1835
|
+
onClick: t[0] ||= F((e) => I("addRowAbove"), ["prevent"])
|
|
2172
1836
|
}, [f(r, {
|
|
2173
1837
|
name: "add",
|
|
2174
1838
|
size: 18
|
|
@@ -2176,7 +1840,7 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2176
1840
|
u("button", {
|
|
2177
1841
|
type: "button",
|
|
2178
1842
|
class: "docx-tmore__item",
|
|
2179
|
-
onClick:
|
|
1843
|
+
onClick: t[1] ||= F((e) => I("addRowBelow"), ["prevent"])
|
|
2180
1844
|
}, [f(r, {
|
|
2181
1845
|
name: "add",
|
|
2182
1846
|
size: 18
|
|
@@ -2184,7 +1848,7 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2184
1848
|
u("button", {
|
|
2185
1849
|
type: "button",
|
|
2186
1850
|
class: "docx-tmore__item",
|
|
2187
|
-
onClick:
|
|
1851
|
+
onClick: t[2] ||= F((e) => I("addColumnLeft"), ["prevent"])
|
|
2188
1852
|
}, [f(r, {
|
|
2189
1853
|
name: "add",
|
|
2190
1854
|
size: 18
|
|
@@ -2192,151 +1856,151 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2192
1856
|
u("button", {
|
|
2193
1857
|
type: "button",
|
|
2194
1858
|
class: "docx-tmore__item",
|
|
2195
|
-
onClick:
|
|
1859
|
+
onClick: t[3] ||= F((e) => I("addColumnRight"), ["prevent"])
|
|
2196
1860
|
}, [f(r, {
|
|
2197
1861
|
name: "add",
|
|
2198
1862
|
size: 18
|
|
2199
1863
|
}), u("span", null, E(O(m)("insertColumnRight")), 1)]),
|
|
2200
|
-
|
|
1864
|
+
t[39] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2201
1865
|
u("button", {
|
|
2202
1866
|
type: "button",
|
|
2203
1867
|
class: "docx-tmore__item",
|
|
2204
1868
|
disabled: P("mergeCells"),
|
|
2205
|
-
onClick:
|
|
1869
|
+
onClick: t[4] ||= F((e) => I("mergeCells"), ["prevent"])
|
|
2206
1870
|
}, [f(r, {
|
|
2207
1871
|
name: "call_merge",
|
|
2208
1872
|
size: 18
|
|
2209
|
-
}), u("span", null, E(O(m)("table.mergeCells")), 1)], 8,
|
|
1873
|
+
}), u("span", null, E(O(m)("table.mergeCells")), 1)], 8, Zt),
|
|
2210
1874
|
u("button", {
|
|
2211
1875
|
type: "button",
|
|
2212
1876
|
class: "docx-tmore__item",
|
|
2213
1877
|
disabled: P("splitCell"),
|
|
2214
|
-
onClick:
|
|
1878
|
+
onClick: t[5] ||= F((e) => I("splitCell"), ["prevent"])
|
|
2215
1879
|
}, [f(r, {
|
|
2216
1880
|
name: "call_split",
|
|
2217
1881
|
size: 18
|
|
2218
|
-
}), u("span", null, E(O(m)("table.splitCell")), 1)], 8,
|
|
2219
|
-
|
|
1882
|
+
}), u("span", null, E(O(m)("table.splitCell")), 1)], 8, Qt),
|
|
1883
|
+
t[40] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2220
1884
|
u("button", {
|
|
2221
1885
|
type: "button",
|
|
2222
1886
|
class: "docx-tmore__item",
|
|
2223
|
-
onClick:
|
|
1887
|
+
onClick: t[6] ||= F((e) => I("selectTable"), ["prevent"])
|
|
2224
1888
|
}, [f(r, {
|
|
2225
1889
|
name: "select_all",
|
|
2226
1890
|
size: 18
|
|
2227
1891
|
}), u("span", null, E(O(m)("table.selectTable")), 1)]),
|
|
2228
|
-
|
|
1892
|
+
t[41] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2229
1893
|
u("button", {
|
|
2230
1894
|
type: "button",
|
|
2231
1895
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
2232
1896
|
disabled: P("deleteRow"),
|
|
2233
|
-
onClick:
|
|
1897
|
+
onClick: t[7] ||= F((e) => I("deleteRow"), ["prevent"])
|
|
2234
1898
|
}, [f(r, {
|
|
2235
1899
|
name: "delete",
|
|
2236
1900
|
size: 18
|
|
2237
|
-
}), u("span", null, E(O(m)("deleteRow")), 1)], 8,
|
|
1901
|
+
}), u("span", null, E(O(m)("deleteRow")), 1)], 8, $t),
|
|
2238
1902
|
u("button", {
|
|
2239
1903
|
type: "button",
|
|
2240
1904
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
2241
1905
|
disabled: P("deleteColumn"),
|
|
2242
|
-
onClick:
|
|
1906
|
+
onClick: t[8] ||= F((e) => I("deleteColumn"), ["prevent"])
|
|
2243
1907
|
}, [f(r, {
|
|
2244
1908
|
name: "delete",
|
|
2245
1909
|
size: 18
|
|
2246
|
-
}), u("span", null, E(O(m)("deleteColumn")), 1)], 8,
|
|
1910
|
+
}), u("span", null, E(O(m)("deleteColumn")), 1)], 8, en),
|
|
2247
1911
|
u("button", {
|
|
2248
1912
|
type: "button",
|
|
2249
1913
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
2250
|
-
onClick:
|
|
1914
|
+
onClick: t[9] ||= F((e) => I("deleteTable"), ["prevent"])
|
|
2251
1915
|
}, [f(r, {
|
|
2252
1916
|
name: "delete",
|
|
2253
1917
|
size: 18
|
|
2254
1918
|
}), u("span", null, E(O(m)("table.deleteTable")), 1)]),
|
|
2255
|
-
|
|
2256
|
-
u("div",
|
|
2257
|
-
u("div",
|
|
1919
|
+
t[42] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
1920
|
+
u("div", tn, E(O(m)("tableAdvanced.verticalAlignment")), 1),
|
|
1921
|
+
u("div", nn, [
|
|
2258
1922
|
u("button", {
|
|
2259
1923
|
type: "button",
|
|
2260
1924
|
class: "docx-tmore__icon-btn",
|
|
2261
1925
|
title: O(m)("tableAdvanced.top"),
|
|
2262
|
-
onMousedown:
|
|
2263
|
-
onClick:
|
|
1926
|
+
onMousedown: t[10] ||= F(() => {}, ["prevent"]),
|
|
1927
|
+
onClick: t[11] ||= F((e) => I("verticalAlignTop"), ["prevent"])
|
|
2264
1928
|
}, [f(r, {
|
|
2265
1929
|
name: "vertical_align_top",
|
|
2266
1930
|
size: 16
|
|
2267
|
-
})], 40,
|
|
1931
|
+
})], 40, rn),
|
|
2268
1932
|
u("button", {
|
|
2269
1933
|
type: "button",
|
|
2270
1934
|
class: "docx-tmore__icon-btn",
|
|
2271
1935
|
title: O(m)("tableAdvanced.middle"),
|
|
2272
|
-
onMousedown:
|
|
2273
|
-
onClick:
|
|
1936
|
+
onMousedown: t[12] ||= F(() => {}, ["prevent"]),
|
|
1937
|
+
onClick: t[13] ||= F((e) => I("verticalAlignMiddle"), ["prevent"])
|
|
2274
1938
|
}, [f(r, {
|
|
2275
1939
|
name: "vertical_align_center",
|
|
2276
1940
|
size: 16
|
|
2277
|
-
})], 40,
|
|
1941
|
+
})], 40, an),
|
|
2278
1942
|
u("button", {
|
|
2279
1943
|
type: "button",
|
|
2280
1944
|
class: "docx-tmore__icon-btn",
|
|
2281
1945
|
title: O(m)("tableAdvanced.bottom"),
|
|
2282
|
-
onMousedown:
|
|
2283
|
-
onClick:
|
|
1946
|
+
onMousedown: t[14] ||= F(() => {}, ["prevent"]),
|
|
1947
|
+
onClick: t[15] ||= F((e) => I("verticalAlignBottom"), ["prevent"])
|
|
2284
1948
|
}, [f(r, {
|
|
2285
1949
|
name: "vertical_align_bottom",
|
|
2286
1950
|
size: 16
|
|
2287
|
-
})], 40,
|
|
1951
|
+
})], 40, on)
|
|
2288
1952
|
]),
|
|
2289
|
-
|
|
2290
|
-
u("div",
|
|
2291
|
-
u("div",
|
|
1953
|
+
t[43] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
1954
|
+
u("div", sn, E(O(m)("tableAdvanced.tableAlignment")), 1),
|
|
1955
|
+
u("div", cn, [
|
|
2292
1956
|
u("button", {
|
|
2293
1957
|
type: "button",
|
|
2294
|
-
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active":
|
|
1958
|
+
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "left" }]),
|
|
2295
1959
|
title: O(m)("tableAdvanced.alignTableLeft"),
|
|
2296
|
-
onMousedown:
|
|
2297
|
-
onClick:
|
|
1960
|
+
onMousedown: t[16] ||= F(() => {}, ["prevent"]),
|
|
1961
|
+
onClick: t[17] ||= F((e) => I("alignTableLeft"), ["prevent"])
|
|
2298
1962
|
}, [f(r, {
|
|
2299
1963
|
name: "format_align_left",
|
|
2300
1964
|
size: 16
|
|
2301
|
-
})], 42,
|
|
1965
|
+
})], 42, ln),
|
|
2302
1966
|
u("button", {
|
|
2303
1967
|
type: "button",
|
|
2304
|
-
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active":
|
|
1968
|
+
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "center" }]),
|
|
2305
1969
|
title: O(m)("tableAdvanced.alignTableCenter"),
|
|
2306
|
-
onMousedown:
|
|
2307
|
-
onClick:
|
|
1970
|
+
onMousedown: t[18] ||= F(() => {}, ["prevent"]),
|
|
1971
|
+
onClick: t[19] ||= F((e) => I("alignTableCenter"), ["prevent"])
|
|
2308
1972
|
}, [f(r, {
|
|
2309
1973
|
name: "format_align_center",
|
|
2310
1974
|
size: 16
|
|
2311
|
-
})], 42,
|
|
1975
|
+
})], 42, un),
|
|
2312
1976
|
u("button", {
|
|
2313
1977
|
type: "button",
|
|
2314
|
-
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active":
|
|
1978
|
+
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "right" }]),
|
|
2315
1979
|
title: O(m)("tableAdvanced.alignTableRight"),
|
|
2316
|
-
onMousedown:
|
|
2317
|
-
onClick:
|
|
1980
|
+
onMousedown: t[20] ||= F(() => {}, ["prevent"]),
|
|
1981
|
+
onClick: t[21] ||= F((e) => I("alignTableRight"), ["prevent"])
|
|
2318
1982
|
}, [f(r, {
|
|
2319
1983
|
name: "format_align_right",
|
|
2320
1984
|
size: 16
|
|
2321
|
-
})], 42,
|
|
1985
|
+
})], 42, dn)
|
|
2322
1986
|
]),
|
|
2323
|
-
|
|
1987
|
+
t[44] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2324
1988
|
u("button", {
|
|
2325
1989
|
type: "button",
|
|
2326
1990
|
class: "docx-tmore__item",
|
|
2327
|
-
onClick:
|
|
1991
|
+
onClick: t[22] ||= F((e) => _.value = !_.value, ["prevent"])
|
|
2328
1992
|
}, [
|
|
2329
1993
|
f(r, {
|
|
2330
1994
|
name: "padding",
|
|
2331
1995
|
size: 18
|
|
2332
1996
|
}),
|
|
2333
|
-
u("span",
|
|
1997
|
+
u("span", fn, E(O(m)("tableAdvanced.cellMargins")), 1),
|
|
2334
1998
|
f(r, {
|
|
2335
1999
|
name: _.value ? "expand_less" : "expand_more",
|
|
2336
2000
|
size: 18
|
|
2337
2001
|
}, null, 8, ["name"])
|
|
2338
2002
|
]),
|
|
2339
|
-
_.value ? (b(), l("div",
|
|
2003
|
+
_.value ? (b(), l("div", pn, [u("div", mn, [(b(), l(a, null, C([
|
|
2340
2004
|
"top",
|
|
2341
2005
|
"bottom",
|
|
2342
2006
|
"left",
|
|
@@ -2345,20 +2009,20 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2345
2009
|
key: e,
|
|
2346
2010
|
class: "docx-tmore__field"
|
|
2347
2011
|
}, [
|
|
2348
|
-
u("span",
|
|
2012
|
+
u("span", hn, E(e), 1),
|
|
2349
2013
|
N(u("input", {
|
|
2350
2014
|
type: "number",
|
|
2351
2015
|
min: "0",
|
|
2352
2016
|
step: "20",
|
|
2353
2017
|
"onUpdate:modelValue": (t) => w[e] = t,
|
|
2354
2018
|
class: "docx-tmore__input"
|
|
2355
|
-
}, null, 8,
|
|
2019
|
+
}, null, 8, gn), [[
|
|
2356
2020
|
A,
|
|
2357
2021
|
w[e],
|
|
2358
2022
|
void 0,
|
|
2359
2023
|
{ number: !0 }
|
|
2360
2024
|
]]),
|
|
2361
|
-
|
|
2025
|
+
t[37] ||= u("span", { class: "docx-tmore__unit" }, "tw", -1)
|
|
2362
2026
|
])), 64))]), u("button", {
|
|
2363
2027
|
type: "button",
|
|
2364
2028
|
class: "docx-tmore__apply",
|
|
@@ -2367,34 +2031,34 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2367
2031
|
u("button", {
|
|
2368
2032
|
type: "button",
|
|
2369
2033
|
class: "docx-tmore__item",
|
|
2370
|
-
onClick:
|
|
2034
|
+
onClick: t[23] ||= F((e) => v.value = !v.value, ["prevent"])
|
|
2371
2035
|
}, [
|
|
2372
2036
|
f(r, {
|
|
2373
2037
|
name: "height",
|
|
2374
2038
|
size: 18
|
|
2375
2039
|
}),
|
|
2376
|
-
u("span",
|
|
2040
|
+
u("span", _n, E(O(m)("tableAdvanced.rowHeight")), 1),
|
|
2377
2041
|
f(r, {
|
|
2378
2042
|
name: v.value ? "expand_less" : "expand_more",
|
|
2379
2043
|
size: 18
|
|
2380
2044
|
}, null, 8, ["name"])
|
|
2381
2045
|
]),
|
|
2382
|
-
v.value ? (b(), l("div",
|
|
2383
|
-
u("label",
|
|
2384
|
-
"onUpdate:modelValue":
|
|
2046
|
+
v.value ? (b(), l("div", vn, [
|
|
2047
|
+
u("label", yn, [u("span", bn, E(O(m)("tableAdvanced.rule")), 1), N(u("select", {
|
|
2048
|
+
"onUpdate:modelValue": t[24] ||= (e) => D.value = e,
|
|
2385
2049
|
class: "docx-tmore__select"
|
|
2386
2050
|
}, [
|
|
2387
|
-
u("option",
|
|
2388
|
-
u("option",
|
|
2389
|
-
u("option",
|
|
2051
|
+
u("option", xn, E(O(m)("tableAdvanced.heightRules.auto")), 1),
|
|
2052
|
+
u("option", Sn, E(O(m)("tableAdvanced.heightRules.atLeast")), 1),
|
|
2053
|
+
u("option", Cn, E(O(m)("tableAdvanced.heightRules.exact")), 1)
|
|
2390
2054
|
], 512), [[k, D.value]])]),
|
|
2391
|
-
D.value === "auto" ? c("", !0) : (b(), l("label",
|
|
2392
|
-
u("span",
|
|
2055
|
+
D.value === "auto" ? c("", !0) : (b(), l("label", wn, [
|
|
2056
|
+
u("span", Tn, E(O(m)("tableAdvanced.height")), 1),
|
|
2393
2057
|
N(u("input", {
|
|
2394
2058
|
type: "number",
|
|
2395
2059
|
min: "0",
|
|
2396
2060
|
step: "20",
|
|
2397
|
-
"onUpdate:modelValue":
|
|
2061
|
+
"onUpdate:modelValue": t[25] ||= (e) => T.value = e,
|
|
2398
2062
|
class: "docx-tmore__input"
|
|
2399
2063
|
}, null, 512), [[
|
|
2400
2064
|
A,
|
|
@@ -2402,7 +2066,7 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2402
2066
|
void 0,
|
|
2403
2067
|
{ number: !0 }
|
|
2404
2068
|
]]),
|
|
2405
|
-
|
|
2069
|
+
t[38] ||= u("span", { class: "docx-tmore__unit" }, "tw", -1)
|
|
2406
2070
|
])),
|
|
2407
2071
|
u("button", {
|
|
2408
2072
|
type: "button",
|
|
@@ -2413,40 +2077,40 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2413
2077
|
u("button", {
|
|
2414
2078
|
type: "button",
|
|
2415
2079
|
class: "docx-tmore__item",
|
|
2416
|
-
onClick:
|
|
2080
|
+
onClick: t[26] ||= F((e) => y.value = !y.value, ["prevent"])
|
|
2417
2081
|
}, [
|
|
2418
2082
|
f(r, {
|
|
2419
2083
|
name: "text_rotation_none",
|
|
2420
2084
|
size: 18
|
|
2421
2085
|
}),
|
|
2422
|
-
u("span",
|
|
2086
|
+
u("span", En, E(O(m)("textDirection")), 1),
|
|
2423
2087
|
f(r, {
|
|
2424
2088
|
name: y.value ? "expand_less" : "expand_more",
|
|
2425
2089
|
size: 18
|
|
2426
2090
|
}, null, 8, ["name"])
|
|
2427
2091
|
]),
|
|
2428
|
-
y.value ? (b(), l("div",
|
|
2092
|
+
y.value ? (b(), l("div", Dn, [
|
|
2429
2093
|
u("button", {
|
|
2430
2094
|
type: "button",
|
|
2431
2095
|
class: "docx-tmore__sub-item",
|
|
2432
|
-
onClick:
|
|
2096
|
+
onClick: t[27] ||= F((e) => z(null), ["prevent"])
|
|
2433
2097
|
}, E(O(m)("tableAdvanced.textDirections.horizontal")), 1),
|
|
2434
2098
|
u("button", {
|
|
2435
2099
|
type: "button",
|
|
2436
2100
|
class: "docx-tmore__sub-item",
|
|
2437
|
-
onClick:
|
|
2101
|
+
onClick: t[28] ||= F((e) => z("tbRl"), ["prevent"])
|
|
2438
2102
|
}, E(O(m)("tableAdvanced.textDirections.verticalRL")), 1),
|
|
2439
2103
|
u("button", {
|
|
2440
2104
|
type: "button",
|
|
2441
2105
|
class: "docx-tmore__sub-item",
|
|
2442
|
-
onClick:
|
|
2106
|
+
onClick: t[29] ||= F((e) => z("btLr"), ["prevent"])
|
|
2443
2107
|
}, E(O(m)("tableAdvanced.textDirections.verticalLR")), 1)
|
|
2444
2108
|
])) : c("", !0),
|
|
2445
|
-
|
|
2109
|
+
t[45] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2446
2110
|
u("button", {
|
|
2447
2111
|
type: "button",
|
|
2448
2112
|
class: "docx-tmore__item",
|
|
2449
|
-
onClick:
|
|
2113
|
+
onClick: t[30] ||= F((e) => I("toggleHeaderRow"), ["prevent"])
|
|
2450
2114
|
}, [f(r, {
|
|
2451
2115
|
name: "table_rows",
|
|
2452
2116
|
size: 18
|
|
@@ -2454,7 +2118,7 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2454
2118
|
u("button", {
|
|
2455
2119
|
type: "button",
|
|
2456
2120
|
class: "docx-tmore__item",
|
|
2457
|
-
onClick:
|
|
2121
|
+
onClick: t[31] ||= F((e) => I("distributeColumns"), ["prevent"])
|
|
2458
2122
|
}, [f(r, {
|
|
2459
2123
|
name: "view_column",
|
|
2460
2124
|
size: 18
|
|
@@ -2462,7 +2126,7 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2462
2126
|
u("button", {
|
|
2463
2127
|
type: "button",
|
|
2464
2128
|
class: "docx-tmore__item",
|
|
2465
|
-
onClick:
|
|
2129
|
+
onClick: t[32] ||= F((e) => I("autoFit"), ["prevent"])
|
|
2466
2130
|
}, [f(r, {
|
|
2467
2131
|
name: "fit_width",
|
|
2468
2132
|
size: 18
|
|
@@ -2470,25 +2134,25 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2470
2134
|
u("button", {
|
|
2471
2135
|
type: "button",
|
|
2472
2136
|
class: "docx-tmore__item",
|
|
2473
|
-
onClick:
|
|
2137
|
+
onClick: t[33] ||= F((e) => I("toggleNoWrap"), ["prevent"])
|
|
2474
2138
|
}, [f(r, {
|
|
2475
2139
|
name: "wrap_text",
|
|
2476
2140
|
size: 18
|
|
2477
2141
|
}), u("span", null, E(O(m)("tableAdvanced.toggleNoWrap")), 1)]),
|
|
2478
|
-
|
|
2142
|
+
t[46] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2479
2143
|
u("button", {
|
|
2480
2144
|
type: "button",
|
|
2481
2145
|
class: "docx-tmore__item",
|
|
2482
|
-
onClick:
|
|
2146
|
+
onClick: t[34] ||= F((e) => I("tableProperties"), ["prevent"])
|
|
2483
2147
|
}, [f(r, {
|
|
2484
2148
|
name: "settings",
|
|
2485
2149
|
size: 18
|
|
2486
2150
|
}), u("span", null, E(O(m)("tableAdvanced.tableProperties")), 1)])
|
|
2487
|
-
], 8,
|
|
2151
|
+
], 8, Xt)]),
|
|
2488
2152
|
_: 1
|
|
2489
2153
|
}, 8, ["open"]));
|
|
2490
2154
|
}
|
|
2491
|
-
}), [["__scopeId", "data-v-af08ecc9"]]),
|
|
2155
|
+
}), [["__scopeId", "data-v-af08ecc9"]]), kn = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
2492
2156
|
__name: "TableToolbar",
|
|
2493
2157
|
props: {
|
|
2494
2158
|
view: {},
|
|
@@ -2617,14 +2281,14 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2617
2281
|
onRowHeight: N
|
|
2618
2282
|
}), (t, n) => d.value ? (b(), l(a, { key: 0 }, [
|
|
2619
2283
|
n[0] ||= u("span", { class: "divider" }, null, -1),
|
|
2620
|
-
f(
|
|
2621
|
-
f(
|
|
2622
|
-
f(
|
|
2623
|
-
f(
|
|
2284
|
+
f(Ht, { onChange: w }),
|
|
2285
|
+
f(Rt, m({ theme: e.theme ?? null }, g.value, { onChange: T }), null, 16, ["theme"]),
|
|
2286
|
+
f(qt, { onChange: E }),
|
|
2287
|
+
f(Jt, {
|
|
2624
2288
|
theme: e.theme ?? null,
|
|
2625
2289
|
onChange: D
|
|
2626
2290
|
}, null, 8, ["theme"]),
|
|
2627
|
-
f(
|
|
2291
|
+
f(On, {
|
|
2628
2292
|
"can-split": p.value,
|
|
2629
2293
|
"can-merge": _.value,
|
|
2630
2294
|
"row-count": v.value,
|
|
@@ -2643,180 +2307,9 @@ var Fe = ["title", "onClick"], Ie = {
|
|
|
2643
2307
|
])
|
|
2644
2308
|
], 64)) : c("", !0);
|
|
2645
2309
|
}
|
|
2646
|
-
}), [["__scopeId", "data-v-bf9947ff"]])
|
|
2647
|
-
__name: "VerticalRuler",
|
|
2648
|
-
props: {
|
|
2649
|
-
sectionProps: {},
|
|
2650
|
-
zoom: { default: 1 },
|
|
2651
|
-
editable: {
|
|
2652
|
-
type: Boolean,
|
|
2653
|
-
default: !0
|
|
2654
|
-
},
|
|
2655
|
-
unit: { default: "inch" }
|
|
2656
|
-
},
|
|
2657
|
-
emits: ["top-margin-change", "bottom-margin-change"],
|
|
2658
|
-
setup(e, { emit: t }) {
|
|
2659
|
-
let r = e, { t: i } = n(), s = t, d = S(null), f = S(null);
|
|
2660
|
-
function p(e) {
|
|
2661
|
-
return K(e) * r.zoom;
|
|
2662
|
-
}
|
|
2663
|
-
function h(e) {
|
|
2664
|
-
return Math.round(re(e / r.zoom));
|
|
2665
|
-
}
|
|
2666
|
-
let g = o(() => r.sectionProps?.pageHeight ?? nr), y = o(() => r.sectionProps?.marginTop ?? rr), x = o(() => r.sectionProps?.marginBottom ?? rr), w = o(() => p(g.value)), T = o(() => p(y.value)), D = o(() => p(x.value)), k = o(() => ({
|
|
2667
|
-
position: "relative",
|
|
2668
|
-
width: "20px",
|
|
2669
|
-
height: w.value + "px",
|
|
2670
|
-
backgroundColor: "transparent",
|
|
2671
|
-
overflow: "visible",
|
|
2672
|
-
userSelect: "none",
|
|
2673
|
-
cursor: d.value ? "ns-resize" : "default"
|
|
2674
|
-
})), A = o(() => Z({
|
|
2675
|
-
pageHeight: g.value,
|
|
2676
|
-
topMargin: y.value,
|
|
2677
|
-
bottomMargin: x.value
|
|
2678
|
-
})), j = o(() => ({
|
|
2679
|
-
topMargin: X({
|
|
2680
|
-
value: y.value,
|
|
2681
|
-
...A.value.topMargin,
|
|
2682
|
-
unit: r.unit,
|
|
2683
|
-
onChange: r.editable ? (e) => s("top-margin-change", e) : void 0
|
|
2684
|
-
}),
|
|
2685
|
-
bottomMargin: X({
|
|
2686
|
-
value: x.value,
|
|
2687
|
-
...A.value.bottomMargin,
|
|
2688
|
-
unit: r.unit,
|
|
2689
|
-
onChange: r.editable ? (e) => s("bottom-margin-change", e) : void 0
|
|
2690
|
-
})
|
|
2691
|
-
})), M = o(() => {
|
|
2692
|
-
let e = [];
|
|
2693
|
-
if (r.unit === "inch") {
|
|
2694
|
-
let t = ir / 8, n = Math.ceil(g.value / t);
|
|
2695
|
-
for (let r = 0; r <= n; r++) {
|
|
2696
|
-
let n = r * t;
|
|
2697
|
-
if (n > g.value) break;
|
|
2698
|
-
let i = p(n);
|
|
2699
|
-
r % 8 == 0 ? e.push({
|
|
2700
|
-
position: i,
|
|
2701
|
-
width: 10,
|
|
2702
|
-
label: r / 8 > 0 ? String(r / 8) : void 0
|
|
2703
|
-
}) : r % 4 == 0 ? e.push({
|
|
2704
|
-
position: i,
|
|
2705
|
-
width: 6
|
|
2706
|
-
}) : r % 2 == 0 ? e.push({
|
|
2707
|
-
position: i,
|
|
2708
|
-
width: 4
|
|
2709
|
-
}) : e.push({
|
|
2710
|
-
position: i,
|
|
2711
|
-
width: 2
|
|
2712
|
-
});
|
|
2713
|
-
}
|
|
2714
|
-
} else {
|
|
2715
|
-
let t = ar / 10, n = Math.ceil(g.value / t);
|
|
2716
|
-
for (let r = 0; r <= n; r++) {
|
|
2717
|
-
let n = r * t;
|
|
2718
|
-
if (n > g.value) break;
|
|
2719
|
-
let i = p(n);
|
|
2720
|
-
r % 10 == 0 ? e.push({
|
|
2721
|
-
position: i,
|
|
2722
|
-
width: 10,
|
|
2723
|
-
label: r / 10 > 0 ? String(r / 10) : void 0
|
|
2724
|
-
}) : r % 5 == 0 ? e.push({
|
|
2725
|
-
position: i,
|
|
2726
|
-
width: 6
|
|
2727
|
-
}) : e.push({
|
|
2728
|
-
position: i,
|
|
2729
|
-
width: 3
|
|
2730
|
-
});
|
|
2731
|
-
}
|
|
2732
|
-
}
|
|
2733
|
-
return e;
|
|
2734
|
-
});
|
|
2735
|
-
function N(e) {
|
|
2736
|
-
return {
|
|
2737
|
-
position: "absolute",
|
|
2738
|
-
top: e - 5 + "px",
|
|
2739
|
-
right: 0,
|
|
2740
|
-
width: "20px",
|
|
2741
|
-
height: "10px",
|
|
2742
|
-
cursor: r.editable ? "ns-resize" : "default",
|
|
2743
|
-
zIndex: d.value === null ? 1 : 10
|
|
2744
|
-
};
|
|
2745
|
-
}
|
|
2746
|
-
function P(e) {
|
|
2747
|
-
let t = d.value === e, n = f.value === e, r = "var(--doc-primary)";
|
|
2748
|
-
return t ? r = "var(--doc-primary-hover)" : n && (r = "var(--doc-primary)"), {
|
|
2749
|
-
position: "absolute",
|
|
2750
|
-
top: "0px",
|
|
2751
|
-
right: "2px",
|
|
2752
|
-
width: "0",
|
|
2753
|
-
height: "0",
|
|
2754
|
-
borderTop: "5px solid transparent",
|
|
2755
|
-
borderBottom: "5px solid transparent",
|
|
2756
|
-
borderRight: `8px solid ${r}`,
|
|
2757
|
-
transition: "border-right-color 0.1s"
|
|
2758
|
-
};
|
|
2759
|
-
}
|
|
2760
|
-
let I = 0, L = 0;
|
|
2761
|
-
function ee(e, t) {
|
|
2762
|
-
r.editable && (d.value = e, I = t.clientY, L = e === "topMargin" ? y.value : x.value, document.addEventListener("mousemove", R), document.addEventListener("mouseup", z));
|
|
2763
|
-
}
|
|
2764
|
-
function R(e) {
|
|
2765
|
-
if (!d.value) return;
|
|
2766
|
-
let t = e.clientY - I, n = h(d.value === "topMargin" ? t : -t), r = Y(L + n, A.value[d.value]);
|
|
2767
|
-
d.value === "topMargin" ? s("top-margin-change", r) : s("bottom-margin-change", r);
|
|
2768
|
-
}
|
|
2769
|
-
function z() {
|
|
2770
|
-
d.value = null, document.removeEventListener("mousemove", R), document.removeEventListener("mouseup", z);
|
|
2771
|
-
}
|
|
2772
|
-
return v(() => {
|
|
2773
|
-
document.removeEventListener("mousemove", R), document.removeEventListener("mouseup", z);
|
|
2774
|
-
}), (t, n) => (b(), l("div", {
|
|
2775
|
-
class: "docx-vertical-ruler",
|
|
2776
|
-
style: _(k.value),
|
|
2777
|
-
role: "group",
|
|
2778
|
-
"aria-label": O(i)("ruler.vertical")
|
|
2779
|
-
}, [
|
|
2780
|
-
u("div", $n, [(b(!0), l(a, null, C(M.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
|
|
2781
|
-
class: "docx-vertical-ruler__tick-line",
|
|
2782
|
-
style: _({
|
|
2783
|
-
top: e.position + "px",
|
|
2784
|
-
width: e.width + "px"
|
|
2785
|
-
})
|
|
2786
|
-
}, null, 4), e.label ? (b(), l("div", {
|
|
2787
|
-
key: 0,
|
|
2788
|
-
class: "docx-vertical-ruler__tick-label",
|
|
2789
|
-
style: _({ top: e.position + "px" })
|
|
2790
|
-
}, E(e.label), 5)) : c("", !0)], 64))), 128))]),
|
|
2791
|
-
e.editable ? (b(), l("div", m({
|
|
2792
|
-
key: 0,
|
|
2793
|
-
class: "docx-vertical-ruler__marker",
|
|
2794
|
-
style: N(T.value),
|
|
2795
|
-
onMousedown: n[0] ||= F((e) => ee("topMargin", e), ["prevent"]),
|
|
2796
|
-
onMouseenter: n[1] ||= (e) => f.value = "topMargin"
|
|
2797
|
-
}, j.value.topMargin.attributes, {
|
|
2798
|
-
"aria-label": j.value.topMargin.attributes.role ? O(i)("ruler.topMargin") : void 0,
|
|
2799
|
-
"aria-orientation": j.value.topMargin.attributes.role ? "vertical" : void 0,
|
|
2800
|
-
onKeydown: n[2] ||= (...e) => j.value.topMargin.onKeyDown && j.value.topMargin.onKeyDown(...e),
|
|
2801
|
-
onMouseleave: n[3] ||= (e) => f.value = null
|
|
2802
|
-
}), [u("div", { style: _(P("topMargin")) }, null, 4)], 16, er)) : c("", !0),
|
|
2803
|
-
e.editable ? (b(), l("div", m({
|
|
2804
|
-
key: 1,
|
|
2805
|
-
class: "docx-vertical-ruler__marker",
|
|
2806
|
-
style: N(w.value - D.value),
|
|
2807
|
-
onMousedown: n[4] ||= F((e) => ee("bottomMargin", e), ["prevent"]),
|
|
2808
|
-
onMouseenter: n[5] ||= (e) => f.value = "bottomMargin"
|
|
2809
|
-
}, j.value.bottomMargin.attributes, {
|
|
2810
|
-
"aria-label": j.value.bottomMargin.attributes.role ? O(i)("ruler.bottomMargin") : void 0,
|
|
2811
|
-
"aria-orientation": j.value.bottomMargin.attributes.role ? "vertical" : void 0,
|
|
2812
|
-
onKeydown: n[6] ||= (...e) => j.value.bottomMargin.onKeyDown && j.value.bottomMargin.onKeyDown(...e),
|
|
2813
|
-
onMouseleave: n[7] ||= (e) => f.value = null
|
|
2814
|
-
}), [u("div", { style: _(P("bottomMargin")) }, null, 4)], 16, tr)) : c("", !0)
|
|
2815
|
-
], 12, Qn));
|
|
2816
|
-
}
|
|
2817
|
-
}), [["__scopeId", "data-v-95933a7a"]]);
|
|
2310
|
+
}), [["__scopeId", "data-v-bf9947ff"]]);
|
|
2818
2311
|
// src/composables/useCommentSidebarItems.ts
|
|
2819
|
-
function
|
|
2312
|
+
function An({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
|
|
2820
2313
|
return o(() => {
|
|
2821
2314
|
let a = [];
|
|
2822
2315
|
r?.value && i?.value != null && a.push({
|
|
@@ -2858,7 +2351,7 @@ function sr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment:
|
|
|
2858
2351
|
});
|
|
2859
2352
|
}
|
|
2860
2353
|
// src/components/sidebar/AddCommentCard.vue?vue&type=script&setup=true&lang.ts
|
|
2861
|
-
var
|
|
2354
|
+
var jn = ["onKeydown"], Mn = { class: "add-comment-card__actions" }, Nn = ["disabled"], Pn = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
2862
2355
|
__name: "AddCommentCard",
|
|
2863
2356
|
emits: ["submit", "cancel"],
|
|
2864
2357
|
setup(e, { emit: t }) {
|
|
@@ -2887,18 +2380,18 @@ var cr = ["onKeydown"], lr = { class: "add-comment-card__actions" }, ur = ["disa
|
|
|
2887
2380
|
P(F(s, ["exact", "prevent"]), ["enter"]),
|
|
2888
2381
|
P(c, ["esc"])
|
|
2889
2382
|
]
|
|
2890
|
-
}, null, 40,
|
|
2383
|
+
}, null, 40, jn), [[A, r.value]]), u("div", Mn, [u("button", {
|
|
2891
2384
|
class: "add-comment-card__cancel",
|
|
2892
2385
|
onClick: c
|
|
2893
2386
|
}, " Cancel "), u("button", {
|
|
2894
2387
|
class: g(["add-comment-card__submit", { "add-comment-card__submit--active": a.value }]),
|
|
2895
2388
|
disabled: !a.value,
|
|
2896
2389
|
onClick: s
|
|
2897
|
-
}, " Comment ", 10,
|
|
2390
|
+
}, " Comment ", 10, Nn)])], 32));
|
|
2898
2391
|
}
|
|
2899
2392
|
}), [["__scopeId", "data-v-8a5fd620"]]);
|
|
2900
2393
|
// src/utils/comments.ts
|
|
2901
|
-
function
|
|
2394
|
+
function Fn(e) {
|
|
2902
2395
|
return e ? new Date(e).toLocaleString(void 0, {
|
|
2903
2396
|
hour: "numeric",
|
|
2904
2397
|
minute: "2-digit",
|
|
@@ -2906,19 +2399,19 @@ function fr(e) {
|
|
|
2906
2399
|
day: "numeric"
|
|
2907
2400
|
}) : "";
|
|
2908
2401
|
}
|
|
2909
|
-
function
|
|
2910
|
-
let t = e.split(/\s+/).map((e) =>
|
|
2402
|
+
function In(e) {
|
|
2403
|
+
let t = e.split(/\s+/).map((e) => H({
|
|
2911
2404
|
text: e,
|
|
2912
2405
|
units: "graphemes",
|
|
2913
2406
|
end: 1
|
|
2914
2407
|
})).join("").toUpperCase();
|
|
2915
|
-
return
|
|
2408
|
+
return H({
|
|
2916
2409
|
text: t,
|
|
2917
2410
|
units: "graphemes",
|
|
2918
2411
|
end: 2
|
|
2919
2412
|
});
|
|
2920
2413
|
}
|
|
2921
|
-
var
|
|
2414
|
+
var Ln = [
|
|
2922
2415
|
"#6DCCB1",
|
|
2923
2416
|
"#79AAD9",
|
|
2924
2417
|
"#EE789D",
|
|
@@ -2932,31 +2425,31 @@ var mr = [
|
|
|
2932
2425
|
"#E15759",
|
|
2933
2426
|
"#76B7B2"
|
|
2934
2427
|
];
|
|
2935
|
-
function
|
|
2428
|
+
function Rn(e) {
|
|
2936
2429
|
let t = 0;
|
|
2937
2430
|
for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
|
|
2938
|
-
return
|
|
2431
|
+
return Ln[Math.abs(t) % Ln.length] ?? "#888888";
|
|
2939
2432
|
}
|
|
2940
|
-
function
|
|
2941
|
-
return e.length > t ?
|
|
2433
|
+
function $(e, t = 50) {
|
|
2434
|
+
return e.length > t ? H({
|
|
2942
2435
|
text: e,
|
|
2943
2436
|
units: "codeUnits",
|
|
2944
2437
|
end: t
|
|
2945
2438
|
}) + "..." : e;
|
|
2946
2439
|
}
|
|
2947
2440
|
// src/components/sidebar/Avatar.vue
|
|
2948
|
-
var
|
|
2441
|
+
var zn = /* @__PURE__ */ p({
|
|
2949
2442
|
__name: "Avatar",
|
|
2950
2443
|
props: {
|
|
2951
2444
|
name: { default: "U" },
|
|
2952
2445
|
size: { default: 32 }
|
|
2953
2446
|
},
|
|
2954
2447
|
setup(e) {
|
|
2955
|
-
let t = e, n = o(() =>
|
|
2448
|
+
let t = e, n = o(() => In(t.name || "U")), r = o(() => ({
|
|
2956
2449
|
width: t.size + "px",
|
|
2957
2450
|
height: t.size + "px",
|
|
2958
2451
|
borderRadius: "50%",
|
|
2959
|
-
backgroundColor:
|
|
2452
|
+
backgroundColor: Rn(t.name || "U"),
|
|
2960
2453
|
color: "#fff",
|
|
2961
2454
|
display: "flex",
|
|
2962
2455
|
alignItems: "center",
|
|
@@ -2970,7 +2463,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
2970
2463
|
style: _(r.value)
|
|
2971
2464
|
}, E(n.value), 5));
|
|
2972
2465
|
}
|
|
2973
|
-
}),
|
|
2466
|
+
}), Bn = ["onKeydown"], Vn = { class: "reply-input__actions" }, Hn = ["disabled"], Un = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
2974
2467
|
__name: "ReplyInput",
|
|
2975
2468
|
emits: ["submit"],
|
|
2976
2469
|
setup(e, { emit: t }) {
|
|
@@ -3002,14 +2495,14 @@ var _r = /* @__PURE__ */ p({
|
|
|
3002
2495
|
P(F(p, ["prevent"]), ["enter"]),
|
|
3003
2496
|
P(f, ["esc"])
|
|
3004
2497
|
]
|
|
3005
|
-
}, null, 40,
|
|
2498
|
+
}, null, 40, Bn), [[A, i.value]]), u("div", Vn, [u("button", {
|
|
3006
2499
|
class: "reply-input__cancel",
|
|
3007
2500
|
onClick: F(f, ["stop"])
|
|
3008
2501
|
}, "Cancel"), u("button", {
|
|
3009
2502
|
class: g(["reply-input__submit", { "reply-input__submit--active": c.value }]),
|
|
3010
2503
|
disabled: !c.value,
|
|
3011
2504
|
onClick: F(p, ["stop"])
|
|
3012
|
-
}, " Reply ", 10,
|
|
2505
|
+
}, " Reply ", 10, Hn)])], 64)) : (b(), l("input", {
|
|
3013
2506
|
key: 0,
|
|
3014
2507
|
readonly: "",
|
|
3015
2508
|
placeholder: "Reply",
|
|
@@ -3018,13 +2511,13 @@ var _r = /* @__PURE__ */ p({
|
|
|
3018
2511
|
onClick: F(d, ["stop"])
|
|
3019
2512
|
}, null, 32))], 32));
|
|
3020
2513
|
}
|
|
3021
|
-
}), [["__scopeId", "data-v-343d2df1"]]),
|
|
2514
|
+
}), [["__scopeId", "data-v-343d2df1"]]), Wn = {
|
|
3022
2515
|
key: 0,
|
|
3023
2516
|
class: "reply-thread"
|
|
3024
|
-
},
|
|
2517
|
+
}, Gn = {
|
|
3025
2518
|
key: 0,
|
|
3026
2519
|
class: "reply-thread__more"
|
|
3027
|
-
},
|
|
2520
|
+
}, Kn = { class: "reply-thread__header" }, qn = { class: "reply-thread__author-block" }, Jn = { class: "reply-thread__author" }, Yn = { class: "reply-thread__date" }, Xn = ["data-find-comment-id", "data-find-comment-paragraph"], Zn = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
3028
2521
|
__name: "ReplyThread",
|
|
3029
2522
|
props: {
|
|
3030
2523
|
replies: {},
|
|
@@ -3032,24 +2525,24 @@ var _r = /* @__PURE__ */ p({
|
|
|
3032
2525
|
},
|
|
3033
2526
|
setup(e) {
|
|
3034
2527
|
let t = e, n = o(() => t.isExpanded ? t.replies : t.replies.slice(-1)), r = o(() => t.isExpanded ? 0 : Math.max(0, t.replies.length - 1));
|
|
3035
|
-
return (t, i) => e.replies.length > 0 ? (b(), l("div",
|
|
2528
|
+
return (t, i) => e.replies.length > 0 ? (b(), l("div", Wn, [r.value > 0 ? (b(), l("div", Gn, E(r.value) + " " + E(r.value === 1 ? "reply" : "replies"), 1)) : c("", !0), (b(!0), l(a, null, C(n.value, (t) => (b(), l("div", {
|
|
3036
2529
|
key: t.id,
|
|
3037
2530
|
class: g(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
|
|
3038
|
-
}, [u("div",
|
|
2531
|
+
}, [u("div", Kn, [f(zn, {
|
|
3039
2532
|
name: t.author,
|
|
3040
2533
|
size: 28
|
|
3041
|
-
}, null, 8, ["name"]), u("div",
|
|
2534
|
+
}, null, 8, ["name"]), u("div", qn, [u("div", Jn, E(t.author || "Unknown"), 1), u("div", Yn, E(O(Fn)(t.date)), 1)])]), u("div", { class: g(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, [(b(!0), l(a, null, C(t.content, (e, n) => (b(), l(a, { key: n }, [u("span", {
|
|
3042
2535
|
"data-find-comment-id": t.id,
|
|
3043
2536
|
"data-find-comment-paragraph": n
|
|
3044
|
-
}, E(O(V)(e)), 9,
|
|
2537
|
+
}, E(O(V)(e)), 9, Xn), i[0] ||= d(E(" "), -1)], 64))), 128))], 2)], 2))), 128))])) : c("", !0);
|
|
3045
2538
|
}
|
|
3046
|
-
}), [["__scopeId", "data-v-3ab28dc9"]]),
|
|
2539
|
+
}), [["__scopeId", "data-v-3ab28dc9"]]), Qn = ["data-comment-id"], $n = {
|
|
3047
2540
|
key: 0,
|
|
3048
2541
|
class: "comment-card__resolved"
|
|
3049
|
-
},
|
|
2542
|
+
}, er = { class: "comment-card__head" }, tr = { class: "comment-card__author-block" }, nr = { class: "comment-card__author" }, rr = { class: "comment-card__date" }, ir = {
|
|
3050
2543
|
key: 0,
|
|
3051
2544
|
class: "comment-card__actions"
|
|
3052
|
-
},
|
|
2545
|
+
}, ar = ["title"], or = { class: "comment-card__body" }, sr = ["data-find-comment-id", "data-find-comment-paragraph"], cr = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
3053
2546
|
__name: "CommentCard",
|
|
3054
2547
|
props: {
|
|
3055
2548
|
comment: {},
|
|
@@ -3074,17 +2567,17 @@ var _r = /* @__PURE__ */ p({
|
|
|
3074
2567
|
onClick: n[5] ||= (e) => t.$emit("click"),
|
|
3075
2568
|
onMousedown: n[6] ||= F(() => {}, ["stop"])
|
|
3076
2569
|
}, [
|
|
3077
|
-
e.comment.done ? (b(), l("div",
|
|
2570
|
+
e.comment.done ? (b(), l("div", $n, [f(r, {
|
|
3078
2571
|
name: "check",
|
|
3079
2572
|
size: 12
|
|
3080
2573
|
}), n[7] ||= u("span", null, "Resolved", -1)])) : c("", !0),
|
|
3081
|
-
u("div",
|
|
3082
|
-
f(
|
|
2574
|
+
u("div", er, [
|
|
2575
|
+
f(zn, {
|
|
3083
2576
|
name: e.comment.author,
|
|
3084
2577
|
size: 32
|
|
3085
2578
|
}, null, 8, ["name"]),
|
|
3086
|
-
u("div",
|
|
3087
|
-
e.expanded ? (b(), l("div",
|
|
2579
|
+
u("div", tr, [u("div", nr, E(e.comment.author || "Unknown"), 1), u("div", rr, E(O(Fn)(e.comment.date)), 1)]),
|
|
2580
|
+
e.expanded ? (b(), l("div", ir, [
|
|
3088
2581
|
u("button", {
|
|
3089
2582
|
class: "comment-card__icon-btn",
|
|
3090
2583
|
title: e.comment.done ? "Reopen" : "Resolve",
|
|
@@ -3092,7 +2585,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3092
2585
|
}, [f(r, {
|
|
3093
2586
|
name: e.comment.done ? "undo" : "check",
|
|
3094
2587
|
size: 20
|
|
3095
|
-
}, null, 8, ["name"])], 8,
|
|
2588
|
+
}, null, 8, ["name"])], 8, ar),
|
|
3096
2589
|
u("button", {
|
|
3097
2590
|
class: "comment-card__icon-btn",
|
|
3098
2591
|
title: "More options",
|
|
@@ -3112,21 +2605,21 @@ var _r = /* @__PURE__ */ p({
|
|
|
3112
2605
|
}, " Delete ")], 32)) : c("", !0)
|
|
3113
2606
|
])) : c("", !0)
|
|
3114
2607
|
]),
|
|
3115
|
-
u("div",
|
|
2608
|
+
u("div", or, [(b(!0), l(a, null, C(e.comment.content, (t, r) => (b(), l(a, { key: r }, [u("span", {
|
|
3116
2609
|
"data-find-comment-id": e.comment.id,
|
|
3117
2610
|
"data-find-comment-paragraph": r
|
|
3118
|
-
}, E(O(V)(t)), 9,
|
|
3119
|
-
f(
|
|
2611
|
+
}, E(O(V)(t)), 9, sr), n[8] ||= d(E(" "), -1)], 64))), 128))]),
|
|
2612
|
+
f(Zn, {
|
|
3120
2613
|
replies: e.replies,
|
|
3121
2614
|
"is-expanded": e.expanded
|
|
3122
2615
|
}, null, 8, ["replies", "is-expanded"]),
|
|
3123
|
-
e.expanded && !e.comment.done ? (b(), s(
|
|
2616
|
+
e.expanded && !e.comment.done ? (b(), s(Un, {
|
|
3124
2617
|
key: 1,
|
|
3125
2618
|
onSubmit: n[4] ||= (n) => t.$emit("reply", e.comment.id, n)
|
|
3126
2619
|
})) : c("", !0)
|
|
3127
|
-
], 42,
|
|
2620
|
+
], 42, Qn));
|
|
3128
2621
|
}
|
|
3129
|
-
}), [["__scopeId", "data-v-216d0740"]]),
|
|
2622
|
+
}), [["__scopeId", "data-v-216d0740"]]), lr = ["data-comment-id"], ur = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
3130
2623
|
__name: "ResolvedCommentMarker",
|
|
3131
2624
|
props: { comment: {} },
|
|
3132
2625
|
emits: ["toggle-expand"],
|
|
@@ -3140,49 +2633,49 @@ var _r = /* @__PURE__ */ p({
|
|
|
3140
2633
|
}, [f(r, {
|
|
3141
2634
|
name: "chat_bubble_check",
|
|
3142
2635
|
size: 20
|
|
3143
|
-
})], 40,
|
|
2636
|
+
})], 40, lr));
|
|
3144
2637
|
}
|
|
3145
|
-
}), [["__scopeId", "data-v-c10c6f88"]]),
|
|
2638
|
+
}), [["__scopeId", "data-v-c10c6f88"]]), dr = { class: "tc-card__head" }, fr = { class: "tc-card__author-block" }, pr = { class: "tc-card__author" }, mr = {
|
|
3146
2639
|
key: 0,
|
|
3147
2640
|
class: "tc-card__date"
|
|
3148
|
-
},
|
|
2641
|
+
}, hr = {
|
|
3149
2642
|
key: 0,
|
|
3150
2643
|
class: "tc-card__actions"
|
|
3151
|
-
},
|
|
2644
|
+
}, gr = [
|
|
3152
2645
|
"title",
|
|
3153
2646
|
"aria-label",
|
|
3154
2647
|
"aria-description",
|
|
3155
2648
|
"disabled"
|
|
3156
|
-
],
|
|
2649
|
+
], _r = [
|
|
3157
2650
|
"title",
|
|
3158
2651
|
"aria-label",
|
|
3159
2652
|
"aria-description",
|
|
3160
2653
|
"disabled"
|
|
3161
|
-
],
|
|
2654
|
+
], vr = { class: "tc-card__body" }, yr = { class: "tc-card__deleted" }, br = { class: "tc-card__inserted" }, xr = { class: "tc-card__inserted" }, Sr = { class: "tc-card__deleted" }, Cr = {
|
|
3162
2655
|
key: 0,
|
|
3163
2656
|
class: "tc-card__changed"
|
|
3164
|
-
},
|
|
2657
|
+
}, wr = { class: "tc-card__changed" }, Tr = { class: "tc-card__changed" }, Er = {
|
|
3165
2658
|
key: 5,
|
|
3166
2659
|
class: "tc-card__inserted"
|
|
3167
|
-
},
|
|
2660
|
+
}, Dr = {
|
|
3168
2661
|
key: 6,
|
|
3169
2662
|
class: "tc-card__deleted"
|
|
3170
|
-
},
|
|
2663
|
+
}, Or = {
|
|
3171
2664
|
key: 7,
|
|
3172
2665
|
class: "tc-card__inserted"
|
|
3173
|
-
},
|
|
2666
|
+
}, kr = {
|
|
3174
2667
|
key: 8,
|
|
3175
2668
|
class: "tc-card__deleted"
|
|
3176
|
-
},
|
|
2669
|
+
}, Ar = {
|
|
3177
2670
|
key: 9,
|
|
3178
2671
|
class: "tc-card__changed"
|
|
3179
|
-
},
|
|
2672
|
+
}, jr = {
|
|
3180
2673
|
key: 10,
|
|
3181
2674
|
class: "tc-card__inserted"
|
|
3182
|
-
},
|
|
2675
|
+
}, Mr = {
|
|
3183
2676
|
key: 11,
|
|
3184
2677
|
class: "tc-card__deleted"
|
|
3185
|
-
},
|
|
2678
|
+
}, Nr = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
3186
2679
|
__name: "TrackedChangeCard",
|
|
3187
2680
|
props: {
|
|
3188
2681
|
change: {},
|
|
@@ -3195,8 +2688,8 @@ var _r = /* @__PURE__ */ p({
|
|
|
3195
2688
|
"reject-by-id",
|
|
3196
2689
|
"reply"
|
|
3197
2690
|
],
|
|
3198
|
-
setup(
|
|
3199
|
-
let { t: i } =
|
|
2691
|
+
setup(t, { emit: n }) {
|
|
2692
|
+
let { t: i } = e(), p = t, m = n, h = o(() => p.change.author || i("trackedChanges.unknown")), _ = {
|
|
3200
2693
|
paragraphPropertiesChanged: {
|
|
3201
2694
|
shape: "with-text",
|
|
3202
2695
|
key: "revisions.paragraphPropertiesChanged"
|
|
@@ -3240,56 +2733,56 @@ var _r = /* @__PURE__ */ p({
|
|
|
3240
2733
|
function S() {
|
|
3241
2734
|
if (!p.change.heldByLock?.reject) for (let e of y()) m("reject-by-id", e);
|
|
3242
2735
|
}
|
|
3243
|
-
return (
|
|
3244
|
-
class: g(["tc-card", { "tc-card--expanded":
|
|
3245
|
-
onClick: n[1] ||= (
|
|
2736
|
+
return (e, n) => (b(), l("div", {
|
|
2737
|
+
class: g(["tc-card", { "tc-card--expanded": t.expanded }]),
|
|
2738
|
+
onClick: n[1] ||= (t) => e.$emit("click"),
|
|
3246
2739
|
onMousedown: n[2] ||= F(() => {}, ["stop"])
|
|
3247
2740
|
}, [
|
|
3248
|
-
u("div",
|
|
3249
|
-
f(
|
|
2741
|
+
u("div", dr, [
|
|
2742
|
+
f(zn, {
|
|
3250
2743
|
name: h.value,
|
|
3251
2744
|
size: 32
|
|
3252
2745
|
}, null, 8, ["name"]),
|
|
3253
|
-
u("div",
|
|
3254
|
-
|
|
2746
|
+
u("div", fr, [u("div", pr, E(h.value), 1), t.change.date ? (b(), l("div", mr, E(O(Fn)(t.change.date)), 1)) : c("", !0)]),
|
|
2747
|
+
t.expanded ? (b(), l("div", hr, [u("button", {
|
|
3255
2748
|
class: "tc-card__icon-btn",
|
|
3256
|
-
title:
|
|
2749
|
+
title: t.change.heldByLock?.accept ? O(i)("trackedChanges.heldByLock") : O(i)("acceptChange"),
|
|
3257
2750
|
"aria-label": O(i)("acceptChange"),
|
|
3258
|
-
"aria-description":
|
|
3259
|
-
disabled:
|
|
2751
|
+
"aria-description": t.change.heldByLock?.accept ? O(i)("trackedChanges.heldByLock") : void 0,
|
|
2752
|
+
disabled: t.change.heldByLock?.accept === !0,
|
|
3260
2753
|
onClick: F(x, ["stop"])
|
|
3261
2754
|
}, [f(r, {
|
|
3262
2755
|
name: "check",
|
|
3263
2756
|
size: 20
|
|
3264
|
-
})], 8,
|
|
2757
|
+
})], 8, gr), u("button", {
|
|
3265
2758
|
class: "tc-card__icon-btn",
|
|
3266
|
-
title:
|
|
2759
|
+
title: t.change.heldByLock?.reject ? O(i)("trackedChanges.heldByLock") : O(i)("rejectChange"),
|
|
3267
2760
|
"aria-label": O(i)("rejectChange"),
|
|
3268
|
-
"aria-description":
|
|
3269
|
-
disabled:
|
|
2761
|
+
"aria-description": t.change.heldByLock?.reject ? O(i)("trackedChanges.heldByLock") : void 0,
|
|
2762
|
+
disabled: t.change.heldByLock?.reject === !0,
|
|
3270
2763
|
onClick: F(S, ["stop"])
|
|
3271
2764
|
}, [f(r, {
|
|
3272
2765
|
name: "close",
|
|
3273
2766
|
size: 20
|
|
3274
|
-
})], 8,
|
|
2767
|
+
})], 8, _r)])) : c("", !0)
|
|
3275
2768
|
]),
|
|
3276
|
-
u("div",
|
|
2769
|
+
u("div", vr, [t.change.type === "replacement" ? (b(), l(a, { key: 0 }, [
|
|
3277
2770
|
d(E(O(i)("trackedChanges.replaced")) + " ", 1),
|
|
3278
|
-
u("span",
|
|
2771
|
+
u("span", yr, "\"" + E(O($)(t.change.deletedText || "")) + "\"", 1),
|
|
3279
2772
|
d(" " + E(O(i)("trackedChanges.with")) + " ", 1),
|
|
3280
|
-
u("span",
|
|
3281
|
-
], 64)) :
|
|
3282
|
-
f(
|
|
3283
|
-
replies:
|
|
3284
|
-
"is-expanded":
|
|
2773
|
+
u("span", br, "\"" + E(O($)(t.change.text)) + "\"", 1)
|
|
2774
|
+
], 64)) : t.change.type === "paragraphMarkInsertion" ? (b(), l(a, { key: 1 }, [d(E(O(i)("revisions.paragraphMarkInserted")), 1), t.change.text ? (b(), l(a, { key: 0 }, [n[3] ||= d(": ", -1), u("span", xr, "\"" + E(O($)(t.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : t.change.type === "paragraphMarkDeletion" ? (b(), l(a, { key: 2 }, [d(E(O(i)("revisions.paragraphMarkDeleted")), 1), t.change.text ? (b(), l(a, { key: 0 }, [n[4] ||= d(": ", -1), u("span", Sr, "\"" + E(O($)(t.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : v.value ? (b(), l(a, { key: 3 }, [v.value.shape === "label-only" ? (b(), l("span", Cr, E(v.value.label), 1)) : (b(), l(a, { key: 1 }, [d(E(v.value.label), 1), t.change.text ? (b(), l(a, { key: 0 }, [n[5] ||= d(": ", -1), u("span", wr, "\"" + E(O($)(t.change.text)) + "\"", 1)], 64)) : c("", !0)], 64))], 64)) : t.change.type === "runPropertiesChanged" ? (b(), l(a, { key: 4 }, [d(E(O(i)("revisions.runPropertiesChanged")), 1), t.change.text ? (b(), l(a, { key: 0 }, [n[6] ||= d(": ", -1), u("span", Tr, "\"" + E(O($)(t.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : t.change.type === "rowInserted" ? (b(), l("span", Er, E(O(i)("revisions.rowInserted")), 1)) : t.change.type === "rowDeleted" ? (b(), l("span", Dr, E(O(i)("revisions.rowDeleted")), 1)) : t.change.type === "cellInserted" ? (b(), l("span", Or, E(O(i)("revisions.cellInserted")), 1)) : t.change.type === "cellDeleted" ? (b(), l("span", kr, E(O(i)("revisions.cellDeleted")), 1)) : t.change.type === "cellMerged" ? (b(), l("span", Ar, E(O(i)("revisions.cellMerged")), 1)) : t.change.type === "tableInserted" ? (b(), l("span", jr, E(O(i)("revisions.tableInserted")), 1)) : t.change.type === "tableDeleted" ? (b(), l("span", Mr, E(O(i)("revisions.tableDeleted")), 1)) : (b(), l(a, { key: 12 }, [d(E(t.change.type === "insertion" ? O(i)("inserted") : O(i)("deleted")) + " ", 1), u("span", { class: g(t.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + E(O($)(t.change.text)) + "\" ", 3)], 64))]),
|
|
2775
|
+
f(Zn, {
|
|
2776
|
+
replies: t.replies,
|
|
2777
|
+
"is-expanded": t.expanded
|
|
3285
2778
|
}, null, 8, ["replies", "is-expanded"]),
|
|
3286
|
-
|
|
2779
|
+
t.expanded ? (b(), s(Un, {
|
|
3287
2780
|
key: 0,
|
|
3288
|
-
onSubmit: n[0] ||= (n) =>
|
|
2781
|
+
onSubmit: n[0] ||= (n) => e.$emit("reply", t.change.revisionId, n)
|
|
3289
2782
|
})) : c("", !0)
|
|
3290
2783
|
], 34));
|
|
3291
2784
|
}
|
|
3292
|
-
}), [["__scopeId", "data-v-026aadaa"]]),
|
|
2785
|
+
}), [["__scopeId", "data-v-026aadaa"]]), Pr = ["data-folio-comments-surface", "tabindex"], Fr = ["data-folio-scroll"], Ir = ["data-card-id"], Lr = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
3293
2786
|
__name: "UnifiedSidebar",
|
|
3294
2787
|
props: {
|
|
3295
2788
|
isOpen: { type: Boolean },
|
|
@@ -3332,7 +2825,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3332
2825
|
let t = e.target;
|
|
3333
2826
|
t instanceof HTMLElement && t.closest(".unified-sidebar__card-slot") || f.value !== null && r("update:activeItemId", null);
|
|
3334
2827
|
}
|
|
3335
|
-
let h =
|
|
2828
|
+
let h = An({
|
|
3336
2829
|
comments: D(n, "comments"),
|
|
3337
2830
|
trackedChanges: D(n, "trackedChanges"),
|
|
3338
2831
|
showResolved: o(() => n.showResolved ?? !1),
|
|
@@ -3359,7 +2852,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3359
2852
|
w.value = /* @__PURE__ */ new Map();
|
|
3360
2853
|
return;
|
|
3361
2854
|
}
|
|
3362
|
-
let r = e.getBoundingClientRect(), a =
|
|
2855
|
+
let r = e.getBoundingClientRect(), a = ie(e), o = /* @__PURE__ */ new Map();
|
|
3363
2856
|
for (let t of e.querySelectorAll(".docx-insertion[data-revision-id]")) {
|
|
3364
2857
|
let e = t.dataset.revisionId;
|
|
3365
2858
|
e && !o.has(e) && o.set(e, t);
|
|
@@ -3392,10 +2885,10 @@ var _r = /* @__PURE__ */ p({
|
|
|
3392
2885
|
t && u.set(t, e.offsetHeight);
|
|
3393
2886
|
}
|
|
3394
2887
|
let f = /* @__PURE__ */ new Map();
|
|
3395
|
-
for (let { item: n, y: r } of
|
|
2888
|
+
for (let { item: n, y: r } of G({
|
|
3396
2889
|
items: t,
|
|
3397
2890
|
anchorPositions: c,
|
|
3398
|
-
renderedDomContext:
|
|
2891
|
+
renderedDomContext: re(e),
|
|
3399
2892
|
zoom: 1,
|
|
3400
2893
|
cardHeights: u,
|
|
3401
2894
|
lastKnown: k
|
|
@@ -3416,7 +2909,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3416
2909
|
R.value = null;
|
|
3417
2910
|
return;
|
|
3418
2911
|
}
|
|
3419
|
-
let e = x.value?.offsetParent, t =
|
|
2912
|
+
let e = x.value?.offsetParent, t = K(n.pagesContainer);
|
|
3420
2913
|
if (!(e instanceof HTMLElement) || !t) return;
|
|
3421
2914
|
let r = e.getBoundingClientRect(), a = t.getBoundingClientRect(), o = Math.max(0, Math.min(L.drawerWidth, t.clientWidth - 16));
|
|
3422
2915
|
B.value = {
|
|
@@ -3432,12 +2925,12 @@ var _r = /* @__PURE__ */ p({
|
|
|
3432
2925
|
overflowY: "auto",
|
|
3433
2926
|
paddingBlock: L.commentsGap + "px",
|
|
3434
2927
|
boxSizing: "border-box"
|
|
3435
|
-
})),
|
|
2928
|
+
})), ne = o(() => {
|
|
3436
2929
|
let e = f.value;
|
|
3437
2930
|
if (!e) return "";
|
|
3438
2931
|
if (e.startsWith("comment-")) {
|
|
3439
2932
|
let t = e.slice(8);
|
|
3440
|
-
return `${
|
|
2933
|
+
return `${U(t, ".paged-editor__pages ")} { background-color: rgba(255, 212, 0, 0.35) !important; border-bottom: 2px solid rgba(255, 212, 0, 0.7) !important; }`;
|
|
3441
2934
|
}
|
|
3442
2935
|
if (e.startsWith("tc-")) {
|
|
3443
2936
|
let t = e.split("-").at(1) ?? "";
|
|
@@ -3447,7 +2940,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3447
2940
|
`;
|
|
3448
2941
|
}
|
|
3449
2942
|
return "";
|
|
3450
|
-
}),
|
|
2943
|
+
}), H = o(() => {
|
|
3451
2944
|
let e = i.value, t = e ? R.value !== null : w.value.size > 0 || h.value.length === 0, r = e ? R.value : n.columnStart ?? null;
|
|
3452
2945
|
return {
|
|
3453
2946
|
position: "absolute",
|
|
@@ -3460,7 +2953,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3460
2953
|
pointerEvents: t ? "auto" : "none"
|
|
3461
2954
|
};
|
|
3462
2955
|
});
|
|
3463
|
-
function
|
|
2956
|
+
function ae(e) {
|
|
3464
2957
|
if (i.value) return {
|
|
3465
2958
|
position: "relative",
|
|
3466
2959
|
marginBottom: "8px"
|
|
@@ -3477,10 +2970,10 @@ var _r = /* @__PURE__ */ p({
|
|
|
3477
2970
|
transition: "top 0.15s ease"
|
|
3478
2971
|
};
|
|
3479
2972
|
}
|
|
3480
|
-
let
|
|
3481
|
-
function
|
|
3482
|
-
|
|
3483
|
-
|
|
2973
|
+
let oe = !1;
|
|
2974
|
+
function W() {
|
|
2975
|
+
oe || (oe = !0, requestAnimationFrame(() => {
|
|
2976
|
+
oe = !1, I();
|
|
3484
2977
|
}));
|
|
3485
2978
|
}
|
|
3486
2979
|
j(() => [
|
|
@@ -3493,8 +2986,8 @@ var _r = /* @__PURE__ */ p({
|
|
|
3493
2986
|
n.addCommentYPosition,
|
|
3494
2987
|
n.surface,
|
|
3495
2988
|
n.isOpen
|
|
3496
|
-
], () =>
|
|
3497
|
-
function
|
|
2989
|
+
], () => W(), { immediate: !0 });
|
|
2990
|
+
function K(e) {
|
|
3498
2991
|
let t = e?.parentElement ?? null;
|
|
3499
2992
|
for (; t;) {
|
|
3500
2993
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -3503,16 +2996,16 @@ var _r = /* @__PURE__ */ p({
|
|
|
3503
2996
|
}
|
|
3504
2997
|
return null;
|
|
3505
2998
|
}
|
|
3506
|
-
let
|
|
3507
|
-
function
|
|
3508
|
-
|
|
2999
|
+
let q = null;
|
|
3000
|
+
function J() {
|
|
3001
|
+
q && q.removeEventListener("scroll", W), q = K(n.pagesContainer), q && (q.addEventListener("scroll", W, { passive: !0 }), A?.observe(q));
|
|
3509
3002
|
}
|
|
3510
3003
|
return y(() => {
|
|
3511
|
-
N = new ResizeObserver(() =>
|
|
3004
|
+
N = new ResizeObserver(() => W()), W(), n.pagesContainer && (A = new ResizeObserver(() => W()), A.observe(n.pagesContainer), J()), window.addEventListener("resize", W);
|
|
3512
3005
|
}), j(() => n.pagesContainer, (e) => {
|
|
3513
|
-
A?.disconnect(), A = null, e && (A = new ResizeObserver(() =>
|
|
3006
|
+
A?.disconnect(), A = null, e && (A = new ResizeObserver(() => W()), A.observe(e)), J(), W();
|
|
3514
3007
|
}), v(() => {
|
|
3515
|
-
A?.disconnect(), N?.disconnect(),
|
|
3008
|
+
A?.disconnect(), N?.disconnect(), q && q.removeEventListener("scroll", W), window.removeEventListener("resize", W);
|
|
3516
3009
|
}), j(() => n.isOpen && i.value, (e, t, n) => {
|
|
3517
3010
|
if (!e || typeof document > "u") return;
|
|
3518
3011
|
let i = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
@@ -3526,8 +3019,8 @@ var _r = /* @__PURE__ */ p({
|
|
|
3526
3019
|
}, {
|
|
3527
3020
|
immediate: !0,
|
|
3528
3021
|
flush: "post"
|
|
3529
|
-
}), (t, n) => (b(), l(a, null, [
|
|
3530
|
-
default: M(() => [d(E(
|
|
3022
|
+
}), (t, n) => (b(), l(a, null, [ne.value ? (b(), s(T("style"), { key: 0 }, {
|
|
3023
|
+
default: M(() => [d(E(ne.value), 1)]),
|
|
3531
3024
|
_: 1
|
|
3532
3025
|
})) : c("", !0), e.isOpen ? (b(), l("aside", {
|
|
3533
3026
|
key: 1,
|
|
@@ -3537,7 +3030,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3537
3030
|
"data-folio-comments-surface": e.surface ?? "column",
|
|
3538
3031
|
"data-testid": "folio-comments",
|
|
3539
3032
|
tabindex: i.value ? -1 : void 0,
|
|
3540
|
-
style: _(
|
|
3033
|
+
style: _(H.value),
|
|
3541
3034
|
onMousedown: m
|
|
3542
3035
|
}, [u("div", {
|
|
3543
3036
|
class: "unified-sidebar__inner",
|
|
@@ -3547,16 +3040,16 @@ var _r = /* @__PURE__ */ p({
|
|
|
3547
3040
|
key: e.id,
|
|
3548
3041
|
class: "unified-sidebar__card-slot",
|
|
3549
3042
|
"data-card-id": e.id,
|
|
3550
|
-
style: _(
|
|
3551
|
-
}, [e.kind === "add-comment" ? (b(), s(
|
|
3043
|
+
style: _(ae(e.id))
|
|
3044
|
+
}, [e.kind === "add-comment" ? (b(), s(Pn, {
|
|
3552
3045
|
key: 0,
|
|
3553
3046
|
onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
|
|
3554
3047
|
onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
|
|
3555
|
-
})) : e.kind === "comment" && e.comment.done && f.value !== e.id ? (b(), s(
|
|
3048
|
+
})) : e.kind === "comment" && e.comment.done && f.value !== e.id ? (b(), s(ur, {
|
|
3556
3049
|
key: 1,
|
|
3557
3050
|
comment: e.comment,
|
|
3558
3051
|
onToggleExpand: (t) => p(e.id)
|
|
3559
|
-
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(
|
|
3052
|
+
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(cr, {
|
|
3560
3053
|
key: 2,
|
|
3561
3054
|
comment: e.comment,
|
|
3562
3055
|
replies: e.replies,
|
|
@@ -3571,7 +3064,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3571
3064
|
"replies",
|
|
3572
3065
|
"expanded",
|
|
3573
3066
|
"onClick"
|
|
3574
|
-
])) : e.kind === "tracked-change" ? (b(), s(
|
|
3067
|
+
])) : e.kind === "tracked-change" ? (b(), s(Nr, {
|
|
3575
3068
|
key: 3,
|
|
3576
3069
|
change: e.change,
|
|
3577
3070
|
replies: e.replies ?? [],
|
|
@@ -3587,14 +3080,14 @@ var _r = /* @__PURE__ */ p({
|
|
|
3587
3080
|
"replies",
|
|
3588
3081
|
"expanded",
|
|
3589
3082
|
"onClick"
|
|
3590
|
-
])) : c("", !0)], 12,
|
|
3083
|
+
])) : c("", !0)], 12, Ir))), 128))], 12, Fr)], 46, Pr)) : c("", !0)], 64));
|
|
3591
3084
|
}
|
|
3592
|
-
}), [["__scopeId", "data-v-ef4fde0d"]]),
|
|
3085
|
+
}), [["__scopeId", "data-v-ef4fde0d"]]), Rr = [
|
|
3593
3086
|
"disabled",
|
|
3594
3087
|
"title",
|
|
3595
3088
|
"aria-expanded",
|
|
3596
3089
|
"onClick"
|
|
3597
|
-
],
|
|
3090
|
+
], zr = { class: "docx-align__panel" }, Br = ["title", "onClick"], Vr = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
3598
3091
|
__name: "AlignmentButtons",
|
|
3599
3092
|
props: {
|
|
3600
3093
|
value: { default: "left" },
|
|
@@ -3604,8 +3097,8 @@ var _r = /* @__PURE__ */ p({
|
|
|
3604
3097
|
}
|
|
3605
3098
|
},
|
|
3606
3099
|
emits: ["change"],
|
|
3607
|
-
setup(e, { emit:
|
|
3608
|
-
let { Popover:
|
|
3100
|
+
setup(e, { emit: n }) {
|
|
3101
|
+
let { Popover: i } = t(), c = e, d = n, p = S(!1), m = [
|
|
3609
3102
|
{
|
|
3610
3103
|
value: "left",
|
|
3611
3104
|
label: "Align left",
|
|
@@ -3634,10 +3127,10 @@ var _r = /* @__PURE__ */ p({
|
|
|
3634
3127
|
function v(e) {
|
|
3635
3128
|
d("change", e), p.value = !1;
|
|
3636
3129
|
}
|
|
3637
|
-
return (t,
|
|
3130
|
+
return (t, n) => (b(), s(O(i), {
|
|
3638
3131
|
open: p.value,
|
|
3639
|
-
"onUpdate:open":
|
|
3640
|
-
onClose:
|
|
3132
|
+
"onUpdate:open": n[0] ||= (e) => p.value = e,
|
|
3133
|
+
onClose: n[1] ||= (e) => p.value = !1
|
|
3641
3134
|
}, {
|
|
3642
3135
|
trigger: M(({ toggle: t }) => [u("button", {
|
|
3643
3136
|
type: "button",
|
|
@@ -3653,8 +3146,8 @@ var _r = /* @__PURE__ */ p({
|
|
|
3653
3146
|
}, null, 8, ["name"]), f(r, {
|
|
3654
3147
|
name: "arrow_drop_down",
|
|
3655
3148
|
size: 14
|
|
3656
|
-
})], 10,
|
|
3657
|
-
panel: M(() => [u("div",
|
|
3149
|
+
})], 10, Rr)]),
|
|
3150
|
+
panel: M(() => [u("div", zr, [(b(), l(a, null, C(m, (t) => u("button", {
|
|
3658
3151
|
key: t.value,
|
|
3659
3152
|
type: "button",
|
|
3660
3153
|
class: g(["docx-align__option", { "docx-align__option--active": e.value === t.value }]),
|
|
@@ -3663,11 +3156,11 @@ var _r = /* @__PURE__ */ p({
|
|
|
3663
3156
|
}, [f(r, {
|
|
3664
3157
|
name: t.icon,
|
|
3665
3158
|
size: 20
|
|
3666
|
-
}, null, 8, ["name"])], 10,
|
|
3159
|
+
}, null, 8, ["name"])], 10, Br)), 64))])]),
|
|
3667
3160
|
_: 1
|
|
3668
3161
|
}, 8, ["open"]));
|
|
3669
3162
|
}
|
|
3670
|
-
}), [["__scopeId", "data-v-de187b7d"]]),
|
|
3163
|
+
}), [["__scopeId", "data-v-de187b7d"]]), Hr = { class: "docx-list-btns" }, Ur = ["disabled"], Wr = ["disabled"], Gr = ["disabled"], Kr = ["disabled"], qr = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
3671
3164
|
__name: "ListButtons",
|
|
3672
3165
|
props: {
|
|
3673
3166
|
listState: {},
|
|
@@ -3691,7 +3184,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3691
3184
|
"outdent"
|
|
3692
3185
|
],
|
|
3693
3186
|
setup(e) {
|
|
3694
|
-
return (t, n) => (b(), l("span",
|
|
3187
|
+
return (t, n) => (b(), l("span", Hr, [
|
|
3695
3188
|
u("button", {
|
|
3696
3189
|
type: "button",
|
|
3697
3190
|
class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.type === "bullet" }]),
|
|
@@ -3701,7 +3194,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3701
3194
|
}, [f(r, {
|
|
3702
3195
|
name: "format_list_bulleted",
|
|
3703
3196
|
size: 20
|
|
3704
|
-
})], 10,
|
|
3197
|
+
})], 10, Ur),
|
|
3705
3198
|
u("button", {
|
|
3706
3199
|
type: "button",
|
|
3707
3200
|
class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.type === "numbered" }]),
|
|
@@ -3711,7 +3204,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3711
3204
|
}, [f(r, {
|
|
3712
3205
|
name: "format_list_numbered",
|
|
3713
3206
|
size: 20
|
|
3714
|
-
})], 10,
|
|
3207
|
+
})], 10, Wr),
|
|
3715
3208
|
e.showIndentButtons ? (b(), l(a, { key: 0 }, [u("button", {
|
|
3716
3209
|
type: "button",
|
|
3717
3210
|
class: "docx-list-btns__btn",
|
|
@@ -3721,7 +3214,7 @@ var _r = /* @__PURE__ */ p({
|
|
|
3721
3214
|
}, [f(r, {
|
|
3722
3215
|
name: "format_indent_decrease",
|
|
3723
3216
|
size: 20
|
|
3724
|
-
})], 8,
|
|
3217
|
+
})], 8, Gr), u("button", {
|
|
3725
3218
|
type: "button",
|
|
3726
3219
|
class: "docx-list-btns__btn",
|
|
3727
3220
|
disabled: e.disabled,
|
|
@@ -3730,10 +3223,10 @@ var _r = /* @__PURE__ */ p({
|
|
|
3730
3223
|
}, [f(r, {
|
|
3731
3224
|
name: "format_indent_increase",
|
|
3732
3225
|
size: 20
|
|
3733
|
-
})], 8,
|
|
3226
|
+
})], 8, Kr)], 64)) : c("", !0)
|
|
3734
3227
|
]));
|
|
3735
3228
|
}
|
|
3736
|
-
}), [["__scopeId", "data-v-df3a6cfe"]]),
|
|
3229
|
+
}), [["__scopeId", "data-v-df3a6cfe"]]), Jr = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
3737
3230
|
__name: "StylePicker",
|
|
3738
3231
|
props: {
|
|
3739
3232
|
value: {},
|
|
@@ -3745,8 +3238,8 @@ var _r = /* @__PURE__ */ p({
|
|
|
3745
3238
|
className: {}
|
|
3746
3239
|
},
|
|
3747
3240
|
emits: ["change"],
|
|
3748
|
-
setup(e, { emit:
|
|
3749
|
-
let { Select:
|
|
3241
|
+
setup(e, { emit: n }) {
|
|
3242
|
+
let { Select: r } = t(), i = e, a = n, c = [
|
|
3750
3243
|
{
|
|
3751
3244
|
styleId: "Normal",
|
|
3752
3245
|
name: "Normal text"
|
|
@@ -3771,14 +3264,14 @@ var _r = /* @__PURE__ */ p({
|
|
|
3771
3264
|
styleId: "Heading3",
|
|
3772
3265
|
name: "Heading 3"
|
|
3773
3266
|
}
|
|
3774
|
-
], l = o(() =>
|
|
3267
|
+
], l = o(() => i.styles ?? c), u = o(() => l.value.map((e) => ({
|
|
3775
3268
|
value: e.styleId,
|
|
3776
3269
|
label: e.name
|
|
3777
3270
|
})));
|
|
3778
3271
|
function d(e) {
|
|
3779
3272
|
a("change", e);
|
|
3780
3273
|
}
|
|
3781
|
-
return (t,
|
|
3274
|
+
return (t, n) => (b(), s(O(r), {
|
|
3782
3275
|
class: g(["docx-style-picker", e.className]),
|
|
3783
3276
|
value: e.value ?? "Normal",
|
|
3784
3277
|
items: u.value,
|
|
@@ -3793,4 +3286,4 @@ var _r = /* @__PURE__ */ p({
|
|
|
3793
3286
|
]));
|
|
3794
3287
|
}
|
|
3795
3288
|
}), [["__scopeId", "data-v-44de0ff6"]]);
|
|
3796
|
-
export {
|
|
3289
|
+
export { Y as C, he as S, q as T, Lt as _, Nr as a, Ye as b, Zn as c, kn as d, On as f, Rt as g, Ht as h, Lr as i, Un as l, qt as m, qr as n, ur as o, Jt as p, Vr as r, cr as s, Jr as t, Pn as u, Ze as v, le as w, Le as x, Xe as y };
|