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