easy-email-pro-theme 1.40.3 → 1.41.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 CHANGED
@@ -511,7 +511,7 @@ const styleText$g = `@font-face {
511
511
  }
512
512
 
513
513
  `;
514
- const RetroStyleText = '[data-slate-block=page] {\n min-height: 300px;\n}\n\n[data-slate-category=navbar]::after,\n[data-slate-category=social]::after {\n content: "";\n left: 0;\n top: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n cursor: default;\n}\n\n[data-slate-hover=true] {\n z-index: 4;\n}\n\n[data-slate-focus=true] {\n z-index: 3;\n}\n\n[data-slate-selected=true] {\n z-index: 3;\n}\n\n[data-slate-hover=true] .element-tools-container {\n z-index: 4;\n}\n\n[data-slate-void=true] [data-slate-node=element][data-slate-block=button]:hover,\n[data-slate-void=true] [data-slate-node=element][data-slate-block=text]:hover {\n outline: 2px solid var(--hover-color);\n}\n\n.text-mergetag {\n outline: 1px solid rgb(78, 89, 105);\n outline-offset: 1px;\n padding: 0 2px;\n border-radius: 2px;\n cursor: pointer;\n transition: all 0.1s linear;\n border: none;\n font-weight: inherit;\n outline-color: #00a0ac;\n color: inherit;\n background-color: #ebf9fc;\n max-width: 10em;\n font-style: inherit;\n text-decoration-line: inherit;\n position: relative;\n}\n\n.text-mergetag [data-slate-string=true] {\n font-size: 0px;\n}\n\nbody .element-tools-container {\n outline: 2px solid var(--hover-color);\n z-index: 1;\n}\n\nbody .element-tools-container .element-tools {\n color: #fff;\n background-color: var(--hover-color);\n}\n\nbody .element-tools-container .element-drag-button {\n background-color: var(--hover-color);\n}\n\n[data-is-dragging=true] .element-tools-container {\n opacity: 0;\n}\n\n#dragging-placeholder .element-tools-container {\n opacity: 1 !important;\n}\n\n[data-slate-type=placeholder] {\n min-height: 64px;\n position: relative;\n background-color: rgba(242, 244, 245, 0.64);\n outline: rgb(43, 152, 211) dashed 1px;\n outline-offset: -1px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.3;\n color: rgb(48, 59, 67);\n margin: 0 20px;\n}\n\n[data-slate-type=placeholder] .element-delete {\n border-radius: 2px;\n padding: 0px;\n cursor: pointer;\n height: 28px;\n width: 28px;\n background-color: rgb(223, 227, 230);\n color: rgb(96, 106, 114);\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n left: 10px;\n top: 10px;\n opacity: 0.8;\n}\n\n[data-slate-type=placeholder] .element-delete:hover {\n background-color: rgb(180, 187, 195);\n opacity: 1;\n}\n\n[data-slate-type=placeholder] .element-delete svg {\n width: 20px;\n height: 20px;\n}\n\n[data-slate-universal-editing=true] {\n z-index: 2;\n}\n\n.universal-element-mask {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 10;\n}\n\n.unset-element-mask {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 10;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n[data-slate-universal-editing=true] .universal-element-mask {\n display: none;\n}\n\n[data-slate-universal-editing=true] .universal-element-editing-mask {\n z-index: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n inset: 0px;\n}\n\n[data-slate-universal-editing=true] .universal-element-editing-mask::before {\n content: " ";\n width: 10000px;\n height: 10000px;\n position: fixed;\n left: 0;\n top: 0;\n transform: translate(-50%, -50%);\n}\n\n[data-slate-universal-editing=true] .universal-element-editing-mask::after {\n position: absolute;\n content: " ";\n width: 100%;\n height: 100%;\n inset: 0px;\n pointer-events: none;\n outline: 9999px solid rgba(255, 255, 255, 0.6);\n}';
514
+ const RetroStyleText = '[data-slate-block=page] {\n min-height: 300px;\n}\n\n[data-slate-category=navbar]::after,\n[data-slate-category=social]::after {\n content: "";\n left: 0;\n top: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n cursor: default;\n}\n\n[data-slate-hover=true] {\n z-index: 4;\n}\n\n[data-slate-focus=true] {\n z-index: 3;\n}\n\n[data-slate-selected=true] {\n z-index: 3;\n}\n\n[data-slate-hover=true] .element-tools-container {\n z-index: 4;\n}\n\n[data-slate-selected=true] .element-tools-container {\n z-index: 4;\n}\n\n[data-slate-void=true] [data-slate-node=element][data-slate-block=button]:hover,\n[data-slate-void=true] [data-slate-node=element][data-slate-block=text]:hover {\n outline: 2px solid var(--hover-color);\n}\n\n.text-mergetag {\n outline: 1px solid rgb(78, 89, 105);\n outline-offset: 1px;\n padding: 0 2px;\n border-radius: 2px;\n cursor: pointer;\n transition: all 0.1s linear;\n border: none;\n font-weight: inherit;\n outline-color: #00a0ac;\n color: inherit;\n background-color: #ebf9fc;\n max-width: 10em;\n font-style: inherit;\n text-decoration-line: inherit;\n position: relative;\n}\n\n.text-mergetag [data-slate-string=true] {\n font-size: 0px;\n}\n\nbody .element-tools-container {\n outline: 2px solid var(--hover-color);\n z-index: 1;\n}\n\nbody .element-tools-container .element-tools {\n color: #fff;\n background-color: var(--hover-color);\n}\n\nbody .element-tools-container .element-drag-button {\n background-color: var(--hover-color);\n}\n\n[data-is-dragging=true] .element-tools-container {\n opacity: 0;\n}\n\n#dragging-placeholder .element-tools-container {\n opacity: 1 !important;\n}\n\n[data-slate-type=placeholder] {\n min-height: 64px;\n position: relative;\n background-color: rgba(242, 244, 245, 0.64);\n outline: rgb(43, 152, 211) dashed 1px;\n outline-offset: -1px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.3;\n color: rgb(48, 59, 67);\n margin: 0 20px;\n}\n\n[data-slate-type=placeholder] .element-delete {\n border-radius: 2px;\n padding: 0px;\n cursor: pointer;\n height: 28px;\n width: 28px;\n background-color: rgb(223, 227, 230);\n color: rgb(96, 106, 114);\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n left: 10px;\n top: 10px;\n opacity: 0.8;\n}\n\n[data-slate-type=placeholder] .element-delete:hover {\n background-color: rgb(180, 187, 195);\n opacity: 1;\n}\n\n[data-slate-type=placeholder] .element-delete svg {\n width: 20px;\n height: 20px;\n}\n\n[data-slate-universal-editing=true] {\n z-index: 2;\n}\n\n.universal-element-mask {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 10;\n}\n\n.unset-element-mask {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 10;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n[data-slate-universal-editing=true] .universal-element-mask {\n display: none;\n}\n\n[data-slate-universal-editing=true] .universal-element-editing-mask {\n z-index: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n inset: 0px;\n}\n\n[data-slate-universal-editing=true] .universal-element-editing-mask::before {\n content: " ";\n width: 10000px;\n height: 10000px;\n position: fixed;\n left: 0;\n top: 0;\n transform: translate(-50%, -50%);\n}\n\n[data-slate-universal-editing=true] .universal-element-editing-mask::after {\n position: absolute;\n content: " ";\n width: 100%;\n height: 100%;\n inset: 0px;\n pointer-events: none;\n outline: 9999px solid rgba(255, 255, 255, 0.6);\n}';
515
515
  const withTheme$1 = (editor) => {
516
516
  const { insertBreak, normalizeNode, deleteBackward, apply: apply3, insertSoftBreak } = editor;
517
517
  editor.insertBreak = (...args) => {
@@ -1876,10 +1876,12 @@ const ElementTools$1 = ({ element, nodeElement, path: path2 }) => {
1876
1876
  quantityLimitCheck,
1877
1877
  ElementTools: ElementTools2,
1878
1878
  ElementToolsInner,
1879
- showDragMoveIcon
1879
+ showDragMoveIcon,
1880
+ showPreviousLevelIcon
1880
1881
  } = useEditorProps();
1881
1882
  const { open } = useUniversalContent();
1882
1883
  const { setSelectedNodePath, universalElementEditing, universalElementPath } = useEditorState();
1884
+ const isPage = NodeUtils.isPageElement(element);
1883
1885
  const { dragHandle: dragHandle2 } = useDragging({
1884
1886
  element,
1885
1887
  nodeElement,
@@ -1916,6 +1918,14 @@ const ElementTools$1 = ({ element, nodeElement, path: path2 }) => {
1916
1918
  const path22 = ReactEditor.findPath(editor, element);
1917
1919
  deleteBlock(path22);
1918
1920
  });
1921
+ const onSelectParent = useEventCallback((ev) => {
1922
+ ev.preventDefault();
1923
+ ev.stopPropagation();
1924
+ setTimeout(() => {
1925
+ Transforms.deselect(editor);
1926
+ setSelectedNodePath(Path.parent(path2));
1927
+ }, 100);
1928
+ });
1919
1929
  const isSectionCategory = BlockManager.getBlockByType(
1920
1930
  element.type
1921
1931
  ).category.includes(ElementCategory.SECTION);
@@ -1976,7 +1986,14 @@ const ElementTools$1 = ({ element, nodeElement, path: path2 }) => {
1976
1986
  nodeElement,
1977
1987
  path: path2
1978
1988
  }
1979
- ) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !isEditingUniversalElement && /* @__PURE__ */ React__default.createElement("div", { className: "element-tools-item", onPointerDown: onCopy }, /* @__PURE__ */ React__default.createElement(IconFont, { iconName: "icon-copy" })), universalElementSetting && !universalElementEditing && !isUniversalElement && /* @__PURE__ */ React__default.createElement(
1989
+ ) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, showPreviousLevelIcon && !isPage && /* @__PURE__ */ React__default.createElement(
1990
+ "div",
1991
+ {
1992
+ className: "element-tools-item",
1993
+ onPointerDown: onSelectParent
1994
+ },
1995
+ /* @__PURE__ */ React__default.createElement(IconFont, { iconName: "icon-back-parent" })
1996
+ ), !isEditingUniversalElement && /* @__PURE__ */ React__default.createElement("div", { className: "element-tools-item", onPointerDown: onCopy }, /* @__PURE__ */ React__default.createElement(IconFont, { iconName: "icon-copy" })), universalElementSetting && !universalElementEditing && !isUniversalElement && /* @__PURE__ */ React__default.createElement(
1980
1997
  "div",
1981
1998
  {
1982
1999
  className: "element-tools-item",
@@ -6857,7 +6874,7 @@ const disableInteraction = "_disableInteraction_ng4f3_110";
6857
6874
  const disableSelection = "_disableSelection_ng4f3_114";
6858
6875
  const Collapse = "_Collapse_ng4f3_122";
6859
6876
  const collapsed = "_collapsed_ng4f3_125";
6860
- const styles$3 = {
6877
+ const styles$4 = {
6861
6878
  Wrapper: Wrapper$1,
6862
6879
  clone,
6863
6880
  TreeItem: TreeItem$1,
@@ -6873,7 +6890,7 @@ const styles$3 = {
6873
6890
  collapsed
6874
6891
  };
6875
6892
  const Action$1 = "_Action_armtj_1";
6876
- const styles$2 = {
6893
+ const styles$3 = {
6877
6894
  Action: Action$1
6878
6895
  };
6879
6896
  const Action = forwardRef(
@@ -6884,7 +6901,7 @@ const Action = forwardRef(
6884
6901
  __spreadProps(__spreadValues({
6885
6902
  ref: ref2
6886
6903
  }, props), {
6887
- className: classnames$1(styles$2.Action, className),
6904
+ className: classnames$1(styles$3.Action, className),
6888
6905
  tabIndex: 0,
6889
6906
  style: __spreadProps(__spreadValues({}, style2), {
6890
6907
  cursor,
@@ -6971,13 +6988,13 @@ const TreeItem = forwardRef(
6971
6988
  "li",
6972
6989
  __spreadValues({
6973
6990
  className: classnames$1(
6974
- styles$3.Wrapper,
6975
- clone2 && styles$3.clone,
6976
- ghost2 && styles$3.ghost,
6977
- selected2 && styles$3.selected,
6978
- indicator2 && styles$3.indicator,
6979
- disableSelection2 && styles$3.disableSelection,
6980
- disableInteraction2 && styles$3.disableInteraction
6991
+ styles$4.Wrapper,
6992
+ clone2 && styles$4.clone,
6993
+ ghost2 && styles$4.ghost,
6994
+ selected2 && styles$4.selected,
6995
+ indicator2 && styles$4.indicator,
6996
+ disableSelection2 && styles$4.disableSelection,
6997
+ disableInteraction2 && styles$4.disableInteraction
6981
6998
  ),
6982
6999
  ref: wrapperRef,
6983
7000
  style: {
@@ -6987,7 +7004,7 @@ const TreeItem = forwardRef(
6987
7004
  /* @__PURE__ */ React__default.createElement(
6988
7005
  "div",
6989
7006
  {
6990
- className: styles$3.TreeItem,
7007
+ className: styles$4.TreeItem,
6991
7008
  ref: ref2,
6992
7009
  style: style2,
6993
7010
  onClick: onSelect,
@@ -7001,17 +7018,17 @@ const TreeItem = forwardRef(
7001
7018
  onCollapse();
7002
7019
  },
7003
7020
  className: classnames$1(
7004
- styles$3.Collapse,
7005
- collapsed2 && styles$3.collapsed
7021
+ styles$4.Collapse,
7022
+ collapsed2 && styles$4.collapsed
7006
7023
  )
7007
7024
  },
7008
7025
  collapseIcon
7009
7026
  ),
7010
- /* @__PURE__ */ React__default.createElement("span", { className: styles$3.Text }, renderTitle(item2)),
7027
+ /* @__PURE__ */ React__default.createElement("span", { className: styles$4.Text }, renderTitle(item2)),
7011
7028
  !clone2 && onRemove && /* @__PURE__ */ React__default.createElement(
7012
7029
  "div",
7013
7030
  {
7014
- className: styles$3.hoverHandle,
7031
+ className: styles$4.hoverHandle,
7015
7032
  style: { visibility: removable ? void 0 : "hidden" }
7016
7033
  },
7017
7034
  /* @__PURE__ */ React__default.createElement(
@@ -7024,11 +7041,11 @@ const TreeItem = forwardRef(
7024
7041
  }
7025
7042
  )
7026
7043
  ),
7027
- clone2 && childCount && childCount > 1 ? /* @__PURE__ */ React__default.createElement("span", { className: styles$3.Count }, childCount) : null,
7044
+ clone2 && childCount && childCount > 1 ? /* @__PURE__ */ React__default.createElement("span", { className: styles$4.Count }, childCount) : null,
7028
7045
  /* @__PURE__ */ React__default.createElement(
7029
7046
  "div",
7030
7047
  {
7031
- className: styles$3.hoverHandle,
7048
+ className: styles$4.hoverHandle,
7032
7049
  style: { visibility: moveable ? void 0 : "hidden" }
7033
7050
  },
7034
7051
  /* @__PURE__ */ React__default.createElement(Handle, __spreadValues({}, handleProps))
@@ -8053,9 +8070,63 @@ const TabHeader = (props) => {
8053
8070
  /* @__PURE__ */ React__default.createElement("div", { style: { position: "absolute", right: 0 } }, props.right)
8054
8071
  ));
8055
8072
  };
8073
+ const hoverUnderline = "_hoverUnderline_8d8dl_1";
8074
+ const styles$2 = {
8075
+ hoverUnderline
8076
+ };
8077
+ function BlockPaths() {
8078
+ const { selectedNodePath, setSelectedNodePath } = useSelectedNode();
8079
+ const editor = useSlate();
8080
+ const paths = useMemo$1(() => {
8081
+ const paths2 = [];
8082
+ let prev = selectedNodePath || [0];
8083
+ while (prev) {
8084
+ const current = Node$1.get(editor, prev);
8085
+ if (!current)
8086
+ break;
8087
+ paths2.push({ name: BlockManager.getBlockTitle(current), path: prev });
8088
+ if (NodeUtils.isPageElement(current)) {
8089
+ prev = null;
8090
+ } else {
8091
+ prev = Path.parent(prev);
8092
+ }
8093
+ }
8094
+ return paths2.reverse();
8095
+ }, [editor, selectedNodePath]);
8096
+ return useMemo$1(() => {
8097
+ return /* @__PURE__ */ React__default.createElement("div", { style: { display: "flex" } }, paths.map((item2, index2) => {
8098
+ const isLast = index2 === paths.length - 1;
8099
+ return /* @__PURE__ */ React__default.createElement(
8100
+ "span",
8101
+ {
8102
+ key: index2,
8103
+ style: {
8104
+ cursor: "pointer",
8105
+ fontSize: 12,
8106
+ lineHeight: 1,
8107
+ fontFamily: `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue", Arial, sans-serif
8108
+ -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto`,
8109
+ color: isLast ? "#000b1d" : "#666",
8110
+ fontWeight: isLast ? "bold" : void 0,
8111
+ marginLeft: index2 === 0 ? 10 : 4
8112
+ }
8113
+ },
8114
+ /* @__PURE__ */ React__default.createElement(
8115
+ "span",
8116
+ {
8117
+ className: styles$2.hoverUnderline,
8118
+ onClick: () => setSelectedNodePath(item2.path)
8119
+ },
8120
+ item2.name
8121
+ ),
8122
+ !isLast && /* @__PURE__ */ React__default.createElement("span", { style: { marginLeft: 4 } }, "-")
8123
+ );
8124
+ }));
8125
+ }, [paths, setSelectedNodePath]);
8126
+ }
8056
8127
  const EditorTabs = (props) => {
8057
8128
  const { clearCanvas } = useElementInteract();
8058
- const { readOnly, showPreview } = useEditorProps();
8129
+ const { readOnly, showPreview, showBlockPaths } = useEditorProps();
8059
8130
  const [headerEle, setHeaderEle] = useState(null);
8060
8131
  const [footerEle, setFooterEle] = useState(null);
8061
8132
  const [headerEleHeight, setHeaderEleHeight] = useState(0);
@@ -8124,7 +8195,7 @@ const EditorTabs = (props) => {
8124
8195
  },
8125
8196
  /* @__PURE__ */ React__default.createElement(IconEye, null)
8126
8197
  )))), /* @__PURE__ */ React__default.createElement("div", null)),
8127
- left: null
8198
+ left: /* @__PURE__ */ React__default.createElement("div", null, showBlockPaths && /* @__PURE__ */ React__default.createElement(BlockPaths, null))
8128
8199
  }
8129
8200
  ), /* @__PURE__ */ React__default.createElement(
8130
8201
  "div",
@@ -15801,38 +15872,12 @@ const TextAlign$1 = () => {
15801
15872
  mode: "all"
15802
15873
  });
15803
15874
  const node = match2 == null ? void 0 : match2[0];
15875
+ const { setFieldValue } = useEditorContext();
15804
15876
  const matchAlign = match2 && get(node.attributes, "align");
15805
15877
  const onAlignHandle = (align) => {
15806
- const htmlBlockNodeElementEntry = Editor.above(editor, {
15807
- match(node2, path2) {
15808
- return NodeUtils.isHTMLBlockNodeElement(node2);
15809
- },
15810
- mode: "lowest"
15811
- });
15812
- if (!htmlBlockNodeElementEntry) {
15813
- Transforms.wrapNodes(
15814
- editor,
15815
- {
15816
- type: ElementType.HTML_BLOCK_NODE,
15817
- children: [],
15818
- data: {
15819
- tagName: "div"
15820
- },
15821
- attributes: {
15822
- style: `text-align:${align};`
15823
- }
15824
- },
15825
- {
15826
- match: (node2) => !NodeUtils.isBlockElement(node2) && !NodeUtils.isHTMLBlockNodeElement(node2)
15827
- }
15828
- );
15829
- } else {
15830
- Transforms.setNodes(editor, {
15831
- attributes: __spreadProps(__spreadValues({}, htmlBlockNodeElementEntry[0].attributes), {
15832
- style: `text-align:${align};`
15833
- })
15834
- });
15835
- }
15878
+ if (!match2)
15879
+ return;
15880
+ setFieldValue(match2[1], "attributes.align", align);
15836
15881
  };
15837
15882
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
15838
15883
  FormatButton,
@@ -37631,11 +37676,14 @@ const ConditionModal = ({
37631
37676
  Modal,
37632
37677
  {
37633
37678
  visible,
37634
- title: /* @__PURE__ */ React__default.createElement("div", { style: { textAlign: "left" } }, t("Logic")),
37679
+ title: /* @__PURE__ */ React__default.createElement("div", { style: { textAlign: "left" } }, t("Condition")),
37635
37680
  okText: t("Save"),
37636
37681
  cancelText: t("Cancel"),
37637
37682
  onOk: form.submit,
37638
- onCancel: onClose
37683
+ onCancel: onClose,
37684
+ style: {
37685
+ width: 550
37686
+ }
37639
37687
  },
37640
37688
  /* @__PURE__ */ React__default.createElement(
37641
37689
  List$1,
@@ -37779,15 +37827,30 @@ function ConditionItem({
37779
37827
  const name = `${path2}.${gIndex}.groups.${ggIndex}`;
37780
37828
  const value = Form.useWatch(name);
37781
37829
  const hideRight = value.operator === ConditionOperator.TRUTHY || value.operator === ConditionOperator.FALSY;
37782
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Grid.Row, { align: "end" }, /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 8 }, /* @__PURE__ */ React__default.createElement(
37783
- Form.Item,
37830
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Grid.Row, { align: "end" }, /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 9 }, /* @__PURE__ */ React__default.createElement(
37831
+ AttributeField.MergeTagSelectInputField,
37784
37832
  {
37785
- label: t("Variable"),
37786
- field: `${name}.left`,
37787
- layout: "vertical"
37788
- },
37789
- /* @__PURE__ */ React__default.createElement(Input, { placeholder: "customer.country" })
37790
- )), /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 5, style: { paddingLeft: 10 } }, /* @__PURE__ */ React__default.createElement(
37833
+ mergetagType: "condition",
37834
+ label: t("Value"),
37835
+ name: `${name}.left`,
37836
+ formItem: {
37837
+ wrapperCol: {
37838
+ span: 24,
37839
+ offset: 0
37840
+ },
37841
+ labelCol: {
37842
+ span: 24,
37843
+ style: {
37844
+ marginBottom: 8,
37845
+ textAlign: "left"
37846
+ }
37847
+ }
37848
+ },
37849
+ path: null,
37850
+ placeholder: "customer.country",
37851
+ keepName: true
37852
+ }
37853
+ )), /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 5, style: { paddingLeft: 5 } }, /* @__PURE__ */ React__default.createElement(
37791
37854
  Form.Item,
37792
37855
  {
37793
37856
  label: t("Operator"),
@@ -37797,15 +37860,15 @@ function ConditionItem({
37797
37860
  /* @__PURE__ */ React__default.createElement(Select$1, { options: options$4 }, options$4.map((item2) => {
37798
37861
  return /* @__PURE__ */ React__default.createElement(Select$1.Option, { key: item2.value, value: item2.value }, /* @__PURE__ */ React__default.createElement(Tooltip, { content: item2.tootip }, /* @__PURE__ */ React__default.createElement("div", null, item2.label)));
37799
37862
  }))
37800
- )), /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 8, style: { paddingLeft: 10 } }, !hideRight && /* @__PURE__ */ React__default.createElement(
37863
+ )), /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 8, style: { paddingLeft: 5 } }, !hideRight && /* @__PURE__ */ React__default.createElement(
37801
37864
  Form.Item,
37802
37865
  {
37803
37866
  label: t("Value"),
37804
37867
  field: `${name}.right`,
37805
37868
  layout: "vertical"
37806
37869
  },
37807
- /* @__PURE__ */ React__default.createElement(Input, { placeholder: "Canda" })
37808
- )), /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 3 }, /* @__PURE__ */ React__default.createElement(
37870
+ /* @__PURE__ */ React__default.createElement(Input, { placeholder: "Canada" })
37871
+ )), /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 2 }, /* @__PURE__ */ React__default.createElement(
37809
37872
  Form.Item,
37810
37873
  {
37811
37874
  wrapperCol: {
@@ -37831,6 +37894,7 @@ function Iteration({
37831
37894
  }) {
37832
37895
  var _a;
37833
37896
  const iteration = (_a = selectedBlock.logic) == null ? void 0 : _a.iteration;
37897
+ const [popupVisible, setPopupVisible] = useState(false);
37834
37898
  const onIterationToggle = useCallback$1(
37835
37899
  (enabled) => {
37836
37900
  var _a2;
@@ -37856,6 +37920,13 @@ function Iteration({
37856
37920
  },
37857
37921
  [editor, nodePath, selectedBlock.logic]
37858
37922
  );
37923
+ const { mergetags } = useEditorProps();
37924
+ useCallback$1((mergetag) => {
37925
+ setPopupVisible(false);
37926
+ }, []);
37927
+ useMemo$1(() => {
37928
+ return getMergeTagsByType(mergetags || [], "link");
37929
+ }, [mergetags]);
37859
37930
  return /* @__PURE__ */ React__default.createElement(Collapse$1, { activeKey: ["Iteration"] }, /* @__PURE__ */ React__default.createElement(
37860
37931
  Collapse$1.Item,
37861
37932
  {
@@ -37869,14 +37940,16 @@ function Iteration({
37869
37940
  /* @__PURE__ */ React__default.createElement("p", null, t(
37870
37941
  `To repeat this content, specify a variable to “loop over” (i.e., repeat) as well as an alias you can use in your template.`
37871
37942
  )),
37872
- (iteration == null ? void 0 : iteration.enabled) && /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 24 }, /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(
37873
- TextField,
37943
+ (iteration == null ? void 0 : iteration.enabled) && /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 24, style: { marginTop: 10 } }, /* @__PURE__ */ React__default.createElement(
37944
+ AttributeField.MergeTagSelectInputField,
37874
37945
  {
37946
+ mergetagType: "repeat",
37875
37947
  label: t("Repeat for"),
37876
37948
  name: `logic.iteration.dataSource`,
37877
- path: nodePath
37949
+ path: nodePath,
37950
+ keepName: true
37878
37951
  }
37879
- ), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 24 }, /* @__PURE__ */ React__default.createElement(
37952
+ ), /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 24 }, /* @__PURE__ */ React__default.createElement(
37880
37953
  TextField,
37881
37954
  {
37882
37955
  label: t("Item alias"),
@@ -38024,19 +38097,7 @@ function Link$1(props) {
38024
38097
  const { label = t("Link address") } = props;
38025
38098
  const { setFieldValue } = useEditorContext();
38026
38099
  const [isUploading, setIsUploading] = useState(false);
38027
- const [popupVisible, setPopupVisible] = useState(false);
38028
- const onChangeMergeTag = useCallback$1(
38029
- (mergetag) => {
38030
- setFieldValue(
38031
- props.path,
38032
- props.name,
38033
- PluginManager.generateVariable(mergetag)
38034
- );
38035
- setPopupVisible(false);
38036
- },
38037
- [props.name, props.path, setFieldValue]
38038
- );
38039
- const { showSelectFileButton, handleUploadClick, onUpload, mergetags } = useEditorProps();
38100
+ const { showSelectFileButton, handleUploadClick, onUpload } = useEditorProps();
38040
38101
  const uploadHandlerRef = useRef(onUpload);
38041
38102
  const handleUpload = useCallback$1(() => {
38042
38103
  if (handleUploadClick) {
@@ -38068,49 +38129,15 @@ function Link$1(props) {
38068
38129
  });
38069
38130
  uploader.chooseFile();
38070
38131
  }, [handleUploadClick, isUploading, props.name, props.path, setFieldValue]);
38071
- const formatMergetags = useMemo$1(() => {
38072
- return getMergeTagsByType(mergetags || [], "link");
38073
- }, [mergetags]);
38074
38132
  return useMemo$1(() => {
38075
- var _a, _b, _c, _d;
38076
- return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(
38077
- Grid.Col,
38078
- {
38079
- style: { textAlign: "right" },
38080
- span: ((_b = (_a = props.formItem) == null ? void 0 : _a.labelCol) == null ? void 0 : _b.span) || 7
38081
- },
38082
- /* @__PURE__ */ React__default.createElement("span", null, label)
38083
- ), /* @__PURE__ */ React__default.createElement(Grid.Col, { offset: 1, span: ((_d = (_c = props.formItem) == null ? void 0 : _c.wrapperCol) == null ? void 0 : _d.span) || 14 }, /* @__PURE__ */ React__default.createElement(Grid.Row, { style: { width: "100%" } }, formatMergetags.length > 0 && /* @__PURE__ */ React__default.createElement(
38084
- SharedComponents.MergeTagComponent,
38085
- {
38086
- mergetags: formatMergetags,
38087
- popupVisible,
38088
- onVisibleChange: setPopupVisible,
38089
- onChange: onChangeMergeTag,
38090
- onClose: () => setPopupVisible(false),
38091
- value: "",
38092
- triggerElement: /* @__PURE__ */ React__default.createElement(
38093
- Button$2,
38094
- {
38095
- type: "secondary",
38096
- icon: /* @__PURE__ */ React__default.createElement(IconFont, { iconName: "icon-merge-tags" })
38097
- }
38098
- )
38099
- }
38100
- ), /* @__PURE__ */ React__default.createElement(
38101
- AttributeField.TextField,
38102
- __spreadProps(__spreadValues({
38133
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(
38134
+ AttributeField.MergeTagSelectInputField,
38135
+ __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
38136
+ mergetagType: "link",
38103
38137
  prefix: /* @__PURE__ */ React__default.createElement(IconLink, null)
38104
- }, props), {
38105
- label: "",
38106
- formItem: __spreadProps(__spreadValues({
38107
- style: {
38108
- flex: 1
38109
- }
38110
- }, props.formItem), {
38111
- wrapperCol: {
38112
- span: 24
38113
- },
38138
+ }), props), {
38139
+ label,
38140
+ formItem: __spreadProps(__spreadValues({}, props.formItem), {
38114
38141
  rules: [
38115
38142
  {
38116
38143
  validator(value, callback) {
@@ -38123,7 +38150,7 @@ function Link$1(props) {
38123
38150
  ]
38124
38151
  })
38125
38152
  })
38126
- )))), showSelectFileButton && /* @__PURE__ */ React__default.createElement(
38153
+ ), showSelectFileButton && /* @__PURE__ */ React__default.createElement(
38127
38154
  Grid.Row,
38128
38155
  {
38129
38156
  style: { marginTop: -10, marginBottom: 10, textAlign: "left" }
@@ -38139,16 +38166,8 @@ function Link$1(props) {
38139
38166
  " ",
38140
38167
  t(`Select file`)
38141
38168
  ))
38142
- ));
38143
- }, [
38144
- formatMergetags,
38145
- handleUpload,
38146
- label,
38147
- onChangeMergeTag,
38148
- popupVisible,
38149
- props,
38150
- showSelectFileButton
38151
- ]);
38169
+ )));
38170
+ }, [handleUpload, label, props, showSelectFileButton]);
38152
38171
  }
38153
38172
  const defaultOptions = [
38154
38173
  {
@@ -38550,6 +38569,81 @@ function TableLayout(props) {
38550
38569
  );
38551
38570
  }, [label, props]);
38552
38571
  }
38572
+ const MergeTagSelectInputField = (props) => {
38573
+ var _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
38574
+ const _a = props, { label, keepName, mergetagType } = _a, rest = __objRest(_a, ["label", "keepName", "mergetagType"]);
38575
+ const { mergetags } = useEditorProps();
38576
+ const { setFieldValue } = useEditorContext();
38577
+ const { form } = Form.useFormContext();
38578
+ const [popupVisible, setPopupVisible] = useState(false);
38579
+ const onChangeMergeTag = useCallback$1(
38580
+ (mergetag) => {
38581
+ if (props.path) {
38582
+ setFieldValue(
38583
+ props.path,
38584
+ props.name,
38585
+ keepName ? mergetag : PluginManager.generateVariable(mergetag)
38586
+ );
38587
+ } else {
38588
+ form.setFieldValue(
38589
+ props.name,
38590
+ keepName ? mergetag : PluginManager.generateVariable(mergetag)
38591
+ );
38592
+ }
38593
+ setPopupVisible(false);
38594
+ },
38595
+ [form, keepName, props.name, props.path, setFieldValue]
38596
+ );
38597
+ const formatMergetags = useMemo$1(() => {
38598
+ return getMergeTagsByType(mergetags || [], props.mergetagType);
38599
+ }, [mergetags, props.mergetagType]);
38600
+ return /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(
38601
+ Grid.Col,
38602
+ {
38603
+ style: __spreadValues({ textAlign: "right" }, (_c = (_b = props.formItem) == null ? void 0 : _b.labelCol) == null ? void 0 : _c.style),
38604
+ span: ((_e = (_d = props.formItem) == null ? void 0 : _d.labelCol) == null ? void 0 : _e.span) || 7
38605
+ },
38606
+ /* @__PURE__ */ React__default.createElement("span", null, label)
38607
+ ), /* @__PURE__ */ React__default.createElement(
38608
+ Grid.Col,
38609
+ {
38610
+ offset: isUndefined$1((_g = (_f = props.formItem) == null ? void 0 : _f.wrapperCol) == null ? void 0 : _g.offset) ? 1 : (_i = (_h = props.formItem) == null ? void 0 : _h.wrapperCol) == null ? void 0 : _i.offset,
38611
+ span: ((_k = (_j = props.formItem) == null ? void 0 : _j.wrapperCol) == null ? void 0 : _k.span) || 14
38612
+ },
38613
+ /* @__PURE__ */ React__default.createElement(Grid.Row, { style: { width: "100%" } }, formatMergetags.length > 0 && /* @__PURE__ */ React__default.createElement(
38614
+ SharedComponents.MergeTagComponent,
38615
+ {
38616
+ mergetags: formatMergetags,
38617
+ popupVisible,
38618
+ onVisibleChange: setPopupVisible,
38619
+ onChange: onChangeMergeTag,
38620
+ onClose: () => setPopupVisible(false),
38621
+ value: "",
38622
+ triggerElement: /* @__PURE__ */ React__default.createElement(
38623
+ Button$2,
38624
+ {
38625
+ type: "secondary",
38626
+ icon: /* @__PURE__ */ React__default.createElement(IconFont, { iconName: "icon-merge-tags" })
38627
+ }
38628
+ )
38629
+ }
38630
+ ), /* @__PURE__ */ React__default.createElement(
38631
+ AttributeField.TextField,
38632
+ __spreadProps(__spreadValues({}, rest), {
38633
+ label: "",
38634
+ formItem: __spreadProps(__spreadValues({
38635
+ style: {
38636
+ flex: 1
38637
+ }
38638
+ }, props.formItem), {
38639
+ wrapperCol: {
38640
+ span: 24
38641
+ }
38642
+ })
38643
+ })
38644
+ ))
38645
+ ));
38646
+ };
38553
38647
  const defaultAttributeFields = {
38554
38648
  // Basic Form Field
38555
38649
  WatchField,
@@ -38566,6 +38660,7 @@ const defaultAttributeFields = {
38566
38660
  EditPanelListField,
38567
38661
  EditPanelTabsField,
38568
38662
  PixelAndPercentField,
38663
+ MergeTagSelectInputField,
38569
38664
  // Attributes Field
38570
38665
  Heading,
38571
38666
  Direction,
@@ -45672,6 +45767,10 @@ const minimaliststyleText = `[data-slate-block=page] {
45672
45767
  z-index: 4;
45673
45768
  }
45674
45769
 
45770
+ [data-slate-selected=true] .element-tools-container {
45771
+ z-index: 4;
45772
+ }
45773
+
45675
45774
  [data-slate-void=true] [data-slate-node=element][data-slate-block=button]:hover,
45676
45775
  [data-slate-void=true] [data-slate-node=element][data-slate-block=text]:hover {
45677
45776
  outline: 2px solid var(--hover-color);
package/lib/style.css CHANGED
@@ -318,6 +318,8 @@
318
318
  color: rgb(201, 205, 212);
319
319
  cursor: not-allowed;
320
320
  pointer-events: none;
321
+ }._hoverUnderline_8d8dl_1:hover {
322
+ text-decoration: underline;
321
323
  }.UniversalElementEditorDrawer {
322
324
  position: fixed;
323
325
  left: 0;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare function BlockPaths(): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React, { ComponentProps } from "react";
2
+ import { MergetagItem } from "easy-email-pro-editor";
3
+ import { TextField } from "../../../../components/Form";
4
+ export declare const MergeTagSelectInputField: (props: Omit<ComponentProps<typeof TextField>, "label"> & {
5
+ label?: React.ReactNode;
6
+ mergetagType: MergetagItem["type"];
7
+ keepName?: boolean;
8
+ }) => React.JSX.Element;
@@ -70,6 +70,11 @@ export declare const defaultAttributeFields: {
70
70
  EditPanelListField: (props: Omit<import("../../../Form/enhancer").EnhancerProps & Omit<import("../../../Form/EditPanelListField").EditPanelListProps<unknown>, "onChange" | "value">, "">) => import("react").JSX.Element;
71
71
  EditPanelTabsField: (props: Omit<import("../../../Form/enhancer").EnhancerProps & Omit<import("../../../Form/EditPanelTabsField").EditPanelTabsProps<unknown>, "onChange" | "value">, "">) => import("react").JSX.Element;
72
72
  PixelAndPercentField: typeof PixelAndPercentField;
73
+ MergeTagSelectInputField: (props: Omit<import("../../../Form/enhancer").EnhancerProps & Omit<import("@arco-design/web-react").InputProps & import("react").RefAttributes<import("@arco-design/web-react/es/Input").RefInputType> & import("@arco-design/web-react/es/_util/hooks/useMergeProps").MergePropsOptions, "onChange" | "value">, "label"> & {
74
+ label?: import("react").ReactNode;
75
+ mergetagType: "text" | "image" | "condition" | "link" | "repeat" | undefined;
76
+ keepName?: boolean | undefined;
77
+ }) => import("react").JSX.Element;
73
78
  Heading: typeof Heading;
74
79
  Direction: typeof Direction;
75
80
  RTLDirection: typeof RTLDirection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-theme",
3
- "version": "1.40.3",
3
+ "version": "1.41.0",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"