@stll/folio-react 0.15.3 → 0.15.5
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/{CommentsSidebar-DhAbtuuQ.js → CommentsSidebar-DgBwgBmQ.js} +1 -1
- package/dist/TablePropertiesDialog-BW4RRZLZ.js +462 -0
- package/dist/compat/eigenpal.js +1 -1
- package/dist/{dialogs-lCOx21mG.d.ts → dialogs-DZz6gVev.d.ts} +3 -13
- package/dist/dialogs.d.ts +1 -1
- package/dist/dialogs.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{renderAsync-nQ5eeFE1.js → renderAsync-C8PNMI0-.js} +17 -9
- package/dist/standalone.css +1 -1
- package/package.json +2 -2
- package/dist/TablePropertiesDialog-B_AGrPR8.js +0 -434
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as containedHandler } from "./renderAsync-
|
|
1
|
+
import { d as containedHandler } from "./renderAsync-C8PNMI0-.js";
|
|
2
2
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { CheckIcon, MoreVerticalIcon } from "lucide-react";
|
|
4
4
|
import { useLocale, useTranslations } from "use-intl";
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
|
|
2
|
+
import { r as useFolioUI } from "./folio-ui-BgDDRsUX.js";
|
|
3
|
+
import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
|
|
4
|
+
import { c } from "react-compiler-runtime";
|
|
5
|
+
import { useEffect, useId, useState } from "react";
|
|
6
|
+
import { useTranslations } from "use-intl";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/dialogs/TablePropertiesDialog.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Table Properties Dialog — width type, width value, alignment.
|
|
11
|
+
*/
|
|
12
|
+
var TablePropertiesDialog_exports = /* @__PURE__ */ __exportAll({ TablePropertiesDialog: () => TablePropertiesDialog });
|
|
13
|
+
const editableWidthType = (value) => {
|
|
14
|
+
switch (value) {
|
|
15
|
+
case "dxa":
|
|
16
|
+
case "pct": return value;
|
|
17
|
+
default: return "auto";
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const editableJustification = (value) => {
|
|
21
|
+
switch (value) {
|
|
22
|
+
case "center":
|
|
23
|
+
case "right": return value;
|
|
24
|
+
default: return "left";
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function TablePropertiesDialog(t0) {
|
|
28
|
+
const $ = c(119);
|
|
29
|
+
const { isOpen, onClose, onApply, currentProps } = t0;
|
|
30
|
+
const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
|
|
31
|
+
const handleOpenChange = useCloseOnDialogOpenChange(onClose);
|
|
32
|
+
const t = useTranslations("folio");
|
|
33
|
+
const id = useId();
|
|
34
|
+
const [width, setWidth] = useState(currentProps?.width ?? 0);
|
|
35
|
+
const t1 = currentProps?.widthType ?? "auto";
|
|
36
|
+
let t2;
|
|
37
|
+
if ($[0] !== t1) {
|
|
38
|
+
t2 = editableWidthType(t1);
|
|
39
|
+
$[0] = t1;
|
|
40
|
+
$[1] = t2;
|
|
41
|
+
} else t2 = $[1];
|
|
42
|
+
const [widthType, setWidthType] = useState(t2);
|
|
43
|
+
const t3 = currentProps?.justification ?? "left";
|
|
44
|
+
let t4;
|
|
45
|
+
if ($[2] !== t3) {
|
|
46
|
+
t4 = editableJustification(t3);
|
|
47
|
+
$[2] = t3;
|
|
48
|
+
$[3] = t4;
|
|
49
|
+
} else t4 = $[3];
|
|
50
|
+
const [justification, setJustification] = useState(t4);
|
|
51
|
+
let t5;
|
|
52
|
+
if ($[4] !== currentProps?.justification || $[5] !== currentProps?.width || $[6] !== currentProps?.widthType || $[7] !== isOpen) {
|
|
53
|
+
t5 = () => {
|
|
54
|
+
if (isOpen) {
|
|
55
|
+
setWidth(currentProps?.width ?? 0);
|
|
56
|
+
setWidthType(editableWidthType(currentProps?.widthType ?? "auto"));
|
|
57
|
+
setJustification(editableJustification(currentProps?.justification ?? "left"));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
$[4] = currentProps?.justification;
|
|
61
|
+
$[5] = currentProps?.width;
|
|
62
|
+
$[6] = currentProps?.widthType;
|
|
63
|
+
$[7] = isOpen;
|
|
64
|
+
$[8] = t5;
|
|
65
|
+
} else t5 = $[8];
|
|
66
|
+
let t6;
|
|
67
|
+
if ($[9] !== currentProps || $[10] !== isOpen) {
|
|
68
|
+
t6 = [isOpen, currentProps];
|
|
69
|
+
$[9] = currentProps;
|
|
70
|
+
$[10] = isOpen;
|
|
71
|
+
$[11] = t6;
|
|
72
|
+
} else t6 = $[11];
|
|
73
|
+
useEffect(t5, t6);
|
|
74
|
+
let t7;
|
|
75
|
+
if ($[12] !== justification || $[13] !== onApply || $[14] !== onClose || $[15] !== width || $[16] !== widthType) {
|
|
76
|
+
t7 = () => {
|
|
77
|
+
const props = { justification: justification === "left" || justification === "center" || justification === "right" ? justification : "left" };
|
|
78
|
+
if (widthType === "auto") {
|
|
79
|
+
props.width = null;
|
|
80
|
+
props.widthType = "auto";
|
|
81
|
+
} else {
|
|
82
|
+
props.width = width;
|
|
83
|
+
props.widthType = widthType;
|
|
84
|
+
}
|
|
85
|
+
onApply(props);
|
|
86
|
+
onClose();
|
|
87
|
+
};
|
|
88
|
+
$[12] = justification;
|
|
89
|
+
$[13] = onApply;
|
|
90
|
+
$[14] = onClose;
|
|
91
|
+
$[15] = width;
|
|
92
|
+
$[16] = widthType;
|
|
93
|
+
$[17] = t7;
|
|
94
|
+
} else t7 = $[17];
|
|
95
|
+
const handleApply = t7;
|
|
96
|
+
const t8 = `${id}-tp-width-type`;
|
|
97
|
+
const t9 = `${id}-tp-width`;
|
|
98
|
+
const t10 = `${id}-tp-align`;
|
|
99
|
+
let t11;
|
|
100
|
+
if ($[18] !== t10 || $[19] !== t8 || $[20] !== t9) {
|
|
101
|
+
t11 = {
|
|
102
|
+
widthType: t8,
|
|
103
|
+
width: t9,
|
|
104
|
+
align: t10
|
|
105
|
+
};
|
|
106
|
+
$[18] = t10;
|
|
107
|
+
$[19] = t8;
|
|
108
|
+
$[20] = t9;
|
|
109
|
+
$[21] = t11;
|
|
110
|
+
} else t11 = $[21];
|
|
111
|
+
const fieldIds = t11;
|
|
112
|
+
let t12;
|
|
113
|
+
if ($[22] !== DialogBackdrop) {
|
|
114
|
+
t12 = /* @__PURE__ */ jsx(DialogBackdrop, { className: "fixed inset-0 z-[10000] bg-black/50" });
|
|
115
|
+
$[22] = DialogBackdrop;
|
|
116
|
+
$[23] = t12;
|
|
117
|
+
} else t12 = $[23];
|
|
118
|
+
let t13;
|
|
119
|
+
if ($[24] !== t) {
|
|
120
|
+
t13 = t("dialogs.tableProperties.title");
|
|
121
|
+
$[24] = t;
|
|
122
|
+
$[25] = t13;
|
|
123
|
+
} else t13 = $[25];
|
|
124
|
+
let t14;
|
|
125
|
+
if ($[26] !== DialogTitle || $[27] !== t13) {
|
|
126
|
+
t14 = /* @__PURE__ */ jsx(DialogTitle, {
|
|
127
|
+
className: "border-b px-5 py-3 text-base font-semibold",
|
|
128
|
+
children: t13
|
|
129
|
+
});
|
|
130
|
+
$[26] = DialogTitle;
|
|
131
|
+
$[27] = t13;
|
|
132
|
+
$[28] = t14;
|
|
133
|
+
} else t14 = $[28];
|
|
134
|
+
const t15 = fieldIds.widthType;
|
|
135
|
+
let t16;
|
|
136
|
+
if ($[29] !== t) {
|
|
137
|
+
t16 = t("dialogs.tableProperties.widthType");
|
|
138
|
+
$[29] = t;
|
|
139
|
+
$[30] = t16;
|
|
140
|
+
} else t16 = $[30];
|
|
141
|
+
let t17;
|
|
142
|
+
if ($[31] !== fieldIds.widthType || $[32] !== t16) {
|
|
143
|
+
t17 = /* @__PURE__ */ jsx("label", {
|
|
144
|
+
className: "w-20 text-muted-foreground text-[13px]",
|
|
145
|
+
htmlFor: t15,
|
|
146
|
+
children: t16
|
|
147
|
+
});
|
|
148
|
+
$[31] = fieldIds.widthType;
|
|
149
|
+
$[32] = t16;
|
|
150
|
+
$[33] = t17;
|
|
151
|
+
} else t17 = $[33];
|
|
152
|
+
const t18 = fieldIds.widthType;
|
|
153
|
+
let t19;
|
|
154
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
155
|
+
t19 = (e) => setWidthType(editableWidthType(e.target.value));
|
|
156
|
+
$[34] = t19;
|
|
157
|
+
} else t19 = $[34];
|
|
158
|
+
let t20;
|
|
159
|
+
if ($[35] !== t) {
|
|
160
|
+
t20 = t("dialogs.tableProperties.widthTypes.auto");
|
|
161
|
+
$[35] = t;
|
|
162
|
+
$[36] = t20;
|
|
163
|
+
} else t20 = $[36];
|
|
164
|
+
let t21;
|
|
165
|
+
if ($[37] !== t20) {
|
|
166
|
+
t21 = /* @__PURE__ */ jsx("option", {
|
|
167
|
+
value: "auto",
|
|
168
|
+
children: t20
|
|
169
|
+
});
|
|
170
|
+
$[37] = t20;
|
|
171
|
+
$[38] = t21;
|
|
172
|
+
} else t21 = $[38];
|
|
173
|
+
let t22;
|
|
174
|
+
if ($[39] !== t) {
|
|
175
|
+
t22 = t("dialogs.tableProperties.widthTypes.fixed");
|
|
176
|
+
$[39] = t;
|
|
177
|
+
$[40] = t22;
|
|
178
|
+
} else t22 = $[40];
|
|
179
|
+
let t23;
|
|
180
|
+
if ($[41] !== t22) {
|
|
181
|
+
t23 = /* @__PURE__ */ jsx("option", {
|
|
182
|
+
value: "dxa",
|
|
183
|
+
children: t22
|
|
184
|
+
});
|
|
185
|
+
$[41] = t22;
|
|
186
|
+
$[42] = t23;
|
|
187
|
+
} else t23 = $[42];
|
|
188
|
+
let t24;
|
|
189
|
+
if ($[43] !== t) {
|
|
190
|
+
t24 = t("dialogs.tableProperties.widthTypes.percentage");
|
|
191
|
+
$[43] = t;
|
|
192
|
+
$[44] = t24;
|
|
193
|
+
} else t24 = $[44];
|
|
194
|
+
let t25;
|
|
195
|
+
if ($[45] !== t24) {
|
|
196
|
+
t25 = /* @__PURE__ */ jsx("option", {
|
|
197
|
+
value: "pct",
|
|
198
|
+
children: t24
|
|
199
|
+
});
|
|
200
|
+
$[45] = t24;
|
|
201
|
+
$[46] = t25;
|
|
202
|
+
} else t25 = $[46];
|
|
203
|
+
let t26;
|
|
204
|
+
if ($[47] !== fieldIds.widthType || $[48] !== t21 || $[49] !== t23 || $[50] !== t25 || $[51] !== widthType) {
|
|
205
|
+
t26 = /* @__PURE__ */ jsxs("select", {
|
|
206
|
+
className: "border-input bg-background text-foreground flex-1 rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
207
|
+
id: t18,
|
|
208
|
+
onChange: t19,
|
|
209
|
+
value: widthType,
|
|
210
|
+
children: [
|
|
211
|
+
t21,
|
|
212
|
+
t23,
|
|
213
|
+
t25
|
|
214
|
+
]
|
|
215
|
+
});
|
|
216
|
+
$[47] = fieldIds.widthType;
|
|
217
|
+
$[48] = t21;
|
|
218
|
+
$[49] = t23;
|
|
219
|
+
$[50] = t25;
|
|
220
|
+
$[51] = widthType;
|
|
221
|
+
$[52] = t26;
|
|
222
|
+
} else t26 = $[52];
|
|
223
|
+
let t27;
|
|
224
|
+
if ($[53] !== t17 || $[54] !== t26) {
|
|
225
|
+
t27 = /* @__PURE__ */ jsxs("div", {
|
|
226
|
+
className: "flex items-center gap-3",
|
|
227
|
+
children: [t17, t26]
|
|
228
|
+
});
|
|
229
|
+
$[53] = t17;
|
|
230
|
+
$[54] = t26;
|
|
231
|
+
$[55] = t27;
|
|
232
|
+
} else t27 = $[55];
|
|
233
|
+
let t28;
|
|
234
|
+
if ($[56] !== fieldIds.width || $[57] !== t || $[58] !== width || $[59] !== widthType) {
|
|
235
|
+
t28 = widthType !== "auto" && /* @__PURE__ */ jsxs("div", {
|
|
236
|
+
className: "flex items-center gap-3",
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ jsx("label", {
|
|
239
|
+
className: "w-20 text-muted-foreground text-[13px]",
|
|
240
|
+
htmlFor: fieldIds.width,
|
|
241
|
+
children: t("dialogs.tableProperties.widthLabel")
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ jsx("input", {
|
|
244
|
+
className: "border-input bg-background text-foreground flex-1 rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
245
|
+
id: fieldIds.width,
|
|
246
|
+
min: 0,
|
|
247
|
+
onChange: (e_0) => setWidth(Number(e_0.target.value) || 0),
|
|
248
|
+
step: widthType === "pct" ? 5 : 100,
|
|
249
|
+
type: "number",
|
|
250
|
+
value: width
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ jsx("span", {
|
|
253
|
+
className: "text-muted-foreground text-[11px]",
|
|
254
|
+
children: widthType === "pct" ? t("dialogs.tableProperties.units.fiftiethsPercent") : t("dialogs.tableProperties.units.twips")
|
|
255
|
+
})
|
|
256
|
+
]
|
|
257
|
+
});
|
|
258
|
+
$[56] = fieldIds.width;
|
|
259
|
+
$[57] = t;
|
|
260
|
+
$[58] = width;
|
|
261
|
+
$[59] = widthType;
|
|
262
|
+
$[60] = t28;
|
|
263
|
+
} else t28 = $[60];
|
|
264
|
+
const t29 = fieldIds.align;
|
|
265
|
+
let t30;
|
|
266
|
+
if ($[61] !== t) {
|
|
267
|
+
t30 = t("dialogs.tableProperties.alignmentLabel");
|
|
268
|
+
$[61] = t;
|
|
269
|
+
$[62] = t30;
|
|
270
|
+
} else t30 = $[62];
|
|
271
|
+
let t31;
|
|
272
|
+
if ($[63] !== fieldIds.align || $[64] !== t30) {
|
|
273
|
+
t31 = /* @__PURE__ */ jsx("label", {
|
|
274
|
+
className: "w-20 text-muted-foreground text-[13px]",
|
|
275
|
+
htmlFor: t29,
|
|
276
|
+
children: t30
|
|
277
|
+
});
|
|
278
|
+
$[63] = fieldIds.align;
|
|
279
|
+
$[64] = t30;
|
|
280
|
+
$[65] = t31;
|
|
281
|
+
} else t31 = $[65];
|
|
282
|
+
const t32 = fieldIds.align;
|
|
283
|
+
let t33;
|
|
284
|
+
if ($[66] === Symbol.for("react.memo_cache_sentinel")) {
|
|
285
|
+
t33 = (e_1) => setJustification(editableJustification(e_1.target.value));
|
|
286
|
+
$[66] = t33;
|
|
287
|
+
} else t33 = $[66];
|
|
288
|
+
let t34;
|
|
289
|
+
if ($[67] !== t) {
|
|
290
|
+
t34 = t("dialogs.tableProperties.alignOptions.left");
|
|
291
|
+
$[67] = t;
|
|
292
|
+
$[68] = t34;
|
|
293
|
+
} else t34 = $[68];
|
|
294
|
+
let t35;
|
|
295
|
+
if ($[69] !== t34) {
|
|
296
|
+
t35 = /* @__PURE__ */ jsx("option", {
|
|
297
|
+
value: "left",
|
|
298
|
+
children: t34
|
|
299
|
+
});
|
|
300
|
+
$[69] = t34;
|
|
301
|
+
$[70] = t35;
|
|
302
|
+
} else t35 = $[70];
|
|
303
|
+
let t36;
|
|
304
|
+
if ($[71] !== t) {
|
|
305
|
+
t36 = t("dialogs.tableProperties.alignOptions.center");
|
|
306
|
+
$[71] = t;
|
|
307
|
+
$[72] = t36;
|
|
308
|
+
} else t36 = $[72];
|
|
309
|
+
let t37;
|
|
310
|
+
if ($[73] !== t36) {
|
|
311
|
+
t37 = /* @__PURE__ */ jsx("option", {
|
|
312
|
+
value: "center",
|
|
313
|
+
children: t36
|
|
314
|
+
});
|
|
315
|
+
$[73] = t36;
|
|
316
|
+
$[74] = t37;
|
|
317
|
+
} else t37 = $[74];
|
|
318
|
+
let t38;
|
|
319
|
+
if ($[75] !== t) {
|
|
320
|
+
t38 = t("dialogs.tableProperties.alignOptions.right");
|
|
321
|
+
$[75] = t;
|
|
322
|
+
$[76] = t38;
|
|
323
|
+
} else t38 = $[76];
|
|
324
|
+
let t39;
|
|
325
|
+
if ($[77] !== t38) {
|
|
326
|
+
t39 = /* @__PURE__ */ jsx("option", {
|
|
327
|
+
value: "right",
|
|
328
|
+
children: t38
|
|
329
|
+
});
|
|
330
|
+
$[77] = t38;
|
|
331
|
+
$[78] = t39;
|
|
332
|
+
} else t39 = $[78];
|
|
333
|
+
let t40;
|
|
334
|
+
if ($[79] !== fieldIds.align || $[80] !== justification || $[81] !== t35 || $[82] !== t37 || $[83] !== t39) {
|
|
335
|
+
t40 = /* @__PURE__ */ jsxs("select", {
|
|
336
|
+
className: "border-input bg-background text-foreground flex-1 rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
337
|
+
id: t32,
|
|
338
|
+
onChange: t33,
|
|
339
|
+
value: justification,
|
|
340
|
+
children: [
|
|
341
|
+
t35,
|
|
342
|
+
t37,
|
|
343
|
+
t39
|
|
344
|
+
]
|
|
345
|
+
});
|
|
346
|
+
$[79] = fieldIds.align;
|
|
347
|
+
$[80] = justification;
|
|
348
|
+
$[81] = t35;
|
|
349
|
+
$[82] = t37;
|
|
350
|
+
$[83] = t39;
|
|
351
|
+
$[84] = t40;
|
|
352
|
+
} else t40 = $[84];
|
|
353
|
+
let t41;
|
|
354
|
+
if ($[85] !== t31 || $[86] !== t40) {
|
|
355
|
+
t41 = /* @__PURE__ */ jsxs("div", {
|
|
356
|
+
className: "flex items-center gap-3",
|
|
357
|
+
children: [t31, t40]
|
|
358
|
+
});
|
|
359
|
+
$[85] = t31;
|
|
360
|
+
$[86] = t40;
|
|
361
|
+
$[87] = t41;
|
|
362
|
+
} else t41 = $[87];
|
|
363
|
+
let t42;
|
|
364
|
+
if ($[88] !== t27 || $[89] !== t28 || $[90] !== t41) {
|
|
365
|
+
t42 = /* @__PURE__ */ jsxs("div", {
|
|
366
|
+
className: "flex flex-col gap-3 px-5 py-4",
|
|
367
|
+
children: [
|
|
368
|
+
t27,
|
|
369
|
+
t28,
|
|
370
|
+
t41
|
|
371
|
+
]
|
|
372
|
+
});
|
|
373
|
+
$[88] = t27;
|
|
374
|
+
$[89] = t28;
|
|
375
|
+
$[90] = t41;
|
|
376
|
+
$[91] = t42;
|
|
377
|
+
} else t42 = $[91];
|
|
378
|
+
let t43;
|
|
379
|
+
if ($[92] !== t) {
|
|
380
|
+
t43 = t("common.cancel");
|
|
381
|
+
$[92] = t;
|
|
382
|
+
$[93] = t43;
|
|
383
|
+
} else t43 = $[93];
|
|
384
|
+
let t44;
|
|
385
|
+
if ($[94] !== DialogClose || $[95] !== t43) {
|
|
386
|
+
t44 = /* @__PURE__ */ jsx(DialogClose, {
|
|
387
|
+
className: "border-input rounded border px-4 py-1.5 text-[13px]",
|
|
388
|
+
children: t43
|
|
389
|
+
});
|
|
390
|
+
$[94] = DialogClose;
|
|
391
|
+
$[95] = t43;
|
|
392
|
+
$[96] = t44;
|
|
393
|
+
} else t44 = $[96];
|
|
394
|
+
let t45;
|
|
395
|
+
if ($[97] !== t) {
|
|
396
|
+
t45 = t("common.apply");
|
|
397
|
+
$[97] = t;
|
|
398
|
+
$[98] = t45;
|
|
399
|
+
} else t45 = $[98];
|
|
400
|
+
let t46;
|
|
401
|
+
if ($[99] !== handleApply || $[100] !== t45) {
|
|
402
|
+
t46 = /* @__PURE__ */ jsx("button", {
|
|
403
|
+
className: "bg-primary text-primary-foreground rounded px-4 py-1.5 text-[13px] font-medium",
|
|
404
|
+
onClick: handleApply,
|
|
405
|
+
type: "button",
|
|
406
|
+
children: t45
|
|
407
|
+
});
|
|
408
|
+
$[99] = handleApply;
|
|
409
|
+
$[100] = t45;
|
|
410
|
+
$[101] = t46;
|
|
411
|
+
} else t46 = $[101];
|
|
412
|
+
let t47;
|
|
413
|
+
if ($[102] !== t44 || $[103] !== t46) {
|
|
414
|
+
t47 = /* @__PURE__ */ jsxs("div", {
|
|
415
|
+
className: "flex justify-end gap-2 border-t px-5 py-3",
|
|
416
|
+
children: [t44, t46]
|
|
417
|
+
});
|
|
418
|
+
$[102] = t44;
|
|
419
|
+
$[103] = t46;
|
|
420
|
+
$[104] = t47;
|
|
421
|
+
} else t47 = $[104];
|
|
422
|
+
let t48;
|
|
423
|
+
if ($[105] !== DialogPopup || $[106] !== t14 || $[107] !== t42 || $[108] !== t47) {
|
|
424
|
+
t48 = /* @__PURE__ */ jsxs(DialogPopup, {
|
|
425
|
+
className: "bg-popover fixed start-1/2 top-1/2 z-[10001] w-full max-w-[440px] min-w-[360px] -translate-x-1/2 -translate-y-1/2 rounded-lg border shadow-xl",
|
|
426
|
+
children: [
|
|
427
|
+
t14,
|
|
428
|
+
t42,
|
|
429
|
+
t47
|
|
430
|
+
]
|
|
431
|
+
});
|
|
432
|
+
$[105] = DialogPopup;
|
|
433
|
+
$[106] = t14;
|
|
434
|
+
$[107] = t42;
|
|
435
|
+
$[108] = t47;
|
|
436
|
+
$[109] = t48;
|
|
437
|
+
} else t48 = $[109];
|
|
438
|
+
let t49;
|
|
439
|
+
if ($[110] !== DialogPortal || $[111] !== t12 || $[112] !== t48) {
|
|
440
|
+
t49 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t12, t48] });
|
|
441
|
+
$[110] = DialogPortal;
|
|
442
|
+
$[111] = t12;
|
|
443
|
+
$[112] = t48;
|
|
444
|
+
$[113] = t49;
|
|
445
|
+
} else t49 = $[113];
|
|
446
|
+
let t50;
|
|
447
|
+
if ($[114] !== Dialog || $[115] !== handleOpenChange || $[116] !== isOpen || $[117] !== t49) {
|
|
448
|
+
t50 = /* @__PURE__ */ jsx(Dialog, {
|
|
449
|
+
open: isOpen,
|
|
450
|
+
onOpenChange: handleOpenChange,
|
|
451
|
+
children: t49
|
|
452
|
+
});
|
|
453
|
+
$[114] = Dialog;
|
|
454
|
+
$[115] = handleOpenChange;
|
|
455
|
+
$[116] = isOpen;
|
|
456
|
+
$[117] = t49;
|
|
457
|
+
$[118] = t50;
|
|
458
|
+
} else t50 = $[118];
|
|
459
|
+
return t50;
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
462
|
+
export { TablePropertiesDialog_exports as n, TablePropertiesDialog as t };
|
package/dist/compat/eigenpal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-
|
|
1
|
+
import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-C8PNMI0-.js";
|
|
2
2
|
import { t as messages_exports } from "../messages.js";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { forwardRef } from "react";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties } from "react";
|
|
2
2
|
import { EndnoteProperties, FootnoteProperties, SectionProperties } from "@stll/folio-core/types/document";
|
|
3
|
+
import { TablePropertiesCommand } from "@stll/folio-core/utils/tableOperations";
|
|
3
4
|
import { FindMatch, FindOptions, FindResult } from "@stll/folio-core/utils/findReplace";
|
|
4
5
|
import { Watermark } from "@stll/folio-core/watermark";
|
|
5
6
|
//#region src/components/dialogs/FindReplaceDialog.d.ts
|
|
@@ -206,23 +207,12 @@ type SplitCellDialogProps = {
|
|
|
206
207
|
declare function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows, defaultColumns }: SplitCellDialogProps): import("react").JSX.Element;
|
|
207
208
|
//#endregion
|
|
208
209
|
//#region src/components/dialogs/TablePropertiesDialog.d.ts
|
|
209
|
-
|
|
210
|
-
* Table Properties Dialog — width type, width value, alignment.
|
|
211
|
-
*/
|
|
212
|
-
type TableProperties = {
|
|
213
|
-
width?: number | null;
|
|
214
|
-
widthType?: string | null;
|
|
215
|
-
justification?: "left" | "center" | "right" | null;
|
|
216
|
-
};
|
|
210
|
+
type TableProperties = TablePropertiesCommand;
|
|
217
211
|
type TablePropertiesDialogProps = {
|
|
218
212
|
isOpen: boolean;
|
|
219
213
|
onClose: () => void;
|
|
220
214
|
onApply: (props: TableProperties) => void;
|
|
221
|
-
currentProps?:
|
|
222
|
-
width?: number;
|
|
223
|
-
widthType?: string;
|
|
224
|
-
justification?: string;
|
|
225
|
-
};
|
|
215
|
+
currentProps?: TableProperties;
|
|
226
216
|
};
|
|
227
217
|
declare function TablePropertiesDialog({ isOpen, onClose, onApply, currentProps }: TablePropertiesDialogProps): import("react").JSX.Element;
|
|
228
218
|
//#endregion
|
package/dist/dialogs.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as HyperlinkDialog, C as ImagePropertiesData, D as ImagePositionDialog, E as ImagePositionData, F as FindReplaceDialog, I as FindReplaceDialogProps, M as HyperlinkDialogProps, N as FootnotePropertiesDialog, O as ImagePositionDialogProps, P as FootnotePropertiesDialogProps, S as InsertImageDialogProps, T as ImagePropertiesDialogProps, _ as InsertTableStyleOption, a as TablePropertiesDialogProps, b as InsertImageDialog, c as SplitCellDialogProps, d as PasteSpecialMode, f as PageSetupDialog, g as InsertTableDialogProps, h as InsertTableDialogData, i as TablePropertiesDialog, j as HyperlinkDialogData, k as HyperlinkBookmarkOption, l as PasteSpecialDialog, m as InsertTableDialog, n as WatermarkDialogProps, o as SplitCellDialog, p as PageSetupDialogProps, r as TableProperties, s as SplitCellDialogData, t as WatermarkDialog, u as PasteSpecialDialogProps, v as InsertSymbolDialog, w as ImagePropertiesDialog, x as InsertImageDialogData, y as InsertSymbolDialogProps } from "./dialogs-
|
|
1
|
+
import { A as HyperlinkDialog, C as ImagePropertiesData, D as ImagePositionDialog, E as ImagePositionData, F as FindReplaceDialog, I as FindReplaceDialogProps, M as HyperlinkDialogProps, N as FootnotePropertiesDialog, O as ImagePositionDialogProps, P as FootnotePropertiesDialogProps, S as InsertImageDialogProps, T as ImagePropertiesDialogProps, _ as InsertTableStyleOption, a as TablePropertiesDialogProps, b as InsertImageDialog, c as SplitCellDialogProps, d as PasteSpecialMode, f as PageSetupDialog, g as InsertTableDialogProps, h as InsertTableDialogData, i as TablePropertiesDialog, j as HyperlinkDialogData, k as HyperlinkBookmarkOption, l as PasteSpecialDialog, m as InsertTableDialog, n as WatermarkDialogProps, o as SplitCellDialog, p as PageSetupDialogProps, r as TableProperties, s as SplitCellDialogData, t as WatermarkDialog, u as PasteSpecialDialogProps, v as InsertSymbolDialog, w as ImagePropertiesDialog, x as InsertImageDialogData, y as InsertSymbolDialogProps } from "./dialogs-DZz6gVev.js";
|
|
2
2
|
export { FindReplaceDialog, type FindReplaceDialogProps, FootnotePropertiesDialog, type FootnotePropertiesDialogProps, type HyperlinkBookmarkOption, HyperlinkDialog, type HyperlinkDialogData, type HyperlinkDialogProps, type ImagePositionData, ImagePositionDialog, type ImagePositionDialogProps, type ImagePropertiesData, ImagePropertiesDialog, type ImagePropertiesDialogProps, InsertImageDialog, type InsertImageDialogData, type InsertImageDialogProps, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogData, type InsertTableDialogProps, type InsertTableStyleOption, PageSetupDialog, type PageSetupDialogProps, PasteSpecialDialog, type PasteSpecialDialogProps, type PasteSpecialMode, SplitCellDialog, type SplitCellDialogData, type SplitCellDialogProps, type TableProperties, TablePropertiesDialog, type TablePropertiesDialogProps, WatermarkDialog, type WatermarkDialogProps };
|
package/dist/dialogs.js
CHANGED
|
@@ -5,5 +5,5 @@ import { t as ImagePositionDialog } from "./ImagePositionDialog-DNodkoI2.js";
|
|
|
5
5
|
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-CLsDIUWb.js";
|
|
6
6
|
import { t as InsertSymbolDialog } from "./InsertSymbolDialog-DCFLmfzn.js";
|
|
7
7
|
import { t as PageSetupDialog } from "./PageSetupDialog-COkgeOQn.js";
|
|
8
|
-
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-
|
|
8
|
+
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-BW4RRZLZ.js";
|
|
9
9
|
export { FindReplaceDialog, FootnotePropertiesDialog, HyperlinkDialog, ImagePositionDialog, ImagePropertiesDialog, InsertImageDialog, InsertSymbolDialog, InsertTableDialog, PageSetupDialog, PasteSpecialDialog, SplitCellDialog, TablePropertiesDialog, WatermarkDialog };
|