easy-email-pro-theme 1.41.0 → 1.42.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/lib/index.js +90 -44
- package/lib/typings/components/ConfigurationPanel/components/WidgetConfigPanel/index.d.ts +2 -0
- package/lib/typings/components/ConfigurationPanel/components/WidgetConfigPanel/widgetFields/WidgetTypeOptions.d.ts +4 -0
- package/lib/typings/components/EditorTabs/components/PreviewEmail/index.d.ts +2 -1
- package/lib/typings/components/index.d.ts +4 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -8049,7 +8049,13 @@ const TabHeader = (props) => {
|
|
|
8049
8049
|
width: "100%"
|
|
8050
8050
|
}
|
|
8051
8051
|
},
|
|
8052
|
-
/* @__PURE__ */ React__default.createElement(
|
|
8052
|
+
/* @__PURE__ */ React__default.createElement(
|
|
8053
|
+
"div",
|
|
8054
|
+
{
|
|
8055
|
+
style: { position: "absolute", left: 0, width: `calc(50% - 125px)` }
|
|
8056
|
+
},
|
|
8057
|
+
props.left
|
|
8058
|
+
),
|
|
8053
8059
|
/* @__PURE__ */ React__default.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ React__default.createElement(Button$2.Group, null, /* @__PURE__ */ React__default.createElement(
|
|
8054
8060
|
Button$2,
|
|
8055
8061
|
{
|
|
@@ -8067,7 +8073,18 @@ const TabHeader = (props) => {
|
|
|
8067
8073
|
},
|
|
8068
8074
|
/* @__PURE__ */ React__default.createElement(Space, null, /* @__PURE__ */ React__default.createElement(IconFont, { iconName: "icon-mobile" }), " ", t("mobile"))
|
|
8069
8075
|
))),
|
|
8070
|
-
/* @__PURE__ */ React__default.createElement(
|
|
8076
|
+
/* @__PURE__ */ React__default.createElement(
|
|
8077
|
+
"div",
|
|
8078
|
+
{
|
|
8079
|
+
style: {
|
|
8080
|
+
position: "absolute",
|
|
8081
|
+
right: 0,
|
|
8082
|
+
width: `calc(50% - 125px)`,
|
|
8083
|
+
textAlign: "right"
|
|
8084
|
+
}
|
|
8085
|
+
},
|
|
8086
|
+
props.right
|
|
8087
|
+
)
|
|
8071
8088
|
));
|
|
8072
8089
|
};
|
|
8073
8090
|
const hoverUnderline = "_hoverUnderline_8d8dl_1";
|
|
@@ -8094,34 +8111,45 @@ function BlockPaths() {
|
|
|
8094
8111
|
return paths2.reverse();
|
|
8095
8112
|
}, [editor, selectedNodePath]);
|
|
8096
8113
|
return useMemo$1(() => {
|
|
8097
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
marginLeft: index2 === 0 ? 10 : 4
|
|
8112
|
-
}
|
|
8113
|
-
},
|
|
8114
|
-
/* @__PURE__ */ React__default.createElement(
|
|
8115
|
-
"span",
|
|
8114
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
8115
|
+
"div",
|
|
8116
|
+
{
|
|
8117
|
+
style: {
|
|
8118
|
+
display: "flex",
|
|
8119
|
+
flexWrap: "wrap",
|
|
8120
|
+
paddingLeft: 10,
|
|
8121
|
+
lineHeight: "16px"
|
|
8122
|
+
}
|
|
8123
|
+
},
|
|
8124
|
+
paths.map((item2, index2) => {
|
|
8125
|
+
const isLast = index2 === paths.length - 1;
|
|
8126
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
8127
|
+
"div",
|
|
8116
8128
|
{
|
|
8117
|
-
|
|
8118
|
-
|
|
8129
|
+
key: index2,
|
|
8130
|
+
style: {
|
|
8131
|
+
cursor: "pointer",
|
|
8132
|
+
fontSize: 12,
|
|
8133
|
+
lineHeight: 1,
|
|
8134
|
+
fontFamily: `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue", Arial, sans-serif
|
|
8135
|
+
-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto`,
|
|
8136
|
+
color: isLast ? "#000b1d" : "#666",
|
|
8137
|
+
fontWeight: isLast ? "bold" : void 0,
|
|
8138
|
+
marginLeft: index2 === 0 ? 0 : 4
|
|
8139
|
+
}
|
|
8119
8140
|
},
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8141
|
+
/* @__PURE__ */ React__default.createElement(
|
|
8142
|
+
"span",
|
|
8143
|
+
{
|
|
8144
|
+
className: styles$2.hoverUnderline,
|
|
8145
|
+
onClick: () => setSelectedNodePath(item2.path)
|
|
8146
|
+
},
|
|
8147
|
+
item2.name
|
|
8148
|
+
),
|
|
8149
|
+
!isLast && /* @__PURE__ */ React__default.createElement("span", { style: { marginLeft: 4 } }, "-")
|
|
8150
|
+
);
|
|
8151
|
+
})
|
|
8152
|
+
);
|
|
8125
8153
|
}, [paths, setSelectedNodePath]);
|
|
8126
8154
|
}
|
|
8127
8155
|
const EditorTabs = (props) => {
|
|
@@ -8792,12 +8820,23 @@ const PreviewEmail = ({
|
|
|
8792
8820
|
mergetagsData,
|
|
8793
8821
|
pageDataVariables,
|
|
8794
8822
|
headerElement,
|
|
8795
|
-
footerElement
|
|
8823
|
+
footerElement,
|
|
8824
|
+
widgetMode
|
|
8796
8825
|
}) => {
|
|
8797
8826
|
const [html, setHtml] = useState("");
|
|
8798
8827
|
const mjmlString = useMemo$1(() => {
|
|
8828
|
+
let content = values2.content;
|
|
8829
|
+
if (widgetMode) {
|
|
8830
|
+
content = __spreadProps(__spreadValues({}, content), {
|
|
8831
|
+
children: [
|
|
8832
|
+
__spreadProps(__spreadValues({}, values2.widgetElement), {
|
|
8833
|
+
children: values2.content.children
|
|
8834
|
+
})
|
|
8835
|
+
]
|
|
8836
|
+
});
|
|
8837
|
+
}
|
|
8799
8838
|
return EditorCore.toMJML({
|
|
8800
|
-
element:
|
|
8839
|
+
element: content,
|
|
8801
8840
|
mode: "production",
|
|
8802
8841
|
universalElements: universalElementSetting,
|
|
8803
8842
|
mergetagsData: cloneDeep(mergetagsData),
|
|
@@ -8807,6 +8846,8 @@ const PreviewEmail = ({
|
|
|
8807
8846
|
});
|
|
8808
8847
|
}, [
|
|
8809
8848
|
values2.content,
|
|
8849
|
+
values2.widgetElement,
|
|
8850
|
+
widgetMode,
|
|
8810
8851
|
universalElementSetting,
|
|
8811
8852
|
mergetagsData,
|
|
8812
8853
|
pageDataVariables,
|
|
@@ -8889,7 +8930,8 @@ const PreviewEmailDrawer = ({
|
|
|
8889
8930
|
universalElementSetting,
|
|
8890
8931
|
headerElement,
|
|
8891
8932
|
showEditTestVariableButton = true,
|
|
8892
|
-
footerElement
|
|
8933
|
+
footerElement,
|
|
8934
|
+
widgetMode
|
|
8893
8935
|
} = useEditorProps();
|
|
8894
8936
|
const subject = useMemo$1(() => {
|
|
8895
8937
|
try {
|
|
@@ -8992,7 +9034,8 @@ const PreviewEmailDrawer = ({
|
|
|
8992
9034
|
mergetagsData,
|
|
8993
9035
|
pageDataVariables,
|
|
8994
9036
|
headerElement,
|
|
8995
|
-
footerElement
|
|
9037
|
+
footerElement,
|
|
9038
|
+
widgetMode: Boolean(widgetMode)
|
|
8996
9039
|
}
|
|
8997
9040
|
)
|
|
8998
9041
|
)
|
|
@@ -35627,6 +35670,8 @@ function ImageUploader(props) {
|
|
|
35627
35670
|
const errorMessage = useMemo$1(() => {
|
|
35628
35671
|
if (!props.value)
|
|
35629
35672
|
return "";
|
|
35673
|
+
if (!isString$1(props.value))
|
|
35674
|
+
return "";
|
|
35630
35675
|
if (props.value.includes(`"`)) {
|
|
35631
35676
|
return t(
|
|
35632
35677
|
`Double quotes cannot be used, please use single quotes instead`
|
|
@@ -40898,6 +40943,16 @@ function AddItems(props) {
|
|
|
40898
40943
|
)));
|
|
40899
40944
|
}), /* @__PURE__ */ React__default.createElement(Divider$2, null)));
|
|
40900
40945
|
}
|
|
40946
|
+
const WidgetTypeOptions = [
|
|
40947
|
+
{ value: FieldType.PIXEL, label: "Pixel" },
|
|
40948
|
+
{ value: FieldType.STRING, label: "String" },
|
|
40949
|
+
{ value: FieldType.NUMBER, label: "Number" },
|
|
40950
|
+
{ value: FieldType.ENUM, label: "Enum" },
|
|
40951
|
+
{ value: FieldType.COLOR, label: "Color" },
|
|
40952
|
+
{ value: FieldType.IMAGE, label: "Image" }
|
|
40953
|
+
// { value: FieldType.SLIDER, label: "Slider" },
|
|
40954
|
+
// { value: FieldType.PIXEL_AND_PERCENT, label: "Pixel and percent" },
|
|
40955
|
+
];
|
|
40901
40956
|
const formItemStyle = {
|
|
40902
40957
|
labelCol: {
|
|
40903
40958
|
span: 7,
|
|
@@ -40912,16 +40967,6 @@ const formItemStyle = {
|
|
|
40912
40967
|
}
|
|
40913
40968
|
}
|
|
40914
40969
|
};
|
|
40915
|
-
const typeOptions = [
|
|
40916
|
-
{ value: FieldType.PIXEL, label: "Pixel" },
|
|
40917
|
-
{ value: FieldType.STRING, label: "String" },
|
|
40918
|
-
{ value: FieldType.NUMBER, label: "Number" },
|
|
40919
|
-
{ value: FieldType.ENUM, label: "Enum" },
|
|
40920
|
-
{ value: FieldType.COLOR, label: "Color" },
|
|
40921
|
-
{ value: FieldType.IMAGE, label: "Image" }
|
|
40922
|
-
// { value: FieldType.SLIDER, label: "Slider" },
|
|
40923
|
-
// { value: FieldType.PIXEL_AND_PERCENT, label: "Pixel and percent" },
|
|
40924
|
-
];
|
|
40925
40970
|
function FieldConfigItem(props) {
|
|
40926
40971
|
const { getFieldValue } = useEditorContext();
|
|
40927
40972
|
const keyField = getFieldValue(null, props.name);
|
|
@@ -40963,7 +41008,7 @@ function FieldConfigItem(props) {
|
|
|
40963
41008
|
label: "Type",
|
|
40964
41009
|
name: props.name + ".type",
|
|
40965
41010
|
formItem: formItemStyle,
|
|
40966
|
-
options:
|
|
41011
|
+
options: WidgetTypeOptions,
|
|
40967
41012
|
path: props.path
|
|
40968
41013
|
}
|
|
40969
41014
|
), keyField && keyField.type === FieldType.ENUM && /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 17, offset: 7 }, /* @__PURE__ */ React__default.createElement(AddItems, { name: props.name + ".options", path: props.path }))), /* @__PURE__ */ React__default.createElement(
|
|
@@ -40975,7 +41020,7 @@ function FieldConfigItem(props) {
|
|
|
40975
41020
|
path: props.path
|
|
40976
41021
|
}
|
|
40977
41022
|
), keyField && /* @__PURE__ */ React__default.createElement(
|
|
40978
|
-
FieldItem,
|
|
41023
|
+
AttributeField.FieldItem,
|
|
40979
41024
|
{
|
|
40980
41025
|
label: "Default",
|
|
40981
41026
|
name: `widgetElement.data.input.${keyField.name}`,
|
|
@@ -46902,6 +46947,7 @@ export {
|
|
|
46902
46947
|
ResponsiveTabs,
|
|
46903
46948
|
Retro,
|
|
46904
46949
|
SharedComponents,
|
|
46950
|
+
WidgetTypeOptions,
|
|
46905
46951
|
enhancer,
|
|
46906
46952
|
getMergeTagsByType,
|
|
46907
46953
|
mjmlToJson,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { EmailEditorProps, EmailTemplate } from "easy-email-pro-editor";
|
|
3
|
-
export declare const PreviewEmail: ({ isDesktop, universalElementSetting, values, mergetagsData, pageDataVariables, headerElement, footerElement, }: {
|
|
3
|
+
export declare const PreviewEmail: ({ isDesktop, universalElementSetting, values, mergetagsData, pageDataVariables, headerElement, footerElement, widgetMode, }: {
|
|
4
4
|
isDesktop: boolean;
|
|
5
5
|
universalElementSetting: EmailEditorProps["universalElementSetting"];
|
|
6
6
|
values: EmailTemplate;
|
|
@@ -8,4 +8,5 @@ export declare const PreviewEmail: ({ isDesktop, universalElementSetting, values
|
|
|
8
8
|
pageDataVariables: EmailEditorProps["attributesVariables"];
|
|
9
9
|
headerElement?: EmailEditorProps["headerElement"];
|
|
10
10
|
footerElement?: EmailEditorProps["footerElement"];
|
|
11
|
+
widgetMode: boolean;
|
|
11
12
|
}) => React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { WidgetConfigPanel } from "./ConfigurationPanel/components/WidgetConfigPanel";
|
|
2
|
+
import { WidgetConfigPanel, WidgetTypeOptions } from "./ConfigurationPanel/components/WidgetConfigPanel";
|
|
3
3
|
import { AIAssistant } from "./HoveringToolbar/componens/AIAssistant";
|
|
4
4
|
export { enhancer } from "./Form";
|
|
5
5
|
export * from "./Providers";
|
|
@@ -7,7 +7,7 @@ export declare const SharedComponents: {
|
|
|
7
7
|
PreviewEmailDrawer: ({ children, }: {
|
|
8
8
|
children: import("react").ReactNode;
|
|
9
9
|
}) => import("react").JSX.Element;
|
|
10
|
-
PreviewEmail: ({ isDesktop, universalElementSetting, values, mergetagsData, pageDataVariables, headerElement, footerElement, }: {
|
|
10
|
+
PreviewEmail: ({ isDesktop, universalElementSetting, values, mergetagsData, pageDataVariables, headerElement, footerElement, widgetMode, }: {
|
|
11
11
|
isDesktop: boolean;
|
|
12
12
|
universalElementSetting: ({
|
|
13
13
|
elements: Record<string, import("../easy-email-pro-core/lib/typings").Element>;
|
|
@@ -36,6 +36,7 @@ export declare const SharedComponents: {
|
|
|
36
36
|
pageDataVariables: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
37
37
|
headerElement?: import("../easy-email-pro-core/lib/typings").Element | undefined;
|
|
38
38
|
footerElement?: import("../easy-email-pro-core/lib/typings").Element | undefined;
|
|
39
|
+
widgetMode: boolean;
|
|
39
40
|
}) => import("react").JSX.Element;
|
|
40
41
|
BlockSideBar: ({ height }: import("./BlockSideBar").BlockSideBarProps) => import("react").JSX.Element;
|
|
41
42
|
ConfigurationSideBar: ({ height }: import("./ConfigurationSideBar").ConfigurationSideBarProps) => import("react").JSX.Element;
|
|
@@ -126,5 +127,6 @@ export { CollapseWrapper } from "./ConfigurationPanel/components/CollapseWrapper
|
|
|
126
127
|
export { AttributesPanelWrapper } from "./ConfigurationPanel/components/AttributesPanelWrapper";
|
|
127
128
|
export { AttributeField } from "./ConfigurationPanel/components/AttributeField";
|
|
128
129
|
export { ConfigPanelsMap } from "./ConfigurationPanel/Elements";
|
|
130
|
+
export { WidgetTypeOptions };
|
|
129
131
|
export { ResponsiveField, ResponsiveTabs, } from "./ConfigurationPanel/components/ResponsiveTabs";
|
|
130
132
|
export { IconFont } from "./IconFont";
|