@stll/folio-vue 0.2.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.
Files changed (109) hide show
  1. package/dist/ListButtons-B498PX1d.js +4256 -0
  2. package/dist/ListButtons-D-zMJ7rl.cjs +4 -0
  3. package/dist/PageSetupDialog-CGBaBVzo.cjs +15 -0
  4. package/dist/PageSetupDialog-DsjAfJy0.js +4873 -0
  5. package/dist/TablePropertiesDialog-A-1Pm1f9.cjs +1 -0
  6. package/dist/TablePropertiesDialog-PyXEJC_o.js +887 -0
  7. package/dist/components/DocxEditor/pagedEditorRef.d.ts +75 -0
  8. package/dist/components/DocxEditor/types.d.ts +528 -0
  9. package/dist/components/EditorToolbarContext.d.ts +9 -0
  10. package/dist/components/FormattingBar.types.d.ts +67 -0
  11. package/dist/components/Toolbar/presets.d.ts +25 -0
  12. package/dist/components/dialogs/index.d.ts +24 -0
  13. package/dist/components/imageContextMenuTypes.d.ts +30 -0
  14. package/dist/components/imageSelectionTypes.d.ts +13 -0
  15. package/dist/components/insertTableState.d.ts +9 -0
  16. package/dist/components/sidebar/cardStyles.d.ts +1 -0
  17. package/dist/components/sidebar/cardUtils.d.ts +1 -0
  18. package/dist/components/sidebar/resolveItemPositions.d.ts +22 -0
  19. package/dist/components/sidebar/sidebarUtils.d.ts +4 -0
  20. package/dist/components/tableStylePresets.d.ts +60 -0
  21. package/dist/components/toolbarUtils.d.ts +3 -0
  22. package/dist/components/ui/AlignmentButtons.types.d.ts +13 -0
  23. package/dist/components/ui/StylePicker.types.d.ts +16 -0
  24. package/dist/components/ui/ZoomControl.types.d.ts +21 -0
  25. package/dist/components/ui/fontPickerValue.d.ts +1 -0
  26. package/dist/components/ui/hyperlinkPopupTypes.d.ts +20 -0
  27. package/dist/composables/commentMarks.d.ts +32 -0
  28. package/dist/composables/imageOverlayRect.d.ts +44 -0
  29. package/dist/composables/index.d.ts +30 -0
  30. package/dist/composables/useAutoSave.d.ts +39 -0
  31. package/dist/composables/useClipboard.d.ts +21 -0
  32. package/dist/composables/useColorMode.d.ts +8 -0
  33. package/dist/composables/useCommentLifecycle.d.ts +39 -0
  34. package/dist/composables/useCommentManagement.d.ts +47 -0
  35. package/dist/composables/useCommentSidebarItems.d.ts +24 -0
  36. package/dist/composables/useContextMenus.d.ts +64 -0
  37. package/dist/composables/useControllableBoolean.d.ts +16 -0
  38. package/dist/composables/useDocumentLifecycle.d.ts +11 -0
  39. package/dist/composables/useDocxEditor.d.ts +123 -0
  40. package/dist/composables/useDocxEditorRefApi.d.ts +68 -0
  41. package/dist/composables/useDragAutoScroll.d.ts +11 -0
  42. package/dist/composables/useFileIO.d.ts +43 -0
  43. package/dist/composables/useFindReplace.d.ts +22 -0
  44. package/dist/composables/useFixedDropdown.d.ts +14 -0
  45. package/dist/composables/useFormattingActions.d.ts +21 -0
  46. package/dist/composables/useHistory.d.ts +9 -0
  47. package/dist/composables/useHostCallbacks.d.ts +24 -0
  48. package/dist/composables/useHyperlinkManagement.d.ts +40 -0
  49. package/dist/composables/useImageActions.d.ts +25 -0
  50. package/dist/composables/useKeyboardShortcuts.d.ts +25 -0
  51. package/dist/composables/useMenuActions.d.ts +36 -0
  52. package/dist/composables/useOutlineSidebar.d.ts +24 -0
  53. package/dist/composables/usePageSetupControls.d.ts +28 -0
  54. package/dist/composables/usePagesPointer.d.ts +87 -0
  55. package/dist/composables/useParagraphStyleOptions.d.ts +18 -0
  56. package/dist/composables/usePortalClass.d.ts +8 -0
  57. package/dist/composables/useSelectionHighlight.d.ts +19 -0
  58. package/dist/composables/useSelectionSync.d.ts +30 -0
  59. package/dist/composables/useTableResize.d.ts +7 -0
  60. package/dist/composables/useTableSelection.d.ts +10 -0
  61. package/dist/composables/useToolbarDropdowns.d.ts +15 -0
  62. package/dist/composables/useToolbarFontSize.d.ts +15 -0
  63. package/dist/composables/useTrackedChanges.d.ts +12 -0
  64. package/dist/composables/useVisualLineNavigation.d.ts +11 -0
  65. package/dist/composables/useWheelZoom.d.ts +10 -0
  66. package/dist/composables/useZoom.d.ts +16 -0
  67. package/dist/composables.cjs +61 -0
  68. package/dist/composables.js +378 -0
  69. package/dist/dialogs.cjs +1 -0
  70. package/dist/dialogs.js +3 -0
  71. package/dist/folio-vue.css +2 -0
  72. package/dist/i18n/index.d.ts +36 -0
  73. package/dist/i18n/messages.d.ts +1 -0
  74. package/dist/index.cjs +1 -0
  75. package/dist/index.d.ts +50 -0
  76. package/dist/index.js +4088 -0
  77. package/dist/messages.cjs +1 -0
  78. package/dist/messages.js +1 -0
  79. package/dist/renderAsync.d.ts +35 -0
  80. package/dist/styles/index.d.ts +12 -0
  81. package/dist/styles/zIndex.d.ts +18 -0
  82. package/dist/styles.cjs +1 -0
  83. package/dist/styles.js +5 -0
  84. package/dist/ui/folio-ui.d.ts +139 -0
  85. package/dist/ui.cjs +1 -0
  86. package/dist/ui.d.ts +67 -0
  87. package/dist/ui.js +446 -0
  88. package/dist/useZoom-BryUw3Cu.cjs +1 -0
  89. package/dist/useZoom-CIIRid8U.js +626 -0
  90. package/dist/utils/aiEditRange.d.ts +26 -0
  91. package/dist/utils/autoScroll.d.ts +22 -0
  92. package/dist/utils/cardStyles.d.ts +3 -0
  93. package/dist/utils/colorMode.d.ts +32 -0
  94. package/dist/utils/comments.d.ts +20 -0
  95. package/dist/utils/cssTypes.d.ts +7 -0
  96. package/dist/utils/domQueries.d.ts +39 -0
  97. package/dist/utils/fontOptions.d.ts +26 -0
  98. package/dist/utils/hostFonts.d.ts +25 -0
  99. package/dist/utils/imageClipboard.d.ts +9 -0
  100. package/dist/utils/index.d.ts +13 -0
  101. package/dist/utils/listState.d.ts +22 -0
  102. package/dist/utils/reportIssue.d.ts +18 -0
  103. package/dist/utils/selectionHighlight.d.ts +44 -0
  104. package/dist/utils/sidebarConstants.d.ts +8 -0
  105. package/dist/utils/stylePreview.d.ts +53 -0
  106. package/dist/utils/textSelection.d.ts +40 -0
  107. package/dist/zIndex-BY0qa8Au.js +12 -0
  108. package/dist/zIndex-dFsQbASx.cjs +1 -0
  109. package/package.json +99 -0
