@stll/folio-vue 0.26.0 → 0.26.2
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/SplitCellDialog-DfMw2Ev2.cjs +15 -0
- package/dist/{SplitCellDialog-CWvjxbog.js → SplitCellDialog-bNeugz_3.js} +1181 -1207
- package/dist/{ListButtons-1YJNViXB.js → StylePicker-DfIQUq6G.js} +1095 -1106
- package/dist/StylePicker-ynX3GzFu.cjs +4 -0
- package/dist/components/DocxEditor/DocxEditorDialogs.vue.d.ts +2 -2
- package/dist/components/DocxEditor/pagedEditorRef.d.ts +1 -1
- package/dist/components/DocxEditor/types.d.ts +10 -10
- package/dist/components/DocxEditor.vue.d.ts +5 -5
- package/dist/components/InlineHeaderFooterEditor.vue.d.ts +2 -2
- package/dist/components/OutlineToggleButton.vue.d.ts +21 -0
- package/dist/components/ReviewControls.vue.d.ts +2 -2
- package/dist/components/Toolbar.vue.d.ts +9 -9
- package/dist/components/dialogs/FootnotePropertiesDialog.vue.d.ts +2 -2
- package/dist/components/dialogs/HyperlinkDialog.vue.d.ts +2 -2
- package/dist/components/dialogs/ImagePositionDialog.vue.d.ts +2 -2
- package/dist/components/dialogs/PageSetupDialog.vue.d.ts +2 -2
- package/dist/components/dialogs/SetNumberingValueDialog.vue.d.ts +2 -2
- package/dist/components/dialogs/TablePropertiesDialog.vue.d.ts +2 -2
- package/dist/components/dialogs/WatermarkDialog.vue.d.ts +2 -2
- package/dist/components/sidebar/CommentCard.vue.d.ts +2 -2
- package/dist/components/sidebar/TrackedChangeCard.vue.d.ts +2 -2
- package/dist/components/sidebar/cardStyles.d.ts +1 -1
- package/dist/components/tableStylePresets.d.ts +1 -1
- package/dist/components/ui/Button.vue.d.ts +1 -1
- package/dist/components/ui/FontSizePicker.vue.d.ts +1 -1
- package/dist/components/ui/HorizontalRuler.vue.d.ts +2 -2
- package/dist/components/ui/HyperlinkPopup.vue.d.ts +4 -4
- package/dist/components/ui/Input.vue.d.ts +1 -1
- package/dist/components/ui/ListButtons.vue.d.ts +1 -1
- package/dist/components/ui/OutlineRail.vue.d.ts +1 -1
- package/dist/components/ui/TableMoreDropdown.vue.d.ts +1 -1
- package/dist/components/ui/TableToolbar.vue.d.ts +1 -1
- package/dist/components/ui/VerticalRuler.vue.d.ts +2 -2
- package/dist/components/ui/icon-paths.json.d.ts +18 -6
- package/dist/composables/useAutoSave.d.ts +1 -1
- package/dist/composables/useClipboard.d.ts +2 -2
- package/dist/composables/useCommentLifecycle.d.ts +1 -1
- package/dist/composables/useCommentManagement.d.ts +1 -1
- package/dist/composables/useContextMenus.d.ts +2 -2
- package/dist/composables/useDocxEditor.d.ts +4 -4
- package/dist/composables/useDocxEditorRefApi.d.ts +5 -5
- package/dist/composables/useFindReplace.d.ts +2 -2
- package/dist/composables/useFixedDropdown.d.ts +1 -1
- package/dist/composables/useFormattingActions.d.ts +1 -1
- package/dist/composables/useHistory.d.ts +1 -1
- package/dist/composables/useHyperlinkManagement.d.ts +1 -1
- package/dist/composables/useImageActions.d.ts +1 -1
- package/dist/composables/useOutlineSidebar.d.ts +1 -1
- package/dist/composables/usePageSetupControls.d.ts +1 -1
- package/dist/composables/usePagesPointer.d.ts +3 -3
- package/dist/composables/useParagraphStyleOptions.d.ts +1 -1
- package/dist/composables/useSelectionHighlight.d.ts +1 -1
- package/dist/composables/useSelectionSync.d.ts +1 -1
- package/dist/composables/useToolbarDropdowns.d.ts +1 -1
- package/dist/composables/useToolbarFontSize.d.ts +1 -1
- package/dist/composables/useTrackedChanges.d.ts +1 -1
- package/dist/composables/useVisualLineNavigation.d.ts +1 -1
- package/dist/composables/useZoom.d.ts +1 -1
- package/dist/composables.cjs +2 -2
- package/dist/composables.js +65 -71
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +1 -2
- package/dist/folio-vue.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4831 -4865
- package/dist/messages/ar.cjs +1 -1
- package/dist/messages/ar.js +1 -2
- package/dist/messages/cs.cjs +1 -1
- package/dist/messages/cs.js +1 -2
- package/dist/messages/de.cjs +1 -1
- package/dist/messages/de.js +1 -2
- package/dist/messages/en.cjs +1 -1
- package/dist/messages/en.js +1 -2
- package/dist/messages/es.cjs +1 -1
- package/dist/messages/es.js +1 -2
- package/dist/messages/et.cjs +1 -1
- package/dist/messages/et.js +1 -2
- package/dist/messages/fr.cjs +1 -1
- package/dist/messages/fr.js +1 -2
- package/dist/messages/he.cjs +1 -1
- package/dist/messages/he.js +1 -2
- package/dist/messages/hi.cjs +1 -1
- package/dist/messages/hi.js +1 -2
- package/dist/messages/hu.cjs +1 -1
- package/dist/messages/hu.js +1 -2
- package/dist/messages/locales.js +1 -2
- package/dist/messages/lt.cjs +1 -1
- package/dist/messages/lt.js +1 -2
- package/dist/messages/lv.cjs +1 -1
- package/dist/messages/lv.js +1 -2
- package/dist/messages/pl.cjs +1 -1
- package/dist/messages/pl.js +1 -2
- package/dist/messages/pt-BR.cjs +1 -1
- package/dist/messages/pt-BR.js +1 -2
- package/dist/messages/sk.cjs +1 -1
- package/dist/messages/sk.js +1 -2
- package/dist/messages/tr.cjs +1 -1
- package/dist/messages/tr.js +1 -2
- package/dist/messages/zh-CN.cjs +1 -1
- package/dist/messages/zh-CN.js +1 -2
- package/dist/{rolldown-runtime-C6qsp3rV.cjs → rolldown-runtime-CYJQrBu7.cjs} +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +21 -27
- package/dist/useZoom-Bwnae1jX.cjs +1 -0
- package/dist/{useZoom-C_sQUu4b.js → useZoom-CX0mrPQY.js} +372 -386
- package/dist/utils/viewportPosition.d.ts +1 -1
- package/package.json +13 -13
- package/dist/ListButtons-Cw5RTKNt.cjs +0 -4
- package/dist/SplitCellDialog-Dpp-FPQ6.cjs +0 -15
- package/dist/useZoom-CbH76z8x.cjs +0 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as e, D as t, F as n, O as r, y as i } from "./SplitCellDialog-bNeugz_3.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
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
3
|
+
import { DISPLAY_MODES as I } from "@stll/folio-core/managers/EditorModeManager";
|
|
4
|
+
import { PANEL_METRICS as L } from "@stll/folio-core/panel-layout";
|
|
5
|
+
import { NO_LIST_STATE as ee, listStateLevel as R } from "@stll/folio-core/prosemirror";
|
|
6
|
+
import { getTableContext as z } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
|
|
7
|
+
import { extractSelectionContext as B } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
|
|
8
|
+
import { redoDepth as te, undoDepth as ne } from "prosemirror-history";
|
|
9
|
+
import { getFindParagraphText as V } from "@stll/folio-core/utils/findReplace";
|
|
10
|
+
import { clearFormatting as re } from "@stll/folio-core/prosemirror/commands/formatting";
|
|
11
|
+
import { executeEditorCommand as H } from "@stll/folio-core/prosemirror/executeEditorCommand";
|
|
12
|
+
import { sliceText as U } from "@stll/folio-core/utils/sliceText";
|
|
13
|
+
import { createRenderedDomContext as W } from "@stll/folio-core/render-dom/RenderedDomContext";
|
|
14
|
+
import { commentAnchorSelector as G, indexCommentAnchors as K } from "@stll/folio-core/render-dom/commentAnchorAttributes";
|
|
15
|
+
import { pixelsToTwips as q, twipsToPixels as J } from "@stll/folio-core/utils/units";
|
|
16
|
+
import { onDocumentPointerDown as Y } from "@stll/folio-core/utils/documentPointerDown";
|
|
17
|
+
import { resolveSidebarItemPositions as ie } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
|
|
17
18
|
//#region src/components/CommentMarginMarkers.vue?vue&type=script&setup=true&lang.ts
|
|
18
|
-
var
|
|
19
|
+
var ae = ["title", "onClick"], oe = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
19
20
|
__name: "CommentMarginMarkers",
|
|
20
21
|
props: {
|
|
21
22
|
comments: {},
|
|
@@ -31,7 +32,7 @@ var ne = ["title", "onClick"], re = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
31
32
|
if (t.sidebarOpen) return [];
|
|
32
33
|
let e = t.pagesContainer;
|
|
33
34
|
if (!e) return [];
|
|
34
|
-
let n = e.getBoundingClientRect(), r =
|
|
35
|
+
let n = e.getBoundingClientRect(), r = K(e), i = [];
|
|
35
36
|
for (let a of t.comments) {
|
|
36
37
|
if (a.parentId != null) continue;
|
|
37
38
|
let o = r.get(String(a.id));
|
|
@@ -65,12 +66,12 @@ var ne = ["title", "onClick"], re = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
65
66
|
}, [f(r, {
|
|
66
67
|
name: n.isResolved ? "chat_bubble_check" : "chat_bubble_outline",
|
|
67
68
|
size: 18
|
|
68
|
-
}, null, 8, ["name"])], 12,
|
|
69
|
+
}, null, 8, ["name"])], 12, ae))), 128))], 36)) : c("", !0);
|
|
69
70
|
}
|
|
70
|
-
}), [["__scopeId", "data-v-
|
|
71
|
+
}), [["__scopeId", "data-v-4157fff7"]]), se = { class: "doc-name" }, ce = ["value"], le = {
|
|
71
72
|
key: 1,
|
|
72
73
|
class: "doc-name__text"
|
|
73
|
-
},
|
|
74
|
+
}, ue = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
74
75
|
__name: "DocumentName",
|
|
75
76
|
props: {
|
|
76
77
|
modelValue: {},
|
|
@@ -92,16 +93,16 @@ var ne = ["title", "onClick"], re = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
92
93
|
let t = e.target;
|
|
93
94
|
t instanceof HTMLInputElement && (t.value.trim() || r("update:modelValue", "Untitled document.docx"));
|
|
94
95
|
}
|
|
95
|
-
return (t, n) => (b(), l("div",
|
|
96
|
+
return (t, n) => (b(), l("div", se, [e.editable ? (b(), l("input", {
|
|
96
97
|
key: 0,
|
|
97
98
|
class: "doc-name__input",
|
|
98
99
|
value: i.value,
|
|
99
100
|
placeholder: "Untitled document",
|
|
100
101
|
onInput: a,
|
|
101
102
|
onBlur: s
|
|
102
|
-
}, null, 40,
|
|
103
|
+
}, null, 40, ce)) : (b(), l("span", le, E(i.value || "Untitled document"), 1))]));
|
|
103
104
|
}
|
|
104
|
-
}), [["__scopeId", "data-v-
|
|
105
|
+
}), [["__scopeId", "data-v-0f0d068b"]]), X = ["aria-selected", "onMouseenter"], de = { class: "docx-table-grid-inline__label" }, fe = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
105
106
|
__name: "TableGridInline",
|
|
106
107
|
props: {
|
|
107
108
|
gridRows: { default: 6 },
|
|
@@ -137,15 +138,15 @@ var ne = ["title", "onClick"], re = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
137
138
|
i.value = e.r, s.value = e.c;
|
|
138
139
|
},
|
|
139
140
|
onClick: F(d, ["prevent"])
|
|
140
|
-
}, null, 42,
|
|
141
|
+
}, null, 42, X))), 128))], 36), u("div", de, E(i.value > 0 && s.value > 0 ? `${s.value} × ${i.value}` : "Select size"), 1)]));
|
|
141
142
|
}
|
|
142
|
-
}), [["__scopeId", "data-v-
|
|
143
|
+
}), [["__scopeId", "data-v-4e94349a"]]), pe = {
|
|
143
144
|
class: "menu-bar",
|
|
144
145
|
role: "menubar"
|
|
145
|
-
},
|
|
146
|
+
}, me = {
|
|
146
147
|
key: 1,
|
|
147
148
|
class: "menu-bar__break-submenu"
|
|
148
|
-
},
|
|
149
|
+
}, Z = ["onClick"], he = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
149
150
|
__name: "MenuBar",
|
|
150
151
|
props: {
|
|
151
152
|
showFileOpen: {
|
|
@@ -241,7 +242,7 @@ var ne = ["title", "onClick"], re = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
241
242
|
label: h("toolbar.reportIssue"),
|
|
242
243
|
onClick: g("reportIssue")
|
|
243
244
|
}]);
|
|
244
|
-
return (t, n) => (b(), l("div",
|
|
245
|
+
return (t, n) => (b(), l("div", pe, [
|
|
245
246
|
f(O(d), {
|
|
246
247
|
label: O(h)("toolbar.file"),
|
|
247
248
|
items: _.value
|
|
@@ -254,12 +255,12 @@ var ne = ["title", "onClick"], re = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
254
255
|
label: O(h)("toolbar.insert"),
|
|
255
256
|
items: y.value
|
|
256
257
|
}, {
|
|
257
|
-
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(
|
|
258
|
+
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(fe, {
|
|
258
259
|
key: 0,
|
|
259
260
|
onInsert: (e, n) => {
|
|
260
261
|
m("insert-table", e, n), t();
|
|
261
262
|
}
|
|
262
|
-
}, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div",
|
|
263
|
+
}, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div", me, [(b(!0), l(a, null, C(x.value, (e) => (b(), l("button", {
|
|
263
264
|
key: e.action,
|
|
264
265
|
type: "button",
|
|
265
266
|
class: "menu-bar__break-item",
|
|
@@ -269,7 +270,7 @@ var ne = ["title", "onClick"], re = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
269
270
|
}, [f(r, {
|
|
270
271
|
name: e.icon,
|
|
271
272
|
size: 18
|
|
272
|
-
}, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8,
|
|
273
|
+
}, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8, Z))), 128))])) : c("", !0)]),
|
|
273
274
|
_: 1
|
|
274
275
|
}, 8, ["label", "items"]),
|
|
275
276
|
e.showHelpMenu ? (b(), s(O(d), {
|
|
@@ -279,365 +280,7 @@ var ne = ["title", "onClick"], re = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
279
280
|
}, null, 8, ["label", "items"])) : c("", !0)
|
|
280
281
|
]));
|
|
281
282
|
}
|
|
282
|
-
}), [["__scopeId", "data-v-
|
|
283
|
-
"disabled",
|
|
284
|
-
"aria-label",
|
|
285
|
-
"title",
|
|
286
|
-
"aria-expanded",
|
|
287
|
-
"onClick"
|
|
288
|
-
], he = { class: "docx-icon-grid__panel" }, ge = ["title", "onClick"], _e = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
289
|
-
__name: "IconGridDropdown",
|
|
290
|
-
props: {
|
|
291
|
-
options: {},
|
|
292
|
-
activeValue: {},
|
|
293
|
-
triggerIcon: {},
|
|
294
|
-
tooltipContent: {},
|
|
295
|
-
disabled: { type: Boolean },
|
|
296
|
-
ariaLabel: {}
|
|
297
|
-
},
|
|
298
|
-
emits: ["select"],
|
|
299
|
-
setup(e, { emit: t }) {
|
|
300
|
-
let n = t, { Popover: o } = i(), c = S(!1);
|
|
301
|
-
function d(e) {
|
|
302
|
-
n("select", e), c.value = !1;
|
|
303
|
-
}
|
|
304
|
-
return (t, n) => (b(), s(O(o), {
|
|
305
|
-
open: c.value,
|
|
306
|
-
"onUpdate:open": n[0] ||= (e) => c.value = e,
|
|
307
|
-
onClose: n[1] ||= (e) => c.value = !1
|
|
308
|
-
}, {
|
|
309
|
-
trigger: M(({ toggle: t }) => [u("button", {
|
|
310
|
-
type: "button",
|
|
311
|
-
class: g(["docx-icon-grid__btn", { "docx-icon-grid__btn--open": c.value }]),
|
|
312
|
-
disabled: e.disabled,
|
|
313
|
-
"aria-label": e.ariaLabel ?? e.tooltipContent,
|
|
314
|
-
title: e.tooltipContent,
|
|
315
|
-
"aria-expanded": c.value,
|
|
316
|
-
"aria-haspopup": "true",
|
|
317
|
-
onClick: F(t, ["prevent"])
|
|
318
|
-
}, [f(r, {
|
|
319
|
-
name: e.triggerIcon,
|
|
320
|
-
size: 20
|
|
321
|
-
}, null, 8, ["name"]), f(r, {
|
|
322
|
-
name: "arrow_drop_down",
|
|
323
|
-
size: 14
|
|
324
|
-
})], 10, me)]),
|
|
325
|
-
panel: M(() => [u("div", he, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
|
|
326
|
-
key: t.value,
|
|
327
|
-
type: "button",
|
|
328
|
-
class: g(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === t.value }]),
|
|
329
|
-
title: t.label,
|
|
330
|
-
onClick: F((e) => d(t.value), ["prevent"])
|
|
331
|
-
}, [f(r, {
|
|
332
|
-
name: t.iconName,
|
|
333
|
-
size: 18
|
|
334
|
-
}, null, 8, ["name"])], 10, ge))), 128))])]),
|
|
335
|
-
_: 1
|
|
336
|
-
}, 8, ["open"]));
|
|
337
|
-
}
|
|
338
|
-
}), [["__scopeId", "data-v-72fa875c"]]), ve = /* @__PURE__ */ p({
|
|
339
|
-
__name: "ImageWrapDropdown",
|
|
340
|
-
props: {
|
|
341
|
-
imageContext: {},
|
|
342
|
-
disabled: { type: Boolean }
|
|
343
|
-
},
|
|
344
|
-
emits: ["change"],
|
|
345
|
-
setup(e) {
|
|
346
|
-
let t = e, { t: r } = n(), i = [
|
|
347
|
-
{
|
|
348
|
-
value: "inline",
|
|
349
|
-
labelKey: "imageWrap.inline",
|
|
350
|
-
iconName: "format_image_left"
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
value: "wrapRight",
|
|
354
|
-
labelKey: "imageWrap.floatLeft",
|
|
355
|
-
iconName: "format_image_right"
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
value: "wrapLeft",
|
|
359
|
-
labelKey: "imageWrap.floatRight",
|
|
360
|
-
iconName: "format_image_left"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
value: "topAndBottom",
|
|
364
|
-
labelKey: "imageWrap.topAndBottom",
|
|
365
|
-
iconName: "horizontal_rule"
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
value: "behind",
|
|
369
|
-
labelKey: "imageWrap.behindText",
|
|
370
|
-
iconName: "flip_to_back"
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
value: "inFront",
|
|
374
|
-
labelKey: "imageWrap.inFrontOfText",
|
|
375
|
-
iconName: "flip_to_front"
|
|
376
|
-
}
|
|
377
|
-
], a = o(() => i.map((e) => ({
|
|
378
|
-
value: e.value,
|
|
379
|
-
label: r(e.labelKey),
|
|
380
|
-
iconName: e.iconName
|
|
381
|
-
}))), c = o(() => {
|
|
382
|
-
let e = t.imageContext;
|
|
383
|
-
return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
|
|
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 ?? "");
|
|
385
|
-
return (t, n) => (b(), s(_e, {
|
|
386
|
-
options: a.value,
|
|
387
|
-
"active-value": c.value,
|
|
388
|
-
"trigger-icon": u.value,
|
|
389
|
-
"tooltip-content": O(r)("imageWrap.tooltipPrefix", { label: d.value }),
|
|
390
|
-
disabled: e.disabled,
|
|
391
|
-
onSelect: n[0] ||= (e) => t.$emit("change", e)
|
|
392
|
-
}, null, 8, [
|
|
393
|
-
"options",
|
|
394
|
-
"active-value",
|
|
395
|
-
"trigger-icon",
|
|
396
|
-
"tooltip-content",
|
|
397
|
-
"disabled"
|
|
398
|
-
]));
|
|
399
|
-
}
|
|
400
|
-
}), ye = /* @__PURE__ */ p({
|
|
401
|
-
__name: "ImageTransformDropdown",
|
|
402
|
-
props: { disabled: { type: Boolean } },
|
|
403
|
-
emits: ["transform"],
|
|
404
|
-
setup(e) {
|
|
405
|
-
let { t } = n(), r = [
|
|
406
|
-
{
|
|
407
|
-
value: "rotateCW",
|
|
408
|
-
labelKey: "imageTransform.rotateClockwise",
|
|
409
|
-
iconName: "rotate_right"
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
value: "rotateCCW",
|
|
413
|
-
labelKey: "imageTransform.rotateCounterClockwise",
|
|
414
|
-
iconName: "rotate_left"
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
value: "flipH",
|
|
418
|
-
labelKey: "imageTransform.flipHorizontal",
|
|
419
|
-
iconName: "swap_horiz"
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
value: "flipV",
|
|
423
|
-
labelKey: "imageTransform.flipVertical",
|
|
424
|
-
iconName: "swap_vert"
|
|
425
|
-
}
|
|
426
|
-
], i = o(() => r.map((e) => ({
|
|
427
|
-
value: e.value,
|
|
428
|
-
label: t(e.labelKey),
|
|
429
|
-
iconName: e.iconName
|
|
430
|
-
})));
|
|
431
|
-
return (n, r) => (b(), s(_e, {
|
|
432
|
-
options: i.value,
|
|
433
|
-
"trigger-icon": "rotate_right",
|
|
434
|
-
"tooltip-content": O(t)("imageTransform.tooltip"),
|
|
435
|
-
disabled: e.disabled,
|
|
436
|
-
onSelect: r[0] ||= (e) => n.$emit("transform", e)
|
|
437
|
-
}, null, 8, [
|
|
438
|
-
"options",
|
|
439
|
-
"tooltip-content",
|
|
440
|
-
"disabled"
|
|
441
|
-
]));
|
|
442
|
-
}
|
|
443
|
-
}), be = ["title", "onClick"], xe = {
|
|
444
|
-
key: 0,
|
|
445
|
-
class: "editing-mode__label"
|
|
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({
|
|
447
|
-
__name: "EditingModeDropdown",
|
|
448
|
-
props: { modelValue: {} },
|
|
449
|
-
emits: ["update:modelValue"],
|
|
450
|
-
setup(e, { emit: t }) {
|
|
451
|
-
let { t: d } = n(), { Popover: p } = i(), m = e, h = t, _ = {
|
|
452
|
-
value: "editing",
|
|
453
|
-
labelKey: "editor.editing",
|
|
454
|
-
icon: "edit_note",
|
|
455
|
-
descKey: "editor.editingDescription"
|
|
456
|
-
}, x = [
|
|
457
|
-
_,
|
|
458
|
-
{
|
|
459
|
-
value: "suggesting",
|
|
460
|
-
labelKey: "editor.suggesting",
|
|
461
|
-
icon: "rate_review",
|
|
462
|
-
descKey: "editor.suggestingDescription"
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
value: "viewing",
|
|
466
|
-
labelKey: "editor.viewing",
|
|
467
|
-
icon: "visibility",
|
|
468
|
-
descKey: "editor.viewingDescription"
|
|
469
|
-
}
|
|
470
|
-
], w = S(!1), T = S(!1), D = o(() => x.find((e) => e.value === m.modelValue) ?? _);
|
|
471
|
-
function k(e) {
|
|
472
|
-
h("update:modelValue", e), w.value = !1;
|
|
473
|
-
}
|
|
474
|
-
let A = null;
|
|
475
|
-
function j(e) {
|
|
476
|
-
T.value = e.matches;
|
|
477
|
-
}
|
|
478
|
-
return y(() => {
|
|
479
|
-
A = window.matchMedia("(max-width: 1400px)"), T.value = A.matches, A.addEventListener("change", j);
|
|
480
|
-
}), v(() => A?.removeEventListener("change", j)), (t, n) => (b(), s(O(p), {
|
|
481
|
-
open: w.value,
|
|
482
|
-
placement: "bottom-right",
|
|
483
|
-
"onUpdate:open": n[0] ||= (e) => w.value = e,
|
|
484
|
-
onClose: n[1] ||= (e) => w.value = !1
|
|
485
|
-
}, {
|
|
486
|
-
trigger: M(({ toggle: e }) => [u("button", {
|
|
487
|
-
type: "button",
|
|
488
|
-
class: g(["editing-mode__trigger", {
|
|
489
|
-
"editing-mode__trigger--open": w.value,
|
|
490
|
-
"editing-mode__trigger--compact": T.value
|
|
491
|
-
}]),
|
|
492
|
-
title: `${O(d)(D.value.labelKey)} (Ctrl+Shift+E)`,
|
|
493
|
-
onClick: F(e, ["prevent"])
|
|
494
|
-
}, [
|
|
495
|
-
f(r, {
|
|
496
|
-
name: D.value.icon,
|
|
497
|
-
size: 18
|
|
498
|
-
}, null, 8, ["name"]),
|
|
499
|
-
T.value ? c("", !0) : (b(), l("span", xe, E(O(d)(D.value.labelKey)), 1)),
|
|
500
|
-
f(r, {
|
|
501
|
-
name: "arrow_drop_down",
|
|
502
|
-
size: 16
|
|
503
|
-
})
|
|
504
|
-
], 10, be)]),
|
|
505
|
-
panel: M(() => [u("div", Se, [(b(), l(a, null, C(x, (t) => u("button", {
|
|
506
|
-
key: t.value,
|
|
507
|
-
type: "button",
|
|
508
|
-
class: "editing-mode__option",
|
|
509
|
-
onClick: F((e) => k(t.value), ["prevent"])
|
|
510
|
-
}, [
|
|
511
|
-
f(r, {
|
|
512
|
-
name: t.icon,
|
|
513
|
-
size: 20
|
|
514
|
-
}, null, 8, ["name"]),
|
|
515
|
-
u("span", we, [u("span", Te, E(O(d)(t.labelKey)), 1), u("span", Ee, E(O(d)(t.descKey)), 1)]),
|
|
516
|
-
t.value === e.modelValue ? (b(), s(r, {
|
|
517
|
-
key: 0,
|
|
518
|
-
name: "check",
|
|
519
|
-
size: 18,
|
|
520
|
-
class: "editing-mode__check"
|
|
521
|
-
})) : c("", !0)
|
|
522
|
-
], 8, Ce)), 64))])]),
|
|
523
|
-
_: 1
|
|
524
|
-
}, 8, ["open"]));
|
|
525
|
-
}
|
|
526
|
-
}), [["__scopeId", "data-v-333d7e96"]]), Oe = { class: "review-controls" }, ke = [
|
|
527
|
-
"disabled",
|
|
528
|
-
"aria-pressed",
|
|
529
|
-
"aria-label",
|
|
530
|
-
"title"
|
|
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({
|
|
532
|
-
__name: "ReviewControls",
|
|
533
|
-
props: {
|
|
534
|
-
trackChangesOn: { type: Boolean },
|
|
535
|
-
displayMode: {},
|
|
536
|
-
readOnly: {
|
|
537
|
-
type: Boolean,
|
|
538
|
-
default: !1
|
|
539
|
-
}
|
|
540
|
-
},
|
|
541
|
-
emits: ["toggle-track-changes", "update:display-mode"],
|
|
542
|
-
setup(e, { emit: t }) {
|
|
543
|
-
let { t: d } = n(), { Popover: p } = i(), m = e, h = t, _ = S(!1), v = {
|
|
544
|
-
"all-markup": "markupView.allMarkup",
|
|
545
|
-
"simple-markup": "markupView.simple",
|
|
546
|
-
"no-markup": "markupView.noMarkup",
|
|
547
|
-
original: "markupView.original"
|
|
548
|
-
};
|
|
549
|
-
function y(e) {
|
|
550
|
-
return d(v[e]);
|
|
551
|
-
}
|
|
552
|
-
let x = o(() => y(m.displayMode));
|
|
553
|
-
function w(e) {
|
|
554
|
-
h("update:display-mode", e), _.value = !1;
|
|
555
|
-
}
|
|
556
|
-
return (t, n) => (b(), l("div", Oe, [u("button", {
|
|
557
|
-
type: "button",
|
|
558
|
-
class: g(["review-controls__toggle", { "review-controls__toggle--on": e.trackChangesOn }]),
|
|
559
|
-
disabled: e.readOnly,
|
|
560
|
-
"aria-pressed": e.trackChangesOn,
|
|
561
|
-
"aria-label": O(d)("toggleTrackChanges"),
|
|
562
|
-
title: O(d)("toggleTrackChanges"),
|
|
563
|
-
onMousedown: n[0] ||= F(() => {}, ["prevent"]),
|
|
564
|
-
onClick: n[1] ||= F((e) => t.$emit("toggle-track-changes"), ["prevent"])
|
|
565
|
-
}, [f(r, {
|
|
566
|
-
name: "edit_note",
|
|
567
|
-
size: 18
|
|
568
|
-
}), u("span", Ae, E(e.trackChangesOn ? O(d)("trackingOn") : O(d)("trackingOff")), 1)], 42, ke), f(O(p), {
|
|
569
|
-
open: _.value,
|
|
570
|
-
placement: "bottom-right",
|
|
571
|
-
"onUpdate:open": n[4] ||= (e) => _.value = e,
|
|
572
|
-
onClose: n[5] ||= (e) => _.value = !1
|
|
573
|
-
}, {
|
|
574
|
-
trigger: M(({ toggle: e }) => [u("button", {
|
|
575
|
-
type: "button",
|
|
576
|
-
class: g(["review-controls__display", { "review-controls__display--open": _.value }]),
|
|
577
|
-
title: x.value,
|
|
578
|
-
onMousedown: n[2] ||= F(() => {}, ["prevent"]),
|
|
579
|
-
onClick: F(e, ["prevent"])
|
|
580
|
-
}, [
|
|
581
|
-
f(r, {
|
|
582
|
-
name: "visibility",
|
|
583
|
-
size: 16
|
|
584
|
-
}),
|
|
585
|
-
u("span", Me, E(x.value), 1),
|
|
586
|
-
f(r, {
|
|
587
|
-
name: "arrow_drop_down",
|
|
588
|
-
size: 16
|
|
589
|
-
})
|
|
590
|
-
], 42, je)]),
|
|
591
|
-
panel: M(() => [u("div", {
|
|
592
|
-
class: "review-controls__panel",
|
|
593
|
-
onMousedown: n[3] ||= F(() => {}, ["prevent"])
|
|
594
|
-
}, [(b(!0), l(a, null, C(O(K), (t) => (b(), l("button", {
|
|
595
|
-
key: t,
|
|
596
|
-
type: "button",
|
|
597
|
-
class: "review-controls__option",
|
|
598
|
-
onClick: F((e) => w(t), ["prevent"])
|
|
599
|
-
}, [u("span", Pe, E(y(t)), 1), t === e.displayMode ? (b(), s(r, {
|
|
600
|
-
key: 0,
|
|
601
|
-
name: "check",
|
|
602
|
-
size: 18,
|
|
603
|
-
class: "review-controls__check"
|
|
604
|
-
})) : c("", !0)], 8, Ne))), 128))], 32)]),
|
|
605
|
-
_: 1
|
|
606
|
-
}, 8, ["open"])]));
|
|
607
|
-
}
|
|
608
|
-
}), [["__scopeId", "data-v-e54a1ec7"]]);
|
|
609
|
-
//#endregion
|
|
610
|
-
//#region src/utils/fontOptions.ts
|
|
611
|
-
function Ie(e) {
|
|
612
|
-
if (e === void 0) return;
|
|
613
|
-
let t = e.map((e) => typeof e == "string" ? {
|
|
614
|
-
name: e,
|
|
615
|
-
fontFamily: e,
|
|
616
|
-
category: "other"
|
|
617
|
-
} : e);
|
|
618
|
-
if (Le()) {
|
|
619
|
-
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
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);
|
|
621
|
-
}
|
|
622
|
-
return t;
|
|
623
|
-
}
|
|
624
|
-
function Le() {
|
|
625
|
-
return typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
626
|
-
}
|
|
627
|
-
function Re(e, t) {
|
|
628
|
-
if (!e || e.length === 0) return [];
|
|
629
|
-
let n = /* @__PURE__ */ new Set();
|
|
630
|
-
for (let e of t) n.add(e.trim().toLowerCase());
|
|
631
|
-
let r = /* @__PURE__ */ new Set(), i = [];
|
|
632
|
-
for (let t of e) {
|
|
633
|
-
let e = t.name.trim().toLowerCase();
|
|
634
|
-
n.has(e) || r.has(e) || (r.add(e), i.push(t));
|
|
635
|
-
}
|
|
636
|
-
return i;
|
|
637
|
-
}
|
|
638
|
-
//#endregion
|
|
639
|
-
//#region src/components/Toolbar/presets.ts
|
|
640
|
-
var ze = [
|
|
283
|
+
}), [["__scopeId", "data-v-a8e543d5"]]), ge = [
|
|
641
284
|
{
|
|
642
285
|
name: "Arial",
|
|
643
286
|
fontFamily: "Arial",
|
|
@@ -698,7 +341,7 @@ var ze = [
|
|
|
698
341
|
fontFamily: "Consolas",
|
|
699
342
|
category: "monospace"
|
|
700
343
|
}
|
|
701
|
-
],
|
|
344
|
+
], _e = [
|
|
702
345
|
8,
|
|
703
346
|
9,
|
|
704
347
|
10,
|
|
@@ -713,7 +356,7 @@ var ze = [
|
|
|
713
356
|
36,
|
|
714
357
|
48,
|
|
715
358
|
72
|
|
716
|
-
],
|
|
359
|
+
], ve = [
|
|
717
360
|
{
|
|
718
361
|
id: "Normal",
|
|
719
362
|
label: "Normal",
|
|
@@ -744,7 +387,7 @@ var ze = [
|
|
|
744
387
|
label: "Heading 3",
|
|
745
388
|
nameKey: "styles.heading3"
|
|
746
389
|
}
|
|
747
|
-
],
|
|
390
|
+
], ye = [
|
|
748
391
|
{
|
|
749
392
|
label: "Single",
|
|
750
393
|
labelKey: "lineSpacing.single",
|
|
@@ -763,17 +406,78 @@ var ze = [
|
|
|
763
406
|
labelKey: "lineSpacing.double",
|
|
764
407
|
value: 480
|
|
765
408
|
}
|
|
766
|
-
],
|
|
409
|
+
], be = [
|
|
767
410
|
.5,
|
|
768
411
|
.75,
|
|
769
412
|
1,
|
|
770
413
|
1.25,
|
|
771
414
|
1.5,
|
|
772
415
|
2
|
|
773
|
-
]
|
|
416
|
+
], xe = {
|
|
417
|
+
Title: 26,
|
|
418
|
+
Subtitle: 18,
|
|
419
|
+
Heading1: 24,
|
|
420
|
+
Heading2: 18,
|
|
421
|
+
Heading3: 16,
|
|
422
|
+
Heading4: 14,
|
|
423
|
+
Heading5: 13,
|
|
424
|
+
Heading6: 13,
|
|
425
|
+
Normal: 14
|
|
426
|
+
}, Se = /* @__PURE__ */ new Set([
|
|
427
|
+
"Title",
|
|
428
|
+
"Heading1",
|
|
429
|
+
"Heading2",
|
|
430
|
+
"Heading3"
|
|
431
|
+
]), Ce = { Subtitle: "666666" }, we = "#4a6c8c";
|
|
432
|
+
function Te(e) {
|
|
433
|
+
let t = xe[e.styleId], n = {
|
|
434
|
+
fontSize: t ? `${t}px` : `${Math.min(Math.max(e.fontSize ? e.fontSize / 2 : 11, 11), 20)}px`,
|
|
435
|
+
lineHeight: "1.3"
|
|
436
|
+
};
|
|
437
|
+
(e.bold ?? Se.has(e.styleId)) && (n.fontWeight = "bold"), e.italic && (n.fontStyle = "italic");
|
|
438
|
+
let r = e.color ?? Ce[e.styleId];
|
|
439
|
+
return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color = we), n;
|
|
440
|
+
}
|
|
441
|
+
function Ee(e) {
|
|
442
|
+
return !e || e.length === 0 ? [] : e.filter((e) => e.type === "paragraph").filter((e) => e.qFormat ? !0 : !(e.hidden || e.semiHidden)).map((e) => ({
|
|
443
|
+
styleId: e.styleId,
|
|
444
|
+
name: e.name || e.styleId,
|
|
445
|
+
priority: e.uiPriority ?? 99,
|
|
446
|
+
fontSize: e.rPr?.fontSize,
|
|
447
|
+
bold: e.rPr?.bold,
|
|
448
|
+
italic: e.rPr?.italic,
|
|
449
|
+
color: e.rPr?.color?.rgb
|
|
450
|
+
})).sort((e, t) => e.priority - t.priority);
|
|
451
|
+
}
|
|
452
|
+
//#endregion
|
|
453
|
+
//#region src/composables/useParagraphStyleOptions.ts
|
|
454
|
+
function De(e) {
|
|
455
|
+
let t = o(() => {
|
|
456
|
+
let t = Ee(e.documentStyles());
|
|
457
|
+
return t.length > 0 ? t.map((t) => {
|
|
458
|
+
let n = ve.find((e) => e.id === t.styleId);
|
|
459
|
+
return {
|
|
460
|
+
id: t.styleId,
|
|
461
|
+
label: n ? e.t(n.nameKey) : t.name,
|
|
462
|
+
previewStyle: Te(t)
|
|
463
|
+
};
|
|
464
|
+
}) : ve.map((t) => ({
|
|
465
|
+
id: t.id,
|
|
466
|
+
label: e.t(t.nameKey),
|
|
467
|
+
previewStyle: Te({ styleId: t.id })
|
|
468
|
+
}));
|
|
469
|
+
});
|
|
470
|
+
return {
|
|
471
|
+
resolvedParagraphStyles: t,
|
|
472
|
+
currentStyleLabel: o(() => {
|
|
473
|
+
let n = e.currentStyleId() || "Normal", r = t.value.find((e) => e.id === n);
|
|
474
|
+
return r ? r.label : n;
|
|
475
|
+
})
|
|
476
|
+
};
|
|
477
|
+
}
|
|
774
478
|
//#endregion
|
|
775
479
|
//#region src/composables/useToolbarDropdowns.ts
|
|
776
|
-
function
|
|
480
|
+
function Oe(e) {
|
|
777
481
|
let t = S(null), n = S({
|
|
778
482
|
top: 0,
|
|
779
483
|
left: 0
|
|
@@ -816,7 +520,10 @@ function We(e) {
|
|
|
816
520
|
e.spacing
|
|
817
521
|
].some((e) => e.value?.contains(r)) || (t.value = null));
|
|
818
522
|
}
|
|
819
|
-
|
|
523
|
+
let l;
|
|
524
|
+
return y(() => {
|
|
525
|
+
l = Y(document, c);
|
|
526
|
+
}), v(() => l?.()), {
|
|
820
527
|
openDropdown: t,
|
|
821
528
|
dropdownMenuStyle: a,
|
|
822
529
|
toggleDropdown: s,
|
|
@@ -824,143 +531,434 @@ function We(e) {
|
|
|
824
531
|
};
|
|
825
532
|
}
|
|
826
533
|
//#endregion
|
|
827
|
-
//#region src/composables/useToolbarFontSize.ts
|
|
828
|
-
function
|
|
829
|
-
let t = S(!1), n = (t) => e.execCommand("setFontSize", t * 2);
|
|
830
|
-
function r() {
|
|
831
|
-
t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
|
|
832
|
-
}
|
|
833
|
-
function i() {
|
|
834
|
-
t.value = !0;
|
|
534
|
+
//#region src/composables/useToolbarFontSize.ts
|
|
535
|
+
function ke(e) {
|
|
536
|
+
let t = S(!1), n = (t) => e.execCommand("setFontSize", t * 2);
|
|
537
|
+
function r() {
|
|
538
|
+
t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
|
|
539
|
+
}
|
|
540
|
+
function i() {
|
|
541
|
+
t.value = !0;
|
|
542
|
+
}
|
|
543
|
+
function a(r) {
|
|
544
|
+
if (t.value && r.target instanceof HTMLInputElement) {
|
|
545
|
+
let e = parseFloat(r.target.value);
|
|
546
|
+
isNaN(e) || n(Math.round(Math.min(Math.max(e, 1), 1638) * 2) / 2);
|
|
547
|
+
}
|
|
548
|
+
t.value = !1, e.openDropdown.value = null;
|
|
549
|
+
}
|
|
550
|
+
function o(r) {
|
|
551
|
+
t.value = !1, n(r), e.openDropdown.value = null;
|
|
552
|
+
}
|
|
553
|
+
function s() {
|
|
554
|
+
let t = e.currentFontSize.value;
|
|
555
|
+
n(_e.find((e) => e > t) || t + 1);
|
|
556
|
+
}
|
|
557
|
+
function c() {
|
|
558
|
+
let t = e.currentFontSize.value;
|
|
559
|
+
n([..._e].reverse().find((e) => e < t) || Math.max(1, t - 1));
|
|
560
|
+
}
|
|
561
|
+
return {
|
|
562
|
+
onSizeFocus: r,
|
|
563
|
+
onSizeInput: i,
|
|
564
|
+
commitFontSize: a,
|
|
565
|
+
pickFontSize: o,
|
|
566
|
+
increaseFontSize: s,
|
|
567
|
+
decreaseFontSize: c
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
//#endregion
|
|
571
|
+
//#region src/utils/fontOptions.ts
|
|
572
|
+
function Ae(e) {
|
|
573
|
+
if (e === void 0) return;
|
|
574
|
+
let t = e.map((e) => typeof e == "string" ? {
|
|
575
|
+
name: e,
|
|
576
|
+
fontFamily: e,
|
|
577
|
+
category: "other"
|
|
578
|
+
} : e);
|
|
579
|
+
if (je()) {
|
|
580
|
+
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
581
|
+
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);
|
|
582
|
+
}
|
|
583
|
+
return t;
|
|
584
|
+
}
|
|
585
|
+
function je() {
|
|
586
|
+
return typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
587
|
+
}
|
|
588
|
+
function Me(e, t) {
|
|
589
|
+
if (!e || e.length === 0) return [];
|
|
590
|
+
let n = /* @__PURE__ */ new Set();
|
|
591
|
+
for (let e of t) n.add(e.trim().toLowerCase());
|
|
592
|
+
let r = /* @__PURE__ */ new Set(), i = [];
|
|
593
|
+
for (let t of e) {
|
|
594
|
+
let e = t.name.trim().toLowerCase();
|
|
595
|
+
n.has(e) || r.has(e) || (r.add(e), i.push(t));
|
|
596
|
+
}
|
|
597
|
+
return i;
|
|
598
|
+
}
|
|
599
|
+
//#endregion
|
|
600
|
+
//#region src/components/EditingModeDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
601
|
+
var Ne = ["title", "onClick"], Pe = {
|
|
602
|
+
key: 0,
|
|
603
|
+
class: "editing-mode__label"
|
|
604
|
+
}, Fe = { class: "editing-mode__panel" }, Ie = ["onClick"], Le = { class: "editing-mode__option-text" }, Re = { class: "editing-mode__option-label" }, ze = { class: "editing-mode__option-desc" }, Be = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
605
|
+
__name: "EditingModeDropdown",
|
|
606
|
+
props: { modelValue: {} },
|
|
607
|
+
emits: ["update:modelValue"],
|
|
608
|
+
setup(e, { emit: t }) {
|
|
609
|
+
let { t: d } = n(), { Popover: p } = i(), m = e, h = t, _ = {
|
|
610
|
+
value: "editing",
|
|
611
|
+
labelKey: "editor.editing",
|
|
612
|
+
icon: "edit_note",
|
|
613
|
+
descKey: "editor.editingDescription"
|
|
614
|
+
}, x = [
|
|
615
|
+
_,
|
|
616
|
+
{
|
|
617
|
+
value: "suggesting",
|
|
618
|
+
labelKey: "editor.suggesting",
|
|
619
|
+
icon: "rate_review",
|
|
620
|
+
descKey: "editor.suggestingDescription"
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
value: "viewing",
|
|
624
|
+
labelKey: "editor.viewing",
|
|
625
|
+
icon: "visibility",
|
|
626
|
+
descKey: "editor.viewingDescription"
|
|
627
|
+
}
|
|
628
|
+
], w = S(!1), T = S(!1), D = o(() => x.find((e) => e.value === m.modelValue) ?? _);
|
|
629
|
+
function k(e) {
|
|
630
|
+
h("update:modelValue", e), w.value = !1;
|
|
631
|
+
}
|
|
632
|
+
let A = null;
|
|
633
|
+
function j(e) {
|
|
634
|
+
T.value = e.matches;
|
|
635
|
+
}
|
|
636
|
+
return y(() => {
|
|
637
|
+
A = window.matchMedia("(max-width: 1400px)"), T.value = A.matches, A.addEventListener("change", j);
|
|
638
|
+
}), v(() => A?.removeEventListener("change", j)), (t, n) => (b(), s(O(p), {
|
|
639
|
+
open: w.value,
|
|
640
|
+
placement: "bottom-right",
|
|
641
|
+
"onUpdate:open": n[0] ||= (e) => w.value = e,
|
|
642
|
+
onClose: n[1] ||= (e) => w.value = !1
|
|
643
|
+
}, {
|
|
644
|
+
trigger: M(({ toggle: e }) => [u("button", {
|
|
645
|
+
type: "button",
|
|
646
|
+
class: g(["editing-mode__trigger", {
|
|
647
|
+
"editing-mode__trigger--open": w.value,
|
|
648
|
+
"editing-mode__trigger--compact": T.value
|
|
649
|
+
}]),
|
|
650
|
+
title: `${O(d)(D.value.labelKey)} (Ctrl+Shift+E)`,
|
|
651
|
+
onClick: F(e, ["prevent"])
|
|
652
|
+
}, [
|
|
653
|
+
f(r, {
|
|
654
|
+
name: D.value.icon,
|
|
655
|
+
size: 18
|
|
656
|
+
}, null, 8, ["name"]),
|
|
657
|
+
T.value ? c("", !0) : (b(), l("span", Pe, E(O(d)(D.value.labelKey)), 1)),
|
|
658
|
+
f(r, {
|
|
659
|
+
name: "arrow_drop_down",
|
|
660
|
+
size: 16
|
|
661
|
+
})
|
|
662
|
+
], 10, Ne)]),
|
|
663
|
+
panel: M(() => [u("div", Fe, [(b(), l(a, null, C(x, (t) => u("button", {
|
|
664
|
+
key: t.value,
|
|
665
|
+
type: "button",
|
|
666
|
+
class: "editing-mode__option",
|
|
667
|
+
onClick: F((e) => k(t.value), ["prevent"])
|
|
668
|
+
}, [
|
|
669
|
+
f(r, {
|
|
670
|
+
name: t.icon,
|
|
671
|
+
size: 20
|
|
672
|
+
}, null, 8, ["name"]),
|
|
673
|
+
u("span", Le, [u("span", Re, E(O(d)(t.labelKey)), 1), u("span", ze, E(O(d)(t.descKey)), 1)]),
|
|
674
|
+
t.value === e.modelValue ? (b(), s(r, {
|
|
675
|
+
key: 0,
|
|
676
|
+
name: "check",
|
|
677
|
+
size: 18,
|
|
678
|
+
class: "editing-mode__check"
|
|
679
|
+
})) : c("", !0)
|
|
680
|
+
], 8, Ie)), 64))])]),
|
|
681
|
+
_: 1
|
|
682
|
+
}, 8, ["open"]));
|
|
835
683
|
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
684
|
+
}), [["__scopeId", "data-v-732ee330"]]), Ve = { class: "review-controls" }, He = [
|
|
685
|
+
"disabled",
|
|
686
|
+
"aria-pressed",
|
|
687
|
+
"aria-label",
|
|
688
|
+
"title"
|
|
689
|
+
], Ue = { class: "review-controls__toggle-label" }, We = ["title", "onClick"], Ge = { class: "review-controls__display-label" }, Ke = ["onClick"], qe = { class: "review-controls__option-label" }, Je = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
690
|
+
__name: "ReviewControls",
|
|
691
|
+
props: {
|
|
692
|
+
trackChangesOn: { type: Boolean },
|
|
693
|
+
displayMode: {},
|
|
694
|
+
readOnly: {
|
|
695
|
+
type: Boolean,
|
|
696
|
+
default: !1
|
|
840
697
|
}
|
|
841
|
-
|
|
698
|
+
},
|
|
699
|
+
emits: ["toggle-track-changes", "update:display-mode"],
|
|
700
|
+
setup(e, { emit: t }) {
|
|
701
|
+
let { t: d } = n(), { Popover: p } = i(), m = e, h = t, _ = S(!1), v = {
|
|
702
|
+
"all-markup": "markupView.allMarkup",
|
|
703
|
+
"simple-markup": "markupView.simple",
|
|
704
|
+
"no-markup": "markupView.noMarkup",
|
|
705
|
+
original: "markupView.original"
|
|
706
|
+
};
|
|
707
|
+
function y(e) {
|
|
708
|
+
return d(v[e]);
|
|
709
|
+
}
|
|
710
|
+
let x = o(() => y(m.displayMode));
|
|
711
|
+
function w(e) {
|
|
712
|
+
h("update:display-mode", e), _.value = !1;
|
|
713
|
+
}
|
|
714
|
+
return (t, n) => (b(), l("div", Ve, [u("button", {
|
|
715
|
+
type: "button",
|
|
716
|
+
class: g(["review-controls__toggle", { "review-controls__toggle--on": e.trackChangesOn }]),
|
|
717
|
+
disabled: e.readOnly,
|
|
718
|
+
"aria-pressed": e.trackChangesOn,
|
|
719
|
+
"aria-label": O(d)("toggleTrackChanges"),
|
|
720
|
+
title: O(d)("toggleTrackChanges"),
|
|
721
|
+
onMousedown: n[0] ||= F(() => {}, ["prevent"]),
|
|
722
|
+
onClick: n[1] ||= F((e) => t.$emit("toggle-track-changes"), ["prevent"])
|
|
723
|
+
}, [f(r, {
|
|
724
|
+
name: "edit_note",
|
|
725
|
+
size: 18
|
|
726
|
+
}), u("span", Ue, E(e.trackChangesOn ? O(d)("trackingOn") : O(d)("trackingOff")), 1)], 42, He), f(O(p), {
|
|
727
|
+
open: _.value,
|
|
728
|
+
placement: "bottom-right",
|
|
729
|
+
"onUpdate:open": n[4] ||= (e) => _.value = e,
|
|
730
|
+
onClose: n[5] ||= (e) => _.value = !1
|
|
731
|
+
}, {
|
|
732
|
+
trigger: M(({ toggle: e }) => [u("button", {
|
|
733
|
+
type: "button",
|
|
734
|
+
class: g(["review-controls__display", { "review-controls__display--open": _.value }]),
|
|
735
|
+
title: x.value,
|
|
736
|
+
onMousedown: n[2] ||= F(() => {}, ["prevent"]),
|
|
737
|
+
onClick: F(e, ["prevent"])
|
|
738
|
+
}, [
|
|
739
|
+
f(r, {
|
|
740
|
+
name: "visibility",
|
|
741
|
+
size: 16
|
|
742
|
+
}),
|
|
743
|
+
u("span", Ge, E(x.value), 1),
|
|
744
|
+
f(r, {
|
|
745
|
+
name: "arrow_drop_down",
|
|
746
|
+
size: 16
|
|
747
|
+
})
|
|
748
|
+
], 42, We)]),
|
|
749
|
+
panel: M(() => [u("div", {
|
|
750
|
+
class: "review-controls__panel",
|
|
751
|
+
onMousedown: n[3] ||= F(() => {}, ["prevent"])
|
|
752
|
+
}, [(b(!0), l(a, null, C(O(I), (t) => (b(), l("button", {
|
|
753
|
+
key: t,
|
|
754
|
+
type: "button",
|
|
755
|
+
class: "review-controls__option",
|
|
756
|
+
onClick: F((e) => w(t), ["prevent"])
|
|
757
|
+
}, [u("span", qe, E(y(t)), 1), t === e.displayMode ? (b(), s(r, {
|
|
758
|
+
key: 0,
|
|
759
|
+
name: "check",
|
|
760
|
+
size: 18,
|
|
761
|
+
class: "review-controls__check"
|
|
762
|
+
})) : c("", !0)], 8, Ke))), 128))], 32)]),
|
|
763
|
+
_: 1
|
|
764
|
+
}, 8, ["open"])]));
|
|
842
765
|
}
|
|
843
|
-
|
|
844
|
-
|
|
766
|
+
}), [["__scopeId", "data-v-e96b04ec"]]), Ye = [
|
|
767
|
+
"disabled",
|
|
768
|
+
"aria-label",
|
|
769
|
+
"title",
|
|
770
|
+
"aria-expanded",
|
|
771
|
+
"onClick"
|
|
772
|
+
], Xe = { class: "docx-icon-grid__panel" }, Ze = ["title", "onClick"], Qe = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
773
|
+
__name: "IconGridDropdown",
|
|
774
|
+
props: {
|
|
775
|
+
options: {},
|
|
776
|
+
activeValue: {},
|
|
777
|
+
triggerIcon: {},
|
|
778
|
+
tooltipContent: {},
|
|
779
|
+
disabled: { type: Boolean },
|
|
780
|
+
ariaLabel: {}
|
|
781
|
+
},
|
|
782
|
+
emits: ["select"],
|
|
783
|
+
setup(e, { emit: t }) {
|
|
784
|
+
let n = t, { Popover: o } = i(), c = S(!1);
|
|
785
|
+
function d(e) {
|
|
786
|
+
n("select", e), c.value = !1;
|
|
787
|
+
}
|
|
788
|
+
return (t, n) => (b(), s(O(o), {
|
|
789
|
+
open: c.value,
|
|
790
|
+
"onUpdate:open": n[0] ||= (e) => c.value = e,
|
|
791
|
+
onClose: n[1] ||= (e) => c.value = !1
|
|
792
|
+
}, {
|
|
793
|
+
trigger: M(({ toggle: t }) => [u("button", {
|
|
794
|
+
type: "button",
|
|
795
|
+
class: g(["docx-icon-grid__btn", { "docx-icon-grid__btn--open": c.value }]),
|
|
796
|
+
disabled: e.disabled,
|
|
797
|
+
"aria-label": e.ariaLabel ?? e.tooltipContent,
|
|
798
|
+
title: e.tooltipContent,
|
|
799
|
+
"aria-expanded": c.value,
|
|
800
|
+
"aria-haspopup": "true",
|
|
801
|
+
onClick: F(t, ["prevent"])
|
|
802
|
+
}, [f(r, {
|
|
803
|
+
name: e.triggerIcon,
|
|
804
|
+
size: 20
|
|
805
|
+
}, null, 8, ["name"]), f(r, {
|
|
806
|
+
name: "arrow_drop_down",
|
|
807
|
+
size: 14
|
|
808
|
+
})], 10, Ye)]),
|
|
809
|
+
panel: M(() => [u("div", Xe, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
|
|
810
|
+
key: t.value,
|
|
811
|
+
type: "button",
|
|
812
|
+
class: g(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === t.value }]),
|
|
813
|
+
title: t.label,
|
|
814
|
+
onClick: F((e) => d(t.value), ["prevent"])
|
|
815
|
+
}, [f(r, {
|
|
816
|
+
name: t.iconName,
|
|
817
|
+
size: 18
|
|
818
|
+
}, null, 8, ["name"])], 10, Ze))), 128))])]),
|
|
819
|
+
_: 1
|
|
820
|
+
}, 8, ["open"]));
|
|
845
821
|
}
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
822
|
+
}), [["__scopeId", "data-v-5ef29208"]]), $e = /* @__PURE__ */ p({
|
|
823
|
+
__name: "ImageTransformDropdown",
|
|
824
|
+
props: { disabled: { type: Boolean } },
|
|
825
|
+
emits: ["transform"],
|
|
826
|
+
setup(e) {
|
|
827
|
+
let { t } = n(), r = [
|
|
828
|
+
{
|
|
829
|
+
value: "rotateCW",
|
|
830
|
+
labelKey: "imageTransform.rotateClockwise",
|
|
831
|
+
iconName: "rotate_right"
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
value: "rotateCCW",
|
|
835
|
+
labelKey: "imageTransform.rotateCounterClockwise",
|
|
836
|
+
iconName: "rotate_left"
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
value: "flipH",
|
|
840
|
+
labelKey: "imageTransform.flipHorizontal",
|
|
841
|
+
iconName: "swap_horiz"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
value: "flipV",
|
|
845
|
+
labelKey: "imageTransform.flipVertical",
|
|
846
|
+
iconName: "swap_vert"
|
|
847
|
+
}
|
|
848
|
+
], i = o(() => r.map((e) => ({
|
|
849
|
+
value: e.value,
|
|
850
|
+
label: t(e.labelKey),
|
|
851
|
+
iconName: e.iconName
|
|
852
|
+
})));
|
|
853
|
+
return (n, r) => (b(), s(Qe, {
|
|
854
|
+
options: i.value,
|
|
855
|
+
"trigger-icon": "rotate_right",
|
|
856
|
+
"tooltip-content": O(t)("imageTransform.tooltip"),
|
|
857
|
+
disabled: e.disabled,
|
|
858
|
+
onSelect: r[0] ||= (e) => n.$emit("transform", e)
|
|
859
|
+
}, null, 8, [
|
|
860
|
+
"options",
|
|
861
|
+
"tooltip-content",
|
|
862
|
+
"disabled"
|
|
863
|
+
]));
|
|
849
864
|
}
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
865
|
+
}), et = /* @__PURE__ */ p({
|
|
866
|
+
__name: "ImageWrapDropdown",
|
|
867
|
+
props: {
|
|
868
|
+
imageContext: {},
|
|
869
|
+
disabled: { type: Boolean }
|
|
870
|
+
},
|
|
871
|
+
emits: ["change"],
|
|
872
|
+
setup(e) {
|
|
873
|
+
let t = e, { t: r } = n(), i = [
|
|
874
|
+
{
|
|
875
|
+
value: "inline",
|
|
876
|
+
labelKey: "imageWrap.inline",
|
|
877
|
+
iconName: "format_image_left"
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
value: "wrapRight",
|
|
881
|
+
labelKey: "imageWrap.floatLeft",
|
|
882
|
+
iconName: "format_image_right"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
value: "wrapLeft",
|
|
886
|
+
labelKey: "imageWrap.floatRight",
|
|
887
|
+
iconName: "format_image_left"
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
value: "topAndBottom",
|
|
891
|
+
labelKey: "imageWrap.topAndBottom",
|
|
892
|
+
iconName: "horizontal_rule"
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
value: "behind",
|
|
896
|
+
labelKey: "imageWrap.behindText",
|
|
897
|
+
iconName: "flip_to_back"
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
value: "inFront",
|
|
901
|
+
labelKey: "imageWrap.inFrontOfText",
|
|
902
|
+
iconName: "flip_to_front"
|
|
903
|
+
}
|
|
904
|
+
], a = o(() => i.map((e) => ({
|
|
905
|
+
value: e.value,
|
|
906
|
+
label: r(e.labelKey),
|
|
907
|
+
iconName: e.iconName
|
|
908
|
+
}))), c = o(() => {
|
|
909
|
+
let e = t.imageContext;
|
|
910
|
+
return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
|
|
911
|
+
}), 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 ?? "");
|
|
912
|
+
return (t, n) => (b(), s(Qe, {
|
|
913
|
+
options: a.value,
|
|
914
|
+
"active-value": c.value,
|
|
915
|
+
"trigger-icon": u.value,
|
|
916
|
+
"tooltip-content": O(r)("imageWrap.tooltipPrefix", { label: d.value }),
|
|
917
|
+
disabled: e.disabled,
|
|
918
|
+
onSelect: n[0] ||= (e) => t.$emit("change", e)
|
|
919
|
+
}, null, 8, [
|
|
920
|
+
"options",
|
|
921
|
+
"active-value",
|
|
922
|
+
"trigger-icon",
|
|
923
|
+
"tooltip-content",
|
|
924
|
+
"disabled"
|
|
925
|
+
]));
|
|
853
926
|
}
|
|
854
|
-
|
|
855
|
-
onSizeFocus: r,
|
|
856
|
-
onSizeInput: i,
|
|
857
|
-
commitFontSize: a,
|
|
858
|
-
pickFontSize: o,
|
|
859
|
-
increaseFontSize: s,
|
|
860
|
-
decreaseFontSize: c
|
|
861
|
-
};
|
|
862
|
-
}
|
|
863
|
-
//#endregion
|
|
864
|
-
//#region src/utils/stylePreview.ts
|
|
865
|
-
var Ke = {
|
|
866
|
-
Title: 26,
|
|
867
|
-
Subtitle: 18,
|
|
868
|
-
Heading1: 24,
|
|
869
|
-
Heading2: 18,
|
|
870
|
-
Heading3: 16,
|
|
871
|
-
Heading4: 14,
|
|
872
|
-
Heading5: 13,
|
|
873
|
-
Heading6: 13,
|
|
874
|
-
Normal: 14
|
|
875
|
-
}, qe = /* @__PURE__ */ new Set([
|
|
876
|
-
"Title",
|
|
877
|
-
"Heading1",
|
|
878
|
-
"Heading2",
|
|
879
|
-
"Heading3"
|
|
880
|
-
]), Je = { Subtitle: "666666" }, Ye = "#4a6c8c";
|
|
881
|
-
function Xe(e) {
|
|
882
|
-
let t = Ke[e.styleId], n = {
|
|
883
|
-
fontSize: t ? `${t}px` : `${Math.min(Math.max(e.fontSize ? e.fontSize / 2 : 11, 11), 20)}px`,
|
|
884
|
-
lineHeight: "1.3"
|
|
885
|
-
};
|
|
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;
|
|
889
|
-
}
|
|
890
|
-
function Ze(e) {
|
|
891
|
-
return !e || e.length === 0 ? [] : e.filter((e) => e.type === "paragraph").filter((e) => e.qFormat ? !0 : !(e.hidden || e.semiHidden)).map((e) => ({
|
|
892
|
-
styleId: e.styleId,
|
|
893
|
-
name: e.name || e.styleId,
|
|
894
|
-
priority: e.uiPriority ?? 99,
|
|
895
|
-
fontSize: e.rPr?.fontSize,
|
|
896
|
-
bold: e.rPr?.bold,
|
|
897
|
-
italic: e.rPr?.italic,
|
|
898
|
-
color: e.rPr?.color?.rgb
|
|
899
|
-
})).sort((e, t) => e.priority - t.priority);
|
|
900
|
-
}
|
|
901
|
-
//#endregion
|
|
902
|
-
//#region src/composables/useParagraphStyleOptions.ts
|
|
903
|
-
function Qe(e) {
|
|
904
|
-
let t = o(() => {
|
|
905
|
-
let t = Ze(e.documentStyles());
|
|
906
|
-
return t.length > 0 ? t.map((t) => {
|
|
907
|
-
let n = Ve.find((e) => e.id === t.styleId);
|
|
908
|
-
return {
|
|
909
|
-
id: t.styleId,
|
|
910
|
-
label: n ? e.t(n.nameKey) : t.name,
|
|
911
|
-
previewStyle: Xe(t)
|
|
912
|
-
};
|
|
913
|
-
}) : Ve.map((t) => ({
|
|
914
|
-
id: t.id,
|
|
915
|
-
label: e.t(t.nameKey),
|
|
916
|
-
previewStyle: Xe({ styleId: t.id })
|
|
917
|
-
}));
|
|
918
|
-
});
|
|
919
|
-
return {
|
|
920
|
-
resolvedParagraphStyles: t,
|
|
921
|
-
currentStyleLabel: o(() => {
|
|
922
|
-
let n = e.currentStyleId() || "Normal", r = t.value.find((e) => e.id === n);
|
|
923
|
-
return r ? r.label : n;
|
|
924
|
-
})
|
|
925
|
-
};
|
|
926
|
-
}
|
|
927
|
-
//#endregion
|
|
928
|
-
//#region src/components/Toolbar.vue?vue&type=script&setup=true&lang.ts
|
|
929
|
-
var $e = {
|
|
927
|
+
}), tt = {
|
|
930
928
|
key: 0,
|
|
931
929
|
class: "basic-toolbar"
|
|
932
|
-
},
|
|
930
|
+
}, nt = [
|
|
933
931
|
"title",
|
|
934
932
|
"aria-label",
|
|
935
933
|
"disabled"
|
|
936
|
-
],
|
|
934
|
+
], rt = [
|
|
937
935
|
"title",
|
|
938
936
|
"aria-label",
|
|
939
937
|
"disabled"
|
|
940
|
-
],
|
|
938
|
+
], it = ["disabled", "title"], at = ["aria-expanded", "title"], ot = ["disabled", "title"], st = ["onMousedown"], ct = ["aria-expanded", "title"], lt = ["onMousedown"], ut = ["aria-expanded", "title"], dt = {
|
|
941
939
|
key: 0,
|
|
942
940
|
class: "toolbar-dropdown__group-label"
|
|
943
|
-
},
|
|
941
|
+
}, ft = ["onMousedown"], pt = ["title"], mt = [
|
|
944
942
|
"value",
|
|
945
943
|
"title",
|
|
946
944
|
"aria-expanded"
|
|
947
|
-
],
|
|
945
|
+
], ht = ["title"], gt = ["onMousedown"], _t = ["title", "aria-label"], vt = ["title", "aria-label"], yt = ["title", "aria-label"], bt = ["title", "aria-label"], xt = ["title", "aria-label"], St = ["title", "aria-label"], Ct = ["title", "aria-label"], wt = ["aria-expanded", "title"], Tt = ["title"], Et = ["title"], Dt = ["title"], Ot = ["title"], kt = ["title", "aria-label"], At = ["title", "aria-label"], jt = [
|
|
948
946
|
"title",
|
|
949
947
|
"aria-label",
|
|
950
948
|
"disabled"
|
|
951
|
-
],
|
|
949
|
+
], Mt = ["title", "aria-label"], Nt = ["aria-expanded", "title"], Pt = ["onMousedown"], Ft = ["title", "aria-label"], It = [
|
|
952
950
|
"title",
|
|
953
951
|
"aria-label",
|
|
954
952
|
"aria-pressed"
|
|
955
|
-
],
|
|
953
|
+
], Lt = [
|
|
956
954
|
"title",
|
|
957
955
|
"aria-label",
|
|
958
956
|
"aria-pressed"
|
|
959
|
-
],
|
|
957
|
+
], Rt = {
|
|
960
958
|
key: 0,
|
|
961
959
|
"data-testid": "toolbar-comments-count",
|
|
962
960
|
class: "basic-toolbar__comment-count"
|
|
963
|
-
},
|
|
961
|
+
}, zt = ["title", "aria-label"], Bt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
964
962
|
__name: "Toolbar",
|
|
965
963
|
props: {
|
|
966
964
|
view: { default: null },
|
|
@@ -1025,99 +1023,91 @@ var $e = {
|
|
|
1025
1023
|
"image-transform"
|
|
1026
1024
|
],
|
|
1027
1025
|
setup(e, { emit: t }) {
|
|
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 ??
|
|
1029
|
-
zoom:
|
|
1026
|
+
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 ?? be), k = o(() => m.showZoomControl ?? !0), A = S(null), j = S(null), M = S(null), N = S(null), I = S(null), L = S(null), { openDropdown: z, dropdownMenuStyle: V, toggleDropdown: U, recomputeDropdownPos: W } = Oe({
|
|
1027
|
+
zoom: L,
|
|
1030
1028
|
style: A,
|
|
1031
1029
|
font: j,
|
|
1032
1030
|
size: M,
|
|
1033
1031
|
align: N,
|
|
1034
|
-
spacing:
|
|
1032
|
+
spacing: I
|
|
1035
1033
|
}), G = o(() => {
|
|
1036
1034
|
m.stateTick;
|
|
1037
1035
|
let e = m.view;
|
|
1038
|
-
return e ?
|
|
1036
|
+
return e ? B(e.state) : {
|
|
1039
1037
|
hasSelection: !1,
|
|
1040
1038
|
isMultiParagraph: !1,
|
|
1041
1039
|
textFormatting: {},
|
|
1042
1040
|
paragraphFormatting: {},
|
|
1043
1041
|
startParagraphIndex: 0,
|
|
1044
1042
|
endParagraphIndex: 0,
|
|
1045
|
-
listState:
|
|
1043
|
+
listState: ee,
|
|
1046
1044
|
activeCommentIds: [],
|
|
1047
1045
|
inInsertion: !1,
|
|
1048
1046
|
inDeletion: !1
|
|
1049
1047
|
};
|
|
1050
|
-
}),
|
|
1048
|
+
}), K = o(() => {
|
|
1051
1049
|
let e = G.value.textFormatting.fontFamily;
|
|
1052
1050
|
return e?.ascii || e?.hAnsi || "Arial";
|
|
1053
|
-
}),
|
|
1051
|
+
}), q = o(() => {
|
|
1054
1052
|
let e = G.value.textFormatting.fontSize;
|
|
1055
1053
|
return e ? e / 2 : 11;
|
|
1056
|
-
}),
|
|
1057
|
-
switch (
|
|
1054
|
+
}), J = o(() => G.value.paragraphFormatting.alignment || "left"), Y = o(() => {
|
|
1055
|
+
switch (J.value) {
|
|
1058
1056
|
case "center": return "format_align_center";
|
|
1059
1057
|
case "right": return "format_align_right";
|
|
1060
1058
|
case "both": return "format_align_justify";
|
|
1061
1059
|
default: return "format_align_left";
|
|
1062
1060
|
}
|
|
1063
|
-
}), { resolvedParagraphStyles:
|
|
1061
|
+
}), { resolvedParagraphStyles: ie, currentStyleLabel: ae } = De({
|
|
1064
1062
|
documentStyles: () => m.documentStyles,
|
|
1065
1063
|
currentStyleId: () => G.value.paragraphFormatting.styleId || "Normal",
|
|
1066
1064
|
t: h
|
|
1067
|
-
}),
|
|
1065
|
+
}), oe = o(() => {
|
|
1068
1066
|
if (m.stateTick, m.canUndo !== void 0) return m.canUndo;
|
|
1069
1067
|
let e = m.view;
|
|
1070
|
-
return e ?
|
|
1071
|
-
}),
|
|
1068
|
+
return e ? ne(e.state) > 0 : !1;
|
|
1069
|
+
}), se = o(() => {
|
|
1072
1070
|
if (m.stateTick, m.canRedo !== void 0) return m.canRedo;
|
|
1073
1071
|
let e = m.view;
|
|
1074
1072
|
return e ? te(e.state) > 0 : !1;
|
|
1075
|
-
}),
|
|
1076
|
-
let e = G.value, t =
|
|
1073
|
+
}), ce = o(() => {
|
|
1074
|
+
let e = G.value, t = R(e.listState) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
|
|
1077
1075
|
return t || n;
|
|
1078
|
-
}),
|
|
1076
|
+
}), le = o(() => {
|
|
1079
1077
|
let e = G.value.textFormatting.color?.rgb;
|
|
1080
1078
|
return e ? e.replace(/^#/, "").toUpperCase() : void 0;
|
|
1081
|
-
}),
|
|
1079
|
+
}), ue = o(() => {
|
|
1082
1080
|
let e = G.value.textFormatting.highlight;
|
|
1083
|
-
if (
|
|
1084
|
-
}),
|
|
1081
|
+
if (e && e !== "none") return e.replace(/^#/, "").toUpperCase();
|
|
1082
|
+
}), X = o(() => Ae(m.fontFamilies) ?? ge), de = o(() => Me(m.documentFonts, X.value.map((e) => e.name))), fe = o(() => [
|
|
1085
1083
|
{
|
|
1086
1084
|
label: h("font.documentFonts"),
|
|
1087
|
-
fonts:
|
|
1085
|
+
fonts: de.value
|
|
1088
1086
|
},
|
|
1089
1087
|
{
|
|
1090
1088
|
label: h("font.sansSerif"),
|
|
1091
|
-
fonts:
|
|
1089
|
+
fonts: X.value.filter((e) => e.category === "sans-serif")
|
|
1092
1090
|
},
|
|
1093
1091
|
{
|
|
1094
1092
|
label: h("font.serif"),
|
|
1095
|
-
fonts:
|
|
1093
|
+
fonts: X.value.filter((e) => e.category === "serif")
|
|
1096
1094
|
},
|
|
1097
1095
|
{
|
|
1098
1096
|
label: h("font.monospace"),
|
|
1099
|
-
fonts:
|
|
1097
|
+
fonts: X.value.filter((e) => e.category === "monospace")
|
|
1100
1098
|
},
|
|
1101
1099
|
{
|
|
1102
1100
|
label: h("font.other"),
|
|
1103
|
-
fonts:
|
|
1101
|
+
fonts: X.value.filter((e) => !e.category || e.category === "other")
|
|
1104
1102
|
}
|
|
1105
1103
|
]);
|
|
1106
|
-
function fe() {
|
|
1107
|
-
if (m.onUndo) {
|
|
1108
|
-
m.onUndo();
|
|
1109
|
-
return;
|
|
1110
|
-
}
|
|
1111
|
-
Q("undo");
|
|
1112
|
-
}
|
|
1113
1104
|
function pe() {
|
|
1114
|
-
|
|
1115
|
-
m.onRedo();
|
|
1116
|
-
return;
|
|
1117
|
-
}
|
|
1118
|
-
Q("redo");
|
|
1105
|
+
m.onUndo ? m.onUndo() : Z("undo");
|
|
1119
1106
|
}
|
|
1120
|
-
function
|
|
1107
|
+
function me() {
|
|
1108
|
+
m.onRedo ? m.onRedo() : Z("redo");
|
|
1109
|
+
}
|
|
1110
|
+
function Z(e, ...t) {
|
|
1121
1111
|
let n = m.view;
|
|
1122
1112
|
if (!n) return;
|
|
1123
1113
|
let r = m.getCommands()[e];
|
|
@@ -1125,93 +1115,90 @@ var $e = {
|
|
|
1125
1115
|
typeof console < "u" && console.warn("[Toolbar] command not found:", e);
|
|
1126
1116
|
return;
|
|
1127
1117
|
}
|
|
1128
|
-
|
|
1118
|
+
let i = r(...t);
|
|
1119
|
+
H(n, i), n.hasFocus() || n.focus(), z.value = null;
|
|
1129
1120
|
}
|
|
1130
|
-
function
|
|
1131
|
-
|
|
1121
|
+
function he(e) {
|
|
1122
|
+
Z("setFontFamily", e);
|
|
1132
1123
|
}
|
|
1133
|
-
let { onSizeFocus:
|
|
1134
|
-
currentFontSize:
|
|
1135
|
-
openDropdown:
|
|
1124
|
+
let { onSizeFocus: ve, onSizeInput: xe, commitFontSize: Se, pickFontSize: Ce, increaseFontSize: we, decreaseFontSize: Te } = ke({
|
|
1125
|
+
currentFontSize: q,
|
|
1126
|
+
openDropdown: z,
|
|
1136
1127
|
recomputeDropdownPos: W,
|
|
1137
|
-
execCommand:
|
|
1128
|
+
execCommand: Z
|
|
1138
1129
|
});
|
|
1139
|
-
function
|
|
1140
|
-
|
|
1141
|
-
Q("clearTextColor");
|
|
1142
|
-
return;
|
|
1143
|
-
}
|
|
1144
|
-
Q("setTextColor", typeof e == "string" ? { rgb: e } : e);
|
|
1130
|
+
function Ee(e) {
|
|
1131
|
+
typeof e == "object" && e.auto ? Z("clearTextColor") : Z("setTextColor", typeof e == "string" ? { rgb: e } : e);
|
|
1145
1132
|
}
|
|
1146
|
-
function
|
|
1133
|
+
function je() {
|
|
1147
1134
|
let e = m.view;
|
|
1148
|
-
e && (
|
|
1135
|
+
e && (H(e, re), e.hasFocus() || e.focus());
|
|
1149
1136
|
}
|
|
1150
|
-
function
|
|
1151
|
-
|
|
1137
|
+
function Ne(e) {
|
|
1138
|
+
Z("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
|
|
1152
1139
|
}
|
|
1153
|
-
function
|
|
1154
|
-
v("apply-style", e),
|
|
1140
|
+
function Pe(e) {
|
|
1141
|
+
v("apply-style", e), z.value = null;
|
|
1155
1142
|
}
|
|
1156
|
-
function
|
|
1157
|
-
|
|
1143
|
+
function Fe(e) {
|
|
1144
|
+
Z("setLineSpacing", e);
|
|
1158
1145
|
}
|
|
1159
|
-
function
|
|
1146
|
+
function Ie(e) {
|
|
1160
1147
|
let t = G.value.paragraphFormatting.lineSpacing;
|
|
1161
1148
|
return t ? Math.abs(t - e) < 10 : e === 240;
|
|
1162
1149
|
}
|
|
1163
|
-
return (t, n) => e.view ? (b(), l("div",
|
|
1150
|
+
return (t, n) => e.view ? (b(), l("div", tt, [
|
|
1164
1151
|
u("button", {
|
|
1165
1152
|
title: O(h)("undoShortcut"),
|
|
1166
1153
|
"aria-label": O(h)("undo"),
|
|
1167
|
-
disabled: !
|
|
1168
|
-
onMousedown: F(
|
|
1169
|
-
}, [f(r, { name: "undo" })], 40,
|
|
1154
|
+
disabled: !oe.value,
|
|
1155
|
+
onMousedown: F(pe, ["prevent"])
|
|
1156
|
+
}, [f(r, { name: "undo" })], 40, nt),
|
|
1170
1157
|
u("button", {
|
|
1171
1158
|
title: O(h)("redoShortcut"),
|
|
1172
1159
|
"aria-label": O(h)("redo"),
|
|
1173
|
-
disabled: !
|
|
1174
|
-
onMousedown: F(
|
|
1175
|
-
}, [f(r, { name: "redo" })], 40,
|
|
1160
|
+
disabled: !se.value,
|
|
1161
|
+
onMousedown: F(me, ["prevent"])
|
|
1162
|
+
}, [f(r, { name: "redo" })], 40, rt),
|
|
1176
1163
|
n[43] ||= u("span", { class: "divider" }, null, -1),
|
|
1177
1164
|
k.value ? (b(), l("div", {
|
|
1178
1165
|
key: 0,
|
|
1179
1166
|
class: "toolbar-dropdown zoom-group",
|
|
1180
1167
|
ref_key: "zoomDropdownRef",
|
|
1181
|
-
ref:
|
|
1168
|
+
ref: L
|
|
1182
1169
|
}, [
|
|
1183
1170
|
u("button", {
|
|
1184
1171
|
class: "size-btn",
|
|
1185
1172
|
onMousedown: n[0] ||= F((e) => t.$emit("zoom-out"), ["prevent"]),
|
|
1186
1173
|
disabled: x.value,
|
|
1187
1174
|
title: O(h)("zoom.zoomOut")
|
|
1188
|
-
}, " − ", 40,
|
|
1175
|
+
}, " − ", 40, it),
|
|
1189
1176
|
u("button", {
|
|
1190
1177
|
class: "toolbar-dropdown__trigger zoom-trigger",
|
|
1191
1178
|
onMousedown: n[1] ||= F((e) => O(U)("zoom"), ["prevent"]),
|
|
1192
|
-
"aria-expanded": O(
|
|
1179
|
+
"aria-expanded": O(z) === "zoom",
|
|
1193
1180
|
"aria-haspopup": "listbox",
|
|
1194
1181
|
title: O(h)("zoom.zoomLevel")
|
|
1195
1182
|
}, [d(E(y.value) + "% ", 1), f(r, {
|
|
1196
1183
|
class: "chevron",
|
|
1197
1184
|
name: "arrow_drop_down",
|
|
1198
1185
|
size: 16
|
|
1199
|
-
})], 40,
|
|
1186
|
+
})], 40, at),
|
|
1200
1187
|
u("button", {
|
|
1201
1188
|
class: "size-btn",
|
|
1202
1189
|
onMousedown: n[2] ||= F((e) => t.$emit("zoom-in"), ["prevent"]),
|
|
1203
1190
|
disabled: T.value,
|
|
1204
1191
|
title: O(h)("zoom.zoomIn")
|
|
1205
|
-
}, " + ", 40,
|
|
1206
|
-
O(
|
|
1192
|
+
}, " + ", 40, ot),
|
|
1193
|
+
O(z) === "zoom" ? (b(), l("div", {
|
|
1207
1194
|
key: 0,
|
|
1208
|
-
style: _(O(
|
|
1195
|
+
style: _(O(V)),
|
|
1209
1196
|
class: "toolbar-dropdown__menu zoom-menu"
|
|
1210
1197
|
}, [(b(!0), l(a, null, C(D.value, (e) => (b(), l("button", {
|
|
1211
1198
|
key: e,
|
|
1212
1199
|
class: g(["toolbar-dropdown__item", { active: y.value === Math.round(e * 100) }]),
|
|
1213
1200
|
onMousedown: F((n) => t.$emit("zoom-set", e), ["prevent"])
|
|
1214
|
-
}, E(Math.round(e * 100)) + "% ", 43,
|
|
1201
|
+
}, E(Math.round(e * 100)) + "% ", 43, st))), 128))], 4)) : c("", !0)
|
|
1215
1202
|
], 512)) : c("", !0),
|
|
1216
1203
|
n[44] ||= u("span", { class: "divider" }, null, -1),
|
|
1217
1204
|
u("div", {
|
|
@@ -1221,22 +1208,22 @@ var $e = {
|
|
|
1221
1208
|
}, [u("button", {
|
|
1222
1209
|
class: "toolbar-dropdown__trigger style-trigger",
|
|
1223
1210
|
onMousedown: n[3] ||= F((e) => O(U)("style"), ["prevent"]),
|
|
1224
|
-
"aria-expanded": O(
|
|
1211
|
+
"aria-expanded": O(z) === "style",
|
|
1225
1212
|
"aria-haspopup": "listbox",
|
|
1226
1213
|
title: O(h)("styles.selectAriaLabel")
|
|
1227
|
-
}, [d(E(O(
|
|
1214
|
+
}, [d(E(O(ae)) + " ", 1), f(r, {
|
|
1228
1215
|
class: "chevron",
|
|
1229
1216
|
name: "arrow_drop_down",
|
|
1230
1217
|
size: 16
|
|
1231
|
-
})], 40,
|
|
1218
|
+
})], 40, ct), O(z) === "style" ? (b(), l("div", {
|
|
1232
1219
|
key: 0,
|
|
1233
|
-
style: _(O(
|
|
1220
|
+
style: _(O(V)),
|
|
1234
1221
|
class: "toolbar-dropdown__menu style-menu"
|
|
1235
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1222
|
+
}, [(b(!0), l(a, null, C(O(ie), (e) => (b(), l("button", {
|
|
1236
1223
|
key: e.id,
|
|
1237
1224
|
class: g(["toolbar-dropdown__item", { active: (G.value.paragraphFormatting.styleId || "Normal") === e.id }]),
|
|
1238
|
-
onMousedown: F((t) =>
|
|
1239
|
-
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42,
|
|
1225
|
+
onMousedown: F((t) => Pe(e.id), ["prevent"])
|
|
1226
|
+
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42, lt))), 128))], 4)) : c("", !0)], 512),
|
|
1240
1227
|
n[45] ||= u("span", { class: "divider" }, null, -1),
|
|
1241
1228
|
u("div", {
|
|
1242
1229
|
class: "toolbar-dropdown",
|
|
@@ -1245,23 +1232,23 @@ var $e = {
|
|
|
1245
1232
|
}, [u("button", {
|
|
1246
1233
|
class: "toolbar-dropdown__trigger font-trigger",
|
|
1247
1234
|
onMousedown: n[4] ||= F((e) => O(U)("font"), ["prevent"]),
|
|
1248
|
-
"aria-expanded": O(
|
|
1235
|
+
"aria-expanded": O(z) === "font",
|
|
1249
1236
|
"aria-haspopup": "listbox",
|
|
1250
1237
|
title: O(h)("font.selectAriaLabel")
|
|
1251
|
-
}, [d(E(
|
|
1238
|
+
}, [d(E(K.value) + " ", 1), f(r, {
|
|
1252
1239
|
class: "chevron",
|
|
1253
1240
|
name: "arrow_drop_down",
|
|
1254
1241
|
size: 16
|
|
1255
|
-
})], 40,
|
|
1242
|
+
})], 40, ut), O(z) === "font" ? (b(), l("div", {
|
|
1256
1243
|
key: 0,
|
|
1257
|
-
style: _(O(
|
|
1244
|
+
style: _(O(V)),
|
|
1258
1245
|
class: "toolbar-dropdown__menu font-menu"
|
|
1259
|
-
}, [(b(!0), l(a, null, C(
|
|
1246
|
+
}, [(b(!0), l(a, null, C(fe.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", dt, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
|
|
1260
1247
|
key: e.name,
|
|
1261
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1248
|
+
class: g(["toolbar-dropdown__item", { active: K.value === e.name }]),
|
|
1262
1249
|
style: _({ fontFamily: e.fontFamily }),
|
|
1263
|
-
onMousedown: F((t) =>
|
|
1264
|
-
}, E(e.name), 47,
|
|
1250
|
+
onMousedown: F((t) => he(e.name), ["prevent"])
|
|
1251
|
+
}, E(e.name), 47, ft))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
|
|
1265
1252
|
u("div", {
|
|
1266
1253
|
class: "toolbar-dropdown font-size-group",
|
|
1267
1254
|
ref_key: "sizeDropdownRef",
|
|
@@ -1269,95 +1256,95 @@ var $e = {
|
|
|
1269
1256
|
}, [
|
|
1270
1257
|
u("button", {
|
|
1271
1258
|
class: "size-btn",
|
|
1272
|
-
onMousedown: n[5] ||= F((...e) => O(
|
|
1259
|
+
onMousedown: n[5] ||= F((...e) => O(Te) && O(Te)(...e), ["prevent"]),
|
|
1273
1260
|
title: O(h)("decreaseFontSize")
|
|
1274
|
-
}, " − ", 40,
|
|
1261
|
+
}, " − ", 40, pt),
|
|
1275
1262
|
u("input", {
|
|
1276
1263
|
class: "size-trigger size-input",
|
|
1277
1264
|
type: "text",
|
|
1278
|
-
value:
|
|
1265
|
+
value: q.value,
|
|
1279
1266
|
title: O(h)("fontSize"),
|
|
1280
1267
|
onMousedown: n[6] ||= F(() => {}, ["stop"]),
|
|
1281
|
-
onFocus: n[7] ||= (...e) => O(
|
|
1282
|
-
"aria-expanded": O(
|
|
1268
|
+
onFocus: n[7] ||= (...e) => O(ve) && O(ve)(...e),
|
|
1269
|
+
"aria-expanded": O(z) === "size",
|
|
1283
1270
|
"aria-haspopup": "listbox",
|
|
1284
|
-
onInput: n[8] ||= (...e) => O(
|
|
1271
|
+
onInput: n[8] ||= (...e) => O(xe) && O(xe)(...e),
|
|
1285
1272
|
onKeydown: [
|
|
1286
|
-
n[9] ||= P(F((e) => O(
|
|
1287
|
-
n[10] ||= P(F((e) => O(
|
|
1288
|
-
n[11] ||= P(F((e) => O(
|
|
1273
|
+
n[9] ||= P(F((e) => O(we)(), ["prevent", "stop"]), ["up"]),
|
|
1274
|
+
n[10] ||= P(F((e) => O(Te)(), ["prevent", "stop"]), ["down"]),
|
|
1275
|
+
n[11] ||= P(F((e) => O(Se)(e), ["prevent"]), ["enter"])
|
|
1289
1276
|
],
|
|
1290
|
-
onBlur: n[12] ||= (e) => O(
|
|
1291
|
-
}, null, 40,
|
|
1277
|
+
onBlur: n[12] ||= (e) => O(Se)(e)
|
|
1278
|
+
}, null, 40, mt),
|
|
1292
1279
|
u("button", {
|
|
1293
1280
|
class: "size-btn",
|
|
1294
|
-
onMousedown: n[13] ||= F((...e) => O(
|
|
1281
|
+
onMousedown: n[13] ||= F((...e) => O(we) && O(we)(...e), ["prevent"]),
|
|
1295
1282
|
title: O(h)("increaseFontSize")
|
|
1296
|
-
}, " + ", 40,
|
|
1297
|
-
O(
|
|
1283
|
+
}, " + ", 40, ht),
|
|
1284
|
+
O(z) === "size" ? (b(), l("div", {
|
|
1298
1285
|
key: 0,
|
|
1299
|
-
style: _(O(
|
|
1286
|
+
style: _(O(V)),
|
|
1300
1287
|
class: "toolbar-dropdown__menu size-menu"
|
|
1301
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1288
|
+
}, [(b(!0), l(a, null, C(O(_e), (e) => (b(), l("button", {
|
|
1302
1289
|
key: e,
|
|
1303
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1304
|
-
onMousedown: F((t) => O(
|
|
1305
|
-
}, E(e), 43,
|
|
1290
|
+
class: g(["toolbar-dropdown__item", { active: q.value === e }]),
|
|
1291
|
+
onMousedown: F((t) => O(Ce)(e), ["prevent"])
|
|
1292
|
+
}, E(e), 43, gt))), 128))], 4)) : c("", !0)
|
|
1306
1293
|
], 512),
|
|
1307
1294
|
n[46] ||= u("span", { class: "divider" }, null, -1),
|
|
1308
1295
|
u("button", {
|
|
1309
1296
|
title: O(h)("boldShortcut"),
|
|
1310
1297
|
"aria-label": O(h)("bold"),
|
|
1311
1298
|
class: g({ active: G.value.textFormatting.bold }),
|
|
1312
|
-
onMousedown: n[14] ||= F((e) =>
|
|
1313
|
-
}, [f(r, { name: "format_bold" })], 42,
|
|
1299
|
+
onMousedown: n[14] ||= F((e) => Z("toggleBold"), ["prevent"])
|
|
1300
|
+
}, [f(r, { name: "format_bold" })], 42, _t),
|
|
1314
1301
|
u("button", {
|
|
1315
1302
|
title: O(h)("italicShortcut"),
|
|
1316
1303
|
"aria-label": O(h)("italic"),
|
|
1317
1304
|
class: g({ active: G.value.textFormatting.italic }),
|
|
1318
|
-
onMousedown: n[15] ||= F((e) =>
|
|
1319
|
-
}, [f(r, { name: "format_italic" })], 42,
|
|
1305
|
+
onMousedown: n[15] ||= F((e) => Z("toggleItalic"), ["prevent"])
|
|
1306
|
+
}, [f(r, { name: "format_italic" })], 42, vt),
|
|
1320
1307
|
u("button", {
|
|
1321
1308
|
title: O(h)("underlineShortcut"),
|
|
1322
1309
|
"aria-label": O(h)("underline"),
|
|
1323
1310
|
class: g({ active: !!G.value.textFormatting.underline }),
|
|
1324
|
-
onMousedown: n[16] ||= F((e) =>
|
|
1325
|
-
}, [f(r, { name: "format_underlined" })], 42,
|
|
1311
|
+
onMousedown: n[16] ||= F((e) => Z("toggleUnderline"), ["prevent"])
|
|
1312
|
+
}, [f(r, { name: "format_underlined" })], 42, yt),
|
|
1326
1313
|
u("button", {
|
|
1327
1314
|
title: O(h)("formattingBar.strikethrough"),
|
|
1328
1315
|
"aria-label": O(h)("formattingBar.strikethrough"),
|
|
1329
1316
|
class: g({ active: G.value.textFormatting.strike }),
|
|
1330
|
-
onMousedown: n[17] ||= F((e) =>
|
|
1331
|
-
}, [f(r, { name: "strikethrough_s" })], 42,
|
|
1317
|
+
onMousedown: n[17] ||= F((e) => Z("toggleStrike"), ["prevent"])
|
|
1318
|
+
}, [f(r, { name: "strikethrough_s" })], 42, bt),
|
|
1332
1319
|
f(O(p), {
|
|
1333
1320
|
mode: "text",
|
|
1334
|
-
value:
|
|
1321
|
+
value: le.value,
|
|
1335
1322
|
theme: e.theme ?? null,
|
|
1336
|
-
onChange:
|
|
1323
|
+
onChange: Ee
|
|
1337
1324
|
}, null, 8, ["value", "theme"]),
|
|
1338
1325
|
f(O(p), {
|
|
1339
1326
|
mode: "highlight",
|
|
1340
|
-
value:
|
|
1327
|
+
value: ue.value,
|
|
1341
1328
|
theme: e.theme ?? null,
|
|
1342
|
-
onChange:
|
|
1329
|
+
onChange: Ne
|
|
1343
1330
|
}, null, 8, ["value", "theme"]),
|
|
1344
1331
|
u("button", {
|
|
1345
1332
|
title: O(h)("formattingBar.insertLinkShortcut"),
|
|
1346
1333
|
"aria-label": O(h)("formattingBar.insertLink"),
|
|
1347
1334
|
onMousedown: n[18] ||= F((e) => t.$emit("insert-link"), ["prevent"])
|
|
1348
|
-
}, [f(r, { name: "link" })], 40,
|
|
1335
|
+
}, [f(r, { name: "link" })], 40, xt),
|
|
1349
1336
|
u("button", {
|
|
1350
1337
|
title: O(h)("formattingBar.superscriptShortcut"),
|
|
1351
1338
|
"aria-label": O(h)("formattingBar.superscript"),
|
|
1352
1339
|
class: g({ active: G.value.textFormatting.vertAlign === "superscript" }),
|
|
1353
|
-
onMousedown: n[19] ||= F((e) =>
|
|
1354
|
-
}, [f(r, { name: "superscript" })], 42,
|
|
1340
|
+
onMousedown: n[19] ||= F((e) => Z("toggleSuperscript"), ["prevent"])
|
|
1341
|
+
}, [f(r, { name: "superscript" })], 42, St),
|
|
1355
1342
|
u("button", {
|
|
1356
1343
|
title: O(h)("formattingBar.subscriptShortcut"),
|
|
1357
1344
|
"aria-label": O(h)("formattingBar.subscript"),
|
|
1358
1345
|
class: g({ active: G.value.textFormatting.vertAlign === "subscript" }),
|
|
1359
|
-
onMousedown: n[20] ||= F((e) =>
|
|
1360
|
-
}, [f(r, { name: "subscript" })], 42,
|
|
1346
|
+
onMousedown: n[20] ||= F((e) => Z("toggleSubscript"), ["prevent"])
|
|
1347
|
+
}, [f(r, { name: "subscript" })], 42, Ct),
|
|
1361
1348
|
n[47] ||= u("span", { class: "divider" }, null, -1),
|
|
1362
1349
|
u("div", {
|
|
1363
1350
|
class: "toolbar-dropdown",
|
|
@@ -1366,110 +1353,110 @@ var $e = {
|
|
|
1366
1353
|
}, [u("button", {
|
|
1367
1354
|
class: "toolbar-dropdown__trigger align-trigger",
|
|
1368
1355
|
onMousedown: n[21] ||= F((e) => O(U)("align"), ["prevent"]),
|
|
1369
|
-
"aria-expanded": O(
|
|
1356
|
+
"aria-expanded": O(z) === "align",
|
|
1370
1357
|
"aria-haspopup": "listbox",
|
|
1371
1358
|
title: O(h)("alignmentGroup")
|
|
1372
|
-
}, [f(r, { name:
|
|
1359
|
+
}, [f(r, { name: Y.value }, null, 8, ["name"]), f(r, {
|
|
1373
1360
|
class: "chevron",
|
|
1374
1361
|
name: "arrow_drop_down",
|
|
1375
1362
|
size: 16
|
|
1376
|
-
})], 40,
|
|
1363
|
+
})], 40, wt), O(z) === "align" ? (b(), l("div", {
|
|
1377
1364
|
key: 0,
|
|
1378
|
-
style: _(O(
|
|
1365
|
+
style: _(O(V)),
|
|
1379
1366
|
class: "toolbar-dropdown__menu align-strip"
|
|
1380
1367
|
}, [
|
|
1381
1368
|
u("button", {
|
|
1382
|
-
class: g(["align-strip__btn", { active:
|
|
1369
|
+
class: g(["align-strip__btn", { active: J.value === "left" }]),
|
|
1383
1370
|
title: `${O(h)("alignLeft")} (${O(h)("alignment.alignLeftShortcut")})`,
|
|
1384
1371
|
onMousedown: n[22] ||= F((e) => {
|
|
1385
|
-
|
|
1372
|
+
Z("alignLeft"), z.value = null;
|
|
1386
1373
|
}, ["prevent"])
|
|
1387
1374
|
}, [f(r, {
|
|
1388
1375
|
name: "format_align_left",
|
|
1389
1376
|
size: 18
|
|
1390
|
-
})], 42,
|
|
1377
|
+
})], 42, Tt),
|
|
1391
1378
|
u("button", {
|
|
1392
|
-
class: g(["align-strip__btn", { active:
|
|
1379
|
+
class: g(["align-strip__btn", { active: J.value === "center" }]),
|
|
1393
1380
|
title: `${O(h)("alignCenter")} (${O(h)("alignment.centerShortcut")})`,
|
|
1394
1381
|
onMousedown: n[23] ||= F((e) => {
|
|
1395
|
-
|
|
1382
|
+
Z("alignCenter"), z.value = null;
|
|
1396
1383
|
}, ["prevent"])
|
|
1397
1384
|
}, [f(r, {
|
|
1398
1385
|
name: "format_align_center",
|
|
1399
1386
|
size: 18
|
|
1400
|
-
})], 42,
|
|
1387
|
+
})], 42, Et),
|
|
1401
1388
|
u("button", {
|
|
1402
|
-
class: g(["align-strip__btn", { active:
|
|
1389
|
+
class: g(["align-strip__btn", { active: J.value === "right" }]),
|
|
1403
1390
|
title: `${O(h)("alignRight")} (${O(h)("alignment.alignRightShortcut")})`,
|
|
1404
1391
|
onMousedown: n[24] ||= F((e) => {
|
|
1405
|
-
|
|
1392
|
+
Z("alignRight"), z.value = null;
|
|
1406
1393
|
}, ["prevent"])
|
|
1407
1394
|
}, [f(r, {
|
|
1408
1395
|
name: "format_align_right",
|
|
1409
1396
|
size: 18
|
|
1410
|
-
})], 42,
|
|
1397
|
+
})], 42, Dt),
|
|
1411
1398
|
u("button", {
|
|
1412
|
-
class: g(["align-strip__btn", { active:
|
|
1399
|
+
class: g(["align-strip__btn", { active: J.value === "both" }]),
|
|
1413
1400
|
title: `${O(h)("justify")} (${O(h)("alignment.justifyShortcut")})`,
|
|
1414
1401
|
onMousedown: n[25] ||= F((e) => {
|
|
1415
|
-
|
|
1402
|
+
Z("alignJustify"), z.value = null;
|
|
1416
1403
|
}, ["prevent"])
|
|
1417
1404
|
}, [f(r, {
|
|
1418
1405
|
name: "format_align_justify",
|
|
1419
1406
|
size: 18
|
|
1420
|
-
})], 42,
|
|
1407
|
+
})], 42, Ot)
|
|
1421
1408
|
], 4)) : c("", !0)], 512),
|
|
1422
1409
|
u("button", {
|
|
1423
1410
|
title: O(h)("bulletList"),
|
|
1424
1411
|
"aria-label": O(h)("bulletList"),
|
|
1425
1412
|
class: g({ active: G.value.listState.type === "bullet" }),
|
|
1426
|
-
onMousedown: n[26] ||= F((e) =>
|
|
1427
|
-
}, [f(r, { name: "format_list_bulleted" })], 42,
|
|
1413
|
+
onMousedown: n[26] ||= F((e) => Z("toggleBulletList"), ["prevent"])
|
|
1414
|
+
}, [f(r, { name: "format_list_bulleted" })], 42, kt),
|
|
1428
1415
|
u("button", {
|
|
1429
1416
|
title: O(h)("numberedList"),
|
|
1430
1417
|
"aria-label": O(h)("numberedList"),
|
|
1431
1418
|
class: g({ active: G.value.listState.type === "numbered" }),
|
|
1432
|
-
onMousedown: n[27] ||= F((e) =>
|
|
1433
|
-
}, [f(r, { name: "format_list_numbered" })], 42,
|
|
1419
|
+
onMousedown: n[27] ||= F((e) => Z("toggleNumberedList"), ["prevent"])
|
|
1420
|
+
}, [f(r, { name: "format_list_numbered" })], 42, At),
|
|
1434
1421
|
u("button", {
|
|
1435
1422
|
title: O(h)("decreaseIndent"),
|
|
1436
1423
|
"aria-label": O(h)("decreaseIndent"),
|
|
1437
|
-
disabled: !
|
|
1438
|
-
onMousedown: n[28] ||= F((e) =>
|
|
1439
|
-
}, [f(r, { name: "format_indent_decrease" })], 40,
|
|
1424
|
+
disabled: !ce.value,
|
|
1425
|
+
onMousedown: n[28] ||= F((e) => Z("outdent"), ["prevent"])
|
|
1426
|
+
}, [f(r, { name: "format_indent_decrease" })], 40, jt),
|
|
1440
1427
|
u("button", {
|
|
1441
1428
|
title: O(h)("increaseIndent"),
|
|
1442
1429
|
"aria-label": O(h)("increaseIndent"),
|
|
1443
|
-
onMousedown: n[29] ||= F((e) =>
|
|
1444
|
-
}, [f(r, { name: "format_indent_increase" })], 40,
|
|
1430
|
+
onMousedown: n[29] ||= F((e) => Z("indent"), ["prevent"])
|
|
1431
|
+
}, [f(r, { name: "format_indent_increase" })], 40, Mt),
|
|
1445
1432
|
u("div", {
|
|
1446
1433
|
class: "toolbar-dropdown",
|
|
1447
1434
|
ref_key: "spacingDropdownRef",
|
|
1448
|
-
ref:
|
|
1435
|
+
ref: I
|
|
1449
1436
|
}, [u("button", {
|
|
1450
1437
|
class: "toolbar-dropdown__trigger",
|
|
1451
1438
|
onMousedown: n[30] ||= F((e) => O(U)("spacing"), ["prevent"]),
|
|
1452
|
-
"aria-expanded": O(
|
|
1439
|
+
"aria-expanded": O(z) === "spacing",
|
|
1453
1440
|
"aria-haspopup": "listbox",
|
|
1454
1441
|
title: O(h)("lineSpacing.label")
|
|
1455
1442
|
}, [f(r, { name: "format_line_spacing" }), f(r, {
|
|
1456
1443
|
class: "chevron",
|
|
1457
1444
|
name: "arrow_drop_down",
|
|
1458
1445
|
size: 16
|
|
1459
|
-
})], 40,
|
|
1446
|
+
})], 40, Nt), O(z) === "spacing" ? (b(), l("div", {
|
|
1460
1447
|
key: 0,
|
|
1461
|
-
style: _(O(
|
|
1448
|
+
style: _(O(V)),
|
|
1462
1449
|
class: "toolbar-dropdown__menu"
|
|
1463
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1450
|
+
}, [(b(!0), l(a, null, C(O(ye), (e) => (b(), l("button", {
|
|
1464
1451
|
key: e.value,
|
|
1465
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1466
|
-
onMousedown: F((t) =>
|
|
1467
|
-
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43,
|
|
1452
|
+
class: g(["toolbar-dropdown__item", { active: Ie(e.value) }]),
|
|
1453
|
+
onMousedown: F((t) => Fe(e.value), ["prevent"])
|
|
1454
|
+
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43, Pt))), 128))], 4)) : c("", !0)], 512),
|
|
1468
1455
|
u("button", {
|
|
1469
1456
|
title: O(h)("formattingBar.clearFormatting"),
|
|
1470
1457
|
"aria-label": O(h)("formattingBar.clearFormatting"),
|
|
1471
|
-
onMousedown: F(
|
|
1472
|
-
}, [f(r, { name: "format_clear" })], 40,
|
|
1458
|
+
onMousedown: F(je, ["prevent"])
|
|
1459
|
+
}, [f(r, { name: "format_clear" })], 40, Ft),
|
|
1473
1460
|
n[48] ||= u("span", { class: "divider" }, null, -1),
|
|
1474
1461
|
e.outlineDrawer ? (b(), l("button", {
|
|
1475
1462
|
key: 1,
|
|
@@ -1481,7 +1468,7 @@ var $e = {
|
|
|
1481
1468
|
class: g({ active: e.outlineDrawerOpen }),
|
|
1482
1469
|
onMousedown: n[31] ||= F(() => {}, ["prevent"]),
|
|
1483
1470
|
onClick: n[32] ||= (e) => t.$emit("toggle-outline")
|
|
1484
|
-
}, [f(r, { name: "format_list_bulleted" })], 42,
|
|
1471
|
+
}, [f(r, { name: "format_list_bulleted" })], 42, It)) : c("", !0),
|
|
1485
1472
|
u("button", {
|
|
1486
1473
|
type: "button",
|
|
1487
1474
|
"data-testid": "toolbar-comments-toggle",
|
|
@@ -1491,22 +1478,22 @@ var $e = {
|
|
|
1491
1478
|
class: g({ active: e.commentsSidebarOpen }),
|
|
1492
1479
|
onMousedown: n[33] ||= F(() => {}, ["prevent"]),
|
|
1493
1480
|
onClick: n[34] ||= (e) => t.$emit("toggle-sidebar")
|
|
1494
|
-
}, [f(r, { name: "comment" }), e.commentCount > 0 ? (b(), l("span",
|
|
1481
|
+
}, [f(r, { name: "comment" }), e.commentCount > 0 ? (b(), l("span", Rt, E(e.commentCount > 99 ? "99+" : e.commentCount), 1)) : c("", !0)], 42, Lt),
|
|
1495
1482
|
e.imageContext ? (b(), l(a, { key: 2 }, [
|
|
1496
1483
|
n[41] ||= u("span", { class: "divider" }, null, -1),
|
|
1497
|
-
f(
|
|
1484
|
+
f(et, {
|
|
1498
1485
|
"image-context": e.imageContext,
|
|
1499
1486
|
onChange: n[35] ||= (e) => t.$emit("image-wrap-type", e)
|
|
1500
1487
|
}, null, 8, ["image-context"]),
|
|
1501
|
-
f(
|
|
1488
|
+
f($e, { onTransform: n[36] ||= (e) => t.$emit("image-transform", e) }),
|
|
1502
1489
|
u("button", {
|
|
1503
1490
|
title: O(h)("formattingBar.imagePropertiesShortcut"),
|
|
1504
1491
|
"aria-label": O(h)("formattingBar.imageProperties"),
|
|
1505
1492
|
onMousedown: n[37] ||= F((e) => t.$emit("image-properties"), ["prevent"])
|
|
1506
|
-
}, [f(r, { name: "tune" })], 40,
|
|
1493
|
+
}, [f(r, { name: "tune" })], 40, zt)
|
|
1507
1494
|
], 64)) : c("", !0),
|
|
1508
1495
|
w(t.$slots, "table-context", {}, void 0, !0),
|
|
1509
|
-
e.showReviewControls ? (b(), l(a, { key: 3 }, [n[42] ||= u("span", { class: "divider" }, null, -1), f(
|
|
1496
|
+
e.showReviewControls ? (b(), l(a, { key: 3 }, [n[42] ||= u("span", { class: "divider" }, null, -1), f(Je, {
|
|
1510
1497
|
"track-changes-on": e.trackChangesOn,
|
|
1511
1498
|
"display-mode": e.displayMode,
|
|
1512
1499
|
"read-only": e.readOnly,
|
|
@@ -1518,7 +1505,7 @@ var $e = {
|
|
|
1518
1505
|
"read-only"
|
|
1519
1506
|
])], 64)) : c("", !0),
|
|
1520
1507
|
n[49] ||= u("span", { class: "divider" }, null, -1),
|
|
1521
|
-
e.editorMode ? (b(), s(
|
|
1508
|
+
e.editorMode ? (b(), s(Be, {
|
|
1522
1509
|
key: 4,
|
|
1523
1510
|
"model-value": e.editorMode,
|
|
1524
1511
|
"onUpdate:modelValue": n[40] ||= (e) => t.$emit("mode-change", e)
|
|
@@ -1526,7 +1513,7 @@ var $e = {
|
|
|
1526
1513
|
w(t.$slots, "toolbar-extra", {}, void 0, !0)
|
|
1527
1514
|
])) : c("", !0);
|
|
1528
1515
|
}
|
|
1529
|
-
}), [["__scopeId", "data-v-
|
|
1516
|
+
}), [["__scopeId", "data-v-fe97ba0f"]]), Vt = ["aria-valuemax"], Ht = { class: "docx-horizontal-ruler__ticks" }, Ut = ["title", "onDblclick"], Wt = 12240, Gt = 1440, Kt = 1440, qt = 567, Jt = "var(--doc-primary)", Yt = "var(--doc-primary)", Xt = "var(--doc-primary-hover)", Q = 5, Zt = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
1530
1517
|
__name: "HorizontalRuler",
|
|
1531
1518
|
props: {
|
|
1532
1519
|
sectionProps: {},
|
|
@@ -1558,14 +1545,14 @@ var $e = {
|
|
|
1558
1545
|
"tab-stop-remove"
|
|
1559
1546
|
],
|
|
1560
1547
|
setup(e, { emit: t }) {
|
|
1561
|
-
let n = e, r = t, i = Math.round(
|
|
1548
|
+
let n = e, r = t, i = Math.round(Q * 1.6), s = S(null), d = S(null), f = S(null), p = S(0), m = S("");
|
|
1562
1549
|
function h(e) {
|
|
1563
|
-
return
|
|
1550
|
+
return J(e) * n.zoom;
|
|
1564
1551
|
}
|
|
1565
1552
|
function g(e) {
|
|
1566
|
-
return Math.round(
|
|
1553
|
+
return Math.round(q(e / n.zoom));
|
|
1567
1554
|
}
|
|
1568
|
-
let y = o(() => n.sectionProps?.pageWidth ??
|
|
1555
|
+
let y = o(() => n.sectionProps?.pageWidth ?? Wt), x = o(() => n.sectionProps?.marginLeft ?? Gt), w = o(() => n.sectionProps?.marginRight ?? Gt), 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), ee = o(() => ({
|
|
1569
1556
|
position: "relative",
|
|
1570
1557
|
width: D.value + "px",
|
|
1571
1558
|
height: "22px",
|
|
@@ -1573,7 +1560,7 @@ var $e = {
|
|
|
1573
1560
|
overflow: "visible",
|
|
1574
1561
|
userSelect: "none",
|
|
1575
1562
|
cursor: d.value ? "ew-resize" : "default"
|
|
1576
|
-
})),
|
|
1563
|
+
})), R = o(() => ({
|
|
1577
1564
|
position: "absolute",
|
|
1578
1565
|
top: 0,
|
|
1579
1566
|
left: 0,
|
|
@@ -1583,7 +1570,7 @@ var $e = {
|
|
|
1583
1570
|
borderRight: "1px solid var(--doc-shadow-subtle)",
|
|
1584
1571
|
cursor: n.editable ? "ew-resize" : "default",
|
|
1585
1572
|
zIndex: 1
|
|
1586
|
-
})),
|
|
1573
|
+
})), z = o(() => ({
|
|
1587
1574
|
position: "absolute",
|
|
1588
1575
|
top: 0,
|
|
1589
1576
|
right: 0,
|
|
@@ -1593,10 +1580,10 @@ var $e = {
|
|
|
1593
1580
|
borderLeft: "1px solid var(--doc-shadow-subtle)",
|
|
1594
1581
|
cursor: n.editable ? "ew-resize" : "default",
|
|
1595
1582
|
zIndex: 1
|
|
1596
|
-
})),
|
|
1583
|
+
})), B = o(() => {
|
|
1597
1584
|
let e = [];
|
|
1598
1585
|
if (n.unit === "inch") {
|
|
1599
|
-
let t =
|
|
1586
|
+
let t = Kt / 8, n = Math.ceil(y.value / t);
|
|
1600
1587
|
for (let r = 0; r <= n; r++) {
|
|
1601
1588
|
let n = r * t;
|
|
1602
1589
|
if (n > y.value) break;
|
|
@@ -1617,7 +1604,7 @@ var $e = {
|
|
|
1617
1604
|
});
|
|
1618
1605
|
}
|
|
1619
1606
|
} else {
|
|
1620
|
-
let t =
|
|
1607
|
+
let t = qt / 10, n = Math.ceil(y.value / t);
|
|
1621
1608
|
for (let r = 0; r <= n; r++) {
|
|
1622
1609
|
let n = r * t;
|
|
1623
1610
|
if (n > y.value) break;
|
|
@@ -1636,24 +1623,24 @@ var $e = {
|
|
|
1636
1623
|
}
|
|
1637
1624
|
}
|
|
1638
1625
|
return e;
|
|
1639
|
-
}),
|
|
1626
|
+
}), te = o(() => n.tabStops?.length ? n.tabStops.map((e) => {
|
|
1640
1627
|
let t = e.position;
|
|
1641
1628
|
return {
|
|
1642
1629
|
px: h(t),
|
|
1643
1630
|
twips: t,
|
|
1644
|
-
label:
|
|
1631
|
+
label: ne(t)
|
|
1645
1632
|
};
|
|
1646
1633
|
}) : []);
|
|
1647
|
-
function
|
|
1648
|
-
return n.unit === "cm" ? (e /
|
|
1634
|
+
function ne(e) {
|
|
1635
|
+
return n.unit === "cm" ? (e / qt).toFixed(1) + " cm" : (e / Kt).toFixed(2) + "\"";
|
|
1649
1636
|
}
|
|
1650
|
-
function
|
|
1651
|
-
return d.value === e ?
|
|
1637
|
+
function V(e) {
|
|
1638
|
+
return d.value === e ? Xt : f.value === e ? Yt : Jt;
|
|
1652
1639
|
}
|
|
1653
|
-
function
|
|
1640
|
+
function re(e, t, r) {
|
|
1654
1641
|
return {
|
|
1655
1642
|
position: "absolute",
|
|
1656
|
-
left: t -
|
|
1643
|
+
left: t - Q + "px",
|
|
1657
1644
|
width: "10px",
|
|
1658
1645
|
height: "10px",
|
|
1659
1646
|
cursor: n.editable ? "ew-resize" : "default",
|
|
@@ -1661,15 +1648,15 @@ var $e = {
|
|
|
1661
1648
|
...e === "down" ? { top: 0 } : { bottom: 0 }
|
|
1662
1649
|
};
|
|
1663
1650
|
}
|
|
1664
|
-
function
|
|
1651
|
+
function H(e, t) {
|
|
1665
1652
|
return e === "down" ? {
|
|
1666
1653
|
position: "absolute",
|
|
1667
1654
|
top: "1px",
|
|
1668
1655
|
left: 0,
|
|
1669
1656
|
width: 0,
|
|
1670
1657
|
height: 0,
|
|
1671
|
-
borderLeft: `${
|
|
1672
|
-
borderRight: `${
|
|
1658
|
+
borderLeft: `${Q}px solid transparent`,
|
|
1659
|
+
borderRight: `${Q}px solid transparent`,
|
|
1673
1660
|
borderTop: `${i}px solid ${t}`,
|
|
1674
1661
|
transition: "border-top-color 0.1s"
|
|
1675
1662
|
} : {
|
|
@@ -1678,29 +1665,29 @@ var $e = {
|
|
|
1678
1665
|
left: 0,
|
|
1679
1666
|
width: 0,
|
|
1680
1667
|
height: 0,
|
|
1681
|
-
borderLeft: `${
|
|
1682
|
-
borderRight: `${
|
|
1668
|
+
borderLeft: `${Q}px solid transparent`,
|
|
1669
|
+
borderRight: `${Q}px solid transparent`,
|
|
1683
1670
|
borderBottom: `${i}px solid ${t}`,
|
|
1684
1671
|
transition: "border-bottom-color 0.1s"
|
|
1685
1672
|
};
|
|
1686
1673
|
}
|
|
1687
|
-
let
|
|
1688
|
-
function
|
|
1689
|
-
n.editable && (d.value = e, e === "leftMargin" ?
|
|
1674
|
+
let U = 0;
|
|
1675
|
+
function W(e, t) {
|
|
1676
|
+
n.editable && (d.value = e, e === "leftMargin" ? U = x.value : e === "rightMargin" ? U = w.value : e === "leftIndent" ? U = n.indentLeft : e === "rightIndent" ? U = n.indentRight : e === "firstLineIndent" && (U = n.firstLineIndent), p.value = t.clientX - (s.value?.getBoundingClientRect().left ?? 0), m.value = ne(U), document.addEventListener("mousemove", G), document.addEventListener("mouseup", K));
|
|
1690
1677
|
}
|
|
1691
|
-
function
|
|
1678
|
+
function G(e) {
|
|
1692
1679
|
if (!d.value || !s.value) return;
|
|
1693
1680
|
let t = s.value.getBoundingClientRect();
|
|
1694
1681
|
if (!t) return;
|
|
1695
1682
|
let n = e.clientX - t.left;
|
|
1696
1683
|
p.value = n;
|
|
1697
|
-
let r = g(n), i =
|
|
1698
|
-
m.value =
|
|
1684
|
+
let r = g(n), i = Y(d.value, r);
|
|
1685
|
+
m.value = ne(i), ie(d.value, i);
|
|
1699
1686
|
}
|
|
1700
|
-
function
|
|
1701
|
-
d.value = null, document.removeEventListener("mousemove",
|
|
1687
|
+
function K(e) {
|
|
1688
|
+
d.value = null, document.removeEventListener("mousemove", G), document.removeEventListener("mouseup", K);
|
|
1702
1689
|
}
|
|
1703
|
-
function
|
|
1690
|
+
function Y(e, t) {
|
|
1704
1691
|
if (e === "leftMargin") {
|
|
1705
1692
|
let e = y.value - w.value - 720;
|
|
1706
1693
|
return Math.round(Math.max(0, Math.min(t, e)));
|
|
@@ -1720,7 +1707,7 @@ var $e = {
|
|
|
1720
1707
|
let r = y.value - w.value - t, i = T.value - n.indentLeft - 720;
|
|
1721
1708
|
return Math.round(Math.max(0, Math.min(r, i)));
|
|
1722
1709
|
}
|
|
1723
|
-
function
|
|
1710
|
+
function ie(e, t) {
|
|
1724
1711
|
switch (e) {
|
|
1725
1712
|
case "leftMargin":
|
|
1726
1713
|
r("left-margin-change", t);
|
|
@@ -1734,18 +1721,16 @@ var $e = {
|
|
|
1734
1721
|
case "leftIndent":
|
|
1735
1722
|
r("indent-left-change", t);
|
|
1736
1723
|
break;
|
|
1737
|
-
case "rightIndent":
|
|
1738
|
-
r("indent-right-change", t);
|
|
1739
|
-
break;
|
|
1724
|
+
case "rightIndent": r("indent-right-change", t);
|
|
1740
1725
|
}
|
|
1741
1726
|
}
|
|
1742
1727
|
return v(() => {
|
|
1743
|
-
document.removeEventListener("mousemove",
|
|
1728
|
+
document.removeEventListener("mousemove", G), document.removeEventListener("mouseup", K);
|
|
1744
1729
|
}), (t, n) => (b(), l("div", {
|
|
1745
1730
|
ref_key: "rulerRef",
|
|
1746
1731
|
ref: s,
|
|
1747
1732
|
class: "docx-horizontal-ruler",
|
|
1748
|
-
style: _(
|
|
1733
|
+
style: _(ee.value),
|
|
1749
1734
|
role: "slider",
|
|
1750
1735
|
"aria-label": "Horizontal ruler",
|
|
1751
1736
|
"aria-valuemin": 0,
|
|
@@ -1753,15 +1738,15 @@ var $e = {
|
|
|
1753
1738
|
}, [
|
|
1754
1739
|
u("div", {
|
|
1755
1740
|
class: "docx-horizontal-ruler__margin",
|
|
1756
|
-
style: _(
|
|
1757
|
-
onMousedown: n[0] ||= F((t) => e.editable ?
|
|
1741
|
+
style: _(R.value),
|
|
1742
|
+
onMousedown: n[0] ||= F((t) => e.editable ? W("leftMargin", t) : null, ["prevent", "stop"])
|
|
1758
1743
|
}, null, 36),
|
|
1759
1744
|
u("div", {
|
|
1760
1745
|
class: "docx-horizontal-ruler__margin",
|
|
1761
|
-
style: _(
|
|
1762
|
-
onMousedown: n[1] ||= F((t) => e.editable ?
|
|
1746
|
+
style: _(z.value),
|
|
1747
|
+
onMousedown: n[1] ||= F((t) => e.editable ? W("rightMargin", t) : null, ["prevent", "stop"])
|
|
1763
1748
|
}, null, 36),
|
|
1764
|
-
u("div",
|
|
1749
|
+
u("div", Ht, [(b(!0), l(a, null, C(B.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
|
|
1765
1750
|
class: "docx-horizontal-ruler__tick-line",
|
|
1766
1751
|
style: _({
|
|
1767
1752
|
left: e.position + "px",
|
|
@@ -1775,42 +1760,69 @@ var $e = {
|
|
|
1775
1760
|
e.showFirstLineIndent ? (b(), l("div", {
|
|
1776
1761
|
key: 0,
|
|
1777
1762
|
class: "docx-ruler-indent",
|
|
1778
|
-
style: _(
|
|
1779
|
-
onMousedown: n[2] ||= F((t) => e.editable ?
|
|
1763
|
+
style: _(re("down", L.value, d.value === "firstLineIndent")),
|
|
1764
|
+
onMousedown: n[2] ||= F((t) => e.editable ? W("firstLineIndent", t) : null, ["prevent", "stop"]),
|
|
1780
1765
|
onMouseenter: n[3] ||= (e) => f.value = "firstLineIndent",
|
|
1781
1766
|
onMouseleave: n[4] ||= (e) => f.value = null
|
|
1782
|
-
}, [u("div", { style: _(
|
|
1767
|
+
}, [u("div", { style: _(H("down", V("firstLineIndent"))) }, null, 4)], 36)) : c("", !0),
|
|
1783
1768
|
e.editable ? (b(), l("div", {
|
|
1784
1769
|
key: 1,
|
|
1785
1770
|
class: "docx-ruler-indent",
|
|
1786
|
-
style: _(
|
|
1787
|
-
onMousedown: n[5] ||= F((e) =>
|
|
1771
|
+
style: _(re("up", P.value, d.value === "leftIndent")),
|
|
1772
|
+
onMousedown: n[5] ||= F((e) => W("leftIndent", e), ["prevent", "stop"]),
|
|
1788
1773
|
onMouseenter: n[6] ||= (e) => f.value = "leftIndent",
|
|
1789
1774
|
onMouseleave: n[7] ||= (e) => f.value = null
|
|
1790
|
-
}, [u("div", { style: _(
|
|
1775
|
+
}, [u("div", { style: _(H("up", V("leftIndent"))) }, null, 4)], 36)) : c("", !0),
|
|
1791
1776
|
e.editable ? (b(), l("div", {
|
|
1792
1777
|
key: 2,
|
|
1793
1778
|
class: "docx-ruler-indent",
|
|
1794
|
-
style: _(
|
|
1795
|
-
onMousedown: n[8] ||= F((e) =>
|
|
1779
|
+
style: _(re("down", I.value, d.value === "rightIndent")),
|
|
1780
|
+
onMousedown: n[8] ||= F((e) => W("rightIndent", e), ["prevent", "stop"]),
|
|
1796
1781
|
onMouseenter: n[9] ||= (e) => f.value = "rightIndent",
|
|
1797
1782
|
onMouseleave: n[10] ||= (e) => f.value = null
|
|
1798
|
-
}, [u("div", { style: _(
|
|
1799
|
-
(b(!0), l(a, null, C(
|
|
1783
|
+
}, [u("div", { style: _(H("down", V("rightIndent"))) }, null, 4)], 36)) : c("", !0),
|
|
1784
|
+
(b(!0), l(a, null, C(te.value, (e, n) => (b(), l("div", {
|
|
1800
1785
|
key: n,
|
|
1801
1786
|
class: "docx-horizontal-ruler__tab",
|
|
1802
1787
|
style: _({ left: e.px + "px" }),
|
|
1803
1788
|
title: `${e.label}`,
|
|
1804
1789
|
onDblclick: F((n) => t.$emit("tab-stop-remove", e.twips), ["prevent"])
|
|
1805
|
-
}, " L ", 44,
|
|
1790
|
+
}, " L ", 44, Ut))), 128)),
|
|
1806
1791
|
d.value && m.value ? (b(), l("div", {
|
|
1807
1792
|
key: 3,
|
|
1808
1793
|
class: "docx-horizontal-ruler__tooltip",
|
|
1809
1794
|
style: _({ left: p.value + "px" })
|
|
1810
1795
|
}, E(m.value), 5)) : c("", !0)
|
|
1811
|
-
], 12,
|
|
1796
|
+
], 12, Vt));
|
|
1797
|
+
}
|
|
1798
|
+
}), [["__scopeId", "data-v-b25fde06"]]), Qt = /* @__PURE__ */ p({
|
|
1799
|
+
__name: "TableBorderColorPicker",
|
|
1800
|
+
props: {
|
|
1801
|
+
disabled: { type: Boolean },
|
|
1802
|
+
theme: {},
|
|
1803
|
+
value: {}
|
|
1804
|
+
},
|
|
1805
|
+
emits: ["change"],
|
|
1806
|
+
setup(e, { emit: r }) {
|
|
1807
|
+
let i = r, { t: a } = n();
|
|
1808
|
+
function o(e) {
|
|
1809
|
+
typeof e == "string" ? i("change", e.replace(/^#/, "")) : e.rgb ? i("change", e.rgb.replace(/^#/, "")) : e.auto && i("change", "000000");
|
|
1810
|
+
}
|
|
1811
|
+
return (n, r) => (b(), s(t, {
|
|
1812
|
+
mode: "border",
|
|
1813
|
+
value: e.value,
|
|
1814
|
+
theme: e.theme ?? null,
|
|
1815
|
+
disabled: e.disabled,
|
|
1816
|
+
title: O(a)("table.borderColor"),
|
|
1817
|
+
onChange: o
|
|
1818
|
+
}, null, 8, [
|
|
1819
|
+
"value",
|
|
1820
|
+
"theme",
|
|
1821
|
+
"disabled",
|
|
1822
|
+
"title"
|
|
1823
|
+
]));
|
|
1812
1824
|
}
|
|
1813
|
-
}),
|
|
1825
|
+
}), $t = ["disabled", "onClick"], en = { class: "docx-tbp__panel" }, tn = ["title", "onClick"], nn = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
1814
1826
|
__name: "TableBorderPicker",
|
|
1815
1827
|
props: { disabled: { type: Boolean } },
|
|
1816
1828
|
emits: ["change"],
|
|
@@ -1884,8 +1896,8 @@ var $e = {
|
|
|
1884
1896
|
}, [f(r, {
|
|
1885
1897
|
name: "border_all",
|
|
1886
1898
|
size: 20
|
|
1887
|
-
})], 8,
|
|
1888
|
-
panel: M(() => [u("div",
|
|
1899
|
+
})], 8, $t)]),
|
|
1900
|
+
panel: M(() => [u("div", en, [(b(), l(a, null, C(d, (e) => u("button", {
|
|
1889
1901
|
key: e.value,
|
|
1890
1902
|
type: "button",
|
|
1891
1903
|
class: "docx-tbp__option",
|
|
@@ -1894,38 +1906,11 @@ var $e = {
|
|
|
1894
1906
|
}, [f(r, {
|
|
1895
1907
|
name: e.icon,
|
|
1896
1908
|
size: 20
|
|
1897
|
-
}, null, 8, ["name"])], 8,
|
|
1909
|
+
}, null, 8, ["name"])], 8, tn)), 64))])]),
|
|
1898
1910
|
_: 1
|
|
1899
1911
|
}, 8, ["open"]));
|
|
1900
1912
|
}
|
|
1901
|
-
}), [["__scopeId", "data-v-
|
|
1902
|
-
__name: "TableBorderColorPicker",
|
|
1903
|
-
props: {
|
|
1904
|
-
disabled: { type: Boolean },
|
|
1905
|
-
theme: {},
|
|
1906
|
-
value: {}
|
|
1907
|
-
},
|
|
1908
|
-
emits: ["change"],
|
|
1909
|
-
setup(t, { emit: r }) {
|
|
1910
|
-
let i = r, { t: a } = n();
|
|
1911
|
-
function o(e) {
|
|
1912
|
-
typeof e == "string" ? i("change", e.replace(/^#/, "")) : e.rgb ? i("change", e.rgb.replace(/^#/, "")) : e.auto && i("change", "000000");
|
|
1913
|
-
}
|
|
1914
|
-
return (n, r) => (b(), s(e, {
|
|
1915
|
-
mode: "border",
|
|
1916
|
-
value: t.value,
|
|
1917
|
-
theme: t.theme ?? null,
|
|
1918
|
-
disabled: t.disabled,
|
|
1919
|
-
title: O(a)("table.borderColor"),
|
|
1920
|
-
onChange: o
|
|
1921
|
-
}, null, 8, [
|
|
1922
|
-
"value",
|
|
1923
|
-
"theme",
|
|
1924
|
-
"disabled",
|
|
1925
|
-
"title"
|
|
1926
|
-
]));
|
|
1927
|
-
}
|
|
1928
|
-
}), nn = ["disabled", "onClick"], rn = { class: "docx-tbwidth__panel" }, an = ["onClick"], on = { class: "docx-tbwidth__label" }, sn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
1913
|
+
}), [["__scopeId", "data-v-02e5b963"]]), rn = ["disabled", "onClick"], an = { class: "docx-tbwidth__panel" }, on = ["onClick"], sn = { class: "docx-tbwidth__label" }, cn = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
1929
1914
|
__name: "TableBorderWidthPicker",
|
|
1930
1915
|
props: { disabled: { type: Boolean } },
|
|
1931
1916
|
emits: ["change"],
|
|
@@ -1989,8 +1974,8 @@ var $e = {
|
|
|
1989
1974
|
}, [f(r, {
|
|
1990
1975
|
name: "line_weight",
|
|
1991
1976
|
size: 20
|
|
1992
|
-
})], 8,
|
|
1993
|
-
panel: M(() => [u("div",
|
|
1977
|
+
})], 8, rn)]),
|
|
1978
|
+
panel: M(() => [u("div", an, [(b(), l(a, null, C(d, (e) => u("button", {
|
|
1994
1979
|
key: e.eighths,
|
|
1995
1980
|
type: "button",
|
|
1996
1981
|
class: "docx-tbwidth__option",
|
|
@@ -1998,11 +1983,11 @@ var $e = {
|
|
|
1998
1983
|
}, [u("span", {
|
|
1999
1984
|
class: "docx-tbwidth__preview",
|
|
2000
1985
|
style: _({ borderTopWidth: e.previewPx + "px" })
|
|
2001
|
-
}, null, 4), u("span",
|
|
1986
|
+
}, null, 4), u("span", sn, E(e.label), 1)], 8, on)), 64))])]),
|
|
2002
1987
|
_: 1
|
|
2003
1988
|
}, 8, ["open"]));
|
|
2004
1989
|
}
|
|
2005
|
-
}), [["__scopeId", "data-v-
|
|
1990
|
+
}), [["__scopeId", "data-v-0aa73d09"]]), ln = /* @__PURE__ */ p({
|
|
2006
1991
|
__name: "TableCellFillPicker",
|
|
2007
1992
|
props: {
|
|
2008
1993
|
disabled: { type: Boolean },
|
|
@@ -2010,16 +1995,16 @@ var $e = {
|
|
|
2010
1995
|
value: {}
|
|
2011
1996
|
},
|
|
2012
1997
|
emits: ["change"],
|
|
2013
|
-
setup(
|
|
1998
|
+
setup(e, { emit: r }) {
|
|
2014
1999
|
let i = r, { t: a } = n();
|
|
2015
2000
|
function o(e) {
|
|
2016
2001
|
typeof e == "string" && i("change", e === "none" ? "" : e.replace(/^#/, ""));
|
|
2017
2002
|
}
|
|
2018
|
-
return (n, r) => (b(), s(
|
|
2003
|
+
return (n, r) => (b(), s(t, {
|
|
2019
2004
|
mode: "highlight",
|
|
2020
|
-
value:
|
|
2021
|
-
theme:
|
|
2022
|
-
disabled:
|
|
2005
|
+
value: e.value,
|
|
2006
|
+
theme: e.theme ?? null,
|
|
2007
|
+
disabled: e.disabled,
|
|
2023
2008
|
title: O(a)("table.cellFillColor"),
|
|
2024
2009
|
icon: "format_color_fill",
|
|
2025
2010
|
"auto-label": O(a)("colorPicker.noColor"),
|
|
@@ -2032,23 +2017,23 @@ var $e = {
|
|
|
2032
2017
|
"auto-label"
|
|
2033
2018
|
]));
|
|
2034
2019
|
}
|
|
2035
|
-
}),
|
|
2020
|
+
}), un = [
|
|
2036
2021
|
"disabled",
|
|
2037
2022
|
"title",
|
|
2038
2023
|
"onClick"
|
|
2039
|
-
],
|
|
2024
|
+
], dn = ["aria-label"], fn = ["disabled"], pn = ["disabled"], mn = ["disabled"], hn = ["disabled"], gn = { class: "docx-tmore__section-label" }, _n = { class: "docx-tmore__icon-row" }, vn = ["title"], yn = ["title"], bn = ["title"], xn = { class: "docx-tmore__section-label" }, Sn = { class: "docx-tmore__icon-row" }, Cn = ["title"], wn = ["title"], Tn = ["title"], En = { class: "docx-tmore__grow" }, Dn = {
|
|
2040
2025
|
key: 0,
|
|
2041
2026
|
class: "docx-tmore__sub"
|
|
2042
|
-
},
|
|
2027
|
+
}, On = { class: "docx-tmore__margin-grid" }, kn = { class: "docx-tmore__field-label" }, An = ["onUpdate:modelValue"], jn = { class: "docx-tmore__grow" }, Mn = {
|
|
2043
2028
|
key: 1,
|
|
2044
2029
|
class: "docx-tmore__sub"
|
|
2045
|
-
},
|
|
2030
|
+
}, Nn = { class: "docx-tmore__row-field" }, Pn = { class: "docx-tmore__field-label" }, Fn = { value: "auto" }, In = { value: "atLeast" }, Ln = { value: "exact" }, Rn = {
|
|
2046
2031
|
key: 0,
|
|
2047
2032
|
class: "docx-tmore__row-field"
|
|
2048
|
-
},
|
|
2033
|
+
}, zn = { class: "docx-tmore__field-label" }, Bn = { class: "docx-tmore__grow" }, Vn = {
|
|
2049
2034
|
key: 2,
|
|
2050
2035
|
class: "docx-tmore__sub docx-tmore__sub--list"
|
|
2051
|
-
},
|
|
2036
|
+
}, Hn = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
2052
2037
|
__name: "TableMoreDropdown",
|
|
2053
2038
|
props: {
|
|
2054
2039
|
disabled: {
|
|
@@ -2093,7 +2078,7 @@ var $e = {
|
|
|
2093
2078
|
let t = Number(e);
|
|
2094
2079
|
return Number.isFinite(t) && t > 0 ? t : 0;
|
|
2095
2080
|
};
|
|
2096
|
-
function
|
|
2081
|
+
function ee() {
|
|
2097
2082
|
p("cell-margins", {
|
|
2098
2083
|
top: L(w.top),
|
|
2099
2084
|
bottom: L(w.bottom),
|
|
@@ -2101,14 +2086,14 @@ var $e = {
|
|
|
2101
2086
|
right: L(w.right)
|
|
2102
2087
|
}), h.value = !1;
|
|
2103
2088
|
}
|
|
2104
|
-
function
|
|
2089
|
+
function R() {
|
|
2105
2090
|
let e = L(T.value);
|
|
2106
2091
|
D.value === "auto" || e <= 0 ? p("row-height", { height: null }) : p("row-height", {
|
|
2107
2092
|
height: e,
|
|
2108
2093
|
rule: D.value
|
|
2109
2094
|
}), h.value = !1;
|
|
2110
2095
|
}
|
|
2111
|
-
function
|
|
2096
|
+
function z(e) {
|
|
2112
2097
|
p("cell-text-direction", e), h.value = !1;
|
|
2113
2098
|
}
|
|
2114
2099
|
return (t, n) => (b(), s(O(o), {
|
|
@@ -2126,7 +2111,7 @@ var $e = {
|
|
|
2126
2111
|
}, [f(r, {
|
|
2127
2112
|
name: "more_vert",
|
|
2128
2113
|
size: 20
|
|
2129
|
-
})], 10,
|
|
2114
|
+
})], 10, un)]),
|
|
2130
2115
|
panel: M(() => [u("div", {
|
|
2131
2116
|
class: "docx-tmore__panel",
|
|
2132
2117
|
role: "menu",
|
|
@@ -2173,7 +2158,7 @@ var $e = {
|
|
|
2173
2158
|
}, [f(r, {
|
|
2174
2159
|
name: "call_merge",
|
|
2175
2160
|
size: 18
|
|
2176
|
-
}), u("span", null, E(O(m)("table.mergeCells")), 1)], 8,
|
|
2161
|
+
}), u("span", null, E(O(m)("table.mergeCells")), 1)], 8, fn),
|
|
2177
2162
|
u("button", {
|
|
2178
2163
|
type: "button",
|
|
2179
2164
|
class: "docx-tmore__item",
|
|
@@ -2182,7 +2167,7 @@ var $e = {
|
|
|
2182
2167
|
}, [f(r, {
|
|
2183
2168
|
name: "call_split",
|
|
2184
2169
|
size: 18
|
|
2185
|
-
}), u("span", null, E(O(m)("table.splitCell")), 1)], 8,
|
|
2170
|
+
}), u("span", null, E(O(m)("table.splitCell")), 1)], 8, pn),
|
|
2186
2171
|
n[40] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2187
2172
|
u("button", {
|
|
2188
2173
|
type: "button",
|
|
@@ -2201,7 +2186,7 @@ var $e = {
|
|
|
2201
2186
|
}, [f(r, {
|
|
2202
2187
|
name: "delete",
|
|
2203
2188
|
size: 18
|
|
2204
|
-
}), u("span", null, E(O(m)("deleteRow")), 1)], 8,
|
|
2189
|
+
}), u("span", null, E(O(m)("deleteRow")), 1)], 8, mn),
|
|
2205
2190
|
u("button", {
|
|
2206
2191
|
type: "button",
|
|
2207
2192
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
@@ -2210,7 +2195,7 @@ var $e = {
|
|
|
2210
2195
|
}, [f(r, {
|
|
2211
2196
|
name: "delete",
|
|
2212
2197
|
size: 18
|
|
2213
|
-
}), u("span", null, E(O(m)("deleteColumn")), 1)], 8,
|
|
2198
|
+
}), u("span", null, E(O(m)("deleteColumn")), 1)], 8, hn),
|
|
2214
2199
|
u("button", {
|
|
2215
2200
|
type: "button",
|
|
2216
2201
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
@@ -2220,8 +2205,8 @@ var $e = {
|
|
|
2220
2205
|
size: 18
|
|
2221
2206
|
}), u("span", null, E(O(m)("table.deleteTable")), 1)]),
|
|
2222
2207
|
n[42] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2223
|
-
u("div",
|
|
2224
|
-
u("div",
|
|
2208
|
+
u("div", gn, E(O(m)("tableAdvanced.verticalAlignment")), 1),
|
|
2209
|
+
u("div", _n, [
|
|
2225
2210
|
u("button", {
|
|
2226
2211
|
type: "button",
|
|
2227
2212
|
class: "docx-tmore__icon-btn",
|
|
@@ -2231,7 +2216,7 @@ var $e = {
|
|
|
2231
2216
|
}, [f(r, {
|
|
2232
2217
|
name: "vertical_align_top",
|
|
2233
2218
|
size: 16
|
|
2234
|
-
})], 40,
|
|
2219
|
+
})], 40, vn),
|
|
2235
2220
|
u("button", {
|
|
2236
2221
|
type: "button",
|
|
2237
2222
|
class: "docx-tmore__icon-btn",
|
|
@@ -2241,7 +2226,7 @@ var $e = {
|
|
|
2241
2226
|
}, [f(r, {
|
|
2242
2227
|
name: "vertical_align_center",
|
|
2243
2228
|
size: 16
|
|
2244
|
-
})], 40,
|
|
2229
|
+
})], 40, yn),
|
|
2245
2230
|
u("button", {
|
|
2246
2231
|
type: "button",
|
|
2247
2232
|
class: "docx-tmore__icon-btn",
|
|
@@ -2251,11 +2236,11 @@ var $e = {
|
|
|
2251
2236
|
}, [f(r, {
|
|
2252
2237
|
name: "vertical_align_bottom",
|
|
2253
2238
|
size: 16
|
|
2254
|
-
})], 40,
|
|
2239
|
+
})], 40, bn)
|
|
2255
2240
|
]),
|
|
2256
2241
|
n[43] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2257
|
-
u("div",
|
|
2258
|
-
u("div",
|
|
2242
|
+
u("div", xn, E(O(m)("tableAdvanced.tableAlignment")), 1),
|
|
2243
|
+
u("div", Sn, [
|
|
2259
2244
|
u("button", {
|
|
2260
2245
|
type: "button",
|
|
2261
2246
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "left" }]),
|
|
@@ -2265,7 +2250,7 @@ var $e = {
|
|
|
2265
2250
|
}, [f(r, {
|
|
2266
2251
|
name: "format_align_left",
|
|
2267
2252
|
size: 16
|
|
2268
|
-
})], 42,
|
|
2253
|
+
})], 42, Cn),
|
|
2269
2254
|
u("button", {
|
|
2270
2255
|
type: "button",
|
|
2271
2256
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "center" }]),
|
|
@@ -2275,7 +2260,7 @@ var $e = {
|
|
|
2275
2260
|
}, [f(r, {
|
|
2276
2261
|
name: "format_align_center",
|
|
2277
2262
|
size: 16
|
|
2278
|
-
})], 42,
|
|
2263
|
+
})], 42, wn),
|
|
2279
2264
|
u("button", {
|
|
2280
2265
|
type: "button",
|
|
2281
2266
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "right" }]),
|
|
@@ -2285,7 +2270,7 @@ var $e = {
|
|
|
2285
2270
|
}, [f(r, {
|
|
2286
2271
|
name: "format_align_right",
|
|
2287
2272
|
size: 16
|
|
2288
|
-
})], 42,
|
|
2273
|
+
})], 42, Tn)
|
|
2289
2274
|
]),
|
|
2290
2275
|
n[44] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2291
2276
|
u("button", {
|
|
@@ -2297,13 +2282,13 @@ var $e = {
|
|
|
2297
2282
|
name: "padding",
|
|
2298
2283
|
size: 18
|
|
2299
2284
|
}),
|
|
2300
|
-
u("span",
|
|
2285
|
+
u("span", En, E(O(m)("tableAdvanced.cellMargins")), 1),
|
|
2301
2286
|
f(r, {
|
|
2302
2287
|
name: _.value ? "expand_less" : "expand_more",
|
|
2303
2288
|
size: 18
|
|
2304
2289
|
}, null, 8, ["name"])
|
|
2305
2290
|
]),
|
|
2306
|
-
_.value ? (b(), l("div",
|
|
2291
|
+
_.value ? (b(), l("div", Dn, [u("div", On, [(b(), l(a, null, C([
|
|
2307
2292
|
"top",
|
|
2308
2293
|
"bottom",
|
|
2309
2294
|
"left",
|
|
@@ -2312,14 +2297,14 @@ var $e = {
|
|
|
2312
2297
|
key: e,
|
|
2313
2298
|
class: "docx-tmore__field"
|
|
2314
2299
|
}, [
|
|
2315
|
-
u("span",
|
|
2300
|
+
u("span", kn, E(e), 1),
|
|
2316
2301
|
N(u("input", {
|
|
2317
2302
|
type: "number",
|
|
2318
2303
|
min: "0",
|
|
2319
2304
|
step: "20",
|
|
2320
2305
|
"onUpdate:modelValue": (t) => w[e] = t,
|
|
2321
2306
|
class: "docx-tmore__input"
|
|
2322
|
-
}, null, 8,
|
|
2307
|
+
}, null, 8, An), [[
|
|
2323
2308
|
A,
|
|
2324
2309
|
w[e],
|
|
2325
2310
|
void 0,
|
|
@@ -2329,7 +2314,7 @@ var $e = {
|
|
|
2329
2314
|
])), 64))]), u("button", {
|
|
2330
2315
|
type: "button",
|
|
2331
2316
|
class: "docx-tmore__apply",
|
|
2332
|
-
onClick: F(
|
|
2317
|
+
onClick: F(ee, ["prevent"])
|
|
2333
2318
|
}, E(O(m)("common.apply")), 1)])) : c("", !0),
|
|
2334
2319
|
u("button", {
|
|
2335
2320
|
type: "button",
|
|
@@ -2340,23 +2325,23 @@ var $e = {
|
|
|
2340
2325
|
name: "height",
|
|
2341
2326
|
size: 18
|
|
2342
2327
|
}),
|
|
2343
|
-
u("span",
|
|
2328
|
+
u("span", jn, E(O(m)("tableAdvanced.rowHeight")), 1),
|
|
2344
2329
|
f(r, {
|
|
2345
2330
|
name: v.value ? "expand_less" : "expand_more",
|
|
2346
2331
|
size: 18
|
|
2347
2332
|
}, null, 8, ["name"])
|
|
2348
2333
|
]),
|
|
2349
|
-
v.value ? (b(), l("div",
|
|
2350
|
-
u("label",
|
|
2334
|
+
v.value ? (b(), l("div", Mn, [
|
|
2335
|
+
u("label", Nn, [u("span", Pn, E(O(m)("tableAdvanced.rule")), 1), N(u("select", {
|
|
2351
2336
|
"onUpdate:modelValue": n[24] ||= (e) => D.value = e,
|
|
2352
2337
|
class: "docx-tmore__select"
|
|
2353
2338
|
}, [
|
|
2354
|
-
u("option",
|
|
2355
|
-
u("option",
|
|
2356
|
-
u("option",
|
|
2339
|
+
u("option", Fn, E(O(m)("tableAdvanced.heightRules.auto")), 1),
|
|
2340
|
+
u("option", In, E(O(m)("tableAdvanced.heightRules.atLeast")), 1),
|
|
2341
|
+
u("option", Ln, E(O(m)("tableAdvanced.heightRules.exact")), 1)
|
|
2357
2342
|
], 512), [[k, D.value]])]),
|
|
2358
|
-
D.value === "auto" ? c("", !0) : (b(), l("label",
|
|
2359
|
-
u("span",
|
|
2343
|
+
D.value === "auto" ? c("", !0) : (b(), l("label", Rn, [
|
|
2344
|
+
u("span", zn, E(O(m)("tableAdvanced.height")), 1),
|
|
2360
2345
|
N(u("input", {
|
|
2361
2346
|
type: "number",
|
|
2362
2347
|
min: "0",
|
|
@@ -2374,7 +2359,7 @@ var $e = {
|
|
|
2374
2359
|
u("button", {
|
|
2375
2360
|
type: "button",
|
|
2376
2361
|
class: "docx-tmore__apply",
|
|
2377
|
-
onClick: F(
|
|
2362
|
+
onClick: F(R, ["prevent"])
|
|
2378
2363
|
}, E(O(m)("common.apply")), 1)
|
|
2379
2364
|
])) : c("", !0),
|
|
2380
2365
|
u("button", {
|
|
@@ -2386,27 +2371,27 @@ var $e = {
|
|
|
2386
2371
|
name: "text_rotation_none",
|
|
2387
2372
|
size: 18
|
|
2388
2373
|
}),
|
|
2389
|
-
u("span",
|
|
2374
|
+
u("span", Bn, E(O(m)("textDirection")), 1),
|
|
2390
2375
|
f(r, {
|
|
2391
2376
|
name: y.value ? "expand_less" : "expand_more",
|
|
2392
2377
|
size: 18
|
|
2393
2378
|
}, null, 8, ["name"])
|
|
2394
2379
|
]),
|
|
2395
|
-
y.value ? (b(), l("div",
|
|
2380
|
+
y.value ? (b(), l("div", Vn, [
|
|
2396
2381
|
u("button", {
|
|
2397
2382
|
type: "button",
|
|
2398
2383
|
class: "docx-tmore__sub-item",
|
|
2399
|
-
onClick: n[27] ||= F((e) =>
|
|
2384
|
+
onClick: n[27] ||= F((e) => z(null), ["prevent"])
|
|
2400
2385
|
}, E(O(m)("tableAdvanced.textDirections.horizontal")), 1),
|
|
2401
2386
|
u("button", {
|
|
2402
2387
|
type: "button",
|
|
2403
2388
|
class: "docx-tmore__sub-item",
|
|
2404
|
-
onClick: n[28] ||= F((e) =>
|
|
2389
|
+
onClick: n[28] ||= F((e) => z("tbRl"), ["prevent"])
|
|
2405
2390
|
}, E(O(m)("tableAdvanced.textDirections.verticalRL")), 1),
|
|
2406
2391
|
u("button", {
|
|
2407
2392
|
type: "button",
|
|
2408
2393
|
class: "docx-tmore__sub-item",
|
|
2409
|
-
onClick: n[29] ||= F((e) =>
|
|
2394
|
+
onClick: n[29] ||= F((e) => z("btLr"), ["prevent"])
|
|
2410
2395
|
}, E(O(m)("tableAdvanced.textDirections.verticalLR")), 1)
|
|
2411
2396
|
])) : c("", !0),
|
|
2412
2397
|
n[45] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
@@ -2451,11 +2436,11 @@ var $e = {
|
|
|
2451
2436
|
name: "settings",
|
|
2452
2437
|
size: 18
|
|
2453
2438
|
}), u("span", null, E(O(m)("tableAdvanced.tableProperties")), 1)])
|
|
2454
|
-
], 8,
|
|
2439
|
+
], 8, dn)]),
|
|
2455
2440
|
_: 1
|
|
2456
2441
|
}, 8, ["open"]));
|
|
2457
2442
|
}
|
|
2458
|
-
}), [["__scopeId", "data-v-
|
|
2443
|
+
}), [["__scopeId", "data-v-af08ecc9"]]), Un = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
2459
2444
|
__name: "TableToolbar",
|
|
2460
2445
|
props: {
|
|
2461
2446
|
view: {},
|
|
@@ -2468,7 +2453,7 @@ var $e = {
|
|
|
2468
2453
|
let r = e, i = n, s = o(() => {
|
|
2469
2454
|
r.stateTick;
|
|
2470
2455
|
let e = r.view;
|
|
2471
|
-
return e ?
|
|
2456
|
+
return e ? z(e.state) : null;
|
|
2472
2457
|
}), d = o(() => !!s.value?.isInTable), p = o(() => {
|
|
2473
2458
|
r.stateTick;
|
|
2474
2459
|
let e = r.view;
|
|
@@ -2493,8 +2478,8 @@ var $e = {
|
|
|
2493
2478
|
j([() => r.view, () => r.stateTick], () => {
|
|
2494
2479
|
let e = r.view;
|
|
2495
2480
|
if (!e) return;
|
|
2496
|
-
let t =
|
|
2497
|
-
|
|
2481
|
+
let t = z(e.state), n = t.cellBorderColor;
|
|
2482
|
+
n && t.isInTable && typeof n == "object" && "rgb" in n && typeof n.rgb == "string" && (S.color = { rgb: n.rgb });
|
|
2498
2483
|
}, { immediate: !0 });
|
|
2499
2484
|
function C(e, ...t) {
|
|
2500
2485
|
let n = r.view;
|
|
@@ -2582,14 +2567,14 @@ var $e = {
|
|
|
2582
2567
|
onRowHeight: N
|
|
2583
2568
|
}), (t, n) => d.value ? (b(), l(a, { key: 0 }, [
|
|
2584
2569
|
n[0] ||= u("span", { class: "divider" }, null, -1),
|
|
2585
|
-
f(
|
|
2586
|
-
f(
|
|
2587
|
-
f(
|
|
2588
|
-
f(
|
|
2570
|
+
f(nn, { onChange: w }),
|
|
2571
|
+
f(Qt, m({ theme: e.theme ?? null }, g.value, { onChange: T }), null, 16, ["theme"]),
|
|
2572
|
+
f(cn, { onChange: E }),
|
|
2573
|
+
f(ln, {
|
|
2589
2574
|
theme: e.theme ?? null,
|
|
2590
2575
|
onChange: D
|
|
2591
2576
|
}, null, 8, ["theme"]),
|
|
2592
|
-
f(
|
|
2577
|
+
f(Hn, {
|
|
2593
2578
|
"can-split": p.value,
|
|
2594
2579
|
"can-merge": _.value,
|
|
2595
2580
|
"row-count": v.value,
|
|
@@ -2608,7 +2593,7 @@ var $e = {
|
|
|
2608
2593
|
])
|
|
2609
2594
|
], 64)) : c("", !0);
|
|
2610
2595
|
}
|
|
2611
|
-
}), [["__scopeId", "data-v-
|
|
2596
|
+
}), [["__scopeId", "data-v-30ceb320"]]), Wn = { class: "docx-vertical-ruler__ticks" }, Gn = 15840, Kn = 1440, qn = 1440, Jn = 567, Yn = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
2612
2597
|
__name: "VerticalRuler",
|
|
2613
2598
|
props: {
|
|
2614
2599
|
sectionProps: {},
|
|
@@ -2623,12 +2608,12 @@ var $e = {
|
|
|
2623
2608
|
setup(e, { emit: t }) {
|
|
2624
2609
|
let n = e, r = t, i = S(null), s = S(null);
|
|
2625
2610
|
function d(e) {
|
|
2626
|
-
return
|
|
2611
|
+
return J(e) * n.zoom;
|
|
2627
2612
|
}
|
|
2628
2613
|
function f(e) {
|
|
2629
|
-
return Math.round(
|
|
2614
|
+
return Math.round(q(e / n.zoom));
|
|
2630
2615
|
}
|
|
2631
|
-
let p = o(() => n.sectionProps?.pageHeight ??
|
|
2616
|
+
let p = o(() => n.sectionProps?.pageHeight ?? Gn), m = o(() => n.sectionProps?.marginTop ?? Kn), h = o(() => n.sectionProps?.marginBottom ?? Kn), g = o(() => d(p.value)), y = o(() => d(m.value)), x = o(() => d(h.value)), w = o(() => ({
|
|
2632
2617
|
position: "relative",
|
|
2633
2618
|
width: "20px",
|
|
2634
2619
|
height: g.value + "px",
|
|
@@ -2639,7 +2624,7 @@ var $e = {
|
|
|
2639
2624
|
})), T = o(() => {
|
|
2640
2625
|
let e = [];
|
|
2641
2626
|
if (n.unit === "inch") {
|
|
2642
|
-
let t =
|
|
2627
|
+
let t = qn / 8, n = Math.ceil(p.value / t);
|
|
2643
2628
|
for (let r = 0; r <= n; r++) {
|
|
2644
2629
|
let n = r * t;
|
|
2645
2630
|
if (n > p.value) break;
|
|
@@ -2660,7 +2645,7 @@ var $e = {
|
|
|
2660
2645
|
});
|
|
2661
2646
|
}
|
|
2662
2647
|
} else {
|
|
2663
|
-
let t =
|
|
2648
|
+
let t = Jn / 10, n = Math.ceil(p.value / t);
|
|
2664
2649
|
for (let r = 0; r <= n; r++) {
|
|
2665
2650
|
let n = r * t;
|
|
2666
2651
|
if (n > p.value) break;
|
|
@@ -2726,7 +2711,7 @@ var $e = {
|
|
|
2726
2711
|
"aria-label": "Vertical ruler",
|
|
2727
2712
|
"aria-orientation": "vertical"
|
|
2728
2713
|
}, [
|
|
2729
|
-
u("div",
|
|
2714
|
+
u("div", Wn, [(b(!0), l(a, null, C(T.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
|
|
2730
2715
|
class: "docx-vertical-ruler__tick-line",
|
|
2731
2716
|
style: _({
|
|
2732
2717
|
top: e.position + "px",
|
|
@@ -2755,10 +2740,94 @@ var $e = {
|
|
|
2755
2740
|
}, [u("div", { style: _(O("bottomMargin")) }, null, 4)], 36)) : c("", !0)
|
|
2756
2741
|
], 4));
|
|
2757
2742
|
}
|
|
2758
|
-
}), [["__scopeId", "data-v-
|
|
2743
|
+
}), [["__scopeId", "data-v-fc4bcb45"]]);
|
|
2744
|
+
//#endregion
|
|
2745
|
+
//#region src/composables/useCommentSidebarItems.ts
|
|
2746
|
+
function Xn({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
|
|
2747
|
+
return o(() => {
|
|
2748
|
+
let a = [];
|
|
2749
|
+
r?.value && i?.value != null && a.push({
|
|
2750
|
+
id: "new-comment-input",
|
|
2751
|
+
anchorPos: 0,
|
|
2752
|
+
fixedY: i.value,
|
|
2753
|
+
priority: -1e3,
|
|
2754
|
+
isTemporary: !0,
|
|
2755
|
+
estimatedHeight: 120,
|
|
2756
|
+
kind: "add-comment"
|
|
2757
|
+
});
|
|
2758
|
+
let o = /* @__PURE__ */ new Map();
|
|
2759
|
+
for (let t of e.value) if (t.parentId != null) {
|
|
2760
|
+
let e = o.get(t.parentId);
|
|
2761
|
+
e ? e.push(t) : o.set(t.parentId, [t]);
|
|
2762
|
+
}
|
|
2763
|
+
for (let t of e.value) t.parentId == null && (!t.done || n?.value) && a.push({
|
|
2764
|
+
id: `comment-${t.id}`,
|
|
2765
|
+
anchorPos: 0,
|
|
2766
|
+
anchorKey: `comment-${t.id}`,
|
|
2767
|
+
priority: 0,
|
|
2768
|
+
estimatedHeight: t.done ? 28 : 80,
|
|
2769
|
+
kind: "comment",
|
|
2770
|
+
comment: t,
|
|
2771
|
+
replies: o.get(t.id) ?? []
|
|
2772
|
+
});
|
|
2773
|
+
return t.value.forEach((e, t) => {
|
|
2774
|
+
a.push({
|
|
2775
|
+
id: `tc-${e.revisionId}-${t}`,
|
|
2776
|
+
anchorPos: e.from,
|
|
2777
|
+
anchorKey: `revision-${e.revisionId}`,
|
|
2778
|
+
priority: 1,
|
|
2779
|
+
estimatedHeight: 80,
|
|
2780
|
+
kind: "tracked-change",
|
|
2781
|
+
change: e,
|
|
2782
|
+
replies: o.get(e.revisionId) ?? []
|
|
2783
|
+
});
|
|
2784
|
+
}), a;
|
|
2785
|
+
});
|
|
2786
|
+
}
|
|
2787
|
+
//#endregion
|
|
2788
|
+
//#region src/components/sidebar/AddCommentCard.vue?vue&type=script&setup=true&lang.ts
|
|
2789
|
+
var Zn = ["onKeydown"], Qn = { class: "add-comment-card__actions" }, $n = ["disabled"], er = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
2790
|
+
__name: "AddCommentCard",
|
|
2791
|
+
emits: ["submit", "cancel"],
|
|
2792
|
+
setup(e, { emit: t }) {
|
|
2793
|
+
let n = t, r = S(""), i = S(null), a = o(() => r.value.trim());
|
|
2794
|
+
y(() => {
|
|
2795
|
+
i.value?.focus({ preventScroll: !0 });
|
|
2796
|
+
});
|
|
2797
|
+
function s() {
|
|
2798
|
+
a.value && (n("submit", a.value), r.value = "");
|
|
2799
|
+
}
|
|
2800
|
+
function c() {
|
|
2801
|
+
n("cancel"), r.value = "";
|
|
2802
|
+
}
|
|
2803
|
+
return (e, t) => (b(), l("div", {
|
|
2804
|
+
class: "add-comment-card",
|
|
2805
|
+
onMousedown: t[3] ||= F(() => {}, ["stop"])
|
|
2806
|
+
}, [N(u("textarea", {
|
|
2807
|
+
ref_key: "inputRef",
|
|
2808
|
+
ref: i,
|
|
2809
|
+
"onUpdate:modelValue": t[0] ||= (e) => r.value = e,
|
|
2810
|
+
class: "add-comment-card__field",
|
|
2811
|
+
placeholder: "Add a comment",
|
|
2812
|
+
onMousedown: t[1] ||= F(() => {}, ["stop"]),
|
|
2813
|
+
onKeydown: [
|
|
2814
|
+
t[2] ||= F(() => {}, ["stop"]),
|
|
2815
|
+
P(F(s, ["exact", "prevent"]), ["enter"]),
|
|
2816
|
+
P(c, ["esc"])
|
|
2817
|
+
]
|
|
2818
|
+
}, null, 40, Zn), [[A, r.value]]), u("div", Qn, [u("button", {
|
|
2819
|
+
class: "add-comment-card__cancel",
|
|
2820
|
+
onClick: c
|
|
2821
|
+
}, " Cancel "), u("button", {
|
|
2822
|
+
class: g(["add-comment-card__submit", { "add-comment-card__submit--active": a.value }]),
|
|
2823
|
+
disabled: !a.value,
|
|
2824
|
+
onClick: s
|
|
2825
|
+
}, " Comment ", 10, $n)])], 32));
|
|
2826
|
+
}
|
|
2827
|
+
}), [["__scopeId", "data-v-8a5fd620"]]);
|
|
2759
2828
|
//#endregion
|
|
2760
2829
|
//#region src/utils/comments.ts
|
|
2761
|
-
function
|
|
2830
|
+
function tr(e) {
|
|
2762
2831
|
return e ? new Date(e).toLocaleString(void 0, {
|
|
2763
2832
|
hour: "numeric",
|
|
2764
2833
|
minute: "2-digit",
|
|
@@ -2766,18 +2835,19 @@ function Yn(e) {
|
|
|
2766
2835
|
day: "numeric"
|
|
2767
2836
|
}) : "";
|
|
2768
2837
|
}
|
|
2769
|
-
function
|
|
2770
|
-
|
|
2771
|
-
text: e
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2838
|
+
function nr(e) {
|
|
2839
|
+
let t = e.split(/\s+/).map((e) => U({
|
|
2840
|
+
text: e,
|
|
2841
|
+
units: "graphemes",
|
|
2842
|
+
end: 1
|
|
2843
|
+
})).join("").toUpperCase();
|
|
2844
|
+
return U({
|
|
2845
|
+
text: t,
|
|
2776
2846
|
units: "graphemes",
|
|
2777
2847
|
end: 2
|
|
2778
2848
|
});
|
|
2779
2849
|
}
|
|
2780
|
-
var
|
|
2850
|
+
var rr = [
|
|
2781
2851
|
"#6DCCB1",
|
|
2782
2852
|
"#79AAD9",
|
|
2783
2853
|
"#EE789D",
|
|
@@ -2791,13 +2861,13 @@ var Zn = [
|
|
|
2791
2861
|
"#E15759",
|
|
2792
2862
|
"#76B7B2"
|
|
2793
2863
|
];
|
|
2794
|
-
function
|
|
2864
|
+
function ir(e) {
|
|
2795
2865
|
let t = 0;
|
|
2796
2866
|
for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
|
|
2797
|
-
return
|
|
2867
|
+
return rr[Math.abs(t) % rr.length] ?? "#888888";
|
|
2798
2868
|
}
|
|
2799
2869
|
function $(e, t = 50) {
|
|
2800
|
-
return e.length > t ?
|
|
2870
|
+
return e.length > t ? U({
|
|
2801
2871
|
text: e,
|
|
2802
2872
|
units: "codeUnits",
|
|
2803
2873
|
end: t
|
|
@@ -2805,18 +2875,18 @@ function $(e, t = 50) {
|
|
|
2805
2875
|
}
|
|
2806
2876
|
//#endregion
|
|
2807
2877
|
//#region src/components/sidebar/Avatar.vue
|
|
2808
|
-
var
|
|
2878
|
+
var ar = /* @__PURE__ */ p({
|
|
2809
2879
|
__name: "Avatar",
|
|
2810
2880
|
props: {
|
|
2811
2881
|
name: { default: "U" },
|
|
2812
2882
|
size: { default: 32 }
|
|
2813
2883
|
},
|
|
2814
2884
|
setup(e) {
|
|
2815
|
-
let t = e, n = o(() =>
|
|
2885
|
+
let t = e, n = o(() => nr(t.name || "U")), r = o(() => ({
|
|
2816
2886
|
width: t.size + "px",
|
|
2817
2887
|
height: t.size + "px",
|
|
2818
2888
|
borderRadius: "50%",
|
|
2819
|
-
backgroundColor:
|
|
2889
|
+
backgroundColor: ir(t.name || "U"),
|
|
2820
2890
|
color: "#fff",
|
|
2821
2891
|
display: "flex",
|
|
2822
2892
|
alignItems: "center",
|
|
@@ -2830,32 +2900,7 @@ var $n = /* @__PURE__ */ p({
|
|
|
2830
2900
|
style: _(r.value)
|
|
2831
2901
|
}, E(n.value), 5));
|
|
2832
2902
|
}
|
|
2833
|
-
}),
|
|
2834
|
-
key: 0,
|
|
2835
|
-
class: "reply-thread"
|
|
2836
|
-
}, tr = {
|
|
2837
|
-
key: 0,
|
|
2838
|
-
class: "reply-thread__more"
|
|
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({
|
|
2840
|
-
__name: "ReplyThread",
|
|
2841
|
-
props: {
|
|
2842
|
-
replies: {},
|
|
2843
|
-
isExpanded: { type: Boolean }
|
|
2844
|
-
},
|
|
2845
|
-
setup(e) {
|
|
2846
|
-
let t = e, n = o(() => t.isExpanded ? t.replies : t.replies.slice(-1)), r = o(() => t.isExpanded ? 0 : Math.max(0, t.replies.length - 1));
|
|
2847
|
-
return (t, i) => e.replies.length > 0 ? (b(), l("div", er, [r.value > 0 ? (b(), l("div", tr, E(r.value) + " " + E(r.value === 1 ? "reply" : "replies"), 1)) : c("", !0), (b(!0), l(a, null, C(n.value, (t) => (b(), l("div", {
|
|
2848
|
-
key: t.id,
|
|
2849
|
-
class: g(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
|
|
2850
|
-
}, [u("div", nr, [f($n, {
|
|
2851
|
-
name: t.author,
|
|
2852
|
-
size: 28
|
|
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);
|
|
2857
|
-
}
|
|
2858
|
-
}), [["__scopeId", "data-v-91b98988"]]), cr = ["onKeydown"], lr = { class: "reply-input__actions" }, ur = ["disabled"], dr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2903
|
+
}), or = ["onKeydown"], sr = { class: "reply-input__actions" }, cr = ["disabled"], lr = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
2859
2904
|
__name: "ReplyInput",
|
|
2860
2905
|
emits: ["submit"],
|
|
2861
2906
|
setup(e, { emit: t }) {
|
|
@@ -2887,14 +2932,14 @@ var $n = /* @__PURE__ */ p({
|
|
|
2887
2932
|
P(F(p, ["prevent"]), ["enter"]),
|
|
2888
2933
|
P(f, ["esc"])
|
|
2889
2934
|
]
|
|
2890
|
-
}, null, 40,
|
|
2935
|
+
}, null, 40, or), [[A, i.value]]), u("div", sr, [u("button", {
|
|
2891
2936
|
class: "reply-input__cancel",
|
|
2892
2937
|
onClick: F(f, ["stop"])
|
|
2893
2938
|
}, "Cancel"), u("button", {
|
|
2894
2939
|
class: g(["reply-input__submit", { "reply-input__submit--active": c.value }]),
|
|
2895
2940
|
disabled: !c.value,
|
|
2896
2941
|
onClick: F(p, ["stop"])
|
|
2897
|
-
}, " Reply ", 10,
|
|
2942
|
+
}, " Reply ", 10, cr)])], 64)) : (b(), l("input", {
|
|
2898
2943
|
key: 0,
|
|
2899
2944
|
readonly: "",
|
|
2900
2945
|
placeholder: "Reply",
|
|
@@ -2903,13 +2948,38 @@ var $n = /* @__PURE__ */ p({
|
|
|
2903
2948
|
onClick: F(d, ["stop"])
|
|
2904
2949
|
}, null, 32))], 32));
|
|
2905
2950
|
}
|
|
2906
|
-
}), [["__scopeId", "data-v-
|
|
2951
|
+
}), [["__scopeId", "data-v-343d2df1"]]), ur = {
|
|
2952
|
+
key: 0,
|
|
2953
|
+
class: "reply-thread"
|
|
2954
|
+
}, dr = {
|
|
2955
|
+
key: 0,
|
|
2956
|
+
class: "reply-thread__more"
|
|
2957
|
+
}, fr = { class: "reply-thread__header" }, pr = { class: "reply-thread__author-block" }, mr = { class: "reply-thread__author" }, hr = { class: "reply-thread__date" }, gr = ["data-find-comment-id", "data-find-comment-paragraph"], _r = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
2958
|
+
__name: "ReplyThread",
|
|
2959
|
+
props: {
|
|
2960
|
+
replies: {},
|
|
2961
|
+
isExpanded: { type: Boolean }
|
|
2962
|
+
},
|
|
2963
|
+
setup(e) {
|
|
2964
|
+
let t = e, n = o(() => t.isExpanded ? t.replies : t.replies.slice(-1)), r = o(() => t.isExpanded ? 0 : Math.max(0, t.replies.length - 1));
|
|
2965
|
+
return (t, i) => e.replies.length > 0 ? (b(), l("div", ur, [r.value > 0 ? (b(), l("div", dr, E(r.value) + " " + E(r.value === 1 ? "reply" : "replies"), 1)) : c("", !0), (b(!0), l(a, null, C(n.value, (t) => (b(), l("div", {
|
|
2966
|
+
key: t.id,
|
|
2967
|
+
class: g(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
|
|
2968
|
+
}, [u("div", fr, [f(ar, {
|
|
2969
|
+
name: t.author,
|
|
2970
|
+
size: 28
|
|
2971
|
+
}, null, 8, ["name"]), u("div", pr, [u("div", mr, E(t.author || "Unknown"), 1), u("div", hr, E(O(tr)(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", {
|
|
2972
|
+
"data-find-comment-id": t.id,
|
|
2973
|
+
"data-find-comment-paragraph": n
|
|
2974
|
+
}, E(O(V)(e)), 9, gr), i[0] ||= d(E(" "), -1)], 64))), 128))], 2)], 2))), 128))])) : c("", !0);
|
|
2975
|
+
}
|
|
2976
|
+
}), [["__scopeId", "data-v-3ab28dc9"]]), vr = ["data-comment-id"], yr = {
|
|
2907
2977
|
key: 0,
|
|
2908
2978
|
class: "comment-card__resolved"
|
|
2909
|
-
},
|
|
2979
|
+
}, br = { class: "comment-card__head" }, xr = { class: "comment-card__author-block" }, Sr = { class: "comment-card__author" }, Cr = { class: "comment-card__date" }, wr = {
|
|
2910
2980
|
key: 0,
|
|
2911
2981
|
class: "comment-card__actions"
|
|
2912
|
-
},
|
|
2982
|
+
}, Tr = ["title"], Er = { class: "comment-card__body" }, Dr = ["data-find-comment-id", "data-find-comment-paragraph"], Or = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
2913
2983
|
__name: "CommentCard",
|
|
2914
2984
|
props: {
|
|
2915
2985
|
comment: {},
|
|
@@ -2934,17 +3004,17 @@ var $n = /* @__PURE__ */ p({
|
|
|
2934
3004
|
onClick: n[5] ||= (e) => t.$emit("click"),
|
|
2935
3005
|
onMousedown: n[6] ||= F(() => {}, ["stop"])
|
|
2936
3006
|
}, [
|
|
2937
|
-
e.comment.done ? (b(), l("div",
|
|
3007
|
+
e.comment.done ? (b(), l("div", yr, [f(r, {
|
|
2938
3008
|
name: "check",
|
|
2939
3009
|
size: 12
|
|
2940
3010
|
}), n[7] ||= u("span", null, "Resolved", -1)])) : c("", !0),
|
|
2941
|
-
u("div",
|
|
2942
|
-
f(
|
|
3011
|
+
u("div", br, [
|
|
3012
|
+
f(ar, {
|
|
2943
3013
|
name: e.comment.author,
|
|
2944
3014
|
size: 32
|
|
2945
3015
|
}, null, 8, ["name"]),
|
|
2946
|
-
u("div",
|
|
2947
|
-
e.expanded ? (b(), l("div",
|
|
3016
|
+
u("div", xr, [u("div", Sr, E(e.comment.author || "Unknown"), 1), u("div", Cr, E(O(tr)(e.comment.date)), 1)]),
|
|
3017
|
+
e.expanded ? (b(), l("div", wr, [
|
|
2948
3018
|
u("button", {
|
|
2949
3019
|
class: "comment-card__icon-btn",
|
|
2950
3020
|
title: e.comment.done ? "Reopen" : "Resolve",
|
|
@@ -2952,7 +3022,7 @@ var $n = /* @__PURE__ */ p({
|
|
|
2952
3022
|
}, [f(r, {
|
|
2953
3023
|
name: e.comment.done ? "undo" : "check",
|
|
2954
3024
|
size: 20
|
|
2955
|
-
}, null, 8, ["name"])], 8,
|
|
3025
|
+
}, null, 8, ["name"])], 8, Tr),
|
|
2956
3026
|
u("button", {
|
|
2957
3027
|
class: "comment-card__icon-btn",
|
|
2958
3028
|
title: "More options",
|
|
@@ -2969,24 +3039,24 @@ var $n = /* @__PURE__ */ p({
|
|
|
2969
3039
|
}, [u("button", {
|
|
2970
3040
|
class: "comment-card__menu-item",
|
|
2971
3041
|
onClick: p
|
|
2972
|
-
}, "Delete")], 32)) : c("", !0)
|
|
3042
|
+
}, " Delete ")], 32)) : c("", !0)
|
|
2973
3043
|
])) : c("", !0)
|
|
2974
3044
|
]),
|
|
2975
|
-
u("div",
|
|
3045
|
+
u("div", Er, [(b(!0), l(a, null, C(e.comment.content, (t, r) => (b(), l(a, { key: r }, [u("span", {
|
|
2976
3046
|
"data-find-comment-id": e.comment.id,
|
|
2977
3047
|
"data-find-comment-paragraph": r
|
|
2978
|
-
}, E(O(
|
|
2979
|
-
f(
|
|
3048
|
+
}, E(O(V)(t)), 9, Dr), n[8] ||= d(E(" "), -1)], 64))), 128))]),
|
|
3049
|
+
f(_r, {
|
|
2980
3050
|
replies: e.replies,
|
|
2981
3051
|
"is-expanded": e.expanded
|
|
2982
3052
|
}, null, 8, ["replies", "is-expanded"]),
|
|
2983
|
-
e.expanded && !e.comment.done ? (b(), s(
|
|
3053
|
+
e.expanded && !e.comment.done ? (b(), s(lr, {
|
|
2984
3054
|
key: 1,
|
|
2985
3055
|
onSubmit: n[4] ||= (n) => t.$emit("reply", e.comment.id, n)
|
|
2986
3056
|
})) : c("", !0)
|
|
2987
|
-
], 42,
|
|
3057
|
+
], 42, vr));
|
|
2988
3058
|
}
|
|
2989
|
-
}), [["__scopeId", "data-v-
|
|
3059
|
+
}), [["__scopeId", "data-v-216d0740"]]), kr = ["data-comment-id"], Ar = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
2990
3060
|
__name: "ResolvedCommentMarker",
|
|
2991
3061
|
props: { comment: {} },
|
|
2992
3062
|
emits: ["toggle-expand"],
|
|
@@ -3000,39 +3070,39 @@ var $n = /* @__PURE__ */ p({
|
|
|
3000
3070
|
}, [f(r, {
|
|
3001
3071
|
name: "chat_bubble_check",
|
|
3002
3072
|
size: 20
|
|
3003
|
-
})], 40,
|
|
3073
|
+
})], 40, kr));
|
|
3004
3074
|
}
|
|
3005
|
-
}), [["__scopeId", "data-v-
|
|
3075
|
+
}), [["__scopeId", "data-v-c10c6f88"]]), jr = { class: "tc-card__head" }, Mr = { class: "tc-card__author-block" }, Nr = { class: "tc-card__author" }, Pr = {
|
|
3006
3076
|
key: 0,
|
|
3007
3077
|
class: "tc-card__date"
|
|
3008
|
-
},
|
|
3078
|
+
}, Fr = {
|
|
3009
3079
|
key: 0,
|
|
3010
3080
|
class: "tc-card__actions"
|
|
3011
|
-
},
|
|
3081
|
+
}, Ir = ["title"], Lr = ["title"], Rr = { class: "tc-card__body" }, zr = { class: "tc-card__deleted" }, Br = { class: "tc-card__inserted" }, Vr = { class: "tc-card__inserted" }, Hr = { class: "tc-card__deleted" }, Ur = {
|
|
3012
3082
|
key: 0,
|
|
3013
3083
|
class: "tc-card__changed"
|
|
3014
|
-
},
|
|
3084
|
+
}, Wr = { class: "tc-card__changed" }, Gr = { class: "tc-card__changed" }, Kr = {
|
|
3015
3085
|
key: 5,
|
|
3016
3086
|
class: "tc-card__inserted"
|
|
3017
|
-
},
|
|
3087
|
+
}, qr = {
|
|
3018
3088
|
key: 6,
|
|
3019
3089
|
class: "tc-card__deleted"
|
|
3020
|
-
},
|
|
3090
|
+
}, Jr = {
|
|
3021
3091
|
key: 7,
|
|
3022
3092
|
class: "tc-card__inserted"
|
|
3023
|
-
},
|
|
3093
|
+
}, Yr = {
|
|
3024
3094
|
key: 8,
|
|
3025
3095
|
class: "tc-card__deleted"
|
|
3026
|
-
},
|
|
3096
|
+
}, Xr = {
|
|
3027
3097
|
key: 9,
|
|
3028
3098
|
class: "tc-card__changed"
|
|
3029
|
-
},
|
|
3099
|
+
}, Zr = {
|
|
3030
3100
|
key: 10,
|
|
3031
3101
|
class: "tc-card__inserted"
|
|
3032
|
-
},
|
|
3102
|
+
}, Qr = {
|
|
3033
3103
|
key: 11,
|
|
3034
3104
|
class: "tc-card__deleted"
|
|
3035
|
-
},
|
|
3105
|
+
}, $r = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
3036
3106
|
__name: "TrackedChangeCard",
|
|
3037
3107
|
props: {
|
|
3038
3108
|
change: {},
|
|
@@ -3095,129 +3165,45 @@ var $n = /* @__PURE__ */ p({
|
|
|
3095
3165
|
onClick: n[1] ||= (e) => t.$emit("click"),
|
|
3096
3166
|
onMousedown: n[2] ||= F(() => {}, ["stop"])
|
|
3097
3167
|
}, [
|
|
3098
|
-
u("div",
|
|
3099
|
-
f(
|
|
3168
|
+
u("div", jr, [
|
|
3169
|
+
f(ar, {
|
|
3100
3170
|
name: h.value,
|
|
3101
3171
|
size: 32
|
|
3102
3172
|
}, null, 8, ["name"]),
|
|
3103
|
-
u("div",
|
|
3104
|
-
e.expanded ? (b(), l("div",
|
|
3173
|
+
u("div", Mr, [u("div", Nr, E(h.value), 1), e.change.date ? (b(), l("div", Pr, E(O(tr)(e.change.date)), 1)) : c("", !0)]),
|
|
3174
|
+
e.expanded ? (b(), l("div", Fr, [u("button", {
|
|
3105
3175
|
class: "tc-card__icon-btn",
|
|
3106
3176
|
title: O(i)("acceptChange"),
|
|
3107
3177
|
onClick: F(x, ["stop"])
|
|
3108
3178
|
}, [f(r, {
|
|
3109
3179
|
name: "check",
|
|
3110
3180
|
size: 20
|
|
3111
|
-
})], 8,
|
|
3181
|
+
})], 8, Ir), u("button", {
|
|
3112
3182
|
class: "tc-card__icon-btn",
|
|
3113
3183
|
title: O(i)("rejectChange"),
|
|
3114
3184
|
onClick: F(S, ["stop"])
|
|
3115
3185
|
}, [f(r, {
|
|
3116
3186
|
name: "close",
|
|
3117
3187
|
size: 20
|
|
3118
|
-
})], 8,
|
|
3188
|
+
})], 8, Lr)])) : c("", !0)
|
|
3119
3189
|
]),
|
|
3120
|
-
u("div",
|
|
3190
|
+
u("div", Rr, [e.change.type === "replacement" ? (b(), l(a, { key: 0 }, [
|
|
3121
3191
|
d(E(O(i)("trackedChanges.replaced")) + " ", 1),
|
|
3122
|
-
u("span",
|
|
3192
|
+
u("span", zr, "\"" + E(O($)(e.change.deletedText || "")) + "\"", 1),
|
|
3123
3193
|
d(" " + E(O(i)("trackedChanges.with")) + " ", 1),
|
|
3124
|
-
u("span",
|
|
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",
|
|
3126
|
-
f(
|
|
3194
|
+
u("span", Br, "\"" + E(O($)(e.change.text)) + "\"", 1)
|
|
3195
|
+
], 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", Vr, "\"" + 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", Hr, "\"" + 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", Ur, 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", Wr, "\"" + 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", Gr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "rowInserted" ? (b(), l("span", Kr, E(O(i)("revisions.rowInserted")), 1)) : e.change.type === "rowDeleted" ? (b(), l("span", qr, E(O(i)("revisions.rowDeleted")), 1)) : e.change.type === "cellInserted" ? (b(), l("span", Jr, E(O(i)("revisions.cellInserted")), 1)) : e.change.type === "cellDeleted" ? (b(), l("span", Yr, E(O(i)("revisions.cellDeleted")), 1)) : e.change.type === "cellMerged" ? (b(), l("span", Xr, E(O(i)("revisions.cellMerged")), 1)) : e.change.type === "tableInserted" ? (b(), l("span", Zr, E(O(i)("revisions.tableInserted")), 1)) : e.change.type === "tableDeleted" ? (b(), l("span", Qr, 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))]),
|
|
3196
|
+
f(_r, {
|
|
3127
3197
|
replies: e.replies,
|
|
3128
3198
|
"is-expanded": e.expanded
|
|
3129
3199
|
}, null, 8, ["replies", "is-expanded"]),
|
|
3130
|
-
e.expanded ? (b(), s(
|
|
3200
|
+
e.expanded ? (b(), s(lr, {
|
|
3131
3201
|
key: 0,
|
|
3132
3202
|
onSubmit: n[0] ||= (n) => t.$emit("reply", e.change.revisionId, n)
|
|
3133
3203
|
})) : c("", !0)
|
|
3134
3204
|
], 34));
|
|
3135
3205
|
}
|
|
3136
|
-
}), [["__scopeId", "data-v-
|
|
3137
|
-
__name: "AddCommentCard",
|
|
3138
|
-
emits: ["submit", "cancel"],
|
|
3139
|
-
setup(e, { emit: t }) {
|
|
3140
|
-
let n = t, r = S(""), i = S(null), a = o(() => r.value.trim());
|
|
3141
|
-
y(() => {
|
|
3142
|
-
i.value?.focus({ preventScroll: !0 });
|
|
3143
|
-
});
|
|
3144
|
-
function s() {
|
|
3145
|
-
a.value && (n("submit", a.value), r.value = "");
|
|
3146
|
-
}
|
|
3147
|
-
function c() {
|
|
3148
|
-
n("cancel"), r.value = "";
|
|
3149
|
-
}
|
|
3150
|
-
return (e, t) => (b(), l("div", {
|
|
3151
|
-
class: "add-comment-card",
|
|
3152
|
-
onMousedown: t[3] ||= F(() => {}, ["stop"])
|
|
3153
|
-
}, [N(u("textarea", {
|
|
3154
|
-
ref_key: "inputRef",
|
|
3155
|
-
ref: i,
|
|
3156
|
-
"onUpdate:modelValue": t[0] ||= (e) => r.value = e,
|
|
3157
|
-
class: "add-comment-card__field",
|
|
3158
|
-
placeholder: "Add a comment",
|
|
3159
|
-
onMousedown: t[1] ||= F(() => {}, ["stop"]),
|
|
3160
|
-
onKeydown: [
|
|
3161
|
-
t[2] ||= F(() => {}, ["stop"]),
|
|
3162
|
-
P(F(s, ["exact", "prevent"]), ["enter"]),
|
|
3163
|
-
P(c, ["esc"])
|
|
3164
|
-
]
|
|
3165
|
-
}, null, 40, Jr), [[A, r.value]]), u("div", Yr, [u("button", {
|
|
3166
|
-
class: "add-comment-card__cancel",
|
|
3167
|
-
onClick: c
|
|
3168
|
-
}, "Cancel"), u("button", {
|
|
3169
|
-
class: g(["add-comment-card__submit", { "add-comment-card__submit--active": a.value }]),
|
|
3170
|
-
disabled: !a.value,
|
|
3171
|
-
onClick: s
|
|
3172
|
-
}, " Comment ", 10, Xr)])], 32));
|
|
3173
|
-
}
|
|
3174
|
-
}), [["__scopeId", "data-v-2939f9cd"]]);
|
|
3175
|
-
//#endregion
|
|
3176
|
-
//#region src/composables/useCommentSidebarItems.ts
|
|
3177
|
-
function Qr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
|
|
3178
|
-
return o(() => {
|
|
3179
|
-
let a = [];
|
|
3180
|
-
r?.value && i?.value != null && a.push({
|
|
3181
|
-
id: "new-comment-input",
|
|
3182
|
-
anchorPos: 0,
|
|
3183
|
-
fixedY: i.value,
|
|
3184
|
-
priority: -1e3,
|
|
3185
|
-
isTemporary: !0,
|
|
3186
|
-
estimatedHeight: 120,
|
|
3187
|
-
kind: "add-comment"
|
|
3188
|
-
});
|
|
3189
|
-
let o = /* @__PURE__ */ new Map();
|
|
3190
|
-
for (let t of e.value) if (t.parentId != null) {
|
|
3191
|
-
let e = o.get(t.parentId);
|
|
3192
|
-
e ? e.push(t) : o.set(t.parentId, [t]);
|
|
3193
|
-
}
|
|
3194
|
-
for (let t of e.value) t.parentId ?? (t.done && !n?.value || a.push({
|
|
3195
|
-
id: `comment-${t.id}`,
|
|
3196
|
-
anchorPos: 0,
|
|
3197
|
-
anchorKey: `comment-${t.id}`,
|
|
3198
|
-
priority: 0,
|
|
3199
|
-
estimatedHeight: t.done ? 28 : 80,
|
|
3200
|
-
kind: "comment",
|
|
3201
|
-
comment: t,
|
|
3202
|
-
replies: o.get(t.id) ?? []
|
|
3203
|
-
}));
|
|
3204
|
-
return t.value.forEach((e, t) => {
|
|
3205
|
-
a.push({
|
|
3206
|
-
id: `tc-${e.revisionId}-${t}`,
|
|
3207
|
-
anchorPos: e.from,
|
|
3208
|
-
anchorKey: `revision-${e.revisionId}`,
|
|
3209
|
-
priority: 1,
|
|
3210
|
-
estimatedHeight: 80,
|
|
3211
|
-
kind: "tracked-change",
|
|
3212
|
-
change: e,
|
|
3213
|
-
replies: o.get(e.revisionId) ?? []
|
|
3214
|
-
});
|
|
3215
|
-
}), a;
|
|
3216
|
-
});
|
|
3217
|
-
}
|
|
3218
|
-
//#endregion
|
|
3219
|
-
//#region src/components/UnifiedSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
3220
|
-
var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"], ti = ["data-card-id"], ni = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3206
|
+
}), [["__scopeId", "data-v-8ca9e99c"]]), ei = ["data-folio-comments-surface", "tabindex"], ti = ["data-folio-scroll"], ni = ["data-card-id"], ri = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
3221
3207
|
__name: "UnifiedSidebar",
|
|
3222
3208
|
props: {
|
|
3223
3209
|
isOpen: { type: Boolean },
|
|
@@ -3259,7 +3245,7 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3259
3245
|
let t = e.target;
|
|
3260
3246
|
t instanceof HTMLElement && t.closest(".unified-sidebar__card-slot") || f.value !== null && r("update:activeItemId", null);
|
|
3261
3247
|
}
|
|
3262
|
-
let h =
|
|
3248
|
+
let h = Xn({
|
|
3263
3249
|
comments: D(n, "comments"),
|
|
3264
3250
|
trackedChanges: D(n, "trackedChanges"),
|
|
3265
3251
|
showResolved: o(() => n.showResolved ?? !1),
|
|
@@ -3277,7 +3263,7 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3277
3263
|
}
|
|
3278
3264
|
}
|
|
3279
3265
|
function I() {
|
|
3280
|
-
if (
|
|
3266
|
+
if (te(), i.value) {
|
|
3281
3267
|
w.value = /* @__PURE__ */ new Map();
|
|
3282
3268
|
return;
|
|
3283
3269
|
}
|
|
@@ -3286,7 +3272,7 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3286
3272
|
w.value = /* @__PURE__ */ new Map();
|
|
3287
3273
|
return;
|
|
3288
3274
|
}
|
|
3289
|
-
let r = e.getBoundingClientRect(), a =
|
|
3275
|
+
let r = e.getBoundingClientRect(), a = K(e), o = /* @__PURE__ */ new Map();
|
|
3290
3276
|
for (let t of e.querySelectorAll(".docx-insertion[data-revision-id]")) {
|
|
3291
3277
|
let e = t.dataset.revisionId;
|
|
3292
3278
|
e && !o.has(e) && o.set(e, t);
|
|
@@ -3319,32 +3305,32 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3319
3305
|
t && u.set(t, e.offsetHeight);
|
|
3320
3306
|
}
|
|
3321
3307
|
let f = /* @__PURE__ */ new Map();
|
|
3322
|
-
for (let { item: n, y: r } of
|
|
3308
|
+
for (let { item: n, y: r } of ie({
|
|
3323
3309
|
items: t,
|
|
3324
3310
|
anchorPositions: c,
|
|
3325
|
-
renderedDomContext:
|
|
3311
|
+
renderedDomContext: W(e),
|
|
3326
3312
|
zoom: 1,
|
|
3327
3313
|
cardHeights: u,
|
|
3328
3314
|
lastKnown: k
|
|
3329
3315
|
})) f.set(n.id, r);
|
|
3330
3316
|
w.value = f, F();
|
|
3331
3317
|
}
|
|
3332
|
-
let
|
|
3318
|
+
let ee = o(() => {
|
|
3333
3319
|
let e = 0;
|
|
3334
3320
|
for (let t of w.value.values()) e = Math.max(e, t);
|
|
3335
3321
|
return e + 200;
|
|
3336
|
-
}), R = S(null), z =
|
|
3322
|
+
}), R = S(null), z = {
|
|
3337
3323
|
top: 0,
|
|
3338
|
-
width:
|
|
3324
|
+
width: L.drawerWidth,
|
|
3339
3325
|
height: 0
|
|
3340
|
-
});
|
|
3341
|
-
function
|
|
3342
|
-
let e = x.value?.offsetParent, t =
|
|
3326
|
+
}, B = S(z);
|
|
3327
|
+
function te() {
|
|
3328
|
+
let e = x.value?.offsetParent, t = J(n.pagesContainer);
|
|
3343
3329
|
if (!(e instanceof HTMLElement) || !t) return;
|
|
3344
3330
|
let r = e.getBoundingClientRect(), a = t.getBoundingClientRect();
|
|
3345
3331
|
if (i.value) {
|
|
3346
|
-
let e = Math.max(0, Math.min(
|
|
3347
|
-
|
|
3332
|
+
let e = Math.max(0, Math.min(L.drawerWidth, t.clientWidth - 16));
|
|
3333
|
+
B.value = {
|
|
3348
3334
|
top: a.top - r.top,
|
|
3349
3335
|
width: e,
|
|
3350
3336
|
height: t.clientHeight
|
|
@@ -3356,20 +3342,23 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3356
3342
|
R.value = null;
|
|
3357
3343
|
return;
|
|
3358
3344
|
}
|
|
3359
|
-
let s = o.getBoundingClientRect().right - r.left +
|
|
3345
|
+
let s = o.getBoundingClientRect().right - r.left + L.commentsGap, c = Math.max(8, e.clientWidth - L.commentsWidth - 8);
|
|
3360
3346
|
R.value = Math.max(8, Math.min(s, c));
|
|
3361
3347
|
}
|
|
3362
|
-
let
|
|
3348
|
+
let ne = o(() => ({
|
|
3363
3349
|
position: "sticky",
|
|
3364
3350
|
top: 0,
|
|
3365
|
-
maxHeight:
|
|
3351
|
+
maxHeight: B.value.height || void 0,
|
|
3366
3352
|
overflowY: "auto",
|
|
3367
|
-
paddingBlock:
|
|
3353
|
+
paddingBlock: L.commentsGap + "px",
|
|
3368
3354
|
boxSizing: "border-box"
|
|
3369
|
-
})),
|
|
3355
|
+
})), V = o(() => {
|
|
3370
3356
|
let e = f.value;
|
|
3371
3357
|
if (!e) return "";
|
|
3372
|
-
if (e.startsWith("comment-"))
|
|
3358
|
+
if (e.startsWith("comment-")) {
|
|
3359
|
+
let t = e.slice(8);
|
|
3360
|
+
return `${G(t, ".paged-editor__pages ")} { background-color: rgba(255, 212, 0, 0.35) !important; border-bottom: 2px solid rgba(255, 212, 0, 0.7) !important; }`;
|
|
3361
|
+
}
|
|
3373
3362
|
if (e.startsWith("tc-")) {
|
|
3374
3363
|
let t = e.split("-").at(1) ?? "";
|
|
3375
3364
|
return `
|
|
@@ -3378,20 +3367,20 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3378
3367
|
`;
|
|
3379
3368
|
}
|
|
3380
3369
|
return "";
|
|
3381
|
-
}),
|
|
3370
|
+
}), re = o(() => {
|
|
3382
3371
|
let e = i.value, t = e ? R.value !== null : w.value.size > 0 || h.value.length === 0;
|
|
3383
3372
|
return {
|
|
3384
3373
|
position: "absolute",
|
|
3385
|
-
top: e ?
|
|
3386
|
-
left: R.value === null ? `calc(50% + ${n.pageWidthPx / 2 +
|
|
3387
|
-
width: (e ?
|
|
3388
|
-
paddingInline: e ?
|
|
3374
|
+
top: e ? B.value.top + "px" : "0",
|
|
3375
|
+
left: R.value === null ? `calc(50% + ${n.pageWidthPx / 2 + L.commentsGap}px)` : R.value + "px",
|
|
3376
|
+
width: (e ? B.value.width : L.commentsWidth) + "px",
|
|
3377
|
+
paddingInline: e ? L.commentsGap + "px" : void 0,
|
|
3389
3378
|
bottom: e ? void 0 : 0,
|
|
3390
3379
|
opacity: +!!t,
|
|
3391
3380
|
pointerEvents: t ? "auto" : "none"
|
|
3392
3381
|
};
|
|
3393
3382
|
});
|
|
3394
|
-
function
|
|
3383
|
+
function H(e) {
|
|
3395
3384
|
if (i.value) return {
|
|
3396
3385
|
position: "relative",
|
|
3397
3386
|
marginBottom: "8px"
|
|
@@ -3408,10 +3397,10 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3408
3397
|
transition: "top 0.15s ease"
|
|
3409
3398
|
};
|
|
3410
3399
|
}
|
|
3411
|
-
let
|
|
3412
|
-
function
|
|
3413
|
-
|
|
3414
|
-
|
|
3400
|
+
let U = !1;
|
|
3401
|
+
function q() {
|
|
3402
|
+
U || (U = !0, requestAnimationFrame(() => {
|
|
3403
|
+
U = !1, I();
|
|
3415
3404
|
}));
|
|
3416
3405
|
}
|
|
3417
3406
|
j(() => [
|
|
@@ -3424,8 +3413,8 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3424
3413
|
n.addCommentYPosition,
|
|
3425
3414
|
n.surface,
|
|
3426
3415
|
n.isOpen
|
|
3427
|
-
], () =>
|
|
3428
|
-
function
|
|
3416
|
+
], () => q(), { immediate: !0 });
|
|
3417
|
+
function J(e) {
|
|
3429
3418
|
let t = e?.parentElement ?? null;
|
|
3430
3419
|
for (; t;) {
|
|
3431
3420
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -3434,16 +3423,16 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3434
3423
|
}
|
|
3435
3424
|
return null;
|
|
3436
3425
|
}
|
|
3437
|
-
let
|
|
3438
|
-
function
|
|
3439
|
-
|
|
3426
|
+
let Y = null;
|
|
3427
|
+
function ae() {
|
|
3428
|
+
Y && Y.removeEventListener("scroll", q), Y = J(n.pagesContainer), Y && (Y.addEventListener("scroll", q, { passive: !0 }), A?.observe(Y));
|
|
3440
3429
|
}
|
|
3441
3430
|
return y(() => {
|
|
3442
|
-
N = new ResizeObserver(() =>
|
|
3431
|
+
N = new ResizeObserver(() => q()), q(), n.pagesContainer && (A = new ResizeObserver(() => q()), A.observe(n.pagesContainer), ae()), window.addEventListener("resize", q);
|
|
3443
3432
|
}), j(() => n.pagesContainer, (e) => {
|
|
3444
|
-
A?.disconnect(), A = null, e && (A = new ResizeObserver(() =>
|
|
3433
|
+
A?.disconnect(), A = null, e && (A = new ResizeObserver(() => q()), A.observe(e)), ae(), q();
|
|
3445
3434
|
}), v(() => {
|
|
3446
|
-
A?.disconnect(), N?.disconnect(),
|
|
3435
|
+
A?.disconnect(), N?.disconnect(), Y && Y.removeEventListener("scroll", q), window.removeEventListener("resize", q);
|
|
3447
3436
|
}), j(() => n.isOpen && i.value, (e, t, n) => {
|
|
3448
3437
|
if (!e || typeof document > "u") return;
|
|
3449
3438
|
let i = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
@@ -3457,8 +3446,8 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3457
3446
|
}, {
|
|
3458
3447
|
immediate: !0,
|
|
3459
3448
|
flush: "post"
|
|
3460
|
-
}), (t, n) => (b(), l(a, null, [
|
|
3461
|
-
default: M(() => [d(E(
|
|
3449
|
+
}), (t, n) => (b(), l(a, null, [V.value ? (b(), s(T("style"), { key: 0 }, {
|
|
3450
|
+
default: M(() => [d(E(V.value), 1)]),
|
|
3462
3451
|
_: 1
|
|
3463
3452
|
})) : c("", !0), e.isOpen ? (b(), l("aside", {
|
|
3464
3453
|
key: 1,
|
|
@@ -3468,26 +3457,26 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3468
3457
|
"data-folio-comments-surface": e.surface ?? "column",
|
|
3469
3458
|
"data-testid": "folio-comments",
|
|
3470
3459
|
tabindex: i.value ? -1 : void 0,
|
|
3471
|
-
style: _(
|
|
3460
|
+
style: _(re.value),
|
|
3472
3461
|
onMousedown: m
|
|
3473
3462
|
}, [u("div", {
|
|
3474
3463
|
class: "unified-sidebar__inner",
|
|
3475
3464
|
"data-folio-scroll": i.value ? "" : void 0,
|
|
3476
|
-
style: _(i.value ?
|
|
3465
|
+
style: _(i.value ? ne.value : { minHeight: ee.value + "px" })
|
|
3477
3466
|
}, [(b(!0), l(a, null, C(O(h), (e) => (b(), l("div", {
|
|
3478
3467
|
key: e.id,
|
|
3479
3468
|
class: "unified-sidebar__card-slot",
|
|
3480
3469
|
"data-card-id": e.id,
|
|
3481
|
-
style: _(
|
|
3482
|
-
}, [e.kind === "add-comment" ? (b(), s(
|
|
3470
|
+
style: _(H(e.id))
|
|
3471
|
+
}, [e.kind === "add-comment" ? (b(), s(er, {
|
|
3483
3472
|
key: 0,
|
|
3484
3473
|
onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
|
|
3485
3474
|
onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
|
|
3486
|
-
})) : e.kind === "comment" && e.comment.done && f.value !== e.id ? (b(), s(
|
|
3475
|
+
})) : e.kind === "comment" && e.comment.done && f.value !== e.id ? (b(), s(Ar, {
|
|
3487
3476
|
key: 1,
|
|
3488
3477
|
comment: e.comment,
|
|
3489
3478
|
onToggleExpand: (t) => p(e.id)
|
|
3490
|
-
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(
|
|
3479
|
+
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(Or, {
|
|
3491
3480
|
key: 2,
|
|
3492
3481
|
comment: e.comment,
|
|
3493
3482
|
replies: e.replies,
|
|
@@ -3502,7 +3491,7 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3502
3491
|
"replies",
|
|
3503
3492
|
"expanded",
|
|
3504
3493
|
"onClick"
|
|
3505
|
-
])) : e.kind === "tracked-change" ? (b(), s(
|
|
3494
|
+
])) : e.kind === "tracked-change" ? (b(), s($r, {
|
|
3506
3495
|
key: 3,
|
|
3507
3496
|
change: e.change,
|
|
3508
3497
|
replies: e.replies ?? [],
|
|
@@ -3518,73 +3507,14 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3518
3507
|
"replies",
|
|
3519
3508
|
"expanded",
|
|
3520
3509
|
"onClick"
|
|
3521
|
-
])) : c("", !0)], 12,
|
|
3522
|
-
}
|
|
3523
|
-
}), [["__scopeId", "data-v-d3e7ed23"]]), ri = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3524
|
-
__name: "StylePicker",
|
|
3525
|
-
props: {
|
|
3526
|
-
value: {},
|
|
3527
|
-
styles: {},
|
|
3528
|
-
disabled: {
|
|
3529
|
-
type: Boolean,
|
|
3530
|
-
default: !1
|
|
3531
|
-
},
|
|
3532
|
-
className: {}
|
|
3533
|
-
},
|
|
3534
|
-
emits: ["change"],
|
|
3535
|
-
setup(e, { emit: t }) {
|
|
3536
|
-
let { Select: n } = i(), r = e, a = t, c = [
|
|
3537
|
-
{
|
|
3538
|
-
styleId: "Normal",
|
|
3539
|
-
name: "Normal text"
|
|
3540
|
-
},
|
|
3541
|
-
{
|
|
3542
|
-
styleId: "Title",
|
|
3543
|
-
name: "Title"
|
|
3544
|
-
},
|
|
3545
|
-
{
|
|
3546
|
-
styleId: "Subtitle",
|
|
3547
|
-
name: "Subtitle"
|
|
3548
|
-
},
|
|
3549
|
-
{
|
|
3550
|
-
styleId: "Heading1",
|
|
3551
|
-
name: "Heading 1"
|
|
3552
|
-
},
|
|
3553
|
-
{
|
|
3554
|
-
styleId: "Heading2",
|
|
3555
|
-
name: "Heading 2"
|
|
3556
|
-
},
|
|
3557
|
-
{
|
|
3558
|
-
styleId: "Heading3",
|
|
3559
|
-
name: "Heading 3"
|
|
3560
|
-
}
|
|
3561
|
-
], l = o(() => r.styles ?? c), u = o(() => l.value.map((e) => ({
|
|
3562
|
-
value: e.styleId,
|
|
3563
|
-
label: e.name
|
|
3564
|
-
})));
|
|
3565
|
-
function d(e) {
|
|
3566
|
-
a("change", e);
|
|
3567
|
-
}
|
|
3568
|
-
return (t, r) => (b(), s(O(n), {
|
|
3569
|
-
class: g(["docx-style-picker", e.className]),
|
|
3570
|
-
value: e.value ?? "Normal",
|
|
3571
|
-
items: u.value,
|
|
3572
|
-
disabled: e.disabled,
|
|
3573
|
-
"aria-label": "Paragraph style",
|
|
3574
|
-
onChange: d
|
|
3575
|
-
}, null, 8, [
|
|
3576
|
-
"value",
|
|
3577
|
-
"items",
|
|
3578
|
-
"disabled",
|
|
3579
|
-
"class"
|
|
3580
|
-
]));
|
|
3510
|
+
])) : c("", !0)], 12, ni))), 128))], 12, ti)], 46, ei)) : c("", !0)], 64));
|
|
3581
3511
|
}
|
|
3582
|
-
}), [["__scopeId", "data-v-
|
|
3512
|
+
}), [["__scopeId", "data-v-8a0965e0"]]), ii = [
|
|
3583
3513
|
"disabled",
|
|
3584
3514
|
"title",
|
|
3585
3515
|
"aria-expanded",
|
|
3586
3516
|
"onClick"
|
|
3587
|
-
], ai = { class: "docx-align__panel" }, oi = ["title", "onClick"], si = /*#__PURE__*/
|
|
3517
|
+
], ai = { class: "docx-align__panel" }, oi = ["title", "onClick"], si = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
3588
3518
|
__name: "AlignmentButtons",
|
|
3589
3519
|
props: {
|
|
3590
3520
|
value: { default: "left" },
|
|
@@ -3657,7 +3587,7 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3657
3587
|
_: 1
|
|
3658
3588
|
}, 8, ["open"]));
|
|
3659
3589
|
}
|
|
3660
|
-
}), [["__scopeId", "data-v-
|
|
3590
|
+
}), [["__scopeId", "data-v-de187b7d"]]), ci = { class: "docx-list-btns" }, li = ["disabled"], ui = ["disabled"], di = ["disabled"], fi = ["disabled"], pi = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
3661
3591
|
__name: "ListButtons",
|
|
3662
3592
|
props: {
|
|
3663
3593
|
listState: {},
|
|
@@ -3723,6 +3653,65 @@ var $r = ["data-folio-comments-surface", "tabindex"], ei = ["data-folio-scroll"]
|
|
|
3723
3653
|
})], 8, fi)], 64)) : c("", !0)
|
|
3724
3654
|
]));
|
|
3725
3655
|
}
|
|
3726
|
-
}), [["__scopeId", "data-v-
|
|
3656
|
+
}), [["__scopeId", "data-v-df3a6cfe"]]), mi = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
|
3657
|
+
__name: "StylePicker",
|
|
3658
|
+
props: {
|
|
3659
|
+
value: {},
|
|
3660
|
+
styles: {},
|
|
3661
|
+
disabled: {
|
|
3662
|
+
type: Boolean,
|
|
3663
|
+
default: !1
|
|
3664
|
+
},
|
|
3665
|
+
className: {}
|
|
3666
|
+
},
|
|
3667
|
+
emits: ["change"],
|
|
3668
|
+
setup(e, { emit: t }) {
|
|
3669
|
+
let { Select: n } = i(), r = e, a = t, c = [
|
|
3670
|
+
{
|
|
3671
|
+
styleId: "Normal",
|
|
3672
|
+
name: "Normal text"
|
|
3673
|
+
},
|
|
3674
|
+
{
|
|
3675
|
+
styleId: "Title",
|
|
3676
|
+
name: "Title"
|
|
3677
|
+
},
|
|
3678
|
+
{
|
|
3679
|
+
styleId: "Subtitle",
|
|
3680
|
+
name: "Subtitle"
|
|
3681
|
+
},
|
|
3682
|
+
{
|
|
3683
|
+
styleId: "Heading1",
|
|
3684
|
+
name: "Heading 1"
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
styleId: "Heading2",
|
|
3688
|
+
name: "Heading 2"
|
|
3689
|
+
},
|
|
3690
|
+
{
|
|
3691
|
+
styleId: "Heading3",
|
|
3692
|
+
name: "Heading 3"
|
|
3693
|
+
}
|
|
3694
|
+
], l = o(() => r.styles ?? c), u = o(() => l.value.map((e) => ({
|
|
3695
|
+
value: e.styleId,
|
|
3696
|
+
label: e.name
|
|
3697
|
+
})));
|
|
3698
|
+
function d(e) {
|
|
3699
|
+
a("change", e);
|
|
3700
|
+
}
|
|
3701
|
+
return (t, r) => (b(), s(O(n), {
|
|
3702
|
+
class: g(["docx-style-picker", e.className]),
|
|
3703
|
+
value: e.value ?? "Normal",
|
|
3704
|
+
items: u.value,
|
|
3705
|
+
disabled: e.disabled,
|
|
3706
|
+
"aria-label": "Paragraph style",
|
|
3707
|
+
onChange: d
|
|
3708
|
+
}, null, 8, [
|
|
3709
|
+
"value",
|
|
3710
|
+
"items",
|
|
3711
|
+
"disabled",
|
|
3712
|
+
"class"
|
|
3713
|
+
]));
|
|
3714
|
+
}
|
|
3715
|
+
}), [["__scopeId", "data-v-44de0ff6"]]);
|
|
3727
3716
|
//#endregion
|
|
3728
|
-
export {
|
|
3717
|
+
export { Be as C, oe as D, ue as E, Qe as S, fe as T, Qt as _, $r as a, et as b, _r as c, Yn as d, Un as f, nn as g, cn as h, ri as i, lr as l, ln as m, pi as n, Ar as o, Hn as p, si as r, Or as s, mi as t, er as u, Zt as v, he as w, $e as x, Bt as y };
|