@stll/folio-vue 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ListButtons-BeELtp_-.js → ListButtons-1YJNViXB.js} +425 -420
- package/dist/ListButtons-Cw5RTKNt.cjs +4 -0
- package/dist/{SplitCellDialog-CSqbtDum.js → SplitCellDialog-CWvjxbog.js} +1378 -1372
- package/dist/SplitCellDialog-Dpp-FPQ6.cjs +15 -0
- package/dist/components/DocxEditor/DocxEditorDialogs.vue.d.ts +3 -9
- package/dist/components/DocxEditor/types.d.ts +9 -0
- package/dist/components/DocxEditor.vue.d.ts +3 -0
- package/dist/components/UnifiedSidebar.vue.d.ts +2 -2
- package/dist/components/dialogs/FindReplaceDialog.vue.d.ts +3 -11
- package/dist/composables/useDocxEditorRefApi.d.ts +2 -0
- package/dist/composables/useFindReplace.d.ts +36 -18
- package/dist/composables.cjs +2 -2
- package/dist/composables.js +2 -3
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +1 -1
- package/dist/folio-vue.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1520 -1501
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +2 -2
- package/dist/useZoom-C_sQUu4b.js +1010 -0
- package/dist/useZoom-CbH76z8x.cjs +1 -0
- package/package.json +2 -2
- package/dist/ListButtons-B8HxA64I.cjs +0 -4
- package/dist/SplitCellDialog-DzKBu09z.cjs +0 -15
- package/dist/useFindReplace-BbW0xWo7.js +0 -74
- package/dist/useFindReplace-neQmDh2i.cjs +0 -1
- package/dist/useZoom-B1miNAf_.cjs +0 -1
- package/dist/useZoom-Bw5gp69V.js +0 -887
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as e, F as t, N as n, P as r, y as i } from "./SplitCellDialog-
|
|
1
|
+
import { D as e, F as t, N as n, P as r, y as i } from "./SplitCellDialog-CWvjxbog.js";
|
|
2
2
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, reactive as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, toRef as D, unref as O, vModelSelect as k, vModelText as A, watch as j, withCtx as M, withDirectives as N, withKeys as P, withModifiers as F } from "vue";
|
|
3
3
|
import { NO_LIST_STATE as I, listStateLevel as L } from "@stll/folio-core/prosemirror";
|
|
4
4
|
import { getTableContext as R } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
|
|
@@ -7,14 +7,15 @@ import { PANEL_METRICS as B } from "@stll/folio-core/panel-layout";
|
|
|
7
7
|
import { createRenderedDomContext as V } from "@stll/folio-core/render-dom/RenderedDomContext";
|
|
8
8
|
import { commentAnchorSelector as H, indexCommentAnchors as U } from "@stll/folio-core/render-dom/commentAnchorAttributes";
|
|
9
9
|
import { sliceText as W } from "@stll/folio-core/utils/sliceText";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { pixelsToTwips as G, twipsToPixels as ee } from "@stll/folio-core/utils/units";
|
|
11
|
+
import { DISPLAY_MODES as K } from "@stll/folio-core/managers/EditorModeManager";
|
|
12
12
|
import { redoDepth as te, undoDepth as q } from "prosemirror-history";
|
|
13
13
|
import { clearFormatting as J } from "@stll/folio-core/prosemirror/commands/formatting";
|
|
14
14
|
import { executeEditorCommand as Y } from "@stll/folio-core/prosemirror/executeEditorCommand";
|
|
15
15
|
import { resolveSidebarItemPositions as X } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
|
|
16
|
+
import { getFindParagraphText as Z } from "@stll/folio-core/utils/findReplace";
|
|
16
17
|
//#region src/components/CommentMarginMarkers.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
-
var ne = ["title", "onClick"],
|
|
18
|
+
var ne = ["title", "onClick"], re = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
18
19
|
__name: "CommentMarginMarkers",
|
|
19
20
|
props: {
|
|
20
21
|
comments: {},
|
|
@@ -66,10 +67,10 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
66
67
|
size: 18
|
|
67
68
|
}, null, 8, ["name"])], 12, ne))), 128))], 36)) : c("", !0);
|
|
68
69
|
}
|
|
69
|
-
}), [["__scopeId", "data-v-bf75a017"]]),
|
|
70
|
+
}), [["__scopeId", "data-v-bf75a017"]]), ie = { class: "doc-name" }, ae = ["value"], oe = {
|
|
70
71
|
key: 1,
|
|
71
72
|
class: "doc-name__text"
|
|
72
|
-
},
|
|
73
|
+
}, se = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
73
74
|
__name: "DocumentName",
|
|
74
75
|
props: {
|
|
75
76
|
modelValue: {},
|
|
@@ -91,16 +92,16 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
91
92
|
let t = e.target;
|
|
92
93
|
t instanceof HTMLInputElement && (t.value.trim() || r("update:modelValue", "Untitled document.docx"));
|
|
93
94
|
}
|
|
94
|
-
return (t, n) => (b(), l("div",
|
|
95
|
+
return (t, n) => (b(), l("div", ie, [e.editable ? (b(), l("input", {
|
|
95
96
|
key: 0,
|
|
96
97
|
class: "doc-name__input",
|
|
97
98
|
value: i.value,
|
|
98
99
|
placeholder: "Untitled document",
|
|
99
100
|
onInput: a,
|
|
100
101
|
onBlur: s
|
|
101
|
-
}, null, 40,
|
|
102
|
+
}, null, 40, ae)) : (b(), l("span", oe, E(i.value || "Untitled document"), 1))]));
|
|
102
103
|
}
|
|
103
|
-
}), [["__scopeId", "data-v-ae6cb472"]]),
|
|
104
|
+
}), [["__scopeId", "data-v-ae6cb472"]]), ce = ["aria-selected", "onMouseenter"], le = { class: "docx-table-grid-inline__label" }, ue = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
104
105
|
__name: "TableGridInline",
|
|
105
106
|
props: {
|
|
106
107
|
gridRows: { default: 6 },
|
|
@@ -136,15 +137,15 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
136
137
|
i.value = e.r, s.value = e.c;
|
|
137
138
|
},
|
|
138
139
|
onClick: F(d, ["prevent"])
|
|
139
|
-
}, null, 42,
|
|
140
|
+
}, null, 42, ce))), 128))], 36), u("div", le, E(i.value > 0 && s.value > 0 ? `${s.value} × ${i.value}` : "Select size"), 1)]));
|
|
140
141
|
}
|
|
141
|
-
}), [["__scopeId", "data-v-79c593ca"]]),
|
|
142
|
+
}), [["__scopeId", "data-v-79c593ca"]]), de = {
|
|
142
143
|
class: "menu-bar",
|
|
143
144
|
role: "menubar"
|
|
144
|
-
},
|
|
145
|
+
}, fe = {
|
|
145
146
|
key: 1,
|
|
146
147
|
class: "menu-bar__break-submenu"
|
|
147
|
-
},
|
|
148
|
+
}, pe = ["onClick"], Q = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
148
149
|
__name: "MenuBar",
|
|
149
150
|
props: {
|
|
150
151
|
showFileOpen: {
|
|
@@ -240,7 +241,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
240
241
|
label: h("toolbar.reportIssue"),
|
|
241
242
|
onClick: g("reportIssue")
|
|
242
243
|
}]);
|
|
243
|
-
return (t, n) => (b(), l("div",
|
|
244
|
+
return (t, n) => (b(), l("div", de, [
|
|
244
245
|
f(O(d), {
|
|
245
246
|
label: O(h)("toolbar.file"),
|
|
246
247
|
items: _.value
|
|
@@ -253,12 +254,12 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
253
254
|
label: O(h)("toolbar.insert"),
|
|
254
255
|
items: y.value
|
|
255
256
|
}, {
|
|
256
|
-
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(
|
|
257
|
+
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(ue, {
|
|
257
258
|
key: 0,
|
|
258
259
|
onInsert: (e, n) => {
|
|
259
260
|
m("insert-table", e, n), t();
|
|
260
261
|
}
|
|
261
|
-
}, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div",
|
|
262
|
+
}, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div", fe, [(b(!0), l(a, null, C(x.value, (e) => (b(), l("button", {
|
|
262
263
|
key: e.action,
|
|
263
264
|
type: "button",
|
|
264
265
|
class: "menu-bar__break-item",
|
|
@@ -268,7 +269,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
268
269
|
}, [f(r, {
|
|
269
270
|
name: e.icon,
|
|
270
271
|
size: 18
|
|
271
|
-
}, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8,
|
|
272
|
+
}, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8, pe))), 128))])) : c("", !0)]),
|
|
272
273
|
_: 1
|
|
273
274
|
}, 8, ["label", "items"]),
|
|
274
275
|
e.showHelpMenu ? (b(), s(O(d), {
|
|
@@ -278,13 +279,13 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
278
279
|
}, null, 8, ["label", "items"])) : c("", !0)
|
|
279
280
|
]));
|
|
280
281
|
}
|
|
281
|
-
}), [["__scopeId", "data-v-bd3f3f2c"]]),
|
|
282
|
+
}), [["__scopeId", "data-v-bd3f3f2c"]]), me = [
|
|
282
283
|
"disabled",
|
|
283
284
|
"aria-label",
|
|
284
285
|
"title",
|
|
285
286
|
"aria-expanded",
|
|
286
287
|
"onClick"
|
|
287
|
-
],
|
|
288
|
+
], he = { class: "docx-icon-grid__panel" }, ge = ["title", "onClick"], _e = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
288
289
|
__name: "IconGridDropdown",
|
|
289
290
|
props: {
|
|
290
291
|
options: {},
|
|
@@ -320,8 +321,8 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
320
321
|
}, null, 8, ["name"]), f(r, {
|
|
321
322
|
name: "arrow_drop_down",
|
|
322
323
|
size: 14
|
|
323
|
-
})], 10,
|
|
324
|
-
panel: M(() => [u("div",
|
|
324
|
+
})], 10, me)]),
|
|
325
|
+
panel: M(() => [u("div", he, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
|
|
325
326
|
key: t.value,
|
|
326
327
|
type: "button",
|
|
327
328
|
class: g(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === t.value }]),
|
|
@@ -330,11 +331,11 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
330
331
|
}, [f(r, {
|
|
331
332
|
name: t.iconName,
|
|
332
333
|
size: 18
|
|
333
|
-
}, null, 8, ["name"])], 10,
|
|
334
|
+
}, null, 8, ["name"])], 10, ge))), 128))])]),
|
|
334
335
|
_: 1
|
|
335
336
|
}, 8, ["open"]));
|
|
336
337
|
}
|
|
337
|
-
}), [["__scopeId", "data-v-72fa875c"]]),
|
|
338
|
+
}), [["__scopeId", "data-v-72fa875c"]]), ve = /* @__PURE__ */ p({
|
|
338
339
|
__name: "ImageWrapDropdown",
|
|
339
340
|
props: {
|
|
340
341
|
imageContext: {},
|
|
@@ -381,7 +382,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
381
382
|
let e = t.imageContext;
|
|
382
383
|
return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
|
|
383
384
|
}), 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(
|
|
385
|
+
return (t, n) => (b(), s(_e, {
|
|
385
386
|
options: a.value,
|
|
386
387
|
"active-value": c.value,
|
|
387
388
|
"trigger-icon": u.value,
|
|
@@ -396,7 +397,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
396
397
|
"disabled"
|
|
397
398
|
]));
|
|
398
399
|
}
|
|
399
|
-
}),
|
|
400
|
+
}), ye = /* @__PURE__ */ p({
|
|
400
401
|
__name: "ImageTransformDropdown",
|
|
401
402
|
props: { disabled: { type: Boolean } },
|
|
402
403
|
emits: ["transform"],
|
|
@@ -427,7 +428,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
427
428
|
label: t(e.labelKey),
|
|
428
429
|
iconName: e.iconName
|
|
429
430
|
})));
|
|
430
|
-
return (n, r) => (b(), s(
|
|
431
|
+
return (n, r) => (b(), s(_e, {
|
|
431
432
|
options: i.value,
|
|
432
433
|
"trigger-icon": "rotate_right",
|
|
433
434
|
"tooltip-content": O(t)("imageTransform.tooltip"),
|
|
@@ -439,10 +440,10 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
439
440
|
"disabled"
|
|
440
441
|
]));
|
|
441
442
|
}
|
|
442
|
-
}),
|
|
443
|
+
}), be = ["title", "onClick"], xe = {
|
|
443
444
|
key: 0,
|
|
444
445
|
class: "editing-mode__label"
|
|
445
|
-
},
|
|
446
|
+
}, Se = { class: "editing-mode__panel" }, Ce = ["onClick"], we = { class: "editing-mode__option-text" }, Te = { class: "editing-mode__option-label" }, Ee = { class: "editing-mode__option-desc" }, De = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
446
447
|
__name: "EditingModeDropdown",
|
|
447
448
|
props: { modelValue: {} },
|
|
448
449
|
emits: ["update:modelValue"],
|
|
@@ -495,13 +496,13 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
495
496
|
name: D.value.icon,
|
|
496
497
|
size: 18
|
|
497
498
|
}, null, 8, ["name"]),
|
|
498
|
-
T.value ? c("", !0) : (b(), l("span",
|
|
499
|
+
T.value ? c("", !0) : (b(), l("span", xe, E(O(d)(D.value.labelKey)), 1)),
|
|
499
500
|
f(r, {
|
|
500
501
|
name: "arrow_drop_down",
|
|
501
502
|
size: 16
|
|
502
503
|
})
|
|
503
|
-
], 10,
|
|
504
|
-
panel: M(() => [u("div",
|
|
504
|
+
], 10, be)]),
|
|
505
|
+
panel: M(() => [u("div", Se, [(b(), l(a, null, C(x, (t) => u("button", {
|
|
505
506
|
key: t.value,
|
|
506
507
|
type: "button",
|
|
507
508
|
class: "editing-mode__option",
|
|
@@ -511,23 +512,23 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
511
512
|
name: t.icon,
|
|
512
513
|
size: 20
|
|
513
514
|
}, null, 8, ["name"]),
|
|
514
|
-
u("span",
|
|
515
|
+
u("span", we, [u("span", Te, E(O(d)(t.labelKey)), 1), u("span", Ee, E(O(d)(t.descKey)), 1)]),
|
|
515
516
|
t.value === e.modelValue ? (b(), s(r, {
|
|
516
517
|
key: 0,
|
|
517
518
|
name: "check",
|
|
518
519
|
size: 18,
|
|
519
520
|
class: "editing-mode__check"
|
|
520
521
|
})) : c("", !0)
|
|
521
|
-
], 8,
|
|
522
|
+
], 8, Ce)), 64))])]),
|
|
522
523
|
_: 1
|
|
523
524
|
}, 8, ["open"]));
|
|
524
525
|
}
|
|
525
|
-
}), [["__scopeId", "data-v-333d7e96"]]),
|
|
526
|
+
}), [["__scopeId", "data-v-333d7e96"]]), Oe = { class: "review-controls" }, ke = [
|
|
526
527
|
"disabled",
|
|
527
528
|
"aria-pressed",
|
|
528
529
|
"aria-label",
|
|
529
530
|
"title"
|
|
530
|
-
],
|
|
531
|
+
], Ae = { class: "review-controls__toggle-label" }, je = ["title", "onClick"], Me = { class: "review-controls__display-label" }, Ne = ["onClick"], Pe = { class: "review-controls__option-label" }, Fe = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
531
532
|
__name: "ReviewControls",
|
|
532
533
|
props: {
|
|
533
534
|
trackChangesOn: { type: Boolean },
|
|
@@ -552,7 +553,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
552
553
|
function w(e) {
|
|
553
554
|
h("update:display-mode", e), _.value = !1;
|
|
554
555
|
}
|
|
555
|
-
return (t, n) => (b(), l("div",
|
|
556
|
+
return (t, n) => (b(), l("div", Oe, [u("button", {
|
|
556
557
|
type: "button",
|
|
557
558
|
class: g(["review-controls__toggle", { "review-controls__toggle--on": e.trackChangesOn }]),
|
|
558
559
|
disabled: e.readOnly,
|
|
@@ -564,7 +565,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
564
565
|
}, [f(r, {
|
|
565
566
|
name: "edit_note",
|
|
566
567
|
size: 18
|
|
567
|
-
}), u("span",
|
|
568
|
+
}), u("span", Ae, E(e.trackChangesOn ? O(d)("trackingOn") : O(d)("trackingOff")), 1)], 42, ke), f(O(p), {
|
|
568
569
|
open: _.value,
|
|
569
570
|
placement: "bottom-right",
|
|
570
571
|
"onUpdate:open": n[4] ||= (e) => _.value = e,
|
|
@@ -581,49 +582,49 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
581
582
|
name: "visibility",
|
|
582
583
|
size: 16
|
|
583
584
|
}),
|
|
584
|
-
u("span",
|
|
585
|
+
u("span", Me, E(x.value), 1),
|
|
585
586
|
f(r, {
|
|
586
587
|
name: "arrow_drop_down",
|
|
587
588
|
size: 16
|
|
588
589
|
})
|
|
589
|
-
], 42,
|
|
590
|
+
], 42, je)]),
|
|
590
591
|
panel: M(() => [u("div", {
|
|
591
592
|
class: "review-controls__panel",
|
|
592
593
|
onMousedown: n[3] ||= F(() => {}, ["prevent"])
|
|
593
|
-
}, [(b(!0), l(a, null, C(O(
|
|
594
|
+
}, [(b(!0), l(a, null, C(O(K), (t) => (b(), l("button", {
|
|
594
595
|
key: t,
|
|
595
596
|
type: "button",
|
|
596
597
|
class: "review-controls__option",
|
|
597
598
|
onClick: F((e) => w(t), ["prevent"])
|
|
598
|
-
}, [u("span",
|
|
599
|
+
}, [u("span", Pe, E(y(t)), 1), t === e.displayMode ? (b(), s(r, {
|
|
599
600
|
key: 0,
|
|
600
601
|
name: "check",
|
|
601
602
|
size: 18,
|
|
602
603
|
class: "review-controls__check"
|
|
603
|
-
})) : c("", !0)], 8,
|
|
604
|
+
})) : c("", !0)], 8, Ne))), 128))], 32)]),
|
|
604
605
|
_: 1
|
|
605
606
|
}, 8, ["open"])]));
|
|
606
607
|
}
|
|
607
608
|
}), [["__scopeId", "data-v-e54a1ec7"]]);
|
|
608
609
|
//#endregion
|
|
609
610
|
//#region src/utils/fontOptions.ts
|
|
610
|
-
function
|
|
611
|
+
function Ie(e) {
|
|
611
612
|
if (e === void 0) return;
|
|
612
613
|
let t = e.map((e) => typeof e == "string" ? {
|
|
613
614
|
name: e,
|
|
614
615
|
fontFamily: e,
|
|
615
616
|
category: "other"
|
|
616
617
|
} : e);
|
|
617
|
-
if (
|
|
618
|
+
if (Le()) {
|
|
618
619
|
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
619
620
|
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
621
|
}
|
|
621
622
|
return t;
|
|
622
623
|
}
|
|
623
|
-
function
|
|
624
|
+
function Le() {
|
|
624
625
|
return typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
625
626
|
}
|
|
626
|
-
function
|
|
627
|
+
function Re(e, t) {
|
|
627
628
|
if (!e || e.length === 0) return [];
|
|
628
629
|
let n = /* @__PURE__ */ new Set();
|
|
629
630
|
for (let e of t) n.add(e.trim().toLowerCase());
|
|
@@ -636,7 +637,7 @@ function Ie(e, t) {
|
|
|
636
637
|
}
|
|
637
638
|
//#endregion
|
|
638
639
|
//#region src/components/Toolbar/presets.ts
|
|
639
|
-
var
|
|
640
|
+
var ze = [
|
|
640
641
|
{
|
|
641
642
|
name: "Arial",
|
|
642
643
|
fontFamily: "Arial",
|
|
@@ -697,7 +698,7 @@ var Le = [
|
|
|
697
698
|
fontFamily: "Consolas",
|
|
698
699
|
category: "monospace"
|
|
699
700
|
}
|
|
700
|
-
],
|
|
701
|
+
], Be = [
|
|
701
702
|
8,
|
|
702
703
|
9,
|
|
703
704
|
10,
|
|
@@ -712,7 +713,7 @@ var Le = [
|
|
|
712
713
|
36,
|
|
713
714
|
48,
|
|
714
715
|
72
|
|
715
|
-
],
|
|
716
|
+
], Ve = [
|
|
716
717
|
{
|
|
717
718
|
id: "Normal",
|
|
718
719
|
label: "Normal",
|
|
@@ -743,7 +744,7 @@ var Le = [
|
|
|
743
744
|
label: "Heading 3",
|
|
744
745
|
nameKey: "styles.heading3"
|
|
745
746
|
}
|
|
746
|
-
],
|
|
747
|
+
], He = [
|
|
747
748
|
{
|
|
748
749
|
label: "Single",
|
|
749
750
|
labelKey: "lineSpacing.single",
|
|
@@ -762,7 +763,7 @@ var Le = [
|
|
|
762
763
|
labelKey: "lineSpacing.double",
|
|
763
764
|
value: 480
|
|
764
765
|
}
|
|
765
|
-
],
|
|
766
|
+
], Ue = [
|
|
766
767
|
.5,
|
|
767
768
|
.75,
|
|
768
769
|
1,
|
|
@@ -772,7 +773,7 @@ var Le = [
|
|
|
772
773
|
];
|
|
773
774
|
//#endregion
|
|
774
775
|
//#region src/composables/useToolbarDropdowns.ts
|
|
775
|
-
function
|
|
776
|
+
function We(e) {
|
|
776
777
|
let t = S(null), n = S({
|
|
777
778
|
top: 0,
|
|
778
779
|
left: 0
|
|
@@ -824,7 +825,7 @@ function He(e) {
|
|
|
824
825
|
}
|
|
825
826
|
//#endregion
|
|
826
827
|
//#region src/composables/useToolbarFontSize.ts
|
|
827
|
-
function
|
|
828
|
+
function Ge(e) {
|
|
828
829
|
let t = S(!1), n = (t) => e.execCommand("setFontSize", t * 2);
|
|
829
830
|
function r() {
|
|
830
831
|
t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
|
|
@@ -844,11 +845,11 @@ function Ue(e) {
|
|
|
844
845
|
}
|
|
845
846
|
function s() {
|
|
846
847
|
let t = e.currentFontSize.value;
|
|
847
|
-
n(
|
|
848
|
+
n(Be.find((e) => e > t) || t + 1);
|
|
848
849
|
}
|
|
849
850
|
function c() {
|
|
850
851
|
let t = e.currentFontSize.value;
|
|
851
|
-
n([...
|
|
852
|
+
n([...Be].reverse().find((e) => e < t) || Math.max(1, t - 1));
|
|
852
853
|
}
|
|
853
854
|
return {
|
|
854
855
|
onSizeFocus: r,
|
|
@@ -861,7 +862,7 @@ function Ue(e) {
|
|
|
861
862
|
}
|
|
862
863
|
//#endregion
|
|
863
864
|
//#region src/utils/stylePreview.ts
|
|
864
|
-
var
|
|
865
|
+
var Ke = {
|
|
865
866
|
Title: 26,
|
|
866
867
|
Subtitle: 18,
|
|
867
868
|
Heading1: 24,
|
|
@@ -871,22 +872,22 @@ var We = {
|
|
|
871
872
|
Heading5: 13,
|
|
872
873
|
Heading6: 13,
|
|
873
874
|
Normal: 14
|
|
874
|
-
},
|
|
875
|
+
}, qe = /* @__PURE__ */ new Set([
|
|
875
876
|
"Title",
|
|
876
877
|
"Heading1",
|
|
877
878
|
"Heading2",
|
|
878
879
|
"Heading3"
|
|
879
|
-
]),
|
|
880
|
-
function
|
|
881
|
-
let t =
|
|
880
|
+
]), Je = { Subtitle: "666666" }, Ye = "#4a6c8c";
|
|
881
|
+
function Xe(e) {
|
|
882
|
+
let t = Ke[e.styleId], n = {
|
|
882
883
|
fontSize: t ? `${t}px` : `${Math.min(Math.max(e.fontSize ? e.fontSize / 2 : 11, 11), 20)}px`,
|
|
883
884
|
lineHeight: "1.3"
|
|
884
885
|
};
|
|
885
|
-
(e.bold ??
|
|
886
|
-
let r = e.color ??
|
|
887
|
-
return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color =
|
|
886
|
+
(e.bold ?? qe.has(e.styleId)) && (n.fontWeight = "bold"), e.italic && (n.fontStyle = "italic");
|
|
887
|
+
let r = e.color ?? Je[e.styleId];
|
|
888
|
+
return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color = Ye), n;
|
|
888
889
|
}
|
|
889
|
-
function
|
|
890
|
+
function Ze(e) {
|
|
890
891
|
return !e || e.length === 0 ? [] : e.filter((e) => e.type === "paragraph").filter((e) => e.qFormat ? !0 : !(e.hidden || e.semiHidden)).map((e) => ({
|
|
891
892
|
styleId: e.styleId,
|
|
892
893
|
name: e.name || e.styleId,
|
|
@@ -899,20 +900,20 @@ function Ye(e) {
|
|
|
899
900
|
}
|
|
900
901
|
//#endregion
|
|
901
902
|
//#region src/composables/useParagraphStyleOptions.ts
|
|
902
|
-
function
|
|
903
|
+
function Qe(e) {
|
|
903
904
|
let t = o(() => {
|
|
904
|
-
let t =
|
|
905
|
+
let t = Ze(e.documentStyles());
|
|
905
906
|
return t.length > 0 ? t.map((t) => {
|
|
906
|
-
let n =
|
|
907
|
+
let n = Ve.find((e) => e.id === t.styleId);
|
|
907
908
|
return {
|
|
908
909
|
id: t.styleId,
|
|
909
910
|
label: n ? e.t(n.nameKey) : t.name,
|
|
910
|
-
previewStyle:
|
|
911
|
+
previewStyle: Xe(t)
|
|
911
912
|
};
|
|
912
|
-
}) :
|
|
913
|
+
}) : Ve.map((t) => ({
|
|
913
914
|
id: t.id,
|
|
914
915
|
label: e.t(t.nameKey),
|
|
915
|
-
previewStyle:
|
|
916
|
+
previewStyle: Xe({ styleId: t.id })
|
|
916
917
|
}));
|
|
917
918
|
});
|
|
918
919
|
return {
|
|
@@ -925,41 +926,41 @@ function Xe(e) {
|
|
|
925
926
|
}
|
|
926
927
|
//#endregion
|
|
927
928
|
//#region src/components/Toolbar.vue?vue&type=script&setup=true&lang.ts
|
|
928
|
-
var
|
|
929
|
+
var $e = {
|
|
929
930
|
key: 0,
|
|
930
931
|
class: "basic-toolbar"
|
|
931
|
-
},
|
|
932
|
+
}, et = [
|
|
932
933
|
"title",
|
|
933
934
|
"aria-label",
|
|
934
935
|
"disabled"
|
|
935
|
-
],
|
|
936
|
+
], tt = [
|
|
936
937
|
"title",
|
|
937
938
|
"aria-label",
|
|
938
939
|
"disabled"
|
|
939
|
-
],
|
|
940
|
+
], nt = ["disabled", "title"], rt = ["aria-expanded", "title"], it = ["disabled", "title"], at = ["onMousedown"], ot = ["aria-expanded", "title"], st = ["onMousedown"], ct = ["aria-expanded", "title"], lt = {
|
|
940
941
|
key: 0,
|
|
941
942
|
class: "toolbar-dropdown__group-label"
|
|
942
|
-
},
|
|
943
|
+
}, ut = ["onMousedown"], dt = ["title"], ft = [
|
|
943
944
|
"value",
|
|
944
945
|
"title",
|
|
945
946
|
"aria-expanded"
|
|
946
|
-
],
|
|
947
|
+
], pt = ["title"], mt = ["onMousedown"], ht = ["title", "aria-label"], gt = ["title", "aria-label"], _t = ["title", "aria-label"], vt = ["title", "aria-label"], yt = ["title", "aria-label"], bt = ["title", "aria-label"], xt = ["title", "aria-label"], St = ["aria-expanded", "title"], Ct = ["title"], wt = ["title"], Tt = ["title"], Et = ["title"], Dt = ["title", "aria-label"], Ot = ["title", "aria-label"], kt = [
|
|
947
948
|
"title",
|
|
948
949
|
"aria-label",
|
|
949
950
|
"disabled"
|
|
950
|
-
],
|
|
951
|
+
], At = ["title", "aria-label"], jt = ["aria-expanded", "title"], Mt = ["onMousedown"], Nt = ["title", "aria-label"], Pt = [
|
|
951
952
|
"title",
|
|
952
953
|
"aria-label",
|
|
953
954
|
"aria-pressed"
|
|
954
|
-
],
|
|
955
|
+
], Ft = [
|
|
955
956
|
"title",
|
|
956
957
|
"aria-label",
|
|
957
958
|
"aria-pressed"
|
|
958
|
-
],
|
|
959
|
+
], It = {
|
|
959
960
|
key: 0,
|
|
960
961
|
"data-testid": "toolbar-comments-count",
|
|
961
962
|
class: "basic-toolbar__comment-count"
|
|
962
|
-
},
|
|
963
|
+
}, Lt = ["title", "aria-label"], Rt = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
963
964
|
__name: "Toolbar",
|
|
964
965
|
props: {
|
|
965
966
|
view: { default: null },
|
|
@@ -1024,7 +1025,7 @@ var Ze = {
|
|
|
1024
1025
|
"image-transform"
|
|
1025
1026
|
],
|
|
1026
1027
|
setup(e, { emit: t }) {
|
|
1027
|
-
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 ??
|
|
1028
|
+
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 ?? Ue), k = o(() => m.showZoomControl ?? !0), A = S(null), j = S(null), M = S(null), N = S(null), R = S(null), B = S(null), { openDropdown: V, dropdownMenuStyle: H, toggleDropdown: U, recomputeDropdownPos: W } = We({
|
|
1028
1029
|
zoom: B,
|
|
1029
1030
|
style: A,
|
|
1030
1031
|
font: j,
|
|
@@ -1052,14 +1053,14 @@ var Ze = {
|
|
|
1052
1053
|
}), K = o(() => {
|
|
1053
1054
|
let e = G.value.textFormatting.fontSize;
|
|
1054
1055
|
return e ? e / 2 : 11;
|
|
1055
|
-
}), X = o(() => G.value.paragraphFormatting.alignment || "left"),
|
|
1056
|
+
}), X = o(() => G.value.paragraphFormatting.alignment || "left"), Z = o(() => {
|
|
1056
1057
|
switch (X.value) {
|
|
1057
1058
|
case "center": return "format_align_center";
|
|
1058
1059
|
case "right": return "format_align_right";
|
|
1059
1060
|
case "both": return "format_align_justify";
|
|
1060
1061
|
default: return "format_align_left";
|
|
1061
1062
|
}
|
|
1062
|
-
}), { resolvedParagraphStyles:
|
|
1063
|
+
}), { resolvedParagraphStyles: ne, currentStyleLabel: re } = Qe({
|
|
1063
1064
|
documentStyles: () => m.documentStyles,
|
|
1064
1065
|
currentStyleId: () => G.value.paragraphFormatting.styleId || "Normal",
|
|
1065
1066
|
t: h
|
|
@@ -1080,43 +1081,43 @@ var Ze = {
|
|
|
1080
1081
|
}), ce = o(() => {
|
|
1081
1082
|
let e = G.value.textFormatting.highlight;
|
|
1082
1083
|
if (!(!e || e === "none")) return e.replace(/^#/, "").toUpperCase();
|
|
1083
|
-
}),
|
|
1084
|
+
}), le = o(() => Ie(m.fontFamilies) ?? ze), ue = o(() => Re(m.documentFonts, le.value.map((e) => e.name))), de = o(() => [
|
|
1084
1085
|
{
|
|
1085
1086
|
label: h("font.documentFonts"),
|
|
1086
|
-
fonts:
|
|
1087
|
+
fonts: ue.value
|
|
1087
1088
|
},
|
|
1088
1089
|
{
|
|
1089
1090
|
label: h("font.sansSerif"),
|
|
1090
|
-
fonts:
|
|
1091
|
+
fonts: le.value.filter((e) => e.category === "sans-serif")
|
|
1091
1092
|
},
|
|
1092
1093
|
{
|
|
1093
1094
|
label: h("font.serif"),
|
|
1094
|
-
fonts:
|
|
1095
|
+
fonts: le.value.filter((e) => e.category === "serif")
|
|
1095
1096
|
},
|
|
1096
1097
|
{
|
|
1097
1098
|
label: h("font.monospace"),
|
|
1098
|
-
fonts:
|
|
1099
|
+
fonts: le.value.filter((e) => e.category === "monospace")
|
|
1099
1100
|
},
|
|
1100
1101
|
{
|
|
1101
1102
|
label: h("font.other"),
|
|
1102
|
-
fonts:
|
|
1103
|
+
fonts: le.value.filter((e) => !e.category || e.category === "other")
|
|
1103
1104
|
}
|
|
1104
1105
|
]);
|
|
1105
|
-
function
|
|
1106
|
+
function fe() {
|
|
1106
1107
|
if (m.onUndo) {
|
|
1107
1108
|
m.onUndo();
|
|
1108
1109
|
return;
|
|
1109
1110
|
}
|
|
1110
|
-
|
|
1111
|
+
Q("undo");
|
|
1111
1112
|
}
|
|
1112
|
-
function
|
|
1113
|
+
function pe() {
|
|
1113
1114
|
if (m.onRedo) {
|
|
1114
1115
|
m.onRedo();
|
|
1115
1116
|
return;
|
|
1116
1117
|
}
|
|
1117
|
-
|
|
1118
|
+
Q("redo");
|
|
1118
1119
|
}
|
|
1119
|
-
function
|
|
1120
|
+
function Q(e, ...t) {
|
|
1120
1121
|
let n = m.view;
|
|
1121
1122
|
if (!n) return;
|
|
1122
1123
|
let r = m.getCommands()[e];
|
|
@@ -1126,52 +1127,52 @@ var Ze = {
|
|
|
1126
1127
|
}
|
|
1127
1128
|
Y(n, r(...t)), n.hasFocus() || n.focus(), V.value = null;
|
|
1128
1129
|
}
|
|
1129
|
-
function
|
|
1130
|
-
|
|
1130
|
+
function me(e) {
|
|
1131
|
+
Q("setFontFamily", e);
|
|
1131
1132
|
}
|
|
1132
|
-
let { onSizeFocus:
|
|
1133
|
+
let { onSizeFocus: he, onSizeInput: ge, commitFontSize: _e, pickFontSize: be, increaseFontSize: xe, decreaseFontSize: Se } = Ge({
|
|
1133
1134
|
currentFontSize: K,
|
|
1134
1135
|
openDropdown: V,
|
|
1135
1136
|
recomputeDropdownPos: W,
|
|
1136
|
-
execCommand:
|
|
1137
|
+
execCommand: Q
|
|
1137
1138
|
});
|
|
1138
|
-
function
|
|
1139
|
+
function Ce(e) {
|
|
1139
1140
|
if (typeof e == "object" && e.auto) {
|
|
1140
|
-
|
|
1141
|
+
Q("clearTextColor");
|
|
1141
1142
|
return;
|
|
1142
1143
|
}
|
|
1143
|
-
|
|
1144
|
+
Q("setTextColor", typeof e == "string" ? { rgb: e } : e);
|
|
1144
1145
|
}
|
|
1145
|
-
function
|
|
1146
|
+
function we() {
|
|
1146
1147
|
let e = m.view;
|
|
1147
1148
|
e && (Y(e, J), e.hasFocus() || e.focus());
|
|
1148
1149
|
}
|
|
1149
|
-
function
|
|
1150
|
-
|
|
1150
|
+
function Te(e) {
|
|
1151
|
+
Q("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
|
|
1151
1152
|
}
|
|
1152
1153
|
function Ee(e) {
|
|
1153
1154
|
v("apply-style", e), V.value = null;
|
|
1154
1155
|
}
|
|
1155
|
-
function De(e) {
|
|
1156
|
-
$("setLineSpacing", e);
|
|
1157
|
-
}
|
|
1158
1156
|
function Oe(e) {
|
|
1157
|
+
Q("setLineSpacing", e);
|
|
1158
|
+
}
|
|
1159
|
+
function ke(e) {
|
|
1159
1160
|
let t = G.value.paragraphFormatting.lineSpacing;
|
|
1160
1161
|
return t ? Math.abs(t - e) < 10 : e === 240;
|
|
1161
1162
|
}
|
|
1162
|
-
return (t, n) => e.view ? (b(), l("div",
|
|
1163
|
+
return (t, n) => e.view ? (b(), l("div", $e, [
|
|
1163
1164
|
u("button", {
|
|
1164
1165
|
title: O(h)("undoShortcut"),
|
|
1165
1166
|
"aria-label": O(h)("undo"),
|
|
1166
1167
|
disabled: !ie.value,
|
|
1167
|
-
onMousedown: F(
|
|
1168
|
-
}, [f(r, { name: "undo" })], 40,
|
|
1168
|
+
onMousedown: F(fe, ["prevent"])
|
|
1169
|
+
}, [f(r, { name: "undo" })], 40, et),
|
|
1169
1170
|
u("button", {
|
|
1170
1171
|
title: O(h)("redoShortcut"),
|
|
1171
1172
|
"aria-label": O(h)("redo"),
|
|
1172
1173
|
disabled: !ae.value,
|
|
1173
|
-
onMousedown: F(
|
|
1174
|
-
}, [f(r, { name: "redo" })], 40,
|
|
1174
|
+
onMousedown: F(pe, ["prevent"])
|
|
1175
|
+
}, [f(r, { name: "redo" })], 40, tt),
|
|
1175
1176
|
n[43] ||= u("span", { class: "divider" }, null, -1),
|
|
1176
1177
|
k.value ? (b(), l("div", {
|
|
1177
1178
|
key: 0,
|
|
@@ -1184,7 +1185,7 @@ var Ze = {
|
|
|
1184
1185
|
onMousedown: n[0] ||= F((e) => t.$emit("zoom-out"), ["prevent"]),
|
|
1185
1186
|
disabled: x.value,
|
|
1186
1187
|
title: O(h)("zoom.zoomOut")
|
|
1187
|
-
}, " − ", 40,
|
|
1188
|
+
}, " − ", 40, nt),
|
|
1188
1189
|
u("button", {
|
|
1189
1190
|
class: "toolbar-dropdown__trigger zoom-trigger",
|
|
1190
1191
|
onMousedown: n[1] ||= F((e) => O(U)("zoom"), ["prevent"]),
|
|
@@ -1195,13 +1196,13 @@ var Ze = {
|
|
|
1195
1196
|
class: "chevron",
|
|
1196
1197
|
name: "arrow_drop_down",
|
|
1197
1198
|
size: 16
|
|
1198
|
-
})], 40,
|
|
1199
|
+
})], 40, rt),
|
|
1199
1200
|
u("button", {
|
|
1200
1201
|
class: "size-btn",
|
|
1201
1202
|
onMousedown: n[2] ||= F((e) => t.$emit("zoom-in"), ["prevent"]),
|
|
1202
1203
|
disabled: T.value,
|
|
1203
1204
|
title: O(h)("zoom.zoomIn")
|
|
1204
|
-
}, " + ", 40,
|
|
1205
|
+
}, " + ", 40, it),
|
|
1205
1206
|
O(V) === "zoom" ? (b(), l("div", {
|
|
1206
1207
|
key: 0,
|
|
1207
1208
|
style: _(O(H)),
|
|
@@ -1210,7 +1211,7 @@ var Ze = {
|
|
|
1210
1211
|
key: e,
|
|
1211
1212
|
class: g(["toolbar-dropdown__item", { active: y.value === Math.round(e * 100) }]),
|
|
1212
1213
|
onMousedown: F((n) => t.$emit("zoom-set", e), ["prevent"])
|
|
1213
|
-
}, E(Math.round(e * 100)) + "% ", 43,
|
|
1214
|
+
}, E(Math.round(e * 100)) + "% ", 43, at))), 128))], 4)) : c("", !0)
|
|
1214
1215
|
], 512)) : c("", !0),
|
|
1215
1216
|
n[44] ||= u("span", { class: "divider" }, null, -1),
|
|
1216
1217
|
u("div", {
|
|
@@ -1227,15 +1228,15 @@ var Ze = {
|
|
|
1227
1228
|
class: "chevron",
|
|
1228
1229
|
name: "arrow_drop_down",
|
|
1229
1230
|
size: 16
|
|
1230
|
-
})], 40,
|
|
1231
|
+
})], 40, ot), O(V) === "style" ? (b(), l("div", {
|
|
1231
1232
|
key: 0,
|
|
1232
1233
|
style: _(O(H)),
|
|
1233
1234
|
class: "toolbar-dropdown__menu style-menu"
|
|
1234
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1235
|
+
}, [(b(!0), l(a, null, C(O(ne), (e) => (b(), l("button", {
|
|
1235
1236
|
key: e.id,
|
|
1236
1237
|
class: g(["toolbar-dropdown__item", { active: (G.value.paragraphFormatting.styleId || "Normal") === e.id }]),
|
|
1237
1238
|
onMousedown: F((t) => Ee(e.id), ["prevent"])
|
|
1238
|
-
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42,
|
|
1239
|
+
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42, st))), 128))], 4)) : c("", !0)], 512),
|
|
1239
1240
|
n[45] ||= u("span", { class: "divider" }, null, -1),
|
|
1240
1241
|
u("div", {
|
|
1241
1242
|
class: "toolbar-dropdown",
|
|
@@ -1251,16 +1252,16 @@ var Ze = {
|
|
|
1251
1252
|
class: "chevron",
|
|
1252
1253
|
name: "arrow_drop_down",
|
|
1253
1254
|
size: 16
|
|
1254
|
-
})], 40,
|
|
1255
|
+
})], 40, ct), O(V) === "font" ? (b(), l("div", {
|
|
1255
1256
|
key: 0,
|
|
1256
1257
|
style: _(O(H)),
|
|
1257
1258
|
class: "toolbar-dropdown__menu font-menu"
|
|
1258
|
-
}, [(b(!0), l(a, null, C(
|
|
1259
|
+
}, [(b(!0), l(a, null, C(de.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", lt, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
|
|
1259
1260
|
key: e.name,
|
|
1260
1261
|
class: g(["toolbar-dropdown__item", { active: ee.value === e.name }]),
|
|
1261
1262
|
style: _({ fontFamily: e.fontFamily }),
|
|
1262
|
-
onMousedown: F((t) =>
|
|
1263
|
-
}, E(e.name), 47,
|
|
1263
|
+
onMousedown: F((t) => me(e.name), ["prevent"])
|
|
1264
|
+
}, E(e.name), 47, ut))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
|
|
1264
1265
|
u("div", {
|
|
1265
1266
|
class: "toolbar-dropdown font-size-group",
|
|
1266
1267
|
ref_key: "sizeDropdownRef",
|
|
@@ -1268,95 +1269,95 @@ var Ze = {
|
|
|
1268
1269
|
}, [
|
|
1269
1270
|
u("button", {
|
|
1270
1271
|
class: "size-btn",
|
|
1271
|
-
onMousedown: n[5] ||= F((...e) => O(
|
|
1272
|
+
onMousedown: n[5] ||= F((...e) => O(Se) && O(Se)(...e), ["prevent"]),
|
|
1272
1273
|
title: O(h)("decreaseFontSize")
|
|
1273
|
-
}, " − ", 40,
|
|
1274
|
+
}, " − ", 40, dt),
|
|
1274
1275
|
u("input", {
|
|
1275
1276
|
class: "size-trigger size-input",
|
|
1276
1277
|
type: "text",
|
|
1277
1278
|
value: K.value,
|
|
1278
1279
|
title: O(h)("fontSize"),
|
|
1279
1280
|
onMousedown: n[6] ||= F(() => {}, ["stop"]),
|
|
1280
|
-
onFocus: n[7] ||= (...e) => O(
|
|
1281
|
+
onFocus: n[7] ||= (...e) => O(he) && O(he)(...e),
|
|
1281
1282
|
"aria-expanded": O(V) === "size",
|
|
1282
1283
|
"aria-haspopup": "listbox",
|
|
1283
|
-
onInput: n[8] ||= (...e) => O(
|
|
1284
|
+
onInput: n[8] ||= (...e) => O(ge) && O(ge)(...e),
|
|
1284
1285
|
onKeydown: [
|
|
1285
|
-
n[9] ||= P(F((e) => O(
|
|
1286
|
-
n[10] ||= P(F((e) => O(
|
|
1287
|
-
n[11] ||= P(F((e) => O(
|
|
1286
|
+
n[9] ||= P(F((e) => O(xe)(), ["prevent", "stop"]), ["up"]),
|
|
1287
|
+
n[10] ||= P(F((e) => O(Se)(), ["prevent", "stop"]), ["down"]),
|
|
1288
|
+
n[11] ||= P(F((e) => O(_e)(e), ["prevent"]), ["enter"])
|
|
1288
1289
|
],
|
|
1289
|
-
onBlur: n[12] ||= (e) => O(
|
|
1290
|
-
}, null, 40,
|
|
1290
|
+
onBlur: n[12] ||= (e) => O(_e)(e)
|
|
1291
|
+
}, null, 40, ft),
|
|
1291
1292
|
u("button", {
|
|
1292
1293
|
class: "size-btn",
|
|
1293
|
-
onMousedown: n[13] ||= F((...e) => O(
|
|
1294
|
+
onMousedown: n[13] ||= F((...e) => O(xe) && O(xe)(...e), ["prevent"]),
|
|
1294
1295
|
title: O(h)("increaseFontSize")
|
|
1295
|
-
}, " + ", 40,
|
|
1296
|
+
}, " + ", 40, pt),
|
|
1296
1297
|
O(V) === "size" ? (b(), l("div", {
|
|
1297
1298
|
key: 0,
|
|
1298
1299
|
style: _(O(H)),
|
|
1299
1300
|
class: "toolbar-dropdown__menu size-menu"
|
|
1300
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1301
|
+
}, [(b(!0), l(a, null, C(O(Be), (e) => (b(), l("button", {
|
|
1301
1302
|
key: e,
|
|
1302
1303
|
class: g(["toolbar-dropdown__item", { active: K.value === e }]),
|
|
1303
|
-
onMousedown: F((t) => O(
|
|
1304
|
-
}, E(e), 43,
|
|
1304
|
+
onMousedown: F((t) => O(be)(e), ["prevent"])
|
|
1305
|
+
}, E(e), 43, mt))), 128))], 4)) : c("", !0)
|
|
1305
1306
|
], 512),
|
|
1306
1307
|
n[46] ||= u("span", { class: "divider" }, null, -1),
|
|
1307
1308
|
u("button", {
|
|
1308
1309
|
title: O(h)("boldShortcut"),
|
|
1309
1310
|
"aria-label": O(h)("bold"),
|
|
1310
1311
|
class: g({ active: G.value.textFormatting.bold }),
|
|
1311
|
-
onMousedown: n[14] ||= F((e) =>
|
|
1312
|
-
}, [f(r, { name: "format_bold" })], 42,
|
|
1312
|
+
onMousedown: n[14] ||= F((e) => Q("toggleBold"), ["prevent"])
|
|
1313
|
+
}, [f(r, { name: "format_bold" })], 42, ht),
|
|
1313
1314
|
u("button", {
|
|
1314
1315
|
title: O(h)("italicShortcut"),
|
|
1315
1316
|
"aria-label": O(h)("italic"),
|
|
1316
1317
|
class: g({ active: G.value.textFormatting.italic }),
|
|
1317
|
-
onMousedown: n[15] ||= F((e) =>
|
|
1318
|
-
}, [f(r, { name: "format_italic" })], 42,
|
|
1318
|
+
onMousedown: n[15] ||= F((e) => Q("toggleItalic"), ["prevent"])
|
|
1319
|
+
}, [f(r, { name: "format_italic" })], 42, gt),
|
|
1319
1320
|
u("button", {
|
|
1320
1321
|
title: O(h)("underlineShortcut"),
|
|
1321
1322
|
"aria-label": O(h)("underline"),
|
|
1322
1323
|
class: g({ active: !!G.value.textFormatting.underline }),
|
|
1323
|
-
onMousedown: n[16] ||= F((e) =>
|
|
1324
|
-
}, [f(r, { name: "format_underlined" })], 42,
|
|
1324
|
+
onMousedown: n[16] ||= F((e) => Q("toggleUnderline"), ["prevent"])
|
|
1325
|
+
}, [f(r, { name: "format_underlined" })], 42, _t),
|
|
1325
1326
|
u("button", {
|
|
1326
1327
|
title: O(h)("formattingBar.strikethrough"),
|
|
1327
1328
|
"aria-label": O(h)("formattingBar.strikethrough"),
|
|
1328
1329
|
class: g({ active: G.value.textFormatting.strike }),
|
|
1329
|
-
onMousedown: n[17] ||= F((e) =>
|
|
1330
|
-
}, [f(r, { name: "strikethrough_s" })], 42,
|
|
1330
|
+
onMousedown: n[17] ||= F((e) => Q("toggleStrike"), ["prevent"])
|
|
1331
|
+
}, [f(r, { name: "strikethrough_s" })], 42, vt),
|
|
1331
1332
|
f(O(p), {
|
|
1332
1333
|
mode: "text",
|
|
1333
1334
|
value: se.value,
|
|
1334
1335
|
theme: e.theme ?? null,
|
|
1335
|
-
onChange:
|
|
1336
|
+
onChange: Ce
|
|
1336
1337
|
}, null, 8, ["value", "theme"]),
|
|
1337
1338
|
f(O(p), {
|
|
1338
1339
|
mode: "highlight",
|
|
1339
1340
|
value: ce.value,
|
|
1340
1341
|
theme: e.theme ?? null,
|
|
1341
|
-
onChange:
|
|
1342
|
+
onChange: Te
|
|
1342
1343
|
}, null, 8, ["value", "theme"]),
|
|
1343
1344
|
u("button", {
|
|
1344
1345
|
title: O(h)("formattingBar.insertLinkShortcut"),
|
|
1345
1346
|
"aria-label": O(h)("formattingBar.insertLink"),
|
|
1346
1347
|
onMousedown: n[18] ||= F((e) => t.$emit("insert-link"), ["prevent"])
|
|
1347
|
-
}, [f(r, { name: "link" })], 40,
|
|
1348
|
+
}, [f(r, { name: "link" })], 40, yt),
|
|
1348
1349
|
u("button", {
|
|
1349
1350
|
title: O(h)("formattingBar.superscriptShortcut"),
|
|
1350
1351
|
"aria-label": O(h)("formattingBar.superscript"),
|
|
1351
1352
|
class: g({ active: G.value.textFormatting.vertAlign === "superscript" }),
|
|
1352
|
-
onMousedown: n[19] ||= F((e) =>
|
|
1353
|
-
}, [f(r, { name: "superscript" })], 42,
|
|
1353
|
+
onMousedown: n[19] ||= F((e) => Q("toggleSuperscript"), ["prevent"])
|
|
1354
|
+
}, [f(r, { name: "superscript" })], 42, bt),
|
|
1354
1355
|
u("button", {
|
|
1355
1356
|
title: O(h)("formattingBar.subscriptShortcut"),
|
|
1356
1357
|
"aria-label": O(h)("formattingBar.subscript"),
|
|
1357
1358
|
class: g({ active: G.value.textFormatting.vertAlign === "subscript" }),
|
|
1358
|
-
onMousedown: n[20] ||= F((e) =>
|
|
1359
|
-
}, [f(r, { name: "subscript" })], 42,
|
|
1359
|
+
onMousedown: n[20] ||= F((e) => Q("toggleSubscript"), ["prevent"])
|
|
1360
|
+
}, [f(r, { name: "subscript" })], 42, xt),
|
|
1360
1361
|
n[47] ||= u("span", { class: "divider" }, null, -1),
|
|
1361
1362
|
u("div", {
|
|
1362
1363
|
class: "toolbar-dropdown",
|
|
@@ -1368,11 +1369,11 @@ var Ze = {
|
|
|
1368
1369
|
"aria-expanded": O(V) === "align",
|
|
1369
1370
|
"aria-haspopup": "listbox",
|
|
1370
1371
|
title: O(h)("alignmentGroup")
|
|
1371
|
-
}, [f(r, { name:
|
|
1372
|
+
}, [f(r, { name: Z.value }, null, 8, ["name"]), f(r, {
|
|
1372
1373
|
class: "chevron",
|
|
1373
1374
|
name: "arrow_drop_down",
|
|
1374
1375
|
size: 16
|
|
1375
|
-
})], 40,
|
|
1376
|
+
})], 40, St), O(V) === "align" ? (b(), l("div", {
|
|
1376
1377
|
key: 0,
|
|
1377
1378
|
style: _(O(H)),
|
|
1378
1379
|
class: "toolbar-dropdown__menu align-strip"
|
|
@@ -1381,66 +1382,66 @@ var Ze = {
|
|
|
1381
1382
|
class: g(["align-strip__btn", { active: X.value === "left" }]),
|
|
1382
1383
|
title: `${O(h)("alignLeft")} (${O(h)("alignment.alignLeftShortcut")})`,
|
|
1383
1384
|
onMousedown: n[22] ||= F((e) => {
|
|
1384
|
-
|
|
1385
|
+
Q("alignLeft"), V.value = null;
|
|
1385
1386
|
}, ["prevent"])
|
|
1386
1387
|
}, [f(r, {
|
|
1387
1388
|
name: "format_align_left",
|
|
1388
1389
|
size: 18
|
|
1389
|
-
})], 42,
|
|
1390
|
+
})], 42, Ct),
|
|
1390
1391
|
u("button", {
|
|
1391
1392
|
class: g(["align-strip__btn", { active: X.value === "center" }]),
|
|
1392
1393
|
title: `${O(h)("alignCenter")} (${O(h)("alignment.centerShortcut")})`,
|
|
1393
1394
|
onMousedown: n[23] ||= F((e) => {
|
|
1394
|
-
|
|
1395
|
+
Q("alignCenter"), V.value = null;
|
|
1395
1396
|
}, ["prevent"])
|
|
1396
1397
|
}, [f(r, {
|
|
1397
1398
|
name: "format_align_center",
|
|
1398
1399
|
size: 18
|
|
1399
|
-
})], 42,
|
|
1400
|
+
})], 42, wt),
|
|
1400
1401
|
u("button", {
|
|
1401
1402
|
class: g(["align-strip__btn", { active: X.value === "right" }]),
|
|
1402
1403
|
title: `${O(h)("alignRight")} (${O(h)("alignment.alignRightShortcut")})`,
|
|
1403
1404
|
onMousedown: n[24] ||= F((e) => {
|
|
1404
|
-
|
|
1405
|
+
Q("alignRight"), V.value = null;
|
|
1405
1406
|
}, ["prevent"])
|
|
1406
1407
|
}, [f(r, {
|
|
1407
1408
|
name: "format_align_right",
|
|
1408
1409
|
size: 18
|
|
1409
|
-
})], 42,
|
|
1410
|
+
})], 42, Tt),
|
|
1410
1411
|
u("button", {
|
|
1411
1412
|
class: g(["align-strip__btn", { active: X.value === "both" }]),
|
|
1412
1413
|
title: `${O(h)("justify")} (${O(h)("alignment.justifyShortcut")})`,
|
|
1413
1414
|
onMousedown: n[25] ||= F((e) => {
|
|
1414
|
-
|
|
1415
|
+
Q("alignJustify"), V.value = null;
|
|
1415
1416
|
}, ["prevent"])
|
|
1416
1417
|
}, [f(r, {
|
|
1417
1418
|
name: "format_align_justify",
|
|
1418
1419
|
size: 18
|
|
1419
|
-
})], 42,
|
|
1420
|
+
})], 42, Et)
|
|
1420
1421
|
], 4)) : c("", !0)], 512),
|
|
1421
1422
|
u("button", {
|
|
1422
1423
|
title: O(h)("bulletList"),
|
|
1423
1424
|
"aria-label": O(h)("bulletList"),
|
|
1424
1425
|
class: g({ active: G.value.listState.type === "bullet" }),
|
|
1425
|
-
onMousedown: n[26] ||= F((e) =>
|
|
1426
|
-
}, [f(r, { name: "format_list_bulleted" })], 42,
|
|
1426
|
+
onMousedown: n[26] ||= F((e) => Q("toggleBulletList"), ["prevent"])
|
|
1427
|
+
}, [f(r, { name: "format_list_bulleted" })], 42, Dt),
|
|
1427
1428
|
u("button", {
|
|
1428
1429
|
title: O(h)("numberedList"),
|
|
1429
1430
|
"aria-label": O(h)("numberedList"),
|
|
1430
1431
|
class: g({ active: G.value.listState.type === "numbered" }),
|
|
1431
|
-
onMousedown: n[27] ||= F((e) =>
|
|
1432
|
-
}, [f(r, { name: "format_list_numbered" })], 42,
|
|
1432
|
+
onMousedown: n[27] ||= F((e) => Q("toggleNumberedList"), ["prevent"])
|
|
1433
|
+
}, [f(r, { name: "format_list_numbered" })], 42, Ot),
|
|
1433
1434
|
u("button", {
|
|
1434
1435
|
title: O(h)("decreaseIndent"),
|
|
1435
1436
|
"aria-label": O(h)("decreaseIndent"),
|
|
1436
1437
|
disabled: !oe.value,
|
|
1437
|
-
onMousedown: n[28] ||= F((e) =>
|
|
1438
|
-
}, [f(r, { name: "format_indent_decrease" })], 40,
|
|
1438
|
+
onMousedown: n[28] ||= F((e) => Q("outdent"), ["prevent"])
|
|
1439
|
+
}, [f(r, { name: "format_indent_decrease" })], 40, kt),
|
|
1439
1440
|
u("button", {
|
|
1440
1441
|
title: O(h)("increaseIndent"),
|
|
1441
1442
|
"aria-label": O(h)("increaseIndent"),
|
|
1442
|
-
onMousedown: n[29] ||= F((e) =>
|
|
1443
|
-
}, [f(r, { name: "format_indent_increase" })], 40,
|
|
1443
|
+
onMousedown: n[29] ||= F((e) => Q("indent"), ["prevent"])
|
|
1444
|
+
}, [f(r, { name: "format_indent_increase" })], 40, At),
|
|
1444
1445
|
u("div", {
|
|
1445
1446
|
class: "toolbar-dropdown",
|
|
1446
1447
|
ref_key: "spacingDropdownRef",
|
|
@@ -1455,20 +1456,20 @@ var Ze = {
|
|
|
1455
1456
|
class: "chevron",
|
|
1456
1457
|
name: "arrow_drop_down",
|
|
1457
1458
|
size: 16
|
|
1458
|
-
})], 40,
|
|
1459
|
+
})], 40, jt), O(V) === "spacing" ? (b(), l("div", {
|
|
1459
1460
|
key: 0,
|
|
1460
1461
|
style: _(O(H)),
|
|
1461
1462
|
class: "toolbar-dropdown__menu"
|
|
1462
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1463
|
+
}, [(b(!0), l(a, null, C(O(He), (e) => (b(), l("button", {
|
|
1463
1464
|
key: e.value,
|
|
1464
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1465
|
-
onMousedown: F((t) =>
|
|
1466
|
-
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43,
|
|
1465
|
+
class: g(["toolbar-dropdown__item", { active: ke(e.value) }]),
|
|
1466
|
+
onMousedown: F((t) => Oe(e.value), ["prevent"])
|
|
1467
|
+
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43, Mt))), 128))], 4)) : c("", !0)], 512),
|
|
1467
1468
|
u("button", {
|
|
1468
1469
|
title: O(h)("formattingBar.clearFormatting"),
|
|
1469
1470
|
"aria-label": O(h)("formattingBar.clearFormatting"),
|
|
1470
|
-
onMousedown: F(
|
|
1471
|
-
}, [f(r, { name: "format_clear" })], 40,
|
|
1471
|
+
onMousedown: F(we, ["prevent"])
|
|
1472
|
+
}, [f(r, { name: "format_clear" })], 40, Nt),
|
|
1472
1473
|
n[48] ||= u("span", { class: "divider" }, null, -1),
|
|
1473
1474
|
e.outlineDrawer ? (b(), l("button", {
|
|
1474
1475
|
key: 1,
|
|
@@ -1480,7 +1481,7 @@ var Ze = {
|
|
|
1480
1481
|
class: g({ active: e.outlineDrawerOpen }),
|
|
1481
1482
|
onMousedown: n[31] ||= F(() => {}, ["prevent"]),
|
|
1482
1483
|
onClick: n[32] ||= (e) => t.$emit("toggle-outline")
|
|
1483
|
-
}, [f(r, { name: "format_list_bulleted" })], 42,
|
|
1484
|
+
}, [f(r, { name: "format_list_bulleted" })], 42, Pt)) : c("", !0),
|
|
1484
1485
|
u("button", {
|
|
1485
1486
|
type: "button",
|
|
1486
1487
|
"data-testid": "toolbar-comments-toggle",
|
|
@@ -1490,22 +1491,22 @@ var Ze = {
|
|
|
1490
1491
|
class: g({ active: e.commentsSidebarOpen }),
|
|
1491
1492
|
onMousedown: n[33] ||= F(() => {}, ["prevent"]),
|
|
1492
1493
|
onClick: n[34] ||= (e) => t.$emit("toggle-sidebar")
|
|
1493
|
-
}, [f(r, { name: "comment" }), e.commentCount > 0 ? (b(), l("span",
|
|
1494
|
+
}, [f(r, { name: "comment" }), e.commentCount > 0 ? (b(), l("span", It, E(e.commentCount > 99 ? "99+" : e.commentCount), 1)) : c("", !0)], 42, Ft),
|
|
1494
1495
|
e.imageContext ? (b(), l(a, { key: 2 }, [
|
|
1495
1496
|
n[41] ||= u("span", { class: "divider" }, null, -1),
|
|
1496
|
-
f(
|
|
1497
|
+
f(ve, {
|
|
1497
1498
|
"image-context": e.imageContext,
|
|
1498
1499
|
onChange: n[35] ||= (e) => t.$emit("image-wrap-type", e)
|
|
1499
1500
|
}, null, 8, ["image-context"]),
|
|
1500
|
-
f(
|
|
1501
|
+
f(ye, { onTransform: n[36] ||= (e) => t.$emit("image-transform", e) }),
|
|
1501
1502
|
u("button", {
|
|
1502
1503
|
title: O(h)("formattingBar.imagePropertiesShortcut"),
|
|
1503
1504
|
"aria-label": O(h)("formattingBar.imageProperties"),
|
|
1504
1505
|
onMousedown: n[37] ||= F((e) => t.$emit("image-properties"), ["prevent"])
|
|
1505
|
-
}, [f(r, { name: "tune" })], 40,
|
|
1506
|
+
}, [f(r, { name: "tune" })], 40, Lt)
|
|
1506
1507
|
], 64)) : c("", !0),
|
|
1507
1508
|
w(t.$slots, "table-context", {}, void 0, !0),
|
|
1508
|
-
e.showReviewControls ? (b(), l(a, { key: 3 }, [n[42] ||= u("span", { class: "divider" }, null, -1), f(
|
|
1509
|
+
e.showReviewControls ? (b(), l(a, { key: 3 }, [n[42] ||= u("span", { class: "divider" }, null, -1), f(Fe, {
|
|
1509
1510
|
"track-changes-on": e.trackChangesOn,
|
|
1510
1511
|
"display-mode": e.displayMode,
|
|
1511
1512
|
"read-only": e.readOnly,
|
|
@@ -1517,7 +1518,7 @@ var Ze = {
|
|
|
1517
1518
|
"read-only"
|
|
1518
1519
|
])], 64)) : c("", !0),
|
|
1519
1520
|
n[49] ||= u("span", { class: "divider" }, null, -1),
|
|
1520
|
-
e.editorMode ? (b(), s(
|
|
1521
|
+
e.editorMode ? (b(), s(De, {
|
|
1521
1522
|
key: 4,
|
|
1522
1523
|
"model-value": e.editorMode,
|
|
1523
1524
|
"onUpdate:modelValue": n[40] ||= (e) => t.$emit("mode-change", e)
|
|
@@ -1525,7 +1526,7 @@ var Ze = {
|
|
|
1525
1526
|
w(t.$slots, "toolbar-extra", {}, void 0, !0)
|
|
1526
1527
|
])) : c("", !0);
|
|
1527
1528
|
}
|
|
1528
|
-
}), [["__scopeId", "data-v-1ad51d76"]]),
|
|
1529
|
+
}), [["__scopeId", "data-v-1ad51d76"]]), zt = ["aria-valuemax"], Bt = { class: "docx-horizontal-ruler__ticks" }, Vt = ["title", "onDblclick"], Ht = 12240, Ut = 1440, Wt = 1440, Gt = 567, Kt = "var(--doc-primary)", qt = "var(--doc-primary)", Jt = "var(--doc-primary-hover)", Yt = 5, Xt = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
1529
1530
|
__name: "HorizontalRuler",
|
|
1530
1531
|
props: {
|
|
1531
1532
|
sectionProps: {},
|
|
@@ -1557,14 +1558,14 @@ var Ze = {
|
|
|
1557
1558
|
"tab-stop-remove"
|
|
1558
1559
|
],
|
|
1559
1560
|
setup(e, { emit: t }) {
|
|
1560
|
-
let n = e, r = t, i = Math.round(
|
|
1561
|
+
let n = e, r = t, i = Math.round(Yt * 1.6), s = S(null), d = S(null), f = S(null), p = S(0), m = S("");
|
|
1561
1562
|
function h(e) {
|
|
1562
|
-
return
|
|
1563
|
+
return ee(e) * n.zoom;
|
|
1563
1564
|
}
|
|
1564
1565
|
function g(e) {
|
|
1565
|
-
return Math.round(
|
|
1566
|
+
return Math.round(G(e / n.zoom));
|
|
1566
1567
|
}
|
|
1567
|
-
let y = o(() => n.sectionProps?.pageWidth ??
|
|
1568
|
+
let y = o(() => n.sectionProps?.pageWidth ?? Ht), x = o(() => n.sectionProps?.marginLeft ?? Ut), w = o(() => n.sectionProps?.marginRight ?? Ut), 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(() => ({
|
|
1568
1569
|
position: "relative",
|
|
1569
1570
|
width: D.value + "px",
|
|
1570
1571
|
height: "22px",
|
|
@@ -1595,7 +1596,7 @@ var Ze = {
|
|
|
1595
1596
|
})), V = o(() => {
|
|
1596
1597
|
let e = [];
|
|
1597
1598
|
if (n.unit === "inch") {
|
|
1598
|
-
let t =
|
|
1599
|
+
let t = Wt / 8, n = Math.ceil(y.value / t);
|
|
1599
1600
|
for (let r = 0; r <= n; r++) {
|
|
1600
1601
|
let n = r * t;
|
|
1601
1602
|
if (n > y.value) break;
|
|
@@ -1616,7 +1617,7 @@ var Ze = {
|
|
|
1616
1617
|
});
|
|
1617
1618
|
}
|
|
1618
1619
|
} else {
|
|
1619
|
-
let t =
|
|
1620
|
+
let t = Gt / 10, n = Math.ceil(y.value / t);
|
|
1620
1621
|
for (let r = 0; r <= n; r++) {
|
|
1621
1622
|
let n = r * t;
|
|
1622
1623
|
if (n > y.value) break;
|
|
@@ -1644,15 +1645,15 @@ var Ze = {
|
|
|
1644
1645
|
};
|
|
1645
1646
|
}) : []);
|
|
1646
1647
|
function U(e) {
|
|
1647
|
-
return n.unit === "cm" ? (e /
|
|
1648
|
+
return n.unit === "cm" ? (e / Gt).toFixed(1) + " cm" : (e / Wt).toFixed(2) + "\"";
|
|
1648
1649
|
}
|
|
1649
1650
|
function W(e) {
|
|
1650
|
-
return d.value === e ?
|
|
1651
|
+
return d.value === e ? Jt : f.value === e ? qt : Kt;
|
|
1651
1652
|
}
|
|
1652
|
-
function
|
|
1653
|
+
function K(e, t, r) {
|
|
1653
1654
|
return {
|
|
1654
1655
|
position: "absolute",
|
|
1655
|
-
left: t -
|
|
1656
|
+
left: t - Yt + "px",
|
|
1656
1657
|
width: "10px",
|
|
1657
1658
|
height: "10px",
|
|
1658
1659
|
cursor: n.editable ? "ew-resize" : "default",
|
|
@@ -1667,8 +1668,8 @@ var Ze = {
|
|
|
1667
1668
|
left: 0,
|
|
1668
1669
|
width: 0,
|
|
1669
1670
|
height: 0,
|
|
1670
|
-
borderLeft: `${
|
|
1671
|
-
borderRight: `${
|
|
1671
|
+
borderLeft: `${Yt}px solid transparent`,
|
|
1672
|
+
borderRight: `${Yt}px solid transparent`,
|
|
1672
1673
|
borderTop: `${i}px solid ${t}`,
|
|
1673
1674
|
transition: "border-top-color 0.1s"
|
|
1674
1675
|
} : {
|
|
@@ -1677,8 +1678,8 @@ var Ze = {
|
|
|
1677
1678
|
left: 0,
|
|
1678
1679
|
width: 0,
|
|
1679
1680
|
height: 0,
|
|
1680
|
-
borderLeft: `${
|
|
1681
|
-
borderRight: `${
|
|
1681
|
+
borderLeft: `${Yt}px solid transparent`,
|
|
1682
|
+
borderRight: `${Yt}px solid transparent`,
|
|
1682
1683
|
borderBottom: `${i}px solid ${t}`,
|
|
1683
1684
|
transition: "border-bottom-color 0.1s"
|
|
1684
1685
|
};
|
|
@@ -1693,13 +1694,13 @@ var Ze = {
|
|
|
1693
1694
|
if (!t) return;
|
|
1694
1695
|
let n = e.clientX - t.left;
|
|
1695
1696
|
p.value = n;
|
|
1696
|
-
let r = g(n), i =
|
|
1697
|
-
m.value = U(i),
|
|
1697
|
+
let r = g(n), i = Z(d.value, r);
|
|
1698
|
+
m.value = U(i), ne(d.value, i);
|
|
1698
1699
|
}
|
|
1699
1700
|
function X(e) {
|
|
1700
1701
|
d.value = null, document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", X);
|
|
1701
1702
|
}
|
|
1702
|
-
function
|
|
1703
|
+
function Z(e, t) {
|
|
1703
1704
|
if (e === "leftMargin") {
|
|
1704
1705
|
let e = y.value - w.value - 720;
|
|
1705
1706
|
return Math.round(Math.max(0, Math.min(t, e)));
|
|
@@ -1719,7 +1720,7 @@ var Ze = {
|
|
|
1719
1720
|
let r = y.value - w.value - t, i = T.value - n.indentLeft - 720;
|
|
1720
1721
|
return Math.round(Math.max(0, Math.min(r, i)));
|
|
1721
1722
|
}
|
|
1722
|
-
function
|
|
1723
|
+
function ne(e, t) {
|
|
1723
1724
|
switch (e) {
|
|
1724
1725
|
case "leftMargin":
|
|
1725
1726
|
r("left-margin-change", t);
|
|
@@ -1760,7 +1761,7 @@ var Ze = {
|
|
|
1760
1761
|
style: _(B.value),
|
|
1761
1762
|
onMousedown: n[1] ||= F((t) => e.editable ? J("rightMargin", t) : null, ["prevent", "stop"])
|
|
1762
1763
|
}, null, 36),
|
|
1763
|
-
u("div",
|
|
1764
|
+
u("div", Bt, [(b(!0), l(a, null, C(V.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
|
|
1764
1765
|
class: "docx-horizontal-ruler__tick-line",
|
|
1765
1766
|
style: _({
|
|
1766
1767
|
left: e.position + "px",
|
|
@@ -1774,7 +1775,7 @@ var Ze = {
|
|
|
1774
1775
|
e.showFirstLineIndent ? (b(), l("div", {
|
|
1775
1776
|
key: 0,
|
|
1776
1777
|
class: "docx-ruler-indent",
|
|
1777
|
-
style: _(
|
|
1778
|
+
style: _(K("down", L.value, d.value === "firstLineIndent")),
|
|
1778
1779
|
onMousedown: n[2] ||= F((t) => e.editable ? J("firstLineIndent", t) : null, ["prevent", "stop"]),
|
|
1779
1780
|
onMouseenter: n[3] ||= (e) => f.value = "firstLineIndent",
|
|
1780
1781
|
onMouseleave: n[4] ||= (e) => f.value = null
|
|
@@ -1782,7 +1783,7 @@ var Ze = {
|
|
|
1782
1783
|
e.editable ? (b(), l("div", {
|
|
1783
1784
|
key: 1,
|
|
1784
1785
|
class: "docx-ruler-indent",
|
|
1785
|
-
style: _(
|
|
1786
|
+
style: _(K("up", P.value, d.value === "leftIndent")),
|
|
1786
1787
|
onMousedown: n[5] ||= F((e) => J("leftIndent", e), ["prevent", "stop"]),
|
|
1787
1788
|
onMouseenter: n[6] ||= (e) => f.value = "leftIndent",
|
|
1788
1789
|
onMouseleave: n[7] ||= (e) => f.value = null
|
|
@@ -1790,7 +1791,7 @@ var Ze = {
|
|
|
1790
1791
|
e.editable ? (b(), l("div", {
|
|
1791
1792
|
key: 2,
|
|
1792
1793
|
class: "docx-ruler-indent",
|
|
1793
|
-
style: _(
|
|
1794
|
+
style: _(K("down", I.value, d.value === "rightIndent")),
|
|
1794
1795
|
onMousedown: n[8] ||= F((e) => J("rightIndent", e), ["prevent", "stop"]),
|
|
1795
1796
|
onMouseenter: n[9] ||= (e) => f.value = "rightIndent",
|
|
1796
1797
|
onMouseleave: n[10] ||= (e) => f.value = null
|
|
@@ -1801,15 +1802,15 @@ var Ze = {
|
|
|
1801
1802
|
style: _({ left: e.px + "px" }),
|
|
1802
1803
|
title: `${e.label}`,
|
|
1803
1804
|
onDblclick: F((n) => t.$emit("tab-stop-remove", e.twips), ["prevent"])
|
|
1804
|
-
}, " L ", 44,
|
|
1805
|
+
}, " L ", 44, Vt))), 128)),
|
|
1805
1806
|
d.value && m.value ? (b(), l("div", {
|
|
1806
1807
|
key: 3,
|
|
1807
1808
|
class: "docx-horizontal-ruler__tooltip",
|
|
1808
1809
|
style: _({ left: p.value + "px" })
|
|
1809
1810
|
}, E(m.value), 5)) : c("", !0)
|
|
1810
|
-
], 12,
|
|
1811
|
+
], 12, zt));
|
|
1811
1812
|
}
|
|
1812
|
-
}), [["__scopeId", "data-v-6f3ea48c"]]),
|
|
1813
|
+
}), [["__scopeId", "data-v-6f3ea48c"]]), Zt = ["disabled", "onClick"], Qt = { class: "docx-tbp__panel" }, $t = ["title", "onClick"], en = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
1813
1814
|
__name: "TableBorderPicker",
|
|
1814
1815
|
props: { disabled: { type: Boolean } },
|
|
1815
1816
|
emits: ["change"],
|
|
@@ -1883,8 +1884,8 @@ var Ze = {
|
|
|
1883
1884
|
}, [f(r, {
|
|
1884
1885
|
name: "border_all",
|
|
1885
1886
|
size: 20
|
|
1886
|
-
})], 8,
|
|
1887
|
-
panel: M(() => [u("div",
|
|
1887
|
+
})], 8, Zt)]),
|
|
1888
|
+
panel: M(() => [u("div", Qt, [(b(), l(a, null, C(d, (e) => u("button", {
|
|
1888
1889
|
key: e.value,
|
|
1889
1890
|
type: "button",
|
|
1890
1891
|
class: "docx-tbp__option",
|
|
@@ -1893,11 +1894,11 @@ var Ze = {
|
|
|
1893
1894
|
}, [f(r, {
|
|
1894
1895
|
name: e.icon,
|
|
1895
1896
|
size: 20
|
|
1896
|
-
}, null, 8, ["name"])], 8,
|
|
1897
|
+
}, null, 8, ["name"])], 8, $t)), 64))])]),
|
|
1897
1898
|
_: 1
|
|
1898
1899
|
}, 8, ["open"]));
|
|
1899
1900
|
}
|
|
1900
|
-
}), [["__scopeId", "data-v-4e30a014"]]),
|
|
1901
|
+
}), [["__scopeId", "data-v-4e30a014"]]), tn = /* @__PURE__ */ p({
|
|
1901
1902
|
__name: "TableBorderColorPicker",
|
|
1902
1903
|
props: {
|
|
1903
1904
|
disabled: { type: Boolean },
|
|
@@ -1924,7 +1925,7 @@ var Ze = {
|
|
|
1924
1925
|
"title"
|
|
1925
1926
|
]));
|
|
1926
1927
|
}
|
|
1927
|
-
}),
|
|
1928
|
+
}), nn = ["disabled", "onClick"], rn = { class: "docx-tbwidth__panel" }, an = ["onClick"], on = { class: "docx-tbwidth__label" }, sn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
1928
1929
|
__name: "TableBorderWidthPicker",
|
|
1929
1930
|
props: { disabled: { type: Boolean } },
|
|
1930
1931
|
emits: ["change"],
|
|
@@ -1988,8 +1989,8 @@ var Ze = {
|
|
|
1988
1989
|
}, [f(r, {
|
|
1989
1990
|
name: "line_weight",
|
|
1990
1991
|
size: 20
|
|
1991
|
-
})], 8,
|
|
1992
|
-
panel: M(() => [u("div",
|
|
1992
|
+
})], 8, nn)]),
|
|
1993
|
+
panel: M(() => [u("div", rn, [(b(), l(a, null, C(d, (e) => u("button", {
|
|
1993
1994
|
key: e.eighths,
|
|
1994
1995
|
type: "button",
|
|
1995
1996
|
class: "docx-tbwidth__option",
|
|
@@ -1997,11 +1998,11 @@ var Ze = {
|
|
|
1997
1998
|
}, [u("span", {
|
|
1998
1999
|
class: "docx-tbwidth__preview",
|
|
1999
2000
|
style: _({ borderTopWidth: e.previewPx + "px" })
|
|
2000
|
-
}, null, 4), u("span",
|
|
2001
|
+
}, null, 4), u("span", on, E(e.label), 1)], 8, an)), 64))])]),
|
|
2001
2002
|
_: 1
|
|
2002
2003
|
}, 8, ["open"]));
|
|
2003
2004
|
}
|
|
2004
|
-
}), [["__scopeId", "data-v-42a746ba"]]),
|
|
2005
|
+
}), [["__scopeId", "data-v-42a746ba"]]), cn = /* @__PURE__ */ p({
|
|
2005
2006
|
__name: "TableCellFillPicker",
|
|
2006
2007
|
props: {
|
|
2007
2008
|
disabled: { type: Boolean },
|
|
@@ -2031,23 +2032,23 @@ var Ze = {
|
|
|
2031
2032
|
"auto-label"
|
|
2032
2033
|
]));
|
|
2033
2034
|
}
|
|
2034
|
-
}),
|
|
2035
|
+
}), ln = [
|
|
2035
2036
|
"disabled",
|
|
2036
2037
|
"title",
|
|
2037
2038
|
"onClick"
|
|
2038
|
-
],
|
|
2039
|
+
], un = ["aria-label"], dn = ["disabled"], fn = ["disabled"], pn = ["disabled"], mn = ["disabled"], hn = { class: "docx-tmore__section-label" }, gn = { class: "docx-tmore__icon-row" }, _n = ["title"], vn = ["title"], yn = ["title"], bn = { class: "docx-tmore__section-label" }, xn = { class: "docx-tmore__icon-row" }, Sn = ["title"], Cn = ["title"], wn = ["title"], Tn = { class: "docx-tmore__grow" }, En = {
|
|
2039
2040
|
key: 0,
|
|
2040
2041
|
class: "docx-tmore__sub"
|
|
2041
|
-
},
|
|
2042
|
+
}, Dn = { class: "docx-tmore__margin-grid" }, On = { class: "docx-tmore__field-label" }, kn = ["onUpdate:modelValue"], An = { class: "docx-tmore__grow" }, jn = {
|
|
2042
2043
|
key: 1,
|
|
2043
2044
|
class: "docx-tmore__sub"
|
|
2044
|
-
},
|
|
2045
|
+
}, Mn = { class: "docx-tmore__row-field" }, Nn = { class: "docx-tmore__field-label" }, Pn = { value: "auto" }, Fn = { value: "atLeast" }, In = { value: "exact" }, Ln = {
|
|
2045
2046
|
key: 0,
|
|
2046
2047
|
class: "docx-tmore__row-field"
|
|
2047
|
-
},
|
|
2048
|
+
}, Rn = { class: "docx-tmore__field-label" }, zn = { class: "docx-tmore__grow" }, Bn = {
|
|
2048
2049
|
key: 2,
|
|
2049
2050
|
class: "docx-tmore__sub docx-tmore__sub--list"
|
|
2050
|
-
},
|
|
2051
|
+
}, Vn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2051
2052
|
__name: "TableMoreDropdown",
|
|
2052
2053
|
props: {
|
|
2053
2054
|
disabled: {
|
|
@@ -2125,7 +2126,7 @@ var Ze = {
|
|
|
2125
2126
|
}, [f(r, {
|
|
2126
2127
|
name: "more_vert",
|
|
2127
2128
|
size: 20
|
|
2128
|
-
})], 10,
|
|
2129
|
+
})], 10, ln)]),
|
|
2129
2130
|
panel: M(() => [u("div", {
|
|
2130
2131
|
class: "docx-tmore__panel",
|
|
2131
2132
|
role: "menu",
|
|
@@ -2172,7 +2173,7 @@ var Ze = {
|
|
|
2172
2173
|
}, [f(r, {
|
|
2173
2174
|
name: "call_merge",
|
|
2174
2175
|
size: 18
|
|
2175
|
-
}), u("span", null, E(O(m)("table.mergeCells")), 1)], 8,
|
|
2176
|
+
}), u("span", null, E(O(m)("table.mergeCells")), 1)], 8, dn),
|
|
2176
2177
|
u("button", {
|
|
2177
2178
|
type: "button",
|
|
2178
2179
|
class: "docx-tmore__item",
|
|
@@ -2181,7 +2182,7 @@ var Ze = {
|
|
|
2181
2182
|
}, [f(r, {
|
|
2182
2183
|
name: "call_split",
|
|
2183
2184
|
size: 18
|
|
2184
|
-
}), u("span", null, E(O(m)("table.splitCell")), 1)], 8,
|
|
2185
|
+
}), u("span", null, E(O(m)("table.splitCell")), 1)], 8, fn),
|
|
2185
2186
|
n[40] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2186
2187
|
u("button", {
|
|
2187
2188
|
type: "button",
|
|
@@ -2200,7 +2201,7 @@ var Ze = {
|
|
|
2200
2201
|
}, [f(r, {
|
|
2201
2202
|
name: "delete",
|
|
2202
2203
|
size: 18
|
|
2203
|
-
}), u("span", null, E(O(m)("deleteRow")), 1)], 8,
|
|
2204
|
+
}), u("span", null, E(O(m)("deleteRow")), 1)], 8, pn),
|
|
2204
2205
|
u("button", {
|
|
2205
2206
|
type: "button",
|
|
2206
2207
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
@@ -2209,7 +2210,7 @@ var Ze = {
|
|
|
2209
2210
|
}, [f(r, {
|
|
2210
2211
|
name: "delete",
|
|
2211
2212
|
size: 18
|
|
2212
|
-
}), u("span", null, E(O(m)("deleteColumn")), 1)], 8,
|
|
2213
|
+
}), u("span", null, E(O(m)("deleteColumn")), 1)], 8, mn),
|
|
2213
2214
|
u("button", {
|
|
2214
2215
|
type: "button",
|
|
2215
2216
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
@@ -2219,8 +2220,8 @@ var Ze = {
|
|
|
2219
2220
|
size: 18
|
|
2220
2221
|
}), u("span", null, E(O(m)("table.deleteTable")), 1)]),
|
|
2221
2222
|
n[42] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2222
|
-
u("div",
|
|
2223
|
-
u("div",
|
|
2223
|
+
u("div", hn, E(O(m)("tableAdvanced.verticalAlignment")), 1),
|
|
2224
|
+
u("div", gn, [
|
|
2224
2225
|
u("button", {
|
|
2225
2226
|
type: "button",
|
|
2226
2227
|
class: "docx-tmore__icon-btn",
|
|
@@ -2230,7 +2231,7 @@ var Ze = {
|
|
|
2230
2231
|
}, [f(r, {
|
|
2231
2232
|
name: "vertical_align_top",
|
|
2232
2233
|
size: 16
|
|
2233
|
-
})], 40,
|
|
2234
|
+
})], 40, _n),
|
|
2234
2235
|
u("button", {
|
|
2235
2236
|
type: "button",
|
|
2236
2237
|
class: "docx-tmore__icon-btn",
|
|
@@ -2240,7 +2241,7 @@ var Ze = {
|
|
|
2240
2241
|
}, [f(r, {
|
|
2241
2242
|
name: "vertical_align_center",
|
|
2242
2243
|
size: 16
|
|
2243
|
-
})], 40,
|
|
2244
|
+
})], 40, vn),
|
|
2244
2245
|
u("button", {
|
|
2245
2246
|
type: "button",
|
|
2246
2247
|
class: "docx-tmore__icon-btn",
|
|
@@ -2250,11 +2251,11 @@ var Ze = {
|
|
|
2250
2251
|
}, [f(r, {
|
|
2251
2252
|
name: "vertical_align_bottom",
|
|
2252
2253
|
size: 16
|
|
2253
|
-
})], 40,
|
|
2254
|
+
})], 40, yn)
|
|
2254
2255
|
]),
|
|
2255
2256
|
n[43] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2256
|
-
u("div",
|
|
2257
|
-
u("div",
|
|
2257
|
+
u("div", bn, E(O(m)("tableAdvanced.tableAlignment")), 1),
|
|
2258
|
+
u("div", xn, [
|
|
2258
2259
|
u("button", {
|
|
2259
2260
|
type: "button",
|
|
2260
2261
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "left" }]),
|
|
@@ -2264,7 +2265,7 @@ var Ze = {
|
|
|
2264
2265
|
}, [f(r, {
|
|
2265
2266
|
name: "format_align_left",
|
|
2266
2267
|
size: 16
|
|
2267
|
-
})], 42,
|
|
2268
|
+
})], 42, Sn),
|
|
2268
2269
|
u("button", {
|
|
2269
2270
|
type: "button",
|
|
2270
2271
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "center" }]),
|
|
@@ -2274,7 +2275,7 @@ var Ze = {
|
|
|
2274
2275
|
}, [f(r, {
|
|
2275
2276
|
name: "format_align_center",
|
|
2276
2277
|
size: 16
|
|
2277
|
-
})], 42,
|
|
2278
|
+
})], 42, Cn),
|
|
2278
2279
|
u("button", {
|
|
2279
2280
|
type: "button",
|
|
2280
2281
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "right" }]),
|
|
@@ -2284,7 +2285,7 @@ var Ze = {
|
|
|
2284
2285
|
}, [f(r, {
|
|
2285
2286
|
name: "format_align_right",
|
|
2286
2287
|
size: 16
|
|
2287
|
-
})], 42,
|
|
2288
|
+
})], 42, wn)
|
|
2288
2289
|
]),
|
|
2289
2290
|
n[44] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2290
2291
|
u("button", {
|
|
@@ -2296,13 +2297,13 @@ var Ze = {
|
|
|
2296
2297
|
name: "padding",
|
|
2297
2298
|
size: 18
|
|
2298
2299
|
}),
|
|
2299
|
-
u("span",
|
|
2300
|
+
u("span", Tn, E(O(m)("tableAdvanced.cellMargins")), 1),
|
|
2300
2301
|
f(r, {
|
|
2301
2302
|
name: _.value ? "expand_less" : "expand_more",
|
|
2302
2303
|
size: 18
|
|
2303
2304
|
}, null, 8, ["name"])
|
|
2304
2305
|
]),
|
|
2305
|
-
_.value ? (b(), l("div",
|
|
2306
|
+
_.value ? (b(), l("div", En, [u("div", Dn, [(b(), l(a, null, C([
|
|
2306
2307
|
"top",
|
|
2307
2308
|
"bottom",
|
|
2308
2309
|
"left",
|
|
@@ -2311,14 +2312,14 @@ var Ze = {
|
|
|
2311
2312
|
key: e,
|
|
2312
2313
|
class: "docx-tmore__field"
|
|
2313
2314
|
}, [
|
|
2314
|
-
u("span",
|
|
2315
|
+
u("span", On, E(e), 1),
|
|
2315
2316
|
N(u("input", {
|
|
2316
2317
|
type: "number",
|
|
2317
2318
|
min: "0",
|
|
2318
2319
|
step: "20",
|
|
2319
2320
|
"onUpdate:modelValue": (t) => w[e] = t,
|
|
2320
2321
|
class: "docx-tmore__input"
|
|
2321
|
-
}, null, 8,
|
|
2322
|
+
}, null, 8, kn), [[
|
|
2322
2323
|
A,
|
|
2323
2324
|
w[e],
|
|
2324
2325
|
void 0,
|
|
@@ -2339,23 +2340,23 @@ var Ze = {
|
|
|
2339
2340
|
name: "height",
|
|
2340
2341
|
size: 18
|
|
2341
2342
|
}),
|
|
2342
|
-
u("span",
|
|
2343
|
+
u("span", An, E(O(m)("tableAdvanced.rowHeight")), 1),
|
|
2343
2344
|
f(r, {
|
|
2344
2345
|
name: v.value ? "expand_less" : "expand_more",
|
|
2345
2346
|
size: 18
|
|
2346
2347
|
}, null, 8, ["name"])
|
|
2347
2348
|
]),
|
|
2348
|
-
v.value ? (b(), l("div",
|
|
2349
|
-
u("label",
|
|
2349
|
+
v.value ? (b(), l("div", jn, [
|
|
2350
|
+
u("label", Mn, [u("span", Nn, E(O(m)("tableAdvanced.rule")), 1), N(u("select", {
|
|
2350
2351
|
"onUpdate:modelValue": n[24] ||= (e) => D.value = e,
|
|
2351
2352
|
class: "docx-tmore__select"
|
|
2352
2353
|
}, [
|
|
2353
|
-
u("option",
|
|
2354
|
-
u("option",
|
|
2355
|
-
u("option",
|
|
2354
|
+
u("option", Pn, E(O(m)("tableAdvanced.heightRules.auto")), 1),
|
|
2355
|
+
u("option", Fn, E(O(m)("tableAdvanced.heightRules.atLeast")), 1),
|
|
2356
|
+
u("option", In, E(O(m)("tableAdvanced.heightRules.exact")), 1)
|
|
2356
2357
|
], 512), [[k, D.value]])]),
|
|
2357
|
-
D.value === "auto" ? c("", !0) : (b(), l("label",
|
|
2358
|
-
u("span",
|
|
2358
|
+
D.value === "auto" ? c("", !0) : (b(), l("label", Ln, [
|
|
2359
|
+
u("span", Rn, E(O(m)("tableAdvanced.height")), 1),
|
|
2359
2360
|
N(u("input", {
|
|
2360
2361
|
type: "number",
|
|
2361
2362
|
min: "0",
|
|
@@ -2385,13 +2386,13 @@ var Ze = {
|
|
|
2385
2386
|
name: "text_rotation_none",
|
|
2386
2387
|
size: 18
|
|
2387
2388
|
}),
|
|
2388
|
-
u("span",
|
|
2389
|
+
u("span", zn, E(O(m)("textDirection")), 1),
|
|
2389
2390
|
f(r, {
|
|
2390
2391
|
name: y.value ? "expand_less" : "expand_more",
|
|
2391
2392
|
size: 18
|
|
2392
2393
|
}, null, 8, ["name"])
|
|
2393
2394
|
]),
|
|
2394
|
-
y.value ? (b(), l("div",
|
|
2395
|
+
y.value ? (b(), l("div", Bn, [
|
|
2395
2396
|
u("button", {
|
|
2396
2397
|
type: "button",
|
|
2397
2398
|
class: "docx-tmore__sub-item",
|
|
@@ -2450,11 +2451,11 @@ var Ze = {
|
|
|
2450
2451
|
name: "settings",
|
|
2451
2452
|
size: 18
|
|
2452
2453
|
}), u("span", null, E(O(m)("tableAdvanced.tableProperties")), 1)])
|
|
2453
|
-
], 8,
|
|
2454
|
+
], 8, un)]),
|
|
2454
2455
|
_: 1
|
|
2455
2456
|
}, 8, ["open"]));
|
|
2456
2457
|
}
|
|
2457
|
-
}), [["__scopeId", "data-v-5d357bc4"]]),
|
|
2458
|
+
}), [["__scopeId", "data-v-5d357bc4"]]), Hn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2458
2459
|
__name: "TableToolbar",
|
|
2459
2460
|
props: {
|
|
2460
2461
|
view: {},
|
|
@@ -2581,14 +2582,14 @@ var Ze = {
|
|
|
2581
2582
|
onRowHeight: N
|
|
2582
2583
|
}), (t, n) => d.value ? (b(), l(a, { key: 0 }, [
|
|
2583
2584
|
n[0] ||= u("span", { class: "divider" }, null, -1),
|
|
2584
|
-
f(
|
|
2585
|
-
f(
|
|
2586
|
-
f(
|
|
2587
|
-
f(
|
|
2585
|
+
f(en, { onChange: w }),
|
|
2586
|
+
f(tn, m({ theme: e.theme ?? null }, g.value, { onChange: T }), null, 16, ["theme"]),
|
|
2587
|
+
f(sn, { onChange: E }),
|
|
2588
|
+
f(cn, {
|
|
2588
2589
|
theme: e.theme ?? null,
|
|
2589
2590
|
onChange: D
|
|
2590
2591
|
}, null, 8, ["theme"]),
|
|
2591
|
-
f(
|
|
2592
|
+
f(Vn, {
|
|
2592
2593
|
"can-split": p.value,
|
|
2593
2594
|
"can-merge": _.value,
|
|
2594
2595
|
"row-count": v.value,
|
|
@@ -2607,7 +2608,7 @@ var Ze = {
|
|
|
2607
2608
|
])
|
|
2608
2609
|
], 64)) : c("", !0);
|
|
2609
2610
|
}
|
|
2610
|
-
}), [["__scopeId", "data-v-c73a7e43"]]),
|
|
2611
|
+
}), [["__scopeId", "data-v-c73a7e43"]]), Un = { class: "docx-vertical-ruler__ticks" }, Wn = 15840, Gn = 1440, Kn = 1440, qn = 567, Jn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2611
2612
|
__name: "VerticalRuler",
|
|
2612
2613
|
props: {
|
|
2613
2614
|
sectionProps: {},
|
|
@@ -2622,12 +2623,12 @@ var Ze = {
|
|
|
2622
2623
|
setup(e, { emit: t }) {
|
|
2623
2624
|
let n = e, r = t, i = S(null), s = S(null);
|
|
2624
2625
|
function d(e) {
|
|
2625
|
-
return
|
|
2626
|
+
return ee(e) * n.zoom;
|
|
2626
2627
|
}
|
|
2627
2628
|
function f(e) {
|
|
2628
|
-
return Math.round(
|
|
2629
|
+
return Math.round(G(e / n.zoom));
|
|
2629
2630
|
}
|
|
2630
|
-
let p = o(() => n.sectionProps?.pageHeight ??
|
|
2631
|
+
let p = o(() => n.sectionProps?.pageHeight ?? Wn), m = o(() => n.sectionProps?.marginTop ?? Gn), h = o(() => n.sectionProps?.marginBottom ?? Gn), g = o(() => d(p.value)), y = o(() => d(m.value)), x = o(() => d(h.value)), w = o(() => ({
|
|
2631
2632
|
position: "relative",
|
|
2632
2633
|
width: "20px",
|
|
2633
2634
|
height: g.value + "px",
|
|
@@ -2638,7 +2639,7 @@ var Ze = {
|
|
|
2638
2639
|
})), T = o(() => {
|
|
2639
2640
|
let e = [];
|
|
2640
2641
|
if (n.unit === "inch") {
|
|
2641
|
-
let t =
|
|
2642
|
+
let t = Kn / 8, n = Math.ceil(p.value / t);
|
|
2642
2643
|
for (let r = 0; r <= n; r++) {
|
|
2643
2644
|
let n = r * t;
|
|
2644
2645
|
if (n > p.value) break;
|
|
@@ -2659,7 +2660,7 @@ var Ze = {
|
|
|
2659
2660
|
});
|
|
2660
2661
|
}
|
|
2661
2662
|
} else {
|
|
2662
|
-
let t =
|
|
2663
|
+
let t = qn / 10, n = Math.ceil(p.value / t);
|
|
2663
2664
|
for (let r = 0; r <= n; r++) {
|
|
2664
2665
|
let n = r * t;
|
|
2665
2666
|
if (n > p.value) break;
|
|
@@ -2725,7 +2726,7 @@ var Ze = {
|
|
|
2725
2726
|
"aria-label": "Vertical ruler",
|
|
2726
2727
|
"aria-orientation": "vertical"
|
|
2727
2728
|
}, [
|
|
2728
|
-
u("div",
|
|
2729
|
+
u("div", Un, [(b(!0), l(a, null, C(T.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
|
|
2729
2730
|
class: "docx-vertical-ruler__tick-line",
|
|
2730
2731
|
style: _({
|
|
2731
2732
|
top: e.position + "px",
|
|
@@ -2757,10 +2758,7 @@ var Ze = {
|
|
|
2757
2758
|
}), [["__scopeId", "data-v-f7ccbd38"]]);
|
|
2758
2759
|
//#endregion
|
|
2759
2760
|
//#region src/utils/comments.ts
|
|
2760
|
-
function
|
|
2761
|
-
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("") : "";
|
|
2762
|
-
}
|
|
2763
|
-
function Jn(e) {
|
|
2761
|
+
function Yn(e) {
|
|
2764
2762
|
return e ? new Date(e).toLocaleString(void 0, {
|
|
2765
2763
|
hour: "numeric",
|
|
2766
2764
|
minute: "2-digit",
|
|
@@ -2768,7 +2766,7 @@ function Jn(e) {
|
|
|
2768
2766
|
day: "numeric"
|
|
2769
2767
|
}) : "";
|
|
2770
2768
|
}
|
|
2771
|
-
function
|
|
2769
|
+
function Xn(e) {
|
|
2772
2770
|
return W({
|
|
2773
2771
|
text: e.split(/\s+/).map((e) => W({
|
|
2774
2772
|
text: e,
|
|
@@ -2779,7 +2777,7 @@ function Yn(e) {
|
|
|
2779
2777
|
end: 2
|
|
2780
2778
|
});
|
|
2781
2779
|
}
|
|
2782
|
-
var
|
|
2780
|
+
var Zn = [
|
|
2783
2781
|
"#6DCCB1",
|
|
2784
2782
|
"#79AAD9",
|
|
2785
2783
|
"#EE789D",
|
|
@@ -2793,12 +2791,12 @@ var Xn = [
|
|
|
2793
2791
|
"#E15759",
|
|
2794
2792
|
"#76B7B2"
|
|
2795
2793
|
];
|
|
2796
|
-
function
|
|
2794
|
+
function Qn(e) {
|
|
2797
2795
|
let t = 0;
|
|
2798
2796
|
for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
|
|
2799
|
-
return
|
|
2797
|
+
return Zn[Math.abs(t) % Zn.length] ?? "#888888";
|
|
2800
2798
|
}
|
|
2801
|
-
function
|
|
2799
|
+
function $(e, t = 50) {
|
|
2802
2800
|
return e.length > t ? W({
|
|
2803
2801
|
text: e,
|
|
2804
2802
|
units: "codeUnits",
|
|
@@ -2814,11 +2812,11 @@ var $n = /* @__PURE__ */ p({
|
|
|
2814
2812
|
size: { default: 32 }
|
|
2815
2813
|
},
|
|
2816
2814
|
setup(e) {
|
|
2817
|
-
let t = e, n = o(() =>
|
|
2815
|
+
let t = e, n = o(() => Xn(t.name || "U")), r = o(() => ({
|
|
2818
2816
|
width: t.size + "px",
|
|
2819
2817
|
height: t.size + "px",
|
|
2820
2818
|
borderRadius: "50%",
|
|
2821
|
-
backgroundColor:
|
|
2819
|
+
backgroundColor: Qn(t.name || "U"),
|
|
2822
2820
|
color: "#fff",
|
|
2823
2821
|
display: "flex",
|
|
2824
2822
|
alignItems: "center",
|
|
@@ -2838,7 +2836,7 @@ var $n = /* @__PURE__ */ p({
|
|
|
2838
2836
|
}, tr = {
|
|
2839
2837
|
key: 0,
|
|
2840
2838
|
class: "reply-thread__more"
|
|
2841
|
-
}, nr = { class: "reply-thread__header" }, rr = { class: "reply-thread__author-block" }, ir = { class: "reply-thread__author" }, ar = { class: "reply-thread__date" }, or = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2839
|
+
}, nr = { class: "reply-thread__header" }, rr = { class: "reply-thread__author-block" }, ir = { class: "reply-thread__author" }, ar = { class: "reply-thread__date" }, or = ["data-find-comment-id", "data-find-comment-paragraph"], sr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2842
2840
|
__name: "ReplyThread",
|
|
2843
2841
|
props: {
|
|
2844
2842
|
replies: {},
|
|
@@ -2852,9 +2850,12 @@ var $n = /* @__PURE__ */ p({
|
|
|
2852
2850
|
}, [u("div", nr, [f($n, {
|
|
2853
2851
|
name: t.author,
|
|
2854
2852
|
size: 28
|
|
2855
|
-
}, null, 8, ["name"]), u("div", rr, [u("div", ir, E(t.author || "Unknown"), 1), u("div", ar, E(O(
|
|
2853
|
+
}, null, 8, ["name"]), u("div", rr, [u("div", ir, E(t.author || "Unknown"), 1), u("div", ar, E(O(Yn)(t.date)), 1)])]), u("div", { class: g(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, [(b(!0), l(a, null, C(t.content, (e, n) => (b(), l(a, { key: n }, [u("span", {
|
|
2854
|
+
"data-find-comment-id": t.id,
|
|
2855
|
+
"data-find-comment-paragraph": n
|
|
2856
|
+
}, E(O(Z)(e)), 9, or), i[0] ||= d(E(" "), -1)], 64))), 128))], 2)], 2))), 128))])) : c("", !0);
|
|
2856
2857
|
}
|
|
2857
|
-
}), [["__scopeId", "data-v-
|
|
2858
|
+
}), [["__scopeId", "data-v-91b98988"]]), cr = ["onKeydown"], lr = { class: "reply-input__actions" }, ur = ["disabled"], dr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2858
2859
|
__name: "ReplyInput",
|
|
2859
2860
|
emits: ["submit"],
|
|
2860
2861
|
setup(e, { emit: t }) {
|
|
@@ -2886,14 +2887,14 @@ var $n = /* @__PURE__ */ p({
|
|
|
2886
2887
|
P(F(p, ["prevent"]), ["enter"]),
|
|
2887
2888
|
P(f, ["esc"])
|
|
2888
2889
|
]
|
|
2889
|
-
}, null, 40,
|
|
2890
|
+
}, null, 40, cr), [[A, i.value]]), u("div", lr, [u("button", {
|
|
2890
2891
|
class: "reply-input__cancel",
|
|
2891
2892
|
onClick: F(f, ["stop"])
|
|
2892
2893
|
}, "Cancel"), u("button", {
|
|
2893
2894
|
class: g(["reply-input__submit", { "reply-input__submit--active": c.value }]),
|
|
2894
2895
|
disabled: !c.value,
|
|
2895
2896
|
onClick: F(p, ["stop"])
|
|
2896
|
-
}, " Reply ", 10,
|
|
2897
|
+
}, " Reply ", 10, ur)])], 64)) : (b(), l("input", {
|
|
2897
2898
|
key: 0,
|
|
2898
2899
|
readonly: "",
|
|
2899
2900
|
placeholder: "Reply",
|
|
@@ -2902,13 +2903,13 @@ var $n = /* @__PURE__ */ p({
|
|
|
2902
2903
|
onClick: F(d, ["stop"])
|
|
2903
2904
|
}, null, 32))], 32));
|
|
2904
2905
|
}
|
|
2905
|
-
}), [["__scopeId", "data-v-fea8646c"]]),
|
|
2906
|
+
}), [["__scopeId", "data-v-fea8646c"]]), fr = ["data-comment-id"], pr = {
|
|
2906
2907
|
key: 0,
|
|
2907
2908
|
class: "comment-card__resolved"
|
|
2908
|
-
},
|
|
2909
|
+
}, mr = { class: "comment-card__head" }, hr = { class: "comment-card__author-block" }, gr = { class: "comment-card__author" }, _r = { class: "comment-card__date" }, vr = {
|
|
2909
2910
|
key: 0,
|
|
2910
2911
|
class: "comment-card__actions"
|
|
2911
|
-
},
|
|
2912
|
+
}, yr = ["title"], br = { class: "comment-card__body" }, xr = ["data-find-comment-id", "data-find-comment-paragraph"], Sr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2912
2913
|
__name: "CommentCard",
|
|
2913
2914
|
props: {
|
|
2914
2915
|
comment: {},
|
|
@@ -2923,9 +2924,9 @@ var $n = /* @__PURE__ */ p({
|
|
|
2923
2924
|
"delete"
|
|
2924
2925
|
],
|
|
2925
2926
|
setup(e, { emit: t }) {
|
|
2926
|
-
let n = e, i = t,
|
|
2927
|
-
function
|
|
2928
|
-
|
|
2927
|
+
let n = e, i = t, o = S(!1);
|
|
2928
|
+
function p() {
|
|
2929
|
+
o.value = !1, i("delete", n.comment.id);
|
|
2929
2930
|
}
|
|
2930
2931
|
return (t, n) => (b(), l("div", {
|
|
2931
2932
|
class: g(["comment-card", { "comment-card--expanded": e.expanded }]),
|
|
@@ -2933,17 +2934,17 @@ var $n = /* @__PURE__ */ p({
|
|
|
2933
2934
|
onClick: n[5] ||= (e) => t.$emit("click"),
|
|
2934
2935
|
onMousedown: n[6] ||= F(() => {}, ["stop"])
|
|
2935
2936
|
}, [
|
|
2936
|
-
e.comment.done ? (b(), l("div",
|
|
2937
|
+
e.comment.done ? (b(), l("div", pr, [f(r, {
|
|
2937
2938
|
name: "check",
|
|
2938
2939
|
size: 12
|
|
2939
2940
|
}), n[7] ||= u("span", null, "Resolved", -1)])) : c("", !0),
|
|
2940
|
-
u("div",
|
|
2941
|
+
u("div", mr, [
|
|
2941
2942
|
f($n, {
|
|
2942
2943
|
name: e.comment.author,
|
|
2943
2944
|
size: 32
|
|
2944
2945
|
}, null, 8, ["name"]),
|
|
2945
|
-
u("div",
|
|
2946
|
-
e.expanded ? (b(), l("div",
|
|
2946
|
+
u("div", hr, [u("div", gr, E(e.comment.author || "Unknown"), 1), u("div", _r, E(O(Yn)(e.comment.date)), 1)]),
|
|
2947
|
+
e.expanded ? (b(), l("div", vr, [
|
|
2947
2948
|
u("button", {
|
|
2948
2949
|
class: "comment-card__icon-btn",
|
|
2949
2950
|
title: e.comment.done ? "Reopen" : "Resolve",
|
|
@@ -2951,38 +2952,41 @@ var $n = /* @__PURE__ */ p({
|
|
|
2951
2952
|
}, [f(r, {
|
|
2952
2953
|
name: e.comment.done ? "undo" : "check",
|
|
2953
2954
|
size: 20
|
|
2954
|
-
}, null, 8, ["name"])], 8,
|
|
2955
|
+
}, null, 8, ["name"])], 8, yr),
|
|
2955
2956
|
u("button", {
|
|
2956
2957
|
class: "comment-card__icon-btn",
|
|
2957
2958
|
title: "More options",
|
|
2958
|
-
onClick: n[1] ||= F((e) =>
|
|
2959
|
+
onClick: n[1] ||= F((e) => o.value = !o.value, ["stop"])
|
|
2959
2960
|
}, [f(r, {
|
|
2960
2961
|
name: "more_vert",
|
|
2961
2962
|
size: 20
|
|
2962
2963
|
})]),
|
|
2963
|
-
|
|
2964
|
+
o.value ? (b(), l("div", {
|
|
2964
2965
|
key: 0,
|
|
2965
2966
|
class: "comment-card__menu",
|
|
2966
2967
|
onClick: n[2] ||= F(() => {}, ["stop"]),
|
|
2967
2968
|
onMousedown: n[3] ||= F(() => {}, ["stop"])
|
|
2968
2969
|
}, [u("button", {
|
|
2969
2970
|
class: "comment-card__menu-item",
|
|
2970
|
-
onClick:
|
|
2971
|
+
onClick: p
|
|
2971
2972
|
}, "Delete")], 32)) : c("", !0)
|
|
2972
2973
|
])) : c("", !0)
|
|
2973
2974
|
]),
|
|
2974
|
-
u("div",
|
|
2975
|
-
|
|
2975
|
+
u("div", br, [(b(!0), l(a, null, C(e.comment.content, (t, r) => (b(), l(a, { key: r }, [u("span", {
|
|
2976
|
+
"data-find-comment-id": e.comment.id,
|
|
2977
|
+
"data-find-comment-paragraph": r
|
|
2978
|
+
}, E(O(Z)(t)), 9, xr), n[8] ||= d(E(" "), -1)], 64))), 128))]),
|
|
2979
|
+
f(sr, {
|
|
2976
2980
|
replies: e.replies,
|
|
2977
2981
|
"is-expanded": e.expanded
|
|
2978
2982
|
}, null, 8, ["replies", "is-expanded"]),
|
|
2979
|
-
e.expanded && !e.comment.done ? (b(), s(
|
|
2983
|
+
e.expanded && !e.comment.done ? (b(), s(dr, {
|
|
2980
2984
|
key: 1,
|
|
2981
2985
|
onSubmit: n[4] ||= (n) => t.$emit("reply", e.comment.id, n)
|
|
2982
2986
|
})) : c("", !0)
|
|
2983
|
-
], 42,
|
|
2987
|
+
], 42, fr));
|
|
2984
2988
|
}
|
|
2985
|
-
}), [["__scopeId", "data-v-
|
|
2989
|
+
}), [["__scopeId", "data-v-a8a99dab"]]), Cr = ["data-comment-id"], wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2986
2990
|
__name: "ResolvedCommentMarker",
|
|
2987
2991
|
props: { comment: {} },
|
|
2988
2992
|
emits: ["toggle-expand"],
|
|
@@ -2996,39 +3000,39 @@ var $n = /* @__PURE__ */ p({
|
|
|
2996
3000
|
}, [f(r, {
|
|
2997
3001
|
name: "chat_bubble_check",
|
|
2998
3002
|
size: 20
|
|
2999
|
-
})], 40,
|
|
3003
|
+
})], 40, Cr));
|
|
3000
3004
|
}
|
|
3001
|
-
}), [["__scopeId", "data-v-d0c228f6"]]),
|
|
3005
|
+
}), [["__scopeId", "data-v-d0c228f6"]]), Tr = { class: "tc-card__head" }, Er = { class: "tc-card__author-block" }, Dr = { class: "tc-card__author" }, Or = {
|
|
3002
3006
|
key: 0,
|
|
3003
3007
|
class: "tc-card__date"
|
|
3004
|
-
},
|
|
3008
|
+
}, kr = {
|
|
3005
3009
|
key: 0,
|
|
3006
3010
|
class: "tc-card__actions"
|
|
3007
|
-
},
|
|
3011
|
+
}, Ar = ["title"], jr = ["title"], Mr = { class: "tc-card__body" }, Nr = { class: "tc-card__deleted" }, Pr = { class: "tc-card__inserted" }, Fr = { class: "tc-card__inserted" }, Ir = { class: "tc-card__deleted" }, Lr = {
|
|
3008
3012
|
key: 0,
|
|
3009
3013
|
class: "tc-card__changed"
|
|
3010
|
-
},
|
|
3014
|
+
}, Rr = { class: "tc-card__changed" }, zr = { class: "tc-card__changed" }, Br = {
|
|
3011
3015
|
key: 5,
|
|
3012
3016
|
class: "tc-card__inserted"
|
|
3013
|
-
},
|
|
3017
|
+
}, Vr = {
|
|
3014
3018
|
key: 6,
|
|
3015
3019
|
class: "tc-card__deleted"
|
|
3016
|
-
},
|
|
3020
|
+
}, Hr = {
|
|
3017
3021
|
key: 7,
|
|
3018
3022
|
class: "tc-card__inserted"
|
|
3019
|
-
},
|
|
3023
|
+
}, Ur = {
|
|
3020
3024
|
key: 8,
|
|
3021
3025
|
class: "tc-card__deleted"
|
|
3022
|
-
},
|
|
3026
|
+
}, Wr = {
|
|
3023
3027
|
key: 9,
|
|
3024
3028
|
class: "tc-card__changed"
|
|
3025
|
-
},
|
|
3029
|
+
}, Gr = {
|
|
3026
3030
|
key: 10,
|
|
3027
3031
|
class: "tc-card__inserted"
|
|
3028
|
-
},
|
|
3032
|
+
}, Kr = {
|
|
3029
3033
|
key: 11,
|
|
3030
3034
|
class: "tc-card__deleted"
|
|
3031
|
-
},
|
|
3035
|
+
}, qr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3032
3036
|
__name: "TrackedChangeCard",
|
|
3033
3037
|
props: {
|
|
3034
3038
|
change: {},
|
|
@@ -3091,45 +3095,45 @@ var $n = /* @__PURE__ */ p({
|
|
|
3091
3095
|
onClick: n[1] ||= (e) => t.$emit("click"),
|
|
3092
3096
|
onMousedown: n[2] ||= F(() => {}, ["stop"])
|
|
3093
3097
|
}, [
|
|
3094
|
-
u("div",
|
|
3098
|
+
u("div", Tr, [
|
|
3095
3099
|
f($n, {
|
|
3096
3100
|
name: h.value,
|
|
3097
3101
|
size: 32
|
|
3098
3102
|
}, null, 8, ["name"]),
|
|
3099
|
-
u("div",
|
|
3100
|
-
e.expanded ? (b(), l("div",
|
|
3103
|
+
u("div", Er, [u("div", Dr, E(h.value), 1), e.change.date ? (b(), l("div", Or, E(O(Yn)(e.change.date)), 1)) : c("", !0)]),
|
|
3104
|
+
e.expanded ? (b(), l("div", kr, [u("button", {
|
|
3101
3105
|
class: "tc-card__icon-btn",
|
|
3102
3106
|
title: O(i)("acceptChange"),
|
|
3103
3107
|
onClick: F(x, ["stop"])
|
|
3104
3108
|
}, [f(r, {
|
|
3105
3109
|
name: "check",
|
|
3106
3110
|
size: 20
|
|
3107
|
-
})], 8,
|
|
3111
|
+
})], 8, Ar), u("button", {
|
|
3108
3112
|
class: "tc-card__icon-btn",
|
|
3109
3113
|
title: O(i)("rejectChange"),
|
|
3110
3114
|
onClick: F(S, ["stop"])
|
|
3111
3115
|
}, [f(r, {
|
|
3112
3116
|
name: "close",
|
|
3113
3117
|
size: 20
|
|
3114
|
-
})], 8,
|
|
3118
|
+
})], 8, jr)])) : c("", !0)
|
|
3115
3119
|
]),
|
|
3116
|
-
u("div",
|
|
3120
|
+
u("div", Mr, [e.change.type === "replacement" ? (b(), l(a, { key: 0 }, [
|
|
3117
3121
|
d(E(O(i)("trackedChanges.replaced")) + " ", 1),
|
|
3118
|
-
u("span",
|
|
3122
|
+
u("span", Nr, "\"" + E(O($)(e.change.deletedText || "")) + "\"", 1),
|
|
3119
3123
|
d(" " + E(O(i)("trackedChanges.with")) + " ", 1),
|
|
3120
|
-
u("span",
|
|
3121
|
-
], 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",
|
|
3122
|
-
f(
|
|
3124
|
+
u("span", Pr, "\"" + E(O($)(e.change.text)) + "\"", 1)
|
|
3125
|
+
], 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", Fr, "\"" + 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", Ir, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : v.value ? (b(), l(a, { key: 3 }, [v.value.shape === "label-only" ? (b(), l("span", Lr, E(v.value.label), 1)) : (b(), l(a, { key: 1 }, [d(E(v.value.label), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[5] ||= d(": ", -1), u("span", Rr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64))], 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", zr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "rowInserted" ? (b(), l("span", Br, E(O(i)("revisions.rowInserted")), 1)) : e.change.type === "rowDeleted" ? (b(), l("span", Vr, E(O(i)("revisions.rowDeleted")), 1)) : e.change.type === "cellInserted" ? (b(), l("span", Hr, E(O(i)("revisions.cellInserted")), 1)) : e.change.type === "cellDeleted" ? (b(), l("span", Ur, E(O(i)("revisions.cellDeleted")), 1)) : e.change.type === "cellMerged" ? (b(), l("span", Wr, E(O(i)("revisions.cellMerged")), 1)) : e.change.type === "tableInserted" ? (b(), l("span", Gr, E(O(i)("revisions.tableInserted")), 1)) : e.change.type === "tableDeleted" ? (b(), l("span", Kr, E(O(i)("revisions.tableDeleted")), 1)) : (b(), l(a, { key: 12 }, [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))]),
|
|
3126
|
+
f(sr, {
|
|
3123
3127
|
replies: e.replies,
|
|
3124
3128
|
"is-expanded": e.expanded
|
|
3125
3129
|
}, null, 8, ["replies", "is-expanded"]),
|
|
3126
|
-
e.expanded ? (b(), s(
|
|
3130
|
+
e.expanded ? (b(), s(dr, {
|
|
3127
3131
|
key: 0,
|
|
3128
3132
|
onSubmit: n[0] ||= (n) => t.$emit("reply", e.change.revisionId, n)
|
|
3129
3133
|
})) : c("", !0)
|
|
3130
3134
|
], 34));
|
|
3131
3135
|
}
|
|
3132
|
-
}), [["__scopeId", "data-v-b19a1fcd"]]),
|
|
3136
|
+
}), [["__scopeId", "data-v-b19a1fcd"]]), Jr = ["onKeydown"], Yr = { class: "add-comment-card__actions" }, Xr = ["disabled"], Zr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3133
3137
|
__name: "AddCommentCard",
|
|
3134
3138
|
emits: ["submit", "cancel"],
|
|
3135
3139
|
setup(e, { emit: t }) {
|
|
@@ -3158,19 +3162,19 @@ var $n = /* @__PURE__ */ p({
|
|
|
3158
3162
|
P(F(s, ["exact", "prevent"]), ["enter"]),
|
|
3159
3163
|
P(c, ["esc"])
|
|
3160
3164
|
]
|
|
3161
|
-
}, null, 40,
|
|
3165
|
+
}, null, 40, Jr), [[A, r.value]]), u("div", Yr, [u("button", {
|
|
3162
3166
|
class: "add-comment-card__cancel",
|
|
3163
3167
|
onClick: c
|
|
3164
3168
|
}, "Cancel"), u("button", {
|
|
3165
3169
|
class: g(["add-comment-card__submit", { "add-comment-card__submit--active": a.value }]),
|
|
3166
3170
|
disabled: !a.value,
|
|
3167
3171
|
onClick: s
|
|
3168
|
-
}, " Comment ", 10,
|
|
3172
|
+
}, " Comment ", 10, Xr)])], 32));
|
|
3169
3173
|
}
|
|
3170
3174
|
}), [["__scopeId", "data-v-2939f9cd"]]);
|
|
3171
3175
|
//#endregion
|
|
3172
3176
|
//#region src/composables/useCommentSidebarItems.ts
|
|
3173
|
-
function
|
|
3177
|
+
function Qr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
|
|
3174
3178
|
return o(() => {
|
|
3175
3179
|
let a = [];
|
|
3176
3180
|
r?.value && i?.value != null && a.push({
|
|
@@ -3213,7 +3217,7 @@ function Xr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment:
|
|
|
3213
3217
|
}
|
|
3214
3218
|
//#endregion
|
|
3215
3219
|
//#region src/components/UnifiedSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
3216
|
-
var
|
|
3220
|
+
var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"], ti = ["data-card-id"], ni = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3217
3221
|
__name: "UnifiedSidebar",
|
|
3218
3222
|
props: {
|
|
3219
3223
|
isOpen: { type: Boolean },
|
|
@@ -3245,41 +3249,41 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3245
3249
|
"update:activeItemId"
|
|
3246
3250
|
],
|
|
3247
3251
|
setup(e, { emit: t }) {
|
|
3248
|
-
let n = e, r = t, i = o(() => n.surface === "drawer"), f =
|
|
3249
|
-
function
|
|
3250
|
-
let t =
|
|
3251
|
-
|
|
3252
|
+
let n = e, r = t, i = o(() => n.surface === "drawer"), f = o(() => n.activeItemId);
|
|
3253
|
+
function p(e) {
|
|
3254
|
+
let t = f.value === e ? null : e;
|
|
3255
|
+
r("update:activeItemId", t);
|
|
3252
3256
|
}
|
|
3253
|
-
function
|
|
3257
|
+
function m(e) {
|
|
3254
3258
|
e.stopPropagation();
|
|
3255
3259
|
let t = e.target;
|
|
3256
|
-
t instanceof HTMLElement && t.closest(".unified-sidebar__card-slot") ||
|
|
3260
|
+
t instanceof HTMLElement && t.closest(".unified-sidebar__card-slot") || f.value !== null && r("update:activeItemId", null);
|
|
3257
3261
|
}
|
|
3258
|
-
let
|
|
3262
|
+
let h = Qr({
|
|
3259
3263
|
comments: D(n, "comments"),
|
|
3260
3264
|
trackedChanges: D(n, "trackedChanges"),
|
|
3261
3265
|
showResolved: o(() => n.showResolved ?? !1),
|
|
3262
3266
|
isAddingComment: o(() => n.isAddingComment ?? !1),
|
|
3263
3267
|
addCommentYPosition: o(() => n.addCommentYPosition ?? null)
|
|
3264
|
-
}),
|
|
3265
|
-
function
|
|
3266
|
-
let e =
|
|
3267
|
-
if (!e || !
|
|
3268
|
+
}), x = S(null), w = S(/* @__PURE__ */ new Map()), k = /* @__PURE__ */ new Map(), A = null, N = null, P = /* @__PURE__ */ new Set();
|
|
3269
|
+
function F() {
|
|
3270
|
+
let e = x.value;
|
|
3271
|
+
if (!e || !N) return;
|
|
3268
3272
|
let t = new Set(e.querySelectorAll("[data-card-id]"));
|
|
3269
|
-
if (!(t.size ===
|
|
3270
|
-
|
|
3271
|
-
for (let e of t)
|
|
3272
|
-
|
|
3273
|
+
if (!(t.size === P.size && [...t].every((e) => P.has(e)))) {
|
|
3274
|
+
N.disconnect();
|
|
3275
|
+
for (let e of t) N.observe(e);
|
|
3276
|
+
P = t;
|
|
3273
3277
|
}
|
|
3274
3278
|
}
|
|
3275
|
-
function
|
|
3276
|
-
if (
|
|
3277
|
-
|
|
3279
|
+
function I() {
|
|
3280
|
+
if (W(), i.value) {
|
|
3281
|
+
w.value = /* @__PURE__ */ new Map();
|
|
3278
3282
|
return;
|
|
3279
3283
|
}
|
|
3280
|
-
let e = n.pagesContainer, t =
|
|
3284
|
+
let e = n.pagesContainer, t = h.value;
|
|
3281
3285
|
if (!e || t.length === 0) {
|
|
3282
|
-
|
|
3286
|
+
w.value = /* @__PURE__ */ new Map();
|
|
3283
3287
|
return;
|
|
3284
3288
|
}
|
|
3285
3289
|
let r = e.getBoundingClientRect(), a = U(e), o = /* @__PURE__ */ new Map();
|
|
@@ -3309,7 +3313,7 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3309
3313
|
}
|
|
3310
3314
|
t && c.set(e.anchorKey, l(t));
|
|
3311
3315
|
}
|
|
3312
|
-
let u = /* @__PURE__ */ new Map(), d =
|
|
3316
|
+
let u = /* @__PURE__ */ new Map(), d = x.value;
|
|
3313
3317
|
if (d) for (let e of d.querySelectorAll("[data-card-id]")) {
|
|
3314
3318
|
let t = e.dataset.cardId;
|
|
3315
3319
|
t && u.set(t, e.offsetHeight);
|
|
@@ -3321,78 +3325,78 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3321
3325
|
renderedDomContext: V(e),
|
|
3322
3326
|
zoom: 1,
|
|
3323
3327
|
cardHeights: u,
|
|
3324
|
-
lastKnown:
|
|
3328
|
+
lastKnown: k
|
|
3325
3329
|
})) f.set(n.id, r);
|
|
3326
|
-
|
|
3330
|
+
w.value = f, F();
|
|
3327
3331
|
}
|
|
3328
|
-
let
|
|
3332
|
+
let L = o(() => {
|
|
3329
3333
|
let e = 0;
|
|
3330
|
-
for (let t of
|
|
3334
|
+
for (let t of w.value.values()) e = Math.max(e, t);
|
|
3331
3335
|
return e + 200;
|
|
3332
|
-
}),
|
|
3336
|
+
}), R = S(null), z = S({
|
|
3333
3337
|
top: 0,
|
|
3334
3338
|
width: B.drawerWidth,
|
|
3335
3339
|
height: 0
|
|
3336
3340
|
});
|
|
3337
|
-
function
|
|
3338
|
-
let e =
|
|
3341
|
+
function W() {
|
|
3342
|
+
let e = x.value?.offsetParent, t = Y(n.pagesContainer);
|
|
3339
3343
|
if (!(e instanceof HTMLElement) || !t) return;
|
|
3340
3344
|
let r = e.getBoundingClientRect(), a = t.getBoundingClientRect();
|
|
3341
3345
|
if (i.value) {
|
|
3342
3346
|
let e = Math.max(0, Math.min(B.drawerWidth, t.clientWidth - 16));
|
|
3343
|
-
|
|
3347
|
+
z.value = {
|
|
3344
3348
|
top: a.top - r.top,
|
|
3345
3349
|
width: e,
|
|
3346
3350
|
height: t.clientHeight
|
|
3347
|
-
},
|
|
3351
|
+
}, R.value = a.left + t.clientWidth - r.left - e;
|
|
3348
3352
|
return;
|
|
3349
3353
|
}
|
|
3350
3354
|
let o = n.pagesContainer?.querySelector(".layout-page");
|
|
3351
3355
|
if (!o) {
|
|
3352
|
-
|
|
3356
|
+
R.value = null;
|
|
3353
3357
|
return;
|
|
3354
3358
|
}
|
|
3355
3359
|
let s = o.getBoundingClientRect().right - r.left + B.commentsGap, c = Math.max(8, e.clientWidth - B.commentsWidth - 8);
|
|
3356
|
-
|
|
3360
|
+
R.value = Math.max(8, Math.min(s, c));
|
|
3357
3361
|
}
|
|
3358
|
-
let
|
|
3362
|
+
let G = o(() => ({
|
|
3359
3363
|
position: "sticky",
|
|
3360
3364
|
top: 0,
|
|
3361
|
-
maxHeight:
|
|
3365
|
+
maxHeight: z.value.height || void 0,
|
|
3362
3366
|
overflowY: "auto",
|
|
3363
3367
|
paddingBlock: B.commentsGap + "px",
|
|
3364
3368
|
boxSizing: "border-box"
|
|
3365
|
-
})),
|
|
3366
|
-
let e =
|
|
3369
|
+
})), ee = o(() => {
|
|
3370
|
+
let e = f.value;
|
|
3367
3371
|
if (!e) return "";
|
|
3368
3372
|
if (e.startsWith("comment-")) return `${H(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; }`;
|
|
3369
3373
|
if (e.startsWith("tc-")) {
|
|
3370
3374
|
let t = e.split("-").at(1) ?? "";
|
|
3371
3375
|
return `
|
|
3372
|
-
.paged-editor__pages .docx-insertion[data-revision-id="${
|
|
3376
|
+
.paged-editor__pages .docx-insertion[data-revision-id="${h.value.find((t) => t.id === e)?.change?.insertionRevisionId ?? Number(t)}"] { background-color: rgba(52, 168, 83, 0.2) !important; border-bottom: 2px solid #2e7d32 !important; }
|
|
3373
3377
|
.paged-editor__pages .docx-deletion[data-revision-id="${t}"] { background-color: rgba(211, 47, 47, 0.2) !important; text-decoration-thickness: 2px !important; }
|
|
3374
3378
|
`;
|
|
3375
3379
|
}
|
|
3376
3380
|
return "";
|
|
3377
|
-
}),
|
|
3378
|
-
let e = i.value, t = e ?
|
|
3381
|
+
}), K = o(() => {
|
|
3382
|
+
let e = i.value, t = e ? R.value !== null : w.value.size > 0 || h.value.length === 0;
|
|
3379
3383
|
return {
|
|
3380
3384
|
position: "absolute",
|
|
3381
|
-
top: e ?
|
|
3382
|
-
left:
|
|
3383
|
-
width: (e ?
|
|
3385
|
+
top: e ? z.value.top + "px" : "0",
|
|
3386
|
+
left: R.value === null ? `calc(50% + ${n.pageWidthPx / 2 + B.commentsGap}px)` : R.value + "px",
|
|
3387
|
+
width: (e ? z.value.width : B.commentsWidth) + "px",
|
|
3384
3388
|
paddingInline: e ? B.commentsGap + "px" : void 0,
|
|
3385
3389
|
bottom: e ? void 0 : 0,
|
|
3386
3390
|
opacity: +!!t,
|
|
3387
3391
|
pointerEvents: t ? "auto" : "none"
|
|
3388
3392
|
};
|
|
3389
3393
|
});
|
|
3390
|
-
function
|
|
3394
|
+
function te(e) {
|
|
3391
3395
|
if (i.value) return {
|
|
3392
3396
|
position: "relative",
|
|
3393
3397
|
marginBottom: "8px"
|
|
3394
3398
|
};
|
|
3395
|
-
let t =
|
|
3399
|
+
let t = w.value.get(e);
|
|
3396
3400
|
return t == null ? {
|
|
3397
3401
|
position: "static",
|
|
3398
3402
|
marginBottom: "8px"
|
|
@@ -3404,15 +3408,15 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3404
3408
|
transition: "top 0.15s ease"
|
|
3405
3409
|
};
|
|
3406
3410
|
}
|
|
3407
|
-
let
|
|
3408
|
-
function
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
+
let q = !1;
|
|
3412
|
+
function J() {
|
|
3413
|
+
q || (q = !0, requestAnimationFrame(() => {
|
|
3414
|
+
q = !1, I();
|
|
3411
3415
|
}));
|
|
3412
3416
|
}
|
|
3413
3417
|
j(() => [
|
|
3414
|
-
|
|
3415
|
-
|
|
3418
|
+
h.value,
|
|
3419
|
+
f.value,
|
|
3416
3420
|
n.pagesContainer,
|
|
3417
3421
|
n.pageWidthPx,
|
|
3418
3422
|
n.zoom,
|
|
@@ -3420,8 +3424,8 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3420
3424
|
n.addCommentYPosition,
|
|
3421
3425
|
n.surface,
|
|
3422
3426
|
n.isOpen
|
|
3423
|
-
], () =>
|
|
3424
|
-
function
|
|
3427
|
+
], () => J(), { immediate: !0 });
|
|
3428
|
+
function Y(e) {
|
|
3425
3429
|
let t = e?.parentElement ?? null;
|
|
3426
3430
|
for (; t;) {
|
|
3427
3431
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -3431,19 +3435,19 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3431
3435
|
return null;
|
|
3432
3436
|
}
|
|
3433
3437
|
let Z = null;
|
|
3434
|
-
function
|
|
3435
|
-
Z && Z.removeEventListener("scroll",
|
|
3438
|
+
function ne() {
|
|
3439
|
+
Z && Z.removeEventListener("scroll", J), Z = Y(n.pagesContainer), Z && (Z.addEventListener("scroll", J, { passive: !0 }), A?.observe(Z));
|
|
3436
3440
|
}
|
|
3437
3441
|
return y(() => {
|
|
3438
|
-
|
|
3442
|
+
N = new ResizeObserver(() => J()), J(), n.pagesContainer && (A = new ResizeObserver(() => J()), A.observe(n.pagesContainer), ne()), window.addEventListener("resize", J);
|
|
3439
3443
|
}), j(() => n.pagesContainer, (e) => {
|
|
3440
|
-
|
|
3444
|
+
A?.disconnect(), A = null, e && (A = new ResizeObserver(() => J()), A.observe(e)), ne(), J();
|
|
3441
3445
|
}), v(() => {
|
|
3442
|
-
|
|
3446
|
+
A?.disconnect(), N?.disconnect(), Z && Z.removeEventListener("scroll", J), window.removeEventListener("resize", J);
|
|
3443
3447
|
}), j(() => n.isOpen && i.value, (e, t, n) => {
|
|
3444
3448
|
if (!e || typeof document > "u") return;
|
|
3445
3449
|
let i = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
3446
|
-
|
|
3450
|
+
x.value?.focus({ preventScroll: !0 });
|
|
3447
3451
|
let a = (e) => {
|
|
3448
3452
|
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), r("dismiss"));
|
|
3449
3453
|
};
|
|
@@ -3453,41 +3457,42 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3453
3457
|
}, {
|
|
3454
3458
|
immediate: !0,
|
|
3455
3459
|
flush: "post"
|
|
3456
|
-
}), (t, n) => (b(), l(a, null, [
|
|
3457
|
-
default: M(() => [d(E(
|
|
3460
|
+
}), (t, n) => (b(), l(a, null, [ee.value ? (b(), s(T("style"), { key: 0 }, {
|
|
3461
|
+
default: M(() => [d(E(ee.value), 1)]),
|
|
3458
3462
|
_: 1
|
|
3459
3463
|
})) : c("", !0), e.isOpen ? (b(), l("aside", {
|
|
3460
3464
|
key: 1,
|
|
3461
3465
|
ref_key: "rootRef",
|
|
3462
|
-
ref:
|
|
3466
|
+
ref: x,
|
|
3463
3467
|
class: g(["unified-sidebar", { "unified-sidebar--drawer": i.value }]),
|
|
3464
3468
|
"data-folio-comments-surface": e.surface ?? "column",
|
|
3465
3469
|
"data-testid": "folio-comments",
|
|
3466
3470
|
tabindex: i.value ? -1 : void 0,
|
|
3467
|
-
style: _(
|
|
3468
|
-
onMousedown:
|
|
3471
|
+
style: _(K.value),
|
|
3472
|
+
onMousedown: m
|
|
3469
3473
|
}, [u("div", {
|
|
3470
3474
|
class: "unified-sidebar__inner",
|
|
3471
|
-
|
|
3472
|
-
|
|
3475
|
+
"data-folio-scroll": i.value ? "" : void 0,
|
|
3476
|
+
style: _(i.value ? G.value : { minHeight: L.value + "px" })
|
|
3477
|
+
}, [(b(!0), l(a, null, C(O(h), (e) => (b(), l("div", {
|
|
3473
3478
|
key: e.id,
|
|
3474
3479
|
class: "unified-sidebar__card-slot",
|
|
3475
3480
|
"data-card-id": e.id,
|
|
3476
|
-
style: _(
|
|
3477
|
-
}, [e.kind === "add-comment" ? (b(), s(
|
|
3481
|
+
style: _(te(e.id))
|
|
3482
|
+
}, [e.kind === "add-comment" ? (b(), s(Zr, {
|
|
3478
3483
|
key: 0,
|
|
3479
3484
|
onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
|
|
3480
3485
|
onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
|
|
3481
|
-
})) : e.kind === "comment" && e.comment.done &&
|
|
3486
|
+
})) : e.kind === "comment" && e.comment.done && f.value !== e.id ? (b(), s(wr, {
|
|
3482
3487
|
key: 1,
|
|
3483
3488
|
comment: e.comment,
|
|
3484
|
-
onToggleExpand: (t) =>
|
|
3485
|
-
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(
|
|
3489
|
+
onToggleExpand: (t) => p(e.id)
|
|
3490
|
+
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(Sr, {
|
|
3486
3491
|
key: 2,
|
|
3487
3492
|
comment: e.comment,
|
|
3488
3493
|
replies: e.replies,
|
|
3489
|
-
expanded:
|
|
3490
|
-
onClick: (t) =>
|
|
3494
|
+
expanded: f.value === e.id,
|
|
3495
|
+
onClick: (t) => p(e.id),
|
|
3491
3496
|
onReply: n[2] ||= (e, n) => t.$emit("comment-reply", e, n),
|
|
3492
3497
|
onResolve: n[3] ||= (e) => t.$emit("comment-resolve", e),
|
|
3493
3498
|
onUnresolve: n[4] ||= (e) => t.$emit("comment-unresolve", e),
|
|
@@ -3497,12 +3502,12 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3497
3502
|
"replies",
|
|
3498
3503
|
"expanded",
|
|
3499
3504
|
"onClick"
|
|
3500
|
-
])) : e.kind === "tracked-change" ? (b(), s(
|
|
3505
|
+
])) : e.kind === "tracked-change" ? (b(), s(qr, {
|
|
3501
3506
|
key: 3,
|
|
3502
3507
|
change: e.change,
|
|
3503
3508
|
replies: e.replies ?? [],
|
|
3504
|
-
expanded:
|
|
3505
|
-
onClick: (t) =>
|
|
3509
|
+
expanded: f.value === e.id,
|
|
3510
|
+
onClick: (t) => p(e.id),
|
|
3506
3511
|
onAccept: n[6] ||= (e, n) => t.$emit("accept-change", e, n),
|
|
3507
3512
|
onReject: n[7] ||= (e, n) => t.$emit("reject-change", e, n),
|
|
3508
3513
|
onAcceptById: n[8] ||= (e) => t.$emit("accept-change-by-id", e),
|
|
@@ -3513,9 +3518,9 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3513
3518
|
"replies",
|
|
3514
3519
|
"expanded",
|
|
3515
3520
|
"onClick"
|
|
3516
|
-
])) : c("", !0)], 12,
|
|
3521
|
+
])) : c("", !0)], 12, ti))), 128))], 12, ei)], 46, $r)) : c("", !0)], 64));
|
|
3517
3522
|
}
|
|
3518
|
-
}), [["__scopeId", "data-v-
|
|
3523
|
+
}), [["__scopeId", "data-v-d3e7ed23"]]), ri = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3519
3524
|
__name: "StylePicker",
|
|
3520
3525
|
props: {
|
|
3521
3526
|
value: {},
|
|
@@ -3574,12 +3579,12 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3574
3579
|
"class"
|
|
3575
3580
|
]));
|
|
3576
3581
|
}
|
|
3577
|
-
}), [["__scopeId", "data-v-06469e2c"]]),
|
|
3582
|
+
}), [["__scopeId", "data-v-06469e2c"]]), ii = [
|
|
3578
3583
|
"disabled",
|
|
3579
3584
|
"title",
|
|
3580
3585
|
"aria-expanded",
|
|
3581
3586
|
"onClick"
|
|
3582
|
-
],
|
|
3587
|
+
], ai = { class: "docx-align__panel" }, oi = ["title", "onClick"], si = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3583
3588
|
__name: "AlignmentButtons",
|
|
3584
3589
|
props: {
|
|
3585
3590
|
value: { default: "left" },
|
|
@@ -3638,8 +3643,8 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3638
3643
|
}, null, 8, ["name"]), f(r, {
|
|
3639
3644
|
name: "arrow_drop_down",
|
|
3640
3645
|
size: 14
|
|
3641
|
-
})], 10,
|
|
3642
|
-
panel: M(() => [u("div",
|
|
3646
|
+
})], 10, ii)]),
|
|
3647
|
+
panel: M(() => [u("div", ai, [(b(), l(a, null, C(m, (t) => u("button", {
|
|
3643
3648
|
key: t.value,
|
|
3644
3649
|
type: "button",
|
|
3645
3650
|
class: g(["docx-align__option", { "docx-align__option--active": e.value === t.value }]),
|
|
@@ -3648,11 +3653,11 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3648
3653
|
}, [f(r, {
|
|
3649
3654
|
name: t.icon,
|
|
3650
3655
|
size: 20
|
|
3651
|
-
}, null, 8, ["name"])], 10,
|
|
3656
|
+
}, null, 8, ["name"])], 10, oi)), 64))])]),
|
|
3652
3657
|
_: 1
|
|
3653
3658
|
}, 8, ["open"]));
|
|
3654
3659
|
}
|
|
3655
|
-
}), [["__scopeId", "data-v-088792b0"]]),
|
|
3660
|
+
}), [["__scopeId", "data-v-088792b0"]]), ci = { class: "docx-list-btns" }, li = ["disabled"], ui = ["disabled"], di = ["disabled"], fi = ["disabled"], pi = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3656
3661
|
__name: "ListButtons",
|
|
3657
3662
|
props: {
|
|
3658
3663
|
listState: {},
|
|
@@ -3676,7 +3681,7 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3676
3681
|
"outdent"
|
|
3677
3682
|
],
|
|
3678
3683
|
setup(e) {
|
|
3679
|
-
return (t, n) => (b(), l("span",
|
|
3684
|
+
return (t, n) => (b(), l("span", ci, [
|
|
3680
3685
|
u("button", {
|
|
3681
3686
|
type: "button",
|
|
3682
3687
|
class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.type === "bullet" }]),
|
|
@@ -3686,7 +3691,7 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3686
3691
|
}, [f(r, {
|
|
3687
3692
|
name: "format_list_bulleted",
|
|
3688
3693
|
size: 20
|
|
3689
|
-
})], 10,
|
|
3694
|
+
})], 10, li),
|
|
3690
3695
|
u("button", {
|
|
3691
3696
|
type: "button",
|
|
3692
3697
|
class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.type === "numbered" }]),
|
|
@@ -3696,7 +3701,7 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3696
3701
|
}, [f(r, {
|
|
3697
3702
|
name: "format_list_numbered",
|
|
3698
3703
|
size: 20
|
|
3699
|
-
})], 10,
|
|
3704
|
+
})], 10, ui),
|
|
3700
3705
|
e.showIndentButtons ? (b(), l(a, { key: 0 }, [u("button", {
|
|
3701
3706
|
type: "button",
|
|
3702
3707
|
class: "docx-list-btns__btn",
|
|
@@ -3706,7 +3711,7 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3706
3711
|
}, [f(r, {
|
|
3707
3712
|
name: "format_indent_decrease",
|
|
3708
3713
|
size: 20
|
|
3709
|
-
})], 8,
|
|
3714
|
+
})], 8, di), u("button", {
|
|
3710
3715
|
type: "button",
|
|
3711
3716
|
class: "docx-list-btns__btn",
|
|
3712
3717
|
disabled: e.disabled,
|
|
@@ -3715,9 +3720,9 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
|
|
|
3715
3720
|
}, [f(r, {
|
|
3716
3721
|
name: "format_indent_increase",
|
|
3717
3722
|
size: 20
|
|
3718
|
-
})], 8,
|
|
3723
|
+
})], 8, fi)], 64)) : c("", !0)
|
|
3719
3724
|
]));
|
|
3720
3725
|
}
|
|
3721
3726
|
}), [["__scopeId", "data-v-7cc21148"]]);
|
|
3722
3727
|
//#endregion
|
|
3723
|
-
export {
|
|
3728
|
+
export { _e as C, re as D, se as E, ve as S, ue as T, en as _, Zr as a, De as b, Sr as c, Jn as d, Hn as f, tn as g, sn as h, ni as i, dr as l, cn as m, si as n, qr as o, Vn as p, ri as r, wr as s, pi as t, sr as u, Xt as v, Q as w, ye as x, Rt as y };
|