easy-email-extensions 4.13.0 → 4.14.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/ConfigurationPanel/index.d.ts +3 -1
- package/lib/EditPanel/ConfigurationDrawer/index.d.ts +3 -1
- package/lib/EditPanel/index.d.ts +3 -1
- package/lib/SimpleLayout/SimpleLayout.d.ts +2 -0
- package/lib/SourceCodePanel/index.d.ts +4 -1
- package/lib/components/Providers/ExtensionProvider.d.ts +2 -0
- package/lib/index2.js +88 -50
- package/lib/index2.js.map +1 -1
- package/lib/style.css +1 -1
- package/package.json +2 -2
- package/readme.md +5 -1
@@ -1,7 +1,9 @@
|
|
1
1
|
export interface ConfigurationPanelProps {
|
2
2
|
showSourceCode: boolean;
|
3
|
+
jsonReadOnly: boolean;
|
4
|
+
mjmlReadOnly: boolean;
|
3
5
|
height: string;
|
4
6
|
onBack?: () => void;
|
5
7
|
compact?: boolean;
|
6
8
|
}
|
7
|
-
export declare function ConfigurationPanel({ showSourceCode, height, onBack, compact, }: ConfigurationPanelProps): JSX.Element | null;
|
9
|
+
export declare function ConfigurationPanel({ showSourceCode, height, onBack, compact, jsonReadOnly, mjmlReadOnly, }: ConfigurationPanelProps): JSX.Element | null;
|
@@ -1,5 +1,7 @@
|
|
1
|
-
export declare function ConfigurationDrawer({ height, compact, showSourceCode, }: {
|
1
|
+
export declare function ConfigurationDrawer({ height, compact, showSourceCode, jsonReadOnly, mjmlReadOnly, }: {
|
2
2
|
height: string;
|
3
3
|
compact: boolean;
|
4
4
|
showSourceCode: boolean;
|
5
|
+
jsonReadOnly: boolean;
|
6
|
+
mjmlReadOnly: boolean;
|
5
7
|
}): JSX.Element;
|
package/lib/EditPanel/index.d.ts
CHANGED
@@ -2,6 +2,8 @@ import React from 'react';
|
|
2
2
|
import { BlockLayerProps } from '../BlockLayer';
|
3
3
|
export declare const SimpleLayout: React.FC<{
|
4
4
|
showSourceCode?: boolean;
|
5
|
+
jsonReadOnly?: boolean;
|
6
|
+
mjmlReadOnly?: boolean;
|
5
7
|
defaultShowLayer?: boolean;
|
6
8
|
children: React.ReactNode | React.ReactElement;
|
7
9
|
} & BlockLayerProps>;
|
@@ -33,6 +33,8 @@ export interface ExtensionProps extends BlockLayerProps {
|
|
33
33
|
displayType: 'custom';
|
34
34
|
}>;
|
35
35
|
showSourceCode?: boolean;
|
36
|
+
jsonReadOnly?: boolean;
|
37
|
+
mjmlReadOnly?: boolean;
|
36
38
|
compact?: boolean;
|
37
39
|
}
|
38
40
|
export declare const ExtensionContext: React.Context<ExtensionProps>;
|
package/lib/index2.js
CHANGED
@@ -63,7 +63,7 @@ import { Field, useForm as useForm$1, useField, Form as Form$3, version as versi
|
|
63
63
|
import mjml from "mjml-browser";
|
64
64
|
var index$2 = "";
|
65
65
|
const title = "_title_1f523_1";
|
66
|
-
var styles$
|
66
|
+
var styles$b = {
|
67
67
|
title
|
68
68
|
};
|
69
69
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
@@ -30349,7 +30349,7 @@ function CacheTree(props) {
|
|
30349
30349
|
const wrap$1 = "_wrap_aul3a_1";
|
30350
30350
|
const listItem = "_listItem_aul3a_13";
|
30351
30351
|
const contextmenuMark = "_contextmenuMark_aul3a_23";
|
30352
|
-
var styles$
|
30352
|
+
var styles$a = {
|
30353
30353
|
wrap: wrap$1,
|
30354
30354
|
listItem,
|
30355
30355
|
contextmenuMark
|
@@ -30622,7 +30622,7 @@ const btnWrap = "_btn-wrap_jzksr_43";
|
|
30622
30622
|
const upload = "_upload_jzksr_68";
|
30623
30623
|
const wrap = "_wrap_jzksr_80";
|
30624
30624
|
const urlInput = "_urlInput_jzksr_80";
|
30625
|
-
var styles$
|
30625
|
+
var styles$9 = {
|
30626
30626
|
container,
|
30627
30627
|
error,
|
30628
30628
|
item,
|
@@ -30855,27 +30855,27 @@ function ImageUploader(props) {
|
|
30855
30855
|
const content = useMemo(() => {
|
30856
30856
|
if (isUploading) {
|
30857
30857
|
return /* @__PURE__ */ React__default.createElement("div", {
|
30858
|
-
className: styles$
|
30858
|
+
className: styles$9["item"]
|
30859
30859
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
30860
|
-
className: classnames$1(styles$
|
30860
|
+
className: classnames$1(styles$9["info"])
|
30861
30861
|
}, /* @__PURE__ */ React__default.createElement(Spin$1, null), /* @__PURE__ */ React__default.createElement("div", {
|
30862
|
-
className: styles$
|
30862
|
+
className: styles$9["btn-wrap"]
|
30863
30863
|
})));
|
30864
30864
|
}
|
30865
30865
|
if (!props.value) {
|
30866
30866
|
return /* @__PURE__ */ React__default.createElement("div", {
|
30867
|
-
className: styles$
|
30867
|
+
className: styles$9["upload"],
|
30868
30868
|
onClick: onUpload
|
30869
30869
|
}, /* @__PURE__ */ React__default.createElement(IconPlus$1, null), /* @__PURE__ */ React__default.createElement("div", null, "Upload"));
|
30870
30870
|
}
|
30871
30871
|
return /* @__PURE__ */ React__default.createElement("div", {
|
30872
|
-
className: styles$
|
30872
|
+
className: styles$9["item"]
|
30873
30873
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
30874
|
-
className: classnames$1(styles$
|
30874
|
+
className: classnames$1(styles$9["info"])
|
30875
30875
|
}, /* @__PURE__ */ React__default.createElement("img", {
|
30876
30876
|
src: props.value
|
30877
30877
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
30878
|
-
className: styles$
|
30878
|
+
className: styles$9["btn-wrap"]
|
30879
30879
|
}, /* @__PURE__ */ React__default.createElement("a", {
|
30880
30880
|
title: t("Preview"),
|
30881
30881
|
onClick: () => setPreview(true)
|
@@ -30891,9 +30891,9 @@ function ImageUploader(props) {
|
|
30891
30891
|
});
|
30892
30892
|
}
|
30893
30893
|
return /* @__PURE__ */ React__default.createElement("div", {
|
30894
|
-
className: styles$
|
30894
|
+
className: styles$9.wrap
|
30895
30895
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
30896
|
-
className: styles$
|
30896
|
+
className: styles$9["container"]
|
30897
30897
|
}, content, /* @__PURE__ */ React__default.createElement(Grid.Row, {
|
30898
30898
|
style: { width: "100%" }
|
30899
30899
|
}, mergeTags2 && /* @__PURE__ */ React__default.createElement(Popover$1, {
|
@@ -31226,7 +31226,7 @@ const editTab = "_editTab_1m9nq_20";
|
|
31226
31226
|
const inputWithUnit = "_inputWithUnit_1m9nq_27";
|
31227
31227
|
const inputWithUnitSelectOption = "_inputWithUnitSelectOption_1m9nq_35";
|
31228
31228
|
const colorPicker = "_colorPicker_1m9nq_40";
|
31229
|
-
var styles$
|
31229
|
+
var styles$8 = {
|
31230
31230
|
helperText,
|
31231
31231
|
"label-hidden": "_label-hidden_1m9nq_9",
|
31232
31232
|
labelHidden,
|
@@ -31254,7 +31254,7 @@ function EditTab(props) {
|
|
31254
31254
|
};
|
31255
31255
|
return /* @__PURE__ */ React__default.createElement(Tabs$1, {
|
31256
31256
|
destroyOnHide: true,
|
31257
|
-
className: classnames(styles$
|
31257
|
+
className: classnames(styles$8.editTab),
|
31258
31258
|
style: { border: "none" },
|
31259
31259
|
type: "card",
|
31260
31260
|
activeTab,
|
@@ -33069,7 +33069,7 @@ function ColorPickerContent(props) {
|
|
33069
33069
|
} catch (error2) {
|
33070
33070
|
}
|
33071
33071
|
return /* @__PURE__ */ React__default.createElement("div", {
|
33072
|
-
className: styles$
|
33072
|
+
className: styles$8.colorPicker,
|
33073
33073
|
style: { width: 202, paddingTop: 12, paddingBottom: 12 }
|
33074
33074
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
33075
33075
|
style: { padding: "0px 16px" }
|
@@ -37171,40 +37171,40 @@ function ContextMenu({
|
|
37171
37171
|
left,
|
37172
37172
|
top
|
37173
37173
|
},
|
37174
|
-
className: styles$
|
37174
|
+
className: styles$a.wrap,
|
37175
37175
|
onClick: (e) => e.stopPropagation()
|
37176
37176
|
}, !isFirst && /* @__PURE__ */ React__default.createElement("div", {
|
37177
|
-
className: styles$
|
37177
|
+
className: styles$a.listItem,
|
37178
37178
|
onClick: handleMoveUp
|
37179
37179
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
37180
37180
|
iconName: "icon-top",
|
37181
37181
|
style: { marginRight: 10 }
|
37182
37182
|
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Move up"))), /* @__PURE__ */ React__default.createElement("div", {
|
37183
|
-
className: styles$
|
37183
|
+
className: styles$a.listItem,
|
37184
37184
|
onClick: handleMoveDown
|
37185
37185
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
37186
37186
|
iconName: "icon-bottom",
|
37187
37187
|
style: { marginRight: 10 }
|
37188
37188
|
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Move down"))), /* @__PURE__ */ React__default.createElement("div", {
|
37189
|
-
className: styles$
|
37189
|
+
className: styles$a.listItem,
|
37190
37190
|
onClick: handleCopy
|
37191
37191
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
37192
37192
|
iconName: "icon-copy",
|
37193
37193
|
style: { marginRight: 10 }
|
37194
37194
|
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Copy"))), props.onAddCollection && /* @__PURE__ */ React__default.createElement("div", {
|
37195
|
-
className: styles$
|
37195
|
+
className: styles$a.listItem,
|
37196
37196
|
onClick: handleAddToCollection
|
37197
37197
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
37198
37198
|
iconName: "icon-start",
|
37199
37199
|
style: { marginRight: 10 }
|
37200
37200
|
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, "Add to collection")), /* @__PURE__ */ React__default.createElement("div", {
|
37201
|
-
className: styles$
|
37201
|
+
className: styles$a.listItem,
|
37202
37202
|
onClick: handleDelete
|
37203
37203
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
37204
37204
|
iconName: "icon-delete",
|
37205
37205
|
style: { marginRight: 10 }
|
37206
37206
|
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Delete")))), /* @__PURE__ */ React__default.createElement("div", {
|
37207
|
-
className: styles$
|
37207
|
+
className: styles$a.contextmenuMark,
|
37208
37208
|
onClick: onClose,
|
37209
37209
|
onContextMenu: (e) => {
|
37210
37210
|
e.preventDefault();
|
@@ -37450,7 +37450,7 @@ function BlockLayer(props) {
|
|
37450
37450
|
const title2 = propsRenderTitle ? propsRenderTitle(data) : getBlockTitle(data);
|
37451
37451
|
return /* @__PURE__ */ React__default.createElement("div", {
|
37452
37452
|
"data-tree-idx": data.id,
|
37453
|
-
className: classnames(styles$
|
37453
|
+
className: classnames(styles$b.title, !isPage && getNodeIdxClassName(data.id), !isPage && "email-block")
|
37454
37454
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
37455
37455
|
align: "center",
|
37456
37456
|
size: "mini"
|
@@ -37468,7 +37468,7 @@ function BlockLayer(props) {
|
|
37468
37468
|
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
37469
37469
|
size: "smallest"
|
37470
37470
|
}, title2))), /* @__PURE__ */ React__default.createElement("div", {
|
37471
|
-
className: styles$
|
37471
|
+
className: styles$b.eyeIcon
|
37472
37472
|
}, /* @__PURE__ */ React__default.createElement(EyeIcon$1, {
|
37473
37473
|
blockData: data,
|
37474
37474
|
onToggleVisible
|
@@ -37592,7 +37592,7 @@ function BlockLayer(props) {
|
|
37592
37592
|
const BlocksPanel$1 = "_BlocksPanel_15fho_1";
|
37593
37593
|
const blockItem$1 = "_blockItem_15fho_5";
|
37594
37594
|
const closeBtn = "_closeBtn_15fho_12";
|
37595
|
-
var styles$
|
37595
|
+
var styles$7 = {
|
37596
37596
|
BlocksPanel: BlocksPanel$1,
|
37597
37597
|
blockItem: blockItem$1,
|
37598
37598
|
closeBtn
|
@@ -37650,7 +37650,7 @@ __publicField(BlockMarketManager, "category", []);
|
|
37650
37650
|
__publicField(BlockMarketManager, "subscriptHandles", []);
|
37651
37651
|
const mask = "_mask_1a0xw_1";
|
37652
37652
|
const drag = "_drag_1a0xw_12";
|
37653
|
-
var styles$
|
37653
|
+
var styles$6 = {
|
37654
37654
|
mask,
|
37655
37655
|
drag
|
37656
37656
|
};
|
@@ -37660,7 +37660,7 @@ const BlockMaskWrapper = (props) => {
|
|
37660
37660
|
const { type, payload } = props;
|
37661
37661
|
const onMouseDown = useCallback(() => {
|
37662
37662
|
if (ref.current) {
|
37663
|
-
ref.current.classList.add(styles$
|
37663
|
+
ref.current.classList.add(styles$6.drag);
|
37664
37664
|
}
|
37665
37665
|
}, []);
|
37666
37666
|
const onMaskMouseDown = useCallback((ev) => {
|
@@ -37672,7 +37672,7 @@ const BlockMaskWrapper = (props) => {
|
|
37672
37672
|
useEffect(() => {
|
37673
37673
|
const mouseup = () => {
|
37674
37674
|
if (ref.current) {
|
37675
|
-
ref.current.classList.remove(styles$
|
37675
|
+
ref.current.classList.remove(styles$6.drag);
|
37676
37676
|
}
|
37677
37677
|
};
|
37678
37678
|
document.addEventListener("mouseup", mouseup);
|
@@ -37683,7 +37683,7 @@ const BlockMaskWrapper = (props) => {
|
|
37683
37683
|
return /* @__PURE__ */ React__default.createElement("div", {
|
37684
37684
|
style: { position: "relative" }
|
37685
37685
|
}, props.children, /* @__PURE__ */ React__default.createElement("div", {
|
37686
|
-
className: styles$
|
37686
|
+
className: styles$6.wrapper,
|
37687
37687
|
style: {
|
37688
37688
|
position: "absolute",
|
37689
37689
|
height: "100%",
|
@@ -37698,7 +37698,7 @@ const BlockMaskWrapper = (props) => {
|
|
37698
37698
|
payload
|
37699
37699
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
37700
37700
|
ref,
|
37701
|
-
className: styles$
|
37701
|
+
className: styles$6.mask,
|
37702
37702
|
onMouseDown: onMaskMouseDown
|
37703
37703
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
37704
37704
|
ref: dragRef,
|
@@ -39796,7 +39796,7 @@ const BlocksPanel = (props) => {
|
|
39796
39796
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
39797
39797
|
onClick: toggleVisible
|
39798
39798
|
}, props.children), /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, ele && visible && createPortal(/* @__PURE__ */ React__default.createElement("div", {
|
39799
|
-
className: styles$
|
39799
|
+
className: styles$7.BlocksPanel,
|
39800
39800
|
style: {
|
39801
39801
|
pointerEvents: isDragging ? "none" : void 0,
|
39802
39802
|
position: "fixed",
|
@@ -39812,7 +39812,7 @@ const BlocksPanel = (props) => {
|
|
39812
39812
|
bodyStyle: { padding: 0 },
|
39813
39813
|
title: "Drag block",
|
39814
39814
|
extra: /* @__PURE__ */ React__default.createElement("div", {
|
39815
|
-
className: styles$
|
39815
|
+
className: styles$7.closeBtn
|
39816
39816
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
39817
39817
|
iconName: "icon-close",
|
39818
39818
|
onClick: toggleVisible
|
@@ -39848,7 +39848,7 @@ const BlockPanelItem = React__default.memo((props) => {
|
|
39848
39848
|
alignment: "center",
|
39849
39849
|
spacing: "extraTight"
|
39850
39850
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
39851
|
-
className: styles$
|
39851
|
+
className: styles$7.blockItem
|
39852
39852
|
}, block2.title), block2.description && /* @__PURE__ */ React__default.createElement(Help, {
|
39853
39853
|
title: block2.description
|
39854
39854
|
}))
|
@@ -40045,7 +40045,7 @@ function MjmlToJson(data) {
|
|
40045
40045
|
headAttributes,
|
40046
40046
|
headStyles,
|
40047
40047
|
fonts,
|
40048
|
-
breakpoint: breakpoint == null ? void 0 : breakpoint.attributes.
|
40048
|
+
breakpoint: breakpoint == null ? void 0 : breakpoint.attributes.width
|
40049
40049
|
}, metaData)
|
40050
40050
|
}
|
40051
40051
|
});
|
@@ -40141,7 +40141,11 @@ function formatPadding(attributes, attributeName) {
|
|
40141
40141
|
attributes[attributeName] = newPadding;
|
40142
40142
|
}
|
40143
40143
|
}
|
40144
|
-
|
40144
|
+
const customTextArea = "_customTextArea_xcz5w_1";
|
40145
|
+
var styles$5 = {
|
40146
|
+
customTextArea
|
40147
|
+
};
|
40148
|
+
function SourceCodePanel({ jsonReadOnly, mjmlReadOnly }) {
|
40145
40149
|
const { setValueByIdx, focusBlock, values } = useBlock();
|
40146
40150
|
const { focusIdx } = useFocusIdx();
|
40147
40151
|
const [mjmlText, setMjmlText] = useState("");
|
@@ -40206,7 +40210,9 @@ function SourceCodePanel() {
|
|
40206
40210
|
key: code,
|
40207
40211
|
defaultValue: code,
|
40208
40212
|
autoSize: { maxRows: 25 },
|
40209
|
-
onBlur: onChangeCode
|
40213
|
+
onBlur: onChangeCode,
|
40214
|
+
readOnly: jsonReadOnly,
|
40215
|
+
className: styles$5.customTextArea
|
40210
40216
|
})), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
40211
40217
|
name: "mjml",
|
40212
40218
|
header: t("MJML source"),
|
@@ -40216,7 +40222,9 @@ function SourceCodePanel() {
|
|
40216
40222
|
value: mjmlText,
|
40217
40223
|
autoSize: { maxRows: 25 },
|
40218
40224
|
onChange: onChangeMjmlText,
|
40219
|
-
onBlur: onMjmlChange
|
40225
|
+
onBlur: onMjmlChange,
|
40226
|
+
readOnly: mjmlReadOnly,
|
40227
|
+
className: styles$5.customTextArea
|
40220
40228
|
})));
|
40221
40229
|
}
|
40222
40230
|
function Toolbar() {
|
@@ -40956,7 +40964,7 @@ function MergeTagBadgePrompt() {
|
|
40956
40964
|
}
|
40957
40965
|
const SimpleLayout = (props) => {
|
40958
40966
|
const { height: containerHeight } = useEditorProps();
|
40959
|
-
const { showSourceCode = true, defaultShowLayer = true } = props;
|
40967
|
+
const { showSourceCode = true, defaultShowLayer = true, jsonReadOnly: jsonReadOnly2 = false, mjmlReadOnly: mjmlReadOnly2 = true } = props;
|
40960
40968
|
const [collapsed, setCollapsed] = useState(!defaultShowLayer);
|
40961
40969
|
return /* @__PURE__ */ React__default.createElement(ConfigProvider, {
|
40962
40970
|
locale: enUS
|
@@ -41038,7 +41046,10 @@ const SimpleLayout = (props) => {
|
|
41038
41046
|
title: /* @__PURE__ */ React__default.createElement("div", {
|
41039
41047
|
style: { height: 31, lineHeight: "31px" }
|
41040
41048
|
}, t("Source code"))
|
41041
|
-
}, /* @__PURE__ */ React__default.createElement(SourceCodePanel,
|
41049
|
+
}, /* @__PURE__ */ React__default.createElement(SourceCodePanel, {
|
41050
|
+
jsonReadOnly: jsonReadOnly2,
|
41051
|
+
mjmlReadOnly: mjmlReadOnly2
|
41052
|
+
}))))), /* @__PURE__ */ React__default.createElement(InteractivePrompt, null), /* @__PURE__ */ React__default.createElement(MergeTagBadgePrompt, null)));
|
41042
41053
|
};
|
41043
41054
|
const StandardLayout$1 = "_StandardLayout_xv0bc_1";
|
41044
41055
|
var styles$3 = {
|
@@ -46095,7 +46106,9 @@ function ConfigurationPanel({
|
|
46095
46106
|
showSourceCode,
|
46096
46107
|
height,
|
46097
46108
|
onBack,
|
46098
|
-
compact
|
46109
|
+
compact,
|
46110
|
+
jsonReadOnly: jsonReadOnly2,
|
46111
|
+
mjmlReadOnly: mjmlReadOnly2
|
46099
46112
|
}) {
|
46100
46113
|
const [inited, setInited] = useState(false);
|
46101
46114
|
useEffect(() => {
|
@@ -46140,12 +46153,17 @@ function ConfigurationPanel({
|
|
46140
46153
|
}, t("Source code"))
|
46141
46154
|
}, /* @__PURE__ */ React__default.createElement(FullHeightOverlayScrollbars, {
|
46142
46155
|
height: `calc(${height} - 60px)`
|
46143
|
-
}, /* @__PURE__ */ React__default.createElement(SourceCodePanel,
|
46156
|
+
}, /* @__PURE__ */ React__default.createElement(SourceCodePanel, {
|
46157
|
+
jsonReadOnly: jsonReadOnly2,
|
46158
|
+
mjmlReadOnly: mjmlReadOnly2
|
46159
|
+
})))) : /* @__PURE__ */ React__default.createElement(AttributePanel, null));
|
46144
46160
|
}
|
46145
46161
|
function ConfigurationDrawer({
|
46146
46162
|
height,
|
46147
46163
|
compact,
|
46148
|
-
showSourceCode
|
46164
|
+
showSourceCode,
|
46165
|
+
jsonReadOnly: jsonReadOnly2,
|
46166
|
+
mjmlReadOnly: mjmlReadOnly2
|
46149
46167
|
}) {
|
46150
46168
|
const refWrapper = useRef(null);
|
46151
46169
|
const { focusIdx: focusIdx2, setFocusIdx } = useFocusIdx();
|
@@ -46180,12 +46198,18 @@ function ConfigurationDrawer({
|
|
46180
46198
|
compact,
|
46181
46199
|
showSourceCode,
|
46182
46200
|
height,
|
46183
|
-
onBack: onClose
|
46201
|
+
onBack: onClose,
|
46202
|
+
jsonReadOnly: jsonReadOnly2,
|
46203
|
+
mjmlReadOnly: mjmlReadOnly2
|
46184
46204
|
})));
|
46185
46205
|
}, [visible, onClose, compact, showSourceCode, height]);
|
46186
46206
|
}
|
46187
46207
|
const TabPane = Tabs$1.TabPane;
|
46188
|
-
function EditPanel({
|
46208
|
+
function EditPanel({
|
46209
|
+
showSourceCode,
|
46210
|
+
jsonReadOnly: jsonReadOnly2,
|
46211
|
+
mjmlReadOnly: mjmlReadOnly2
|
46212
|
+
}) {
|
46189
46213
|
const { height } = useEditorProps();
|
46190
46214
|
const { compact = true } = useExtensionProps();
|
46191
46215
|
return /* @__PURE__ */ React__default.createElement(Layout$1.Sider, {
|
@@ -46217,7 +46241,9 @@ function EditPanel({ showSourceCode }) {
|
|
46217
46241
|
}, /* @__PURE__ */ React__default.createElement(BlockLayer, null))))), !compact && /* @__PURE__ */ React__default.createElement(ConfigurationDrawer, {
|
46218
46242
|
height,
|
46219
46243
|
showSourceCode,
|
46220
|
-
compact: Boolean(compact)
|
46244
|
+
compact: Boolean(compact),
|
46245
|
+
jsonReadOnly: jsonReadOnly2,
|
46246
|
+
mjmlReadOnly: mjmlReadOnly2
|
46221
46247
|
}));
|
46222
46248
|
}
|
46223
46249
|
const defaultCategories = [
|
@@ -46287,14 +46313,20 @@ const defaultCategories = [
|
|
46287
46313
|
get title() {
|
46288
46314
|
return t("4 columns");
|
46289
46315
|
},
|
46290
|
-
payload: [[
|
46316
|
+
payload: [["25%", "25%", "25%", "25%"]]
|
46291
46317
|
}
|
46292
46318
|
]
|
46293
46319
|
}
|
46294
46320
|
];
|
46295
46321
|
const StandardLayout = (props) => {
|
46296
46322
|
const { height: containerHeight } = useEditorProps();
|
46297
|
-
const {
|
46323
|
+
const {
|
46324
|
+
showSourceCode = true,
|
46325
|
+
compact = true,
|
46326
|
+
categories = defaultCategories,
|
46327
|
+
jsonReadOnly: jsonReadOnly2 = false,
|
46328
|
+
mjmlReadOnly: mjmlReadOnly2 = true
|
46329
|
+
} = props;
|
46298
46330
|
const { setFocusIdx } = useFocusIdx();
|
46299
46331
|
useEffect(() => {
|
46300
46332
|
if (!compact) {
|
@@ -46320,11 +46352,15 @@ const StandardLayout = (props) => {
|
|
46320
46352
|
overflow: "hidden"
|
46321
46353
|
}
|
46322
46354
|
}, compact && /* @__PURE__ */ React__default.createElement(EditPanel, {
|
46323
|
-
showSourceCode
|
46355
|
+
showSourceCode,
|
46356
|
+
jsonReadOnly: jsonReadOnly2,
|
46357
|
+
mjmlReadOnly: mjmlReadOnly2
|
46324
46358
|
}), /* @__PURE__ */ React__default.createElement(Layout$1, {
|
46325
46359
|
style: { height: containerHeight, flex: 1 }
|
46326
46360
|
}, props.children), !compact && /* @__PURE__ */ React__default.createElement(EditPanel, {
|
46327
|
-
showSourceCode
|
46361
|
+
showSourceCode,
|
46362
|
+
jsonReadOnly: jsonReadOnly2,
|
46363
|
+
mjmlReadOnly: mjmlReadOnly2
|
46328
46364
|
}), compact ? /* @__PURE__ */ React__default.createElement(Layout$1.Sider, {
|
46329
46365
|
style: {
|
46330
46366
|
height: containerHeight,
|
@@ -46335,7 +46371,9 @@ const StandardLayout = (props) => {
|
|
46335
46371
|
}, /* @__PURE__ */ React__default.createElement(ConfigurationPanel, {
|
46336
46372
|
compact,
|
46337
46373
|
height: containerHeight,
|
46338
|
-
showSourceCode
|
46374
|
+
showSourceCode,
|
46375
|
+
jsonReadOnly: jsonReadOnly2,
|
46376
|
+
mjmlReadOnly: mjmlReadOnly2
|
46339
46377
|
})) : /* @__PURE__ */ React__default.createElement(Layout$1.Sider, {
|
46340
46378
|
style: { width: 0, overflow: "hidden" }
|
46341
46379
|
}))), /* @__PURE__ */ React__default.createElement(InteractivePrompt, null), /* @__PURE__ */ React__default.createElement(MergeTagBadgePrompt, null)));
|