@stll/folio-vue 0.21.1 → 0.22.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-DIWR-Q8d.cjs +4 -0
- package/dist/{ListButtons-CSyBR9KM.js → ListButtons-DjLPhg8p.js} +398 -379
- package/dist/{SplitCellDialog-NOmSMMla.cjs → SplitCellDialog-B_z6ynxm.cjs} +2 -2
- package/dist/components/DocxEditor/types.d.ts +2 -0
- package/dist/composables/useCommentManagement.d.ts +2 -0
- package/dist/composables/useDocxEditor.d.ts +2 -0
- package/dist/composables/useDocxEditorRefApi.d.ts +3 -2
- package/dist/composables/usePageSetupControls.d.ts +2 -0
- package/dist/composables/usePagesPointer.d.ts +3 -0
- package/dist/composables/useTransientNotice.d.ts +5 -0
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +1 -1
- package/dist/dialogs.cjs +1 -1
- package/dist/folio-vue.css +1 -1
- package/dist/i18n/messages/ar.d.ts +1 -0
- package/dist/i18n/messages/cs.d.ts +1 -0
- package/dist/i18n/messages/de.d.ts +1 -0
- package/dist/i18n/messages/en.d.ts +1 -0
- package/dist/i18n/messages/es.d.ts +1 -0
- package/dist/i18n/messages/et.d.ts +1 -0
- package/dist/i18n/messages/fr.d.ts +1 -0
- package/dist/i18n/messages/he.d.ts +1 -0
- package/dist/i18n/messages/hi.d.ts +1 -0
- package/dist/i18n/messages/hu.d.ts +1 -0
- package/dist/i18n/messages/locales.d.ts +1 -0
- package/dist/i18n/messages/lt.d.ts +1 -0
- package/dist/i18n/messages/lv.d.ts +1 -0
- package/dist/i18n/messages/pl.d.ts +1 -0
- package/dist/i18n/messages/pt-BR.d.ts +1 -0
- package/dist/i18n/messages/sk.d.ts +1 -0
- package/dist/i18n/messages/tr.d.ts +1 -0
- package/dist/i18n/messages/zh-CN.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1496 -1362
- package/dist/messages/ar.cjs +1 -0
- package/dist/messages/ar.js +2 -0
- package/dist/messages/cs.cjs +1 -0
- package/dist/messages/cs.js +2 -0
- package/dist/messages/de.cjs +1 -0
- package/dist/messages/de.js +2 -0
- package/dist/messages/en.cjs +1 -0
- package/dist/messages/en.js +2 -0
- package/dist/messages/es.cjs +1 -0
- package/dist/messages/es.js +2 -0
- package/dist/messages/et.cjs +1 -0
- package/dist/messages/et.js +2 -0
- package/dist/messages/fr.cjs +1 -0
- package/dist/messages/fr.js +2 -0
- package/dist/messages/he.cjs +1 -0
- package/dist/messages/he.js +2 -0
- package/dist/messages/hi.cjs +1 -0
- package/dist/messages/hi.js +2 -0
- package/dist/messages/hu.cjs +1 -0
- package/dist/messages/hu.js +2 -0
- package/dist/messages/locales.cjs +1 -0
- package/dist/messages/locales.js +2 -0
- package/dist/messages/lt.cjs +1 -0
- package/dist/messages/lt.js +2 -0
- package/dist/messages/lv.cjs +1 -0
- package/dist/messages/lv.js +2 -0
- package/dist/messages/pl.cjs +1 -0
- package/dist/messages/pl.js +2 -0
- package/dist/messages/pt-BR.cjs +1 -0
- package/dist/messages/pt-BR.js +2 -0
- package/dist/messages/sk.cjs +1 -0
- package/dist/messages/sk.js +2 -0
- package/dist/messages/tr.cjs +1 -0
- package/dist/messages/tr.js +2 -0
- package/dist/messages/zh-CN.cjs +1 -0
- package/dist/messages/zh-CN.js +2 -0
- package/dist/rolldown-runtime-C6qsp3rV.cjs +1 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/useZoom-BT2c88KW.cjs +1 -0
- package/dist/{useZoom-C75jJC2q.js → useZoom-BycIz5VE.js} +324 -283
- package/dist/utils/domQueries.d.ts +2 -6
- package/dist/utils/viewportPosition.d.ts +11 -0
- package/package.json +8 -3
- package/dist/ListButtons-BSRd6dsB.cjs +0 -4
- package/dist/useZoom-Df8U8Fko.cjs +0 -1
|
@@ -10,9 +10,10 @@ import { pixelsToTwips as W, twipsToPixels as G } from "@stll/folio-core/utils/u
|
|
|
10
10
|
import { DISPLAY_MODES as K } from "@stll/folio-core/managers/EditorModeManager";
|
|
11
11
|
import { redoDepth as ee, undoDepth as te } from "prosemirror-history";
|
|
12
12
|
import { clearFormatting as q } from "@stll/folio-core/prosemirror/commands/formatting";
|
|
13
|
-
import {
|
|
13
|
+
import { executeEditorCommand as J } from "@stll/folio-core/prosemirror/executeEditorCommand";
|
|
14
|
+
import { resolveSidebarItemPositions as Y } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
|
|
14
15
|
//#region src/components/CommentMarginMarkers.vue?vue&type=script&setup=true&lang.ts
|
|
15
|
-
var
|
|
16
|
+
var X = ["title", "onClick"], ne = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
16
17
|
__name: "CommentMarginMarkers",
|
|
17
18
|
props: {
|
|
18
19
|
comments: {},
|
|
@@ -62,12 +63,12 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
62
63
|
}, [f(r, {
|
|
63
64
|
name: n.isResolved ? "chat_bubble_check" : "chat_bubble_outline",
|
|
64
65
|
size: 18
|
|
65
|
-
}, null, 8, ["name"])], 12,
|
|
66
|
+
}, null, 8, ["name"])], 12, X))), 128))], 36)) : c("", !0);
|
|
66
67
|
}
|
|
67
|
-
}), [["__scopeId", "data-v-bf75a017"]]),
|
|
68
|
+
}), [["__scopeId", "data-v-bf75a017"]]), Z = { class: "doc-name" }, re = ["value"], ie = {
|
|
68
69
|
key: 1,
|
|
69
70
|
class: "doc-name__text"
|
|
70
|
-
},
|
|
71
|
+
}, ae = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
71
72
|
__name: "DocumentName",
|
|
72
73
|
props: {
|
|
73
74
|
modelValue: {},
|
|
@@ -89,16 +90,16 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
89
90
|
let t = e.target;
|
|
90
91
|
t instanceof HTMLInputElement && (t.value.trim() || r("update:modelValue", "Untitled document.docx"));
|
|
91
92
|
}
|
|
92
|
-
return (t, n) => (b(), l("div",
|
|
93
|
+
return (t, n) => (b(), l("div", Z, [e.editable ? (b(), l("input", {
|
|
93
94
|
key: 0,
|
|
94
95
|
class: "doc-name__input",
|
|
95
96
|
value: i.value,
|
|
96
97
|
placeholder: "Untitled document",
|
|
97
98
|
onInput: a,
|
|
98
99
|
onBlur: s
|
|
99
|
-
}, null, 40,
|
|
100
|
+
}, null, 40, re)) : (b(), l("span", ie, E(i.value || "Untitled document"), 1))]));
|
|
100
101
|
}
|
|
101
|
-
}), [["__scopeId", "data-v-ae6cb472"]]),
|
|
102
|
+
}), [["__scopeId", "data-v-ae6cb472"]]), oe = ["aria-selected", "onMouseenter"], se = { class: "docx-table-grid-inline__label" }, ce = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
102
103
|
__name: "TableGridInline",
|
|
103
104
|
props: {
|
|
104
105
|
gridRows: { default: 6 },
|
|
@@ -134,15 +135,15 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
134
135
|
i.value = e.r, s.value = e.c;
|
|
135
136
|
},
|
|
136
137
|
onClick: F(d, ["prevent"])
|
|
137
|
-
}, null, 42,
|
|
138
|
+
}, null, 42, oe))), 128))], 36), u("div", se, E(i.value > 0 && s.value > 0 ? `${s.value} × ${i.value}` : "Select size"), 1)]));
|
|
138
139
|
}
|
|
139
|
-
}), [["__scopeId", "data-v-79c593ca"]]),
|
|
140
|
+
}), [["__scopeId", "data-v-79c593ca"]]), le = {
|
|
140
141
|
class: "menu-bar",
|
|
141
142
|
role: "menubar"
|
|
142
|
-
},
|
|
143
|
+
}, ue = {
|
|
143
144
|
key: 1,
|
|
144
145
|
class: "menu-bar__break-submenu"
|
|
145
|
-
},
|
|
146
|
+
}, de = ["onClick"], fe = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
146
147
|
__name: "MenuBar",
|
|
147
148
|
props: {
|
|
148
149
|
showFileOpen: {
|
|
@@ -238,7 +239,7 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
238
239
|
label: h("toolbar.reportIssue"),
|
|
239
240
|
onClick: g("reportIssue")
|
|
240
241
|
}]);
|
|
241
|
-
return (t, n) => (b(), l("div",
|
|
242
|
+
return (t, n) => (b(), l("div", le, [
|
|
242
243
|
f(O(d), {
|
|
243
244
|
label: O(h)("toolbar.file"),
|
|
244
245
|
items: _.value
|
|
@@ -251,12 +252,12 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
251
252
|
label: O(h)("toolbar.insert"),
|
|
252
253
|
items: y.value
|
|
253
254
|
}, {
|
|
254
|
-
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(
|
|
255
|
+
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(ce, {
|
|
255
256
|
key: 0,
|
|
256
257
|
onInsert: (e, n) => {
|
|
257
258
|
m("insert-table", e, n), t();
|
|
258
259
|
}
|
|
259
|
-
}, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div",
|
|
260
|
+
}, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div", ue, [(b(!0), l(a, null, C(x.value, (e) => (b(), l("button", {
|
|
260
261
|
key: e.action,
|
|
261
262
|
type: "button",
|
|
262
263
|
class: "menu-bar__break-item",
|
|
@@ -266,7 +267,7 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
266
267
|
}, [f(r, {
|
|
267
268
|
name: e.icon,
|
|
268
269
|
size: 18
|
|
269
|
-
}, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8,
|
|
270
|
+
}, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8, de))), 128))])) : c("", !0)]),
|
|
270
271
|
_: 1
|
|
271
272
|
}, 8, ["label", "items"]),
|
|
272
273
|
e.showHelpMenu ? (b(), s(O(d), {
|
|
@@ -276,13 +277,13 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
276
277
|
}, null, 8, ["label", "items"])) : c("", !0)
|
|
277
278
|
]));
|
|
278
279
|
}
|
|
279
|
-
}), [["__scopeId", "data-v-bd3f3f2c"]]),
|
|
280
|
+
}), [["__scopeId", "data-v-bd3f3f2c"]]), pe = [
|
|
280
281
|
"disabled",
|
|
281
282
|
"aria-label",
|
|
282
283
|
"title",
|
|
283
284
|
"aria-expanded",
|
|
284
285
|
"onClick"
|
|
285
|
-
],
|
|
286
|
+
], Q = { class: "docx-icon-grid__panel" }, me = ["title", "onClick"], he = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
286
287
|
__name: "IconGridDropdown",
|
|
287
288
|
props: {
|
|
288
289
|
options: {},
|
|
@@ -318,8 +319,8 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
318
319
|
}, null, 8, ["name"]), f(r, {
|
|
319
320
|
name: "arrow_drop_down",
|
|
320
321
|
size: 14
|
|
321
|
-
})], 10,
|
|
322
|
-
panel: M(() => [u("div",
|
|
322
|
+
})], 10, pe)]),
|
|
323
|
+
panel: M(() => [u("div", Q, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
|
|
323
324
|
key: t.value,
|
|
324
325
|
type: "button",
|
|
325
326
|
class: g(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === t.value }]),
|
|
@@ -328,11 +329,11 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
328
329
|
}, [f(r, {
|
|
329
330
|
name: t.iconName,
|
|
330
331
|
size: 18
|
|
331
|
-
}, null, 8, ["name"])], 10,
|
|
332
|
+
}, null, 8, ["name"])], 10, me))), 128))])]),
|
|
332
333
|
_: 1
|
|
333
334
|
}, 8, ["open"]));
|
|
334
335
|
}
|
|
335
|
-
}), [["__scopeId", "data-v-72fa875c"]]),
|
|
336
|
+
}), [["__scopeId", "data-v-72fa875c"]]), ge = /* @__PURE__ */ p({
|
|
336
337
|
__name: "ImageWrapDropdown",
|
|
337
338
|
props: {
|
|
338
339
|
imageContext: {},
|
|
@@ -379,7 +380,7 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
379
380
|
let e = t.imageContext;
|
|
380
381
|
return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
|
|
381
382
|
}), 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 ?? "");
|
|
382
|
-
return (t, n) => (b(), s(
|
|
383
|
+
return (t, n) => (b(), s(he, {
|
|
383
384
|
options: a.value,
|
|
384
385
|
"active-value": c.value,
|
|
385
386
|
"trigger-icon": u.value,
|
|
@@ -394,7 +395,7 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
394
395
|
"disabled"
|
|
395
396
|
]));
|
|
396
397
|
}
|
|
397
|
-
}),
|
|
398
|
+
}), _e = /* @__PURE__ */ p({
|
|
398
399
|
__name: "ImageTransformDropdown",
|
|
399
400
|
props: { disabled: { type: Boolean } },
|
|
400
401
|
emits: ["transform"],
|
|
@@ -425,7 +426,7 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
425
426
|
label: t(e.labelKey),
|
|
426
427
|
iconName: e.iconName
|
|
427
428
|
})));
|
|
428
|
-
return (n, r) => (b(), s(
|
|
429
|
+
return (n, r) => (b(), s(he, {
|
|
429
430
|
options: i.value,
|
|
430
431
|
"trigger-icon": "rotate_right",
|
|
431
432
|
"tooltip-content": O(t)("imageTransform.tooltip"),
|
|
@@ -437,10 +438,10 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
437
438
|
"disabled"
|
|
438
439
|
]));
|
|
439
440
|
}
|
|
440
|
-
}),
|
|
441
|
+
}), ve = ["title", "onClick"], ye = {
|
|
441
442
|
key: 0,
|
|
442
443
|
class: "editing-mode__label"
|
|
443
|
-
},
|
|
444
|
+
}, be = { class: "editing-mode__panel" }, xe = ["onClick"], Se = { class: "editing-mode__option-text" }, Ce = { class: "editing-mode__option-label" }, we = { class: "editing-mode__option-desc" }, Te = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
444
445
|
__name: "EditingModeDropdown",
|
|
445
446
|
props: { modelValue: {} },
|
|
446
447
|
emits: ["update:modelValue"],
|
|
@@ -493,13 +494,13 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
493
494
|
name: D.value.icon,
|
|
494
495
|
size: 18
|
|
495
496
|
}, null, 8, ["name"]),
|
|
496
|
-
T.value ? c("", !0) : (b(), l("span",
|
|
497
|
+
T.value ? c("", !0) : (b(), l("span", ye, E(O(d)(D.value.labelKey)), 1)),
|
|
497
498
|
f(r, {
|
|
498
499
|
name: "arrow_drop_down",
|
|
499
500
|
size: 16
|
|
500
501
|
})
|
|
501
|
-
], 10,
|
|
502
|
-
panel: M(() => [u("div",
|
|
502
|
+
], 10, ve)]),
|
|
503
|
+
panel: M(() => [u("div", be, [(b(), l(a, null, C(x, (t) => u("button", {
|
|
503
504
|
key: t.value,
|
|
504
505
|
type: "button",
|
|
505
506
|
class: "editing-mode__option",
|
|
@@ -509,23 +510,23 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
509
510
|
name: t.icon,
|
|
510
511
|
size: 20
|
|
511
512
|
}, null, 8, ["name"]),
|
|
512
|
-
u("span",
|
|
513
|
+
u("span", Se, [u("span", Ce, E(O(d)(t.labelKey)), 1), u("span", we, E(O(d)(t.descKey)), 1)]),
|
|
513
514
|
t.value === e.modelValue ? (b(), s(r, {
|
|
514
515
|
key: 0,
|
|
515
516
|
name: "check",
|
|
516
517
|
size: 18,
|
|
517
518
|
class: "editing-mode__check"
|
|
518
519
|
})) : c("", !0)
|
|
519
|
-
], 8,
|
|
520
|
+
], 8, xe)), 64))])]),
|
|
520
521
|
_: 1
|
|
521
522
|
}, 8, ["open"]));
|
|
522
523
|
}
|
|
523
|
-
}), [["__scopeId", "data-v-333d7e96"]]),
|
|
524
|
+
}), [["__scopeId", "data-v-333d7e96"]]), Ee = { class: "review-controls" }, De = [
|
|
524
525
|
"disabled",
|
|
525
526
|
"aria-pressed",
|
|
526
527
|
"aria-label",
|
|
527
528
|
"title"
|
|
528
|
-
],
|
|
529
|
+
], Oe = { class: "review-controls__toggle-label" }, ke = ["title", "onClick"], Ae = { class: "review-controls__display-label" }, je = ["onClick"], Me = { class: "review-controls__option-label" }, Ne = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
529
530
|
__name: "ReviewControls",
|
|
530
531
|
props: {
|
|
531
532
|
trackChangesOn: { type: Boolean },
|
|
@@ -550,7 +551,7 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
550
551
|
function w(e) {
|
|
551
552
|
h("update:display-mode", e), _.value = !1;
|
|
552
553
|
}
|
|
553
|
-
return (t, n) => (b(), l("div",
|
|
554
|
+
return (t, n) => (b(), l("div", Ee, [u("button", {
|
|
554
555
|
type: "button",
|
|
555
556
|
class: g(["review-controls__toggle", { "review-controls__toggle--on": e.trackChangesOn }]),
|
|
556
557
|
disabled: e.readOnly,
|
|
@@ -562,7 +563,7 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
562
563
|
}, [f(r, {
|
|
563
564
|
name: "edit_note",
|
|
564
565
|
size: 18
|
|
565
|
-
}), u("span",
|
|
566
|
+
}), u("span", Oe, E(e.trackChangesOn ? O(d)("trackingOn") : O(d)("trackingOff")), 1)], 42, De), f(O(p), {
|
|
566
567
|
open: _.value,
|
|
567
568
|
placement: "bottom-right",
|
|
568
569
|
"onUpdate:open": n[4] ||= (e) => _.value = e,
|
|
@@ -579,12 +580,12 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
579
580
|
name: "visibility",
|
|
580
581
|
size: 16
|
|
581
582
|
}),
|
|
582
|
-
u("span",
|
|
583
|
+
u("span", Ae, E(x.value), 1),
|
|
583
584
|
f(r, {
|
|
584
585
|
name: "arrow_drop_down",
|
|
585
586
|
size: 16
|
|
586
587
|
})
|
|
587
|
-
], 42,
|
|
588
|
+
], 42, ke)]),
|
|
588
589
|
panel: M(() => [u("div", {
|
|
589
590
|
class: "review-controls__panel",
|
|
590
591
|
onMousedown: n[3] ||= F(() => {}, ["prevent"])
|
|
@@ -593,35 +594,35 @@ var Y = ["title", "onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
593
594
|
type: "button",
|
|
594
595
|
class: "review-controls__option",
|
|
595
596
|
onClick: F((e) => w(t), ["prevent"])
|
|
596
|
-
}, [u("span",
|
|
597
|
+
}, [u("span", Me, E(y(t)), 1), t === e.displayMode ? (b(), s(r, {
|
|
597
598
|
key: 0,
|
|
598
599
|
name: "check",
|
|
599
600
|
size: 18,
|
|
600
601
|
class: "review-controls__check"
|
|
601
|
-
})) : c("", !0)], 8,
|
|
602
|
+
})) : c("", !0)], 8, je))), 128))], 32)]),
|
|
602
603
|
_: 1
|
|
603
604
|
}, 8, ["open"])]));
|
|
604
605
|
}
|
|
605
606
|
}), [["__scopeId", "data-v-e54a1ec7"]]);
|
|
606
607
|
//#endregion
|
|
607
608
|
//#region src/utils/fontOptions.ts
|
|
608
|
-
function
|
|
609
|
+
function Pe(e) {
|
|
609
610
|
if (e === void 0) return;
|
|
610
611
|
let t = e.map((e) => typeof e == "string" ? {
|
|
611
612
|
name: e,
|
|
612
613
|
fontFamily: e,
|
|
613
614
|
category: "other"
|
|
614
615
|
} : e);
|
|
615
|
-
if (
|
|
616
|
+
if (Fe()) {
|
|
616
617
|
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
617
618
|
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);
|
|
618
619
|
}
|
|
619
620
|
return t;
|
|
620
621
|
}
|
|
621
|
-
function
|
|
622
|
+
function Fe() {
|
|
622
623
|
return typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
623
624
|
}
|
|
624
|
-
function
|
|
625
|
+
function Ie(e, t) {
|
|
625
626
|
if (!e || e.length === 0) return [];
|
|
626
627
|
let n = /* @__PURE__ */ new Set();
|
|
627
628
|
for (let e of t) n.add(e.trim().toLowerCase());
|
|
@@ -634,7 +635,7 @@ function Fe(e, t) {
|
|
|
634
635
|
}
|
|
635
636
|
//#endregion
|
|
636
637
|
//#region src/components/Toolbar/presets.ts
|
|
637
|
-
var
|
|
638
|
+
var Le = [
|
|
638
639
|
{
|
|
639
640
|
name: "Arial",
|
|
640
641
|
fontFamily: "Arial",
|
|
@@ -695,7 +696,7 @@ var Ie = [
|
|
|
695
696
|
fontFamily: "Consolas",
|
|
696
697
|
category: "monospace"
|
|
697
698
|
}
|
|
698
|
-
],
|
|
699
|
+
], Re = [
|
|
699
700
|
8,
|
|
700
701
|
9,
|
|
701
702
|
10,
|
|
@@ -710,7 +711,7 @@ var Ie = [
|
|
|
710
711
|
36,
|
|
711
712
|
48,
|
|
712
713
|
72
|
|
713
|
-
],
|
|
714
|
+
], ze = [
|
|
714
715
|
{
|
|
715
716
|
id: "Normal",
|
|
716
717
|
label: "Normal",
|
|
@@ -741,7 +742,7 @@ var Ie = [
|
|
|
741
742
|
label: "Heading 3",
|
|
742
743
|
nameKey: "styles.heading3"
|
|
743
744
|
}
|
|
744
|
-
],
|
|
745
|
+
], Be = [
|
|
745
746
|
{
|
|
746
747
|
label: "Single",
|
|
747
748
|
labelKey: "lineSpacing.single",
|
|
@@ -760,7 +761,7 @@ var Ie = [
|
|
|
760
761
|
labelKey: "lineSpacing.double",
|
|
761
762
|
value: 480
|
|
762
763
|
}
|
|
763
|
-
],
|
|
764
|
+
], Ve = [
|
|
764
765
|
.5,
|
|
765
766
|
.75,
|
|
766
767
|
1,
|
|
@@ -770,7 +771,7 @@ var Ie = [
|
|
|
770
771
|
];
|
|
771
772
|
//#endregion
|
|
772
773
|
//#region src/composables/useToolbarDropdowns.ts
|
|
773
|
-
function
|
|
774
|
+
function He(e) {
|
|
774
775
|
let t = S(null), n = S({
|
|
775
776
|
top: 0,
|
|
776
777
|
left: 0
|
|
@@ -822,7 +823,7 @@ function Ve(e) {
|
|
|
822
823
|
}
|
|
823
824
|
//#endregion
|
|
824
825
|
//#region src/composables/useToolbarFontSize.ts
|
|
825
|
-
function
|
|
826
|
+
function Ue(e) {
|
|
826
827
|
let t = S(!1), n = (t) => e.execCommand("setFontSize", t * 2);
|
|
827
828
|
function r() {
|
|
828
829
|
t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
|
|
@@ -842,11 +843,11 @@ function He(e) {
|
|
|
842
843
|
}
|
|
843
844
|
function s() {
|
|
844
845
|
let t = e.currentFontSize.value;
|
|
845
|
-
n(
|
|
846
|
+
n(Re.find((e) => e > t) || t + 1);
|
|
846
847
|
}
|
|
847
848
|
function c() {
|
|
848
849
|
let t = e.currentFontSize.value;
|
|
849
|
-
n([...
|
|
850
|
+
n([...Re].reverse().find((e) => e < t) || Math.max(1, t - 1));
|
|
850
851
|
}
|
|
851
852
|
return {
|
|
852
853
|
onSizeFocus: r,
|
|
@@ -859,7 +860,7 @@ function He(e) {
|
|
|
859
860
|
}
|
|
860
861
|
//#endregion
|
|
861
862
|
//#region src/utils/stylePreview.ts
|
|
862
|
-
var
|
|
863
|
+
var We = {
|
|
863
864
|
Title: 26,
|
|
864
865
|
Subtitle: 18,
|
|
865
866
|
Heading1: 24,
|
|
@@ -869,22 +870,22 @@ var Ue = {
|
|
|
869
870
|
Heading5: 13,
|
|
870
871
|
Heading6: 13,
|
|
871
872
|
Normal: 14
|
|
872
|
-
},
|
|
873
|
+
}, Ge = /* @__PURE__ */ new Set([
|
|
873
874
|
"Title",
|
|
874
875
|
"Heading1",
|
|
875
876
|
"Heading2",
|
|
876
877
|
"Heading3"
|
|
877
|
-
]),
|
|
878
|
-
function
|
|
879
|
-
let t =
|
|
878
|
+
]), Ke = { Subtitle: "666666" }, qe = "#4a6c8c";
|
|
879
|
+
function Je(e) {
|
|
880
|
+
let t = We[e.styleId], n = {
|
|
880
881
|
fontSize: t ? `${t}px` : `${Math.min(Math.max(e.fontSize ? e.fontSize / 2 : 11, 11), 20)}px`,
|
|
881
882
|
lineHeight: "1.3"
|
|
882
883
|
};
|
|
883
|
-
(e.bold ??
|
|
884
|
-
let r = e.color ??
|
|
885
|
-
return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color =
|
|
884
|
+
(e.bold ?? Ge.has(e.styleId)) && (n.fontWeight = "bold"), e.italic && (n.fontStyle = "italic");
|
|
885
|
+
let r = e.color ?? Ke[e.styleId];
|
|
886
|
+
return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color = qe), n;
|
|
886
887
|
}
|
|
887
|
-
function
|
|
888
|
+
function Ye(e) {
|
|
888
889
|
return !e || e.length === 0 ? [] : e.filter((e) => e.type === "paragraph").filter((e) => e.qFormat ? !0 : !(e.hidden || e.semiHidden)).map((e) => ({
|
|
889
890
|
styleId: e.styleId,
|
|
890
891
|
name: e.name || e.styleId,
|
|
@@ -897,20 +898,20 @@ function Je(e) {
|
|
|
897
898
|
}
|
|
898
899
|
//#endregion
|
|
899
900
|
//#region src/composables/useParagraphStyleOptions.ts
|
|
900
|
-
function
|
|
901
|
+
function Xe(e) {
|
|
901
902
|
let t = o(() => {
|
|
902
|
-
let t =
|
|
903
|
+
let t = Ye(e.documentStyles());
|
|
903
904
|
return t.length > 0 ? t.map((t) => {
|
|
904
|
-
let n =
|
|
905
|
+
let n = ze.find((e) => e.id === t.styleId);
|
|
905
906
|
return {
|
|
906
907
|
id: t.styleId,
|
|
907
908
|
label: n ? e.t(n.nameKey) : t.name,
|
|
908
|
-
previewStyle:
|
|
909
|
+
previewStyle: Je(t)
|
|
909
910
|
};
|
|
910
|
-
}) :
|
|
911
|
+
}) : ze.map((t) => ({
|
|
911
912
|
id: t.id,
|
|
912
913
|
label: e.t(t.nameKey),
|
|
913
|
-
previewStyle:
|
|
914
|
+
previewStyle: Je({ styleId: t.id })
|
|
914
915
|
}));
|
|
915
916
|
});
|
|
916
917
|
return {
|
|
@@ -923,41 +924,41 @@ function Ye(e) {
|
|
|
923
924
|
}
|
|
924
925
|
//#endregion
|
|
925
926
|
//#region src/components/Toolbar.vue?vue&type=script&setup=true&lang.ts
|
|
926
|
-
var
|
|
927
|
+
var Ze = {
|
|
927
928
|
key: 0,
|
|
928
929
|
class: "basic-toolbar"
|
|
929
|
-
},
|
|
930
|
+
}, Qe = [
|
|
930
931
|
"title",
|
|
931
932
|
"aria-label",
|
|
932
933
|
"disabled"
|
|
933
|
-
],
|
|
934
|
+
], $e = [
|
|
934
935
|
"title",
|
|
935
936
|
"aria-label",
|
|
936
937
|
"disabled"
|
|
937
|
-
],
|
|
938
|
+
], et = ["disabled", "title"], tt = ["aria-expanded", "title"], nt = ["disabled", "title"], rt = ["onMousedown"], it = ["aria-expanded", "title"], at = ["onMousedown"], ot = ["aria-expanded", "title"], st = {
|
|
938
939
|
key: 0,
|
|
939
940
|
class: "toolbar-dropdown__group-label"
|
|
940
|
-
},
|
|
941
|
+
}, ct = ["onMousedown"], lt = ["title"], ut = [
|
|
941
942
|
"value",
|
|
942
943
|
"title",
|
|
943
944
|
"aria-expanded"
|
|
944
|
-
],
|
|
945
|
+
], dt = ["title"], ft = ["onMousedown"], pt = ["title", "aria-label"], mt = ["title", "aria-label"], ht = ["title", "aria-label"], gt = ["title", "aria-label"], _t = ["title", "aria-label"], vt = ["title", "aria-label"], yt = ["title", "aria-label"], bt = ["aria-expanded", "title"], xt = ["title"], St = ["title"], Ct = ["title"], wt = ["title"], Tt = ["title", "aria-label"], Et = ["title", "aria-label"], Dt = [
|
|
945
946
|
"title",
|
|
946
947
|
"aria-label",
|
|
947
948
|
"disabled"
|
|
948
|
-
],
|
|
949
|
+
], Ot = ["title", "aria-label"], kt = ["aria-expanded", "title"], At = ["onMousedown"], jt = ["title", "aria-label"], Mt = [
|
|
949
950
|
"title",
|
|
950
951
|
"aria-label",
|
|
951
952
|
"aria-pressed"
|
|
952
|
-
],
|
|
953
|
+
], Nt = [
|
|
953
954
|
"title",
|
|
954
955
|
"aria-label",
|
|
955
956
|
"aria-pressed"
|
|
956
|
-
],
|
|
957
|
+
], Pt = {
|
|
957
958
|
key: 0,
|
|
958
959
|
"data-testid": "toolbar-comments-count",
|
|
959
960
|
class: "basic-toolbar__comment-count"
|
|
960
|
-
},
|
|
961
|
+
}, Ft = ["title", "aria-label"], It = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
961
962
|
__name: "Toolbar",
|
|
962
963
|
props: {
|
|
963
964
|
view: { default: null },
|
|
@@ -966,6 +967,10 @@ var Xe = {
|
|
|
966
967
|
default: () => ({})
|
|
967
968
|
},
|
|
968
969
|
stateTick: { default: 0 },
|
|
970
|
+
canUndo: { type: Boolean },
|
|
971
|
+
canRedo: { type: Boolean },
|
|
972
|
+
onUndo: {},
|
|
973
|
+
onRedo: {},
|
|
969
974
|
zoomPercent: {},
|
|
970
975
|
isMinZoom: { type: Boolean },
|
|
971
976
|
isMaxZoom: { type: Boolean },
|
|
@@ -1018,7 +1023,7 @@ var Xe = {
|
|
|
1018
1023
|
"image-transform"
|
|
1019
1024
|
],
|
|
1020
1025
|
setup(e, { emit: t }) {
|
|
1021
|
-
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 ??
|
|
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 ?? Ve), 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 } = He({
|
|
1022
1027
|
zoom: B,
|
|
1023
1028
|
style: A,
|
|
1024
1029
|
font: j,
|
|
@@ -1043,59 +1048,73 @@ var Xe = {
|
|
|
1043
1048
|
}), K = o(() => {
|
|
1044
1049
|
let e = G.value.textFormatting.fontFamily;
|
|
1045
1050
|
return e?.ascii || e?.hAnsi || "Arial";
|
|
1046
|
-
}),
|
|
1051
|
+
}), Y = o(() => {
|
|
1047
1052
|
let e = G.value.textFormatting.fontSize;
|
|
1048
1053
|
return e ? e / 2 : 11;
|
|
1049
|
-
}),
|
|
1050
|
-
switch (
|
|
1054
|
+
}), X = o(() => G.value.paragraphFormatting.alignment || "left"), ne = o(() => {
|
|
1055
|
+
switch (X.value) {
|
|
1051
1056
|
case "center": return "format_align_center";
|
|
1052
1057
|
case "right": return "format_align_right";
|
|
1053
1058
|
case "both": return "format_align_justify";
|
|
1054
1059
|
default: return "format_align_left";
|
|
1055
1060
|
}
|
|
1056
|
-
}), { resolvedParagraphStyles:
|
|
1061
|
+
}), { resolvedParagraphStyles: Z, currentStyleLabel: re } = Xe({
|
|
1057
1062
|
documentStyles: () => m.documentStyles,
|
|
1058
1063
|
currentStyleId: () => G.value.paragraphFormatting.styleId || "Normal",
|
|
1059
1064
|
t: h
|
|
1060
|
-
}),
|
|
1061
|
-
m.stateTick;
|
|
1065
|
+
}), ie = o(() => {
|
|
1066
|
+
if (m.stateTick, m.canUndo !== void 0) return m.canUndo;
|
|
1062
1067
|
let e = m.view;
|
|
1063
1068
|
return e ? te(e.state) > 0 : !1;
|
|
1064
|
-
}),
|
|
1065
|
-
m.stateTick;
|
|
1069
|
+
}), ae = o(() => {
|
|
1070
|
+
if (m.stateTick, m.canRedo !== void 0) return m.canRedo;
|
|
1066
1071
|
let e = m.view;
|
|
1067
1072
|
return e ? ee(e.state) > 0 : !1;
|
|
1068
|
-
}),
|
|
1073
|
+
}), oe = o(() => {
|
|
1069
1074
|
let e = G.value, t = L(e.listState) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
|
|
1070
1075
|
return t || n;
|
|
1071
|
-
}),
|
|
1076
|
+
}), se = o(() => {
|
|
1072
1077
|
let e = G.value.textFormatting.color?.rgb;
|
|
1073
1078
|
return e ? e.replace(/^#/, "").toUpperCase() : void 0;
|
|
1074
|
-
}),
|
|
1079
|
+
}), ce = o(() => {
|
|
1075
1080
|
let e = G.value.textFormatting.highlight;
|
|
1076
1081
|
if (!(!e || e === "none")) return e.replace(/^#/, "").toUpperCase();
|
|
1077
|
-
}),
|
|
1082
|
+
}), le = o(() => Pe(m.fontFamilies) ?? Le), ue = o(() => Ie(m.documentFonts, le.value.map((e) => e.name))), de = o(() => [
|
|
1078
1083
|
{
|
|
1079
1084
|
label: h("font.documentFonts"),
|
|
1080
|
-
fonts:
|
|
1085
|
+
fonts: ue.value
|
|
1081
1086
|
},
|
|
1082
1087
|
{
|
|
1083
1088
|
label: h("font.sansSerif"),
|
|
1084
|
-
fonts:
|
|
1089
|
+
fonts: le.value.filter((e) => e.category === "sans-serif")
|
|
1085
1090
|
},
|
|
1086
1091
|
{
|
|
1087
1092
|
label: h("font.serif"),
|
|
1088
|
-
fonts:
|
|
1093
|
+
fonts: le.value.filter((e) => e.category === "serif")
|
|
1089
1094
|
},
|
|
1090
1095
|
{
|
|
1091
1096
|
label: h("font.monospace"),
|
|
1092
|
-
fonts:
|
|
1097
|
+
fonts: le.value.filter((e) => e.category === "monospace")
|
|
1093
1098
|
},
|
|
1094
1099
|
{
|
|
1095
1100
|
label: h("font.other"),
|
|
1096
|
-
fonts:
|
|
1101
|
+
fonts: le.value.filter((e) => !e.category || e.category === "other")
|
|
1097
1102
|
}
|
|
1098
1103
|
]);
|
|
1104
|
+
function fe() {
|
|
1105
|
+
if (m.onUndo) {
|
|
1106
|
+
m.onUndo();
|
|
1107
|
+
return;
|
|
1108
|
+
}
|
|
1109
|
+
Q("undo");
|
|
1110
|
+
}
|
|
1111
|
+
function pe() {
|
|
1112
|
+
if (m.onRedo) {
|
|
1113
|
+
m.onRedo();
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
Q("redo");
|
|
1117
|
+
}
|
|
1099
1118
|
function Q(e, ...t) {
|
|
1100
1119
|
let n = m.view;
|
|
1101
1120
|
if (!n) return;
|
|
@@ -1104,55 +1123,55 @@ var Xe = {
|
|
|
1104
1123
|
typeof console < "u" && console.warn("[Toolbar] command not found:", e);
|
|
1105
1124
|
return;
|
|
1106
1125
|
}
|
|
1107
|
-
|
|
1126
|
+
J(n, r(...t)), n.hasFocus() || n.focus(), V.value = null;
|
|
1108
1127
|
}
|
|
1109
|
-
function
|
|
1128
|
+
function me(e) {
|
|
1110
1129
|
Q("setFontFamily", e);
|
|
1111
1130
|
}
|
|
1112
|
-
let { onSizeFocus:
|
|
1113
|
-
currentFontSize:
|
|
1131
|
+
let { onSizeFocus: he, onSizeInput: ve, commitFontSize: ye, pickFontSize: be, increaseFontSize: xe, decreaseFontSize: Se } = Ue({
|
|
1132
|
+
currentFontSize: Y,
|
|
1114
1133
|
openDropdown: V,
|
|
1115
1134
|
recomputeDropdownPos: W,
|
|
1116
1135
|
execCommand: Q
|
|
1117
1136
|
});
|
|
1118
|
-
function
|
|
1137
|
+
function Ce(e) {
|
|
1119
1138
|
if (typeof e == "object" && e.auto) {
|
|
1120
1139
|
Q("clearTextColor");
|
|
1121
1140
|
return;
|
|
1122
1141
|
}
|
|
1123
1142
|
Q("setTextColor", typeof e == "string" ? { rgb: e } : e);
|
|
1124
1143
|
}
|
|
1125
|
-
function
|
|
1144
|
+
function we() {
|
|
1126
1145
|
let e = m.view;
|
|
1127
|
-
e && (
|
|
1146
|
+
e && (J(e, q), e.hasFocus() || e.focus());
|
|
1128
1147
|
}
|
|
1129
|
-
function
|
|
1148
|
+
function Ee(e) {
|
|
1130
1149
|
Q("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
|
|
1131
1150
|
}
|
|
1132
|
-
function
|
|
1151
|
+
function De(e) {
|
|
1133
1152
|
v("apply-style", e), V.value = null;
|
|
1134
1153
|
}
|
|
1135
|
-
function
|
|
1154
|
+
function Oe(e) {
|
|
1136
1155
|
Q("setLineSpacing", e);
|
|
1137
1156
|
}
|
|
1138
|
-
function
|
|
1157
|
+
function ke(e) {
|
|
1139
1158
|
let t = G.value.paragraphFormatting.lineSpacing;
|
|
1140
1159
|
return t ? Math.abs(t - e) < 10 : e === 240;
|
|
1141
1160
|
}
|
|
1142
|
-
return (t, n) => e.view ? (b(), l("div",
|
|
1161
|
+
return (t, n) => e.view ? (b(), l("div", Ze, [
|
|
1143
1162
|
u("button", {
|
|
1144
1163
|
title: O(h)("undoShortcut"),
|
|
1145
1164
|
"aria-label": O(h)("undo"),
|
|
1146
|
-
disabled: !
|
|
1147
|
-
onMousedown:
|
|
1148
|
-
}, [f(r, { name: "undo" })], 40,
|
|
1165
|
+
disabled: !ie.value,
|
|
1166
|
+
onMousedown: F(fe, ["prevent"])
|
|
1167
|
+
}, [f(r, { name: "undo" })], 40, Qe),
|
|
1149
1168
|
u("button", {
|
|
1150
1169
|
title: O(h)("redoShortcut"),
|
|
1151
1170
|
"aria-label": O(h)("redo"),
|
|
1152
|
-
disabled: !
|
|
1153
|
-
onMousedown:
|
|
1154
|
-
}, [f(r, { name: "redo" })], 40,
|
|
1155
|
-
n[
|
|
1171
|
+
disabled: !ae.value,
|
|
1172
|
+
onMousedown: F(pe, ["prevent"])
|
|
1173
|
+
}, [f(r, { name: "redo" })], 40, $e),
|
|
1174
|
+
n[43] ||= u("span", { class: "divider" }, null, -1),
|
|
1156
1175
|
k.value ? (b(), l("div", {
|
|
1157
1176
|
key: 0,
|
|
1158
1177
|
class: "toolbar-dropdown zoom-group",
|
|
@@ -1161,13 +1180,13 @@ var Xe = {
|
|
|
1161
1180
|
}, [
|
|
1162
1181
|
u("button", {
|
|
1163
1182
|
class: "size-btn",
|
|
1164
|
-
onMousedown: n[
|
|
1183
|
+
onMousedown: n[0] ||= F((e) => t.$emit("zoom-out"), ["prevent"]),
|
|
1165
1184
|
disabled: x.value,
|
|
1166
1185
|
title: O(h)("zoom.zoomOut")
|
|
1167
|
-
}, " − ", 40,
|
|
1186
|
+
}, " − ", 40, et),
|
|
1168
1187
|
u("button", {
|
|
1169
1188
|
class: "toolbar-dropdown__trigger zoom-trigger",
|
|
1170
|
-
onMousedown: n[
|
|
1189
|
+
onMousedown: n[1] ||= F((e) => O(U)("zoom"), ["prevent"]),
|
|
1171
1190
|
"aria-expanded": O(V) === "zoom",
|
|
1172
1191
|
"aria-haspopup": "listbox",
|
|
1173
1192
|
title: O(h)("zoom.zoomLevel")
|
|
@@ -1175,13 +1194,13 @@ var Xe = {
|
|
|
1175
1194
|
class: "chevron",
|
|
1176
1195
|
name: "arrow_drop_down",
|
|
1177
1196
|
size: 16
|
|
1178
|
-
})], 40,
|
|
1197
|
+
})], 40, tt),
|
|
1179
1198
|
u("button", {
|
|
1180
1199
|
class: "size-btn",
|
|
1181
|
-
onMousedown: n[
|
|
1200
|
+
onMousedown: n[2] ||= F((e) => t.$emit("zoom-in"), ["prevent"]),
|
|
1182
1201
|
disabled: T.value,
|
|
1183
1202
|
title: O(h)("zoom.zoomIn")
|
|
1184
|
-
}, " + ", 40,
|
|
1203
|
+
}, " + ", 40, nt),
|
|
1185
1204
|
O(V) === "zoom" ? (b(), l("div", {
|
|
1186
1205
|
key: 0,
|
|
1187
1206
|
style: _(O(H)),
|
|
@@ -1190,40 +1209,40 @@ var Xe = {
|
|
|
1190
1209
|
key: e,
|
|
1191
1210
|
class: g(["toolbar-dropdown__item", { active: y.value === Math.round(e * 100) }]),
|
|
1192
1211
|
onMousedown: F((n) => t.$emit("zoom-set", e), ["prevent"])
|
|
1193
|
-
}, E(Math.round(e * 100)) + "% ", 43,
|
|
1212
|
+
}, E(Math.round(e * 100)) + "% ", 43, rt))), 128))], 4)) : c("", !0)
|
|
1194
1213
|
], 512)) : c("", !0),
|
|
1195
|
-
n[
|
|
1214
|
+
n[44] ||= u("span", { class: "divider" }, null, -1),
|
|
1196
1215
|
u("div", {
|
|
1197
1216
|
class: "toolbar-dropdown",
|
|
1198
1217
|
ref_key: "styleDropdownRef",
|
|
1199
1218
|
ref: A
|
|
1200
1219
|
}, [u("button", {
|
|
1201
1220
|
class: "toolbar-dropdown__trigger style-trigger",
|
|
1202
|
-
onMousedown: n[
|
|
1221
|
+
onMousedown: n[3] ||= F((e) => O(U)("style"), ["prevent"]),
|
|
1203
1222
|
"aria-expanded": O(V) === "style",
|
|
1204
1223
|
"aria-haspopup": "listbox",
|
|
1205
1224
|
title: O(h)("styles.selectAriaLabel")
|
|
1206
|
-
}, [d(E(O(
|
|
1225
|
+
}, [d(E(O(re)) + " ", 1), f(r, {
|
|
1207
1226
|
class: "chevron",
|
|
1208
1227
|
name: "arrow_drop_down",
|
|
1209
1228
|
size: 16
|
|
1210
|
-
})], 40,
|
|
1229
|
+
})], 40, it), O(V) === "style" ? (b(), l("div", {
|
|
1211
1230
|
key: 0,
|
|
1212
1231
|
style: _(O(H)),
|
|
1213
1232
|
class: "toolbar-dropdown__menu style-menu"
|
|
1214
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1233
|
+
}, [(b(!0), l(a, null, C(O(Z), (e) => (b(), l("button", {
|
|
1215
1234
|
key: e.id,
|
|
1216
1235
|
class: g(["toolbar-dropdown__item", { active: (G.value.paragraphFormatting.styleId || "Normal") === e.id }]),
|
|
1217
|
-
onMousedown: F((t) =>
|
|
1218
|
-
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42,
|
|
1219
|
-
n[
|
|
1236
|
+
onMousedown: F((t) => De(e.id), ["prevent"])
|
|
1237
|
+
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42, at))), 128))], 4)) : c("", !0)], 512),
|
|
1238
|
+
n[45] ||= u("span", { class: "divider" }, null, -1),
|
|
1220
1239
|
u("div", {
|
|
1221
1240
|
class: "toolbar-dropdown",
|
|
1222
1241
|
ref_key: "fontDropdownRef",
|
|
1223
1242
|
ref: j
|
|
1224
1243
|
}, [u("button", {
|
|
1225
1244
|
class: "toolbar-dropdown__trigger font-trigger",
|
|
1226
|
-
onMousedown: n[
|
|
1245
|
+
onMousedown: n[4] ||= F((e) => O(U)("font"), ["prevent"]),
|
|
1227
1246
|
"aria-expanded": O(V) === "font",
|
|
1228
1247
|
"aria-haspopup": "listbox",
|
|
1229
1248
|
title: O(h)("font.selectAriaLabel")
|
|
@@ -1231,16 +1250,16 @@ var Xe = {
|
|
|
1231
1250
|
class: "chevron",
|
|
1232
1251
|
name: "arrow_drop_down",
|
|
1233
1252
|
size: 16
|
|
1234
|
-
})], 40,
|
|
1253
|
+
})], 40, ot), O(V) === "font" ? (b(), l("div", {
|
|
1235
1254
|
key: 0,
|
|
1236
1255
|
style: _(O(H)),
|
|
1237
1256
|
class: "toolbar-dropdown__menu font-menu"
|
|
1238
|
-
}, [(b(!0), l(a, null, C(
|
|
1257
|
+
}, [(b(!0), l(a, null, C(de.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", st, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
|
|
1239
1258
|
key: e.name,
|
|
1240
1259
|
class: g(["toolbar-dropdown__item", { active: K.value === e.name }]),
|
|
1241
1260
|
style: _({ fontFamily: e.fontFamily }),
|
|
1242
|
-
onMousedown: F((t) =>
|
|
1243
|
-
}, E(e.name), 47,
|
|
1261
|
+
onMousedown: F((t) => me(e.name), ["prevent"])
|
|
1262
|
+
}, E(e.name), 47, ct))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
|
|
1244
1263
|
u("div", {
|
|
1245
1264
|
class: "toolbar-dropdown font-size-group",
|
|
1246
1265
|
ref_key: "sizeDropdownRef",
|
|
@@ -1248,186 +1267,186 @@ var Xe = {
|
|
|
1248
1267
|
}, [
|
|
1249
1268
|
u("button", {
|
|
1250
1269
|
class: "size-btn",
|
|
1251
|
-
onMousedown: n[
|
|
1270
|
+
onMousedown: n[5] ||= F((...e) => O(Se) && O(Se)(...e), ["prevent"]),
|
|
1252
1271
|
title: O(h)("decreaseFontSize")
|
|
1253
|
-
}, " − ", 40,
|
|
1272
|
+
}, " − ", 40, lt),
|
|
1254
1273
|
u("input", {
|
|
1255
1274
|
class: "size-trigger size-input",
|
|
1256
1275
|
type: "text",
|
|
1257
|
-
value:
|
|
1276
|
+
value: Y.value,
|
|
1258
1277
|
title: O(h)("fontSize"),
|
|
1259
|
-
onMousedown: n[
|
|
1260
|
-
onFocus: n[
|
|
1278
|
+
onMousedown: n[6] ||= F(() => {}, ["stop"]),
|
|
1279
|
+
onFocus: n[7] ||= (...e) => O(he) && O(he)(...e),
|
|
1261
1280
|
"aria-expanded": O(V) === "size",
|
|
1262
1281
|
"aria-haspopup": "listbox",
|
|
1263
|
-
onInput: n[
|
|
1282
|
+
onInput: n[8] ||= (...e) => O(ve) && O(ve)(...e),
|
|
1264
1283
|
onKeydown: [
|
|
1265
|
-
n[
|
|
1266
|
-
n[
|
|
1267
|
-
n[
|
|
1284
|
+
n[9] ||= P(F((e) => O(xe)(), ["prevent", "stop"]), ["up"]),
|
|
1285
|
+
n[10] ||= P(F((e) => O(Se)(), ["prevent", "stop"]), ["down"]),
|
|
1286
|
+
n[11] ||= P(F((e) => O(ye)(e), ["prevent"]), ["enter"])
|
|
1268
1287
|
],
|
|
1269
|
-
onBlur: n[
|
|
1270
|
-
}, null, 40,
|
|
1288
|
+
onBlur: n[12] ||= (e) => O(ye)(e)
|
|
1289
|
+
}, null, 40, ut),
|
|
1271
1290
|
u("button", {
|
|
1272
1291
|
class: "size-btn",
|
|
1273
|
-
onMousedown: n[
|
|
1292
|
+
onMousedown: n[13] ||= F((...e) => O(xe) && O(xe)(...e), ["prevent"]),
|
|
1274
1293
|
title: O(h)("increaseFontSize")
|
|
1275
|
-
}, " + ", 40,
|
|
1294
|
+
}, " + ", 40, dt),
|
|
1276
1295
|
O(V) === "size" ? (b(), l("div", {
|
|
1277
1296
|
key: 0,
|
|
1278
1297
|
style: _(O(H)),
|
|
1279
1298
|
class: "toolbar-dropdown__menu size-menu"
|
|
1280
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1299
|
+
}, [(b(!0), l(a, null, C(O(Re), (e) => (b(), l("button", {
|
|
1281
1300
|
key: e,
|
|
1282
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1283
|
-
onMousedown: F((t) => O(
|
|
1284
|
-
}, E(e), 43,
|
|
1301
|
+
class: g(["toolbar-dropdown__item", { active: Y.value === e }]),
|
|
1302
|
+
onMousedown: F((t) => O(be)(e), ["prevent"])
|
|
1303
|
+
}, E(e), 43, ft))), 128))], 4)) : c("", !0)
|
|
1285
1304
|
], 512),
|
|
1286
|
-
n[
|
|
1305
|
+
n[46] ||= u("span", { class: "divider" }, null, -1),
|
|
1287
1306
|
u("button", {
|
|
1288
1307
|
title: O(h)("boldShortcut"),
|
|
1289
1308
|
"aria-label": O(h)("bold"),
|
|
1290
1309
|
class: g({ active: G.value.textFormatting.bold }),
|
|
1291
|
-
onMousedown: n[
|
|
1292
|
-
}, [f(r, { name: "format_bold" })], 42,
|
|
1310
|
+
onMousedown: n[14] ||= F((e) => Q("toggleBold"), ["prevent"])
|
|
1311
|
+
}, [f(r, { name: "format_bold" })], 42, pt),
|
|
1293
1312
|
u("button", {
|
|
1294
1313
|
title: O(h)("italicShortcut"),
|
|
1295
1314
|
"aria-label": O(h)("italic"),
|
|
1296
1315
|
class: g({ active: G.value.textFormatting.italic }),
|
|
1297
|
-
onMousedown: n[
|
|
1298
|
-
}, [f(r, { name: "format_italic" })], 42,
|
|
1316
|
+
onMousedown: n[15] ||= F((e) => Q("toggleItalic"), ["prevent"])
|
|
1317
|
+
}, [f(r, { name: "format_italic" })], 42, mt),
|
|
1299
1318
|
u("button", {
|
|
1300
1319
|
title: O(h)("underlineShortcut"),
|
|
1301
1320
|
"aria-label": O(h)("underline"),
|
|
1302
1321
|
class: g({ active: !!G.value.textFormatting.underline }),
|
|
1303
|
-
onMousedown: n[
|
|
1304
|
-
}, [f(r, { name: "format_underlined" })], 42,
|
|
1322
|
+
onMousedown: n[16] ||= F((e) => Q("toggleUnderline"), ["prevent"])
|
|
1323
|
+
}, [f(r, { name: "format_underlined" })], 42, ht),
|
|
1305
1324
|
u("button", {
|
|
1306
1325
|
title: O(h)("formattingBar.strikethrough"),
|
|
1307
1326
|
"aria-label": O(h)("formattingBar.strikethrough"),
|
|
1308
1327
|
class: g({ active: G.value.textFormatting.strike }),
|
|
1309
|
-
onMousedown: n[
|
|
1310
|
-
}, [f(r, { name: "strikethrough_s" })], 42,
|
|
1328
|
+
onMousedown: n[17] ||= F((e) => Q("toggleStrike"), ["prevent"])
|
|
1329
|
+
}, [f(r, { name: "strikethrough_s" })], 42, gt),
|
|
1311
1330
|
f(O(p), {
|
|
1312
1331
|
mode: "text",
|
|
1313
|
-
value:
|
|
1332
|
+
value: se.value,
|
|
1314
1333
|
theme: e.theme ?? null,
|
|
1315
|
-
onChange:
|
|
1334
|
+
onChange: Ce
|
|
1316
1335
|
}, null, 8, ["value", "theme"]),
|
|
1317
1336
|
f(O(p), {
|
|
1318
1337
|
mode: "highlight",
|
|
1319
|
-
value:
|
|
1338
|
+
value: ce.value,
|
|
1320
1339
|
theme: e.theme ?? null,
|
|
1321
|
-
onChange:
|
|
1340
|
+
onChange: Ee
|
|
1322
1341
|
}, null, 8, ["value", "theme"]),
|
|
1323
1342
|
u("button", {
|
|
1324
1343
|
title: O(h)("formattingBar.insertLinkShortcut"),
|
|
1325
1344
|
"aria-label": O(h)("formattingBar.insertLink"),
|
|
1326
|
-
onMousedown: n[
|
|
1327
|
-
}, [f(r, { name: "link" })], 40,
|
|
1345
|
+
onMousedown: n[18] ||= F((e) => t.$emit("insert-link"), ["prevent"])
|
|
1346
|
+
}, [f(r, { name: "link" })], 40, _t),
|
|
1328
1347
|
u("button", {
|
|
1329
1348
|
title: O(h)("formattingBar.superscriptShortcut"),
|
|
1330
1349
|
"aria-label": O(h)("formattingBar.superscript"),
|
|
1331
1350
|
class: g({ active: G.value.textFormatting.vertAlign === "superscript" }),
|
|
1332
|
-
onMousedown: n[
|
|
1333
|
-
}, [f(r, { name: "superscript" })], 42,
|
|
1351
|
+
onMousedown: n[19] ||= F((e) => Q("toggleSuperscript"), ["prevent"])
|
|
1352
|
+
}, [f(r, { name: "superscript" })], 42, vt),
|
|
1334
1353
|
u("button", {
|
|
1335
1354
|
title: O(h)("formattingBar.subscriptShortcut"),
|
|
1336
1355
|
"aria-label": O(h)("formattingBar.subscript"),
|
|
1337
1356
|
class: g({ active: G.value.textFormatting.vertAlign === "subscript" }),
|
|
1338
|
-
onMousedown: n[
|
|
1339
|
-
}, [f(r, { name: "subscript" })], 42,
|
|
1340
|
-
n[
|
|
1357
|
+
onMousedown: n[20] ||= F((e) => Q("toggleSubscript"), ["prevent"])
|
|
1358
|
+
}, [f(r, { name: "subscript" })], 42, yt),
|
|
1359
|
+
n[47] ||= u("span", { class: "divider" }, null, -1),
|
|
1341
1360
|
u("div", {
|
|
1342
1361
|
class: "toolbar-dropdown",
|
|
1343
1362
|
ref_key: "alignDropdownRef",
|
|
1344
1363
|
ref: N
|
|
1345
1364
|
}, [u("button", {
|
|
1346
1365
|
class: "toolbar-dropdown__trigger align-trigger",
|
|
1347
|
-
onMousedown: n[
|
|
1366
|
+
onMousedown: n[21] ||= F((e) => O(U)("align"), ["prevent"]),
|
|
1348
1367
|
"aria-expanded": O(V) === "align",
|
|
1349
1368
|
"aria-haspopup": "listbox",
|
|
1350
1369
|
title: O(h)("alignmentGroup")
|
|
1351
|
-
}, [f(r, { name:
|
|
1370
|
+
}, [f(r, { name: ne.value }, null, 8, ["name"]), f(r, {
|
|
1352
1371
|
class: "chevron",
|
|
1353
1372
|
name: "arrow_drop_down",
|
|
1354
1373
|
size: 16
|
|
1355
|
-
})], 40,
|
|
1374
|
+
})], 40, bt), O(V) === "align" ? (b(), l("div", {
|
|
1356
1375
|
key: 0,
|
|
1357
1376
|
style: _(O(H)),
|
|
1358
1377
|
class: "toolbar-dropdown__menu align-strip"
|
|
1359
1378
|
}, [
|
|
1360
1379
|
u("button", {
|
|
1361
|
-
class: g(["align-strip__btn", { active:
|
|
1380
|
+
class: g(["align-strip__btn", { active: X.value === "left" }]),
|
|
1362
1381
|
title: `${O(h)("alignLeft")} (${O(h)("alignment.alignLeftShortcut")})`,
|
|
1363
|
-
onMousedown: n[
|
|
1382
|
+
onMousedown: n[22] ||= F((e) => {
|
|
1364
1383
|
Q("alignLeft"), V.value = null;
|
|
1365
1384
|
}, ["prevent"])
|
|
1366
1385
|
}, [f(r, {
|
|
1367
1386
|
name: "format_align_left",
|
|
1368
1387
|
size: 18
|
|
1369
|
-
})], 42,
|
|
1388
|
+
})], 42, xt),
|
|
1370
1389
|
u("button", {
|
|
1371
|
-
class: g(["align-strip__btn", { active:
|
|
1390
|
+
class: g(["align-strip__btn", { active: X.value === "center" }]),
|
|
1372
1391
|
title: `${O(h)("alignCenter")} (${O(h)("alignment.centerShortcut")})`,
|
|
1373
|
-
onMousedown: n[
|
|
1392
|
+
onMousedown: n[23] ||= F((e) => {
|
|
1374
1393
|
Q("alignCenter"), V.value = null;
|
|
1375
1394
|
}, ["prevent"])
|
|
1376
1395
|
}, [f(r, {
|
|
1377
1396
|
name: "format_align_center",
|
|
1378
1397
|
size: 18
|
|
1379
|
-
})], 42,
|
|
1398
|
+
})], 42, St),
|
|
1380
1399
|
u("button", {
|
|
1381
|
-
class: g(["align-strip__btn", { active:
|
|
1400
|
+
class: g(["align-strip__btn", { active: X.value === "right" }]),
|
|
1382
1401
|
title: `${O(h)("alignRight")} (${O(h)("alignment.alignRightShortcut")})`,
|
|
1383
|
-
onMousedown: n[
|
|
1402
|
+
onMousedown: n[24] ||= F((e) => {
|
|
1384
1403
|
Q("alignRight"), V.value = null;
|
|
1385
1404
|
}, ["prevent"])
|
|
1386
1405
|
}, [f(r, {
|
|
1387
1406
|
name: "format_align_right",
|
|
1388
1407
|
size: 18
|
|
1389
|
-
})], 42,
|
|
1408
|
+
})], 42, Ct),
|
|
1390
1409
|
u("button", {
|
|
1391
|
-
class: g(["align-strip__btn", { active:
|
|
1410
|
+
class: g(["align-strip__btn", { active: X.value === "both" }]),
|
|
1392
1411
|
title: `${O(h)("justify")} (${O(h)("alignment.justifyShortcut")})`,
|
|
1393
|
-
onMousedown: n[
|
|
1412
|
+
onMousedown: n[25] ||= F((e) => {
|
|
1394
1413
|
Q("alignJustify"), V.value = null;
|
|
1395
1414
|
}, ["prevent"])
|
|
1396
1415
|
}, [f(r, {
|
|
1397
1416
|
name: "format_align_justify",
|
|
1398
1417
|
size: 18
|
|
1399
|
-
})], 42,
|
|
1418
|
+
})], 42, wt)
|
|
1400
1419
|
], 4)) : c("", !0)], 512),
|
|
1401
1420
|
u("button", {
|
|
1402
1421
|
title: O(h)("bulletList"),
|
|
1403
1422
|
"aria-label": O(h)("bulletList"),
|
|
1404
1423
|
class: g({ active: G.value.listState.type === "bullet" }),
|
|
1405
|
-
onMousedown: n[
|
|
1406
|
-
}, [f(r, { name: "format_list_bulleted" })], 42,
|
|
1424
|
+
onMousedown: n[26] ||= F((e) => Q("toggleBulletList"), ["prevent"])
|
|
1425
|
+
}, [f(r, { name: "format_list_bulleted" })], 42, Tt),
|
|
1407
1426
|
u("button", {
|
|
1408
1427
|
title: O(h)("numberedList"),
|
|
1409
1428
|
"aria-label": O(h)("numberedList"),
|
|
1410
1429
|
class: g({ active: G.value.listState.type === "numbered" }),
|
|
1411
|
-
onMousedown: n[
|
|
1412
|
-
}, [f(r, { name: "format_list_numbered" })], 42,
|
|
1430
|
+
onMousedown: n[27] ||= F((e) => Q("toggleNumberedList"), ["prevent"])
|
|
1431
|
+
}, [f(r, { name: "format_list_numbered" })], 42, Et),
|
|
1413
1432
|
u("button", {
|
|
1414
1433
|
title: O(h)("decreaseIndent"),
|
|
1415
1434
|
"aria-label": O(h)("decreaseIndent"),
|
|
1416
|
-
disabled: !
|
|
1417
|
-
onMousedown: n[
|
|
1418
|
-
}, [f(r, { name: "format_indent_decrease" })], 40,
|
|
1435
|
+
disabled: !oe.value,
|
|
1436
|
+
onMousedown: n[28] ||= F((e) => Q("outdent"), ["prevent"])
|
|
1437
|
+
}, [f(r, { name: "format_indent_decrease" })], 40, Dt),
|
|
1419
1438
|
u("button", {
|
|
1420
1439
|
title: O(h)("increaseIndent"),
|
|
1421
1440
|
"aria-label": O(h)("increaseIndent"),
|
|
1422
|
-
onMousedown: n[
|
|
1423
|
-
}, [f(r, { name: "format_indent_increase" })], 40,
|
|
1441
|
+
onMousedown: n[29] ||= F((e) => Q("indent"), ["prevent"])
|
|
1442
|
+
}, [f(r, { name: "format_indent_increase" })], 40, Ot),
|
|
1424
1443
|
u("div", {
|
|
1425
1444
|
class: "toolbar-dropdown",
|
|
1426
1445
|
ref_key: "spacingDropdownRef",
|
|
1427
1446
|
ref: R
|
|
1428
1447
|
}, [u("button", {
|
|
1429
1448
|
class: "toolbar-dropdown__trigger",
|
|
1430
|
-
onMousedown: n[
|
|
1449
|
+
onMousedown: n[30] ||= F((e) => O(U)("spacing"), ["prevent"]),
|
|
1431
1450
|
"aria-expanded": O(V) === "spacing",
|
|
1432
1451
|
"aria-haspopup": "listbox",
|
|
1433
1452
|
title: O(h)("lineSpacing.label")
|
|
@@ -1435,21 +1454,21 @@ var Xe = {
|
|
|
1435
1454
|
class: "chevron",
|
|
1436
1455
|
name: "arrow_drop_down",
|
|
1437
1456
|
size: 16
|
|
1438
|
-
})], 40,
|
|
1457
|
+
})], 40, kt), O(V) === "spacing" ? (b(), l("div", {
|
|
1439
1458
|
key: 0,
|
|
1440
1459
|
style: _(O(H)),
|
|
1441
1460
|
class: "toolbar-dropdown__menu"
|
|
1442
|
-
}, [(b(!0), l(a, null, C(O(
|
|
1461
|
+
}, [(b(!0), l(a, null, C(O(Be), (e) => (b(), l("button", {
|
|
1443
1462
|
key: e.value,
|
|
1444
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1445
|
-
onMousedown: F((t) =>
|
|
1446
|
-
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43,
|
|
1463
|
+
class: g(["toolbar-dropdown__item", { active: ke(e.value) }]),
|
|
1464
|
+
onMousedown: F((t) => Oe(e.value), ["prevent"])
|
|
1465
|
+
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43, At))), 128))], 4)) : c("", !0)], 512),
|
|
1447
1466
|
u("button", {
|
|
1448
1467
|
title: O(h)("formattingBar.clearFormatting"),
|
|
1449
1468
|
"aria-label": O(h)("formattingBar.clearFormatting"),
|
|
1450
|
-
onMousedown: F(
|
|
1451
|
-
}, [f(r, { name: "format_clear" })], 40,
|
|
1452
|
-
n[
|
|
1469
|
+
onMousedown: F(we, ["prevent"])
|
|
1470
|
+
}, [f(r, { name: "format_clear" })], 40, jt),
|
|
1471
|
+
n[48] ||= u("span", { class: "divider" }, null, -1),
|
|
1453
1472
|
e.outlineDrawer ? (b(), l("button", {
|
|
1454
1473
|
key: 1,
|
|
1455
1474
|
type: "button",
|
|
@@ -1458,9 +1477,9 @@ var Xe = {
|
|
|
1458
1477
|
"aria-label": O(h)("editor.showDocumentOutline"),
|
|
1459
1478
|
"aria-pressed": e.outlineDrawerOpen,
|
|
1460
1479
|
class: g({ active: e.outlineDrawerOpen }),
|
|
1461
|
-
onMousedown: n[
|
|
1462
|
-
onClick: n[
|
|
1463
|
-
}, [f(r, { name: "format_list_bulleted" })], 42,
|
|
1480
|
+
onMousedown: n[31] ||= F(() => {}, ["prevent"]),
|
|
1481
|
+
onClick: n[32] ||= (e) => t.$emit("toggle-outline")
|
|
1482
|
+
}, [f(r, { name: "format_list_bulleted" })], 42, Mt)) : c("", !0),
|
|
1464
1483
|
u("button", {
|
|
1465
1484
|
type: "button",
|
|
1466
1485
|
"data-testid": "toolbar-comments-toggle",
|
|
@@ -1468,44 +1487,44 @@ var Xe = {
|
|
|
1468
1487
|
"aria-label": O(h)("formattingBar.commentsAndChanges"),
|
|
1469
1488
|
"aria-pressed": e.commentsSidebarOpen,
|
|
1470
1489
|
class: g({ active: e.commentsSidebarOpen }),
|
|
1471
|
-
onMousedown: n[
|
|
1472
|
-
onClick: n[
|
|
1473
|
-
}, [f(r, { name: "comment" }), e.commentCount > 0 ? (b(), l("span",
|
|
1490
|
+
onMousedown: n[33] ||= F(() => {}, ["prevent"]),
|
|
1491
|
+
onClick: n[34] ||= (e) => t.$emit("toggle-sidebar")
|
|
1492
|
+
}, [f(r, { name: "comment" }), e.commentCount > 0 ? (b(), l("span", Pt, E(e.commentCount > 99 ? "99+" : e.commentCount), 1)) : c("", !0)], 42, Nt),
|
|
1474
1493
|
e.imageContext ? (b(), l(a, { key: 2 }, [
|
|
1475
|
-
n[
|
|
1476
|
-
f(
|
|
1494
|
+
n[41] ||= u("span", { class: "divider" }, null, -1),
|
|
1495
|
+
f(ge, {
|
|
1477
1496
|
"image-context": e.imageContext,
|
|
1478
|
-
onChange: n[
|
|
1497
|
+
onChange: n[35] ||= (e) => t.$emit("image-wrap-type", e)
|
|
1479
1498
|
}, null, 8, ["image-context"]),
|
|
1480
|
-
f(
|
|
1499
|
+
f(_e, { onTransform: n[36] ||= (e) => t.$emit("image-transform", e) }),
|
|
1481
1500
|
u("button", {
|
|
1482
1501
|
title: O(h)("formattingBar.imagePropertiesShortcut"),
|
|
1483
1502
|
"aria-label": O(h)("formattingBar.imageProperties"),
|
|
1484
|
-
onMousedown: n[
|
|
1485
|
-
}, [f(r, { name: "tune" })], 40,
|
|
1503
|
+
onMousedown: n[37] ||= F((e) => t.$emit("image-properties"), ["prevent"])
|
|
1504
|
+
}, [f(r, { name: "tune" })], 40, Ft)
|
|
1486
1505
|
], 64)) : c("", !0),
|
|
1487
1506
|
w(t.$slots, "table-context", {}, void 0, !0),
|
|
1488
|
-
e.showReviewControls ? (b(), l(a, { key: 3 }, [n[
|
|
1507
|
+
e.showReviewControls ? (b(), l(a, { key: 3 }, [n[42] ||= u("span", { class: "divider" }, null, -1), f(Ne, {
|
|
1489
1508
|
"track-changes-on": e.trackChangesOn,
|
|
1490
1509
|
"display-mode": e.displayMode,
|
|
1491
1510
|
"read-only": e.readOnly,
|
|
1492
|
-
onToggleTrackChanges: n[
|
|
1493
|
-
"onUpdate:displayMode": n[
|
|
1511
|
+
onToggleTrackChanges: n[38] ||= (e) => t.$emit("toggle-track-changes"),
|
|
1512
|
+
"onUpdate:displayMode": n[39] ||= (e) => t.$emit("update:display-mode", e)
|
|
1494
1513
|
}, null, 8, [
|
|
1495
1514
|
"track-changes-on",
|
|
1496
1515
|
"display-mode",
|
|
1497
1516
|
"read-only"
|
|
1498
1517
|
])], 64)) : c("", !0),
|
|
1499
|
-
n[
|
|
1500
|
-
e.editorMode ? (b(), s(
|
|
1518
|
+
n[49] ||= u("span", { class: "divider" }, null, -1),
|
|
1519
|
+
e.editorMode ? (b(), s(Te, {
|
|
1501
1520
|
key: 4,
|
|
1502
1521
|
"model-value": e.editorMode,
|
|
1503
|
-
"onUpdate:modelValue": n[
|
|
1522
|
+
"onUpdate:modelValue": n[40] ||= (e) => t.$emit("mode-change", e)
|
|
1504
1523
|
}, null, 8, ["model-value"])) : c("", !0),
|
|
1505
1524
|
w(t.$slots, "toolbar-extra", {}, void 0, !0)
|
|
1506
1525
|
])) : c("", !0);
|
|
1507
1526
|
}
|
|
1508
|
-
}), [["__scopeId", "data-v-
|
|
1527
|
+
}), [["__scopeId", "data-v-1ad51d76"]]), Lt = ["aria-valuemax"], Rt = { class: "docx-horizontal-ruler__ticks" }, zt = ["title", "onDblclick"], Bt = 12240, Vt = 1440, Ht = 1440, Ut = 567, Wt = "var(--doc-primary)", Gt = "var(--doc-primary)", Kt = "var(--doc-primary-hover)", qt = 5, Jt = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
1509
1528
|
__name: "HorizontalRuler",
|
|
1510
1529
|
props: {
|
|
1511
1530
|
sectionProps: {},
|
|
@@ -1537,14 +1556,14 @@ var Xe = {
|
|
|
1537
1556
|
"tab-stop-remove"
|
|
1538
1557
|
],
|
|
1539
1558
|
setup(e, { emit: t }) {
|
|
1540
|
-
let n = e, r = t, i = Math.round(
|
|
1559
|
+
let n = e, r = t, i = Math.round(qt * 1.6), s = S(null), d = S(null), f = S(null), p = S(0), m = S("");
|
|
1541
1560
|
function h(e) {
|
|
1542
1561
|
return G(e) * n.zoom;
|
|
1543
1562
|
}
|
|
1544
1563
|
function g(e) {
|
|
1545
1564
|
return Math.round(W(e / n.zoom));
|
|
1546
1565
|
}
|
|
1547
|
-
let y = o(() => n.sectionProps?.pageWidth ??
|
|
1566
|
+
let y = o(() => n.sectionProps?.pageWidth ?? Bt), x = o(() => n.sectionProps?.marginLeft ?? Vt), w = o(() => n.sectionProps?.marginRight ?? Vt), 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(() => ({
|
|
1548
1567
|
position: "relative",
|
|
1549
1568
|
width: D.value + "px",
|
|
1550
1569
|
height: "22px",
|
|
@@ -1575,7 +1594,7 @@ var Xe = {
|
|
|
1575
1594
|
})), V = o(() => {
|
|
1576
1595
|
let e = [];
|
|
1577
1596
|
if (n.unit === "inch") {
|
|
1578
|
-
let t =
|
|
1597
|
+
let t = Ht / 8, n = Math.ceil(y.value / t);
|
|
1579
1598
|
for (let r = 0; r <= n; r++) {
|
|
1580
1599
|
let n = r * t;
|
|
1581
1600
|
if (n > y.value) break;
|
|
@@ -1596,7 +1615,7 @@ var Xe = {
|
|
|
1596
1615
|
});
|
|
1597
1616
|
}
|
|
1598
1617
|
} else {
|
|
1599
|
-
let t =
|
|
1618
|
+
let t = Ut / 10, n = Math.ceil(y.value / t);
|
|
1600
1619
|
for (let r = 0; r <= n; r++) {
|
|
1601
1620
|
let n = r * t;
|
|
1602
1621
|
if (n > y.value) break;
|
|
@@ -1624,15 +1643,15 @@ var Xe = {
|
|
|
1624
1643
|
};
|
|
1625
1644
|
}) : []);
|
|
1626
1645
|
function U(e) {
|
|
1627
|
-
return n.unit === "cm" ? (e /
|
|
1646
|
+
return n.unit === "cm" ? (e / Ut).toFixed(1) + " cm" : (e / Ht).toFixed(2) + "\"";
|
|
1628
1647
|
}
|
|
1629
1648
|
function K(e) {
|
|
1630
|
-
return d.value === e ?
|
|
1649
|
+
return d.value === e ? Kt : f.value === e ? Gt : Wt;
|
|
1631
1650
|
}
|
|
1632
1651
|
function ee(e, t, r) {
|
|
1633
1652
|
return {
|
|
1634
1653
|
position: "absolute",
|
|
1635
|
-
left: t -
|
|
1654
|
+
left: t - qt + "px",
|
|
1636
1655
|
width: "10px",
|
|
1637
1656
|
height: "10px",
|
|
1638
1657
|
cursor: n.editable ? "ew-resize" : "default",
|
|
@@ -1647,8 +1666,8 @@ var Xe = {
|
|
|
1647
1666
|
left: 0,
|
|
1648
1667
|
width: 0,
|
|
1649
1668
|
height: 0,
|
|
1650
|
-
borderLeft: `${
|
|
1651
|
-
borderRight: `${
|
|
1669
|
+
borderLeft: `${qt}px solid transparent`,
|
|
1670
|
+
borderRight: `${qt}px solid transparent`,
|
|
1652
1671
|
borderTop: `${i}px solid ${t}`,
|
|
1653
1672
|
transition: "border-top-color 0.1s"
|
|
1654
1673
|
} : {
|
|
@@ -1657,8 +1676,8 @@ var Xe = {
|
|
|
1657
1676
|
left: 0,
|
|
1658
1677
|
width: 0,
|
|
1659
1678
|
height: 0,
|
|
1660
|
-
borderLeft: `${
|
|
1661
|
-
borderRight: `${
|
|
1679
|
+
borderLeft: `${qt}px solid transparent`,
|
|
1680
|
+
borderRight: `${qt}px solid transparent`,
|
|
1662
1681
|
borderBottom: `${i}px solid ${t}`,
|
|
1663
1682
|
transition: "border-bottom-color 0.1s"
|
|
1664
1683
|
};
|
|
@@ -1740,7 +1759,7 @@ var Xe = {
|
|
|
1740
1759
|
style: _(B.value),
|
|
1741
1760
|
onMousedown: n[1] ||= F((t) => e.editable ? J("rightMargin", t) : null, ["prevent", "stop"])
|
|
1742
1761
|
}, null, 36),
|
|
1743
|
-
u("div",
|
|
1762
|
+
u("div", Rt, [(b(!0), l(a, null, C(V.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
|
|
1744
1763
|
class: "docx-horizontal-ruler__tick-line",
|
|
1745
1764
|
style: _({
|
|
1746
1765
|
left: e.position + "px",
|
|
@@ -1781,15 +1800,15 @@ var Xe = {
|
|
|
1781
1800
|
style: _({ left: e.px + "px" }),
|
|
1782
1801
|
title: `${e.label}`,
|
|
1783
1802
|
onDblclick: F((n) => t.$emit("tab-stop-remove", e.twips), ["prevent"])
|
|
1784
|
-
}, " L ", 44,
|
|
1803
|
+
}, " L ", 44, zt))), 128)),
|
|
1785
1804
|
d.value && m.value ? (b(), l("div", {
|
|
1786
1805
|
key: 3,
|
|
1787
1806
|
class: "docx-horizontal-ruler__tooltip",
|
|
1788
1807
|
style: _({ left: p.value + "px" })
|
|
1789
1808
|
}, E(m.value), 5)) : c("", !0)
|
|
1790
|
-
], 12,
|
|
1809
|
+
], 12, Lt));
|
|
1791
1810
|
}
|
|
1792
|
-
}), [["__scopeId", "data-v-6f3ea48c"]]),
|
|
1811
|
+
}), [["__scopeId", "data-v-6f3ea48c"]]), Yt = ["disabled", "onClick"], Xt = { class: "docx-tbp__panel" }, Zt = ["title", "onClick"], Qt = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
1793
1812
|
__name: "TableBorderPicker",
|
|
1794
1813
|
props: { disabled: { type: Boolean } },
|
|
1795
1814
|
emits: ["change"],
|
|
@@ -1863,8 +1882,8 @@ var Xe = {
|
|
|
1863
1882
|
}, [f(r, {
|
|
1864
1883
|
name: "border_all",
|
|
1865
1884
|
size: 20
|
|
1866
|
-
})], 8,
|
|
1867
|
-
panel: M(() => [u("div",
|
|
1885
|
+
})], 8, Yt)]),
|
|
1886
|
+
panel: M(() => [u("div", Xt, [(b(), l(a, null, C(d, (e) => u("button", {
|
|
1868
1887
|
key: e.value,
|
|
1869
1888
|
type: "button",
|
|
1870
1889
|
class: "docx-tbp__option",
|
|
@@ -1873,11 +1892,11 @@ var Xe = {
|
|
|
1873
1892
|
}, [f(r, {
|
|
1874
1893
|
name: e.icon,
|
|
1875
1894
|
size: 20
|
|
1876
|
-
}, null, 8, ["name"])], 8,
|
|
1895
|
+
}, null, 8, ["name"])], 8, Zt)), 64))])]),
|
|
1877
1896
|
_: 1
|
|
1878
1897
|
}, 8, ["open"]));
|
|
1879
1898
|
}
|
|
1880
|
-
}), [["__scopeId", "data-v-4e30a014"]]),
|
|
1899
|
+
}), [["__scopeId", "data-v-4e30a014"]]), $t = /* @__PURE__ */ p({
|
|
1881
1900
|
__name: "TableBorderColorPicker",
|
|
1882
1901
|
props: {
|
|
1883
1902
|
disabled: { type: Boolean },
|
|
@@ -1904,7 +1923,7 @@ var Xe = {
|
|
|
1904
1923
|
"title"
|
|
1905
1924
|
]));
|
|
1906
1925
|
}
|
|
1907
|
-
}),
|
|
1926
|
+
}), en = ["disabled", "onClick"], tn = { class: "docx-tbwidth__panel" }, nn = ["onClick"], rn = { class: "docx-tbwidth__label" }, an = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
1908
1927
|
__name: "TableBorderWidthPicker",
|
|
1909
1928
|
props: { disabled: { type: Boolean } },
|
|
1910
1929
|
emits: ["change"],
|
|
@@ -1968,8 +1987,8 @@ var Xe = {
|
|
|
1968
1987
|
}, [f(r, {
|
|
1969
1988
|
name: "line_weight",
|
|
1970
1989
|
size: 20
|
|
1971
|
-
})], 8,
|
|
1972
|
-
panel: M(() => [u("div",
|
|
1990
|
+
})], 8, en)]),
|
|
1991
|
+
panel: M(() => [u("div", tn, [(b(), l(a, null, C(d, (e) => u("button", {
|
|
1973
1992
|
key: e.eighths,
|
|
1974
1993
|
type: "button",
|
|
1975
1994
|
class: "docx-tbwidth__option",
|
|
@@ -1977,11 +1996,11 @@ var Xe = {
|
|
|
1977
1996
|
}, [u("span", {
|
|
1978
1997
|
class: "docx-tbwidth__preview",
|
|
1979
1998
|
style: _({ borderTopWidth: e.previewPx + "px" })
|
|
1980
|
-
}, null, 4), u("span",
|
|
1999
|
+
}, null, 4), u("span", rn, E(e.label), 1)], 8, nn)), 64))])]),
|
|
1981
2000
|
_: 1
|
|
1982
2001
|
}, 8, ["open"]));
|
|
1983
2002
|
}
|
|
1984
|
-
}), [["__scopeId", "data-v-42a746ba"]]),
|
|
2003
|
+
}), [["__scopeId", "data-v-42a746ba"]]), on = /* @__PURE__ */ p({
|
|
1985
2004
|
__name: "TableCellFillPicker",
|
|
1986
2005
|
props: {
|
|
1987
2006
|
disabled: { type: Boolean },
|
|
@@ -2011,23 +2030,23 @@ var Xe = {
|
|
|
2011
2030
|
"auto-label"
|
|
2012
2031
|
]));
|
|
2013
2032
|
}
|
|
2014
|
-
}),
|
|
2033
|
+
}), sn = [
|
|
2015
2034
|
"disabled",
|
|
2016
2035
|
"title",
|
|
2017
2036
|
"onClick"
|
|
2018
|
-
],
|
|
2037
|
+
], cn = ["aria-label"], ln = ["disabled"], un = ["disabled"], dn = ["disabled"], fn = ["disabled"], pn = { class: "docx-tmore__section-label" }, mn = { class: "docx-tmore__icon-row" }, hn = ["title"], gn = ["title"], _n = ["title"], vn = { class: "docx-tmore__section-label" }, yn = { class: "docx-tmore__icon-row" }, bn = ["title"], xn = ["title"], Sn = ["title"], Cn = { class: "docx-tmore__grow" }, wn = {
|
|
2019
2038
|
key: 0,
|
|
2020
2039
|
class: "docx-tmore__sub"
|
|
2021
|
-
},
|
|
2040
|
+
}, Tn = { class: "docx-tmore__margin-grid" }, En = { class: "docx-tmore__field-label" }, Dn = ["onUpdate:modelValue"], On = { class: "docx-tmore__grow" }, kn = {
|
|
2022
2041
|
key: 1,
|
|
2023
2042
|
class: "docx-tmore__sub"
|
|
2024
|
-
},
|
|
2043
|
+
}, An = { class: "docx-tmore__row-field" }, jn = { class: "docx-tmore__field-label" }, Mn = { value: "auto" }, Nn = { value: "atLeast" }, Pn = { value: "exact" }, Fn = {
|
|
2025
2044
|
key: 0,
|
|
2026
2045
|
class: "docx-tmore__row-field"
|
|
2027
|
-
},
|
|
2046
|
+
}, In = { class: "docx-tmore__field-label" }, Ln = { class: "docx-tmore__grow" }, Rn = {
|
|
2028
2047
|
key: 2,
|
|
2029
2048
|
class: "docx-tmore__sub docx-tmore__sub--list"
|
|
2030
|
-
},
|
|
2049
|
+
}, zn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2031
2050
|
__name: "TableMoreDropdown",
|
|
2032
2051
|
props: {
|
|
2033
2052
|
disabled: {
|
|
@@ -2105,7 +2124,7 @@ var Xe = {
|
|
|
2105
2124
|
}, [f(r, {
|
|
2106
2125
|
name: "more_vert",
|
|
2107
2126
|
size: 20
|
|
2108
|
-
})], 10,
|
|
2127
|
+
})], 10, sn)]),
|
|
2109
2128
|
panel: M(() => [u("div", {
|
|
2110
2129
|
class: "docx-tmore__panel",
|
|
2111
2130
|
role: "menu",
|
|
@@ -2152,7 +2171,7 @@ var Xe = {
|
|
|
2152
2171
|
}, [f(r, {
|
|
2153
2172
|
name: "call_merge",
|
|
2154
2173
|
size: 18
|
|
2155
|
-
}), u("span", null, E(O(m)("table.mergeCells")), 1)], 8,
|
|
2174
|
+
}), u("span", null, E(O(m)("table.mergeCells")), 1)], 8, ln),
|
|
2156
2175
|
u("button", {
|
|
2157
2176
|
type: "button",
|
|
2158
2177
|
class: "docx-tmore__item",
|
|
@@ -2161,7 +2180,7 @@ var Xe = {
|
|
|
2161
2180
|
}, [f(r, {
|
|
2162
2181
|
name: "call_split",
|
|
2163
2182
|
size: 18
|
|
2164
|
-
}), u("span", null, E(O(m)("table.splitCell")), 1)], 8,
|
|
2183
|
+
}), u("span", null, E(O(m)("table.splitCell")), 1)], 8, un),
|
|
2165
2184
|
n[40] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2166
2185
|
u("button", {
|
|
2167
2186
|
type: "button",
|
|
@@ -2180,7 +2199,7 @@ var Xe = {
|
|
|
2180
2199
|
}, [f(r, {
|
|
2181
2200
|
name: "delete",
|
|
2182
2201
|
size: 18
|
|
2183
|
-
}), u("span", null, E(O(m)("deleteRow")), 1)], 8,
|
|
2202
|
+
}), u("span", null, E(O(m)("deleteRow")), 1)], 8, dn),
|
|
2184
2203
|
u("button", {
|
|
2185
2204
|
type: "button",
|
|
2186
2205
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
@@ -2189,7 +2208,7 @@ var Xe = {
|
|
|
2189
2208
|
}, [f(r, {
|
|
2190
2209
|
name: "delete",
|
|
2191
2210
|
size: 18
|
|
2192
|
-
}), u("span", null, E(O(m)("deleteColumn")), 1)], 8,
|
|
2211
|
+
}), u("span", null, E(O(m)("deleteColumn")), 1)], 8, fn),
|
|
2193
2212
|
u("button", {
|
|
2194
2213
|
type: "button",
|
|
2195
2214
|
class: "docx-tmore__item docx-tmore__item--danger",
|
|
@@ -2199,8 +2218,8 @@ var Xe = {
|
|
|
2199
2218
|
size: 18
|
|
2200
2219
|
}), u("span", null, E(O(m)("table.deleteTable")), 1)]),
|
|
2201
2220
|
n[42] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2202
|
-
u("div",
|
|
2203
|
-
u("div",
|
|
2221
|
+
u("div", pn, E(O(m)("tableAdvanced.verticalAlignment")), 1),
|
|
2222
|
+
u("div", mn, [
|
|
2204
2223
|
u("button", {
|
|
2205
2224
|
type: "button",
|
|
2206
2225
|
class: "docx-tmore__icon-btn",
|
|
@@ -2210,7 +2229,7 @@ var Xe = {
|
|
|
2210
2229
|
}, [f(r, {
|
|
2211
2230
|
name: "vertical_align_top",
|
|
2212
2231
|
size: 16
|
|
2213
|
-
})], 40,
|
|
2232
|
+
})], 40, hn),
|
|
2214
2233
|
u("button", {
|
|
2215
2234
|
type: "button",
|
|
2216
2235
|
class: "docx-tmore__icon-btn",
|
|
@@ -2220,7 +2239,7 @@ var Xe = {
|
|
|
2220
2239
|
}, [f(r, {
|
|
2221
2240
|
name: "vertical_align_center",
|
|
2222
2241
|
size: 16
|
|
2223
|
-
})], 40,
|
|
2242
|
+
})], 40, gn),
|
|
2224
2243
|
u("button", {
|
|
2225
2244
|
type: "button",
|
|
2226
2245
|
class: "docx-tmore__icon-btn",
|
|
@@ -2230,11 +2249,11 @@ var Xe = {
|
|
|
2230
2249
|
}, [f(r, {
|
|
2231
2250
|
name: "vertical_align_bottom",
|
|
2232
2251
|
size: 16
|
|
2233
|
-
})], 40,
|
|
2252
|
+
})], 40, _n)
|
|
2234
2253
|
]),
|
|
2235
2254
|
n[43] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2236
|
-
u("div",
|
|
2237
|
-
u("div",
|
|
2255
|
+
u("div", vn, E(O(m)("tableAdvanced.tableAlignment")), 1),
|
|
2256
|
+
u("div", yn, [
|
|
2238
2257
|
u("button", {
|
|
2239
2258
|
type: "button",
|
|
2240
2259
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "left" }]),
|
|
@@ -2244,7 +2263,7 @@ var Xe = {
|
|
|
2244
2263
|
}, [f(r, {
|
|
2245
2264
|
name: "format_align_left",
|
|
2246
2265
|
size: 16
|
|
2247
|
-
})], 42,
|
|
2266
|
+
})], 42, bn),
|
|
2248
2267
|
u("button", {
|
|
2249
2268
|
type: "button",
|
|
2250
2269
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "center" }]),
|
|
@@ -2254,7 +2273,7 @@ var Xe = {
|
|
|
2254
2273
|
}, [f(r, {
|
|
2255
2274
|
name: "format_align_center",
|
|
2256
2275
|
size: 16
|
|
2257
|
-
})], 42,
|
|
2276
|
+
})], 42, xn),
|
|
2258
2277
|
u("button", {
|
|
2259
2278
|
type: "button",
|
|
2260
2279
|
class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "right" }]),
|
|
@@ -2264,7 +2283,7 @@ var Xe = {
|
|
|
2264
2283
|
}, [f(r, {
|
|
2265
2284
|
name: "format_align_right",
|
|
2266
2285
|
size: 16
|
|
2267
|
-
})], 42,
|
|
2286
|
+
})], 42, Sn)
|
|
2268
2287
|
]),
|
|
2269
2288
|
n[44] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
|
|
2270
2289
|
u("button", {
|
|
@@ -2276,13 +2295,13 @@ var Xe = {
|
|
|
2276
2295
|
name: "padding",
|
|
2277
2296
|
size: 18
|
|
2278
2297
|
}),
|
|
2279
|
-
u("span",
|
|
2298
|
+
u("span", Cn, E(O(m)("tableAdvanced.cellMargins")), 1),
|
|
2280
2299
|
f(r, {
|
|
2281
2300
|
name: _.value ? "expand_less" : "expand_more",
|
|
2282
2301
|
size: 18
|
|
2283
2302
|
}, null, 8, ["name"])
|
|
2284
2303
|
]),
|
|
2285
|
-
_.value ? (b(), l("div",
|
|
2304
|
+
_.value ? (b(), l("div", wn, [u("div", Tn, [(b(), l(a, null, C([
|
|
2286
2305
|
"top",
|
|
2287
2306
|
"bottom",
|
|
2288
2307
|
"left",
|
|
@@ -2291,14 +2310,14 @@ var Xe = {
|
|
|
2291
2310
|
key: e,
|
|
2292
2311
|
class: "docx-tmore__field"
|
|
2293
2312
|
}, [
|
|
2294
|
-
u("span",
|
|
2313
|
+
u("span", En, E(e), 1),
|
|
2295
2314
|
N(u("input", {
|
|
2296
2315
|
type: "number",
|
|
2297
2316
|
min: "0",
|
|
2298
2317
|
step: "20",
|
|
2299
2318
|
"onUpdate:modelValue": (t) => w[e] = t,
|
|
2300
2319
|
class: "docx-tmore__input"
|
|
2301
|
-
}, null, 8,
|
|
2320
|
+
}, null, 8, Dn), [[
|
|
2302
2321
|
A,
|
|
2303
2322
|
w[e],
|
|
2304
2323
|
void 0,
|
|
@@ -2319,23 +2338,23 @@ var Xe = {
|
|
|
2319
2338
|
name: "height",
|
|
2320
2339
|
size: 18
|
|
2321
2340
|
}),
|
|
2322
|
-
u("span",
|
|
2341
|
+
u("span", On, E(O(m)("tableAdvanced.rowHeight")), 1),
|
|
2323
2342
|
f(r, {
|
|
2324
2343
|
name: v.value ? "expand_less" : "expand_more",
|
|
2325
2344
|
size: 18
|
|
2326
2345
|
}, null, 8, ["name"])
|
|
2327
2346
|
]),
|
|
2328
|
-
v.value ? (b(), l("div",
|
|
2329
|
-
u("label",
|
|
2347
|
+
v.value ? (b(), l("div", kn, [
|
|
2348
|
+
u("label", An, [u("span", jn, E(O(m)("tableAdvanced.rule")), 1), N(u("select", {
|
|
2330
2349
|
"onUpdate:modelValue": n[24] ||= (e) => D.value = e,
|
|
2331
2350
|
class: "docx-tmore__select"
|
|
2332
2351
|
}, [
|
|
2333
|
-
u("option",
|
|
2334
|
-
u("option",
|
|
2335
|
-
u("option",
|
|
2352
|
+
u("option", Mn, E(O(m)("tableAdvanced.heightRules.auto")), 1),
|
|
2353
|
+
u("option", Nn, E(O(m)("tableAdvanced.heightRules.atLeast")), 1),
|
|
2354
|
+
u("option", Pn, E(O(m)("tableAdvanced.heightRules.exact")), 1)
|
|
2336
2355
|
], 512), [[k, D.value]])]),
|
|
2337
|
-
D.value === "auto" ? c("", !0) : (b(), l("label",
|
|
2338
|
-
u("span",
|
|
2356
|
+
D.value === "auto" ? c("", !0) : (b(), l("label", Fn, [
|
|
2357
|
+
u("span", In, E(O(m)("tableAdvanced.height")), 1),
|
|
2339
2358
|
N(u("input", {
|
|
2340
2359
|
type: "number",
|
|
2341
2360
|
min: "0",
|
|
@@ -2365,13 +2384,13 @@ var Xe = {
|
|
|
2365
2384
|
name: "text_rotation_none",
|
|
2366
2385
|
size: 18
|
|
2367
2386
|
}),
|
|
2368
|
-
u("span",
|
|
2387
|
+
u("span", Ln, E(O(m)("textDirection")), 1),
|
|
2369
2388
|
f(r, {
|
|
2370
2389
|
name: y.value ? "expand_less" : "expand_more",
|
|
2371
2390
|
size: 18
|
|
2372
2391
|
}, null, 8, ["name"])
|
|
2373
2392
|
]),
|
|
2374
|
-
y.value ? (b(), l("div",
|
|
2393
|
+
y.value ? (b(), l("div", Rn, [
|
|
2375
2394
|
u("button", {
|
|
2376
2395
|
type: "button",
|
|
2377
2396
|
class: "docx-tmore__sub-item",
|
|
@@ -2430,11 +2449,11 @@ var Xe = {
|
|
|
2430
2449
|
name: "settings",
|
|
2431
2450
|
size: 18
|
|
2432
2451
|
}), u("span", null, E(O(m)("tableAdvanced.tableProperties")), 1)])
|
|
2433
|
-
], 8,
|
|
2452
|
+
], 8, cn)]),
|
|
2434
2453
|
_: 1
|
|
2435
2454
|
}, 8, ["open"]));
|
|
2436
2455
|
}
|
|
2437
|
-
}), [["__scopeId", "data-v-5d357bc4"]]),
|
|
2456
|
+
}), [["__scopeId", "data-v-5d357bc4"]]), Bn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2438
2457
|
__name: "TableToolbar",
|
|
2439
2458
|
props: {
|
|
2440
2459
|
view: {},
|
|
@@ -2561,14 +2580,14 @@ var Xe = {
|
|
|
2561
2580
|
onRowHeight: N
|
|
2562
2581
|
}), (t, n) => d.value ? (b(), l(a, { key: 0 }, [
|
|
2563
2582
|
n[0] ||= u("span", { class: "divider" }, null, -1),
|
|
2564
|
-
f(
|
|
2565
|
-
f(
|
|
2566
|
-
f(
|
|
2567
|
-
f(
|
|
2583
|
+
f(Qt, { onChange: w }),
|
|
2584
|
+
f($t, m({ theme: e.theme ?? null }, g.value, { onChange: T }), null, 16, ["theme"]),
|
|
2585
|
+
f(an, { onChange: E }),
|
|
2586
|
+
f(on, {
|
|
2568
2587
|
theme: e.theme ?? null,
|
|
2569
2588
|
onChange: D
|
|
2570
2589
|
}, null, 8, ["theme"]),
|
|
2571
|
-
f(
|
|
2590
|
+
f(zn, {
|
|
2572
2591
|
"can-split": p.value,
|
|
2573
2592
|
"can-merge": _.value,
|
|
2574
2593
|
"row-count": v.value,
|
|
@@ -2587,7 +2606,7 @@ var Xe = {
|
|
|
2587
2606
|
])
|
|
2588
2607
|
], 64)) : c("", !0);
|
|
2589
2608
|
}
|
|
2590
|
-
}), [["__scopeId", "data-v-c73a7e43"]]),
|
|
2609
|
+
}), [["__scopeId", "data-v-c73a7e43"]]), Vn = { class: "docx-vertical-ruler__ticks" }, Hn = 15840, Un = 1440, Wn = 1440, Gn = 567, Kn = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2591
2610
|
__name: "VerticalRuler",
|
|
2592
2611
|
props: {
|
|
2593
2612
|
sectionProps: {},
|
|
@@ -2607,7 +2626,7 @@ var Xe = {
|
|
|
2607
2626
|
function f(e) {
|
|
2608
2627
|
return Math.round(W(e / n.zoom));
|
|
2609
2628
|
}
|
|
2610
|
-
let p = o(() => n.sectionProps?.pageHeight ??
|
|
2629
|
+
let p = o(() => n.sectionProps?.pageHeight ?? Hn), m = o(() => n.sectionProps?.marginTop ?? Un), h = o(() => n.sectionProps?.marginBottom ?? Un), g = o(() => d(p.value)), y = o(() => d(m.value)), x = o(() => d(h.value)), w = o(() => ({
|
|
2611
2630
|
position: "relative",
|
|
2612
2631
|
width: "20px",
|
|
2613
2632
|
height: g.value + "px",
|
|
@@ -2618,7 +2637,7 @@ var Xe = {
|
|
|
2618
2637
|
})), T = o(() => {
|
|
2619
2638
|
let e = [];
|
|
2620
2639
|
if (n.unit === "inch") {
|
|
2621
|
-
let t =
|
|
2640
|
+
let t = Wn / 8, n = Math.ceil(p.value / t);
|
|
2622
2641
|
for (let r = 0; r <= n; r++) {
|
|
2623
2642
|
let n = r * t;
|
|
2624
2643
|
if (n > p.value) break;
|
|
@@ -2639,7 +2658,7 @@ var Xe = {
|
|
|
2639
2658
|
});
|
|
2640
2659
|
}
|
|
2641
2660
|
} else {
|
|
2642
|
-
let t =
|
|
2661
|
+
let t = Gn / 10, n = Math.ceil(p.value / t);
|
|
2643
2662
|
for (let r = 0; r <= n; r++) {
|
|
2644
2663
|
let n = r * t;
|
|
2645
2664
|
if (n > p.value) break;
|
|
@@ -2705,7 +2724,7 @@ var Xe = {
|
|
|
2705
2724
|
"aria-label": "Vertical ruler",
|
|
2706
2725
|
"aria-orientation": "vertical"
|
|
2707
2726
|
}, [
|
|
2708
|
-
u("div",
|
|
2727
|
+
u("div", Vn, [(b(!0), l(a, null, C(T.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
|
|
2709
2728
|
class: "docx-vertical-ruler__tick-line",
|
|
2710
2729
|
style: _({
|
|
2711
2730
|
top: e.position + "px",
|
|
@@ -2737,10 +2756,10 @@ var Xe = {
|
|
|
2737
2756
|
}), [["__scopeId", "data-v-f7ccbd38"]]);
|
|
2738
2757
|
//#endregion
|
|
2739
2758
|
//#region src/utils/comments.ts
|
|
2740
|
-
function
|
|
2759
|
+
function qn(e) {
|
|
2741
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("") : "";
|
|
2742
2761
|
}
|
|
2743
|
-
function
|
|
2762
|
+
function Jn(e) {
|
|
2744
2763
|
return e ? new Date(e).toLocaleString(void 0, {
|
|
2745
2764
|
hour: "numeric",
|
|
2746
2765
|
minute: "2-digit",
|
|
@@ -2748,10 +2767,10 @@ function qn(e) {
|
|
|
2748
2767
|
day: "numeric"
|
|
2749
2768
|
}) : "";
|
|
2750
2769
|
}
|
|
2751
|
-
function
|
|
2770
|
+
function Yn(e) {
|
|
2752
2771
|
return e.split(/\s+/).map((e) => e[0]).join("").toUpperCase().slice(0, 2);
|
|
2753
2772
|
}
|
|
2754
|
-
var
|
|
2773
|
+
var Xn = [
|
|
2755
2774
|
"#6DCCB1",
|
|
2756
2775
|
"#79AAD9",
|
|
2757
2776
|
"#EE789D",
|
|
@@ -2765,28 +2784,28 @@ var Yn = [
|
|
|
2765
2784
|
"#E15759",
|
|
2766
2785
|
"#76B7B2"
|
|
2767
2786
|
];
|
|
2768
|
-
function
|
|
2787
|
+
function Zn(e) {
|
|
2769
2788
|
let t = 0;
|
|
2770
2789
|
for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
|
|
2771
|
-
return
|
|
2790
|
+
return Xn[Math.abs(t) % Xn.length] ?? "#888888";
|
|
2772
2791
|
}
|
|
2773
2792
|
function $(e, t = 50) {
|
|
2774
2793
|
return e.length > t ? e.slice(0, t) + "..." : e;
|
|
2775
2794
|
}
|
|
2776
2795
|
//#endregion
|
|
2777
2796
|
//#region src/components/sidebar/Avatar.vue
|
|
2778
|
-
var
|
|
2797
|
+
var Qn = /* @__PURE__ */ p({
|
|
2779
2798
|
__name: "Avatar",
|
|
2780
2799
|
props: {
|
|
2781
2800
|
name: { default: "U" },
|
|
2782
2801
|
size: { default: 32 }
|
|
2783
2802
|
},
|
|
2784
2803
|
setup(e) {
|
|
2785
|
-
let t = e, n = o(() =>
|
|
2804
|
+
let t = e, n = o(() => Yn(t.name || "U")), r = o(() => ({
|
|
2786
2805
|
width: t.size + "px",
|
|
2787
2806
|
height: t.size + "px",
|
|
2788
2807
|
borderRadius: "50%",
|
|
2789
|
-
backgroundColor:
|
|
2808
|
+
backgroundColor: Zn(t.name || "U"),
|
|
2790
2809
|
color: "#fff",
|
|
2791
2810
|
display: "flex",
|
|
2792
2811
|
alignItems: "center",
|
|
@@ -2800,13 +2819,13 @@ var Zn = /* @__PURE__ */ p({
|
|
|
2800
2819
|
style: _(r.value)
|
|
2801
2820
|
}, E(n.value), 5));
|
|
2802
2821
|
}
|
|
2803
|
-
}),
|
|
2822
|
+
}), $n = {
|
|
2804
2823
|
key: 0,
|
|
2805
2824
|
class: "reply-thread"
|
|
2806
|
-
},
|
|
2825
|
+
}, er = {
|
|
2807
2826
|
key: 0,
|
|
2808
2827
|
class: "reply-thread__more"
|
|
2809
|
-
},
|
|
2828
|
+
}, tr = { class: "reply-thread__header" }, nr = { class: "reply-thread__author-block" }, rr = { class: "reply-thread__author" }, ir = { class: "reply-thread__date" }, ar = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2810
2829
|
__name: "ReplyThread",
|
|
2811
2830
|
props: {
|
|
2812
2831
|
replies: {},
|
|
@@ -2814,15 +2833,15 @@ var Zn = /* @__PURE__ */ p({
|
|
|
2814
2833
|
},
|
|
2815
2834
|
setup(e) {
|
|
2816
2835
|
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));
|
|
2817
|
-
return (t, i) => e.replies.length > 0 ? (b(), l("div",
|
|
2836
|
+
return (t, i) => e.replies.length > 0 ? (b(), l("div", $n, [r.value > 0 ? (b(), l("div", er, E(r.value) + " " + E(r.value === 1 ? "reply" : "replies"), 1)) : c("", !0), (b(!0), l(a, null, C(n.value, (t) => (b(), l("div", {
|
|
2818
2837
|
key: t.id,
|
|
2819
2838
|
class: g(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
|
|
2820
|
-
}, [u("div",
|
|
2839
|
+
}, [u("div", tr, [f(Qn, {
|
|
2821
2840
|
name: t.author,
|
|
2822
2841
|
size: 28
|
|
2823
|
-
}, null, 8, ["name"]), u("div",
|
|
2842
|
+
}, null, 8, ["name"]), u("div", nr, [u("div", rr, E(t.author || "Unknown"), 1), u("div", ir, E(O(Jn)(t.date)), 1)])]), u("div", { class: g(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, E(O(qn)(t.content)), 3)], 2))), 128))])) : c("", !0);
|
|
2824
2843
|
}
|
|
2825
|
-
}), [["__scopeId", "data-v-06331fac"]]),
|
|
2844
|
+
}), [["__scopeId", "data-v-06331fac"]]), or = ["onKeydown"], sr = { class: "reply-input__actions" }, cr = ["disabled"], lr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2826
2845
|
__name: "ReplyInput",
|
|
2827
2846
|
emits: ["submit"],
|
|
2828
2847
|
setup(e, { emit: t }) {
|
|
@@ -2854,14 +2873,14 @@ var Zn = /* @__PURE__ */ p({
|
|
|
2854
2873
|
P(F(p, ["prevent"]), ["enter"]),
|
|
2855
2874
|
P(f, ["esc"])
|
|
2856
2875
|
]
|
|
2857
|
-
}, null, 40,
|
|
2876
|
+
}, null, 40, or), [[A, i.value]]), u("div", sr, [u("button", {
|
|
2858
2877
|
class: "reply-input__cancel",
|
|
2859
2878
|
onClick: F(f, ["stop"])
|
|
2860
2879
|
}, "Cancel"), u("button", {
|
|
2861
2880
|
class: g(["reply-input__submit", { "reply-input__submit--active": c.value }]),
|
|
2862
2881
|
disabled: !c.value,
|
|
2863
2882
|
onClick: F(p, ["stop"])
|
|
2864
|
-
}, " Reply ", 10,
|
|
2883
|
+
}, " Reply ", 10, cr)])], 64)) : (b(), l("input", {
|
|
2865
2884
|
key: 0,
|
|
2866
2885
|
readonly: "",
|
|
2867
2886
|
placeholder: "Reply",
|
|
@@ -2870,13 +2889,13 @@ var Zn = /* @__PURE__ */ p({
|
|
|
2870
2889
|
onClick: F(d, ["stop"])
|
|
2871
2890
|
}, null, 32))], 32));
|
|
2872
2891
|
}
|
|
2873
|
-
}), [["__scopeId", "data-v-fea8646c"]]),
|
|
2892
|
+
}), [["__scopeId", "data-v-fea8646c"]]), ur = ["data-comment-id"], dr = {
|
|
2874
2893
|
key: 0,
|
|
2875
2894
|
class: "comment-card__resolved"
|
|
2876
|
-
},
|
|
2895
|
+
}, fr = { class: "comment-card__head" }, pr = { class: "comment-card__author-block" }, mr = { class: "comment-card__author" }, hr = { class: "comment-card__date" }, gr = {
|
|
2877
2896
|
key: 0,
|
|
2878
2897
|
class: "comment-card__actions"
|
|
2879
|
-
},
|
|
2898
|
+
}, _r = ["title"], vr = { class: "comment-card__body" }, yr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2880
2899
|
__name: "CommentCard",
|
|
2881
2900
|
props: {
|
|
2882
2901
|
comment: {},
|
|
@@ -2901,17 +2920,17 @@ var Zn = /* @__PURE__ */ p({
|
|
|
2901
2920
|
onClick: n[5] ||= (e) => t.$emit("click"),
|
|
2902
2921
|
onMousedown: n[6] ||= F(() => {}, ["stop"])
|
|
2903
2922
|
}, [
|
|
2904
|
-
e.comment.done ? (b(), l("div",
|
|
2923
|
+
e.comment.done ? (b(), l("div", dr, [f(r, {
|
|
2905
2924
|
name: "check",
|
|
2906
2925
|
size: 12
|
|
2907
2926
|
}), n[7] ||= u("span", null, "Resolved", -1)])) : c("", !0),
|
|
2908
|
-
u("div",
|
|
2909
|
-
f(
|
|
2927
|
+
u("div", fr, [
|
|
2928
|
+
f(Qn, {
|
|
2910
2929
|
name: e.comment.author,
|
|
2911
2930
|
size: 32
|
|
2912
2931
|
}, null, 8, ["name"]),
|
|
2913
|
-
u("div",
|
|
2914
|
-
e.expanded ? (b(), l("div",
|
|
2932
|
+
u("div", pr, [u("div", mr, E(e.comment.author || "Unknown"), 1), u("div", hr, E(O(Jn)(e.comment.date)), 1)]),
|
|
2933
|
+
e.expanded ? (b(), l("div", gr, [
|
|
2915
2934
|
u("button", {
|
|
2916
2935
|
class: "comment-card__icon-btn",
|
|
2917
2936
|
title: e.comment.done ? "Reopen" : "Resolve",
|
|
@@ -2919,7 +2938,7 @@ var Zn = /* @__PURE__ */ p({
|
|
|
2919
2938
|
}, [f(r, {
|
|
2920
2939
|
name: e.comment.done ? "undo" : "check",
|
|
2921
2940
|
size: 20
|
|
2922
|
-
}, null, 8, ["name"])], 8,
|
|
2941
|
+
}, null, 8, ["name"])], 8, _r),
|
|
2923
2942
|
u("button", {
|
|
2924
2943
|
class: "comment-card__icon-btn",
|
|
2925
2944
|
title: "More options",
|
|
@@ -2939,18 +2958,18 @@ var Zn = /* @__PURE__ */ p({
|
|
|
2939
2958
|
}, "Delete")], 32)) : c("", !0)
|
|
2940
2959
|
])) : c("", !0)
|
|
2941
2960
|
]),
|
|
2942
|
-
u("div",
|
|
2943
|
-
f(
|
|
2961
|
+
u("div", vr, E(O(qn)(e.comment.content)), 1),
|
|
2962
|
+
f(ar, {
|
|
2944
2963
|
replies: e.replies,
|
|
2945
2964
|
"is-expanded": e.expanded
|
|
2946
2965
|
}, null, 8, ["replies", "is-expanded"]),
|
|
2947
|
-
e.expanded && !e.comment.done ? (b(), s(
|
|
2966
|
+
e.expanded && !e.comment.done ? (b(), s(lr, {
|
|
2948
2967
|
key: 1,
|
|
2949
2968
|
onSubmit: n[4] ||= (n) => t.$emit("reply", e.comment.id, n)
|
|
2950
2969
|
})) : c("", !0)
|
|
2951
|
-
], 42,
|
|
2970
|
+
], 42, ur));
|
|
2952
2971
|
}
|
|
2953
|
-
}), [["__scopeId", "data-v-7a3ee7ac"]]),
|
|
2972
|
+
}), [["__scopeId", "data-v-7a3ee7ac"]]), br = ["data-comment-id"], xr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2954
2973
|
__name: "ResolvedCommentMarker",
|
|
2955
2974
|
props: { comment: {} },
|
|
2956
2975
|
emits: ["toggle-expand"],
|
|
@@ -2964,39 +2983,39 @@ var Zn = /* @__PURE__ */ p({
|
|
|
2964
2983
|
}, [f(r, {
|
|
2965
2984
|
name: "chat_bubble_check",
|
|
2966
2985
|
size: 20
|
|
2967
|
-
})], 40,
|
|
2986
|
+
})], 40, br));
|
|
2968
2987
|
}
|
|
2969
|
-
}), [["__scopeId", "data-v-d0c228f6"]]),
|
|
2988
|
+
}), [["__scopeId", "data-v-d0c228f6"]]), Sr = { class: "tc-card__head" }, Cr = { class: "tc-card__author-block" }, wr = { class: "tc-card__author" }, Tr = {
|
|
2970
2989
|
key: 0,
|
|
2971
2990
|
class: "tc-card__date"
|
|
2972
|
-
},
|
|
2991
|
+
}, Er = {
|
|
2973
2992
|
key: 0,
|
|
2974
2993
|
class: "tc-card__actions"
|
|
2975
|
-
},
|
|
2994
|
+
}, Dr = ["title"], Or = ["title"], kr = { class: "tc-card__body" }, Ar = { class: "tc-card__deleted" }, jr = { class: "tc-card__inserted" }, Mr = { class: "tc-card__inserted" }, Nr = { class: "tc-card__deleted" }, Pr = {
|
|
2976
2995
|
key: 0,
|
|
2977
2996
|
class: "tc-card__changed"
|
|
2978
|
-
},
|
|
2997
|
+
}, Fr = { class: "tc-card__changed" }, Ir = { class: "tc-card__changed" }, Lr = {
|
|
2979
2998
|
key: 5,
|
|
2980
2999
|
class: "tc-card__inserted"
|
|
2981
|
-
},
|
|
3000
|
+
}, Rr = {
|
|
2982
3001
|
key: 6,
|
|
2983
3002
|
class: "tc-card__deleted"
|
|
2984
|
-
},
|
|
3003
|
+
}, zr = {
|
|
2985
3004
|
key: 7,
|
|
2986
3005
|
class: "tc-card__inserted"
|
|
2987
|
-
},
|
|
3006
|
+
}, Br = {
|
|
2988
3007
|
key: 8,
|
|
2989
3008
|
class: "tc-card__deleted"
|
|
2990
|
-
},
|
|
3009
|
+
}, Vr = {
|
|
2991
3010
|
key: 9,
|
|
2992
3011
|
class: "tc-card__changed"
|
|
2993
|
-
},
|
|
3012
|
+
}, Hr = {
|
|
2994
3013
|
key: 10,
|
|
2995
3014
|
class: "tc-card__inserted"
|
|
2996
|
-
},
|
|
3015
|
+
}, Ur = {
|
|
2997
3016
|
key: 11,
|
|
2998
3017
|
class: "tc-card__deleted"
|
|
2999
|
-
},
|
|
3018
|
+
}, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3000
3019
|
__name: "TrackedChangeCard",
|
|
3001
3020
|
props: {
|
|
3002
3021
|
change: {},
|
|
@@ -3059,45 +3078,45 @@ var Zn = /* @__PURE__ */ p({
|
|
|
3059
3078
|
onClick: n[1] ||= (e) => t.$emit("click"),
|
|
3060
3079
|
onMousedown: n[2] ||= F(() => {}, ["stop"])
|
|
3061
3080
|
}, [
|
|
3062
|
-
u("div",
|
|
3063
|
-
f(
|
|
3081
|
+
u("div", Sr, [
|
|
3082
|
+
f(Qn, {
|
|
3064
3083
|
name: h.value,
|
|
3065
3084
|
size: 32
|
|
3066
3085
|
}, null, 8, ["name"]),
|
|
3067
|
-
u("div",
|
|
3068
|
-
e.expanded ? (b(), l("div",
|
|
3086
|
+
u("div", Cr, [u("div", wr, E(h.value), 1), e.change.date ? (b(), l("div", Tr, E(O(Jn)(e.change.date)), 1)) : c("", !0)]),
|
|
3087
|
+
e.expanded ? (b(), l("div", Er, [u("button", {
|
|
3069
3088
|
class: "tc-card__icon-btn",
|
|
3070
3089
|
title: O(i)("acceptChange"),
|
|
3071
3090
|
onClick: F(x, ["stop"])
|
|
3072
3091
|
}, [f(r, {
|
|
3073
3092
|
name: "check",
|
|
3074
3093
|
size: 20
|
|
3075
|
-
})], 8,
|
|
3094
|
+
})], 8, Dr), u("button", {
|
|
3076
3095
|
class: "tc-card__icon-btn",
|
|
3077
3096
|
title: O(i)("rejectChange"),
|
|
3078
3097
|
onClick: F(S, ["stop"])
|
|
3079
3098
|
}, [f(r, {
|
|
3080
3099
|
name: "close",
|
|
3081
3100
|
size: 20
|
|
3082
|
-
})], 8,
|
|
3101
|
+
})], 8, Or)])) : c("", !0)
|
|
3083
3102
|
]),
|
|
3084
|
-
u("div",
|
|
3103
|
+
u("div", kr, [e.change.type === "replacement" ? (b(), l(a, { key: 0 }, [
|
|
3085
3104
|
d(E(O(i)("trackedChanges.replaced")) + " ", 1),
|
|
3086
|
-
u("span",
|
|
3105
|
+
u("span", Ar, "\"" + E(O($)(e.change.deletedText || "")) + "\"", 1),
|
|
3087
3106
|
d(" " + E(O(i)("trackedChanges.with")) + " ", 1),
|
|
3088
|
-
u("span",
|
|
3089
|
-
], 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",
|
|
3090
|
-
f(
|
|
3107
|
+
u("span", jr, "\"" + E(O($)(e.change.text)) + "\"", 1)
|
|
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", Mr, "\"" + 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", Nr, "\"" + 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", Pr, 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", Fr, "\"" + 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", Ir, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "rowInserted" ? (b(), l("span", Lr, E(O(i)("revisions.rowInserted")), 1)) : e.change.type === "rowDeleted" ? (b(), l("span", Rr, E(O(i)("revisions.rowDeleted")), 1)) : e.change.type === "cellInserted" ? (b(), l("span", zr, E(O(i)("revisions.cellInserted")), 1)) : e.change.type === "cellDeleted" ? (b(), l("span", Br, E(O(i)("revisions.cellDeleted")), 1)) : e.change.type === "cellMerged" ? (b(), l("span", Vr, E(O(i)("revisions.cellMerged")), 1)) : e.change.type === "tableInserted" ? (b(), l("span", Hr, E(O(i)("revisions.tableInserted")), 1)) : e.change.type === "tableDeleted" ? (b(), l("span", Ur, 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))]),
|
|
3109
|
+
f(ar, {
|
|
3091
3110
|
replies: e.replies,
|
|
3092
3111
|
"is-expanded": e.expanded
|
|
3093
3112
|
}, null, 8, ["replies", "is-expanded"]),
|
|
3094
|
-
e.expanded ? (b(), s(
|
|
3113
|
+
e.expanded ? (b(), s(lr, {
|
|
3095
3114
|
key: 0,
|
|
3096
3115
|
onSubmit: n[0] ||= (n) => t.$emit("reply", e.change.revisionId, n)
|
|
3097
3116
|
})) : c("", !0)
|
|
3098
3117
|
], 34));
|
|
3099
3118
|
}
|
|
3100
|
-
}), [["__scopeId", "data-v-b19a1fcd"]]),
|
|
3119
|
+
}), [["__scopeId", "data-v-b19a1fcd"]]), Gr = ["onKeydown"], Kr = { class: "add-comment-card__actions" }, qr = ["disabled"], Jr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3101
3120
|
__name: "AddCommentCard",
|
|
3102
3121
|
emits: ["submit", "cancel"],
|
|
3103
3122
|
setup(e, { emit: t }) {
|
|
@@ -3126,19 +3145,19 @@ var Zn = /* @__PURE__ */ p({
|
|
|
3126
3145
|
P(F(s, ["exact", "prevent"]), ["enter"]),
|
|
3127
3146
|
P(c, ["esc"])
|
|
3128
3147
|
]
|
|
3129
|
-
}, null, 40,
|
|
3148
|
+
}, null, 40, Gr), [[A, r.value]]), u("div", Kr, [u("button", {
|
|
3130
3149
|
class: "add-comment-card__cancel",
|
|
3131
3150
|
onClick: c
|
|
3132
3151
|
}, "Cancel"), u("button", {
|
|
3133
3152
|
class: g(["add-comment-card__submit", { "add-comment-card__submit--active": a.value }]),
|
|
3134
3153
|
disabled: !a.value,
|
|
3135
3154
|
onClick: s
|
|
3136
|
-
}, " Comment ", 10,
|
|
3155
|
+
}, " Comment ", 10, qr)])], 32));
|
|
3137
3156
|
}
|
|
3138
3157
|
}), [["__scopeId", "data-v-2939f9cd"]]);
|
|
3139
3158
|
//#endregion
|
|
3140
3159
|
//#region src/composables/useCommentSidebarItems.ts
|
|
3141
|
-
function
|
|
3160
|
+
function Yr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
|
|
3142
3161
|
return o(() => {
|
|
3143
3162
|
let a = [];
|
|
3144
3163
|
r?.value && i?.value != null && a.push({
|
|
@@ -3181,7 +3200,7 @@ function Jr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment:
|
|
|
3181
3200
|
}
|
|
3182
3201
|
//#endregion
|
|
3183
3202
|
//#region src/components/UnifiedSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
3184
|
-
var
|
|
3203
|
+
var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3185
3204
|
__name: "UnifiedSidebar",
|
|
3186
3205
|
props: {
|
|
3187
3206
|
isOpen: { type: Boolean },
|
|
@@ -3223,7 +3242,7 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3223
3242
|
let t = e.target;
|
|
3224
3243
|
t instanceof HTMLElement && t.closest(".unified-sidebar__card-slot") || p.value !== null && (f.value = null, r("update:activeItemId", null));
|
|
3225
3244
|
}
|
|
3226
|
-
let x =
|
|
3245
|
+
let x = Yr({
|
|
3227
3246
|
comments: D(n, "comments"),
|
|
3228
3247
|
trackedChanges: D(n, "trackedChanges"),
|
|
3229
3248
|
showResolved: o(() => n.showResolved ?? !1),
|
|
@@ -3283,7 +3302,7 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3283
3302
|
t && u.set(t, e.offsetHeight);
|
|
3284
3303
|
}
|
|
3285
3304
|
let f = /* @__PURE__ */ new Map();
|
|
3286
|
-
for (let { item: n, y: r } of
|
|
3305
|
+
for (let { item: n, y: r } of Y({
|
|
3287
3306
|
items: t,
|
|
3288
3307
|
anchorPositions: c,
|
|
3289
3308
|
renderedDomContext: V(e),
|
|
@@ -3372,10 +3391,10 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3372
3391
|
transition: "top 0.15s ease"
|
|
3373
3392
|
};
|
|
3374
3393
|
}
|
|
3375
|
-
let
|
|
3394
|
+
let J = !1;
|
|
3376
3395
|
function X() {
|
|
3377
|
-
|
|
3378
|
-
|
|
3396
|
+
J || (J = !0, requestAnimationFrame(() => {
|
|
3397
|
+
J = !1, L();
|
|
3379
3398
|
}));
|
|
3380
3399
|
}
|
|
3381
3400
|
j(() => [
|
|
@@ -3442,15 +3461,15 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3442
3461
|
class: "unified-sidebar__card-slot",
|
|
3443
3462
|
"data-card-id": e.id,
|
|
3444
3463
|
style: _(q(e.id))
|
|
3445
|
-
}, [e.kind === "add-comment" ? (b(), s(
|
|
3464
|
+
}, [e.kind === "add-comment" ? (b(), s(Jr, {
|
|
3446
3465
|
key: 0,
|
|
3447
3466
|
onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
|
|
3448
3467
|
onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
|
|
3449
|
-
})) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (b(), s(
|
|
3468
|
+
})) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (b(), s(xr, {
|
|
3450
3469
|
key: 1,
|
|
3451
3470
|
comment: e.comment,
|
|
3452
3471
|
onToggleExpand: (t) => m(e.id)
|
|
3453
|
-
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(
|
|
3472
|
+
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(yr, {
|
|
3454
3473
|
key: 2,
|
|
3455
3474
|
comment: e.comment,
|
|
3456
3475
|
replies: e.replies,
|
|
@@ -3465,7 +3484,7 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3465
3484
|
"replies",
|
|
3466
3485
|
"expanded",
|
|
3467
3486
|
"onClick"
|
|
3468
|
-
])) : e.kind === "tracked-change" ? (b(), s(
|
|
3487
|
+
])) : e.kind === "tracked-change" ? (b(), s(Wr, {
|
|
3469
3488
|
key: 3,
|
|
3470
3489
|
change: e.change,
|
|
3471
3490
|
replies: e.replies ?? [],
|
|
@@ -3481,9 +3500,9 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3481
3500
|
"replies",
|
|
3482
3501
|
"expanded",
|
|
3483
3502
|
"onClick"
|
|
3484
|
-
])) : c("", !0)], 12,
|
|
3503
|
+
])) : c("", !0)], 12, Zr))), 128))], 4)], 46, Xr)) : c("", !0)], 64));
|
|
3485
3504
|
}
|
|
3486
|
-
}), [["__scopeId", "data-v-071b08b5"]]),
|
|
3505
|
+
}), [["__scopeId", "data-v-071b08b5"]]), $r = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3487
3506
|
__name: "StylePicker",
|
|
3488
3507
|
props: {
|
|
3489
3508
|
value: {},
|
|
@@ -3542,12 +3561,12 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3542
3561
|
"class"
|
|
3543
3562
|
]));
|
|
3544
3563
|
}
|
|
3545
|
-
}), [["__scopeId", "data-v-06469e2c"]]),
|
|
3564
|
+
}), [["__scopeId", "data-v-06469e2c"]]), ei = [
|
|
3546
3565
|
"disabled",
|
|
3547
3566
|
"title",
|
|
3548
3567
|
"aria-expanded",
|
|
3549
3568
|
"onClick"
|
|
3550
|
-
],
|
|
3569
|
+
], ti = { class: "docx-align__panel" }, ni = ["title", "onClick"], ri = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3551
3570
|
__name: "AlignmentButtons",
|
|
3552
3571
|
props: {
|
|
3553
3572
|
value: { default: "left" },
|
|
@@ -3606,8 +3625,8 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3606
3625
|
}, null, 8, ["name"]), f(r, {
|
|
3607
3626
|
name: "arrow_drop_down",
|
|
3608
3627
|
size: 14
|
|
3609
|
-
})], 10,
|
|
3610
|
-
panel: M(() => [u("div",
|
|
3628
|
+
})], 10, ei)]),
|
|
3629
|
+
panel: M(() => [u("div", ti, [(b(), l(a, null, C(m, (t) => u("button", {
|
|
3611
3630
|
key: t.value,
|
|
3612
3631
|
type: "button",
|
|
3613
3632
|
class: g(["docx-align__option", { "docx-align__option--active": e.value === t.value }]),
|
|
@@ -3616,11 +3635,11 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3616
3635
|
}, [f(r, {
|
|
3617
3636
|
name: t.icon,
|
|
3618
3637
|
size: 20
|
|
3619
|
-
}, null, 8, ["name"])], 10,
|
|
3638
|
+
}, null, 8, ["name"])], 10, ni)), 64))])]),
|
|
3620
3639
|
_: 1
|
|
3621
3640
|
}, 8, ["open"]));
|
|
3622
3641
|
}
|
|
3623
|
-
}), [["__scopeId", "data-v-088792b0"]]),
|
|
3642
|
+
}), [["__scopeId", "data-v-088792b0"]]), ii = { class: "docx-list-btns" }, ai = ["disabled"], oi = ["disabled"], si = ["disabled"], ci = ["disabled"], li = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3624
3643
|
__name: "ListButtons",
|
|
3625
3644
|
props: {
|
|
3626
3645
|
listState: {},
|
|
@@ -3644,7 +3663,7 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3644
3663
|
"outdent"
|
|
3645
3664
|
],
|
|
3646
3665
|
setup(e) {
|
|
3647
|
-
return (t, n) => (b(), l("span",
|
|
3666
|
+
return (t, n) => (b(), l("span", ii, [
|
|
3648
3667
|
u("button", {
|
|
3649
3668
|
type: "button",
|
|
3650
3669
|
class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.type === "bullet" }]),
|
|
@@ -3654,7 +3673,7 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3654
3673
|
}, [f(r, {
|
|
3655
3674
|
name: "format_list_bulleted",
|
|
3656
3675
|
size: 20
|
|
3657
|
-
})], 10,
|
|
3676
|
+
})], 10, ai),
|
|
3658
3677
|
u("button", {
|
|
3659
3678
|
type: "button",
|
|
3660
3679
|
class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.type === "numbered" }]),
|
|
@@ -3664,7 +3683,7 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3664
3683
|
}, [f(r, {
|
|
3665
3684
|
name: "format_list_numbered",
|
|
3666
3685
|
size: 20
|
|
3667
|
-
})], 10,
|
|
3686
|
+
})], 10, oi),
|
|
3668
3687
|
e.showIndentButtons ? (b(), l(a, { key: 0 }, [u("button", {
|
|
3669
3688
|
type: "button",
|
|
3670
3689
|
class: "docx-list-btns__btn",
|
|
@@ -3674,7 +3693,7 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3674
3693
|
}, [f(r, {
|
|
3675
3694
|
name: "format_indent_decrease",
|
|
3676
3695
|
size: 20
|
|
3677
|
-
})], 8,
|
|
3696
|
+
})], 8, si), u("button", {
|
|
3678
3697
|
type: "button",
|
|
3679
3698
|
class: "docx-list-btns__btn",
|
|
3680
3699
|
disabled: e.disabled,
|
|
@@ -3683,9 +3702,9 @@ var Yr = ["data-folio-comments-surface", "tabindex"], Xr = ["data-card-id"], Zr
|
|
|
3683
3702
|
}, [f(r, {
|
|
3684
3703
|
name: "format_indent_increase",
|
|
3685
3704
|
size: 20
|
|
3686
|
-
})], 8,
|
|
3705
|
+
})], 8, ci)], 64)) : c("", !0)
|
|
3687
3706
|
]));
|
|
3688
3707
|
}
|
|
3689
3708
|
}), [["__scopeId", "data-v-7cc21148"]]);
|
|
3690
3709
|
//#endregion
|
|
3691
|
-
export {
|
|
3710
|
+
export { he as C, ne as D, ae as E, ge as S, ce as T, Qt as _, Jr as a, Te as b, yr as c, Kn as d, Bn as f, $t as g, an as h, Qr as i, lr as l, on as m, ri as n, Wr as o, zn as p, $r as r, xr as s, li as t, ar as u, Jt as v, fe as w, _e as x, It as y };
|