@stll/folio-vue 0.17.2 → 0.17.3
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/{ListButtons-BlOX6_s_.js → ListButtons-0NZvOgUE.js} +334 -343
- package/dist/ListButtons-C7LKOgVn.cjs +4 -0
- package/dist/folio-vue.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -5
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/package.json +2 -2
- package/dist/ListButtons-R-0VECMy.cjs +0 -4
|
@@ -3,13 +3,14 @@ import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c
|
|
|
3
3
|
import { getTableContext as I } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
|
|
4
4
|
import { extractSelectionContext as L } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
|
|
5
5
|
import { createRenderedDomContext as R } from "@stll/folio-core/render-dom/RenderedDomContext";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { commentAnchorSelector as z, indexCommentAnchors as B } from "@stll/folio-core/render-dom/commentAnchorAttributes";
|
|
7
|
+
import { pixelsToTwips as V, twipsToPixels as ee } from "@stll/folio-core/utils/units";
|
|
8
|
+
import { DISPLAY_MODES as H } from "@stll/folio-core/managers/EditorModeManager";
|
|
9
|
+
import { redoDepth as U, undoDepth as W } from "prosemirror-history";
|
|
10
|
+
import { clearFormatting as G } from "@stll/folio-core/prosemirror/commands/formatting";
|
|
11
|
+
import { resolveSidebarItemPositions as K } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
|
|
11
12
|
//#region src/components/CommentMarginMarkers.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
13
|
+
var q = ["title", "onClick"], J = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
13
14
|
__name: "CommentMarginMarkers",
|
|
14
15
|
props: {
|
|
15
16
|
comments: {},
|
|
@@ -25,12 +26,7 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
25
26
|
if (t.sidebarOpen) return [];
|
|
26
27
|
let e = t.pagesContainer;
|
|
27
28
|
if (!e) return [];
|
|
28
|
-
let n = e.getBoundingClientRect(), r =
|
|
29
|
-
for (let t of e.querySelectorAll("[data-comment-id]")) {
|
|
30
|
-
let e = t.dataset.commentId;
|
|
31
|
-
e && !r.has(e) && r.set(e, t);
|
|
32
|
-
}
|
|
33
|
-
let i = [];
|
|
29
|
+
let n = e.getBoundingClientRect(), r = B(e), i = [];
|
|
34
30
|
for (let a of t.comments) {
|
|
35
31
|
if (a.parentId != null) continue;
|
|
36
32
|
let o = r.get(String(a.id));
|
|
@@ -64,12 +60,12 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
64
60
|
}, [f(r, {
|
|
65
61
|
name: n.isResolved ? "chat_bubble_check" : "chat_bubble_outline",
|
|
66
62
|
size: 18
|
|
67
|
-
}, null, 8, ["name"])], 12,
|
|
63
|
+
}, null, 8, ["name"])], 12, q))), 128))], 36)) : c("", !0);
|
|
68
64
|
}
|
|
69
|
-
}), [["__scopeId", "data-v-
|
|
65
|
+
}), [["__scopeId", "data-v-bf75a017"]]), Y = { class: "doc-name" }, te = ["value"], ne = {
|
|
70
66
|
key: 1,
|
|
71
67
|
class: "doc-name__text"
|
|
72
|
-
},
|
|
68
|
+
}, re = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
73
69
|
__name: "DocumentName",
|
|
74
70
|
props: {
|
|
75
71
|
modelValue: {},
|
|
@@ -91,16 +87,16 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
91
87
|
let t = e.target;
|
|
92
88
|
t instanceof HTMLInputElement && (t.value.trim() || r("update:modelValue", "Untitled document.docx"));
|
|
93
89
|
}
|
|
94
|
-
return (t, n) => (b(), l("div",
|
|
90
|
+
return (t, n) => (b(), l("div", Y, [e.editable ? (b(), l("input", {
|
|
95
91
|
key: 0,
|
|
96
92
|
class: "doc-name__input",
|
|
97
93
|
value: i.value,
|
|
98
94
|
placeholder: "Untitled document",
|
|
99
95
|
onInput: a,
|
|
100
96
|
onBlur: s
|
|
101
|
-
}, null, 40,
|
|
97
|
+
}, null, 40, te)) : (b(), l("span", ne, E(i.value || "Untitled document"), 1))]));
|
|
102
98
|
}
|
|
103
|
-
}), [["__scopeId", "data-v-ae6cb472"]]),
|
|
99
|
+
}), [["__scopeId", "data-v-ae6cb472"]]), ie = ["aria-selected", "onMouseenter"], ae = { class: "docx-table-grid-inline__label" }, oe = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
104
100
|
__name: "TableGridInline",
|
|
105
101
|
props: {
|
|
106
102
|
gridRows: { default: 6 },
|
|
@@ -136,15 +132,15 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
136
132
|
i.value = e.r, s.value = e.c;
|
|
137
133
|
},
|
|
138
134
|
onClick: F(d, ["prevent"])
|
|
139
|
-
}, null, 42,
|
|
135
|
+
}, null, 42, ie))), 128))], 36), u("div", ae, E(i.value > 0 && s.value > 0 ? `${s.value} × ${i.value}` : "Select size"), 1)]));
|
|
140
136
|
}
|
|
141
|
-
}), [["__scopeId", "data-v-79c593ca"]]),
|
|
137
|
+
}), [["__scopeId", "data-v-79c593ca"]]), se = {
|
|
142
138
|
class: "menu-bar",
|
|
143
139
|
role: "menubar"
|
|
144
|
-
},
|
|
140
|
+
}, X = {
|
|
145
141
|
key: 1,
|
|
146
142
|
class: "menu-bar__break-submenu"
|
|
147
|
-
},
|
|
143
|
+
}, ce = ["onClick"], le = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
148
144
|
__name: "MenuBar",
|
|
149
145
|
props: {
|
|
150
146
|
showFileOpen: {
|
|
@@ -240,7 +236,7 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
240
236
|
label: h("toolbar.reportIssue"),
|
|
241
237
|
onClick: g("reportIssue")
|
|
242
238
|
}]);
|
|
243
|
-
return (t, n) => (b(), l("div",
|
|
239
|
+
return (t, n) => (b(), l("div", se, [
|
|
244
240
|
f(O(d), {
|
|
245
241
|
label: O(h)("toolbar.file"),
|
|
246
242
|
items: _.value
|
|
@@ -253,12 +249,12 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
253
249
|
label: O(h)("toolbar.insert"),
|
|
254
250
|
items: y.value
|
|
255
251
|
}, {
|
|
256
|
-
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(
|
|
252
|
+
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(oe, {
|
|
257
253
|
key: 0,
|
|
258
254
|
onInsert: (e, n) => {
|
|
259
255
|
m("insert-table", e, n), t();
|
|
260
256
|
}
|
|
261
|
-
}, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div",
|
|
257
|
+
}, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div", X, [(b(!0), l(a, null, C(x.value, (e) => (b(), l("button", {
|
|
262
258
|
key: e.action,
|
|
263
259
|
type: "button",
|
|
264
260
|
class: "menu-bar__break-item",
|
|
@@ -268,7 +264,7 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
268
264
|
}, [f(r, {
|
|
269
265
|
name: e.icon,
|
|
270
266
|
size: 18
|
|
271
|
-
}, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8,
|
|
267
|
+
}, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8, ce))), 128))])) : c("", !0)]),
|
|
272
268
|
_: 1
|
|
273
269
|
}, 8, ["label", "items"]),
|
|
274
270
|
e.showHelpMenu ? (b(), s(O(d), {
|
|
@@ -278,13 +274,13 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
278
274
|
}, null, 8, ["label", "items"])) : c("", !0)
|
|
279
275
|
]));
|
|
280
276
|
}
|
|
281
|
-
}), [["__scopeId", "data-v-bd3f3f2c"]]),
|
|
277
|
+
}), [["__scopeId", "data-v-bd3f3f2c"]]), Z = [
|
|
282
278
|
"disabled",
|
|
283
279
|
"aria-label",
|
|
284
280
|
"title",
|
|
285
281
|
"aria-expanded",
|
|
286
282
|
"onClick"
|
|
287
|
-
],
|
|
283
|
+
], ue = { class: "docx-icon-grid__panel" }, de = ["title", "onClick"], fe = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
288
284
|
__name: "IconGridDropdown",
|
|
289
285
|
props: {
|
|
290
286
|
options: {},
|
|
@@ -320,8 +316,8 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
320
316
|
}, null, 8, ["name"]), f(r, {
|
|
321
317
|
name: "arrow_drop_down",
|
|
322
318
|
size: 14
|
|
323
|
-
})], 10,
|
|
324
|
-
panel: M(() => [u("div",
|
|
319
|
+
})], 10, Z)]),
|
|
320
|
+
panel: M(() => [u("div", ue, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
|
|
325
321
|
key: t.value,
|
|
326
322
|
type: "button",
|
|
327
323
|
class: g(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === t.value }]),
|
|
@@ -330,11 +326,11 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
330
326
|
}, [f(r, {
|
|
331
327
|
name: t.iconName,
|
|
332
328
|
size: 18
|
|
333
|
-
}, null, 8, ["name"])], 10,
|
|
329
|
+
}, null, 8, ["name"])], 10, de))), 128))])]),
|
|
334
330
|
_: 1
|
|
335
331
|
}, 8, ["open"]));
|
|
336
332
|
}
|
|
337
|
-
}), [["__scopeId", "data-v-72fa875c"]]),
|
|
333
|
+
}), [["__scopeId", "data-v-72fa875c"]]), pe = /* @__PURE__ */ p({
|
|
338
334
|
__name: "ImageWrapDropdown",
|
|
339
335
|
props: {
|
|
340
336
|
imageContext: {},
|
|
@@ -381,7 +377,7 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
381
377
|
let e = t.imageContext;
|
|
382
378
|
return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
|
|
383
379
|
}), 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 ?? "");
|
|
384
|
-
return (t, n) => (b(), s(
|
|
380
|
+
return (t, n) => (b(), s(fe, {
|
|
385
381
|
options: a.value,
|
|
386
382
|
"active-value": c.value,
|
|
387
383
|
"trigger-icon": u.value,
|
|
@@ -396,7 +392,7 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
396
392
|
"disabled"
|
|
397
393
|
]));
|
|
398
394
|
}
|
|
399
|
-
}),
|
|
395
|
+
}), me = /* @__PURE__ */ p({
|
|
400
396
|
__name: "ImageTransformDropdown",
|
|
401
397
|
props: { disabled: { type: Boolean } },
|
|
402
398
|
emits: ["transform"],
|
|
@@ -427,7 +423,7 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
427
423
|
label: t(e.labelKey),
|
|
428
424
|
iconName: e.iconName
|
|
429
425
|
})));
|
|
430
|
-
return (n, r) => (b(), s(
|
|
426
|
+
return (n, r) => (b(), s(fe, {
|
|
431
427
|
options: i.value,
|
|
432
428
|
"trigger-icon": "rotate_right",
|
|
433
429
|
"tooltip-content": O(t)("imageTransform.tooltip"),
|
|
@@ -439,10 +435,10 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
439
435
|
"disabled"
|
|
440
436
|
]));
|
|
441
437
|
}
|
|
442
|
-
}),
|
|
438
|
+
}), he = ["title", "onClick"], ge = {
|
|
443
439
|
key: 0,
|
|
444
440
|
class: "editing-mode__label"
|
|
445
|
-
},
|
|
441
|
+
}, _e = { class: "editing-mode__panel" }, ve = ["onClick"], ye = { class: "editing-mode__option-text" }, be = { class: "editing-mode__option-label" }, xe = { class: "editing-mode__option-desc" }, Se = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
446
442
|
__name: "EditingModeDropdown",
|
|
447
443
|
props: { modelValue: {} },
|
|
448
444
|
emits: ["update:modelValue"],
|
|
@@ -495,13 +491,13 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
495
491
|
name: D.value.icon,
|
|
496
492
|
size: 18
|
|
497
493
|
}, null, 8, ["name"]),
|
|
498
|
-
T.value ? c("", !0) : (b(), l("span",
|
|
494
|
+
T.value ? c("", !0) : (b(), l("span", ge, E(O(d)(D.value.labelKey)), 1)),
|
|
499
495
|
f(r, {
|
|
500
496
|
name: "arrow_drop_down",
|
|
501
497
|
size: 16
|
|
502
498
|
})
|
|
503
|
-
], 10,
|
|
504
|
-
panel: M(() => [u("div",
|
|
499
|
+
], 10, he)]),
|
|
500
|
+
panel: M(() => [u("div", _e, [(b(), l(a, null, C(x, (t) => u("button", {
|
|
505
501
|
key: t.value,
|
|
506
502
|
type: "button",
|
|
507
503
|
class: "editing-mode__option",
|
|
@@ -511,23 +507,23 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
511
507
|
name: t.icon,
|
|
512
508
|
size: 20
|
|
513
509
|
}, null, 8, ["name"]),
|
|
514
|
-
u("span",
|
|
510
|
+
u("span", ye, [u("span", be, E(O(d)(t.labelKey)), 1), u("span", xe, E(O(d)(t.descKey)), 1)]),
|
|
515
511
|
t.value === e.modelValue ? (b(), s(r, {
|
|
516
512
|
key: 0,
|
|
517
513
|
name: "check",
|
|
518
514
|
size: 18,
|
|
519
515
|
class: "editing-mode__check"
|
|
520
516
|
})) : c("", !0)
|
|
521
|
-
], 8,
|
|
517
|
+
], 8, ve)), 64))])]),
|
|
522
518
|
_: 1
|
|
523
519
|
}, 8, ["open"]));
|
|
524
520
|
}
|
|
525
|
-
}), [["__scopeId", "data-v-333d7e96"]]),
|
|
521
|
+
}), [["__scopeId", "data-v-333d7e96"]]), Ce = { class: "review-controls" }, we = [
|
|
526
522
|
"disabled",
|
|
527
523
|
"aria-pressed",
|
|
528
524
|
"aria-label",
|
|
529
525
|
"title"
|
|
530
|
-
],
|
|
526
|
+
], Te = { class: "review-controls__toggle-label" }, Ee = ["title", "onClick"], De = { class: "review-controls__display-label" }, Oe = ["onClick"], ke = { class: "review-controls__option-label" }, Ae = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
531
527
|
__name: "ReviewControls",
|
|
532
528
|
props: {
|
|
533
529
|
trackChangesOn: { type: Boolean },
|
|
@@ -552,7 +548,7 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
552
548
|
function w(e) {
|
|
553
549
|
h("update:display-mode", e), _.value = !1;
|
|
554
550
|
}
|
|
555
|
-
return (t, n) => (b(), l("div",
|
|
551
|
+
return (t, n) => (b(), l("div", Ce, [u("button", {
|
|
556
552
|
type: "button",
|
|
557
553
|
class: g(["review-controls__toggle", { "review-controls__toggle--on": e.trackChangesOn }]),
|
|
558
554
|
disabled: e.readOnly,
|
|
@@ -564,7 +560,7 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
564
560
|
}, [f(r, {
|
|
565
561
|
name: "edit_note",
|
|
566
562
|
size: 18
|
|
567
|
-
}), u("span",
|
|
563
|
+
}), u("span", Te, E(e.trackChangesOn ? O(d)("trackingOn") : O(d)("trackingOff")), 1)], 42, we), f(O(p), {
|
|
568
564
|
open: _.value,
|
|
569
565
|
placement: "bottom-right",
|
|
570
566
|
"onUpdate:open": n[4] ||= (e) => _.value = e,
|
|
@@ -581,49 +577,49 @@ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
581
577
|
name: "visibility",
|
|
582
578
|
size: 16
|
|
583
579
|
}),
|
|
584
|
-
u("span",
|
|
580
|
+
u("span", De, E(x.value), 1),
|
|
585
581
|
f(r, {
|
|
586
582
|
name: "arrow_drop_down",
|
|
587
583
|
size: 16
|
|
588
584
|
})
|
|
589
|
-
], 42,
|
|
585
|
+
], 42, Ee)]),
|
|
590
586
|
panel: M(() => [u("div", {
|
|
591
587
|
class: "review-controls__panel",
|
|
592
588
|
onMousedown: n[3] ||= F(() => {}, ["prevent"])
|
|
593
|
-
}, [(b(!0), l(a, null, C(O(
|
|
589
|
+
}, [(b(!0), l(a, null, C(O(H), (t) => (b(), l("button", {
|
|
594
590
|
key: t,
|
|
595
591
|
type: "button",
|
|
596
592
|
class: "review-controls__option",
|
|
597
593
|
onClick: F((e) => w(t), ["prevent"])
|
|
598
|
-
}, [u("span",
|
|
594
|
+
}, [u("span", ke, E(y(t)), 1), t === e.displayMode ? (b(), s(r, {
|
|
599
595
|
key: 0,
|
|
600
596
|
name: "check",
|
|
601
597
|
size: 18,
|
|
602
598
|
class: "review-controls__check"
|
|
603
|
-
})) : c("", !0)], 8,
|
|
599
|
+
})) : c("", !0)], 8, Oe))), 128))], 32)]),
|
|
604
600
|
_: 1
|
|
605
601
|
}, 8, ["open"])]));
|
|
606
602
|
}
|
|
607
603
|
}), [["__scopeId", "data-v-e54a1ec7"]]);
|
|
608
604
|
//#endregion
|
|
609
605
|
//#region src/utils/fontOptions.ts
|
|
610
|
-
function
|
|
606
|
+
function je(e) {
|
|
611
607
|
if (e === void 0) return;
|
|
612
608
|
let t = e.map((e) => typeof e == "string" ? {
|
|
613
609
|
name: e,
|
|
614
610
|
fontFamily: e,
|
|
615
611
|
category: "other"
|
|
616
612
|
} : e);
|
|
617
|
-
if (
|
|
613
|
+
if (Me()) {
|
|
618
614
|
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
619
615
|
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);
|
|
620
616
|
}
|
|
621
617
|
return t;
|
|
622
618
|
}
|
|
623
|
-
function
|
|
619
|
+
function Me() {
|
|
624
620
|
return typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
625
621
|
}
|
|
626
|
-
function
|
|
622
|
+
function Ne(e, t) {
|
|
627
623
|
if (!e || e.length === 0) return [];
|
|
628
624
|
let n = /* @__PURE__ */ new Set();
|
|
629
625
|
for (let e of t) n.add(e.trim().toLowerCase());
|
|
@@ -636,7 +632,7 @@ function je(e, t) {
|
|
|
636
632
|
}
|
|
637
633
|
//#endregion
|
|
638
634
|
//#region src/components/Toolbar/presets.ts
|
|
639
|
-
var
|
|
635
|
+
var Pe = [
|
|
640
636
|
{
|
|
641
637
|
name: "Arial",
|
|
642
638
|
fontFamily: "Arial",
|
|
@@ -697,7 +693,7 @@ var Me = [
|
|
|
697
693
|
fontFamily: "Consolas",
|
|
698
694
|
category: "monospace"
|
|
699
695
|
}
|
|
700
|
-
],
|
|
696
|
+
], Fe = [
|
|
701
697
|
8,
|
|
702
698
|
9,
|
|
703
699
|
10,
|
|
@@ -712,7 +708,7 @@ var Me = [
|
|
|
712
708
|
36,
|
|
713
709
|
48,
|
|
714
710
|
72
|
|
715
|
-
],
|
|
711
|
+
], Ie = [
|
|
716
712
|
{
|
|
717
713
|
id: "Normal",
|
|
718
714
|
label: "Normal",
|
|
@@ -743,7 +739,7 @@ var Me = [
|
|
|
743
739
|
label: "Heading 3",
|
|
744
740
|
nameKey: "styles.heading3"
|
|
745
741
|
}
|
|
746
|
-
],
|
|
742
|
+
], Le = [
|
|
747
743
|
{
|
|
748
744
|
label: "Single",
|
|
749
745
|
labelKey: "lineSpacing.single",
|
|
@@ -762,7 +758,7 @@ var Me = [
|
|
|
762
758
|
labelKey: "lineSpacing.double",
|
|
763
759
|
value: 480
|
|
764
760
|
}
|
|
765
|
-
],
|
|
761
|
+
], Re = [
|
|
766
762
|
.5,
|
|
767
763
|
.75,
|
|
768
764
|
1,
|
|
@@ -772,7 +768,7 @@ var Me = [
|
|
|
772
768
|
];
|
|
773
769
|
//#endregion
|
|
774
770
|
//#region src/composables/useToolbarDropdowns.ts
|
|
775
|
-
function
|
|
771
|
+
function ze(e) {
|
|
776
772
|
let t = S(null), n = S({
|
|
777
773
|
top: 0,
|
|
778
774
|
left: 0
|
|
@@ -824,7 +820,7 @@ function Le(e) {
|
|
|
824
820
|
}
|
|
825
821
|
//#endregion
|
|
826
822
|
//#region src/composables/useToolbarFontSize.ts
|
|
827
|
-
function
|
|
823
|
+
function Be(e) {
|
|
828
824
|
let t = S(!1), n = (t) => e.execCommand("setFontSize", t * 2);
|
|
829
825
|
function r() {
|
|
830
826
|
t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
|
|
@@ -844,11 +840,11 @@ function Re(e) {
|
|
|
844
840
|
}
|
|
845
841
|
function s() {
|
|
846
842
|
let t = e.currentFontSize.value;
|
|
847
|
-
n(
|
|
843
|
+
n(Fe.find((e) => e > t) || t + 1);
|
|
848
844
|
}
|
|
849
845
|
function c() {
|
|
850
846
|
let t = e.currentFontSize.value;
|
|
851
|
-
n([...
|
|
847
|
+
n([...Fe].reverse().find((e) => e < t) || Math.max(1, t - 1));
|
|
852
848
|
}
|
|
853
849
|
return {
|
|
854
850
|
onSizeFocus: r,
|
|
@@ -861,7 +857,7 @@ function Re(e) {
|
|
|
861
857
|
}
|
|
862
858
|
//#endregion
|
|
863
859
|
//#region src/utils/stylePreview.ts
|
|
864
|
-
var
|
|
860
|
+
var Ve = {
|
|
865
861
|
Title: 26,
|
|
866
862
|
Subtitle: 18,
|
|
867
863
|
Heading1: 24,
|
|
@@ -871,22 +867,22 @@ var ze = {
|
|
|
871
867
|
Heading5: 13,
|
|
872
868
|
Heading6: 13,
|
|
873
869
|
Normal: 14
|
|
874
|
-
},
|
|
870
|
+
}, He = /* @__PURE__ */ new Set([
|
|
875
871
|
"Title",
|
|
876
872
|
"Heading1",
|
|
877
873
|
"Heading2",
|
|
878
874
|
"Heading3"
|
|
879
|
-
]),
|
|
880
|
-
function
|
|
881
|
-
let t =
|
|
875
|
+
]), Ue = { Subtitle: "666666" }, We = "#4a6c8c";
|
|
876
|
+
function Ge(e) {
|
|
877
|
+
let t = Ve[e.styleId], n = {
|
|
882
878
|
fontSize: t ? `${t}px` : `${Math.min(Math.max(e.fontSize ? e.fontSize / 2 : 11, 11), 20)}px`,
|
|
883
879
|
lineHeight: "1.3"
|
|
884
880
|
};
|
|
885
|
-
(e.bold ??
|
|
886
|
-
let r = e.color ??
|
|
887
|
-
return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color =
|
|
881
|
+
(e.bold ?? He.has(e.styleId)) && (n.fontWeight = "bold"), e.italic && (n.fontStyle = "italic");
|
|
882
|
+
let r = e.color ?? Ue[e.styleId];
|
|
883
|
+
return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color = We), n;
|
|
888
884
|
}
|
|
889
|
-
function
|
|
885
|
+
function Ke(e) {
|
|
890
886
|
return !e || e.length === 0 ? [] : e.filter((e) => e.type === "paragraph").filter((e) => e.qFormat ? !0 : !(e.hidden || e.semiHidden)).map((e) => ({
|
|
891
887
|
styleId: e.styleId,
|
|
892
888
|
name: e.name || e.styleId,
|
|
@@ -899,20 +895,20 @@ function We(e) {
|
|
|
899
895
|
}
|
|
900
896
|
//#endregion
|
|
901
897
|
//#region src/composables/useParagraphStyleOptions.ts
|
|
902
|
-
function
|
|
898
|
+
function qe(e) {
|
|
903
899
|
let t = o(() => {
|
|
904
|
-
let t =
|
|
900
|
+
let t = Ke(e.documentStyles());
|
|
905
901
|
return t.length > 0 ? t.map((t) => {
|
|
906
|
-
let n =
|
|
902
|
+
let n = Ie.find((e) => e.id === t.styleId);
|
|
907
903
|
return {
|
|
908
904
|
id: t.styleId,
|
|
909
905
|
label: n ? e.t(n.nameKey) : t.name,
|
|
910
|
-
previewStyle:
|
|
906
|
+
previewStyle: Ge(t)
|
|
911
907
|
};
|
|
912
|
-
}) :
|
|
908
|
+
}) : Ie.map((t) => ({
|
|
913
909
|
id: t.id,
|
|
914
910
|
label: e.t(t.nameKey),
|
|
915
|
-
previewStyle:
|
|
911
|
+
previewStyle: Ge({ styleId: t.id })
|
|
916
912
|
}));
|
|
917
913
|
});
|
|
918
914
|
return {
|
|
@@ -925,29 +921,29 @@ function Ge(e) {
|
|
|
925
921
|
}
|
|
926
922
|
//#endregion
|
|
927
923
|
//#region src/components/Toolbar.vue?vue&type=script&setup=true&lang.ts
|
|
928
|
-
var
|
|
924
|
+
var Je = {
|
|
929
925
|
key: 0,
|
|
930
926
|
class: "basic-toolbar"
|
|
931
|
-
},
|
|
927
|
+
}, Ye = [
|
|
932
928
|
"title",
|
|
933
929
|
"aria-label",
|
|
934
930
|
"disabled"
|
|
935
|
-
],
|
|
931
|
+
], Xe = [
|
|
936
932
|
"title",
|
|
937
933
|
"aria-label",
|
|
938
934
|
"disabled"
|
|
939
|
-
],
|
|
935
|
+
], Ze = ["disabled", "title"], Qe = ["aria-expanded", "title"], $e = ["disabled", "title"], et = ["onMousedown"], tt = ["aria-expanded", "title"], nt = ["onMousedown"], rt = ["aria-expanded", "title"], it = {
|
|
940
936
|
key: 0,
|
|
941
937
|
class: "toolbar-dropdown__group-label"
|
|
942
|
-
},
|
|
938
|
+
}, at = ["onMousedown"], ot = ["title"], st = [
|
|
943
939
|
"value",
|
|
944
940
|
"title",
|
|
945
941
|
"aria-expanded"
|
|
946
|
-
],
|
|
942
|
+
], ct = ["title"], lt = ["onMousedown"], ut = ["title", "aria-label"], dt = ["title", "aria-label"], ft = ["title", "aria-label"], pt = ["title", "aria-label"], mt = ["title", "aria-label"], ht = ["title", "aria-label"], gt = ["title", "aria-label"], _t = ["aria-expanded", "title"], vt = ["title"], yt = ["title"], bt = ["title"], xt = ["title"], St = ["title", "aria-label"], Ct = ["title", "aria-label"], wt = [
|
|
947
943
|
"title",
|
|
948
944
|
"aria-label",
|
|
949
945
|
"disabled"
|
|
950
|
-
],
|
|
946
|
+
], Tt = ["title", "aria-label"], Et = ["aria-expanded", "title"], Dt = ["onMousedown"], Ot = ["title", "aria-label"], kt = ["title", "aria-label"], At = ["title", "aria-label"], jt = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
951
947
|
__name: "Toolbar",
|
|
952
948
|
props: {
|
|
953
949
|
view: { default: null },
|
|
@@ -1005,14 +1001,14 @@ var Ke = {
|
|
|
1005
1001
|
"image-transform"
|
|
1006
1002
|
],
|
|
1007
1003
|
setup(e, { emit: t }) {
|
|
1008
|
-
let { ColorPicker: p } = i(), m = e, { t: h } = n(), v = t, y = o(() => m.zoomPercent ?? 100), x = o(() => m.isMinZoom ?? !1), T = o(() => m.isMaxZoom ?? !1), D = o(() => m.zoomPresets ??
|
|
1004
|
+
let { ColorPicker: p } = i(), m = e, { t: h } = n(), v = t, y = o(() => m.zoomPercent ?? 100), x = o(() => m.isMinZoom ?? !1), T = o(() => m.isMaxZoom ?? !1), D = o(() => m.zoomPresets ?? Re), k = o(() => m.showZoomControl ?? !0), A = S(null), j = S(null), M = S(null), N = S(null), I = S(null), R = S(null), { openDropdown: z, dropdownMenuStyle: B, toggleDropdown: V, recomputeDropdownPos: ee } = ze({
|
|
1009
1005
|
zoom: R,
|
|
1010
1006
|
style: A,
|
|
1011
1007
|
font: j,
|
|
1012
1008
|
size: M,
|
|
1013
1009
|
align: N,
|
|
1014
1010
|
spacing: I
|
|
1015
|
-
}),
|
|
1011
|
+
}), H = o(() => {
|
|
1016
1012
|
m.stateTick;
|
|
1017
1013
|
let e = m.view;
|
|
1018
1014
|
return e ? L(e.state) : {
|
|
@@ -1028,40 +1024,40 @@ var Ke = {
|
|
|
1028
1024
|
inDeletion: !1
|
|
1029
1025
|
};
|
|
1030
1026
|
}), K = o(() => {
|
|
1031
|
-
let e =
|
|
1027
|
+
let e = H.value.textFormatting.fontFamily;
|
|
1032
1028
|
return e?.ascii || e?.hAnsi || "Arial";
|
|
1033
1029
|
}), q = o(() => {
|
|
1034
|
-
let e =
|
|
1030
|
+
let e = H.value.textFormatting.fontSize;
|
|
1035
1031
|
return e ? e / 2 : 11;
|
|
1036
|
-
}), J = o(() =>
|
|
1032
|
+
}), J = o(() => H.value.paragraphFormatting.alignment || "left"), Y = o(() => {
|
|
1037
1033
|
switch (J.value) {
|
|
1038
1034
|
case "center": return "format_align_center";
|
|
1039
1035
|
case "right": return "format_align_right";
|
|
1040
1036
|
case "both": return "format_align_justify";
|
|
1041
1037
|
default: return "format_align_left";
|
|
1042
1038
|
}
|
|
1043
|
-
}), { resolvedParagraphStyles: te, currentStyleLabel: ne } =
|
|
1039
|
+
}), { resolvedParagraphStyles: te, currentStyleLabel: ne } = qe({
|
|
1044
1040
|
documentStyles: () => m.documentStyles,
|
|
1045
|
-
currentStyleId: () =>
|
|
1041
|
+
currentStyleId: () => H.value.paragraphFormatting.styleId || "Normal",
|
|
1046
1042
|
t: h
|
|
1047
1043
|
}), re = o(() => {
|
|
1048
1044
|
m.stateTick;
|
|
1049
1045
|
let e = m.view;
|
|
1050
|
-
return e ?
|
|
1046
|
+
return e ? W(e.state) > 0 : !1;
|
|
1051
1047
|
}), ie = o(() => {
|
|
1052
1048
|
m.stateTick;
|
|
1053
1049
|
let e = m.view;
|
|
1054
|
-
return e ?
|
|
1050
|
+
return e ? U(e.state) > 0 : !1;
|
|
1055
1051
|
}), ae = o(() => {
|
|
1056
|
-
let e =
|
|
1052
|
+
let e = H.value, t = e.inList && (e.listLevel ?? 0) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
|
|
1057
1053
|
return t || n;
|
|
1058
1054
|
}), oe = o(() => {
|
|
1059
|
-
let e =
|
|
1055
|
+
let e = H.value.textFormatting.color?.rgb;
|
|
1060
1056
|
return e ? e.replace(/^#/, "").toUpperCase() : void 0;
|
|
1061
1057
|
}), se = o(() => {
|
|
1062
|
-
let e =
|
|
1058
|
+
let e = H.value.textFormatting.highlight;
|
|
1063
1059
|
if (!(!e || e === "none")) return e.replace(/^#/, "").toUpperCase();
|
|
1064
|
-
}), X = o(() =>
|
|
1060
|
+
}), X = o(() => je(m.fontFamilies) ?? Pe), ce = o(() => Ne(m.documentFonts, X.value.map((e) => e.name))), le = o(() => [
|
|
1065
1061
|
{
|
|
1066
1062
|
label: h("font.documentFonts"),
|
|
1067
1063
|
fonts: ce.value
|
|
@@ -1096,10 +1092,10 @@ var Ke = {
|
|
|
1096
1092
|
function ue(e) {
|
|
1097
1093
|
Z("setFontFamily", e);
|
|
1098
1094
|
}
|
|
1099
|
-
let { onSizeFocus:
|
|
1095
|
+
let { onSizeFocus: de, onSizeInput: fe, commitFontSize: he, pickFontSize: ge, increaseFontSize: _e, decreaseFontSize: ve } = Be({
|
|
1100
1096
|
currentFontSize: q,
|
|
1101
1097
|
openDropdown: z,
|
|
1102
|
-
recomputeDropdownPos:
|
|
1098
|
+
recomputeDropdownPos: ee,
|
|
1103
1099
|
execCommand: Z
|
|
1104
1100
|
});
|
|
1105
1101
|
function ye(e) {
|
|
@@ -1109,11 +1105,11 @@ var Ke = {
|
|
|
1109
1105
|
}
|
|
1110
1106
|
Z("setTextColor", typeof e == "string" ? { rgb: e } : e);
|
|
1111
1107
|
}
|
|
1112
|
-
function
|
|
1108
|
+
function be() {
|
|
1113
1109
|
let e = m.view;
|
|
1114
|
-
e && (
|
|
1110
|
+
e && (G(e.state, (t) => e.dispatch(t), e), e.hasFocus() || e.focus());
|
|
1115
1111
|
}
|
|
1116
|
-
function
|
|
1112
|
+
function xe(e) {
|
|
1117
1113
|
Z("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
|
|
1118
1114
|
}
|
|
1119
1115
|
function Ce(e) {
|
|
@@ -1123,22 +1119,22 @@ var Ke = {
|
|
|
1123
1119
|
Z("setLineSpacing", e);
|
|
1124
1120
|
}
|
|
1125
1121
|
function Te(e) {
|
|
1126
|
-
let t =
|
|
1122
|
+
let t = H.value.paragraphFormatting.lineSpacing;
|
|
1127
1123
|
return t ? Math.abs(t - e) < 10 : e === 240;
|
|
1128
1124
|
}
|
|
1129
|
-
return (t, n) => e.view ? (b(), l("div",
|
|
1125
|
+
return (t, n) => e.view ? (b(), l("div", Je, [
|
|
1130
1126
|
u("button", {
|
|
1131
1127
|
title: O(h)("undoShortcut"),
|
|
1132
1128
|
"aria-label": O(h)("undo"),
|
|
1133
1129
|
disabled: !re.value,
|
|
1134
1130
|
onMousedown: n[0] ||= F((e) => Z("undo"), ["prevent"])
|
|
1135
|
-
}, [f(r, { name: "undo" })], 40,
|
|
1131
|
+
}, [f(r, { name: "undo" })], 40, Ye),
|
|
1136
1132
|
u("button", {
|
|
1137
1133
|
title: O(h)("redoShortcut"),
|
|
1138
1134
|
"aria-label": O(h)("redo"),
|
|
1139
1135
|
disabled: !ie.value,
|
|
1140
1136
|
onMousedown: n[1] ||= F((e) => Z("redo"), ["prevent"])
|
|
1141
|
-
}, [f(r, { name: "redo" })], 40,
|
|
1137
|
+
}, [f(r, { name: "redo" })], 40, Xe),
|
|
1142
1138
|
n[42] ||= u("span", { class: "divider" }, null, -1),
|
|
1143
1139
|
k.value ? (b(), l("div", {
|
|
1144
1140
|
key: 0,
|
|
@@ -1151,7 +1147,7 @@ var Ke = {
|
|
|
1151
1147
|
onMousedown: n[2] ||= F((e) => t.$emit("zoom-out"), ["prevent"]),
|
|
1152
1148
|
disabled: x.value,
|
|
1153
1149
|
title: O(h)("zoom.zoomOut")
|
|
1154
|
-
}, " − ", 40,
|
|
1150
|
+
}, " − ", 40, Ze),
|
|
1155
1151
|
u("button", {
|
|
1156
1152
|
class: "toolbar-dropdown__trigger zoom-trigger",
|
|
1157
1153
|
onMousedown: n[3] ||= F((e) => O(V)("zoom"), ["prevent"]),
|
|
@@ -1162,13 +1158,13 @@ var Ke = {
|
|
|
1162
1158
|
class: "chevron",
|
|
1163
1159
|
name: "arrow_drop_down",
|
|
1164
1160
|
size: 16
|
|
1165
|
-
})], 40,
|
|
1161
|
+
})], 40, Qe),
|
|
1166
1162
|
u("button", {
|
|
1167
1163
|
class: "size-btn",
|
|
1168
1164
|
onMousedown: n[4] ||= F((e) => t.$emit("zoom-in"), ["prevent"]),
|
|
1169
1165
|
disabled: T.value,
|
|
1170
1166
|
title: O(h)("zoom.zoomIn")
|
|
1171
|
-
}, " + ", 40,
|
|
1167
|
+
}, " + ", 40, $e),
|
|
1172
1168
|
O(z) === "zoom" ? (b(), l("div", {
|
|
1173
1169
|
key: 0,
|
|
1174
1170
|
style: _(O(B)),
|
|
@@ -1177,7 +1173,7 @@ var Ke = {
|
|
|
1177
1173
|
key: e,
|
|
1178
1174
|
class: g(["toolbar-dropdown__item", { active: y.value === Math.round(e * 100) }]),
|
|
1179
1175
|
onMousedown: F((n) => t.$emit("zoom-set", e), ["prevent"])
|
|
1180
|
-
}, E(Math.round(e * 100)) + "% ", 43,
|
|
1176
|
+
}, E(Math.round(e * 100)) + "% ", 43, et))), 128))], 4)) : c("", !0)
|
|
1181
1177
|
], 512)) : c("", !0),
|
|
1182
1178
|
n[43] ||= u("span", { class: "divider" }, null, -1),
|
|
1183
1179
|
u("div", {
|
|
@@ -1194,15 +1190,15 @@ var Ke = {
|
|
|
1194
1190
|
class: "chevron",
|
|
1195
1191
|
name: "arrow_drop_down",
|
|
1196
1192
|
size: 16
|
|
1197
|
-
})], 40,
|
|
1193
|
+
})], 40, tt), O(z) === "style" ? (b(), l("div", {
|
|
1198
1194
|
key: 0,
|
|
1199
1195
|
style: _(O(B)),
|
|
1200
1196
|
class: "toolbar-dropdown__menu style-menu"
|
|
1201
1197
|
}, [(b(!0), l(a, null, C(O(te), (e) => (b(), l("button", {
|
|
1202
1198
|
key: e.id,
|
|
1203
|
-
class: g(["toolbar-dropdown__item", { active: (
|
|
1199
|
+
class: g(["toolbar-dropdown__item", { active: (H.value.paragraphFormatting.styleId || "Normal") === e.id }]),
|
|
1204
1200
|
onMousedown: F((t) => Ce(e.id), ["prevent"])
|
|
1205
|
-
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42,
|
|
1201
|
+
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42, nt))), 128))], 4)) : c("", !0)], 512),
|
|
1206
1202
|
n[44] ||= u("span", { class: "divider" }, null, -1),
|
|
1207
1203
|
u("div", {
|
|
1208
1204
|
class: "toolbar-dropdown",
|
|
@@ -1218,16 +1214,16 @@ var Ke = {
|
|
|
1218
1214
|
class: "chevron",
|
|
1219
1215
|
name: "arrow_drop_down",
|
|
1220
1216
|
size: 16
|
|
1221
|
-
})], 40,
|
|
1217
|
+
})], 40, rt), O(z) === "font" ? (b(), l("div", {
|
|
1222
1218
|
key: 0,
|
|
1223
1219
|
style: _(O(B)),
|
|
1224
1220
|
class: "toolbar-dropdown__menu font-menu"
|
|
1225
|
-
}, [(b(!0), l(a, null, C(le.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div",
|
|
1221
|
+
}, [(b(!0), l(a, null, C(le.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", it, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
|
|
1226
1222
|
key: e.name,
|
|
1227
1223
|
class: g(["toolbar-dropdown__item", { active: K.value === e.name }]),
|
|
1228
1224
|
style: _({ fontFamily: e.fontFamily }),
|
|
1229
1225
|
onMousedown: F((t) => ue(e.name), ["prevent"])
|
|
1230
|
-
}, E(e.name), 47,
|
|
1226
|
+
}, E(e.name), 47, at))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
|
|
1231
1227
|
u("div", {
|
|
1232
1228
|
class: "toolbar-dropdown font-size-group",
|
|
1233
1229
|
ref_key: "sizeDropdownRef",
|
|
@@ -1237,64 +1233,64 @@ var Ke = {
|
|
|
1237
1233
|
class: "size-btn",
|
|
1238
1234
|
onMousedown: n[7] ||= F((...e) => O(ve) && O(ve)(...e), ["prevent"]),
|
|
1239
1235
|
title: O(h)("decreaseFontSize")
|
|
1240
|
-
}, " − ", 40,
|
|
1236
|
+
}, " − ", 40, ot),
|
|
1241
1237
|
u("input", {
|
|
1242
1238
|
class: "size-trigger size-input",
|
|
1243
1239
|
type: "text",
|
|
1244
1240
|
value: q.value,
|
|
1245
1241
|
title: O(h)("fontSize"),
|
|
1246
1242
|
onMousedown: n[8] ||= F(() => {}, ["stop"]),
|
|
1247
|
-
onFocus: n[9] ||= (...e) => O(
|
|
1243
|
+
onFocus: n[9] ||= (...e) => O(de) && O(de)(...e),
|
|
1248
1244
|
"aria-expanded": O(z) === "size",
|
|
1249
1245
|
"aria-haspopup": "listbox",
|
|
1250
|
-
onInput: n[10] ||= (...e) => O(
|
|
1246
|
+
onInput: n[10] ||= (...e) => O(fe) && O(fe)(...e),
|
|
1251
1247
|
onKeydown: [
|
|
1252
1248
|
n[11] ||= P(F((e) => O(_e)(), ["prevent", "stop"]), ["up"]),
|
|
1253
1249
|
n[12] ||= P(F((e) => O(ve)(), ["prevent", "stop"]), ["down"]),
|
|
1254
1250
|
n[13] ||= P(F((e) => O(he)(e), ["prevent"]), ["enter"])
|
|
1255
1251
|
],
|
|
1256
1252
|
onBlur: n[14] ||= (e) => O(he)(e)
|
|
1257
|
-
}, null, 40,
|
|
1253
|
+
}, null, 40, st),
|
|
1258
1254
|
u("button", {
|
|
1259
1255
|
class: "size-btn",
|
|
1260
1256
|
onMousedown: n[15] ||= F((...e) => O(_e) && O(_e)(...e), ["prevent"]),
|
|
1261
1257
|
title: O(h)("increaseFontSize")
|
|
1262
|
-
}, " + ", 40,
|
|
1258
|
+
}, " + ", 40, ct),
|
|
1263
1259
|
O(z) === "size" ? (b(), l("div", {
|
|
1264
1260
|
key: 0,
|
|
1265
1261
|
style: _(O(B)),
|
|
1266
1262
|
class: "toolbar-dropdown__menu size-menu"
|
|
1267
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1263
|
+
}, [(b(!0), l(a, null, C(O(Fe), (e) => (b(), l("button", {
|
|
1268
1264
|
key: e,
|
|
1269
1265
|
class: g(["toolbar-dropdown__item", { active: q.value === e }]),
|
|
1270
1266
|
onMousedown: F((t) => O(ge)(e), ["prevent"])
|
|
1271
|
-
}, E(e), 43,
|
|
1267
|
+
}, E(e), 43, lt))), 128))], 4)) : c("", !0)
|
|
1272
1268
|
], 512),
|
|
1273
1269
|
n[45] ||= u("span", { class: "divider" }, null, -1),
|
|
1274
1270
|
u("button", {
|
|
1275
1271
|
title: O(h)("boldShortcut"),
|
|
1276
1272
|
"aria-label": O(h)("bold"),
|
|
1277
|
-
class: g({ active:
|
|
1273
|
+
class: g({ active: H.value.textFormatting.bold }),
|
|
1278
1274
|
onMousedown: n[16] ||= F((e) => Z("toggleBold"), ["prevent"])
|
|
1279
|
-
}, [f(r, { name: "format_bold" })], 42,
|
|
1275
|
+
}, [f(r, { name: "format_bold" })], 42, ut),
|
|
1280
1276
|
u("button", {
|
|
1281
1277
|
title: O(h)("italicShortcut"),
|
|
1282
1278
|
"aria-label": O(h)("italic"),
|
|
1283
|
-
class: g({ active:
|
|
1279
|
+
class: g({ active: H.value.textFormatting.italic }),
|
|
1284
1280
|
onMousedown: n[17] ||= F((e) => Z("toggleItalic"), ["prevent"])
|
|
1285
|
-
}, [f(r, { name: "format_italic" })], 42,
|
|
1281
|
+
}, [f(r, { name: "format_italic" })], 42, dt),
|
|
1286
1282
|
u("button", {
|
|
1287
1283
|
title: O(h)("underlineShortcut"),
|
|
1288
1284
|
"aria-label": O(h)("underline"),
|
|
1289
|
-
class: g({ active: !!
|
|
1285
|
+
class: g({ active: !!H.value.textFormatting.underline }),
|
|
1290
1286
|
onMousedown: n[18] ||= F((e) => Z("toggleUnderline"), ["prevent"])
|
|
1291
|
-
}, [f(r, { name: "format_underlined" })], 42,
|
|
1287
|
+
}, [f(r, { name: "format_underlined" })], 42, ft),
|
|
1292
1288
|
u("button", {
|
|
1293
1289
|
title: O(h)("formattingBar.strikethrough"),
|
|
1294
1290
|
"aria-label": O(h)("formattingBar.strikethrough"),
|
|
1295
|
-
class: g({ active:
|
|
1291
|
+
class: g({ active: H.value.textFormatting.strike }),
|
|
1296
1292
|
onMousedown: n[19] ||= F((e) => Z("toggleStrike"), ["prevent"])
|
|
1297
|
-
}, [f(r, { name: "strikethrough_s" })], 42,
|
|
1293
|
+
}, [f(r, { name: "strikethrough_s" })], 42, pt),
|
|
1298
1294
|
f(O(p), {
|
|
1299
1295
|
mode: "text",
|
|
1300
1296
|
value: oe.value,
|
|
@@ -1305,25 +1301,25 @@ var Ke = {
|
|
|
1305
1301
|
mode: "highlight",
|
|
1306
1302
|
value: se.value,
|
|
1307
1303
|
theme: e.theme ?? null,
|
|
1308
|
-
onChange:
|
|
1304
|
+
onChange: xe
|
|
1309
1305
|
}, null, 8, ["value", "theme"]),
|
|
1310
1306
|
u("button", {
|
|
1311
1307
|
title: O(h)("formattingBar.insertLinkShortcut"),
|
|
1312
1308
|
"aria-label": O(h)("formattingBar.insertLink"),
|
|
1313
1309
|
onMousedown: n[20] ||= F((e) => t.$emit("insert-link"), ["prevent"])
|
|
1314
|
-
}, [f(r, { name: "link" })], 40,
|
|
1310
|
+
}, [f(r, { name: "link" })], 40, mt),
|
|
1315
1311
|
u("button", {
|
|
1316
1312
|
title: O(h)("formattingBar.superscriptShortcut"),
|
|
1317
1313
|
"aria-label": O(h)("formattingBar.superscript"),
|
|
1318
|
-
class: g({ active:
|
|
1314
|
+
class: g({ active: H.value.textFormatting.vertAlign === "superscript" }),
|
|
1319
1315
|
onMousedown: n[21] ||= F((e) => Z("toggleSuperscript"), ["prevent"])
|
|
1320
|
-
}, [f(r, { name: "superscript" })], 42,
|
|
1316
|
+
}, [f(r, { name: "superscript" })], 42, ht),
|
|
1321
1317
|
u("button", {
|
|
1322
1318
|
title: O(h)("formattingBar.subscriptShortcut"),
|
|
1323
1319
|
"aria-label": O(h)("formattingBar.subscript"),
|
|
1324
|
-
class: g({ active:
|
|
1320
|
+
class: g({ active: H.value.textFormatting.vertAlign === "subscript" }),
|
|
1325
1321
|
onMousedown: n[22] ||= F((e) => Z("toggleSubscript"), ["prevent"])
|
|
1326
|
-
}, [f(r, { name: "subscript" })], 42,
|
|
1322
|
+
}, [f(r, { name: "subscript" })], 42, gt),
|
|
1327
1323
|
n[46] ||= u("span", { class: "divider" }, null, -1),
|
|
1328
1324
|
u("div", {
|
|
1329
1325
|
class: "toolbar-dropdown",
|
|
@@ -1339,7 +1335,7 @@ var Ke = {
|
|
|
1339
1335
|
class: "chevron",
|
|
1340
1336
|
name: "arrow_drop_down",
|
|
1341
1337
|
size: 16
|
|
1342
|
-
})], 40,
|
|
1338
|
+
})], 40, _t), O(z) === "align" ? (b(), l("div", {
|
|
1343
1339
|
key: 0,
|
|
1344
1340
|
style: _(O(B)),
|
|
1345
1341
|
class: "toolbar-dropdown__menu align-strip"
|
|
@@ -1353,7 +1349,7 @@ var Ke = {
|
|
|
1353
1349
|
}, [f(r, {
|
|
1354
1350
|
name: "format_align_left",
|
|
1355
1351
|
size: 18
|
|
1356
|
-
})], 42,
|
|
1352
|
+
})], 42, vt),
|
|
1357
1353
|
u("button", {
|
|
1358
1354
|
class: g(["align-strip__btn", { active: J.value === "center" }]),
|
|
1359
1355
|
title: `${O(h)("alignCenter")} (${O(h)("alignment.centerShortcut")})`,
|
|
@@ -1363,7 +1359,7 @@ var Ke = {
|
|
|
1363
1359
|
}, [f(r, {
|
|
1364
1360
|
name: "format_align_center",
|
|
1365
1361
|
size: 18
|
|
1366
|
-
})], 42,
|
|
1362
|
+
})], 42, yt),
|
|
1367
1363
|
u("button", {
|
|
1368
1364
|
class: g(["align-strip__btn", { active: J.value === "right" }]),
|
|
1369
1365
|
title: `${O(h)("alignRight")} (${O(h)("alignment.alignRightShortcut")})`,
|
|
@@ -1373,7 +1369,7 @@ var Ke = {
|
|
|
1373
1369
|
}, [f(r, {
|
|
1374
1370
|
name: "format_align_right",
|
|
1375
1371
|
size: 18
|
|
1376
|
-
})], 42,
|
|
1372
|
+
})], 42, bt),
|
|
1377
1373
|
u("button", {
|
|
1378
1374
|
class: g(["align-strip__btn", { active: J.value === "both" }]),
|
|
1379
1375
|
title: `${O(h)("justify")} (${O(h)("alignment.justifyShortcut")})`,
|
|
@@ -1383,31 +1379,31 @@ var Ke = {
|
|
|
1383
1379
|
}, [f(r, {
|
|
1384
1380
|
name: "format_align_justify",
|
|
1385
1381
|
size: 18
|
|
1386
|
-
})], 42,
|
|
1382
|
+
})], 42, xt)
|
|
1387
1383
|
], 4)) : c("", !0)], 512),
|
|
1388
1384
|
u("button", {
|
|
1389
1385
|
title: O(h)("bulletList"),
|
|
1390
1386
|
"aria-label": O(h)("bulletList"),
|
|
1391
|
-
class: g({ active:
|
|
1387
|
+
class: g({ active: H.value.inList && H.value.listType === "bullet" }),
|
|
1392
1388
|
onMousedown: n[28] ||= F((e) => Z("toggleBulletList"), ["prevent"])
|
|
1393
|
-
}, [f(r, { name: "format_list_bulleted" })], 42,
|
|
1389
|
+
}, [f(r, { name: "format_list_bulleted" })], 42, St),
|
|
1394
1390
|
u("button", {
|
|
1395
1391
|
title: O(h)("numberedList"),
|
|
1396
1392
|
"aria-label": O(h)("numberedList"),
|
|
1397
|
-
class: g({ active:
|
|
1393
|
+
class: g({ active: H.value.inList && H.value.listType === "numbered" }),
|
|
1398
1394
|
onMousedown: n[29] ||= F((e) => Z("toggleNumberedList"), ["prevent"])
|
|
1399
|
-
}, [f(r, { name: "format_list_numbered" })], 42,
|
|
1395
|
+
}, [f(r, { name: "format_list_numbered" })], 42, Ct),
|
|
1400
1396
|
u("button", {
|
|
1401
1397
|
title: O(h)("decreaseIndent"),
|
|
1402
1398
|
"aria-label": O(h)("decreaseIndent"),
|
|
1403
1399
|
disabled: !ae.value,
|
|
1404
1400
|
onMousedown: n[30] ||= F((e) => Z("outdent"), ["prevent"])
|
|
1405
|
-
}, [f(r, { name: "format_indent_decrease" })], 40,
|
|
1401
|
+
}, [f(r, { name: "format_indent_decrease" })], 40, wt),
|
|
1406
1402
|
u("button", {
|
|
1407
1403
|
title: O(h)("increaseIndent"),
|
|
1408
1404
|
"aria-label": O(h)("increaseIndent"),
|
|
1409
1405
|
onMousedown: n[31] ||= F((e) => Z("indent"), ["prevent"])
|
|
1410
|
-
}, [f(r, { name: "format_indent_increase" })], 40,
|
|
1406
|
+
}, [f(r, { name: "format_indent_increase" })], 40, Tt),
|
|
1411
1407
|
u("div", {
|
|
1412
1408
|
class: "toolbar-dropdown",
|
|
1413
1409
|
ref_key: "spacingDropdownRef",
|
|
@@ -1422,42 +1418,42 @@ var Ke = {
|
|
|
1422
1418
|
class: "chevron",
|
|
1423
1419
|
name: "arrow_drop_down",
|
|
1424
1420
|
size: 16
|
|
1425
|
-
})], 40,
|
|
1421
|
+
})], 40, Et), O(z) === "spacing" ? (b(), l("div", {
|
|
1426
1422
|
key: 0,
|
|
1427
1423
|
style: _(O(B)),
|
|
1428
1424
|
class: "toolbar-dropdown__menu"
|
|
1429
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1425
|
+
}, [(b(!0), l(a, null, C(O(Le), (e) => (b(), l("button", {
|
|
1430
1426
|
key: e.value,
|
|
1431
1427
|
class: g(["toolbar-dropdown__item", { active: Te(e.value) }]),
|
|
1432
1428
|
onMousedown: F((t) => we(e.value), ["prevent"])
|
|
1433
|
-
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43,
|
|
1429
|
+
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43, Dt))), 128))], 4)) : c("", !0)], 512),
|
|
1434
1430
|
u("button", {
|
|
1435
1431
|
title: O(h)("formattingBar.clearFormatting"),
|
|
1436
1432
|
"aria-label": O(h)("formattingBar.clearFormatting"),
|
|
1437
|
-
onMousedown: F(
|
|
1438
|
-
}, [f(r, { name: "format_clear" })], 40,
|
|
1433
|
+
onMousedown: F(be, ["prevent"])
|
|
1434
|
+
}, [f(r, { name: "format_clear" })], 40, Ot),
|
|
1439
1435
|
n[47] ||= u("span", { class: "divider" }, null, -1),
|
|
1440
1436
|
u("button", {
|
|
1441
1437
|
title: O(h)("formattingBar.commentsAndChanges"),
|
|
1442
1438
|
"aria-label": O(h)("formattingBar.commentsAndChanges"),
|
|
1443
1439
|
class: g({ active: e.commentsSidebarOpen }),
|
|
1444
1440
|
onMousedown: n[33] ||= F((e) => t.$emit("toggle-sidebar"), ["prevent"])
|
|
1445
|
-
}, [f(r, { name: "comment" })], 42,
|
|
1441
|
+
}, [f(r, { name: "comment" })], 42, kt),
|
|
1446
1442
|
e.imageContext ? (b(), l(a, { key: 1 }, [
|
|
1447
1443
|
n[40] ||= u("span", { class: "divider" }, null, -1),
|
|
1448
|
-
f(
|
|
1444
|
+
f(pe, {
|
|
1449
1445
|
"image-context": e.imageContext,
|
|
1450
1446
|
onChange: n[34] ||= (e) => t.$emit("image-wrap-type", e)
|
|
1451
1447
|
}, null, 8, ["image-context"]),
|
|
1452
|
-
f(
|
|
1448
|
+
f(me, { onTransform: n[35] ||= (e) => t.$emit("image-transform", e) }),
|
|
1453
1449
|
u("button", {
|
|
1454
1450
|
title: O(h)("formattingBar.imagePropertiesShortcut"),
|
|
1455
1451
|
"aria-label": O(h)("formattingBar.imageProperties"),
|
|
1456
1452
|
onMousedown: n[36] ||= F((e) => t.$emit("image-properties"), ["prevent"])
|
|
1457
|
-
}, [f(r, { name: "tune" })], 40,
|
|
1453
|
+
}, [f(r, { name: "tune" })], 40, At)
|
|
1458
1454
|
], 64)) : c("", !0),
|
|
1459
1455
|
w(t.$slots, "table-context", {}, void 0, !0),
|
|
1460
|
-
e.showReviewControls ? (b(), l(a, { key: 2 }, [n[41] ||= u("span", { class: "divider" }, null, -1), f(
|
|
1456
|
+
e.showReviewControls ? (b(), l(a, { key: 2 }, [n[41] ||= u("span", { class: "divider" }, null, -1), f(Ae, {
|
|
1461
1457
|
"track-changes-on": e.trackChangesOn,
|
|
1462
1458
|
"display-mode": e.displayMode,
|
|
1463
1459
|
"read-only": e.readOnly,
|
|
@@ -1469,7 +1465,7 @@ var Ke = {
|
|
|
1469
1465
|
"read-only"
|
|
1470
1466
|
])], 64)) : c("", !0),
|
|
1471
1467
|
n[48] ||= u("span", { class: "divider" }, null, -1),
|
|
1472
|
-
e.editorMode ? (b(), s(
|
|
1468
|
+
e.editorMode ? (b(), s(Se, {
|
|
1473
1469
|
key: 3,
|
|
1474
1470
|
"model-value": e.editorMode,
|
|
1475
1471
|
"onUpdate:modelValue": n[39] ||= (e) => t.$emit("mode-change", e)
|
|
@@ -1477,7 +1473,7 @@ var Ke = {
|
|
|
1477
1473
|
w(t.$slots, "toolbar-extra", {}, void 0, !0)
|
|
1478
1474
|
])) : c("", !0);
|
|
1479
1475
|
}
|
|
1480
|
-
}), [["__scopeId", "data-v-e54d1eac"]]),
|
|
1476
|
+
}), [["__scopeId", "data-v-e54d1eac"]]), Mt = ["aria-valuemax"], Nt = { class: "docx-horizontal-ruler__ticks" }, Pt = ["title", "onDblclick"], Ft = 12240, It = 1440, Lt = 1440, Rt = 567, zt = "var(--doc-primary)", Bt = "var(--doc-primary)", Vt = "var(--doc-primary-hover)", Q = 5, Ht = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
1481
1477
|
__name: "HorizontalRuler",
|
|
1482
1478
|
props: {
|
|
1483
1479
|
sectionProps: {},
|
|
@@ -1511,12 +1507,12 @@ var Ke = {
|
|
|
1511
1507
|
setup(e, { emit: t }) {
|
|
1512
1508
|
let n = e, r = t, i = Math.round(Q * 1.6), s = S(null), d = S(null), f = S(null), p = S(0), m = S("");
|
|
1513
1509
|
function h(e) {
|
|
1514
|
-
return
|
|
1510
|
+
return ee(e) * n.zoom;
|
|
1515
1511
|
}
|
|
1516
1512
|
function g(e) {
|
|
1517
|
-
return Math.round(
|
|
1513
|
+
return Math.round(V(e / n.zoom));
|
|
1518
1514
|
}
|
|
1519
|
-
let y = o(() => n.sectionProps?.pageWidth ??
|
|
1515
|
+
let y = o(() => n.sectionProps?.pageWidth ?? Ft), x = o(() => n.sectionProps?.marginLeft ?? It), w = o(() => n.sectionProps?.marginRight ?? It), T = o(() => y.value - x.value - w.value), D = o(() => h(y.value)), O = o(() => h(x.value)), k = o(() => h(w.value)), A = o(() => h(n.indentLeft)), j = o(() => h(n.indentRight)), M = o(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), N = o(() => h(M.value)), P = o(() => O.value + A.value), I = o(() => D.value - k.value - j.value), L = o(() => O.value + A.value + N.value), R = o(() => ({
|
|
1520
1516
|
position: "relative",
|
|
1521
1517
|
width: D.value + "px",
|
|
1522
1518
|
height: "22px",
|
|
@@ -1524,7 +1520,7 @@ var Ke = {
|
|
|
1524
1520
|
overflow: "visible",
|
|
1525
1521
|
userSelect: "none",
|
|
1526
1522
|
cursor: d.value ? "ew-resize" : "default"
|
|
1527
|
-
})),
|
|
1523
|
+
})), z = o(() => ({
|
|
1528
1524
|
position: "absolute",
|
|
1529
1525
|
top: 0,
|
|
1530
1526
|
left: 0,
|
|
@@ -1534,7 +1530,7 @@ var Ke = {
|
|
|
1534
1530
|
borderRight: "1px solid var(--doc-shadow-subtle)",
|
|
1535
1531
|
cursor: n.editable ? "ew-resize" : "default",
|
|
1536
1532
|
zIndex: 1
|
|
1537
|
-
})),
|
|
1533
|
+
})), B = o(() => ({
|
|
1538
1534
|
position: "absolute",
|
|
1539
1535
|
top: 0,
|
|
1540
1536
|
right: 0,
|
|
@@ -1544,10 +1540,10 @@ var Ke = {
|
|
|
1544
1540
|
borderLeft: "1px solid var(--doc-shadow-subtle)",
|
|
1545
1541
|
cursor: n.editable ? "ew-resize" : "default",
|
|
1546
1542
|
zIndex: 1
|
|
1547
|
-
})),
|
|
1543
|
+
})), H = o(() => {
|
|
1548
1544
|
let e = [];
|
|
1549
1545
|
if (n.unit === "inch") {
|
|
1550
|
-
let t =
|
|
1546
|
+
let t = Lt / 8, n = Math.ceil(y.value / t);
|
|
1551
1547
|
for (let r = 0; r <= n; r++) {
|
|
1552
1548
|
let n = r * t;
|
|
1553
1549
|
if (n > y.value) break;
|
|
@@ -1568,7 +1564,7 @@ var Ke = {
|
|
|
1568
1564
|
});
|
|
1569
1565
|
}
|
|
1570
1566
|
} else {
|
|
1571
|
-
let t =
|
|
1567
|
+
let t = Rt / 10, n = Math.ceil(y.value / t);
|
|
1572
1568
|
for (let r = 0; r <= n; r++) {
|
|
1573
1569
|
let n = r * t;
|
|
1574
1570
|
if (n > y.value) break;
|
|
@@ -1596,10 +1592,10 @@ var Ke = {
|
|
|
1596
1592
|
};
|
|
1597
1593
|
}) : []);
|
|
1598
1594
|
function W(e) {
|
|
1599
|
-
return n.unit === "cm" ? (e /
|
|
1595
|
+
return n.unit === "cm" ? (e / Rt).toFixed(1) + " cm" : (e / Lt).toFixed(2) + "\"";
|
|
1600
1596
|
}
|
|
1601
1597
|
function G(e) {
|
|
1602
|
-
return d.value === e ?
|
|
1598
|
+
return d.value === e ? Vt : f.value === e ? Bt : zt;
|
|
1603
1599
|
}
|
|
1604
1600
|
function K(e, t, r) {
|
|
1605
1601
|
return {
|
|
@@ -1704,15 +1700,15 @@ var Ke = {
|
|
|
1704
1700
|
}, [
|
|
1705
1701
|
u("div", {
|
|
1706
1702
|
class: "docx-horizontal-ruler__margin",
|
|
1707
|
-
style: _(
|
|
1703
|
+
style: _(z.value),
|
|
1708
1704
|
onMousedown: n[0] ||= F((t) => e.editable ? Y("leftMargin", t) : null, ["prevent", "stop"])
|
|
1709
1705
|
}, null, 36),
|
|
1710
1706
|
u("div", {
|
|
1711
1707
|
class: "docx-horizontal-ruler__margin",
|
|
1712
|
-
style: _(
|
|
1708
|
+
style: _(B.value),
|
|
1713
1709
|
onMousedown: n[1] ||= F((t) => e.editable ? Y("rightMargin", t) : null, ["prevent", "stop"])
|
|
1714
1710
|
}, null, 36),
|
|
1715
|
-
u("div",
|
|
1711
|
+
u("div", Nt, [(b(!0), l(a, null, C(H.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
|
|
1716
1712
|
class: "docx-horizontal-ruler__tick-line",
|
|
1717
1713
|
style: _({
|
|
1718
1714
|
left: e.position + "px",
|
|
@@ -1753,15 +1749,15 @@ var Ke = {
|
|
|
1753
1749
|
style: _({ left: e.px + "px" }),
|
|
1754
1750
|
title: `${e.label}`,
|
|
1755
1751
|
onDblclick: F((n) => t.$emit("tab-stop-remove", e.twips), ["prevent"])
|
|
1756
|
-
}, " L ", 44,
|
|
1752
|
+
}, " L ", 44, Pt))), 128)),
|
|
1757
1753
|
d.value && m.value ? (b(), l("div", {
|
|
1758
1754
|
key: 3,
|
|
1759
1755
|
class: "docx-horizontal-ruler__tooltip",
|
|
1760
1756
|
style: _({ left: p.value + "px" })
|
|
1761
1757
|
}, E(m.value), 5)) : c("", !0)
|
|
1762
|
-
], 12,
|
|
1758
|
+
], 12, Mt));
|
|
1763
1759
|
}
|
|
1764
|
-
}), [["__scopeId", "data-v-6f3ea48c"]]),
|
|
1760
|
+
}), [["__scopeId", "data-v-6f3ea48c"]]), Ut = ["disabled", "onClick"], Wt = { class: "docx-tbp__panel" }, Gt = ["title", "onClick"], Kt = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
1765
1761
|
__name: "TableBorderPicker",
|
|
1766
1762
|
props: { disabled: { type: Boolean } },
|
|
1767
1763
|
emits: ["change"],
|
|
@@ -1835,8 +1831,8 @@ var Ke = {
|
|
|
1835
1831
|
}, [f(r, {
|
|
1836
1832
|
name: "border_all",
|
|
1837
1833
|
size: 20
|
|
1838
|
-
})], 8,
|
|
1839
|
-
panel: M(() => [u("div",
|
|
1834
|
+
})], 8, Ut)]),
|
|
1835
|
+
panel: M(() => [u("div", Wt, [(b(), l(a, null, C(d, (e) => u("button", {
|
|
1840
1836
|
key: e.value,
|
|
1841
1837
|
type: "button",
|
|
1842
1838
|
class: "docx-tbp__option",
|
|
@@ -1845,11 +1841,11 @@ var Ke = {
|
|
|
1845
1841
|
}, [f(r, {
|
|
1846
1842
|
name: e.icon,
|
|
1847
1843
|
size: 20
|
|
1848
|
-
}, null, 8, ["name"])], 8,
|
|
1844
|
+
}, null, 8, ["name"])], 8, Gt)), 64))])]),
|
|
1849
1845
|
_: 1
|
|
1850
1846
|
}, 8, ["open"]));
|
|
1851
1847
|
}
|
|
1852
|
-
}), [["__scopeId", "data-v-4e30a014"]]),
|
|
1848
|
+
}), [["__scopeId", "data-v-4e30a014"]]), qt = /* @__PURE__ */ p({
|
|
1853
1849
|
__name: "TableBorderColorPicker",
|
|
1854
1850
|
props: {
|
|
1855
1851
|
disabled: { type: Boolean },
|
|
@@ -1876,7 +1872,7 @@ var Ke = {
|
|
|
1876
1872
|
"title"
|
|
1877
1873
|
]));
|
|
1878
1874
|
}
|
|
1879
|
-
}),
|
|
1875
|
+
}), Jt = ["disabled", "onClick"], Yt = { class: "docx-tbwidth__panel" }, Xt = ["onClick"], Zt = { class: "docx-tbwidth__label" }, Qt = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
1880
1876
|
__name: "TableBorderWidthPicker",
|
|
1881
1877
|
props: { disabled: { type: Boolean } },
|
|
1882
1878
|
emits: ["change"],
|
|
@@ -1940,8 +1936,8 @@ var Ke = {
|
|
|
1940
1936
|
}, [f(r, {
|
|
1941
1937
|
name: "line_weight",
|
|
1942
1938
|
size: 20
|
|
1943
|
-
})], 8,
|
|
1944
|
-
panel: M(() => [u("div",
|
|
1939
|
+
})], 8, Jt)]),
|
|
1940
|
+
panel: M(() => [u("div", Yt, [(b(), l(a, null, C(d, (e) => u("button", {
|
|
1945
1941
|
key: e.eighths,
|
|
1946
1942
|
type: "button",
|
|
1947
1943
|
class: "docx-tbwidth__option",
|
|
@@ -1949,11 +1945,11 @@ var Ke = {
|
|
|
1949
1945
|
}, [u("span", {
|
|
1950
1946
|
class: "docx-tbwidth__preview",
|
|
1951
1947
|
style: _({ borderTopWidth: e.previewPx + "px" })
|
|
1952
|
-
}, null, 4), u("span",
|
|
1948
|
+
}, null, 4), u("span", Zt, E(e.label), 1)], 8, Xt)), 64))])]),
|
|
1953
1949
|
_: 1
|
|
1954
1950
|
}, 8, ["open"]));
|
|
1955
1951
|
}
|
|
1956
|
-
}), [["__scopeId", "data-v-42a746ba"]]),
|
|
1952
|
+
}), [["__scopeId", "data-v-42a746ba"]]), $t = /* @__PURE__ */ p({
|
|
1957
1953
|
__name: "TableCellFillPicker",
|
|
1958
1954
|
props: {
|
|
1959
1955
|
disabled: { type: Boolean },
|
|
@@ -1983,23 +1979,23 @@ var Ke = {
|
|
|
1983
1979
|
"auto-label"
|
|
1984
1980
|
]));
|
|
1985
1981
|
}
|
|
1986
|
-
}),
|
|
1982
|
+
}), en = [
|
|
1987
1983
|
"disabled",
|
|
1988
1984
|
"title",
|
|
1989
1985
|
"onClick"
|
|
1990
|
-
],
|
|
1986
|
+
], tn = ["aria-label"], nn = ["disabled"], rn = ["disabled"], an = ["disabled"], on = ["disabled"], sn = { class: "docx-tmore__section-label" }, cn = { class: "docx-tmore__icon-row" }, ln = ["title"], un = ["title"], dn = ["title"], fn = { class: "docx-tmore__section-label" }, pn = { class: "docx-tmore__icon-row" }, mn = ["title"], hn = ["title"], gn = ["title"], _n = { class: "docx-tmore__grow" }, vn = {
|
|
1991
1987
|
key: 0,
|
|
1992
1988
|
class: "docx-tmore__sub"
|
|
1993
|
-
},
|
|
1989
|
+
}, yn = { class: "docx-tmore__margin-grid" }, bn = { class: "docx-tmore__field-label" }, xn = ["onUpdate:modelValue"], Sn = { class: "docx-tmore__grow" }, Cn = {
|
|
1994
1990
|
key: 1,
|
|
1995
1991
|
class: "docx-tmore__sub"
|
|
1996
|
-
},
|
|
1992
|
+
}, wn = { class: "docx-tmore__row-field" }, Tn = { class: "docx-tmore__field-label" }, En = { value: "auto" }, Dn = { value: "atLeast" }, On = { value: "exact" }, kn = {
|
|
1997
1993
|
key: 0,
|
|
1998
1994
|
class: "docx-tmore__row-field"
|
|
1999
|
-
},
|
|
1995
|
+
}, An = { class: "docx-tmore__field-label" }, jn = { class: "docx-tmore__grow" }, Mn = {
|
|
2000
1996
|
key: 2,
|
|
2001
1997
|
class: "docx-tmore__sub docx-tmore__sub--list"
|
|
2002
|
-
},
|
|
1998
|
+
}, Nn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2003
1999
|
__name: "TableMoreDropdown",
|
|
2004
2000
|
props: {
|
|
2005
2001
|
disabled: {
|
|
@@ -2077,7 +2073,7 @@ var Ke = {
|
|
|
2077
2073
|
}, [f(r, {
|
|
2078
2074
|
name: "more_vert",
|
|
2079
2075
|
size: 20
|
|
2080
|
-
})], 10,
|
|
2076
|
+
})], 10, en)]),
|
|
2081
2077
|
panel: M(() => [u("div", {
|
|
2082
2078
|
class: "docx-tmore__panel",
|
|
2083
2079
|
role: "menu",
|
|
@@ -2124,7 +2120,7 @@ var Ke = {
|
|
|
2124
2120
|
}, [f(r, {
|
|
2125
2121
|
name: "call_merge",
|
|
2126
2122
|
size: 18
|
|
2127
|
-
}), u("span", null, E(O(m)("table.mergeCells")), 1)], 8,
|
|
2123
|
+
}), u("span", null, E(O(m)("table.mergeCells")), 1)], 8, nn),
|
|
2128
2124
|
u("button", {
|
|
2129
2125
|
type: "button",
|
|
2130
2126
|
class: "docx-tmore__item",
|
|
@@ -2133,7 +2129,7 @@ var Ke = {
|
|
|
2133
2129
|
}, [f(r, {
|
|
2134
2130
|
name: "call_split",
|
|
2135
2131
|
size: 18
|
|
2136
|
-
}), u("span", null, E(O(m)("table.splitCell")), 1)], 8,
|
|
2132
|
+
}), u("span", null, E(O(m)("table.splitCell")), 1)], 8, rn),
|
|
2137
2133
|
n[40] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2138
2134
|
u("button", {
|
|
2139
2135
|
type: "button",
|
|
@@ -2152,7 +2148,7 @@ var Ke = {
|
|
|
2152
2148
|
}, [f(r, {
|
|
2153
2149
|
name: "delete",
|
|
2154
2150
|
size: 18
|
|
2155
|
-
}), u("span", null, E(O(m)("deleteRow")), 1)], 8,
|
|
2151
|
+
}), u("span", null, E(O(m)("deleteRow")), 1)], 8, an),
|
|
2156
2152
|
u("button", {
|
|
2157
2153
|
type: "button",
|
|
2158
2154
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
@@ -2161,7 +2157,7 @@ var Ke = {
|
|
|
2161
2157
|
}, [f(r, {
|
|
2162
2158
|
name: "delete",
|
|
2163
2159
|
size: 18
|
|
2164
|
-
}), u("span", null, E(O(m)("deleteColumn")), 1)], 8,
|
|
2160
|
+
}), u("span", null, E(O(m)("deleteColumn")), 1)], 8, on),
|
|
2165
2161
|
u("button", {
|
|
2166
2162
|
type: "button",
|
|
2167
2163
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
@@ -2171,8 +2167,8 @@ var Ke = {
|
|
|
2171
2167
|
size: 18
|
|
2172
2168
|
}), u("span", null, E(O(m)("table.deleteTable")), 1)]),
|
|
2173
2169
|
n[42] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2174
|
-
u("div",
|
|
2175
|
-
u("div",
|
|
2170
|
+
u("div", sn, E(O(m)("tableAdvanced.verticalAlignment")), 1),
|
|
2171
|
+
u("div", cn, [
|
|
2176
2172
|
u("button", {
|
|
2177
2173
|
type: "button",
|
|
2178
2174
|
class: "docx-tmore__icon-btn",
|
|
@@ -2182,7 +2178,7 @@ var Ke = {
|
|
|
2182
2178
|
}, [f(r, {
|
|
2183
2179
|
name: "vertical_align_top",
|
|
2184
2180
|
size: 16
|
|
2185
|
-
})], 40,
|
|
2181
|
+
})], 40, ln),
|
|
2186
2182
|
u("button", {
|
|
2187
2183
|
type: "button",
|
|
2188
2184
|
class: "docx-tmore__icon-btn",
|
|
@@ -2192,7 +2188,7 @@ var Ke = {
|
|
|
2192
2188
|
}, [f(r, {
|
|
2193
2189
|
name: "vertical_align_center",
|
|
2194
2190
|
size: 16
|
|
2195
|
-
})], 40,
|
|
2191
|
+
})], 40, un),
|
|
2196
2192
|
u("button", {
|
|
2197
2193
|
type: "button",
|
|
2198
2194
|
class: "docx-tmore__icon-btn",
|
|
@@ -2202,11 +2198,11 @@ var Ke = {
|
|
|
2202
2198
|
}, [f(r, {
|
|
2203
2199
|
name: "vertical_align_bottom",
|
|
2204
2200
|
size: 16
|
|
2205
|
-
})], 40,
|
|
2201
|
+
})], 40, dn)
|
|
2206
2202
|
]),
|
|
2207
2203
|
n[43] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2208
|
-
u("div",
|
|
2209
|
-
u("div",
|
|
2204
|
+
u("div", fn, E(O(m)("tableAdvanced.tableAlignment")), 1),
|
|
2205
|
+
u("div", pn, [
|
|
2210
2206
|
u("button", {
|
|
2211
2207
|
type: "button",
|
|
2212
2208
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "left" }]),
|
|
@@ -2216,7 +2212,7 @@ var Ke = {
|
|
|
2216
2212
|
}, [f(r, {
|
|
2217
2213
|
name: "format_align_left",
|
|
2218
2214
|
size: 16
|
|
2219
|
-
})], 42,
|
|
2215
|
+
})], 42, mn),
|
|
2220
2216
|
u("button", {
|
|
2221
2217
|
type: "button",
|
|
2222
2218
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "center" }]),
|
|
@@ -2226,7 +2222,7 @@ var Ke = {
|
|
|
2226
2222
|
}, [f(r, {
|
|
2227
2223
|
name: "format_align_center",
|
|
2228
2224
|
size: 16
|
|
2229
|
-
})], 42,
|
|
2225
|
+
})], 42, hn),
|
|
2230
2226
|
u("button", {
|
|
2231
2227
|
type: "button",
|
|
2232
2228
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "right" }]),
|
|
@@ -2236,7 +2232,7 @@ var Ke = {
|
|
|
2236
2232
|
}, [f(r, {
|
|
2237
2233
|
name: "format_align_right",
|
|
2238
2234
|
size: 16
|
|
2239
|
-
})], 42,
|
|
2235
|
+
})], 42, gn)
|
|
2240
2236
|
]),
|
|
2241
2237
|
n[44] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2242
2238
|
u("button", {
|
|
@@ -2248,13 +2244,13 @@ var Ke = {
|
|
|
2248
2244
|
name: "padding",
|
|
2249
2245
|
size: 18
|
|
2250
2246
|
}),
|
|
2251
|
-
u("span",
|
|
2247
|
+
u("span", _n, E(O(m)("tableAdvanced.cellMargins")), 1),
|
|
2252
2248
|
f(r, {
|
|
2253
2249
|
name: _.value ? "expand_less" : "expand_more",
|
|
2254
2250
|
size: 18
|
|
2255
2251
|
}, null, 8, ["name"])
|
|
2256
2252
|
]),
|
|
2257
|
-
_.value ? (b(), l("div",
|
|
2253
|
+
_.value ? (b(), l("div", vn, [u("div", yn, [(b(), l(a, null, C([
|
|
2258
2254
|
"top",
|
|
2259
2255
|
"bottom",
|
|
2260
2256
|
"left",
|
|
@@ -2263,14 +2259,14 @@ var Ke = {
|
|
|
2263
2259
|
key: e,
|
|
2264
2260
|
class: "docx-tmore__field"
|
|
2265
2261
|
}, [
|
|
2266
|
-
u("span",
|
|
2262
|
+
u("span", bn, E(e), 1),
|
|
2267
2263
|
N(u("input", {
|
|
2268
2264
|
type: "number",
|
|
2269
2265
|
min: "0",
|
|
2270
2266
|
step: "20",
|
|
2271
2267
|
"onUpdate:modelValue": (t) => w[e] = t,
|
|
2272
2268
|
class: "docx-tmore__input"
|
|
2273
|
-
}, null, 8,
|
|
2269
|
+
}, null, 8, xn), [[
|
|
2274
2270
|
A,
|
|
2275
2271
|
w[e],
|
|
2276
2272
|
void 0,
|
|
@@ -2291,23 +2287,23 @@ var Ke = {
|
|
|
2291
2287
|
name: "height",
|
|
2292
2288
|
size: 18
|
|
2293
2289
|
}),
|
|
2294
|
-
u("span",
|
|
2290
|
+
u("span", Sn, E(O(m)("tableAdvanced.rowHeight")), 1),
|
|
2295
2291
|
f(r, {
|
|
2296
2292
|
name: v.value ? "expand_less" : "expand_more",
|
|
2297
2293
|
size: 18
|
|
2298
2294
|
}, null, 8, ["name"])
|
|
2299
2295
|
]),
|
|
2300
|
-
v.value ? (b(), l("div",
|
|
2301
|
-
u("label",
|
|
2296
|
+
v.value ? (b(), l("div", Cn, [
|
|
2297
|
+
u("label", wn, [u("span", Tn, E(O(m)("tableAdvanced.rule")), 1), N(u("select", {
|
|
2302
2298
|
"onUpdate:modelValue": n[24] ||= (e) => D.value = e,
|
|
2303
2299
|
class: "docx-tmore__select"
|
|
2304
2300
|
}, [
|
|
2305
|
-
u("option",
|
|
2306
|
-
u("option",
|
|
2307
|
-
u("option",
|
|
2301
|
+
u("option", En, E(O(m)("tableAdvanced.heightRules.auto")), 1),
|
|
2302
|
+
u("option", Dn, E(O(m)("tableAdvanced.heightRules.atLeast")), 1),
|
|
2303
|
+
u("option", On, E(O(m)("tableAdvanced.heightRules.exact")), 1)
|
|
2308
2304
|
], 512), [[k, D.value]])]),
|
|
2309
|
-
D.value === "auto" ? c("", !0) : (b(), l("label",
|
|
2310
|
-
u("span",
|
|
2305
|
+
D.value === "auto" ? c("", !0) : (b(), l("label", kn, [
|
|
2306
|
+
u("span", An, E(O(m)("tableAdvanced.height")), 1),
|
|
2311
2307
|
N(u("input", {
|
|
2312
2308
|
type: "number",
|
|
2313
2309
|
min: "0",
|
|
@@ -2337,13 +2333,13 @@ var Ke = {
|
|
|
2337
2333
|
name: "text_rotation_none",
|
|
2338
2334
|
size: 18
|
|
2339
2335
|
}),
|
|
2340
|
-
u("span",
|
|
2336
|
+
u("span", jn, E(O(m)("textDirection")), 1),
|
|
2341
2337
|
f(r, {
|
|
2342
2338
|
name: y.value ? "expand_less" : "expand_more",
|
|
2343
2339
|
size: 18
|
|
2344
2340
|
}, null, 8, ["name"])
|
|
2345
2341
|
]),
|
|
2346
|
-
y.value ? (b(), l("div",
|
|
2342
|
+
y.value ? (b(), l("div", Mn, [
|
|
2347
2343
|
u("button", {
|
|
2348
2344
|
type: "button",
|
|
2349
2345
|
class: "docx-tmore__sub-item",
|
|
@@ -2402,11 +2398,11 @@ var Ke = {
|
|
|
2402
2398
|
name: "settings",
|
|
2403
2399
|
size: 18
|
|
2404
2400
|
}), u("span", null, E(O(m)("tableAdvanced.tableProperties")), 1)])
|
|
2405
|
-
], 8,
|
|
2401
|
+
], 8, tn)]),
|
|
2406
2402
|
_: 1
|
|
2407
2403
|
}, 8, ["open"]));
|
|
2408
2404
|
}
|
|
2409
|
-
}), [["__scopeId", "data-v-5d357bc4"]]),
|
|
2405
|
+
}), [["__scopeId", "data-v-5d357bc4"]]), Pn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2410
2406
|
__name: "TableToolbar",
|
|
2411
2407
|
props: {
|
|
2412
2408
|
view: {},
|
|
@@ -2533,14 +2529,14 @@ var Ke = {
|
|
|
2533
2529
|
onRowHeight: N
|
|
2534
2530
|
}), (t, n) => d.value ? (b(), l(a, { key: 0 }, [
|
|
2535
2531
|
n[0] ||= u("span", { class: "divider" }, null, -1),
|
|
2536
|
-
f(
|
|
2537
|
-
f(
|
|
2538
|
-
f(
|
|
2539
|
-
f(
|
|
2532
|
+
f(Kt, { onChange: w }),
|
|
2533
|
+
f(qt, m({ theme: e.theme ?? null }, g.value, { onChange: T }), null, 16, ["theme"]),
|
|
2534
|
+
f(Qt, { onChange: E }),
|
|
2535
|
+
f($t, {
|
|
2540
2536
|
theme: e.theme ?? null,
|
|
2541
2537
|
onChange: D
|
|
2542
2538
|
}, null, 8, ["theme"]),
|
|
2543
|
-
f(
|
|
2539
|
+
f(Nn, {
|
|
2544
2540
|
"can-split": p.value,
|
|
2545
2541
|
"can-merge": _.value,
|
|
2546
2542
|
"row-count": v.value,
|
|
@@ -2559,7 +2555,7 @@ var Ke = {
|
|
|
2559
2555
|
])
|
|
2560
2556
|
], 64)) : c("", !0);
|
|
2561
2557
|
}
|
|
2562
|
-
}), [["__scopeId", "data-v-c73a7e43"]]),
|
|
2558
|
+
}), [["__scopeId", "data-v-c73a7e43"]]), Fn = { class: "docx-vertical-ruler__ticks" }, In = 15840, Ln = 1440, Rn = 1440, zn = 567, Bn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2563
2559
|
__name: "VerticalRuler",
|
|
2564
2560
|
props: {
|
|
2565
2561
|
sectionProps: {},
|
|
@@ -2574,12 +2570,12 @@ var Ke = {
|
|
|
2574
2570
|
setup(e, { emit: t }) {
|
|
2575
2571
|
let n = e, r = t, i = S(null), s = S(null);
|
|
2576
2572
|
function d(e) {
|
|
2577
|
-
return
|
|
2573
|
+
return ee(e) * n.zoom;
|
|
2578
2574
|
}
|
|
2579
2575
|
function f(e) {
|
|
2580
|
-
return Math.round(
|
|
2576
|
+
return Math.round(V(e / n.zoom));
|
|
2581
2577
|
}
|
|
2582
|
-
let p = o(() => n.sectionProps?.pageHeight ??
|
|
2578
|
+
let p = o(() => n.sectionProps?.pageHeight ?? In), m = o(() => n.sectionProps?.marginTop ?? Ln), h = o(() => n.sectionProps?.marginBottom ?? Ln), g = o(() => d(p.value)), y = o(() => d(m.value)), x = o(() => d(h.value)), w = o(() => ({
|
|
2583
2579
|
position: "relative",
|
|
2584
2580
|
width: "20px",
|
|
2585
2581
|
height: g.value + "px",
|
|
@@ -2590,7 +2586,7 @@ var Ke = {
|
|
|
2590
2586
|
})), T = o(() => {
|
|
2591
2587
|
let e = [];
|
|
2592
2588
|
if (n.unit === "inch") {
|
|
2593
|
-
let t =
|
|
2589
|
+
let t = Rn / 8, n = Math.ceil(p.value / t);
|
|
2594
2590
|
for (let r = 0; r <= n; r++) {
|
|
2595
2591
|
let n = r * t;
|
|
2596
2592
|
if (n > p.value) break;
|
|
@@ -2611,7 +2607,7 @@ var Ke = {
|
|
|
2611
2607
|
});
|
|
2612
2608
|
}
|
|
2613
2609
|
} else {
|
|
2614
|
-
let t =
|
|
2610
|
+
let t = zn / 10, n = Math.ceil(p.value / t);
|
|
2615
2611
|
for (let r = 0; r <= n; r++) {
|
|
2616
2612
|
let n = r * t;
|
|
2617
2613
|
if (n > p.value) break;
|
|
@@ -2677,7 +2673,7 @@ var Ke = {
|
|
|
2677
2673
|
"aria-label": "Vertical ruler",
|
|
2678
2674
|
"aria-orientation": "vertical"
|
|
2679
2675
|
}, [
|
|
2680
|
-
u("div",
|
|
2676
|
+
u("div", Fn, [(b(!0), l(a, null, C(T.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
|
|
2681
2677
|
class: "docx-vertical-ruler__tick-line",
|
|
2682
2678
|
style: _({
|
|
2683
2679
|
top: e.position + "px",
|
|
@@ -2709,10 +2705,10 @@ var Ke = {
|
|
|
2709
2705
|
}), [["__scopeId", "data-v-f7ccbd38"]]);
|
|
2710
2706
|
//#endregion
|
|
2711
2707
|
//#region src/utils/comments.ts
|
|
2712
|
-
function
|
|
2708
|
+
function Vn(e) {
|
|
2713
2709
|
return e?.length ? e.flatMap((e) => e.content.filter((e) => e.type === "run").flatMap((e) => "content" in e ? e.content : []).filter((e) => e.type === "text").map((e) => "text" in e ? e.text : "")).join("") : "";
|
|
2714
2710
|
}
|
|
2715
|
-
function
|
|
2711
|
+
function Hn(e) {
|
|
2716
2712
|
return e ? new Date(e).toLocaleString(void 0, {
|
|
2717
2713
|
hour: "numeric",
|
|
2718
2714
|
minute: "2-digit",
|
|
@@ -2720,10 +2716,10 @@ function Bn(e) {
|
|
|
2720
2716
|
day: "numeric"
|
|
2721
2717
|
}) : "";
|
|
2722
2718
|
}
|
|
2723
|
-
function
|
|
2719
|
+
function Un(e) {
|
|
2724
2720
|
return e.split(/\s+/).map((e) => e[0]).join("").toUpperCase().slice(0, 2);
|
|
2725
2721
|
}
|
|
2726
|
-
var
|
|
2722
|
+
var Wn = [
|
|
2727
2723
|
"#6DCCB1",
|
|
2728
2724
|
"#79AAD9",
|
|
2729
2725
|
"#EE789D",
|
|
@@ -2737,28 +2733,28 @@ var Hn = [
|
|
|
2737
2733
|
"#E15759",
|
|
2738
2734
|
"#76B7B2"
|
|
2739
2735
|
];
|
|
2740
|
-
function
|
|
2736
|
+
function Gn(e) {
|
|
2741
2737
|
let t = 0;
|
|
2742
2738
|
for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
|
|
2743
|
-
return
|
|
2739
|
+
return Wn[Math.abs(t) % Wn.length] ?? "#888888";
|
|
2744
2740
|
}
|
|
2745
2741
|
function $(e, t = 50) {
|
|
2746
2742
|
return e.length > t ? e.slice(0, t) + "..." : e;
|
|
2747
2743
|
}
|
|
2748
2744
|
//#endregion
|
|
2749
2745
|
//#region src/components/sidebar/Avatar.vue
|
|
2750
|
-
var
|
|
2746
|
+
var Kn = /* @__PURE__ */ p({
|
|
2751
2747
|
__name: "Avatar",
|
|
2752
2748
|
props: {
|
|
2753
2749
|
name: { default: "U" },
|
|
2754
2750
|
size: { default: 32 }
|
|
2755
2751
|
},
|
|
2756
2752
|
setup(e) {
|
|
2757
|
-
let t = e, n = o(() =>
|
|
2753
|
+
let t = e, n = o(() => Un(t.name || "U")), r = o(() => ({
|
|
2758
2754
|
width: t.size + "px",
|
|
2759
2755
|
height: t.size + "px",
|
|
2760
2756
|
borderRadius: "50%",
|
|
2761
|
-
backgroundColor:
|
|
2757
|
+
backgroundColor: Gn(t.name || "U"),
|
|
2762
2758
|
color: "#fff",
|
|
2763
2759
|
display: "flex",
|
|
2764
2760
|
alignItems: "center",
|
|
@@ -2772,13 +2768,13 @@ var Wn = /* @__PURE__ */ p({
|
|
|
2772
2768
|
style: _(r.value)
|
|
2773
2769
|
}, E(n.value), 5));
|
|
2774
2770
|
}
|
|
2775
|
-
}),
|
|
2771
|
+
}), qn = {
|
|
2776
2772
|
key: 0,
|
|
2777
2773
|
class: "reply-thread"
|
|
2778
|
-
},
|
|
2774
|
+
}, Jn = {
|
|
2779
2775
|
key: 0,
|
|
2780
2776
|
class: "reply-thread__more"
|
|
2781
|
-
},
|
|
2777
|
+
}, Yn = { class: "reply-thread__header" }, Xn = { class: "reply-thread__author-block" }, Zn = { class: "reply-thread__author" }, Qn = { class: "reply-thread__date" }, $n = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2782
2778
|
__name: "ReplyThread",
|
|
2783
2779
|
props: {
|
|
2784
2780
|
replies: {},
|
|
@@ -2786,15 +2782,15 @@ var Wn = /* @__PURE__ */ p({
|
|
|
2786
2782
|
},
|
|
2787
2783
|
setup(e) {
|
|
2788
2784
|
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));
|
|
2789
|
-
return (t, i) => e.replies.length > 0 ? (b(), l("div",
|
|
2785
|
+
return (t, i) => e.replies.length > 0 ? (b(), l("div", qn, [r.value > 0 ? (b(), l("div", Jn, E(r.value) + " " + E(r.value === 1 ? "reply" : "replies"), 1)) : c("", !0), (b(!0), l(a, null, C(n.value, (t) => (b(), l("div", {
|
|
2790
2786
|
key: t.id,
|
|
2791
2787
|
class: g(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
|
|
2792
|
-
}, [u("div",
|
|
2788
|
+
}, [u("div", Yn, [f(Kn, {
|
|
2793
2789
|
name: t.author,
|
|
2794
2790
|
size: 28
|
|
2795
|
-
}, null, 8, ["name"]), u("div",
|
|
2791
|
+
}, null, 8, ["name"]), u("div", Xn, [u("div", Zn, E(t.author || "Unknown"), 1), u("div", Qn, E(O(Hn)(t.date)), 1)])]), u("div", { class: g(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, E(O(Vn)(t.content)), 3)], 2))), 128))])) : c("", !0);
|
|
2796
2792
|
}
|
|
2797
|
-
}), [["__scopeId", "data-v-06331fac"]]),
|
|
2793
|
+
}), [["__scopeId", "data-v-06331fac"]]), er = ["onKeydown"], tr = { class: "reply-input__actions" }, nr = ["disabled"], rr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2798
2794
|
__name: "ReplyInput",
|
|
2799
2795
|
emits: ["submit"],
|
|
2800
2796
|
setup(e, { emit: t }) {
|
|
@@ -2826,14 +2822,14 @@ var Wn = /* @__PURE__ */ p({
|
|
|
2826
2822
|
P(F(p, ["prevent"]), ["enter"]),
|
|
2827
2823
|
P(f, ["esc"])
|
|
2828
2824
|
]
|
|
2829
|
-
}, null, 40,
|
|
2825
|
+
}, null, 40, er), [[A, i.value]]), u("div", tr, [u("button", {
|
|
2830
2826
|
class: "reply-input__cancel",
|
|
2831
2827
|
onClick: F(f, ["stop"])
|
|
2832
2828
|
}, "Cancel"), u("button", {
|
|
2833
2829
|
class: g(["reply-input__submit", { "reply-input__submit--active": c.value }]),
|
|
2834
2830
|
disabled: !c.value,
|
|
2835
2831
|
onClick: F(p, ["stop"])
|
|
2836
|
-
}, " Reply ", 10,
|
|
2832
|
+
}, " Reply ", 10, nr)])], 64)) : (b(), l("input", {
|
|
2837
2833
|
key: 0,
|
|
2838
2834
|
readonly: "",
|
|
2839
2835
|
placeholder: "Reply",
|
|
@@ -2842,13 +2838,13 @@ var Wn = /* @__PURE__ */ p({
|
|
|
2842
2838
|
onClick: F(d, ["stop"])
|
|
2843
2839
|
}, null, 32))], 32));
|
|
2844
2840
|
}
|
|
2845
|
-
}), [["__scopeId", "data-v-fea8646c"]]),
|
|
2841
|
+
}), [["__scopeId", "data-v-fea8646c"]]), ir = ["data-comment-id"], ar = {
|
|
2846
2842
|
key: 0,
|
|
2847
2843
|
class: "comment-card__resolved"
|
|
2848
|
-
},
|
|
2844
|
+
}, or = { class: "comment-card__head" }, sr = { class: "comment-card__author-block" }, cr = { class: "comment-card__author" }, lr = { class: "comment-card__date" }, ur = {
|
|
2849
2845
|
key: 0,
|
|
2850
2846
|
class: "comment-card__actions"
|
|
2851
|
-
},
|
|
2847
|
+
}, dr = ["title"], fr = { class: "comment-card__body" }, pr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2852
2848
|
__name: "CommentCard",
|
|
2853
2849
|
props: {
|
|
2854
2850
|
comment: {},
|
|
@@ -2873,17 +2869,17 @@ var Wn = /* @__PURE__ */ p({
|
|
|
2873
2869
|
onClick: n[5] ||= (e) => t.$emit("click"),
|
|
2874
2870
|
onMousedown: n[6] ||= F(() => {}, ["stop"])
|
|
2875
2871
|
}, [
|
|
2876
|
-
e.comment.done ? (b(), l("div",
|
|
2872
|
+
e.comment.done ? (b(), l("div", ar, [f(r, {
|
|
2877
2873
|
name: "check",
|
|
2878
2874
|
size: 12
|
|
2879
2875
|
}), n[7] ||= u("span", null, "Resolved", -1)])) : c("", !0),
|
|
2880
|
-
u("div",
|
|
2881
|
-
f(
|
|
2876
|
+
u("div", or, [
|
|
2877
|
+
f(Kn, {
|
|
2882
2878
|
name: e.comment.author,
|
|
2883
2879
|
size: 32
|
|
2884
2880
|
}, null, 8, ["name"]),
|
|
2885
|
-
u("div",
|
|
2886
|
-
e.expanded ? (b(), l("div",
|
|
2881
|
+
u("div", sr, [u("div", cr, E(e.comment.author || "Unknown"), 1), u("div", lr, E(O(Hn)(e.comment.date)), 1)]),
|
|
2882
|
+
e.expanded ? (b(), l("div", ur, [
|
|
2887
2883
|
u("button", {
|
|
2888
2884
|
class: "comment-card__icon-btn",
|
|
2889
2885
|
title: e.comment.done ? "Reopen" : "Resolve",
|
|
@@ -2891,7 +2887,7 @@ var Wn = /* @__PURE__ */ p({
|
|
|
2891
2887
|
}, [f(r, {
|
|
2892
2888
|
name: e.comment.done ? "undo" : "check",
|
|
2893
2889
|
size: 20
|
|
2894
|
-
}, null, 8, ["name"])], 8,
|
|
2890
|
+
}, null, 8, ["name"])], 8, dr),
|
|
2895
2891
|
u("button", {
|
|
2896
2892
|
class: "comment-card__icon-btn",
|
|
2897
2893
|
title: "More options",
|
|
@@ -2911,18 +2907,18 @@ var Wn = /* @__PURE__ */ p({
|
|
|
2911
2907
|
}, "Delete")], 32)) : c("", !0)
|
|
2912
2908
|
])) : c("", !0)
|
|
2913
2909
|
]),
|
|
2914
|
-
u("div",
|
|
2915
|
-
f(
|
|
2910
|
+
u("div", fr, E(O(Vn)(e.comment.content)), 1),
|
|
2911
|
+
f($n, {
|
|
2916
2912
|
replies: e.replies,
|
|
2917
2913
|
"is-expanded": e.expanded
|
|
2918
2914
|
}, null, 8, ["replies", "is-expanded"]),
|
|
2919
|
-
e.expanded && !e.comment.done ? (b(), s(
|
|
2915
|
+
e.expanded && !e.comment.done ? (b(), s(rr, {
|
|
2920
2916
|
key: 1,
|
|
2921
2917
|
onSubmit: n[4] ||= (n) => t.$emit("reply", e.comment.id, n)
|
|
2922
2918
|
})) : c("", !0)
|
|
2923
|
-
], 42,
|
|
2919
|
+
], 42, ir));
|
|
2924
2920
|
}
|
|
2925
|
-
}), [["__scopeId", "data-v-7a3ee7ac"]]),
|
|
2921
|
+
}), [["__scopeId", "data-v-7a3ee7ac"]]), mr = ["data-comment-id"], hr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2926
2922
|
__name: "ResolvedCommentMarker",
|
|
2927
2923
|
props: { comment: {} },
|
|
2928
2924
|
emits: ["toggle-expand"],
|
|
@@ -2936,45 +2932,45 @@ var Wn = /* @__PURE__ */ p({
|
|
|
2936
2932
|
}, [f(r, {
|
|
2937
2933
|
name: "chat_bubble_check",
|
|
2938
2934
|
size: 20
|
|
2939
|
-
})], 40,
|
|
2935
|
+
})], 40, mr));
|
|
2940
2936
|
}
|
|
2941
|
-
}), [["__scopeId", "data-v-d0c228f6"]]),
|
|
2937
|
+
}), [["__scopeId", "data-v-d0c228f6"]]), gr = { class: "tc-card__head" }, _r = { class: "tc-card__author-block" }, vr = { class: "tc-card__author" }, yr = {
|
|
2942
2938
|
key: 0,
|
|
2943
2939
|
class: "tc-card__date"
|
|
2944
|
-
},
|
|
2940
|
+
}, br = {
|
|
2945
2941
|
key: 0,
|
|
2946
2942
|
class: "tc-card__actions"
|
|
2947
|
-
},
|
|
2943
|
+
}, xr = ["title"], Sr = ["title"], Cr = { class: "tc-card__body" }, wr = { class: "tc-card__deleted" }, Tr = { class: "tc-card__inserted" }, Er = { class: "tc-card__inserted" }, Dr = { class: "tc-card__deleted" }, Or = { class: "tc-card__changed" }, kr = { class: "tc-card__changed" }, Ar = {
|
|
2948
2944
|
key: 5,
|
|
2949
2945
|
class: "tc-card__inserted"
|
|
2950
|
-
},
|
|
2946
|
+
}, jr = {
|
|
2951
2947
|
key: 6,
|
|
2952
2948
|
class: "tc-card__deleted"
|
|
2953
|
-
},
|
|
2949
|
+
}, Mr = {
|
|
2954
2950
|
key: 7,
|
|
2955
2951
|
class: "tc-card__inserted"
|
|
2956
|
-
},
|
|
2952
|
+
}, Nr = {
|
|
2957
2953
|
key: 8,
|
|
2958
2954
|
class: "tc-card__deleted"
|
|
2959
|
-
},
|
|
2955
|
+
}, Pr = {
|
|
2960
2956
|
key: 9,
|
|
2961
2957
|
class: "tc-card__changed"
|
|
2962
|
-
},
|
|
2958
|
+
}, Fr = {
|
|
2963
2959
|
key: 10,
|
|
2964
2960
|
class: "tc-card__changed"
|
|
2965
|
-
},
|
|
2961
|
+
}, Ir = {
|
|
2966
2962
|
key: 11,
|
|
2967
2963
|
class: "tc-card__changed"
|
|
2968
|
-
},
|
|
2964
|
+
}, Lr = {
|
|
2969
2965
|
key: 12,
|
|
2970
2966
|
class: "tc-card__changed"
|
|
2971
|
-
},
|
|
2967
|
+
}, Rr = {
|
|
2972
2968
|
key: 13,
|
|
2973
2969
|
class: "tc-card__inserted"
|
|
2974
|
-
},
|
|
2970
|
+
}, zr = {
|
|
2975
2971
|
key: 14,
|
|
2976
2972
|
class: "tc-card__deleted"
|
|
2977
|
-
},
|
|
2973
|
+
}, Br = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2978
2974
|
__name: "TrackedChangeCard",
|
|
2979
2975
|
props: {
|
|
2980
2976
|
change: {},
|
|
@@ -3006,45 +3002,45 @@ var Wn = /* @__PURE__ */ p({
|
|
|
3006
3002
|
onClick: n[1] ||= (e) => t.$emit("click"),
|
|
3007
3003
|
onMousedown: n[2] ||= F(() => {}, ["stop"])
|
|
3008
3004
|
}, [
|
|
3009
|
-
u("div",
|
|
3010
|
-
f(
|
|
3005
|
+
u("div", gr, [
|
|
3006
|
+
f(Kn, {
|
|
3011
3007
|
name: h.value,
|
|
3012
3008
|
size: 32
|
|
3013
3009
|
}, null, 8, ["name"]),
|
|
3014
|
-
u("div",
|
|
3015
|
-
e.expanded ? (b(), l("div",
|
|
3010
|
+
u("div", _r, [u("div", vr, E(h.value), 1), e.change.date ? (b(), l("div", yr, E(O(Hn)(e.change.date)), 1)) : c("", !0)]),
|
|
3011
|
+
e.expanded ? (b(), l("div", br, [u("button", {
|
|
3016
3012
|
class: "tc-card__icon-btn",
|
|
3017
3013
|
title: O(i)("acceptChange"),
|
|
3018
3014
|
onClick: F(v, ["stop"])
|
|
3019
3015
|
}, [f(r, {
|
|
3020
3016
|
name: "check",
|
|
3021
3017
|
size: 20
|
|
3022
|
-
})], 8,
|
|
3018
|
+
})], 8, xr), u("button", {
|
|
3023
3019
|
class: "tc-card__icon-btn",
|
|
3024
3020
|
title: O(i)("rejectChange"),
|
|
3025
3021
|
onClick: F(y, ["stop"])
|
|
3026
3022
|
}, [f(r, {
|
|
3027
3023
|
name: "close",
|
|
3028
3024
|
size: 20
|
|
3029
|
-
})], 8,
|
|
3025
|
+
})], 8, Sr)])) : c("", !0)
|
|
3030
3026
|
]),
|
|
3031
|
-
u("div",
|
|
3027
|
+
u("div", Cr, [e.change.type === "replacement" ? (b(), l(a, { key: 0 }, [
|
|
3032
3028
|
d(E(O(i)("trackedChanges.replaced")) + " ", 1),
|
|
3033
|
-
u("span",
|
|
3029
|
+
u("span", wr, "\"" + E(O($)(e.change.deletedText || "")) + "\"", 1),
|
|
3034
3030
|
d(" " + E(O(i)("trackedChanges.with")) + " ", 1),
|
|
3035
|
-
u("span",
|
|
3036
|
-
], 64)) : e.change.type === "paragraphMarkInsertion" ? (b(), l(a, { key: 1 }, [d(E(O(i)("revisions.paragraphMarkInserted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[3] ||= d(": ", -1), u("span",
|
|
3037
|
-
f(
|
|
3031
|
+
u("span", Tr, "\"" + E(O($)(e.change.text)) + "\"", 1)
|
|
3032
|
+
], 64)) : e.change.type === "paragraphMarkInsertion" ? (b(), l(a, { key: 1 }, [d(E(O(i)("revisions.paragraphMarkInserted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[3] ||= d(": ", -1), u("span", Er, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "paragraphMarkDeletion" ? (b(), l(a, { key: 2 }, [d(E(O(i)("revisions.paragraphMarkDeleted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[4] ||= d(": ", -1), u("span", Dr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "paragraphPropertiesChanged" ? (b(), l(a, { key: 3 }, [d(E(O(i)("revisions.paragraphPropertiesChanged")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[5] ||= d(": ", -1), u("span", Or, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "runPropertiesChanged" ? (b(), l(a, { key: 4 }, [d(E(O(i)("revisions.runPropertiesChanged")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[6] ||= d(": ", -1), u("span", kr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "rowInserted" ? (b(), l("span", Ar, E(O(i)("revisions.rowInserted")), 1)) : e.change.type === "rowDeleted" ? (b(), l("span", jr, E(O(i)("revisions.rowDeleted")), 1)) : e.change.type === "cellInserted" ? (b(), l("span", Mr, E(O(i)("revisions.cellInserted")), 1)) : e.change.type === "cellDeleted" ? (b(), l("span", Nr, E(O(i)("revisions.cellDeleted")), 1)) : e.change.type === "cellMerged" ? (b(), l("span", Pr, E(O(i)("revisions.cellMerged")), 1)) : e.change.type === "rowPropertiesChanged" ? (b(), l("span", Fr, E(O(i)("revisions.rowPropertiesChanged")), 1)) : e.change.type === "cellPropertiesChanged" ? (b(), l("span", Ir, E(O(i)("revisions.cellPropertiesChanged")), 1)) : e.change.type === "tablePropertiesChanged" ? (b(), l("span", Lr, E(O(i)("revisions.tablePropertiesChanged")), 1)) : e.change.type === "tableInserted" ? (b(), l("span", Rr, E(O(i)("revisions.tableInserted")), 1)) : e.change.type === "tableDeleted" ? (b(), l("span", zr, E(O(i)("revisions.tableDeleted")), 1)) : (b(), l(a, { key: 15 }, [d(E(e.change.type === "insertion" ? O(i)("inserted") : O(i)("deleted")) + " ", 1), u("span", { class: g(e.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + E(O($)(e.change.text)) + "\" ", 3)], 64))]),
|
|
3033
|
+
f($n, {
|
|
3038
3034
|
replies: e.replies,
|
|
3039
3035
|
"is-expanded": e.expanded
|
|
3040
3036
|
}, null, 8, ["replies", "is-expanded"]),
|
|
3041
|
-
e.expanded ? (b(), s(
|
|
3037
|
+
e.expanded ? (b(), s(rr, {
|
|
3042
3038
|
key: 0,
|
|
3043
3039
|
onSubmit: n[0] ||= (n) => t.$emit("reply", e.change.revisionId, n)
|
|
3044
3040
|
})) : c("", !0)
|
|
3045
3041
|
], 34));
|
|
3046
3042
|
}
|
|
3047
|
-
}), [["__scopeId", "data-v-c16b1b1e"]]),
|
|
3043
|
+
}), [["__scopeId", "data-v-c16b1b1e"]]), Vr = ["onKeydown"], Hr = { class: "add-comment-card__actions" }, Ur = ["disabled"], Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3048
3044
|
__name: "AddCommentCard",
|
|
3049
3045
|
emits: ["submit", "cancel"],
|
|
3050
3046
|
setup(e, { emit: t }) {
|
|
@@ -3073,19 +3069,19 @@ var Wn = /* @__PURE__ */ p({
|
|
|
3073
3069
|
P(F(s, ["exact", "prevent"]), ["enter"]),
|
|
3074
3070
|
P(c, ["esc"])
|
|
3075
3071
|
]
|
|
3076
|
-
}, null, 40,
|
|
3072
|
+
}, null, 40, Vr), [[A, r.value]]), u("div", Hr, [u("button", {
|
|
3077
3073
|
class: "add-comment-card__cancel",
|
|
3078
3074
|
onClick: c
|
|
3079
3075
|
}, "Cancel"), u("button", {
|
|
3080
3076
|
class: g(["add-comment-card__submit", { "add-comment-card__submit--active": a.value }]),
|
|
3081
3077
|
disabled: !a.value,
|
|
3082
3078
|
onClick: s
|
|
3083
|
-
}, " Comment ", 10,
|
|
3079
|
+
}, " Comment ", 10, Ur)])], 32));
|
|
3084
3080
|
}
|
|
3085
3081
|
}), [["__scopeId", "data-v-2939f9cd"]]);
|
|
3086
3082
|
//#endregion
|
|
3087
3083
|
//#region src/composables/useCommentSidebarItems.ts
|
|
3088
|
-
function
|
|
3084
|
+
function Gr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
|
|
3089
3085
|
return o(() => {
|
|
3090
3086
|
let a = [];
|
|
3091
3087
|
r?.value && i?.value != null && a.push({
|
|
@@ -3128,7 +3124,7 @@ function Ur({ comments: e, trackedChanges: t, showResolved: n, isAddingComment:
|
|
|
3128
3124
|
}
|
|
3129
3125
|
//#endregion
|
|
3130
3126
|
//#region src/components/UnifiedSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
3131
|
-
var
|
|
3127
|
+
var Kr = ["data-card-id"], qr = 16, Jr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3132
3128
|
__name: "UnifiedSidebar",
|
|
3133
3129
|
props: {
|
|
3134
3130
|
isOpen: { type: Boolean },
|
|
@@ -3168,7 +3164,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3168
3164
|
let t = e.target;
|
|
3169
3165
|
t instanceof HTMLElement && t.closest(".unified-sidebar__card-slot") || f.value !== null && (i.value = null, r("update:activeItemId", null));
|
|
3170
3166
|
}
|
|
3171
|
-
let h =
|
|
3167
|
+
let h = Gr({
|
|
3172
3168
|
comments: D(n, "comments"),
|
|
3173
3169
|
trackedChanges: D(n, "trackedChanges"),
|
|
3174
3170
|
showResolved: o(() => n.showResolved ?? !1),
|
|
@@ -3191,12 +3187,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3191
3187
|
x.value = /* @__PURE__ */ new Map();
|
|
3192
3188
|
return;
|
|
3193
3189
|
}
|
|
3194
|
-
let r = e.getBoundingClientRect(), i = /* @__PURE__ */ new Map();
|
|
3195
|
-
for (let t of e.querySelectorAll("[data-comment-id]")) {
|
|
3196
|
-
let e = t.dataset.commentId;
|
|
3197
|
-
e && !i.has(e) && i.set(e, t);
|
|
3198
|
-
}
|
|
3199
|
-
let a = /* @__PURE__ */ new Map();
|
|
3190
|
+
let r = e.getBoundingClientRect(), i = B(e), a = /* @__PURE__ */ new Map();
|
|
3200
3191
|
for (let t of e.querySelectorAll(".docx-insertion[data-revision-id]")) {
|
|
3201
3192
|
let e = t.dataset.revisionId;
|
|
3202
3193
|
e && !a.has(e) && a.set(e, t);
|
|
@@ -3229,7 +3220,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3229
3220
|
t && l.set(t, e.offsetHeight);
|
|
3230
3221
|
}
|
|
3231
3222
|
let d = /* @__PURE__ */ new Map();
|
|
3232
|
-
for (let { item: n, y: r } of
|
|
3223
|
+
for (let { item: n, y: r } of K({
|
|
3233
3224
|
items: t,
|
|
3234
3225
|
anchorPositions: s,
|
|
3235
3226
|
renderedDomContext: R(e),
|
|
@@ -3246,7 +3237,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3246
3237
|
}), L = o(() => {
|
|
3247
3238
|
let e = f.value;
|
|
3248
3239
|
if (!e) return "";
|
|
3249
|
-
if (e.startsWith("comment-")) return
|
|
3240
|
+
if (e.startsWith("comment-")) return `${z(e.slice(8), ".paged-editor__pages ")} { background-color: rgba(255, 212, 0, 0.35) !important; border-bottom: 2px solid rgba(255, 212, 0, 0.7) !important; }`;
|
|
3250
3241
|
if (e.startsWith("tc-")) {
|
|
3251
3242
|
let t = e.split("-").at(1) ?? "";
|
|
3252
3243
|
return `
|
|
@@ -3255,8 +3246,8 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3255
3246
|
`;
|
|
3256
3247
|
}
|
|
3257
3248
|
return "";
|
|
3258
|
-
}),
|
|
3259
|
-
let e = n.pageWidthPx / 2 +
|
|
3249
|
+
}), V = o(() => {
|
|
3250
|
+
let e = n.pageWidthPx / 2 + qr - 176, t = x.value.size > 0 || h.value.length === 0;
|
|
3260
3251
|
return {
|
|
3261
3252
|
position: "absolute",
|
|
3262
3253
|
top: "0",
|
|
@@ -3265,7 +3256,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3265
3256
|
opacity: +!!t
|
|
3266
3257
|
};
|
|
3267
3258
|
});
|
|
3268
|
-
function
|
|
3259
|
+
function ee(e) {
|
|
3269
3260
|
let t = x.value.get(e);
|
|
3270
3261
|
return t == null ? {
|
|
3271
3262
|
position: "static",
|
|
@@ -3278,10 +3269,10 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3278
3269
|
transition: "top 0.15s ease"
|
|
3279
3270
|
};
|
|
3280
3271
|
}
|
|
3281
|
-
let
|
|
3282
|
-
function
|
|
3283
|
-
|
|
3284
|
-
|
|
3272
|
+
let H = !1;
|
|
3273
|
+
function U() {
|
|
3274
|
+
H || (H = !0, requestAnimationFrame(() => {
|
|
3275
|
+
H = !1, F();
|
|
3285
3276
|
}));
|
|
3286
3277
|
}
|
|
3287
3278
|
j(() => [
|
|
@@ -3292,8 +3283,8 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3292
3283
|
n.zoom,
|
|
3293
3284
|
n.isAddingComment,
|
|
3294
3285
|
n.addCommentYPosition
|
|
3295
|
-
], () =>
|
|
3296
|
-
function
|
|
3286
|
+
], () => U(), { immediate: !0 });
|
|
3287
|
+
function W(e) {
|
|
3297
3288
|
let t = e?.parentElement ?? null;
|
|
3298
3289
|
for (; t;) {
|
|
3299
3290
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -3302,16 +3293,16 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3302
3293
|
}
|
|
3303
3294
|
return null;
|
|
3304
3295
|
}
|
|
3305
|
-
let
|
|
3306
|
-
function
|
|
3307
|
-
|
|
3296
|
+
let G = null;
|
|
3297
|
+
function q() {
|
|
3298
|
+
G && G.removeEventListener("scroll", U), G = W(n.pagesContainer), G && G.addEventListener("scroll", U, { passive: !0 });
|
|
3308
3299
|
}
|
|
3309
3300
|
return y(() => {
|
|
3310
|
-
A = new ResizeObserver(() =>
|
|
3301
|
+
A = new ResizeObserver(() => U()), U(), n.pagesContainer && (k = new ResizeObserver(() => U()), k.observe(n.pagesContainer), q());
|
|
3311
3302
|
}), j(() => n.pagesContainer, (e) => {
|
|
3312
|
-
k?.disconnect(), k = null, e && (k = new ResizeObserver(() =>
|
|
3303
|
+
k?.disconnect(), k = null, e && (k = new ResizeObserver(() => U()), k.observe(e), q());
|
|
3313
3304
|
}), v(() => {
|
|
3314
|
-
k?.disconnect(), A?.disconnect(),
|
|
3305
|
+
k?.disconnect(), A?.disconnect(), G && G.removeEventListener("scroll", U);
|
|
3315
3306
|
}), (t, n) => (b(), l(a, null, [L.value ? (b(), s(T("style"), { key: 0 }, {
|
|
3316
3307
|
default: M(() => [d(E(L.value), 1)]),
|
|
3317
3308
|
_: 1
|
|
@@ -3320,7 +3311,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3320
3311
|
ref_key: "rootRef",
|
|
3321
3312
|
ref: g,
|
|
3322
3313
|
class: "unified-sidebar",
|
|
3323
|
-
style: _(
|
|
3314
|
+
style: _(V.value),
|
|
3324
3315
|
onMousedown: m
|
|
3325
3316
|
}, [u("div", {
|
|
3326
3317
|
class: "unified-sidebar__inner",
|
|
@@ -3329,16 +3320,16 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3329
3320
|
key: e.id,
|
|
3330
3321
|
class: "unified-sidebar__card-slot",
|
|
3331
3322
|
"data-card-id": e.id,
|
|
3332
|
-
style: _(
|
|
3333
|
-
}, [e.kind === "add-comment" ? (b(), s(
|
|
3323
|
+
style: _(ee(e.id))
|
|
3324
|
+
}, [e.kind === "add-comment" ? (b(), s(Wr, {
|
|
3334
3325
|
key: 0,
|
|
3335
3326
|
onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
|
|
3336
3327
|
onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
|
|
3337
|
-
})) : e.kind === "comment" && e.comment.done && f.value !== e.id ? (b(), s(
|
|
3328
|
+
})) : e.kind === "comment" && e.comment.done && f.value !== e.id ? (b(), s(hr, {
|
|
3338
3329
|
key: 1,
|
|
3339
3330
|
comment: e.comment,
|
|
3340
3331
|
onToggleExpand: (t) => p(e.id)
|
|
3341
|
-
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(
|
|
3332
|
+
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(pr, {
|
|
3342
3333
|
key: 2,
|
|
3343
3334
|
comment: e.comment,
|
|
3344
3335
|
replies: e.replies,
|
|
@@ -3353,7 +3344,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3353
3344
|
"replies",
|
|
3354
3345
|
"expanded",
|
|
3355
3346
|
"onClick"
|
|
3356
|
-
])) : e.kind === "tracked-change" ? (b(), s(
|
|
3347
|
+
])) : e.kind === "tracked-change" ? (b(), s(Br, {
|
|
3357
3348
|
key: 3,
|
|
3358
3349
|
change: e.change,
|
|
3359
3350
|
replies: e.replies ?? [],
|
|
@@ -3369,9 +3360,9 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3369
3360
|
"replies",
|
|
3370
3361
|
"expanded",
|
|
3371
3362
|
"onClick"
|
|
3372
|
-
])) : c("", !0)], 12,
|
|
3363
|
+
])) : c("", !0)], 12, Kr))), 128))], 4)], 36)) : c("", !0)], 64));
|
|
3373
3364
|
}
|
|
3374
|
-
}), [["__scopeId", "data-v-
|
|
3365
|
+
}), [["__scopeId", "data-v-ced15719"]]), Yr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3375
3366
|
__name: "StylePicker",
|
|
3376
3367
|
props: {
|
|
3377
3368
|
value: {},
|
|
@@ -3430,12 +3421,12 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3430
3421
|
"class"
|
|
3431
3422
|
]));
|
|
3432
3423
|
}
|
|
3433
|
-
}), [["__scopeId", "data-v-06469e2c"]]),
|
|
3424
|
+
}), [["__scopeId", "data-v-06469e2c"]]), Xr = [
|
|
3434
3425
|
"disabled",
|
|
3435
3426
|
"title",
|
|
3436
3427
|
"aria-expanded",
|
|
3437
3428
|
"onClick"
|
|
3438
|
-
],
|
|
3429
|
+
], Zr = { class: "docx-align__panel" }, Qr = ["title", "onClick"], $r = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3439
3430
|
__name: "AlignmentButtons",
|
|
3440
3431
|
props: {
|
|
3441
3432
|
value: { default: "left" },
|
|
@@ -3494,8 +3485,8 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3494
3485
|
}, null, 8, ["name"]), f(r, {
|
|
3495
3486
|
name: "arrow_drop_down",
|
|
3496
3487
|
size: 14
|
|
3497
|
-
})], 10,
|
|
3498
|
-
panel: M(() => [u("div",
|
|
3488
|
+
})], 10, Xr)]),
|
|
3489
|
+
panel: M(() => [u("div", Zr, [(b(), l(a, null, C(m, (t) => u("button", {
|
|
3499
3490
|
key: t.value,
|
|
3500
3491
|
type: "button",
|
|
3501
3492
|
class: g(["docx-align__option", { "docx-align__option--active": e.value === t.value }]),
|
|
@@ -3504,11 +3495,11 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3504
3495
|
}, [f(r, {
|
|
3505
3496
|
name: t.icon,
|
|
3506
3497
|
size: 20
|
|
3507
|
-
}, null, 8, ["name"])], 10,
|
|
3498
|
+
}, null, 8, ["name"])], 10, Qr)), 64))])]),
|
|
3508
3499
|
_: 1
|
|
3509
3500
|
}, 8, ["open"]));
|
|
3510
3501
|
}
|
|
3511
|
-
}), [["__scopeId", "data-v-088792b0"]]),
|
|
3502
|
+
}), [["__scopeId", "data-v-088792b0"]]), ei = { class: "docx-list-btns" }, ti = ["disabled"], ni = ["disabled"], ri = ["disabled"], ii = ["disabled"], ai = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3512
3503
|
__name: "ListButtons",
|
|
3513
3504
|
props: {
|
|
3514
3505
|
listState: {},
|
|
@@ -3532,7 +3523,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3532
3523
|
"outdent"
|
|
3533
3524
|
],
|
|
3534
3525
|
setup(e) {
|
|
3535
|
-
return (t, n) => (b(), l("span",
|
|
3526
|
+
return (t, n) => (b(), l("span", ei, [
|
|
3536
3527
|
u("button", {
|
|
3537
3528
|
type: "button",
|
|
3538
3529
|
class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.isInList && e.listState?.type === "bullet" }]),
|
|
@@ -3542,7 +3533,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3542
3533
|
}, [f(r, {
|
|
3543
3534
|
name: "format_list_bulleted",
|
|
3544
3535
|
size: 20
|
|
3545
|
-
})], 10,
|
|
3536
|
+
})], 10, ti),
|
|
3546
3537
|
u("button", {
|
|
3547
3538
|
type: "button",
|
|
3548
3539
|
class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.isInList && e.listState?.type === "numbered" }]),
|
|
@@ -3552,7 +3543,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3552
3543
|
}, [f(r, {
|
|
3553
3544
|
name: "format_list_numbered",
|
|
3554
3545
|
size: 20
|
|
3555
|
-
})], 10,
|
|
3546
|
+
})], 10, ni),
|
|
3556
3547
|
e.showIndentButtons ? (b(), l(a, { key: 0 }, [u("button", {
|
|
3557
3548
|
type: "button",
|
|
3558
3549
|
class: "docx-list-btns__btn",
|
|
@@ -3562,7 +3553,7 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3562
3553
|
}, [f(r, {
|
|
3563
3554
|
name: "format_indent_decrease",
|
|
3564
3555
|
size: 20
|
|
3565
|
-
})], 8,
|
|
3556
|
+
})], 8, ri), u("button", {
|
|
3566
3557
|
type: "button",
|
|
3567
3558
|
class: "docx-list-btns__btn",
|
|
3568
3559
|
disabled: e.disabled,
|
|
@@ -3571,9 +3562,9 @@ var Wr = ["data-card-id"], Gr = 16, Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
3571
3562
|
}, [f(r, {
|
|
3572
3563
|
name: "format_indent_increase",
|
|
3573
3564
|
size: 20
|
|
3574
|
-
})], 8,
|
|
3565
|
+
})], 8, ii)], 64)) : c("", !0)
|
|
3575
3566
|
]));
|
|
3576
3567
|
}
|
|
3577
3568
|
}), [["__scopeId", "data-v-82fa229d"]]);
|
|
3578
3569
|
//#endregion
|
|
3579
|
-
export {
|
|
3570
|
+
export { fe as C, J as D, re as E, pe as S, oe as T, Kt as _, Wr as a, Se as b, pr as c, Bn as d, Pn as f, qt as g, Qt as h, Jr as i, rr as l, $t as m, $r as n, Br as o, Nn as p, Yr as r, hr as s, ai as t, $n as u, Ht as v, le as w, me as x, jt as y };
|