@kontakto/email-template-editor 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/dist/index.cjs +771 -745
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +565 -539
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import DOMPurify from 'dompurify';
|
|
2
2
|
import { marked, Renderer } from 'marked';
|
|
3
|
-
import
|
|
3
|
+
import React62, { createContext, forwardRef, useRef, useEffect, useImperativeHandle, useMemo, useContext, useState, useCallback, useLayoutEffect, Fragment } from 'react';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { renderToStaticMarkup as renderToStaticMarkup$1 } from 'react-dom/server';
|
|
6
6
|
import Handlebars from 'handlebars';
|
|
@@ -10,7 +10,7 @@ import { MenuItem, Stack, ThemeProvider, CssBaseline, useTheme, Drawer, Box, Tab
|
|
|
10
10
|
import { i18n } from '@lingui/core';
|
|
11
11
|
import { create, useStore } from 'zustand';
|
|
12
12
|
import { temporal } from 'zundo';
|
|
13
|
-
import { AddOutlined, SearchOutlined, MonitorOutlined, PhoneIphoneOutlined, MoreVertOutlined, DriveFileRenameOutlineOutlined, ContentCopyOutlined, LibraryAddOutlined, FileUploadOutlined, FileDownloadOutlined, DeleteOutlined, InsertDriveFileOutlined, DescriptionOutlined, EditOutlined, PreviewOutlined, CodeOutlined, SubjectOutlined, DataObjectOutlined, UndoOutlined, RedoOutlined, LastPageOutlined, AppRegistrationOutlined, CloudUploadOutlined, SaveOutlined, SaveAsOutlined, ViewColumnSharp, ExpandMore, ChevronRight, KeyboardArrowUp, KeyboardArrowDown, FirstPageOutlined, MenuOutlined,
|
|
13
|
+
import { AddOutlined, SearchOutlined, MonitorOutlined, PhoneIphoneOutlined, MoreVertOutlined, DriveFileRenameOutlineOutlined, ContentCopyOutlined, LibraryAddOutlined, FileUploadOutlined, FileDownloadOutlined, DeleteOutlined, InsertDriveFileOutlined, DescriptionOutlined, EditOutlined, PreviewOutlined, CodeOutlined, SubjectOutlined, DataObjectOutlined, UndoOutlined, RedoOutlined, LastPageOutlined, AppRegistrationOutlined, CloudUploadOutlined, SaveOutlined, SaveAsOutlined, GridOnOutlined, SquareOutlined, ViewColumnSharp, ExpandMore, ChevronRight, KeyboardArrowUp, KeyboardArrowDown, FirstPageOutlined, MenuOutlined, CheckOutlined, InputOutlined, DeleteOutline, RoundedCornerOutlined, AspectRatioOutlined, HeightOutlined, CollectionsOutlined, ErrorOutlineOutlined, VerticalAlignTopOutlined, VerticalAlignCenterOutlined, VerticalAlignBottomOutlined, SpaceBarOutlined, BusinessOutlined, ViewColumnOutlined, HtmlOutlined, Crop32Outlined, HorizontalRuleOutlined, ContactMailOutlined, AccountCircleOutlined, ImageOutlined, SmartButtonOutlined, NotesOutlined, HMobiledataOutlined, DashboardOutlined, CloseOutlined, AlignVerticalTopOutlined, AlignVerticalBottomOutlined, AlignHorizontalLeftOutlined, AlignHorizontalRightOutlined, FormatAlignLeftOutlined, FormatAlignCenterOutlined, FormatAlignRightOutlined, FormatLineSpacingOutlined, TextFieldsOutlined, FormatBoldOutlined, FormatItalicOutlined, LinkOutlined, ArrowUpwardOutlined, ArrowDownwardOutlined } from '@mui/icons-material';
|
|
14
14
|
import { HexColorPicker, HexColorInput } from 'react-colorful';
|
|
15
15
|
import hljs from 'highlight.js';
|
|
16
16
|
import jsonHighlighter from 'highlight.js/lib/languages/json';
|
|
@@ -184,7 +184,7 @@ function renderInlineMarkdownString(str) {
|
|
|
184
184
|
function EmailMarkdown(_a) {
|
|
185
185
|
var _b = _a, { markdown } = _b, props = __objRest(_b, ["markdown"]);
|
|
186
186
|
const data = useMemo(() => renderMarkdownString(markdown), [markdown]);
|
|
187
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ React62.createElement("div", __spreadProps(__spreadValues({}, props), { dangerouslySetInnerHTML: { __html: data } }));
|
|
188
188
|
}
|
|
189
189
|
var FONT_FAMILY_SCHEMA = z.enum([
|
|
190
190
|
"MODERN_SANS",
|
|
@@ -264,9 +264,9 @@ function Text({ style, props }) {
|
|
|
264
264
|
};
|
|
265
265
|
const text = (_g = props == null ? void 0 : props.text) != null ? _g : TextPropsDefaults.text;
|
|
266
266
|
if (props == null ? void 0 : props.markdown) {
|
|
267
|
-
return /* @__PURE__ */
|
|
267
|
+
return /* @__PURE__ */ React62.createElement(EmailMarkdown, { style: wStyle, markdown: text });
|
|
268
268
|
}
|
|
269
|
-
return /* @__PURE__ */
|
|
269
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wStyle }, text);
|
|
270
270
|
}
|
|
271
271
|
var PADDING_SCHEMA2 = z.object({
|
|
272
272
|
top: z.number(),
|
|
@@ -315,7 +315,7 @@ function Avatar({ style, props }) {
|
|
|
315
315
|
textAlign: (_e = style == null ? void 0 : style.textAlign) != null ? _e : void 0,
|
|
316
316
|
padding: getPadding2(style == null ? void 0 : style.padding)
|
|
317
317
|
};
|
|
318
|
-
return /* @__PURE__ */
|
|
318
|
+
return /* @__PURE__ */ React62.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React62.createElement(
|
|
319
319
|
"img",
|
|
320
320
|
{
|
|
321
321
|
alt,
|
|
@@ -467,14 +467,14 @@ function Button({ style, props }) {
|
|
|
467
467
|
padding: `${padding[0]}px ${padding[1]}px`,
|
|
468
468
|
textDecoration: "none"
|
|
469
469
|
};
|
|
470
|
-
return /* @__PURE__ */
|
|
470
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React62.createElement("a", { href: url, style: linkStyle, target: "_blank" }, /* @__PURE__ */ React62.createElement(
|
|
471
471
|
"span",
|
|
472
472
|
{
|
|
473
473
|
dangerouslySetInnerHTML: {
|
|
474
474
|
__html: `<!--[if mso]><i style="letter-spacing: ${padding[1]}px;mso-font-width:-100%;mso-text-raise:${textRaise}" hidden> </i><![endif]-->`
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
), /* @__PURE__ */
|
|
477
|
+
), /* @__PURE__ */ React62.createElement("span", null, text), /* @__PURE__ */ React62.createElement(
|
|
478
478
|
"span",
|
|
479
479
|
{
|
|
480
480
|
dangerouslySetInnerHTML: {
|
|
@@ -523,7 +523,7 @@ function ColumnsContainer({ style, columns, props }) {
|
|
|
523
523
|
contentAlignment: (_d = props == null ? void 0 : props.contentAlignment) != null ? _d : ColumnsContainerPropsDefaults.contentAlignment,
|
|
524
524
|
fixedWidths: props == null ? void 0 : props.fixedWidths
|
|
525
525
|
};
|
|
526
|
-
return /* @__PURE__ */
|
|
526
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wStyle }, /* @__PURE__ */ React62.createElement(
|
|
527
527
|
"table",
|
|
528
528
|
{
|
|
529
529
|
align: "center",
|
|
@@ -532,7 +532,7 @@ function ColumnsContainer({ style, columns, props }) {
|
|
|
532
532
|
border: 0,
|
|
533
533
|
style: { tableLayout: "fixed", borderCollapse: "collapse" }
|
|
534
534
|
},
|
|
535
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ React62.createElement("tbody", { style: { width: "100%" } }, /* @__PURE__ */ React62.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React62.createElement(TableCell, { index: 0, props: blockProps, columns }), /* @__PURE__ */ React62.createElement(TableCell, { index: 1, props: blockProps, columns }), /* @__PURE__ */ React62.createElement(TableCell, { index: 2, props: blockProps, columns })))
|
|
536
536
|
));
|
|
537
537
|
}
|
|
538
538
|
function TableCell({ index, props, columns }) {
|
|
@@ -550,7 +550,7 @@ function TableCell({ index, props, columns }) {
|
|
|
550
550
|
width: (_d = (_c = props.fixedWidths) == null ? void 0 : _c[index]) != null ? _d : void 0
|
|
551
551
|
};
|
|
552
552
|
const children = (_e = columns && columns[index]) != null ? _e : null;
|
|
553
|
-
return /* @__PURE__ */
|
|
553
|
+
return /* @__PURE__ */ React62.createElement("td", { style }, children);
|
|
554
554
|
}
|
|
555
555
|
function getPaddingBefore(index, { columnsGap, columnsCount }) {
|
|
556
556
|
if (index === 0) {
|
|
@@ -612,9 +612,9 @@ function Container({ style, children }) {
|
|
|
612
612
|
padding: getPadding5(style == null ? void 0 : style.padding)
|
|
613
613
|
};
|
|
614
614
|
if (!children) {
|
|
615
|
-
return /* @__PURE__ */
|
|
615
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wStyle });
|
|
616
616
|
}
|
|
617
|
-
return /* @__PURE__ */
|
|
617
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wStyle }, children);
|
|
618
618
|
}
|
|
619
619
|
var container_default = Container;
|
|
620
620
|
var COLOR_SCHEMA5 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
|
|
@@ -648,7 +648,7 @@ function Divider({ style, props }) {
|
|
|
648
648
|
};
|
|
649
649
|
const borderTopWidth = (_b = props == null ? void 0 : props.lineHeight) != null ? _b : DividerPropsDefaults.lineHeight;
|
|
650
650
|
const borderTopColor = (_c = props == null ? void 0 : props.lineColor) != null ? _c : DividerPropsDefaults.lineColor;
|
|
651
|
-
return /* @__PURE__ */
|
|
651
|
+
return /* @__PURE__ */ React62.createElement("div", { style: st }, /* @__PURE__ */ React62.createElement(
|
|
652
652
|
"hr",
|
|
653
653
|
{
|
|
654
654
|
style: {
|
|
@@ -746,11 +746,11 @@ function Heading({ props, style }) {
|
|
|
746
746
|
const renderProps = isMarkdown ? { style: hStyle, dangerouslySetInnerHTML: { __html: html2 != null ? html2 : "" } } : { style: hStyle, children: text };
|
|
747
747
|
switch (level) {
|
|
748
748
|
case "h1":
|
|
749
|
-
return /* @__PURE__ */
|
|
749
|
+
return /* @__PURE__ */ React62.createElement("h1", __spreadValues({}, renderProps));
|
|
750
750
|
case "h2":
|
|
751
|
-
return /* @__PURE__ */
|
|
751
|
+
return /* @__PURE__ */ React62.createElement("h2", __spreadValues({}, renderProps));
|
|
752
752
|
case "h3":
|
|
753
|
-
return /* @__PURE__ */
|
|
753
|
+
return /* @__PURE__ */ React62.createElement("h3", __spreadValues({}, renderProps));
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
function getFontSize(level) {
|
|
@@ -832,9 +832,9 @@ function Html({ style, props }) {
|
|
|
832
832
|
padding: getPadding8(style == null ? void 0 : style.padding)
|
|
833
833
|
};
|
|
834
834
|
if (!children) {
|
|
835
|
-
return /* @__PURE__ */
|
|
835
|
+
return /* @__PURE__ */ React62.createElement("div", { style: cssStyle });
|
|
836
836
|
}
|
|
837
|
-
return /* @__PURE__ */
|
|
837
|
+
return /* @__PURE__ */ React62.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: children } });
|
|
838
838
|
}
|
|
839
839
|
var html_default = Html;
|
|
840
840
|
var PADDING_SCHEMA9 = z.object({
|
|
@@ -870,7 +870,7 @@ function Image({ style, props }) {
|
|
|
870
870
|
const linkHref = (_c = props == null ? void 0 : props.linkHref) != null ? _c : null;
|
|
871
871
|
const width = (_d = props == null ? void 0 : props.width) != null ? _d : void 0;
|
|
872
872
|
const height = (_e = props == null ? void 0 : props.height) != null ? _e : void 0;
|
|
873
|
-
const imageElement = /* @__PURE__ */
|
|
873
|
+
const imageElement = /* @__PURE__ */ React62.createElement(
|
|
874
874
|
"img",
|
|
875
875
|
{
|
|
876
876
|
alt: (_f = props == null ? void 0 : props.alt) != null ? _f : "",
|
|
@@ -890,9 +890,9 @@ function Image({ style, props }) {
|
|
|
890
890
|
}
|
|
891
891
|
);
|
|
892
892
|
if (!linkHref) {
|
|
893
|
-
return /* @__PURE__ */
|
|
893
|
+
return /* @__PURE__ */ React62.createElement("div", { style: sectionStyle }, imageElement);
|
|
894
894
|
}
|
|
895
|
-
return /* @__PURE__ */
|
|
895
|
+
return /* @__PURE__ */ React62.createElement("div", { style: sectionStyle }, /* @__PURE__ */ React62.createElement("a", { href: linkHref, style: { textDecoration: "none" }, target: "_blank" }, imageElement));
|
|
896
896
|
}
|
|
897
897
|
var image_default = Image;
|
|
898
898
|
var FONT_FAMILY_SCHEMA5 = z.enum([
|
|
@@ -1038,7 +1038,7 @@ function Signature({ style, props }) {
|
|
|
1038
1038
|
color: linkColor,
|
|
1039
1039
|
textDecoration: "none"
|
|
1040
1040
|
};
|
|
1041
|
-
const imageElement = imageUrl ? /* @__PURE__ */
|
|
1041
|
+
const imageElement = imageUrl ? /* @__PURE__ */ React62.createElement(
|
|
1042
1042
|
"img",
|
|
1043
1043
|
{
|
|
1044
1044
|
src: imageUrl,
|
|
@@ -1057,18 +1057,18 @@ function Signature({ style, props }) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
) : null;
|
|
1059
1059
|
const contactParts = [];
|
|
1060
|
-
if (email) contactParts.push(/* @__PURE__ */
|
|
1061
|
-
if (phone) contactParts.push(/* @__PURE__ */
|
|
1060
|
+
if (email) contactParts.push(/* @__PURE__ */ React62.createElement("a", { key: "email", href: `mailto:${email}`, style: linkStyle }, email));
|
|
1061
|
+
if (phone) contactParts.push(/* @__PURE__ */ React62.createElement("a", { key: "phone", href: `tel:${phone}`, style: linkStyle }, phone));
|
|
1062
1062
|
if (website) {
|
|
1063
1063
|
const href = website.startsWith("http") ? website : `https://${website}`;
|
|
1064
|
-
contactParts.push(/* @__PURE__ */
|
|
1064
|
+
contactParts.push(/* @__PURE__ */ React62.createElement("a", { key: "website", href, style: linkStyle, target: "_blank" }, website));
|
|
1065
1065
|
}
|
|
1066
|
-
const textContent = /* @__PURE__ */
|
|
1067
|
-
const greetingElement = greeting ? /* @__PURE__ */
|
|
1066
|
+
const textContent = /* @__PURE__ */ React62.createElement("div", null, name && /* @__PURE__ */ React62.createElement("p", { style: nameStyle }, name), title && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, title), company && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, company), address && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, address), contactParts.length > 0 && /* @__PURE__ */ React62.createElement("p", { style: __spreadProps(__spreadValues({}, detailStyle), { marginTop: 4 }) }, contactParts.map((part, i) => /* @__PURE__ */ React62.createElement(React62.Fragment, { key: i }, i > 0 && /* @__PURE__ */ React62.createElement("span", { style: detailStyle }, " \xB7 "), part))));
|
|
1067
|
+
const greetingElement = greeting ? /* @__PURE__ */ React62.createElement("p", { style: greetingStyle }, greeting) : null;
|
|
1068
1068
|
if (layout === "vertical") {
|
|
1069
|
-
return /* @__PURE__ */
|
|
1069
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, greetingElement, imageElement && /* @__PURE__ */ React62.createElement("div", { style: { marginBottom: 12 } }, imageElement), textContent);
|
|
1070
1070
|
}
|
|
1071
|
-
return /* @__PURE__ */
|
|
1071
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, greetingElement, /* @__PURE__ */ React62.createElement("table", { cellPadding: "0", cellSpacing: "0", border: 0, role: "presentation" }, /* @__PURE__ */ React62.createElement("tbody", null, /* @__PURE__ */ React62.createElement("tr", null, imageElement && /* @__PURE__ */ React62.createElement("td", { style: { verticalAlign: "middle", paddingRight: 16 } }, imageElement), /* @__PURE__ */ React62.createElement("td", { style: { verticalAlign: "middle" } }, textContent)))));
|
|
1072
1072
|
}
|
|
1073
1073
|
var signature_default = Signature;
|
|
1074
1074
|
var SpacerPropsSchema = z.object({
|
|
@@ -1085,13 +1085,13 @@ function Spacer({ props }) {
|
|
|
1085
1085
|
const style = {
|
|
1086
1086
|
height: (_a = props == null ? void 0 : props.height) != null ? _a : SpacerPropsDefaults.height
|
|
1087
1087
|
};
|
|
1088
|
-
return /* @__PURE__ */
|
|
1088
|
+
return /* @__PURE__ */ React62.createElement("div", { style });
|
|
1089
1089
|
}
|
|
1090
1090
|
var spacer_default = Spacer;
|
|
1091
1091
|
function buildBlockComponent(blocks) {
|
|
1092
1092
|
return function BlockComponent({ type, data }) {
|
|
1093
1093
|
const Component = blocks[type].Component;
|
|
1094
|
-
return /* @__PURE__ */
|
|
1094
|
+
return /* @__PURE__ */ React62.createElement(Component, __spreadValues({}, data));
|
|
1095
1095
|
};
|
|
1096
1096
|
}
|
|
1097
1097
|
function buildBlockConfigurationSchema(blocks) {
|
|
@@ -1160,9 +1160,9 @@ function ColumnsContainerReader({ style, props }) {
|
|
|
1160
1160
|
const _a = props != null ? props : {}, { columns } = _a, restProps = __objRest(_a, ["columns"]);
|
|
1161
1161
|
let cols = void 0;
|
|
1162
1162
|
if (columns) {
|
|
1163
|
-
cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */
|
|
1163
|
+
cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ React62.createElement(ReaderBlock, { key: childId, id: childId })));
|
|
1164
1164
|
}
|
|
1165
|
-
return /* @__PURE__ */
|
|
1165
|
+
return /* @__PURE__ */ React62.createElement(columns_container_default, { props: restProps, columns: cols, style });
|
|
1166
1166
|
}
|
|
1167
1167
|
var ContainerPropsSchema2 = z.object({
|
|
1168
1168
|
style: ContainerPropsSchema.shape.style,
|
|
@@ -1173,7 +1173,7 @@ var ContainerPropsSchema2 = z.object({
|
|
|
1173
1173
|
function ContainerReader({ style, props }) {
|
|
1174
1174
|
var _a;
|
|
1175
1175
|
const childrenIds = (_a = props == null ? void 0 : props.childrenIds) != null ? _a : [];
|
|
1176
|
-
return /* @__PURE__ */
|
|
1176
|
+
return /* @__PURE__ */ React62.createElement(container_default, { style }, childrenIds.map((childId) => /* @__PURE__ */ React62.createElement(ReaderBlock, { key: childId, id: childId })));
|
|
1177
1177
|
}
|
|
1178
1178
|
var COLOR_SCHEMA9 = z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
|
|
1179
1179
|
var FONT_FAMILY_SCHEMA6 = z.enum([
|
|
@@ -1246,9 +1246,9 @@ function EmailLayoutReader(props) {
|
|
|
1246
1246
|
margin: "0"
|
|
1247
1247
|
};
|
|
1248
1248
|
if (props.backdropDisabled) {
|
|
1249
|
-
return /* @__PURE__ */
|
|
1249
|
+
return /* @__PURE__ */ React62.createElement("div", { style: baseStyle }, childrenIds.map((childId) => /* @__PURE__ */ React62.createElement(ReaderBlock, { key: childId, id: childId })));
|
|
1250
1250
|
}
|
|
1251
|
-
return /* @__PURE__ */
|
|
1251
|
+
return /* @__PURE__ */ React62.createElement(
|
|
1252
1252
|
"div",
|
|
1253
1253
|
{
|
|
1254
1254
|
style: __spreadProps(__spreadValues({}, baseStyle), {
|
|
@@ -1258,7 +1258,7 @@ function EmailLayoutReader(props) {
|
|
|
1258
1258
|
width: "100%"
|
|
1259
1259
|
})
|
|
1260
1260
|
},
|
|
1261
|
-
/* @__PURE__ */
|
|
1261
|
+
/* @__PURE__ */ React62.createElement(
|
|
1262
1262
|
"table",
|
|
1263
1263
|
{
|
|
1264
1264
|
align: "center",
|
|
@@ -1276,7 +1276,7 @@ function EmailLayoutReader(props) {
|
|
|
1276
1276
|
cellPadding: "0",
|
|
1277
1277
|
border: 0
|
|
1278
1278
|
},
|
|
1279
|
-
/* @__PURE__ */
|
|
1279
|
+
/* @__PURE__ */ React62.createElement("tbody", null, /* @__PURE__ */ React62.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React62.createElement("td", null, childrenIds.map((childId) => /* @__PURE__ */ React62.createElement(ReaderBlock, { key: childId, id: childId })))))
|
|
1280
1280
|
)
|
|
1281
1281
|
);
|
|
1282
1282
|
}
|
|
@@ -1288,7 +1288,7 @@ function useReaderDocument() {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
function ReaderBlock({ id }) {
|
|
1290
1290
|
const document2 = useReaderDocument();
|
|
1291
|
-
return document2[id] ? /* @__PURE__ */
|
|
1291
|
+
return document2[id] ? /* @__PURE__ */ React62.createElement(BaseReaderBlock, __spreadValues({}, document2[id])) : null;
|
|
1292
1292
|
}
|
|
1293
1293
|
var READER_DICTIONARY = buildBlockConfigurationDictionary({
|
|
1294
1294
|
ColumnsContainer: {
|
|
@@ -1345,13 +1345,13 @@ var ReaderBlockSchema = buildBlockConfigurationSchema(READER_DICTIONARY);
|
|
|
1345
1345
|
var ReaderDocumentSchema = z.record(z.string(), ReaderBlockSchema);
|
|
1346
1346
|
var BaseReaderBlock = buildBlockComponent(READER_DICTIONARY);
|
|
1347
1347
|
function Reader({ document: document2, rootBlockId }) {
|
|
1348
|
-
return /* @__PURE__ */
|
|
1348
|
+
return /* @__PURE__ */ React62.createElement(ReaderContext.Provider, { value: document2 }, /* @__PURE__ */ React62.createElement(ReaderBlock, { id: rootBlockId }));
|
|
1349
1349
|
}
|
|
1350
1350
|
|
|
1351
1351
|
// src/email-builder/renderers/render-to-static-markup.tsx
|
|
1352
1352
|
function renderToStaticMarkup(document2, { rootBlockId, variables }) {
|
|
1353
1353
|
const html2 = "<!DOCTYPE html>" + renderToStaticMarkup$1(
|
|
1354
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ React62.createElement("html", null, /* @__PURE__ */ React62.createElement("body", null, /* @__PURE__ */ React62.createElement(Reader, { document: document2, rootBlockId })))
|
|
1355
1355
|
);
|
|
1356
1356
|
if (!variables) return html2;
|
|
1357
1357
|
return evaluateHandlebars(html2, variables);
|
|
@@ -2005,13 +2005,13 @@ var THEME = createTheme(BASE_THEME, {
|
|
|
2005
2005
|
var theme_default = THEME;
|
|
2006
2006
|
|
|
2007
2007
|
// src/locales/en/messages.ts
|
|
2008
|
-
var messages = JSON.parse('{"avatar.shape":["Shape"],"button.color":["Button color"],"button.style.pill":["Pill"],"button.style.rectangle":["Rectangle"],"button.style.rounded":["Rounded"],"button.width.auto":["Auto"],"button.width.full":["Full"],"canvas.desktop-view":["Desktop view"],"canvas.mobile-view":["Mobile view"],"columns.count":["Number of columns"],"columns.gap":["Columns gap"],"common.add":["Add"],"common.cancel":["Cancel"],"common.save":["Save"],"common.saving":["Saving\u2026"],"divider.color":["Color"],"drawer.library":["Library"],"drawer.new-sample":["New sample"],"drawer.new-template":["New template"],"drawer.no-samples":["No samples available"],"drawer.no-samples-match":["No samples match your filters"],"drawer.no-templates":["No saved templates yet"],"drawer.no-templates-match":["No templates match your filters"],"drawer.search-samples":["Search samples"],"drawer.search-templates":["Search templates"],"drawer.sort-by":["Sort by"],"drawer.tab.outline":["Outline"],"drawer.tab.samples":["Samples"],"drawer.tab.templates":["Templates"],"drawer.tag.all":["All"],"empty.description":["A blank email template to start from scratch"],"empty.slug":["Empty email"],"field.content":["Content"],"field.height":["Height"],"field.level":["Level"],"field.markdown":["Markdown"],"field.size":["Size"],"field.style":["Style"],"field.text":["Text"],"field.url":["Url"],"field.width":["Width"],"global.backdrop-color":["Backdrop color"],"global.canvas-border-color":["Canvas border color"],"global.canvas-border-radius":["Canvas border radius"],"global.canvas-color":["Canvas color"],"global.disable-backdrop":["Disable backdrop"],"image.alt-text":["Alt text"],"image.http-warning":["Non-HTTPS URL: Gmail and other clients strip mixed content. Use https:// for reliable delivery."],"image.library":["Library"],"image.link-href":["Click through URL"],"image.source-url":["Source URL"],"image.upload":["Upload"],"image.uploading":["Uploading\u2026"],"inspector.tab.inspect":["Inspect"],"inspector.tab.settings":["Settings"],"inspector.tab.styles":["Styles"],"inspector.tab.variables":["Variables"],"panel.avatar-block":["Avatar block"],"panel.button-block":["Button block"],"panel.columns-block":["Columns block"],"panel.container-block":["Container block"],"panel.divider-block":["Divider block"],"panel.editor-appearance":["Editor appearance"],"panel.export":["Export"],"panel.global":["Global"],"panel.heading-block":["Heading block"],"panel.html-block":["HTML block"],"panel.image-block":["Image block"],"panel.signature-block":["Signature block"],"panel.spacer-block":["Spacer block"],"panel.template":["Template"],"panel.text-block":["Text block"],"picker.blank-desc":["Start from an empty email"],"picker.blank-title":["Blank"],"picker.create-sample":["Create sample"],"picker.create-template":["Create template"],"picker.creating":["Creating\u2026"],"picker.error-name-required":["Name is required"],"picker.error-sample-taken":["A sample with this name already exists"],"picker.error-template-taken":["A template with this name already exists"],"picker.start-from":["Start from"],"picker.title-sample":["New sample"],"picker.title-template":["New template"],"rename.error-empty":["Please enter a name"],"rename.error-generic":["Failed to update template details"],"rename.error-taken":["A template with this name already exists"],"rename.name-label":["Name"],"rename.no-tags":["No tags yet."],"rename.tag-placeholder":["Add a tag and press Enter"],"rename.tags":["Tags"],"rename.title":["Edit details"],"row.actions":["Row actions"],"row.demote":["Demote to template"],"row.duplicate":["Duplicate"],"row.duplicate-as-template":["Duplicate as template"],"row.edit-details":["Edit name & tags\u2026"],"row.more":["More"],"row.promote":["Promote to sample"],"save-dialog.create":["Create"],"save-dialog.error-empty-name":["Please enter a template name"],"save-dialog.name-label":["Template Name"],"save-dialog.save":["Save"],"save-dialog.saving":["Saving..."],"save-dialog.title":["Save as a new template"],"save-dialog.title-new":["Create a new template"],"savebar.error-saving":["Error saving"],"savebar.new":["New"],"savebar.new-template-created":["New template created"],"savebar.sample-prefix":["Sample"],"savebar.sample-saved":["Sample saved"],"savebar.save":["Save"],"savebar.save-as":["Save as\u2026"],"savebar.save-as-new":["Save as new\u2026"],"savebar.save-as-new-template":["Save as a new template"],"savebar.save-changes":["Save changes"],"savebar.save-changes-to-sample":["Save changes to this sample"],"savebar.start-fresh":["Start a fresh template"],"savebar.template-saved":["Template saved"],"signature.address":["Address"],"signature.company":["Company"],"signature.email":["Email"],"signature.greeting":["Greeting"],"signature.image-shape":["Image shape"],"signature.image-size":["Image size"],"signature.image-url":["Image URL"],"signature.layout":["Layout"],"signature.layout.horizontal":["Horizontal"],"signature.layout.vertical":["Vertical"],"signature.link-color":["Link color"],"signature.name":["Name"],"signature.name-color":["Name color"],"signature.phone":["Phone"],"signature.shape.circle":["Circle"],"signature.shape.rounded":["Rounded"],"signature.shape.square":["Square"],"signature.title":["Title"],"signature.website":["Website"],"size.lg":["Lg"],"size.md":["Md"],"size.sm":["Sm"],"size.xs":["Xs"],"sort.last-updated":["Last updated"],"sort.name":["Name (A\u2013Z)"],"sort.recently-created":["Recently created"],"style.alignment":["Alignment"],"style.background-color":["Background color"],"style.border-color":["Border color"],"style.border-radius":["Border radius"],"style.font-family":["Font family"],"style.font-size":["Font size"],"style.font-weight":["Font weight"],"style.letter-spacing":["Letter spacing"],"style.line-height":["Line height"],"style.padding":["Padding"],"style.text-color":["Text color"],"tab.edit":["Edit"],"tab.html-output":["HTML output"],"tab.json-output":["JSON output"],"tab.preview":["Preview"],"tab.text-output":["Plain text output"],"time.days-short":["d ago"],"time.hours-short":["h ago"],"time.just-now":["just now"],"time.minutes-short":["m ago"],"time.months-short":["mo ago"],"time.years-short":["y ago"],"toolbar.bold":["Bold"],"toolbar.bold-shortcut":["Bold (Cmd+B)"],"toolbar.italic":["Italic"],"toolbar.italic-shortcut":["Italic (Cmd+I)"],"toolbar.link":["Link"],"toolbar.link-shortcut":["Link (Cmd+K)"],"tune.copy":["Copy block"],"tune.delete":["Delete"],"tune.move-down":["Move down"],"tune.move-up":["Move up"]}');
|
|
2008
|
+
var messages = JSON.parse('{"avatar.shape":["Shape"],"block-add.avatar":["Avatar"],"block-add.button":["Button"],"block-add.columns":["Columns"],"block-add.company-signature":["Company Signature"],"block-add.container":["Container"],"block-add.divider":["Divider"],"block-add.heading":["Heading"],"block-add.html":["Html"],"block-add.image":["Image"],"block-add.personal-signature":["Personal Signature"],"block-add.spacer":["Spacer"],"block-add.text":["Text"],"button.color":["Button color"],"button.style.pill":["Pill"],"button.style.rectangle":["Rectangle"],"button.style.rounded":["Rounded"],"button.width.auto":["Auto"],"button.width.full":["Full"],"canvas.desktop-view":["Desktop view"],"canvas.mobile-view":["Mobile view"],"columns.count":["Number of columns"],"columns.gap":["Columns gap"],"common.add":["Add"],"common.cancel":["Cancel"],"common.save":["Save"],"common.saving":["Saving\u2026"],"divider.color":["Color"],"drawer.library":["Library"],"drawer.new-sample":["New sample"],"drawer.new-template":["New template"],"drawer.no-samples":["No samples available"],"drawer.no-samples-match":["No samples match your filters"],"drawer.no-templates":["No saved templates yet"],"drawer.no-templates-match":["No templates match your filters"],"drawer.search-samples":["Search samples"],"drawer.search-templates":["Search templates"],"drawer.sort-by":["Sort by"],"drawer.tab.outline":["Outline"],"drawer.tab.samples":["Samples"],"drawer.tab.templates":["Templates"],"drawer.tag.all":["All"],"empty.description":["A blank email template to start from scratch"],"empty.slug":["Empty email"],"field.content":["Content"],"field.height":["Height"],"field.level":["Level"],"field.markdown":["Markdown"],"field.size":["Size"],"field.style":["Style"],"field.text":["Text"],"field.url":["Url"],"field.width":["Width"],"global.backdrop-color":["Backdrop color"],"global.canvas-border-color":["Canvas border color"],"global.canvas-border-radius":["Canvas border radius"],"global.canvas-color":["Canvas color"],"global.disable-backdrop":["Disable backdrop"],"image.alt-text":["Alt text"],"image.http-warning":["Non-HTTPS URL: Gmail and other clients strip mixed content. Use https:// for reliable delivery."],"image.library":["Library"],"image.link-href":["Click through URL"],"image.source-url":["Source URL"],"image.upload":["Upload"],"image.uploading":["Uploading\u2026"],"inspect.hint":["Click on a block to inspect."],"inspect.not-found":["Block not found. Click on a block to reset."],"inspector.tab.inspect":["Inspect"],"inspector.tab.settings":["Settings"],"inspector.tab.styles":["Styles"],"inspector.tab.variables":["Variables"],"outline.canvas":["Canvas"],"outline.hint":["Click a row to select. Drag a row to reorder or move it into a container."],"outline.title":["Outline"],"panel.avatar-block":["Avatar block"],"panel.button-block":["Button block"],"panel.columns-block":["Columns block"],"panel.container-block":["Container block"],"panel.details":["Details"],"panel.divider-block":["Divider block"],"panel.editor-appearance":["Editor appearance"],"panel.export":["Export"],"panel.global":["Global"],"panel.heading-block":["Heading block"],"panel.html-block":["HTML block"],"panel.image-block":["Image block"],"panel.signature-block":["Signature block"],"panel.spacer-block":["Spacer block"],"panel.template":["Template"],"panel.text-block":["Text block"],"picker.blank-desc":["Start from an empty email"],"picker.blank-title":["Blank"],"picker.create-sample":["Create sample"],"picker.create-template":["Create template"],"picker.creating":["Creating\u2026"],"picker.error-name-required":["Name is required"],"picker.error-sample-taken":["A sample with this name already exists"],"picker.error-template-taken":["A template with this name already exists"],"picker.start-from":["Start from"],"picker.title-sample":["New sample"],"picker.title-template":["New template"],"redo.label":["Redo"],"redo.tooltip":["Redo"],"rename.add-tag":["Add a tag"],"rename.error-empty":["Please enter a name"],"rename.error-generic":["Failed to update template details"],"rename.error-taken":["A template with this name already exists"],"rename.name-label":["Name"],"rename.no-tags":["No tags yet."],"rename.tag-placeholder":["Add a tag and press Enter"],"rename.tags":["Tags"],"rename.title":["Edit details"],"row.actions":["Row actions"],"row.demote":["Demote to template"],"row.duplicate":["Duplicate"],"row.duplicate-as-template":["Duplicate as template"],"row.edit-details":["Edit name & tags\u2026"],"row.more":["More"],"row.promote":["Promote to sample"],"save-dialog.create":["Create"],"save-dialog.error-empty-name":["Please enter a template name"],"save-dialog.name-label":["Template Name"],"save-dialog.save":["Save"],"save-dialog.saving":["Saving..."],"save-dialog.title":["Save as a new template"],"save-dialog.title-new":["Create a new template"],"savebar.error-saving":["Error saving"],"savebar.new":["New"],"savebar.new-template-created":["New template created"],"savebar.sample-prefix":["Sample"],"savebar.sample-saved":["Sample saved"],"savebar.save":["Save"],"savebar.save-as":["Save as\u2026"],"savebar.save-as-new":["Save as new\u2026"],"savebar.save-as-new-template":["Save as a new template"],"savebar.save-changes":["Save changes"],"savebar.save-changes-to-sample":["Save changes to this sample"],"savebar.start-fresh":["Start a fresh template"],"savebar.template-saved":["Template saved"],"settings.checkerboard":["Checkerboard"],"settings.copied":["Template copied successfully!"],"settings.delete":["Delete Template"],"settings.delete-confirm":["Are you sure you want to delete this template?"],"settings.editor-only-hint":["Editor-only \u2014 never reaches the rendered email."],"settings.no-rename-cb":["Wire a renameTemplate callback to enable editing from here"],"settings.no-template":["No template selected"],"settings.save-as-sample":["Save as Sample Template"],"settings.save-details":["Save details"],"settings.save-disabled":["Save functionality is disabled. To enable saving, provide the necessary callback functions."],"settings.saved":["Saved"],"settings.solid":["Solid"],"settings.workspace-background":["Workspace background"],"signature.address":["Address"],"signature.company":["Company"],"signature.email":["Email"],"signature.greeting":["Greeting"],"signature.image-shape":["Image shape"],"signature.image-size":["Image size"],"signature.image-url":["Image URL"],"signature.layout":["Layout"],"signature.layout.horizontal":["Horizontal"],"signature.layout.vertical":["Vertical"],"signature.link-color":["Link color"],"signature.name":["Name"],"signature.name-color":["Name color"],"signature.phone":["Phone"],"signature.shape.circle":["Circle"],"signature.shape.rounded":["Rounded"],"signature.shape.square":["Square"],"signature.title":["Title"],"signature.website":["Website"],"size.lg":["Lg"],"size.md":["Md"],"size.sm":["Sm"],"size.xs":["Xs"],"sort.last-updated":["Last updated"],"sort.name":["Name (A\u2013Z)"],"sort.recently-created":["Recently created"],"style.alignment":["Alignment"],"style.background-color":["Background color"],"style.border-color":["Border color"],"style.border-radius":["Border radius"],"style.font-family":["Font family"],"style.font-size":["Font size"],"style.font-weight":["Font weight"],"style.letter-spacing":["Letter spacing"],"style.line-height":["Line height"],"style.padding":["Padding"],"style.text-color":["Text color"],"tab.edit":["Edit"],"tab.html-output":["HTML output"],"tab.json-output":["JSON output"],"tab.preview":["Preview"],"tab.text-output":["Plain text output"],"tag.marketing":["marketing"],"tag.transactional":["transactional"],"time.days-short":["d ago"],"time.hours-short":["h ago"],"time.just-now":["just now"],"time.minutes-short":["m ago"],"time.months-short":["mo ago"],"time.years-short":["y ago"],"toolbar.bold":["Bold"],"toolbar.bold-shortcut":["Bold (Cmd+B)"],"toolbar.italic":["Italic"],"toolbar.italic-shortcut":["Italic (Cmd+I)"],"toolbar.link":["Link"],"toolbar.link-shortcut":["Link (Cmd+K)"],"tune.copy":["Copy block"],"tune.delete":["Delete"],"tune.move-down":["Move down"],"tune.move-up":["Move up"],"undo.label":["Undo"],"undo.tooltip":["Undo"],"variables.add":["Add variable"],"variables.click-to-declare":["Click a token to declare it."],"variables.confirm-delete":["Variable is still referenced in the body. Delete anyway?"],"variables.copy-token":["Copy {",["name"],"} token"],"variables.description":["Description"],"variables.focus-first":["Focus a text field first"],"variables.insert-at-cursor":["Insert at cursor"],"variables.intro":["Declared variables travel with the template. Reference them in subject and body as {",["name"],"}. In Preview mode, tokens render with the sample values below."],"variables.none":["No variables declared. Click + to add one."],"variables.open-template":["Open a template to manage variables."],"variables.optional":["Optional"],"variables.ref-many":["refs"],"variables.ref-one":["ref"],"variables.remove":["Remove"],"variables.sample-hint":["Shown in Preview mode"],"variables.sample-value":["Sample value"],"variables.title":["Variables"],"variables.undeclared":["Undeclared in body"],"variables.unused":["Unused in body"]}');
|
|
2009
2009
|
|
|
2010
2010
|
// src/locales/fi/messages.ts
|
|
2011
|
-
var messages2 = JSON.parse('{"avatar.shape":["Muoto"],"button.color":["Painikkeen v\xE4ri"],"button.style.pill":["Pilleri"],"button.style.rectangle":["Suorakaide"],"button.style.rounded":["Py\xF6ristetty"],"button.width.auto":["Automaattinen"],"button.width.full":["T\xE4ysi"],"canvas.desktop-view":["Ty\xF6p\xF6yt\xE4n\xE4kym\xE4"],"canvas.mobile-view":["Mobiilin\xE4kym\xE4"],"columns.count":["Sarakkeiden m\xE4\xE4r\xE4"],"columns.gap":["Sarakev\xE4li"],"common.add":["Lis\xE4\xE4"],"common.cancel":["Peruuta"],"common.save":["Tallenna"],"common.saving":["Tallennetaan\u2026"],"divider.color":["V\xE4ri"],"drawer.library":["Kirjasto"],"drawer.new-sample":["Uusi malli"],"drawer.new-template":["Uusi pohja"],"drawer.no-samples":["Ei malleja saatavilla"],"drawer.no-samples-match":["Mik\xE4\xE4n malli ei vastaa hakua"],"drawer.no-templates":["Ei tallennettuja pohjia"],"drawer.no-templates-match":["Mik\xE4\xE4n pohja ei vastaa hakua"],"drawer.search-samples":["Etsi malleja"],"drawer.search-templates":["Etsi pohjia"],"drawer.sort-by":["J\xE4rjestys"],"drawer.tab.outline":["Rakenne"],"drawer.tab.samples":["Mallit"],"drawer.tab.templates":["Pohjat"],"drawer.tag.all":["Kaikki"],"empty.description":["Tyhj\xE4 s\xE4hk\xF6postipohja, aloita tyhj\xE4lt\xE4 p\xF6yd\xE4lt\xE4"],"empty.slug":["Tyhj\xE4 s\xE4hk\xF6posti"],"field.content":["Sis\xE4lt\xF6"],"field.height":["Korkeus"],"field.level":["Taso"],"field.markdown":["Markdown"],"field.size":["Koko"],"field.style":["Tyyli"],"field.text":["Teksti"],"field.url":["Osoite"],"field.width":["Leveys"],"global.backdrop-color":["Taustav\xE4ri"],"global.canvas-border-color":["Kankaan reunan v\xE4ri"],"global.canvas-border-radius":["Kankaan reunan py\xF6ristys"],"global.canvas-color":["Kankaan v\xE4ri"],"global.disable-backdrop":["Piilota taustav\xE4ri"],"image.alt-text":["Vaihtoehtoinen teksti"],"image.http-warning":["Ei-HTTPS-osoite: Gmail ja muut asiakasohjelmat poistavat sekoitetun sis\xE4ll\xF6n. K\xE4yt\xE4 https:// varmaa toimitusta varten."],"image.library":["Kirjasto"],"image.link-href":["Linkin osoite"],"image.source-url":["L\xE4hdeosoite"],"image.upload":["Lataa"],"image.uploading":["Ladataan\u2026"],"inspector.tab.inspect":["Tarkastele"],"inspector.tab.settings":["Asetukset"],"inspector.tab.styles":["Tyylit"],"inspector.tab.variables":["Muuttujat"],"panel.avatar-block":["Avatarlohko"],"panel.button-block":["Painikelohko"],"panel.columns-block":["Sarakkeet"],"panel.container-block":["S\xE4ili\xF6lohko"],"panel.divider-block":["Erotin"],"panel.editor-appearance":["Editorin ulkoasu"],"panel.export":["Vienti"],"panel.global":["Yleiset"],"panel.heading-block":["Otsikkolohko"],"panel.html-block":["HTML-lohko"],"panel.image-block":["Kuvalohko"],"panel.signature-block":["Allekirjoituslohko"],"panel.spacer-block":["V\xE4lilohko"],"panel.template":["Pohja"],"panel.text-block":["Tekstilohko"],"picker.blank-desc":["Aloita tyhj\xE4st\xE4 s\xE4hk\xF6postista"],"picker.blank-title":["Tyhj\xE4"],"picker.create-sample":["Luo malli"],"picker.create-template":["Luo pohja"],"picker.creating":["Luodaan\u2026"],"picker.error-name-required":["Nimi vaaditaan"],"picker.error-sample-taken":["Samanniminen malli on jo olemassa"],"picker.error-template-taken":["Samanniminen pohja on jo olemassa"],"picker.start-from":["Aloitetaan pohjasta"],"picker.title-sample":["Uusi malli"],"picker.title-template":["Uusi pohja"],"rename.error-empty":["Anna nimi"],"rename.error-generic":["Tietojen p\xE4ivitys ep\xE4onnistui"],"rename.error-taken":["Samanniminen pohja on jo olemassa"],"rename.name-label":["Nimi"],"rename.no-tags":["Ei tunnisteita."],"rename.tag-placeholder":["Lis\xE4\xE4 tunniste ja paina Enter"],"rename.tags":["Tunnisteet"],"rename.title":["Muokkaa tietoja"],"row.actions":["Rivin toiminnot"],"row.demote":["Alenna pohjaksi"],"row.duplicate":["Monista"],"row.duplicate-as-template":["Monista pohjaksi"],"row.edit-details":["Muokkaa nime\xE4 ja tunnisteita\u2026"],"row.more":["Lis\xE4\xE4"],"row.promote":["Ylenn\xE4 malliksi"],"save-dialog.create":["Luo"],"save-dialog.error-empty-name":["Anna pohjalle nimi"],"save-dialog.name-label":["Pohjan nimi"],"save-dialog.save":["Tallenna"],"save-dialog.saving":["Tallennetaan..."],"save-dialog.title":["Tallenna uutena pohjana"],"save-dialog.title-new":["Luo uusi pohja"],"savebar.error-saving":["Tallennus ep\xE4onnistui"],"savebar.new":["Uusi"],"savebar.new-template-created":["Uusi pohja luotu"],"savebar.sample-prefix":["Malli"],"savebar.sample-saved":["Malli tallennettu"],"savebar.save":["Tallenna"],"savebar.save-as":["Tallenna nimell\xE4\u2026"],"savebar.save-as-new":["Tallenna uutena\u2026"],"savebar.save-as-new-template":["Tallenna uutena pohjana"],"savebar.save-changes":["Tallenna muutokset"],"savebar.save-changes-to-sample":["Tallenna muutokset t\xE4h\xE4n malliin"],"savebar.start-fresh":["Aloita tyhj\xE4st\xE4 pohjasta"],"savebar.template-saved":["Pohja tallennettu"],"signature.address":["Osoite"],"signature.company":["Yritys"],"signature.email":["S\xE4hk\xF6posti"],"signature.greeting":["Tervehdys"],"signature.image-shape":["Kuvan muoto"],"signature.image-size":["Kuvan koko"],"signature.image-url":["Kuvan osoite"],"signature.layout":["Asettelu"],"signature.layout.horizontal":["Vaakasuora"],"signature.layout.vertical":["Pystysuora"],"signature.link-color":["Linkin v\xE4ri"],"signature.name":["Nimi"],"signature.name-color":["Nimen v\xE4ri"],"signature.phone":["Puhelin"],"signature.shape.circle":["Ympyr\xE4"],"signature.shape.rounded":["Py\xF6ristetty"],"signature.shape.square":["Neli\xF6"],"signature.title":["Titteli"],"signature.website":["Verkkosivusto"],"size.lg":["Lg"],"size.md":["Md"],"size.sm":["Sm"],"size.xs":["Xs"],"sort.last-updated":["Viimeksi p\xE4ivitetty"],"sort.name":["Nimi (A\u2013\xD6)"],"sort.recently-created":["\xC4skett\xE4in luotu"],"style.alignment":["Tasaus"],"style.background-color":["Taustav\xE4ri"],"style.border-color":["Reunan v\xE4ri"],"style.border-radius":["Reunan py\xF6ristys"],"style.font-family":["Fontti"],"style.font-size":["Fonttikoko"],"style.font-weight":["Fontin paksuus"],"style.letter-spacing":["Kirjainv\xE4li"],"style.line-height":["Rivikorkeus"],"style.padding":["T\xE4yte"],"style.text-color":["Tekstin v\xE4ri"],"tab.edit":["Muokkaa"],"tab.html-output":["HTML-tuloste"],"tab.json-output":["JSON-tuloste"],"tab.preview":["Esikatselu"],"tab.text-output":["Tekstituloste"],"time.days-short":[" pv sitten"],"time.hours-short":[" h sitten"],"time.just-now":["juuri nyt"],"time.minutes-short":[" min sitten"],"time.months-short":[" kk sitten"],"time.years-short":[" v sitten"],"toolbar.bold":["Lihavointi"],"toolbar.bold-shortcut":["Lihavointi (Cmd+B)"],"toolbar.italic":["Kursivointi"],"toolbar.italic-shortcut":["Kursivointi (Cmd+I)"],"toolbar.link":["Linkki"],"toolbar.link-shortcut":["Linkki (Cmd+K)"],"tune.copy":["Kopioi lohko"],"tune.delete":["Poista"],"tune.move-down":["Siirr\xE4 alas"],"tune.move-up":["Siirr\xE4 yl\xF6s"]}');
|
|
2011
|
+
var messages2 = JSON.parse('{"avatar.shape":["Muoto"],"block-add.avatar":["Avatar"],"block-add.button":["Painike"],"block-add.columns":["Sarakkeet"],"block-add.company-signature":["Yritysallekirjoitus"],"block-add.container":["S\xE4ili\xF6"],"block-add.divider":["Erotin"],"block-add.heading":["Otsikko"],"block-add.html":["HTML"],"block-add.image":["Kuva"],"block-add.personal-signature":["Henkil\xF6kohtainen allekirjoitus"],"block-add.spacer":["V\xE4li"],"block-add.text":["Teksti"],"button.color":["Painikkeen v\xE4ri"],"button.style.pill":["Pilleri"],"button.style.rectangle":["Suorakaide"],"button.style.rounded":["Py\xF6ristetty"],"button.width.auto":["Automaattinen"],"button.width.full":["T\xE4ysi"],"canvas.desktop-view":["Ty\xF6p\xF6yt\xE4n\xE4kym\xE4"],"canvas.mobile-view":["Mobiilin\xE4kym\xE4"],"columns.count":["Sarakkeiden m\xE4\xE4r\xE4"],"columns.gap":["Sarakev\xE4li"],"common.add":["Lis\xE4\xE4"],"common.cancel":["Peruuta"],"common.save":["Tallenna"],"common.saving":["Tallennetaan\u2026"],"divider.color":["V\xE4ri"],"drawer.library":["Kirjasto"],"drawer.new-sample":["Uusi malli"],"drawer.new-template":["Uusi pohja"],"drawer.no-samples":["Ei malleja saatavilla"],"drawer.no-samples-match":["Mik\xE4\xE4n malli ei vastaa hakua"],"drawer.no-templates":["Ei tallennettuja pohjia"],"drawer.no-templates-match":["Mik\xE4\xE4n pohja ei vastaa hakua"],"drawer.search-samples":["Etsi malleja"],"drawer.search-templates":["Etsi pohjia"],"drawer.sort-by":["J\xE4rjestys"],"drawer.tab.outline":["Rakenne"],"drawer.tab.samples":["Mallit"],"drawer.tab.templates":["Pohjat"],"drawer.tag.all":["Kaikki"],"empty.description":["Tyhj\xE4 s\xE4hk\xF6postipohja, aloita tyhj\xE4lt\xE4 p\xF6yd\xE4lt\xE4"],"empty.slug":["Tyhj\xE4 s\xE4hk\xF6posti"],"field.content":["Sis\xE4lt\xF6"],"field.height":["Korkeus"],"field.level":["Taso"],"field.markdown":["Markdown"],"field.size":["Koko"],"field.style":["Tyyli"],"field.text":["Teksti"],"field.url":["Osoite"],"field.width":["Leveys"],"global.backdrop-color":["Taustav\xE4ri"],"global.canvas-border-color":["Kankaan reunan v\xE4ri"],"global.canvas-border-radius":["Kankaan reunan py\xF6ristys"],"global.canvas-color":["Kankaan v\xE4ri"],"global.disable-backdrop":["Piilota taustav\xE4ri"],"image.alt-text":["Vaihtoehtoinen teksti"],"image.http-warning":["Ei-HTTPS-osoite: Gmail ja muut asiakasohjelmat poistavat sekoitetun sis\xE4ll\xF6n. K\xE4yt\xE4 https:// varmaa toimitusta varten."],"image.library":["Kirjasto"],"image.link-href":["Linkin osoite"],"image.source-url":["L\xE4hdeosoite"],"image.upload":["Lataa"],"image.uploading":["Ladataan\u2026"],"inspect.hint":["Valitse lohko napsauttamalla."],"inspect.not-found":["Lohkoa ei l\xF6ytynyt. Palaa napsauttamalla toista lohkoa."],"inspector.tab.inspect":["Tarkastele"],"inspector.tab.settings":["Asetukset"],"inspector.tab.styles":["Tyylit"],"inspector.tab.variables":["Muuttujat"],"outline.canvas":["Kangas"],"outline.hint":["Valitse rivi napsauttamalla. Raahaa rivi\xE4 j\xE4rjestyksen muuttamiseksi tai siirr\xE4 se s\xE4ili\xF6\xF6n."],"outline.title":["Rakenne"],"panel.avatar-block":["Avatarlohko"],"panel.button-block":["Painikelohko"],"panel.columns-block":["Sarakkeet"],"panel.container-block":["S\xE4ili\xF6lohko"],"panel.details":["Tiedot"],"panel.divider-block":["Erotin"],"panel.editor-appearance":["Editorin ulkoasu"],"panel.export":["Vienti"],"panel.global":["Yleiset"],"panel.heading-block":["Otsikkolohko"],"panel.html-block":["HTML-lohko"],"panel.image-block":["Kuvalohko"],"panel.signature-block":["Allekirjoituslohko"],"panel.spacer-block":["V\xE4lilohko"],"panel.template":["Pohja"],"panel.text-block":["Tekstilohko"],"picker.blank-desc":["Aloita tyhj\xE4st\xE4 s\xE4hk\xF6postista"],"picker.blank-title":["Tyhj\xE4"],"picker.create-sample":["Luo malli"],"picker.create-template":["Luo pohja"],"picker.creating":["Luodaan\u2026"],"picker.error-name-required":["Nimi vaaditaan"],"picker.error-sample-taken":["Samanniminen malli on jo olemassa"],"picker.error-template-taken":["Samanniminen pohja on jo olemassa"],"picker.start-from":["Aloitetaan pohjasta"],"picker.title-sample":["Uusi malli"],"picker.title-template":["Uusi pohja"],"redo.label":["Tee uudelleen"],"redo.tooltip":["Tee uudelleen"],"rename.add-tag":["Lis\xE4\xE4 tunniste"],"rename.error-empty":["Anna nimi"],"rename.error-generic":["Tietojen p\xE4ivitys ep\xE4onnistui"],"rename.error-taken":["Samanniminen pohja on jo olemassa"],"rename.name-label":["Nimi"],"rename.no-tags":["Ei tunnisteita."],"rename.tag-placeholder":["Lis\xE4\xE4 tunniste ja paina Enter"],"rename.tags":["Tunnisteet"],"rename.title":["Muokkaa tietoja"],"row.actions":["Rivin toiminnot"],"row.demote":["Alenna pohjaksi"],"row.duplicate":["Monista"],"row.duplicate-as-template":["Monista pohjaksi"],"row.edit-details":["Muokkaa nime\xE4 ja tunnisteita\u2026"],"row.more":["Lis\xE4\xE4"],"row.promote":["Ylenn\xE4 malliksi"],"save-dialog.create":["Luo"],"save-dialog.error-empty-name":["Anna pohjalle nimi"],"save-dialog.name-label":["Pohjan nimi"],"save-dialog.save":["Tallenna"],"save-dialog.saving":["Tallennetaan..."],"save-dialog.title":["Tallenna uutena pohjana"],"save-dialog.title-new":["Luo uusi pohja"],"savebar.error-saving":["Tallennus ep\xE4onnistui"],"savebar.new":["Uusi"],"savebar.new-template-created":["Uusi pohja luotu"],"savebar.sample-prefix":["Malli"],"savebar.sample-saved":["Malli tallennettu"],"savebar.save":["Tallenna"],"savebar.save-as":["Tallenna nimell\xE4\u2026"],"savebar.save-as-new":["Tallenna uutena\u2026"],"savebar.save-as-new-template":["Tallenna uutena pohjana"],"savebar.save-changes":["Tallenna muutokset"],"savebar.save-changes-to-sample":["Tallenna muutokset t\xE4h\xE4n malliin"],"savebar.start-fresh":["Aloita tyhj\xE4st\xE4 pohjasta"],"savebar.template-saved":["Pohja tallennettu"],"settings.checkerboard":["Shakkikuvio"],"settings.copied":["Pohja kopioitu!"],"settings.delete":["Poista pohja"],"settings.delete-confirm":["Haluatko varmasti poistaa t\xE4m\xE4n pohjan?"],"settings.editor-only-hint":["N\xE4kyy vain editorissa \u2014 ei p\xE4\xE4dy l\xE4hetett\xE4v\xE4\xE4n viestiin."],"settings.no-rename-cb":["Anna renameTemplate-callback k\xE4ytt\xF6\xF6n, niin voit muokata t\xE4st\xE4"],"settings.no-template":["Pohjaa ei ole valittu"],"settings.save-as-sample":["Tallenna mallipohjaksi"],"settings.save-details":["Tallenna tiedot"],"settings.save-disabled":["Tallennus on poistettu k\xE4yt\xF6st\xE4. Ota k\xE4ytt\xF6\xF6n antamalla tarvittavat callback-funktiot."],"settings.saved":["Tallennettu"],"settings.solid":["Yksiv\xE4rinen"],"settings.workspace-background":["Ty\xF6tilan tausta"],"signature.address":["Osoite"],"signature.company":["Yritys"],"signature.email":["S\xE4hk\xF6posti"],"signature.greeting":["Tervehdys"],"signature.image-shape":["Kuvan muoto"],"signature.image-size":["Kuvan koko"],"signature.image-url":["Kuvan osoite"],"signature.layout":["Asettelu"],"signature.layout.horizontal":["Vaakasuora"],"signature.layout.vertical":["Pystysuora"],"signature.link-color":["Linkin v\xE4ri"],"signature.name":["Nimi"],"signature.name-color":["Nimen v\xE4ri"],"signature.phone":["Puhelin"],"signature.shape.circle":["Ympyr\xE4"],"signature.shape.rounded":["Py\xF6ristetty"],"signature.shape.square":["Neli\xF6"],"signature.title":["Titteli"],"signature.website":["Verkkosivusto"],"size.lg":["Lg"],"size.md":["Md"],"size.sm":["Sm"],"size.xs":["Xs"],"sort.last-updated":["Viimeksi p\xE4ivitetty"],"sort.name":["Nimi (A\u2013\xD6)"],"sort.recently-created":["\xC4skett\xE4in luotu"],"style.alignment":["Tasaus"],"style.background-color":["Taustav\xE4ri"],"style.border-color":["Reunan v\xE4ri"],"style.border-radius":["Reunan py\xF6ristys"],"style.font-family":["Fontti"],"style.font-size":["Fonttikoko"],"style.font-weight":["Fontin paksuus"],"style.letter-spacing":["Kirjainv\xE4li"],"style.line-height":["Rivikorkeus"],"style.padding":["T\xE4yte"],"style.text-color":["Tekstin v\xE4ri"],"tab.edit":["Muokkaa"],"tab.html-output":["HTML-tuloste"],"tab.json-output":["JSON-tuloste"],"tab.preview":["Esikatselu"],"tab.text-output":["Tekstituloste"],"tag.marketing":["markkinointi"],"tag.transactional":["tapahtumaviestit"],"time.days-short":[" pv sitten"],"time.hours-short":[" h sitten"],"time.just-now":["juuri nyt"],"time.minutes-short":[" min sitten"],"time.months-short":[" kk sitten"],"time.years-short":[" v sitten"],"toolbar.bold":["Lihavointi"],"toolbar.bold-shortcut":["Lihavointi (Cmd+B)"],"toolbar.italic":["Kursivointi"],"toolbar.italic-shortcut":["Kursivointi (Cmd+I)"],"toolbar.link":["Linkki"],"toolbar.link-shortcut":["Linkki (Cmd+K)"],"tune.copy":["Kopioi lohko"],"tune.delete":["Poista"],"tune.move-down":["Siirr\xE4 alas"],"tune.move-up":["Siirr\xE4 yl\xF6s"],"undo.label":["Kumoa"],"undo.tooltip":["Kumoa"],"variables.add":["Lis\xE4\xE4 muuttuja"],"variables.click-to-declare":["M\xE4\xE4rittele muuttuja napsauttamalla tunnistetta."],"variables.confirm-delete":["Muuttujaan viitataan edelleen viestiss\xE4. Poistetaanko silti?"],"variables.copy-token":["Kopioi {",["nimi"],"}-tunniste"],"variables.description":["Kuvaus"],"variables.focus-first":["Kohdista ensin tekstikentt\xE4\xE4n"],"variables.insert-at-cursor":["Lis\xE4\xE4 kohdistimeen"],"variables.intro":["M\xE4\xE4ritellyt muuttujat kulkevat pohjan mukana. Viittaa niihin aiherivill\xE4 ja viestiss\xE4 muodossa {",["nimi"],"}. Esikatselussa merkit korvautuvat alla olevilla esimerkkiarvoilla."],"variables.none":["Ei m\xE4\xE4riteltyj\xE4 muuttujia. Lis\xE4\xE4 napsauttamalla +."],"variables.open-template":["Avaa pohja hallitaksesi muuttujia."],"variables.optional":["Valinnainen"],"variables.ref-many":["viittausta"],"variables.ref-one":["viittaus"],"variables.remove":["Poista"],"variables.sample-hint":["N\xE4ytet\xE4\xE4n esikatselussa"],"variables.sample-value":["Esimerkkiarvo"],"variables.title":["Muuttujat"],"variables.undeclared":["M\xE4\xE4rittelem\xE4t\xF6n viestiss\xE4"],"variables.unused":["Ei k\xE4yt\xF6ss\xE4 viestiss\xE4"]}');
|
|
2012
2012
|
|
|
2013
2013
|
// src/locales/sv/messages.ts
|
|
2014
|
-
var messages3 = JSON.parse('{"avatar.shape":["Form"],"button.color":["Knappf\xE4rg"],"button.style.pill":["Piller"],"button.style.rectangle":["Rektangel"],"button.style.rounded":["Rundad"],"button.width.auto":["Auto"],"button.width.full":["Full"],"canvas.desktop-view":["Skrivbordsvy"],"canvas.mobile-view":["Mobilvy"],"columns.count":["Antal kolumner"],"columns.gap":["Kolumnmellanrum"],"common.add":["L\xE4gg till"],"common.cancel":["Avbryt"],"common.save":["Spara"],"common.saving":["Sparar\u2026"],"divider.color":["F\xE4rg"],"drawer.library":["Bibliotek"],"drawer.new-sample":["Ny mall"],"drawer.new-template":["Ny e-postmall"],"drawer.no-samples":["Inga exempel tillg\xE4ngliga"],"drawer.no-samples-match":["Inga exempel matchar dina filter"],"drawer.no-templates":["Inga sparade mallar \xE4nnu"],"drawer.no-templates-match":["Inga mallar matchar dina filter"],"drawer.search-samples":["S\xF6k exempel"],"drawer.search-templates":["S\xF6k mallar"],"drawer.sort-by":["Sortera efter"],"drawer.tab.outline":["Struktur"],"drawer.tab.samples":["Exempel"],"drawer.tab.templates":["Mallar"],"drawer.tag.all":["Alla"],"empty.description":["En tom e-postmall att utg\xE5 fr\xE5n"],"empty.slug":["Tomt e-postmeddelande"],"field.content":["Inneh\xE5ll"],"field.height":["H\xF6jd"],"field.level":["Niv\xE5"],"field.markdown":["Markdown"],"field.size":["Storlek"],"field.style":["Stil"],"field.text":["Text"],"field.url":["Adress"],"field.width":["Bredd"],"global.backdrop-color":["Bakgrundsf\xE4rg"],"global.canvas-border-color":["Canvaskantf\xE4rg"],"global.canvas-border-radius":["Canvaskantradie"],"global.canvas-color":["Canvasf\xE4rg"],"global.disable-backdrop":["D\xF6lj bakgrund"],"image.alt-text":["Alternativ text"],"image.http-warning":["Icke-HTTPS-URL: Gmail och andra klienter tar bort blandat inneh\xE5ll. Anv\xE4nd https:// f\xF6r p\xE5litlig leverans."],"image.library":["Bibliotek"],"image.link-href":["Klickl\xE4nk"],"image.source-url":["K\xE4lladress"],"image.upload":["Ladda upp"],"image.uploading":["Laddar upp\u2026"],"inspector.tab.inspect":["Inspektera"],"inspector.tab.settings":["Inst\xE4llningar"],"inspector.tab.styles":["Stilar"],"inspector.tab.variables":["Variabler"],"panel.avatar-block":["Avatarblock"],"panel.button-block":["Knappblock"],"panel.columns-block":["Kolumner"],"panel.container-block":["Beh\xE5llarblock"],"panel.divider-block":["Avgr\xE4nsare"],"panel.editor-appearance":["Editorns utseende"],"panel.export":["Exportera"],"panel.global":["Allm\xE4nt"],"panel.heading-block":["Rubrikblock"],"panel.html-block":["HTML-block"],"panel.image-block":["Bildblock"],"panel.signature-block":["Signaturblock"],"panel.spacer-block":["Mellanrumsblock"],"panel.template":["Mall"],"panel.text-block":["Textblock"],"picker.blank-desc":["Starta fr\xE5n ett tomt e-postmeddelande"],"picker.blank-title":["Tomt"],"picker.create-sample":["Skapa exempel"],"picker.create-template":["Skapa mall"],"picker.creating":["Skapar\u2026"],"picker.error-name-required":["Namn kr\xE4vs"],"picker.error-sample-taken":["Ett exempel med detta namn finns redan"],"picker.error-template-taken":["En mall med detta namn finns redan"],"picker.start-from":["Utg\xE5 fr\xE5n"],"picker.title-sample":["Nytt exempel"],"picker.title-template":["Ny mall"],"rename.error-empty":["Ange ett namn"],"rename.error-generic":["Kunde inte uppdatera malldetaljer"],"rename.error-taken":["En mall med detta namn finns redan"],"rename.name-label":["Namn"],"rename.no-tags":["Inga etiketter \xE4nnu."],"rename.tag-placeholder":["L\xE4gg till en etikett och tryck Enter"],"rename.tags":["Etiketter"],"rename.title":["Redigera detaljer"],"row.actions":["Rad\xE5tg\xE4rder"],"row.demote":["Degradera till mall"],"row.duplicate":["Duplicera"],"row.duplicate-as-template":["Duplicera som mall"],"row.edit-details":["Redigera namn och etiketter\u2026"],"row.more":["Mer"],"row.promote":["Befordra till exempel"],"save-dialog.create":["Skapa"],"save-dialog.error-empty-name":["Ange ett mallnamn"],"save-dialog.name-label":["Mallnamn"],"save-dialog.save":["Spara"],"save-dialog.saving":["Sparar..."],"save-dialog.title":["Spara som en ny mall"],"save-dialog.title-new":["Skapa en ny mall"],"savebar.error-saving":["Fel vid sparande"],"savebar.new":["Ny"],"savebar.new-template-created":["Ny mall skapad"],"savebar.sample-prefix":["Exempel"],"savebar.sample-saved":["Exempel sparat"],"savebar.save":["Spara"],"savebar.save-as":["Spara som\u2026"],"savebar.save-as-new":["Spara som ny\u2026"],"savebar.save-as-new-template":["Spara som en ny mall"],"savebar.save-changes":["Spara \xE4ndringar"],"savebar.save-changes-to-sample":["Spara \xE4ndringar till detta exempel"],"savebar.start-fresh":["Starta en ny mall"],"savebar.template-saved":["Mall sparad"],"signature.address":["Adress"],"signature.company":["F\xF6retag"],"signature.email":["E-post"],"signature.greeting":["H\xE4lsning"],"signature.image-shape":["Bildform"],"signature.image-size":["Bildstorlek"],"signature.image-url":["Bildadress"],"signature.layout":["Layout"],"signature.layout.horizontal":["Horisontell"],"signature.layout.vertical":["Vertikal"],"signature.link-color":["L\xE4nkf\xE4rg"],"signature.name":["Namn"],"signature.name-color":["Namnf\xE4rg"],"signature.phone":["Telefon"],"signature.shape.circle":["Cirkel"],"signature.shape.rounded":["Rundad"],"signature.shape.square":["Kvadrat"],"signature.title":["Titel"],"signature.website":["Webbplats"],"size.lg":["Lg"],"size.md":["Md"],"size.sm":["Sm"],"size.xs":["Xs"],"sort.last-updated":["Senast uppdaterad"],"sort.name":["Namn (A\u2013\xD6)"],"sort.recently-created":["Nyligen skapad"],"style.alignment":["Justering"],"style.background-color":["Bakgrundsf\xE4rg"],"style.border-color":["Kantf\xE4rg"],"style.border-radius":["Kantradie"],"style.font-family":["Typsnitt"],"style.font-size":["Typsnittsstorlek"],"style.font-weight":["Typsnittsvikt"],"style.letter-spacing":["Teckenavst\xE5nd"],"style.line-height":["Radh\xF6jd"],"style.padding":["Utrymme"],"style.text-color":["Textf\xE4rg"],"tab.edit":["Redigera"],"tab.html-output":["HTML-utdata"],"tab.json-output":["JSON-utdata"],"tab.preview":["F\xF6rhandsgranska"],"tab.text-output":["Textutdata"],"time.days-short":[" d sedan"],"time.hours-short":[" tim sedan"],"time.just-now":["just nu"],"time.minutes-short":[" min sedan"],"time.months-short":[" m\xE5n sedan"],"time.years-short":[" \xE5r sedan"],"toolbar.bold":["Fet"],"toolbar.bold-shortcut":["Fet (Cmd+B)"],"toolbar.italic":["Kursiv"],"toolbar.italic-shortcut":["Kursiv (Cmd+I)"],"toolbar.link":["L\xE4nk"],"toolbar.link-shortcut":["L\xE4nk (Cmd+K)"],"tune.copy":["Kopiera block"],"tune.delete":["Ta bort"],"tune.move-down":["Flytta ner"],"tune.move-up":["Flytta upp"]}');
|
|
2014
|
+
var messages3 = JSON.parse('{"avatar.shape":["Form"],"block-add.avatar":["Avatar"],"block-add.button":["Knapp"],"block-add.columns":["Kolumner"],"block-add.company-signature":["F\xF6retagssignatur"],"block-add.container":["Beh\xE5llare"],"block-add.divider":["Avgr\xE4nsare"],"block-add.heading":["Rubrik"],"block-add.html":["HTML"],"block-add.image":["Bild"],"block-add.personal-signature":["Personlig signatur"],"block-add.spacer":["Mellanrum"],"block-add.text":["Text"],"button.color":["Knappf\xE4rg"],"button.style.pill":["Piller"],"button.style.rectangle":["Rektangel"],"button.style.rounded":["Rundad"],"button.width.auto":["Auto"],"button.width.full":["Full"],"canvas.desktop-view":["Skrivbordsvy"],"canvas.mobile-view":["Mobilvy"],"columns.count":["Antal kolumner"],"columns.gap":["Kolumnmellanrum"],"common.add":["L\xE4gg till"],"common.cancel":["Avbryt"],"common.save":["Spara"],"common.saving":["Sparar\u2026"],"divider.color":["F\xE4rg"],"drawer.library":["Bibliotek"],"drawer.new-sample":["Ny mall"],"drawer.new-template":["Ny e-postmall"],"drawer.no-samples":["Inga exempel tillg\xE4ngliga"],"drawer.no-samples-match":["Inga exempel matchar dina filter"],"drawer.no-templates":["Inga sparade mallar \xE4nnu"],"drawer.no-templates-match":["Inga mallar matchar dina filter"],"drawer.search-samples":["S\xF6k exempel"],"drawer.search-templates":["S\xF6k mallar"],"drawer.sort-by":["Sortera efter"],"drawer.tab.outline":["Struktur"],"drawer.tab.samples":["Exempel"],"drawer.tab.templates":["Mallar"],"drawer.tag.all":["Alla"],"empty.description":["En tom e-postmall att utg\xE5 fr\xE5n"],"empty.slug":["Tomt e-postmeddelande"],"field.content":["Inneh\xE5ll"],"field.height":["H\xF6jd"],"field.level":["Niv\xE5"],"field.markdown":["Markdown"],"field.size":["Storlek"],"field.style":["Stil"],"field.text":["Text"],"field.url":["Adress"],"field.width":["Bredd"],"global.backdrop-color":["Bakgrundsf\xE4rg"],"global.canvas-border-color":["Canvaskantf\xE4rg"],"global.canvas-border-radius":["Canvaskantradie"],"global.canvas-color":["Canvasf\xE4rg"],"global.disable-backdrop":["D\xF6lj bakgrund"],"image.alt-text":["Alternativ text"],"image.http-warning":["Icke-HTTPS-URL: Gmail och andra klienter tar bort blandat inneh\xE5ll. Anv\xE4nd https:// f\xF6r p\xE5litlig leverans."],"image.library":["Bibliotek"],"image.link-href":["Klickl\xE4nk"],"image.source-url":["K\xE4lladress"],"image.upload":["Ladda upp"],"image.uploading":["Laddar upp\u2026"],"inspect.hint":["Klicka p\xE5 ett block f\xF6r att inspektera."],"inspect.not-found":["Blocket hittades inte. Klicka p\xE5 ett block f\xF6r att \xE5terst\xE4lla."],"inspector.tab.inspect":["Inspektera"],"inspector.tab.settings":["Inst\xE4llningar"],"inspector.tab.styles":["Stilar"],"inspector.tab.variables":["Variabler"],"outline.canvas":["Canvas"],"outline.hint":["Klicka p\xE5 en rad f\xF6r att v\xE4lja. Dra en rad f\xF6r att \xE4ndra ordning eller flytta till en beh\xE5llare."],"outline.title":["Struktur"],"panel.avatar-block":["Avatarblock"],"panel.button-block":["Knappblock"],"panel.columns-block":["Kolumner"],"panel.container-block":["Beh\xE5llarblock"],"panel.details":["Detaljer"],"panel.divider-block":["Avgr\xE4nsare"],"panel.editor-appearance":["Editorns utseende"],"panel.export":["Exportera"],"panel.global":["Allm\xE4nt"],"panel.heading-block":["Rubrikblock"],"panel.html-block":["HTML-block"],"panel.image-block":["Bildblock"],"panel.signature-block":["Signaturblock"],"panel.spacer-block":["Mellanrumsblock"],"panel.template":["Mall"],"panel.text-block":["Textblock"],"picker.blank-desc":["Starta fr\xE5n ett tomt e-postmeddelande"],"picker.blank-title":["Tomt"],"picker.create-sample":["Skapa exempel"],"picker.create-template":["Skapa mall"],"picker.creating":["Skapar\u2026"],"picker.error-name-required":["Namn kr\xE4vs"],"picker.error-sample-taken":["Ett exempel med detta namn finns redan"],"picker.error-template-taken":["En mall med detta namn finns redan"],"picker.start-from":["Utg\xE5 fr\xE5n"],"picker.title-sample":["Nytt exempel"],"picker.title-template":["Ny mall"],"redo.label":["G\xF6r om"],"redo.tooltip":["G\xF6r om"],"rename.add-tag":["L\xE4gg till en etikett"],"rename.error-empty":["Ange ett namn"],"rename.error-generic":["Kunde inte uppdatera malldetaljer"],"rename.error-taken":["En mall med detta namn finns redan"],"rename.name-label":["Namn"],"rename.no-tags":["Inga etiketter \xE4nnu."],"rename.tag-placeholder":["L\xE4gg till en etikett och tryck Enter"],"rename.tags":["Etiketter"],"rename.title":["Redigera detaljer"],"row.actions":["Rad\xE5tg\xE4rder"],"row.demote":["Degradera till mall"],"row.duplicate":["Duplicera"],"row.duplicate-as-template":["Duplicera som mall"],"row.edit-details":["Redigera namn och etiketter\u2026"],"row.more":["Mer"],"row.promote":["Befordra till exempel"],"save-dialog.create":["Skapa"],"save-dialog.error-empty-name":["Ange ett mallnamn"],"save-dialog.name-label":["Mallnamn"],"save-dialog.save":["Spara"],"save-dialog.saving":["Sparar..."],"save-dialog.title":["Spara som en ny mall"],"save-dialog.title-new":["Skapa en ny mall"],"savebar.error-saving":["Fel vid sparande"],"savebar.new":["Ny"],"savebar.new-template-created":["Ny mall skapad"],"savebar.sample-prefix":["Exempel"],"savebar.sample-saved":["Exempel sparat"],"savebar.save":["Spara"],"savebar.save-as":["Spara som\u2026"],"savebar.save-as-new":["Spara som ny\u2026"],"savebar.save-as-new-template":["Spara som en ny mall"],"savebar.save-changes":["Spara \xE4ndringar"],"savebar.save-changes-to-sample":["Spara \xE4ndringar till detta exempel"],"savebar.start-fresh":["Starta en ny mall"],"savebar.template-saved":["Mall sparad"],"settings.checkerboard":["Rutm\xF6nster"],"settings.copied":["Mall kopierad!"],"settings.delete":["Ta bort mall"],"settings.delete-confirm":["\xC4r du s\xE4ker p\xE5 att du vill ta bort denna mall?"],"settings.editor-only-hint":["Syns bara i editorn \u2014 n\xE5r aldrig det renderade mejlet."],"settings.no-rename-cb":["Koppla renameTemplate-callback f\xF6r att kunna redigera h\xE4rifr\xE5n"],"settings.no-template":["Ingen mall vald"],"settings.save-as-sample":["Spara som exempelmall"],"settings.save-details":["Spara detaljer"],"settings.save-disabled":["Sparfunktionen \xE4r inaktiverad. Aktivera genom att ange n\xF6dv\xE4ndiga callback-funktioner."],"settings.saved":["Sparad"],"settings.solid":["Enf\xE4rgad"],"settings.workspace-background":["Arbetsytans bakgrund"],"signature.address":["Adress"],"signature.company":["F\xF6retag"],"signature.email":["E-post"],"signature.greeting":["H\xE4lsning"],"signature.image-shape":["Bildform"],"signature.image-size":["Bildstorlek"],"signature.image-url":["Bildadress"],"signature.layout":["Layout"],"signature.layout.horizontal":["Horisontell"],"signature.layout.vertical":["Vertikal"],"signature.link-color":["L\xE4nkf\xE4rg"],"signature.name":["Namn"],"signature.name-color":["Namnf\xE4rg"],"signature.phone":["Telefon"],"signature.shape.circle":["Cirkel"],"signature.shape.rounded":["Rundad"],"signature.shape.square":["Kvadrat"],"signature.title":["Titel"],"signature.website":["Webbplats"],"size.lg":["Lg"],"size.md":["Md"],"size.sm":["Sm"],"size.xs":["Xs"],"sort.last-updated":["Senast uppdaterad"],"sort.name":["Namn (A\u2013\xD6)"],"sort.recently-created":["Nyligen skapad"],"style.alignment":["Justering"],"style.background-color":["Bakgrundsf\xE4rg"],"style.border-color":["Kantf\xE4rg"],"style.border-radius":["Kantradie"],"style.font-family":["Typsnitt"],"style.font-size":["Typsnittsstorlek"],"style.font-weight":["Typsnittsvikt"],"style.letter-spacing":["Teckenavst\xE5nd"],"style.line-height":["Radh\xF6jd"],"style.padding":["Utrymme"],"style.text-color":["Textf\xE4rg"],"tab.edit":["Redigera"],"tab.html-output":["HTML-utdata"],"tab.json-output":["JSON-utdata"],"tab.preview":["F\xF6rhandsgranska"],"tab.text-output":["Textutdata"],"tag.marketing":["marknadsf\xF6ring"],"tag.transactional":["transaktionella"],"time.days-short":[" d sedan"],"time.hours-short":[" tim sedan"],"time.just-now":["just nu"],"time.minutes-short":[" min sedan"],"time.months-short":[" m\xE5n sedan"],"time.years-short":[" \xE5r sedan"],"toolbar.bold":["Fet"],"toolbar.bold-shortcut":["Fet (Cmd+B)"],"toolbar.italic":["Kursiv"],"toolbar.italic-shortcut":["Kursiv (Cmd+I)"],"toolbar.link":["L\xE4nk"],"toolbar.link-shortcut":["L\xE4nk (Cmd+K)"],"tune.copy":["Kopiera block"],"tune.delete":["Ta bort"],"tune.move-down":["Flytta ner"],"tune.move-up":["Flytta upp"],"undo.label":["\xC5ngra"],"undo.tooltip":["\xC5ngra"],"variables.add":["L\xE4gg till variabel"],"variables.click-to-declare":["Klicka p\xE5 en token f\xF6r att deklarera den."],"variables.confirm-delete":["Variabeln refereras fortfarande i br\xF6dtexten. Ta bort \xE4nd\xE5?"],"variables.copy-token":["Kopiera {",["namn"],"}-token"],"variables.description":["Beskrivning"],"variables.focus-first":["Fokusera ett textf\xE4lt f\xF6rst"],"variables.insert-at-cursor":["Infoga vid mark\xF6ren"],"variables.intro":["Deklarerade variabler f\xF6ljer med mallen. H\xE4nvisa till dem i \xE4mnesrad och br\xF6dtext som {",["namn"],"}. I f\xF6rhandsgranskningen renderas tokens med exempelv\xE4rdena nedan."],"variables.none":["Inga variabler deklarerade. Klicka p\xE5 + f\xF6r att l\xE4gga till en."],"variables.open-template":["\xD6ppna en mall f\xF6r att hantera variabler."],"variables.optional":["Valfritt"],"variables.ref-many":["referenser"],"variables.ref-one":["referens"],"variables.remove":["Ta bort"],"variables.sample-hint":["Visas i f\xF6rhandsgranskning"],"variables.sample-value":["Exempelv\xE4rde"],"variables.title":["Variabler"],"variables.undeclared":["Odeklarerad i br\xF6dtexten"],"variables.unused":["Oanv\xE4nd i br\xF6dtexten"]}');
|
|
2015
2015
|
var SUPPORTED_LOCALES = ["en", "sv", "fi"];
|
|
2016
2016
|
var CATALOGS = {
|
|
2017
2017
|
en: messages,
|
|
@@ -2298,7 +2298,7 @@ var EmailEditorProvider = ({
|
|
|
2298
2298
|
setCurrentTemplateTags
|
|
2299
2299
|
]
|
|
2300
2300
|
);
|
|
2301
|
-
return /* @__PURE__ */
|
|
2301
|
+
return /* @__PURE__ */ React62.createElement(EmailEditorContext.Provider, { value }, children);
|
|
2302
2302
|
};
|
|
2303
2303
|
var useEmailEditor = () => {
|
|
2304
2304
|
const context = useContext(EmailEditorContext);
|
|
@@ -2312,7 +2312,7 @@ function ImageCallbacksProvider({
|
|
|
2312
2312
|
callbacks,
|
|
2313
2313
|
children
|
|
2314
2314
|
}) {
|
|
2315
|
-
return /* @__PURE__ */
|
|
2315
|
+
return /* @__PURE__ */ React62.createElement(ImageCallbacksContext.Provider, { value: callbacks }, children);
|
|
2316
2316
|
}
|
|
2317
2317
|
function useImageCallbacks() {
|
|
2318
2318
|
return useContext(ImageCallbacksContext);
|
|
@@ -2332,19 +2332,20 @@ var TITLE_KEYS = {
|
|
|
2332
2332
|
"Divider block": "panel.divider-block",
|
|
2333
2333
|
"Columns block": "panel.columns-block",
|
|
2334
2334
|
"Container block": "panel.container-block",
|
|
2335
|
-
"Html block": "panel.html-block"
|
|
2335
|
+
"Html block": "panel.html-block",
|
|
2336
|
+
Details: "panel.details"
|
|
2336
2337
|
};
|
|
2337
2338
|
function BaseSidebarPanel({ title, children }) {
|
|
2338
2339
|
const key = TITLE_KEYS[title];
|
|
2339
2340
|
const displayTitle = key ? t(key, title) : title;
|
|
2340
|
-
return /* @__PURE__ */
|
|
2341
|
+
return /* @__PURE__ */ React62.createElement(Box, { p: 2 }, /* @__PURE__ */ React62.createElement(Typography, { variant: "overline", color: "text.secondary", sx: { display: "block", mb: 2 } }, displayTitle), /* @__PURE__ */ React62.createElement(Stack, { spacing: 5, mb: 3 }, children));
|
|
2341
2342
|
}
|
|
2342
2343
|
function RadioGroupInput({ label, children, defaultValue, onChange }) {
|
|
2343
2344
|
const [value, setValue] = useState(defaultValue);
|
|
2344
2345
|
useEffect(() => {
|
|
2345
2346
|
setValue(defaultValue);
|
|
2346
2347
|
}, [defaultValue]);
|
|
2347
|
-
return /* @__PURE__ */
|
|
2348
|
+
return /* @__PURE__ */ React62.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
|
|
2348
2349
|
ToggleButtonGroup,
|
|
2349
2350
|
{
|
|
2350
2351
|
exclusive: true,
|
|
@@ -2364,7 +2365,7 @@ function RadioGroupInput({ label, children, defaultValue, onChange }) {
|
|
|
2364
2365
|
}
|
|
2365
2366
|
function RawSliderInput(_a) {
|
|
2366
2367
|
var _b = _a, { iconLabel, value, setValue, units } = _b, props = __objRest(_b, ["iconLabel", "value", "setValue", "units"]);
|
|
2367
|
-
return /* @__PURE__ */
|
|
2368
|
+
return /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", spacing: 2, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React62.createElement(Box, { sx: { minWidth: 24, lineHeight: 1, flexShrink: 0 } }, iconLabel), /* @__PURE__ */ React62.createElement(
|
|
2368
2369
|
Slider,
|
|
2369
2370
|
__spreadProps(__spreadValues({}, props), {
|
|
2370
2371
|
value,
|
|
@@ -2375,14 +2376,14 @@ function RawSliderInput(_a) {
|
|
|
2375
2376
|
setValue(value2);
|
|
2376
2377
|
}
|
|
2377
2378
|
})
|
|
2378
|
-
), /* @__PURE__ */
|
|
2379
|
+
), /* @__PURE__ */ React62.createElement(Box, { sx: { minWidth: 32, textAlign: "right", flexShrink: 0 } }, /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", color: "text.secondary", sx: { lineHeight: 1 } }, value, units)));
|
|
2379
2380
|
}
|
|
2380
2381
|
|
|
2381
2382
|
// src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/slider-input.tsx
|
|
2382
2383
|
function SliderInput(_a) {
|
|
2383
2384
|
var _b = _a, { label, defaultValue, onChange } = _b, props = __objRest(_b, ["label", "defaultValue", "onChange"]);
|
|
2384
2385
|
const [value, setValue] = useState(defaultValue);
|
|
2385
|
-
return /* @__PURE__ */
|
|
2386
|
+
return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
|
|
2386
2387
|
RawSliderInput,
|
|
2387
2388
|
__spreadValues({
|
|
2388
2389
|
value,
|
|
@@ -2399,7 +2400,7 @@ function TextInput({ helperText, label, placeholder, rows, InputProps: InputProp
|
|
|
2399
2400
|
useEffect(() => {
|
|
2400
2401
|
setValue(defaultValue);
|
|
2401
2402
|
}, [defaultValue]);
|
|
2402
|
-
return /* @__PURE__ */
|
|
2403
|
+
return /* @__PURE__ */ React62.createElement(
|
|
2403
2404
|
TextField,
|
|
2404
2405
|
{
|
|
2405
2406
|
fullWidth: true,
|
|
@@ -2425,7 +2426,7 @@ var TILE_BUTTON = {
|
|
|
2425
2426
|
};
|
|
2426
2427
|
function Swatch({ paletteColors, value, onChange }) {
|
|
2427
2428
|
const renderButton2 = (colorValue) => {
|
|
2428
|
-
return /* @__PURE__ */
|
|
2429
|
+
return /* @__PURE__ */ React62.createElement(
|
|
2429
2430
|
Button$1,
|
|
2430
2431
|
{
|
|
2431
2432
|
key: colorValue,
|
|
@@ -2444,7 +2445,7 @@ function Swatch({ paletteColors, value, onChange }) {
|
|
|
2444
2445
|
}
|
|
2445
2446
|
);
|
|
2446
2447
|
};
|
|
2447
|
-
return /* @__PURE__ */
|
|
2448
|
+
return /* @__PURE__ */ React62.createElement(Box, { width: "100%", sx: { display: "grid", gap: 1, gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr" } }, paletteColors.map((c) => renderButton2(c)));
|
|
2448
2449
|
}
|
|
2449
2450
|
|
|
2450
2451
|
// src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/picker.tsx
|
|
@@ -2511,7 +2512,7 @@ var SX = {
|
|
|
2511
2512
|
}
|
|
2512
2513
|
};
|
|
2513
2514
|
function Picker({ value, onChange }) {
|
|
2514
|
-
return /* @__PURE__ */
|
|
2515
|
+
return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, sx: SX }, /* @__PURE__ */ React62.createElement(HexColorPicker, { color: value, onChange }), /* @__PURE__ */ React62.createElement(Swatch, { paletteColors: DEFAULT_PRESET_COLORS, value, onChange }), /* @__PURE__ */ React62.createElement(Box, { pt: 1 }, /* @__PURE__ */ React62.createElement(HexColorInput, { prefixed: true, color: value, onChange })));
|
|
2515
2516
|
}
|
|
2516
2517
|
|
|
2517
2518
|
// src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/base-color-input.tsx
|
|
@@ -2536,7 +2537,7 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
|
|
|
2536
2537
|
if (typeof value !== "string" || value.trim().length === 0) {
|
|
2537
2538
|
return null;
|
|
2538
2539
|
}
|
|
2539
|
-
return /* @__PURE__ */
|
|
2540
|
+
return /* @__PURE__ */ React62.createElement(
|
|
2540
2541
|
ButtonBase,
|
|
2541
2542
|
{
|
|
2542
2543
|
onClick: () => {
|
|
@@ -2544,16 +2545,16 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
|
|
|
2544
2545
|
onChange(null);
|
|
2545
2546
|
}
|
|
2546
2547
|
},
|
|
2547
|
-
/* @__PURE__ */
|
|
2548
|
+
/* @__PURE__ */ React62.createElement(CloseOutlined, { fontSize: "small", sx: { color: "grey.600" } })
|
|
2548
2549
|
);
|
|
2549
2550
|
};
|
|
2550
2551
|
const renderOpenButton = () => {
|
|
2551
2552
|
if (value) {
|
|
2552
|
-
return /* @__PURE__ */
|
|
2553
|
+
return /* @__PURE__ */ React62.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadProps(__spreadValues({}, BUTTON_SX), { bgcolor: value }) });
|
|
2553
2554
|
}
|
|
2554
|
-
return /* @__PURE__ */
|
|
2555
|
+
return /* @__PURE__ */ React62.createElement(ButtonBase, { onClick: handleClickOpen, sx: __spreadValues({}, BUTTON_SX) }, /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" }));
|
|
2555
2556
|
};
|
|
2556
|
-
return /* @__PURE__ */
|
|
2557
|
+
return /* @__PURE__ */ React62.createElement(Stack, { alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { sx: { mb: 0.5 } }, label), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 1 }, renderOpenButton(), renderResetButton()), /* @__PURE__ */ React62.createElement(
|
|
2557
2558
|
Menu,
|
|
2558
2559
|
{
|
|
2559
2560
|
anchorEl,
|
|
@@ -2563,7 +2564,7 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
|
|
|
2563
2564
|
sx: { height: "auto", padding: 0 }
|
|
2564
2565
|
}
|
|
2565
2566
|
},
|
|
2566
|
-
/* @__PURE__ */
|
|
2567
|
+
/* @__PURE__ */ React62.createElement(
|
|
2567
2568
|
Picker,
|
|
2568
2569
|
{
|
|
2569
2570
|
value: value || "",
|
|
@@ -2578,10 +2579,10 @@ function ColorInput({ label, defaultValue, onChange, nullable }) {
|
|
|
2578
2579
|
|
|
2579
2580
|
// src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/color-input/index.tsx
|
|
2580
2581
|
function ColorInput2(props) {
|
|
2581
|
-
return /* @__PURE__ */
|
|
2582
|
+
return /* @__PURE__ */ React62.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: false }));
|
|
2582
2583
|
}
|
|
2583
2584
|
function NullableColorInput(props) {
|
|
2584
|
-
return /* @__PURE__ */
|
|
2585
|
+
return /* @__PURE__ */ React62.createElement(ColorInput, __spreadProps(__spreadValues({}, props), { nullable: true }));
|
|
2585
2586
|
}
|
|
2586
2587
|
|
|
2587
2588
|
// src/editor/blocks/helpers/font-family.ts
|
|
@@ -2634,13 +2635,13 @@ var FONT_FAMILIES = [
|
|
|
2634
2635
|
];
|
|
2635
2636
|
|
|
2636
2637
|
// src/app/inspector-drawer/configuration-panel/input-panels/helpers/inputs/font-family.tsx
|
|
2637
|
-
var OPTIONS = FONT_FAMILIES.map((option) => /* @__PURE__ */
|
|
2638
|
+
var OPTIONS = FONT_FAMILIES.map((option) => /* @__PURE__ */ React62.createElement(MenuItem, { key: option.key, value: option.key, sx: { fontFamily: option.value } }, option.label));
|
|
2638
2639
|
function NullableFontFamily({ label, onChange, defaultValue }) {
|
|
2639
2640
|
const [value, setValue] = useState(defaultValue != null ? defaultValue : "inherit");
|
|
2640
2641
|
useEffect(() => {
|
|
2641
2642
|
setValue(defaultValue != null ? defaultValue : "inherit");
|
|
2642
2643
|
}, [defaultValue]);
|
|
2643
|
-
return /* @__PURE__ */
|
|
2644
|
+
return /* @__PURE__ */ React62.createElement(
|
|
2644
2645
|
TextField,
|
|
2645
2646
|
{
|
|
2646
2647
|
select: true,
|
|
@@ -2653,7 +2654,7 @@ function NullableFontFamily({ label, onChange, defaultValue }) {
|
|
|
2653
2654
|
onChange(v === null ? null : v);
|
|
2654
2655
|
}
|
|
2655
2656
|
},
|
|
2656
|
-
/* @__PURE__ */
|
|
2657
|
+
/* @__PURE__ */ React62.createElement(MenuItem, { value: "inherit" }, "Match email settings"),
|
|
2657
2658
|
OPTIONS
|
|
2658
2659
|
);
|
|
2659
2660
|
}
|
|
@@ -2666,10 +2667,10 @@ function FontSizeInput({ label, defaultValue, onChange }) {
|
|
|
2666
2667
|
setValue(value2);
|
|
2667
2668
|
onChange(value2);
|
|
2668
2669
|
};
|
|
2669
|
-
return /* @__PURE__ */
|
|
2670
|
+
return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
|
|
2670
2671
|
RawSliderInput,
|
|
2671
2672
|
{
|
|
2672
|
-
iconLabel: /* @__PURE__ */
|
|
2673
|
+
iconLabel: /* @__PURE__ */ React62.createElement(TextFieldsOutlined, { sx: { fontSize: 16 } }),
|
|
2673
2674
|
value,
|
|
2674
2675
|
setValue: handleChange,
|
|
2675
2676
|
units: "px",
|
|
@@ -2684,7 +2685,7 @@ function FontWeightInput({ label, defaultValue, onChange }) {
|
|
|
2684
2685
|
useEffect(() => {
|
|
2685
2686
|
setValue(defaultValue);
|
|
2686
2687
|
}, [defaultValue]);
|
|
2687
|
-
return /* @__PURE__ */
|
|
2688
|
+
return /* @__PURE__ */ React62.createElement(
|
|
2688
2689
|
RadioGroupInput,
|
|
2689
2690
|
{
|
|
2690
2691
|
label,
|
|
@@ -2694,8 +2695,8 @@ function FontWeightInput({ label, defaultValue, onChange }) {
|
|
|
2694
2695
|
onChange(fontWeight);
|
|
2695
2696
|
}
|
|
2696
2697
|
},
|
|
2697
|
-
/* @__PURE__ */
|
|
2698
|
-
/* @__PURE__ */
|
|
2698
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "normal" }, "Regular"),
|
|
2699
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "bold" }, "Bold")
|
|
2699
2700
|
);
|
|
2700
2701
|
}
|
|
2701
2702
|
function LetterSpacingInput({ label, defaultValue, onChange }) {
|
|
@@ -2707,10 +2708,10 @@ function LetterSpacingInput({ label, defaultValue, onChange }) {
|
|
|
2707
2708
|
setValue(v);
|
|
2708
2709
|
onChange(v === 0 ? null : v);
|
|
2709
2710
|
};
|
|
2710
|
-
return /* @__PURE__ */
|
|
2711
|
+
return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
|
|
2711
2712
|
RawSliderInput,
|
|
2712
2713
|
{
|
|
2713
|
-
iconLabel: /* @__PURE__ */
|
|
2714
|
+
iconLabel: /* @__PURE__ */ React62.createElement(SpaceBarOutlined, { sx: { fontSize: 16 } }),
|
|
2714
2715
|
value,
|
|
2715
2716
|
setValue: handleChange,
|
|
2716
2717
|
units: "px",
|
|
@@ -2729,10 +2730,10 @@ function LineHeightInput({ label, defaultValue, onChange }) {
|
|
|
2729
2730
|
setValue(v);
|
|
2730
2731
|
onChange(v === 0 ? null : v);
|
|
2731
2732
|
};
|
|
2732
|
-
return /* @__PURE__ */
|
|
2733
|
+
return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
|
|
2733
2734
|
RawSliderInput,
|
|
2734
2735
|
{
|
|
2735
|
-
iconLabel: /* @__PURE__ */
|
|
2736
|
+
iconLabel: /* @__PURE__ */ React62.createElement(FormatLineSpacingOutlined, { sx: { fontSize: 16 } }),
|
|
2736
2737
|
value,
|
|
2737
2738
|
setValue: handleChange,
|
|
2738
2739
|
units: "",
|
|
@@ -2761,10 +2762,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
|
|
|
2761
2762
|
setValue(v);
|
|
2762
2763
|
onChange(v);
|
|
2763
2764
|
}
|
|
2764
|
-
return /* @__PURE__ */
|
|
2765
|
+
return /* @__PURE__ */ React62.createElement(Stack, { spacing: 2, alignItems: "flex-start", pb: 1 }, /* @__PURE__ */ React62.createElement(InputLabel, { shrink: true }, label), /* @__PURE__ */ React62.createElement(
|
|
2765
2766
|
RawSliderInput,
|
|
2766
2767
|
{
|
|
2767
|
-
iconLabel: /* @__PURE__ */
|
|
2768
|
+
iconLabel: /* @__PURE__ */ React62.createElement(AlignVerticalTopOutlined, { sx: { fontSize: 16 } }),
|
|
2768
2769
|
value: value.top,
|
|
2769
2770
|
setValue: (num) => handleChange("top", num),
|
|
2770
2771
|
units: "px",
|
|
@@ -2773,10 +2774,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
|
|
|
2773
2774
|
max: 80,
|
|
2774
2775
|
marks: true
|
|
2775
2776
|
}
|
|
2776
|
-
), /* @__PURE__ */
|
|
2777
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2777
2778
|
RawSliderInput,
|
|
2778
2779
|
{
|
|
2779
|
-
iconLabel: /* @__PURE__ */
|
|
2780
|
+
iconLabel: /* @__PURE__ */ React62.createElement(AlignVerticalBottomOutlined, { sx: { fontSize: 16 } }),
|
|
2780
2781
|
value: value.bottom,
|
|
2781
2782
|
setValue: (num) => handleChange("bottom", num),
|
|
2782
2783
|
units: "px",
|
|
@@ -2785,10 +2786,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
|
|
|
2785
2786
|
max: 80,
|
|
2786
2787
|
marks: true
|
|
2787
2788
|
}
|
|
2788
|
-
), /* @__PURE__ */
|
|
2789
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2789
2790
|
RawSliderInput,
|
|
2790
2791
|
{
|
|
2791
|
-
iconLabel: /* @__PURE__ */
|
|
2792
|
+
iconLabel: /* @__PURE__ */ React62.createElement(AlignHorizontalLeftOutlined, { sx: { fontSize: 16 } }),
|
|
2792
2793
|
value: value.left,
|
|
2793
2794
|
setValue: (num) => handleChange("left", num),
|
|
2794
2795
|
units: "px",
|
|
@@ -2797,10 +2798,10 @@ function PaddingInput({ label, defaultValue, onChange }) {
|
|
|
2797
2798
|
max: 80,
|
|
2798
2799
|
marks: true
|
|
2799
2800
|
}
|
|
2800
|
-
), /* @__PURE__ */
|
|
2801
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2801
2802
|
RawSliderInput,
|
|
2802
2803
|
{
|
|
2803
|
-
iconLabel: /* @__PURE__ */
|
|
2804
|
+
iconLabel: /* @__PURE__ */ React62.createElement(AlignHorizontalRightOutlined, { sx: { fontSize: 16 } }),
|
|
2804
2805
|
value: value.right,
|
|
2805
2806
|
setValue: (num) => handleChange("right", num),
|
|
2806
2807
|
units: "px",
|
|
@@ -2816,7 +2817,7 @@ function TextAlignInput({ label, defaultValue, onChange }) {
|
|
|
2816
2817
|
useEffect(() => {
|
|
2817
2818
|
setValue(defaultValue != null ? defaultValue : "left");
|
|
2818
2819
|
}, [defaultValue]);
|
|
2819
|
-
return /* @__PURE__ */
|
|
2820
|
+
return /* @__PURE__ */ React62.createElement(
|
|
2820
2821
|
RadioGroupInput,
|
|
2821
2822
|
{
|
|
2822
2823
|
label,
|
|
@@ -2826,9 +2827,9 @@ function TextAlignInput({ label, defaultValue, onChange }) {
|
|
|
2826
2827
|
onChange(value2);
|
|
2827
2828
|
}
|
|
2828
2829
|
},
|
|
2829
|
-
/* @__PURE__ */
|
|
2830
|
-
/* @__PURE__ */
|
|
2831
|
-
/* @__PURE__ */
|
|
2830
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "left" }, /* @__PURE__ */ React62.createElement(FormatAlignLeftOutlined, { fontSize: "small" })),
|
|
2831
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "center" }, /* @__PURE__ */ React62.createElement(FormatAlignCenterOutlined, { fontSize: "small" })),
|
|
2832
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "right" }, /* @__PURE__ */ React62.createElement(FormatAlignRightOutlined, { fontSize: "small" }))
|
|
2832
2833
|
);
|
|
2833
2834
|
}
|
|
2834
2835
|
|
|
@@ -2841,14 +2842,14 @@ function SingleStylePropertyPanel({ name, value, onChange }) {
|
|
|
2841
2842
|
};
|
|
2842
2843
|
switch (name) {
|
|
2843
2844
|
case "backgroundColor":
|
|
2844
|
-
return /* @__PURE__ */
|
|
2845
|
+
return /* @__PURE__ */ React62.createElement(NullableColorInput, { label: t("style.background-color", "Background color"), defaultValue, onChange: handleChange });
|
|
2845
2846
|
case "borderColor":
|
|
2846
|
-
return /* @__PURE__ */
|
|
2847
|
+
return /* @__PURE__ */ React62.createElement(NullableColorInput, { label: t("style.border-color", "Border color"), defaultValue, onChange: handleChange });
|
|
2847
2848
|
case "borderRadius":
|
|
2848
|
-
return /* @__PURE__ */
|
|
2849
|
+
return /* @__PURE__ */ React62.createElement(
|
|
2849
2850
|
SliderInput,
|
|
2850
2851
|
{
|
|
2851
|
-
iconLabel: /* @__PURE__ */
|
|
2852
|
+
iconLabel: /* @__PURE__ */ React62.createElement(RoundedCornerOutlined, null),
|
|
2852
2853
|
units: "px",
|
|
2853
2854
|
step: 4,
|
|
2854
2855
|
marks: true,
|
|
@@ -2860,27 +2861,27 @@ function SingleStylePropertyPanel({ name, value, onChange }) {
|
|
|
2860
2861
|
}
|
|
2861
2862
|
);
|
|
2862
2863
|
case "color":
|
|
2863
|
-
return /* @__PURE__ */
|
|
2864
|
+
return /* @__PURE__ */ React62.createElement(NullableColorInput, { label: t("style.text-color", "Text color"), defaultValue, onChange: handleChange });
|
|
2864
2865
|
case "fontFamily":
|
|
2865
|
-
return /* @__PURE__ */
|
|
2866
|
+
return /* @__PURE__ */ React62.createElement(NullableFontFamily, { label: t("style.font-family", "Font family"), defaultValue, onChange: handleChange });
|
|
2866
2867
|
case "fontSize":
|
|
2867
|
-
return /* @__PURE__ */
|
|
2868
|
+
return /* @__PURE__ */ React62.createElement(FontSizeInput, { label: t("style.font-size", "Font size"), defaultValue, onChange: handleChange });
|
|
2868
2869
|
case "fontWeight":
|
|
2869
|
-
return /* @__PURE__ */
|
|
2870
|
+
return /* @__PURE__ */ React62.createElement(FontWeightInput, { label: t("style.font-weight", "Font weight"), defaultValue, onChange: handleChange });
|
|
2870
2871
|
case "lineHeight":
|
|
2871
|
-
return /* @__PURE__ */
|
|
2872
|
+
return /* @__PURE__ */ React62.createElement(LineHeightInput, { label: t("style.line-height", "Line height"), defaultValue, onChange: handleChange });
|
|
2872
2873
|
case "letterSpacing":
|
|
2873
|
-
return /* @__PURE__ */
|
|
2874
|
+
return /* @__PURE__ */ React62.createElement(LetterSpacingInput, { label: t("style.letter-spacing", "Letter spacing"), defaultValue, onChange: handleChange });
|
|
2874
2875
|
case "textAlign":
|
|
2875
|
-
return /* @__PURE__ */
|
|
2876
|
+
return /* @__PURE__ */ React62.createElement(TextAlignInput, { label: t("style.alignment", "Alignment"), defaultValue, onChange: handleChange });
|
|
2876
2877
|
case "padding":
|
|
2877
|
-
return /* @__PURE__ */
|
|
2878
|
+
return /* @__PURE__ */ React62.createElement(PaddingInput, { label: t("style.padding", "Padding"), defaultValue, onChange: handleChange });
|
|
2878
2879
|
}
|
|
2879
2880
|
}
|
|
2880
2881
|
|
|
2881
2882
|
// src/app/inspector-drawer/configuration-panel/input-panels/helpers/style-inputs/multi-style-property-panel.tsx
|
|
2882
2883
|
function MultiStylePropertyPanel({ names, value, onChange }) {
|
|
2883
|
-
return /* @__PURE__ */
|
|
2884
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, names.map((name) => /* @__PURE__ */ React62.createElement(SingleStylePropertyPanel, { key: name, name, value: value || {}, onChange })));
|
|
2884
2885
|
}
|
|
2885
2886
|
|
|
2886
2887
|
// src/app/inspector-drawer/configuration-panel/input-panels/avatar-sidebar-panel.tsx
|
|
@@ -2900,11 +2901,11 @@ function AvatarSidebarPanel({ data, setData }) {
|
|
|
2900
2901
|
const imageUrl = (_d = (_c = data.props) == null ? void 0 : _c.imageUrl) != null ? _d : AvatarPropsDefaults.imageUrl;
|
|
2901
2902
|
const alt = (_f = (_e = data.props) == null ? void 0 : _e.alt) != null ? _f : AvatarPropsDefaults.alt;
|
|
2902
2903
|
const shape = (_h = (_g = data.props) == null ? void 0 : _g.shape) != null ? _h : AvatarPropsDefaults.shape;
|
|
2903
|
-
return /* @__PURE__ */
|
|
2904
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Avatar block" }, /* @__PURE__ */ React62.createElement(
|
|
2904
2905
|
SliderInput,
|
|
2905
2906
|
{
|
|
2906
2907
|
label: t("field.size", "Size"),
|
|
2907
|
-
iconLabel: /* @__PURE__ */
|
|
2908
|
+
iconLabel: /* @__PURE__ */ React62.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
|
|
2908
2909
|
units: "px",
|
|
2909
2910
|
step: 3,
|
|
2910
2911
|
min: 32,
|
|
@@ -2914,7 +2915,7 @@ function AvatarSidebarPanel({ data, setData }) {
|
|
|
2914
2915
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { size: size2 }) }));
|
|
2915
2916
|
}
|
|
2916
2917
|
}
|
|
2917
|
-
), /* @__PURE__ */
|
|
2918
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2918
2919
|
RadioGroupInput,
|
|
2919
2920
|
{
|
|
2920
2921
|
label: t("avatar.shape", "Shape"),
|
|
@@ -2923,10 +2924,10 @@ function AvatarSidebarPanel({ data, setData }) {
|
|
|
2923
2924
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { shape: shape2 }) }));
|
|
2924
2925
|
}
|
|
2925
2926
|
},
|
|
2926
|
-
/* @__PURE__ */
|
|
2927
|
-
/* @__PURE__ */
|
|
2928
|
-
/* @__PURE__ */
|
|
2929
|
-
), /* @__PURE__ */
|
|
2927
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "circle" }, t("signature.shape.circle", "Circle")),
|
|
2928
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "square" }, t("signature.shape.square", "Square")),
|
|
2929
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "rounded" }, t("signature.shape.rounded", "Rounded"))
|
|
2930
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2930
2931
|
TextInput,
|
|
2931
2932
|
{
|
|
2932
2933
|
label: t("signature.image-url", "Image URL"),
|
|
@@ -2935,7 +2936,7 @@ function AvatarSidebarPanel({ data, setData }) {
|
|
|
2935
2936
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageUrl: imageUrl2 }) }));
|
|
2936
2937
|
}
|
|
2937
2938
|
}
|
|
2938
|
-
), /* @__PURE__ */
|
|
2939
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2939
2940
|
TextInput,
|
|
2940
2941
|
{
|
|
2941
2942
|
label: t("image.alt-text", "Alt text"),
|
|
@@ -2944,7 +2945,7 @@ function AvatarSidebarPanel({ data, setData }) {
|
|
|
2944
2945
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { alt: alt2 }) }));
|
|
2945
2946
|
}
|
|
2946
2947
|
}
|
|
2947
|
-
), /* @__PURE__ */
|
|
2948
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2948
2949
|
MultiStylePropertyPanel,
|
|
2949
2950
|
{
|
|
2950
2951
|
names: ["textAlign", "padding"],
|
|
@@ -2972,65 +2973,65 @@ function ButtonSidebarPanel({ data, setData }) {
|
|
|
2972
2973
|
const buttonStyle = (_j = (_i = data.props) == null ? void 0 : _i.buttonStyle) != null ? _j : ButtonPropsDefaults.buttonStyle;
|
|
2973
2974
|
const buttonTextColor = (_l = (_k = data.props) == null ? void 0 : _k.buttonTextColor) != null ? _l : ButtonPropsDefaults.buttonTextColor;
|
|
2974
2975
|
const buttonBackgroundColor = (_n = (_m = data.props) == null ? void 0 : _m.buttonBackgroundColor) != null ? _n : ButtonPropsDefaults.buttonBackgroundColor;
|
|
2975
|
-
return /* @__PURE__ */
|
|
2976
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Button block" }, /* @__PURE__ */ React62.createElement(
|
|
2976
2977
|
TextInput,
|
|
2977
2978
|
{
|
|
2978
2979
|
label: t("field.text", "Text"),
|
|
2979
2980
|
defaultValue: text,
|
|
2980
2981
|
onChange: (text2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text: text2 }) }))
|
|
2981
2982
|
}
|
|
2982
|
-
), /* @__PURE__ */
|
|
2983
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2983
2984
|
TextInput,
|
|
2984
2985
|
{
|
|
2985
2986
|
label: t("field.url", "Url"),
|
|
2986
2987
|
defaultValue: url,
|
|
2987
2988
|
onChange: (url2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { url: url2 }) }))
|
|
2988
2989
|
}
|
|
2989
|
-
), /* @__PURE__ */
|
|
2990
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2990
2991
|
RadioGroupInput,
|
|
2991
2992
|
{
|
|
2992
2993
|
label: t("field.width", "Width"),
|
|
2993
2994
|
defaultValue: fullWidth ? "FULL_WIDTH" : "AUTO",
|
|
2994
2995
|
onChange: (v) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { fullWidth: v === "FULL_WIDTH" }) }))
|
|
2995
2996
|
},
|
|
2996
|
-
/* @__PURE__ */
|
|
2997
|
-
/* @__PURE__ */
|
|
2998
|
-
), /* @__PURE__ */
|
|
2997
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "FULL_WIDTH" }, t("button.width.full", "Full")),
|
|
2998
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "AUTO" }, t("button.width.auto", "Auto"))
|
|
2999
|
+
), /* @__PURE__ */ React62.createElement(
|
|
2999
3000
|
RadioGroupInput,
|
|
3000
3001
|
{
|
|
3001
3002
|
label: t("field.size", "Size"),
|
|
3002
3003
|
defaultValue: size,
|
|
3003
3004
|
onChange: (size2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { size: size2 }) }))
|
|
3004
3005
|
},
|
|
3005
|
-
/* @__PURE__ */
|
|
3006
|
-
/* @__PURE__ */
|
|
3007
|
-
/* @__PURE__ */
|
|
3008
|
-
/* @__PURE__ */
|
|
3009
|
-
), /* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "x-small" }, t("size.xs", "Xs")),
|
|
3007
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "small" }, t("size.sm", "Sm")),
|
|
3008
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "medium" }, t("size.md", "Md")),
|
|
3009
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "large" }, t("size.lg", "Lg"))
|
|
3010
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3010
3011
|
RadioGroupInput,
|
|
3011
3012
|
{
|
|
3012
3013
|
label: t("field.style", "Style"),
|
|
3013
3014
|
defaultValue: buttonStyle,
|
|
3014
3015
|
onChange: (buttonStyle2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonStyle: buttonStyle2 }) }))
|
|
3015
3016
|
},
|
|
3016
|
-
/* @__PURE__ */
|
|
3017
|
-
/* @__PURE__ */
|
|
3018
|
-
/* @__PURE__ */
|
|
3019
|
-
), /* @__PURE__ */
|
|
3017
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "rectangle" }, t("button.style.rectangle", "Rectangle")),
|
|
3018
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "rounded" }, t("button.style.rounded", "Rounded")),
|
|
3019
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "pill" }, t("button.style.pill", "Pill"))
|
|
3020
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3020
3021
|
ColorInput2,
|
|
3021
3022
|
{
|
|
3022
3023
|
label: t("style.text-color", "Text color"),
|
|
3023
3024
|
defaultValue: buttonTextColor,
|
|
3024
3025
|
onChange: (buttonTextColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonTextColor: buttonTextColor2 }) }))
|
|
3025
3026
|
}
|
|
3026
|
-
), /* @__PURE__ */
|
|
3027
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3027
3028
|
ColorInput2,
|
|
3028
3029
|
{
|
|
3029
3030
|
label: t("button.color", "Button color"),
|
|
3030
3031
|
defaultValue: buttonBackgroundColor,
|
|
3031
3032
|
onChange: (buttonBackgroundColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { buttonBackgroundColor: buttonBackgroundColor2 }) }))
|
|
3032
3033
|
}
|
|
3033
|
-
), /* @__PURE__ */
|
|
3034
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3034
3035
|
MultiStylePropertyPanel,
|
|
3035
3036
|
{
|
|
3036
3037
|
names: [
|
|
@@ -3065,7 +3066,7 @@ function TextDimensionInput({ label, defaultValue, onChange }) {
|
|
|
3065
3066
|
const value = parseInt(ev.target.value);
|
|
3066
3067
|
onChange(isNaN(value) ? null : value);
|
|
3067
3068
|
};
|
|
3068
|
-
return /* @__PURE__ */
|
|
3069
|
+
return /* @__PURE__ */ React62.createElement(
|
|
3069
3070
|
TextField,
|
|
3070
3071
|
{
|
|
3071
3072
|
fullWidth: true,
|
|
@@ -3076,7 +3077,7 @@ function TextDimensionInput({ label, defaultValue, onChange }) {
|
|
|
3076
3077
|
placeholder: "auto",
|
|
3077
3078
|
size: "small",
|
|
3078
3079
|
InputProps: {
|
|
3079
|
-
endAdornment: /* @__PURE__ */
|
|
3080
|
+
endAdornment: /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", color: "text.secondary" }, "px")
|
|
3080
3081
|
}
|
|
3081
3082
|
}
|
|
3082
3083
|
);
|
|
@@ -3098,7 +3099,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
|
|
|
3098
3099
|
};
|
|
3099
3100
|
let column3 = null;
|
|
3100
3101
|
{
|
|
3101
|
-
column3 = /* @__PURE__ */
|
|
3102
|
+
column3 = /* @__PURE__ */ React62.createElement(
|
|
3102
3103
|
TextDimensionInput,
|
|
3103
3104
|
{
|
|
3104
3105
|
label: "Column 3",
|
|
@@ -3109,7 +3110,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
|
|
|
3109
3110
|
}
|
|
3110
3111
|
);
|
|
3111
3112
|
}
|
|
3112
|
-
return /* @__PURE__ */
|
|
3113
|
+
return /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 1 }, /* @__PURE__ */ React62.createElement(
|
|
3113
3114
|
TextDimensionInput,
|
|
3114
3115
|
{
|
|
3115
3116
|
label: "Column 1",
|
|
@@ -3118,7 +3119,7 @@ function ColumnWidthsInput({ defaultValue, onChange }) {
|
|
|
3118
3119
|
setIndexValue(0, v);
|
|
3119
3120
|
}
|
|
3120
3121
|
}
|
|
3121
|
-
), /* @__PURE__ */
|
|
3122
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3122
3123
|
TextDimensionInput,
|
|
3123
3124
|
{
|
|
3124
3125
|
label: "Column 2",
|
|
@@ -3143,7 +3144,7 @@ function ColumnsContainerPanel({ data, setData }) {
|
|
|
3143
3144
|
setErrors(res.error);
|
|
3144
3145
|
}
|
|
3145
3146
|
};
|
|
3146
|
-
return /* @__PURE__ */
|
|
3147
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Columns block" }, /* @__PURE__ */ React62.createElement(
|
|
3147
3148
|
RadioGroupInput,
|
|
3148
3149
|
{
|
|
3149
3150
|
label: t("columns.count", "Number of columns"),
|
|
@@ -3152,9 +3153,9 @@ function ColumnsContainerPanel({ data, setData }) {
|
|
|
3152
3153
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { columnsCount: v === "2" ? 2 : 3 }) }));
|
|
3153
3154
|
}
|
|
3154
3155
|
},
|
|
3155
|
-
/* @__PURE__ */
|
|
3156
|
-
/* @__PURE__ */
|
|
3157
|
-
), /* @__PURE__ */
|
|
3156
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "2" }, "2"),
|
|
3157
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "3" }, "3")
|
|
3158
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3158
3159
|
ColumnWidthsInput,
|
|
3159
3160
|
{
|
|
3160
3161
|
defaultValue: (_b = data.props) == null ? void 0 : _b.fixedWidths,
|
|
@@ -3162,11 +3163,11 @@ function ColumnsContainerPanel({ data, setData }) {
|
|
|
3162
3163
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { fixedWidths }) }));
|
|
3163
3164
|
}
|
|
3164
3165
|
}
|
|
3165
|
-
), /* @__PURE__ */
|
|
3166
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3166
3167
|
SliderInput,
|
|
3167
3168
|
{
|
|
3168
3169
|
label: t("columns.gap", "Columns gap"),
|
|
3169
|
-
iconLabel: /* @__PURE__ */
|
|
3170
|
+
iconLabel: /* @__PURE__ */ React62.createElement(SpaceBarOutlined, { sx: { color: "text.secondary" } }),
|
|
3170
3171
|
units: "px",
|
|
3171
3172
|
step: 4,
|
|
3172
3173
|
marks: true,
|
|
@@ -3175,7 +3176,7 @@ function ColumnsContainerPanel({ data, setData }) {
|
|
|
3175
3176
|
defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.columnsGap) != null ? _d : 0,
|
|
3176
3177
|
onChange: (columnsGap) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { columnsGap }) }))
|
|
3177
3178
|
}
|
|
3178
|
-
), /* @__PURE__ */
|
|
3179
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3179
3180
|
RadioGroupInput,
|
|
3180
3181
|
{
|
|
3181
3182
|
label: t("style.alignment", "Alignment"),
|
|
@@ -3184,10 +3185,10 @@ function ColumnsContainerPanel({ data, setData }) {
|
|
|
3184
3185
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contentAlignment }) }));
|
|
3185
3186
|
}
|
|
3186
3187
|
},
|
|
3187
|
-
/* @__PURE__ */
|
|
3188
|
-
/* @__PURE__ */
|
|
3189
|
-
/* @__PURE__ */
|
|
3190
|
-
), /* @__PURE__ */
|
|
3188
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React62.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
|
|
3189
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React62.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
|
|
3190
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React62.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
|
|
3191
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3191
3192
|
MultiStylePropertyPanel,
|
|
3192
3193
|
{
|
|
3193
3194
|
names: ["backgroundColor", "padding"],
|
|
@@ -3216,7 +3217,7 @@ function ContainerSidebarPanel({ data, setData }) {
|
|
|
3216
3217
|
setErrors(res.error);
|
|
3217
3218
|
}
|
|
3218
3219
|
};
|
|
3219
|
-
return /* @__PURE__ */
|
|
3220
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Container block" }, /* @__PURE__ */ React62.createElement(
|
|
3220
3221
|
MultiStylePropertyPanel,
|
|
3221
3222
|
{
|
|
3222
3223
|
names: ["backgroundColor", "borderColor", "borderRadius", "padding"],
|
|
@@ -3239,18 +3240,18 @@ function DividerSidebarPanel({ data, setData }) {
|
|
|
3239
3240
|
};
|
|
3240
3241
|
const lineColor = (_b = (_a = data.props) == null ? void 0 : _a.lineColor) != null ? _b : DividerPropsDefaults.lineColor;
|
|
3241
3242
|
const lineHeight = (_d = (_c = data.props) == null ? void 0 : _c.lineHeight) != null ? _d : DividerPropsDefaults.lineHeight;
|
|
3242
|
-
return /* @__PURE__ */
|
|
3243
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Divider block" }, /* @__PURE__ */ React62.createElement(
|
|
3243
3244
|
ColorInput2,
|
|
3244
3245
|
{
|
|
3245
3246
|
label: t("divider.color", "Color"),
|
|
3246
3247
|
defaultValue: lineColor,
|
|
3247
3248
|
onChange: (lineColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { lineColor: lineColor2 }) }))
|
|
3248
3249
|
}
|
|
3249
|
-
), /* @__PURE__ */
|
|
3250
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3250
3251
|
SliderInput,
|
|
3251
3252
|
{
|
|
3252
3253
|
label: t("field.height", "Height"),
|
|
3253
|
-
iconLabel: /* @__PURE__ */
|
|
3254
|
+
iconLabel: /* @__PURE__ */ React62.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
|
|
3254
3255
|
units: "px",
|
|
3255
3256
|
step: 1,
|
|
3256
3257
|
min: 1,
|
|
@@ -3258,7 +3259,7 @@ function DividerSidebarPanel({ data, setData }) {
|
|
|
3258
3259
|
defaultValue: lineHeight,
|
|
3259
3260
|
onChange: (lineHeight2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { lineHeight: lineHeight2 }) }))
|
|
3260
3261
|
}
|
|
3261
|
-
), /* @__PURE__ */
|
|
3262
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3262
3263
|
MultiStylePropertyPanel,
|
|
3263
3264
|
{
|
|
3264
3265
|
names: ["backgroundColor", "padding"],
|
|
@@ -3302,11 +3303,11 @@ function BooleanInput({ label, defaultValue, onChange }) {
|
|
|
3302
3303
|
useEffect(() => {
|
|
3303
3304
|
setValue(defaultValue);
|
|
3304
3305
|
}, [defaultValue]);
|
|
3305
|
-
return /* @__PURE__ */
|
|
3306
|
+
return /* @__PURE__ */ React62.createElement(
|
|
3306
3307
|
FormControlLabel,
|
|
3307
3308
|
{
|
|
3308
3309
|
label,
|
|
3309
|
-
control: /* @__PURE__ */
|
|
3310
|
+
control: /* @__PURE__ */ React62.createElement(
|
|
3310
3311
|
Switch,
|
|
3311
3312
|
{
|
|
3312
3313
|
checked: value,
|
|
@@ -3334,38 +3335,38 @@ function EmailLayoutSidebarFields({ data, setData }) {
|
|
|
3334
3335
|
}
|
|
3335
3336
|
};
|
|
3336
3337
|
const backdropDisabled = (_a = data.backdropDisabled) != null ? _a : false;
|
|
3337
|
-
return /* @__PURE__ */
|
|
3338
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Global" }, /* @__PURE__ */ React62.createElement(
|
|
3338
3339
|
BooleanInput,
|
|
3339
3340
|
{
|
|
3340
3341
|
label: t("global.disable-backdrop", "Disable backdrop"),
|
|
3341
3342
|
defaultValue: backdropDisabled,
|
|
3342
3343
|
onChange: (backdropDisabled2) => updateData(__spreadProps(__spreadValues({}, data), { backdropDisabled: backdropDisabled2 }))
|
|
3343
3344
|
}
|
|
3344
|
-
), !backdropDisabled && /* @__PURE__ */
|
|
3345
|
+
), !backdropDisabled && /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
3345
3346
|
ColorInput2,
|
|
3346
3347
|
{
|
|
3347
3348
|
label: t("global.backdrop-color", "Backdrop color"),
|
|
3348
3349
|
defaultValue: (_b = data.backdropColor) != null ? _b : "#F5F5F5",
|
|
3349
3350
|
onChange: (backdropColor) => updateData(__spreadProps(__spreadValues({}, data), { backdropColor }))
|
|
3350
3351
|
}
|
|
3351
|
-
), /* @__PURE__ */
|
|
3352
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3352
3353
|
ColorInput2,
|
|
3353
3354
|
{
|
|
3354
3355
|
label: t("global.canvas-color", "Canvas color"),
|
|
3355
3356
|
defaultValue: (_c = data.canvasColor) != null ? _c : "#FFFFFF",
|
|
3356
3357
|
onChange: (canvasColor) => updateData(__spreadProps(__spreadValues({}, data), { canvasColor }))
|
|
3357
3358
|
}
|
|
3358
|
-
), /* @__PURE__ */
|
|
3359
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3359
3360
|
NullableColorInput,
|
|
3360
3361
|
{
|
|
3361
3362
|
label: t("global.canvas-border-color", "Canvas border color"),
|
|
3362
3363
|
defaultValue: (_d = data.borderColor) != null ? _d : null,
|
|
3363
3364
|
onChange: (borderColor) => updateData(__spreadProps(__spreadValues({}, data), { borderColor }))
|
|
3364
3365
|
}
|
|
3365
|
-
), /* @__PURE__ */
|
|
3366
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3366
3367
|
SliderInput,
|
|
3367
3368
|
{
|
|
3368
|
-
iconLabel: /* @__PURE__ */
|
|
3369
|
+
iconLabel: /* @__PURE__ */ React62.createElement(RoundedCornerOutlined, null),
|
|
3369
3370
|
units: "px",
|
|
3370
3371
|
step: 4,
|
|
3371
3372
|
marks: true,
|
|
@@ -3375,14 +3376,14 @@ function EmailLayoutSidebarFields({ data, setData }) {
|
|
|
3375
3376
|
defaultValue: (_e = data.borderRadius) != null ? _e : 0,
|
|
3376
3377
|
onChange: (borderRadius) => updateData(__spreadProps(__spreadValues({}, data), { borderRadius }))
|
|
3377
3378
|
}
|
|
3378
|
-
)), /* @__PURE__ */
|
|
3379
|
+
)), /* @__PURE__ */ React62.createElement(
|
|
3379
3380
|
NullableFontFamily,
|
|
3380
3381
|
{
|
|
3381
3382
|
label: t("style.font-family", "Font family"),
|
|
3382
3383
|
defaultValue: "MODERN_SANS",
|
|
3383
3384
|
onChange: (fontFamily) => updateData(__spreadProps(__spreadValues({}, data), { fontFamily }))
|
|
3384
3385
|
}
|
|
3385
|
-
), /* @__PURE__ */
|
|
3386
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3386
3387
|
ColorInput2,
|
|
3387
3388
|
{
|
|
3388
3389
|
label: t("style.text-color", "Text color"),
|
|
@@ -3403,7 +3404,7 @@ function HeadingSidebarPanel({ data, setData }) {
|
|
|
3403
3404
|
setErrors(res.error);
|
|
3404
3405
|
}
|
|
3405
3406
|
};
|
|
3406
|
-
return /* @__PURE__ */
|
|
3407
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Heading block" }, /* @__PURE__ */ React62.createElement(
|
|
3407
3408
|
TextInput,
|
|
3408
3409
|
{
|
|
3409
3410
|
label: t("field.content", "Content"),
|
|
@@ -3413,7 +3414,7 @@ function HeadingSidebarPanel({ data, setData }) {
|
|
|
3413
3414
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text }) }));
|
|
3414
3415
|
}
|
|
3415
3416
|
}
|
|
3416
|
-
), /* @__PURE__ */
|
|
3417
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3417
3418
|
RadioGroupInput,
|
|
3418
3419
|
{
|
|
3419
3420
|
label: t("field.level", "Level"),
|
|
@@ -3422,10 +3423,10 @@ function HeadingSidebarPanel({ data, setData }) {
|
|
|
3422
3423
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { level }) }));
|
|
3423
3424
|
}
|
|
3424
3425
|
},
|
|
3425
|
-
/* @__PURE__ */
|
|
3426
|
-
/* @__PURE__ */
|
|
3427
|
-
/* @__PURE__ */
|
|
3428
|
-
), /* @__PURE__ */
|
|
3426
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "h1" }, "H1"),
|
|
3427
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "h2" }, "H2"),
|
|
3428
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "h3" }, "H3")
|
|
3429
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3429
3430
|
MultiStylePropertyPanel,
|
|
3430
3431
|
{
|
|
3431
3432
|
names: [
|
|
@@ -3455,7 +3456,7 @@ function HtmlSidebarPanel({ data, setData }) {
|
|
|
3455
3456
|
setErrors(res.error);
|
|
3456
3457
|
}
|
|
3457
3458
|
};
|
|
3458
|
-
return /* @__PURE__ */
|
|
3459
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Html block" }, /* @__PURE__ */ React62.createElement(
|
|
3459
3460
|
TextInput,
|
|
3460
3461
|
{
|
|
3461
3462
|
label: t("field.content", "Content"),
|
|
@@ -3463,7 +3464,7 @@ function HtmlSidebarPanel({ data, setData }) {
|
|
|
3463
3464
|
defaultValue: (_b = (_a = data.props) == null ? void 0 : _a.contents) != null ? _b : "",
|
|
3464
3465
|
onChange: (contents) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contents }) }))
|
|
3465
3466
|
}
|
|
3466
|
-
), /* @__PURE__ */
|
|
3467
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3467
3468
|
MultiStylePropertyPanel,
|
|
3468
3469
|
{
|
|
3469
3470
|
names: ["color", "backgroundColor", "fontFamily", "fontSize", "textAlign", "padding"],
|
|
@@ -3520,7 +3521,7 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
|
|
|
3520
3521
|
setBusy(false);
|
|
3521
3522
|
}
|
|
3522
3523
|
});
|
|
3523
|
-
return /* @__PURE__ */
|
|
3524
|
+
return /* @__PURE__ */ React62.createElement(Dialog, { open, onClose, maxWidth: "md", fullWidth: true }, /* @__PURE__ */ React62.createElement(DialogTitle, null, "Image library"), /* @__PURE__ */ React62.createElement(DialogContent, { dividers: true }, /* @__PURE__ */ React62.createElement(
|
|
3524
3525
|
TextField,
|
|
3525
3526
|
{
|
|
3526
3527
|
fullWidth: true,
|
|
@@ -3530,11 +3531,11 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
|
|
|
3530
3531
|
onChange: (e) => setQuery(e.target.value),
|
|
3531
3532
|
autoFocus: true,
|
|
3532
3533
|
InputProps: {
|
|
3533
|
-
startAdornment: /* @__PURE__ */
|
|
3534
|
+
startAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(SearchOutlined, { fontSize: "small" }))
|
|
3534
3535
|
},
|
|
3535
3536
|
sx: { mb: 2 }
|
|
3536
3537
|
}
|
|
3537
|
-
), error && /* @__PURE__ */
|
|
3538
|
+
), error && /* @__PURE__ */ React62.createElement(Alert, { severity: "error", sx: { mb: 2 } }, error), busy && !images && /* @__PURE__ */ React62.createElement(Stack, { alignItems: "center", sx: { py: 4 } }, /* @__PURE__ */ React62.createElement(CircularProgress, { size: 28 })), filtered && filtered.length === 0 && /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", textAlign: "center", py: 4 } }, query ? "No images match your search." : "No images in the library yet."), filtered && filtered.length > 0 && /* @__PURE__ */ React62.createElement(
|
|
3538
3539
|
Box,
|
|
3539
3540
|
{
|
|
3540
3541
|
sx: {
|
|
@@ -3543,7 +3544,7 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
|
|
|
3543
3544
|
gap: 1.5
|
|
3544
3545
|
}
|
|
3545
3546
|
},
|
|
3546
|
-
filtered.map((img) => /* @__PURE__ */
|
|
3547
|
+
filtered.map((img) => /* @__PURE__ */ React62.createElement(
|
|
3547
3548
|
ImageTile,
|
|
3548
3549
|
{
|
|
3549
3550
|
key: img.url,
|
|
@@ -3552,7 +3553,7 @@ function ImageLibraryDialog({ open, onClose, onPick }) {
|
|
|
3552
3553
|
onDelete: deleteImage ? () => handleDelete(img.url) : void 0
|
|
3553
3554
|
}
|
|
3554
3555
|
))
|
|
3555
|
-
)), /* @__PURE__ */
|
|
3556
|
+
)), /* @__PURE__ */ React62.createElement(DialogActions, null, /* @__PURE__ */ React62.createElement(Button$1, { onClick: onClose }, "Close")));
|
|
3556
3557
|
}
|
|
3557
3558
|
function ImageTile({
|
|
3558
3559
|
image,
|
|
@@ -3562,7 +3563,7 @@ function ImageTile({
|
|
|
3562
3563
|
var _a, _b;
|
|
3563
3564
|
const src = (_a = image.thumbnailUrl) != null ? _a : image.url;
|
|
3564
3565
|
const label = image.alt || image.url.split("/").pop() || "image";
|
|
3565
|
-
return /* @__PURE__ */
|
|
3566
|
+
return /* @__PURE__ */ React62.createElement(
|
|
3566
3567
|
Box,
|
|
3567
3568
|
{
|
|
3568
3569
|
sx: {
|
|
@@ -3578,7 +3579,7 @@ function ImageTile({
|
|
|
3578
3579
|
},
|
|
3579
3580
|
onClick: onPick
|
|
3580
3581
|
},
|
|
3581
|
-
/* @__PURE__ */
|
|
3582
|
+
/* @__PURE__ */ React62.createElement(
|
|
3582
3583
|
Box,
|
|
3583
3584
|
{
|
|
3584
3585
|
component: "img",
|
|
@@ -3587,8 +3588,8 @@ function ImageTile({
|
|
|
3587
3588
|
sx: { display: "block", width: "100%", aspectRatio: "1 / 1", objectFit: "cover", backgroundColor: "#f5f5f5" }
|
|
3588
3589
|
}
|
|
3589
3590
|
),
|
|
3590
|
-
/* @__PURE__ */
|
|
3591
|
-
onDelete && /* @__PURE__ */
|
|
3591
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { p: 0.75, fontSize: 11, color: "text.secondary", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, label),
|
|
3592
|
+
onDelete && /* @__PURE__ */ React62.createElement(Tooltip, { title: "Delete from library" }, /* @__PURE__ */ React62.createElement(
|
|
3592
3593
|
IconButton,
|
|
3593
3594
|
{
|
|
3594
3595
|
size: "small",
|
|
@@ -3608,7 +3609,7 @@ function ImageTile({
|
|
|
3608
3609
|
},
|
|
3609
3610
|
"aria-label": "Delete image"
|
|
3610
3611
|
},
|
|
3611
|
-
/* @__PURE__ */
|
|
3612
|
+
/* @__PURE__ */ React62.createElement(DeleteOutline, { fontSize: "small" })
|
|
3612
3613
|
))
|
|
3613
3614
|
);
|
|
3614
3615
|
}
|
|
@@ -3661,13 +3662,13 @@ function ImageSidebarPanel({ data, setData }) {
|
|
|
3661
3662
|
});
|
|
3662
3663
|
const url = (_b = (_a = data.props) == null ? void 0 : _a.url) != null ? _b : "";
|
|
3663
3664
|
const showHttpWarning = isHttpUrl(url);
|
|
3664
|
-
return /* @__PURE__ */
|
|
3665
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Image block" }, (uploadImage || loadImages) && /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 1 }, uploadImage && /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
3665
3666
|
Button$1,
|
|
3666
3667
|
{
|
|
3667
3668
|
fullWidth: true,
|
|
3668
3669
|
variant: "outlined",
|
|
3669
3670
|
size: "small",
|
|
3670
|
-
startIcon: uploading ? /* @__PURE__ */
|
|
3671
|
+
startIcon: uploading ? /* @__PURE__ */ React62.createElement(CircularProgress, { size: 14 }) : /* @__PURE__ */ React62.createElement(CloudUploadOutlined, { fontSize: "small" }),
|
|
3671
3672
|
disabled: uploading,
|
|
3672
3673
|
onClick: () => {
|
|
3673
3674
|
var _a2;
|
|
@@ -3675,7 +3676,7 @@ function ImageSidebarPanel({ data, setData }) {
|
|
|
3675
3676
|
}
|
|
3676
3677
|
},
|
|
3677
3678
|
uploading ? t("image.uploading", "Uploading\u2026") : t("image.upload", "Upload")
|
|
3678
|
-
), /* @__PURE__ */
|
|
3679
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3679
3680
|
"input",
|
|
3680
3681
|
{
|
|
3681
3682
|
ref: fileInputRef,
|
|
@@ -3689,17 +3690,17 @@ function ImageSidebarPanel({ data, setData }) {
|
|
|
3689
3690
|
if (file) yield handleFile(file);
|
|
3690
3691
|
})
|
|
3691
3692
|
}
|
|
3692
|
-
)), loadImages && /* @__PURE__ */
|
|
3693
|
+
)), loadImages && /* @__PURE__ */ React62.createElement(
|
|
3693
3694
|
Button$1,
|
|
3694
3695
|
{
|
|
3695
3696
|
fullWidth: true,
|
|
3696
3697
|
variant: "outlined",
|
|
3697
3698
|
size: "small",
|
|
3698
|
-
startIcon: /* @__PURE__ */
|
|
3699
|
+
startIcon: /* @__PURE__ */ React62.createElement(CollectionsOutlined, { fontSize: "small" }),
|
|
3699
3700
|
onClick: () => setLibraryOpen(true)
|
|
3700
3701
|
},
|
|
3701
3702
|
t("image.library", "Library")
|
|
3702
|
-
)), uploadError && /* @__PURE__ */
|
|
3703
|
+
)), uploadError && /* @__PURE__ */ React62.createElement(Alert, { severity: "error", onClose: () => setUploadError(null), sx: { mt: 1 } }, uploadError), /* @__PURE__ */ React62.createElement(
|
|
3703
3704
|
TextInput,
|
|
3704
3705
|
{
|
|
3705
3706
|
label: t("image.source-url", "Source URL"),
|
|
@@ -3709,14 +3710,14 @@ function ImageSidebarPanel({ data, setData }) {
|
|
|
3709
3710
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { url: next }) }));
|
|
3710
3711
|
}
|
|
3711
3712
|
}
|
|
3712
|
-
), showHttpWarning && /* @__PURE__ */
|
|
3713
|
+
), showHttpWarning && /* @__PURE__ */ React62.createElement(Box, { sx: { mt: -1, mb: 1, display: "flex", alignItems: "flex-start", gap: 0.75 } }, /* @__PURE__ */ React62.createElement(ErrorOutlineOutlined, { fontSize: "small", sx: { color: "warning.main", mt: "2px" } }), /* @__PURE__ */ React62.createElement(Box, { sx: { fontSize: 12, color: "warning.dark" } }, t("image.http-warning", "Non-HTTPS URL: Gmail and other clients strip mixed content. Use https:// for reliable delivery."))), /* @__PURE__ */ React62.createElement(
|
|
3713
3714
|
TextInput,
|
|
3714
3715
|
{
|
|
3715
3716
|
label: t("image.alt-text", "Alt text"),
|
|
3716
3717
|
defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.alt) != null ? _d : "",
|
|
3717
3718
|
onChange: (alt) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { alt }) }))
|
|
3718
3719
|
}
|
|
3719
|
-
), /* @__PURE__ */
|
|
3720
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3720
3721
|
TextInput,
|
|
3721
3722
|
{
|
|
3722
3723
|
label: t("image.link-href", "Click through URL"),
|
|
@@ -3726,38 +3727,38 @@ function ImageSidebarPanel({ data, setData }) {
|
|
|
3726
3727
|
updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { linkHref }) }));
|
|
3727
3728
|
}
|
|
3728
3729
|
}
|
|
3729
|
-
), /* @__PURE__ */
|
|
3730
|
+
), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React62.createElement(
|
|
3730
3731
|
TextDimensionInput,
|
|
3731
3732
|
{
|
|
3732
3733
|
label: t("field.width", "Width"),
|
|
3733
3734
|
defaultValue: (_g = data.props) == null ? void 0 : _g.width,
|
|
3734
3735
|
onChange: (width) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { width }) }))
|
|
3735
3736
|
}
|
|
3736
|
-
), /* @__PURE__ */
|
|
3737
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3737
3738
|
TextDimensionInput,
|
|
3738
3739
|
{
|
|
3739
3740
|
label: t("field.height", "Height"),
|
|
3740
3741
|
defaultValue: (_h = data.props) == null ? void 0 : _h.height,
|
|
3741
3742
|
onChange: (height) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { height }) }))
|
|
3742
3743
|
}
|
|
3743
|
-
)), /* @__PURE__ */
|
|
3744
|
+
)), /* @__PURE__ */ React62.createElement(
|
|
3744
3745
|
RadioGroupInput,
|
|
3745
3746
|
{
|
|
3746
3747
|
label: t("style.alignment", "Alignment"),
|
|
3747
3748
|
defaultValue: (_j = (_i = data.props) == null ? void 0 : _i.contentAlignment) != null ? _j : "middle",
|
|
3748
3749
|
onChange: (contentAlignment) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { contentAlignment }) }))
|
|
3749
3750
|
},
|
|
3750
|
-
/* @__PURE__ */
|
|
3751
|
-
/* @__PURE__ */
|
|
3752
|
-
/* @__PURE__ */
|
|
3753
|
-
), /* @__PURE__ */
|
|
3751
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "top" }, /* @__PURE__ */ React62.createElement(VerticalAlignTopOutlined, { fontSize: "small" })),
|
|
3752
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "middle" }, /* @__PURE__ */ React62.createElement(VerticalAlignCenterOutlined, { fontSize: "small" })),
|
|
3753
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "bottom" }, /* @__PURE__ */ React62.createElement(VerticalAlignBottomOutlined, { fontSize: "small" }))
|
|
3754
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3754
3755
|
MultiStylePropertyPanel,
|
|
3755
3756
|
{
|
|
3756
3757
|
names: ["backgroundColor", "textAlign", "padding"],
|
|
3757
3758
|
value: data.style,
|
|
3758
3759
|
onChange: (style) => updateData(__spreadProps(__spreadValues({}, data), { style }))
|
|
3759
3760
|
}
|
|
3760
|
-
), loadImages && /* @__PURE__ */
|
|
3761
|
+
), loadImages && /* @__PURE__ */ React62.createElement(
|
|
3761
3762
|
ImageLibraryDialog,
|
|
3762
3763
|
{
|
|
3763
3764
|
open: libraryOpen,
|
|
@@ -3796,74 +3797,74 @@ function SignatureSidebarPanel({ data, setData }) {
|
|
|
3796
3797
|
const nameColor = (_z = (_y = data.props) == null ? void 0 : _y.nameColor) != null ? _z : SignaturePropsDefaults.nameColor;
|
|
3797
3798
|
const textColor = (_B = (_A = data.props) == null ? void 0 : _A.textColor) != null ? _B : SignaturePropsDefaults.textColor;
|
|
3798
3799
|
const linkColor = (_D = (_C = data.props) == null ? void 0 : _C.linkColor) != null ? _D : SignaturePropsDefaults.linkColor;
|
|
3799
|
-
return /* @__PURE__ */
|
|
3800
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Signature block" }, /* @__PURE__ */ React62.createElement(
|
|
3800
3801
|
TextInput,
|
|
3801
3802
|
{
|
|
3802
3803
|
label: t("signature.greeting", "Greeting"),
|
|
3803
3804
|
defaultValue: greeting,
|
|
3804
3805
|
onChange: (greeting2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { greeting: greeting2 }) }))
|
|
3805
3806
|
}
|
|
3806
|
-
), /* @__PURE__ */
|
|
3807
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3807
3808
|
TextInput,
|
|
3808
3809
|
{
|
|
3809
3810
|
label: t("signature.name", "Name"),
|
|
3810
3811
|
defaultValue: name,
|
|
3811
3812
|
onChange: (name2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { name: name2 }) }))
|
|
3812
3813
|
}
|
|
3813
|
-
), /* @__PURE__ */
|
|
3814
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3814
3815
|
TextInput,
|
|
3815
3816
|
{
|
|
3816
3817
|
label: t("signature.title", "Title"),
|
|
3817
3818
|
defaultValue: title,
|
|
3818
3819
|
onChange: (title2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { title: title2 }) }))
|
|
3819
3820
|
}
|
|
3820
|
-
), /* @__PURE__ */
|
|
3821
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3821
3822
|
TextInput,
|
|
3822
3823
|
{
|
|
3823
3824
|
label: t("signature.company", "Company"),
|
|
3824
3825
|
defaultValue: company,
|
|
3825
3826
|
onChange: (company2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { company: company2 }) }))
|
|
3826
3827
|
}
|
|
3827
|
-
), /* @__PURE__ */
|
|
3828
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3828
3829
|
TextInput,
|
|
3829
3830
|
{
|
|
3830
3831
|
label: t("signature.address", "Address"),
|
|
3831
3832
|
defaultValue: address,
|
|
3832
3833
|
onChange: (address2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { address: address2 }) }))
|
|
3833
3834
|
}
|
|
3834
|
-
), /* @__PURE__ */
|
|
3835
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3835
3836
|
TextInput,
|
|
3836
3837
|
{
|
|
3837
3838
|
label: t("signature.email", "Email"),
|
|
3838
3839
|
defaultValue: email,
|
|
3839
3840
|
onChange: (email2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { email: email2 }) }))
|
|
3840
3841
|
}
|
|
3841
|
-
), /* @__PURE__ */
|
|
3842
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3842
3843
|
TextInput,
|
|
3843
3844
|
{
|
|
3844
3845
|
label: t("signature.phone", "Phone"),
|
|
3845
3846
|
defaultValue: phone,
|
|
3846
3847
|
onChange: (phone2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { phone: phone2 }) }))
|
|
3847
3848
|
}
|
|
3848
|
-
), /* @__PURE__ */
|
|
3849
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3849
3850
|
TextInput,
|
|
3850
3851
|
{
|
|
3851
3852
|
label: t("signature.website", "Website"),
|
|
3852
3853
|
defaultValue: website,
|
|
3853
3854
|
onChange: (website2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { website: website2 }) }))
|
|
3854
3855
|
}
|
|
3855
|
-
), /* @__PURE__ */
|
|
3856
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3856
3857
|
TextInput,
|
|
3857
3858
|
{
|
|
3858
3859
|
label: t("signature.image-url", "Image URL"),
|
|
3859
3860
|
defaultValue: imageUrl,
|
|
3860
3861
|
onChange: (imageUrl2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageUrl: imageUrl2 }) }))
|
|
3861
3862
|
}
|
|
3862
|
-
), /* @__PURE__ */
|
|
3863
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3863
3864
|
SliderInput,
|
|
3864
3865
|
{
|
|
3865
3866
|
label: t("signature.image-size", "Image size"),
|
|
3866
|
-
iconLabel: /* @__PURE__ */
|
|
3867
|
+
iconLabel: /* @__PURE__ */ React62.createElement(AspectRatioOutlined, { sx: { color: "text.secondary" } }),
|
|
3867
3868
|
units: "px",
|
|
3868
3869
|
step: 4,
|
|
3869
3870
|
min: 32,
|
|
@@ -3871,47 +3872,47 @@ function SignatureSidebarPanel({ data, setData }) {
|
|
|
3871
3872
|
defaultValue: imageSize,
|
|
3872
3873
|
onChange: (imageSize2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageSize: imageSize2 }) }))
|
|
3873
3874
|
}
|
|
3874
|
-
), /* @__PURE__ */
|
|
3875
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3875
3876
|
RadioGroupInput,
|
|
3876
3877
|
{
|
|
3877
3878
|
label: t("signature.image-shape", "Image shape"),
|
|
3878
3879
|
defaultValue: imageShape,
|
|
3879
3880
|
onChange: (imageShape2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { imageShape: imageShape2 }) }))
|
|
3880
3881
|
},
|
|
3881
|
-
/* @__PURE__ */
|
|
3882
|
-
/* @__PURE__ */
|
|
3883
|
-
/* @__PURE__ */
|
|
3884
|
-
), /* @__PURE__ */
|
|
3882
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "circle" }, t("signature.shape.circle", "Circle")),
|
|
3883
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "square" }, t("signature.shape.square", "Square")),
|
|
3884
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "rounded" }, t("signature.shape.rounded", "Rounded"))
|
|
3885
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3885
3886
|
RadioGroupInput,
|
|
3886
3887
|
{
|
|
3887
3888
|
label: t("signature.layout", "Layout"),
|
|
3888
3889
|
defaultValue: layout,
|
|
3889
3890
|
onChange: (layout2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { layout: layout2 }) }))
|
|
3890
3891
|
},
|
|
3891
|
-
/* @__PURE__ */
|
|
3892
|
-
/* @__PURE__ */
|
|
3893
|
-
), /* @__PURE__ */
|
|
3892
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "horizontal" }, t("signature.layout.horizontal", "Horizontal")),
|
|
3893
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "vertical" }, t("signature.layout.vertical", "Vertical"))
|
|
3894
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3894
3895
|
ColorInput2,
|
|
3895
3896
|
{
|
|
3896
3897
|
label: t("signature.name-color", "Name color"),
|
|
3897
3898
|
defaultValue: nameColor,
|
|
3898
3899
|
onChange: (nameColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { nameColor: nameColor2 }) }))
|
|
3899
3900
|
}
|
|
3900
|
-
), /* @__PURE__ */
|
|
3901
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3901
3902
|
ColorInput2,
|
|
3902
3903
|
{
|
|
3903
3904
|
label: t("style.text-color", "Text color"),
|
|
3904
3905
|
defaultValue: textColor,
|
|
3905
3906
|
onChange: (textColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { textColor: textColor2 }) }))
|
|
3906
3907
|
}
|
|
3907
|
-
), /* @__PURE__ */
|
|
3908
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3908
3909
|
ColorInput2,
|
|
3909
3910
|
{
|
|
3910
3911
|
label: t("signature.link-color", "Link color"),
|
|
3911
3912
|
defaultValue: linkColor,
|
|
3912
3913
|
onChange: (linkColor2) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { linkColor: linkColor2 }) }))
|
|
3913
3914
|
}
|
|
3914
|
-
), /* @__PURE__ */
|
|
3915
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3915
3916
|
MultiStylePropertyPanel,
|
|
3916
3917
|
{
|
|
3917
3918
|
names: ["backgroundColor", "fontFamily", "padding"],
|
|
@@ -3932,11 +3933,11 @@ function SpacerSidebarPanel({ data, setData }) {
|
|
|
3932
3933
|
setErrors(res.error);
|
|
3933
3934
|
}
|
|
3934
3935
|
};
|
|
3935
|
-
return /* @__PURE__ */
|
|
3936
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Spacer block" }, /* @__PURE__ */ React62.createElement(
|
|
3936
3937
|
SliderInput,
|
|
3937
3938
|
{
|
|
3938
3939
|
label: t("field.height", "Height"),
|
|
3939
|
-
iconLabel: /* @__PURE__ */
|
|
3940
|
+
iconLabel: /* @__PURE__ */ React62.createElement(HeightOutlined, { sx: { color: "text.secondary" } }),
|
|
3940
3941
|
units: "px",
|
|
3941
3942
|
step: 4,
|
|
3942
3943
|
min: 4,
|
|
@@ -3958,7 +3959,7 @@ function TextSidebarPanel({ data, setData }) {
|
|
|
3958
3959
|
setErrors(res.error);
|
|
3959
3960
|
}
|
|
3960
3961
|
};
|
|
3961
|
-
return /* @__PURE__ */
|
|
3962
|
+
return /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Text block" }, /* @__PURE__ */ React62.createElement(
|
|
3962
3963
|
TextInput,
|
|
3963
3964
|
{
|
|
3964
3965
|
label: t("field.content", "Content"),
|
|
@@ -3966,14 +3967,14 @@ function TextSidebarPanel({ data, setData }) {
|
|
|
3966
3967
|
defaultValue: (_b = (_a = data.props) == null ? void 0 : _a.text) != null ? _b : "",
|
|
3967
3968
|
onChange: (text) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { text }) }))
|
|
3968
3969
|
}
|
|
3969
|
-
), /* @__PURE__ */
|
|
3970
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3970
3971
|
BooleanInput,
|
|
3971
3972
|
{
|
|
3972
3973
|
label: t("field.markdown", "Markdown"),
|
|
3973
3974
|
defaultValue: (_d = (_c = data.props) == null ? void 0 : _c.markdown) != null ? _d : false,
|
|
3974
3975
|
onChange: (markdown) => updateData(__spreadProps(__spreadValues({}, data), { props: __spreadProps(__spreadValues({}, data.props), { markdown }) }))
|
|
3975
3976
|
}
|
|
3976
|
-
), /* @__PURE__ */
|
|
3977
|
+
), /* @__PURE__ */ React62.createElement(
|
|
3977
3978
|
MultiStylePropertyPanel,
|
|
3978
3979
|
{
|
|
3979
3980
|
names: [
|
|
@@ -3995,71 +3996,71 @@ function TextSidebarPanel({ data, setData }) {
|
|
|
3995
3996
|
|
|
3996
3997
|
// src/app/inspector-drawer/configuration-panel/index.tsx
|
|
3997
3998
|
function renderMessage(val) {
|
|
3998
|
-
return /* @__PURE__ */
|
|
3999
|
+
return /* @__PURE__ */ React62.createElement(Box, { sx: { m: 3, p: 1, border: "1px dashed", borderColor: "divider" } }, /* @__PURE__ */ React62.createElement(Typography, { color: "text.secondary" }, val));
|
|
3999
4000
|
}
|
|
4000
4001
|
function ConfigurationPanel() {
|
|
4001
4002
|
const document2 = useDocument();
|
|
4002
4003
|
const selectedBlockId = useSelectedBlockId();
|
|
4003
4004
|
if (!selectedBlockId) {
|
|
4004
|
-
return renderMessage("Click on a block to inspect.");
|
|
4005
|
+
return renderMessage(t("inspect.hint", "Click on a block to inspect."));
|
|
4005
4006
|
}
|
|
4006
4007
|
const block = document2[selectedBlockId];
|
|
4007
4008
|
if (!block) {
|
|
4008
|
-
return renderMessage(
|
|
4009
|
+
return renderMessage(t("inspect.not-found", "Block not found. Click on a block to reset."));
|
|
4009
4010
|
}
|
|
4010
4011
|
const setBlock = (conf) => setDocument({ [selectedBlockId]: conf });
|
|
4011
4012
|
const { data, type } = block;
|
|
4012
4013
|
switch (type) {
|
|
4013
4014
|
case "Avatar":
|
|
4014
|
-
return /* @__PURE__ */
|
|
4015
|
+
return /* @__PURE__ */ React62.createElement(AvatarSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4015
4016
|
case "Button":
|
|
4016
|
-
return /* @__PURE__ */
|
|
4017
|
+
return /* @__PURE__ */ React62.createElement(ButtonSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4017
4018
|
case "ColumnsContainer":
|
|
4018
|
-
return /* @__PURE__ */
|
|
4019
|
+
return /* @__PURE__ */ React62.createElement(ColumnsContainerPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4019
4020
|
case "Container":
|
|
4020
|
-
return /* @__PURE__ */
|
|
4021
|
+
return /* @__PURE__ */ React62.createElement(ContainerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4021
4022
|
case "Divider":
|
|
4022
|
-
return /* @__PURE__ */
|
|
4023
|
+
return /* @__PURE__ */ React62.createElement(DividerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4023
4024
|
case "Heading":
|
|
4024
|
-
return /* @__PURE__ */
|
|
4025
|
+
return /* @__PURE__ */ React62.createElement(HeadingSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4025
4026
|
case "Html":
|
|
4026
|
-
return /* @__PURE__ */
|
|
4027
|
+
return /* @__PURE__ */ React62.createElement(HtmlSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4027
4028
|
case "Image":
|
|
4028
|
-
return /* @__PURE__ */
|
|
4029
|
+
return /* @__PURE__ */ React62.createElement(ImageSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4029
4030
|
case "EmailLayout":
|
|
4030
|
-
return /* @__PURE__ */
|
|
4031
|
+
return /* @__PURE__ */ React62.createElement(EmailLayoutSidebarFields, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4031
4032
|
case "Spacer":
|
|
4032
|
-
return /* @__PURE__ */
|
|
4033
|
+
return /* @__PURE__ */ React62.createElement(SpacerSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4033
4034
|
case "Signature":
|
|
4034
|
-
return /* @__PURE__ */
|
|
4035
|
+
return /* @__PURE__ */ React62.createElement(SignatureSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4035
4036
|
case "Text":
|
|
4036
|
-
return /* @__PURE__ */
|
|
4037
|
+
return /* @__PURE__ */ React62.createElement(TextSidebarPanel, { key: selectedBlockId, data, setData: (data2) => setBlock({ type, data: data2 }) });
|
|
4037
4038
|
default:
|
|
4038
|
-
return /* @__PURE__ */
|
|
4039
|
+
return /* @__PURE__ */ React62.createElement("pre", null, JSON.stringify(block, null, " "));
|
|
4039
4040
|
}
|
|
4040
4041
|
}
|
|
4041
4042
|
function StylesPanel() {
|
|
4042
4043
|
const block = useDocument().root;
|
|
4043
4044
|
if (!block) {
|
|
4044
|
-
return /* @__PURE__ */
|
|
4045
|
+
return /* @__PURE__ */ React62.createElement("p", null, "Block not found");
|
|
4045
4046
|
}
|
|
4046
4047
|
const { data, type } = block;
|
|
4047
4048
|
if (type !== "EmailLayout") {
|
|
4048
4049
|
throw new Error('Expected "root" element to be of type EmailLayout');
|
|
4049
4050
|
}
|
|
4050
|
-
return /* @__PURE__ */
|
|
4051
|
+
return /* @__PURE__ */ React62.createElement(EmailLayoutSidebarFields, { key: "root", data, setData: (data2) => setDocument({ root: { type, data: data2 } }) });
|
|
4051
4052
|
}
|
|
4052
4053
|
function TemplateDownloadButton() {
|
|
4053
4054
|
const doc = useDocument();
|
|
4054
4055
|
const href = useMemo(() => {
|
|
4055
4056
|
return `data:text/plain,${encodeURIComponent(JSON.stringify(doc, null, " "))}`;
|
|
4056
4057
|
}, [doc]);
|
|
4057
|
-
return /* @__PURE__ */
|
|
4058
|
+
return /* @__PURE__ */ React62.createElement(
|
|
4058
4059
|
Button$1,
|
|
4059
4060
|
{
|
|
4060
4061
|
variant: "outlined",
|
|
4061
4062
|
color: "primary",
|
|
4062
|
-
startIcon: /* @__PURE__ */
|
|
4063
|
+
startIcon: /* @__PURE__ */ React62.createElement(FileDownloadOutlined, null),
|
|
4063
4064
|
href,
|
|
4064
4065
|
download: "emailTemplate.json",
|
|
4065
4066
|
fullWidth: true
|
|
@@ -4085,7 +4086,7 @@ function TemplatePanel({
|
|
|
4085
4086
|
const persistenceEnabled = usePersistenceEnabled();
|
|
4086
4087
|
const workspaceBackground = useWorkspaceBackground();
|
|
4087
4088
|
const handleDelete = () => {
|
|
4088
|
-
if (!currentTemplateId || !window.confirm("Are you sure you want to delete this template?")) {
|
|
4089
|
+
if (!currentTemplateId || !window.confirm(t("settings.delete-confirm", "Are you sure you want to delete this template?"))) {
|
|
4089
4090
|
return;
|
|
4090
4091
|
}
|
|
4091
4092
|
if (deleteTemplate) {
|
|
@@ -4098,10 +4099,10 @@ function TemplatePanel({
|
|
|
4098
4099
|
if (!currentTemplateName || !document2) return;
|
|
4099
4100
|
if (copyTemplate) {
|
|
4100
4101
|
copyTemplate(`${currentTemplateName} (Copy)`, document2);
|
|
4101
|
-
window.alert("Template copied successfully!");
|
|
4102
|
+
window.alert(t("settings.copied", "Template copied successfully!"));
|
|
4102
4103
|
}
|
|
4103
4104
|
};
|
|
4104
|
-
const workspaceToggle = /* @__PURE__ */
|
|
4105
|
+
const workspaceToggle = /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Editor appearance" }, /* @__PURE__ */ React62.createElement(Stack, { spacing: 1 }, /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.secondary" } }, t("settings.workspace-background", "Workspace background")), /* @__PURE__ */ React62.createElement(
|
|
4105
4106
|
ToggleButtonGroup,
|
|
4106
4107
|
{
|
|
4107
4108
|
value: workspaceBackground,
|
|
@@ -4109,13 +4110,13 @@ function TemplatePanel({
|
|
|
4109
4110
|
size: "small",
|
|
4110
4111
|
onChange: (_, v) => v && setWorkspaceBackground(v)
|
|
4111
4112
|
},
|
|
4112
|
-
/* @__PURE__ */
|
|
4113
|
-
/* @__PURE__ */
|
|
4114
|
-
), /* @__PURE__ */
|
|
4113
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "checkerboard", sx: { textTransform: "none", gap: 0.75 } }, /* @__PURE__ */ React62.createElement(GridOnOutlined, { fontSize: "small" }), t("settings.checkerboard", "Checkerboard")),
|
|
4114
|
+
/* @__PURE__ */ React62.createElement(ToggleButton, { value: "solid", sx: { textTransform: "none", gap: 0.75 } }, /* @__PURE__ */ React62.createElement(SquareOutlined, { fontSize: "small" }), t("settings.solid", "Solid"))
|
|
4115
|
+
), /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.disabled" } }, t("settings.editor-only-hint", "Editor-only \u2014 never reaches the rendered email."))));
|
|
4115
4116
|
if (!currentTemplateId) {
|
|
4116
|
-
return /* @__PURE__ */
|
|
4117
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Template" }, t("settings.no-template", "No template selected")), workspaceToggle);
|
|
4117
4118
|
}
|
|
4118
|
-
return /* @__PURE__ */
|
|
4119
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Details" }, /* @__PURE__ */ React62.createElement(
|
|
4119
4120
|
DetailsEditor,
|
|
4120
4121
|
{
|
|
4121
4122
|
templateId: currentTemplateId,
|
|
@@ -4129,7 +4130,7 @@ function TemplatePanel({
|
|
|
4129
4130
|
setCurrentTemplateTags(tags);
|
|
4130
4131
|
})
|
|
4131
4132
|
}
|
|
4132
|
-
)), /* @__PURE__ */
|
|
4133
|
+
)), /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Template" }, /* @__PURE__ */ React62.createElement(Stack, { spacing: 2 }, !persistenceEnabled && /* @__PURE__ */ React62.createElement(
|
|
4133
4134
|
Typography,
|
|
4134
4135
|
{
|
|
4135
4136
|
variant: "body2",
|
|
@@ -4141,30 +4142,30 @@ function TemplatePanel({
|
|
|
4141
4142
|
fontSize: "0.8rem"
|
|
4142
4143
|
}
|
|
4143
4144
|
},
|
|
4144
|
-
"Save functionality is disabled. To enable saving, provide the necessary callback functions."
|
|
4145
|
-
), persistenceEnabled && /* @__PURE__ */
|
|
4145
|
+
t("settings.save-disabled", "Save functionality is disabled. To enable saving, provide the necessary callback functions.")
|
|
4146
|
+
), persistenceEnabled && /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
4146
4147
|
Button$1,
|
|
4147
4148
|
{
|
|
4148
4149
|
variant: "outlined",
|
|
4149
4150
|
color: "primary",
|
|
4150
|
-
startIcon: /* @__PURE__ */
|
|
4151
|
+
startIcon: /* @__PURE__ */ React62.createElement(ContentCopyOutlined, null),
|
|
4151
4152
|
onClick: handleCopyToSamples,
|
|
4152
4153
|
fullWidth: true,
|
|
4153
4154
|
disabled: !copyTemplate
|
|
4154
4155
|
},
|
|
4155
|
-
"Save as Sample Template"
|
|
4156
|
-
), /* @__PURE__ */
|
|
4156
|
+
t("settings.save-as-sample", "Save as Sample Template")
|
|
4157
|
+
), /* @__PURE__ */ React62.createElement(
|
|
4157
4158
|
Button$1,
|
|
4158
4159
|
{
|
|
4159
4160
|
variant: "outlined",
|
|
4160
4161
|
color: "error",
|
|
4161
|
-
startIcon: /* @__PURE__ */
|
|
4162
|
+
startIcon: /* @__PURE__ */ React62.createElement(DeleteOutlined, null),
|
|
4162
4163
|
onClick: handleDelete,
|
|
4163
4164
|
fullWidth: true,
|
|
4164
4165
|
disabled: !deleteTemplate
|
|
4165
4166
|
},
|
|
4166
|
-
"Delete Template"
|
|
4167
|
-
)))), persistenceEnabled && /* @__PURE__ */
|
|
4167
|
+
t("settings.delete", "Delete Template")
|
|
4168
|
+
)))), persistenceEnabled && /* @__PURE__ */ React62.createElement(BaseSidebarPanel, { title: "Export" }, /* @__PURE__ */ React62.createElement(Stack, { spacing: 2 }, /* @__PURE__ */ React62.createElement(TemplateDownloadButton, null))), workspaceToggle);
|
|
4168
4169
|
}
|
|
4169
4170
|
function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }) {
|
|
4170
4171
|
const [name, setName] = useState(currentName);
|
|
@@ -4201,17 +4202,17 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
|
|
|
4201
4202
|
setSaving(false);
|
|
4202
4203
|
}
|
|
4203
4204
|
});
|
|
4204
|
-
return /* @__PURE__ */
|
|
4205
|
+
return /* @__PURE__ */ React62.createElement(Stack, { spacing: 1.5 }, /* @__PURE__ */ React62.createElement(
|
|
4205
4206
|
TextField,
|
|
4206
4207
|
{
|
|
4207
4208
|
size: "small",
|
|
4208
|
-
label: "Name",
|
|
4209
|
+
label: t("rename.name-label", "Name"),
|
|
4209
4210
|
value: name,
|
|
4210
4211
|
onChange: (e) => setName(e.target.value),
|
|
4211
4212
|
disabled: !canEdit || saving,
|
|
4212
4213
|
fullWidth: true
|
|
4213
4214
|
}
|
|
4214
|
-
), /* @__PURE__ */
|
|
4215
|
+
), /* @__PURE__ */ React62.createElement(Box, null, /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mb: 0.5 } }, t("rename.tags", "Tags")), tags.length > 0 ? /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, sx: { flexWrap: "wrap", gap: 0.5, mb: 1 } }, tags.map((tag) => /* @__PURE__ */ React62.createElement(
|
|
4215
4216
|
Chip,
|
|
4216
4217
|
{
|
|
4217
4218
|
key: tag,
|
|
@@ -4219,12 +4220,12 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
|
|
|
4219
4220
|
size: "small",
|
|
4220
4221
|
onDelete: canEdit && !saving ? () => removeTag(tag) : void 0
|
|
4221
4222
|
}
|
|
4222
|
-
))) : /* @__PURE__ */
|
|
4223
|
+
))) : /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.disabled", display: "block", mb: 1 } }, t("rename.no-tags", "No tags yet.")), /* @__PURE__ */ React62.createElement(
|
|
4223
4224
|
TextField,
|
|
4224
4225
|
{
|
|
4225
4226
|
size: "small",
|
|
4226
4227
|
fullWidth: true,
|
|
4227
|
-
placeholder: "Add a tag",
|
|
4228
|
+
placeholder: t("rename.add-tag", "Add a tag"),
|
|
4228
4229
|
value: tagInput,
|
|
4229
4230
|
onChange: (e) => setTagInput(e.target.value),
|
|
4230
4231
|
disabled: !canEdit || saving,
|
|
@@ -4238,20 +4239,20 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
|
|
|
4238
4239
|
}
|
|
4239
4240
|
},
|
|
4240
4241
|
InputProps: {
|
|
4241
|
-
endAdornment: /* @__PURE__ */
|
|
4242
|
+
endAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React62.createElement(
|
|
4242
4243
|
Button$1,
|
|
4243
4244
|
{
|
|
4244
4245
|
size: "small",
|
|
4245
4246
|
onClick: addTag,
|
|
4246
4247
|
disabled: !canEdit || saving || !tagInput.trim(),
|
|
4247
|
-
startIcon: /* @__PURE__ */
|
|
4248
|
+
startIcon: /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" }),
|
|
4248
4249
|
sx: { textTransform: "none" }
|
|
4249
4250
|
},
|
|
4250
|
-
"Add"
|
|
4251
|
+
t("common.add", "Add")
|
|
4251
4252
|
))
|
|
4252
4253
|
}
|
|
4253
4254
|
}
|
|
4254
|
-
)), /* @__PURE__ */
|
|
4255
|
+
)), /* @__PURE__ */ React62.createElement(Tooltip, { title: canEdit ? "" : t("settings.no-rename-cb", "Wire a renameTemplate callback to enable editing from here"), placement: "top" }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
|
|
4255
4256
|
Button$1,
|
|
4256
4257
|
{
|
|
4257
4258
|
variant: "contained",
|
|
@@ -4259,9 +4260,9 @@ function DetailsEditor({ templateId, currentName, currentTags, canEdit, onSave }
|
|
|
4259
4260
|
fullWidth: true,
|
|
4260
4261
|
onClick: handleSave,
|
|
4261
4262
|
disabled: !canEdit || saving || !dirty || !name.trim(),
|
|
4262
|
-
startIcon: justSaved ? /* @__PURE__ */
|
|
4263
|
+
startIcon: justSaved ? /* @__PURE__ */ React62.createElement(CheckOutlined, { fontSize: "small" }) : null
|
|
4263
4264
|
},
|
|
4264
|
-
saving ? "Saving\u2026" : justSaved ? "Saved" : "Save details"
|
|
4265
|
+
saving ? t("common.saving", "Saving\u2026") : justSaved ? t("settings.saved", "Saved") : t("settings.save-details", "Save details")
|
|
4265
4266
|
))));
|
|
4266
4267
|
}
|
|
4267
4268
|
|
|
@@ -4436,7 +4437,7 @@ function VariablesPanel() {
|
|
|
4436
4437
|
const lastFocused = useLastFocusedEditable();
|
|
4437
4438
|
const root = document2.root;
|
|
4438
4439
|
if (!root || root.type !== "EmailLayout") {
|
|
4439
|
-
return /* @__PURE__ */
|
|
4440
|
+
return /* @__PURE__ */ React62.createElement(Box, { p: 2 }, /* @__PURE__ */ React62.createElement(Alert, { severity: "info" }, t("variables.open-template", "Open a template to manage variables.")));
|
|
4440
4441
|
}
|
|
4441
4442
|
const data = root.data;
|
|
4442
4443
|
const variables = ((_a = data.variables) != null ? _a : []).map((v) => {
|
|
@@ -4479,7 +4480,7 @@ function VariablesPanel() {
|
|
|
4479
4480
|
const usageCount = v.name ? (_a2 = usage.get(v.name)) != null ? _a2 : 0 : 0;
|
|
4480
4481
|
if (usageCount > 0) {
|
|
4481
4482
|
const ok = window.confirm(
|
|
4482
|
-
|
|
4483
|
+
t("variables.confirm-delete", "Variable is still referenced in the body. Delete anyway?") + ` (${v.name}, ${usageCount})`
|
|
4483
4484
|
);
|
|
4484
4485
|
if (!ok) return;
|
|
4485
4486
|
}
|
|
@@ -4531,7 +4532,10 @@ function VariablesPanel() {
|
|
|
4531
4532
|
} catch (e) {
|
|
4532
4533
|
}
|
|
4533
4534
|
});
|
|
4534
|
-
return /* @__PURE__ */
|
|
4535
|
+
return /* @__PURE__ */ React62.createElement(Box, { p: 2 }, /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { mb: 1 } }, /* @__PURE__ */ React62.createElement(Typography, { variant: "subtitle1", sx: { fontWeight: 600 } }, t("variables.title", "Variables")), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("variables.add", "Add variable") }, /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: add, "aria-label": t("variables.add", "Add variable") }, /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" })))), /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mb: 2 } }, t(
|
|
4536
|
+
"variables.intro",
|
|
4537
|
+
"Declared variables travel with the template. Reference them in subject and body as {{name}}. In Preview mode, tokens render with the sample values below."
|
|
4538
|
+
)), undeclared.length > 0 && /* @__PURE__ */ React62.createElement(Alert, { severity: "warning", sx: { mb: 2 } }, /* @__PURE__ */ React62.createElement(AlertTitle, { sx: { fontSize: 13 } }, t("variables.undeclared", "Undeclared in body")), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, useFlexGap: true, flexWrap: "wrap" }, undeclared.map((name) => /* @__PURE__ */ React62.createElement(
|
|
4535
4539
|
Chip,
|
|
4536
4540
|
{
|
|
4537
4541
|
key: name,
|
|
@@ -4539,12 +4543,12 @@ function VariablesPanel() {
|
|
|
4539
4543
|
label: name,
|
|
4540
4544
|
onClick: () => addFromToken(name),
|
|
4541
4545
|
onDelete: () => addFromToken(name),
|
|
4542
|
-
deleteIcon: /* @__PURE__ */
|
|
4546
|
+
deleteIcon: /* @__PURE__ */ React62.createElement(AddOutlined, null),
|
|
4543
4547
|
sx: { fontFamily: "monospace" }
|
|
4544
4548
|
}
|
|
4545
|
-
))), /* @__PURE__ */
|
|
4549
|
+
))), /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mt: 0.5 } }, t("variables.click-to-declare", "Click a token to declare it."))), variables.length === 0 ? /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary" } }, t("variables.none", "No variables declared. Click + to add one.")) : /* @__PURE__ */ React62.createElement(Stack, { spacing: 2 }, variables.map((v, i) => {
|
|
4546
4550
|
var _a2;
|
|
4547
|
-
return /* @__PURE__ */
|
|
4551
|
+
return /* @__PURE__ */ React62.createElement(
|
|
4548
4552
|
VariableRow,
|
|
4549
4553
|
{
|
|
4550
4554
|
key: i,
|
|
@@ -4595,10 +4599,10 @@ function VariableRow({
|
|
|
4595
4599
|
onCommitRename(draftName.trim());
|
|
4596
4600
|
}
|
|
4597
4601
|
};
|
|
4598
|
-
return /* @__PURE__ */
|
|
4602
|
+
return /* @__PURE__ */ React62.createElement(Stack, { spacing: 0.75, sx: { pb: 1, borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 1, alignItems: "flex-start" }, /* @__PURE__ */ React62.createElement(
|
|
4599
4603
|
TextField,
|
|
4600
4604
|
{
|
|
4601
|
-
label: "Name",
|
|
4605
|
+
label: t("rename.name-label", "Name"),
|
|
4602
4606
|
size: "small",
|
|
4603
4607
|
fullWidth: true,
|
|
4604
4608
|
value: draftName,
|
|
@@ -4620,53 +4624,53 @@ function VariableRow({
|
|
|
4620
4624
|
error: Boolean(nameError),
|
|
4621
4625
|
helperText: nameError != null ? nameError : " "
|
|
4622
4626
|
}
|
|
4623
|
-
), /* @__PURE__ */
|
|
4627
|
+
), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.25, sx: { mt: 0.5 } }, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("variables.copy-token", "Copy {{name}} token") }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
|
|
4624
4628
|
IconButton,
|
|
4625
4629
|
{
|
|
4626
4630
|
size: "small",
|
|
4627
4631
|
onClick: onCopy,
|
|
4628
4632
|
disabled: !hasName,
|
|
4629
|
-
"aria-label":
|
|
4633
|
+
"aria-label": t("variables.copy-token", "Copy {{name}} token")
|
|
4630
4634
|
},
|
|
4631
|
-
/* @__PURE__ */
|
|
4632
|
-
))), /* @__PURE__ */
|
|
4635
|
+
/* @__PURE__ */ React62.createElement(ContentCopyOutlined, { fontSize: "small" })
|
|
4636
|
+
))), /* @__PURE__ */ React62.createElement(Tooltip, { title: canInsert ? t("variables.insert-at-cursor", "Insert at cursor") : t("variables.focus-first", "Focus a text field first") }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
|
|
4633
4637
|
IconButton,
|
|
4634
4638
|
{
|
|
4635
4639
|
size: "small",
|
|
4636
4640
|
onClick: onInsert,
|
|
4637
4641
|
disabled: !hasName || !canInsert,
|
|
4638
|
-
"aria-label":
|
|
4642
|
+
"aria-label": t("variables.insert-at-cursor", "Insert at cursor")
|
|
4639
4643
|
},
|
|
4640
|
-
/* @__PURE__ */
|
|
4641
|
-
))), /* @__PURE__ */
|
|
4644
|
+
/* @__PURE__ */ React62.createElement(InputOutlined, { fontSize: "small" })
|
|
4645
|
+
))), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("variables.remove", "Remove") }, /* @__PURE__ */ React62.createElement(
|
|
4642
4646
|
IconButton,
|
|
4643
4647
|
{
|
|
4644
4648
|
size: "small",
|
|
4645
4649
|
onClick: onRemove,
|
|
4646
|
-
"aria-label":
|
|
4650
|
+
"aria-label": t("variables.remove", "Remove")
|
|
4647
4651
|
},
|
|
4648
|
-
/* @__PURE__ */
|
|
4649
|
-
)))), /* @__PURE__ */
|
|
4652
|
+
/* @__PURE__ */ React62.createElement(DeleteOutline, { fontSize: "small" })
|
|
4653
|
+
)))), /* @__PURE__ */ React62.createElement(
|
|
4650
4654
|
TextField,
|
|
4651
4655
|
{
|
|
4652
|
-
label: "Description",
|
|
4656
|
+
label: t("variables.description", "Description"),
|
|
4653
4657
|
size: "small",
|
|
4654
4658
|
fullWidth: true,
|
|
4655
4659
|
value: (_a = variable.description) != null ? _a : "",
|
|
4656
4660
|
onChange: (e) => onChangeDescription(e.target.value),
|
|
4657
|
-
placeholder: "Optional"
|
|
4661
|
+
placeholder: t("variables.optional", "Optional")
|
|
4658
4662
|
}
|
|
4659
|
-
), /* @__PURE__ */
|
|
4663
|
+
), /* @__PURE__ */ React62.createElement(
|
|
4660
4664
|
TextField,
|
|
4661
4665
|
{
|
|
4662
|
-
label: "Sample value",
|
|
4666
|
+
label: t("variables.sample-value", "Sample value"),
|
|
4663
4667
|
size: "small",
|
|
4664
4668
|
fullWidth: true,
|
|
4665
4669
|
value: (_b = variable.sampleValue) != null ? _b : "",
|
|
4666
4670
|
onChange: (e) => onChangeSampleValue(e.target.value),
|
|
4667
|
-
placeholder: "Shown in Preview mode",
|
|
4671
|
+
placeholder: t("variables.sample-hint", "Shown in Preview mode"),
|
|
4668
4672
|
InputProps: {
|
|
4669
|
-
startAdornment: /* @__PURE__ */
|
|
4673
|
+
startAdornment: /* @__PURE__ */ React62.createElement(
|
|
4670
4674
|
DataObjectOutlined,
|
|
4671
4675
|
{
|
|
4672
4676
|
fontSize: "small",
|
|
@@ -4675,12 +4679,12 @@ function VariableRow({
|
|
|
4675
4679
|
)
|
|
4676
4680
|
}
|
|
4677
4681
|
}
|
|
4678
|
-
), /* @__PURE__ */
|
|
4682
|
+
), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, sx: { pt: 0.25 } }, hasName && (unused ? /* @__PURE__ */ React62.createElement(Chip, { size: "small", color: "warning", variant: "outlined", label: t("variables.unused", "Unused in body") }) : /* @__PURE__ */ React62.createElement(
|
|
4679
4683
|
Chip,
|
|
4680
4684
|
{
|
|
4681
4685
|
size: "small",
|
|
4682
4686
|
variant: "outlined",
|
|
4683
|
-
label: `${usageCount}
|
|
4687
|
+
label: `${usageCount} ${usageCount === 1 ? t("variables.ref-one", "ref") : t("variables.ref-many", "refs")}`
|
|
4684
4688
|
}
|
|
4685
4689
|
))));
|
|
4686
4690
|
}
|
|
@@ -4700,13 +4704,13 @@ function InspectorDrawer({
|
|
|
4700
4704
|
const renderCurrentSidebarPanel = () => {
|
|
4701
4705
|
switch (selectedSidebarTab) {
|
|
4702
4706
|
case "block-configuration":
|
|
4703
|
-
return /* @__PURE__ */
|
|
4707
|
+
return /* @__PURE__ */ React62.createElement(ConfigurationPanel, null);
|
|
4704
4708
|
case "styles":
|
|
4705
|
-
return /* @__PURE__ */
|
|
4709
|
+
return /* @__PURE__ */ React62.createElement(StylesPanel, null);
|
|
4706
4710
|
case "variables":
|
|
4707
|
-
return /* @__PURE__ */
|
|
4711
|
+
return /* @__PURE__ */ React62.createElement(VariablesPanel, null);
|
|
4708
4712
|
case "template-settings":
|
|
4709
|
-
return /* @__PURE__ */
|
|
4713
|
+
return /* @__PURE__ */ React62.createElement(
|
|
4710
4714
|
TemplatePanel,
|
|
4711
4715
|
{
|
|
4712
4716
|
deleteTemplate,
|
|
@@ -4716,7 +4720,7 @@ function InspectorDrawer({
|
|
|
4716
4720
|
);
|
|
4717
4721
|
}
|
|
4718
4722
|
};
|
|
4719
|
-
return /* @__PURE__ */
|
|
4723
|
+
return /* @__PURE__ */ React62.createElement(
|
|
4720
4724
|
Drawer,
|
|
4721
4725
|
{
|
|
4722
4726
|
variant: "persistent",
|
|
@@ -4738,7 +4742,7 @@ function InspectorDrawer({
|
|
|
4738
4742
|
width: inspectorDrawerOpen ? INSPECTOR_DRAWER_WIDTH : 0
|
|
4739
4743
|
}
|
|
4740
4744
|
},
|
|
4741
|
-
/* @__PURE__ */
|
|
4745
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: 49, borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React62.createElement(Box, { px: 1 }, /* @__PURE__ */ React62.createElement(
|
|
4742
4746
|
Tabs,
|
|
4743
4747
|
{
|
|
4744
4748
|
value: selectedSidebarTab,
|
|
@@ -4746,12 +4750,12 @@ function InspectorDrawer({
|
|
|
4746
4750
|
variant: "fullWidth",
|
|
4747
4751
|
sx: { "& .MuiTab-root": { minWidth: 0, px: 1, fontSize: 13 } }
|
|
4748
4752
|
},
|
|
4749
|
-
/* @__PURE__ */
|
|
4750
|
-
/* @__PURE__ */
|
|
4751
|
-
/* @__PURE__ */
|
|
4752
|
-
/* @__PURE__ */
|
|
4753
|
+
/* @__PURE__ */ React62.createElement(Tab, { value: "styles", label: t("inspector.tab.styles", "Styles") }),
|
|
4754
|
+
/* @__PURE__ */ React62.createElement(Tab, { value: "block-configuration", label: t("inspector.tab.inspect", "Inspect") }),
|
|
4755
|
+
/* @__PURE__ */ React62.createElement(Tab, { value: "variables", label: t("inspector.tab.variables", "Variables") }),
|
|
4756
|
+
/* @__PURE__ */ React62.createElement(Tab, { value: "template-settings", label: t("inspector.tab.settings", "Settings") })
|
|
4753
4757
|
))),
|
|
4754
|
-
/* @__PURE__ */
|
|
4758
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { width: INSPECTOR_DRAWER_WIDTH, height: "calc(100% - 49px)", overflow: "auto" } }, renderCurrentSidebarPanel())
|
|
4755
4759
|
);
|
|
4756
4760
|
}
|
|
4757
4761
|
var SnackbarContext = createContext(null);
|
|
@@ -4772,7 +4776,7 @@ function SnackbarProvider({ children }) {
|
|
|
4772
4776
|
const handleClose = () => {
|
|
4773
4777
|
setMessage(null);
|
|
4774
4778
|
};
|
|
4775
|
-
return /* @__PURE__ */
|
|
4779
|
+
return /* @__PURE__ */ React62.createElement(SnackbarContext.Provider, { value: { showMessage } }, children, /* @__PURE__ */ React62.createElement(
|
|
4776
4780
|
Snackbar,
|
|
4777
4781
|
{
|
|
4778
4782
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
@@ -4849,7 +4853,7 @@ function TemplateRow({
|
|
|
4849
4853
|
const hasActions = Boolean(
|
|
4850
4854
|
onDuplicate || onRename || onDelete || onPromote || onDemote || onDuplicateAsTemplate
|
|
4851
4855
|
);
|
|
4852
|
-
return /* @__PURE__ */
|
|
4856
|
+
return /* @__PURE__ */ React62.createElement(
|
|
4853
4857
|
Box,
|
|
4854
4858
|
{
|
|
4855
4859
|
role: "button",
|
|
@@ -4875,7 +4879,7 @@ function TemplateRow({
|
|
|
4875
4879
|
"&:focus-visible": { outline: "2px solid", outlineColor: "primary.main" }
|
|
4876
4880
|
}
|
|
4877
4881
|
},
|
|
4878
|
-
/* @__PURE__ */
|
|
4882
|
+
/* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "flex-start", spacing: 1 }, /* @__PURE__ */ React62.createElement(Box, { sx: { flexGrow: 1, minWidth: 0, pr: hasActions ? 3 : 0 } }, /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "baseline", spacing: 1, sx: { minWidth: 0 } }, /* @__PURE__ */ React62.createElement(
|
|
4879
4883
|
Typography,
|
|
4880
4884
|
{
|
|
4881
4885
|
variant: "body2",
|
|
@@ -4889,14 +4893,14 @@ function TemplateRow({
|
|
|
4889
4893
|
title: template.slug
|
|
4890
4894
|
},
|
|
4891
4895
|
template.slug
|
|
4892
|
-
), updated && !hasActions && /* @__PURE__ */
|
|
4896
|
+
), updated && !hasActions && /* @__PURE__ */ React62.createElement(
|
|
4893
4897
|
Typography,
|
|
4894
4898
|
{
|
|
4895
4899
|
variant: "caption",
|
|
4896
4900
|
sx: { color: "text.secondary", flexShrink: 0, fontSize: "0.7rem" }
|
|
4897
4901
|
},
|
|
4898
4902
|
updated
|
|
4899
|
-
)), template.description && /* @__PURE__ */
|
|
4903
|
+
)), template.description && /* @__PURE__ */ React62.createElement(
|
|
4900
4904
|
Typography,
|
|
4901
4905
|
{
|
|
4902
4906
|
variant: "caption",
|
|
@@ -4910,7 +4914,7 @@ function TemplateRow({
|
|
|
4910
4914
|
}
|
|
4911
4915
|
},
|
|
4912
4916
|
template.description
|
|
4913
|
-
), template.tags && template.tags.length > 0 && /* @__PURE__ */
|
|
4917
|
+
), template.tags && template.tags.length > 0 && /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, sx: { mt: 0.5, flexWrap: "wrap", gap: 0.5 } }, template.tags.map((tag) => /* @__PURE__ */ React62.createElement(
|
|
4914
4918
|
Chip,
|
|
4915
4919
|
{
|
|
4916
4920
|
key: tag,
|
|
@@ -4919,7 +4923,7 @@ function TemplateRow({
|
|
|
4919
4923
|
sx: { height: 18, fontSize: "0.65rem", "& .MuiChip-label": { px: 0.75 } }
|
|
4920
4924
|
}
|
|
4921
4925
|
))))),
|
|
4922
|
-
hasActions && /* @__PURE__ */
|
|
4926
|
+
hasActions && /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("row.more", "More") }, /* @__PURE__ */ React62.createElement(
|
|
4923
4927
|
IconButton,
|
|
4924
4928
|
{
|
|
4925
4929
|
size: "small",
|
|
@@ -4935,8 +4939,8 @@ function TemplateRow({
|
|
|
4935
4939
|
transition: "opacity 120ms"
|
|
4936
4940
|
}
|
|
4937
4941
|
},
|
|
4938
|
-
/* @__PURE__ */
|
|
4939
|
-
)), /* @__PURE__ */
|
|
4942
|
+
/* @__PURE__ */ React62.createElement(MoreVertOutlined, { fontSize: "small" })
|
|
4943
|
+
)), /* @__PURE__ */ React62.createElement(
|
|
4940
4944
|
Menu,
|
|
4941
4945
|
{
|
|
4942
4946
|
anchorEl: menuAnchor,
|
|
@@ -4947,14 +4951,14 @@ function TemplateRow({
|
|
|
4947
4951
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
4948
4952
|
slotProps: { paper: { sx: { minWidth: 200 } } }
|
|
4949
4953
|
},
|
|
4950
|
-
onRename && /* @__PURE__ */
|
|
4951
|
-
onDuplicate && /* @__PURE__ */
|
|
4952
|
-
onDuplicateAsTemplate && /* @__PURE__ */
|
|
4953
|
-
onPromote && /* @__PURE__ */
|
|
4954
|
-
onDemote && /* @__PURE__ */
|
|
4954
|
+
onRename && /* @__PURE__ */ React62.createElement(MenuItem, { onClick: runAction(onRename) }, /* @__PURE__ */ React62.createElement(ListItemIcon, null, /* @__PURE__ */ React62.createElement(DriveFileRenameOutlineOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("row.edit-details", "Edit name & tags\u2026"))),
|
|
4955
|
+
onDuplicate && /* @__PURE__ */ React62.createElement(MenuItem, { onClick: runAction(onDuplicate) }, /* @__PURE__ */ React62.createElement(ListItemIcon, null, /* @__PURE__ */ React62.createElement(ContentCopyOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("row.duplicate", "Duplicate"))),
|
|
4956
|
+
onDuplicateAsTemplate && /* @__PURE__ */ React62.createElement(MenuItem, { onClick: runAction(onDuplicateAsTemplate) }, /* @__PURE__ */ React62.createElement(ListItemIcon, null, /* @__PURE__ */ React62.createElement(LibraryAddOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("row.duplicate-as-template", "Duplicate as template"))),
|
|
4957
|
+
onPromote && /* @__PURE__ */ React62.createElement(MenuItem, { onClick: runAction(onPromote) }, /* @__PURE__ */ React62.createElement(ListItemIcon, null, /* @__PURE__ */ React62.createElement(FileUploadOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("row.promote", "Promote to sample"))),
|
|
4958
|
+
onDemote && /* @__PURE__ */ React62.createElement(MenuItem, { onClick: runAction(onDemote) }, /* @__PURE__ */ React62.createElement(ListItemIcon, null, /* @__PURE__ */ React62.createElement(FileDownloadOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("row.demote", "Demote to template"))),
|
|
4955
4959
|
onDelete && [
|
|
4956
|
-
/* @__PURE__ */
|
|
4957
|
-
/* @__PURE__ */
|
|
4960
|
+
/* @__PURE__ */ React62.createElement(Divider$1, { key: "divider" }),
|
|
4961
|
+
/* @__PURE__ */ React62.createElement(MenuItem, { key: "delete", onClick: runAction(onDelete), sx: { color: "error.main" } }, /* @__PURE__ */ React62.createElement(ListItemIcon, { sx: { color: "error.main" } }, /* @__PURE__ */ React62.createElement(DeleteOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(ListItemText, null, t("tune.delete", "Delete")))
|
|
4958
4962
|
]
|
|
4959
4963
|
))
|
|
4960
4964
|
);
|
|
@@ -5069,31 +5073,31 @@ var PREVIEW_MAX = 36;
|
|
|
5069
5073
|
function iconForType(type) {
|
|
5070
5074
|
switch (type) {
|
|
5071
5075
|
case "EmailLayout":
|
|
5072
|
-
return /* @__PURE__ */
|
|
5076
|
+
return /* @__PURE__ */ React62.createElement(DashboardOutlined, { fontSize: "small" });
|
|
5073
5077
|
case "Heading":
|
|
5074
|
-
return /* @__PURE__ */
|
|
5078
|
+
return /* @__PURE__ */ React62.createElement(HMobiledataOutlined, { fontSize: "small" });
|
|
5075
5079
|
case "Text":
|
|
5076
|
-
return /* @__PURE__ */
|
|
5080
|
+
return /* @__PURE__ */ React62.createElement(NotesOutlined, { fontSize: "small" });
|
|
5077
5081
|
case "Button":
|
|
5078
|
-
return /* @__PURE__ */
|
|
5082
|
+
return /* @__PURE__ */ React62.createElement(SmartButtonOutlined, { fontSize: "small" });
|
|
5079
5083
|
case "Image":
|
|
5080
|
-
return /* @__PURE__ */
|
|
5084
|
+
return /* @__PURE__ */ React62.createElement(ImageOutlined, { fontSize: "small" });
|
|
5081
5085
|
case "Avatar":
|
|
5082
|
-
return /* @__PURE__ */
|
|
5086
|
+
return /* @__PURE__ */ React62.createElement(AccountCircleOutlined, { fontSize: "small" });
|
|
5083
5087
|
case "Signature":
|
|
5084
|
-
return /* @__PURE__ */
|
|
5088
|
+
return /* @__PURE__ */ React62.createElement(ContactMailOutlined, { fontSize: "small" });
|
|
5085
5089
|
case "Divider":
|
|
5086
|
-
return /* @__PURE__ */
|
|
5090
|
+
return /* @__PURE__ */ React62.createElement(HorizontalRuleOutlined, { fontSize: "small" });
|
|
5087
5091
|
case "Spacer":
|
|
5088
|
-
return /* @__PURE__ */
|
|
5092
|
+
return /* @__PURE__ */ React62.createElement(Crop32Outlined, { fontSize: "small" });
|
|
5089
5093
|
case "Html":
|
|
5090
|
-
return /* @__PURE__ */
|
|
5094
|
+
return /* @__PURE__ */ React62.createElement(HtmlOutlined, { fontSize: "small" });
|
|
5091
5095
|
case "Container":
|
|
5092
|
-
return /* @__PURE__ */
|
|
5096
|
+
return /* @__PURE__ */ React62.createElement(LibraryAddOutlined, { fontSize: "small" });
|
|
5093
5097
|
case "ColumnsContainer":
|
|
5094
|
-
return /* @__PURE__ */
|
|
5098
|
+
return /* @__PURE__ */ React62.createElement(ViewColumnOutlined, { fontSize: "small" });
|
|
5095
5099
|
default:
|
|
5096
|
-
return /* @__PURE__ */
|
|
5100
|
+
return /* @__PURE__ */ React62.createElement(BusinessOutlined, { fontSize: "small" });
|
|
5097
5101
|
}
|
|
5098
5102
|
}
|
|
5099
5103
|
function previewText(text) {
|
|
@@ -5123,7 +5127,7 @@ function buildNode(id, doc, ctx) {
|
|
|
5123
5127
|
).filter((n) => n !== null);
|
|
5124
5128
|
return {
|
|
5125
5129
|
id,
|
|
5126
|
-
label: "Canvas",
|
|
5130
|
+
label: t("outline.canvas", "Canvas"),
|
|
5127
5131
|
icon: iconForType("EmailLayout"),
|
|
5128
5132
|
children,
|
|
5129
5133
|
containerChildrenRef: parentForChildren
|
|
@@ -5171,7 +5175,7 @@ function buildNode(id, doc, ctx) {
|
|
|
5171
5175
|
id: `${id}::col${colIdx}`,
|
|
5172
5176
|
label: `Column ${colIdx + 1}`,
|
|
5173
5177
|
preview: colChildren.length === 1 ? "1 child" : `${colChildren.length} children`,
|
|
5174
|
-
icon: /* @__PURE__ */
|
|
5178
|
+
icon: /* @__PURE__ */ React62.createElement(ViewColumnSharp, { fontSize: "small", sx: { opacity: 0.6 } }),
|
|
5175
5179
|
children: colChildren,
|
|
5176
5180
|
containerChildrenRef: parentForCol
|
|
5177
5181
|
});
|
|
@@ -5233,7 +5237,7 @@ function OutlinePanel() {
|
|
|
5233
5237
|
setSelectedBlockId(payload.sourceId);
|
|
5234
5238
|
}
|
|
5235
5239
|
};
|
|
5236
|
-
return /* @__PURE__ */
|
|
5240
|
+
return /* @__PURE__ */ React62.createElement(Box, null, /* @__PURE__ */ React62.createElement(Typography, { variant: "subtitle2", component: "h2", sx: { fontWeight: "bold", mb: 0.5, px: 0.5 } }, t("outline.title", "Outline")), /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { display: "block", color: "text.secondary", px: 0.5, mb: 1 } }, t("outline.hint", "Click a row to select. Drag a row to reorder or move it into a container.")), tree ? /* @__PURE__ */ React62.createElement(
|
|
5237
5241
|
OutlineRow,
|
|
5238
5242
|
{
|
|
5239
5243
|
node: tree,
|
|
@@ -5244,7 +5248,7 @@ function OutlinePanel() {
|
|
|
5244
5248
|
setDragging,
|
|
5245
5249
|
performMove
|
|
5246
5250
|
}
|
|
5247
|
-
) : /* @__PURE__ */
|
|
5251
|
+
) : /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", px: 0.5 } }, "Nothing to outline."));
|
|
5248
5252
|
}
|
|
5249
5253
|
function OutlineRow({
|
|
5250
5254
|
node,
|
|
@@ -5330,7 +5334,7 @@ function OutlineRow({
|
|
|
5330
5334
|
const patch = buildMovePatch(document2, node.id, node.parent, node.parent, nextIndex + (delta > 0 ? 1 : 0));
|
|
5331
5335
|
if (patch) setDocument(patch);
|
|
5332
5336
|
};
|
|
5333
|
-
return /* @__PURE__ */
|
|
5337
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(Box, { sx: { position: "relative" } }, dropPos === "before" && /* @__PURE__ */ React62.createElement(DropLine, { depth }), /* @__PURE__ */ React62.createElement(
|
|
5334
5338
|
Stack,
|
|
5335
5339
|
{
|
|
5336
5340
|
direction: "row",
|
|
@@ -5363,7 +5367,7 @@ function OutlineRow({
|
|
|
5363
5367
|
userSelect: "none"
|
|
5364
5368
|
}
|
|
5365
5369
|
},
|
|
5366
|
-
hasChildren ? /* @__PURE__ */
|
|
5370
|
+
hasChildren ? /* @__PURE__ */ React62.createElement(
|
|
5367
5371
|
Box,
|
|
5368
5372
|
{
|
|
5369
5373
|
role: "button",
|
|
@@ -5374,9 +5378,9 @@ function OutlineRow({
|
|
|
5374
5378
|
},
|
|
5375
5379
|
sx: { display: "flex", alignItems: "center", cursor: "pointer" }
|
|
5376
5380
|
},
|
|
5377
|
-
expanded ? /* @__PURE__ */
|
|
5378
|
-
) : /* @__PURE__ */
|
|
5379
|
-
/* @__PURE__ */
|
|
5381
|
+
expanded ? /* @__PURE__ */ React62.createElement(ExpandMore, { fontSize: "small" }) : /* @__PURE__ */ React62.createElement(ChevronRight, { fontSize: "small" })
|
|
5382
|
+
) : /* @__PURE__ */ React62.createElement(Box, { sx: { width: 20 } }),
|
|
5383
|
+
/* @__PURE__ */ React62.createElement(
|
|
5380
5384
|
Box,
|
|
5381
5385
|
{
|
|
5382
5386
|
sx: {
|
|
@@ -5388,7 +5392,7 @@ function OutlineRow({
|
|
|
5388
5392
|
},
|
|
5389
5393
|
node.icon
|
|
5390
5394
|
),
|
|
5391
|
-
/* @__PURE__ */
|
|
5395
|
+
/* @__PURE__ */ React62.createElement(
|
|
5392
5396
|
Typography,
|
|
5393
5397
|
{
|
|
5394
5398
|
variant: "body2",
|
|
@@ -5400,7 +5404,7 @@ function OutlineRow({
|
|
|
5400
5404
|
},
|
|
5401
5405
|
node.label
|
|
5402
5406
|
),
|
|
5403
|
-
node.preview && /* @__PURE__ */
|
|
5407
|
+
node.preview && /* @__PURE__ */ React62.createElement(
|
|
5404
5408
|
Typography,
|
|
5405
5409
|
{
|
|
5406
5410
|
variant: "body2",
|
|
@@ -5416,7 +5420,7 @@ function OutlineRow({
|
|
|
5416
5420
|
"\u2014 ",
|
|
5417
5421
|
node.preview
|
|
5418
5422
|
),
|
|
5419
|
-
canMove && /* @__PURE__ */
|
|
5423
|
+
canMove && /* @__PURE__ */ React62.createElement(
|
|
5420
5424
|
Box,
|
|
5421
5425
|
{
|
|
5422
5426
|
className: "outline-move-btns",
|
|
@@ -5427,7 +5431,7 @@ function OutlineRow({
|
|
|
5427
5431
|
transition: "opacity 120ms"
|
|
5428
5432
|
}
|
|
5429
5433
|
},
|
|
5430
|
-
/* @__PURE__ */
|
|
5434
|
+
/* @__PURE__ */ React62.createElement(Tooltip, { title: "Move up" }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
|
|
5431
5435
|
IconButton,
|
|
5432
5436
|
{
|
|
5433
5437
|
size: "small",
|
|
@@ -5439,9 +5443,9 @@ function OutlineRow({
|
|
|
5439
5443
|
"aria-label": `Move ${node.label} up`,
|
|
5440
5444
|
sx: { p: 0.25 }
|
|
5441
5445
|
},
|
|
5442
|
-
/* @__PURE__ */
|
|
5446
|
+
/* @__PURE__ */ React62.createElement(KeyboardArrowUp, { fontSize: "small" })
|
|
5443
5447
|
))),
|
|
5444
|
-
/* @__PURE__ */
|
|
5448
|
+
/* @__PURE__ */ React62.createElement(Tooltip, { title: "Move down" }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
|
|
5445
5449
|
IconButton,
|
|
5446
5450
|
{
|
|
5447
5451
|
size: "small",
|
|
@@ -5453,10 +5457,10 @@ function OutlineRow({
|
|
|
5453
5457
|
"aria-label": `Move ${node.label} down`,
|
|
5454
5458
|
sx: { p: 0.25 }
|
|
5455
5459
|
},
|
|
5456
|
-
/* @__PURE__ */
|
|
5460
|
+
/* @__PURE__ */ React62.createElement(KeyboardArrowDown, { fontSize: "small" })
|
|
5457
5461
|
)))
|
|
5458
5462
|
)
|
|
5459
|
-
), dropPos === "after" && /* @__PURE__ */
|
|
5463
|
+
), dropPos === "after" && /* @__PURE__ */ React62.createElement(DropLine, { depth })), hasChildren && expanded && /* @__PURE__ */ React62.createElement(Box, null, node.children.map((child) => /* @__PURE__ */ React62.createElement(
|
|
5460
5464
|
OutlineRow,
|
|
5461
5465
|
{
|
|
5462
5466
|
key: child.id,
|
|
@@ -5471,7 +5475,7 @@ function OutlineRow({
|
|
|
5471
5475
|
))));
|
|
5472
5476
|
}
|
|
5473
5477
|
function DropLine({ depth }) {
|
|
5474
|
-
return /* @__PURE__ */
|
|
5478
|
+
return /* @__PURE__ */ React62.createElement(
|
|
5475
5479
|
Box,
|
|
5476
5480
|
{
|
|
5477
5481
|
sx: {
|
|
@@ -5479,7 +5483,7 @@ function DropLine({ depth }) {
|
|
|
5479
5483
|
height: 0
|
|
5480
5484
|
}
|
|
5481
5485
|
},
|
|
5482
|
-
/* @__PURE__ */
|
|
5486
|
+
/* @__PURE__ */ React62.createElement(
|
|
5483
5487
|
Box,
|
|
5484
5488
|
{
|
|
5485
5489
|
sx: {
|
|
@@ -5540,7 +5544,7 @@ function NewTemplatePickerDialog({
|
|
|
5540
5544
|
}
|
|
5541
5545
|
});
|
|
5542
5546
|
const pickable = samples.filter((s) => s.id !== "empty-email");
|
|
5543
|
-
return /* @__PURE__ */
|
|
5547
|
+
return /* @__PURE__ */ React62.createElement(Dialog, { open, onClose: busy ? void 0 : onClose, maxWidth: "sm", fullWidth: true }, /* @__PURE__ */ React62.createElement(DialogTitle, null, kind === "sample" ? t("picker.title-sample", "New sample") : t("picker.title-template", "New template")), /* @__PURE__ */ React62.createElement(DialogContent, { dividers: true }, /* @__PURE__ */ React62.createElement(Typography, { variant: "subtitle2", sx: { mb: 1 } }, t("picker.start-from", "Start from")), /* @__PURE__ */ React62.createElement(
|
|
5544
5548
|
List,
|
|
5545
5549
|
{
|
|
5546
5550
|
dense: true,
|
|
@@ -5554,24 +5558,24 @@ function NewTemplatePickerDialog({
|
|
|
5554
5558
|
overflowY: "auto"
|
|
5555
5559
|
}
|
|
5556
5560
|
},
|
|
5557
|
-
/* @__PURE__ */
|
|
5561
|
+
/* @__PURE__ */ React62.createElement(
|
|
5558
5562
|
ListItemButton,
|
|
5559
5563
|
{
|
|
5560
5564
|
selected: selectedStarter === null,
|
|
5561
5565
|
onClick: () => setSelectedStarter(null)
|
|
5562
5566
|
},
|
|
5563
|
-
/* @__PURE__ */
|
|
5567
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1.5, flex: 1 } }, /* @__PURE__ */ React62.createElement(InsertDriveFileOutlined, { fontSize: "small", sx: { color: "text.secondary" } }), /* @__PURE__ */ React62.createElement(ListItemText, { primary: t("picker.blank-title", "Blank"), secondary: t("picker.blank-desc", "Start from an empty email") }))
|
|
5564
5568
|
),
|
|
5565
|
-
pickable.map((s) => /* @__PURE__ */
|
|
5569
|
+
pickable.map((s) => /* @__PURE__ */ React62.createElement(
|
|
5566
5570
|
ListItemButton,
|
|
5567
5571
|
{
|
|
5568
5572
|
key: s.id,
|
|
5569
5573
|
selected: selectedStarter === s.id,
|
|
5570
5574
|
onClick: () => setSelectedStarter(s.id)
|
|
5571
5575
|
},
|
|
5572
|
-
/* @__PURE__ */
|
|
5576
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1.5, flex: 1 } }, /* @__PURE__ */ React62.createElement(DescriptionOutlined, { fontSize: "small", sx: { color: "text.secondary" } }), /* @__PURE__ */ React62.createElement(ListItemText, { primary: s.slug, secondary: s.description }))
|
|
5573
5577
|
))
|
|
5574
|
-
), /* @__PURE__ */
|
|
5578
|
+
), /* @__PURE__ */ React62.createElement(
|
|
5575
5579
|
TextField,
|
|
5576
5580
|
{
|
|
5577
5581
|
autoFocus: true,
|
|
@@ -5591,7 +5595,7 @@ function NewTemplatePickerDialog({
|
|
|
5591
5595
|
helperText: error != null ? error : " ",
|
|
5592
5596
|
disabled: busy
|
|
5593
5597
|
}
|
|
5594
|
-
)), /* @__PURE__ */
|
|
5598
|
+
)), /* @__PURE__ */ React62.createElement(DialogActions, null, /* @__PURE__ */ React62.createElement(Button$1, { onClick: onClose, disabled: busy }, t("common.cancel", "Cancel")), /* @__PURE__ */ React62.createElement(Button$1, { variant: "contained", onClick: handleCreate, disabled: busy }, busy ? t("picker.creating", "Creating\u2026") : kind === "sample" ? t("picker.create-sample", "Create sample") : t("picker.create-template", "Create template"))));
|
|
5595
5599
|
}
|
|
5596
5600
|
function RenameDialog({
|
|
5597
5601
|
open,
|
|
@@ -5653,7 +5657,7 @@ function RenameDialog({
|
|
|
5653
5657
|
setSubmitting(false);
|
|
5654
5658
|
}
|
|
5655
5659
|
});
|
|
5656
|
-
return /* @__PURE__ */
|
|
5660
|
+
return /* @__PURE__ */ React62.createElement(Dialog, { open, onClose: submitting ? void 0 : onClose, maxWidth: "sm", fullWidth: true }, /* @__PURE__ */ React62.createElement(DialogTitle, null, t("rename.title", "Edit details")), /* @__PURE__ */ React62.createElement(DialogContent, null, /* @__PURE__ */ React62.createElement(
|
|
5657
5661
|
TextField,
|
|
5658
5662
|
{
|
|
5659
5663
|
autoFocus: true,
|
|
@@ -5673,7 +5677,7 @@ function RenameDialog({
|
|
|
5673
5677
|
if (e.key === "Enter" && !submitting) handleSubmit();
|
|
5674
5678
|
}
|
|
5675
5679
|
}
|
|
5676
|
-
), /* @__PURE__ */
|
|
5680
|
+
), /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.secondary", display: "block", mt: 1, mb: 0.5 } }, t("rename.tags", "Tags")), tags.length > 0 ? /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, sx: { flexWrap: "wrap", gap: 0.5, mb: 1 } }, tags.map((tag) => /* @__PURE__ */ React62.createElement(
|
|
5677
5681
|
Chip,
|
|
5678
5682
|
{
|
|
5679
5683
|
key: tag,
|
|
@@ -5681,7 +5685,7 @@ function RenameDialog({
|
|
|
5681
5685
|
size: "small",
|
|
5682
5686
|
onDelete: submitting ? void 0 : () => removeTag(tag)
|
|
5683
5687
|
}
|
|
5684
|
-
))) : /* @__PURE__ */
|
|
5688
|
+
))) : /* @__PURE__ */ React62.createElement(Typography, { variant: "caption", sx: { color: "text.disabled", display: "block", mb: 1 } }, t("rename.no-tags", "No tags yet.")), /* @__PURE__ */ React62.createElement(
|
|
5685
5689
|
TextField,
|
|
5686
5690
|
{
|
|
5687
5691
|
size: "small",
|
|
@@ -5700,20 +5704,20 @@ function RenameDialog({
|
|
|
5700
5704
|
}
|
|
5701
5705
|
},
|
|
5702
5706
|
InputProps: {
|
|
5703
|
-
endAdornment: /* @__PURE__ */
|
|
5707
|
+
endAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React62.createElement(
|
|
5704
5708
|
Button$1,
|
|
5705
5709
|
{
|
|
5706
5710
|
size: "small",
|
|
5707
5711
|
onClick: addTag,
|
|
5708
5712
|
disabled: !tagInput.trim() || submitting,
|
|
5709
|
-
startIcon: /* @__PURE__ */
|
|
5713
|
+
startIcon: /* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" }),
|
|
5710
5714
|
sx: { textTransform: "none" }
|
|
5711
5715
|
},
|
|
5712
5716
|
t("common.add", "Add")
|
|
5713
5717
|
))
|
|
5714
5718
|
}
|
|
5715
5719
|
}
|
|
5716
|
-
), /* @__PURE__ */
|
|
5720
|
+
), /* @__PURE__ */ React62.createElement(Box, { sx: { minHeight: 8 } })), /* @__PURE__ */ React62.createElement(DialogActions, null, /* @__PURE__ */ React62.createElement(Button$1, { onClick: onClose, disabled: submitting }, t("common.cancel", "Cancel")), /* @__PURE__ */ React62.createElement(
|
|
5717
5721
|
Button$1,
|
|
5718
5722
|
{
|
|
5719
5723
|
onClick: handleSubmit,
|
|
@@ -5783,7 +5787,7 @@ function SaveTemplateDialog({
|
|
|
5783
5787
|
setInternalError("");
|
|
5784
5788
|
onClose();
|
|
5785
5789
|
};
|
|
5786
|
-
return /* @__PURE__ */
|
|
5790
|
+
return /* @__PURE__ */ React62.createElement(
|
|
5787
5791
|
Dialog,
|
|
5788
5792
|
{
|
|
5789
5793
|
open,
|
|
@@ -5791,8 +5795,8 @@ function SaveTemplateDialog({
|
|
|
5791
5795
|
maxWidth: "sm",
|
|
5792
5796
|
fullWidth: true
|
|
5793
5797
|
},
|
|
5794
|
-
/* @__PURE__ */
|
|
5795
|
-
/* @__PURE__ */
|
|
5798
|
+
/* @__PURE__ */ React62.createElement(DialogTitle, null, mode === "new" ? t("save-dialog.title-new", "Create a new template") : t("save-dialog.title", "Save as a new template")),
|
|
5799
|
+
/* @__PURE__ */ React62.createElement(DialogContent, null, /* @__PURE__ */ React62.createElement(Box, { sx: { pt: 1 } }, /* @__PURE__ */ React62.createElement(
|
|
5796
5800
|
TextField,
|
|
5797
5801
|
{
|
|
5798
5802
|
autoFocus: true,
|
|
@@ -5815,7 +5819,7 @@ function SaveTemplateDialog({
|
|
|
5815
5819
|
disabled: isSubmitting
|
|
5816
5820
|
}
|
|
5817
5821
|
))),
|
|
5818
|
-
/* @__PURE__ */
|
|
5822
|
+
/* @__PURE__ */ React62.createElement(DialogActions, null, /* @__PURE__ */ React62.createElement(Button$1, { onClick: handleCancel, disabled: isSubmitting }, t("common.cancel", "Cancel")), /* @__PURE__ */ React62.createElement(
|
|
5819
5823
|
Button$1,
|
|
5820
5824
|
{
|
|
5821
5825
|
onClick: handleSave,
|
|
@@ -6136,7 +6140,7 @@ function SamplesDrawer({
|
|
|
6136
6140
|
return null;
|
|
6137
6141
|
}
|
|
6138
6142
|
const existingSlugs = templates.map((t2) => t2.slug);
|
|
6139
|
-
return /* @__PURE__ */
|
|
6143
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
6140
6144
|
Drawer,
|
|
6141
6145
|
{
|
|
6142
6146
|
variant: "persistent",
|
|
@@ -6151,7 +6155,7 @@ function SamplesDrawer({
|
|
|
6151
6155
|
transitionDuration: { enter: enterDuration, exit: exitDuration },
|
|
6152
6156
|
sx: { width: samplesDrawerOpen ? SAMPLES_DRAWER_WIDTH : 0 }
|
|
6153
6157
|
},
|
|
6154
|
-
/* @__PURE__ */
|
|
6158
|
+
/* @__PURE__ */ React62.createElement(
|
|
6155
6159
|
Stack,
|
|
6156
6160
|
{
|
|
6157
6161
|
py: 1,
|
|
@@ -6161,16 +6165,16 @@ function SamplesDrawer({
|
|
|
6161
6165
|
spacing: 1.5,
|
|
6162
6166
|
sx: { overflowY: "auto" }
|
|
6163
6167
|
},
|
|
6164
|
-
/* @__PURE__ */
|
|
6168
|
+
/* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { pt: 1 } }, /* @__PURE__ */ React62.createElement(Typography, { variant: "h6", component: "h1" }, /* @__PURE__ */ React62.createElement(Trans, { id: "drawer.library" }, "Library")), saveAs && (activeLeftTab === "templates" || activeLeftTab === "samples") && /* @__PURE__ */ React62.createElement(Tooltip, { title: activeLeftTab === "samples" ? t("drawer.new-sample", "New sample") : t("drawer.new-template", "New template") }, /* @__PURE__ */ React62.createElement(
|
|
6165
6169
|
IconButton,
|
|
6166
6170
|
{
|
|
6167
6171
|
size: "small",
|
|
6168
6172
|
onClick: () => openNewPicker(activeLeftTab === "samples" ? "sample" : "template"),
|
|
6169
6173
|
"aria-label": activeLeftTab === "samples" ? t("drawer.new-sample", "New sample") : t("drawer.new-template", "New template")
|
|
6170
6174
|
},
|
|
6171
|
-
/* @__PURE__ */
|
|
6175
|
+
/* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" })
|
|
6172
6176
|
))),
|
|
6173
|
-
/* @__PURE__ */
|
|
6177
|
+
/* @__PURE__ */ React62.createElement(
|
|
6174
6178
|
Tabs,
|
|
6175
6179
|
{
|
|
6176
6180
|
value: activeLeftTab,
|
|
@@ -6178,11 +6182,11 @@ function SamplesDrawer({
|
|
|
6178
6182
|
variant: "fullWidth",
|
|
6179
6183
|
sx: { minHeight: 36, "& .MuiTab-root": { minHeight: 36, minWidth: 0, px: 1, fontSize: 13 } }
|
|
6180
6184
|
},
|
|
6181
|
-
/* @__PURE__ */
|
|
6182
|
-
/* @__PURE__ */
|
|
6183
|
-
/* @__PURE__ */
|
|
6185
|
+
/* @__PURE__ */ React62.createElement(Tab, { value: "templates", label: t("drawer.tab.templates", "Templates"), disabled: !loadTemplates }),
|
|
6186
|
+
/* @__PURE__ */ React62.createElement(Tab, { value: "samples", label: t("drawer.tab.samples", "Samples") }),
|
|
6187
|
+
/* @__PURE__ */ React62.createElement(Tab, { value: "outline", label: t("drawer.tab.outline", "Outline") })
|
|
6184
6188
|
),
|
|
6185
|
-
activeLeftTab === "outline" ? /* @__PURE__ */
|
|
6189
|
+
activeLeftTab === "outline" ? /* @__PURE__ */ React62.createElement(OutlinePanel, null) : /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
6186
6190
|
TextField,
|
|
6187
6191
|
{
|
|
6188
6192
|
size: "small",
|
|
@@ -6190,10 +6194,10 @@ function SamplesDrawer({
|
|
|
6190
6194
|
value: search,
|
|
6191
6195
|
onChange: (e) => setSearch(e.target.value),
|
|
6192
6196
|
InputProps: {
|
|
6193
|
-
startAdornment: /* @__PURE__ */
|
|
6197
|
+
startAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(SearchOutlined, { fontSize: "small" }))
|
|
6194
6198
|
}
|
|
6195
6199
|
}
|
|
6196
|
-
), /* @__PURE__ */
|
|
6200
|
+
), /* @__PURE__ */ React62.createElement(
|
|
6197
6201
|
TextField,
|
|
6198
6202
|
{
|
|
6199
6203
|
select: true,
|
|
@@ -6202,8 +6206,8 @@ function SamplesDrawer({
|
|
|
6202
6206
|
value: sortKey,
|
|
6203
6207
|
onChange: (e) => setSortKey(e.target.value)
|
|
6204
6208
|
},
|
|
6205
|
-
SORT_OPTIONS.map((opt) => /* @__PURE__ */
|
|
6206
|
-
), allTags.length > 0 && /* @__PURE__ */
|
|
6209
|
+
SORT_OPTIONS.map((opt) => /* @__PURE__ */ React62.createElement(MenuItem, { key: opt.value, value: opt.value }, t(opt.labelKey, opt.fallback)))
|
|
6210
|
+
), allTags.length > 0 && /* @__PURE__ */ React62.createElement(Stack, { direction: "row", sx: { flexWrap: "wrap", gap: 0.5 } }, /* @__PURE__ */ React62.createElement(
|
|
6207
6211
|
Chip,
|
|
6208
6212
|
{
|
|
6209
6213
|
label: t("drawer.tag.all", "All"),
|
|
@@ -6213,18 +6217,18 @@ function SamplesDrawer({
|
|
|
6213
6217
|
variant: activeTags.length === 0 ? "filled" : "outlined",
|
|
6214
6218
|
onClick: () => setActiveTags([])
|
|
6215
6219
|
}
|
|
6216
|
-
), allTags.map((tag) => /* @__PURE__ */
|
|
6220
|
+
), allTags.map((tag) => /* @__PURE__ */ React62.createElement(
|
|
6217
6221
|
Chip,
|
|
6218
6222
|
{
|
|
6219
6223
|
key: tag,
|
|
6220
|
-
label: tag,
|
|
6224
|
+
label: t(`tag.${tag}`, tag),
|
|
6221
6225
|
size: "small",
|
|
6222
6226
|
clickable: true,
|
|
6223
6227
|
color: activeTags.includes(tag) ? "primary" : "default",
|
|
6224
6228
|
variant: activeTags.includes(tag) ? "filled" : "outlined",
|
|
6225
6229
|
onClick: () => toggleTag(tag)
|
|
6226
6230
|
}
|
|
6227
|
-
))), activeLeftTab === "templates" ? /* @__PURE__ */
|
|
6231
|
+
))), activeLeftTab === "templates" ? /* @__PURE__ */ React62.createElement(Box, null, loadingTemplates ? /* @__PURE__ */ React62.createElement(Stack, { alignItems: "center", width: "100%", py: 2 }, /* @__PURE__ */ React62.createElement(CircularProgress, { size: 24 })) : templatesError ? /* @__PURE__ */ React62.createElement(Alert, { severity: "error", sx: { my: 1 } }, templatesError) : filteredTemplates.length > 0 ? /* @__PURE__ */ React62.createElement(Stack, { spacing: 0.25, sx: { width: "100%" } }, filteredTemplates.map((template) => /* @__PURE__ */ React62.createElement(
|
|
6228
6232
|
TemplateRow,
|
|
6229
6233
|
{
|
|
6230
6234
|
key: template.id,
|
|
@@ -6236,7 +6240,7 @@ function SamplesDrawer({
|
|
|
6236
6240
|
onDelete: deleteTemplate ? () => handleDelete(template) : void 0,
|
|
6237
6241
|
onPromote: setTemplateKind ? () => handleSetKind(template, "sample") : void 0
|
|
6238
6242
|
}
|
|
6239
|
-
))) : /* @__PURE__ */
|
|
6243
|
+
))) : /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", py: 1 } }, templateRows.length === 0 ? t("drawer.no-templates", "No saved templates yet") : t("drawer.no-templates-match", "No templates match your filters"))) : /* @__PURE__ */ React62.createElement(Box, null, loadingSamples ? /* @__PURE__ */ React62.createElement(Stack, { alignItems: "center", width: "100%", py: 2 }, /* @__PURE__ */ React62.createElement(CircularProgress, { size: 24 })) : filteredSamples.length > 0 ? /* @__PURE__ */ React62.createElement(Stack, { spacing: 0.25, sx: { width: "100%" } }, filteredSamples.map((sample) => /* @__PURE__ */ React62.createElement(
|
|
6240
6244
|
TemplateRow,
|
|
6241
6245
|
{
|
|
6242
6246
|
key: sample.id,
|
|
@@ -6248,9 +6252,9 @@ function SamplesDrawer({
|
|
|
6248
6252
|
onDelete: deleteTemplate ? () => handleDelete(sample) : void 0,
|
|
6249
6253
|
onDemote: setTemplateKind ? () => handleSetKind(sample, "template") : void 0
|
|
6250
6254
|
}
|
|
6251
|
-
))) : /* @__PURE__ */
|
|
6255
|
+
))) : /* @__PURE__ */ React62.createElement(Typography, { variant: "body2", sx: { color: "text.secondary", py: 1 } }, sampleRows.length === 0 ? t("drawer.no-samples", "No samples available") : t("drawer.no-samples-match", "No samples match your filters"))))
|
|
6252
6256
|
)
|
|
6253
|
-
), renameTarget && /* @__PURE__ */
|
|
6257
|
+
), renameTarget && /* @__PURE__ */ React62.createElement(
|
|
6254
6258
|
RenameDialog,
|
|
6255
6259
|
{
|
|
6256
6260
|
open: !!renameTarget,
|
|
@@ -6260,7 +6264,7 @@ function SamplesDrawer({
|
|
|
6260
6264
|
onClose: () => setRenameTarget(null),
|
|
6261
6265
|
onSubmit: handleRenameSubmit
|
|
6262
6266
|
}
|
|
6263
|
-
), /* @__PURE__ */
|
|
6267
|
+
), /* @__PURE__ */ React62.createElement(
|
|
6264
6268
|
SaveTemplateDialog,
|
|
6265
6269
|
{
|
|
6266
6270
|
open: !!pendingSaveAs,
|
|
@@ -6273,7 +6277,7 @@ function SamplesDrawer({
|
|
|
6273
6277
|
defaultName: (_b = pendingSaveAs == null ? void 0 : pendingSaveAs.defaultName) != null ? _b : "New Template",
|
|
6274
6278
|
error: newError
|
|
6275
6279
|
}
|
|
6276
|
-
), /* @__PURE__ */
|
|
6280
|
+
), /* @__PURE__ */ React62.createElement(
|
|
6277
6281
|
NewTemplatePickerDialog,
|
|
6278
6282
|
{
|
|
6279
6283
|
open: pickerKind !== null,
|
|
@@ -6297,7 +6301,7 @@ var ICON_SX = {
|
|
|
6297
6301
|
borderColor: "cadet.300"
|
|
6298
6302
|
};
|
|
6299
6303
|
function BlockTypeButton({ label, icon, onClick }) {
|
|
6300
|
-
return /* @__PURE__ */
|
|
6304
|
+
return /* @__PURE__ */ React62.createElement(
|
|
6301
6305
|
Button$1,
|
|
6302
6306
|
{
|
|
6303
6307
|
sx: BUTTON_SX2,
|
|
@@ -6306,14 +6310,14 @@ function BlockTypeButton({ label, icon, onClick }) {
|
|
|
6306
6310
|
onClick();
|
|
6307
6311
|
}
|
|
6308
6312
|
},
|
|
6309
|
-
/* @__PURE__ */
|
|
6310
|
-
/* @__PURE__ */
|
|
6313
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: ICON_SX }, icon),
|
|
6314
|
+
/* @__PURE__ */ React62.createElement(Typography, { variant: "body2" }, label)
|
|
6311
6315
|
);
|
|
6312
6316
|
}
|
|
6313
6317
|
var BUTTONS = [
|
|
6314
6318
|
{
|
|
6315
6319
|
label: "Heading",
|
|
6316
|
-
icon: /* @__PURE__ */
|
|
6320
|
+
icon: /* @__PURE__ */ React62.createElement(HMobiledataOutlined, null),
|
|
6317
6321
|
block: () => ({
|
|
6318
6322
|
type: "Heading",
|
|
6319
6323
|
data: {
|
|
@@ -6326,7 +6330,7 @@ var BUTTONS = [
|
|
|
6326
6330
|
},
|
|
6327
6331
|
{
|
|
6328
6332
|
label: "Text",
|
|
6329
|
-
icon: /* @__PURE__ */
|
|
6333
|
+
icon: /* @__PURE__ */ React62.createElement(NotesOutlined, null),
|
|
6330
6334
|
block: () => ({
|
|
6331
6335
|
type: "Text",
|
|
6332
6336
|
data: {
|
|
@@ -6340,7 +6344,7 @@ var BUTTONS = [
|
|
|
6340
6344
|
},
|
|
6341
6345
|
{
|
|
6342
6346
|
label: "Button",
|
|
6343
|
-
icon: /* @__PURE__ */
|
|
6347
|
+
icon: /* @__PURE__ */ React62.createElement(SmartButtonOutlined, null),
|
|
6344
6348
|
block: () => ({
|
|
6345
6349
|
type: "Button",
|
|
6346
6350
|
data: {
|
|
@@ -6354,7 +6358,7 @@ var BUTTONS = [
|
|
|
6354
6358
|
},
|
|
6355
6359
|
{
|
|
6356
6360
|
label: "Image",
|
|
6357
|
-
icon: /* @__PURE__ */
|
|
6361
|
+
icon: /* @__PURE__ */ React62.createElement(ImageOutlined, null),
|
|
6358
6362
|
block: () => ({
|
|
6359
6363
|
type: "Image",
|
|
6360
6364
|
data: {
|
|
@@ -6370,7 +6374,7 @@ var BUTTONS = [
|
|
|
6370
6374
|
},
|
|
6371
6375
|
{
|
|
6372
6376
|
label: "Avatar",
|
|
6373
|
-
icon: /* @__PURE__ */
|
|
6377
|
+
icon: /* @__PURE__ */ React62.createElement(AccountCircleOutlined, null),
|
|
6374
6378
|
block: () => ({
|
|
6375
6379
|
type: "Avatar",
|
|
6376
6380
|
data: {
|
|
@@ -6384,7 +6388,7 @@ var BUTTONS = [
|
|
|
6384
6388
|
},
|
|
6385
6389
|
{
|
|
6386
6390
|
label: "Personal Signature",
|
|
6387
|
-
icon: /* @__PURE__ */
|
|
6391
|
+
icon: /* @__PURE__ */ React62.createElement(ContactMailOutlined, null),
|
|
6388
6392
|
block: () => ({
|
|
6389
6393
|
type: "Signature",
|
|
6390
6394
|
data: {
|
|
@@ -6406,7 +6410,7 @@ var BUTTONS = [
|
|
|
6406
6410
|
},
|
|
6407
6411
|
{
|
|
6408
6412
|
label: "Company Signature",
|
|
6409
|
-
icon: /* @__PURE__ */
|
|
6413
|
+
icon: /* @__PURE__ */ React62.createElement(BusinessOutlined, null),
|
|
6410
6414
|
block: () => ({
|
|
6411
6415
|
type: "Signature",
|
|
6412
6416
|
data: {
|
|
@@ -6426,7 +6430,7 @@ var BUTTONS = [
|
|
|
6426
6430
|
},
|
|
6427
6431
|
{
|
|
6428
6432
|
label: "Divider",
|
|
6429
|
-
icon: /* @__PURE__ */
|
|
6433
|
+
icon: /* @__PURE__ */ React62.createElement(HorizontalRuleOutlined, null),
|
|
6430
6434
|
block: () => ({
|
|
6431
6435
|
type: "Divider",
|
|
6432
6436
|
data: {
|
|
@@ -6439,7 +6443,7 @@ var BUTTONS = [
|
|
|
6439
6443
|
},
|
|
6440
6444
|
{
|
|
6441
6445
|
label: "Spacer",
|
|
6442
|
-
icon: /* @__PURE__ */
|
|
6446
|
+
icon: /* @__PURE__ */ React62.createElement(Crop32Outlined, null),
|
|
6443
6447
|
block: () => ({
|
|
6444
6448
|
type: "Spacer",
|
|
6445
6449
|
data: {}
|
|
@@ -6447,7 +6451,7 @@ var BUTTONS = [
|
|
|
6447
6451
|
},
|
|
6448
6452
|
{
|
|
6449
6453
|
label: "Html",
|
|
6450
|
-
icon: /* @__PURE__ */
|
|
6454
|
+
icon: /* @__PURE__ */ React62.createElement(HtmlOutlined, null),
|
|
6451
6455
|
block: () => ({
|
|
6452
6456
|
type: "Html",
|
|
6453
6457
|
data: {
|
|
@@ -6462,7 +6466,7 @@ var BUTTONS = [
|
|
|
6462
6466
|
},
|
|
6463
6467
|
{
|
|
6464
6468
|
label: "Columns",
|
|
6465
|
-
icon: /* @__PURE__ */
|
|
6469
|
+
icon: /* @__PURE__ */ React62.createElement(ViewColumnOutlined, null),
|
|
6466
6470
|
block: () => ({
|
|
6467
6471
|
type: "ColumnsContainer",
|
|
6468
6472
|
data: {
|
|
@@ -6477,7 +6481,7 @@ var BUTTONS = [
|
|
|
6477
6481
|
},
|
|
6478
6482
|
{
|
|
6479
6483
|
label: "Container",
|
|
6480
|
-
icon: /* @__PURE__ */
|
|
6484
|
+
icon: /* @__PURE__ */ React62.createElement(LibraryAddOutlined, null),
|
|
6481
6485
|
block: () => ({
|
|
6482
6486
|
type: "Container",
|
|
6483
6487
|
data: {
|
|
@@ -6490,6 +6494,20 @@ var BUTTONS = [
|
|
|
6490
6494
|
];
|
|
6491
6495
|
|
|
6492
6496
|
// src/editor/blocks/helpers/editor-children-ids/add-block-menu/blocks-menu.tsx
|
|
6497
|
+
var LABEL_KEYS = {
|
|
6498
|
+
Heading: "block-add.heading",
|
|
6499
|
+
Text: "block-add.text",
|
|
6500
|
+
Button: "block-add.button",
|
|
6501
|
+
Image: "block-add.image",
|
|
6502
|
+
Avatar: "block-add.avatar",
|
|
6503
|
+
"Personal Signature": "block-add.personal-signature",
|
|
6504
|
+
"Company Signature": "block-add.company-signature",
|
|
6505
|
+
Divider: "block-add.divider",
|
|
6506
|
+
Spacer: "block-add.spacer",
|
|
6507
|
+
Html: "block-add.html",
|
|
6508
|
+
Columns: "block-add.columns",
|
|
6509
|
+
Container: "block-add.container"
|
|
6510
|
+
};
|
|
6493
6511
|
function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
|
|
6494
6512
|
const onClose = () => {
|
|
6495
6513
|
setAnchorEl(null);
|
|
@@ -6501,7 +6519,7 @@ function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
|
|
|
6501
6519
|
if (anchorEl === null) {
|
|
6502
6520
|
return null;
|
|
6503
6521
|
}
|
|
6504
|
-
return /* @__PURE__ */
|
|
6522
|
+
return /* @__PURE__ */ React62.createElement(
|
|
6505
6523
|
Menu,
|
|
6506
6524
|
{
|
|
6507
6525
|
open: true,
|
|
@@ -6510,7 +6528,15 @@ function BlocksMenu({ anchorEl, setAnchorEl, onSelect }) {
|
|
|
6510
6528
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
6511
6529
|
transformOrigin: { vertical: "top", horizontal: "center" }
|
|
6512
6530
|
},
|
|
6513
|
-
/* @__PURE__ */
|
|
6531
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { p: 1, display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr" } }, BUTTONS.map((k, i) => /* @__PURE__ */ React62.createElement(
|
|
6532
|
+
BlockTypeButton,
|
|
6533
|
+
{
|
|
6534
|
+
key: i,
|
|
6535
|
+
label: LABEL_KEYS[k.label] ? t(LABEL_KEYS[k.label], k.label) : k.label,
|
|
6536
|
+
icon: k.icon,
|
|
6537
|
+
onClick: () => onClick(k.block())
|
|
6538
|
+
}
|
|
6539
|
+
)))
|
|
6514
6540
|
);
|
|
6515
6541
|
}
|
|
6516
6542
|
function DividerButton({ buttonElement, onClick }) {
|
|
@@ -6537,7 +6563,7 @@ function DividerButton({ buttonElement, onClick }) {
|
|
|
6537
6563
|
window.removeEventListener("mousemove", listener);
|
|
6538
6564
|
};
|
|
6539
6565
|
}, [buttonElement, setVisible]);
|
|
6540
|
-
return /* @__PURE__ */
|
|
6566
|
+
return /* @__PURE__ */ React62.createElement(Fade, { in: visible }, /* @__PURE__ */ React62.createElement(
|
|
6541
6567
|
IconButton,
|
|
6542
6568
|
{
|
|
6543
6569
|
size: "small",
|
|
@@ -6560,11 +6586,11 @@ function DividerButton({ buttonElement, onClick }) {
|
|
|
6560
6586
|
onClick();
|
|
6561
6587
|
}
|
|
6562
6588
|
},
|
|
6563
|
-
/* @__PURE__ */
|
|
6589
|
+
/* @__PURE__ */ React62.createElement(AddOutlined, { fontSize: "small" })
|
|
6564
6590
|
));
|
|
6565
6591
|
}
|
|
6566
6592
|
function PlaceholderButton({ onClick }) {
|
|
6567
|
-
return /* @__PURE__ */
|
|
6593
|
+
return /* @__PURE__ */ React62.createElement(
|
|
6568
6594
|
ButtonBase,
|
|
6569
6595
|
{
|
|
6570
6596
|
onClick: (ev) => {
|
|
@@ -6580,7 +6606,7 @@ function PlaceholderButton({ onClick }) {
|
|
|
6580
6606
|
bgcolor: "rgba(0,0,0, 0.05)"
|
|
6581
6607
|
}
|
|
6582
6608
|
},
|
|
6583
|
-
/* @__PURE__ */
|
|
6609
|
+
/* @__PURE__ */ React62.createElement(
|
|
6584
6610
|
AddOutlined,
|
|
6585
6611
|
{
|
|
6586
6612
|
sx: {
|
|
@@ -6604,19 +6630,19 @@ function AddBlockButton({ onSelect, placeholder }) {
|
|
|
6604
6630
|
};
|
|
6605
6631
|
const renderButton2 = () => {
|
|
6606
6632
|
if (placeholder) {
|
|
6607
|
-
return /* @__PURE__ */
|
|
6633
|
+
return /* @__PURE__ */ React62.createElement(PlaceholderButton, { onClick: handleButtonClick });
|
|
6608
6634
|
} else {
|
|
6609
|
-
return /* @__PURE__ */
|
|
6635
|
+
return /* @__PURE__ */ React62.createElement(DividerButton, { buttonElement, onClick: handleButtonClick });
|
|
6610
6636
|
}
|
|
6611
6637
|
};
|
|
6612
|
-
return /* @__PURE__ */
|
|
6638
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement("div", { ref: setButtonElement, style: { position: "relative" } }, renderButton2()), /* @__PURE__ */ React62.createElement(BlocksMenu, { anchorEl: menuAnchorEl, setAnchorEl: setMenuAnchorEl, onSelect }));
|
|
6613
6639
|
}
|
|
6614
6640
|
var BlockParentContext = createContext(null);
|
|
6615
6641
|
function BlockParentProvider({
|
|
6616
6642
|
info,
|
|
6617
6643
|
children
|
|
6618
6644
|
}) {
|
|
6619
|
-
return /* @__PURE__ */
|
|
6645
|
+
return /* @__PURE__ */ React62.createElement(BlockParentContext.Provider, { value: info }, children);
|
|
6620
6646
|
}
|
|
6621
6647
|
function useBlockParent() {
|
|
6622
6648
|
return useContext(BlockParentContext);
|
|
@@ -6646,9 +6672,9 @@ function EditorChildrenIds({ childrenIds, onChange, parentRef }) {
|
|
|
6646
6672
|
});
|
|
6647
6673
|
};
|
|
6648
6674
|
if (!childrenIds || childrenIds.length === 0) {
|
|
6649
|
-
return /* @__PURE__ */
|
|
6675
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(AddBlockButton, { placeholder: true, onSelect: appendBlock }), parentRef && /* @__PURE__ */ React62.createElement(CanvasDropZone, { parentRef, targetIndex: 0, placeholder: true }));
|
|
6650
6676
|
}
|
|
6651
|
-
return /* @__PURE__ */
|
|
6677
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, childrenIds.map((childId, i) => /* @__PURE__ */ React62.createElement(Fragment, { key: childId }, /* @__PURE__ */ React62.createElement(AddBlockButton, { onSelect: (block) => insertBlock(block, i) }), parentRef && /* @__PURE__ */ React62.createElement(CanvasDropZone, { parentRef, targetIndex: i }), parentRef ? /* @__PURE__ */ React62.createElement(BlockParentProvider, { info: { parent: parentRef, indexInParent: i } }, /* @__PURE__ */ React62.createElement(EditorBlock, { id: childId })) : /* @__PURE__ */ React62.createElement(EditorBlock, { id: childId }))), /* @__PURE__ */ React62.createElement(AddBlockButton, { onSelect: appendBlock }), parentRef && /* @__PURE__ */ React62.createElement(CanvasDropZone, { parentRef, targetIndex: childrenIds.length }));
|
|
6652
6678
|
}
|
|
6653
6679
|
function CanvasDropZone({
|
|
6654
6680
|
parentRef,
|
|
@@ -6685,7 +6711,7 @@ function CanvasDropZone({
|
|
|
6685
6711
|
}
|
|
6686
6712
|
setDraggingBlock(null);
|
|
6687
6713
|
};
|
|
6688
|
-
return /* @__PURE__ */
|
|
6714
|
+
return /* @__PURE__ */ React62.createElement(
|
|
6689
6715
|
Box,
|
|
6690
6716
|
{
|
|
6691
6717
|
onDragOver: handleDragOver,
|
|
@@ -6728,13 +6754,13 @@ function ColumnsContainerEditor({ style, props }) {
|
|
|
6728
6754
|
});
|
|
6729
6755
|
setSelectedBlockId(blockId);
|
|
6730
6756
|
};
|
|
6731
|
-
return /* @__PURE__ */
|
|
6757
|
+
return /* @__PURE__ */ React62.createElement(
|
|
6732
6758
|
columns_container_default,
|
|
6733
6759
|
{
|
|
6734
6760
|
props: restProps,
|
|
6735
6761
|
style,
|
|
6736
6762
|
columns: [
|
|
6737
|
-
/* @__PURE__ */
|
|
6763
|
+
/* @__PURE__ */ React62.createElement(
|
|
6738
6764
|
EditorChildrenIds,
|
|
6739
6765
|
{
|
|
6740
6766
|
childrenIds: (_b = columns == null ? void 0 : columns[0]) == null ? void 0 : _b.childrenIds,
|
|
@@ -6742,7 +6768,7 @@ function ColumnsContainerEditor({ style, props }) {
|
|
|
6742
6768
|
onChange: (change) => updateColumn(0, change)
|
|
6743
6769
|
}
|
|
6744
6770
|
),
|
|
6745
|
-
/* @__PURE__ */
|
|
6771
|
+
/* @__PURE__ */ React62.createElement(
|
|
6746
6772
|
EditorChildrenIds,
|
|
6747
6773
|
{
|
|
6748
6774
|
childrenIds: (_c = columns == null ? void 0 : columns[1]) == null ? void 0 : _c.childrenIds,
|
|
@@ -6750,7 +6776,7 @@ function ColumnsContainerEditor({ style, props }) {
|
|
|
6750
6776
|
onChange: (change) => updateColumn(1, change)
|
|
6751
6777
|
}
|
|
6752
6778
|
),
|
|
6753
|
-
/* @__PURE__ */
|
|
6779
|
+
/* @__PURE__ */ React62.createElement(
|
|
6754
6780
|
EditorChildrenIds,
|
|
6755
6781
|
{
|
|
6756
6782
|
childrenIds: (_d = columns == null ? void 0 : columns[2]) == null ? void 0 : _d.childrenIds,
|
|
@@ -6767,7 +6793,7 @@ function ContainerEditor({ style, props }) {
|
|
|
6767
6793
|
const childrenIds = (_a = props == null ? void 0 : props.childrenIds) != null ? _a : [];
|
|
6768
6794
|
const document2 = useDocument();
|
|
6769
6795
|
const currentBlockId = useCurrentBlockId();
|
|
6770
|
-
return /* @__PURE__ */
|
|
6796
|
+
return /* @__PURE__ */ React62.createElement(container_default, { style }, /* @__PURE__ */ React62.createElement(
|
|
6771
6797
|
EditorChildrenIds,
|
|
6772
6798
|
{
|
|
6773
6799
|
childrenIds,
|
|
@@ -6968,7 +6994,7 @@ function EmailLayoutEditor(props) {
|
|
|
6968
6994
|
lineHeight: "1.5",
|
|
6969
6995
|
margin: "0"
|
|
6970
6996
|
};
|
|
6971
|
-
const editorChildren = /* @__PURE__ */
|
|
6997
|
+
const editorChildren = /* @__PURE__ */ React62.createElement(
|
|
6972
6998
|
EditorChildrenIds,
|
|
6973
6999
|
{
|
|
6974
7000
|
childrenIds,
|
|
@@ -6995,7 +7021,7 @@ function EmailLayoutEditor(props) {
|
|
|
6995
7021
|
boxShadow: "0 1px 2px rgba(33, 36, 67, 0.05), 0 8px 24px rgba(33, 36, 67, 0.08)"
|
|
6996
7022
|
};
|
|
6997
7023
|
if (props.backdropDisabled) {
|
|
6998
|
-
return /* @__PURE__ */
|
|
7024
|
+
return /* @__PURE__ */ React62.createElement(
|
|
6999
7025
|
"div",
|
|
7000
7026
|
{
|
|
7001
7027
|
onClick: () => {
|
|
@@ -7007,7 +7033,7 @@ function EmailLayoutEditor(props) {
|
|
|
7007
7033
|
minHeight: "100%"
|
|
7008
7034
|
})
|
|
7009
7035
|
},
|
|
7010
|
-
/* @__PURE__ */
|
|
7036
|
+
/* @__PURE__ */ React62.createElement(
|
|
7011
7037
|
"div",
|
|
7012
7038
|
{
|
|
7013
7039
|
style: __spreadProps(__spreadValues({}, cardStyle), {
|
|
@@ -7015,11 +7041,11 @@ function EmailLayoutEditor(props) {
|
|
|
7015
7041
|
padding: "32px"
|
|
7016
7042
|
})
|
|
7017
7043
|
},
|
|
7018
|
-
/* @__PURE__ */
|
|
7044
|
+
/* @__PURE__ */ React62.createElement("div", { style: { maxWidth: "600px", margin: "0 auto" } }, editorChildren)
|
|
7019
7045
|
)
|
|
7020
7046
|
);
|
|
7021
7047
|
}
|
|
7022
|
-
return /* @__PURE__ */
|
|
7048
|
+
return /* @__PURE__ */ React62.createElement(
|
|
7023
7049
|
"div",
|
|
7024
7050
|
{
|
|
7025
7051
|
onClick: () => {
|
|
@@ -7031,7 +7057,7 @@ function EmailLayoutEditor(props) {
|
|
|
7031
7057
|
minHeight: "100%"
|
|
7032
7058
|
})
|
|
7033
7059
|
},
|
|
7034
|
-
/* @__PURE__ */
|
|
7060
|
+
/* @__PURE__ */ React62.createElement(
|
|
7035
7061
|
"div",
|
|
7036
7062
|
{
|
|
7037
7063
|
style: __spreadProps(__spreadValues({}, cardStyle), {
|
|
@@ -7039,7 +7065,7 @@ function EmailLayoutEditor(props) {
|
|
|
7039
7065
|
padding: "32px 0"
|
|
7040
7066
|
})
|
|
7041
7067
|
},
|
|
7042
|
-
/* @__PURE__ */
|
|
7068
|
+
/* @__PURE__ */ React62.createElement(
|
|
7043
7069
|
"table",
|
|
7044
7070
|
{
|
|
7045
7071
|
align: "center",
|
|
@@ -7063,7 +7089,7 @@ function EmailLayoutEditor(props) {
|
|
|
7063
7089
|
cellPadding: "0",
|
|
7064
7090
|
border: 0
|
|
7065
7091
|
},
|
|
7066
|
-
/* @__PURE__ */
|
|
7092
|
+
/* @__PURE__ */ React62.createElement("tbody", null, /* @__PURE__ */ React62.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React62.createElement("td", null, editorChildren)))
|
|
7067
7093
|
)
|
|
7068
7094
|
)
|
|
7069
7095
|
);
|
|
@@ -7223,7 +7249,7 @@ function TuneMenu({ blockId }) {
|
|
|
7223
7249
|
resetDocument(nDocument);
|
|
7224
7250
|
setSelectedBlockId(blockId);
|
|
7225
7251
|
};
|
|
7226
|
-
return /* @__PURE__ */
|
|
7252
|
+
return /* @__PURE__ */ React62.createElement(Paper, { sx, onClick: (ev) => ev.stopPropagation() }, /* @__PURE__ */ React62.createElement(Stack, null, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tune.move-up", "Move up"), placement: "left-start" }, /* @__PURE__ */ React62.createElement(IconButton, { "aria-label": t("tune.move-up", "Move up"), onClick: () => handleMoveClick("up"), sx: { color: "text.primary" } }, /* @__PURE__ */ React62.createElement(ArrowUpwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tune.move-down", "Move down"), placement: "left-start" }, /* @__PURE__ */ React62.createElement(IconButton, { "aria-label": t("tune.move-down", "Move down"), onClick: () => handleMoveClick("down"), sx: { color: "text.primary" } }, /* @__PURE__ */ React62.createElement(ArrowDownwardOutlined, { fontSize: "small" }))), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tune.copy", "Copy block"), placement: "left-start" }, /* @__PURE__ */ React62.createElement(IconButton, { "aria-label": t("tune.copy", "Copy block"), onClick: handleCopyClick, sx: { color: "text.primary" } }, /* @__PURE__ */ React62.createElement(ContentCopyOutlined, { fontSize: "small" }))), /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tune.delete", "Delete"), placement: "left-start" }, /* @__PURE__ */ React62.createElement(IconButton, { "aria-label": t("tune.delete", "Delete"), onClick: handleDeleteClick, sx: { color: "text.primary" } }, /* @__PURE__ */ React62.createElement(DeleteOutlined, { fontSize: "small" })))));
|
|
7227
7253
|
}
|
|
7228
7254
|
|
|
7229
7255
|
// src/editor/blocks/helpers/block-wrappers/editor-block-wrapper.tsx
|
|
@@ -7245,7 +7271,7 @@ function EditorBlockWrapper({ children }) {
|
|
|
7245
7271
|
if (selectedBlockId !== blockId) {
|
|
7246
7272
|
return null;
|
|
7247
7273
|
}
|
|
7248
|
-
return /* @__PURE__ */
|
|
7274
|
+
return /* @__PURE__ */ React62.createElement(TuneMenu, { blockId });
|
|
7249
7275
|
};
|
|
7250
7276
|
const draggable = Boolean(blockParent) && selectedBlockId !== blockId;
|
|
7251
7277
|
const handleDragStart = (e) => {
|
|
@@ -7258,7 +7284,7 @@ function EditorBlockWrapper({ children }) {
|
|
|
7258
7284
|
const handleDragEnd = () => {
|
|
7259
7285
|
setDraggingBlock(null);
|
|
7260
7286
|
};
|
|
7261
|
-
return /* @__PURE__ */
|
|
7287
|
+
return /* @__PURE__ */ React62.createElement(
|
|
7262
7288
|
Box,
|
|
7263
7289
|
{
|
|
7264
7290
|
draggable,
|
|
@@ -7403,7 +7429,7 @@ function ButtonEditor({ style, props }) {
|
|
|
7403
7429
|
selectionEnd: (_b2 = el.selectionEnd) != null ? _b2 : el.value.length
|
|
7404
7430
|
});
|
|
7405
7431
|
};
|
|
7406
|
-
return /* @__PURE__ */
|
|
7432
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React62.createElement(
|
|
7407
7433
|
"input",
|
|
7408
7434
|
{
|
|
7409
7435
|
type: "text",
|
|
@@ -7420,7 +7446,7 @@ function ButtonEditor({ style, props }) {
|
|
|
7420
7446
|
}
|
|
7421
7447
|
));
|
|
7422
7448
|
}
|
|
7423
|
-
return /* @__PURE__ */
|
|
7449
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React62.createElement("span", { style: linkStyle }, /* @__PURE__ */ React62.createElement("span", null, text)));
|
|
7424
7450
|
}
|
|
7425
7451
|
function useMarkdownToolbar({ text, isSelected, commitText, trackSelection }) {
|
|
7426
7452
|
const textareaRef = useRef(null);
|
|
@@ -7564,7 +7590,7 @@ function InlineFormattingToolbar({
|
|
|
7564
7590
|
}
|
|
7565
7591
|
}, [linkPrompt]);
|
|
7566
7592
|
const preventBlur = (e) => e.preventDefault();
|
|
7567
|
-
return /* @__PURE__ */
|
|
7593
|
+
return /* @__PURE__ */ React62.createElement(Popper, { open: visible, anchorEl, placement: "top-start", style: { zIndex: 1300 } }, /* @__PURE__ */ React62.createElement(Paper, { elevation: 4, sx: { px: 0.5, py: 0.25, mb: 0.5 }, onMouseDown: preventBlur }, linkPrompt ? /* @__PURE__ */ React62.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0.5, sx: { px: 0.5 } }, /* @__PURE__ */ React62.createElement(
|
|
7568
7594
|
TextField,
|
|
7569
7595
|
{
|
|
7570
7596
|
inputRef,
|
|
@@ -7586,7 +7612,7 @@ function InlineFormattingToolbar({
|
|
|
7586
7612
|
},
|
|
7587
7613
|
sx: { width: 220 }
|
|
7588
7614
|
}
|
|
7589
|
-
)) : /* @__PURE__ */
|
|
7615
|
+
)) : /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.25 }, /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onBold, title: t("toolbar.bold-shortcut", "Bold (Cmd+B)"), "aria-label": t("toolbar.bold", "Bold") }, /* @__PURE__ */ React62.createElement(FormatBoldOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onItalic, title: t("toolbar.italic-shortcut", "Italic (Cmd+I)"), "aria-label": t("toolbar.italic", "Italic") }, /* @__PURE__ */ React62.createElement(FormatItalicOutlined, { fontSize: "small" })), /* @__PURE__ */ React62.createElement(IconButton, { size: "small", onClick: onLinkRequest, title: t("toolbar.link-shortcut", "Link (Cmd+K)"), "aria-label": t("toolbar.link", "Link") }, /* @__PURE__ */ React62.createElement(LinkOutlined, { fontSize: "small" })))));
|
|
7590
7616
|
}
|
|
7591
7617
|
|
|
7592
7618
|
// src/editor/blocks/heading/heading-editor.tsx
|
|
@@ -7741,7 +7767,7 @@ function HeadingEditor({ style, props }) {
|
|
|
7741
7767
|
if (textareaRef.current) adjustTextareaHeight(textareaRef.current);
|
|
7742
7768
|
}, [localText, isSelected]);
|
|
7743
7769
|
if (isSelected) {
|
|
7744
|
-
return /* @__PURE__ */
|
|
7770
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
7745
7771
|
"textarea",
|
|
7746
7772
|
{
|
|
7747
7773
|
ref: textareaRef,
|
|
@@ -7759,7 +7785,7 @@ function HeadingEditor({ style, props }) {
|
|
|
7759
7785
|
rows: 1,
|
|
7760
7786
|
onInput: (e) => adjustTextareaHeight(e.target)
|
|
7761
7787
|
}
|
|
7762
|
-
), /* @__PURE__ */
|
|
7788
|
+
), /* @__PURE__ */ React62.createElement(InlineFormattingToolbar, __spreadValues({ anchorEl: textareaRef.current }, toolbarProps)));
|
|
7763
7789
|
}
|
|
7764
7790
|
const headingProps = isMarkdown ? {
|
|
7765
7791
|
ref: displayRef,
|
|
@@ -7768,11 +7794,11 @@ function HeadingEditor({ style, props }) {
|
|
|
7768
7794
|
} : { ref: displayRef, style: hStyle, children: textContent };
|
|
7769
7795
|
switch (level) {
|
|
7770
7796
|
case "h1":
|
|
7771
|
-
return /* @__PURE__ */
|
|
7797
|
+
return /* @__PURE__ */ React62.createElement("h1", __spreadValues({}, headingProps));
|
|
7772
7798
|
case "h2":
|
|
7773
|
-
return /* @__PURE__ */
|
|
7799
|
+
return /* @__PURE__ */ React62.createElement("h2", __spreadValues({}, headingProps));
|
|
7774
7800
|
case "h3":
|
|
7775
|
-
return /* @__PURE__ */
|
|
7801
|
+
return /* @__PURE__ */ React62.createElement("h3", __spreadValues({}, headingProps));
|
|
7776
7802
|
}
|
|
7777
7803
|
}
|
|
7778
7804
|
function HtmlEditor({ style, props }) {
|
|
@@ -7837,7 +7863,7 @@ function HtmlEditor({ style, props }) {
|
|
|
7837
7863
|
selectionEnd: (_b2 = el.selectionEnd) != null ? _b2 : el.value.length
|
|
7838
7864
|
});
|
|
7839
7865
|
};
|
|
7840
|
-
return /* @__PURE__ */
|
|
7866
|
+
return /* @__PURE__ */ React62.createElement("div", { style: cssStyle }, /* @__PURE__ */ React62.createElement(
|
|
7841
7867
|
"textarea",
|
|
7842
7868
|
{
|
|
7843
7869
|
value: localContents,
|
|
@@ -7857,9 +7883,9 @@ function HtmlEditor({ style, props }) {
|
|
|
7857
7883
|
));
|
|
7858
7884
|
}
|
|
7859
7885
|
if (!contents) {
|
|
7860
|
-
return /* @__PURE__ */
|
|
7886
|
+
return /* @__PURE__ */ React62.createElement("div", { style: cssStyle });
|
|
7861
7887
|
}
|
|
7862
|
-
return /* @__PURE__ */
|
|
7888
|
+
return /* @__PURE__ */ React62.createElement("div", { style: cssStyle, dangerouslySetInnerHTML: { __html: contents } });
|
|
7863
7889
|
}
|
|
7864
7890
|
function getImageBorderRadius2(shape, size) {
|
|
7865
7891
|
switch (shape) {
|
|
@@ -7974,7 +8000,7 @@ function SignatureEditor({ style, props }) {
|
|
|
7974
8000
|
backgroundColor: (_p = style == null ? void 0 : style.backgroundColor) != null ? _p : void 0,
|
|
7975
8001
|
padding: (style == null ? void 0 : style.padding) ? `${style.padding.top}px ${style.padding.right}px ${style.padding.bottom}px ${style.padding.left}px` : void 0
|
|
7976
8002
|
};
|
|
7977
|
-
const imageElement = imageUrl ? /* @__PURE__ */
|
|
8003
|
+
const imageElement = imageUrl ? /* @__PURE__ */ React62.createElement(
|
|
7978
8004
|
"img",
|
|
7979
8005
|
{
|
|
7980
8006
|
src: imageUrl,
|
|
@@ -7992,7 +8018,7 @@ function SignatureEditor({ style, props }) {
|
|
|
7992
8018
|
}
|
|
7993
8019
|
}
|
|
7994
8020
|
) : null;
|
|
7995
|
-
const greetingElement = isSelected ? /* @__PURE__ */
|
|
8021
|
+
const greetingElement = isSelected ? /* @__PURE__ */ React62.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React62.createElement(
|
|
7996
8022
|
"input",
|
|
7997
8023
|
{
|
|
7998
8024
|
value: localGreeting,
|
|
@@ -8003,8 +8029,8 @@ function SignatureEditor({ style, props }) {
|
|
|
8003
8029
|
placeholder: "Greeting (e.g. Best regards,)",
|
|
8004
8030
|
style: __spreadValues(__spreadValues({}, inputBase), greetingStyle)
|
|
8005
8031
|
}
|
|
8006
|
-
)) : greeting ? /* @__PURE__ */
|
|
8007
|
-
const textContent = isSelected ? /* @__PURE__ */
|
|
8032
|
+
)) : greeting ? /* @__PURE__ */ React62.createElement("p", { style: greetingStyle }, greeting) : null;
|
|
8033
|
+
const textContent = isSelected ? /* @__PURE__ */ React62.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React62.createElement(
|
|
8008
8034
|
"input",
|
|
8009
8035
|
{
|
|
8010
8036
|
value: localName,
|
|
@@ -8015,7 +8041,7 @@ function SignatureEditor({ style, props }) {
|
|
|
8015
8041
|
placeholder: "Name",
|
|
8016
8042
|
style: __spreadValues(__spreadValues({}, inputBase), nameStyle)
|
|
8017
8043
|
}
|
|
8018
|
-
), /* @__PURE__ */
|
|
8044
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8019
8045
|
"input",
|
|
8020
8046
|
{
|
|
8021
8047
|
value: localTitle,
|
|
@@ -8026,7 +8052,7 @@ function SignatureEditor({ style, props }) {
|
|
|
8026
8052
|
placeholder: "Title",
|
|
8027
8053
|
style: __spreadValues(__spreadValues({}, inputBase), detailStyle)
|
|
8028
8054
|
}
|
|
8029
|
-
), /* @__PURE__ */
|
|
8055
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8030
8056
|
"input",
|
|
8031
8057
|
{
|
|
8032
8058
|
value: localCompany,
|
|
@@ -8037,7 +8063,7 @@ function SignatureEditor({ style, props }) {
|
|
|
8037
8063
|
placeholder: "Company",
|
|
8038
8064
|
style: __spreadValues(__spreadValues({}, inputBase), detailStyle)
|
|
8039
8065
|
}
|
|
8040
|
-
), /* @__PURE__ */
|
|
8066
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8041
8067
|
"input",
|
|
8042
8068
|
{
|
|
8043
8069
|
value: localAddress,
|
|
@@ -8048,7 +8074,7 @@ function SignatureEditor({ style, props }) {
|
|
|
8048
8074
|
placeholder: "Address",
|
|
8049
8075
|
style: __spreadValues(__spreadValues({}, inputBase), detailStyle)
|
|
8050
8076
|
}
|
|
8051
|
-
), /* @__PURE__ */
|
|
8077
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8052
8078
|
"input",
|
|
8053
8079
|
{
|
|
8054
8080
|
value: localEmail,
|
|
@@ -8059,7 +8085,7 @@ function SignatureEditor({ style, props }) {
|
|
|
8059
8085
|
placeholder: "Email",
|
|
8060
8086
|
style: __spreadProps(__spreadValues(__spreadValues({}, inputBase), linkStyle), { marginTop: 4, display: "block" })
|
|
8061
8087
|
}
|
|
8062
|
-
), /* @__PURE__ */
|
|
8088
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8063
8089
|
"input",
|
|
8064
8090
|
{
|
|
8065
8091
|
value: localPhone,
|
|
@@ -8070,7 +8096,7 @@ function SignatureEditor({ style, props }) {
|
|
|
8070
8096
|
placeholder: "Phone",
|
|
8071
8097
|
style: __spreadProps(__spreadValues(__spreadValues({}, inputBase), linkStyle), { display: "block" })
|
|
8072
8098
|
}
|
|
8073
|
-
), /* @__PURE__ */
|
|
8099
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8074
8100
|
"input",
|
|
8075
8101
|
{
|
|
8076
8102
|
value: localWebsite,
|
|
@@ -8081,11 +8107,11 @@ function SignatureEditor({ style, props }) {
|
|
|
8081
8107
|
placeholder: "Website",
|
|
8082
8108
|
style: __spreadProps(__spreadValues(__spreadValues({}, inputBase), linkStyle), { display: "block" })
|
|
8083
8109
|
}
|
|
8084
|
-
)) : /* @__PURE__ */
|
|
8110
|
+
)) : /* @__PURE__ */ React62.createElement("div", null, name && /* @__PURE__ */ React62.createElement("p", { style: nameStyle }, name), title && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, title), company && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, company), address && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, address), (email || phone || website) && /* @__PURE__ */ React62.createElement("p", { style: __spreadProps(__spreadValues({}, detailStyle), { marginTop: 4 }) }, email && /* @__PURE__ */ React62.createElement("span", { style: linkStyle }, email), email && (phone || website) && /* @__PURE__ */ React62.createElement("span", { style: detailStyle }, " \xB7 "), phone && /* @__PURE__ */ React62.createElement("span", { style: linkStyle }, phone), phone && website && /* @__PURE__ */ React62.createElement("span", { style: detailStyle }, " \xB7 "), website && /* @__PURE__ */ React62.createElement("span", { style: linkStyle }, website)), !name && !title && !company && !email && !phone && !website && /* @__PURE__ */ React62.createElement("p", { style: detailStyle }, "Click to edit signature"));
|
|
8085
8111
|
if (layout === "vertical") {
|
|
8086
|
-
return /* @__PURE__ */
|
|
8112
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, greetingElement, imageElement && /* @__PURE__ */ React62.createElement("div", { style: { marginBottom: 12 } }, imageElement), textContent);
|
|
8087
8113
|
}
|
|
8088
|
-
return /* @__PURE__ */
|
|
8114
|
+
return /* @__PURE__ */ React62.createElement("div", { style: wrapperStyle }, greetingElement, /* @__PURE__ */ React62.createElement("table", { cellPadding: "0", cellSpacing: "0", border: 0, role: "presentation" }, /* @__PURE__ */ React62.createElement("tbody", null, /* @__PURE__ */ React62.createElement("tr", null, imageElement && /* @__PURE__ */ React62.createElement("td", { style: { verticalAlign: "middle", paddingRight: 16 } }, imageElement), /* @__PURE__ */ React62.createElement("td", { style: { verticalAlign: "middle" } }, textContent)))));
|
|
8089
8115
|
}
|
|
8090
8116
|
function getFontFamily10(fontFamily) {
|
|
8091
8117
|
switch (fontFamily) {
|
|
@@ -8229,7 +8255,7 @@ function TextEditor({ style, props }) {
|
|
|
8229
8255
|
if (textareaRef.current) adjustTextareaHeight(textareaRef.current);
|
|
8230
8256
|
}, [localText, isSelected]);
|
|
8231
8257
|
if (isSelected) {
|
|
8232
|
-
return /* @__PURE__ */
|
|
8258
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
8233
8259
|
"textarea",
|
|
8234
8260
|
{
|
|
8235
8261
|
ref: textareaRef,
|
|
@@ -8247,10 +8273,10 @@ function TextEditor({ style, props }) {
|
|
|
8247
8273
|
rows: 1,
|
|
8248
8274
|
onInput: (e) => adjustTextareaHeight(e.target)
|
|
8249
8275
|
}
|
|
8250
|
-
), /* @__PURE__ */
|
|
8276
|
+
), /* @__PURE__ */ React62.createElement(InlineFormattingToolbar, __spreadValues({ anchorEl: textareaRef.current }, toolbarProps)));
|
|
8251
8277
|
}
|
|
8252
8278
|
if (isMarkdown) {
|
|
8253
|
-
return /* @__PURE__ */
|
|
8279
|
+
return /* @__PURE__ */ React62.createElement(
|
|
8254
8280
|
"div",
|
|
8255
8281
|
{
|
|
8256
8282
|
ref: displayRef,
|
|
@@ -8259,34 +8285,34 @@ function TextEditor({ style, props }) {
|
|
|
8259
8285
|
}
|
|
8260
8286
|
);
|
|
8261
8287
|
}
|
|
8262
|
-
return /* @__PURE__ */
|
|
8288
|
+
return /* @__PURE__ */ React62.createElement("div", { ref: displayRef, style: wStyle }, textContent);
|
|
8263
8289
|
}
|
|
8264
8290
|
|
|
8265
8291
|
// src/editor/core.tsx
|
|
8266
8292
|
var EDITOR_DICTIONARY = buildBlockConfigurationDictionary({
|
|
8267
8293
|
Avatar: {
|
|
8268
8294
|
schema: AvatarPropsSchema,
|
|
8269
|
-
Component: (props) => /* @__PURE__ */
|
|
8295
|
+
Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(avatar_default, __spreadValues({}, props)))
|
|
8270
8296
|
},
|
|
8271
8297
|
Button: {
|
|
8272
8298
|
schema: ButtonPropsSchema,
|
|
8273
|
-
Component: (props) => /* @__PURE__ */
|
|
8299
|
+
Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(ButtonEditor, __spreadValues({}, props)))
|
|
8274
8300
|
},
|
|
8275
8301
|
Container: {
|
|
8276
8302
|
schema: container_props_schema_default,
|
|
8277
|
-
Component: (props) => /* @__PURE__ */
|
|
8303
|
+
Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(ContainerEditor, __spreadValues({}, props)))
|
|
8278
8304
|
},
|
|
8279
8305
|
ColumnsContainer: {
|
|
8280
8306
|
schema: columns_container_props_schema_default2,
|
|
8281
|
-
Component: (props) => /* @__PURE__ */
|
|
8307
|
+
Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(ColumnsContainerEditor, __spreadValues({}, props)))
|
|
8282
8308
|
},
|
|
8283
8309
|
Heading: {
|
|
8284
8310
|
schema: HeadingPropsSchema,
|
|
8285
|
-
Component: (props) => /* @__PURE__ */
|
|
8311
|
+
Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(HeadingEditor, __spreadValues({}, props)))
|
|
8286
8312
|
},
|
|
8287
8313
|
Html: {
|
|
8288
8314
|
schema: HtmlPropsSchema,
|
|
8289
|
-
Component: (props) => /* @__PURE__ */
|
|
8315
|
+
Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(HtmlEditor, __spreadValues({}, props)))
|
|
8290
8316
|
},
|
|
8291
8317
|
Image: {
|
|
8292
8318
|
schema: ImagePropsSchema,
|
|
@@ -8298,28 +8324,28 @@ var EDITOR_DICTIONARY = buildBlockConfigurationDictionary({
|
|
|
8298
8324
|
linkHref: null
|
|
8299
8325
|
})
|
|
8300
8326
|
});
|
|
8301
|
-
return /* @__PURE__ */
|
|
8327
|
+
return /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(image_default, __spreadValues({}, props)));
|
|
8302
8328
|
}
|
|
8303
8329
|
},
|
|
8304
8330
|
Text: {
|
|
8305
8331
|
schema: TextPropsSchema,
|
|
8306
|
-
Component: (props) => /* @__PURE__ */
|
|
8332
|
+
Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(TextEditor, __spreadValues({}, props)))
|
|
8307
8333
|
},
|
|
8308
8334
|
EmailLayout: {
|
|
8309
8335
|
schema: email_layout_props_schema_default,
|
|
8310
|
-
Component: (p) => /* @__PURE__ */
|
|
8336
|
+
Component: (p) => /* @__PURE__ */ React62.createElement(EmailLayoutEditor, __spreadValues({}, p))
|
|
8311
8337
|
},
|
|
8312
8338
|
Spacer: {
|
|
8313
8339
|
schema: SpacerPropsSchema,
|
|
8314
|
-
Component: (props) => /* @__PURE__ */
|
|
8340
|
+
Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(spacer_default, __spreadValues({}, props)))
|
|
8315
8341
|
},
|
|
8316
8342
|
Divider: {
|
|
8317
8343
|
schema: DividerPropsSchema,
|
|
8318
|
-
Component: (props) => /* @__PURE__ */
|
|
8344
|
+
Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(divider_default, __spreadValues({}, props)))
|
|
8319
8345
|
},
|
|
8320
8346
|
Signature: {
|
|
8321
8347
|
schema: SignaturePropsSchema,
|
|
8322
|
-
Component: (props) => /* @__PURE__ */
|
|
8348
|
+
Component: (props) => /* @__PURE__ */ React62.createElement(EditorBlockWrapper, null, /* @__PURE__ */ React62.createElement(SignatureEditor, __spreadValues({}, props)))
|
|
8323
8349
|
}
|
|
8324
8350
|
});
|
|
8325
8351
|
var EditorBlock2 = buildBlockComponent(EDITOR_DICTIONARY);
|
|
@@ -8335,7 +8361,7 @@ function EditorBlock({ id }) {
|
|
|
8335
8361
|
if (!block) {
|
|
8336
8362
|
throw new Error("Could not find block");
|
|
8337
8363
|
}
|
|
8338
|
-
return /* @__PURE__ */
|
|
8364
|
+
return /* @__PURE__ */ React62.createElement(EditorBlockContext.Provider, { value: id }, /* @__PURE__ */ React62.createElement(EditorBlock2, __spreadValues({}, block)));
|
|
8339
8365
|
}
|
|
8340
8366
|
function ToggleInspectorPanelButton() {
|
|
8341
8367
|
const inspectorDrawerOpen = useInspectorDrawerOpen();
|
|
@@ -8343,20 +8369,20 @@ function ToggleInspectorPanelButton() {
|
|
|
8343
8369
|
toggleInspectorDrawerOpen();
|
|
8344
8370
|
};
|
|
8345
8371
|
if (inspectorDrawerOpen) {
|
|
8346
|
-
return /* @__PURE__ */
|
|
8372
|
+
return /* @__PURE__ */ React62.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React62.createElement(LastPageOutlined, { fontSize: "small" }));
|
|
8347
8373
|
}
|
|
8348
|
-
return /* @__PURE__ */
|
|
8374
|
+
return /* @__PURE__ */ React62.createElement(IconButton, { onClick: handleClick }, /* @__PURE__ */ React62.createElement(AppRegistrationOutlined, { fontSize: "small" }));
|
|
8349
8375
|
}
|
|
8350
8376
|
function useIcon() {
|
|
8351
8377
|
const samplesDrawerOpen = useSamplesDrawerOpen();
|
|
8352
8378
|
if (samplesDrawerOpen) {
|
|
8353
|
-
return /* @__PURE__ */
|
|
8379
|
+
return /* @__PURE__ */ React62.createElement(FirstPageOutlined, { fontSize: "small" });
|
|
8354
8380
|
}
|
|
8355
|
-
return /* @__PURE__ */
|
|
8381
|
+
return /* @__PURE__ */ React62.createElement(MenuOutlined, { fontSize: "small" });
|
|
8356
8382
|
}
|
|
8357
8383
|
function ToggleSamplesPanelButton() {
|
|
8358
8384
|
const icon = useIcon();
|
|
8359
|
-
return /* @__PURE__ */
|
|
8385
|
+
return /* @__PURE__ */ React62.createElement(IconButton, { onClick: toggleSamplesDrawerOpen }, icon);
|
|
8360
8386
|
}
|
|
8361
8387
|
function formatHtml(html2, spaces = 2) {
|
|
8362
8388
|
try {
|
|
@@ -8418,7 +8444,7 @@ function HighlightedCodePanel({ type, value }) {
|
|
|
8418
8444
|
if (code === null) {
|
|
8419
8445
|
return null;
|
|
8420
8446
|
}
|
|
8421
|
-
return /* @__PURE__ */
|
|
8447
|
+
return /* @__PURE__ */ React62.createElement(
|
|
8422
8448
|
"pre",
|
|
8423
8449
|
{
|
|
8424
8450
|
style: {
|
|
@@ -8444,17 +8470,17 @@ function HighlightedCodePanel({ type, value }) {
|
|
|
8444
8470
|
function HtmlPanel() {
|
|
8445
8471
|
const document2 = useDocument();
|
|
8446
8472
|
const code = useMemo(() => renderToStaticMarkup(document2, { rootBlockId: "root" }), [document2]);
|
|
8447
|
-
return /* @__PURE__ */
|
|
8473
|
+
return /* @__PURE__ */ React62.createElement(HighlightedCodePanel, { type: "html", value: code });
|
|
8448
8474
|
}
|
|
8449
8475
|
function JsonPanel() {
|
|
8450
8476
|
const document2 = useDocument();
|
|
8451
8477
|
const code = useMemo(() => JSON.stringify(document2, null, " "), [document2]);
|
|
8452
|
-
return /* @__PURE__ */
|
|
8478
|
+
return /* @__PURE__ */ React62.createElement(HighlightedCodePanel, { type: "json", value: code });
|
|
8453
8479
|
}
|
|
8454
8480
|
function TextPanel() {
|
|
8455
8481
|
const document2 = useDocument();
|
|
8456
8482
|
const text = useMemo(() => renderToText(document2, { rootBlockId: "root" }), [document2]);
|
|
8457
|
-
return /* @__PURE__ */
|
|
8483
|
+
return /* @__PURE__ */ React62.createElement(
|
|
8458
8484
|
"pre",
|
|
8459
8485
|
{
|
|
8460
8486
|
style: {
|
|
@@ -8490,35 +8516,35 @@ function MainTabsGroup() {
|
|
|
8490
8516
|
setSelectedMainTab("editor");
|
|
8491
8517
|
}
|
|
8492
8518
|
};
|
|
8493
|
-
return /* @__PURE__ */
|
|
8519
|
+
return /* @__PURE__ */ React62.createElement(Tabs, { value: selectedMainTab, onChange: handleChange }, /* @__PURE__ */ React62.createElement(
|
|
8494
8520
|
Tab,
|
|
8495
8521
|
{
|
|
8496
8522
|
value: "editor",
|
|
8497
|
-
label: /* @__PURE__ */
|
|
8523
|
+
label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.edit", "Edit") }, /* @__PURE__ */ React62.createElement(EditOutlined, { fontSize: "small" }))
|
|
8498
8524
|
}
|
|
8499
|
-
), /* @__PURE__ */
|
|
8525
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8500
8526
|
Tab,
|
|
8501
8527
|
{
|
|
8502
8528
|
value: "preview",
|
|
8503
|
-
label: /* @__PURE__ */
|
|
8529
|
+
label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.preview", "Preview") }, /* @__PURE__ */ React62.createElement(PreviewOutlined, { fontSize: "small" }))
|
|
8504
8530
|
}
|
|
8505
|
-
), /* @__PURE__ */
|
|
8531
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8506
8532
|
Tab,
|
|
8507
8533
|
{
|
|
8508
8534
|
value: "html",
|
|
8509
|
-
label: /* @__PURE__ */
|
|
8535
|
+
label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.html-output", "HTML output") }, /* @__PURE__ */ React62.createElement(CodeOutlined, { fontSize: "small" }))
|
|
8510
8536
|
}
|
|
8511
|
-
), /* @__PURE__ */
|
|
8537
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8512
8538
|
Tab,
|
|
8513
8539
|
{
|
|
8514
8540
|
value: "text",
|
|
8515
|
-
label: /* @__PURE__ */
|
|
8541
|
+
label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.text-output", "Plain text output") }, /* @__PURE__ */ React62.createElement(SubjectOutlined, { fontSize: "small" }))
|
|
8516
8542
|
}
|
|
8517
|
-
), /* @__PURE__ */
|
|
8543
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8518
8544
|
Tab,
|
|
8519
8545
|
{
|
|
8520
8546
|
value: "json",
|
|
8521
|
-
label: /* @__PURE__ */
|
|
8547
|
+
label: /* @__PURE__ */ React62.createElement(Tooltip, { title: t("tab.json-output", "JSON output") }, /* @__PURE__ */ React62.createElement(DataObjectOutlined, { fontSize: "small" }))
|
|
8522
8548
|
}
|
|
8523
8549
|
));
|
|
8524
8550
|
}
|
|
@@ -8573,7 +8599,7 @@ function SaveBar({ loadTemplates, saveAs }) {
|
|
|
8573
8599
|
return false;
|
|
8574
8600
|
}
|
|
8575
8601
|
});
|
|
8576
|
-
return /* @__PURE__ */
|
|
8602
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
8577
8603
|
Box,
|
|
8578
8604
|
{
|
|
8579
8605
|
sx: {
|
|
@@ -8586,7 +8612,7 @@ function SaveBar({ loadTemplates, saveAs }) {
|
|
|
8586
8612
|
pb: 3
|
|
8587
8613
|
}
|
|
8588
8614
|
},
|
|
8589
|
-
/* @__PURE__ */
|
|
8615
|
+
/* @__PURE__ */ React62.createElement(
|
|
8590
8616
|
Box,
|
|
8591
8617
|
{
|
|
8592
8618
|
sx: {
|
|
@@ -8601,7 +8627,7 @@ function SaveBar({ loadTemplates, saveAs }) {
|
|
|
8601
8627
|
boxShadow: "0 2px 6px rgba(33, 36, 67, 0.06), 0 16px 40px rgba(33, 36, 67, 0.14)"
|
|
8602
8628
|
}
|
|
8603
8629
|
},
|
|
8604
|
-
hasOpenRow && currentTemplateName && /* @__PURE__ */
|
|
8630
|
+
hasOpenRow && currentTemplateName && /* @__PURE__ */ React62.createElement(
|
|
8605
8631
|
Box,
|
|
8606
8632
|
{
|
|
8607
8633
|
sx: {
|
|
@@ -8617,25 +8643,25 @@ function SaveBar({ loadTemplates, saveAs }) {
|
|
|
8617
8643
|
title: currentTemplateName
|
|
8618
8644
|
},
|
|
8619
8645
|
isSample ? `${t("savebar.sample-prefix", "Sample")} \xB7 ` : "",
|
|
8620
|
-
/* @__PURE__ */
|
|
8646
|
+
/* @__PURE__ */ React62.createElement(Box, { component: "span", sx: { color: "text.primary", fontWeight: 600 } }, currentTemplateName)
|
|
8621
8647
|
),
|
|
8622
|
-
/* @__PURE__ */
|
|
8648
|
+
/* @__PURE__ */ React62.createElement(Tooltip, { title: hasOpenRow ? isSample ? t("savebar.save-changes-to-sample", "Save changes to this sample") : t("savebar.save-changes", "Save changes") : t("savebar.save-as-new-template", "Save as a new template") }, /* @__PURE__ */ React62.createElement(
|
|
8623
8649
|
Button$1,
|
|
8624
8650
|
{
|
|
8625
8651
|
variant: "contained",
|
|
8626
8652
|
size: "large",
|
|
8627
|
-
startIcon: /* @__PURE__ */
|
|
8653
|
+
startIcon: /* @__PURE__ */ React62.createElement(SaveOutlined, null),
|
|
8628
8654
|
onClick: handlePrimary,
|
|
8629
8655
|
sx: { borderRadius: 999, textTransform: "none", px: 2.5, fontSize: 15, fontWeight: 600 }
|
|
8630
8656
|
},
|
|
8631
8657
|
primaryLabel
|
|
8632
8658
|
)),
|
|
8633
|
-
hasOpenRow && saveAs && /* @__PURE__ */
|
|
8659
|
+
hasOpenRow && saveAs && /* @__PURE__ */ React62.createElement(Tooltip, { title: t("savebar.save-as-new-template", "Save as a new template") }, /* @__PURE__ */ React62.createElement(
|
|
8634
8660
|
Button$1,
|
|
8635
8661
|
{
|
|
8636
8662
|
variant: "outlined",
|
|
8637
8663
|
size: "large",
|
|
8638
|
-
startIcon: /* @__PURE__ */
|
|
8664
|
+
startIcon: /* @__PURE__ */ React62.createElement(SaveAsOutlined, null),
|
|
8639
8665
|
onClick: () => {
|
|
8640
8666
|
setNameError(null);
|
|
8641
8667
|
setDialogMode("save-as");
|
|
@@ -8644,12 +8670,12 @@ function SaveBar({ loadTemplates, saveAs }) {
|
|
|
8644
8670
|
},
|
|
8645
8671
|
t("savebar.save-as", "Save as\u2026")
|
|
8646
8672
|
)),
|
|
8647
|
-
saveAs && /* @__PURE__ */
|
|
8673
|
+
saveAs && /* @__PURE__ */ React62.createElement(Tooltip, { title: t("savebar.start-fresh", "Start a fresh template") }, /* @__PURE__ */ React62.createElement(
|
|
8648
8674
|
Button$1,
|
|
8649
8675
|
{
|
|
8650
8676
|
variant: "text",
|
|
8651
8677
|
size: "large",
|
|
8652
|
-
startIcon: /* @__PURE__ */
|
|
8678
|
+
startIcon: /* @__PURE__ */ React62.createElement(AddOutlined, null),
|
|
8653
8679
|
onClick: () => {
|
|
8654
8680
|
setNameError(null);
|
|
8655
8681
|
setDialogMode("new-blank");
|
|
@@ -8659,7 +8685,7 @@ function SaveBar({ loadTemplates, saveAs }) {
|
|
|
8659
8685
|
t("savebar.new", "New")
|
|
8660
8686
|
))
|
|
8661
8687
|
)
|
|
8662
|
-
), /* @__PURE__ */
|
|
8688
|
+
), /* @__PURE__ */ React62.createElement(
|
|
8663
8689
|
SaveTemplateDialog,
|
|
8664
8690
|
{
|
|
8665
8691
|
open: dialogMode !== null,
|
|
@@ -8713,7 +8739,7 @@ function UndoRedoButtons() {
|
|
|
8713
8739
|
window.addEventListener("keydown", onKeyDown);
|
|
8714
8740
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
8715
8741
|
}, [mac]);
|
|
8716
|
-
return /* @__PURE__ */
|
|
8742
|
+
return /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 0.5, alignItems: "center" }, /* @__PURE__ */ React62.createElement(Tooltip, { title: `${t("undo.tooltip", "Undo")} (${undoHint})` }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
|
|
8717
8743
|
IconButton,
|
|
8718
8744
|
{
|
|
8719
8745
|
size: "small",
|
|
@@ -8721,8 +8747,8 @@ function UndoRedoButtons() {
|
|
|
8721
8747
|
disabled: !canUndo,
|
|
8722
8748
|
"aria-label": t("undo.label", "Undo")
|
|
8723
8749
|
},
|
|
8724
|
-
/* @__PURE__ */
|
|
8725
|
-
))), /* @__PURE__ */
|
|
8750
|
+
/* @__PURE__ */ React62.createElement(UndoOutlined, { fontSize: "small" })
|
|
8751
|
+
))), /* @__PURE__ */ React62.createElement(Tooltip, { title: `${t("redo.tooltip", "Redo")} (${redoHint})` }, /* @__PURE__ */ React62.createElement("span", null, /* @__PURE__ */ React62.createElement(
|
|
8726
8752
|
IconButton,
|
|
8727
8753
|
{
|
|
8728
8754
|
size: "small",
|
|
@@ -8730,7 +8756,7 @@ function UndoRedoButtons() {
|
|
|
8730
8756
|
disabled: !canRedo,
|
|
8731
8757
|
"aria-label": t("redo.label", "Redo")
|
|
8732
8758
|
},
|
|
8733
|
-
/* @__PURE__ */
|
|
8759
|
+
/* @__PURE__ */ React62.createElement(RedoOutlined, { fontSize: "small" })
|
|
8734
8760
|
))));
|
|
8735
8761
|
}
|
|
8736
8762
|
function SubjectInput() {
|
|
@@ -8756,7 +8782,7 @@ function SubjectInput() {
|
|
|
8756
8782
|
selectionEnd: (_b = target.selectionEnd) != null ? _b : target.value.length
|
|
8757
8783
|
});
|
|
8758
8784
|
};
|
|
8759
|
-
return /* @__PURE__ */
|
|
8785
|
+
return /* @__PURE__ */ React62.createElement(
|
|
8760
8786
|
Box,
|
|
8761
8787
|
{
|
|
8762
8788
|
sx: {
|
|
@@ -8773,8 +8799,8 @@ function SubjectInput() {
|
|
|
8773
8799
|
gap: 1.5
|
|
8774
8800
|
}
|
|
8775
8801
|
},
|
|
8776
|
-
/* @__PURE__ */
|
|
8777
|
-
/* @__PURE__ */
|
|
8802
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { color: "text.secondary", fontSize: 13, fontWeight: 600, minWidth: 56 } }, "Subject"),
|
|
8803
|
+
/* @__PURE__ */ React62.createElement(
|
|
8778
8804
|
InputBase,
|
|
8779
8805
|
{
|
|
8780
8806
|
fullWidth: true,
|
|
@@ -8800,7 +8826,7 @@ function SubjectPreview() {
|
|
|
8800
8826
|
if (!subject) return null;
|
|
8801
8827
|
const samples = buildSampleValueMap((_b = data.variables) != null ? _b : []);
|
|
8802
8828
|
const rendered = substituteSampleValues(subject, samples);
|
|
8803
|
-
return /* @__PURE__ */
|
|
8829
|
+
return /* @__PURE__ */ React62.createElement(
|
|
8804
8830
|
Box,
|
|
8805
8831
|
{
|
|
8806
8832
|
sx: {
|
|
@@ -8817,8 +8843,8 @@ function SubjectPreview() {
|
|
|
8817
8843
|
gap: 1.5
|
|
8818
8844
|
}
|
|
8819
8845
|
},
|
|
8820
|
-
/* @__PURE__ */
|
|
8821
|
-
/* @__PURE__ */
|
|
8846
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { color: "text.secondary", fontSize: 13, fontWeight: 600, minWidth: 56 } }, "Subject"),
|
|
8847
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { fontSize: 14 } }, rendered)
|
|
8822
8848
|
);
|
|
8823
8849
|
}
|
|
8824
8850
|
function generateId3() {
|
|
@@ -8891,7 +8917,7 @@ function ImageDropPasteHandler({ enabled, children }) {
|
|
|
8891
8917
|
window.addEventListener("paste", handlePaste);
|
|
8892
8918
|
return () => window.removeEventListener("paste", handlePaste);
|
|
8893
8919
|
}, [active, uploadImage]);
|
|
8894
|
-
if (!active) return /* @__PURE__ */
|
|
8920
|
+
if (!active) return /* @__PURE__ */ React62.createElement(React62.Fragment, null, children);
|
|
8895
8921
|
const onDragEnter = (e) => {
|
|
8896
8922
|
var _a, _b;
|
|
8897
8923
|
if (!Array.from((_b = (_a = e.dataTransfer) == null ? void 0 : _a.items) != null ? _b : []).some((i) => i.kind === "file")) return;
|
|
@@ -8924,7 +8950,7 @@ function ImageDropPasteHandler({ enabled, children }) {
|
|
|
8924
8950
|
setUploading(false);
|
|
8925
8951
|
}
|
|
8926
8952
|
});
|
|
8927
|
-
return /* @__PURE__ */
|
|
8953
|
+
return /* @__PURE__ */ React62.createElement(
|
|
8928
8954
|
Box,
|
|
8929
8955
|
{
|
|
8930
8956
|
ref: wrapperRef,
|
|
@@ -8935,7 +8961,7 @@ function ImageDropPasteHandler({ enabled, children }) {
|
|
|
8935
8961
|
sx: { position: "relative" }
|
|
8936
8962
|
},
|
|
8937
8963
|
children,
|
|
8938
|
-
(dragging || uploading) && /* @__PURE__ */
|
|
8964
|
+
(dragging || uploading) && /* @__PURE__ */ React62.createElement(
|
|
8939
8965
|
Box,
|
|
8940
8966
|
{
|
|
8941
8967
|
sx: {
|
|
@@ -8954,7 +8980,7 @@ function ImageDropPasteHandler({ enabled, children }) {
|
|
|
8954
8980
|
zIndex: 10
|
|
8955
8981
|
}
|
|
8956
8982
|
},
|
|
8957
|
-
/* @__PURE__ */
|
|
8983
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontWeight: 600, fontSize: 14 } }, /* @__PURE__ */ React62.createElement(CloudUploadOutlined, null), uploading ? "Uploading\u2026" : "Drop image to insert")
|
|
8958
8984
|
)
|
|
8959
8985
|
);
|
|
8960
8986
|
}
|
|
@@ -8994,7 +9020,7 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
|
|
|
8994
9020
|
var _a;
|
|
8995
9021
|
switch (selectedMainTab) {
|
|
8996
9022
|
case "editor":
|
|
8997
|
-
return /* @__PURE__ */
|
|
9023
|
+
return /* @__PURE__ */ React62.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React62.createElement(EditorBlock, { id: "root" }));
|
|
8998
9024
|
case "preview": {
|
|
8999
9025
|
const rootBlock = document2.root;
|
|
9000
9026
|
const layoutData = rootBlock && rootBlock.type === "EmailLayout" ? rootBlock.data : void 0;
|
|
@@ -9002,18 +9028,18 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
|
|
|
9002
9028
|
(_a = layoutData == null ? void 0 : layoutData.variables) != null ? _a : []
|
|
9003
9029
|
);
|
|
9004
9030
|
const previewDoc = applySampleValuesToDocument(document2, samples);
|
|
9005
|
-
return /* @__PURE__ */
|
|
9031
|
+
return /* @__PURE__ */ React62.createElement(Box, { sx: mainBoxSx }, /* @__PURE__ */ React62.createElement(Reader, { document: previewDoc, rootBlockId: "root" }));
|
|
9006
9032
|
}
|
|
9007
9033
|
case "html":
|
|
9008
|
-
return /* @__PURE__ */
|
|
9034
|
+
return /* @__PURE__ */ React62.createElement(HtmlPanel, null);
|
|
9009
9035
|
case "text":
|
|
9010
|
-
return /* @__PURE__ */
|
|
9036
|
+
return /* @__PURE__ */ React62.createElement(TextPanel, null);
|
|
9011
9037
|
case "json":
|
|
9012
|
-
return /* @__PURE__ */
|
|
9038
|
+
return /* @__PURE__ */ React62.createElement(JsonPanel, null);
|
|
9013
9039
|
}
|
|
9014
9040
|
};
|
|
9015
9041
|
const showSaveButtons = persistenceEnabled;
|
|
9016
|
-
return /* @__PURE__ */
|
|
9042
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
|
|
9017
9043
|
Stack,
|
|
9018
9044
|
{
|
|
9019
9045
|
sx: {
|
|
@@ -9030,10 +9056,10 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
|
|
|
9030
9056
|
justifyContent: "space-between",
|
|
9031
9057
|
alignItems: "center"
|
|
9032
9058
|
},
|
|
9033
|
-
samplesDrawerEnabled && /* @__PURE__ */
|
|
9034
|
-
/* @__PURE__ */
|
|
9035
|
-
/* @__PURE__ */
|
|
9036
|
-
), selectedMainTab === "editor" && /* @__PURE__ */
|
|
9059
|
+
samplesDrawerEnabled && /* @__PURE__ */ React62.createElement(ToggleSamplesPanelButton, null),
|
|
9060
|
+
/* @__PURE__ */ React62.createElement(Stack, { px: 2, direction: "row", gap: 2, width: "100%", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ React62.createElement(MainTabsGroup, null)), /* @__PURE__ */ React62.createElement(Stack, { direction: "row", spacing: 2, alignItems: "center" }, selectedMainTab === "editor" && /* @__PURE__ */ React62.createElement(UndoRedoButtons, null), /* @__PURE__ */ React62.createElement(ToggleButtonGroup, { value: selectedScreenSize, exclusive: true, size: "small", onChange: handleScreenSizeChange }, /* @__PURE__ */ React62.createElement(ToggleButton, { value: "desktop" }, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("canvas.desktop-view", "Desktop view") }, /* @__PURE__ */ React62.createElement(MonitorOutlined, { fontSize: "small" }))), /* @__PURE__ */ React62.createElement(ToggleButton, { value: "mobile" }, /* @__PURE__ */ React62.createElement(Tooltip, { title: t("canvas.mobile-view", "Mobile view") }, /* @__PURE__ */ React62.createElement(PhoneIphoneOutlined, { fontSize: "small" })))))),
|
|
9061
|
+
/* @__PURE__ */ React62.createElement(ToggleInspectorPanelButton, null)
|
|
9062
|
+
), selectedMainTab === "editor" && /* @__PURE__ */ React62.createElement(SubjectInput, null), selectedMainTab === "preview" && /* @__PURE__ */ React62.createElement(SubjectPreview, null), /* @__PURE__ */ React62.createElement(ImageDropPasteHandler, { enabled: selectedMainTab === "editor" }, /* @__PURE__ */ React62.createElement(
|
|
9037
9063
|
Box,
|
|
9038
9064
|
{
|
|
9039
9065
|
sx: {
|
|
@@ -9049,8 +9075,8 @@ function TemplatePanel2({ loadTemplates, saveAs, samplesDrawerEnabled = true })
|
|
|
9049
9075
|
background: selectedMainTab === "editor" ? workspaceBackground === "checkerboard" ? WORKSPACE_CHECKERBOARD : WORKSPACE_SOLID : void 0
|
|
9050
9076
|
}
|
|
9051
9077
|
},
|
|
9052
|
-
/* @__PURE__ */
|
|
9053
|
-
showSaveButtons && selectedMainTab === "editor" && /* @__PURE__ */
|
|
9078
|
+
/* @__PURE__ */ React62.createElement(Box, { sx: { flexGrow: 1 } }, renderMainPanel()),
|
|
9079
|
+
showSaveButtons && selectedMainTab === "editor" && /* @__PURE__ */ React62.createElement(SaveBar, { loadTemplates, saveAs })
|
|
9054
9080
|
)));
|
|
9055
9081
|
}
|
|
9056
9082
|
|
|
@@ -9132,7 +9158,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
|
|
|
9132
9158
|
return getDocument();
|
|
9133
9159
|
}
|
|
9134
9160
|
}));
|
|
9135
|
-
return /* @__PURE__ */
|
|
9161
|
+
return /* @__PURE__ */ React62.createElement(Stack, { position: "relative", id: "drawer-container", sx: { minHeight } }, /* @__PURE__ */ React62.createElement(
|
|
9136
9162
|
InspectorDrawer,
|
|
9137
9163
|
{
|
|
9138
9164
|
enterDuration: drawerEnterDuration,
|
|
@@ -9141,7 +9167,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
|
|
|
9141
9167
|
copyTemplate,
|
|
9142
9168
|
renameTemplate
|
|
9143
9169
|
}
|
|
9144
|
-
), /* @__PURE__ */
|
|
9170
|
+
), /* @__PURE__ */ React62.createElement(
|
|
9145
9171
|
SamplesDrawer,
|
|
9146
9172
|
{
|
|
9147
9173
|
enterDuration: drawerEnterDuration,
|
|
@@ -9157,7 +9183,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
|
|
|
9157
9183
|
setTemplateKind,
|
|
9158
9184
|
saveAs
|
|
9159
9185
|
}
|
|
9160
|
-
), /* @__PURE__ */
|
|
9186
|
+
), /* @__PURE__ */ React62.createElement(
|
|
9161
9187
|
Stack,
|
|
9162
9188
|
{
|
|
9163
9189
|
sx: {
|
|
@@ -9166,7 +9192,7 @@ var EmailEditorInternal = forwardRef((props, ref) => {
|
|
|
9166
9192
|
transition: [marginLeftTransition, marginRightTransition].join(", ")
|
|
9167
9193
|
}
|
|
9168
9194
|
},
|
|
9169
|
-
/* @__PURE__ */
|
|
9195
|
+
/* @__PURE__ */ React62.createElement(TemplatePanel2, { loadTemplates, saveAs, samplesDrawerEnabled })
|
|
9170
9196
|
));
|
|
9171
9197
|
});
|
|
9172
9198
|
var EmailEditor = forwardRef((props, ref) => {
|
|
@@ -9212,7 +9238,7 @@ var EmailEditor = forwardRef((props, ref) => {
|
|
|
9212
9238
|
() => ({ uploadImage, loadImages, deleteImage }),
|
|
9213
9239
|
[uploadImage, loadImages, deleteImage]
|
|
9214
9240
|
);
|
|
9215
|
-
return /* @__PURE__ */
|
|
9241
|
+
return /* @__PURE__ */ React62.createElement(I18nProvider, { i18n }, /* @__PURE__ */ React62.createElement(ThemeProvider, { theme: theme || theme_default }, /* @__PURE__ */ React62.createElement(CssBaseline, null), /* @__PURE__ */ React62.createElement("div", { style: { height: "100%", overflow: "auto" } }, /* @__PURE__ */ React62.createElement(SnackbarProvider, null, /* @__PURE__ */ React62.createElement(ImageCallbacksProvider, { callbacks: imageCallbacks }, /* @__PURE__ */ React62.createElement(
|
|
9216
9242
|
EmailEditorProvider,
|
|
9217
9243
|
{
|
|
9218
9244
|
initialTemplate: resolvedTemplate,
|
|
@@ -9221,7 +9247,7 @@ var EmailEditor = forwardRef((props, ref) => {
|
|
|
9221
9247
|
onSave,
|
|
9222
9248
|
onChange
|
|
9223
9249
|
},
|
|
9224
|
-
/* @__PURE__ */
|
|
9250
|
+
/* @__PURE__ */ React62.createElement(
|
|
9225
9251
|
EmailEditorInternal,
|
|
9226
9252
|
{
|
|
9227
9253
|
ref,
|