easy-email-extensions 3.2.1-alpha.1 → 3.2.1-alpha.13
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 +156 -144
- 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,21 +40375,22 @@ 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
|
40362
40383
|
}, props.children, enabledLogic && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Iteration, null), /* @__PURE__ */ React__default.createElement(Condition, null))), /* @__PURE__ */ React__default.createElement("div", null), /* @__PURE__ */ React__default.createElement("div", null), /* @__PURE__ */ React__default.createElement("div", null));
|
40363
40384
|
};
|
40364
40385
|
function Section() {
|
40365
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40366
40386
|
const { focusBlock: focusBlock2, setFocusBlock } = useBlock();
|
40367
40387
|
const noWrap = focusBlock2 == null ? void 0 : focusBlock2.data.value.noWrap;
|
40368
|
-
const
|
40388
|
+
const onChange = useCallback((checked) => {
|
40369
40389
|
var _a;
|
40370
40390
|
if (!focusBlock2)
|
40371
40391
|
return;
|
40372
|
-
|
40392
|
+
focusBlock2.data.value.noWrap = checked;
|
40393
|
+
if (checked) {
|
40373
40394
|
const children = [...focusBlock2.children];
|
40374
40395
|
for (let i2 = 0; i2 < children.length; i2++) {
|
40375
40396
|
const child = children[i2];
|
@@ -40391,9 +40412,6 @@ function Section() {
|
|
40391
40412
|
}
|
40392
40413
|
setFocusBlock(__spreadValues({}, focusBlock2));
|
40393
40414
|
}, [focusBlock2, setFocusBlock]);
|
40394
|
-
useEffect(() => {
|
40395
|
-
changeNoWrap(noWrap);
|
40396
|
-
}, [noWrap]);
|
40397
40415
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, {
|
40398
40416
|
style: { padding: 0 }
|
40399
40417
|
}, /* @__PURE__ */ React__default.createElement(CollapseWrapper, {
|
@@ -40405,13 +40423,15 @@ function Section() {
|
|
40405
40423
|
direction: "vertical"
|
40406
40424
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
40407
40425
|
span: 12
|
40408
|
-
}, /* @__PURE__ */ React__default.createElement(
|
40409
|
-
|
40410
|
-
|
40411
|
-
|
40426
|
+
}, /* @__PURE__ */ React__default.createElement("label", {
|
40427
|
+
style: { width: "100%", display: "flex" }
|
40428
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
40429
|
+
style: { flex: 1 }
|
40430
|
+
}, "Group")), /* @__PURE__ */ React__default.createElement(Switch$1, {
|
40431
|
+
checked: noWrap,
|
40412
40432
|
checkedText: "True",
|
40413
40433
|
uncheckedText: "False",
|
40414
|
-
|
40434
|
+
onChange
|
40415
40435
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
40416
40436
|
span: 12
|
40417
40437
|
})), /* @__PURE__ */ React__default.createElement(Padding, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
@@ -40531,15 +40551,15 @@ const options$9 = [
|
|
40531
40551
|
label: "Inherit"
|
40532
40552
|
}
|
40533
40553
|
];
|
40534
|
-
function TextDecoration() {
|
40554
|
+
function TextDecoration({ name }) {
|
40535
40555
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40536
40556
|
return useMemo(() => {
|
40537
40557
|
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
40538
40558
|
label: "Text decoration",
|
40539
|
-
name: `${focusIdx2}.attributes.text-decoration`,
|
40559
|
+
name: name || `${focusIdx2}.attributes.text-decoration`,
|
40540
40560
|
options: options$9
|
40541
40561
|
});
|
40542
|
-
}, [focusIdx2]);
|
40562
|
+
}, [focusIdx2, name]);
|
40543
40563
|
}
|
40544
40564
|
const options$8 = [
|
40545
40565
|
{
|
@@ -40587,15 +40607,15 @@ const options$8 = [
|
|
40587
40607
|
label: "900"
|
40588
40608
|
}
|
40589
40609
|
];
|
40590
|
-
function FontWeight() {
|
40610
|
+
function FontWeight({ name }) {
|
40591
40611
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40592
40612
|
return useMemo(() => {
|
40593
40613
|
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
40594
40614
|
label: "Font weight",
|
40595
|
-
name: `${focusIdx2}.attributes.font-weight`,
|
40615
|
+
name: name || `${focusIdx2}.attributes.font-weight`,
|
40596
40616
|
options: options$8
|
40597
40617
|
});
|
40598
|
-
}, [focusIdx2]);
|
40618
|
+
}, [focusIdx2, name]);
|
40599
40619
|
}
|
40600
40620
|
const options$7 = [
|
40601
40621
|
{
|
@@ -40607,11 +40627,11 @@ const options$7 = [
|
|
40607
40627
|
label: "Italic"
|
40608
40628
|
}
|
40609
40629
|
];
|
40610
|
-
function FontStyle() {
|
40630
|
+
function FontStyle({ name }) {
|
40611
40631
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40612
40632
|
return /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40613
40633
|
label: "Font style",
|
40614
|
-
name: `${focusIdx2}.attributes.font-style`,
|
40634
|
+
name: name || `${focusIdx2}.attributes.font-style`,
|
40615
40635
|
options: options$7
|
40616
40636
|
});
|
40617
40637
|
}
|
@@ -40681,19 +40701,19 @@ function Align({ inline }) {
|
|
40681
40701
|
options: options$6
|
40682
40702
|
});
|
40683
40703
|
}
|
40684
|
-
function LineHeight() {
|
40704
|
+
function LineHeight({ name }) {
|
40685
40705
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40686
40706
|
return /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
40687
40707
|
label: "Line height",
|
40688
40708
|
unitOptions: "percent",
|
40689
|
-
name: `${focusIdx2}.attributes.line-height`
|
40709
|
+
name: name || `${focusIdx2}.attributes.line-height`
|
40690
40710
|
});
|
40691
40711
|
}
|
40692
|
-
function LetterSpacing() {
|
40712
|
+
function LetterSpacing({ name }) {
|
40693
40713
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40694
40714
|
return /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
40695
40715
|
label: "Letter spacing",
|
40696
|
-
name: `${focusIdx2}.attributes.letter-spacing`
|
40716
|
+
name: name || `${focusIdx2}.attributes.letter-spacing`
|
40697
40717
|
});
|
40698
40718
|
}
|
40699
40719
|
const ShadowDom = (props) => {
|
@@ -40992,15 +41012,15 @@ const options$5 = [
|
|
40992
41012
|
label: "Right"
|
40993
41013
|
}
|
40994
41014
|
];
|
40995
|
-
function TextAlign() {
|
41015
|
+
function TextAlign({ name }) {
|
40996
41016
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40997
41017
|
return useMemo(() => {
|
40998
41018
|
return /* @__PURE__ */ React__default.createElement(Stack$6, null, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40999
41019
|
label: "Text align",
|
41000
|
-
name: `${focusIdx2}.attributes.text-align`,
|
41020
|
+
name: name || `${focusIdx2}.attributes.text-align`,
|
41001
41021
|
options: options$5
|
41002
41022
|
}));
|
41003
|
-
}, [focusIdx2]);
|
41023
|
+
}, [focusIdx2, name]);
|
41004
41024
|
}
|
41005
41025
|
function Decoration() {
|
41006
41026
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
@@ -41034,7 +41054,7 @@ function Decoration() {
|
|
41034
41054
|
}
|
41035
41055
|
const options$4 = [
|
41036
41056
|
{
|
41037
|
-
value: "",
|
41057
|
+
value: "initial",
|
41038
41058
|
label: "none"
|
41039
41059
|
},
|
41040
41060
|
{
|
@@ -41050,15 +41070,15 @@ const options$4 = [
|
|
41050
41070
|
label: "capitalize"
|
41051
41071
|
}
|
41052
41072
|
];
|
41053
|
-
function TextTransform() {
|
41073
|
+
function TextTransform({ name }) {
|
41054
41074
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
41055
41075
|
return useMemo(() => {
|
41056
41076
|
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
41057
41077
|
label: "Text transform",
|
41058
|
-
name: `${focusIdx2}.attributes.text-transform`,
|
41078
|
+
name: name || `${focusIdx2}.attributes.text-transform`,
|
41059
41079
|
options: options$4
|
41060
41080
|
});
|
41061
|
-
}, [focusIdx2]);
|
41081
|
+
}, [focusIdx2, name]);
|
41062
41082
|
}
|
41063
41083
|
const options$3 = [
|
41064
41084
|
{
|
@@ -41288,72 +41308,14 @@ function BorderStyle() {
|
|
41288
41308
|
}, [focusIdx2]);
|
41289
41309
|
}
|
41290
41310
|
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
41311
|
return useMemo(() => {
|
41314
41312
|
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41315
41313
|
vertical: true,
|
41316
41314
|
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]);
|
41315
|
+
}, /* @__PURE__ */ React__default.createElement(Padding, {
|
41316
|
+
name
|
41317
|
+
}));
|
41318
|
+
}, [name]);
|
41357
41319
|
}
|
41358
41320
|
function BorderWidth() {
|
41359
41321
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
@@ -42010,6 +41972,9 @@ function Navbar() {
|
|
42010
41972
|
contentStyle: { padding: 0 },
|
42011
41973
|
name: "1",
|
42012
41974
|
header: "Navbar links"
|
41975
|
+
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
41976
|
+
direction: "vertical",
|
41977
|
+
style: { width: "100%" }
|
42013
41978
|
}, /* @__PURE__ */ React__default.createElement(EditTabField, {
|
42014
41979
|
tabPosition: "top",
|
42015
41980
|
name: `${focusIdx2}.data.value.links`,
|
@@ -42026,7 +41991,7 @@ function Navbar() {
|
|
42026
41991
|
color: "#1890ff",
|
42027
41992
|
"font-size": "13px"
|
42028
41993
|
}
|
42029
|
-
})), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
41994
|
+
}), /* @__PURE__ */ React__default.createElement("div", null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
42030
41995
|
name: "4",
|
42031
41996
|
header: "Extra"
|
42032
41997
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -42038,16 +42003,16 @@ function NavbarLink({
|
|
42038
42003
|
index: index2
|
42039
42004
|
}) {
|
42040
42005
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
42041
|
-
return /* @__PURE__ */ React__default.createElement(
|
42042
|
-
|
42006
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
42007
|
+
className: "NavbarLink"
|
42008
|
+
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
42009
|
+
direction: "vertical",
|
42010
|
+
style: { width: "100%" }
|
42011
|
+
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42012
|
+
span: 11
|
42043
42013
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
42044
42014
|
label: "Content",
|
42045
42015
|
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
42016
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42052
42017
|
offset: 1,
|
42053
42018
|
span: 11
|
@@ -42057,6 +42022,44 @@ function NavbarLink({
|
|
42057
42022
|
alignment: "center"
|
42058
42023
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42059
42024
|
span: 11
|
42025
|
+
}, /* @__PURE__ */ React__default.createElement(FontFamily, {
|
42026
|
+
name: `${focusIdx2}.data.value.links.[${index2}].font-family`
|
42027
|
+
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42028
|
+
offset: 1,
|
42029
|
+
span: 11
|
42030
|
+
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
42031
|
+
label: "Font size",
|
42032
|
+
quickchange: true,
|
42033
|
+
name: `${focusIdx2}.data.value.links.[${index2}].font-size`
|
42034
|
+
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42035
|
+
span: 11
|
42036
|
+
}, /* @__PURE__ */ React__default.createElement(LineHeight, {
|
42037
|
+
name: `${focusIdx2}.data.value.links.[${index2}].line-height`
|
42038
|
+
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42039
|
+
offset: 1,
|
42040
|
+
span: 11
|
42041
|
+
}, /* @__PURE__ */ React__default.createElement(LetterSpacing, {
|
42042
|
+
name: `${focusIdx2}.data.value.links.[${index2}].letter-spacing`
|
42043
|
+
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42044
|
+
span: 11
|
42045
|
+
}, /* @__PURE__ */ React__default.createElement(TextDecoration, {
|
42046
|
+
name: `${focusIdx2}.data.value.links.[${index2}].text-decoration`
|
42047
|
+
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42048
|
+
offset: 1,
|
42049
|
+
span: 11
|
42050
|
+
}, /* @__PURE__ */ React__default.createElement(FontWeight, {
|
42051
|
+
name: `${focusIdx2}.data.value.links.[${index2}].font-weight`
|
42052
|
+
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42053
|
+
span: 11
|
42054
|
+
}, /* @__PURE__ */ React__default.createElement(TextTransform, {
|
42055
|
+
name: `${focusIdx2}.data.value.links.[${index2}].text-transform`
|
42056
|
+
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42057
|
+
offset: 1,
|
42058
|
+
span: 11
|
42059
|
+
})), /* @__PURE__ */ React__default.createElement(FontStyle, {
|
42060
|
+
name: `${focusIdx2}.data.value.links.[${index2}].font-style`
|
42061
|
+
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
42062
|
+
span: 11
|
42060
42063
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
42061
42064
|
prefix: /* @__PURE__ */ React__default.createElement(IconLink$1, null),
|
42062
42065
|
label: /* @__PURE__ */ React__default.createElement("span", null, "Url"),
|
@@ -42081,7 +42084,7 @@ function NavbarLink({
|
|
42081
42084
|
}))), /* @__PURE__ */ React__default.createElement(NavbarLinkPadding, {
|
42082
42085
|
key: index2,
|
42083
42086
|
name: `${focusIdx2}.data.value.links.[${index2}].padding`
|
42084
|
-
}));
|
42087
|
+
}), /* @__PURE__ */ React__default.createElement("div", null)));
|
42085
42088
|
}
|
42086
42089
|
const options = [
|
42087
42090
|
{
|
@@ -42349,10 +42352,9 @@ function AttributePanel() {
|
|
42349
42352
|
const { values: values2, focusBlock: focusBlock2 } = useBlock();
|
42350
42353
|
const { initialized } = useEditorContext();
|
42351
42354
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
42352
|
-
const value = getValueByIdx(values2, focusIdx2);
|
42353
42355
|
const Com = focusBlock2 && BlockAttributeConfigurationManager.get(focusBlock2.type);
|
42354
42356
|
const shadowRoot = getShadowRoot();
|
42355
|
-
if (!
|
42357
|
+
if (!initialized)
|
42356
42358
|
return null;
|
42357
42359
|
return /* @__PURE__ */ React__default.createElement(SelectionRangeProvider, null, /* @__PURE__ */ React__default.createElement(PresetColorsProvider, null, Com ? /* @__PURE__ */ React__default.createElement(Com, {
|
42358
42360
|
key: focusIdx2
|
@@ -46308,7 +46310,7 @@ function TipNode(props) {
|
|
46308
46310
|
style: {
|
46309
46311
|
position: "absolute",
|
46310
46312
|
left: 0,
|
46311
|
-
|
46313
|
+
top: 0
|
46312
46314
|
}
|
46313
46315
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
46314
46316
|
style: {
|
@@ -46321,7 +46323,7 @@ function TipNode(props) {
|
|
46321
46323
|
boxSizing: "border-box",
|
46322
46324
|
whiteSpace: "nowrap",
|
46323
46325
|
fontFamily: "sans-serif",
|
46324
|
-
transform: "translateY(100%)"
|
46326
|
+
transform: "translateY(-100%)"
|
46325
46327
|
}
|
46326
46328
|
}, title2))), props.isDragging && /* @__PURE__ */ React__default.createElement("div", {
|
46327
46329
|
style: __spreadValues({
|
@@ -46422,13 +46424,13 @@ function InteractivePrompt() {
|
|
46422
46424
|
return null;
|
46423
46425
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(HoverTooltip, null), /* @__PURE__ */ React__default.createElement(FocusTooltip, null));
|
46424
46426
|
}
|
46425
|
-
const SimpleLayout$1 = "
|
46426
|
-
const
|
46427
|
-
const
|
46427
|
+
const SimpleLayout$1 = "_SimpleLayout_1olgv_1";
|
46428
|
+
const customScrollBar = "_customScrollBar_1olgv_8";
|
46429
|
+
const customScrollBarV2 = "_customScrollBarV2_1olgv_24";
|
46428
46430
|
var styles = {
|
46429
46431
|
SimpleLayout: SimpleLayout$1,
|
46430
|
-
|
46431
|
-
|
46432
|
+
customScrollBar,
|
46433
|
+
customScrollBarV2
|
46432
46434
|
};
|
46433
46435
|
var Calendar = {
|
46434
46436
|
formatYear: "YYYY",
|
@@ -46620,6 +46622,15 @@ function MergeTagBadge() {
|
|
46620
46622
|
window.removeEventListener("click", onBlur3);
|
46621
46623
|
};
|
46622
46624
|
}, [targetRef, popoverRef]);
|
46625
|
+
const onClose = useCallback(() => {
|
46626
|
+
let ele = targetRef.current;
|
46627
|
+
setTimeout(() => {
|
46628
|
+
if (!ele)
|
46629
|
+
return;
|
46630
|
+
focusMergeTag(ele);
|
46631
|
+
}, 100);
|
46632
|
+
setTarget(null);
|
46633
|
+
}, [focusMergeTag, targetRef]);
|
46623
46634
|
useEffect(() => {
|
46624
46635
|
if (!root2)
|
46625
46636
|
return;
|
@@ -46630,6 +46641,10 @@ function MergeTagBadge() {
|
|
46630
46641
|
if (target22 instanceof HTMLInputElement && target22.classList.contains("easy-email-merge-tag")) {
|
46631
46642
|
target22.classList.add("easy-email-merge-tag-focus");
|
46632
46643
|
const namePath = target22.value;
|
46644
|
+
if (!onChangeMergeTag) {
|
46645
|
+
focusMergeTag(target22);
|
46646
|
+
return;
|
46647
|
+
}
|
46633
46648
|
setText(lodash.exports.get(mergeTags2, namePath, ""));
|
46634
46649
|
setTarget(target22);
|
46635
46650
|
} else {
|
@@ -46642,16 +46657,7 @@ function MergeTagBadge() {
|
|
46642
46657
|
return () => {
|
46643
46658
|
root2.removeEventListener("click", onClick2);
|
46644
46659
|
};
|
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]);
|
46660
|
+
}, [focusMergeTag, mergeTags2, onChangeMergeTag, root2]);
|
46655
46661
|
const onChange = useCallback((ev) => {
|
46656
46662
|
setText(ev.target.value);
|
46657
46663
|
}, []);
|
@@ -46707,8 +46713,8 @@ function MergeTagBadge() {
|
|
46707
46713
|
}
|
46708
46714
|
const SimpleLayout = (props) => {
|
46709
46715
|
const { height: containerHeight } = useEditorProps();
|
46710
|
-
const { showSourceCode = true } = props;
|
46711
|
-
const [collapsed, setCollapsed] = useState(
|
46716
|
+
const { showSourceCode = true, defaultShowLayer = true } = props;
|
46717
|
+
const [collapsed, setCollapsed] = useState(!defaultShowLayer);
|
46712
46718
|
return /* @__PURE__ */ React__default.createElement(ConfigProvider, {
|
46713
46719
|
locale: enUS
|
46714
46720
|
}, /* @__PURE__ */ React__default.createElement(Layout$1, {
|
@@ -46775,13 +46781,19 @@ const SimpleLayout = (props) => {
|
|
46775
46781
|
borderLeft: "none"
|
46776
46782
|
},
|
46777
46783
|
bodyStyle: { padding: 0 },
|
46778
|
-
className: styles.
|
46779
|
-
}, /* @__PURE__ */ React__default.createElement(Tabs$1,
|
46780
|
-
|
46781
|
-
|
46784
|
+
className: styles.customScrollBarV2
|
46785
|
+
}, /* @__PURE__ */ React__default.createElement(Tabs$1, {
|
46786
|
+
className: styles.layoutTabs
|
46787
|
+
}, /* @__PURE__ */ React__default.createElement(Tabs$1.TabPane, {
|
46788
|
+
title: /* @__PURE__ */ React__default.createElement("div", {
|
46789
|
+
style: { height: 31, lineHeight: "31px" }
|
46790
|
+
}, "Configuration")
|
46782
46791
|
}, /* @__PURE__ */ React__default.createElement(AttributePanel, null)), showSourceCode && /* @__PURE__ */ React__default.createElement(Tabs$1.TabPane, {
|
46792
|
+
destroyOnHide: true,
|
46783
46793
|
key: "Source code",
|
46784
|
-
title: "
|
46794
|
+
title: /* @__PURE__ */ React__default.createElement("div", {
|
46795
|
+
style: { height: 31, lineHeight: "31px" }
|
46796
|
+
}, "Source code")
|
46785
46797
|
}, /* @__PURE__ */ React__default.createElement(SourceCodePanel, null))))), /* @__PURE__ */ React__default.createElement(InteractivePrompt, null), /* @__PURE__ */ React__default.createElement(MergeTagBadge, null)));
|
46786
46798
|
};
|
46787
46799
|
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 };
|