@@ -0,0 +1,887 @@
1
+ import { l as e, u as t } from "./PageSetupDialog-DsjAfJy0.js";
2
+ import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, openBlock as d, reactive as f, ref as p, renderList as m, toDisplayString as h, unref as g, vModelRadio as _, vModelSelect as v, vModelText as y, watch as b, withDirectives as x, withKeys as S, withModifiers as C } from "vue";
3
+ //#region src/components/tableStylePresets.ts
4
+ var w = (e) => ({
5
+ style: "single",
6
+ size: 4,
7
+ color: { rgb: e }
8
+ }), T = [
9
+ {
10
+ id: "TableNormal",
11
+ name: "Normal Table",
12
+ look: {
13
+ firstRow: !1,
14
+ lastRow: !1,
15
+ noHBand: !0,
16
+ noVBand: !0
17
+ }
18
+ },
19
+ {
20
+ id: "TableGrid",
21
+ name: "Table Grid",
22
+ tableBorders: {
23
+ top: w("000000"),
24
+ bottom: w("000000"),
25
+ left: w("000000"),
26
+ right: w("000000"),
27
+ insideH: w("000000"),
28
+ insideV: w("000000")
29
+ },
30
+ look: {
31
+ firstRow: !1,
32
+ lastRow: !1,
33
+ noHBand: !0,
34
+ noVBand: !0
35
+ }
36
+ },
37
+ {
38
+ id: "TableGridLight",
39
+ name: "Grid Table Light",
40
+ tableBorders: {
41
+ top: w("BFBFBF"),
42
+ bottom: w("BFBFBF"),
43
+ left: w("BFBFBF"),
44
+ right: w("BFBFBF"),
45
+ insideH: w("BFBFBF"),
46
+ insideV: w("BFBFBF")
47
+ },
48
+ look: {
49
+ firstRow: !0,
50
+ lastRow: !1,
51
+ noHBand: !0,
52
+ noVBand: !0
53
+ },
54
+ conditionals: { firstRow: {
55
+ bold: !0,
56
+ borders: { bottom: w("000000") }
57
+ } }
58
+ },
59
+ {
60
+ id: "PlainTable1",
61
+ name: "Plain Table 1",
62
+ tableBorders: {
63
+ top: w("BFBFBF"),
64
+ bottom: w("BFBFBF"),
65
+ insideH: w("BFBFBF")
66
+ },
67
+ look: {
68
+ firstRow: !0,
69
+ lastRow: !1,
70
+ noHBand: !0,
71
+ noVBand: !0
72
+ },
73
+ conditionals: { firstRow: { bold: !0 } }
74
+ },
75
+ {
76
+ id: "PlainTable2",
77
+ name: "Plain Table 2",
78
+ look: {
79
+ firstRow: !0,
80
+ lastRow: !1,
81
+ noHBand: !1,
82
+ noVBand: !0
83
+ },
84
+ conditionals: {
85
+ firstRow: {
86
+ bold: !0,
87
+ borders: { bottom: w("7F7F7F") }
88
+ },
89
+ band1Horz: { backgroundColor: "#F2F2F2" }
90
+ }
91
+ },
92
+ {
93
+ id: "PlainTable3",
94
+ name: "Plain Table 3",
95
+ look: {
96
+ firstRow: !0,
97
+ lastRow: !1,
98
+ noHBand: !1,
99
+ noVBand: !0
100
+ },
101
+ conditionals: {
102
+ firstRow: {
103
+ bold: !0,
104
+ color: "#FFFFFF",
105
+ backgroundColor: "#A5A5A5"
106
+ },
107
+ band1Horz: { backgroundColor: "#E7E7E7" }
108
+ }
109
+ },
110
+ {
111
+ id: "PlainTable4",
112
+ name: "Plain Table 4",
113
+ look: {
114
+ firstRow: !0,
115
+ lastRow: !1,
116
+ noHBand: !1,
117
+ noVBand: !0
118
+ },
119
+ conditionals: {
120
+ firstRow: {
121
+ bold: !0,
122
+ color: "#FFFFFF",
123
+ backgroundColor: "#000000"
124
+ },
125
+ band1Horz: { backgroundColor: "#F2F2F2" }
126
+ }
127
+ },
128
+ {
129
+ id: "GridTable1Light-Accent1",
130
+ name: "Grid Table 1 Light",
131
+ tableBorders: {
132
+ top: w("B4C6E7"),
133
+ bottom: w("B4C6E7"),
134
+ left: w("B4C6E7"),
135
+ right: w("B4C6E7"),
136
+ insideH: w("B4C6E7"),
137
+ insideV: w("B4C6E7")
138
+ },
139
+ look: {
140
+ firstRow: !0,
141
+ lastRow: !1,
142
+ noHBand: !0,
143
+ noVBand: !0
144
+ },
145
+ conditionals: { firstRow: {
146
+ bold: !0,
147
+ borders: { bottom: w("4472C4") }
148
+ } }
149
+ },
150
+ {
151
+ id: "GridTable4-Accent1",
152
+ name: "Grid Table 4 Accent 1",
153
+ tableBorders: {
154
+ top: w("4472C4"),
155
+ bottom: w("4472C4"),
156
+ left: w("4472C4"),
157
+ right: w("4472C4"),
158
+ insideH: w("4472C4"),
159
+ insideV: w("4472C4")
160
+ },
161
+ look: {
162
+ firstRow: !0,
163
+ lastRow: !1,
164
+ noHBand: !1,
165
+ noVBand: !0
166
+ },
167
+ conditionals: {
168
+ firstRow: {
169
+ bold: !0,
170
+ color: "#FFFFFF",
171
+ backgroundColor: "#4472C4"
172
+ },
173
+ band1Horz: { backgroundColor: "#D6E4F0" }
174
+ }
175
+ },
176
+ {
177
+ id: "GridTable5Dark-Accent1",
178
+ name: "Grid Table 5 Dark",
179
+ tableBorders: {
180
+ top: w("FFFFFF"),
181
+ bottom: w("FFFFFF"),
182
+ left: w("FFFFFF"),
183
+ right: w("FFFFFF"),
184
+ insideH: w("FFFFFF"),
185
+ insideV: w("FFFFFF")
186
+ },
187
+ look: {
188
+ firstRow: !0,
189
+ lastRow: !1,
190
+ noHBand: !1,
191
+ noVBand: !0
192
+ },
193
+ conditionals: {
194
+ firstRow: {
195
+ bold: !0,
196
+ color: "#FFFFFF",
197
+ backgroundColor: "#4472C4"
198
+ },
199
+ band1Horz: { backgroundColor: "#D6E4F0" },
200
+ band2Horz: { backgroundColor: "#B4C6E7" }
201
+ }
202
+ },
203
+ {
204
+ id: "ListTable3-Accent2",
205
+ name: "List Table 3 Accent 2",
206
+ tableBorders: {
207
+ top: w("ED7D31"),
208
+ bottom: w("ED7D31")
209
+ },
210
+ look: {
211
+ firstRow: !0,
212
+ lastRow: !1,
213
+ noHBand: !1,
214
+ noVBand: !0
215
+ },
216
+ conditionals: {
217
+ firstRow: {
218
+ bold: !0,
219
+ color: "#FFFFFF",
220
+ backgroundColor: "#ED7D31"
221
+ },
222
+ band1Horz: { backgroundColor: "#FBE4D5" }
223
+ }
224
+ },
225
+ {
226
+ id: "ListTable4-Accent3",
227
+ name: "List Table 4 Accent 3",
228
+ tableBorders: {
229
+ top: w("A5A5A5"),
230
+ bottom: w("A5A5A5"),
231
+ insideH: w("A5A5A5")
232
+ },
233
+ look: {
234
+ firstRow: !0,
235
+ lastRow: !1,
236
+ noHBand: !1,
237
+ noVBand: !0
238
+ },
239
+ conditionals: {
240
+ firstRow: {
241
+ bold: !0,
242
+ color: "#FFFFFF",
243
+ backgroundColor: "#A5A5A5"
244
+ },
245
+ band1Horz: { backgroundColor: "#EDEDED" }
246
+ }
247
+ },
248
+ {
249
+ id: "GridTable4-Accent5",
250
+ name: "Grid Table 4 Accent 5",
251
+ tableBorders: {
252
+ top: w("5B9BD5"),
253
+ bottom: w("5B9BD5"),
254
+ left: w("5B9BD5"),
255
+ right: w("5B9BD5"),
256
+ insideH: w("5B9BD5"),
257
+ insideV: w("5B9BD5")
258
+ },
259
+ look: {
260
+ firstRow: !0,
261
+ lastRow: !1,
262
+ noHBand: !1,
263
+ noVBand: !0
264
+ },
265
+ conditionals: {
266
+ firstRow: {
267
+ bold: !0,
268
+ color: "#FFFFFF",
269
+ backgroundColor: "#5B9BD5"
270
+ },
271
+ band1Horz: { backgroundColor: "#DEEAF6" }
272
+ }
273
+ },
274
+ {
275
+ id: "GridTable4-Accent6",
276
+ name: "Grid Table 4 Accent 6",
277
+ tableBorders: {
278
+ top: w("70AD47"),
279
+ bottom: w("70AD47"),
280
+ left: w("70AD47"),
281
+ right: w("70AD47"),
282
+ insideH: w("70AD47"),
283
+ insideV: w("70AD47")
284
+ },
285
+ look: {
286
+ firstRow: !0,
287
+ lastRow: !1,
288
+ noHBand: !1,
289
+ noVBand: !0
290
+ },
291
+ conditionals: {
292
+ firstRow: {
293
+ bold: !0,
294
+ color: "#FFFFFF",
295
+ backgroundColor: "#70AD47"
296
+ },
297
+ band1Horz: { backgroundColor: "#E2EFDA" }
298
+ }
299
+ }
300
+ ], E = {
301
+ TableNormal: "table.styles.normalTable",
302
+ TableGrid: "table.styles.tableGrid",
303
+ TableGridLight: "table.styles.gridTableLight",
304
+ PlainTable1: "table.styles.plainTable1",
305
+ PlainTable2: "table.styles.plainTable2",
306
+ PlainTable3: "table.styles.plainTable3",
307
+ PlainTable4: "table.styles.plainTable4",
308
+ "GridTable1Light-Accent1": "table.styles.gridTable1Light",
309
+ "GridTable4-Accent1": "table.styles.gridTable4Accent1",
310
+ "GridTable5Dark-Accent1": "table.styles.gridTable5Dark",
311
+ "ListTable3-Accent2": "table.styles.listTable3Accent2",
312
+ "ListTable4-Accent3": "table.styles.listTable4Accent3",
313
+ "GridTable4-Accent5": "table.styles.gridTable4Accent5",
314
+ "GridTable4-Accent6": "table.styles.gridTable4Accent6"
315
+ }, D = 4, O = 3;
316
+ function k(e) {
317
+ return !e || e.style === "none" ? "none" : `${e.size ? Math.max(1, Math.round(e.size / 8)) : 1}px solid ${e.color?.rgb ? `#${e.color.rgb}` : "#000"}`;
318
+ }
319
+ function A(e, t, n, r) {
320
+ return k(e === void 0 ? t ? n ?? r : r : e);
321
+ }
322
+ function j(e, t = D, n = O) {
323
+ let r = e.look ?? {}, i = e.conditionals ?? {}, a = e.tableBorders, o = [], s = 0;
324
+ for (let e = 0; e < t; e++) {
325
+ let c = e === 0 && !!r.firstRow, l = e === t - 1 && !!r.lastRow, u = r.noHBand !== !0, d;
326
+ c ? d = "firstRow" : l ? d = "lastRow" : (u && (d = s % 2 == 0 ? "band1Horz" : "band2Horz"), s++);
327
+ for (let s = 0; s < n; s++) {
328
+ let u = d, f = s === 0 && !!r.firstCol, p = s === n - 1 && !!r.lastCol;
329
+ c && f && i.nwCell ? u = "nwCell" : c && p && i.neCell ? u = "neCell" : l && f && i.swCell ? u = "swCell" : l && p && i.seCell ? u = "seCell" : f ? u = "firstCol" : p && (u = "lastCol");
330
+ let m = u ? i[u] : void 0, h = m?.borders, g = {
331
+ width: "20px",
332
+ height: "10px",
333
+ boxSizing: "border-box",
334
+ backgroundColor: m?.backgroundColor ?? "transparent",
335
+ borderTop: A(h?.top, e > 0, a?.insideH, a?.top),
336
+ borderBottom: A(h?.bottom, e < t - 1, a?.insideH, a?.bottom),
337
+ borderLeft: A(h?.left, s > 0, a?.insideV, a?.left),
338
+ borderRight: A(h?.right, s < n - 1, a?.insideV, a?.right)
339
+ };
340
+ o.push(g);
341
+ }
342
+ }
343
+ return o;
344
+ }
345
+ //#endregion
346
+ //#region src/components/ui/TableStyleGallery.vue?vue&type=script&setup=true&lang.ts
347
+ var M = { class: "tsg" }, N = { class: "tsg__grid" }, P = ["title", "onMousedown"], F = { class: "tsg__preview" }, I = { class: "tsg__name" }, L = /*#__PURE__*/ t(/* @__PURE__ */ c({
348
+ __name: "TableStyleGallery",
349
+ props: { currentStyleId: {} },
350
+ emits: ["apply"],
351
+ setup(t) {
352
+ let { t: r } = e(), i = T;
353
+ function s(e) {
354
+ let t = E[e.id];
355
+ return t ? r(t) : e.name;
356
+ }
357
+ return (e, r) => (d(), a("div", M, [o("div", N, [(d(!0), a(n, null, m(g(i), (r) => (d(), a("button", {
358
+ key: r.id,
359
+ class: l(["tsg__item", { "tsg__item--selected": t.currentStyleId === r.id }]),
360
+ title: s(r),
361
+ onMousedown: C((t) => e.$emit("apply", r.id), ["prevent"])
362
+ }, [o("div", F, [(d(!0), a(n, null, m(g(j)(r), (e, t) => (d(), a("div", {
363
+ key: t,
364
+ class: "tsg__cell",
365
+ style: u(e)
366
+ }, null, 4))), 128))]), o("span", I, h(s(r)), 1)], 42, P))), 128))])]));
367
+ }
368
+ }), [["__scopeId", "data-v-73993927"]]), R = { class: "fnpd-dialog__header" }, ee = { class: "fnpd-dialog__body" }, te = { class: "fnpd-fieldset" }, ne = { class: "fnpd-legend" }, re = { class: "fnpd-row" }, ie = { class: "fnpd-label" }, ae = { value: "pageBottom" }, oe = { value: "beneathText" }, z = { class: "fnpd-row" }, B = { class: "fnpd-label" }, V = ["value"], H = { class: "fnpd-row" }, U = { class: "fnpd-label" }, W = { class: "fnpd-row" }, G = { class: "fnpd-label" }, K = { value: "continuous" }, q = { value: "eachSect" }, se = { value: "eachPage" }, ce = { class: "fnpd-fieldset" }, le = { class: "fnpd-legend" }, ue = { class: "fnpd-row" }, de = { class: "fnpd-label" }, fe = { value: "docEnd" }, pe = { value: "sectEnd" }, me = { class: "fnpd-row" }, he = { class: "fnpd-label" }, ge = ["value"], _e = { class: "fnpd-row" }, ve = { class: "fnpd-label" }, ye = { class: "fnpd-row" }, be = { class: "fnpd-label" }, xe = { value: "continuous" }, Se = { value: "eachSect" }, Ce = { class: "fnpd-dialog__footer" }, we = /*#__PURE__*/ t(/* @__PURE__ */ c({
369
+ __name: "FootnotePropertiesDialog",
370
+ props: {
371
+ isOpen: { type: Boolean },
372
+ footnotePr: {},
373
+ endnotePr: {}
374
+ },
375
+ emits: ["close", "apply"],
376
+ setup(t, { emit: s }) {
377
+ let { t: c } = e(), l = t, u = s, f = r(() => [
378
+ {
379
+ value: "decimal",
380
+ label: c("dialogs.footnoteProperties.formats.decimal")
381
+ },
382
+ {
383
+ value: "lowerLetter",
384
+ label: c("dialogs.footnoteProperties.formats.lowerAlpha")
385
+ },
386
+ {
387
+ value: "upperLetter",
388
+ label: c("dialogs.footnoteProperties.formats.upperAlpha")
389
+ },
390
+ {
391
+ value: "lowerRoman",
392
+ label: c("dialogs.footnoteProperties.formats.lowerRoman")
393
+ },
394
+ {
395
+ value: "upperRoman",
396
+ label: c("dialogs.footnoteProperties.formats.upperRoman")
397
+ },
398
+ {
399
+ value: "chicago",
400
+ label: c("dialogs.footnoteProperties.formats.symbols")
401
+ }
402
+ ]), _ = p("pageBottom"), w = p("decimal"), T = p(1), E = p("continuous"), D = p("docEnd"), O = p("lowerRoman"), k = p(1), A = p("continuous");
403
+ b(() => l.isOpen, (e) => {
404
+ e && (_.value = l.footnotePr?.position ?? "pageBottom", w.value = l.footnotePr?.numFmt ?? "decimal", T.value = l.footnotePr?.numStart ?? 1, E.value = l.footnotePr?.numRestart ?? "continuous", D.value = l.endnotePr?.position ?? "docEnd", O.value = l.endnotePr?.numFmt ?? "lowerRoman", k.value = l.endnotePr?.numStart ?? 1, A.value = l.endnotePr?.numRestart ?? "continuous");
405
+ });
406
+ function j() {
407
+ u("apply", {
408
+ position: _.value,
409
+ numFmt: w.value,
410
+ numStart: T.value,
411
+ numRestart: E.value
412
+ }, {
413
+ position: D.value,
414
+ numFmt: O.value,
415
+ numStart: k.value,
416
+ numRestart: A.value
417
+ }), u("close");
418
+ }
419
+ return (e, r) => t.isOpen ? (d(), a("div", {
420
+ key: 0,
421
+ class: "fnpd-overlay",
422
+ onMousedown: r[10] ||= C((t) => e.$emit("close"), ["self"])
423
+ }, [o("div", {
424
+ class: "fnpd-dialog",
425
+ onKeydown: r[9] ||= S((t) => e.$emit("close"), ["escape"])
426
+ }, [
427
+ o("div", R, h(g(c)("dialogs.footnoteProperties.title")), 1),
428
+ o("div", ee, [o("fieldset", te, [
429
+ o("legend", ne, h(g(c)("dialogs.footnoteProperties.footnotes")), 1),
430
+ o("div", re, [o("label", ie, h(g(c)("dialogs.footnoteProperties.position")), 1), x(o("select", {
431
+ "onUpdate:modelValue": r[0] ||= (e) => _.value = e,
432
+ class: "fnpd-select"
433
+ }, [o("option", ae, h(g(c)("dialogs.footnoteProperties.footnotePositions.bottomOfPage")), 1), o("option", oe, h(g(c)("dialogs.footnoteProperties.footnotePositions.belowText")), 1)], 512), [[v, _.value]])]),
434
+ o("div", z, [o("label", B, h(g(c)("dialogs.footnoteProperties.numberFormat")), 1), x(o("select", {
435
+ "onUpdate:modelValue": r[1] ||= (e) => w.value = e,
436
+ class: "fnpd-select"
437
+ }, [(d(!0), a(n, null, m(f.value, (e) => (d(), a("option", {
438
+ key: e.value,
439
+ value: e.value
440
+ }, h(e.label), 9, V))), 128))], 512), [[v, w.value]])]),
441
+ o("div", H, [o("label", U, h(g(c)("dialogs.footnoteProperties.startAt")), 1), x(o("input", {
442
+ "onUpdate:modelValue": r[2] ||= (e) => T.value = e,
443
+ type: "number",
444
+ class: "fnpd-input",
445
+ min: "1"
446
+ }, null, 512), [[
447
+ y,
448
+ T.value,
449
+ void 0,
450
+ { number: !0 }
451
+ ]])]),
452
+ o("div", W, [o("label", G, h(g(c)("dialogs.footnoteProperties.numbering")), 1), x(o("select", {
453
+ "onUpdate:modelValue": r[3] ||= (e) => E.value = e,
454
+ class: "fnpd-select"
455
+ }, [
456
+ o("option", K, h(g(c)("dialogs.footnoteProperties.numberingOptions.continuous")), 1),
457
+ o("option", q, h(g(c)("dialogs.footnoteProperties.numberingOptions.restartSection")), 1),
458
+ o("option", se, h(g(c)("dialogs.footnoteProperties.numberingOptions.restartPage")), 1)
459
+ ], 512), [[v, E.value]])])
460
+ ]), o("fieldset", ce, [
461
+ o("legend", le, h(g(c)("dialogs.footnoteProperties.endnotes")), 1),
462
+ o("div", ue, [o("label", de, h(g(c)("dialogs.footnoteProperties.position")), 1), x(o("select", {
463
+ "onUpdate:modelValue": r[4] ||= (e) => D.value = e,
464
+ class: "fnpd-select"
465
+ }, [o("option", fe, h(g(c)("dialogs.footnoteProperties.endnotePositions.endOfDocument")), 1), o("option", pe, h(g(c)("dialogs.footnoteProperties.endnotePositions.endOfSection")), 1)], 512), [[v, D.value]])]),
466
+ o("div", me, [o("label", he, h(g(c)("dialogs.footnoteProperties.numberFormat")), 1), x(o("select", {
467
+ "onUpdate:modelValue": r[5] ||= (e) => O.value = e,
468
+ class: "fnpd-select"
469
+ }, [(d(!0), a(n, null, m(f.value, (e) => (d(), a("option", {
470
+ key: e.value,
471
+ value: e.value
472
+ }, h(e.label), 9, ge))), 128))], 512), [[v, O.value]])]),
473
+ o("div", _e, [o("label", ve, h(g(c)("dialogs.footnoteProperties.startAt")), 1), x(o("input", {
474
+ "onUpdate:modelValue": r[6] ||= (e) => k.value = e,
475
+ type: "number",
476
+ class: "fnpd-input",
477
+ min: "1"
478
+ }, null, 512), [[
479
+ y,
480
+ k.value,
481
+ void 0,
482
+ { number: !0 }
483
+ ]])]),
484
+ o("div", ye, [o("label", be, h(g(c)("dialogs.footnoteProperties.numbering")), 1), x(o("select", {
485
+ "onUpdate:modelValue": r[7] ||= (e) => A.value = e,
486
+ class: "fnpd-select"
487
+ }, [o("option", xe, h(g(c)("dialogs.footnoteProperties.numberingOptions.continuous")), 1), o("option", Se, h(g(c)("dialogs.footnoteProperties.numberingOptions.restartSection")), 1)], 512), [[v, A.value]])])
488
+ ])]),
489
+ o("div", Ce, [o("button", {
490
+ class: "fnpd-btn",
491
+ onClick: r[8] ||= (t) => e.$emit("close")
492
+ }, h(g(c)("common.cancel")), 1), o("button", {
493
+ class: "fnpd-btn fnpd-btn--primary",
494
+ onClick: j
495
+ }, h(g(c)("common.apply")), 1)])
496
+ ], 32)], 32)) : i("", !0);
497
+ }
498
+ }), [["__scopeId", "data-v-8cfd8776"]]), Te = { class: "ipd-dialog__header" }, Ee = { class: "ipd-dialog__body" }, De = { class: "ipd-fieldset" }, Oe = { class: "ipd-legend" }, ke = { class: "ipd-row" }, Ae = { value: "align" }, je = { value: "offset" }, Me = {
499
+ key: 0,
500
+ class: "ipd-row"
501
+ }, Ne = { class: "ipd-label" }, Pe = { value: "left" }, Fe = { value: "center" }, Ie = { value: "right" }, Le = {
502
+ key: 1,
503
+ class: "ipd-row"
504
+ }, Re = { class: "ipd-label" }, ze = { class: "ipd-row" }, Be = { class: "ipd-label" }, Ve = { value: "page" }, He = { value: "column" }, Ue = { value: "margin" }, We = { value: "character" }, Ge = { class: "ipd-fieldset" }, Ke = { class: "ipd-legend" }, qe = { class: "ipd-row" }, Je = { value: "align" }, Ye = { value: "offset" }, Xe = {
505
+ key: 0,
506
+ class: "ipd-row"
507
+ }, Ze = { class: "ipd-label" }, Qe = { value: "top" }, $e = { value: "center" }, et = { value: "bottom" }, tt = {
508
+ key: 1,
509
+ class: "ipd-row"
510
+ }, nt = { class: "ipd-label" }, rt = { class: "ipd-row" }, it = { class: "ipd-label" }, at = { value: "page" }, ot = { value: "margin" }, st = { value: "paragraph" }, ct = { value: "line" }, lt = { class: "ipd-fieldset" }, ut = { class: "ipd-row" }, dt = { class: "ipd-label" }, ft = {
511
+ class: "ipd-label",
512
+ style: { width: "60px" }
513
+ }, pt = { class: "ipd-row" }, mt = { class: "ipd-label" }, ht = {
514
+ class: "ipd-label",
515
+ style: { width: "60px" }
516
+ }, gt = { class: "ipd-dialog__footer" }, _t = /*#__PURE__*/ t(/* @__PURE__ */ c({
517
+ __name: "ImagePositionDialog",
518
+ props: {
519
+ isOpen: { type: Boolean },
520
+ currentData: {}
521
+ },
522
+ emits: ["close", "apply"],
523
+ setup(t, { emit: n }) {
524
+ let { t: r } = e(), s = t, c = n, l = p("align"), u = p("left"), f = p(0), m = p("column"), _ = p("align"), w = p("top"), T = p(0), E = p("paragraph"), D = p(0), O = p(0), k = p(0), A = p(0);
525
+ b(() => s.isOpen, (e) => {
526
+ if (!e) return;
527
+ let t = s.currentData;
528
+ t?.horizontal?.align ? (l.value = "align", u.value = t.horizontal.align) : t?.horizontal?.posOffset != null && (l.value = "offset", f.value = t.horizontal.posOffset), m.value = t?.horizontal?.relativeTo ?? "column", t?.vertical?.align ? (_.value = "align", w.value = t.vertical.align) : t?.vertical?.posOffset != null && (_.value = "offset", T.value = t.vertical.posOffset), E.value = t?.vertical?.relativeTo ?? "paragraph", D.value = t?.distTop ?? 0, O.value = t?.distBottom ?? 0, k.value = t?.distLeft ?? 0, A.value = t?.distRight ?? 0;
529
+ });
530
+ function j() {
531
+ c("apply", {
532
+ horizontal: {
533
+ relativeTo: m.value,
534
+ ...l.value === "align" ? { align: u.value } : { posOffset: f.value }
535
+ },
536
+ vertical: {
537
+ relativeTo: E.value,
538
+ ..._.value === "align" ? { align: w.value } : { posOffset: T.value }
539
+ },
540
+ distTop: D.value,
541
+ distBottom: O.value,
542
+ distLeft: k.value,
543
+ distRight: A.value
544
+ }), c("close");
545
+ }
546
+ return (e, n) => t.isOpen ? (d(), a("div", {
547
+ key: 0,
548
+ class: "ipd-overlay",
549
+ onMousedown: n[14] ||= C((t) => e.$emit("close"), ["self"])
550
+ }, [o("div", {
551
+ class: "ipd-dialog",
552
+ onKeydown: n[13] ||= S((t) => e.$emit("close"), ["escape"])
553
+ }, [
554
+ o("div", Te, h(g(r)("dialogs.imagePosition.title")), 1),
555
+ o("div", Ee, [
556
+ o("fieldset", De, [
557
+ o("legend", Oe, h(g(r)("dialogs.imagePosition.horizontal")), 1),
558
+ o("div", ke, [n[15] ||= o("label", { class: "ipd-label" }, "Mode", -1), x(o("select", {
559
+ "onUpdate:modelValue": n[0] ||= (e) => l.value = e,
560
+ class: "ipd-select"
561
+ }, [o("option", Ae, h(g(r)("dialogs.imagePosition.alignment")), 1), o("option", je, h(g(r)("dialogs.imagePosition.offset")), 1)], 512), [[v, l.value]])]),
562
+ l.value === "align" ? (d(), a("div", Me, [o("label", Ne, h(g(r)("dialogs.imagePosition.align")), 1), x(o("select", {
563
+ "onUpdate:modelValue": n[1] ||= (e) => u.value = e,
564
+ class: "ipd-select"
565
+ }, [
566
+ o("option", Pe, h(g(r)("dialogs.imagePosition.alignOptions.left")), 1),
567
+ o("option", Fe, h(g(r)("dialogs.imagePosition.alignOptions.center")), 1),
568
+ o("option", Ie, h(g(r)("dialogs.imagePosition.alignOptions.right")), 1)
569
+ ], 512), [[v, u.value]])])) : (d(), a("div", Le, [o("label", Re, h(g(r)("dialogs.imagePosition.offsetPx")), 1), x(o("input", {
570
+ "onUpdate:modelValue": n[2] ||= (e) => f.value = e,
571
+ type: "number",
572
+ class: "ipd-input"
573
+ }, null, 512), [[
574
+ y,
575
+ f.value,
576
+ void 0,
577
+ { number: !0 }
578
+ ]])])),
579
+ o("div", ze, [o("label", Be, h(g(r)("dialogs.imagePosition.relativeTo")), 1), x(o("select", {
580
+ "onUpdate:modelValue": n[3] ||= (e) => m.value = e,
581
+ class: "ipd-select"
582
+ }, [
583
+ o("option", Ve, h(g(r)("dialogs.imagePosition.relativeOptions.page")), 1),
584
+ o("option", He, h(g(r)("dialogs.imagePosition.relativeOptions.column")), 1),
585
+ o("option", Ue, h(g(r)("dialogs.imagePosition.relativeOptions.margin")), 1),
586
+ o("option", We, h(g(r)("dialogs.imagePosition.relativeOptions.character")), 1)
587
+ ], 512), [[v, m.value]])])
588
+ ]),
589
+ o("fieldset", Ge, [
590
+ o("legend", Ke, h(g(r)("dialogs.imagePosition.vertical")), 1),
591
+ o("div", qe, [n[16] ||= o("label", { class: "ipd-label" }, "Mode", -1), x(o("select", {
592
+ "onUpdate:modelValue": n[4] ||= (e) => _.value = e,
593
+ class: "ipd-select"
594
+ }, [o("option", Je, h(g(r)("dialogs.imagePosition.alignment")), 1), o("option", Ye, h(g(r)("dialogs.imagePosition.offset")), 1)], 512), [[v, _.value]])]),
595
+ _.value === "align" ? (d(), a("div", Xe, [o("label", Ze, h(g(r)("dialogs.imagePosition.align")), 1), x(o("select", {
596
+ "onUpdate:modelValue": n[5] ||= (e) => w.value = e,
597
+ class: "ipd-select"
598
+ }, [
599
+ o("option", Qe, h(g(r)("dialogs.imagePosition.alignOptions.top")), 1),
600
+ o("option", $e, h(g(r)("dialogs.imagePosition.alignOptions.center")), 1),
601
+ o("option", et, h(g(r)("dialogs.imagePosition.alignOptions.bottom")), 1)
602
+ ], 512), [[v, w.value]])])) : (d(), a("div", tt, [o("label", nt, h(g(r)("dialogs.imagePosition.offsetPx")), 1), x(o("input", {
603
+ "onUpdate:modelValue": n[6] ||= (e) => T.value = e,
604
+ type: "number",
605
+ class: "ipd-input"
606
+ }, null, 512), [[
607
+ y,
608
+ T.value,
609
+ void 0,
610
+ { number: !0 }
611
+ ]])])),
612
+ o("div", rt, [o("label", it, h(g(r)("dialogs.imagePosition.relativeTo")), 1), x(o("select", {
613
+ "onUpdate:modelValue": n[7] ||= (e) => E.value = e,
614
+ class: "ipd-select"
615
+ }, [
616
+ o("option", at, h(g(r)("dialogs.imagePosition.relativeOptions.page")), 1),
617
+ o("option", ot, h(g(r)("dialogs.imagePosition.relativeOptions.margin")), 1),
618
+ o("option", st, h(g(r)("dialogs.imagePosition.relativeOptions.paragraph")), 1),
619
+ o("option", ct, h(g(r)("dialogs.imagePosition.relativeOptions.line")), 1)
620
+ ], 512), [[v, E.value]])])
621
+ ]),
622
+ o("fieldset", lt, [
623
+ n[17] ||= o("legend", { class: "ipd-legend" }, "Distance from text (px)", -1),
624
+ o("div", ut, [
625
+ o("label", dt, h(g(r)("dialogs.imagePosition.alignOptions.top")), 1),
626
+ x(o("input", {
627
+ "onUpdate:modelValue": n[8] ||= (e) => D.value = e,
628
+ type: "number",
629
+ class: "ipd-input",
630
+ min: "0"
631
+ }, null, 512), [[
632
+ y,
633
+ D.value,
634
+ void 0,
635
+ { number: !0 }
636
+ ]]),
637
+ o("label", ft, h(g(r)("dialogs.imagePosition.alignOptions.bottom")), 1),
638
+ x(o("input", {
639
+ "onUpdate:modelValue": n[9] ||= (e) => O.value = e,
640
+ type: "number",
641
+ class: "ipd-input",
642
+ min: "0"
643
+ }, null, 512), [[
644
+ y,
645
+ O.value,
646
+ void 0,
647
+ { number: !0 }
648
+ ]])
649
+ ]),
650
+ o("div", pt, [
651
+ o("label", mt, h(g(r)("dialogs.imagePosition.alignOptions.left")), 1),
652
+ x(o("input", {
653
+ "onUpdate:modelValue": n[10] ||= (e) => k.value = e,
654
+ type: "number",
655
+ class: "ipd-input",
656
+ min: "0"
657
+ }, null, 512), [[
658
+ y,
659
+ k.value,
660
+ void 0,
661
+ { number: !0 }
662
+ ]]),
663
+ o("label", ht, h(g(r)("dialogs.imagePosition.alignOptions.right")), 1),
664
+ x(o("input", {
665
+ "onUpdate:modelValue": n[11] ||= (e) => A.value = e,
666
+ type: "number",
667
+ class: "ipd-input",
668
+ min: "0"
669
+ }, null, 512), [[
670
+ y,
671
+ A.value,
672
+ void 0,
673
+ { number: !0 }
674
+ ]])
675
+ ])
676
+ ])
677
+ ]),
678
+ o("div", gt, [o("button", {
679
+ class: "ipd-btn",
680
+ onClick: n[12] ||= (t) => e.$emit("close")
681
+ }, h(g(r)("common.cancel")), 1), o("button", {
682
+ class: "ipd-btn ipd-btn--primary",
683
+ onClick: j
684
+ }, h(g(r)("common.apply")), 1)])
685
+ ], 32)], 32)) : i("", !0);
686
+ }
687
+ }), [["__scopeId", "data-v-1daec0f6"]]), J = f({
688
+ rows: 3,
689
+ cols: 3
690
+ }), vt = { class: "dialog__header" }, yt = { class: "dialog__title" }, bt = ["title"], xt = { class: "dialog__body" }, St = ["aria-label"], Ct = ["onMouseenter", "onMousedown"], wt = { class: "table-grid__label" }, Tt = { class: "dialog__separator" }, Et = { class: "table-manual" }, Dt = { class: "table-manual__field" }, Ot = { class: "table-manual__field" }, kt = { class: "table-options" }, At = { class: "table-options__radio" }, jt = { class: "table-options__radio" }, Mt = { class: "dialog__separator" }, Nt = { class: "dialog__footer" }, Pt = ["disabled"], Ft = 8, It = 10, Y = 1, X = 100, Z = 1, Q = 20, Lt = /*#__PURE__*/ t(/* @__PURE__ */ c({
691
+ __name: "InsertTableDialog",
692
+ props: { isOpen: { type: Boolean } },
693
+ emits: ["close", "insert"],
694
+ setup(t, { emit: c }) {
695
+ let { t: u } = e(), f = t, v = c, S = p(0), w = p(0), T = p(J.rows), E = p(J.cols), D = p("fixed"), O = p(null);
696
+ b(() => f.isOpen, (e) => {
697
+ e && (T.value = J.rows, E.value = J.cols, S.value = 0, w.value = 0);
698
+ });
699
+ let k = r(() => Number.parseInt(String(T.value), 10)), A = r(() => Number.parseInt(String(E.value), 10)), j = r(() => Number.isFinite(k.value) && k.value >= Y && k.value <= X), M = r(() => Number.isFinite(A.value) && A.value >= Z && A.value <= Q), N = r(() => j.value && M.value);
700
+ function P() {
701
+ v("close");
702
+ }
703
+ function F(e, t) {
704
+ S.value = e, w.value = t, T.value = e, E.value = t;
705
+ }
706
+ function I(e) {
707
+ e.key === "Escape" ? P() : e.key === "Enter" && (e.preventDefault(), R());
708
+ }
709
+ function R() {
710
+ if (!N.value) return;
711
+ let e = Math.min(Math.max(Y, k.value), X), t = Math.min(Math.max(Z, A.value), Q);
712
+ J.rows = e, J.cols = t, v("insert", {
713
+ rows: e,
714
+ cols: t,
715
+ autofit: D.value === "autofit",
716
+ styleId: O.value
717
+ }), P();
718
+ }
719
+ return (e, r) => t.isOpen ? (d(), a("div", {
720
+ key: 0,
721
+ class: "dialog-overlay",
722
+ onMousedown: C(P, ["self"])
723
+ }, [o("div", {
724
+ class: "dialog",
725
+ onMousedown: r[7] ||= C(() => {}, ["stop"]),
726
+ onKeydown: C(I, ["stop"])
727
+ }, [
728
+ o("div", vt, [o("span", yt, h(g(u)("dialogs.insertTable.title")), 1), o("button", {
729
+ class: "dialog__close",
730
+ title: g(u)("common.closeDialog"),
731
+ onClick: P
732
+ }, "✕", 8, bt)]),
733
+ o("div", xt, [
734
+ o("div", {
735
+ class: "table-grid",
736
+ "aria-label": g(u)("dialogs.insertTable.sizeSelector"),
737
+ onMouseleave: r[0] ||= (e) => {
738
+ S.value = 0, w.value = 0;
739
+ }
740
+ }, [(d(), a(n, null, m(Ft, (e) => o("div", {
741
+ key: e,
742
+ class: "table-grid__row"
743
+ }, [(d(), a(n, null, m(It, (t) => o("div", {
744
+ key: t,
745
+ class: l(["table-grid__cell", { highlight: e <= S.value && t <= w.value }]),
746
+ onMouseenter: (n) => {
747
+ S.value = e, w.value = t;
748
+ },
749
+ onMousedown: C((n) => F(e, t), ["prevent"])
750
+ }, null, 42, Ct)), 64))])), 64))], 40, St),
751
+ o("div", wt, h(S.value > 0 ? g(u)("dialogs.insertTable.tableSize", {
752
+ cols: w.value,
753
+ rows: S.value
754
+ }) : g(u)("dialogs.insertTable.hoverToSelect")), 1),
755
+ o("div", Tt, [o("span", null, h(g(u)("dialogs.insertTable.orSpecifySize")), 1)]),
756
+ o("div", Et, [o("label", Dt, [o("span", null, h(g(u)("dialogs.insertTable.rowsLabel")), 1), x(o("input", {
757
+ "onUpdate:modelValue": r[1] ||= (e) => T.value = e,
758
+ type: "number",
759
+ min: Y,
760
+ max: X,
761
+ class: l(["table-manual__input", { "table-manual__input--invalid": !j.value }])
762
+ }, null, 2), [[y, T.value]])]), o("label", Ot, [o("span", null, h(g(u)("dialogs.insertTable.columnsLabel")), 1), x(o("input", {
763
+ "onUpdate:modelValue": r[2] ||= (e) => E.value = e,
764
+ type: "number",
765
+ min: Z,
766
+ max: Q,
767
+ class: l(["table-manual__input", { "table-manual__input--invalid": !M.value }])
768
+ }, null, 2), [[y, E.value]])])]),
769
+ o("div", { class: l(["table-manual__hint", { "table-manual__hint--error": !N.value }]) }, h(g(u)("dialogs.insertTable.validationHint", {
770
+ minRows: Y,
771
+ maxRows: X,
772
+ minCols: Z,
773
+ maxCols: Q
774
+ })), 3),
775
+ o("fieldset", kt, [
776
+ o("legend", null, h(g(u)("dialogs.insertTable.columnWidthLabel")), 1),
777
+ o("label", At, [x(o("input", {
778
+ type: "radio",
779
+ value: "fixed",
780
+ "onUpdate:modelValue": r[3] ||= (e) => D.value = e
781
+ }, null, 512), [[_, D.value]]), o("span", null, h(g(u)("dialogs.insertTable.fixedWidth")), 1)]),
782
+ o("label", jt, [x(o("input", {
783
+ type: "radio",
784
+ value: "autofit",
785
+ "onUpdate:modelValue": r[4] ||= (e) => D.value = e
786
+ }, null, 512), [[_, D.value]]), o("span", null, h(g(u)("dialogs.insertTable.autofit")), 1)])
787
+ ]),
788
+ o("div", Mt, [o("span", null, h(g(u)("dialogs.insertTable.style")), 1)]),
789
+ s(L, {
790
+ "current-style-id": O.value,
791
+ onApply: r[5] ||= (e) => O.value = e
792
+ }, null, 8, ["current-style-id"])
793
+ ]),
794
+ o("div", Nt, [o("button", {
795
+ class: "dialog__btn",
796
+ onMousedown: C(P, ["prevent"])
797
+ }, h(g(u)("common.cancel")), 33), o("button", {
798
+ class: "dialog__btn dialog__btn--primary",
799
+ disabled: !N.value,
800
+ onMousedown: r[6] ||= C((e) => R(), ["prevent"])
801
+ }, h(g(u)("dialogs.insertTable.insertButton")), 41, Pt)])
802
+ ], 32)], 32)) : i("", !0);
803
+ }
804
+ }), [["__scopeId", "data-v-3722a365"]]), Rt = { class: "tpd-dialog__header" }, zt = { class: "tpd-dialog__body" }, Bt = { class: "tpd-row" }, Vt = { class: "tpd-label" }, Ht = { value: "auto" }, Ut = { value: "dxa" }, Wt = { value: "pct" }, Gt = {
805
+ key: 0,
806
+ class: "tpd-row"
807
+ }, Kt = { class: "tpd-label" }, $ = ["step"], qt = { class: "tpd-unit" }, Jt = { class: "tpd-row" }, Yt = { class: "tpd-label" }, Xt = { value: "left" }, Zt = { value: "center" }, Qt = { value: "right" }, $t = { class: "tpd-dialog__footer" }, en = /*#__PURE__*/ t(/* @__PURE__ */ c({
808
+ __name: "TablePropertiesDialog",
809
+ props: {
810
+ isOpen: { type: Boolean },
811
+ currentProps: {}
812
+ },
813
+ emits: ["close", "apply"],
814
+ setup(t, { emit: n }) {
815
+ let { t: r } = e(), s = t, c = n, l = p(0), u = p("auto"), f = p("left");
816
+ function m(e) {
817
+ return e === "center" || e === "right" ? e : "left";
818
+ }
819
+ b(() => s.isOpen, (e) => {
820
+ e && (l.value = s.currentProps?.width ?? 0, u.value = s.currentProps?.widthType ?? "auto", f.value = m(s.currentProps?.justification));
821
+ });
822
+ function _() {
823
+ c("apply", u.value === "auto" ? {
824
+ justification: f.value,
825
+ width: null,
826
+ widthType: "auto"
827
+ } : {
828
+ justification: f.value,
829
+ width: l.value,
830
+ widthType: u.value
831
+ }), c("close");
832
+ }
833
+ return (e, n) => t.isOpen ? (d(), a("div", {
834
+ key: 0,
835
+ class: "tpd-overlay",
836
+ onMousedown: n[5] ||= C((t) => e.$emit("close"), ["self"])
837
+ }, [o("div", {
838
+ class: "tpd-dialog",
839
+ onKeydown: [n[4] ||= S((t) => e.$emit("close"), ["escape"]), S(_, ["enter"])]
840
+ }, [
841
+ o("div", Rt, h(g(r)("dialogs.tableProperties.title")), 1),
842
+ o("div", zt, [
843
+ o("div", Bt, [o("label", Vt, h(g(r)("dialogs.tableProperties.widthType")), 1), x(o("select", {
844
+ "onUpdate:modelValue": n[0] ||= (e) => u.value = e,
845
+ class: "tpd-select"
846
+ }, [
847
+ o("option", Ht, h(g(r)("dialogs.tableProperties.widthTypes.auto")), 1),
848
+ o("option", Ut, h(g(r)("dialogs.tableProperties.widthTypes.fixed")), 1),
849
+ o("option", Wt, h(g(r)("dialogs.tableProperties.widthTypes.percentage")), 1)
850
+ ], 512), [[v, u.value]])]),
851
+ u.value === "auto" ? i("", !0) : (d(), a("div", Gt, [
852
+ o("label", Kt, h(g(r)("dialogs.tableProperties.widthLabel")), 1),
853
+ x(o("input", {
854
+ "onUpdate:modelValue": n[1] ||= (e) => l.value = e,
855
+ type: "number",
856
+ class: "tpd-input",
857
+ min: 0,
858
+ step: u.value === "pct" ? 5 : 100
859
+ }, null, 8, $), [[
860
+ y,
861
+ l.value,
862
+ void 0,
863
+ { number: !0 }
864
+ ]]),
865
+ o("span", qt, h(u.value === "pct" ? g(r)("dialogs.tableProperties.units.fiftiethsPercent") : g(r)("dialogs.tableProperties.units.twips")), 1)
866
+ ])),
867
+ o("div", Jt, [o("label", Yt, h(g(r)("dialogs.tableProperties.alignmentLabel")), 1), x(o("select", {
868
+ "onUpdate:modelValue": n[2] ||= (e) => f.value = e,
869
+ class: "tpd-select"
870
+ }, [
871
+ o("option", Xt, h(g(r)("dialogs.tableProperties.alignOptions.left")), 1),
872
+ o("option", Zt, h(g(r)("dialogs.tableProperties.alignOptions.center")), 1),
873
+ o("option", Qt, h(g(r)("dialogs.tableProperties.alignOptions.right")), 1)
874
+ ], 512), [[v, f.value]])])
875
+ ]),
876
+ o("div", $t, [o("button", {
877
+ class: "tpd-btn",
878
+ onClick: n[3] ||= (t) => e.$emit("close")
879
+ }, h(g(r)("common.cancel")), 1), o("button", {
880
+ class: "tpd-btn tpd-btn--primary",
881
+ onClick: _
882
+ }, h(g(r)("common.apply")), 1)])
883
+ ], 32)], 32)) : i("", !0);
884
+ }
885
+ }), [["__scopeId", "data-v-34570300"]]);
886
+ //#endregion
887
+ export { L as a, we as i, Lt as n, _t as r, en as t };