easy-email-extensions 3.1.6 → 3.1.10
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/index2.js +326 -292
- package/lib/index2.js.map +1 -1
- package/package.json +2 -2
package/lib/index2.js
CHANGED
@@ -55,7 +55,7 @@ var __async = (__this, __arguments, generator) => {
|
|
55
55
|
};
|
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
|
-
import { IconFont, Stack as Stack$6,
|
58
|
+
import { IconFont, useEditorProps, Stack as Stack$6, getBlockNodeByIdx, useBlock, getEditNode, getEditContent, useFocusIdx, TextStyle, useEditorContext, getShadowRoot, FIXED_CONTAINER_ID, scrollBlockEleIntoView, useHoverIdx, useDataTransfer, getBlockNodeByChildEle, getDirectionPosition, DATA_ATTRIBUTE_DROP_CONTAINER, BlockAvatarWrapper, getEditorRoot, useActiveTab, ActiveTabKeys } from "easy-email-editor";
|
59
59
|
import { BasicType, ImageManager, BlockManager, getParentIdx, createBlockDataByType, getParentByIdx, getValueByIdx, 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";
|
@@ -31309,6 +31309,7 @@ function getImg$1(name) {
|
|
31309
31309
|
return ImageManager.get(name);
|
31310
31310
|
}
|
31311
31311
|
function ImageUploader(props) {
|
31312
|
+
const { mergeTags: mergeTags2 } = useEditorProps();
|
31312
31313
|
const [isUploading, setIsUploading] = useState(false);
|
31313
31314
|
const [preview, setPreview] = useState(false);
|
31314
31315
|
const uploadHandlerRef = useRef(props.uploadHandler);
|
@@ -31408,12 +31409,25 @@ function ImageUploader(props) {
|
|
31408
31409
|
className: styles$4.wrap
|
31409
31410
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
31410
31411
|
className: styles$4["container"]
|
31411
|
-
}, content, /* @__PURE__ */ React__default.createElement(
|
31412
|
+
}, content, /* @__PURE__ */ React__default.createElement(Grid.Row, {
|
31413
|
+
style: { width: "100%" }
|
31414
|
+
}, mergeTags2 && /* @__PURE__ */ React__default.createElement(Popover$1, {
|
31415
|
+
trigger: "click",
|
31416
|
+
content: /* @__PURE__ */ React__default.createElement(MergeTags, {
|
31417
|
+
value: props.value,
|
31418
|
+
onChange
|
31419
|
+
})
|
31420
|
+
}, /* @__PURE__ */ React__default.createElement(Button$4, {
|
31421
|
+
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
31422
|
+
iconName: "icon-merge-tags"
|
31423
|
+
})
|
31424
|
+
})), /* @__PURE__ */ React__default.createElement(Input$5, {
|
31425
|
+
style: { flex: 1 },
|
31412
31426
|
onPaste,
|
31413
31427
|
value: props.value,
|
31414
31428
|
onChange,
|
31415
31429
|
disabled: isUploading
|
31416
|
-
})), /* @__PURE__ */ React__default.createElement(Modal$1, {
|
31430
|
+
}))), /* @__PURE__ */ React__default.createElement(Modal$1, {
|
31417
31431
|
visible: preview,
|
31418
31432
|
footer: null,
|
31419
31433
|
onCancel: () => setPreview(false)
|
@@ -38532,12 +38546,13 @@ function enhancer(Component2, changeAdapter) {
|
|
38532
38546
|
style: { textAlign: wrapperStyle.textAlign }
|
38533
38547
|
}, /* @__PURE__ */ React__default.createElement("label", {
|
38534
38548
|
className: labelHidden2 ? styles$3["label-hidden"] : void 0,
|
38549
|
+
style: { width: "100%", display: "flex" },
|
38535
38550
|
htmlFor: id
|
38536
|
-
},
|
38551
|
+
}, required && /* @__PURE__ */ React__default.createElement("span", {
|
38537
38552
|
style: { color: "#ff4d4f", marginRight: 4 }
|
38538
|
-
}, "*", " "), /* @__PURE__ */ React__default.createElement(
|
38539
|
-
|
38540
|
-
}, label)))
|
38553
|
+
}, "*", " "), /* @__PURE__ */ React__default.createElement("div", {
|
38554
|
+
style: { flex: 1 }
|
38555
|
+
}, " ", label))), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
38541
38556
|
style: {
|
38542
38557
|
textAlign: "left"
|
38543
38558
|
},
|
@@ -39233,7 +39248,11 @@ const MergeTags = React__default.memo((props) => {
|
|
39233
39248
|
const onSelect = useCallback((value) => {
|
39234
39249
|
return props.onChange(value);
|
39235
39250
|
}, [props]);
|
39236
|
-
const mergeTagContent = useMemo(() => renderMergeTagContent
|
39251
|
+
const mergeTagContent = useMemo(() => renderMergeTagContent ? renderMergeTagContent({
|
39252
|
+
onChange: props.onChange,
|
39253
|
+
isSelect: props.isSelect,
|
39254
|
+
value: props.value
|
39255
|
+
}) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null), [renderMergeTagContent, props.onChange, props.isSelect, props.value]);
|
39237
39256
|
if (renderMergeTagContent) {
|
39238
39257
|
return mergeTagContent;
|
39239
39258
|
}
|
@@ -40151,8 +40170,289 @@ function Group() {
|
|
40151
40170
|
span: 11
|
40152
40171
|
})))));
|
40153
40172
|
}
|
40173
|
+
const options$5 = [
|
40174
|
+
{
|
40175
|
+
value: "left",
|
40176
|
+
label: "Left"
|
40177
|
+
},
|
40178
|
+
{
|
40179
|
+
value: "center",
|
40180
|
+
label: "Center"
|
40181
|
+
},
|
40182
|
+
{
|
40183
|
+
value: "right",
|
40184
|
+
label: "Right"
|
40185
|
+
}
|
40186
|
+
];
|
40187
|
+
function TextAlign() {
|
40188
|
+
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40189
|
+
return useMemo(() => {
|
40190
|
+
return /* @__PURE__ */ React__default.createElement(Stack$6, null, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40191
|
+
label: "Text align",
|
40192
|
+
name: `${focusIdx2}.attributes.text-align`,
|
40193
|
+
options: options$5
|
40194
|
+
}));
|
40195
|
+
}, [focusIdx2]);
|
40196
|
+
}
|
40197
|
+
function Decoration() {
|
40198
|
+
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40199
|
+
return useMemo(() => {
|
40200
|
+
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40201
|
+
key: focusIdx2,
|
40202
|
+
vertical: true,
|
40203
|
+
spacing: "extraTight"
|
40204
|
+
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
40205
|
+
variation: "strong",
|
40206
|
+
size: "large"
|
40207
|
+
}, "Decoration"), /* @__PURE__ */ React__default.createElement(TextField, {
|
40208
|
+
label: "Border radius",
|
40209
|
+
name: `${focusIdx2}.attributes.borderRadius`,
|
40210
|
+
inline: true
|
40211
|
+
}), /* @__PURE__ */ React__default.createElement(TextField, {
|
40212
|
+
label: "Border",
|
40213
|
+
name: `${focusIdx2}.attributes.border`,
|
40214
|
+
inline: true,
|
40215
|
+
alignment: "center"
|
40216
|
+
}), /* @__PURE__ */ React__default.createElement(NumberField, {
|
40217
|
+
label: "Opacity",
|
40218
|
+
max: 1,
|
40219
|
+
min: 0,
|
40220
|
+
step: 0.1,
|
40221
|
+
name: `${focusIdx2}.attributes.opacity`,
|
40222
|
+
inline: true,
|
40223
|
+
alignment: "center"
|
40224
|
+
}));
|
40225
|
+
}, [focusIdx2]);
|
40226
|
+
}
|
40227
|
+
const options$4 = [
|
40228
|
+
{
|
40229
|
+
value: "",
|
40230
|
+
label: "none"
|
40231
|
+
},
|
40232
|
+
{
|
40233
|
+
value: "uppercase",
|
40234
|
+
label: "uppercase"
|
40235
|
+
},
|
40236
|
+
{
|
40237
|
+
value: "lowercase",
|
40238
|
+
label: "lowercase"
|
40239
|
+
},
|
40240
|
+
{
|
40241
|
+
value: "capitalize",
|
40242
|
+
label: "capitalize"
|
40243
|
+
}
|
40244
|
+
];
|
40245
|
+
function TextTransform() {
|
40246
|
+
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40247
|
+
return useMemo(() => {
|
40248
|
+
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
40249
|
+
label: "Text transform",
|
40250
|
+
name: `${focusIdx2}.attributes.text-transform`,
|
40251
|
+
options: options$4
|
40252
|
+
});
|
40253
|
+
}, [focusIdx2]);
|
40254
|
+
}
|
40255
|
+
const options$3 = [
|
40256
|
+
{
|
40257
|
+
value: "ltr",
|
40258
|
+
label: "ltr"
|
40259
|
+
},
|
40260
|
+
{
|
40261
|
+
value: "rtl",
|
40262
|
+
label: "rtl"
|
40263
|
+
}
|
40264
|
+
];
|
40265
|
+
function Direction() {
|
40266
|
+
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40267
|
+
return useMemo(() => {
|
40268
|
+
return /* @__PURE__ */ React__default.createElement(Stack$6, null, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40269
|
+
label: "Direction",
|
40270
|
+
name: `${focusIdx2}.attributes.direction`,
|
40271
|
+
options: options$3,
|
40272
|
+
inline: true
|
40273
|
+
}));
|
40274
|
+
}, [focusIdx2]);
|
40275
|
+
}
|
40276
|
+
function Margin() {
|
40277
|
+
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40278
|
+
return useMemo(() => {
|
40279
|
+
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40280
|
+
vertical: true,
|
40281
|
+
spacing: "extraTight"
|
40282
|
+
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
40283
|
+
size: "large"
|
40284
|
+
}, "Margin"), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40285
|
+
wrap: false
|
40286
|
+
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40287
|
+
fill: true
|
40288
|
+
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40289
|
+
label: "Top",
|
40290
|
+
quickchange: true,
|
40291
|
+
name: `${focusIdx2}.attributes.marginTop`,
|
40292
|
+
inline: true
|
40293
|
+
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40294
|
+
fill: true
|
40295
|
+
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40296
|
+
label: "Bottom",
|
40297
|
+
quickchange: true,
|
40298
|
+
name: `${focusIdx2}.attributes.marginBottom`,
|
40299
|
+
inline: true
|
40300
|
+
}))), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40301
|
+
wrap: false
|
40302
|
+
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40303
|
+
fill: true
|
40304
|
+
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40305
|
+
label: "Left",
|
40306
|
+
quickchange: true,
|
40307
|
+
name: `${focusIdx2}.attributes.marginLeft`,
|
40308
|
+
inline: true
|
40309
|
+
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40310
|
+
fill: true
|
40311
|
+
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40312
|
+
label: "Right",
|
40313
|
+
quickchange: true,
|
40314
|
+
name: `${focusIdx2}.attributes.marginRight`,
|
40315
|
+
inline: true
|
40316
|
+
}))));
|
40317
|
+
}, [focusIdx2]);
|
40318
|
+
}
|
40319
|
+
function BorderColor() {
|
40320
|
+
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40321
|
+
return useMemo(() => {
|
40322
|
+
return /* @__PURE__ */ React__default.createElement(ColorPickerField, {
|
40323
|
+
label: "Color",
|
40324
|
+
name: `${focusIdx2}.attributes.border-color`
|
40325
|
+
});
|
40326
|
+
}, [focusIdx2]);
|
40327
|
+
}
|
40328
|
+
const borderStyleOptions = [
|
40329
|
+
{
|
40330
|
+
value: "dashed",
|
40331
|
+
label: "Dashed"
|
40332
|
+
},
|
40333
|
+
{
|
40334
|
+
value: "dotted",
|
40335
|
+
label: "Dotted"
|
40336
|
+
},
|
40337
|
+
{
|
40338
|
+
value: "solid",
|
40339
|
+
label: "Solid"
|
40340
|
+
},
|
40341
|
+
{
|
40342
|
+
value: "double",
|
40343
|
+
label: "double"
|
40344
|
+
},
|
40345
|
+
{
|
40346
|
+
value: "ridge",
|
40347
|
+
label: "ridge"
|
40348
|
+
},
|
40349
|
+
{
|
40350
|
+
value: "groove",
|
40351
|
+
label: "groove"
|
40352
|
+
},
|
40353
|
+
{
|
40354
|
+
value: "inset",
|
40355
|
+
label: "inset"
|
40356
|
+
},
|
40357
|
+
{
|
40358
|
+
value: "outset",
|
40359
|
+
label: "outset"
|
40360
|
+
}
|
40361
|
+
];
|
40362
|
+
function BorderStyle() {
|
40363
|
+
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40364
|
+
return useMemo(() => {
|
40365
|
+
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
40366
|
+
label: "Style",
|
40367
|
+
name: `${focusIdx2}.attributes.border-style`,
|
40368
|
+
options: borderStyleOptions
|
40369
|
+
});
|
40370
|
+
}, [focusIdx2]);
|
40371
|
+
}
|
40372
|
+
function NavbarLinkPadding({ name }) {
|
40373
|
+
const { values: values2 } = useBlock();
|
40374
|
+
const getVal = useCallback((index2) => {
|
40375
|
+
return () => {
|
40376
|
+
var _a;
|
40377
|
+
return ((_a = lodash.exports.get(values2, name)) == null ? void 0 : _a.split(" ")[index2]) || "";
|
40378
|
+
};
|
40379
|
+
}, [name, values2]);
|
40380
|
+
const setVal = useCallback((index2) => {
|
40381
|
+
return (newVal) => {
|
40382
|
+
if (newVal === "") {
|
40383
|
+
newVal = "0px";
|
40384
|
+
}
|
40385
|
+
const vals = [
|
40386
|
+
getVal(0)(),
|
40387
|
+
getVal(1)(),
|
40388
|
+
getVal(2)(),
|
40389
|
+
getVal(3)()
|
40390
|
+
];
|
40391
|
+
vals[index2] = newVal;
|
40392
|
+
return vals.join(" ");
|
40393
|
+
};
|
40394
|
+
}, [getVal]);
|
40395
|
+
return useMemo(() => {
|
40396
|
+
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40397
|
+
vertical: true,
|
40398
|
+
spacing: "extraTight"
|
40399
|
+
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
40400
|
+
variation: "strong"
|
40401
|
+
}, "Padding"), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40402
|
+
wrap: false
|
40403
|
+
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40404
|
+
fill: true
|
40405
|
+
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40406
|
+
label: /* @__PURE__ */ React__default.createElement("span", null, "Top"),
|
40407
|
+
quickchange: true,
|
40408
|
+
name,
|
40409
|
+
valueAdapter: getVal(0),
|
40410
|
+
onChangeAdapter: setVal(0)
|
40411
|
+
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40412
|
+
fill: true
|
40413
|
+
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40414
|
+
label: "Bottom",
|
40415
|
+
quickchange: true,
|
40416
|
+
name,
|
40417
|
+
valueAdapter: getVal(2),
|
40418
|
+
onChangeAdapter: setVal(2)
|
40419
|
+
}))), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40420
|
+
wrap: false
|
40421
|
+
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40422
|
+
fill: true
|
40423
|
+
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40424
|
+
label: /* @__PURE__ */ React__default.createElement("span", null, "Left"),
|
40425
|
+
quickchange: true,
|
40426
|
+
name,
|
40427
|
+
valueAdapter: getVal(3),
|
40428
|
+
onChangeAdapter: setVal(3)
|
40429
|
+
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40430
|
+
fill: true
|
40431
|
+
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40432
|
+
label: /* @__PURE__ */ React__default.createElement("span", null, "Right\xA0"),
|
40433
|
+
quickchange: true,
|
40434
|
+
name,
|
40435
|
+
valueAdapter: getVal(1),
|
40436
|
+
onChangeAdapter: setVal(1)
|
40437
|
+
}))));
|
40438
|
+
}, [getVal, name, setVal]);
|
40439
|
+
}
|
40440
|
+
function BorderWidth() {
|
40441
|
+
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40442
|
+
return useMemo(() => {
|
40443
|
+
return /* @__PURE__ */ React__default.createElement(TextField, {
|
40444
|
+
label: "Width",
|
40445
|
+
quickchange: true,
|
40446
|
+
name: `${focusIdx2}.attributes.border-width`
|
40447
|
+
});
|
40448
|
+
}, [focusIdx2]);
|
40449
|
+
}
|
40154
40450
|
function Button() {
|
40155
40451
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40452
|
+
const { input } = useField(`${focusIdx2}.data.value.content`, {
|
40453
|
+
parse: (v) => v
|
40454
|
+
});
|
40455
|
+
const { mergeTags: mergeTags2 } = useEditorProps();
|
40156
40456
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, /* @__PURE__ */ React__default.createElement(Collapse$1, {
|
40157
40457
|
defaultActiveKey: ["-1", "0", "1", "2", "3"]
|
40158
40458
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
@@ -40161,7 +40461,18 @@ function Button() {
|
|
40161
40461
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
40162
40462
|
direction: "vertical"
|
40163
40463
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40164
|
-
label: "Content",
|
40464
|
+
label: /* @__PURE__ */ React__default.createElement(Space$1, null, /* @__PURE__ */ React__default.createElement("span", null, "Content"), mergeTags2 && /* @__PURE__ */ React__default.createElement(Popover$1, {
|
40465
|
+
trigger: "click",
|
40466
|
+
content: /* @__PURE__ */ React__default.createElement(MergeTags, {
|
40467
|
+
value: input.value,
|
40468
|
+
onChange: input.onChange
|
40469
|
+
})
|
40470
|
+
}, /* @__PURE__ */ React__default.createElement(Button$4, {
|
40471
|
+
type: "text",
|
40472
|
+
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
40473
|
+
iconName: "icon-merge-tags"
|
40474
|
+
})
|
40475
|
+
}))),
|
40165
40476
|
name: `${focusIdx2}.data.value.content`
|
40166
40477
|
}), /* @__PURE__ */ React__default.createElement(Link, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
40167
40478
|
name: "0",
|
@@ -40222,69 +40533,6 @@ function Button() {
|
|
40222
40533
|
header: "Border"
|
40223
40534
|
}, /* @__PURE__ */ React__default.createElement(Border, null))));
|
40224
40535
|
}
|
40225
|
-
function BorderWidth() {
|
40226
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40227
|
-
return useMemo(() => {
|
40228
|
-
return /* @__PURE__ */ React__default.createElement(TextField, {
|
40229
|
-
label: "Width",
|
40230
|
-
quickchange: true,
|
40231
|
-
name: `${focusIdx2}.attributes.border-width`
|
40232
|
-
});
|
40233
|
-
}, [focusIdx2]);
|
40234
|
-
}
|
40235
|
-
const borderStyleOptions = [
|
40236
|
-
{
|
40237
|
-
value: "dashed",
|
40238
|
-
label: "Dashed"
|
40239
|
-
},
|
40240
|
-
{
|
40241
|
-
value: "dotted",
|
40242
|
-
label: "Dotted"
|
40243
|
-
},
|
40244
|
-
{
|
40245
|
-
value: "solid",
|
40246
|
-
label: "Solid"
|
40247
|
-
},
|
40248
|
-
{
|
40249
|
-
value: "double",
|
40250
|
-
label: "double"
|
40251
|
-
},
|
40252
|
-
{
|
40253
|
-
value: "ridge",
|
40254
|
-
label: "ridge"
|
40255
|
-
},
|
40256
|
-
{
|
40257
|
-
value: "groove",
|
40258
|
-
label: "groove"
|
40259
|
-
},
|
40260
|
-
{
|
40261
|
-
value: "inset",
|
40262
|
-
label: "inset"
|
40263
|
-
},
|
40264
|
-
{
|
40265
|
-
value: "outset",
|
40266
|
-
label: "outset"
|
40267
|
-
}
|
40268
|
-
];
|
40269
|
-
function BorderStyle() {
|
40270
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40271
|
-
return useMemo(() => {
|
40272
|
-
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
40273
|
-
label: "Style",
|
40274
|
-
name: `${focusIdx2}.attributes.border-style`,
|
40275
|
-
options: borderStyleOptions
|
40276
|
-
});
|
40277
|
-
}, [focusIdx2]);
|
40278
|
-
}
|
40279
|
-
function BorderColor() {
|
40280
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40281
|
-
return useMemo(() => {
|
40282
|
-
return /* @__PURE__ */ React__default.createElement(ColorPickerField, {
|
40283
|
-
label: "Color",
|
40284
|
-
name: `${focusIdx2}.attributes.border-color`
|
40285
|
-
});
|
40286
|
-
}, [focusIdx2]);
|
40287
|
-
}
|
40288
40536
|
function Divider() {
|
40289
40537
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, /* @__PURE__ */ React__default.createElement(Collapse$1, {
|
40290
40538
|
defaultActiveKey: ["-1", "0", "1", "2", "3"]
|
@@ -40463,58 +40711,6 @@ function Accordion() {
|
|
40463
40711
|
name: `${focusIdx2}.attributes.border`
|
40464
40712
|
})))));
|
40465
40713
|
}
|
40466
|
-
const options$5 = [
|
40467
|
-
{
|
40468
|
-
value: "left",
|
40469
|
-
label: "Left"
|
40470
|
-
},
|
40471
|
-
{
|
40472
|
-
value: "center",
|
40473
|
-
label: "Center"
|
40474
|
-
},
|
40475
|
-
{
|
40476
|
-
value: "right",
|
40477
|
-
label: "Right"
|
40478
|
-
}
|
40479
|
-
];
|
40480
|
-
function TextAlign() {
|
40481
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40482
|
-
return useMemo(() => {
|
40483
|
-
return /* @__PURE__ */ React__default.createElement(Stack$6, null, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40484
|
-
label: "Text align",
|
40485
|
-
name: `${focusIdx2}.attributes.text-align`,
|
40486
|
-
options: options$5
|
40487
|
-
}));
|
40488
|
-
}, [focusIdx2]);
|
40489
|
-
}
|
40490
|
-
const options$4 = [
|
40491
|
-
{
|
40492
|
-
value: "",
|
40493
|
-
label: "none"
|
40494
|
-
},
|
40495
|
-
{
|
40496
|
-
value: "uppercase",
|
40497
|
-
label: "uppercase"
|
40498
|
-
},
|
40499
|
-
{
|
40500
|
-
value: "lowercase",
|
40501
|
-
label: "lowercase"
|
40502
|
-
},
|
40503
|
-
{
|
40504
|
-
value: "capitalize",
|
40505
|
-
label: "capitalize"
|
40506
|
-
}
|
40507
|
-
];
|
40508
|
-
function TextTransform() {
|
40509
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40510
|
-
return useMemo(() => {
|
40511
|
-
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
40512
|
-
label: "Text transform",
|
40513
|
-
name: `${focusIdx2}.attributes.text-transform`,
|
40514
|
-
options: options$4
|
40515
|
-
});
|
40516
|
-
}, [focusIdx2]);
|
40517
|
-
}
|
40518
40714
|
function AccordionElement() {
|
40519
40715
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40520
40716
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, /* @__PURE__ */ React__default.createElement(Collapse$1, {
|
@@ -40634,7 +40830,7 @@ function AccordionText() {
|
|
40634
40830
|
attributeName: "padding"
|
40635
40831
|
})))));
|
40636
40832
|
}
|
40637
|
-
const options$
|
40833
|
+
const options$2 = [
|
40638
40834
|
{
|
40639
40835
|
value: "hidden",
|
40640
40836
|
label: "hidden"
|
@@ -40663,7 +40859,7 @@ function Carousel() {
|
|
40663
40859
|
}), /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40664
40860
|
label: "Thumbnails",
|
40665
40861
|
name: `${focusIdx2}.attributes.thumbnails`,
|
40666
|
-
options: options$
|
40862
|
+
options: options$2,
|
40667
40863
|
inline: true
|
40668
40864
|
}), /* @__PURE__ */ React__default.createElement(Align, {
|
40669
40865
|
inline: true
|
@@ -40779,7 +40975,7 @@ function CarouselImage({
|
|
40779
40975
|
name: `${focusIdx2}.data.value.image.[${index2}].title`
|
40780
40976
|
}));
|
40781
40977
|
}
|
40782
|
-
const options$
|
40978
|
+
const options$1 = [
|
40783
40979
|
{
|
40784
40980
|
value: "fluid-height",
|
40785
40981
|
label: "Fluid height"
|
@@ -40802,7 +40998,7 @@ function Hero() {
|
|
40802
40998
|
}, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40803
40999
|
label: "Mode",
|
40804
41000
|
name: `${focusIdx2}.attributes.mode`,
|
40805
|
-
options: options$
|
41001
|
+
options: options$1
|
40806
41002
|
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
40807
41003
|
span: 11
|
40808
41004
|
}, /* @__PURE__ */ React__default.createElement(Width, null)), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -40845,74 +41041,6 @@ function Hero() {
|
|
40845
41041
|
span: 11
|
40846
41042
|
}, /* @__PURE__ */ React__default.createElement(BackgroundColor, null)))))));
|
40847
41043
|
}
|
40848
|
-
function NavbarLinkPadding({ name }) {
|
40849
|
-
const { values: values2 } = useBlock();
|
40850
|
-
const getVal = useCallback((index2) => {
|
40851
|
-
return () => {
|
40852
|
-
var _a;
|
40853
|
-
return ((_a = lodash.exports.get(values2, name)) == null ? void 0 : _a.split(" ")[index2]) || "";
|
40854
|
-
};
|
40855
|
-
}, [name, values2]);
|
40856
|
-
const setVal = useCallback((index2) => {
|
40857
|
-
return (newVal) => {
|
40858
|
-
if (newVal === "") {
|
40859
|
-
newVal = "0px";
|
40860
|
-
}
|
40861
|
-
const vals = [
|
40862
|
-
getVal(0)(),
|
40863
|
-
getVal(1)(),
|
40864
|
-
getVal(2)(),
|
40865
|
-
getVal(3)()
|
40866
|
-
];
|
40867
|
-
vals[index2] = newVal;
|
40868
|
-
return vals.join(" ");
|
40869
|
-
};
|
40870
|
-
}, [getVal]);
|
40871
|
-
return useMemo(() => {
|
40872
|
-
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40873
|
-
vertical: true,
|
40874
|
-
spacing: "extraTight"
|
40875
|
-
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
40876
|
-
variation: "strong"
|
40877
|
-
}, "Padding"), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40878
|
-
wrap: false
|
40879
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40880
|
-
fill: true
|
40881
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40882
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Top"),
|
40883
|
-
quickchange: true,
|
40884
|
-
name,
|
40885
|
-
valueAdapter: getVal(0),
|
40886
|
-
onChangeAdapter: setVal(0)
|
40887
|
-
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40888
|
-
fill: true
|
40889
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40890
|
-
label: "Bottom",
|
40891
|
-
quickchange: true,
|
40892
|
-
name,
|
40893
|
-
valueAdapter: getVal(2),
|
40894
|
-
onChangeAdapter: setVal(2)
|
40895
|
-
}))), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40896
|
-
wrap: false
|
40897
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40898
|
-
fill: true
|
40899
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40900
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Left"),
|
40901
|
-
quickchange: true,
|
40902
|
-
name,
|
40903
|
-
valueAdapter: getVal(3),
|
40904
|
-
onChangeAdapter: setVal(3)
|
40905
|
-
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40906
|
-
fill: true
|
40907
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40908
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Right\xA0"),
|
40909
|
-
quickchange: true,
|
40910
|
-
name,
|
40911
|
-
valueAdapter: getVal(1),
|
40912
|
-
onChangeAdapter: setVal(1)
|
40913
|
-
}))));
|
40914
|
-
}, [getVal, name, setVal]);
|
40915
|
-
}
|
40916
41044
|
function Navbar() {
|
40917
41045
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40918
41046
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, {
|
@@ -40997,7 +41125,7 @@ function NavbarLink({
|
|
40997
41125
|
name: `${focusIdx2}.data.value.links.[${index2}].padding`
|
40998
41126
|
}));
|
40999
41127
|
}
|
41000
|
-
const options
|
41128
|
+
const options = [
|
41001
41129
|
{
|
41002
41130
|
value: "vertical",
|
41003
41131
|
label: "vertical"
|
@@ -41023,7 +41151,7 @@ function Social() {
|
|
41023
41151
|
}, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
41024
41152
|
label: "Mode",
|
41025
41153
|
name: `${focusIdx2}.attributes.mode`,
|
41026
|
-
options
|
41154
|
+
options
|
41027
41155
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
41028
41156
|
offset: 1,
|
41029
41157
|
span: 11
|
@@ -41232,100 +41360,6 @@ function AttributePanel() {
|
|
41232
41360
|
}
|
41233
41361
|
`), shadowRoot));
|
41234
41362
|
}
|
41235
|
-
function Decoration() {
|
41236
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
41237
|
-
return useMemo(() => {
|
41238
|
-
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41239
|
-
key: focusIdx2,
|
41240
|
-
vertical: true,
|
41241
|
-
spacing: "extraTight"
|
41242
|
-
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
41243
|
-
variation: "strong",
|
41244
|
-
size: "large"
|
41245
|
-
}, "Decoration"), /* @__PURE__ */ React__default.createElement(TextField, {
|
41246
|
-
label: "Border radius",
|
41247
|
-
name: `${focusIdx2}.attributes.borderRadius`,
|
41248
|
-
inline: true
|
41249
|
-
}), /* @__PURE__ */ React__default.createElement(TextField, {
|
41250
|
-
label: "Border",
|
41251
|
-
name: `${focusIdx2}.attributes.border`,
|
41252
|
-
inline: true,
|
41253
|
-
alignment: "center"
|
41254
|
-
}), /* @__PURE__ */ React__default.createElement(NumberField, {
|
41255
|
-
label: "Opacity",
|
41256
|
-
max: 1,
|
41257
|
-
min: 0,
|
41258
|
-
step: 0.1,
|
41259
|
-
name: `${focusIdx2}.attributes.opacity`,
|
41260
|
-
inline: true,
|
41261
|
-
alignment: "center"
|
41262
|
-
}));
|
41263
|
-
}, [focusIdx2]);
|
41264
|
-
}
|
41265
|
-
const options = [
|
41266
|
-
{
|
41267
|
-
value: "ltr",
|
41268
|
-
label: "ltr"
|
41269
|
-
},
|
41270
|
-
{
|
41271
|
-
value: "rtl",
|
41272
|
-
label: "rtl"
|
41273
|
-
}
|
41274
|
-
];
|
41275
|
-
function Direction() {
|
41276
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
41277
|
-
return useMemo(() => {
|
41278
|
-
return /* @__PURE__ */ React__default.createElement(Stack$6, null, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
41279
|
-
label: "Direction",
|
41280
|
-
name: `${focusIdx2}.attributes.direction`,
|
41281
|
-
options,
|
41282
|
-
inline: true
|
41283
|
-
}));
|
41284
|
-
}, [focusIdx2]);
|
41285
|
-
}
|
41286
|
-
function Margin() {
|
41287
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
41288
|
-
return useMemo(() => {
|
41289
|
-
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41290
|
-
vertical: true,
|
41291
|
-
spacing: "extraTight"
|
41292
|
-
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
41293
|
-
size: "large"
|
41294
|
-
}, "Margin"), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41295
|
-
wrap: false
|
41296
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41297
|
-
fill: true
|
41298
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41299
|
-
label: "Top",
|
41300
|
-
quickchange: true,
|
41301
|
-
name: `${focusIdx2}.attributes.marginTop`,
|
41302
|
-
inline: true
|
41303
|
-
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41304
|
-
fill: true
|
41305
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41306
|
-
label: "Bottom",
|
41307
|
-
quickchange: true,
|
41308
|
-
name: `${focusIdx2}.attributes.marginBottom`,
|
41309
|
-
inline: true
|
41310
|
-
}))), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41311
|
-
wrap: false
|
41312
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41313
|
-
fill: true
|
41314
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41315
|
-
label: "Left",
|
41316
|
-
quickchange: true,
|
41317
|
-
name: `${focusIdx2}.attributes.marginLeft`,
|
41318
|
-
inline: true
|
41319
|
-
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41320
|
-
fill: true
|
41321
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41322
|
-
label: "Right",
|
41323
|
-
quickchange: true,
|
41324
|
-
name: `${focusIdx2}.attributes.marginRight`,
|
41325
|
-
inline: true
|
41326
|
-
}))));
|
41327
|
-
}, [focusIdx2]);
|
41328
|
-
}
|
41329
41363
|
function Tools(props) {
|
41330
41364
|
const { container: container2 } = props;
|
41331
41365
|
const { mergeTags: mergeTags2 } = useEditorProps();
|