easy-email-extensions 3.1.33 → 3.1.34
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/index2.js +51 -36
- package/lib/index2.js.map +1 -1
- package/package.json +2 -2
package/lib/index2.js
CHANGED
@@ -30737,6 +30737,13 @@ function BlockTree(props) {
|
|
30737
30737
|
const dragNode = useRef(null);
|
30738
30738
|
const { treeData, allowDrop, onContextMenu, selectedKeys } = props;
|
30739
30739
|
const treeDataRef = useRef(treeData);
|
30740
|
+
const {
|
30741
|
+
onDragStart: propsDragStart,
|
30742
|
+
onDrop: propsDrop,
|
30743
|
+
renderTitle: propsRenderTitle,
|
30744
|
+
onDragEnd: propsDragEnd,
|
30745
|
+
onSelect: propsSelect
|
30746
|
+
} = props;
|
30740
30747
|
const [expandedKeys, setExpandedKeys] = useState([]);
|
30741
30748
|
const onExpand = useCallback((keys2) => {
|
30742
30749
|
setExpandedKeys(keys2);
|
@@ -30757,7 +30764,6 @@ function BlockTree(props) {
|
|
30757
30764
|
setExpandedKeys((keys2) => props.expandedKeys ? [...keys2, ...props.expandedKeys] : keys2);
|
30758
30765
|
}, [props.expandedKeys]);
|
30759
30766
|
const onDragStart = useCallback((e, node) => {
|
30760
|
-
var _a;
|
30761
30767
|
e.dataTransfer.dropEffect = "none";
|
30762
30768
|
const dragNodeData = node.props.dataRef;
|
30763
30769
|
dragNode.current = {
|
@@ -30766,8 +30772,8 @@ function BlockTree(props) {
|
|
30766
30772
|
key: node.props._key,
|
30767
30773
|
parentKey: node.props.parentKey
|
30768
30774
|
};
|
30769
|
-
|
30770
|
-
}, [
|
30775
|
+
propsDragStart == null ? void 0 : propsDragStart();
|
30776
|
+
}, [propsDragStart]);
|
30771
30777
|
const onDragMove = useCallback((option) => {
|
30772
30778
|
if (!dragNode.current)
|
30773
30779
|
return false;
|
@@ -30787,7 +30793,7 @@ function BlockTree(props) {
|
|
30787
30793
|
return true;
|
30788
30794
|
}
|
30789
30795
|
return false;
|
30790
|
-
}, [
|
30796
|
+
}, [allowDrop]);
|
30791
30797
|
const onDrop = useCallback((info2) => {
|
30792
30798
|
const { dropNode, dropPosition, e } = info2;
|
30793
30799
|
e.dataTransfer.dropEffect = "move";
|
@@ -30804,22 +30810,21 @@ function BlockTree(props) {
|
|
30804
30810
|
},
|
30805
30811
|
dropPosition
|
30806
30812
|
};
|
30807
|
-
|
30808
|
-
}, []);
|
30813
|
+
propsDrop(currentDropData);
|
30814
|
+
}, [propsDrop]);
|
30809
30815
|
const renderTitle = useCallback((nodeData) => {
|
30810
30816
|
return /* @__PURE__ */ React__default.createElement("div", {
|
30811
30817
|
style: { display: "inline-flex", width: "100%" },
|
30812
30818
|
onContextMenu: (ev) => onContextMenu && onContextMenu(nodeData, ev)
|
30813
|
-
},
|
30814
|
-
}, [onContextMenu]);
|
30819
|
+
}, propsRenderTitle(nodeData));
|
30820
|
+
}, [onContextMenu, propsRenderTitle]);
|
30815
30821
|
const onDragEnd = useCallback(() => {
|
30816
|
-
var _a;
|
30817
30822
|
dragNode.current = null;
|
30818
|
-
|
30819
|
-
}, [
|
30823
|
+
propsDragEnd == null ? void 0 : propsDragEnd();
|
30824
|
+
}, [propsDragEnd]);
|
30820
30825
|
const onSelect = useCallback((selectedKeys2) => {
|
30821
|
-
|
30822
|
-
}, [
|
30826
|
+
propsSelect(selectedKeys2[0]);
|
30827
|
+
}, [propsSelect]);
|
30823
30828
|
useEffect(() => {
|
30824
30829
|
if (blockTreeRef) {
|
30825
30830
|
blockTreeRef.addEventListener("dragover", (e) => {
|
@@ -38477,7 +38482,7 @@ function enhancer(Component2, changeAdapter) {
|
|
38477
38482
|
setCurrentValue(newVal);
|
38478
38483
|
debounceCallbackChange(newVal);
|
38479
38484
|
onBlur3();
|
38480
|
-
}, [onBlur3
|
38485
|
+
}, [onBlur3]);
|
38481
38486
|
if (!wrapper2)
|
38482
38487
|
return /* @__PURE__ */ React__default.createElement(Component2, __spreadProps(__spreadValues({}, rest), {
|
38483
38488
|
id,
|
@@ -38549,10 +38554,15 @@ function enhancer(Component2, changeAdapter) {
|
|
38549
38554
|
};
|
38550
38555
|
}
|
38551
38556
|
function Input(props) {
|
38552
|
-
const {
|
38557
|
+
const {
|
38558
|
+
quickchange,
|
38559
|
+
value = "",
|
38560
|
+
onKeyDown: onPropsKeyDown,
|
38561
|
+
onChange: propsOnChange
|
38562
|
+
} = props;
|
38553
38563
|
const onChange = useCallback((val) => {
|
38554
|
-
|
38555
|
-
}, [
|
38564
|
+
propsOnChange(val);
|
38565
|
+
}, [propsOnChange]);
|
38556
38566
|
const onKeyDown = useCallback((ev) => {
|
38557
38567
|
if (onPropsKeyDown) {
|
38558
38568
|
onPropsKeyDown == null ? void 0 : onPropsKeyDown(ev);
|
@@ -38632,9 +38642,6 @@ function InputWithUnit(props) {
|
|
38632
38642
|
unit: arr[3] || unitOptions[0].value
|
38633
38643
|
};
|
38634
38644
|
}, [value, unitOptions]);
|
38635
|
-
useCallback((val) => {
|
38636
|
-
props.onChange(val);
|
38637
|
-
}, [props.onChange]);
|
38638
38645
|
return /* @__PURE__ */ React__default.createElement(Input, __spreadProps(__spreadValues({
|
38639
38646
|
value
|
38640
38647
|
}, restProps), {
|
@@ -39216,7 +39223,7 @@ const MergeTags = React__default.memo((props) => {
|
|
39216
39223
|
};
|
39217
39224
|
Object.keys(contextMergeTags).map((key) => deep(key, key, contextMergeTags, treeData));
|
39218
39225
|
return treeData;
|
39219
|
-
}, [contextMergeTags]);
|
39226
|
+
}, [contextMergeTags, mergeTagGenerate]);
|
39220
39227
|
const onSelect = useCallback((value) => {
|
39221
39228
|
return props.onChange(value);
|
39222
39229
|
}, [props]);
|
@@ -39408,22 +39415,20 @@ function Padding(props = {}) {
|
|
39408
39415
|
const defaultConfig = useMemo(() => type ? createBlockDataByType(type) : void 0, [type]);
|
39409
39416
|
const paddingValue = focusBlock2 == null ? void 0 : focusBlock2.attributes[attributeName];
|
39410
39417
|
const defaultPaddingValue = defaultConfig == null ? void 0 : defaultConfig.attributes[attributeName];
|
39411
|
-
const paddingList = paddingValue == null ? void 0 : paddingValue.split(" ");
|
39412
|
-
const defaultPaddingList = defaultPaddingValue == null ? void 0 : defaultPaddingValue.split(" ");
|
39413
39418
|
const paddingFormValues = useMemo(() => {
|
39414
|
-
const
|
39415
|
-
const
|
39416
|
-
const top =
|
39417
|
-
const right =
|
39418
|
-
const bottom =
|
39419
|
-
const left =
|
39419
|
+
const paddingList = paddingValue == null ? void 0 : paddingValue.split(" ");
|
39420
|
+
const defaultPaddingList = defaultPaddingValue == null ? void 0 : defaultPaddingValue.split(" ");
|
39421
|
+
const top = paddingList ? paddingList[0] : (defaultPaddingList == null ? void 0 : defaultPaddingList[0]) || "";
|
39422
|
+
const right = paddingList ? paddingList[1] : (defaultPaddingList == null ? void 0 : defaultPaddingList[1]) || "";
|
39423
|
+
const bottom = paddingList ? paddingList[2] : (defaultPaddingList == null ? void 0 : defaultPaddingList[2]) || "";
|
39424
|
+
const left = paddingList ? paddingList[3] : (defaultPaddingList == null ? void 0 : defaultPaddingList[3]) || "";
|
39420
39425
|
return {
|
39421
39426
|
top,
|
39422
39427
|
left,
|
39423
39428
|
bottom,
|
39424
39429
|
right
|
39425
39430
|
};
|
39426
|
-
}, [
|
39431
|
+
}, [defaultPaddingValue, paddingValue]);
|
39427
39432
|
const onChancePadding = useCallback((val) => {
|
39428
39433
|
change(focusIdx2 + `.attributes[${attributeName}]`, val);
|
39429
39434
|
}, [focusIdx2, attributeName, change]);
|
@@ -39470,9 +39475,10 @@ const PaddingChangeWrapper = (props) => {
|
|
39470
39475
|
const {
|
39471
39476
|
values: { top, right, bottom, left }
|
39472
39477
|
} = useFormState();
|
39478
|
+
const { onChange } = props;
|
39473
39479
|
useEffect(() => {
|
39474
|
-
|
39475
|
-
}, [top, right, bottom, left]);
|
39480
|
+
onChange([top, right, bottom, left].join(" "));
|
39481
|
+
}, [top, right, bottom, left, onChange]);
|
39476
39482
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
|
39477
39483
|
};
|
39478
39484
|
function BackgroundColor({
|
@@ -41845,7 +41851,7 @@ function useAvatarWrapperDrop() {
|
|
41845
41851
|
setDirection("");
|
41846
41852
|
setHoverIdx("");
|
41847
41853
|
return false;
|
41848
|
-
}, [setDirection, setHoverIdx,
|
41854
|
+
}, [setDirection, setHoverIdx, valuesRef]);
|
41849
41855
|
useEffect(() => {
|
41850
41856
|
if (blockLayerRef) {
|
41851
41857
|
const onDragOver = lodash.exports.debounce((ev) => {
|
@@ -41935,7 +41941,16 @@ function useAvatarWrapperDrop() {
|
|
41935
41941
|
blockLayerRef.removeEventListener("dragleave", onDragend);
|
41936
41942
|
};
|
41937
41943
|
}
|
41938
|
-
}, [
|
41944
|
+
}, [
|
41945
|
+
blockLayerRef,
|
41946
|
+
dataTransferRef,
|
41947
|
+
valuesRef,
|
41948
|
+
removeHightLightClassName,
|
41949
|
+
allowDrop,
|
41950
|
+
setDirection,
|
41951
|
+
setHoverIdx,
|
41952
|
+
setDataTransfer
|
41953
|
+
]);
|
41939
41954
|
return {
|
41940
41955
|
setBlockLayerRef,
|
41941
41956
|
blockLayerRef,
|
@@ -41997,7 +42012,7 @@ function BlockLayer() {
|
|
41997
42012
|
blockData.data.hidden = !Boolean(blockData.data.hidden);
|
41998
42013
|
setValueByIdx2(id, blockData);
|
41999
42014
|
}
|
42000
|
-
}, [setValueByIdx2]);
|
42015
|
+
}, [setValueByIdx2, valueRef]);
|
42001
42016
|
const renderTitle = useCallback((data) => {
|
42002
42017
|
const isPage = data.type === BasicType.PAGE;
|
42003
42018
|
const title2 = getBlockTitle(data);
|
@@ -42086,7 +42101,7 @@ function BlockLayer() {
|
|
42086
42101
|
setHoverIdx(dropResult.key);
|
42087
42102
|
}
|
42088
42103
|
return dropResult;
|
42089
|
-
}, [allowDrop]);
|
42104
|
+
}, [allowDrop, removeHightLightClassName, setDirection, setHoverIdx]);
|
42090
42105
|
const selectedKeys = useMemo(() => {
|
42091
42106
|
if (!focusIdx2)
|
42092
42107
|
return [];
|