easy-email-pro-theme 1.37.4 → 1.37.5

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.
Files changed (2) hide show
  1. package/lib/index.js +70 -68
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1160,10 +1160,10 @@ const EditorContextProvider = (props) => {
1160
1160
  });
1161
1161
  const pageDataVariables = useMemo$1(() => {
1162
1162
  return EditorCore.getPageDataVariables(
1163
- pageElement,
1163
+ pageElement.data.variables,
1164
1164
  attributesVariables || {}
1165
1165
  );
1166
- }, [attributesVariables, pageElement]);
1166
+ }, [attributesVariables, pageElement.data.variables]);
1167
1167
  const adapterNonPageValues = useMemo$1(() => {
1168
1168
  const map = __spreadValues({}, omit$2(values2, "0"));
1169
1169
  const initData = initialValuesRef.current;
@@ -41777,10 +41777,10 @@ const ColorPicker = ({
41777
41777
  const { selectedNodePath } = useSelectedNode();
41778
41778
  const element = useElementDefault({ path: path2, type: null });
41779
41779
  const ref2 = useRef(null);
41780
- const onClose = () => {
41780
+ const onClose = useEventCallback(() => {
41781
41781
  var _a;
41782
41782
  (_a = ref2.current) == null ? void 0 : _a.click();
41783
- };
41783
+ });
41784
41784
  const color2 = get(element, name);
41785
41785
  const mergeTagColor = useMemo$1(() => {
41786
41786
  try {
@@ -41790,78 +41790,80 @@ const ColorPicker = ({
41790
41790
  }
41791
41791
  return color2;
41792
41792
  }, [color2]);
41793
- const onChange = (val) => {
41793
+ const onChange = useEventCallback((val) => {
41794
41794
  setFieldValue(selectedNodePath, name, val);
41795
- };
41796
- return /* @__PURE__ */ React__default.createElement(
41797
- Popover,
41798
- {
41799
- trigger: "click",
41800
- triggerProps: {
41801
- popupStyle: { padding: "10px" }
41802
- },
41803
- content: /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(ColorProvider, null, /* @__PURE__ */ React__default.createElement(
41804
- ColorPickerContent,
41805
- {
41806
- value: color2,
41807
- onChange,
41808
- onClose
41809
- }
41810
- )))
41811
- },
41812
- /* @__PURE__ */ React__default.createElement(Tooltip, { content: label }, /* @__PURE__ */ React__default.createElement(
41813
- "div",
41795
+ });
41796
+ return useMemo$1(() => {
41797
+ return /* @__PURE__ */ React__default.createElement(
41798
+ Popover,
41814
41799
  {
41815
- style: {
41816
- display: "inline-flex",
41817
- height: 28,
41818
- width: 28,
41819
- boxSizing: "border-box",
41820
- borderRight: void 0,
41821
- padding: 4,
41822
- borderWidth: 1,
41823
- borderStyle: "solid",
41824
- borderColor: "var(--color-neutral-6, rgb(229, 230, 235))",
41825
- borderRadius: 4,
41826
- fontSize: 0,
41827
- position: "relative",
41828
- cursor: "pointer"
41829
- }
41800
+ trigger: "click",
41801
+ triggerProps: {
41802
+ popupStyle: { padding: "10px" }
41803
+ },
41804
+ content: /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(ColorProvider, null, /* @__PURE__ */ React__default.createElement(
41805
+ ColorPickerContent,
41806
+ {
41807
+ value: color2,
41808
+ onChange,
41809
+ onClose
41810
+ }
41811
+ )))
41830
41812
  },
41831
- mergeTagColor ? /* @__PURE__ */ React__default.createElement(
41832
- "span",
41813
+ /* @__PURE__ */ React__default.createElement(Tooltip, { content: label }, /* @__PURE__ */ React__default.createElement(
41814
+ "div",
41833
41815
  {
41834
41816
  style: {
41835
- position: "relative",
41836
- display: "block",
41837
- border: "1px solid var(--color-neutral-6, rgb(229, 230, 235))",
41817
+ display: "inline-flex",
41818
+ height: 28,
41819
+ width: 28,
41838
41820
  boxSizing: "border-box",
41839
- borderRadius: 2,
41840
- width: "100%",
41841
- height: "100%",
41842
- textAlign: "center",
41843
- backgroundColor: mergeTagColor
41821
+ borderRight: void 0,
41822
+ padding: 4,
41823
+ borderWidth: 1,
41824
+ borderStyle: "solid",
41825
+ borderColor: "var(--color-neutral-6, rgb(229, 230, 235))",
41826
+ borderRadius: 4,
41827
+ fontSize: 0,
41828
+ position: "relative",
41829
+ cursor: "pointer"
41844
41830
  }
41845
- }
41846
- ) : /* @__PURE__ */ React__default.createElement(
41847
- "img",
41848
- {
41849
- style: {
41850
- maxWidth: "100%",
41851
- maxHeight: "100%",
41852
- filter: "invert( 0.78 ) drop-shadow(0 0px 0 rgb(0 0 0 / 45%))"
41853
- },
41854
- src: colorImg
41855
- }
41856
- ),
41857
- /* @__PURE__ */ React__default.createElement("style", null, `
41858
- [title="${transparentColor}"] {
41859
- background-image: url("${transparentIcon}") !important
41860
- }
41831
+ },
41832
+ mergeTagColor ? /* @__PURE__ */ React__default.createElement(
41833
+ "span",
41834
+ {
41835
+ style: {
41836
+ position: "relative",
41837
+ display: "block",
41838
+ border: "1px solid var(--color-neutral-6, rgb(229, 230, 235))",
41839
+ boxSizing: "border-box",
41840
+ borderRadius: 2,
41841
+ width: "100%",
41842
+ height: "100%",
41843
+ textAlign: "center",
41844
+ backgroundColor: mergeTagColor
41845
+ }
41846
+ }
41847
+ ) : /* @__PURE__ */ React__default.createElement(
41848
+ "img",
41849
+ {
41850
+ style: {
41851
+ maxWidth: "100%",
41852
+ maxHeight: "100%",
41853
+ filter: "invert( 0.78 ) drop-shadow(0 0px 0 rgb(0 0 0 / 45%))"
41854
+ },
41855
+ src: colorImg
41856
+ }
41857
+ ),
41858
+ /* @__PURE__ */ React__default.createElement("style", null, `
41859
+ [title="${transparentColor}"] {
41860
+ background-image: url("${transparentIcon}") !important
41861
+ }
41861
41862
 
41862
- `)
41863
- ))
41864
- );
41863
+ `)
41864
+ ))
41865
+ );
41866
+ }, [color2, label, mergeTagColor, onChange, onClose]);
41865
41867
  };
41866
41868
  const FontFamily = ({ path: path2, name }) => {
41867
41869
  const { fontList } = useFontFamily();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-theme",
3
- "version": "1.37.4",
3
+ "version": "1.37.5",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"