@stll/folio-react 0.7.0 → 0.8.1
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-B8X5a8JW.js → CommentsSidebar-Byn5lyrt.js} +2 -2
- package/dist/{FindReplaceDialog-Bx7QaFQ_.js → FindReplaceDialog-CqKK82nE.js} +1 -1
- package/dist/FootnotePropertiesDialog-CixRdIiT.js +822 -0
- package/dist/ImagePositionDialog-DNodkoI2.js +1065 -0
- package/dist/ImagePropertiesDialog-CLsDIUWb.js +613 -0
- package/dist/{InsertSymbolDialog-Df9dyLvn.js → InsertSymbolDialog-DCFLmfzn.js} +1 -1
- package/dist/PageSetupDialog-COkgeOQn.js +820 -0
- package/dist/TablePropertiesDialog-B_AGrPR8.js +434 -0
- package/dist/compat/eigenpal.d.ts +1 -1
- package/dist/compat/eigenpal.js +1 -1
- package/dist/{dialogs-DsHnfN0g.js → dialogs-Bj2PdycR.js} +265 -201
- package/dist/dialogs.js +8 -8
- package/dist/{folio-ui-C-85DSuK.js → folio-ui-BgDDRsUX.js} +5 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/{renderAsync-ChQI9UJG.d.ts → renderAsync-BmxQE7iO.d.ts} +3 -2
- package/dist/{renderAsync-evdyE_GW.js → renderAsync-BtWYvQMT.js} +378 -273
- package/package.json +2 -2
- package/dist/FootnotePropertiesDialog-2lmpg9m8.js +0 -646
- package/dist/ImagePositionDialog-D3MileYL.js +0 -842
- package/dist/ImagePropertiesDialog-CzK8HCaW.js +0 -465
- package/dist/PageSetupDialog-PSs9YdPb.js +0 -684
- package/dist/TablePropertiesDialog-PQxKKM0Y.js +0 -344
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
1
|
+
import { r as useFolioUI } from "./folio-ui-BgDDRsUX.js";
|
|
2
2
|
import { a as DIALOG_LABEL_CLASS, c as DIALOG_SECONDARY_BUTTON_CLASS, i as DIALOG_INPUT_CLASS, l as DIALOG_TITLE_CLASS, n as DIALOG_BODY_CLASS, o as DIALOG_POPUP_CLASS, r as DIALOG_FOOTER_CLASS, s as DIALOG_PRIMARY_BUTTON_CLASS, t as DIALOG_BACKDROP_CLASS, u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { useEffect, useId, useState } from "react";
|
|
5
|
+
import { useTranslations } from "use-intl";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/dialogs/HyperlinkDialog.tsx
|
|
7
8
|
function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, selectedText, bookmarks = [] }) {
|
|
8
9
|
const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
|
|
9
10
|
const handleOpenChange = useCloseOnDialogOpenChange(onClose);
|
|
11
|
+
const t = useTranslations("folio");
|
|
10
12
|
const id = useId();
|
|
11
13
|
const [targetType, setTargetType] = useState("url");
|
|
12
14
|
const [url, setUrl] = useState("");
|
|
@@ -79,7 +81,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
|
|
|
79
81
|
htmlFor: fieldIds.targetType,
|
|
80
82
|
children: [/* @__PURE__ */ jsx("span", {
|
|
81
83
|
className: "text-muted-foreground text-[13px]",
|
|
82
|
-
children: "
|
|
84
|
+
children: t("dialogs.hyperlink.linkTo")
|
|
83
85
|
}), /* @__PURE__ */ jsxs("select", {
|
|
84
86
|
className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
85
87
|
id: fieldIds.targetType,
|
|
@@ -87,10 +89,10 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
|
|
|
87
89
|
value: targetType,
|
|
88
90
|
children: [/* @__PURE__ */ jsx("option", {
|
|
89
91
|
value: "url",
|
|
90
|
-
children: "
|
|
92
|
+
children: t("dialogs.hyperlink.tabWebAddress")
|
|
91
93
|
}), /* @__PURE__ */ jsx("option", {
|
|
92
94
|
value: "bookmark",
|
|
93
|
-
children: "
|
|
95
|
+
children: t("dialogs.hyperlink.tabBookmark")
|
|
94
96
|
})]
|
|
95
97
|
})]
|
|
96
98
|
}),
|
|
@@ -100,7 +102,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
|
|
|
100
102
|
children: [
|
|
101
103
|
/* @__PURE__ */ jsx("span", {
|
|
102
104
|
className: "text-muted-foreground text-[13px]",
|
|
103
|
-
children: "
|
|
105
|
+
children: t("dialogs.hyperlink.addressLabel")
|
|
104
106
|
}),
|
|
105
107
|
/* @__PURE__ */ jsx("input", {
|
|
106
108
|
"aria-invalid": touched && urlError.length > 0,
|
|
@@ -122,7 +124,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
|
|
|
122
124
|
htmlFor: fieldIds.bookmark,
|
|
123
125
|
children: [/* @__PURE__ */ jsx("span", {
|
|
124
126
|
className: "text-muted-foreground text-[13px]",
|
|
125
|
-
children: "
|
|
127
|
+
children: t("dialogs.hyperlink.bookmarkLabel")
|
|
126
128
|
}), /* @__PURE__ */ jsxs("select", {
|
|
127
129
|
className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
128
130
|
id: fieldIds.bookmark,
|
|
@@ -130,7 +132,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
|
|
|
130
132
|
value: bookmark,
|
|
131
133
|
children: [/* @__PURE__ */ jsx("option", {
|
|
132
134
|
value: "",
|
|
133
|
-
children: "
|
|
135
|
+
children: t("dialogs.hyperlink.bookmarkPlaceholder")
|
|
134
136
|
}), bookmarks.map((option) => /* @__PURE__ */ jsx("option", {
|
|
135
137
|
value: option.name,
|
|
136
138
|
children: option.label ?? option.name
|
|
@@ -142,7 +144,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
|
|
|
142
144
|
htmlFor: fieldIds.displayText,
|
|
143
145
|
children: [/* @__PURE__ */ jsx("span", {
|
|
144
146
|
className: DIALOG_LABEL_CLASS,
|
|
145
|
-
children: "
|
|
147
|
+
children: t("dialogs.hyperlink.displayTextPlaceholder")
|
|
146
148
|
}), /* @__PURE__ */ jsx("input", {
|
|
147
149
|
className: DIALOG_INPUT_CLASS,
|
|
148
150
|
id: fieldIds.displayText,
|
|
@@ -155,7 +157,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
|
|
|
155
157
|
htmlFor: fieldIds.tooltip,
|
|
156
158
|
children: [/* @__PURE__ */ jsx("span", {
|
|
157
159
|
className: DIALOG_LABEL_CLASS,
|
|
158
|
-
children: "
|
|
160
|
+
children: t("dialogs.hyperlink.screenTipLabel")
|
|
159
161
|
}), /* @__PURE__ */ jsx("input", {
|
|
160
162
|
className: DIALOG_INPUT_CLASS,
|
|
161
163
|
id: fieldIds.tooltip,
|
|
@@ -172,18 +174,18 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
|
|
|
172
174
|
className: "text-destructive me-auto rounded px-4 py-1.5 text-[13px]",
|
|
173
175
|
onClick: handleRemove,
|
|
174
176
|
type: "button",
|
|
175
|
-
children: "
|
|
177
|
+
children: t("common.remove")
|
|
176
178
|
}),
|
|
177
179
|
/* @__PURE__ */ jsx(DialogClose, {
|
|
178
180
|
className: DIALOG_SECONDARY_BUTTON_CLASS,
|
|
179
|
-
children: "
|
|
181
|
+
children: t("common.cancel")
|
|
180
182
|
}),
|
|
181
183
|
/* @__PURE__ */ jsx("button", {
|
|
182
184
|
className: DIALOG_PRIMARY_BUTTON_CLASS,
|
|
183
185
|
disabled: !canSubmit,
|
|
184
186
|
onClick: handleSubmit,
|
|
185
187
|
type: "button",
|
|
186
|
-
children: isEditing ? "
|
|
188
|
+
children: isEditing ? t("common.update") : t("common.insert")
|
|
187
189
|
})
|
|
188
190
|
]
|
|
189
191
|
})
|
|
@@ -216,6 +218,7 @@ function normalizeUrl(value) {
|
|
|
216
218
|
function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,image/jpeg,image/gif,image/webp" }) {
|
|
217
219
|
const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
|
|
218
220
|
const handleOpenChange = useCloseOnDialogOpenChange(onClose);
|
|
221
|
+
const t = useTranslations("folio");
|
|
219
222
|
const id = useId();
|
|
220
223
|
const [file, setFile] = useState(null);
|
|
221
224
|
const [alt, setAlt] = useState("");
|
|
@@ -254,7 +257,7 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
|
|
|
254
257
|
children: [
|
|
255
258
|
/* @__PURE__ */ jsx(DialogTitle, {
|
|
256
259
|
className: DIALOG_TITLE_CLASS,
|
|
257
|
-
children: "
|
|
260
|
+
children: t("dialogs.insertImage.title")
|
|
258
261
|
}),
|
|
259
262
|
/* @__PURE__ */ jsxs("div", {
|
|
260
263
|
className: DIALOG_BODY_CLASS,
|
|
@@ -264,7 +267,7 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
|
|
|
264
267
|
htmlFor: fieldIds.file,
|
|
265
268
|
children: [/* @__PURE__ */ jsx("span", {
|
|
266
269
|
className: DIALOG_LABEL_CLASS,
|
|
267
|
-
children: "
|
|
270
|
+
children: t("dialogs.insertImage.imageFile")
|
|
268
271
|
}), /* @__PURE__ */ jsx("input", {
|
|
269
272
|
accept,
|
|
270
273
|
className: DIALOG_INPUT_CLASS,
|
|
@@ -278,7 +281,7 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
|
|
|
278
281
|
htmlFor: fieldIds.alt,
|
|
279
282
|
children: [/* @__PURE__ */ jsx("span", {
|
|
280
283
|
className: DIALOG_LABEL_CLASS,
|
|
281
|
-
children: "
|
|
284
|
+
children: t("dialogs.insertImage.altText")
|
|
282
285
|
}), /* @__PURE__ */ jsx("input", {
|
|
283
286
|
className: DIALOG_INPUT_CLASS,
|
|
284
287
|
id: fieldIds.alt,
|
|
@@ -294,7 +297,7 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
|
|
|
294
297
|
htmlFor: fieldIds.width,
|
|
295
298
|
children: [/* @__PURE__ */ jsx("span", {
|
|
296
299
|
className: DIALOG_LABEL_CLASS,
|
|
297
|
-
children: "
|
|
300
|
+
children: t("dialogs.imageProperties.widthLabel")
|
|
298
301
|
}), /* @__PURE__ */ jsx("input", {
|
|
299
302
|
className: DIALOG_INPUT_CLASS,
|
|
300
303
|
id: fieldIds.width,
|
|
@@ -309,7 +312,7 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
|
|
|
309
312
|
htmlFor: fieldIds.height,
|
|
310
313
|
children: [/* @__PURE__ */ jsx("span", {
|
|
311
314
|
className: DIALOG_LABEL_CLASS,
|
|
312
|
-
children: "
|
|
315
|
+
children: t("dialogs.imageProperties.heightLabel")
|
|
313
316
|
}), /* @__PURE__ */ jsx("input", {
|
|
314
317
|
className: DIALOG_INPUT_CLASS,
|
|
315
318
|
id: fieldIds.height,
|
|
@@ -327,13 +330,13 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
|
|
|
327
330
|
className: DIALOG_FOOTER_CLASS,
|
|
328
331
|
children: [/* @__PURE__ */ jsx(DialogClose, {
|
|
329
332
|
className: DIALOG_SECONDARY_BUTTON_CLASS,
|
|
330
|
-
children: "
|
|
333
|
+
children: t("common.cancel")
|
|
331
334
|
}), /* @__PURE__ */ jsx("button", {
|
|
332
335
|
className: DIALOG_PRIMARY_BUTTON_CLASS,
|
|
333
336
|
disabled: !file,
|
|
334
337
|
onClick: handleInsert,
|
|
335
338
|
type: "button",
|
|
336
|
-
children: "
|
|
339
|
+
children: t("common.insert")
|
|
337
340
|
})]
|
|
338
341
|
})
|
|
339
342
|
]
|
|
@@ -369,6 +372,7 @@ const DEFAULT_STYLE_OPTIONS = [
|
|
|
369
372
|
function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, defaultColumns = 3, styleOptions = DEFAULT_STYLE_OPTIONS }) {
|
|
370
373
|
const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
|
|
371
374
|
const handleOpenChange = useCloseOnDialogOpenChange(onClose);
|
|
375
|
+
const t = useTranslations("folio");
|
|
372
376
|
const id = useId();
|
|
373
377
|
const [rows, setRows] = useState(defaultRows);
|
|
374
378
|
const [columns, setColumns] = useState(defaultColumns);
|
|
@@ -416,7 +420,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
|
|
|
416
420
|
children: [
|
|
417
421
|
/* @__PURE__ */ jsx(DialogTitle, {
|
|
418
422
|
className: DIALOG_TITLE_CLASS,
|
|
419
|
-
children: "
|
|
423
|
+
children: t("dialogs.insertTable.title")
|
|
420
424
|
}),
|
|
421
425
|
/* @__PURE__ */ jsxs("div", {
|
|
422
426
|
className: DIALOG_BODY_CLASS,
|
|
@@ -457,7 +461,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
|
|
|
457
461
|
htmlFor: fieldIds.rows,
|
|
458
462
|
children: [/* @__PURE__ */ jsx("span", {
|
|
459
463
|
className: DIALOG_LABEL_CLASS,
|
|
460
|
-
children: "
|
|
464
|
+
children: t("dialogs.insertTable.rowsLabel")
|
|
461
465
|
}), /* @__PURE__ */ jsx("input", {
|
|
462
466
|
className: DIALOG_INPUT_CLASS,
|
|
463
467
|
id: fieldIds.rows,
|
|
@@ -472,7 +476,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
|
|
|
472
476
|
htmlFor: fieldIds.columns,
|
|
473
477
|
children: [/* @__PURE__ */ jsx("span", {
|
|
474
478
|
className: DIALOG_LABEL_CLASS,
|
|
475
|
-
children: "
|
|
479
|
+
children: t("dialogs.insertTable.columnsLabel")
|
|
476
480
|
}), /* @__PURE__ */ jsx("input", {
|
|
477
481
|
className: DIALOG_INPUT_CLASS,
|
|
478
482
|
id: fieldIds.columns,
|
|
@@ -494,7 +498,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
|
|
|
494
498
|
type: "checkbox"
|
|
495
499
|
}), /* @__PURE__ */ jsx("span", {
|
|
496
500
|
className: DIALOG_LABEL_CLASS,
|
|
497
|
-
children: "
|
|
501
|
+
children: t("dialogs.insertTable.autofit")
|
|
498
502
|
})]
|
|
499
503
|
}),
|
|
500
504
|
styleOptions.length > 0 && /* @__PURE__ */ jsxs("label", {
|
|
@@ -502,7 +506,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
|
|
|
502
506
|
htmlFor: fieldIds.style,
|
|
503
507
|
children: [/* @__PURE__ */ jsx("span", {
|
|
504
508
|
className: "text-muted-foreground text-[13px]",
|
|
505
|
-
children: "
|
|
509
|
+
children: t("dialogs.insertTable.style")
|
|
506
510
|
}), /* @__PURE__ */ jsxs("select", {
|
|
507
511
|
className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
508
512
|
id: fieldIds.style,
|
|
@@ -510,7 +514,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
|
|
|
510
514
|
value: styleId,
|
|
511
515
|
children: [/* @__PURE__ */ jsx("option", {
|
|
512
516
|
value: "",
|
|
513
|
-
children: "
|
|
517
|
+
children: t("dialogs.insertTable.plainTable")
|
|
514
518
|
}), styleOptions.map((style) => /* @__PURE__ */ jsx("option", {
|
|
515
519
|
value: style.id,
|
|
516
520
|
children: style.name
|
|
@@ -523,13 +527,13 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
|
|
|
523
527
|
className: DIALOG_FOOTER_CLASS,
|
|
524
528
|
children: [/* @__PURE__ */ jsx(DialogClose, {
|
|
525
529
|
className: DIALOG_SECONDARY_BUTTON_CLASS,
|
|
526
|
-
children: "
|
|
530
|
+
children: t("common.cancel")
|
|
527
531
|
}), /* @__PURE__ */ jsx("button", {
|
|
528
532
|
className: DIALOG_PRIMARY_BUTTON_CLASS,
|
|
529
533
|
disabled: !canInsert,
|
|
530
534
|
onClick: handleInsert,
|
|
531
535
|
type: "button",
|
|
532
|
-
children: "
|
|
536
|
+
children: t("common.insert")
|
|
533
537
|
})]
|
|
534
538
|
})
|
|
535
539
|
]
|
|
@@ -561,6 +565,7 @@ const PASTE_MODES = [
|
|
|
561
565
|
function PasteSpecialDialog({ isOpen, onClose, onPaste, defaultMode = "plainText" }) {
|
|
562
566
|
const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
|
|
563
567
|
const handleOpenChange = useCloseOnDialogOpenChange(onClose);
|
|
568
|
+
const t = useTranslations("folio");
|
|
564
569
|
const id = useId();
|
|
565
570
|
const [mode, setMode] = useState(defaultMode);
|
|
566
571
|
useEffect(() => {
|
|
@@ -578,7 +583,7 @@ function PasteSpecialDialog({ isOpen, onClose, onPaste, defaultMode = "plainText
|
|
|
578
583
|
children: [
|
|
579
584
|
/* @__PURE__ */ jsx(DialogTitle, {
|
|
580
585
|
className: DIALOG_TITLE_CLASS,
|
|
581
|
-
children: "
|
|
586
|
+
children: t("dialogs.pasteSpecial.title")
|
|
582
587
|
}),
|
|
583
588
|
/* @__PURE__ */ jsx("div", {
|
|
584
589
|
className: DIALOG_BODY_CLASS,
|
|
@@ -586,7 +591,7 @@ function PasteSpecialDialog({ isOpen, onClose, onPaste, defaultMode = "plainText
|
|
|
586
591
|
className: "flex flex-col gap-3",
|
|
587
592
|
children: [/* @__PURE__ */ jsx("legend", {
|
|
588
593
|
className: DIALOG_LABEL_CLASS,
|
|
589
|
-
children: "
|
|
594
|
+
children: t("dialogs.pasteSpecial.pasteMode")
|
|
590
595
|
}), PASTE_MODES.map((option) => {
|
|
591
596
|
const optionId = `${id}-paste-special-${option.value}`;
|
|
592
597
|
return /* @__PURE__ */ jsxs("label", {
|
|
@@ -615,12 +620,12 @@ function PasteSpecialDialog({ isOpen, onClose, onPaste, defaultMode = "plainText
|
|
|
615
620
|
className: DIALOG_FOOTER_CLASS,
|
|
616
621
|
children: [/* @__PURE__ */ jsx(DialogClose, {
|
|
617
622
|
className: DIALOG_SECONDARY_BUTTON_CLASS,
|
|
618
|
-
children: "
|
|
623
|
+
children: t("common.cancel")
|
|
619
624
|
}), /* @__PURE__ */ jsx("button", {
|
|
620
625
|
className: DIALOG_PRIMARY_BUTTON_CLASS,
|
|
621
626
|
onClick: handlePaste,
|
|
622
627
|
type: "button",
|
|
623
|
-
children: "
|
|
628
|
+
children: t("paste")
|
|
624
629
|
})]
|
|
625
630
|
})
|
|
626
631
|
]
|
|
@@ -634,6 +639,7 @@ const MAX_PARTS = 63;
|
|
|
634
639
|
function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultColumns = 2 }) {
|
|
635
640
|
const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
|
|
636
641
|
const handleOpenChange = useCloseOnDialogOpenChange(onClose);
|
|
642
|
+
const t = useTranslations("folio");
|
|
637
643
|
const id = useId();
|
|
638
644
|
const [rows, setRows] = useState(defaultRows);
|
|
639
645
|
const [columns, setColumns] = useState(defaultColumns);
|
|
@@ -673,7 +679,7 @@ function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultCol
|
|
|
673
679
|
children: [
|
|
674
680
|
/* @__PURE__ */ jsx(DialogTitle, {
|
|
675
681
|
className: DIALOG_TITLE_CLASS,
|
|
676
|
-
children: "
|
|
682
|
+
children: t("dialogs.splitCell.title")
|
|
677
683
|
}),
|
|
678
684
|
/* @__PURE__ */ jsxs("div", {
|
|
679
685
|
className: DIALOG_BODY_CLASS,
|
|
@@ -684,7 +690,7 @@ function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultCol
|
|
|
684
690
|
htmlFor: fieldIds.columns,
|
|
685
691
|
children: [/* @__PURE__ */ jsx("span", {
|
|
686
692
|
className: DIALOG_LABEL_CLASS,
|
|
687
|
-
children: "
|
|
693
|
+
children: t("dialogs.insertTable.columnsLabel")
|
|
688
694
|
}), /* @__PURE__ */ jsx("input", {
|
|
689
695
|
className: DIALOG_INPUT_CLASS,
|
|
690
696
|
id: fieldIds.columns,
|
|
@@ -699,7 +705,7 @@ function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultCol
|
|
|
699
705
|
htmlFor: fieldIds.rows,
|
|
700
706
|
children: [/* @__PURE__ */ jsx("span", {
|
|
701
707
|
className: DIALOG_LABEL_CLASS,
|
|
702
|
-
children: "
|
|
708
|
+
children: t("dialogs.insertTable.rowsLabel")
|
|
703
709
|
}), /* @__PURE__ */ jsx("input", {
|
|
704
710
|
className: DIALOG_INPUT_CLASS,
|
|
705
711
|
id: fieldIds.rows,
|
|
@@ -720,7 +726,7 @@ function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultCol
|
|
|
720
726
|
type: "checkbox"
|
|
721
727
|
}), /* @__PURE__ */ jsx("span", {
|
|
722
728
|
className: DIALOG_LABEL_CLASS,
|
|
723
|
-
children: "
|
|
729
|
+
children: t("dialogs.splitCell.mergeBeforeSplit")
|
|
724
730
|
})]
|
|
725
731
|
})]
|
|
726
732
|
}),
|
|
@@ -728,13 +734,13 @@ function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultCol
|
|
|
728
734
|
className: DIALOG_FOOTER_CLASS,
|
|
729
735
|
children: [/* @__PURE__ */ jsx(DialogClose, {
|
|
730
736
|
className: DIALOG_SECONDARY_BUTTON_CLASS,
|
|
731
|
-
children: "
|
|
737
|
+
children: t("common.cancel")
|
|
732
738
|
}), /* @__PURE__ */ jsx("button", {
|
|
733
739
|
className: DIALOG_PRIMARY_BUTTON_CLASS,
|
|
734
740
|
disabled: !canSplit,
|
|
735
741
|
onClick: handleSplit,
|
|
736
742
|
type: "button",
|
|
737
|
-
children: "
|
|
743
|
+
children: t("dialogs.splitCell.splitButton")
|
|
738
744
|
})]
|
|
739
745
|
})
|
|
740
746
|
]
|
|
@@ -748,10 +754,11 @@ function clampInteger(value) {
|
|
|
748
754
|
//#region src/components/dialogs/WatermarkDialog.tsx
|
|
749
755
|
const DEFAULT_TEXT_COLOR = "#C0C0C0";
|
|
750
756
|
function WatermarkDialog(t0) {
|
|
751
|
-
const $ = c(
|
|
757
|
+
const $ = c(127);
|
|
752
758
|
const { isOpen, onClose, onApply, currentWatermark } = t0;
|
|
753
759
|
const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
|
|
754
760
|
const handleOpenChange = useCloseOnDialogOpenChange(onClose);
|
|
761
|
+
const t = useTranslations("folio");
|
|
755
762
|
const id = useId();
|
|
756
763
|
const [mode, setMode] = useState("text");
|
|
757
764
|
const [text, setText] = useState("CONFIDENTIAL");
|
|
@@ -912,82 +919,123 @@ function WatermarkDialog(t0) {
|
|
|
912
919
|
$[36] = t17;
|
|
913
920
|
} else t17 = $[36];
|
|
914
921
|
let t18;
|
|
915
|
-
if ($[37] !==
|
|
916
|
-
t18 =
|
|
917
|
-
|
|
918
|
-
children: "Watermark"
|
|
919
|
-
});
|
|
920
|
-
$[37] = DialogTitle;
|
|
922
|
+
if ($[37] !== t) {
|
|
923
|
+
t18 = t("dialogs.watermark.title");
|
|
924
|
+
$[37] = t;
|
|
921
925
|
$[38] = t18;
|
|
922
926
|
} else t18 = $[38];
|
|
923
927
|
let t19;
|
|
924
|
-
if ($[39]
|
|
925
|
-
t19 = /* @__PURE__ */ jsx(
|
|
926
|
-
className:
|
|
927
|
-
children:
|
|
928
|
+
if ($[39] !== DialogTitle || $[40] !== t18) {
|
|
929
|
+
t19 = /* @__PURE__ */ jsx(DialogTitle, {
|
|
930
|
+
className: DIALOG_TITLE_CLASS,
|
|
931
|
+
children: t18
|
|
928
932
|
});
|
|
929
|
-
$[39] =
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
$[40] = t20;
|
|
935
|
-
} else t20 = $[40];
|
|
933
|
+
$[39] = DialogTitle;
|
|
934
|
+
$[40] = t18;
|
|
935
|
+
$[41] = t19;
|
|
936
|
+
} else t19 = $[41];
|
|
937
|
+
const t20 = fieldIds.mode;
|
|
936
938
|
let t21;
|
|
939
|
+
if ($[42] !== t) {
|
|
940
|
+
t21 = t("dialogs.watermark.type");
|
|
941
|
+
$[42] = t;
|
|
942
|
+
$[43] = t21;
|
|
943
|
+
} else t21 = $[43];
|
|
937
944
|
let t22;
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
945
|
+
if ($[44] !== t21) {
|
|
946
|
+
t22 = /* @__PURE__ */ jsx("span", {
|
|
947
|
+
className: DIALOG_LABEL_CLASS,
|
|
948
|
+
children: t21
|
|
949
|
+
});
|
|
950
|
+
$[44] = t21;
|
|
951
|
+
$[45] = t22;
|
|
952
|
+
} else t22 = $[45];
|
|
953
|
+
const t23 = fieldIds.mode;
|
|
954
|
+
let t24;
|
|
955
|
+
if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
|
|
956
|
+
t24 = (e) => setMode(toWatermarkMode(e.target.value));
|
|
957
|
+
$[46] = t24;
|
|
958
|
+
} else t24 = $[46];
|
|
959
|
+
let t25;
|
|
960
|
+
if ($[47] !== t) {
|
|
961
|
+
t25 = t("dialogs.watermark.textWatermark");
|
|
962
|
+
$[47] = t;
|
|
963
|
+
$[48] = t25;
|
|
964
|
+
} else t25 = $[48];
|
|
965
|
+
let t26;
|
|
966
|
+
if ($[49] !== t25) {
|
|
967
|
+
t26 = /* @__PURE__ */ jsx("option", {
|
|
941
968
|
value: "text",
|
|
942
|
-
children:
|
|
969
|
+
children: t25
|
|
943
970
|
});
|
|
944
|
-
|
|
971
|
+
$[49] = t25;
|
|
972
|
+
$[50] = t26;
|
|
973
|
+
} else t26 = $[50];
|
|
974
|
+
let t27;
|
|
975
|
+
if ($[51] !== t) {
|
|
976
|
+
t27 = t("dialogs.watermark.pictureWatermark");
|
|
977
|
+
$[51] = t;
|
|
978
|
+
$[52] = t27;
|
|
979
|
+
} else t27 = $[52];
|
|
980
|
+
let t28;
|
|
981
|
+
if ($[53] !== t27) {
|
|
982
|
+
t28 = /* @__PURE__ */ jsx("option", {
|
|
945
983
|
value: "picture",
|
|
946
|
-
children:
|
|
984
|
+
children: t27
|
|
947
985
|
});
|
|
948
|
-
|
|
986
|
+
$[53] = t27;
|
|
987
|
+
$[54] = t28;
|
|
988
|
+
} else t28 = $[54];
|
|
989
|
+
let t29;
|
|
990
|
+
if ($[55] !== t) {
|
|
991
|
+
t29 = t("dialogs.watermark.noWatermark");
|
|
992
|
+
$[55] = t;
|
|
993
|
+
$[56] = t29;
|
|
994
|
+
} else t29 = $[56];
|
|
995
|
+
let t30;
|
|
996
|
+
if ($[57] !== t29) {
|
|
997
|
+
t30 = /* @__PURE__ */ jsx("option", {
|
|
949
998
|
value: "none",
|
|
950
|
-
children:
|
|
999
|
+
children: t29
|
|
951
1000
|
});
|
|
952
|
-
$[
|
|
953
|
-
$[
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
t23 = $[43];
|
|
959
|
-
}
|
|
960
|
-
let t24;
|
|
961
|
-
if ($[44] !== fieldIds.mode || $[45] !== mode) {
|
|
962
|
-
t24 = /* @__PURE__ */ jsxs("select", {
|
|
1001
|
+
$[57] = t29;
|
|
1002
|
+
$[58] = t30;
|
|
1003
|
+
} else t30 = $[58];
|
|
1004
|
+
let t31;
|
|
1005
|
+
if ($[59] !== fieldIds.mode || $[60] !== mode || $[61] !== t26 || $[62] !== t28 || $[63] !== t30) {
|
|
1006
|
+
t31 = /* @__PURE__ */ jsxs("select", {
|
|
963
1007
|
className: DIALOG_INPUT_CLASS,
|
|
964
|
-
id:
|
|
965
|
-
onChange:
|
|
1008
|
+
id: t23,
|
|
1009
|
+
onChange: t24,
|
|
966
1010
|
value: mode,
|
|
967
1011
|
children: [
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1012
|
+
t26,
|
|
1013
|
+
t28,
|
|
1014
|
+
t30
|
|
971
1015
|
]
|
|
972
1016
|
});
|
|
973
|
-
$[
|
|
974
|
-
$[
|
|
975
|
-
$[
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1017
|
+
$[59] = fieldIds.mode;
|
|
1018
|
+
$[60] = mode;
|
|
1019
|
+
$[61] = t26;
|
|
1020
|
+
$[62] = t28;
|
|
1021
|
+
$[63] = t30;
|
|
1022
|
+
$[64] = t31;
|
|
1023
|
+
} else t31 = $[64];
|
|
1024
|
+
let t32;
|
|
1025
|
+
if ($[65] !== fieldIds.mode || $[66] !== t22 || $[67] !== t31) {
|
|
1026
|
+
t32 = /* @__PURE__ */ jsxs("label", {
|
|
980
1027
|
className: "flex flex-col gap-1",
|
|
981
|
-
htmlFor:
|
|
982
|
-
children: [
|
|
1028
|
+
htmlFor: t20,
|
|
1029
|
+
children: [t22, t31]
|
|
983
1030
|
});
|
|
984
|
-
$[
|
|
985
|
-
$[
|
|
986
|
-
$[
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1031
|
+
$[65] = fieldIds.mode;
|
|
1032
|
+
$[66] = t22;
|
|
1033
|
+
$[67] = t31;
|
|
1034
|
+
$[68] = t32;
|
|
1035
|
+
} else t32 = $[68];
|
|
1036
|
+
let t33;
|
|
1037
|
+
if ($[69] !== color || $[70] !== diagonal || $[71] !== fieldIds.color || $[72] !== fieldIds.diagonal || $[73] !== fieldIds.font || $[74] !== fieldIds.opacity || $[75] !== fieldIds.text || $[76] !== font || $[77] !== mode || $[78] !== opacityPercent || $[79] !== t || $[80] !== text) {
|
|
1038
|
+
t33 = mode === "text" && /* @__PURE__ */ jsxs("div", {
|
|
991
1039
|
className: "grid grid-cols-2 gap-3",
|
|
992
1040
|
children: [
|
|
993
1041
|
/* @__PURE__ */ jsxs("label", {
|
|
@@ -995,7 +1043,7 @@ function WatermarkDialog(t0) {
|
|
|
995
1043
|
htmlFor: fieldIds.text,
|
|
996
1044
|
children: [/* @__PURE__ */ jsx("span", {
|
|
997
1045
|
className: "text-muted-foreground text-[13px]",
|
|
998
|
-
children: "
|
|
1046
|
+
children: t("dialogs.watermark.text")
|
|
999
1047
|
}), /* @__PURE__ */ jsx("input", {
|
|
1000
1048
|
className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
1001
1049
|
id: fieldIds.text,
|
|
@@ -1008,7 +1056,7 @@ function WatermarkDialog(t0) {
|
|
|
1008
1056
|
htmlFor: fieldIds.font,
|
|
1009
1057
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1010
1058
|
className: "text-muted-foreground text-[13px]",
|
|
1011
|
-
children: "
|
|
1059
|
+
children: t("dialogs.watermark.font")
|
|
1012
1060
|
}), /* @__PURE__ */ jsx("input", {
|
|
1013
1061
|
className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
1014
1062
|
id: fieldIds.font,
|
|
@@ -1021,7 +1069,7 @@ function WatermarkDialog(t0) {
|
|
|
1021
1069
|
htmlFor: fieldIds.color,
|
|
1022
1070
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1023
1071
|
className: "text-muted-foreground text-[13px]",
|
|
1024
|
-
children: "
|
|
1072
|
+
children: t("dialogs.watermark.color")
|
|
1025
1073
|
}), /* @__PURE__ */ jsx("input", {
|
|
1026
1074
|
className: `border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none h-[34px]`,
|
|
1027
1075
|
id: fieldIds.color,
|
|
@@ -1035,7 +1083,7 @@ function WatermarkDialog(t0) {
|
|
|
1035
1083
|
htmlFor: fieldIds.opacity,
|
|
1036
1084
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1037
1085
|
className: "text-muted-foreground text-[13px]",
|
|
1038
|
-
children: "
|
|
1086
|
+
children: t("dialogs.watermark.opacity")
|
|
1039
1087
|
}), /* @__PURE__ */ jsx("input", {
|
|
1040
1088
|
className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
1041
1089
|
id: fieldIds.opacity,
|
|
@@ -1056,27 +1104,28 @@ function WatermarkDialog(t0) {
|
|
|
1056
1104
|
type: "checkbox"
|
|
1057
1105
|
}), /* @__PURE__ */ jsx("span", {
|
|
1058
1106
|
className: "text-muted-foreground text-[13px]",
|
|
1059
|
-
children: "
|
|
1107
|
+
children: t("dialogs.watermark.diagonal")
|
|
1060
1108
|
})]
|
|
1061
1109
|
})
|
|
1062
1110
|
]
|
|
1063
1111
|
});
|
|
1064
|
-
$[
|
|
1065
|
-
$[
|
|
1066
|
-
$[
|
|
1067
|
-
$[
|
|
1068
|
-
$[
|
|
1069
|
-
$[
|
|
1070
|
-
$[
|
|
1071
|
-
$[
|
|
1072
|
-
$[
|
|
1073
|
-
$[
|
|
1074
|
-
$[
|
|
1075
|
-
$[
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1112
|
+
$[69] = color;
|
|
1113
|
+
$[70] = diagonal;
|
|
1114
|
+
$[71] = fieldIds.color;
|
|
1115
|
+
$[72] = fieldIds.diagonal;
|
|
1116
|
+
$[73] = fieldIds.font;
|
|
1117
|
+
$[74] = fieldIds.opacity;
|
|
1118
|
+
$[75] = fieldIds.text;
|
|
1119
|
+
$[76] = font;
|
|
1120
|
+
$[77] = mode;
|
|
1121
|
+
$[78] = opacityPercent;
|
|
1122
|
+
$[79] = t;
|
|
1123
|
+
$[80] = text;
|
|
1124
|
+
$[81] = t33;
|
|
1125
|
+
} else t33 = $[81];
|
|
1126
|
+
let t34;
|
|
1127
|
+
if ($[82] !== fieldIds.imageRId || $[83] !== fieldIds.imageTarget || $[84] !== fieldIds.imageTargetExternal || $[85] !== fieldIds.scale || $[86] !== fieldIds.washout || $[87] !== imageRId || $[88] !== imageTarget || $[89] !== imageTargetExternal || $[90] !== mode || $[91] !== scalePercent || $[92] !== t || $[93] !== washout) {
|
|
1128
|
+
t34 = mode === "picture" && /* @__PURE__ */ jsxs("div", {
|
|
1080
1129
|
className: "grid grid-cols-2 gap-3",
|
|
1081
1130
|
children: [
|
|
1082
1131
|
/* @__PURE__ */ jsxs("label", {
|
|
@@ -1084,7 +1133,7 @@ function WatermarkDialog(t0) {
|
|
|
1084
1133
|
htmlFor: fieldIds.imageRId,
|
|
1085
1134
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1086
1135
|
className: "text-muted-foreground text-[13px]",
|
|
1087
|
-
children: "
|
|
1136
|
+
children: t("dialogs.watermark.imageRelationshipId")
|
|
1088
1137
|
}), /* @__PURE__ */ jsx("input", {
|
|
1089
1138
|
className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
1090
1139
|
id: fieldIds.imageRId,
|
|
@@ -1098,7 +1147,7 @@ function WatermarkDialog(t0) {
|
|
|
1098
1147
|
htmlFor: fieldIds.imageTarget,
|
|
1099
1148
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1100
1149
|
className: "text-muted-foreground text-[13px]",
|
|
1101
|
-
children: "
|
|
1150
|
+
children: t("dialogs.watermark.imageTarget")
|
|
1102
1151
|
}), /* @__PURE__ */ jsx("input", {
|
|
1103
1152
|
className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
1104
1153
|
id: fieldIds.imageTarget,
|
|
@@ -1112,7 +1161,7 @@ function WatermarkDialog(t0) {
|
|
|
1112
1161
|
htmlFor: fieldIds.scale,
|
|
1113
1162
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1114
1163
|
className: "text-muted-foreground text-[13px]",
|
|
1115
|
-
children: "
|
|
1164
|
+
children: t("dialogs.watermark.scale")
|
|
1116
1165
|
}), /* @__PURE__ */ jsx("input", {
|
|
1117
1166
|
className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
1118
1167
|
id: fieldIds.scale,
|
|
@@ -1133,7 +1182,7 @@ function WatermarkDialog(t0) {
|
|
|
1133
1182
|
type: "checkbox"
|
|
1134
1183
|
}), /* @__PURE__ */ jsx("span", {
|
|
1135
1184
|
className: "text-muted-foreground text-[13px]",
|
|
1136
|
-
children: "
|
|
1185
|
+
children: t("dialogs.watermark.washout")
|
|
1137
1186
|
})]
|
|
1138
1187
|
}),
|
|
1139
1188
|
/* @__PURE__ */ jsxs("label", {
|
|
@@ -1146,110 +1195,125 @@ function WatermarkDialog(t0) {
|
|
|
1146
1195
|
type: "checkbox"
|
|
1147
1196
|
}), /* @__PURE__ */ jsx("span", {
|
|
1148
1197
|
className: "text-muted-foreground text-[13px]",
|
|
1149
|
-
children: "
|
|
1198
|
+
children: t("dialogs.watermark.targetIsExternalUrl")
|
|
1150
1199
|
})]
|
|
1151
1200
|
})
|
|
1152
1201
|
]
|
|
1153
1202
|
});
|
|
1154
|
-
$[
|
|
1155
|
-
$[
|
|
1156
|
-
$[
|
|
1157
|
-
$[
|
|
1158
|
-
$[
|
|
1159
|
-
$[
|
|
1160
|
-
$[
|
|
1161
|
-
$[
|
|
1162
|
-
$[
|
|
1163
|
-
$[
|
|
1164
|
-
$[
|
|
1165
|
-
$[
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1203
|
+
$[82] = fieldIds.imageRId;
|
|
1204
|
+
$[83] = fieldIds.imageTarget;
|
|
1205
|
+
$[84] = fieldIds.imageTargetExternal;
|
|
1206
|
+
$[85] = fieldIds.scale;
|
|
1207
|
+
$[86] = fieldIds.washout;
|
|
1208
|
+
$[87] = imageRId;
|
|
1209
|
+
$[88] = imageTarget;
|
|
1210
|
+
$[89] = imageTargetExternal;
|
|
1211
|
+
$[90] = mode;
|
|
1212
|
+
$[91] = scalePercent;
|
|
1213
|
+
$[92] = t;
|
|
1214
|
+
$[93] = washout;
|
|
1215
|
+
$[94] = t34;
|
|
1216
|
+
} else t34 = $[94];
|
|
1217
|
+
let t35;
|
|
1218
|
+
if ($[95] !== t32 || $[96] !== t33 || $[97] !== t34) {
|
|
1219
|
+
t35 = /* @__PURE__ */ jsxs("div", {
|
|
1170
1220
|
className: DIALOG_BODY_CLASS,
|
|
1171
1221
|
children: [
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1222
|
+
t32,
|
|
1223
|
+
t33,
|
|
1224
|
+
t34
|
|
1175
1225
|
]
|
|
1176
1226
|
});
|
|
1177
|
-
$[
|
|
1178
|
-
$[
|
|
1179
|
-
$[
|
|
1180
|
-
$[
|
|
1181
|
-
} else
|
|
1182
|
-
let
|
|
1183
|
-
if ($[
|
|
1184
|
-
|
|
1227
|
+
$[95] = t32;
|
|
1228
|
+
$[96] = t33;
|
|
1229
|
+
$[97] = t34;
|
|
1230
|
+
$[98] = t35;
|
|
1231
|
+
} else t35 = $[98];
|
|
1232
|
+
let t36;
|
|
1233
|
+
if ($[99] !== t) {
|
|
1234
|
+
t36 = t("common.cancel");
|
|
1235
|
+
$[99] = t;
|
|
1236
|
+
$[100] = t36;
|
|
1237
|
+
} else t36 = $[100];
|
|
1238
|
+
let t37;
|
|
1239
|
+
if ($[101] !== DialogClose || $[102] !== t36) {
|
|
1240
|
+
t37 = /* @__PURE__ */ jsx(DialogClose, {
|
|
1185
1241
|
className: DIALOG_SECONDARY_BUTTON_CLASS,
|
|
1186
|
-
children:
|
|
1242
|
+
children: t36
|
|
1187
1243
|
});
|
|
1188
|
-
$[
|
|
1189
|
-
$[
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1244
|
+
$[101] = DialogClose;
|
|
1245
|
+
$[102] = t36;
|
|
1246
|
+
$[103] = t37;
|
|
1247
|
+
} else t37 = $[103];
|
|
1248
|
+
const t38 = !canApply;
|
|
1249
|
+
let t39;
|
|
1250
|
+
if ($[104] !== t) {
|
|
1251
|
+
t39 = t("common.apply");
|
|
1252
|
+
$[104] = t;
|
|
1253
|
+
$[105] = t39;
|
|
1254
|
+
} else t39 = $[105];
|
|
1255
|
+
let t40;
|
|
1256
|
+
if ($[106] !== handleApply || $[107] !== t38 || $[108] !== t39) {
|
|
1257
|
+
t40 = /* @__PURE__ */ jsx("button", {
|
|
1195
1258
|
className: DIALOG_PRIMARY_BUTTON_CLASS,
|
|
1196
|
-
disabled:
|
|
1259
|
+
disabled: t38,
|
|
1197
1260
|
onClick: handleApply,
|
|
1198
1261
|
type: "button",
|
|
1199
|
-
children:
|
|
1262
|
+
children: t39
|
|
1200
1263
|
});
|
|
1201
|
-
$[
|
|
1202
|
-
$[
|
|
1203
|
-
$[
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1264
|
+
$[106] = handleApply;
|
|
1265
|
+
$[107] = t38;
|
|
1266
|
+
$[108] = t39;
|
|
1267
|
+
$[109] = t40;
|
|
1268
|
+
} else t40 = $[109];
|
|
1269
|
+
let t41;
|
|
1270
|
+
if ($[110] !== t37 || $[111] !== t40) {
|
|
1271
|
+
t41 = /* @__PURE__ */ jsxs("div", {
|
|
1208
1272
|
className: DIALOG_FOOTER_CLASS,
|
|
1209
|
-
children: [
|
|
1273
|
+
children: [t37, t40]
|
|
1210
1274
|
});
|
|
1211
|
-
$[
|
|
1212
|
-
$[
|
|
1213
|
-
$[
|
|
1214
|
-
} else
|
|
1215
|
-
let
|
|
1216
|
-
if ($[
|
|
1217
|
-
|
|
1275
|
+
$[110] = t37;
|
|
1276
|
+
$[111] = t40;
|
|
1277
|
+
$[112] = t41;
|
|
1278
|
+
} else t41 = $[112];
|
|
1279
|
+
let t42;
|
|
1280
|
+
if ($[113] !== DialogPopup || $[114] !== t19 || $[115] !== t35 || $[116] !== t41) {
|
|
1281
|
+
t42 = /* @__PURE__ */ jsxs(DialogPopup, {
|
|
1218
1282
|
className: DIALOG_POPUP_CLASS,
|
|
1219
1283
|
children: [
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1284
|
+
t19,
|
|
1285
|
+
t35,
|
|
1286
|
+
t41
|
|
1223
1287
|
]
|
|
1224
1288
|
});
|
|
1225
|
-
$[
|
|
1226
|
-
$[
|
|
1227
|
-
$[
|
|
1228
|
-
$[
|
|
1229
|
-
$[
|
|
1230
|
-
} else
|
|
1231
|
-
let
|
|
1232
|
-
if ($[
|
|
1233
|
-
|
|
1234
|
-
$[
|
|
1235
|
-
$[
|
|
1236
|
-
$[
|
|
1237
|
-
$[
|
|
1238
|
-
} else
|
|
1239
|
-
let
|
|
1240
|
-
if ($[
|
|
1241
|
-
|
|
1289
|
+
$[113] = DialogPopup;
|
|
1290
|
+
$[114] = t19;
|
|
1291
|
+
$[115] = t35;
|
|
1292
|
+
$[116] = t41;
|
|
1293
|
+
$[117] = t42;
|
|
1294
|
+
} else t42 = $[117];
|
|
1295
|
+
let t43;
|
|
1296
|
+
if ($[118] !== DialogPortal || $[119] !== t17 || $[120] !== t42) {
|
|
1297
|
+
t43 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t17, t42] });
|
|
1298
|
+
$[118] = DialogPortal;
|
|
1299
|
+
$[119] = t17;
|
|
1300
|
+
$[120] = t42;
|
|
1301
|
+
$[121] = t43;
|
|
1302
|
+
} else t43 = $[121];
|
|
1303
|
+
let t44;
|
|
1304
|
+
if ($[122] !== Dialog || $[123] !== handleOpenChange || $[124] !== isOpen || $[125] !== t43) {
|
|
1305
|
+
t44 = /* @__PURE__ */ jsx(Dialog, {
|
|
1242
1306
|
open: isOpen,
|
|
1243
1307
|
onOpenChange: handleOpenChange,
|
|
1244
|
-
children:
|
|
1308
|
+
children: t43
|
|
1245
1309
|
});
|
|
1246
|
-
$[
|
|
1247
|
-
$[
|
|
1248
|
-
$[
|
|
1249
|
-
$[
|
|
1250
|
-
$[
|
|
1251
|
-
} else
|
|
1252
|
-
return
|
|
1310
|
+
$[122] = Dialog;
|
|
1311
|
+
$[123] = handleOpenChange;
|
|
1312
|
+
$[124] = isOpen;
|
|
1313
|
+
$[125] = t43;
|
|
1314
|
+
$[126] = t44;
|
|
1315
|
+
} else t44 = $[126];
|
|
1316
|
+
return t44;
|
|
1253
1317
|
}
|
|
1254
1318
|
function toWatermarkMode(value) {
|
|
1255
1319
|
if (value === "none" || value === "picture" || value === "text") return value;
|