easy-email-extensions 3.2.1-alpha.1 → 3.2.1-alpha.11
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/AttributePanel/components/attributes/FontFamily.d.ts +3 -1
- package/lib/AttributePanel/components/attributes/FontStyle.d.ts +3 -1
- package/lib/AttributePanel/components/attributes/FontWeight.d.ts +3 -1
- package/lib/AttributePanel/components/attributes/LetterSpacing.d.ts +3 -1
- package/lib/AttributePanel/components/attributes/LineHeight.d.ts +3 -1
- package/lib/AttributePanel/components/attributes/Padding.d.ts +1 -0
- package/lib/AttributePanel/components/attributes/TextAlign.d.ts +3 -1
- package/lib/AttributePanel/components/attributes/TextDecoration.d.ts +3 -1
- package/lib/AttributePanel/components/attributes/TextTransform.d.ts +3 -1
- package/lib/SimpleLayout/SimpleLayout.d.ts +1 -0
- package/lib/index2.js +148 -133
- package/lib/index2.js.map +1 -1
- package/lib/style.css +1 -1
- package/package.json +2 -2
package/lib/index2.js
CHANGED
@@ -56,7 +56,7 @@ var __async = (__this, __arguments, generator) => {
|
|
56
56
|
import * as React from "react";
|
57
57
|
import React__default, { Children, isValidElement, cloneElement, createContext, useContext, Component, useMemo, memo, forwardRef, useEffect, useRef, useLayoutEffect, useState, createRef, useImperativeHandle, PureComponent, useCallback, useReducer, Fragment, createElement, Suspense } from "react";
|
58
58
|
import { IconFont, useEditorProps, Stack as Stack$6, getShadowRoot, TextStyle, useEditorContext, useBlock, useFocusIdx, useFocusBlockLayout, getEditNode, MergeTagBadge as MergeTagBadge$1, FIXED_CONTAINER_ID, getPluginElement, isTextBlock, scrollBlockEleIntoView, useHoverIdx, useDataTransfer, useRefState, getBlockNodeByChildEle, getDirectionPosition, DATA_ATTRIBUTE_DROP_CONTAINER, BlockAvatarWrapper, getBlockNodeByIdx, useLazyState, getEditorRoot, useActiveTab, ActiveTabKeys } from "easy-email-editor";
|
59
|
-
import { BasicType, ImageManager, EMAIL_BLOCK_CLASS_NAME, BlockManager, createBlockDataByType, AdvancedType, Operator, OperatorSymbol, isAdvancedBlock, getParentByIdx, getParentIdx,
|
59
|
+
import { BasicType, ImageManager, EMAIL_BLOCK_CLASS_NAME, BlockManager, createBlockDataByType, AdvancedType, Operator, OperatorSymbol, isAdvancedBlock, getParentByIdx, getParentIdx, getIndexByIdx, getSiblingIdx, getNodeIdxFromClassName, getNodeIdxClassName, getPageIdx, getChildIdx, MjmlToJson, JsonToMjml, getNodeTypeFromClassName } from "easy-email-core";
|
60
60
|
import ReactDOM, { findDOMNode, createPortal } from "react-dom";
|
61
61
|
import { useField, Field, useForm as useForm$1, Form as Form$3, version as version$2, useFormState } from "react-final-form";
|
62
62
|
var index$2 = "";
|
@@ -39048,6 +39048,7 @@ function ColorPicker(props) {
|
|
39048
39048
|
}
|
39049
39049
|
function Select(props) {
|
39050
39050
|
return /* @__PURE__ */ React__default.createElement(Select$2, __spreadProps(__spreadValues({}, props), {
|
39051
|
+
dropdownMenuClassName: "easy-email-overlay",
|
39051
39052
|
style: lodash.exports.merge({ width: "100%" }, props.style),
|
39052
39053
|
value: props.value,
|
39053
39054
|
onChange: props.onChange
|
@@ -39346,6 +39347,7 @@ function EditTab(props) {
|
|
39346
39347
|
props.onChange(value.filter((_, vIndex) => Number(index2) !== vIndex));
|
39347
39348
|
};
|
39348
39349
|
return /* @__PURE__ */ React__default.createElement(Tabs$1, {
|
39350
|
+
destroyOnHide: true,
|
39349
39351
|
className: classnames(styles$3.editTab),
|
39350
39352
|
style: { border: "none" },
|
39351
39353
|
type: "card",
|
@@ -39832,7 +39834,7 @@ function EyeIcon() {
|
|
39832
39834
|
onClick: onToggleVisible
|
39833
39835
|
});
|
39834
39836
|
}
|
39835
|
-
function FontFamily() {
|
39837
|
+
function FontFamily({ name }) {
|
39836
39838
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
39837
39839
|
const { fontList: fontList2 } = useFontFamily();
|
39838
39840
|
return useMemo(() => {
|
@@ -39840,10 +39842,10 @@ function FontFamily() {
|
|
39840
39842
|
style: { minWidth: 100, flex: 1 },
|
39841
39843
|
showSearch: true,
|
39842
39844
|
label: "Font family",
|
39843
|
-
name: `${focusIdx2}.attributes.font-family`,
|
39845
|
+
name: name || `${focusIdx2}.attributes.font-family`,
|
39844
39846
|
options: fontList2
|
39845
39847
|
});
|
39846
|
-
}, [focusIdx2, fontList2]);
|
39848
|
+
}, [focusIdx2, fontList2, name]);
|
39847
39849
|
}
|
39848
39850
|
function Page() {
|
39849
39851
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
@@ -39885,7 +39887,9 @@ function Page() {
|
|
39885
39887
|
spacing: "tight"
|
39886
39888
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
39887
39889
|
span: 11
|
39888
|
-
}, /* @__PURE__ */ React__default.createElement(FontFamily,
|
39890
|
+
}, /* @__PURE__ */ React__default.createElement(FontFamily, {
|
39891
|
+
name: `${focusIdx2}.data.value.font-family`
|
39892
|
+
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
39889
39893
|
offset: 1,
|
39890
39894
|
span: 11
|
39891
39895
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
@@ -39920,13 +39924,23 @@ function Page() {
|
|
39920
39924
|
}), /* @__PURE__ */ React__default.createElement(AddFont, null))))));
|
39921
39925
|
}
|
39922
39926
|
function Padding(props = {}) {
|
39923
|
-
const { title: title2 = "Padding", attributeName = "padding" } = props;
|
39924
|
-
const { focusBlock: focusBlock2, change } = useBlock();
|
39927
|
+
const { title: title2 = "Padding", attributeName = "padding", name } = props;
|
39928
|
+
const { focusBlock: focusBlock2, change, values: values2 } = useBlock();
|
39925
39929
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
39926
39930
|
const type = focusBlock2 && focusBlock2.type;
|
39927
39931
|
const defaultConfig = useMemo(() => type ? createBlockDataByType(type) : void 0, [type]);
|
39928
|
-
const paddingValue =
|
39929
|
-
|
39932
|
+
const paddingValue = useMemo(() => {
|
39933
|
+
if (name) {
|
39934
|
+
return lodash.exports.get(values2, name);
|
39935
|
+
}
|
39936
|
+
return focusBlock2 == null ? void 0 : focusBlock2.attributes[attributeName];
|
39937
|
+
}, [attributeName, focusBlock2 == null ? void 0 : focusBlock2.attributes, name, values2]);
|
39938
|
+
const defaultPaddingValue = useMemo(() => {
|
39939
|
+
if (name) {
|
39940
|
+
return null;
|
39941
|
+
}
|
39942
|
+
return defaultConfig == null ? void 0 : defaultConfig.attributes[attributeName];
|
39943
|
+
}, [attributeName, defaultConfig == null ? void 0 : defaultConfig.attributes, name]);
|
39930
39944
|
const paddingFormValues = useMemo(() => {
|
39931
39945
|
const paddingList = paddingValue == null ? void 0 : paddingValue.split(" ");
|
39932
39946
|
const defaultPaddingList = defaultPaddingValue == null ? void 0 : defaultPaddingValue.split(" ");
|
@@ -39942,8 +39956,12 @@ function Padding(props = {}) {
|
|
39942
39956
|
};
|
39943
39957
|
}, [defaultPaddingValue, paddingValue]);
|
39944
39958
|
const onChancePadding = useCallback((val) => {
|
39945
|
-
|
39946
|
-
|
39959
|
+
if (name) {
|
39960
|
+
change(name, val);
|
39961
|
+
} else {
|
39962
|
+
change(focusIdx2 + `.attributes[${attributeName}]`, val);
|
39963
|
+
}
|
39964
|
+
}, [name, change, focusIdx2, attributeName]);
|
39947
39965
|
return /* @__PURE__ */ React__default.createElement(Form$3, {
|
39948
39966
|
initialValues: paddingFormValues,
|
39949
39967
|
subscription: { submitting: true, pristine: true },
|
@@ -40162,7 +40180,7 @@ function Condition() {
|
|
40162
40180
|
groups: [
|
40163
40181
|
{
|
40164
40182
|
left: "",
|
40165
|
-
operator: Operator.
|
40183
|
+
operator: Operator.TRUTHY,
|
40166
40184
|
right: ""
|
40167
40185
|
}
|
40168
40186
|
]
|
@@ -40180,7 +40198,7 @@ function Condition() {
|
|
40180
40198
|
groups: [
|
40181
40199
|
{
|
40182
40200
|
left: "",
|
40183
|
-
operator: Operator.
|
40201
|
+
operator: Operator.TRUTHY,
|
40184
40202
|
right: ""
|
40185
40203
|
}
|
40186
40204
|
]
|
@@ -40191,7 +40209,7 @@ function Condition() {
|
|
40191
40209
|
const groups = lodash.exports.get(values2, path);
|
40192
40210
|
groups.push({
|
40193
40211
|
left: "",
|
40194
|
-
operator: Operator.
|
40212
|
+
operator: Operator.TRUTHY,
|
40195
40213
|
right: ""
|
40196
40214
|
});
|
40197
40215
|
change(path, [...groups]);
|
@@ -40298,12 +40316,14 @@ function Condition() {
|
|
40298
40316
|
const options$b = Object.values(Operator).map((item2) => ({ label: lodash.exports.upperFirst(item2), value: item2 }));
|
40299
40317
|
function ConditionItem({ path, onDelete, gIndex, ggIndex }) {
|
40300
40318
|
const name = `${path}.${gIndex}.groups.${ggIndex}`;
|
40319
|
+
const { input: { value } } = useField(name);
|
40320
|
+
const hideRight = value.operator === Operator.TRUTHY || value.operator === Operator.FALSY;
|
40301
40321
|
return /* @__PURE__ */ React__default.createElement(Grid.Row, {
|
40302
40322
|
align: "end"
|
40303
40323
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
40304
40324
|
span: 7
|
40305
40325
|
}, " ", /* @__PURE__ */ React__default.createElement(TextField, {
|
40306
|
-
label: "
|
40326
|
+
label: "Variable path",
|
40307
40327
|
name: `${name}.left`
|
40308
40328
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
40309
40329
|
span: 7
|
@@ -40313,7 +40333,7 @@ function ConditionItem({ path, onDelete, gIndex, ggIndex }) {
|
|
40313
40333
|
options: options$b
|
40314
40334
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
40315
40335
|
span: 7
|
40316
|
-
}, " ", /* @__PURE__ */ React__default.createElement(TextField, {
|
40336
|
+
}, " ", !hideRight && /* @__PURE__ */ React__default.createElement(TextField, {
|
40317
40337
|
label: "Right",
|
40318
40338
|
name: `${name}.right`
|
40319
40339
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -40355,7 +40375,8 @@ const CollapseWrapper = (props) => {
|
|
40355
40375
|
}, [conditionEnabled, isAdvancedBlockType]);
|
40356
40376
|
return /* @__PURE__ */ React__default.createElement(Space$1, {
|
40357
40377
|
size: "large",
|
40358
|
-
direction: "vertical"
|
40378
|
+
direction: "vertical",
|
40379
|
+
style: { width: "100%" }
|
40359
40380
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1, {
|
40360
40381
|
onChange,
|
40361
40382
|
activeKey: activeKeys
|
@@ -40531,15 +40552,15 @@ const options$9 = [
|
|
40531
40552
|
label: "Inherit"
|
40532
40553
|
}
|
40533
40554
|
];
|
40534
|
-
function TextDecoration() {
|
40555
|
+
function TextDecoration({ name }) {
|
40535
40556
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40536
40557
|
return useMemo(() => {
|
40537
40558
|
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
40538
40559
|
label: "Text decoration",
|
40539
|
-
name: `${focusIdx2}.attributes.text-decoration`,
|
40560
|
+
name: name || `${focusIdx2}.attributes.text-decoration`,
|
40540
40561
|
options: options$9
|
40541
40562
|
});
|
40542
|
-
}, [focusIdx2]);
|
40563
|
+
}, [focusIdx2, name]);
|
40543
40564
|
}
|
40544
40565
|
const options$8 = [
|
40545
40566
|
{
|
@@ -40587,15 +40608,15 @@ const options$8 = [
|
|
40587
40608
|
label: "900"
|
40588
40609
|
}
|
40589
40610
|
];
|
40590
|
-
function FontWeight() {
|
40611
|
+
function FontWeight({ name }) {
|
40591
40612
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40592
40613
|
return useMemo(() => {
|
40593
40614
|
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
40594
40615
|
label: "Font weight",
|
40595
|
-
name: `${focusIdx2}.attributes.font-weight`,
|
40616
|
+
name: name || `${focusIdx2}.attributes.font-weight`,
|
40596
40617
|
options: options$8
|
40597
40618
|
});
|
40598
|
-
}, [focusIdx2]);
|
40619
|
+
}, [focusIdx2, name]);
|
40599
40620
|
}
|
40600
40621
|
const options$7 = [
|
40601
40622
|
{
|
@@ -40607,11 +40628,11 @@ const options$7 = [
|
|
40607
40628
|
label: "Italic"
|
40608
40629
|
}
|
40609
40630
|
];
|
40610
|
-
function FontStyle() {
|
40631
|
+
function FontStyle({ name }) {
|
40611
40632
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40612
40633
|
return /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40613
40634
|
label: "Font style",
|
40614
|
-
name: `${focusIdx2}.attributes.font-style`,
|
40635
|
+
name: name || `${focusIdx2}.attributes.font-style`,
|
40615
40636
|
options: options$7
|
40616
40637
|
});
|
40617
40638
|
}
|
@@ -40681,19 +40702,19 @@ function Align({ inline }) {
|
|
40681
40702
|
options: options$6
|
40682
40703
|
});
|
40683
40704
|
}
|
40684
|
-
function LineHeight() {
|
40705
|
+
function LineHeight({ name }) {
|
40685
40706
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40686
40707
|
return /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
40687
40708
|
label: "Line height",
|
40688
40709
|
unitOptions: "percent",
|
40689
|
-
name: `${focusIdx2}.attributes.line-height`
|
40710
|
+
name: name || `${focusIdx2}.attributes.line-height`
|
40690
40711
|
});
|
40691
40712
|
}
|
40692
|
-
function LetterSpacing() {
|
40713
|
+
function LetterSpacing({ name }) {
|
40693
40714
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40694
40715
|
return /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
40695
40716
|
label: "Letter spacing",
|
40696
|
-
name: `${focusIdx2}.attributes.letter-spacing`
|
40717
|
+
name: name || `${focusIdx2}.attributes.letter-spacing`
|
40697
40718
|
});
|
40698
40719
|
}
|
40699
40720
|
const ShadowDom = (props) => {
|
@@ -40992,15 +41013,15 @@ const options$5 = [
|
|
40992
41013
|
label: "Right"
|
40993
41014
|
}
|
40994
41015
|
];
|
40995
|
-
function TextAlign() {
|
41016
|
+
function TextAlign({ name }) {
|
40996
41017
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40997
41018
|
return useMemo(() => {
|
40998
41019
|
return /* @__PURE__ */ React__default.createElement(Stack$6, null, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40999
41020
|
label: "Text align",
|
41000
|
-
name: `${focusIdx2}.attributes.text-align`,
|
41021
|
+
name: name || `${focusIdx2}.attributes.text-align`,
|
41001
41022
|
options: options$5
|
41002
41023
|
}));
|
41003
|
-
}, [focusIdx2]);
|
41024
|
+
}, [focusIdx2, name]);
|
41004
41025
|
}
|
41005
41026
|
function Decoration() {
|
41006
41027
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
@@ -41034,7 +41055,7 @@ function Decoration() {
|
|
41034
41055
|
}
|
41035
41056
|
const options$4 = [
|
41036
41057
|
{
|
41037
|
-
value: "",
|
41058
|
+
value: "initial",
|
41038
41059
|
label: "none"
|
41039
41060
|
},
|
41040
41061
|
{
|
@@ -41050,15 +41071,15 @@ const options$4 = [
|
|
41050
41071
|
label: "capitalize"
|
41051
41072
|
}
|
41052
41073
|
];
|
41053
|
-
function TextTransform() {
|
41074
|
+
function TextTransform({ name }) {
|
41054
41075
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
41055
41076
|
return useMemo(() => {
|
41056
41077
|
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
41057
41078
|
label: "Text transform",
|
41058
|
-
name: `${focusIdx2}.attributes.text-transform`,
|
41079
|
+
name: name || `${focusIdx2}.attributes.text-transform`,
|
41059
41080
|
options: options$4
|
41060
41081
|
});
|
41061
|
-
}, [focusIdx2]);
|
41082
|
+
}, [focusIdx2, name]);
|
41062
41083
|
}
|
41063
41084
|
const options$3 = [
|
41064
41085
|
{
|
@@ -41288,72 +41309,14 @@ function BorderStyle() {
|
|
41288
41309
|
}, [focusIdx2]);
|
41289
41310
|
}
|
41290
41311
|
function NavbarLinkPadding({ name }) {
|
41291
|
-
const { values: values2 } = useBlock();
|
41292
|
-
const getVal = useCallback((index2) => {
|
41293
|
-
return () => {
|
41294
|
-
var _a;
|
41295
|
-
return ((_a = lodash.exports.get(values2, name)) == null ? void 0 : _a.split(" ")[index2]) || "";
|
41296
|
-
};
|
41297
|
-
}, [name, values2]);
|
41298
|
-
const setVal = useCallback((index2) => {
|
41299
|
-
return (newVal) => {
|
41300
|
-
if (newVal === "") {
|
41301
|
-
newVal = "0px";
|
41302
|
-
}
|
41303
|
-
const vals = [
|
41304
|
-
getVal(0)(),
|
41305
|
-
getVal(1)(),
|
41306
|
-
getVal(2)(),
|
41307
|
-
getVal(3)()
|
41308
|
-
];
|
41309
|
-
vals[index2] = newVal;
|
41310
|
-
return vals.join(" ");
|
41311
|
-
};
|
41312
|
-
}, [getVal]);
|
41313
41312
|
return useMemo(() => {
|
41314
41313
|
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41315
41314
|
vertical: true,
|
41316
41315
|
spacing: "extraTight"
|
41317
|
-
}, /* @__PURE__ */ React__default.createElement(
|
41318
|
-
|
41319
|
-
}
|
41320
|
-
|
41321
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41322
|
-
fill: true
|
41323
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41324
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Top"),
|
41325
|
-
quickchange: true,
|
41326
|
-
name,
|
41327
|
-
valueAdapter: getVal(0),
|
41328
|
-
onChangeAdapter: setVal(0)
|
41329
|
-
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41330
|
-
fill: true
|
41331
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41332
|
-
label: "Bottom",
|
41333
|
-
quickchange: true,
|
41334
|
-
name,
|
41335
|
-
valueAdapter: getVal(2),
|
41336
|
-
onChangeAdapter: setVal(2)
|
41337
|
-
}))), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41338
|
-
wrap: false
|
41339
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41340
|
-
fill: true
|
41341
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41342
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Left"),
|
41343
|
-
quickchange: true,
|
41344
|
-
name,
|
41345
|
-
valueAdapter: getVal(3),
|
41346
|
-
onChangeAdapter: setVal(3)
|
41347
|
-
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41348
|
-
fill: true
|
41349
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41350
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Right\xA0"),
|
41351
|
-
quickchange: true,
|
41352
|
-
name,
|
41353
|
-
valueAdapter: getVal(1),
|
41354
|
-
onChangeAdapter: setVal(1)
|
41355
|
-
}))));
|
41356
|
-
}, [getVal, name, setVal]);
|
41316
|
+
}, /* @__PURE__ */ React__default.createElement(Padding, {
|
41317
|
+
name
|
41318
|
+
}));
|
41319
|
+
}, [name]);
|
41357
41320
|
}
|
41358
41321
|
function BorderWidth() {
|
41359
41322
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
@@ -42010,6 +41973,9 @@ function Navbar() {
|
|
42010
41973
|
contentStyle: { padding: 0 },
|
42011
41974
|
name: "1",
|
42012
41975
|
header: "Navbar links"
|
41976
|
+
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
41977
|
+
direction: "vertical",
|
41978
|
+
style: { width: "100%" }
|
42013
41979
|
}, /* @__PURE__ */ React__default.createElement(EditTabField, {
|
42014
41980
|
tabPosition: "top",
|
42015
41981
|
name: `${focusIdx2}.data.value.links`,
|
@@ -42026,7 +41992,7 @@ function Navbar() {
|
|
42026
41992
|
color: "#1890ff",
|
42027
41993
|
"font-size": "13px"
|
42028
41994
|
}
|
42029
|
-
})), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
41995
|
+
}), /* @__PURE__ */ React__default.createElement("div", null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
42030
41996
|
name: "4",
|
42031
41997
|
header: "Extra"
|
42032
41998
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -42038,16 +42004,16 @@ function NavbarLink({
|
|
42038
42004
|
index: index2
|
42039
42005
|
}) {
|
42040
42006
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
42041
|
-
return /* @__PURE__ */ React__default.createElement(
|
42042
|
-
|
42007
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
42008
|
+
className: "NavbarLink"
|
42009
|
+
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
42010
|
+
direction: "vertical",
|
42011
|
+
style: { width: "100%" }
|
42012
|
+
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42013
|
+
span: 11
|
42043
42014
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
42044
42015
|
label: "Content",
|
42045
42016
|
name: `${focusIdx2}.data.value.links.[${index2}].content`
|
42046
|
-
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42047
|
-
span: 11
|
42048
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
42049
|
-
label: "Font size",
|
42050
|
-
name: `${focusIdx2}.data.value.links.[${index2}].font-size`
|
42051
42017
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42052
42018
|
offset: 1,
|
42053
42019
|
span: 11
|
@@ -42057,6 +42023,44 @@ function NavbarLink({
|
|
42057
42023
|
alignment: "center"
|
42058
42024
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42059
42025
|
span: 11
|
42026
|
+
}, /* @__PURE__ */ React__default.createElement(FontFamily, {
|
42027
|
+
name: `${focusIdx2}.data.value.links.[${index2}].font-family`
|
42028
|
+
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42029
|
+
offset: 1,
|
42030
|
+
span: 11
|
42031
|
+
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
42032
|
+
label: "Font size",
|
42033
|
+
quickchange: true,
|
42034
|
+
name: `${focusIdx2}.data.value.links.[${index2}].font-size`
|
42035
|
+
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42036
|
+
span: 11
|
42037
|
+
}, /* @__PURE__ */ React__default.createElement(LineHeight, {
|
42038
|
+
name: `${focusIdx2}.data.value.links.[${index2}].line-height`
|
42039
|
+
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42040
|
+
offset: 1,
|
42041
|
+
span: 11
|
42042
|
+
}, /* @__PURE__ */ React__default.createElement(LetterSpacing, {
|
42043
|
+
name: `${focusIdx2}.data.value.links.[${index2}].letter-spacing`
|
42044
|
+
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42045
|
+
span: 11
|
42046
|
+
}, /* @__PURE__ */ React__default.createElement(TextDecoration, {
|
42047
|
+
name: `${focusIdx2}.data.value.links.[${index2}].text-decoration`
|
42048
|
+
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42049
|
+
offset: 1,
|
42050
|
+
span: 11
|
42051
|
+
}, /* @__PURE__ */ React__default.createElement(FontWeight, {
|
42052
|
+
name: `${focusIdx2}.data.value.links.[${index2}].font-weight`
|
42053
|
+
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42054
|
+
span: 11
|
42055
|
+
}, /* @__PURE__ */ React__default.createElement(TextTransform, {
|
42056
|
+
name: `${focusIdx2}.data.value.links.[${index2}].text-transform`
|
42057
|
+
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42058
|
+
offset: 1,
|
42059
|
+
span: 11
|
42060
|
+
})), /* @__PURE__ */ React__default.createElement(FontStyle, {
|
42061
|
+
name: `${focusIdx2}.data.value.links.[${index2}].font-style`
|
42062
|
+
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42063
|
+
span: 11
|
42060
42064
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
42061
42065
|
prefix: /* @__PURE__ */ React__default.createElement(IconLink$1, null),
|
42062
42066
|
label: /* @__PURE__ */ React__default.createElement("span", null, "Url"),
|
@@ -42081,7 +42085,7 @@ function NavbarLink({
|
|
42081
42085
|
}))), /* @__PURE__ */ React__default.createElement(NavbarLinkPadding, {
|
42082
42086
|
key: index2,
|
42083
42087
|
name: `${focusIdx2}.data.value.links.[${index2}].padding`
|
42084
|
-
}));
|
42088
|
+
}), /* @__PURE__ */ React__default.createElement("div", null)));
|
42085
42089
|
}
|
42086
42090
|
const options = [
|
42087
42091
|
{
|
@@ -42349,10 +42353,9 @@ function AttributePanel() {
|
|
42349
42353
|
const { values: values2, focusBlock: focusBlock2 } = useBlock();
|
42350
42354
|
const { initialized } = useEditorContext();
|
42351
42355
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
42352
|
-
const value = getValueByIdx(values2, focusIdx2);
|
42353
42356
|
const Com = focusBlock2 && BlockAttributeConfigurationManager.get(focusBlock2.type);
|
42354
42357
|
const shadowRoot = getShadowRoot();
|
42355
|
-
if (!
|
42358
|
+
if (!initialized)
|
42356
42359
|
return null;
|
42357
42360
|
return /* @__PURE__ */ React__default.createElement(SelectionRangeProvider, null, /* @__PURE__ */ React__default.createElement(PresetColorsProvider, null, Com ? /* @__PURE__ */ React__default.createElement(Com, {
|
42358
42361
|
key: focusIdx2
|
@@ -46308,7 +46311,7 @@ function TipNode(props) {
|
|
46308
46311
|
style: {
|
46309
46312
|
position: "absolute",
|
46310
46313
|
left: 0,
|
46311
|
-
|
46314
|
+
top: 0
|
46312
46315
|
}
|
46313
46316
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
46314
46317
|
style: {
|
@@ -46321,7 +46324,7 @@ function TipNode(props) {
|
|
46321
46324
|
boxSizing: "border-box",
|
46322
46325
|
whiteSpace: "nowrap",
|
46323
46326
|
fontFamily: "sans-serif",
|
46324
|
-
transform: "translateY(100%)"
|
46327
|
+
transform: "translateY(-100%)"
|
46325
46328
|
}
|
46326
46329
|
}, title2))), props.isDragging && /* @__PURE__ */ React__default.createElement("div", {
|
46327
46330
|
style: __spreadValues({
|
@@ -46422,13 +46425,15 @@ function InteractivePrompt() {
|
|
46422
46425
|
return null;
|
46423
46426
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(HoverTooltip, null), /* @__PURE__ */ React__default.createElement(FocusTooltip, null));
|
46424
46427
|
}
|
46425
|
-
const SimpleLayout$1 = "
|
46426
|
-
const
|
46427
|
-
const customScrollBar = "
|
46428
|
+
const SimpleLayout$1 = "_SimpleLayout_10q4j_1";
|
46429
|
+
const layoutTabs = "_layoutTabs_10q4j_1";
|
46430
|
+
const customScrollBar = "_customScrollBar_10q4j_8";
|
46431
|
+
const customScrollBarV2 = "_customScrollBarV2_10q4j_24";
|
46428
46432
|
var styles = {
|
46429
46433
|
SimpleLayout: SimpleLayout$1,
|
46430
|
-
|
46431
|
-
customScrollBar
|
46434
|
+
layoutTabs,
|
46435
|
+
customScrollBar,
|
46436
|
+
customScrollBarV2
|
46432
46437
|
};
|
46433
46438
|
var Calendar = {
|
46434
46439
|
formatYear: "YYYY",
|
@@ -46620,6 +46625,15 @@ function MergeTagBadge() {
|
|
46620
46625
|
window.removeEventListener("click", onBlur3);
|
46621
46626
|
};
|
46622
46627
|
}, [targetRef, popoverRef]);
|
46628
|
+
const onClose = useCallback(() => {
|
46629
|
+
let ele = targetRef.current;
|
46630
|
+
setTimeout(() => {
|
46631
|
+
if (!ele)
|
46632
|
+
return;
|
46633
|
+
focusMergeTag(ele);
|
46634
|
+
}, 100);
|
46635
|
+
setTarget(null);
|
46636
|
+
}, [focusMergeTag, targetRef]);
|
46623
46637
|
useEffect(() => {
|
46624
46638
|
if (!root2)
|
46625
46639
|
return;
|
@@ -46630,6 +46644,10 @@ function MergeTagBadge() {
|
|
46630
46644
|
if (target22 instanceof HTMLInputElement && target22.classList.contains("easy-email-merge-tag")) {
|
46631
46645
|
target22.classList.add("easy-email-merge-tag-focus");
|
46632
46646
|
const namePath = target22.value;
|
46647
|
+
if (!onChangeMergeTag) {
|
46648
|
+
focusMergeTag(target22);
|
46649
|
+
return;
|
46650
|
+
}
|
46633
46651
|
setText(lodash.exports.get(mergeTags2, namePath, ""));
|
46634
46652
|
setTarget(target22);
|
46635
46653
|
} else {
|
@@ -46642,16 +46660,7 @@ function MergeTagBadge() {
|
|
46642
46660
|
return () => {
|
46643
46661
|
root2.removeEventListener("click", onClick2);
|
46644
46662
|
};
|
46645
|
-
}, [focusMergeTag, mergeTags2, root2]);
|
46646
|
-
const onClose = useCallback(() => {
|
46647
|
-
let ele = targetRef.current;
|
46648
|
-
setTimeout(() => {
|
46649
|
-
if (!ele)
|
46650
|
-
return;
|
46651
|
-
focusMergeTag(ele);
|
46652
|
-
}, 100);
|
46653
|
-
setTarget(null);
|
46654
|
-
}, [focusMergeTag, targetRef]);
|
46663
|
+
}, [focusMergeTag, mergeTags2, onChangeMergeTag, root2]);
|
46655
46664
|
const onChange = useCallback((ev) => {
|
46656
46665
|
setText(ev.target.value);
|
46657
46666
|
}, []);
|
@@ -46707,8 +46716,8 @@ function MergeTagBadge() {
|
|
46707
46716
|
}
|
46708
46717
|
const SimpleLayout = (props) => {
|
46709
46718
|
const { height: containerHeight } = useEditorProps();
|
46710
|
-
const { showSourceCode = true } = props;
|
46711
|
-
const [collapsed, setCollapsed] = useState(
|
46719
|
+
const { showSourceCode = true, defaultShowLayer = true } = props;
|
46720
|
+
const [collapsed, setCollapsed] = useState(!defaultShowLayer);
|
46712
46721
|
return /* @__PURE__ */ React__default.createElement(ConfigProvider, {
|
46713
46722
|
locale: enUS
|
46714
46723
|
}, /* @__PURE__ */ React__default.createElement(Layout$1, {
|
@@ -46775,13 +46784,19 @@ const SimpleLayout = (props) => {
|
|
46775
46784
|
borderLeft: "none"
|
46776
46785
|
},
|
46777
46786
|
bodyStyle: { padding: 0 },
|
46778
|
-
className: styles.
|
46779
|
-
}, /* @__PURE__ */ React__default.createElement(Tabs$1,
|
46780
|
-
|
46781
|
-
|
46787
|
+
className: styles.customScrollBarV2
|
46788
|
+
}, /* @__PURE__ */ React__default.createElement(Tabs$1, {
|
46789
|
+
className: styles.layoutTabs
|
46790
|
+
}, /* @__PURE__ */ React__default.createElement(Tabs$1.TabPane, {
|
46791
|
+
title: /* @__PURE__ */ React__default.createElement("div", {
|
46792
|
+
style: { height: 31, lineHeight: "31px" }
|
46793
|
+
}, "Configuration")
|
46782
46794
|
}, /* @__PURE__ */ React__default.createElement(AttributePanel, null)), showSourceCode && /* @__PURE__ */ React__default.createElement(Tabs$1.TabPane, {
|
46795
|
+
destroyOnHide: true,
|
46783
46796
|
key: "Source code",
|
46784
|
-
title: "
|
46797
|
+
title: /* @__PURE__ */ React__default.createElement("div", {
|
46798
|
+
style: { height: 31, lineHeight: "31px" }
|
46799
|
+
}, "Source code")
|
46785
46800
|
}, /* @__PURE__ */ React__default.createElement(SourceCodePanel, null))))), /* @__PURE__ */ React__default.createElement(InteractivePrompt, null), /* @__PURE__ */ React__default.createElement(MergeTagBadge, null)));
|
46786
46801
|
};
|
46787
46802
|
export { AutoCompleteField as $, AttributePanel as A, BlockLayer as B, Color as C, Decoration as D, SimpleLayout as E, FontFamily as F, TextField as G, Height as H, InteractivePrompt as I, InputWithUnitField as J, SearchField as K, LetterSpacing as L, Margin as M, NavbarLinkPadding as N, TextAreaField as O, Padding as P, NumberField as Q, SliderField as R, ShortcutToolbar as S, TextAlign as T, ColorPickerField as U, VerticalAlign as V, Width as W, UploadField as X, ImageUploaderField as Y, SelectField as Z, TreeSelectField as _, getIconNameByBlockType as a, RadioGroupField as a0, SwitchField as a1, DatePickerField as a2, CheckboxField as a3, EditTabField as a4, InlineTextField as a5, enhancer as a6, RichTextField as a7, getBlockTitle as b, commonjsGlobal as c, BlockAttributeConfigurationManager as d, Align as e, AttributesPanelWrapper as f, getContextMergeTags as g, ContainerBackgroundColor as h, TextDecoration as i, Background as j, LineHeight as k, TextTransform as l, BackgroundColor as m, Direction as n, Link as o, Border as p, BorderColor as q, FontSize$1 as r, MergeTags$1 as s, BorderStyle as t, FontStyle as u, BorderWidth as v, FontWeight as w, BlockMarketManager as x, BlockMaskWrapper as y, SourceCodePanel as z };
|